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-video
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-video')
-rw-r--r--media-video/2mandvd/2mandvd-1.8.5.ebuild66
-rw-r--r--media-video/2mandvd/Manifest1
-rw-r--r--media-video/2mandvd/files/2mandvd-1.7.3-libav.patch10
-rw-r--r--media-video/2mandvd/files/2mandvd-1.8.5-libavformat54.patch27
-rw-r--r--media-video/2mandvd/metadata.xml5
-rw-r--r--media-video/aacskeys/Manifest2
-rw-r--r--media-video/aacskeys/aacskeys-0.4.0c-r2.ebuild35
-rw-r--r--media-video/aacskeys/aacskeys-0.4.0e.ebuild35
-rw-r--r--media-video/aacskeys/files/aacskeys-0.4.0c-aacskeys-makefile.patch35
-rw-r--r--media-video/aacskeys/files/aacskeys-0.4.0c-libaacskeys-makefile.patch36
-rw-r--r--media-video/aacskeys/metadata.xml9
-rw-r--r--media-video/abby/Manifest1
-rw-r--r--media-video/abby/abby-0.4.8.ebuild25
-rw-r--r--media-video/abby/metadata.xml11
-rw-r--r--media-video/acidrip/Manifest1
-rw-r--r--media-video/acidrip/acidrip-0.14-r4.ebuild27
-rw-r--r--media-video/acidrip/files/acidrip-0.14-makefile.patch50
-rw-r--r--media-video/acidrip/files/acidrip-mplayer.patch22
-rw-r--r--media-video/acidrip/metadata.xml11
-rw-r--r--media-video/aegisub/Manifest3
-rw-r--r--media-video/aegisub/aegisub-2.1.9.ebuild61
-rw-r--r--media-video/aegisub/aegisub-3.1.2.ebuild101
-rw-r--r--media-video/aegisub/aegisub-3.1.3.ebuild98
-rw-r--r--media-video/aegisub/aegisub-9999.ebuild98
-rw-r--r--media-video/aegisub/metadata.xml13
-rw-r--r--media-video/alevt/Manifest1
-rw-r--r--media-video/alevt/alevt-1.6.2.ebuild48
-rw-r--r--media-video/alevt/files/alevt-1.6.2-libpng15.patch11
-rw-r--r--media-video/alevt/files/alevt-1.6.2-respectflags.patch34
-rw-r--r--media-video/alevt/metadata.xml5
-rw-r--r--media-video/aravis/Manifest2
-rw-r--r--media-video/aravis/aravis-0.1.14.ebuild68
-rw-r--r--media-video/aravis/aravis-0.1.15.ebuild68
-rw-r--r--media-video/aravis/aravis-9999.ebuild68
-rw-r--r--media-video/aravis/metadata.xml20
-rw-r--r--media-video/arista/Manifest2
-rw-r--r--media-video/arista/arista-0.9.5.ebuild58
-rw-r--r--media-video/arista/arista-0.9.7.ebuild76
-rw-r--r--media-video/arista/files/arista-0.9.7-doc-install.patch14
-rw-r--r--media-video/arista/metadata.xml13
-rw-r--r--media-video/asfrecorder/Manifest1
-rw-r--r--media-video/asfrecorder/asfrecorder-1.1.ebuild34
-rw-r--r--media-video/asfrecorder/metadata.xml11
-rw-r--r--media-video/atomicparsley-wez/Manifest1
-rw-r--r--media-video/atomicparsley-wez/atomicparsley-wez-0.9.6.ebuild38
-rw-r--r--media-video/atomicparsley-wez/metadata.xml11
-rw-r--r--media-video/atomicparsley/Manifest1
-rw-r--r--media-video/atomicparsley/atomicparsley-0.9.0.ebuild42
-rw-r--r--media-video/atomicparsley/files/atomicparsley-0.9.0-environment.patch80
-rw-r--r--media-video/atomicparsley/files/atomicparsley-0.9.0-glibc-2.10.patch39
-rw-r--r--media-video/atomicparsley/metadata.xml11
-rw-r--r--media-video/avidemux/Manifest7
-rw-r--r--media-video/avidemux/avidemux-2.5.6-r2.ebuild172
-rw-r--r--media-video/avidemux/avidemux-2.6.2-r1.ebuild122
-rw-r--r--media-video/avidemux/avidemux-2.6.3.ebuild118
-rw-r--r--media-video/avidemux/avidemux-2.6.4.ebuild118
-rw-r--r--media-video/avidemux/avidemux-2.6.5-r1.ebuild134
-rw-r--r--media-video/avidemux/avidemux-2.6.5.ebuild129
-rw-r--r--media-video/avidemux/avidemux-2.6.7.ebuild129
-rw-r--r--media-video/avidemux/avidemux-2.6.8.ebuild129
-rw-r--r--media-video/avidemux/avidemux-9999.ebuild129
-rw-r--r--media-video/avidemux/files/avidemux-2.5.4-build-plugins-fix.patch13
-rw-r--r--media-video/avidemux/files/avidemux-2.5.6-ffmpeg-symbol-visibility.patch20
-rw-r--r--media-video/avidemux/metadata.xml13
-rw-r--r--media-video/avinfo/Manifest3
-rw-r--r--media-video/avinfo/avinfo-1.0_alpha15.ebuild30
-rw-r--r--media-video/avinfo/avinfo-1.0_alpha15_p1.ebuild37
-rw-r--r--media-video/avinfo/metadata.xml8
-rw-r--r--media-video/baka-mplayer/Manifest2
-rw-r--r--media-video/baka-mplayer/baka-mplayer-2.0.2.ebuild39
-rw-r--r--media-video/baka-mplayer/baka-mplayer-2.0.3.ebuild39
-rw-r--r--media-video/baka-mplayer/metadata.xml6
-rw-r--r--media-video/bangarang/Manifest1
-rw-r--r--media-video/bangarang/bangarang-2.1-r2.ebuild36
-rw-r--r--media-video/bangarang/files/bangarang-2.1-gcc-4.7.patch45
-rw-r--r--media-video/bangarang/metadata.xml8
-rw-r--r--media-video/bashnapi/Manifest1
-rw-r--r--media-video/bashnapi/bashnapi-1.1.5.ebuild34
-rw-r--r--media-video/bashnapi/metadata.xml11
-rw-r--r--media-video/bbtools/Manifest1
-rw-r--r--media-video/bbtools/bbtools-1.9.ebuild38
-rw-r--r--media-video/bbtools/files/bbtools-1.9-gentoo.patch78
-rw-r--r--media-video/bbtools/metadata.xml17
-rw-r--r--media-video/bdsup2sub/Manifest2
-rw-r--r--media-video/bdsup2sub/bdsup2sub-4.0.0-r1.ebuild49
-rw-r--r--media-video/bdsup2sub/files/bdsup2sub-4.0.0-xdg.diff37
-rw-r--r--media-video/bdsup2sub/files/bdsup2sub-4.0.0-xdg.patch40
-rw-r--r--media-video/bdsup2sub/files/build-4.0.0.xml68
-rw-r--r--media-video/bdsup2sub/metadata.xml8
-rw-r--r--media-video/binkplayer/Manifest1
-rw-r--r--media-video/binkplayer/binkplayer-1.99w.ebuild30
-rw-r--r--media-video/binkplayer/metadata.xml5
-rw-r--r--media-video/bino/Manifest4
-rw-r--r--media-video/bino/bino-1.3.0.ebuild47
-rw-r--r--media-video/bino/bino-1.4.2-r1.ebuild70
-rw-r--r--media-video/bino/bino-1.4.4.ebuild70
-rw-r--r--media-video/bino/bino-1.6.1.ebuild71
-rw-r--r--media-video/bino/files/bino-1.4.2-lirc-detect.patch35
-rw-r--r--media-video/bino/files/bino.html24
-rw-r--r--media-video/bino/metadata.xml14
-rw-r--r--media-video/blinkensim/Manifest1
-rw-r--r--media-video/blinkensim/blinkensim-2.7.ebuild27
-rw-r--r--media-video/blinkensim/metadata.xml12
-rw-r--r--media-video/blinkenthemes/Manifest1
-rw-r--r--media-video/blinkenthemes/blinkenthemes-0.10.ebuild26
-rw-r--r--media-video/blinkenthemes/metadata.xml16
-rw-r--r--media-video/blinkentools/Manifest1
-rw-r--r--media-video/blinkentools/blinkentools-2.9.ebuild26
-rw-r--r--media-video/blinkentools/metadata.xml14
-rw-r--r--media-video/bombono-dvd/Manifest1
-rw-r--r--media-video/bombono-dvd/bombono-dvd-1.2.2.ebuild77
-rw-r--r--media-video/bombono-dvd/files/bombono-dvd-1.0.1-cflags.patch12
-rw-r--r--media-video/bombono-dvd/files/bombono-dvd-1.2.0-cdrtools.patch21
-rw-r--r--media-video/bombono-dvd/files/bombono-dvd-1.2.1-glib.patch13
-rw-r--r--media-video/bombono-dvd/files/bombono-dvd-1.2.1-libav9.patch44
-rw-r--r--media-video/bombono-dvd/files/bombono-dvd-1.2.2-ffmpeg2.patch46
-rw-r--r--media-video/bombono-dvd/files/bombono-dvd-1.2.2-ffmpeg26.patch13
-rw-r--r--media-video/bombono-dvd/files/bombono-dvd-boost-1.51.0-fix.patch537
-rw-r--r--media-video/bombono-dvd/metadata.xml13
-rw-r--r--media-video/camorama/Manifest1
-rw-r--r--media-video/camorama/camorama-0.19-r2.ebuild42
-rw-r--r--media-video/camorama/files/camorama-0.19-fixes.patch107
-rw-r--r--media-video/camorama/files/camorama-0.19-gconf.patch40
-rw-r--r--media-video/camorama/files/camorama-0.19-glib-232.patch24
-rw-r--r--media-video/camorama/files/camorama-0.19-libv4l.patch198
-rw-r--r--media-video/camorama/files/camorama-0.19-no-more-videodev_h.patch14
-rw-r--r--media-video/camorama/metadata.xml8
-rw-r--r--media-video/ccextractor/Manifest3
-rw-r--r--media-video/ccextractor/ccextractor-0.59.ebuild30
-rw-r--r--media-video/ccextractor/ccextractor-0.68.ebuild37
-rw-r--r--media-video/ccextractor/ccextractor-0.69.ebuild36
-rw-r--r--media-video/ccextractor/files/ccextractor-0.68-libpng.patch11
-rw-r--r--media-video/ccextractor/metadata.xml11
-rw-r--r--media-video/cclive/Manifest1
-rw-r--r--media-video/cclive/cclive-0.9.3-r1.ebuild33
-rw-r--r--media-video/cclive/files/cclive-0.9.3-iostream.patch80
-rw-r--r--media-video/cclive/metadata.xml12
-rw-r--r--media-video/chaplin/Manifest1
-rw-r--r--media-video/chaplin/chaplin-1.10-r1.ebuild37
-rw-r--r--media-video/chaplin/files/chaplin-1.10-asneeded.patch15
-rw-r--r--media-video/chaplin/files/chaplin-1.10-libdvdread-0.9.6.patch11
-rw-r--r--media-video/chaplin/metadata.xml11
-rw-r--r--media-video/cheese/Manifest3
-rw-r--r--media-video/cheese/cheese-3.12.2-r1.ebuild92
-rw-r--r--media-video/cheese/cheese-3.14.2.ebuild86
-rw-r--r--media-video/cheese/cheese-3.16.1.ebuild86
-rw-r--r--media-video/cheese/metadata.xml10
-rw-r--r--media-video/cinelerra/Manifest2
-rw-r--r--media-video/cinelerra/cinelerra-20120707.ebuild103
-rw-r--r--media-video/cinelerra/cinelerra-20140710.ebuild108
-rw-r--r--media-video/cinelerra/files/cinelerra-20140710-ffmpeg-0.11.patch134
-rw-r--r--media-video/cinelerra/files/cinelerra-20140710-underlinking.patch16
-rw-r--r--media-video/cinelerra/files/cinelerra-20140710-validate_desktop_entry.patch14
-rw-r--r--media-video/cinelerra/files/cinelerra-entry.patch14
-rw-r--r--media-video/cinelerra/files/cinelerra-ffmpeg-0.11.patch156
-rw-r--r--media-video/cinelerra/files/cinelerra-ffmpeg.patch76
-rw-r--r--media-video/cinelerra/files/cinelerra-ffmpeg2.patch218
-rw-r--r--media-video/cinelerra/files/cinelerra-libav9.patch93
-rw-r--r--media-video/cinelerra/files/cinelerra-nofindobject.patch16
-rw-r--r--media-video/cinelerra/files/cinelerra-pngtoh.patch15
-rw-r--r--media-video/cinelerra/files/cinelerra-std_and_str_h.patch81
-rw-r--r--media-video/cinelerra/files/cinelerra-underlinking.patch15
-rw-r--r--media-video/cinelerra/metadata.xml5
-rw-r--r--media-video/clive/Manifest1
-rw-r--r--media-video/clive/clive-2.3.0.1.ebuild58
-rw-r--r--media-video/clive/metadata.xml19
-rw-r--r--media-video/coherence/Manifest1
-rw-r--r--media-video/coherence/coherence-0.6.6.2.ebuild43
-rw-r--r--media-video/coherence/files/coherence-init23
-rw-r--r--media-video/coherence/metadata.xml5
-rw-r--r--media-video/coriander/Manifest1
-rw-r--r--media-video/coriander/coriander-2.0.2.ebuild32
-rw-r--r--media-video/coriander/metadata.xml10
-rw-r--r--media-video/cpdvd/Manifest1
-rw-r--r--media-video/cpdvd/cpdvd-1.10-r1.ebuild27
-rw-r--r--media-video/cpdvd/metadata.xml8
-rw-r--r--media-video/cpvts/Manifest1
-rw-r--r--media-video/cpvts/cpvts-1.2.ebuild42
-rw-r--r--media-video/cpvts/files/cpvts-1.2-dvdread.patch11
-rw-r--r--media-video/cpvts/metadata.xml8
-rw-r--r--media-video/cxfe/Manifest1
-rw-r--r--media-video/cxfe/cxfe-0.9.2.ebuild35
-rw-r--r--media-video/cxfe/files/cxfe-0.9.2-asneeded.patch15
-rw-r--r--media-video/cxfe/metadata.xml8
-rw-r--r--media-video/devede/Manifest4
-rw-r--r--media-video/devede/devede-3.16.9.ebuild53
-rw-r--r--media-video/devede/devede-3.21.0.ebuild56
-rw-r--r--media-video/devede/devede-3.22.0.ebuild56
-rw-r--r--media-video/devede/devede-3.23.0.ebuild54
-rw-r--r--media-video/devede/metadata.xml14
-rw-r--r--media-video/dfbsee/Manifest1
-rw-r--r--media-video/dfbsee/dfbsee-0.7.4-r1.ebuild36
-rw-r--r--media-video/dfbsee/files/dfbsee-0.7.4-direcfb-0.9.24.patch21
-rw-r--r--media-video/dfbsee/files/dfbsee-0.7.4-gcc4.patch65
-rw-r--r--media-video/dfbsee/files/dfbsee-0.7.4-standardtypes.patch43
-rw-r--r--media-video/dfbsee/metadata.xml8
-rw-r--r--media-video/dirac/Manifest1
-rw-r--r--media-video/dirac/dirac-1.0.2-r1.ebuild57
-rw-r--r--media-video/dirac/dirac-1.0.2.ebuild53
-rw-r--r--media-video/dirac/files/dirac-0.5.2-doc.patch59
-rw-r--r--media-video/dirac/metadata.xml11
-rw-r--r--media-video/dv2sub/Manifest1
-rw-r--r--media-video/dv2sub/dv2sub-0.3.ebuild33
-rw-r--r--media-video/dv2sub/metadata.xml17
-rw-r--r--media-video/dvbackup/Manifest1
-rw-r--r--media-video/dvbackup/dvbackup-0.0.4-r1.ebuild53
-rw-r--r--media-video/dvbackup/files/dvbackup-0.0.4-gcc4.diff11
-rw-r--r--media-video/dvbackup/metadata.xml11
-rw-r--r--media-video/dvbsnoop/Manifest1
-rw-r--r--media-video/dvbsnoop/dvbsnoop-1.4.50-r1.ebuild28
-rw-r--r--media-video/dvbsnoop/files/dvbsnoop-1.4.50-crc32.patch59
-rw-r--r--media-video/dvbsnoop/metadata.xml8
-rw-r--r--media-video/dvd-slideshow/Manifest3
-rw-r--r--media-video/dvd-slideshow/dvd-slideshow-0.8.4.2.ebuild56
-rw-r--r--media-video/dvd-slideshow/metadata.xml14
-rw-r--r--media-video/dvd9to5/Manifest1
-rw-r--r--media-video/dvd9to5/dvd9to5-0.1.7.ebuild26
-rw-r--r--media-video/dvd9to5/metadata.xml12
-rw-r--r--media-video/dvdauthor/Manifest3
-rw-r--r--media-video/dvdauthor/dvdauthor-0.6.18.ebuild32
-rw-r--r--media-video/dvdauthor/dvdauthor-0.7.0.ebuild41
-rw-r--r--media-video/dvdauthor/dvdauthor-0.7.1.ebuild42
-rw-r--r--media-video/dvdauthor/files/dvdauthor-0.6.18-libpng15.patch19
-rw-r--r--media-video/dvdauthor/files/dvdauthor-0.7.0-libpng15.patch19
-rw-r--r--media-video/dvdauthor/files/dvdauthor-0.7.1-glibc220.patch162
-rw-r--r--media-video/dvdauthor/metadata.xml14
-rw-r--r--media-video/dvdbackup/Manifest2
-rw-r--r--media-video/dvdbackup/dvdbackup-0.4.1.ebuild28
-rw-r--r--media-video/dvdbackup/dvdbackup-0.4.2.ebuild28
-rw-r--r--media-video/dvdbackup/metadata.xml11
-rw-r--r--media-video/dvdimagecmp/Manifest1
-rw-r--r--media-video/dvdimagecmp/dvdimagecmp-0.3-r1.ebuild31
-rw-r--r--media-video/dvdimagecmp/files/dvdimagecmp-0.3.diff23
-rw-r--r--media-video/dvdimagecmp/metadata.xml8
-rw-r--r--media-video/dvdrip/Manifest1
-rw-r--r--media-video/dvdrip/dvdrip-0.98.11-r2.ebuild74
-rw-r--r--media-video/dvdrip/files/dvdrip-0.98.11-fix_parallel_make.patch28
-rw-r--r--media-video/dvdrip/metadata.xml12
-rw-r--r--media-video/dvdstyler/Manifest2
-rw-r--r--media-video/dvdstyler/dvdstyler-2.7.2.ebuild66
-rw-r--r--media-video/dvdstyler/dvdstyler-2.9.2.ebuild66
-rw-r--r--media-video/dvdstyler/metadata.xml11
-rw-r--r--media-video/dvgrab/Manifest1
-rw-r--r--media-video/dvgrab/dvgrab-3.5.ebuild31
-rw-r--r--media-video/dvgrab/metadata.xml11
-rw-r--r--media-video/emovix/Manifest1
-rw-r--r--media-video/emovix/emovix-0.9.0.ebuild21
-rw-r--r--media-video/emovix/metadata.xml11
-rw-r--r--media-video/episoder/Manifest1
-rw-r--r--media-video/episoder/episoder-0.4.7.ebuild27
-rw-r--r--media-video/episoder/metadata.xml11
-rw-r--r--media-video/ffdiaporama/Manifest8
-rw-r--r--media-video/ffdiaporama/ffdiaporama-1.5.ebuild56
-rw-r--r--media-video/ffdiaporama/ffdiaporama-1.6.ebuild65
-rw-r--r--media-video/ffdiaporama/ffdiaporama-2.0.1.ebuild75
-rw-r--r--media-video/ffdiaporama/ffdiaporama-2.1.ebuild78
-rw-r--r--media-video/ffdiaporama/files/ffdiaporama-1.6-ffmpeg-2.0.patch32
-rw-r--r--media-video/ffdiaporama/files/ffdiaporama-2.0-libav9-deinterlacing.patch26
-rw-r--r--media-video/ffdiaporama/files/ffdiaporama-2.1-ffmpeg-2.4.patch16
-rw-r--r--media-video/ffdiaporama/metadata.xml50
-rw-r--r--media-video/ffmpeg/Manifest3
-rw-r--r--media-video/ffmpeg/ffmpeg-2.6.3.ebuild450
-rw-r--r--media-video/ffmpeg/ffmpeg-2.6.4.ebuild450
-rw-r--r--media-video/ffmpeg/ffmpeg-2.7.2.ebuild450
-rw-r--r--media-video/ffmpeg/ffmpeg-9999.ebuild452
-rw-r--r--media-video/ffmpeg/metadata.xml51
-rw-r--r--media-video/ffmpeg2theora/Manifest1
-rw-r--r--media-video/ffmpeg2theora/ffmpeg2theora-0.29-r1.ebuild51
-rw-r--r--media-video/ffmpeg2theora/ffmpeg2theora-0.29-r2.ebuild52
-rw-r--r--media-video/ffmpeg2theora/files/ffmpeg2theora-0.29-ffmpeg2.patch40
-rw-r--r--media-video/ffmpeg2theora/files/ffmpeg2theora-0.29-swr.patch24
-rw-r--r--media-video/ffmpeg2theora/files/ffmpeg2theora-0.29-underlinking.patch21
-rw-r--r--media-video/ffmpeg2theora/metadata.xml11
-rw-r--r--media-video/ffmpegthumbnailer/Manifest2
-rw-r--r--media-video/ffmpegthumbnailer/ffmpegthumbnailer-2.0.10.ebuild53
-rw-r--r--media-video/ffmpegthumbnailer/ffmpegthumbnailer-2.0.8.ebuild45
-rw-r--r--media-video/ffmpegthumbnailer/files/ffmpegthumbnailer-2.0.10-config-summary.patch23
-rw-r--r--media-video/ffmpegthumbnailer/files/ffmpegthumbnailer-2.0.10-installdirs.patch47
-rw-r--r--media-video/ffmpegthumbnailer/files/ffmpegthumbnailer-2.0.10-set-locale.patch46
-rw-r--r--media-video/ffmpegthumbnailer/files/ffmpegthumbnailer-2.0.8-memcpy.patch13
-rw-r--r--media-video/ffmpegthumbnailer/metadata.xml11
-rw-r--r--media-video/flumotion/Manifest2
-rwxr-xr-xmedia-video/flumotion/files/flumotion-init-0.2.017
-rw-r--r--media-video/flumotion/files/flumotion-init-323
-rw-r--r--media-video/flumotion/flumotion-0.10.1.ebuild124
-rw-r--r--media-video/flumotion/flumotion-0.8.1-r1.ebuild124
-rw-r--r--media-video/flumotion/flumotion-0.8.1.ebuild112
-rw-r--r--media-video/flumotion/metadata.xml5
-rw-r--r--media-video/flvstreamer/Manifest1
-rw-r--r--media-video/flvstreamer/flvstreamer-2.1c.ebuild36
-rw-r--r--media-video/flvstreamer/metadata.xml10
-rw-r--r--media-video/frameworks/Manifest1
-rw-r--r--media-video/frameworks/frameworks-0.3.7.ebuild24
-rw-r--r--media-video/frameworks/metadata.xml12
-rw-r--r--media-video/gaupol/Manifest2
-rw-r--r--media-video/gaupol/gaupol-0.19.2-r1.ebuild60
-rw-r--r--media-video/gaupol/gaupol-0.28.2.ebuild50
-rw-r--r--media-video/gaupol/metadata.xml6
-rw-r--r--media-video/get_flash_videos/Manifest1
-rw-r--r--media-video/get_flash_videos/files/get_flash_videos-youtubefix.patch100
-rw-r--r--media-video/get_flash_videos/get_flash_videos-1.24-r1.ebuild61
-rw-r--r--media-video/get_flash_videos/get_flash_videos-9999.ebuild52
-rw-r--r--media-video/get_flash_videos/metadata.xml13
-rw-r--r--media-video/gnome-mplayer/Manifest2
-rw-r--r--media-video/gnome-mplayer/gnome-mplayer-1.0.8.ebuild78
-rw-r--r--media-video/gnome-mplayer/gnome-mplayer-1.0.9.ebuild80
-rw-r--r--media-video/gnome-mplayer/metadata.xml12
-rw-r--r--media-video/gnome-subtitles/Manifest2
-rw-r--r--media-video/gnome-subtitles/gnome-subtitles-1.2.ebuild33
-rw-r--r--media-video/gnome-subtitles/gnome-subtitles-1.3.ebuild33
-rw-r--r--media-video/gnome-subtitles/metadata.xml15
-rw-r--r--media-video/gnome-video-effects/Manifest1
-rw-r--r--media-video/gnome-video-effects/gnome-video-effects-0.4.1.ebuild25
-rw-r--r--media-video/gnome-video-effects/metadata.xml7
-rw-r--r--media-video/google2srt/Manifest3
-rw-r--r--media-video/google2srt/files/build.xml85
-rw-r--r--media-video/google2srt/google2srt-0.5.3.ebuild64
-rw-r--r--media-video/google2srt/google2srt-0.5.6.ebuild64
-rw-r--r--media-video/google2srt/metadata.xml17
-rw-r--r--media-video/gpac/Manifest2
-rw-r--r--media-video/gpac/files/110_all_implicitdecls.patch22
-rw-r--r--media-video/gpac/files/210_all_system_libogg.patch28
-rw-r--r--media-video/gpac/files/ffmpeg25.patch43
-rw-r--r--media-video/gpac/files/gpac-0.5.0-build-fixes.patch113
-rw-r--r--media-video/gpac/files/gpac-0.5.0-ffmpeg2.patch28
-rw-r--r--media-video/gpac/files/gpac-0.5.0-libav9.patch93
-rw-r--r--media-video/gpac/files/gpac-0.5.0-mp42ts.patch17
-rw-r--r--media-video/gpac/files/gpac-0.5.0-respect_ldflags.patch45
-rw-r--r--media-video/gpac/files/gpac-0.5.1-build-fixes.patch206
-rw-r--r--media-video/gpac/gpac-0.5.0-r1.ebuild129
-rw-r--r--media-video/gpac/gpac-0.5.1_pre5456.ebuild120
-rw-r--r--media-video/gpac/gpac-9999.ebuild115
-rw-r--r--media-video/gpac/metadata.xml11
-rw-r--r--media-video/griffith/Manifest2
-rw-r--r--media-video/griffith/files/0.10-fix_lib_path.patch13
-rw-r--r--media-video/griffith/files/griffith-0.12.1-sqlalchemy-0.7.patch39
-rw-r--r--media-video/griffith/griffith-0.13-r1.ebuild76
-rw-r--r--media-video/griffith/griffith-0.13.ebuild78
-rw-r--r--media-video/griffith/metadata.xml12
-rw-r--r--media-video/gtk-recordmydesktop/Manifest1
-rw-r--r--media-video/gtk-recordmydesktop/files/gtk-recordmydesktop-0.3.8-check-for-jack.patch36
-rw-r--r--media-video/gtk-recordmydesktop/gtk-recordmydesktop-0.3.8-r3.ebuild40
-rw-r--r--media-video/gtk-recordmydesktop/metadata.xml11
-rw-r--r--media-video/guvcview/Manifest5
-rw-r--r--media-video/guvcview/guvcview-1.6.1.ebuild46
-rw-r--r--media-video/guvcview/guvcview-1.7.1.ebuild46
-rw-r--r--media-video/guvcview/guvcview-1.7.2.ebuild47
-rw-r--r--media-video/guvcview/guvcview-1.7.3.ebuild47
-rw-r--r--media-video/guvcview/guvcview-2.0.1.ebuild50
-rw-r--r--media-video/guvcview/metadata.xml11
-rw-r--r--media-video/gxine/Manifest1
-rw-r--r--media-video/gxine/files/gxine-0.5.905-desktop.patch12
-rw-r--r--media-video/gxine/files/gxine-0.5.905-fix-nspr-useage.patch11
-rw-r--r--media-video/gxine/files/gxine-0.5.906-endif.patch14
-rw-r--r--media-video/gxine/files/gxine-0.5.907-glib-2.31.patch34
-rw-r--r--media-video/gxine/files/gxine-0.5.907-underlinking.patch23
-rw-r--r--media-video/gxine/gxine-0.5.907-r1.ebuild102
-rw-r--r--media-video/gxine/metadata.xml11
-rw-r--r--media-video/h264enc/Manifest2
-rw-r--r--media-video/h264enc/h264enc-9.4.0.ebuild40
-rw-r--r--media-video/h264enc/h264enc-9.4.1.ebuild40
-rw-r--r--media-video/h264enc/metadata.xml14
-rw-r--r--media-video/handbrake/Manifest3
-rw-r--r--media-video/handbrake/files/handbrake-0.9.9-add-gmodule-to-gtk-configure.patch11
-rw-r--r--media-video/handbrake/files/handbrake-0.9.9-fix-compilation-with-mp4v2-v1.9.1.patch73
-rw-r--r--media-video/handbrake/files/handbrake-0.9.9-remove-faac-dependency.patch203
-rw-r--r--media-video/handbrake/files/handbrake-9999-expand-MK_SUBTITLE_PGS.patch9
-rw-r--r--media-video/handbrake/files/handbrake-9999-fix-compilation-with-mp4v2-v1.9.1.patch75
-rw-r--r--media-video/handbrake/files/handbrake-9999-remove-dvdnav-dup.patch20
-rw-r--r--media-video/handbrake/files/handbrake-9999-remove-faac-dependency.patch84
-rw-r--r--media-video/handbrake/files/handbrake-9999-use-older-libmkv.patch14
-rw-r--r--media-video/handbrake/files/handbrake-9999-use-unpatched-a52.patch26
-rw-r--r--media-video/handbrake/handbrake-0.10.0-r1.ebuild148
-rw-r--r--media-video/handbrake/handbrake-0.10.1.ebuild148
-rw-r--r--media-video/handbrake/handbrake-0.9.9-r1.ebuild185
-rw-r--r--media-video/handbrake/handbrake-9999.ebuild148
-rw-r--r--media-video/handbrake/metadata.xml18
-rw-r--r--media-video/hasciicam/Manifest2
-rw-r--r--media-video/hasciicam/hasciicam-1.1.1.ebuild20
-rw-r--r--media-video/hasciicam/hasciicam-1.1.2.ebuild21
-rw-r--r--media-video/hasciicam/metadata.xml8
-rw-r--r--media-video/hwdecode-demos/Manifest1
-rw-r--r--media-video/hwdecode-demos/files/avutil.patch15
-rw-r--r--media-video/hwdecode-demos/files/dl.patch31
-rw-r--r--media-video/hwdecode-demos/files/ffmpeg-1.patch73
-rw-r--r--media-video/hwdecode-demos/files/ffmpeg.patch33
-rw-r--r--media-video/hwdecode-demos/files/libav9.patch42
-rw-r--r--media-video/hwdecode-demos/files/vaapi.patch38
-rw-r--r--media-video/hwdecode-demos/hwdecode-demos-0.9.5.ebuild52
-rw-r--r--media-video/hwdecode-demos/metadata.xml8
-rw-r--r--media-video/imagination/Manifest1
-rw-r--r--media-video/imagination/files/imagination-3.0-cflags.patch34
-rw-r--r--media-video/imagination/imagination-3.0-r1.ebuild44
-rw-r--r--media-video/imagination/imagination-3.0.ebuild34
-rw-r--r--media-video/imagination/metadata.xml13
-rw-r--r--media-video/isight-firmware-tools/Manifest1
-rw-r--r--media-video/isight-firmware-tools/files/isight-firmware-tools-1.5.90-build-O0.patch32
-rw-r--r--media-video/isight-firmware-tools/isight-firmware-tools-1.6-r1.ebuild60
-rw-r--r--media-video/isight-firmware-tools/metadata.xml10
-rw-r--r--media-video/istanbul/Manifest2
-rw-r--r--media-video/istanbul/files/istanbul-0.2.2-desktop-file.patch18
-rw-r--r--media-video/istanbul/files/istanbul-0.2.2-dir-overwrite.patch31
-rw-r--r--media-video/istanbul/files/istanbul-0.2.2-fix-grab-xid.patch36
-rw-r--r--media-video/istanbul/files/istanbul-0.2.2-fix-preview-window.patch23
-rw-r--r--media-video/istanbul/files/istanbul-0.2.2-macro-typo.patch21
-rw-r--r--media-video/istanbul/files/istanbul-0.2.2-noalsa.patch17
-rw-r--r--media-video/istanbul/istanbul-0.2.2.1_pre20120909.ebuild88
-rw-r--r--media-video/istanbul/istanbul-0.2.2.ebuild78
-rw-r--r--media-video/istanbul/metadata.xml5
-rw-r--r--media-video/jubler/Manifest1
-rw-r--r--media-video/jubler/files/jubler-4.6.1-ffmpeg-1.patch274
-rw-r--r--media-video/jubler/files/jubler-4.6.1-ffmpeg-2.patch37
-rw-r--r--media-video/jubler/files/jubler-4.6.1-gentoo.patch163
-rw-r--r--media-video/jubler/files/update-4.6.1.xml326
-rw-r--r--media-video/jubler/jubler-4.6.1-r3.ebuild99
-rw-r--r--media-video/jubler/metadata.xml11
-rw-r--r--media-video/kaffeine/Manifest1
-rw-r--r--media-video/kaffeine/files/kaffeine-1.2.2-gcc4.7.patch32
-rw-r--r--media-video/kaffeine/kaffeine-1.2.2-r1.ebuild39
-rw-r--r--media-video/kaffeine/metadata.xml9
-rw-r--r--media-video/kamerka/Manifest1
-rw-r--r--media-video/kamerka/kamerka-0.10.ebuild25
-rw-r--r--media-video/kamerka/metadata.xml5
-rw-r--r--media-video/kdenlive/Manifest2
-rw-r--r--media-video/kdenlive/kdenlive-0.9.10.ebuild40
-rw-r--r--media-video/kdenlive/kdenlive-0.9.8.ebuild40
-rw-r--r--media-video/kdenlive/metadata.xml12
-rw-r--r--media-video/kffmpegthumbnailer/Manifest1
-rw-r--r--media-video/kffmpegthumbnailer/kffmpegthumbnailer-1.1.0-r3.ebuild31
-rw-r--r--media-video/kffmpegthumbnailer/metadata.xml12
-rw-r--r--media-video/kino/Manifest1
-rw-r--r--media-video/kino/files/kino-1.3.4-libav-0.7.patch60
-rw-r--r--media-video/kino/files/kino-1.3.4-libav-0.8.patch57
-rw-r--r--media-video/kino/files/kino-1.3.4-libavcodec-pkg-config.patch11
-rw-r--r--media-video/kino/files/kino-1.3.4-v4l1.patch22
-rw-r--r--media-video/kino/kino-1.3.4.ebuild108
-rw-r--r--media-video/kino/metadata.xml15
-rw-r--r--media-video/kmplayer/Manifest1
-rw-r--r--media-video/kmplayer/files/kmplayer-flash.patch12
-rw-r--r--media-video/kmplayer/kmplayer-0.11.3d-r3.ebuild65
-rw-r--r--media-video/kmplayer/metadata.xml9
-rw-r--r--media-video/kplayer/Manifest1
-rw-r--r--media-video/kplayer/kplayer-0.7.2-r1.ebuild24
-rw-r--r--media-video/kplayer/metadata.xml6
-rw-r--r--media-video/libav/Manifest8
-rw-r--r--media-video/libav/libav-10.5.ebuild324
-rw-r--r--media-video/libav/libav-10.9999.ebuild325
-rw-r--r--media-video/libav/libav-11.3.ebuild344
-rw-r--r--media-video/libav/libav-11.9999.ebuild341
-rw-r--r--media-video/libav/libav-9.14.ebuild323
-rw-r--r--media-video/libav/libav-9.17.ebuild323
-rw-r--r--media-video/libav/libav-9999.ebuild341
-rw-r--r--media-video/libav/metadata.xml38
-rw-r--r--media-video/lives/Manifest1
-rw-r--r--media-video/lives/lives-1.4.6.ebuild78
-rw-r--r--media-video/lives/metadata.xml11
-rw-r--r--media-video/loopy/Manifest1
-rw-r--r--media-video/loopy/loopy-0.5.3.ebuild23
-rw-r--r--media-video/loopy/metadata.xml9
-rw-r--r--media-video/lsdvd/Manifest1
-rw-r--r--media-video/lsdvd/files/lsdvd-0.16-chapter-count.patch25
-rw-r--r--media-video/lsdvd/files/lsdvd-0.16-newline.patch22
-rw-r--r--media-video/lsdvd/files/lsdvd-0.16-title.patch27
-rw-r--r--media-video/lsdvd/files/lsdvd-0.16-types.patch27
-rw-r--r--media-video/lsdvd/files/lsdvd-0.16-usec.patch21
-rw-r--r--media-video/lsdvd/files/lsdvd-0.17-autotools.patch12
-rw-r--r--media-video/lsdvd/lsdvd-0.17.ebuild25
-rw-r--r--media-video/lsdvd/metadata.xml11
-rw-r--r--media-video/luvcview/Manifest2
-rw-r--r--media-video/luvcview/luvcview-0.2.6.ebuild40
-rw-r--r--media-video/luvcview/metadata.xml5
-rw-r--r--media-video/lxdvdrip/Manifest1
-rw-r--r--media-video/lxdvdrip/files/lxdvdrip-1.70-vamps-makefile.patch13
-rw-r--r--media-video/lxdvdrip/files/lxdvdrip-1.76-makefile.patch28
-rw-r--r--media-video/lxdvdrip/files/lxdvdrip-1.77-makefile.patch43
-rw-r--r--media-video/lxdvdrip/files/lxdvdrip-1.77-vamps-makefile.patch11
-rw-r--r--media-video/lxdvdrip/lxdvdrip-1.77.ebuild51
-rw-r--r--media-video/lxdvdrip/metadata.xml11
-rw-r--r--media-video/m2vrequantizer/Manifest1
-rw-r--r--media-video/m2vrequantizer/m2vrequantizer-0.0.2_pre20060306.ebuild37
-rw-r--r--media-video/m2vrequantizer/metadata.xml9
-rw-r--r--media-video/makemkv/Manifest2
-rw-r--r--media-video/makemkv/files/makemkv-makefile.patch18
-rw-r--r--media-video/makemkv/files/makemkv-path.patch13
-rw-r--r--media-video/makemkv/makemkv-1.9.5.ebuild124
-rw-r--r--media-video/makemkv/metadata.xml25
-rw-r--r--media-video/matroxset/Manifest1
-rw-r--r--media-video/matroxset/matroxset-0.4.ebuild45
-rw-r--r--media-video/matroxset/metadata.xml6
-rw-r--r--media-video/maven-poke/Manifest1
-rw-r--r--media-video/maven-poke/maven-poke-0.0.1.ebuild34
-rw-r--r--media-video/maven-poke/metadata.xml6
-rw-r--r--media-video/mediainfo/Manifest3
-rw-r--r--media-video/mediainfo/mediainfo-0.7.65.ebuild70
-rw-r--r--media-video/mediainfo/mediainfo-0.7.72.ebuild70
-rw-r--r--media-video/mediainfo/mediainfo-0.7.73.ebuild70
-rw-r--r--media-video/mediainfo/metadata.xml8
-rw-r--r--media-video/metadata.xml36
-rw-r--r--media-video/minitube/Manifest3
-rw-r--r--media-video/minitube/files/minitube-1.9-gcc47.patch12
-rw-r--r--media-video/minitube/files/minitube-2.0-disable-updates.patch16
-rw-r--r--media-video/minitube/files/minitube-2.1.3-disable-updates.patch13
-rw-r--r--media-video/minitube/files/minitube-2.4-disable-updates.patch13
-rw-r--r--media-video/minitube/metadata.xml16
-rw-r--r--media-video/minitube/minitube-2.0.ebuild60
-rw-r--r--media-video/minitube/minitube-2.3-r1.ebuild77
-rw-r--r--media-video/minitube/minitube-2.4.ebuild92
-rw-r--r--media-video/miro/Manifest3
-rw-r--r--media-video/miro/files/miro-5.0.4-ffmpeg-1.patch78
-rw-r--r--media-video/miro/metadata.xml8
-rw-r--r--media-video/miro/miro-4.0.6.ebuild91
-rw-r--r--media-video/miro/miro-5.0.4.ebuild97
-rw-r--r--media-video/miro/miro-6.0.ebuild96
-rw-r--r--media-video/mjpegtools/Manifest1
-rw-r--r--media-video/mjpegtools/files/mjpegtools-2.1.0-no_format.patch70
-rw-r--r--media-video/mjpegtools/files/mjpegtools-2.1.0-pic.patch69
-rw-r--r--media-video/mjpegtools/files/mjpegtools-2.1.0-sdl-cflags.patch11
-rw-r--r--media-video/mjpegtools/metadata.xml16
-rw-r--r--media-video/mjpegtools/mjpegtools-2.1.0-r2.ebuild117
-rw-r--r--media-video/mjpg-streamer/Manifest2
-rw-r--r--media-video/mjpg-streamer/files/0_pre20120421-make-var-instead-of-cmd.patch118
-rw-r--r--media-video/mjpg-streamer/files/0_pre20120621-make-var-instead-of-cmd.patch118
-rw-r--r--media-video/mjpg-streamer/files/mjpg-streamer.confd21
-rw-r--r--media-video/mjpg-streamer/files/mjpg-streamer.initd48
-rw-r--r--media-video/mjpg-streamer/metadata.xml43
-rw-r--r--media-video/mjpg-streamer/mjpg-streamer-0_pre20120421.ebuild72
-rw-r--r--media-video/mjpg-streamer/mjpg-streamer-0_pre20120621.ebuild74
-rw-r--r--media-video/mkclean/Manifest2
-rw-r--r--media-video/mkclean/metadata.xml8
-rw-r--r--media-video/mkclean/mkclean-0.8.6-r1.ebuild40
-rw-r--r--media-video/mkclean/mkclean-0.8.7.ebuild35
-rw-r--r--media-video/mkvalidator/Manifest4
-rw-r--r--media-video/mkvalidator/metadata.xml8
-rw-r--r--media-video/mkvalidator/mkvalidator-0.3.7-r1.ebuild34
-rw-r--r--media-video/mkvalidator/mkvalidator-0.4.0.ebuild38
-rw-r--r--media-video/mkvalidator/mkvalidator-0.4.1.ebuild33
-rw-r--r--media-video/mkvalidator/mkvalidator-0.4.2.ebuild33
-rw-r--r--media-video/mkvtoolnix/Manifest2
-rw-r--r--media-video/mkvtoolnix/files/mkvtoolnix-5.8.0-boost-configure.patch63
-rw-r--r--media-video/mkvtoolnix/files/mkvtoolnix-5.8.0-system-pugixml.patch31
-rw-r--r--media-video/mkvtoolnix/files/mkvtoolnix-6.6.0-boost-1.56.patch52
-rw-r--r--media-video/mkvtoolnix/files/mkvtoolnix-8.2.0-fix-curl-support.patch11
-rw-r--r--media-video/mkvtoolnix/metadata.xml5
-rw-r--r--media-video/mkvtoolnix/mkvtoolnix-6.6.0.ebuild89
-rw-r--r--media-video/mkvtoolnix/mkvtoolnix-8.2.0-r1.ebuild123
-rw-r--r--media-video/motion/Manifest1
-rw-r--r--media-video/motion/files/ffmpeg-1.patch95
-rw-r--r--media-video/motion/files/ffmpeg-2.patch141
-rw-r--r--media-video/motion/files/ffmpeg-3.patch35
-rw-r--r--media-video/motion/files/ffmpeg-4.patch68
-rw-r--r--media-video/motion/files/ffmpeg-5.patch122
-rw-r--r--media-video/motion/files/libav-9.patch21
-rw-r--r--media-video/motion/files/motion-3.2.12-workaround-v4l1_deprecation.patch35
-rw-r--r--media-video/motion/files/motion.confd4
-rw-r--r--media-video/motion/files/motion.initd-r239
-rw-r--r--media-video/motion/metadata.xml11
-rw-r--r--media-video/motion/motion-3.2.12-r2.ebuild73
-rw-r--r--media-video/motion/motion-3.2.12-r3.ebuild82
-rw-r--r--media-video/motiontrack/Manifest1
-rw-r--r--media-video/motiontrack/metadata.xml11
-rw-r--r--media-video/motiontrack/motiontrack-0.1.3.ebuild78
-rw-r--r--media-video/movit/Manifest5
-rw-r--r--media-video/movit/metadata.xml8
-rw-r--r--media-video/movit/movit-1.1.1.ebuild35
-rw-r--r--media-video/movit/movit-1.1.2.ebuild35
-rw-r--r--media-video/movit/movit-1.1.3.ebuild35
-rw-r--r--media-video/movit/movit-1.1.ebuild34
-rw-r--r--media-video/mpeg-tools/Manifest1
-rw-r--r--media-video/mpeg-tools/files/mpeg-tools-1.5b-64bit_fixes.patch286
-rw-r--r--media-video/mpeg-tools/files/mpeg-tools-1.5b-as-needed.patch47
-rw-r--r--media-video/mpeg-tools/files/mpeg-tools-1.5b-build.patch56
-rw-r--r--media-video/mpeg-tools/files/mpeg-tools-1.5b-jpeg.patch56
-rw-r--r--media-video/mpeg-tools/files/mpeg-tools-1.5b-powerpc.patch20
-rw-r--r--media-video/mpeg-tools/files/mpeg-tools-1.5b-system-jpeg-7.patch26
-rw-r--r--media-video/mpeg-tools/files/mpeg-tools-1.5b-system-jpeg.patch38
-rw-r--r--media-video/mpeg-tools/files/mpeg-tools-1.5b-tempfile-convert.patch169
-rw-r--r--media-video/mpeg-tools/files/mpeg-tools-1.5b-tempfile-mpeg-encode.patch87
-rw-r--r--media-video/mpeg-tools/files/mpeg-tools-1.5b-tempfile-tests.patch204
-rw-r--r--media-video/mpeg-tools/metadata.xml8
-rw-r--r--media-video/mpeg-tools/mpeg-tools-1.5b-r4.ebuild67
-rw-r--r--media-video/mpeg-tools/mpeg-tools-1.5b-r5.ebuild66
-rw-r--r--media-video/mpeg2vidcodec/Manifest1
-rw-r--r--media-video/mpeg2vidcodec/metadata.xml8
-rw-r--r--media-video/mpeg2vidcodec/mpeg2vidcodec-12-r1.ebuild36
-rw-r--r--media-video/mpglen/Manifest1
-rw-r--r--media-video/mpglen/metadata.xml8
-rw-r--r--media-video/mpglen/mpglen-0.1.ebuild33
-rw-r--r--media-video/mpgtx/Manifest1
-rw-r--r--media-video/mpgtx/files/mpgtx-1.3.1-configure.patch69
-rw-r--r--media-video/mpgtx/files/mpgtx-1.3.1-dont-ignore-cxx-flags.patch11
-rw-r--r--media-video/mpgtx/metadata.xml11
-rw-r--r--media-video/mpgtx/mpgtx-1.3.1-r2.ebuild48
-rw-r--r--media-video/mplay-sh/Manifest1
-rw-r--r--media-video/mplay-sh/metadata.xml10
-rw-r--r--media-video/mplay-sh/mplay-sh-0.5.3-r1.ebuild46
-rw-r--r--media-video/mplayer-resume/Manifest1
-rw-r--r--media-video/mplayer-resume/metadata.xml5
-rw-r--r--media-video/mplayer-resume/mplayer-resume-2.0.ebuild38
-rw-r--r--media-video/mplayer-sh/Manifest2
-rw-r--r--media-video/mplayer-sh/files/mplayer-sh-0.8.6-parameter-aid.diff84
-rw-r--r--media-video/mplayer-sh/files/mplayer-sh-0.8.7-parameter-aid.diff84
-rw-r--r--media-video/mplayer-sh/metadata.xml12
-rw-r--r--media-video/mplayer-sh/mplayer-sh-0.8.6-r2.ebuild43
-rw-r--r--media-video/mplayer-sh/mplayer-sh-0.8.7.ebuild43
-rw-r--r--media-video/mplayer/Manifest8
-rwxr-xr-xmedia-video/mplayer/files/dump_ffmpeg.sh74
-rw-r--r--media-video/mplayer/files/mplayer-1.0_rc4-pkg-config.patch74
-rw-r--r--media-video/mplayer/files/mplayer-1.1-codecid.patch19
-rw-r--r--media-video/mplayer/files/mplayer-1.1-ffmpeg.patch34
-rw-r--r--media-video/mplayer/files/mplayer-1.1-libav-0.8.patch21
-rw-r--r--media-video/mplayer/files/mplayer-1.1-libav-9.patch488
-rw-r--r--media-video/mplayer/files/mplayer-1.1-missingbreak.patch18
-rw-r--r--media-video/mplayer/files/mplayer-1.1-planaraudio.patch138
-rw-r--r--media-video/mplayer/files/mplayer-1.1.1-avcodecidsubrip.patch17
-rw-r--r--media-video/mplayer/files/mplayer-1.1.1-codecidsubrip.patch17
-rw-r--r--media-video/mplayer/files/mplayer-1.2_pre20130729-compat.patch62
-rw-r--r--media-video/mplayer/files/mplayer-1.2_pre20150214-pulseaudio-6.0.patch33
-rw-r--r--media-video/mplayer/files/prepare_mplayer.sh25
-rw-r--r--media-video/mplayer/metadata.xml41
-rw-r--r--media-video/mplayer/mplayer-1.1.1-r1.ebuild658
-rw-r--r--media-video/mplayer/mplayer-1.2_pre20130729.ebuild633
-rw-r--r--media-video/mplayer/mplayer-1.2_pre20141011.ebuild631
-rw-r--r--media-video/mplayer/mplayer-1.2_pre20150214-r1.ebuild633
-rw-r--r--media-video/mplayer/mplayer-1.2_pre20150214.ebuild628
-rw-r--r--media-video/mplayer/mplayer-1.2_pre20150730.ebuild633
-rw-r--r--media-video/mplayer/mplayer-9999.ebuild628
-rw-r--r--media-video/mpv/Manifest5
-rw-r--r--media-video/mpv/files/mpv-0.3.11-libav-9.patch12
-rw-r--r--media-video/mpv/metadata.xml45
-rw-r--r--media-video/mpv/mpv-0.3.10.ebuild257
-rw-r--r--media-video/mpv/mpv-0.8.3-r1.ebuild254
-rw-r--r--media-video/mpv/mpv-0.9.2-r1.ebuild265
-rw-r--r--media-video/mpv/mpv-9999.ebuild265
-rw-r--r--media-video/noad/Manifest2
-rw-r--r--media-video/noad/files/confd_vdraddon.noad72
-rw-r--r--media-video/noad/files/noad-reccmd7
-rw-r--r--media-video/noad/files/patches-0.7.x/noad-0.7.3-ffmpeg_detection.diff13
-rw-r--r--media-video/noad/files/patches-0.7.x/noad-0.7.3-hangcheck.diff21
-rw-r--r--media-video/noad/files/patches-0.7.x/noad-0.7.3_gcc-4.7.diff17
-rw-r--r--media-video/noad/files/patches-0.7.x/noad-0.7.3_missing_include.diff14
-rw-r--r--media-video/noad/files/patches-0.8.x/noad-0.8.6-ffmpeg25.patch16
-rw-r--r--media-video/noad/files/patches-0.8.x/noad-0.8.6-libav9.diff106
-rw-r--r--media-video/noad/files/pre-shutdown-15-noad.sh41
-rw-r--r--media-video/noad/files/reccmds.noad.conf1
-rw-r--r--media-video/noad/files/record-50-noad.sh67
-rw-r--r--media-video/noad/metadata.xml15
-rw-r--r--media-video/noad/noad-0.7.3-r1.ebuild89
-rw-r--r--media-video/noad/noad-0.7.3.ebuild88
-rw-r--r--media-video/noad/noad-0.8.6-r1.ebuild81
-rw-r--r--media-video/noad/noad-0.8.6.ebuild78
-rw-r--r--media-video/nvidia-settings/Manifest3
-rw-r--r--media-video/nvidia-settings/files/nvidia-settings-319.12-jansson.patch94
-rw-r--r--media-video/nvidia-settings/metadata.xml8
-rw-r--r--media-video/nvidia-settings/nvidia-settings-331.20.ebuild82
-rw-r--r--media-video/nvidia-settings/nvidia-settings-340.58.ebuild77
-rw-r--r--media-video/nvidia-settings/nvidia-settings-343.22.ebuild77
-rw-r--r--media-video/ogmrip/Manifest1
-rw-r--r--media-video/ogmrip/metadata.xml19
-rw-r--r--media-video/ogmrip/ogmrip-1.0.1.ebuild83
-rw-r--r--media-video/openshot/Manifest1
-rw-r--r--media-video/openshot/metadata.xml11
-rw-r--r--media-video/openshot/openshot-1.4.3.ebuild61
-rw-r--r--media-video/oxine/Manifest1
-rw-r--r--media-video/oxine/metadata.xml11
-rw-r--r--media-video/oxine/oxine-0.7.1-r1.ebuild67
-rw-r--r--media-video/parole/Manifest4
-rw-r--r--media-video/parole/metadata.xml11
-rw-r--r--media-video/parole/parole-0.5.4.ebuild45
-rw-r--r--media-video/parole/parole-0.6.1.ebuild46
-rw-r--r--media-video/parole/parole-0.7.0.ebuild51
-rw-r--r--media-video/parole/parole-0.8.0-r1.ebuild51
-rw-r--r--media-video/pgcedit/Manifest3
-rw-r--r--media-video/pgcedit/files/pgcedit-0.8.6-config-paths.patch26
-rw-r--r--media-video/pgcedit/metadata.xml10
-rw-r--r--media-video/pgcedit/pgcedit-0.8.6.ebuild54
-rw-r--r--media-video/pgmfindclip/Manifest1
-rw-r--r--media-video/pgmfindclip/metadata.xml8
-rw-r--r--media-video/pgmfindclip/pgmfindclip-1.13.ebuild31
-rw-r--r--media-video/photofilmstrip/Manifest1
-rw-r--r--media-video/photofilmstrip/files/photofilmstrip-1.9.91-PIL_modules_imports_fix.patch103
-rw-r--r--media-video/photofilmstrip/metadata.xml20
-rw-r--r--media-video/photofilmstrip/photofilmstrip-1.9.91-r1.ebuild53
-rw-r--r--media-video/pitivi/Manifest1
-rw-r--r--media-video/pitivi/files/pitivi-0.94-unittest.patch14
-rw-r--r--media-video/pitivi/metadata.xml6
-rw-r--r--media-video/pitivi/pitivi-0.94.ebuild90
-rw-r--r--media-video/plasma-mediacenter/Manifest1
-rw-r--r--media-video/plasma-mediacenter/metadata.xml8
-rw-r--r--media-video/plasma-mediacenter/plasma-mediacenter-1.3.0.ebuild53
-rw-r--r--media-video/projectx/Manifest4
-rw-r--r--media-video/projectx/files/build-0.90.4.00_p33.xml77
-rw-r--r--media-video/projectx/files/projectx-0.90.4.00_p33-bl2.patch15
-rw-r--r--media-video/projectx/files/projectx-0.90.4.00_p33-idctfast.patch37
-rw-r--r--media-video/projectx/files/projectx-0.90.4.00_p33-stdout-corrupt.patch11
-rw-r--r--media-video/projectx/files/projectx-0.90.4.00_p33-xdg.patch44
-rw-r--r--media-video/projectx/metadata.xml15
-rw-r--r--media-video/projectx/projectx-0.91.0.10.ebuild127
-rw-r--r--media-video/pymp/Manifest1
-rw-r--r--media-video/pymp/metadata.xml8
-rw-r--r--media-video/pymp/pymp-1.1.ebuild48
-rw-r--r--media-video/qgifer/Manifest1
-rw-r--r--media-video/qgifer/files/qgifer-0.2.1-desktop.patch13
-rw-r--r--media-video/qgifer/metadata.xml19
-rw-r--r--media-video/qgifer/qgifer-0.2.1.ebuild39
-rw-r--r--media-video/qt-recordmydesktop/Manifest1
-rw-r--r--media-video/qt-recordmydesktop/files/qt-recordmydesktop-0.3.8-check-for-jack.patch32
-rw-r--r--media-video/qt-recordmydesktop/files/qt-recordmydesktop-0.3.8-desktopfile.patch18
-rw-r--r--media-video/qt-recordmydesktop/files/qt-recordmydesktop-0.3.8-pyqt4.patch14
-rw-r--r--media-video/qt-recordmydesktop/metadata.xml9
-rw-r--r--media-video/qt-recordmydesktop/qt-recordmydesktop-0.3.8-r2.ebuild59
-rw-r--r--media-video/qx11grab/Manifest2
-rw-r--r--media-video/qx11grab/metadata.xml5
-rw-r--r--media-video/qx11grab/qx11grab-0.4.10-r1.ebuild55
-rw-r--r--media-video/qx11grab/qx11grab-0.4.12.ebuild55
-rw-r--r--media-video/recmpeg/Manifest1
-rw-r--r--media-video/recmpeg/metadata.xml11
-rw-r--r--media-video/recmpeg/recmpeg-1.0.5.ebuild29
-rw-r--r--media-video/recordmydesktop/Manifest1
-rw-r--r--media-video/recordmydesktop/files/0.3.8.1-fix-libjack-check.patch14
-rw-r--r--media-video/recordmydesktop/files/0.3.8.1-fix_new_theora.patch48
-rw-r--r--media-video/recordmydesktop/metadata.xml11
-rw-r--r--media-video/recordmydesktop/recordmydesktop-0.3.8.1-r4.ebuild58
-rw-r--r--media-video/replex/Manifest2
-rw-r--r--media-video/replex/metadata.xml8
-rw-r--r--media-video/replex/replex-0.1.4.ebuild23
-rw-r--r--media-video/replex/replex-0.1.6.8.ebuild24
-rw-r--r--media-video/rovclock/Manifest1
-rw-r--r--media-video/rovclock/files/rovclock-0.6e-ldflags.patch13
-rw-r--r--media-video/rovclock/metadata.xml12
-rw-r--r--media-video/rovclock/rovclock-0.6e.ebuild28
-rw-r--r--media-video/rtmpdump/Manifest1
-rw-r--r--media-video/rtmpdump/metadata.xml15
-rw-r--r--media-video/rtmpdump/rtmpdump-2.4_p20131018.ebuild79
-rw-r--r--media-video/rtmpdump/rtmpdump-9999.ebuild73
-rw-r--r--media-video/setpwc/Manifest1
-rw-r--r--media-video/setpwc/metadata.xml5
-rw-r--r--media-video/setpwc/setpwc-1.3.ebuild33
-rw-r--r--media-video/shrip/Manifest1
-rw-r--r--media-video/shrip/metadata.xml15
-rw-r--r--media-video/shrip/shrip-0.6.0.ebuild41
-rw-r--r--media-video/smplayer/Manifest5
-rw-r--r--media-video/smplayer/files/smplayer-14.9.0-zero-bidi.patch27
-rw-r--r--media-video/smplayer/files/smplayer-14.9.0.6690-zero-bidi.patch13
-rw-r--r--media-video/smplayer/files/smplayer-14.9.0.6966-unbundle-qtsingleapplication.patch15
-rw-r--r--media-video/smplayer/metadata.xml22
-rw-r--r--media-video/smplayer/smplayer-14.3.0.ebuild76
-rw-r--r--media-video/smplayer/smplayer-14.9.0-r1.ebuild85
-rw-r--r--media-video/smplayer/smplayer-14.9.0.6690-r3.ebuild109
-rw-r--r--media-video/smplayer/smplayer-14.9.0.6966-r2.ebuild120
-rw-r--r--media-video/smplayer/smplayer-14.9.0.6994.ebuild120
-rw-r--r--media-video/snappy/Manifest1
-rw-r--r--media-video/snappy/metadata.xml8
-rw-r--r--media-video/snappy/snappy-1.0.ebuild40
-rw-r--r--media-video/sonic-snap/Manifest1
-rw-r--r--media-video/sonic-snap/metadata.xml6
-rw-r--r--media-video/sonic-snap/sonic-snap-1.7.ebuild66
-rw-r--r--media-video/sswf/Manifest4
-rw-r--r--media-video/sswf/metadata.xml11
-rw-r--r--media-video/sswf/sswf-1.8.2-r1.ebuild43
-rw-r--r--media-video/sswf/sswf-1.8.4-r1.ebuild43
-rw-r--r--media-video/stk11xx/Manifest1
-rw-r--r--media-video/stk11xx/files/stk11xx-2.6.37.patch16
-rw-r--r--media-video/stk11xx/files/stk11xx-v4l_compat_ioctl32.diff15
-rw-r--r--media-video/stk11xx/metadata.xml7
-rw-r--r--media-video/stk11xx/stk11xx-2.1.0_p104.ebuild29
-rw-r--r--media-video/stk11xx/stk11xx-9999.ebuild43
-rw-r--r--media-video/streamdvd/Manifest1
-rw-r--r--media-video/streamdvd/files/streamdvd-0.4-gcc41.patch13
-rw-r--r--media-video/streamdvd/files/streamdvd-0.4-gcc43.patch44
-rw-r--r--media-video/streamdvd/files/streamdvd-0.4-gcc44.patch24
-rw-r--r--media-video/streamdvd/files/streamdvd-0.4-libdvdread.patch36
-rw-r--r--media-video/streamdvd/files/streamdvd-0.4-makefile.patch27
-rw-r--r--media-video/streamdvd/files/streamdvd-0.4.patch22
-rw-r--r--media-video/streamdvd/metadata.xml15
-rw-r--r--media-video/streamdvd/streamdvd-0.4-r1.ebuild59
-rw-r--r--media-video/sub2srt/Manifest1
-rw-r--r--media-video/sub2srt/metadata.xml8
-rw-r--r--media-video/sub2srt/sub2srt-0.5.3.ebuild19
-rw-r--r--media-video/subcheck/Manifest1
-rw-r--r--media-video/subcheck/metadata.xml14
-rw-r--r--media-video/subcheck/subcheck-0.78.2.ebuild36
-rw-r--r--media-video/subdl/Manifest1
-rw-r--r--media-video/subdl/metadata.xml11
-rw-r--r--media-video/subdl/subdl-1.0.3.ebuild33
-rw-r--r--media-video/subdownloader/Manifest1
-rw-r--r--media-video/subdownloader/metadata.xml20
-rw-r--r--media-video/subdownloader/subdownloader-2.0.18-r1.ebuild36
-rw-r--r--media-video/subdownloader/subdownloader-2.0.18.ebuild44
-rw-r--r--media-video/subliminal/Manifest1
-rw-r--r--media-video/subliminal/metadata.xml13
-rw-r--r--media-video/subliminal/subliminal-0.7.4.ebuild41
-rw-r--r--media-video/subliminal/subliminal-9999.ebuild39
-rw-r--r--media-video/submux-dvd/Manifest1
-rw-r--r--media-video/submux-dvd/files/submux-dvd-0.5.patch11
-rw-r--r--media-video/submux-dvd/metadata.xml8
-rw-r--r--media-video/submux-dvd/submux-dvd-0.5.2.ebuild28
-rw-r--r--media-video/subotage/Manifest1
-rw-r--r--media-video/subotage/metadata.xml11
-rw-r--r--media-video/subotage/subotage-0.15.ebuild22
-rw-r--r--media-video/subsync/Manifest1
-rw-r--r--media-video/subsync/metadata.xml12
-rw-r--r--media-video/subsync/subsync-0.0.1.ebuild24
-rw-r--r--media-video/subtitlecomposer/Manifest1
-rw-r--r--media-video/subtitlecomposer/metadata.xml9
-rw-r--r--media-video/subtitlecomposer/subtitlecomposer-0.5.6.ebuild46
-rw-r--r--media-video/subtitleeditor/Manifest1
-rw-r--r--media-video/subtitleeditor/files/subtitleeditor-0.41.0-keyframe-generation.patch30
-rw-r--r--media-video/subtitleeditor/files/subtitleeditor-0.41.0-subtitle-edition.patch27
-rw-r--r--media-video/subtitleeditor/files/subtitleeditor-0.41.0-textoverlay.patch16
-rw-r--r--media-video/subtitleeditor/metadata.xml13
-rw-r--r--media-video/subtitleeditor/subtitleeditor-0.41.1-r1.ebuild72
-rw-r--r--media-video/subtitler-yuv/Manifest1
-rw-r--r--media-video/subtitler-yuv/metadata.xml8
-rw-r--r--media-video/subtitler-yuv/subtitler-yuv-0.6.5.ebuild42
-rw-r--r--media-video/subtitleripper/Manifest1
-rw-r--r--media-video/subtitleripper/files/subtitleripper-0.3.4-glibc210.patch21
-rw-r--r--media-video/subtitleripper/files/subtitleripper-0.3.4-libpng.patch25
-rw-r--r--media-video/subtitleripper/files/subtitleripper-0.3.4-linkingorder.patch28
-rw-r--r--media-video/subtitleripper/files/subtitleripper-0.3.4-respect-ldflags.patch28
-rw-r--r--media-video/subtitleripper/metadata.xml8
-rw-r--r--media-video/subtitleripper/subtitleripper-0.3.4-r4.ebuild50
-rw-r--r--media-video/super_demux/Manifest1
-rw-r--r--media-video/super_demux/files/super_demux-0.3.diff12
-rw-r--r--media-video/super_demux/metadata.xml8
-rw-r--r--media-video/super_demux/super_demux-0.3.ebuild31
-rw-r--r--media-video/tcmplex-panteltje/Manifest1
-rw-r--r--media-video/tcmplex-panteltje/metadata.xml12
-rw-r--r--media-video/tcmplex-panteltje/tcmplex-panteltje-0.4.7.ebuild27
-rw-r--r--media-video/tivodecode/Manifest1
-rw-r--r--media-video/tivodecode/metadata.xml12
-rw-r--r--media-video/tivodecode/tivodecode-0.2_pre4.ebuild25
-rw-r--r--media-video/totem/Manifest3
-rw-r--r--media-video/totem/metadata.xml17
-rw-r--r--media-video/totem/totem-3.14.3.ebuild141
-rw-r--r--media-video/totem/totem-3.16.1.ebuild133
-rw-r--r--media-video/totem/totem-3.16.2.ebuild132
-rw-r--r--media-video/tovid/Manifest3
-rw-r--r--media-video/tovid/metadata.xml9
-rw-r--r--media-video/tovid/tovid-0.34.ebuild60
-rw-r--r--media-video/tovid/tovid-0.34_p20120123.ebuild64
-rw-r--r--media-video/tovid/tovid-0.35.2.ebuild67
-rw-r--r--media-video/transcode/Manifest1
-rw-r--r--media-video/transcode/files/transcode-1.1.7-ffmpeg-0.10.patch15
-rw-r--r--media-video/transcode/files/transcode-1.1.7-ffmpeg-0.11.patch303
-rw-r--r--media-video/transcode/files/transcode-1.1.7-ffmpeg.patch51
-rw-r--r--media-video/transcode/files/transcode-1.1.7-ffmpeg2.patch557
-rw-r--r--media-video/transcode/files/transcode-1.1.7-ffmpeg24.patch18
-rw-r--r--media-video/transcode/files/transcode-1.1.7-freetype251.patch12
-rw-r--r--media-video/transcode/files/transcode-1.1.7-libav-10.patch36
-rw-r--r--media-video/transcode/files/transcode-1.1.7-libav-9.patch31
-rw-r--r--media-video/transcode/files/transcode-1.1.7-preset-force.patch28
-rw-r--r--media-video/transcode/files/transcode-1.1.7-preset-free.patch34
-rw-r--r--media-video/transcode/metadata.xml17
-rw-r--r--media-video/transcode/transcode-1.1.7-r1.ebuild117
-rw-r--r--media-video/transcode/transcode-1.1.7-r2.ebuild118
-rw-r--r--media-video/transcode/transcode-1.1.7-r3.ebuild123
-rw-r--r--media-video/tsmuxer/Manifest2
-rw-r--r--media-video/tsmuxer/metadata.xml14
-rw-r--r--media-video/tsmuxer/tsmuxer-1.10.6-r1.ebuild78
-rw-r--r--media-video/ttcut/Manifest1
-rw-r--r--media-video/ttcut/files/ttcut-0.19.6-deprecated.patch376
-rw-r--r--media-video/ttcut/files/ttcut-0.19.6-ffmpeg-vf-setdar.patch184
-rw-r--r--media-video/ttcut/files/ttcut-0.19.6-no_implicit_GLU.patch24
-rw-r--r--media-video/ttcut/files/ttcut-0.19.6-ntsc-fps.patch99
-rw-r--r--media-video/ttcut/files/ttcut.desktop13
-rw-r--r--media-video/ttcut/metadata.xml19
-rw-r--r--media-video/ttcut/ttcut-0.19.6-r3.ebuild42
-rw-r--r--media-video/ushare/Manifest1
-rw-r--r--media-video/ushare/files/01_all_ushare_build_system.patch170
-rw-r--r--media-video/ushare/files/02_all_ushare_build_warnings.patch35
-rw-r--r--media-video/ushare/files/03_all_ushare_mp4_video_mime.patch20
-rw-r--r--media-video/ushare/files/04_all_ushare_upnp_build_fix.patch156
-rw-r--r--media-video/ushare/files/05_all_missing_headers.patch59
-rw-r--r--media-video/ushare/files/06_all_ushare_disable_sysconf.patch20
-rw-r--r--media-video/ushare/files/07_all_drop_optimizations.patch20
-rw-r--r--media-video/ushare/files/ushare.conf.d38
-rw-r--r--media-video/ushare/files/ushare.init.d79
-rw-r--r--media-video/ushare/files/ushare.init.d.ng36
-rw-r--r--media-video/ushare/files/ushare.service11
-rw-r--r--media-video/ushare/metadata.xml11
-rw-r--r--media-video/ushare/ushare-1.1a-r5.ebuild56
-rw-r--r--media-video/ushare/ushare-1.1a-r6.ebuild64
-rw-r--r--media-video/v4l2loopback/Manifest5
-rw-r--r--media-video/v4l2loopback/metadata.xml10
-rw-r--r--media-video/v4l2loopback/v4l2loopback-0.4.0.ebuild25
-rw-r--r--media-video/v4l2loopback/v4l2loopback-0.4.1.ebuild25
-rw-r--r--media-video/v4l2loopback/v4l2loopback-0.6.1.ebuild23
-rw-r--r--media-video/v4l2loopback/v4l2loopback-0.6.3-r1.ebuild43
-rw-r--r--media-video/v4l2loopback/v4l2loopback-0.6.3.ebuild23
-rw-r--r--media-video/v4l2loopback/v4l2loopback-0.8.0.ebuild43
-rw-r--r--media-video/vamps/Manifest1
-rw-r--r--media-video/vamps/files/vamps-0.99.2-premature-eof.patch46
-rw-r--r--media-video/vamps/metadata.xml11
-rw-r--r--media-video/vamps/vamps-0.99.2-r1.ebuild31
-rw-r--r--media-video/vamps/vamps-0.99.2.ebuild26
-rw-r--r--media-video/vcdgear/Manifest1
-rw-r--r--media-video/vcdgear/metadata.xml8
-rw-r--r--media-video/vcdgear/vcdgear-1.76-r2.ebuild32
-rw-r--r--media-video/vcdimager/Manifest1
-rw-r--r--media-video/vcdimager/metadata.xml8
-rw-r--r--media-video/vcdimager/vcdimager-0.7.24.ebuild53
-rw-r--r--media-video/vdr/Manifest5
-rw-r--r--media-video/vdr/files/channel_alternative.conf11
-rw-r--r--media-video/vdr/files/vdr-2.0.6-r2_gentoo.patch73
-rw-r--r--media-video/vdr/files/vdr-2.0.6_gentoo.patch68
-rw-r--r--media-video/vdr/files/vdr-2.0.7_systemd_argsdir.patch438
-rw-r--r--media-video/vdr/files/vdr-2.0.7_systemd_argsdir_vanilla.patch438
-rw-r--r--media-video/vdr/files/vdr-2.2.0_gentoo.patch70
-rw-r--r--media-video/vdr/metadata.xml33
-rw-r--r--media-video/vdr/vdr-2.0.6-r1.ebuild278
-rw-r--r--media-video/vdr/vdr-2.0.7.ebuild289
-rw-r--r--media-video/vdr/vdr-2.2.0.ebuild292
-rw-r--r--media-video/vdr2jpeg/Manifest2
-rw-r--r--media-video/vdr2jpeg/files/vdr2jpeg-0.1.0-gcc43.patch38
-rw-r--r--media-video/vdr2jpeg/files/vdr2jpeg-0.1.9-ffmpeg.patch326
-rw-r--r--media-video/vdr2jpeg/files/vdr2jpeg-0.1.9-ffmpeg1.patch238
-rw-r--r--media-video/vdr2jpeg/files/vdr2jpeg-0.1.9-libav9.patch54
-rw-r--r--media-video/vdr2jpeg/metadata.xml13
-rw-r--r--media-video/vdr2jpeg/vdr2jpeg-0.1.9-r1.ebuild44
-rw-r--r--media-video/vdr2jpeg/vdr2jpeg-0.2.0.ebuild46
-rw-r--r--media-video/vdrsync/Manifest1
-rw-r--r--media-video/vdrsync/files/vdrsync-0.1.3_pre050322-path.diff39
-rw-r--r--media-video/vdrsync/metadata.xml10
-rw-r--r--media-video/vdrsync/vdrsync-0.1.3_pre050322-r1.ebuild51
-rw-r--r--media-video/vdrtools-genindex/Manifest1
-rw-r--r--media-video/vdrtools-genindex/files/ldflags.diff12
-rw-r--r--media-video/vdrtools-genindex/metadata.xml11
-rw-r--r--media-video/vdrtools-genindex/vdrtools-genindex-0.1.3-r1.ebuild31
-rw-r--r--media-video/videocut/Manifest1
-rw-r--r--media-video/videocut/files/01-fix-hardened-ftbfs.diff16
-rw-r--r--media-video/videocut/files/videocut3
-rw-r--r--media-video/videocut/metadata.xml12
-rw-r--r--media-video/videocut/videocut-0.2.0.ebuild41
-rw-r--r--media-video/videotrans/Manifest1
-rw-r--r--media-video/videotrans/metadata.xml14
-rw-r--r--media-video/videotrans/videotrans-1.6.1.ebuild36
-rw-r--r--media-video/vlc/Manifest3
-rw-r--r--media-video/vlc/files/opencv-3.0.0.patch12
-rw-r--r--media-video/vlc/files/qt4-select.patch51
-rw-r--r--media-video/vlc/files/vlc-2.1-mem_undefined_functions.patch14
-rw-r--r--media-video/vlc/files/vlc-2.1.0-TomWij-bisected-PA-broken-underflow.patch23
-rw-r--r--media-video/vlc/files/vlc-2.1.0-fix-libtremor-libs.patch11
-rw-r--r--media-video/vlc/files/vlc-2.1.0-libva-1.2.1-compat.patch12
-rw-r--r--media-video/vlc/files/vlc-2.1.0-newer-rdp.patch47
-rw-r--r--media-video/vlc/files/vlc-2.2.0-fix-xcb.patch16
-rw-r--r--media-video/vlc/files/vlc-2.2.0-rdp-1.2.0.patch23
-rw-r--r--media-video/vlc/files/vlc-2.2.0-xcb_vdpau.patch15
-rw-r--r--media-video/vlc/files/vlc-9999-libva-1.2.1-compat.patch12
-rw-r--r--media-video/vlc/metadata.xml78
-rw-r--r--media-video/vlc/vlc-2.1.5-r1.ebuild480
-rw-r--r--media-video/vlc/vlc-2.1.9999.ebuild474
-rw-r--r--media-video/vlc/vlc-2.2.0.ebuild495
-rw-r--r--media-video/vlc/vlc-2.2.1.ebuild502
-rw-r--r--media-video/vlc/vlc-2.2.9999.ebuild484
-rw-r--r--media-video/vlc/vlc-9999.ebuild485
-rw-r--r--media-video/vmaid/Manifest1
-rw-r--r--media-video/vmaid/metadata.xml11
-rw-r--r--media-video/vmaid/vmaid-2.2.4.ebuild36
-rw-r--r--media-video/vobcopy/Manifest1
-rw-r--r--media-video/vobcopy/metadata.xml5
-rw-r--r--media-video/vobcopy/vobcopy-1.2.0.ebuild30
-rw-r--r--media-video/vstrip/Manifest1
-rw-r--r--media-video/vstrip/files/vstrip-0.8f-gentoo.patch63
-rw-r--r--media-video/vstrip/metadata.xml12
-rw-r--r--media-video/vstrip/vstrip-0.8f.ebuild39
-rw-r--r--media-video/winki/Manifest1
-rw-r--r--media-video/winki/metadata.xml11
-rw-r--r--media-video/winki/winki-0.4.5-r1.ebuild34
-rw-r--r--media-video/winki/winki-0.4.5.ebuild33
-rw-r--r--media-video/x264-encoder/Manifest1
-rw-r--r--media-video/x264-encoder/metadata.xml14
-rw-r--r--media-video/x264-encoder/x264-encoder-0.0.20140308.ebuild71
-rw-r--r--media-video/x264-encoder/x264-encoder-9999.ebuild71
-rw-r--r--media-video/xanim-export/Manifest10
-rw-r--r--media-video/xanim-export/files/2.80.1-gentoo.patch88
-rw-r--r--media-video/xanim-export/files/2.80.1-implicit_funcs.patch33
-rw-r--r--media-video/xanim-export/files/2.80.1-makefile.patch33
-rw-r--r--media-video/xanim-export/metadata.xml8
-rw-r--r--media-video/xanim-export/xanim-export-2.80.1-r5.ebuild110
-rw-r--r--media-video/xanim/Manifest13
-rw-r--r--media-video/xanim/files/xanim-2.80.1-freebsd.patch14
-rw-r--r--media-video/xanim/files/xanim-2.80.1-gcc41.patch71
-rw-r--r--media-video/xanim/metadata.xml8
-rw-r--r--media-video/xanim/xanim-2.80.1-r4.ebuild129
-rw-r--r--media-video/xine-ui/Manifest3
-rw-r--r--media-video/xine-ui/files/xine-ui-0.99.8-readline-6.3.patch33
-rw-r--r--media-video/xine-ui/metadata.xml14
-rw-r--r--media-video/xine-ui/xine-ui-0.99.7.ebuild94
-rw-r--r--media-video/xine-ui/xine-ui-0.99.8.ebuild94
-rw-r--r--media-video/xine-ui/xine-ui-0.99.9.ebuild93
-rw-r--r--media-video/xvattr/Manifest1
-rw-r--r--media-video/xvattr/files/xvattr-1.3-gtk.patch44
-rw-r--r--media-video/xvattr/files/xvattr-1.3-pod-encoding.patch11
-rw-r--r--media-video/xvattr/metadata.xml8
-rw-r--r--media-video/xvattr/xvattr-1.3-r3.ebuild39
-rw-r--r--media-video/xvid4conf/Manifest1
-rw-r--r--media-video/xvid4conf/metadata.xml8
-rw-r--r--media-video/xvid4conf/xvid4conf-1.12.ebuild25
-rw-r--r--media-video/xvideoservicethief/Manifest1
-rw-r--r--media-video/xvideoservicethief/files/xvideoservicethief-2.4.1-gcc47.patch16
-rw-r--r--media-video/xvideoservicethief/files/xvideoservicethief-2.4.1-youtube-api.patch205
-rw-r--r--media-video/xvideoservicethief/metadata.xml13
-rw-r--r--media-video/xvideoservicethief/xvideoservicethief-2.4.1-r2.ebuild83
1003 files changed, 50811 insertions, 0 deletions
diff --git a/media-video/2mandvd/2mandvd-1.8.5.ebuild b/media-video/2mandvd/2mandvd-1.8.5.ebuild
new file mode 100644
index 000000000000..28f393162b06
--- /dev/null
+++ b/media-video/2mandvd/2mandvd-1.8.5.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+LANGS="cs de en it ru"
+
+inherit qt4-r2
+
+MY_PN="2ManDVD"
+
+DESCRIPTION="The successor of ManDVD"
+HOMEPAGE="http://kde-apps.org/content/show.php?content=99450"
+SRC_URI="http://download.tuxfamily.org/${PN}/${MY_PN}-${PV}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug libav"
+
+DEPEND="libav? ( media-video/libav:= )
+ !libav? ( media-video/ffmpeg:0= )
+ media-libs/libsdl
+ virtual/glu
+ virtual/opengl
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ dev-qt/qtopengl:4
+"
+RDEPEND="${DEPEND}
+ || ( app-cdr/cdrkit app-cdr/cdrtools )
+ dev-lang/perl
+ media-fonts/dejavu
+ media-gfx/exif
+ media-libs/netpbm
+ media-sound/sox
+ media-video/dvdauthor
+ media-video/ffmpegthumbnailer
+ media-video/mjpegtools
+ media-video/mplayer[encode]
+"
+
+S=${WORKDIR}/${MY_PN}
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.7.3-libav.patch"
+ "${FILESDIR}/${PN}-1.8.5-libavformat54.patch"
+)
+
+src_prepare() {
+ # Clean backup files
+ find . -name "*~" -delete || die
+
+ # Delete useless chmod that violates the sandbox
+ sed -i -e '/chmod/d' ${MY_PN}.pro || die
+
+ # Fix desktop file
+ sed -i -e '/^Categories=/s/GNOME;AudioVideo;//' ${MY_PN}.desktop || die
+
+ qt4-r2_src_prepare
+}
+
+pkg_postinst() {
+ elog "You may wish to install media-video/xine-ui and/or build"
+ elog "media-sound/sox with USE=mad for improved media handling support."
+}
diff --git a/media-video/2mandvd/Manifest b/media-video/2mandvd/Manifest
new file mode 100644
index 000000000000..78233568b9f4
--- /dev/null
+++ b/media-video/2mandvd/Manifest
@@ -0,0 +1 @@
+DIST 2ManDVD-1.8.5.tar.gz 29525071 SHA256 19c3c02123684220e77b3baa12f37b6feb5ecb523c504c65d306c75136191873 SHA512 1e43034cab310ce0a642afdfcb2b4ddbc47b16b0f353adebd1fd2ec5f8445add41226390c6656e7cb520d9900e1b482adee7adb6f784d2fbfbaff2334feb3284 WHIRLPOOL 1a5b8e148fbfb2d7e67e18f64f15f560fe421e0f32d7f416ceea30a4b318f5078506d755df487be83032a7eb3279ced716a4122c215d5aed1bf69816f3a53f9f
diff --git a/media-video/2mandvd/files/2mandvd-1.7.3-libav.patch b/media-video/2mandvd/files/2mandvd-1.7.3-libav.patch
new file mode 100644
index 000000000000..59dfd1e33a1e
--- /dev/null
+++ b/media-video/2mandvd/files/2mandvd-1.7.3-libav.patch
@@ -0,0 +1,10 @@
+--- videowrapper.h
++++ videowrapper.h
+@@ -11,6 +11,7 @@
+ #include <libavutil/common.h>
+ #include <libavcodec/avcodec.h>
+ #include <libavformat/avformat.h>
++ #include <libavutil/mathematics.h>
+ #include <libswscale/swscale.h>
+ }
+
diff --git a/media-video/2mandvd/files/2mandvd-1.8.5-libavformat54.patch b/media-video/2mandvd/files/2mandvd-1.8.5-libavformat54.patch
new file mode 100644
index 000000000000..89ecc4d23c60
--- /dev/null
+++ b/media-video/2mandvd/files/2mandvd-1.8.5-libavformat54.patch
@@ -0,0 +1,27 @@
+diff --git a/videowrapper.cpp b/videowrapper.cpp
+index 7ae4ad3..d50599b 100644
+--- a/videowrapper.cpp
++++ b/videowrapper.cpp
+@@ -38,7 +38,7 @@ void videowrapper::delete_videowrapper()
+ int videowrapper::load_video(QString filename)
+ {
+ // *** OUVERTURE DU FICHIER VIDEO ***
+- #ifdef avformat_open_input
++ #if LIBAVFORMAT_VERSION_INT > AV_VERSION_INT(53,5,0)
+ if (avformat_open_input(&pFormatCtx,filename.toAscii().data(),NULL,NULL)!=0)
+ {
+ #else
+@@ -91,13 +91,8 @@ int videowrapper::load_video(QString filename)
+
+ // *** OUVERTURE DU CODEC ***
+
+- #ifdef av_find_stream_info
+- if(avcodec_open(pCodecCtx, pCodec)<0)
+- {
+- #else
+ if (avcodec_open2(pCodecCtx, pCodec, NULL) < 0)
+ {
+- #endif
+ qDebug() << "CAN'T FIND VIDEO CODEC";
+ return 1;
+ }
diff --git a/media-video/2mandvd/metadata.xml b/media-video/2mandvd/metadata.xml
new file mode 100644
index 000000000000..dc439f7e84f5
--- /dev/null
+++ b/media-video/2mandvd/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>qt</herd>
+</pkgmetadata>
diff --git a/media-video/aacskeys/Manifest b/media-video/aacskeys/Manifest
new file mode 100644
index 000000000000..eaf09bac4204
--- /dev/null
+++ b/media-video/aacskeys/Manifest
@@ -0,0 +1,2 @@
+DIST aacskeys-0.4.0c.tar.gz 4118637 SHA256 54ea78898917f4acaf78101dda254de56bc7696bad12cbf22ee6f09d4ee88a43 SHA512 34c434fd1b118fb301b8af9c20762075bab213b39584e8e33c6b685c7504e4863f78ee2754d131e760c535dd24b29826dc6756833b5deaaa5c4b70ab8f9a6ba8 WHIRLPOOL c710dfc56804390a8c89c57f50cf756e5b96c38224621f1f14f9600830b10ff4b3e4b5a7f9d3069523d4c5a5ec2c0130bd43269e990e3f0c433ac7b698acf79b
+DIST aacskeys-0.4.0e.tar.gz 4117374 SHA256 d9ee6332ae545f93f17f16438c352c98ad2ee019929bc0e6743dcedb23df7f34 SHA512 86435bd4b5ce31cae87390bade631d9dc36814cd5e03fdcaca02eefe3d351432e7ba61f7127f6030b92e929ba3726547d7c04d8558239bd23a32bcb1574b7f6f WHIRLPOOL 88b5beee39a78d81fa3e6fb714faf35ebbf5ba118239d3afad121cb80e5fd37b6445f2282d2b25d4c9bf71a5a35b02473abff12b28adbe5cf5d2bd9f9973f275
diff --git a/media-video/aacskeys/aacskeys-0.4.0c-r2.ebuild b/media-video/aacskeys/aacskeys-0.4.0c-r2.ebuild
new file mode 100644
index 000000000000..d46df71b2c3a
--- /dev/null
+++ b/media-video/aacskeys/aacskeys-0.4.0c-r2.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils java-pkg-2
+
+DESCRIPTION="Decrypt keys from an AACS source (HD DVD / Blu-Ray)"
+HOMEPAGE="http://forum.doom9.org/showthread.php?t=123311"
+SRC_URI="http://bluray.beandog.org/aacskeys/${P}.tar.gz"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="dev-libs/openssl[-bindist]"
+DEPEND=">=virtual/jdk-1.6
+ ${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-aacskeys-makefile.patch"
+ epatch "${FILESDIR}/${P}-libaacskeys-makefile.patch"
+}
+
+src_compile() {
+ emake || die "emake failed"
+}
+
+src_install() {
+ dobin bin/linux/aacskeys || die
+ dolib lib/linux/libaacskeys.so || die
+ dodoc HostKeyCertificate.txt ProcessingDeviceKeysSimple.txt \
+ README.txt || die
+}
diff --git a/media-video/aacskeys/aacskeys-0.4.0e.ebuild b/media-video/aacskeys/aacskeys-0.4.0e.ebuild
new file mode 100644
index 000000000000..3a49f44e46d7
--- /dev/null
+++ b/media-video/aacskeys/aacskeys-0.4.0e.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils java-pkg-2
+
+DESCRIPTION="Decrypt keys from an AACS source (HD DVD / Blu-Ray)"
+HOMEPAGE="http://forum.doom9.org/showthread.php?t=123311"
+SRC_URI="http://bluray.beandog.org/aacskeys/${P}.tar.gz"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-libs/openssl[-bindist]"
+DEPEND=">=virtual/jdk-1.6
+ ${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-0.4.0c-aacskeys-makefile.patch"
+ epatch "${FILESDIR}/${PN}-0.4.0c-libaacskeys-makefile.patch"
+}
+
+src_compile() {
+ emake || die "emake failed"
+}
+
+src_install() {
+ dobin bin/linux/aacskeys || die
+ dolib lib/linux/libaacskeys.so || die
+ dodoc HostKeyCertificate.txt ProcessingDeviceKeysSimple.txt \
+ README.txt || die
+}
diff --git a/media-video/aacskeys/files/aacskeys-0.4.0c-aacskeys-makefile.patch b/media-video/aacskeys/files/aacskeys-0.4.0c-aacskeys-makefile.patch
new file mode 100644
index 000000000000..d75932617259
--- /dev/null
+++ b/media-video/aacskeys/files/aacskeys-0.4.0c-aacskeys-makefile.patch
@@ -0,0 +1,35 @@
+--- aacskeys.make.orig 2010-02-16 18:43:07.000000000 -0700
++++ aacskeys.make 2010-02-16 18:44:10.000000000 -0700
+@@ -13,12 +13,12 @@
+ LIBDIR := .
+ OBJDIR := obj/linux/Release
+ OUTDIR := bin/linux
+- CPPFLAGS := $(DEPFLAGS) -D "_REENTRANT" -I "/usr/local/ssl/include"
+- CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -Wall -fomit-frame-pointer -O3 -pipe
++ CPPFLAGS := $(DEPFLAGS) -D "_REENTRANT" -I "/usr/ssl/include"
++ CFLAGS += $(CPPFLAGS) $(TARGET_ARCH)
+ CXXFLAGS := $(CFLAGS)
+- LDFLAGS += -L$(BINDIR) -L$(LIBDIR) -s -L"/usr/local/ssl/lib" -lcrypto
++ LDFLAGS += -L$(BINDIR) -L$(LIBDIR) -L"/usr/ssl/lib" -lcrypto
+ LDDEPS :=
+- RESFLAGS := -D "_REENTRANT" -I "/usr/local/ssl/include"
++ RESFLAGS := -D "_REENTRANT" -I "/usr/ssl/include"
+ TARGET := aacskeys
+ BLDCMD = $(CXX) -o $(OUTDIR)/$(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(TARGET_ARCH)
+ endif
+@@ -28,12 +28,12 @@
+ LIBDIR := .
+ OBJDIR := obj/linux/Debug
+ OUTDIR := bin/linux/debug
+- CPPFLAGS := $(DEPFLAGS) -D "_REENTRANT" -D "DEBUG" -I "/usr/local/ssl/include"
+- CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -g -Wall -pipe
++ CPPFLAGS := $(DEPFLAGS) -D "_REENTRANT" -D "DEBUG" -I "/usr/ssl/include"
++ CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -g
+ CXXFLAGS := $(CFLAGS)
+ LDFLAGS += -L$(BINDIR) -L$(LIBDIR) -L"/usr/local/ssl/lib" -lcrypto
+ LDDEPS :=
+- RESFLAGS := -D "_REENTRANT" -D "DEBUG" -I "/usr/local/ssl/include"
++ RESFLAGS := -D "_REENTRANT" -D "DEBUG" -I "/usr/ssl/include"
+ TARGET := aacskeys
+ BLDCMD = $(CXX) -o $(OUTDIR)/$(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(TARGET_ARCH)
+ endif
diff --git a/media-video/aacskeys/files/aacskeys-0.4.0c-libaacskeys-makefile.patch b/media-video/aacskeys/files/aacskeys-0.4.0c-libaacskeys-makefile.patch
new file mode 100644
index 000000000000..8062a5b60c40
--- /dev/null
+++ b/media-video/aacskeys/files/aacskeys-0.4.0c-libaacskeys-makefile.patch
@@ -0,0 +1,36 @@
+--- libaacskeys.make.orig 2010-02-16 18:37:31.000000000 -0700
++++ libaacskeys.make 2010-02-16 18:40:15.000000000 -0700
+@@ -13,12 +13,12 @@
+ LIBDIR := .
+ OBJDIR := obj/linux/ReleaseLib
+ OUTDIR := lib/linux
+- CPPFLAGS := $(DEPFLAGS) -D "_REENTRANT" -D "JNILIB" -I "/usr/local/ssl/include" -I "/usr/lib/jvm/java-6-sun/include" -I "/usr/lib/jvm/java-6-sun/include/linux"
+- CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -fPIC -Wall -fomit-frame-pointer -O3 -pipe
++ CPPFLAGS := $(DEPFLAGS) -D "_REENTRANT" -D "JNILIB" -I "/usr/ssl/include" -I "/etc/java-config-2/current-system-vm/include" -I "/etc/java-config-2/current-system-vm/include/linux"
++ CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -fPIC
+ CXXFLAGS := $(CFLAGS)
+- LDFLAGS += -L$(BINDIR) -L$(LIBDIR) -shared -s -L"/usr/local/ssl/lib" -lcrypto
++ LDFLAGS += -L$(BINDIR) -L$(LIBDIR) -shared -L"/usr/ssl/lib" -lcrypto
+ LDDEPS :=
+- RESFLAGS := -D "_REENTRANT" -D "JNILIB" -I "/usr/local/ssl/include" -I "/usr/lib/jvm/java-6-sun/include" -I "/usr/lib/jvm/java-6-sun/include/linux"
++ RESFLAGS := -D "_REENTRANT" -D "JNILIB" -I "/usr/ssl/include" -I "/etc/java-config-2/current-system-vm/include" -I "/etc/java-config-2/current-system-vm/include/linux"
+ TARGET := libaacskeys.so
+ BLDCMD = $(CXX) -o $(OUTDIR)/$(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(TARGET_ARCH)
+ endif
+@@ -28,12 +28,12 @@
+ LIBDIR := .
+ OBJDIR := obj/linux/DebugLib
+ OUTDIR := lib/linux/debug
+- CPPFLAGS := $(DEPFLAGS) -D "_REENTRANT" -D "JNILIB" -D "DEBUG" -I "/usr/local/ssl/include" -I "/usr/lib/jvm/java-6-sun/include" -I "/usr/lib/jvm/java-6-sun/include/linux"
+- CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -fPIC -g -Wall -pipe
++ CPPFLAGS := $(DEPFLAGS) -D "_REENTRANT" -D "JNILIB" -D "DEBUG" -I "/usr/ssl/include" -I "/etc/java-config-2/current-system-vm/include" -I "/etc/java-config-2/current-system-vm/include/linux"
++ CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -fPIC -g
+ CXXFLAGS := $(CFLAGS)
+- LDFLAGS += -L$(BINDIR) -L$(LIBDIR) -shared -L"/usr/local/ssl/lib" -lcrypto
++ LDFLAGS += -L$(BINDIR) -L$(LIBDIR) -shared -L"/usr/ssl/lib" -lcrypto
+ LDDEPS :=
+- RESFLAGS := -D "_REENTRANT" -D "JNILIB" -D "DEBUG" -I "/usr/local/ssl/include" -I "/usr/lib/jvm/java-6-sun/include" -I "/usr/lib/jvm/java-6-sun/include/linux"
++ RESFLAGS := -D "_REENTRANT" -D "JNILIB" -D "DEBUG" -I "/usr/ssl/include" -I "/etc/java-config-2/current-system-vm/include" -I "/etc/java-config-2/current-system-vm/include/linux"
+ TARGET := libaacskeys.so
+ BLDCMD = $(CXX) -o $(OUTDIR)/$(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(TARGET_ARCH)
+ endif
diff --git a/media-video/aacskeys/metadata.xml b/media-video/aacskeys/metadata.xml
new file mode 100644
index 000000000000..413d6414f00a
--- /dev/null
+++ b/media-video/aacskeys/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>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">aacskeys is a program to decrypt all required keys from an AACS protected HD-DVD / Blu-Ray to decrypt it.</longdescription>
+</pkgmetadata>
diff --git a/media-video/abby/Manifest b/media-video/abby/Manifest
new file mode 100644
index 000000000000..8d2479c688ec
--- /dev/null
+++ b/media-video/abby/Manifest
@@ -0,0 +1 @@
+DIST abby-0.4.8.tar.bz2 53183 SHA256 662e20ca5260ad2778f03f666fecac433d4ad1b533c00f716b01c47c427c566e
diff --git a/media-video/abby/abby-0.4.8.ebuild b/media-video/abby/abby-0.4.8.ebuild
new file mode 100644
index 000000000000..8aac04d57c05
--- /dev/null
+++ b/media-video/abby/abby-0.4.8.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+inherit qt4-r2
+
+DESCRIPTION="GUI front-end for cclive and clive video extraction utilities"
+HOMEPAGE="http://code.google.com/p/abby/"
+SRC_URI="http://abby.googlecode.com/files/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~ppc64 x86"
+IUSE=""
+
+RDEPEND="|| ( >=media-video/clive-2.2.5 >=media-video/cclive-0.5.0 )
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4"
+DEPEND="${RDEPEND}"
+
+src_install() {
+ dobin abby
+ dodoc AUTHORS ChangeLog README TODO NEWS
+}
diff --git a/media-video/abby/metadata.xml b/media-video/abby/metadata.xml
new file mode 100644
index 000000000000..b179b885161c
--- /dev/null
+++ b/media-video/abby/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="google-code">abby</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/acidrip/Manifest b/media-video/acidrip/Manifest
new file mode 100644
index 000000000000..bd918665e39d
--- /dev/null
+++ b/media-video/acidrip/Manifest
@@ -0,0 +1 @@
+DIST acidrip-0.14.tar.gz 92086 SHA256 51bb84174e8dae733ddd1f69a16b90d875e4455135ed20a024a79b98ae7d58c1 SHA512 3ee0e329bd7e5eb4067d618fc79a49707084526d53e8c10cd9ec560828cf621e8d7263259cc8bc7944e6f9d7b7fd1fc5b8a42a8f37f18666f1974f240edb99a0 WHIRLPOOL 8aa1f2aeaa8e29a97399f714989be38fc60803a7a3ba3f872750a4a440741c1f2173e88f3a0b3421651e3c86bf64721ec24077165e664cf107ab0e9cefcd2917
diff --git a/media-video/acidrip/acidrip-0.14-r4.ebuild b/media-video/acidrip/acidrip-0.14-r4.ebuild
new file mode 100644
index 000000000000..b3fabcd618a0
--- /dev/null
+++ b/media-video/acidrip/acidrip-0.14-r4.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit perl-app
+
+DESCRIPTION="A gtk-perl mplayer/mencoder frontend for ripping DVDs"
+HOMEPAGE="http://sourceforge.net/acidrip/"
+SRC_URI="mirror://sourceforge/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="encode"
+
+RDEPEND="dev-lang/perl:=
+ dev-perl/gtk2-perl
+ media-video/lsdvd
+ media-video/mplayer[encode]
+ encode? ( >=media-sound/lame-3.92 )"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-mplayer.patch #168012
+ epatch "${FILESDIR}/${P}-makefile.patch" #299173
+}
diff --git a/media-video/acidrip/files/acidrip-0.14-makefile.patch b/media-video/acidrip/files/acidrip-0.14-makefile.patch
new file mode 100644
index 000000000000..bbaf340799c3
--- /dev/null
+++ b/media-video/acidrip/files/acidrip-0.14-makefile.patch
@@ -0,0 +1,50 @@
+--- acidrip-0.14/Makefile.PL.orig 2014-08-22 09:38:46.179128473 -0600
++++ acidrip-0.14/Makefile.PL 2014-08-22 09:40:33.045103299 -0600
+@@ -36,47 +36,7 @@
+ $_;
+ }
+
+-print "\nRunning additional test to be sure acidrip will work\n";
+-
+-print "test for lsdvd: ";
+-my $lsdvd = `lsdvd -V 2>&1`;
+-if ( $lsdvd !~ /0.(\d+)\s/ ) {
+-die "Not Found!\n\n***************\n" .
+- "AcidRip needs my little app \"lsdvd\" in order to see what is on your dvd\'s\n" .
+- "Download it and install it (and libdvdread) before trying to use AcidRip.\n" .
+- "If it\'s simply not on your path then set the full path inside AcidRip.\n" .
+- "***************\n\n"
+-}
+-if ( $1 < 9 ) {
+-die "Too old!\n\n***************\n" .
+- "AcidRip needs at least version 0.9 of lsdvd, but version 0.$1 was found\n" .
+- "Download it and install it (and libdvdread) before trying to use AcidRip.\n" .
+- "***************\n\n"
+-}
+-print "found\n";
+-
+-print "test for MPlayer: "; die "Not Found!\n\n***************\n" .
+- "AcidRip is based around the MPlayer video player. it has not been found on\n" .
+- "your current path. Install it from http://mplayerhq/hu see INSTALL.html or\n" .
+- "INSTALL for installation instructions.\n" .
+- "***************\n\n" if ( system "mplayer 2&>1 > /dev/null" ); print "found\n";
+-
+-print "test for MEncoder: "; die "Not Found!\n\n***************\n" .
+- "AcidRip uses MEncoder, which is part of MPlayer video player package. This\n" .
+- "was not found. Install it from http://mplayerhq/hu see INSTALL.html or\n" .
+- "INSTALL for installation instructions.\n" .
+- "***************\n\n" if ( system "mencoder -ovc help 2> /dev/null | grep MEncoder > /dev/null" ); print "found\n";
+-
+-print "test for MP3 support in mencoder: "; die "Not Found!\n\n***************\n" .
+- "MEncoder was found, however it does not have MP3 support built into it.\n" .
+- "If you DO want MP3 support you'll need to recompile mplayer with mp3 support\n" .
+- "See INSTALL or INSTALL.html for more information\n" .
+- "***************\n\n" if ( system "mencoder -oac help 2> /dev/null | grep mp3lame > /dev/null" ); print "found\n";
+-
+-print "Everything looks good here...\n";
+-
+ print "\nPlease send any feedback to me, I actually do want to know what you think of it.";
+ print "\nMaybe then I can make it suck less. acid_kewpie\@users.sourceforge.net\n\n";
+
+ exit(0);
+-
diff --git a/media-video/acidrip/files/acidrip-mplayer.patch b/media-video/acidrip/files/acidrip-mplayer.patch
new file mode 100644
index 000000000000..5d9c84701d5e
--- /dev/null
+++ b/media-video/acidrip/files/acidrip-mplayer.patch
@@ -0,0 +1,22 @@
+http://bugs.gentoo.org/168012
+
+--- AcidRip/acidrip.pm
++++ AcidRip/acidrip.pm
+@@ -680,7 +680,7 @@
+ message( "Running " . get_command("cropdetect") );
+ open( CROP, get_command("cropdetect") . " 2>&1 |" );
+ while (<CROP>) {
+- if ( $_ =~ /crop area.*\s(crop=\d*:\d*:\d*:\d*)/ ) { $crop{$1}++ }
++ if ( $_ =~ /Crop area.*\s(crop=\d*:\d*:\d*:\d*)/ ) { $crop{$1}++ }
+ $crop_output .= $_;
+ gui_check($_);
+ }
+@@ -863,7 +863,7 @@
+ if ( $::settings->{'mencoder_pid'} = open( MENCODER, "$menc 2>&1 |" ) ) {
+ $/ = "\r";
+ while (<MENCODER>) {
+- if (/^Pos:\s*(\d+).\ds\s+(\d+)f\s+\(\s*(\d+)%\)\s+(\d+fps)\sTrem:\s+(\d+min)\s+(\d+mb).+\[([\d:]+)\]/) {
++ if (/^Pos:\s*(\d+).\ds\s+(\d+)f\s+\(\s*(\d+)%\)\s+(\d+.\d+fps)\sTrem:\s+(\d+min)\s+(\d+mb).+\[([\d:]+)\]/) {
+ if ( $1 ne $sec ) { $sec = $1; $::widgets->{'menc_seconds'}->set_text( hhmmss($1) ) }
+ if ( $4 ne $fps ) { $fps = $4; $::widgets->{'menc_fps'}->set_text($4) }
+ if ( $6 ne $size ) { $size = $6; $::widgets->{'menc_filesize'}->set_text($6) }
diff --git a/media-video/acidrip/metadata.xml b/media-video/acidrip/metadata.xml
new file mode 100644
index 000000000000..ad983ca71dc9
--- /dev/null
+++ b/media-video/acidrip/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">.tar.gz</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/aegisub/Manifest b/media-video/aegisub/Manifest
new file mode 100644
index 000000000000..4a95428b2266
--- /dev/null
+++ b/media-video/aegisub/Manifest
@@ -0,0 +1,3 @@
+DIST aegisub-2.1.9.tar.xz 1670496 SHA256 e0591c96183f7713bb14f9d357a2e12bdd3478e4d0a8fad77f14f87a4fc22db7
+DIST aegisub-3.1.2.tar.xz 4126244 SHA256 36ebfd05cc642b050da1e91ce2d2082b317a37bdfab109e191f861170d7cff86 SHA512 d15e16f9f98c01447b72cde1998c915a2bfc1aa918a4380b54303de8e88ef881f46c3896ab9dc5eddaf4f1376f0908abd8427dbf6af395e6e0b3969ddca402ab WHIRLPOOL fa7afa1a3e736a410d686bc14d173518267e4b1570a468d9871334f06af821040fe7f40d6ba3b1bece9350a70dd43613c4aedfe8480629a283c9a16a2f54ab6d
+DIST aegisub-3.1.3.tar.xz 4215196 SHA256 efea5bc2bc5e0651ada4f65cfdd8af1b422a15f87933710d11287bf51e2b5e58 SHA512 c406925623e7b8425df47d1cd31ef77d536861335d25c626ecb916ef091341a8156879430f094ffa1d27490a65f79e2edb84593609d589834f3411b2c2841297 WHIRLPOOL 12e40c2ce78e1659046d093d7d34b68b7ceda2744c36be0e15a71a379cc3ced4fb8cde2c364bbd3b7efa803f78229794d5d417c601ae140d79e0c0a9a2711fb0
diff --git a/media-video/aegisub/aegisub-2.1.9.ebuild b/media-video/aegisub/aegisub-2.1.9.ebuild
new file mode 100644
index 000000000000..bb2468e91b9f
--- /dev/null
+++ b/media-video/aegisub/aegisub-2.1.9.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+WX_GTK_VER="2.8"
+inherit autotools wxwidgets
+
+DESCRIPTION="Advanced SSA/ASS subtitle editor"
+HOMEPAGE="http://www.aegisub.org/"
+SRC_URI="http://rion-overlay.googlecode.com/files/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="alsa debug +ffmpeg lua nls openal oss portaudio pulseaudio spell"
+
+RDEPEND="
+ x11-libs/wxGTK:${WX_GTK_VER}[X,opengl,debug?]
+ virtual/opengl
+ virtual/glu
+ >=media-libs/libass-0.9.11[fontconfig]
+ virtual/libiconv
+ >=media-libs/fontconfig-2.4.2
+ media-libs/freetype:2
+
+ alsa? ( media-libs/alsa-lib )
+ portaudio? ( =media-libs/portaudio-19* )
+ pulseaudio? ( media-sound/pulseaudio )
+ openal? ( media-libs/openal )
+
+ lua? ( >=dev-lang/lua-5.1.1 )
+
+ spell? ( >=app-text/hunspell-1.2 )
+ ffmpeg? ( >=media-libs/ffmpegsource-2.17 )
+"
+DEPEND="${RDEPEND}
+ dev-util/intltool
+ virtual/pkgconfig
+ media-gfx/imagemagick
+"
+
+src_prepare() {
+ sh autogen.sh --skip-configure
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_with alsa) \
+ $(use_with oss) \
+ $(use_with portaudio) \
+ $(use_with pulseaudio) \
+ $(use_with openal) \
+ $(use_with lua) \
+ $(use_with ffmpeg ffms) \
+ $(use_with spell hunspell) \
+ $(use_enable debug) \
+ $(use_enable nls)
+}
diff --git a/media-video/aegisub/aegisub-3.1.2.ebuild b/media-video/aegisub/aegisub-3.1.2.ebuild
new file mode 100644
index 000000000000..e156dda4f8d8
--- /dev/null
+++ b/media-video/aegisub/aegisub-3.1.2.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF="1"
+AUTOTOOLS_IN_SOURCE_BUILD="1"
+WX_GTK_VER="3.0"
+PLOCALES="ar bg ca cs da de el es eu fa fi fr_FR gl hu id it ja ko nl pl pt_BR pt_PT ru sr_RS@latin sr_RS vi zh_CN zh_TW"
+inherit autotools-utils wxwidgets l10n fdo-mime gnome2-utils
+
+DESCRIPTION="Advanced SSA/ASS subtitle editor"
+HOMEPAGE="http://www.aegisub.org/"
+SRC_URI="http://ftp.aegisub.org/pub/releases/${P}.tar.xz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="alsa debug +ffmpeg +fftw openal oss portaudio pulseaudio spell"
+
+REQUIRED_USE="
+ || ( alsa openal oss portaudio pulseaudio )
+"
+
+RDEPEND="
+ >=x11-libs/wxGTK-3.0.0:${WX_GTK_VER}[X,opengl,debug?]
+ virtual/opengl
+ virtual/glu
+ >=media-libs/libass-0.10.0[fontconfig]
+ virtual/libiconv
+ >=dev-lang/lua-5.1.1
+ >=dev-libs/boost-1.52.0:=[icu,nls,threads]
+ >=dev-libs/icu-4.8.1.1:=
+ >=media-libs/fontconfig-2.4.2
+ >=media-libs/freetype-2.3.5:2
+
+ alsa? ( >=media-libs/alsa-lib-1.0.16 )
+ portaudio? ( =media-libs/portaudio-19* )
+ pulseaudio? ( >=media-sound/pulseaudio-0.9.5 )
+ openal? ( media-libs/openal )
+
+ spell? ( >=app-text/hunspell-1.2.2 )
+ ffmpeg? ( >=media-libs/ffmpegsource-2.17:= )
+ fftw? ( >=sci-libs/fftw-3.3 )
+"
+DEPEND="${RDEPEND}
+ oss? ( virtual/os-headers )
+ >=sys-devel/gettext-0.18
+ dev-util/intltool
+ virtual/pkgconfig
+"
+
+S=${WORKDIR}/${P}/${PN}
+
+src_prepare() {
+ my_rm_loc() {
+ sed -i -e "s:${1}\.po::" po/Makefile || die
+ rm "po/${1}.po" || die
+ }
+
+ l10n_find_plocales_changes 'po' '' '.po'
+ if [ -z "$(l10n_get_locales)" ]; then
+ sed -e 's/^\s*po\s*$//' -i Makefile || die
+ else
+ l10n_for_each_disabled_locale_do my_rm_loc
+ fi
+
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ # testing openal does not work in sandbox, bug #508184
+ use openal && export agi_cv_with_openal="yes"
+ local myeconfargs=(
+ $(use_with alsa)
+ $(use_with oss)
+ $(use_with portaudio)
+ $(use_with pulseaudio libpulse)
+ $(use_with openal)
+ $(use_with ffmpeg ffms2)
+ $(use_with fftw fftw3)
+ $(use_with spell hunspell)
+ $(use_enable debug)
+ )
+ autotools-utils_src_configure
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+}
diff --git a/media-video/aegisub/aegisub-3.1.3.ebuild b/media-video/aegisub/aegisub-3.1.3.ebuild
new file mode 100644
index 000000000000..c08eaf735d33
--- /dev/null
+++ b/media-video/aegisub/aegisub-3.1.3.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF="1"
+AUTOTOOLS_IN_SOURCE_BUILD="1"
+WX_GTK_VER="3.0"
+PLOCALES="ar bg ca cs da de el es eu fa fi fr_FR gl hu id it ja ko nl pl pt_BR pt_PT ru sr_RS@latin sr_RS vi zh_CN zh_TW"
+inherit autotools-utils wxwidgets l10n fdo-mime gnome2-utils
+
+DESCRIPTION="Advanced SSA/ASS subtitle editor"
+HOMEPAGE="http://www.aegisub.org/"
+SRC_URI="http://ftp.aegisub.org/pub/releases/${P}.tar.xz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 x86"
+IUSE="alsa debug +ffmpeg +fftw openal oss portaudio pulseaudio spell"
+
+REQUIRED_USE="
+ || ( alsa openal oss portaudio pulseaudio )
+"
+
+RDEPEND="
+ >=x11-libs/wxGTK-3.0.0:${WX_GTK_VER}[X,opengl,debug?]
+ virtual/opengl
+ virtual/glu
+ >=media-libs/libass-0.10.0[fontconfig]
+ virtual/libiconv
+ >=dev-libs/boost-1.53.0:=[icu,nls,threads]
+ >=dev-libs/icu-4.8.1.1:=
+ >=media-libs/fontconfig-2.4.2
+ >=media-libs/freetype-2.3.5:2
+
+ alsa? ( >=media-libs/alsa-lib-1.0.16 )
+ portaudio? ( =media-libs/portaudio-19* )
+ pulseaudio? ( >=media-sound/pulseaudio-0.9.5 )
+ openal? ( media-libs/openal )
+
+ spell? ( >=app-text/hunspell-1.2.2 )
+ ffmpeg? ( >=media-libs/ffmpegsource-2.17:= )
+ fftw? ( >=sci-libs/fftw-3.3 )
+"
+DEPEND="${RDEPEND}
+ oss? ( virtual/os-headers )
+ >=sys-devel/gettext-0.18
+ dev-util/intltool
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ my_rm_loc() {
+ sed -i -e "s:${1}\.po::" po/Makefile || die
+ rm "po/${1}.po" || die
+ }
+
+ l10n_find_plocales_changes 'po' '' '.po'
+ if [ -z "$(l10n_get_locales)" ]; then
+ sed -e 's/^\s*po\s*$//' -i Makefile || die
+ else
+ l10n_for_each_disabled_locale_do my_rm_loc
+ fi
+
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ # testing openal does not work in sandbox, bug #508184
+ use openal && export agi_cv_with_openal="yes"
+ local myeconfargs=(
+ $(use_with alsa)
+ $(use_with oss)
+ $(use_with portaudio)
+ $(use_with pulseaudio libpulse)
+ $(use_with openal)
+ $(use_with ffmpeg ffms2)
+ $(use_with fftw fftw3)
+ $(use_with spell hunspell)
+ $(use_enable debug)
+ )
+ autotools-utils_src_configure
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+}
diff --git a/media-video/aegisub/aegisub-9999.ebuild b/media-video/aegisub/aegisub-9999.ebuild
new file mode 100644
index 000000000000..4c2168b44081
--- /dev/null
+++ b/media-video/aegisub/aegisub-9999.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF="1"
+AUTOTOOLS_IN_SOURCE_BUILD="1"
+WX_GTK_VER="3.0"
+PLOCALES="ar bg ca cs da de el es eu fa fi fr_FR gl hu id it ja ko nl pl pt_BR pt_PT ru sr_RS@latin sr_RS vi zh_CN zh_TW"
+inherit autotools-utils wxwidgets l10n fdo-mime gnome2-utils git-2
+
+DESCRIPTION="Advanced SSA/ASS subtitle editor"
+HOMEPAGE="http://www.aegisub.org/"
+EGIT_REPO_URI="https://github.com/Aegisub/Aegisub.git"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS=""
+IUSE="alsa debug +ffmpeg +fftw openal oss portaudio pulseaudio spell"
+
+REQUIRED_USE="
+ || ( alsa openal oss portaudio pulseaudio )
+"
+
+RDEPEND="
+ >=x11-libs/wxGTK-3.0.0:${WX_GTK_VER}[X,opengl,debug?]
+ virtual/opengl
+ virtual/glu
+ >=media-libs/libass-0.10.0[fontconfig]
+ virtual/libiconv
+ >=dev-libs/boost-1.53.0:=[icu,nls,threads]
+ >=dev-libs/icu-4.8.1.1:=
+ >=media-libs/fontconfig-2.4.2
+ >=media-libs/freetype-2.3.5:2
+
+ alsa? ( >=media-libs/alsa-lib-1.0.16 )
+ portaudio? ( =media-libs/portaudio-19* )
+ pulseaudio? ( >=media-sound/pulseaudio-0.9.5 )
+ openal? ( media-libs/openal )
+
+ spell? ( >=app-text/hunspell-1.2.2 )
+ ffmpeg? ( >=media-libs/ffmpegsource-2.17:= )
+ fftw? ( >=sci-libs/fftw-3.3 )
+"
+DEPEND="${RDEPEND}
+ oss? ( virtual/os-headers )
+ >=sys-devel/gettext-0.18
+ dev-util/intltool
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ my_rm_loc() {
+ sed -i -e "s:${1}\.po::" po/Makefile || die
+ rm "po/${1}.po" || die
+ }
+
+ l10n_find_plocales_changes 'po' '' '.po'
+ if [ -z "$(l10n_get_locales)" ]; then
+ sed -e 's/^\s*po\s*$//' -i Makefile || die
+ else
+ l10n_for_each_disabled_locale_do my_rm_loc
+ fi
+
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ # testing openal does not work in sandbox, bug #508184
+ use openal && export agi_cv_with_openal="yes"
+ local myeconfargs=(
+ $(use_with alsa)
+ $(use_with oss)
+ $(use_with portaudio)
+ $(use_with pulseaudio libpulse)
+ $(use_with openal)
+ $(use_with ffmpeg ffms2)
+ $(use_with fftw fftw3)
+ $(use_with spell hunspell)
+ $(use_enable debug)
+ )
+ autotools-utils_src_configure
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+}
diff --git a/media-video/aegisub/metadata.xml b/media-video/aegisub/metadata.xml
new file mode 100644
index 000000000000..496cc906a4cf
--- /dev/null
+++ b/media-video/aegisub/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>proxy-maintainers</herd>
+ <maintainer>
+ <email>nikoli@gmx.us</email>
+ <name>Nikoli</name>
+ </maintainer>
+ <maintainer>
+ <email>maksbotan@gentoo.org</email>
+ <name>Maxim Koltsov</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/media-video/alevt/Manifest b/media-video/alevt/Manifest
new file mode 100644
index 000000000000..617e56349151
--- /dev/null
+++ b/media-video/alevt/Manifest
@@ -0,0 +1 @@
+DIST alevt-1.6.2.tar.gz 133234 RMD160 19bab54e5d5c22cd18d73229524ddc87636850ab SHA1 17f661a22f11f648215efd8d73e1b4dc4a06c5e2 SHA256 9347c2af4b528edec87df8a424ddccebcc252ca7a06f6b18310733cfa547e5f5
diff --git a/media-video/alevt/alevt-1.6.2.ebuild b/media-video/alevt/alevt-1.6.2.ebuild
new file mode 100644
index 000000000000..a2b3f485e6bd
--- /dev/null
+++ b/media-video/alevt/alevt-1.6.2.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils toolchain-funcs flag-o-matic
+
+DESCRIPTION="Teletext viewer for X11"
+HOMEPAGE="http://www.goron.de/~froese/"
+SRC_URI="http://www.goron.de/~froese/alevt/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc x86"
+IUSE=""
+
+RDEPEND="x11-libs/libX11
+ >=media-libs/libpng-1.4"
+DEPEND="${RDEPEND}
+ x11-proto/xproto"
+
+RESTRICT="strip"
+
+src_prepare() {
+ cp -va Makefile{,.orig}
+
+ epatch \
+ "${FILESDIR}"/${P}-respectflags.patch \
+ "${FILESDIR}"/${P}-libpng15.patch
+}
+
+src_compile() {
+ append-flags -fno-strict-aliasing
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ dobin alevt alevt-cap alevt-date
+ doman alevt.1x alevt-date.1 alevt-cap.1
+ dodoc CHANGELOG README
+
+ insinto /usr/share/icons/hicolor/16x16/apps
+ newins contrib/mini-alevt.xpm alevt.xpm
+ insinto /usr/share/icons/hicolor/48x48/apps
+ newins contrib/icon48x48.xpm alevt.xpm
+
+ make_desktop_entry alevt "AleVT" alevt
+}
diff --git a/media-video/alevt/files/alevt-1.6.2-libpng15.patch b/media-video/alevt/files/alevt-1.6.2-libpng15.patch
new file mode 100644
index 000000000000..337a6f7c709f
--- /dev/null
+++ b/media-video/alevt/files/alevt-1.6.2-libpng15.patch
@@ -0,0 +1,11 @@
+--- exp-gfx.c
++++ exp-gfx.c
+@@ -4,6 +4,8 @@
+ #include <stdlib.h>
+ #include <string.h>
+
++#include <zlib.h> /* Z_DEFAULT_COMPRESSION */
++
+ #include "lang.h"
+ #include "export.h"
+
diff --git a/media-video/alevt/files/alevt-1.6.2-respectflags.patch b/media-video/alevt/files/alevt-1.6.2-respectflags.patch
new file mode 100644
index 000000000000..368b0ff614cd
--- /dev/null
+++ b/media-video/alevt/files/alevt-1.6.2-respectflags.patch
@@ -0,0 +1,34 @@
+--- alevt-1.6.2/Makefile.orig 2007-12-03 06:19:54.000000000 +0100
++++ alevt-1.6.2/Makefile 2009-05-14 10:17:39.000000000 +0200
+@@ -1,5 +1,4 @@
+ VER=1.6.2
+-OPT=-O2 -s -w
+ #OPT=-O -g
+ DEFS=-DWITH_PNG
+ FONT=vtxt
+@@ -11,7 +10,7 @@
+ # a smaller and thinner font
+ #FONT=neep9
+
+-CFLAGS=$(OPT) -DVERSION=\"$(VER)\" $(DEFS) -I$(USR_X11R6)/include
++CFLAGS += -DVERSION=\"$(VER)\" $(DEFS) -I$(USR_X11R6)/include
+
+ EXPOBJS=export.o exp-txt.o exp-html.o exp-gfx.o font.o
+ OBJS=main.o ui.o xio.o fdset.o vbi.o cache.o help.o edline.o search.o edit.o misc.o hamm.o lang.o $(EXPOBJS)
+@@ -25,13 +24,13 @@
+ all: alevt alevt-date alevt-cap alevt.1x alevt-date.1 alevt-cap.1
+
+ alevt: $(OBJS)
+- $(CC) $(OPT) $(OBJS) -o alevt -L$(USR_X11R6)/lib -L$(USR_X11R6)/lib64 -lX11 $(EXPLIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o alevt -L$(USR_X11R6)/lib -L$(USR_X11R6)/lib64 -lX11 $(EXPLIBS)
+
+ alevt-date: $(TOBJS)
+- $(CC) $(OPT) $(TOBJS) -o alevt-date
++ $(CC) $(CFLAGS) $(LDFLAGS) $(TOBJS) -o alevt-date
+
+ alevt-cap: $(COBJS)
+- $(CC) $(OPT) $(COBJS) -o alevt-cap $(EXPLIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) $(COBJS) -o alevt-cap $(EXPLIBS)
+
+ font.o: font1.xbm font2.xbm
+ fontsize.h: font1.xbm font2.xbm
diff --git a/media-video/alevt/metadata.xml b/media-video/alevt/metadata.xml
new file mode 100644
index 000000000000..a6b9e38a1b93
--- /dev/null
+++ b/media-video/alevt/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-video/aravis/Manifest b/media-video/aravis/Manifest
new file mode 100644
index 000000000000..a7eb29bc0bb0
--- /dev/null
+++ b/media-video/aravis/Manifest
@@ -0,0 +1,2 @@
+DIST aravis-0.1.14.tar.xz 414932 SHA256 4f7a5e8a965db2ac2428029f7e91933fcc40664f78d645041b8bb7b710e66bea SHA512 d84fe519074a69e679b08e0c0933bce191e50cfcdd1b46b743aa68ba33445a3a87cbd1701ba424666b638949f9faf531ec668acbe5d22017712f70cfa9620ea9 WHIRLPOOL 1e225a92c11341327452946cc35f18d76fe90626dca6b82631640443920675be270beeb053cc352c5c552b5a3edc2661fc96e2e00a1222630ed76fe5d35403c0
+DIST aravis-0.1.15.tar.xz 448348 SHA256 8181b9965abad9065607be0d28015ea56615b37e8297b9ec445a2c8fe58214df SHA512 f6a2e1f7fa4f712bea6a91f896bbc92afb3dcf3146109f3f7aee2ad6812a69f0b47a0f2116062cba6163dc058c7981a01a6eec395d4af633da666fe186291929 WHIRLPOOL 68b23fbb24fb78542db0f9b9ce9dbafc0a3b81971c5dc471313fbc2164bbae1b9317f00254ccaf457fb907b7ff8130cdf0612a66a6474c5effbbe601138ba04d
diff --git a/media-video/aravis/aravis-0.1.14.ebuild b/media-video/aravis/aravis-0.1.14.ebuild
new file mode 100644
index 000000000000..01c99dfe06b7
--- /dev/null
+++ b/media-video/aravis/aravis-0.1.14.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit versionator
+
+KEYWORDS="~amd64"
+
+if [[ ${PV} == "9999" ]]; then
+ KEYWORDS=""
+ EGIT_REPO_URI="git://git.gnome.org/aravis"
+ EGIT_COMMIT="${aravis_LIVE_COMMIT:-master}"
+ inherit git-2 autotools
+fi
+
+DESCRIPTION="Library for video acquisition using Genicam cameras"
+HOMEPAGE="http://live.gnome.org/Aravis"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+
+IUSE="X gstreamer"
+
+GST_DEPEND="media-libs/gstreamer:0.10
+ media-libs/gst-plugins-base:0.10"
+
+RDEPEND=">=dev-libs/glib-2.22
+ dev-libs/libxml2
+ X? (
+ >=x11-libs/gtk+-2.12:2
+ ${GST_DEPEND}
+ media-libs/gst-plugins-base:0.10
+ media-plugins/gst-plugins-xvideo:0.10
+ )
+ gstreamer? ( ${GST_DEPEND} )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ dev-libs/gobject-introspection"
+
+if [[ -z ${EGIT_COMMIT} ]]; then
+ SRC_URI="mirror://gnome/sources/${PN}/$(get_version_component_range 1-2)/${P}.tar.xz"
+else
+ DEPEND+=" dev-util/gtk-doc dev-util/intltool"
+fi
+
+src_prepare() {
+ if [[ -n ${EGIT_COMMIT} ]]; then
+ intltoolize || die
+ gtkdocize || die
+ eautoreconf
+ fi
+}
+
+src_configure() {
+ econf \
+ --disable-silent-rules \
+ --disable-static \
+ $(use_enable X viewer) \
+ $(use_enable gstreamer gst-plugin) \
+ --enable-introspection
+}
+
+src_install() {
+ emake install DESTDIR="${D}" aravisdocdir="/usr/share/doc/${PF}"
+ find "${D}" -name '*.la' -delete
+}
diff --git a/media-video/aravis/aravis-0.1.15.ebuild b/media-video/aravis/aravis-0.1.15.ebuild
new file mode 100644
index 000000000000..01c99dfe06b7
--- /dev/null
+++ b/media-video/aravis/aravis-0.1.15.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit versionator
+
+KEYWORDS="~amd64"
+
+if [[ ${PV} == "9999" ]]; then
+ KEYWORDS=""
+ EGIT_REPO_URI="git://git.gnome.org/aravis"
+ EGIT_COMMIT="${aravis_LIVE_COMMIT:-master}"
+ inherit git-2 autotools
+fi
+
+DESCRIPTION="Library for video acquisition using Genicam cameras"
+HOMEPAGE="http://live.gnome.org/Aravis"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+
+IUSE="X gstreamer"
+
+GST_DEPEND="media-libs/gstreamer:0.10
+ media-libs/gst-plugins-base:0.10"
+
+RDEPEND=">=dev-libs/glib-2.22
+ dev-libs/libxml2
+ X? (
+ >=x11-libs/gtk+-2.12:2
+ ${GST_DEPEND}
+ media-libs/gst-plugins-base:0.10
+ media-plugins/gst-plugins-xvideo:0.10
+ )
+ gstreamer? ( ${GST_DEPEND} )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ dev-libs/gobject-introspection"
+
+if [[ -z ${EGIT_COMMIT} ]]; then
+ SRC_URI="mirror://gnome/sources/${PN}/$(get_version_component_range 1-2)/${P}.tar.xz"
+else
+ DEPEND+=" dev-util/gtk-doc dev-util/intltool"
+fi
+
+src_prepare() {
+ if [[ -n ${EGIT_COMMIT} ]]; then
+ intltoolize || die
+ gtkdocize || die
+ eautoreconf
+ fi
+}
+
+src_configure() {
+ econf \
+ --disable-silent-rules \
+ --disable-static \
+ $(use_enable X viewer) \
+ $(use_enable gstreamer gst-plugin) \
+ --enable-introspection
+}
+
+src_install() {
+ emake install DESTDIR="${D}" aravisdocdir="/usr/share/doc/${PF}"
+ find "${D}" -name '*.la' -delete
+}
diff --git a/media-video/aravis/aravis-9999.ebuild b/media-video/aravis/aravis-9999.ebuild
new file mode 100644
index 000000000000..01c99dfe06b7
--- /dev/null
+++ b/media-video/aravis/aravis-9999.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit versionator
+
+KEYWORDS="~amd64"
+
+if [[ ${PV} == "9999" ]]; then
+ KEYWORDS=""
+ EGIT_REPO_URI="git://git.gnome.org/aravis"
+ EGIT_COMMIT="${aravis_LIVE_COMMIT:-master}"
+ inherit git-2 autotools
+fi
+
+DESCRIPTION="Library for video acquisition using Genicam cameras"
+HOMEPAGE="http://live.gnome.org/Aravis"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+
+IUSE="X gstreamer"
+
+GST_DEPEND="media-libs/gstreamer:0.10
+ media-libs/gst-plugins-base:0.10"
+
+RDEPEND=">=dev-libs/glib-2.22
+ dev-libs/libxml2
+ X? (
+ >=x11-libs/gtk+-2.12:2
+ ${GST_DEPEND}
+ media-libs/gst-plugins-base:0.10
+ media-plugins/gst-plugins-xvideo:0.10
+ )
+ gstreamer? ( ${GST_DEPEND} )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ dev-libs/gobject-introspection"
+
+if [[ -z ${EGIT_COMMIT} ]]; then
+ SRC_URI="mirror://gnome/sources/${PN}/$(get_version_component_range 1-2)/${P}.tar.xz"
+else
+ DEPEND+=" dev-util/gtk-doc dev-util/intltool"
+fi
+
+src_prepare() {
+ if [[ -n ${EGIT_COMMIT} ]]; then
+ intltoolize || die
+ gtkdocize || die
+ eautoreconf
+ fi
+}
+
+src_configure() {
+ econf \
+ --disable-silent-rules \
+ --disable-static \
+ $(use_enable X viewer) \
+ $(use_enable gstreamer gst-plugin) \
+ --enable-introspection
+}
+
+src_install() {
+ emake install DESTDIR="${D}" aravisdocdir="/usr/share/doc/${PF}"
+ find "${D}" -name '*.la' -delete
+}
diff --git a/media-video/aravis/metadata.xml b/media-video/aravis/metadata.xml
new file mode 100644
index 000000000000..32f225f9bd85
--- /dev/null
+++ b/media-video/aravis/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>video</herd>
+ <maintainer>
+ <email>lu_zero@gentoo.org</email>
+ </maintainer>
+
+ <use>
+ <flag name='X'>
+ Build the GTK+-based video viewer for aravis. This requires
+ GStreamer and a few plugins but technically not the GST plugin
+ for aravis.
+ </flag>
+
+ <flag name='gstreamer'>
+ Build the GStreamer plugin for aravis, but not the video viewer.
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/media-video/arista/Manifest b/media-video/arista/Manifest
new file mode 100644
index 000000000000..c6e740d1c07a
--- /dev/null
+++ b/media-video/arista/Manifest
@@ -0,0 +1,2 @@
+DIST arista-0.9.5.tar.gz 307390 SHA256 2d9b7d664225c9f4f9e2d7c365d40ed4673f87a673373cfb5612e4abe6285bd7 SHA512 c0cdd87117c7fab253997cb64854ae6b58f20c45b9f41440b9af33e729d3586e21480e177c983312ae42ff775ea3755785345c8cdb95a3b45642231c977a159c WHIRLPOOL ee5ab666b545edc0143ab780b7038b9edde8d82ee34ddcb191bbf09b12df98452b01471a282cc5712891dc07fdefae4dfdc695bb5383506e2a6ba9173c46b11b
+DIST arista-0.9.7.tar.gz 344475 SHA256 e6028e45516f0c5a736d6ec3c19f783e0a06d103cf2a816b8cc967ab964023ff SHA512 0a099f33ff56b67984485bda6a778e07c8f7ee215060b709dad22aaf70ca6489d031100d65323fa05067dfc190a8f03f884f297e62d89bc91ab36a970849df51 WHIRLPOOL 617f24e34bc62d7d43b057ea0346032ef3c13c8cc9e08b1e2705a5284967631c3cf5dc61d44aa438bb2f072baa63ffd6151e46aee2e3c0233e373e84957ec750
diff --git a/media-video/arista/arista-0.9.5.ebuild b/media-video/arista/arista-0.9.5.ebuild
new file mode 100644
index 000000000000..3fec4475d03e
--- /dev/null
+++ b/media-video/arista/arista-0.9.5.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+PYTHON_DEPEND="2"
+PYTHON_USE_WITH="xml"
+
+inherit distutils
+
+DESCRIPTION="An easy to use multimedia transcoder for the GNOME Desktop"
+HOMEPAGE="http://www.transcoder.org"
+SRC_URI="http://programmer-art.org/media/releases/arista-transcoder/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 x86"
+# Making these USE-defaults since encoding for portable devices is a very
+# common use case for Arista. xvid is being added since it's required for
+# DVD ripping. No gst-plugins-x264 available at this time.
+IUSE="+faac kde nautilus +x264 +xvid"
+
+DEPEND="dev-python/setuptools"
+RDEPEND=">=x11-libs/gtk+-2.16:2
+ || ( dev-lang/python:2.7 dev-lang/python:2.6 dev-python/simplejson )
+ >=dev-python/pygtk-2.16:2
+ dev-python/pygobject:2
+ dev-python/pycairo
+ dev-python/gconf-python:2
+ dev-python/dbus-python
+ dev-python/python-gudev
+ gnome-base/librsvg
+ >=media-libs/gstreamer-0.10.22:0.10
+ dev-python/gst-python:0.10
+ media-libs/gst-plugins-base:0.10
+ media-libs/gst-plugins-good:0.10
+ media-libs/gst-plugins-bad:0.10
+ media-plugins/gst-plugins-meta:0.10
+ media-plugins/gst-plugins-ffmpeg:0.10
+ x11-themes/gnome-icon-theme
+ nautilus? ( dev-python/nautilus-python )
+ kde? ( dev-python/librsvg-python )
+ faac? ( media-plugins/gst-plugins-faac:0.10 )
+ x264? ( media-plugins/gst-plugins-x264:0.10 )
+ xvid? ( media-plugins/gst-plugins-xvid:0.10 )"
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+pkg_postinst() {
+ distutils_pkg_postinst
+
+ einfo "If you find that a format you want is not supported in Arista,"
+ einfo "please make sure that you have the corresponding USE-flag enabled"
+ einfo "media-plugins/gst-plugins-meta"
+}
diff --git a/media-video/arista/arista-0.9.7.ebuild b/media-video/arista/arista-0.9.7.ebuild
new file mode 100644
index 000000000000..7dd16e8b880e
--- /dev/null
+++ b/media-video/arista/arista-0.9.7.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="xml"
+
+# hack for avoiding detecting 'templates' as a locale, next part of it - in src_prepare
+PLOCALES_1="ar ast bg ca cs da de el en_GB es et eu fi fr gl hu ia id it ja jv kn lt nl pl pt pt_BR ro ru sk sl sr sv"
+PLOCALES_2="th tr uk zh_CN zh_TW"
+PLOCALES="${PLOCALES_1} ${PLOCALES_2}"
+
+inherit distutils-r1 l10n
+
+DESCRIPTION="An easy to use multimedia transcoder for the GNOME Desktop"
+HOMEPAGE="http://www.transcoder.org"
+SRC_URI="http://programmer-art.org/media/releases/arista-transcoder/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+# Making these USE-defaults since encoding for portable devices is a very
+# common use case for Arista. xvid is being added since it's required for
+# DVD ripping. No gst-plugins-x264 available at this time.
+IUSE="+faac kde nautilus +x264 +xvid"
+
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+RDEPEND=">=x11-libs/gtk+-2.16:2
+ >=dev-python/pygtk-2.16:2[${PYTHON_USEDEP}]
+ dev-python/pygobject:2[${PYTHON_USEDEP}]
+ dev-python/pycairo[${PYTHON_USEDEP}]
+ dev-python/gconf-python:2
+ dev-python/dbus-python[${PYTHON_USEDEP}]
+ dev-python/python-gudev[${PYTHON_USEDEP}]
+ gnome-base/librsvg
+ >=media-libs/gstreamer-0.10.22:0.10
+ dev-python/gst-python:0.10[${PYTHON_USEDEP}]
+ media-libs/gst-plugins-base:0.10
+ media-libs/gst-plugins-good:0.10
+ media-libs/gst-plugins-bad:0.10
+ media-plugins/gst-plugins-meta:0.10
+ media-plugins/gst-plugins-ffmpeg:0.10
+ x11-themes/gnome-icon-theme
+ nautilus? ( dev-python/nautilus-python[${PYTHON_USEDEP}] )
+ kde? ( dev-python/librsvg-python[${PYTHON_USEDEP}] )
+ faac? ( media-plugins/gst-plugins-faac:0.10 )
+ x264? ( media-plugins/gst-plugins-x264:0.10 )
+ xvid? ( media-plugins/gst-plugins-xvid:0.10 )"
+
+PATCHES=( "${FILESDIR}/${P}-doc-install.patch" )
+
+src_prepare() {
+ # dirty hack for new locale detection
+ local PLOCALES="${PLOCALES_1} templates ${PLOCALES_2}"
+ l10n_find_plocales_changes "${S}/locale" "" ""
+
+ distutils-r1_src_prepare
+}
+
+src_install() {
+ remove_unused_locale() {
+ rm -r "${ED}/usr/share/locale/${1}" || die "can not remove unused locale '${1}'"
+ }
+
+ distutils-r1_src_install
+
+ l10n_for_each_disabled_locale_do remove_unused_locale
+}
+
+pkg_postinst() {
+ einfo "If you find that a format you want is not supported in Arista,"
+ einfo "please make sure that you have the corresponding USE-flag enabled"
+ einfo "media-plugins/gst-plugins-meta"
+}
diff --git a/media-video/arista/files/arista-0.9.7-doc-install.patch b/media-video/arista/files/arista-0.9.7-doc-install.patch
new file mode 100644
index 000000000000..9a59c495c403
--- /dev/null
+++ b/media-video/arista/files/arista-0.9.7-doc-install.patch
@@ -0,0 +1,14 @@
+We prefer to install doc files manually through ebuild
+
+--- setup.py.orig 2013-02-12 00:35:31.387656978 +0400
++++ setup.py 2013-02-12 00:35:38.418657537 +0400
+@@ -22,9 +22,6 @@
+
+ data_files = [
+ (os.path.join("share", "applications"), ["arista.desktop"]),
+- (os.path.join("share", "doc", "arista"), [
+- "README.md", "LICENSE", "AUTHORS"
+- ]),
+ (os.path.join("share", "nautilus-python", "extensions"), ["arista-nautilus.py"]),
+ ]
+
diff --git a/media-video/arista/metadata.xml b/media-video/arista/metadata.xml
new file mode 100644
index 000000000000..b8c8bd511da5
--- /dev/null
+++ b/media-video/arista/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="faac">Use external faac library for AAC encoding</flag>
+ <flag name="nautilus">Add an entry in the Nautilus context menu to transcode
+ media files for a specified device.</flag>
+ </use>
+</pkgmetadata>
+
diff --git a/media-video/asfrecorder/Manifest b/media-video/asfrecorder/Manifest
new file mode 100644
index 000000000000..0882137617d1
--- /dev/null
+++ b/media-video/asfrecorder/Manifest
@@ -0,0 +1 @@
+DIST ASFRecorder.zip 377571 SHA256 fd94d102231a31a56c368e02a30e6e700573a0f145c8be48173843b7e9054ea8
diff --git a/media-video/asfrecorder/asfrecorder-1.1.ebuild b/media-video/asfrecorder/asfrecorder-1.1.ebuild
new file mode 100644
index 000000000000..360b89764c7d
--- /dev/null
+++ b/media-video/asfrecorder/asfrecorder-1.1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit toolchain-funcs
+
+MY_PN="${PN/asfr/ASFR}"
+DESCRIPTION="ASFRecorder - Download Windows Media Streaming files"
+HOMEPAGE="http://sourceforge.net/projects/asfrecorder/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_PN}.zip"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ppc x86 ~x86-linux ~ppc-macos"
+IUSE=""
+
+DEPEND="app-arch/unzip"
+
+S=${WORKDIR}/${MY_PN}
+
+src_compile() {
+ # There is a Makefile, but it only works for Cygwin, so we
+ # only compile this single program.
+ cd "${S}"/source
+ $(tc-getCC) -o asfrecorder ${CFLAGS} ${LDFLAGS} asfrecorder.c || die "Build failed"
+}
+
+src_install () {
+ # Again, no makefiles, so just take what we want.
+ dobin source/asfrecorder
+ dodoc README.TXT
+}
diff --git a/media-video/asfrecorder/metadata.xml b/media-video/asfrecorder/metadata.xml
new file mode 100644
index 000000000000..ef1903383336
--- /dev/null
+++ b/media-video/asfrecorder/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">asfrecorder</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/atomicparsley-wez/Manifest b/media-video/atomicparsley-wez/Manifest
new file mode 100644
index 000000000000..e8b979c91f61
--- /dev/null
+++ b/media-video/atomicparsley-wez/Manifest
@@ -0,0 +1 @@
+DIST atomicparsley-wez-0.9.6.tar.bz2 178956 SHA256 e28d46728be86219e6ce48695ea637d831ca0170ca6bdac99810996a8291ee50 SHA512 1f094fd4d43f652319abd2eee70529d9a57e7843b4b725815b9939ad90cf56e3f061ffd9104507a7d74cabbdd9b7cb24ca12d30c88a89832629da3091bbcf1b6 WHIRLPOOL 701076bc72d49a74b96afb210035b1c121f686ff45dc95d6f11dfcb34a83f8cb7fbd38328cd156d848d200954e7ff34f27dc07fc1dd7d11280540dd608c93a98
diff --git a/media-video/atomicparsley-wez/atomicparsley-wez-0.9.6.ebuild b/media-video/atomicparsley-wez/atomicparsley-wez-0.9.6.ebuild
new file mode 100644
index 000000000000..0a6f5a81eba5
--- /dev/null
+++ b/media-video/atomicparsley-wez/atomicparsley-wez-0.9.6.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 autotools flag-o-matic
+
+MY_PN=${PN/-wez}
+
+DESCRIPTION="command line program for reading, parsing and setting iTunes-style metadata in MPEG4 files"
+HOMEPAGE="http://github.com/wez/atomicparsley"
+SRC_URI="http://bitbucket.org/wez/${MY_PN}/get/${PV}.tar.bz2 -> ${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="sys-libs/zlib
+ !media-video/atomicparsley"
+DEPEND="${RDEPEND}"
+
+DOCS="Changes.txt CREDITS"
+
+src_unpack() {
+ unpack ${A}
+ mv *-${MY_PN}-* "${S}"
+}
+
+src_prepare() {
+ eautoreconf
+}
+
+src_configure() {
+ append-flags -fno-strict-aliasing
+ econf
+}
diff --git a/media-video/atomicparsley-wez/metadata.xml b/media-video/atomicparsley-wez/metadata.xml
new file mode 100644
index 000000000000..ad84b7ad866d
--- /dev/null
+++ b/media-video/atomicparsley-wez/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">wez/atomicparsley</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/atomicparsley/Manifest b/media-video/atomicparsley/Manifest
new file mode 100644
index 000000000000..8bd3e68d032d
--- /dev/null
+++ b/media-video/atomicparsley/Manifest
@@ -0,0 +1 @@
+DIST AtomicParsley-source-0.9.0.zip 172616 SHA256 1344a66170e1f324eb43618763dbcfe984ca84c64ea8baf81e99e59657e082f7 SHA512 a4733893bb0d8bf824ee46d7da7f8c2ab9338ae56ea89810db1ac40282554e7e095b3e88631786b248a66aba878f166b9ac403769c66ef3ad45ac8ff7d411982 WHIRLPOOL d492ef1a3bbf77025362ae0fc36bae78e65e13b61e364cc810601f19a3e2d6662cb48a22758e4eabb6ba756aa75ea30e610cc46dfbaa47afc2f7c9e4f8df246f
diff --git a/media-video/atomicparsley/atomicparsley-0.9.0.ebuild b/media-video/atomicparsley/atomicparsley-0.9.0.ebuild
new file mode 100644
index 000000000000..9b6447a1d956
--- /dev/null
+++ b/media-video/atomicparsley/atomicparsley-0.9.0.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+MY_P=AtomicParsley-source-${PV}
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="command line program for reading, parsing and setting iTunes-style metadata in MPEG4 files"
+HOMEPAGE="http://atomicparsley.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.zip"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 sparc x86"
+IUSE=""
+
+RDEPEND=""
+DEPEND="app-arch/unzip"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-glibc-2.10.patch \
+ "${FILESDIR}"/${P}-environment.patch
+}
+
+src_compile() {
+ # APar_sha1.cpp:116:47 and 117:43: warning: dereferencing type-punned
+ # pointer will break strict-aliasing rules
+ append-flags -fno-strict-aliasing
+ tc-export CXX
+ ./build || die
+}
+
+src_install() {
+ dobin AtomicParsley
+ dodoc *.{txt,rtf}
+}
diff --git a/media-video/atomicparsley/files/atomicparsley-0.9.0-environment.patch b/media-video/atomicparsley/files/atomicparsley-0.9.0-environment.patch
new file mode 100644
index 000000000000..6db9c79a3275
--- /dev/null
+++ b/media-video/atomicparsley/files/atomicparsley-0.9.0-environment.patch
@@ -0,0 +1,80 @@
+diff -ur AtomicParsley-source-0.9.0.orig/build AtomicParsley-source-0.9.0/build
+--- AtomicParsley-source-0.9.0.orig/build 2006-09-10 18:02:58.000000000 +0300
++++ AtomicParsley-source-0.9.0/build 2009-07-22 01:19:39.000000000 +0300
+@@ -39,45 +39,45 @@
+
+ echo "Compiling AP_commons.cpp ..."
+
+-g++ -g -O2 -Wall -MT obj_files/AP_commons.o -MD -MP -MF "./obj_files/AP_commons.Tpo" -c -o obj_files/AP_commons.o AP_commons.cpp
++${CXX} ${CXXFLAGS} -Wall -MT obj_files/AP_commons.o -MD -MP -MF "./obj_files/AP_commons.Tpo" -c -o obj_files/AP_commons.o AP_commons.cpp
+
+ echo "Compiling AtomicParsley_genres.cpp ..."
+
+-g++ -g -O2 -Wall -MT obj_files/AtomicParsley_genres.o -MD -MP -MF "./obj_files/AtomicParsley_genres.Tpo" -c -o obj_files/AtomicParsley_genres.o AtomicParsley_genres.cpp
++${CXX} ${CXXFLAGS} -Wall -MT obj_files/AtomicParsley_genres.o -MD -MP -MF "./obj_files/AtomicParsley_genres.Tpo" -c -o obj_files/AtomicParsley_genres.o AtomicParsley_genres.cpp
+
+ echo "Compiling AP_iconv.cpp ..."
+
+-g++ -g -O2 -Wall $EXTRA_CPP_FLAGS -MT AP_iconv.o -MD -MP -MF "./obj_files/AP_iconv.Tpo" -c -o obj_files/AP_iconv.o AP_iconv.cpp
++${CXX} ${CXXFLAGS} -Wall $EXTRA_CPP_FLAGS -MT AP_iconv.o -MD -MP -MF "./obj_files/AP_iconv.Tpo" -c -o obj_files/AP_iconv.o AP_iconv.cpp
+
+ if test $OS = Darwin ; then
+ echo "Compiling AP_NSFile_utils.mm ..."
+
+- g++ -g -O2 -Wall -MT obj_files/AP_NSFile_utils.o -MD -MP -MF "./obj_files/AP_NSFile_utils.Tpo" -c -o obj_files/AP_NSFile_utils.o AP_NSFile_utils.mm
++ ${CXX} ${CXXFLAGS} -Wall -MT obj_files/AP_NSFile_utils.o -MD -MP -MF "./obj_files/AP_NSFile_utils.Tpo" -c -o obj_files/AP_NSFile_utils.o AP_NSFile_utils.mm
+
+ echo "Compiling AP_NSImage.mm ..."
+
+- g++ -g -O2 -Wall -MT obj_files/AP_NSImage.o -MD -MP -MF "./obj_files/AP_NSImage.Tpo" -c -o obj_files/AP_NSImage.o AP_NSImage.mm
++ ${CXX} ${CXXFLAGS} -Wall -MT obj_files/AP_NSImage.o -MD -MP -MF "./obj_files/AP_NSImage.Tpo" -c -o obj_files/AP_NSImage.o AP_NSImage.mm
+ fi
+
+ echo "Compiling AtomicParsley.cpp ..."
+
+-g++ -g -O2 -Wall -Wno-unused $EXTRA_CPP_FLAGS -MT obj_files/AtomicParsley.o -MD -MP -MF "./obj_files/AtomicParsley.Tpo" -c -o obj_files/AtomicParsley.o AtomicParsley.cpp
++${CXX} ${CXXFLAGS} -Wall -Wno-unused $EXTRA_CPP_FLAGS -MT obj_files/AtomicParsley.o -MD -MP -MF "./obj_files/AtomicParsley.Tpo" -c -o obj_files/AtomicParsley.o AtomicParsley.cpp
+
+ echo "Compiling AP_AtomExtracts.cpp ..."
+
+-g++ -g -O2 -Wall $EXTRA_CPP_FLAGS -I../AtomicParsley -MT obj_files/AP_AtomExtracts.o -MD -MP -MF "./obj_files/AP_AtomExtracts.Tpo" -c -o obj_files/AP_AtomExtracts.o AP_AtomExtracts.cpp
++${CXX} ${CXXFLAGS} -Wall $EXTRA_CPP_FLAGS -I../AtomicParsley -MT obj_files/AP_AtomExtracts.o -MD -MP -MF "./obj_files/AP_AtomExtracts.Tpo" -c -o obj_files/AP_AtomExtracts.o AP_AtomExtracts.cpp
+
+ echo "Compiling APar_sha1.cpp ..."
+
+-g++ -g -O2 -Wall $EXTRA_CPP_FLAGS -I../AtomicParsley -MT obj_files/APar_sha1.o -MD -MP -MF "./obj_files/APar_sha1.Tpo" -c -o obj_files/APar_sha1.o APar_sha1.cpp
++${CXX} ${CXXFLAGS} -Wall $EXTRA_CPP_FLAGS -I../AtomicParsley -MT obj_files/APar_sha1.o -MD -MP -MF "./obj_files/APar_sha1.Tpo" -c -o obj_files/APar_sha1.o APar_sha1.cpp
+
+ echo "Compiling APar_uuid.cpp ..."
+
+-g++ -g -O2 -Wall $EXTRA_CPP_FLAGS -I../AtomicParsley -MT obj_files/APar_uuid.o -MD -MP -MF "./obj_files/APar_uuid.Tpo" -c -o obj_files/APar_uuid.o APar_uuid.cpp
++${CXX} ${CXXFLAGS} -Wall $EXTRA_CPP_FLAGS -I../AtomicParsley -MT obj_files/APar_uuid.o -MD -MP -MF "./obj_files/APar_uuid.Tpo" -c -o obj_files/APar_uuid.o APar_uuid.cpp
+
+ echo "Compiling main.cpp ..."
+
+-g++ -g -O2 -Wall $EXTRA_CPP_FLAGS -I../AtomicParsley -MT obj_files/main.o -MD -MP -MF "./obj_files/main.Tpo" -c -o obj_files/main.o main.cpp
++${CXX} ${CXXFLAGS} -Wall $EXTRA_CPP_FLAGS -I../AtomicParsley -MT obj_files/main.o -MD -MP -MF "./obj_files/main.Tpo" -c -o obj_files/main.o main.cpp
+
+ #---------------------------------------------#
+ # Linking #
+@@ -85,16 +85,16 @@
+ echo "Linking AtomicParsley..."
+
+ if test $OS = Darwin ; then
+- g++ -g -O2 -Wall -framework Cocoa -o AtomicParsley obj_files/APar_sha1.o obj_files/APar_uuid.o obj_files/AP_commons.o obj_files/AtomicParsley_genres.o obj_files/AP_iconv.o obj_files/AP_NSFile_utils.o obj_files/AP_NSImage.o obj_files/AP_AtomExtracts.o obj_files/AtomicParsley.o obj_files/main.o
++ ${CXX} ${LDFLAGS} -Wall -framework Cocoa -o AtomicParsley obj_files/APar_sha1.o obj_files/APar_uuid.o obj_files/AP_commons.o obj_files/AtomicParsley_genres.o obj_files/AP_iconv.o obj_files/AP_NSFile_utils.o obj_files/AP_NSImage.o obj_files/AP_AtomExtracts.o obj_files/AtomicParsley.o obj_files/main.o
+
+ elif test $OS = Linux ; then
+- g++ -O2 -Wall -o AtomicParsley obj_files/APar_sha1.o obj_files/APar_uuid.o obj_files/AP_commons.o obj_files/AtomicParsley_genres.o obj_files/AP_iconv.o obj_files/AP_AtomExtracts.o obj_files/AtomicParsley.o obj_files/main.o
++ ${CXX} ${LDFLAGS} -Wall -o AtomicParsley obj_files/APar_sha1.o obj_files/APar_uuid.o obj_files/AP_commons.o obj_files/AtomicParsley_genres.o obj_files/AP_iconv.o obj_files/AP_AtomExtracts.o obj_files/AtomicParsley.o obj_files/main.o
+
+ elif test $OS = CYGWIN ; then
+- g++ -g -O2 -Wall -o AtomicParsley.exe obj_files/APar_sha1.o obj_files/APar_uuid.o obj_files/AP_commons.o obj_files/AtomicParsley_genres.o obj_files/AP_iconv.o obj_files/AP_AtomExtracts.o obj_files/AtomicParsley.o obj_files/main.o -lgcc
++ ${CXX} ${LDFLAGS} -Wall -o AtomicParsley.exe obj_files/APar_sha1.o obj_files/APar_uuid.o obj_files/AP_commons.o obj_files/AtomicParsley_genres.o obj_files/AP_iconv.o obj_files/AP_AtomExtracts.o obj_files/AtomicParsley.o obj_files/main.o -lgcc
+
+ else
+- g++ -g -O2 -Wall -o AtomicParsley.exe obj_files/APar_sha1.o obj_files/APar_uuid.o obj_files/AP_commons.o obj_files/AtomicParsley_genres.o obj_files/AP_iconv.o obj_files/AP_AtomExtracts.o obj_files/AtomicParsley.o obj_files/main.o
++ ${CXX} ${CXXFLAGS} -Wall -o AtomicParsley.exe obj_files/APar_sha1.o obj_files/APar_uuid.o obj_files/AP_commons.o obj_files/AtomicParsley_genres.o obj_files/AP_iconv.o obj_files/AP_AtomExtracts.o obj_files/AtomicParsley.o obj_files/main.o
+ fi
+
+ #---------------------------------------------#
diff --git a/media-video/atomicparsley/files/atomicparsley-0.9.0-glibc-2.10.patch b/media-video/atomicparsley/files/atomicparsley-0.9.0-glibc-2.10.patch
new file mode 100644
index 000000000000..0397a4e42bca
--- /dev/null
+++ b/media-video/atomicparsley/files/atomicparsley-0.9.0-glibc-2.10.patch
@@ -0,0 +1,39 @@
+diff -ur AtomicParsley-source-0.9.0.orig/AtomicParsley.cpp AtomicParsley-source-0.9.0/AtomicParsley.cpp
+--- AtomicParsley-source-0.9.0.orig/AtomicParsley.cpp 2006-09-16 02:22:33.000000000 +0300
++++ AtomicParsley-source-0.9.0/AtomicParsley.cpp 2009-07-22 00:52:48.000000000 +0300
+@@ -1447,7 +1447,7 @@
+ uint32_t atom_offsets = 0;
+ char* uuid_outfile = (char*)calloc(1, sizeof(char)*MAXPATHLEN+1); //malloc a new string because it may be a cli arg for a specific output path
+ if (output_path == NULL) {
+- char* orig_suffix = strrchr(originating_file, '.');
++ const char* orig_suffix = strrchr(originating_file, '.');
+ if (orig_suffix == NULL) {
+ fprintf(stdout, "AP warning: a file extension for the input file was not found.\n\tGlobbing onto original filename...\n");
+ path_len = strlen(originating_file);
+@@ -4462,7 +4462,7 @@
+ #endif
+
+ void APar_DeriveNewPath(const char *filePath, char* temp_path, int output_type, const char* file_kind, char* forced_suffix, bool random_filename = true) {
+- char* suffix = NULL;
++ const char* suffix = NULL;
+ if (forced_suffix == NULL) {
+ suffix = strrchr(filePath, '.');
+ } else {
+@@ -4480,7 +4480,7 @@
+ memcpy(temp_path, filePath, base_len);
+ memcpy(temp_path + base_len, file_kind, strlen(file_kind));
+ #else
+- char* file_name = strrchr(filePath, '/');
++ const char* file_name = strrchr(filePath, '/');
+ size_t file_name_len = strlen(file_name);
+ memcpy(temp_path, filePath, filepath_len-file_name_len+1);
+ memcpy(temp_path + strlen(temp_path), ".", 1);
+@@ -5006,7 +5006,7 @@
+ free_modified_name = true;
+ if (forced_suffix_type == FORCE_M4B_TYPE) { //using --stik Audiobook with --overWrite will change the original file's extension
+ uint16_t filename_len = strlen(m4aFile);
+- char* suffix = strrchr(m4aFile, '.');
++ const char* suffix = strrchr(m4aFile, '.');
+ memcpy(originating_file, m4aFile, filename_len+1 );
+ memcpy(originating_file + (filename_len - strlen(suffix) ), ".m4b", 5 );
+ }
diff --git a/media-video/atomicparsley/metadata.xml b/media-video/atomicparsley/metadata.xml
new file mode 100644
index 000000000000..78fe4c411e54
--- /dev/null
+++ b/media-video/atomicparsley/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">atomicparsley</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/avidemux/Manifest b/media-video/avidemux/Manifest
new file mode 100644
index 000000000000..8c4b4ffa31f4
--- /dev/null
+++ b/media-video/avidemux/Manifest
@@ -0,0 +1,7 @@
+DIST avidemux_2.5.6.tar.gz 14914123 SHA256 d6da7f2c4304368bd9c367a74a464b47d42fee9cada2960e70053d61c1ef9b8b SHA512 8a9dcfc61a396fc4f9f0a213269bcb574de0baa442d3165cfab0fe8e86309e7b0dd2ffe3e2d7ff8a8e6e3fd15da28699e8000367d92da0782fec6d5a38c1d77c WHIRLPOOL fecca87889b19a321a9fe13e734ca11a883c88152e5d59926ecd423b178bb26ef611ee00d8b2897f8a4a36a5c159d6c9f32733bc98fccced08532b8f060bd6ac
+DIST avidemux_2.6.2.tar.gz 17009420 SHA256 67c5676692152094033fbab490fbea24af27d8744496578d1c77957ab103fdb6 SHA512 1ba6f1c751732eec9fdceb2b0728122005ceab4c74ac09d213ebeff4c2af2a0b6ce8737d88e7c43970d1b9ca80cb36ad925efc9e4a487c4f463f1435aee328b3 WHIRLPOOL 0c95e87293251fffb773c8a1996ac015ba0d6f9d36d4f5ae01313c0532d2cf020a3ba0704d0f607347bbf0444e10857d7508fcbd968d62e889d7b62b36b85df7
+DIST avidemux_2.6.3.tar.gz 17025710 SHA256 78972b46c6ef1eb52fc012cafdeb2b6275913b968a49053016fb91ef0e9e5137 SHA512 a51e3cd95695a8500f1355c7a76b8313ae3fe68855b8eb9351038c00cd3d05bbf3ada3b75bf9d817fcddf1786a55c1c09cdbc4fe774974c5e4484c12ccd0a8fc WHIRLPOOL 899c5135e92cd3a830c84b1701ac6bfaf73d7417fa869ab26dd16b3754e5b71c5e667b30d747c5f19b902e1a8d53679447e86f9c6403f32a31554e551929e2bf
+DIST avidemux_2.6.4.tar.gz 17109929 SHA256 2937c6c09248445942ac7e71b100ff8f7e272c4ad9c38e7d8c519ce4a11cec44 SHA512 1b80f65ac5a1da844b521a82bab8976d01c81923460004dc76ed0f6994f95da0ad9a836c90ffa1595ad060f0d6f27ce30add0204ca9d5295084a62e79dd484c9 WHIRLPOOL a1cbfcfeafa163ed24881edb085126a69eca3e0e8eaee50091ceadb993105a0cb43068b7725fa54871bc04b20ca5b51650ac536688b1d1f8d5b0a2d7356459ef
+DIST avidemux_2.6.5.tar.gz 17322253 SHA256 428e1f6d99e2d854ccdcb68f2260d853c47c809eee6bd92f151cb298d98b1861 SHA512 e7f8be29812ca787a1ec2cfddb1c611e1032ed94f24f41c0684f106970085bb6d219c822f3e713c472508a3f7b306540d2cabeb665bdbac061a49bccf8c23a80 WHIRLPOOL 192ce60afe4634319567cd7a1440ba212d83e02c054d6625ad738955fde02d0e722eba948c60932f520bb5e76c46ebbab0001230c1da50d893fb99a18f1da76f
+DIST avidemux_2.6.7.tar.gz 17337193 SHA256 d28202273d23be85c748c12d6e4df5e013bb861ea52b9bac7e0f90ba3d23249f SHA512 deea9811a0b6f618fab2ecf63c675b37dac12ea0ab09136a6b251e13601cd62cdc1c97d032762ea54f38e07275380106026541243bc87e230ce302fb821f2e5c WHIRLPOOL a41c338fc51e14d2c900dcef86a3887f94164548e8b904945d47915a78db907d152fda4ae53e5c37bf368348ff9912b529005a271f85d993776f042b5b997553
+DIST avidemux_2.6.8.tar.gz 17380534 SHA256 02998c235a89894d184d745c94cac37b78bc20e9eb44b318ee2bb83f2507e682 SHA512 57a4042f1a9d46462850871d36950215c5ffb5b66ce2f2cde09d747e946c05adb7a550ac7763c96f4c1bcb2c39881407d9d88bc64c93053741091751495ba0b0 WHIRLPOOL 29f8a6039d82e686e8dfbfc7b23658921834238a4cc6c4de338afdfdc032a9a7cba1c8236789aa6dbcab318ec14c344c19563f153e6cbd63cd265c5fb15b44b6
diff --git a/media-video/avidemux/avidemux-2.5.6-r2.ebuild b/media-video/avidemux/avidemux-2.5.6-r2.ebuild
new file mode 100644
index 000000000000..8f92b5ed26a5
--- /dev/null
+++ b/media-video/avidemux/avidemux-2.5.6-r2.ebuild
@@ -0,0 +1,172 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit cmake-utils eutils flag-o-matic
+
+MY_P=${PN}_${PV}
+
+DESCRIPTION="Video editor designed for simple cutting, filtering and encoding tasks"
+HOMEPAGE="http://fixounet.free.fr/avidemux"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="2"
+KEYWORDS="amd64 x86"
+IUSE="aac aften alsa amr gtk jack +mp3 nls opengl oss pulseaudio
+ qt4 sdl +truetype vorbis vpx +x264 +xv +xvid"
+
+RDEPEND="
+ dev-libs/libxml2
+ sys-libs/zlib
+ aac? (
+ media-libs/faac
+ media-libs/faad2
+ )
+ aften? ( media-libs/aften[cxx] )
+ alsa? ( media-libs/alsa-lib )
+ amr? ( media-libs/opencore-amr )
+ gtk? ( x11-libs/gtk+:2 )
+ jack? (
+ media-libs/libsamplerate
+ media-sound/jack-audio-connection-kit
+ )
+ mp3? ( media-sound/lame )
+ pulseaudio? ( media-sound/pulseaudio )
+ qt4? (
+ >=dev-qt/qtgui-4.6:4
+ opengl? (
+ virtual/opengl
+ >=dev-qt/qtopengl-4.6:4
+ )
+ )
+ sdl? ( media-libs/libsdl )
+ truetype? (
+ media-libs/freetype:2
+ media-libs/fontconfig
+ )
+ vorbis? ( media-libs/libvorbis )
+ vpx? ( media-libs/libvpx )
+ x264? ( media-libs/x264:= )
+ xv? (
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXv
+ )
+ xvid? ( media-libs/xvid )
+"
+DEPEND="${RDEPEND}
+ dev-lang/yasm
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+"
+
+AVIDEMUX_LANGS="bg ca cs de el es fr it ja pt_BR ru sr sr@latin tr zh_TW"
+for lang in ${AVIDEMUX_LANGS}; do
+ IUSE+=" linguas_${lang}"
+done
+unset lang
+
+S=${WORKDIR}/${MY_P}
+BUILD_S=${WORKDIR}/${P}_build
+
+DOCS=( AUTHORS )
+PATCHES=(
+ "${FILESDIR}/${PN}-2.5.4-build-plugins-fix.patch"
+ "${FILESDIR}/${P}-ffmpeg-symbol-visibility.patch"
+)
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ local lingua= po_files= qt_ts_files= avidemux_ts_files=
+ for lingua in ${LINGUAS}; do
+ if has ${lingua} ${AVIDEMUX_LANGS}; then
+ if [[ -e ${S}/po/${lingua}.po ]]; then
+ po_files+=" \${po_subdir}/${lingua}.po"
+ fi
+ if [[ -e ${S}/po/qt_${lingua}.ts ]]; then
+ qt_ts_files+=" \${ts_subdir}/qt_${lingua}.ts"
+ fi
+ if [[ -e ${S}/po/${PN}_${lingua}.ts ]]; then
+ avidemux_ts_files+=" \${ts_subdir}/${PN}_${lingua}.ts"
+ fi
+ fi
+ done
+
+ sed -i -e "s!FILE(GLOB po_files .*)!SET(po_files ${po_files})!" \
+ "${S}/cmake/Po.cmake" || die "sed failed"
+ sed -i -e "s!FILE(GLOB.*qt.*)!SET(ts_files ${qt_ts_files})!" \
+ -e "s!FILE(GLOB.*avidemux.*)!SET(ts_files ${avidemux_ts_files})!" \
+ "${S}/cmake/Ts.cmake" || die "sed failed"
+
+ # fix major issues in desktop files wrt bugs #291453, #316599, #430500
+ sed -i -re '/^(Exec|Path)/ s:\[\$e\]::' avidemux2-gtk.desktop || die
+ sed -i -re '/^Exec/ s:(avidemux2_)gtk:\1qt4:' avidemux2.desktop || die
+
+ # don't install Windows-only files
+ sed -i -e '/addons\/avsfilter/d' CMakeLists.txt || die
+}
+
+src_configure() {
+ # add lax vector typing for PowerPC
+ if use ppc || use ppc64; then
+ append-cflags -flax-vector-conversions
+ fi
+ # bug 432322
+ use x86 && replace-flags -O0 -O1
+
+ local mycmakeargs=(
+ -DAVIDEMUX_SOURCE_DIR="${S}"
+ -DAVIDEMUX_INSTALL_PREFIX="${BUILD_S}"
+ -DAVIDEMUX_CORECONFIG_DIR="${BUILD_S}/config"
+ -DARTS=OFF
+ -DESD=OFF
+ $(cmake-utils_use aac FAAC)
+ $(cmake-utils_use aac FAAD)
+ $(cmake-utils_use aften)
+ $(cmake-utils_use alsa)
+ $(cmake-utils_use amr OPENCORE_AMRNB)
+ $(cmake-utils_use amr OPENCORE_AMRWB)
+ $(cmake-utils_use gtk)
+ $(cmake-utils_use jack)
+ $(cmake-utils_use mp3 LAME)
+ $(cmake-utils_use nls GETTEXT)
+ $(cmake-utils_use_use opengl)
+ $(cmake-utils_use oss)
+ $(cmake-utils_use pulseaudio PULSEAUDIOSIMPLE)
+ $(cmake-utils_use qt4)
+ $(cmake-utils_use sdl)
+ $(cmake-utils_use truetype FREETYPE2)
+ $(cmake-utils_use truetype FONTCONFIG)
+ $(cmake-utils_use vorbis)
+ $(cmake-utils_use vorbis LIBVORBIS)
+ $(cmake-utils_use vpx VPXDEC)
+ $(cmake-utils_use x264)
+ $(cmake-utils_use xv XVIDEO)
+ $(cmake-utils_use xvid)
+ )
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ # first build the application
+ cmake-utils_src_compile -j1
+
+ # and then go on with plugins
+ emake -C "${CMAKE_BUILD_DIR}/plugins"
+}
+
+src_install() {
+ # install the application
+ cmake-utils_src_install
+
+ # install plugins
+ emake -C "${CMAKE_BUILD_DIR}/plugins" DESTDIR="${D}" install
+
+ newicon ${PN}_icon.png ${PN}.png
+ use gtk && domenu avidemux2-gtk.desktop
+ use qt4 && domenu avidemux2.desktop
+}
diff --git a/media-video/avidemux/avidemux-2.6.2-r1.ebuild b/media-video/avidemux/avidemux-2.6.2-r1.ebuild
new file mode 100644
index 000000000000..bc2cbd50e07a
--- /dev/null
+++ b/media-video/avidemux/avidemux-2.6.2-r1.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PLOCALES="ca cs de el es fr it ja pt_BR ru sr sr@latin tr"
+inherit cmake-utils eutils flag-o-matic l10n toolchain-funcs
+
+SLOT="2.6"
+MY_P="${PN}_${PV}"
+
+DESCRIPTION="Video editor designed for simple cutting, filtering and encoding tasks"
+HOMEPAGE="http://fixounet.free.fr/${PN}"
+SRC_URI="mirror://sourceforge/${PN}/${PV}/${MY_P}.tar.gz"
+
+# Multiple licenses because of all the bundled stuff.
+LICENSE="GPL-1 GPL-2 MIT PSF-2 public-domain"
+KEYWORDS="~amd64 ~x86"
+IUSE="aften a52 alsa amr debug dts fontconfig jack lame libsamplerate cpu_flags_x86_mmx oss nls qt4 sdl vorbis truetype xvid x264 xv"
+
+# TODO: Figure out which dependencies can be moved out of avidemux-core into here.
+RDEPEND="=media-libs/avidemux-core-${PV}-r1[aften?,a52?,alsa?,amr?,dts?,fontconfig?,jack?,lame?,libsamplerate?,cpu_flags_x86_mmx?,oss?,nls?,sdl?,vorbis?,truetype?,xvid?,x264?,xv?]
+ qt4? ( >=dev-qt/qtgui-4.8.3:4 )"
+DEPEND="$RDEPEND"
+PDEPEND="=media-libs/avidemux-plugins-${PV}-r2[aften?,a52?,alsa?,amr?,dts?,fontconfig?,jack?,lame?,libsamplerate?,cpu_flags_x86_mmx?,oss?,nls?,sdl?,vorbis?,truetype?,xvid?,x264?,xv?]"
+
+S="${WORKDIR}/${MY_P}"
+
+PROCESSES="buildCli:avidemux/cli"
+
+use qt4 && PROCESSES+=" buildQt4:avidemux/qt4"
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ # Fix icon name -> avidemux-2.6.png
+ sed -i -e "/^Icon/ s:${PN}:${PN}-2.6:" ${PN}2.desktop || die "Icon name fix failed."
+
+ # The desktop file is broken. It uses avidemux2 instead of avidemux3
+ # so it will actually launch avidemux-2.5 if it is installed.
+ sed -i -e "/^Exec/ s:${PN}2:${PN}3:" ${PN}2.desktop || die "Desktop file fix failed."
+
+ # Now rename the desktop file to not collide with 2.5.
+ mv ${PN}2.desktop ${PN}-2.6.desktop || die "Collision rename failed."
+
+ # The desktop file is broken. It uses avidemux2 instead of avidemux3
+ # so it will actually launch avidemux-2.5 if it is installed.
+ sed -i -re '/^Exec/ s:(avidemux3_)gtk:\1qt4:' ${PN}-2.6.desktop || die "Desktop file fix failed."
+
+ # Fix QA warnings that complain a trailing ; is missing and Application is deprecated.
+ sed -i -e 's/Application;AudioVideo/AudioVideo;/g' ${PN}-2.6.desktop
+}
+
+src_configure() {
+ local x mycmakeargs
+
+ mycmakeargs="
+ $(for x in ${IUSE}; do cmake-utils_use ${x/#-/}; done)
+ $(cmake-utils_use amr OPENCORE_AMRWB)
+ $(cmake-utils_use amr OPENCORE_AMRNB)
+ $(cmake-utils_use dts LIBDCA)
+ $(cmake-utils_use nls GETTEXT)
+ $(cmake-utils_use truetype FREETYPE2)
+ $(cmake-utils_use xv XVIDEO)
+ "
+ use debug && POSTFIX="_debug" && mycmakeargs+="-DVERBOSE=1 -DCMAKE_BUILD_TYPE=Debug"
+
+ for PROCESS in ${PROCESSES} ; do
+ SOURCE="${PROCESS%%:*}"
+ DEST="${PROCESS#*:}"
+
+ mkdir "${S}"/${SOURCE} || die "Can't create build folder."
+ cd "${S}"/${SOURCE} || die "Can't enter build folder."
+
+ cmake -DAVIDEMUX_SOURCE_DIR="${S}" \
+ -DCMAKE_INSTALL_PREFIX="/usr" \
+ ${mycmakeargs} -G "Unix Makefiles" ../"${DEST}${POSTFIX}/" || die "cmake failed."
+ done
+}
+
+src_compile() {
+ # Add lax vector typing for PowerPC.
+ if use ppc || use ppc64 ; then
+ append-cflags -flax-vector-conversions
+ fi
+
+ # See bug 432322.
+ use x86 && replace-flags -O0 -O1
+
+ for PROCESS in ${PROCESSES} ; do
+ SOURCE="${PROCESS%%:*}"
+
+ cd "${S}/${SOURCE}" || die "Can't enter build folder."
+ emake CC="$(tc-getCC)" CXX="$(tc-getCXX)"
+ done
+}
+
+src_install() {
+ for PROCESS in ${PROCESSES} ; do
+ SOURCE="${PROCESS%%:*}"
+
+ cd "${S}/${SOURCE}" || die "Can't enter build folder."
+ emake DESTDIR="${ED}" install
+ done
+
+ cd "${S}" || die "Can't enter source folder."
+
+ if [[ -f "${ED}"/usr/bin/avidemux3_cli ]] ; then
+ fperms +x /usr/bin/avidemux3_cli
+ fi
+
+ if [[ -f "${ED}"/usr/bin/avidemux3_jobs ]] ; then
+ fperms +x /usr/bin/avidemux3_jobs
+ fi
+ use qt4 && fperms +x /usr/bin/avidemux3_qt4
+
+ newicon ${PN}_icon.png ${PN}-2.6.png
+ use qt4 && domenu ${PN}-2.6.desktop
+
+ dodoc AUTHORS README
+}
diff --git a/media-video/avidemux/avidemux-2.6.3.ebuild b/media-video/avidemux/avidemux-2.6.3.ebuild
new file mode 100644
index 000000000000..e3e59e0bdf30
--- /dev/null
+++ b/media-video/avidemux/avidemux-2.6.3.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PLOCALES="ca cs de el es fr it ja pt_BR ru sr sr@latin tr"
+inherit cmake-utils eutils flag-o-matic l10n toolchain-funcs
+
+SLOT="2.6"
+MY_P="${PN}_${PV}"
+
+DESCRIPTION="Video editor designed for simple cutting, filtering and encoding tasks"
+HOMEPAGE="http://fixounet.free.fr/${PN}"
+SRC_URI="mirror://sourceforge/${PN}/${PV}/${MY_P}.tar.gz"
+
+# Multiple licenses because of all the bundled stuff.
+LICENSE="GPL-1 GPL-2 MIT PSF-2 public-domain"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug opengl nls qt4 sdl vdpau xv"
+
+DEPEND="=media-libs/avidemux-core-${PV}[nls?,sdl?,vdpau?,xv?]
+ opengl? ( virtual/opengl )
+ qt4? ( >=dev-qt/qtgui-4.8.3:4 )"
+RDEPEND="$DEPEND"
+PDEPEND="=media-libs/avidemux-plugins-${PV}"
+
+S="${WORKDIR}/${MY_P}"
+
+PROCESSES="buildCli:avidemux/cli"
+
+use qt4 && PROCESSES+=" buildQt4:avidemux/qt4"
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ # Fix icon name -> avidemux-2.6.png
+ sed -i -e "/^Icon/ s:${PN}:${PN}-2.6:" ${PN}2.desktop || die "Icon name fix failed."
+
+ # The desktop file is broken. It uses avidemux2 instead of avidemux3
+ # so it will actually launch avidemux-2.5 if it is installed.
+ sed -i -e "/^Exec/ s:${PN}2:${PN}3:" ${PN}2.desktop || die "Desktop file fix failed."
+
+ # Now rename the desktop file to not collide with 2.5.
+ mv ${PN}2.desktop ${PN}-2.6.desktop || die "Collision rename failed."
+
+ # The desktop file is broken. It uses avidemux2 instead of avidemux3
+ # so it will actually launch avidemux-2.5 if it is installed.
+ sed -i -re '/^Exec/ s:(avidemux3_)gtk:\1qt4:' ${PN}-2.6.desktop || die "Desktop file fix failed."
+
+ # Fix QA warnings that complain a trailing ; is missing and Application is deprecated.
+ sed -i -e 's/Application;AudioVideo/AudioVideo;/g' ${PN}-2.6.desktop
+}
+
+src_configure() {
+ local x mycmakeargs
+
+ mycmakeargs="
+ $(cmake-utils_use nls GETTEXT)
+ $(cmake-utils_use sdl SDL)
+ $(cmake-utils_use vdpau VDPAU)
+ $(cmake-utils_use xv XVIDEO)
+ "
+ use debug && POSTFIX="_debug" && mycmakeargs+="-DVERBOSE=1 -DCMAKE_BUILD_TYPE=Debug"
+
+ for PROCESS in ${PROCESSES} ; do
+ SOURCE="${PROCESS%%:*}"
+ DEST="${PROCESS#*:}"
+
+ mkdir "${S}"/${SOURCE} || die "Can't create build folder."
+ cd "${S}"/${SOURCE} || die "Can't enter build folder."
+
+ cmake -DCMAKE_INSTALL_PREFIX="/usr" \
+ ${mycmakeargs} -G "Unix Makefiles" ../"${DEST}${POSTFIX}/" || die "cmake failed."
+ done
+}
+
+src_compile() {
+ # Add lax vector typing for PowerPC.
+ if use ppc || use ppc64 ; then
+ append-cflags -flax-vector-conversions
+ fi
+
+ # See bug 432322.
+ use x86 && replace-flags -O0 -O1
+
+ for PROCESS in ${PROCESSES} ; do
+ SOURCE="${PROCESS%%:*}"
+
+ cd "${S}/${SOURCE}" || die "Can't enter build folder."
+ emake CC="$(tc-getCC)" CXX="$(tc-getCXX)"
+ done
+}
+
+src_install() {
+ for PROCESS in ${PROCESSES} ; do
+ SOURCE="${PROCESS%%:*}"
+
+ cd "${S}/${SOURCE}" || die "Can't enter build folder."
+ emake DESTDIR="${ED}" install
+ done
+
+ cd "${S}" || die "Can't enter source folder."
+
+ if [[ -f "${ED}"/usr/bin/avidemux3_cli ]] ; then
+ fperms +x /usr/bin/avidemux3_cli
+ fi
+
+ if [[ -f "${ED}"/usr/bin/avidemux3_jobs ]] ; then
+ fperms +x /usr/bin/avidemux3_jobs
+ fi
+ use qt4 && fperms +x /usr/bin/avidemux3_qt4
+
+ newicon ${PN}_icon.png ${PN}-2.6.png
+ use qt4 && domenu ${PN}-2.6.desktop
+
+ dodoc AUTHORS README
+}
diff --git a/media-video/avidemux/avidemux-2.6.4.ebuild b/media-video/avidemux/avidemux-2.6.4.ebuild
new file mode 100644
index 000000000000..9390c328ffb6
--- /dev/null
+++ b/media-video/avidemux/avidemux-2.6.4.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PLOCALES="ca cs de el es fr it ja pt_BR ru sr sr@latin tr"
+inherit cmake-utils eutils flag-o-matic l10n toolchain-funcs
+
+SLOT="2.6"
+MY_P="${PN}_${PV}"
+
+DESCRIPTION="Video editor designed for simple cutting, filtering and encoding tasks"
+HOMEPAGE="http://fixounet.free.fr/${PN}"
+SRC_URI="mirror://sourceforge/${PN}/${PV}/${MY_P}.tar.gz"
+
+# Multiple licenses because of all the bundled stuff.
+LICENSE="GPL-1 GPL-2 MIT PSF-2 public-domain"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug opengl nls qt4 sdl vdpau xv"
+
+DEPEND="~media-libs/avidemux-core-${PV}[nls?,sdl?,vdpau?,xv?]
+ opengl? ( virtual/opengl )
+ qt4? ( >=dev-qt/qtgui-4.8.3:4 )"
+RDEPEND="$DEPEND"
+PDEPEND="~media-libs/avidemux-plugins-${PV}"
+
+S="${WORKDIR}/${MY_P}"
+
+processes="buildCli:avidemux/cli"
+
+use qt4 && processes+=" buildQt4:avidemux/qt4"
+
+src_prepare() {
+ default
+
+ # Fix icon name -> avidemux-2.6.png
+ sed -i -e "/^Icon/ s:${PN}:${PN}-2.6:" ${PN}2.desktop || die "Icon name fix failed."
+
+ # The desktop file is broken. It uses avidemux2 instead of avidemux3
+ # so it will actually launch avidemux-2.5 if it is installed.
+ sed -i -e "/^Exec/ s:${PN}2:${PN}3:" ${PN}2.desktop || die "Desktop file fix failed."
+
+ # Now rename the desktop file to not collide with 2.5.
+ mv ${PN}2.desktop ${PN}-2.6.desktop || die "Collision rename failed."
+
+ # The desktop file is broken. It uses avidemux2 instead of avidemux3
+ # so it will actually launch avidemux-2.5 if it is installed.
+ sed -i -re '/^Exec/ s:(avidemux3_)gtk:\1qt4:' ${PN}-2.6.desktop || die "Desktop file fix failed."
+
+ # Fix QA warnings that complain a trailing ; is missing and Application is deprecated.
+ sed -i -e 's/Application;AudioVideo/AudioVideo;/g' ${PN}-2.6.desktop
+}
+
+src_configure() {
+ local mycmakeargs="
+ -DAVIDEMUX_SOURCE_DIR='${S}'
+ -DCMAKE_INSTALL_PREFIX='/usr'
+ $(cmake-utils_use nls GETTEXT)
+ $(cmake-utils_use sdl SDL)
+ $(cmake-utils_use vdpau VDPAU)
+ $(cmake-utils_use xv XVIDEO)
+ "
+
+ if use debug ; then
+ mycmakeargs+=" -DVERBOSE=1 -DCMAKE_BUILD_TYPE=Debug"
+ fi
+
+ for process in ${processes} ; do
+ local build="${process%%:*}"
+
+ mkdir "${S}"/${build} || die "Can't create build folder."
+ cd "${S}"/${build} || die "Can't enter build folder."
+ CMAKE_USE_DIR="${S}"/${process#*:} BUILD_DIR="${S}"/${build} cmake-utils_src_configure
+ done
+}
+
+src_compile() {
+ # Add lax vector typing for PowerPC.
+ if use ppc || use ppc64 ; then
+ append-cflags -flax-vector-conversions
+ fi
+
+ # See bug 432322.
+ use x86 && replace-flags -O0 -O1
+
+ for process in ${processes} ; do
+ local source="${process%%:*}"
+
+ cd "${S}/${source}" || die "Can't enter build folder."
+ emake CC="$(tc-getCC)" CXX="$(tc-getCXX)"
+ done
+}
+
+src_install() {
+ for process in ${processes} ; do
+ local source="${process%%:*}"
+
+ cd "${S}/${source}" || die "Can't enter build folder."
+ emake DESTDIR="${ED}" install
+ done
+
+ cd "${S}" || die "Can't enter source folder."
+
+ if [[ -f "${ED}"/usr/bin/avidemux3_cli ]] ; then
+ fperms +x /usr/bin/avidemux3_cli
+ fi
+
+ if [[ -f "${ED}"/usr/bin/avidemux3_jobs ]] ; then
+ fperms +x /usr/bin/avidemux3_jobs
+ fi
+ use qt4 && fperms +x /usr/bin/avidemux3_qt4
+
+ newicon ${PN}_icon.png ${PN}-2.6.png
+ use qt4 && domenu ${PN}-2.6.desktop
+
+ dodoc AUTHORS README
+}
diff --git a/media-video/avidemux/avidemux-2.6.5-r1.ebuild b/media-video/avidemux/avidemux-2.6.5-r1.ebuild
new file mode 100644
index 000000000000..1e8da39bf44d
--- /dev/null
+++ b/media-video/avidemux/avidemux-2.6.5-r1.ebuild
@@ -0,0 +1,134 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PLOCALES="ca cs de el es fr it ja pt_BR ru sr sr@latin tr"
+
+inherit cmake-utils eutils flag-o-matic l10n
+
+SLOT="2.6"
+
+DESCRIPTION="Video editor designed for simple cutting, filtering and encoding tasks"
+HOMEPAGE="http://fixounet.free.fr/${PN}"
+
+# Multiple licenses because of all the bundled stuff.
+LICENSE="GPL-1 GPL-2 MIT PSF-2 public-domain"
+IUSE="debug opengl nls qt4 sdl vaapi vdpau video_cards_fglrx xv"
+KEYWORDS="~amd64 ~x86"
+
+if [[ ${PV} == *9999* ]] ; then
+ KEYWORDS=""
+ EGIT_REPO_URI="git://gitorious.org/${PN}2-6/${PN}2-6.git https://git.gitorious.org/${PN}2-6/${PN}2-6.git"
+
+ inherit git-2
+else
+ MY_P="${PN}_${PV}"
+ SRC_URI="mirror://sourceforge/${PN}/${PV}/${MY_P}.tar.gz"
+fi
+
+DEPEND="
+ ~media-libs/avidemux-core-${PV}:${SLOT}[nls?,sdl?,vaapi?,vdpau?,video_cards_fglrx?,xv?]
+ opengl? ( virtual/opengl:0 )
+ qt4? ( >=dev-qt/qtgui-4.8.3:4 )
+ vaapi? ( x11-libs/libva:0 )
+ video_cards_fglrx? (
+ || ( >=x11-drivers/ati-drivers-14.12-r3
+ x11-libs/xvba-video:0 )
+ )"
+RDEPEND="$DEPEND"
+PDEPEND="~media-libs/avidemux-plugins-${PV}:${SLOT}[opengl?,qt4?]"
+
+S="${WORKDIR}/${MY_P}"
+
+processes="buildCli:avidemux/cli"
+use qt4 && processes+=" buildQt4:avidemux/qt4"
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ # Fix icon name -> avidemux-2.6.png
+ sed -i -e "/^Icon/ s:${PN}:${PN}-2.6:" ${PN}2.desktop || die "Icon name fix failed."
+
+ # The desktop file is broken. It uses avidemux2 instead of avidemux3
+ # so it will actually launch avidemux-2.5 if it is installed.
+ sed -i -e "/^Exec/ s:${PN}2:${PN}3:" ${PN}2.desktop || die "Desktop file fix failed."
+ sed -i -re '/^Exec/ s:(avidemux3_)gtk:\1qt4:' ${PN}2.desktop || die "Desktop file fix failed."
+
+ # Fix QA warnings that complain a trailing ; is missing and Application is deprecated.
+ sed -i -e 's/Application;AudioVideo/AudioVideo;/g' ${PN}2.desktop || die "Desktop file fix failed."
+
+ # Now rename the desktop file to not collide with 2.5.
+ mv ${PN}2.desktop ${PN}-2.6.desktop || die "Collision rename failed."
+
+ # Remove "Build Option" dialog because it doesn't reflect what the GUI can or has been built with. (Bug #463628)
+ sed -i -e '/Build Option/d' avidemux/common/ADM_commonUI/myOwnMenu.h || die "Couldn't remove \"Build Option\" dialog."
+}
+
+src_configure() {
+ local mycmakeargs="
+ -DAVIDEMUX_SOURCE_DIR='${S}'
+ $(cmake-utils_use nls GETTEXT)
+ $(cmake-utils_use sdl)
+ $(cmake-utils_use vaapi LIBVA)
+ $(cmake-utils_use vdpau)
+ $(cmake-utils_use video_cards_fglrx XVBA)
+ $(cmake-utils_use xv XVIDEO)
+ "
+
+ if use debug ; then
+ mycmakeargs+=" -DVERBOSE=1 -DCMAKE_BUILD_TYPE=Debug -DADM_DEBUG=1"
+ fi
+
+ for process in ${processes} ; do
+ local build="${process%%:*}"
+
+ mkdir "${S}"/${build} || die "Can't create build folder."
+ cd "${S}"/${build} || die "Can't enter build folder."
+ CMAKE_USE_DIR="${S}"/${process#*:} BUILD_DIR="${S}"/${build} cmake-utils_src_configure
+ done
+
+ # Add lax vector typing for PowerPC.
+ if use ppc || use ppc64 ; then
+ append-cflags -flax-vector-conversions
+ fi
+
+ # See bug 432322.
+ use x86 && replace-flags -O0 -O1
+}
+
+src_compile() {
+ for process in ${processes} ; do
+ BUILD_DIR="${S}/${process%%:*}" cmake-utils_src_compile
+ done
+}
+
+DOCS=( AUTHORS README )
+
+src_install() {
+ for process in ${processes} ; do
+ # cmake-utils_src_install doesn't respect BUILD_DIR
+ # and there sometimes is a preinstall phase present.
+ pushd "${S}/${process%%:*}" > /dev/null || die
+ grep '^preinstall/fast' Makefile && emake DESTDIR="${D}" preinstall/fast
+ grep '^install/fast' Makefile && emake DESTDIR="${D}" install/fast
+ popd > /dev/null || die
+ done
+
+ if [[ -f "${ED}"/usr/bin/avidemux3_cli ]] ; then
+ fperms +x /usr/bin/avidemux3_cli
+ fi
+
+ if [[ -f "${ED}"/usr/bin/avidemux3_jobs ]] ; then
+ fperms +x /usr/bin/avidemux3_jobs
+ fi
+
+ cd "${S}" || die "Can't enter source folder."
+ newicon ${PN}_icon.png ${PN}-2.6.png
+
+ if use qt4 ; then
+ fperms +x /usr/bin/avidemux3_qt4
+ domenu ${PN}-2.6.desktop
+ fi
+}
diff --git a/media-video/avidemux/avidemux-2.6.5.ebuild b/media-video/avidemux/avidemux-2.6.5.ebuild
new file mode 100644
index 000000000000..fa60e2250e62
--- /dev/null
+++ b/media-video/avidemux/avidemux-2.6.5.ebuild
@@ -0,0 +1,129 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PLOCALES="ca cs de el es fr it ja pt_BR ru sr sr@latin tr"
+
+inherit cmake-utils eutils flag-o-matic l10n
+
+SLOT="2.6"
+
+DESCRIPTION="Video editor designed for simple cutting, filtering and encoding tasks"
+HOMEPAGE="http://fixounet.free.fr/${PN}"
+
+# Multiple licenses because of all the bundled stuff.
+LICENSE="GPL-1 GPL-2 MIT PSF-2 public-domain"
+IUSE="debug opengl nls qt4 sdl vaapi vdpau video_cards_fglrx xv"
+KEYWORDS="~amd64 ~x86"
+
+if [[ ${PV} == *9999* ]] ; then
+ KEYWORDS=""
+ EGIT_REPO_URI="git://gitorious.org/${PN}2-6/${PN}2-6.git https://git.gitorious.org/${PN}2-6/${PN}2-6.git"
+
+ inherit git-2
+else
+ MY_P="${PN}_${PV}"
+ SRC_URI="mirror://sourceforge/${PN}/${PV}/${MY_P}.tar.gz"
+fi
+
+DEPEND="
+ ~media-libs/avidemux-core-${PV}:${SLOT}[nls?,sdl?,vaapi?,vdpau?,video_cards_fglrx?,xv?]
+ opengl? ( virtual/opengl:0 )
+ qt4? ( >=dev-qt/qtgui-4.8.3:4 )
+ vaapi? ( x11-libs/libva:0 )
+ video_cards_fglrx? (
+ || ( >=x11-drivers/ati-drivers-14.12-r3
+ x11-libs/xvba-video:0 )
+ )"
+RDEPEND="$DEPEND"
+PDEPEND="~media-libs/avidemux-plugins-${PV}:${SLOT}[opengl?,qt4?]"
+
+S="${WORKDIR}/${MY_P}"
+
+processes="buildCli:avidemux/cli"
+use qt4 && processes+=" buildQt4:avidemux/qt4"
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ # Fix icon name -> avidemux-2.6.png
+ sed -i -e "/^Icon/ s:${PN}:${PN}-2.6:" ${PN}2.desktop || die "Icon name fix failed."
+
+ # The desktop file is broken. It uses avidemux2 instead of avidemux3
+ # so it will actually launch avidemux-2.5 if it is installed.
+ sed -i -e "/^Exec/ s:${PN}2:${PN}3:" ${PN}2.desktop || die "Desktop file fix failed."
+ sed -i -re '/^Exec/ s:(avidemux3_)gtk:\1qt4:' ${PN}2.desktop || die "Desktop file fix failed."
+
+ # Fix QA warnings that complain a trailing ; is missing and Application is deprecated.
+ sed -i -e 's/Application;AudioVideo/AudioVideo;/g' ${PN}2.desktop || die "Desktop file fix failed."
+
+ # Now rename the desktop file to not collide with 2.5.
+ mv ${PN}2.desktop ${PN}-2.6.desktop || die "Collision rename failed."
+
+ # Remove "Build Option" dialog because it doesn't reflect what the GUI can or has been built with. (Bug #463628)
+ sed -i -e '/Build Option/d' avidemux/common/ADM_commonUI/myOwnMenu.h || die "Couldn't remove \"Build Option\" dialog."
+}
+
+src_configure() {
+ local mycmakeargs="
+ -DAVIDEMUX_SOURCE_DIR='${S}'
+ $(cmake-utils_use nls GETTEXT)
+ $(cmake-utils_use sdl)
+ $(cmake-utils_use vaapi LIBVA)
+ $(cmake-utils_use vdpau)
+ $(cmake-utils_use video_cards_fglrx XVBA)
+ $(cmake-utils_use xv XVIDEO)
+ "
+
+ if use debug ; then
+ mycmakeargs+=" -DVERBOSE=1 -DCMAKE_BUILD_TYPE=Debug -DADM_DEBUG=1"
+ fi
+
+ for process in ${processes} ; do
+ local build="${process%%:*}"
+
+ mkdir "${S}"/${build} || die "Can't create build folder."
+ cd "${S}"/${build} || die "Can't enter build folder."
+ CMAKE_USE_DIR="${S}"/${process#*:} BUILD_DIR="${S}"/${build} cmake-utils_src_configure
+ done
+
+ # Add lax vector typing for PowerPC.
+ if use ppc || use ppc64 ; then
+ append-cflags -flax-vector-conversions
+ fi
+
+ # See bug 432322.
+ use x86 && replace-flags -O0 -O1
+}
+
+src_compile() {
+ for process in ${processes} ; do
+ BUILD_DIR="${S}/${process%%:*}" cmake-utils_src_compile
+ done
+}
+
+DOCS=( AUTHORS README )
+
+src_install() {
+ for process in ${processes} ; do
+ BUILD_DIR="${S}/${process%%:*}" cmake-utils_src_install
+ done
+
+ if [[ -f "${ED}"/usr/bin/avidemux3_cli ]] ; then
+ fperms +x /usr/bin/avidemux3_cli
+ fi
+
+ if [[ -f "${ED}"/usr/bin/avidemux3_jobs ]] ; then
+ fperms +x /usr/bin/avidemux3_jobs
+ fi
+
+ cd "${S}" || die "Can't enter source folder."
+ newicon ${PN}_icon.png ${PN}-2.6.png
+
+ if use qt4 ; then
+ fperms +x /usr/bin/avidemux3_qt4
+ domenu ${PN}-2.6.desktop
+ fi
+}
diff --git a/media-video/avidemux/avidemux-2.6.7.ebuild b/media-video/avidemux/avidemux-2.6.7.ebuild
new file mode 100644
index 000000000000..c978ae6479c1
--- /dev/null
+++ b/media-video/avidemux/avidemux-2.6.7.ebuild
@@ -0,0 +1,129 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PLOCALES="ca cs de el es fr it ja pt_BR ru sr sr@latin tr"
+
+inherit cmake-utils eutils flag-o-matic l10n
+
+SLOT="2.6"
+
+DESCRIPTION="Video editor designed for simple cutting, filtering and encoding tasks"
+HOMEPAGE="http://fixounet.free.fr/${PN}"
+
+# Multiple licenses because of all the bundled stuff.
+LICENSE="GPL-1 GPL-2 MIT PSF-2 public-domain"
+IUSE="debug opengl nls qt4 sdl vaapi vdpau video_cards_fglrx xv"
+KEYWORDS="~amd64 ~x86"
+
+if [[ ${PV} == *9999* ]] ; then
+ KEYWORDS=""
+ EGIT_REPO_URI="git://gitorious.org/${PN}2-6/${PN}2-6.git https://git.gitorious.org/${PN}2-6/${PN}2-6.git"
+
+ inherit git-2
+else
+ MY_P="${PN}_${PV}"
+ SRC_URI="mirror://sourceforge/${PN}/${PN}/${PV}/${MY_P}.tar.gz"
+fi
+
+DEPEND="
+ ~media-libs/avidemux-core-${PV}:${SLOT}[nls?,sdl?,vaapi?,vdpau?,video_cards_fglrx?,xv?]
+ opengl? ( virtual/opengl:0 )
+ qt4? ( >=dev-qt/qtgui-4.8.3:4 )
+ vaapi? ( x11-libs/libva:0 )
+ video_cards_fglrx? (
+ || ( >=x11-drivers/ati-drivers-14.12-r3
+ x11-libs/xvba-video:0 )
+ )"
+RDEPEND="$DEPEND"
+PDEPEND="~media-libs/avidemux-plugins-${PV}:${SLOT}[opengl?,qt4?]"
+
+S="${WORKDIR}/${MY_P}"
+
+processes="buildCli:avidemux/cli"
+use qt4 && processes+=" buildQt4:avidemux/qt4"
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ # Fix icon name -> avidemux-2.6.png
+ sed -i -e "/^Icon/ s:${PN}:${PN}-2.6:" ${PN}2.desktop || die "Icon name fix failed."
+
+ # The desktop file is broken. It uses avidemux2 instead of avidemux3
+ # so it will actually launch avidemux-2.5 if it is installed.
+ sed -i -e "/^Exec/ s:${PN}2:${PN}3:" ${PN}2.desktop || die "Desktop file fix failed."
+ sed -i -re '/^Exec/ s:(avidemux3_)gtk:\1qt4:' ${PN}2.desktop || die "Desktop file fix failed."
+
+ # Fix QA warnings that complain a trailing ; is missing and Application is deprecated.
+ sed -i -e 's/Application;AudioVideo/AudioVideo;/g' ${PN}2.desktop || die "Desktop file fix failed."
+
+ # Now rename the desktop file to not collide with 2.5.
+ mv ${PN}2.desktop ${PN}-2.6.desktop || die "Collision rename failed."
+
+ # Remove "Build Option" dialog because it doesn't reflect what the GUI can or has been built with. (Bug #463628)
+ sed -i -e '/Build Option/d' avidemux/common/ADM_commonUI/myOwnMenu.h || die "Couldn't remove \"Build Option\" dialog."
+}
+
+src_configure() {
+ local mycmakeargs="
+ -DAVIDEMUX_SOURCE_DIR='${S}'
+ $(cmake-utils_use nls GETTEXT)
+ $(cmake-utils_use sdl)
+ $(cmake-utils_use vaapi LIBVA)
+ $(cmake-utils_use vdpau)
+ $(cmake-utils_use video_cards_fglrx XVBA)
+ $(cmake-utils_use xv XVIDEO)
+ "
+
+ if use debug ; then
+ mycmakeargs+=" -DVERBOSE=1 -DCMAKE_BUILD_TYPE=Debug -DADM_DEBUG=1"
+ fi
+
+ for process in ${processes} ; do
+ local build="${process%%:*}"
+
+ mkdir "${S}"/${build} || die "Can't create build folder."
+ cd "${S}"/${build} || die "Can't enter build folder."
+ CMAKE_USE_DIR="${S}"/${process#*:} BUILD_DIR="${S}"/${build} cmake-utils_src_configure
+ done
+
+ # Add lax vector typing for PowerPC.
+ if use ppc || use ppc64 ; then
+ append-cflags -flax-vector-conversions
+ fi
+
+ # See bug 432322.
+ use x86 && replace-flags -O0 -O1
+}
+
+src_compile() {
+ for process in ${processes} ; do
+ BUILD_DIR="${S}/${process%%:*}" cmake-utils_src_compile
+ done
+}
+
+DOCS=( AUTHORS README )
+
+src_install() {
+ for process in ${processes} ; do
+ BUILD_DIR="${S}/${process%%:*}" cmake-utils_src_install
+ done
+
+ if [[ -f "${ED}"/usr/bin/avidemux3_cli ]] ; then
+ fperms +x /usr/bin/avidemux3_cli
+ fi
+
+ if [[ -f "${ED}"/usr/bin/avidemux3_jobs ]] ; then
+ fperms +x /usr/bin/avidemux3_jobs
+ fi
+
+ cd "${S}" || die "Can't enter source folder."
+ newicon ${PN}_icon.png ${PN}-2.6.png
+
+ if use qt4 ; then
+ fperms +x /usr/bin/avidemux3_qt4
+ domenu ${PN}-2.6.desktop
+ fi
+}
diff --git a/media-video/avidemux/avidemux-2.6.8.ebuild b/media-video/avidemux/avidemux-2.6.8.ebuild
new file mode 100644
index 000000000000..c978ae6479c1
--- /dev/null
+++ b/media-video/avidemux/avidemux-2.6.8.ebuild
@@ -0,0 +1,129 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PLOCALES="ca cs de el es fr it ja pt_BR ru sr sr@latin tr"
+
+inherit cmake-utils eutils flag-o-matic l10n
+
+SLOT="2.6"
+
+DESCRIPTION="Video editor designed for simple cutting, filtering and encoding tasks"
+HOMEPAGE="http://fixounet.free.fr/${PN}"
+
+# Multiple licenses because of all the bundled stuff.
+LICENSE="GPL-1 GPL-2 MIT PSF-2 public-domain"
+IUSE="debug opengl nls qt4 sdl vaapi vdpau video_cards_fglrx xv"
+KEYWORDS="~amd64 ~x86"
+
+if [[ ${PV} == *9999* ]] ; then
+ KEYWORDS=""
+ EGIT_REPO_URI="git://gitorious.org/${PN}2-6/${PN}2-6.git https://git.gitorious.org/${PN}2-6/${PN}2-6.git"
+
+ inherit git-2
+else
+ MY_P="${PN}_${PV}"
+ SRC_URI="mirror://sourceforge/${PN}/${PN}/${PV}/${MY_P}.tar.gz"
+fi
+
+DEPEND="
+ ~media-libs/avidemux-core-${PV}:${SLOT}[nls?,sdl?,vaapi?,vdpau?,video_cards_fglrx?,xv?]
+ opengl? ( virtual/opengl:0 )
+ qt4? ( >=dev-qt/qtgui-4.8.3:4 )
+ vaapi? ( x11-libs/libva:0 )
+ video_cards_fglrx? (
+ || ( >=x11-drivers/ati-drivers-14.12-r3
+ x11-libs/xvba-video:0 )
+ )"
+RDEPEND="$DEPEND"
+PDEPEND="~media-libs/avidemux-plugins-${PV}:${SLOT}[opengl?,qt4?]"
+
+S="${WORKDIR}/${MY_P}"
+
+processes="buildCli:avidemux/cli"
+use qt4 && processes+=" buildQt4:avidemux/qt4"
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ # Fix icon name -> avidemux-2.6.png
+ sed -i -e "/^Icon/ s:${PN}:${PN}-2.6:" ${PN}2.desktop || die "Icon name fix failed."
+
+ # The desktop file is broken. It uses avidemux2 instead of avidemux3
+ # so it will actually launch avidemux-2.5 if it is installed.
+ sed -i -e "/^Exec/ s:${PN}2:${PN}3:" ${PN}2.desktop || die "Desktop file fix failed."
+ sed -i -re '/^Exec/ s:(avidemux3_)gtk:\1qt4:' ${PN}2.desktop || die "Desktop file fix failed."
+
+ # Fix QA warnings that complain a trailing ; is missing and Application is deprecated.
+ sed -i -e 's/Application;AudioVideo/AudioVideo;/g' ${PN}2.desktop || die "Desktop file fix failed."
+
+ # Now rename the desktop file to not collide with 2.5.
+ mv ${PN}2.desktop ${PN}-2.6.desktop || die "Collision rename failed."
+
+ # Remove "Build Option" dialog because it doesn't reflect what the GUI can or has been built with. (Bug #463628)
+ sed -i -e '/Build Option/d' avidemux/common/ADM_commonUI/myOwnMenu.h || die "Couldn't remove \"Build Option\" dialog."
+}
+
+src_configure() {
+ local mycmakeargs="
+ -DAVIDEMUX_SOURCE_DIR='${S}'
+ $(cmake-utils_use nls GETTEXT)
+ $(cmake-utils_use sdl)
+ $(cmake-utils_use vaapi LIBVA)
+ $(cmake-utils_use vdpau)
+ $(cmake-utils_use video_cards_fglrx XVBA)
+ $(cmake-utils_use xv XVIDEO)
+ "
+
+ if use debug ; then
+ mycmakeargs+=" -DVERBOSE=1 -DCMAKE_BUILD_TYPE=Debug -DADM_DEBUG=1"
+ fi
+
+ for process in ${processes} ; do
+ local build="${process%%:*}"
+
+ mkdir "${S}"/${build} || die "Can't create build folder."
+ cd "${S}"/${build} || die "Can't enter build folder."
+ CMAKE_USE_DIR="${S}"/${process#*:} BUILD_DIR="${S}"/${build} cmake-utils_src_configure
+ done
+
+ # Add lax vector typing for PowerPC.
+ if use ppc || use ppc64 ; then
+ append-cflags -flax-vector-conversions
+ fi
+
+ # See bug 432322.
+ use x86 && replace-flags -O0 -O1
+}
+
+src_compile() {
+ for process in ${processes} ; do
+ BUILD_DIR="${S}/${process%%:*}" cmake-utils_src_compile
+ done
+}
+
+DOCS=( AUTHORS README )
+
+src_install() {
+ for process in ${processes} ; do
+ BUILD_DIR="${S}/${process%%:*}" cmake-utils_src_install
+ done
+
+ if [[ -f "${ED}"/usr/bin/avidemux3_cli ]] ; then
+ fperms +x /usr/bin/avidemux3_cli
+ fi
+
+ if [[ -f "${ED}"/usr/bin/avidemux3_jobs ]] ; then
+ fperms +x /usr/bin/avidemux3_jobs
+ fi
+
+ cd "${S}" || die "Can't enter source folder."
+ newicon ${PN}_icon.png ${PN}-2.6.png
+
+ if use qt4 ; then
+ fperms +x /usr/bin/avidemux3_qt4
+ domenu ${PN}-2.6.desktop
+ fi
+}
diff --git a/media-video/avidemux/avidemux-9999.ebuild b/media-video/avidemux/avidemux-9999.ebuild
new file mode 100644
index 000000000000..c978ae6479c1
--- /dev/null
+++ b/media-video/avidemux/avidemux-9999.ebuild
@@ -0,0 +1,129 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PLOCALES="ca cs de el es fr it ja pt_BR ru sr sr@latin tr"
+
+inherit cmake-utils eutils flag-o-matic l10n
+
+SLOT="2.6"
+
+DESCRIPTION="Video editor designed for simple cutting, filtering and encoding tasks"
+HOMEPAGE="http://fixounet.free.fr/${PN}"
+
+# Multiple licenses because of all the bundled stuff.
+LICENSE="GPL-1 GPL-2 MIT PSF-2 public-domain"
+IUSE="debug opengl nls qt4 sdl vaapi vdpau video_cards_fglrx xv"
+KEYWORDS="~amd64 ~x86"
+
+if [[ ${PV} == *9999* ]] ; then
+ KEYWORDS=""
+ EGIT_REPO_URI="git://gitorious.org/${PN}2-6/${PN}2-6.git https://git.gitorious.org/${PN}2-6/${PN}2-6.git"
+
+ inherit git-2
+else
+ MY_P="${PN}_${PV}"
+ SRC_URI="mirror://sourceforge/${PN}/${PN}/${PV}/${MY_P}.tar.gz"
+fi
+
+DEPEND="
+ ~media-libs/avidemux-core-${PV}:${SLOT}[nls?,sdl?,vaapi?,vdpau?,video_cards_fglrx?,xv?]
+ opengl? ( virtual/opengl:0 )
+ qt4? ( >=dev-qt/qtgui-4.8.3:4 )
+ vaapi? ( x11-libs/libva:0 )
+ video_cards_fglrx? (
+ || ( >=x11-drivers/ati-drivers-14.12-r3
+ x11-libs/xvba-video:0 )
+ )"
+RDEPEND="$DEPEND"
+PDEPEND="~media-libs/avidemux-plugins-${PV}:${SLOT}[opengl?,qt4?]"
+
+S="${WORKDIR}/${MY_P}"
+
+processes="buildCli:avidemux/cli"
+use qt4 && processes+=" buildQt4:avidemux/qt4"
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ # Fix icon name -> avidemux-2.6.png
+ sed -i -e "/^Icon/ s:${PN}:${PN}-2.6:" ${PN}2.desktop || die "Icon name fix failed."
+
+ # The desktop file is broken. It uses avidemux2 instead of avidemux3
+ # so it will actually launch avidemux-2.5 if it is installed.
+ sed -i -e "/^Exec/ s:${PN}2:${PN}3:" ${PN}2.desktop || die "Desktop file fix failed."
+ sed -i -re '/^Exec/ s:(avidemux3_)gtk:\1qt4:' ${PN}2.desktop || die "Desktop file fix failed."
+
+ # Fix QA warnings that complain a trailing ; is missing and Application is deprecated.
+ sed -i -e 's/Application;AudioVideo/AudioVideo;/g' ${PN}2.desktop || die "Desktop file fix failed."
+
+ # Now rename the desktop file to not collide with 2.5.
+ mv ${PN}2.desktop ${PN}-2.6.desktop || die "Collision rename failed."
+
+ # Remove "Build Option" dialog because it doesn't reflect what the GUI can or has been built with. (Bug #463628)
+ sed -i -e '/Build Option/d' avidemux/common/ADM_commonUI/myOwnMenu.h || die "Couldn't remove \"Build Option\" dialog."
+}
+
+src_configure() {
+ local mycmakeargs="
+ -DAVIDEMUX_SOURCE_DIR='${S}'
+ $(cmake-utils_use nls GETTEXT)
+ $(cmake-utils_use sdl)
+ $(cmake-utils_use vaapi LIBVA)
+ $(cmake-utils_use vdpau)
+ $(cmake-utils_use video_cards_fglrx XVBA)
+ $(cmake-utils_use xv XVIDEO)
+ "
+
+ if use debug ; then
+ mycmakeargs+=" -DVERBOSE=1 -DCMAKE_BUILD_TYPE=Debug -DADM_DEBUG=1"
+ fi
+
+ for process in ${processes} ; do
+ local build="${process%%:*}"
+
+ mkdir "${S}"/${build} || die "Can't create build folder."
+ cd "${S}"/${build} || die "Can't enter build folder."
+ CMAKE_USE_DIR="${S}"/${process#*:} BUILD_DIR="${S}"/${build} cmake-utils_src_configure
+ done
+
+ # Add lax vector typing for PowerPC.
+ if use ppc || use ppc64 ; then
+ append-cflags -flax-vector-conversions
+ fi
+
+ # See bug 432322.
+ use x86 && replace-flags -O0 -O1
+}
+
+src_compile() {
+ for process in ${processes} ; do
+ BUILD_DIR="${S}/${process%%:*}" cmake-utils_src_compile
+ done
+}
+
+DOCS=( AUTHORS README )
+
+src_install() {
+ for process in ${processes} ; do
+ BUILD_DIR="${S}/${process%%:*}" cmake-utils_src_install
+ done
+
+ if [[ -f "${ED}"/usr/bin/avidemux3_cli ]] ; then
+ fperms +x /usr/bin/avidemux3_cli
+ fi
+
+ if [[ -f "${ED}"/usr/bin/avidemux3_jobs ]] ; then
+ fperms +x /usr/bin/avidemux3_jobs
+ fi
+
+ cd "${S}" || die "Can't enter source folder."
+ newicon ${PN}_icon.png ${PN}-2.6.png
+
+ if use qt4 ; then
+ fperms +x /usr/bin/avidemux3_qt4
+ domenu ${PN}-2.6.desktop
+ fi
+}
diff --git a/media-video/avidemux/files/avidemux-2.5.4-build-plugins-fix.patch b/media-video/avidemux/files/avidemux-2.5.4-build-plugins-fix.patch
new file mode 100644
index 000000000000..66b44ad6986d
--- /dev/null
+++ b/media-video/avidemux/files/avidemux-2.5.4-build-plugins-fix.patch
@@ -0,0 +1,13 @@
+Index: avidemux_2.5.4/CMakeLists.txt
+===================================================================
+--- avidemux_2.5.4.orig/CMakeLists.txt
++++ avidemux_2.5.4/CMakeLists.txt
+@@ -205,7 +205,7 @@ ADD_SUBDIRECTORY(avidemux)
+ ADD_SUBDIRECTORY(po)
+ ADD_SUBDIRECTORY(scripts)
+ # MEANX : DOES NOT WORK ADD_SUBDIRECTORY(plugins EXCLUDE_FROM_ALL)
+-
++ADD_SUBDIRECTORY(plugins EXCLUDE_FROM_ALL)
+ ########################################
+ # Config Summary
+ ########################################
diff --git a/media-video/avidemux/files/avidemux-2.5.6-ffmpeg-symbol-visibility.patch b/media-video/avidemux/files/avidemux-2.5.6-ffmpeg-symbol-visibility.patch
new file mode 100644
index 000000000000..3251209800a0
--- /dev/null
+++ b/media-video/avidemux/files/avidemux-2.5.6-ffmpeg-symbol-visibility.patch
@@ -0,0 +1,20 @@
+--- branches/avidemux_2.5_branch_gruntster/cmake/patches/libavcodec_libavcodec.v.patch 2011/12/15 11:09:11 7699
++++ branches/avidemux_2.5_branch_gruntster/cmake/patches/libavcodec_libavcodec.v.patch 2012/03/15 07:19:34 7750
+@@ -1,11 +1,12 @@
+---- ../ffmpeg-0.9/libavcodec/libavcodec.v 2011-12-14 15:00:29 +0000
+-+++ libavcodec/libavcodec.v 2011-12-14 15:00:28 +0000
+-@@ -25,5 +25,8 @@
++--- libavcodec/libavcodec.v.old 2012-03-04 08:36:22.038330656 +0100
+++++ libavcodec/libavcodec.v 2012-03-04 08:36:44.128330633 +0100
++@@ -25,5 +25,9 @@
+ ff_mmxext_idct;
+ ff_idct_xvid*;
+ ff_jpeg_fdct*;
+ + ff_h264_info;
+-+ ff_golomb_vlc_len;
+-+ ff_ue_golomb_vlc_code;
+++ ff_golomb_vlc_len;
+++ ff_ue_golomb_vlc_code;
+++ ff_se_golomb_vlc_code;
+ local: *;
+ };
diff --git a/media-video/avidemux/metadata.xml b/media-video/avidemux/metadata.xml
new file mode 100644
index 000000000000..3f82cb4412c7
--- /dev/null
+++ b/media-video/avidemux/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>video</herd>
+ <use>
+ <flag name="aften">Enable A/52 (AC-3) audio encoder support.</flag>
+ <flag name="amr">Enable Adaptive Multi-Rate format support via <pkg>media-libs/opencore-amr</pkg>.</flag>
+ <flag name="vpx">Enable VP8 codec support via <pkg>media-libs/libvpx</pkg>.</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">avidemux</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/avinfo/Manifest b/media-video/avinfo/Manifest
new file mode 100644
index 000000000000..6bc8dbef9f36
--- /dev/null
+++ b/media-video/avinfo/Manifest
@@ -0,0 +1,3 @@
+DIST avinfo-1.0.a15unix-patch1.tar.gz 5665 RMD160 df4ce2cb51a9c57845345bf5602db17dc3831c23 SHA1 9d2033388f07e703aa07db0c4e057d5a6e06ea23 SHA256 b239c7a414dc92e4a6d3881801e981e71f66242d0e38ffae774a3a0f8c8bdf81
+DIST avinfo-1.0.a15unix.tar.gz 105743 RMD160 8a8082b90b05a1371087aa5ac74197fc6332e5c9 SHA1 2744b9112c3f6ed0a3ec5b32e0db67fb403943c8 SHA256 3e3404a76e6057c1703e0c49b63910a8ffcb5ea15ae7b2d0a7d2ede4b4c19887
+DIST avinfo-1.0a15.zip 140885 RMD160 9358cd885b904df4e15587ac77aa85f92f5739c9 SHA1 a93baef29b222aded6c88339bb2ea3fb29d27fd6 SHA256 f0c5e165091c170fd45f3a398b0ae59522da8a885ea96291cd134365194ef8df
diff --git a/media-video/avinfo/avinfo-1.0_alpha15.ebuild b/media-video/avinfo/avinfo-1.0_alpha15.ebuild
new file mode 100644
index 000000000000..5fcfb99306d5
--- /dev/null
+++ b/media-video/avinfo/avinfo-1.0_alpha15.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+MY_P="${PN}-1.0a15"
+DESCRIPTION="Utility for displaying AVI information"
+HOMEPAGE="http://shounen.ru/soft/avinfo/english.shtml"
+SRC_URI="http://shounen.ru/soft/avinfo/${MY_P}.zip"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="amd64 ppc x86"
+
+IUSE=""
+DEPEND="app-arch/unzip"
+
+S=${WORKDIR}
+
+src_compile() {
+ cd src
+ emake CFLAGS="${CFLAGS}" OUTPUTNAME=avinfo || die
+}
+
+src_install() {
+ dobin src/avinfo
+ dodoc CHANGELOG README
+ dodoc doc/*
+}
diff --git a/media-video/avinfo/avinfo-1.0_alpha15_p1.ebuild b/media-video/avinfo/avinfo-1.0_alpha15_p1.ebuild
new file mode 100644
index 000000000000..40a44c7d8770
--- /dev/null
+++ b/media-video/avinfo/avinfo-1.0_alpha15_p1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils toolchain-funcs
+
+MY_P=${PN}-1.0.a15unix
+
+DESCRIPTION="Utility for displaying AVI information"
+HOMEPAGE="http://shounen.ru/soft/avinfo/english.shtml"
+SRC_URI="http://shounen.ru/soft/${PN}/${MY_P}.tar.gz
+ http://shounen.ru/soft/${PN}/${MY_P}-patch1.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+S="${WORKDIR}"/${PN}-1.0.a15
+
+src_prepare() {
+ epatch "${WORKDIR}"/${MY_P}-patch1/${MY_P}-patch1.diff
+ sed -i -e 's/$(CC) $(OBJ)/$(CC) $(LDFLAGS) $(OBJ)/' src/Makefile || die
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
+}
+
+src_install() {
+ dobin src/avinfo
+ doman src/avinfo.1
+ dodoc CHANGELOG README "${WORKDIR}"/${MY_P}-patch1/FIXES
+ dodoc doc/*
+}
diff --git a/media-video/avinfo/metadata.xml b/media-video/avinfo/metadata.xml
new file mode 100644
index 000000000000..edccfe5754d2
--- /dev/null
+++ b/media-video/avinfo/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>video</herd>
+<maintainer>
+<email>media-video@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/media-video/baka-mplayer/Manifest b/media-video/baka-mplayer/Manifest
new file mode 100644
index 000000000000..0cd28638cf68
--- /dev/null
+++ b/media-video/baka-mplayer/Manifest
@@ -0,0 +1,2 @@
+DIST baka-mplayer-2.0.2.tar.gz 462702 SHA256 01f1cf3b369940deec5ee1ecfa1b39cac2ff7aaa17d2456976808ceea6d60a31 SHA512 3a134b60eca00ebe53223d6d2a12b7fa09902615d0a71522f2bb2bc6d818539ab93a46744de9fc554a4ee8b0918378cf28cd1f096136dffef37547d2fae67259 WHIRLPOOL dd65cd801f030895bcdc6c25301fa7813b6fb920c47af49e34d789140e16eb9dfc276d12ff6d7f27edcd2fb417fe7c638bff696317458eda084d1e01929903b1
+DIST baka-mplayer-2.0.3.tar.gz 568077 SHA256 d325d5b50d96952c1d216ffe3050bd6a009fc076fd37a4fe2d3f370658cdb5b9 SHA512 af2e79a318c8a119ef20c8721e42fa3a6c4900b5baf50613ba9de7c64cdaabbb08f0a31fc589460b544a8b67d662088cac2cdf3cc808ae128948a84882df13ab WHIRLPOOL d3f438768238787c2cf03b640641168b17e66dd570158b29076faffee25f0b0bfbe3667b6c270420bb8aef7c6325a8ba388ead67142e68f9163c9272919a439b
diff --git a/media-video/baka-mplayer/baka-mplayer-2.0.2.ebuild b/media-video/baka-mplayer/baka-mplayer-2.0.2.ebuild
new file mode 100644
index 000000000000..fbc8e1b7a56a
--- /dev/null
+++ b/media-video/baka-mplayer/baka-mplayer-2.0.2.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit qmake-utils
+
+DESCRIPTION="Cross-platform libmpv-based multimedia player with uncluttered design"
+HOMEPAGE="http://bakamplayer.u8sand.net/"
+SRC_URI="http://dev.gentoo.org/~yngwin/distfiles/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtsvg:5
+ dev-qt/qtwidgets:5
+ dev-qt/qtx11extras:5
+ media-video/mpv[libmpv]
+ x11-libs/libX11"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}/Baka-MPlayer-${PV}"
+
+src_prepare() {
+ # no need to install license
+ sed -e '/^INSTALLS/s:license::' -i src/Baka-MPlayer.pro || die
+ # put manual in our docdir
+ sed -e '/^manual.path/s:yer:yer-'${PV}':' -i src/Baka-MPlayer.pro || die
+}
+
+src_configure() {
+ eqmake5 INSTROOT="${D}" CONFIG+=install_translations src/Baka-MPlayer.pro
+}
diff --git a/media-video/baka-mplayer/baka-mplayer-2.0.3.ebuild b/media-video/baka-mplayer/baka-mplayer-2.0.3.ebuild
new file mode 100644
index 000000000000..ab14dbf26b34
--- /dev/null
+++ b/media-video/baka-mplayer/baka-mplayer-2.0.3.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit qmake-utils
+
+DESCRIPTION="Cross-platform libmpv-based multimedia player with uncluttered design"
+HOMEPAGE="http://bakamplayer.u8sand.net/"
+SRC_URI="https://github.com/u8sand/Baka-MPlayer/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtsvg:5
+ dev-qt/qtwidgets:5
+ dev-qt/qtx11extras:5
+ media-video/mpv[libmpv]
+ x11-libs/libX11"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}/Baka-MPlayer-${PV}"
+
+src_prepare() {
+ # no need to install license
+ sed -e '/^INSTALLS/s:license::' -i src/Baka-MPlayer.pro || die
+ # put manual in our docdir
+ sed -e '/^manual.path/s:yer:yer-'${PV}':' -i src/Baka-MPlayer.pro || die
+}
+
+src_configure() {
+ eqmake5 INSTROOT="${D}" CONFIG+=install_translations src/Baka-MPlayer.pro
+}
diff --git a/media-video/baka-mplayer/metadata.xml b/media-video/baka-mplayer/metadata.xml
new file mode 100644
index 000000000000..3dd50468e98c
--- /dev/null
+++ b/media-video/baka-mplayer/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>qt</herd>
+ <herd>video</herd>
+</pkgmetadata>
diff --git a/media-video/bangarang/Manifest b/media-video/bangarang/Manifest
new file mode 100644
index 000000000000..bbe45b00854f
--- /dev/null
+++ b/media-video/bangarang/Manifest
@@ -0,0 +1 @@
+DIST bangarang-2.1.tar.gz 698339 SHA256 c15366ac014e0da84432f0ee050bb3c1d2aee3c69d0c7f41c40aa399ce5597bc SHA512 849716a8897efd9fbb6e69a9ebcc85a3e3809ebef5e7f080fbd410634f1de592eca7d7d6e37db0c7d3ec5941783b974f17131ad9f3653e7878d2d60ea2e77e27 WHIRLPOOL 73151686a2e85bce185391c60f3f9ecb1b5162ae9516a225da274c70f6d27cd390689888591a9331f42c18538bbfc5e180a8b86a13798d4e215c793b0766ade3
diff --git a/media-video/bangarang/bangarang-2.1-r2.ebuild b/media-video/bangarang/bangarang-2.1-r2.ebuild
new file mode 100644
index 000000000000..15f4da9efbf3
--- /dev/null
+++ b/media-video/bangarang/bangarang-2.1-r2.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+KDE_LINGUAS="cs da de el es fi fr hu it lt nl pl pt pt_BR ru uk zh_CN"
+KDE_SCM="git"
+KDE_MINIMAL="4.13.1"
+inherit kde4-base
+
+DESCRIPTION="Media player for KDE utilizing Nepomuk for tagging"
+HOMEPAGE="http://bangarangkde.wordpress.com"
+[[ ${PV} == 9999 ]] || SRC_URI="http://bangarangissuetracking.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="GPL-3"
+KEYWORDS="amd64 x86"
+SLOT="4"
+IUSE="debug"
+
+RDEPEND="
+ dev-libs/soprano
+ $(add_kdebase_dep kdelibs 'nepomuk')
+ $(add_kdeapps_dep nepomuk)
+ $(add_kdeapps_dep audiocd-kio)
+ media-libs/taglib
+ media-libs/phonon[qt4]
+ dev-qt/qtscript:4
+"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+"
+
+PATCHES=( "${FILESDIR}/${P}-gcc-4.7.patch" )
+
+S=${WORKDIR}/bangarang-bangarang
diff --git a/media-video/bangarang/files/bangarang-2.1-gcc-4.7.patch b/media-video/bangarang/files/bangarang-2.1-gcc-4.7.patch
new file mode 100644
index 000000000000..d4f650b9caf5
--- /dev/null
+++ b/media-video/bangarang/files/bangarang-2.1-gcc-4.7.patch
@@ -0,0 +1,45 @@
+commit b893fcdb7ddfc8c59fd29a29b7265a713c3dbab1
+Author: Alex Fiestas <afiestas@kde.org>
+Date: Thu Mar 29 10:09:22 2012 +0200
+
+ Build fix: Add unistd.h include since sleep is defined there
+
+diff --git a/src/platform/infofetchers/lastfminfofetcher.cpp b/src/platform/infofetchers/lastfminfofetcher.cpp
+index 0c49d69..fcc4cd3 100644
+--- a/src/platform/infofetchers/lastfminfofetcher.cpp
++++ b/src/platform/infofetchers/lastfminfofetcher.cpp
+@@ -32,6 +32,8 @@
+ #include <QFile>
+ #include <QTextEdit>
+
++#include <unistd.h>
++
+ LastfmInfoFetcher::LastfmInfoFetcher(QObject *parent) :
+ InfoFetcher(parent)
+ {
+diff --git a/src/platform/infofetchers/tmdbinfofetcher.cpp b/src/platform/infofetchers/tmdbinfofetcher.cpp
+index 7801644..3c01960 100644
+--- a/src/platform/infofetchers/tmdbinfofetcher.cpp
++++ b/src/platform/infofetchers/tmdbinfofetcher.cpp
+@@ -30,6 +30,8 @@
+ #include <QDomDocument>
+ #include <QFile>
+
++#include <unistd.h>
++
+ TMDBInfoFetcher::TMDBInfoFetcher(QObject *parent) :
+ InfoFetcher(parent)
+ {
+diff --git a/src/platform/infofetchers/tvdbinfofetcher.cpp b/src/platform/infofetchers/tvdbinfofetcher.cpp
+index ff351b0..670ed18 100644
+--- a/src/platform/infofetchers/tvdbinfofetcher.cpp
++++ b/src/platform/infofetchers/tvdbinfofetcher.cpp
+@@ -30,6 +30,8 @@
+ #include <QDomDocument>
+ #include <QFile>
+
++#include <unistd.h>
++
+ TVDBInfoFetcher::TVDBInfoFetcher(QObject *parent) :
+ InfoFetcher(parent)
+ {
diff --git a/media-video/bangarang/metadata.xml b/media-video/bangarang/metadata.xml
new file mode 100644
index 000000000000..28122f21bec5
--- /dev/null
+++ b/media-video/bangarang/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>kde</herd>
+ <upstream>
+ <remote-id type="google-code">bangarangissuetracking</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/bashnapi/Manifest b/media-video/bashnapi/Manifest
new file mode 100644
index 000000000000..5d8e70316fe4
--- /dev/null
+++ b/media-video/bashnapi/Manifest
@@ -0,0 +1 @@
+DIST napi_v1.1.5_subotage_0.15.tgz 38080 SHA256 7748a94bcefcbf840f4a7a13fcda2df6442de049f453baa8ff4d4158e21a47d3 SHA512 a8f2b79a3d0767c99af448e7ec9fb8d9b2048876f966ab7ef07c17b7935066387dd20e9535f43947266810d66d28e5e2d02cffc5f033c65112c10744506e86f5 WHIRLPOOL 9dd9c62dfcae68df02d022ce264030290b8d2097fbab7600770e1288c3c44321c65a54ea60e45ad8c30ce0afb8ec4b02fc8cbfdef4a62847fd821ceebf001b02
diff --git a/media-video/bashnapi/bashnapi-1.1.5.ebuild b/media-video/bashnapi/bashnapi-1.1.5.ebuild
new file mode 100644
index 000000000000..11dac0894ad6
--- /dev/null
+++ b/media-video/bashnapi/bashnapi-1.1.5.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+SUB_VER=0.15
+MY_TAR=napi_v${PV}_subotage_${SUB_VER}
+
+DESCRIPTION="Napiprojekt.pl subtitle downloader in bash"
+HOMEPAGE="http://sourceforge.net/projects/bashnapi/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_TAR}.tgz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+S=${WORKDIR}/napi
+
+src_install() {
+ default # for docs
+
+ dobin napi.sh
+}
+
+pkg_postinst() {
+ elog "Optional runtime dependencies:"
+ elog
+ elog " \033[1mmedia-video/subotage\033[0m for subtitle format conversion"
+ elog
+ elog " \033[1mmedia-video/mediainfo\033[0m"
+ elog "or \033[1mmedia-video/mplayer\033[0m for FPS detection (for conversion)"
+}
diff --git a/media-video/bashnapi/metadata.xml b/media-video/bashnapi/metadata.xml
new file mode 100644
index 000000000000..e110571d2fbc
--- /dev/null
+++ b/media-video/bashnapi/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>mgorny@gentoo.org</email>
+ <name>Michał Górny</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">bashnapi</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/bbtools/Manifest b/media-video/bbtools/Manifest
new file mode 100644
index 000000000000..a89c1e17731f
--- /dev/null
+++ b/media-video/bbtools/Manifest
@@ -0,0 +1 @@
+DIST bbtool19_src.zip 68080 RMD160 2b155ba8f3b0e78a4398802f624e91898fc4903f SHA1 f82c4a1529117794991258f54f6016e728cadf89 SHA256 69e0b0b2b2f3b1e60f7b5391df3e41b0355612243c2591916fd510d9813a3b2d
diff --git a/media-video/bbtools/bbtools-1.9.ebuild b/media-video/bbtools/bbtools-1.9.ebuild
new file mode 100644
index 000000000000..d7a261741f79
--- /dev/null
+++ b/media-video/bbtools/bbtools-1.9.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="bbdmux, bbinfo, bbvinfo and bbainfo from Brent Beyeler"
+HOMEPAGE="http://members.cox.net/beyeler/bbmpeg.html"
+SRC_URI="http://files.digital-digest.com/downloads/files/encode/bbtool${PV/./}_src.zip"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+DEPEND="app-arch/unzip"
+
+S=${WORKDIR}
+
+src_prepare() {
+ mv BBINFO.cpp bbinfo.cpp || die
+ mv BITS.CPP bits.cpp || die
+ mv BITS.H bits.h || die
+ mv bbdmux.CPP bbdmux.cpp || die
+ rm *.ide
+ edos2unix *.cpp *.h
+
+ epatch "${FILESDIR}"/bbtools-${PV}-gentoo.patch
+
+ append-lfs-flags
+ tc-export CXX
+}
+
+src_install() {
+ dobin bbainfo bbdmux bbinfo bbvinfo
+}
diff --git a/media-video/bbtools/files/bbtools-1.9-gentoo.patch b/media-video/bbtools/files/bbtools-1.9-gentoo.patch
new file mode 100644
index 000000000000..7f9ff7ab6279
--- /dev/null
+++ b/media-video/bbtools/files/bbtools-1.9-gentoo.patch
@@ -0,0 +1,78 @@
+--- bits.h
++++ bits.h 2003-10-20 22:04:30.000000000 +0000
+@@ -15,4 +15,4 @@
+ int seek_sync(unsigned int sync, int N);
+ unsigned int look_ahead(int N);
+
+-
++#define strlwr(x)
+--- bbainfo.cpp
++++ bbainfo.cpp 2003-10-20 22:19:15.000000000 +0000
+@@ -97,8 +97,8 @@
+ {
+ int i, framesize, skip;
+
+- framesize = bitrate_index[3 - layer][bit_rate] /
+- frequency[freq] * slots[3 - layer];
++ framesize = (int) (bitrate_index[3 - layer][bit_rate] /
++ frequency[freq] * slots[3 - layer]);
+
+ if (padding_bit)
+ framesize++;
+--- bbinfo.cpp
++++ bbinfo.cpp 2003-10-20 22:16:43.000000000 +0000
+@@ -984,7 +984,7 @@
+ bit_rate = (k & 0xF0) >> 4;
+ freq = (k & 0x0C) >> 2;
+ padding_bit = (k & 0x02) >> 1;
+- audio_sync[i] = ((bitrate_index[3 - layer][bit_rate] /
++ audio_sync[i] = (int) ((bitrate_index[3 - layer][bit_rate] /
+ frequency[freq]) * slots[3 - layer]) - 4;
+ if (padding_bit)
+ audio_sync[i] += 1;
+@@ -1274,7 +1274,7 @@
+ bit_rate = (k & 0xF0) >> 4;
+ freq = (k & 0x0C) >> 2;
+ padding_bit = (k & 0x02) >> 1;
+- audio_sync[i] = ((bitrate_index[3 - layer][bit_rate] /
++ audio_sync[i] = (int) ((bitrate_index[3 - layer][bit_rate] /
+ frequency[freq]) * slots[3 - layer]) - 4;
+
+ if (padding_bit)
+@@ -2198,7 +2198,7 @@
+ bit_rate = (k & 0xF0) >> 4;
+ freq = (k & 0x0C) >> 2;
+ padding_bit = (k & 0x02) >> 1;
+- streams[PID]->audio_sync = ((bitrate_index[3 - layer][bit_rate] /
++ streams[PID]->audio_sync = (int) ((bitrate_index[3 - layer][bit_rate] /
+ frequency[freq]) * slots[3 - layer]) - 4;
+ if (padding_bit)
+ streams[PID]->audio_sync += 1;
+--- Makefile
++++ Makefile 2003-10-20 22:26:07.000000000 +0000
+@@ -0,0 +1,25 @@
++all: bbainfo bbdmux bbinfo bbvinfo
++
++bbdmux: bits.o bbdmux.o
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) $^ -lm -o $@
++
++bbinfo: bits.o bbinfo.o
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) $^ -lm -o $@
++
++bbvinfo: bits.o bbvinfo.o
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) $^ -lm -o $@
++
++bbainfo: bits.o bbainfo.o
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) $^ -lm -o $@
++
++%.o: %.c
++ $(CXX) $(CXXFLAGS) -c -o $@ $<
++
++clean:
++ rm -f bbainfo bbdmux bbinfo bbvinfo core *.o
++
++bbainfo.o: bbainfo.cpp bits.h
++bbdmux.o: bbdmux.cpp bits.h
++bbinfo.o: bbinfo.cpp bits.h
++bbvinfo.o: bbvinfo.cpp bits.h
++bits.o: bits.cpp bits.h
diff --git a/media-video/bbtools/metadata.xml b/media-video/bbtools/metadata.xml
new file mode 100644
index 000000000000..421b9241a8c5
--- /dev/null
+++ b/media-video/bbtools/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>video</herd>
+<maintainer>
+ <email>media-video@gentoo.org</email>
+</maintainer>
+<longdescription lang="en">
+bbtools is a package of 4 small tools written by Brent Beyeler.
+
+bbdmux: an MPEG-1 or MPEG-2 program/transport stream de-multiplexer
+bbinfo: an MPEG-1 or MPEG-2 program/transport stream analyzer
+bbvinfo: an MPEG-1 or MPEG-2 video stream analyzer
+bbainfo: an MPEG-1 audio stream analyzer
+</longdescription>
+</pkgmetadata>
+
diff --git a/media-video/bdsup2sub/Manifest b/media-video/bdsup2sub/Manifest
new file mode 100644
index 000000000000..ed4509dc5ad9
--- /dev/null
+++ b/media-video/bdsup2sub/Manifest
@@ -0,0 +1,2 @@
+DIST bdsup2sub-4.0.0.tar.xz 199796 SHA256 72d06f013ab13a89e213ada48e0b43dc8abee87e8eb16ba2d07b5d1a96f69569
+DIST xdg-20100731.java.xz 648 SHA256 b6a189323fcc25ae5bebc006d870b4191a3bec34c80de7e337e5ed8a39f332c6
diff --git a/media-video/bdsup2sub/bdsup2sub-4.0.0-r1.ebuild b/media-video/bdsup2sub/bdsup2sub-4.0.0-r1.ebuild
new file mode 100644
index 000000000000..d03e9ede7d1f
--- /dev/null
+++ b/media-video/bdsup2sub/bdsup2sub-4.0.0-r1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+JAVA_PKG_IUSE="doc source"
+
+inherit eutils java-pkg-2 java-ant-2
+
+XDG_P="xdg-20100731"
+
+DESCRIPTION="A tool to convert and tweak bitmap based subtitle streams"
+HOMEPAGE="http://bdsup2sub.javaforge.com/help.htm"
+SRC_URI="http://sbriesen.de/gentoo/distfiles/${P}.tar.xz
+ http://sbriesen.de/gentoo/distfiles/${XDG_P}.java.xz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=">=virtual/jre-1.6"
+DEPEND=">=virtual/jdk-1.6
+ app-arch/xz-utils"
+
+S="${WORKDIR}/${PN}/${PV}"
+
+java_prepare() {
+ # apply XDG patch
+ cp -f "${WORKDIR}/${XDG_P}.java" "${S}/src/xdg.java"
+ epatch "${FILESDIR}/${P}-xdg.patch"
+
+ # copy build.xml
+ cp -f "${FILESDIR}/build-${PV}.xml" build.xml || die
+}
+
+src_compile() {
+ eant build $(use_doc)
+}
+
+src_install() {
+ java-pkg_dojar dist/BDSup2Sub.jar
+ java-pkg_dolauncher BDSup2Sub --main BDSup2Sub --java_args -Xmx256m
+ newicon bin_copy/icon_32.png BDSup2Sub.png
+ make_desktop_entry BDSup2Sub BDSup2Sub BDSup2Sub
+ use doc && java-pkg_dojavadoc apidocs
+ use source && java-pkg_dosrc src
+}
diff --git a/media-video/bdsup2sub/files/bdsup2sub-4.0.0-xdg.diff b/media-video/bdsup2sub/files/bdsup2sub-4.0.0-xdg.diff
new file mode 100644
index 000000000000..4a045d31b190
--- /dev/null
+++ b/media-video/bdsup2sub/files/bdsup2sub-4.0.0-xdg.diff
@@ -0,0 +1,37 @@
+diff -Naur src.orig/deadbeef/SupTools/Core.java src/deadbeef/SupTools/Core.java
+--- src.orig/deadbeef/SupTools/Core.java 2010-07-28 22:56:08.319223422 +0200
++++ src/deadbeef/SupTools/Core.java 2010-07-28 22:56:08.890223411 +0200
+@@ -22,6 +22,8 @@
+ import deadbeef.Tools.Props;
+ import deadbeef.Tools.ToolBox;
+
++import java.io.File;
++
+ /*
+ * Copyright 2009 Volker Oth (0xdeadbeef)
+ *
+@@ -768,6 +770,11 @@
+ }
+ fnameProps += Core.iniName;
+
++ // use XDG spec
++ fnameProps = System.getenv("XDG_CONFIG_HOME");
++ if (fnameProps == null) fnameProps = System.getProperty("user.home") + "/.config";
++ fnameProps += "/" + Core.iniName;
++
+ // read properties from ini file
+ props = new Props();
+ props.setHeader(Core.progNameVer+" settings - don't modify manually");
+@@ -905,8 +912,11 @@
+ * Write properties
+ */
+ public static void storeProps() {
+- if (props != null)
++ if (props != null) {
++ File path = new File(ToolBox.getPathName(fnameProps));
++ path.mkdirs();
+ props.save(fnameProps);
++ }
+ }
+
+ /**
diff --git a/media-video/bdsup2sub/files/bdsup2sub-4.0.0-xdg.patch b/media-video/bdsup2sub/files/bdsup2sub-4.0.0-xdg.patch
new file mode 100644
index 000000000000..a590ae983201
--- /dev/null
+++ b/media-video/bdsup2sub/files/bdsup2sub-4.0.0-xdg.patch
@@ -0,0 +1,40 @@
+--- src/deadbeef/SupTools/Core.java 2010-07-29 13:01:48.000000000 +0200
++++ src/deadbeef/SupTools/Core.java 2010-08-01 02:19:25.215473885 +0200
+@@ -22,6 +22,8 @@
+ import deadbeef.Tools.Props;
+ import deadbeef.Tools.ToolBox;
+
++import xdg.*;
++
+ /*
+ * Copyright 2009 Volker Oth (0xdeadbeef)
+ *
+@@ -750,6 +752,7 @@
+ cliMode = false;
+ String s = c.getClass().getName().replace('.','/') + ".class";
+ URL url = c.getClass().getClassLoader().getResource(s);
++ /*
+ int pos;
+ try {
+ fnameProps = URLDecoder.decode(url.getPath(),"UTF-8");
+@@ -767,6 +770,8 @@
+ fnameProps = fnameProps.substring(0,pos+1);
+ }
+ fnameProps += Core.iniName;
++ */
++ fnameProps = xdg.config_home() + "/" + Core.iniName;
+
+ // read properties from ini file
+ props = new Props();
+@@ -905,8 +910,10 @@
+ * Write properties
+ */
+ public static void storeProps() {
+- if (props != null)
++ if (props != null) {
++ xdg.mkdirs_file(fnameProps);
+ props.save(fnameProps);
++ }
+ }
+
+ /**
diff --git a/media-video/bdsup2sub/files/build-4.0.0.xml b/media-video/bdsup2sub/files/build-4.0.0.xml
new file mode 100644
index 000000000000..9aab31c3a5e1
--- /dev/null
+++ b/media-video/bdsup2sub/files/build-4.0.0.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0"?>
+
+<project name="BDSup2Sub" default="jar">
+ <!-- some properties -->
+ <property name="src.dir" value="src" />
+ <property name="build.dir" value="build" />
+ <property name="docs.dir" value="apidocs" />
+ <property name="dist.dir" value="dist" />
+ <property name="resources.dir" value="bin_copy" />
+ <property name="project.jar" value="${dist.dir}/${ant.project.name}.jar" />
+ <property name="target.jdk" value="1.6" />
+
+ <!-- init -->
+ <target name="init">
+ <mkdir dir="${dist.dir}" />
+ <mkdir dir="${docs.dir}" />
+ <mkdir dir="${build.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}" />
+ </copy>
+ </target>
+
+ <!-- build the jar files -->
+ <target name="build" depends="compile">
+ <jar jarfile="${project.jar}" basedir="${build.dir}">
+ <manifest>
+ <attribute name="Main-Class" value="${ant.project.name}" />
+ </manifest>
+ </jar>
+ </target>
+
+ <!-- generate javadocs -->
+ <target name="javadoc" depends="init">
+ <javadoc sourcepath="${src.dir}"
+ packagenames="*"
+ destdir="${docs.dir}"
+ author="true"
+ version="true"
+ use="true"
+ charset="UTF-8"
+ encoding="ISO-8859-1"
+ windowtitle="${ant.project.name} API" />
+ </target>
+
+ <!-- clean up -->
+ <target name="clean">
+ <delete dir="${build.dir}" />
+ <delete dir="${docs.dir}" />
+ <delete dir="${dist.dir}" />
+ </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-video/bdsup2sub/metadata.xml b/media-video/bdsup2sub/metadata.xml
new file mode 100644
index 000000000000..93f8bf687fd8
--- /dev/null
+++ b/media-video/bdsup2sub/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>video</herd>
+ <longdescription lang="en">
+ BDSup2Sub - A tool to convert and tweak bitmap based subtitle streams.
+ </longdescription>
+</pkgmetadata>
diff --git a/media-video/binkplayer/Manifest b/media-video/binkplayer/Manifest
new file mode 100644
index 000000000000..44da2a35298d
--- /dev/null
+++ b/media-video/binkplayer/Manifest
@@ -0,0 +1 @@
+DIST binkplayer-1.99w.zip 100620 SHA256 cfcfdd8f3b8d9087ca237cdf0a9a361d807e4a9fa0bba60e84f966e85a4d5caf SHA512 2f6e58780098e19cd446e7876de8187e585c1be13cf53f1311975e107644c08d25703b93ceacc596b787a351bc104bde5aaf9f2da8338fcdc7a2795bf49936ce WHIRLPOOL 70e46654399a3bab1aa032adca87f3c7c3ce76cd75584ab91b363eebf0030218c79b4f9e3265f4109731fead89578e7acd37f14df3221f34248a232da090f494
diff --git a/media-video/binkplayer/binkplayer-1.99w.ebuild b/media-video/binkplayer/binkplayer-1.99w.ebuild
new file mode 100644
index 000000000000..7e0bbfe7d9b7
--- /dev/null
+++ b/media-video/binkplayer/binkplayer-1.99w.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+DESCRIPTION="Bink Video! Player"
+HOMEPAGE="http://www.radgametools.com/default.htm"
+# No version on the archives and upstream has said they are not
+# interested in providing versioned archives.
+SRC_URI="mirror://gentoo/${P}.zip"
+
+# distributable per http://www.radgametools.com/binkfaq.htm
+LICENSE="freedist"
+SLOT="0"
+KEYWORDS="-* amd64 x86"
+IUSE=""
+
+DEPEND="app-arch/unzip"
+RDEPEND="
+ >=media-libs/libsdl-1.2.15-r5[abi_x86_32(-)]
+ >=media-libs/openal-1.15.1-r1[abi_x86_32(-)]"
+
+S=${WORKDIR}
+
+QA_PREBUILT="opt/bin/BinkPlayer"
+
+src_install() {
+ into /opt
+ dobin BinkPlayer
+}
diff --git a/media-video/binkplayer/metadata.xml b/media-video/binkplayer/metadata.xml
new file mode 100644
index 000000000000..d3c2cc926f0b
--- /dev/null
+++ b/media-video/binkplayer/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>games</herd>
+</pkgmetadata>
diff --git a/media-video/bino/Manifest b/media-video/bino/Manifest
new file mode 100644
index 000000000000..a9bde4593ed6
--- /dev/null
+++ b/media-video/bino/Manifest
@@ -0,0 +1,4 @@
+DIST bino-1.3.0.tar.xz 737544 SHA256 aaae2d8eb41f43f61bdac2f40e012a6eaa2ac2a1f6b37fd153dc90021b46cea8 SHA512 c19569827b335f8c09833c1c2c94f40a4b3fa661014926940ba8ecbfe0168ede68e83a2e2c6480949162211fbe73855c65d89afdf6e3cb0ba3145b63f33c1960 WHIRLPOOL 9cec7c9ee4d4191f6be500d984dfd5a059f8e487d1b585d1e205c27e4ff532563c0a557eb900b90c01052efff4924c7a1a844b57ee5e441050d1afec6c1ab97d
+DIST bino-1.4.2.tar.xz 794272 SHA256 6cd88eb16ffee30a3cbb9b5d313feb61b91068387ae846ff96d9e99dcb5c88b6 SHA512 5be3416fcd89410cc4892614f8322425de8896763f84102ed728dbc141deea7d74156c23b04df7633d05543e1da3dabc09eb57917cfa0913df8900d421d61100 WHIRLPOOL f9f575c9bcd1abc46d6f15bd8f11c589bc2de9ebbdc58e6602c17e0ae4048755a0f23c5c0c339b7730d20f175e0166cb24f497aeeb5290055a53d0289c80e8d4
+DIST bino-1.4.4.tar.xz 808536 SHA256 c3d9d9fdacdca2df628d0b70ac69f29a4abc0f17882621e377430d25d3d5be8f SHA512 6bd8351889b920cff1c23b7287a1055705ac038bfadd1678d111980a586de25b7388f2316c721dfb68da64397842bb53201fa2af14f53b83ed23e0b16ce62249 WHIRLPOOL bcd0b78aea3caeb8bb97ff3ec010e365f1ea4347a145d7ab2696d5c5e3497013b9dc5f67aeffd990e1dd50de5e759a858be703cbd9d140b84d23cd4bca487784
+DIST bino-1.6.1.tar.xz 814212 SHA256 f6e4b07a8e9ff6c929da6200d4ddd1482c46d4aa8516b18ff1c3c193edecc937 SHA512 5c0951f17cf9db37a4bd759aacbd4f3ef1a865499c893ca9c4c3a3775193560234aff9a5b12bc6fc012b987d3bd73264c5a5dcead562a6719f6a1019650e19af WHIRLPOOL 15b0219480d56f00fbaefe4b0935e7783929a3955d6a5632dc49b6681992e720857f09cf9c5d3ea8dd38bb7dbd56a492cbeda6af55c42f27172cb5a28c1bc176
diff --git a/media-video/bino/bino-1.3.0.ebuild b/media-video/bino/bino-1.3.0.ebuild
new file mode 100644
index 000000000000..ddbedb08c42c
--- /dev/null
+++ b/media-video/bino/bino-1.3.0.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+inherit eutils
+
+DESCRIPTION="Stereoscopic and multi-display media player"
+HOMEPAGE="http://bino3d.org/"
+SRC_URI="http://download.savannah.gnu.org/releases/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="lirc"
+
+RDEPEND=">=media-libs/glew-1.5.0
+ media-libs/openal
+ dev-qt/qtgui:4
+ dev-qt/qtcore:4
+ dev-qt/qtopengl:4
+ >=media-libs/libass-0.9.9
+ >=virtual/ffmpeg-0.6.90
+ lirc? ( app-misc/lirc )"
+
+DEPEND="${RDEPEND}"
+
+src_configure() {
+ if use lirc; then
+ export liblircclient_CFLAGS="-I/usr/include/lirc" liblircclient_LIBS="-llirc_client"
+ fi
+
+ default
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ # remove installed doc
+ rm -rf "${D}/usr/share/doc/bino"
+
+ # documentation
+ dodoc AUTHORS ChangeLog INSTALL NEWS README doc/*.png doc/*.jpg
+ dohtml doc/bino.html
+ doman doc/bino.1
+ doinfo doc/bino.info
+}
diff --git a/media-video/bino/bino-1.4.2-r1.ebuild b/media-video/bino/bino-1.4.2-r1.ebuild
new file mode 100644
index 000000000000..a0434bde32c5
--- /dev/null
+++ b/media-video/bino/bino-1.4.2-r1.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF="1"
+
+inherit autotools-utils flag-o-matic
+
+DESCRIPTION="Stereoscopic and multi-display media player"
+HOMEPAGE="http://bino3d.org/"
+SRC_URI="http://download.savannah.gnu.org/releases/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc lirc"
+
+IUSE_VIDEO_CARDS="
+ video_cards_nvidia"
+IUSE+="${IUSE_VIDEO_CARDS}"
+
+LANGS="en bg de fr ru"
+for X in ${LANGS} ; do
+ IUSE+=" linguas_${X}"
+done
+
+RDEPEND=">=media-libs/glew-1.6.0
+ >=media-libs/openal-1.15.1
+ dev-qt/qtgui:4
+ dev-qt/qtcore:4
+ dev-qt/qtopengl:4
+ >=media-libs/libass-0.9.9
+ >=virtual/ffmpeg-0.6.90
+ lirc? ( app-misc/lirc )
+ video_cards_nvidia? ( media-video/nvidia-settings )
+ virtual/libintl"
+
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ virtual/pkgconfig"
+
+DOCS=( AUTHORS ChangeLog NEWS README README.Linux )
+
+PATCHES=(
+ "${FILESDIR}/${P}-lirc-detect.patch" # detect lirc
+)
+
+src_configure() {
+ local myeconfargs=(
+ $(use_with video_cards_nvidia xnvctrl)
+ $(use_with lirc liblircclient)
+ --without-equalizer
+ --htmldir=/usr/share/doc/${PF}/html
+ )
+ use video_cards_nvidia && append-cppflags "-I/usr/include/NVCtrl" && append-ldflags "-I/usr/$(get_libdir)"
+ use lirc && append-cppflags "-I/usr/include/lirc" && append-libs "lirc_client"
+
+ # Fix a compilation error because of a multiple definitions in glew
+ append-ldflags "-zmuldefs"
+
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+
+ use doc || ( rm -rf "${D}"/usr/share/doc/${PF}/html && dohtml "${FILESDIR}/${PN}.html" )
+}
diff --git a/media-video/bino/bino-1.4.4.ebuild b/media-video/bino/bino-1.4.4.ebuild
new file mode 100644
index 000000000000..6f92eff48772
--- /dev/null
+++ b/media-video/bino/bino-1.4.4.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF="1"
+
+inherit autotools-utils flag-o-matic
+
+DESCRIPTION="Stereoscopic and multi-display media player"
+HOMEPAGE="http://bino3d.org/"
+SRC_URI="http://download.savannah.gnu.org/releases/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc lirc"
+
+IUSE_VIDEO_CARDS="
+ video_cards_nvidia"
+IUSE+="${IUSE_VIDEO_CARDS}"
+
+LANGS="en bg de fr ru zh_CN"
+for X in ${LANGS} ; do
+ IUSE+=" linguas_${X}"
+done
+
+RDEPEND=">=media-libs/glew-1.6.0
+ >=media-libs/openal-1.15.1
+ dev-qt/qtgui:4
+ dev-qt/qtcore:4
+ dev-qt/qtopengl:4
+ >=media-libs/libass-0.9.9
+ >=virtual/ffmpeg-0.6.90
+ lirc? ( app-misc/lirc )
+ video_cards_nvidia? ( media-video/nvidia-settings )
+ virtual/libintl"
+
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ virtual/pkgconfig"
+
+DOCS=( AUTHORS ChangeLog NEWS README README.Linux )
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.4.2-lirc-detect.patch" # detect lirc
+)
+
+src_configure() {
+ local myeconfargs=(
+ $(use_with video_cards_nvidia xnvctrl)
+ $(use_with lirc liblircclient)
+ --without-equalizer
+ --htmldir=/usr/share/doc/${PF}/html
+ )
+ use video_cards_nvidia && append-cppflags "-I/usr/include/NVCtrl" && append-ldflags "-I/usr/$(get_libdir)" && append-libs "Xext"
+ use lirc && append-cppflags "-I/usr/include/lirc" && append-libs "lirc_client"
+
+ # Fix a compilation error because of a multiple definitions in glew
+ append-ldflags "-zmuldefs"
+
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+
+ use doc || ( rm -rf "${D}"/usr/share/doc/${PF}/html && dohtml "${FILESDIR}/${PN}.html" )
+}
diff --git a/media-video/bino/bino-1.6.1.ebuild b/media-video/bino/bino-1.6.1.ebuild
new file mode 100644
index 000000000000..6fa1c2515374
--- /dev/null
+++ b/media-video/bino/bino-1.6.1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF="1"
+
+inherit autotools-utils flag-o-matic
+
+DESCRIPTION="Stereoscopic and multi-display media player"
+HOMEPAGE="http://bino3d.org/"
+SRC_URI="http://download.savannah.gnu.org/releases/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc libav lirc"
+
+IUSE_VIDEO_CARDS="
+ video_cards_nvidia"
+IUSE+="${IUSE_VIDEO_CARDS}"
+
+LANGS="en bg de fr ru zh_CN"
+for X in ${LANGS} ; do
+ IUSE+=" linguas_${X}"
+done
+
+RDEPEND=">=media-libs/glew-1.6.0
+ >=media-libs/openal-1.15.1
+ dev-qt/qtgui:4
+ dev-qt/qtcore:4
+ dev-qt/qtopengl:4
+ >=media-libs/libass-0.9.9
+ libav? ( >=media-video/libav-0.7:0= )
+ !libav? ( >=media-video/ffmpeg-0.7:0= )
+ lirc? ( app-misc/lirc )
+ video_cards_nvidia? ( media-video/nvidia-settings )
+ virtual/libintl"
+
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ virtual/pkgconfig"
+
+DOCS=( AUTHORS ChangeLog NEWS README README.Linux )
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.4.2-lirc-detect.patch" # detect lirc
+)
+
+src_configure() {
+ local myeconfargs=(
+ $(use_with video_cards_nvidia xnvctrl)
+ $(use_with lirc liblircclient)
+ --without-equalizer
+ --htmldir=/usr/share/doc/${PF}/html
+ )
+ use video_cards_nvidia && append-cppflags "-I/usr/include/NVCtrl" && append-ldflags "-I/usr/$(get_libdir)" && append-libs "Xext"
+ use lirc && append-cppflags "-I/usr/include/lirc" && append-libs "lirc_client"
+
+ # Fix a compilation error because of a multiple definitions in glew
+ append-ldflags "-zmuldefs"
+
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+
+ use doc || ( rm -rf "${D}"/usr/share/doc/${PF}/html && dohtml "${FILESDIR}/${PN}.html" )
+}
diff --git a/media-video/bino/files/bino-1.4.2-lirc-detect.patch b/media-video/bino/files/bino-1.4.2-lirc-detect.patch
new file mode 100644
index 000000000000..7e476e5d46d8
--- /dev/null
+++ b/media-video/bino/files/bino-1.4.2-lirc-detect.patch
@@ -0,0 +1,35 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -284,14 +284,30 @@
+ [AS_HELP_STRING([--without-liblircclient], [Disable remote control support via liblircclient (enabled by default)])],
+ [if test "$withval" = "yes"; then lirc="yes"; else lirc="no"; fi], [lirc="yes"])
+ if test "$lirc" = "yes"; then
+- PKG_CHECK_MODULES([liblircclient], [liblircclient0 >= 0.0], [HAVE_LIBLIRCCLIENT=1], [HAVE_LIBLIRCCLIENT=0])
++ CPPFLAGS_BAK="$CPPFLAGS"
++ CPPFLAGS="$CPPFLAGS $xliblircclient_CFLAGS"
++ AC_SUBST([liblircclient_CFLAGS])
++ AC_CHECK_HEADERS([lirc_client.h],
++ [HAVE_LIBLIRCCLIENT=1],
++ [HAVE_LIBLIRCCLIENT=0])
++ if test "HAVE_LIBLIRCCLIENT" = "1"; then
++ LDFLAGS_BAK="$LDFLAGS"
++ LDFLAGS="$LDFLAGS $xliblircclient_LDFLAGS"
++ AC_SUBST([liblircclient_LDFLAGS])
++ AC_CHECK_LIB([lirc_client],
++ [lirc_deinit],
++ [HAVE_LIBLIRCCLIENT=1],
++ [HAVE_LIBLIRCCLIENT=0])
++ LDFLAGS="$LDFLAGS_BAK"
++ fi
++ CPPFLAGS="$CPPFLAGS_BAK"
+ if test "$HAVE_LIBLIRCCLIENT" != "1"; then
+ AC_MSG_WARN([optional library liblircclient not found:])
+ AC_MSG_WARN([$liblircclient_PKG_ERRORS])
+ AC_MSG_WARN([liblircclient is provided by LIRC; Debian package: liblircclient-dev])
+ lirc="no"
+ else
+- LIBLIRCCLIENT_PKGCONFIG_VERSION="\"`$PKG_CONFIG --modversion liblircclient0`\""
++ LIBLIRCCLIENT_PKGCONFIG_VERSION="\"system\""
+ fi
+ else
+ HAVE_LIBLIRCCLIENT=0
diff --git a/media-video/bino/files/bino.html b/media-video/bino/files/bino.html
new file mode 100644
index 000000000000..28a6982c1697
--- /dev/null
+++ b/media-video/bino/files/bino.html
@@ -0,0 +1,24 @@
+<html lang="en">
+<head>
+<title>Bino</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<meta name="description" content="Bino">
+<meta http-equiv="Content-Style-Type" content="text/css">
+</head>
+
+<body>
+<h1 class="settitle">Bino</h1>
+<div class="node">
+<p><hr>
+Up:&nbsp;<a rel="up" accesskey="u" href="../">(dir)</a>
+</div>
+
+<h2 class="unnumbered">Warning</h2>
+
+<p>You have chosen not to install the documentation of Bino.
+<p>If you want to have the documentation installed, please enable the <b>doc</b> use flag of <i>media-video/bino</i>.
+<p>Alternatively you may do a:
+<pre>
+USE="doc" emerge media-video/bino
+</pre>
+</body></html>
diff --git a/media-video/bino/metadata.xml b/media-video/bino/metadata.xml
new file mode 100644
index 000000000000..2b9b03c8c6d0
--- /dev/null
+++ b/media-video/bino/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>cuchac@email.cz</email>
+ <name>Jožka Kejzlar (cuchac)</name>
+ <description>Maintainer. Assign bugs on him</description>
+ </maintainer>
+ <maintainer>
+ <email>robbat2@gentoo.org</email>
+ <description>Proxy maintainer. CC him on bugs</description>
+ </maintainer>
+</pkgmetadata>
diff --git a/media-video/blinkensim/Manifest b/media-video/blinkensim/Manifest
new file mode 100644
index 000000000000..e9c2d25fc647
--- /dev/null
+++ b/media-video/blinkensim/Manifest
@@ -0,0 +1 @@
+DIST blinkensim-2.7.tar.gz 88416 RMD160 ed3aa61ddd8eb1daabb94721bdd5d3a37f1b5531 SHA1 a9c23ce8cc94f5c76d07ea616549cdb2f76778cd SHA256 5fe4a0675e5dd06661ec3c3dfddda1dee511f3d6f1093d5517bcd1621a2890bc
diff --git a/media-video/blinkensim/blinkensim-2.7.ebuild b/media-video/blinkensim/blinkensim-2.7.ebuild
new file mode 100644
index 000000000000..1ee49c59158e
--- /dev/null
+++ b/media-video/blinkensim/blinkensim-2.7.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Graphical Blinkenlights simulator with networking support"
+
+HOMEPAGE="http://www.blinkenlights.net/project/developer-tools"
+SRC_URI="http://www.blinkenlights.de/dist/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 x86"
+IUSE="aalib gtk directfb"
+
+# if the config script finds any of the optional library it will try to
+# compile against it
+DEPEND=">=media-libs/blib-1.1.4
+ virtual/pkgconfig
+ aalib? ( >=media-libs/aalib-1.4_rc4-r2 )
+ gtk? ( >=x11-libs/gtk+-2.4.4 )
+ directfb? ( >=dev-libs/DirectFB-0.9.20-r1 )"
+RDEPEND="media-video/blinkenthemes"
+
+src_install() {
+ make DESTDIR="${D}" \
+ install || die "install failed"
+}
diff --git a/media-video/blinkensim/metadata.xml b/media-video/blinkensim/metadata.xml
new file mode 100644
index 000000000000..284559a05f2f
--- /dev/null
+++ b/media-video/blinkensim/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>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">
+ Counterpart for the blinkentools and viewing the Blinkenlight-movies in
+ blm-format.
+ </longdescription>
+</pkgmetadata>
diff --git a/media-video/blinkenthemes/Manifest b/media-video/blinkenthemes/Manifest
new file mode 100644
index 000000000000..fb3b161036bc
--- /dev/null
+++ b/media-video/blinkenthemes/Manifest
@@ -0,0 +1 @@
+DIST blinkenthemes-0.10.tar.gz 4059605 RMD160 dd1872dc11f1d29383743e5d065748a8dcf72e03 SHA1 e4f4784798289ef1da6d0f964807ae051e9b1bd2 SHA256 be5853aeefe2f60cb549b8a94787ba707f032da27d2071812320fd956518bff9
diff --git a/media-video/blinkenthemes/blinkenthemes-0.10.ebuild b/media-video/blinkenthemes/blinkenthemes-0.10.ebuild
new file mode 100644
index 000000000000..d2909187f9f6
--- /dev/null
+++ b/media-video/blinkenthemes/blinkenthemes-0.10.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Themes for blinkensim"
+HOMEPAGE="http://www.blinkenlights.net/project/developer-tools"
+SRC_URI="http://www.blinkenlights.de/dist/blinkenthemes-0.10.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 x86"
+IUSE=""
+
+DEPEND="media-libs/blib
+ virtual/pkgconfig"
+RDEPEND=""
+
+src_compile() {
+ econf || die "econf failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ make DESTDIR="${D}" \
+ install || die "install failed"
+}
diff --git a/media-video/blinkenthemes/metadata.xml b/media-video/blinkenthemes/metadata.xml
new file mode 100644
index 000000000000..950e903bf988
--- /dev/null
+++ b/media-video/blinkenthemes/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>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">
+ Some nice themes for blinkensim. Included are themes of the "Haus des
+ Lehrers" at Alexanderplatz n Berlin. This is the place where the
+ original Blinkenlights installation where set up. Then there are themes
+ of the "Bibliothèque nationale de France" in Paris where the second
+ installation called "Arcade" took place. Furthermore you can find some
+ experimental themes for LED-clones.
+ </longdescription>
+</pkgmetadata>
diff --git a/media-video/blinkentools/Manifest b/media-video/blinkentools/Manifest
new file mode 100644
index 000000000000..67eca0c5ba08
--- /dev/null
+++ b/media-video/blinkentools/Manifest
@@ -0,0 +1 @@
+DIST blinkentools-2.9.tar.gz 560904 SHA256 1fa92c4b3a679085464edc6a194b80b3feea9ccea7e82cdbcdab9ec29aba5920
diff --git a/media-video/blinkentools/blinkentools-2.9.ebuild b/media-video/blinkentools/blinkentools-2.9.ebuild
new file mode 100644
index 000000000000..d3f698f43825
--- /dev/null
+++ b/media-video/blinkentools/blinkentools-2.9.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="blinkentools is a set of commandline utilities related to Blinkenlights"
+HOMEPAGE="http://www.blinkenlights.net/project/developer-tools"
+SRC_URI="http://www.blinkenlights.de/dist/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 x86"
+IUSE=""
+
+DEPEND="media-libs/blib
+ media-libs/libmng
+ virtual/pkgconfig"
+RDEPEND=""
+
+src_compile() {
+ econf
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "install failed"
+}
diff --git a/media-video/blinkentools/metadata.xml b/media-video/blinkentools/metadata.xml
new file mode 100644
index 000000000000..ac44c06197cd
--- /dev/null
+++ b/media-video/blinkentools/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">
+ The blinkentools bring you scripts for handling and playing the beloved
+ videos from Blinkenlights and Arcade, recorded in blm-format, on your
+ local computer, an attached mini-Blinkenlights, or whatever you intend
+ to use them for.
+ </longdescription>
+</pkgmetadata>
diff --git a/media-video/bombono-dvd/Manifest b/media-video/bombono-dvd/Manifest
new file mode 100644
index 000000000000..f167ac5b3b5c
--- /dev/null
+++ b/media-video/bombono-dvd/Manifest
@@ -0,0 +1 @@
+DIST bombono-dvd-1.2.2.tar.bz2 4406764 SHA256 3ffaadc803dc2526d2805629ee928800ce150cb2e6a40b6724d898c76366f68b SHA512 66982f014b6d45a9fa5a8a748dc3ed0ad79ae2d1c9e5afdf22d8db89e0f91c29fcd5639ca27ac50e50916ad37a80e536ea186e079d07efca7547fe49ab8f7d6b WHIRLPOOL 797c495a480c7b12f112809bc73e2032e846dbb57db8f3d2989d7063aa6686c3cdc8f07813bb34f0d076c6e53188931fe4b01e461d5c76bcb95557783c21cfe4
diff --git a/media-video/bombono-dvd/bombono-dvd-1.2.2.ebuild b/media-video/bombono-dvd/bombono-dvd-1.2.2.ebuild
new file mode 100644
index 000000000000..cadc08043082
--- /dev/null
+++ b/media-video/bombono-dvd/bombono-dvd-1.2.2.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+SCONS_MIN_VERSION="0.96.1"
+
+inherit base scons-utils toolchain-funcs flag-o-matic virtualx
+
+DESCRIPTION="GUI DVD authoring program"
+HOMEPAGE="http://www.bombono.org/"
+SRC_URI="mirror://sourceforge/bombono/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+
+KEYWORDS="amd64 x86"
+
+IUSE="gnome"
+
+COMMONDEPEND="
+ app-i18n/enca
+ app-cdr/dvd+rw-tools
+ dev-cpp/gtkmm:2.4
+ dev-cpp/libxmlpp:2.6
+ >=dev-libs/boost-1.51
+ media-libs/libdvdread
+ media-sound/twolame
+ media-video/dvdauthor
+ virtual/cdrtools
+ >=virtual/ffmpeg-9
+ >=media-video/mjpegtools-1.8.0
+ x11-libs/gtk+:2
+"
+RDEPEND="${COMMONDEPEND}
+ gnome? ( gnome-base/gvfs )
+"
+DEPEND="${COMMONDEPEND}
+ virtual/pkgconfig
+"
+
+RESTRICT=test
+# bug 419655
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.0.1-cflags.patch"
+ "${FILESDIR}/${PN}-1.2.0-cdrtools.patch"
+ "${FILESDIR}/${PN}-1.2.2-ffmpeg2.patch"
+ "${FILESDIR}/${PN}-1.2.2-ffmpeg26.patch"
+)
+
+src_configure() {
+ append-cppflags -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_FILESYSTEM_VERSION=3
+ myesconsargs=(
+ CC="$(tc-getCC)"
+ CXX="$(tc-getCXX)"
+ CFLAGS="${CFLAGS}"
+ CXXFLAGS="${CXXFLAGS}"
+ DESTDIR="${D}"
+ LDFLAGS="${LDFLAGS}"
+ USE_EXT_BOOST=1
+ PREFIX="${EPREFIX}/usr"
+ )
+}
+
+src_compile() {
+ nonfatal escons \
+ || die "Please add ${S}/config.opts when filing bugs reports!"
+}
+
+src_test() {
+ VIRTUALX_COMMAND="escons TEST=1" virtualmake
+}
+
+src_install() {
+ nonfatal escons install || die "Please add ${S}/config.opts when filing bugs reports!"
+}
diff --git a/media-video/bombono-dvd/files/bombono-dvd-1.0.1-cflags.patch b/media-video/bombono-dvd/files/bombono-dvd-1.0.1-cflags.patch
new file mode 100644
index 000000000000..adea485ff404
--- /dev/null
+++ b/media-video/bombono-dvd/files/bombono-dvd-1.0.1-cflags.patch
@@ -0,0 +1,12 @@
+diff -ruN bombono-dvd-1.0.1.orig/SConstruct bombono-dvd-1.0.1/SConstruct
+--- bombono-dvd-1.0.1.orig/SConstruct 2011-02-12 14:47:56.000000000 +0100
++++ bombono-dvd-1.0.1/SConstruct 2011-04-24 16:59:04.149229947 +0200
+@@ -56,7 +56,7 @@
+ common_warn_flags = []
+ cxx_warn_flags = []
+ debug_flags = ['-g', '-O0']
+-release_flags = ['-O2']
++release_flags = []
+ defines = []
+
+ def CalcCommonFlags():
diff --git a/media-video/bombono-dvd/files/bombono-dvd-1.2.0-cdrtools.patch b/media-video/bombono-dvd/files/bombono-dvd-1.2.0-cdrtools.patch
new file mode 100644
index 000000000000..10ab179ffe85
--- /dev/null
+++ b/media-video/bombono-dvd/files/bombono-dvd-1.2.0-cdrtools.patch
@@ -0,0 +1,21 @@
+diff --git a/src/mgui/author/script.h b/src/mgui/author/script.h
+index fe80307..a96fb54 100644
+--- a/src/mgui/author/script.h
++++ b/src/mgui/author/script.h
+@@ -115,9 +115,14 @@ ExitData AsyncOFCall(const std::string& cmd, const std::string& out_dir, OutputF
+ // POSIX-народ бесповоротно ушел на cdrkit (genisoimage), но с Win32
+ // у cdrkit хреново (только cygwin, нет собранного с growisofs с cdrkit под Win32) => потому - "вилка"
+ #ifdef _WIN32
+-#define MK_ISO_CMD "mkisofs"
++ #define MK_ISO_CMD "mkisofs"
+ #else
+-#define MK_ISO_CMD "genisoimage"
++ #define USE_CDRTOOLS
++ #ifdef USE_CDRTOOLS
++ #define MK_ISO_CMD "mkisofs"
++ #else // !USE_CDRTOOLS
++ #define MK_ISO_CMD "genisoimage"
++ #endif // !USE_CDRTOOLS
+ #endif
+
+ #endif // #ifndef __MGUI_AUTHOR_SCRIPT_H__
diff --git a/media-video/bombono-dvd/files/bombono-dvd-1.2.1-glib.patch b/media-video/bombono-dvd/files/bombono-dvd-1.2.1-glib.patch
new file mode 100644
index 000000000000..9627bfd66051
--- /dev/null
+++ b/media-video/bombono-dvd/files/bombono-dvd-1.2.1-glib.patch
@@ -0,0 +1,13 @@
+diff -aur src/mgui/author/gb_devices.c src/mgui/author/gb_devices.c
+--- src/mgui/author/gb_devices.c 2012-02-08 13:19:21.000000000 +0100
++++ src/mgui/author/gb_devices.c 2012-04-26 14:32:30.059001909 +0200
+@@ -28,9 +28,6 @@
+
+ #include "gb_devices.h"
+
+-#include <glib/gthread.h>
+-#include <glib/gmessages.h>
+-#include <glib/ghash.h>
+ /*
+ #include <glib/gfileutils.h>
+ */
diff --git a/media-video/bombono-dvd/files/bombono-dvd-1.2.1-libav9.patch b/media-video/bombono-dvd/files/bombono-dvd-1.2.1-libav9.patch
new file mode 100644
index 000000000000..2c8f4a3c48ed
--- /dev/null
+++ b/media-video/bombono-dvd/files/bombono-dvd-1.2.1-libav9.patch
@@ -0,0 +1,44 @@
+--- src/mgui/ffviewer.cpp.ORIG 2012-02-08 13:19:21.000000000 +0100
++++ src/mgui/ffviewer.cpp 2013-02-24 18:11:07.565711375 +0100
+@@ -36,7 +36,13 @@
+ #define AVFORMAT_54
+ #endif
+
+-#ifdef AVFORMAT_54
++// разрабы libav считают себя самыми умными и потому решили
++// закрыть простым смертным доступ к ffurl_register_protocol()
++// (бывшая av_register_protocol2()),- https://bugzilla.libav.org/show_bug.cgi?id=224
++//
++// Поэтому: пользователи Linux остаются без предпросмотра содержимого DVD,
++// пользователи же Windows не страдают из-за подобного политгемора
++#if defined(AVFORMAT_54) && defined(_WIN32)
+ C_LINKAGE_BEGIN
+ #include <libavformat/url.h> // ffurl_register_protocol()
+ C_LINKAGE_END
+@@ -1125,6 +1131,8 @@
+
+ namespace DVD {
+
++#if !defined(AVFORMAT_54) || defined(_WIN32)
++
+ struct VobCtx
+ {
+ int64_t curPos;
+@@ -1266,6 +1274,17 @@
+ BmdDVD = 0;
+ return res;
+ }
++
++#else
++
++bool OpenVob(FFViewer&, VobPtr, dvd_reader_t*, std::string& err_str)
++{
++ err_str = "Libav: no soup for Linux users^W^W^W^W^W see https://bugzilla.libav.org/show_bug.cgi?id=224";
++ return false;
++}
++
++#endif
++
+
+ } // namespace DVD
+
diff --git a/media-video/bombono-dvd/files/bombono-dvd-1.2.2-ffmpeg2.patch b/media-video/bombono-dvd/files/bombono-dvd-1.2.2-ffmpeg2.patch
new file mode 100644
index 000000000000..245b93705b48
--- /dev/null
+++ b/media-video/bombono-dvd/files/bombono-dvd-1.2.2-ffmpeg2.patch
@@ -0,0 +1,46 @@
+--- src/mgui/ffviewer.cpp.ORIG 2013-08-01 11:05:12.962407787 +0200
++++ src/mgui/ffviewer.cpp 2013-08-01 11:08:26.907409685 +0200
+@@ -62,7 +62,7 @@
+
+ typedef struct AVCodecTag {
+ #if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(52,39,00)
+- enum CodecID id;
++ enum AVCodecID id;
+ #else
+ int id;
+ #endif
+@@ -70,14 +70,14 @@
+ } AVCodecTag;
+
+ #if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(52,34,00)
+-static uint FFCodecID2Tag(CodecID codec_id)
++static uint FFCodecID2Tag(AVCodecID codec_id)
+ {
+ unsigned int ff_codec_get_tag(const AVCodecTag *tags, int id);
+ extern const AVCodecTag ff_codec_bmp_tags[];
+ return ff_codec_get_tag(ff_codec_bmp_tags, codec_id);
+ }
+ #else
+-static uint FFCodecID2Tag(CodecID codec_id)
++static uint FFCodecID2Tag(AVCodecID codec_id)
+ {
+ unsigned int codec_get_tag(const AVCodecTag *tags, int id);
+ extern const AVCodecTag codec_bmp_tags[];
+@@ -388,7 +388,7 @@
+ return (tag>>bit_begin) & 0xFF;
+ }
+
+-static std::string CodecID2Str(CodecID codec_id)
++static std::string CodecID2Str(AVCodecID codec_id)
+ {
+ #ifdef _MSC_VER
+ std::string tag_str = boost::format("%1%") % codec_id % bf::stop;
+@@ -406,7 +406,7 @@
+
+ #else // CALC_FF_TAG
+
+-static std::string CodecID2Str(CodecID codec_id)
++static std::string CodecID2Str(AVCodecID codec_id)
+ {
+ return Int2Str(codec_id);
+ }
diff --git a/media-video/bombono-dvd/files/bombono-dvd-1.2.2-ffmpeg26.patch b/media-video/bombono-dvd/files/bombono-dvd-1.2.2-ffmpeg26.patch
new file mode 100644
index 000000000000..b511a9d4ebd3
--- /dev/null
+++ b/media-video/bombono-dvd/files/bombono-dvd-1.2.2-ffmpeg26.patch
@@ -0,0 +1,13 @@
+Index: bombono-dvd-1.2.2/src/mgui/ffviewer.cpp
+===================================================================
+--- bombono-dvd-1.2.2.orig/src/mgui/ffviewer.cpp
++++ bombono-dvd-1.2.2/src/mgui/ffviewer.cpp
+@@ -1120,7 +1120,7 @@ static bool SeekSetTime(FFViewer& ffv, d
+ bool seek_ok = TimeSeek(ffv, start_time, time);
+ if( !seek_ok && CanByteSeek(ffv.iCtx) )
+ // тогда переходим в начало файла
+- seek_ok = DoSeek(ffv, ffv.iCtx->data_offset, true);
++ seek_ok = DoSeek(ffv, 0, true);
+
+ // некоторое видео глючит в начале (Hellboy), из-за чего
+ // последовательный доступ выполняется с перескоками -
diff --git a/media-video/bombono-dvd/files/bombono-dvd-boost-1.51.0-fix.patch b/media-video/bombono-dvd/files/bombono-dvd-boost-1.51.0-fix.patch
new file mode 100644
index 000000000000..8d5020df3455
--- /dev/null
+++ b/media-video/bombono-dvd/files/bombono-dvd-boost-1.51.0-fix.patch
@@ -0,0 +1,537 @@
+From a144c07915e82607bbc76791251e8e576e17149e Mon Sep 17 00:00:00 2001
+From: Slava Dubrovskiy <dubrsl@altlinux.ru>
+Date: Thu, 6 Sep 2012 20:18:45 +0300
+Subject: [PATCH 2/2] Fix build with boost 1.51.0
+
+---
+ libs/boost-lib/boost/filesystem/v2/fstream.hpp | 26 +++++++++++-----------
+ libs/boost-lib/boost/filesystem/v2/operations.hpp | 2 +-
+ libs/boost-lib/boost/filesystem/v2/path.hpp | 24 ++++++++++----------
+ libs/boost-lib/boost/filesystem/v3/path.hpp | 6 ++---
+ libs/boost-lib/libs/filesystem/v2/src/v2_path.cpp | 4 ++--
+ .../boost/logging/writer/on_dedicated_thread.hpp | 2 +-
+ .../samples/scenarios/ded_loger_one_filter.cpp | 2 +-
+ .../samples/scenarios/ts_loger_one_filter.cpp | 2 +-
+ .../logging/samples/scenarios/your_scenario.cpp | 2 +-
+ .../tests/test_simple_tss/test_simple_tss.cpp | 2 +-
+ .../test_ts_resource.cpp | 4 ++--
+ .../logging/tests/test_tss/test_tss_objects.cpp | 2 +-
+ src/mbase/project/table.cpp | 2 +-
+ src/mgui/author/script.cpp | 2 +-
+ src/mgui/editor/toolbar.cpp | 2 +-
+ src/mgui/mux.cpp | 2 +-
+ src/mgui/project/add.cpp | 6 ++---
+ src/mgui/project/mconstructor.cpp | 2 +-
+ src/mgui/project/serialize.cpp | 2 +-
+ src/mgui/win_utils.cpp | 2 +-
+ src/mlib/filesystem.cpp | 15 ++-----------
+ 21 files changed, 51 insertions(+), 62 deletions(-)
+
+diff --git a/libs/boost-lib/boost/filesystem/v2/fstream.hpp b/libs/boost-lib/boost/filesystem/v2/fstream.hpp
+index bdcd485..101ed30 100644
+--- a/libs/boost-lib/boost/filesystem/v2/fstream.hpp
++++ b/libs/boost-lib/boost/filesystem/v2/fstream.hpp
+@@ -488,27 +488,27 @@ namespace boost
+ std::ios_base::openmode mode )
+ {
+ return std::basic_filebuf<charT,traits>::open(
+- file_ph.file_string().c_str(), mode ) == 0 ? 0 : this;
++ file_ph.string().c_str(), mode ) == 0 ? 0 : this;
+ }
+ # endif
+
+ template <class charT, class traits>
+ basic_ifstream<charT,traits>::basic_ifstream( const path & file_ph )
+ : std::basic_ifstream<charT,traits>(
+- file_ph.file_string().c_str(), std::ios_base::in ) {}
++ file_ph.string().c_str(), std::ios_base::in ) {}
+
+ template <class charT, class traits>
+ basic_ifstream<charT,traits>::basic_ifstream( const path & file_ph,
+ std::ios_base::openmode mode )
+ : std::basic_ifstream<charT,traits>(
+- file_ph.file_string().c_str(), mode ) {}
++ file_ph.string().c_str(), mode ) {}
+
+ # if !BOOST_WORKAROUND( BOOST_MSVC, <= 1200 ) // VC++ 6.0 can't handle this
+ template <class charT, class traits>
+ void basic_ifstream<charT,traits>::open( const path & file_ph )
+ {
+ std::basic_ifstream<charT,traits>::open(
+- file_ph.file_string().c_str(), std::ios_base::in );
++ file_ph.string().c_str(), std::ios_base::in );
+ }
+
+ template <class charT, class traits>
+@@ -516,27 +516,27 @@ namespace boost
+ std::ios_base::openmode mode )
+ {
+ std::basic_ifstream<charT,traits>::open(
+- file_ph.file_string().c_str(), mode );
++ file_ph.string().c_str(), mode );
+ }
+ # endif
+
+ template <class charT, class traits>
+ basic_ofstream<charT,traits>::basic_ofstream( const path & file_ph )
+ : std::basic_ofstream<charT,traits>(
+- file_ph.file_string().c_str(), std::ios_base::out ) {}
++ file_ph.string().c_str(), std::ios_base::out ) {}
+
+ template <class charT, class traits>
+ basic_ofstream<charT,traits>::basic_ofstream( const path & file_ph,
+ std::ios_base::openmode mode )
+ : std::basic_ofstream<charT,traits>(
+- file_ph.file_string().c_str(), mode ) {}
++ file_ph.string().c_str(), mode ) {}
+
+ # if !BOOST_WORKAROUND( BOOST_MSVC, <= 1200 ) // VC++ 6.0 can't handle this
+ template <class charT, class traits>
+ void basic_ofstream<charT,traits>::open( const path & file_ph )
+ {
+ std::basic_ofstream<charT,traits>::open(
+- file_ph.file_string().c_str(), std::ios_base::out );
++ file_ph.string().c_str(), std::ios_base::out );
+ }
+
+ template <class charT, class traits>
+@@ -544,14 +544,14 @@ namespace boost
+ std::ios_base::openmode mode )
+ {
+ std::basic_ofstream<charT,traits>::open(
+- file_ph.file_string().c_str(), mode );
++ file_ph.string().c_str(), mode );
+ }
+ # endif
+
+ template <class charT, class traits>
+ basic_fstream<charT,traits>::basic_fstream( const path & file_ph )
+ : std::basic_fstream<charT,traits>(
+- file_ph.file_string().c_str(),
++ file_ph.string().c_str(),
+ std::ios_base::in|std::ios_base::out ) {}
+
+
+@@ -559,14 +559,14 @@ namespace boost
+ basic_fstream<charT,traits>::basic_fstream( const path & file_ph,
+ std::ios_base::openmode mode )
+ : std::basic_fstream<charT,traits>(
+- file_ph.file_string().c_str(), mode ) {}
++ file_ph.string().c_str(), mode ) {}
+
+ # if !BOOST_WORKAROUND( BOOST_MSVC, <= 1200 ) // VC++ 6.0 can't handle this
+ template <class charT, class traits>
+ void basic_fstream<charT,traits>::open( const path & file_ph )
+ {
+ std::basic_fstream<charT,traits>::open(
+- file_ph.file_string().c_str(), std::ios_base::in|std::ios_base::out );
++ file_ph.string().c_str(), std::ios_base::in|std::ios_base::out );
+ }
+
+ template <class charT, class traits>
+@@ -574,7 +574,7 @@ namespace boost
+ std::ios_base::openmode mode )
+ {
+ std::basic_fstream<charT,traits>::open(
+- file_ph.file_string().c_str(), mode );
++ file_ph.string().c_str(), mode );
+ }
+ # endif
+ } // namespace filesystem2
+diff --git a/libs/boost-lib/boost/filesystem/v2/operations.hpp b/libs/boost-lib/boost/filesystem/v2/operations.hpp
+index 9bd35cd..ad08cc3 100644
+--- a/libs/boost-lib/boost/filesystem/v2/operations.hpp
++++ b/libs/boost-lib/boost/filesystem/v2/operations.hpp
+@@ -1081,7 +1081,7 @@ namespace boost
+ {
+ return path().filename();
+ }
+- typename Path::string_type leaf() const
++ typename Path::string_type filename().string() const
+ {
+ return path().filename();
+ }
+diff --git a/libs/boost-lib/boost/filesystem/v2/path.hpp b/libs/boost-lib/boost/filesystem/v2/path.hpp
+index d159c37..580b635 100644
+--- a/libs/boost-lib/boost/filesystem/v2/path.hpp
++++ b/libs/boost-lib/boost/filesystem/v2/path.hpp
+@@ -232,11 +232,11 @@ namespace boost
+
+ // observers
+ const string_type & string() const { return m_path; }
+- const string_type file_string() const;
+- const string_type directory_string() const { return file_string(); }
++ const string_type string() const;
++ const string_type string() const { return string(); }
+
+- const external_string_type external_file_string() const { return Traits::to_external( *this, file_string() ); }
+- const external_string_type external_directory_string() const { return Traits::to_external( *this, directory_string() ); }
++ const external_string_type external_file_string() const { return Traits::to_external( *this, string() ); }
++ const external_string_type external_directory_string() const { return Traits::to_external( *this, string() ); }
+
+ basic_path root_path() const;
+ string_type root_name() const;
+@@ -248,7 +248,7 @@ namespace boost
+ string_type extension() const;
+
+ # ifndef BOOST_FILESYSTEM_NO_DEPRECATED
+- string_type leaf() const { return filename(); }
++ string_type filename().string() const { return filename(); }
+ basic_path branch_path() const { return parent_path(); }
+ bool has_leaf() const { return !m_path.empty(); }
+ bool has_branch_path() const { return !parent_path().empty(); }
+@@ -309,8 +309,8 @@ namespace boost
+ // are only minor differences between generic and native path grammars.
+ // Private members might be quite different in other implementations,
+ // particularly where there were wide differences between portable and
+- // native path formats, or between file_string() and
+- // directory_string() formats, or simply that the implementation
++ // native path formats, or between string() and
++ // string() formats, or simply that the implementation
+ // was willing expend additional memory to achieve greater speed for
+ // some operations at the expense of other operations.
+
+@@ -338,8 +338,8 @@ namespace boost
+ basic_path( const string_type & str, name_check ) { operator/=( str ); }
+ basic_path( const typename string_type::value_type * s, name_check )
+ { operator/=( s );}
+- string_type native_file_string() const { return file_string(); }
+- string_type native_directory_string() const { return directory_string(); }
++ string_type native_file_string() const { return string(); }
++ string_type native_directory_string() const { return string(); }
+ static bool default_name_check_writable() { return false; }
+ static void default_name_check( name_check ) {}
+ static name_check default_name_check() { return 0; }
+@@ -647,13 +647,13 @@ namespace boost
+ if ( !path1_arg.empty() )
+ {
+ target += ": \"";
+- target += path1_arg.file_string();
++ target += path1_arg.string();
+ target += "\"";
+ }
+ if ( !path2_arg.empty() )
+ {
+ target += ", \"";
+- target += path2_arg.file_string();
++ target += path2_arg.string();
+ target += "\"";
+ }
+ }
+@@ -1294,7 +1294,7 @@ namespace boost
+
+ template<class String, class Traits>
+ const String
+- basic_path<String, Traits>::file_string() const
++ basic_path<String, Traits>::string() const
+ {
+ # ifdef BOOST_WINDOWS_PATH
+ // for Windows, use the alternate separator, and bypass extra
+diff --git a/libs/boost-lib/boost/filesystem/v3/path.hpp b/libs/boost-lib/boost/filesystem/v3/path.hpp
+index 0caa19f..fe3c975 100644
+--- a/libs/boost-lib/boost/filesystem/v3/path.hpp
++++ b/libs/boost-lib/boost/filesystem/v3/path.hpp
+@@ -389,7 +389,7 @@ namespace filesystem3
+ // recently deprecated functions supplied by default
+ path& normalize() { return m_normalize(); }
+ path& remove_leaf() { return remove_filename(); }
+- path leaf() const { return filename(); }
++ path filename().string() const { return filename(); }
+ path branch_path() const { return parent_path(); }
+ bool has_leaf() const { return !m_pathname.empty(); }
+ bool has_branch_path() const { return !parent_path().empty(); }
+@@ -399,8 +399,8 @@ namespace filesystem3
+ # if defined(BOOST_FILESYSTEM_DEPRECATED)
+ // deprecated functions with enough signature or semantic changes that they are
+ // not supplied by default
+- const std::string file_string() const { return string(); }
+- const std::string directory_string() const { return string(); }
++ const std::string string() const { return string(); }
++ const std::string string() const { return string(); }
+ const std::string native_file_string() const { return string(); }
+ const std::string native_directory_string() const { return string(); }
+ const string_type external_file_string() const { return native(); }
+diff --git a/libs/boost-lib/libs/filesystem/v2/src/v2_path.cpp b/libs/boost-lib/libs/filesystem/v2/src/v2_path.cpp
+index 7adeaff..4fc0343 100644
+--- a/libs/boost-lib/libs/filesystem/v2/src/v2_path.cpp
++++ b/libs/boost-lib/libs/filesystem/v2/src/v2_path.cpp
+@@ -107,13 +107,13 @@ namespace boost
+ // if ( !path1.empty() )
+ // {
+ // target += ": \"";
+- // target += path1.file_string();
++ // target += path1.string();
+ // target += "\"";
+ // }
+ // if ( !path2.empty() )
+ // {
+ // target += ", \"";
+- // target += path2.file_string();
++ // target += path2.string();
+ // target += "\"";
+ // }
+ // }
+diff --git a/libs/boost-logging/boost/logging/writer/on_dedicated_thread.hpp b/libs/boost-logging/boost/logging/writer/on_dedicated_thread.hpp
+index 7b0aa71..a4a6f28 100644
+--- a/libs/boost-logging/boost/logging/writer/on_dedicated_thread.hpp
++++ b/libs/boost-logging/boost/logging/writer/on_dedicated_thread.hpp
+@@ -166,7 +166,7 @@ private:
+ }
+
+ boost::xtime to_wait;
+- xtime_get(&to_wait, boost::TIME_UTC);
++ xtime_get(&to_wait, boost::TIME_UTC_);
+ to_wait.sec += sleep_ms / 1000;
+ to_wait.nsec += (sleep_ms % 1000) * (NANOSECONDS_PER_SECOND / 1000);
+ to_wait.sec += to_wait.nsec / NANOSECONDS_PER_SECOND ;
+diff --git a/libs/boost-logging/lib/logging/samples/scenarios/ded_loger_one_filter.cpp b/libs/boost-logging/lib/logging/samples/scenarios/ded_loger_one_filter.cpp
+index 1d934da..d45beb4 100644
+--- a/libs/boost-logging/lib/logging/samples/scenarios/ded_loger_one_filter.cpp
++++ b/libs/boost-logging/lib/logging/samples/scenarios/ded_loger_one_filter.cpp
+@@ -103,7 +103,7 @@ BOOST_DEFINE_LOG(g_l, log_type)
+ void do_sleep(int ms) {
+ using namespace boost;
+ xtime next;
+- xtime_get( &next, TIME_UTC);
++ xtime_get( &next, TIME_UTC_);
+ next.nsec += (ms % 1000) * 1000000;
+
+ int nano_per_sec = 1000000000;
+diff --git a/libs/boost-logging/lib/logging/samples/scenarios/ts_loger_one_filter.cpp b/libs/boost-logging/lib/logging/samples/scenarios/ts_loger_one_filter.cpp
+index 9746319..4b9f845 100644
+--- a/libs/boost-logging/lib/logging/samples/scenarios/ts_loger_one_filter.cpp
++++ b/libs/boost-logging/lib/logging/samples/scenarios/ts_loger_one_filter.cpp
+@@ -95,7 +95,7 @@ BOOST_DEFINE_LOG(g_l, log_type)
+ void do_sleep(int ms) {
+ using namespace boost;
+ xtime next;
+- xtime_get( &next, TIME_UTC);
++ xtime_get( &next, TIME_UTC_);
+ next.nsec += (ms % 1000) * 1000000;
+
+ int nano_per_sec = 1000000000;
+diff --git a/libs/boost-logging/lib/logging/samples/scenarios/your_scenario.cpp b/libs/boost-logging/lib/logging/samples/scenarios/your_scenario.cpp
+index d447f24..f5ad955 100644
+--- a/libs/boost-logging/lib/logging/samples/scenarios/your_scenario.cpp
++++ b/libs/boost-logging/lib/logging/samples/scenarios/your_scenario.cpp
+@@ -124,7 +124,7 @@ BOOST_DEFINE_LOG(g_log_dbg, finder::logger )
+ void do_sleep(int ms) {
+ using namespace boost;
+ xtime next;
+- xtime_get( &next, TIME_UTC);
++ xtime_get( &next, TIME_UTC_);
+ next.nsec += (ms % 1000) * 1000000;
+
+ int nano_per_sec = 1000000000;
+diff --git a/libs/boost-logging/lib/logging/tests/test_simple_tss/test_simple_tss.cpp b/libs/boost-logging/lib/logging/tests/test_simple_tss/test_simple_tss.cpp
+index 627618e..205d07a 100644
+--- a/libs/boost-logging/lib/logging/tests/test_simple_tss/test_simple_tss.cpp
++++ b/libs/boost-logging/lib/logging/tests/test_simple_tss/test_simple_tss.cpp
+@@ -75,7 +75,7 @@ using namespace logging;
+
+ void do_sleep(int ms) {
+ xtime next;
+- xtime_get( &next, TIME_UTC);
++ xtime_get( &next, TIME_UTC_);
+ next.nsec += (ms % 1000) * 1000000;
+
+ int nano_per_sec = 1000000000;
+diff --git a/libs/boost-logging/lib/logging/tests/test_ts_resouce_with_cache/test_ts_resource.cpp b/libs/boost-logging/lib/logging/tests/test_ts_resouce_with_cache/test_ts_resource.cpp
+index 0bee896..2217c12 100644
+--- a/libs/boost-logging/lib/logging/tests/test_ts_resouce_with_cache/test_ts_resource.cpp
++++ b/libs/boost-logging/lib/logging/tests/test_ts_resouce_with_cache/test_ts_resource.cpp
+@@ -167,7 +167,7 @@ void test_resource(int idx) {
+
+ void do_sleep(int ms) {
+ xtime next;
+- xtime_get( &next, TIME_UTC);
++ xtime_get( &next, TIME_UTC_);
+ next.nsec += (ms % 1000) * 1000000;
+
+ int nano_per_sec = 1000000000;
+@@ -262,7 +262,7 @@ int g_run_period_secs = 200;
+
+ int main()
+ {
+- xtime_get( &g_start, TIME_UTC);
++ xtime_get( &g_start, TIME_UTC_);
+
+ for ( int i = 0; i < g_update_thread_count; ++i)
+ thread t(&update_thread);
+diff --git a/libs/boost-logging/lib/logging/tests/test_tss/test_tss_objects.cpp b/libs/boost-logging/lib/logging/tests/test_tss/test_tss_objects.cpp
+index b8e1ba6..14c8281 100644
+--- a/libs/boost-logging/lib/logging/tests/test_tss/test_tss_objects.cpp
++++ b/libs/boost-logging/lib/logging/tests/test_tss/test_tss_objects.cpp
+@@ -98,7 +98,7 @@ private:
+
+ void do_sleep(int ms) {
+ xtime next;
+- xtime_get( &next, TIME_UTC);
++ xtime_get( &next, TIME_UTC_);
+ next.nsec += (ms % 1000) * 1000000;
+
+ int nano_per_sec = 1000000000;
+diff --git a/src/mbase/project/table.cpp b/src/mbase/project/table.cpp
+index 33ee15a..feb851a 100644
+--- a/src/mbase/project/table.cpp
++++ b/src/mbase/project/table.cpp
+@@ -427,7 +427,7 @@ void GetThemeList(Str::List& t_lst)
+ {
+ for( fs::directory_iterator itr(dir), end; itr != end; ++itr )
+ if( IsFrameDir(*itr) )
+- t_lst.push_back(itr->leaf());
++ t_lst.push_back(itr->path().filename().string());
+ }
+ }
+
+diff --git a/src/mgui/author/script.cpp b/src/mgui/author/script.cpp
+index aa2b494..0c34a08 100644
+--- a/src/mgui/author/script.cpp
++++ b/src/mgui/author/script.cpp
+@@ -370,7 +370,7 @@ static std::string SrcFilename(VideoItem vi)
+ static std::string PrefixCnvPath(VideoItem vi, const std::string& out_dir)
+ {
+ std::string dst_fname = boost::format("%1%.%2%") % GetAuthorNumber(vi)
+- % fs::path(SrcFilename(vi)).leaf() % bf::stop;
++ % fs::path(SrcFilename(vi)).filename().string() % bf::stop;
+ return AppendPath(out_dir, dst_fname);
+ }
+
+diff --git a/src/mgui/editor/toolbar.cpp b/src/mgui/editor/toolbar.cpp
+index e549490..c6f15b3 100644
+--- a/src/mgui/editor/toolbar.cpp
++++ b/src/mgui/editor/toolbar.cpp
+@@ -287,7 +287,7 @@ Toolbar::Toolbar(): selTool(MakeSelectionToolImage()), txtTool(MakeTextToolLabel
+ if( fs::is_directory(dir) )
+ {
+ boost_foreach( const fs::path& pth, dir_range(dir) )
+- o_lst.push_back(pth.filename());
++ o_lst.push_back(pth.filename().string());
+ }
+ }
+ std::sort(o_lst.begin(), o_lst.end(), &ByExtName);
+diff --git a/src/mgui/mux.cpp b/src/mgui/mux.cpp
+index 4b4a5fa..0864bc2 100644
+--- a/src/mgui/mux.cpp
++++ b/src/mgui/mux.cpp
+@@ -72,7 +72,7 @@ void SetDialogStrict(Gtk::Dialog& dlg, int min_wdh, int min_hgt, bool set_resiza
+
+ static bool RunMuxing(const std::string& dest_path, const std::string& args)
+ {
+- Gtk::Dialog dlg(BF_("Muxing \"%1%\"") % fs::path(dest_path).leaf() % bf::stop);
++ Gtk::Dialog dlg(BF_("Muxing \"%1%\"") % fs::path(dest_path).filename().string() % bf::stop);
+ SetDialogStrict(dlg, 400, -1);
+
+ Gtk::TextView& txt_view = NewManaged<Gtk::TextView>();
+diff --git a/src/mgui/project/add.cpp b/src/mgui/project/add.cpp
+index db4df17..0425a9b 100644
+--- a/src/mgui/project/add.cpp
++++ b/src/mgui/project/add.cpp
+@@ -420,7 +420,7 @@ void TryAddMediaQuiet(const std::string& fname, const std::string& desc)
+ static std::string StandFNameOut(const fs::path& pth)
+ {
+ return "<span style=\"italic\" underline=\"low\">" +
+- pth.leaf() + "</span>";
++ pth.filename().string() + "</span>";
+ }
+
+ #if GTK_CHECK_VERSION(2,18,0)
+@@ -454,7 +454,7 @@ StorageItem CheckExists(const fs::path& pth, RefPtr<MediaStore> ms)
+
+ void OneMediaError(const fs::path& err_pth, const std::string& desc)
+ {
+- AddMediaError(BF_("Can't add file \"%1%\".") % err_pth.leaf() % bf::stop, desc);
++ AddMediaError(BF_("Can't add file \"%1%\".") % err_pth.filename().string() % bf::stop, desc);
+ }
+
+ void TryAddMedias(const Str::List& paths, MediaBrowser& brw,
+@@ -465,7 +465,7 @@ void TryAddMedias(const Str::List& paths, MediaBrowser& brw,
+ {
+ const std::string fname = paths[0];
+ fs::path pth(fname);
+- std::string leaf = pth.leaf();
++ std::string leaf = pth.filename().string();
+ {
+ static re::pattern dvd_video_vob("(VIDEO_TS|VTS_[0-9][0-9]_[0-9]).VOB",
+ re::pattern::perl|re::pattern::icase);
+diff --git a/src/mgui/project/mconstructor.cpp b/src/mgui/project/mconstructor.cpp
+index 12e2f49..7ad2546 100644
+--- a/src/mgui/project/mconstructor.cpp
++++ b/src/mgui/project/mconstructor.cpp
+@@ -961,7 +961,7 @@ void RunConstructor(const std::string& prj_file_name, bool ask_save_on_exit)
+ static const fs::directory_iterator end_itr;
+ for( fs::directory_iterator itr(DataDirPath("bmd-icons"));
+ itr != end_itr; ++itr )
+- pix_lst.push_back(Gdk::Pixbuf::create_from_file(itr->string()));
++ pix_lst.push_back(Gdk::Pixbuf::create_from_file(itr->path().string()));
+ Gtk::Window::set_default_icon_list(pix_lst);
+
+ ActionFunctor after_fnr = BuildConstructor(app, prj_file_name);
+diff --git a/src/mgui/project/serialize.cpp b/src/mgui/project/serialize.cpp
+index 12b3c3a..2340b0b 100644
+--- a/src/mgui/project/serialize.cpp
++++ b/src/mgui/project/serialize.cpp
+@@ -71,7 +71,7 @@ static std::string MakeProjectTitle(bool with_path_breakdown = false)
+ return "untitled.bmd";
+
+ fs::path full_path(db.GetProjectFName());
+- std::string res_str = full_path.leaf();
++ std::string res_str = full_path.filename().string();
+ if( with_path_breakdown )
+ res_str += " (" + full_path.branch_path().string() + ")";
+ return res_str;
+diff --git a/src/mgui/win_utils.cpp b/src/mgui/win_utils.cpp
+index 28ad9dd..175e241 100644
+--- a/src/mgui/win_utils.cpp
++++ b/src/mgui/win_utils.cpp
+@@ -418,7 +418,7 @@ bool CheckKeepOrigin(const std::string& fname)
+ bool res = false;
+ if( fs::exists(fname) &&
+ (Gtk::RESPONSE_OK != MessageBox(BF_("A file named \"%1%\" already exists. Do you want to replace it?")
+- % fs::path(fname).leaf() % bf::stop,
++ % fs::path(fname).filename().string() % bf::stop,
+ Gtk::MESSAGE_QUESTION, Gtk::BUTTONS_OK_CANCEL,
+ _("Replacing the file overwrite its contents."),
+ true)) )
+diff --git a/src/mlib/filesystem.cpp b/src/mlib/filesystem.cpp
+index bb84860..5d4f39c 100644
+--- a/src/mlib/filesystem.cpp
++++ b/src/mlib/filesystem.cpp
+@@ -47,7 +47,7 @@ const char* FindExtDot(const char* name)
+
+ std::string get_basename(const fs::path& pth)
+ {
+- std::string name_s = pth.leaf();
++ std::string name_s = pth.filename().string();
+ const char* name = name_s.c_str();
+
+ //if( const char* dot = strstr(name, ".") )
+@@ -58,24 +58,13 @@ std::string get_basename(const fs::path& pth)
+
+ std::string get_extension(const fs::path& pth)
+ {
+- std::string name_s = pth.leaf();
++ std::string name_s = pth.filename().string();
+
+ if( const char* dot = FindExtDot(name_s.c_str()) )
+ return std::string(dot+1);
+ return std::string();
+ }
+
+-// глобальная установка проверки имен файлов
+-class tune_boost_filesystem
+-{
+- public:
+- tune_boost_filesystem()
+- {
+- // чтоб любые символы в именах файлов позволялись, для utf8
+- fs::path::default_name_check(fs::native);
+- }
+-} tune_boost_filesystem_obj;
+-
+ namespace Project
+ {
+
+--
+1.7.11.7
+
diff --git a/media-video/bombono-dvd/metadata.xml b/media-video/bombono-dvd/metadata.xml
new file mode 100644
index 000000000000..87ec310b168b
--- /dev/null
+++ b/media-video/bombono-dvd/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="gnome">Use GVFS for desktop integration</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">bombono</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/camorama/Manifest b/media-video/camorama/Manifest
new file mode 100644
index 000000000000..d77774dab803
--- /dev/null
+++ b/media-video/camorama/Manifest
@@ -0,0 +1 @@
+DIST camorama-0.19.tar.bz2 277169 SHA256 948c24f96c77f550881102c2c6ca818ba00ffb7a48216ae21ae75eb55d351970 SHA512 efdbe3cdf90a4f4a39b02f141395431c24ac2a7a56ef7faa75b38ae145cdc33f3748daca6bf33a4fa21549b7fef0e7e26d135fd265906e0531e2638739492689 WHIRLPOOL 1f3cb71abac84536736c8e6a3ef141897107b3be1ca2d0ab070faa33bf7db012442e4f704a74937b730d709e56f360ced84d44a726af7e2376d1953d99e59f23
diff --git a/media-video/camorama/camorama-0.19-r2.ebuild b/media-video/camorama/camorama-0.19-r2.ebuild
new file mode 100644
index 000000000000..45d270532479
--- /dev/null
+++ b/media-video/camorama/camorama-0.19-r2.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+GNOME_TARBALL_SUFFIX="bz2"
+
+inherit eutils gnome2
+
+DESCRIPTION="A webcam application featuring various image filters"
+HOMEPAGE="http://git.gnome.org/browse/camorama/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE=""
+
+RDEPEND="
+ >=gnome-base/gconf-2
+ >=gnome-base/libglade-2
+ >=gnome-base/libgnome-2
+ gnome-base/libgnome-keyring
+ >=gnome-base/libgnomeui-2
+ media-libs/libv4l
+ x11-libs/gtk+:2
+"
+DEPEND="${RDEPEND}
+ dev-util/intltool
+ virtual/pkgconfig
+ sys-devel/gettext
+"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-gconf.patch \
+ "${FILESDIR}"/${P}-fixes.patch \
+ "${FILESDIR}"/${P}-libv4l.patch \
+ "${FILESDIR}"/${P}-no-more-videodev_h.patch \
+ "${FILESDIR}"/${P}-glib-232.patch
+
+ gnome2_src_prepare
+}
diff --git a/media-video/camorama/files/camorama-0.19-fixes.patch b/media-video/camorama/files/camorama-0.19-fixes.patch
new file mode 100644
index 000000000000..949c19d66741
--- /dev/null
+++ b/media-video/camorama/files/camorama-0.19-fixes.patch
@@ -0,0 +1,107 @@
+http://cvs.fedoraproject.org/viewvc/rpms/camorama/devel/
+
+--- camorama-0.19/src/callbacks.c 2007-09-16 15:36:55.000000000 +0200
++++ camorama-0.19.new/src/callbacks.c 2008-06-29 22:22:44.000000000 +0200
+@@ -387,9 +387,6 @@
+ }
+ }
+
+- cam->pixmap = gdk_pixmap_new (NULL, cam->x, cam->y, cam->desk_depth);
+- gtk_widget_set_size_request (glade_xml_get_widget (cam->xml, "da"),
+- cam->x, cam->y);
+
+ /*
+ * if(cam->read == FALSE) {
+@@ -441,6 +438,11 @@
+ * * }
+ */
+ get_win_info (cam);
++
++ cam->pixmap = gdk_pixmap_new (NULL, cam->x, cam->y, cam->desk_depth);
++ gtk_widget_set_size_request (glade_xml_get_widget (cam->xml, "da"),
++ cam->x, cam->y);
++
+ frame = 0;
+ gtk_window_resize (GTK_WINDOW
+ (glade_xml_get_widget (cam->xml, "main_window")), 320,
+@@ -520,8 +522,14 @@
+ gtk_widget_show (about);
+ }
+
++void
++camorama_filter_color_filter(void* filter, guchar *image, int x, int y, int depth);
++
+ static void
+ apply_filters(cam* cam) {
++ /* v4l has reverse rgb order from what camora expect so call the color
++ filter to fix things up before running the user selected filters */
++ camorama_filter_color_filter(NULL, cam->pic_buf, cam->x, cam->y, cam->depth);
+ camorama_filter_chain_apply(cam->filter_chain, cam->pic_buf, cam->x, cam->y, cam->depth);
+ #warning "FIXME: enable the threshold channel filter"
+ // if((effect_mask & CAMORAMA_FILTER_THRESHOLD_CHANNEL) != 0)
+--- camorama-0.19/src/filter.c 2007-09-16 14:48:50.000000000 +0200
++++ camorama-0.19.new/src/filter.c 2008-06-29 22:11:42.000000000 +0200
+@@ -151,12 +151,12 @@
+ static void
+ camorama_filter_color_init(CamoramaFilterColor* self) {}
+
+-static void
++void
+ camorama_filter_color_filter(CamoramaFilterColor* filter, guchar *image, int x, int y, int depth) {
+ int i;
+ char tmp;
+ i = x * y;
+- while (--i) {
++ while (i--) {
+ tmp = image[0];
+ image[0] = image[2];
+ image[2] = tmp;
+--- camorama-0.19/src/main.c 2007-09-16 15:36:55.000000000 +0200
++++ camorama-0.19.new/src/main.c 2008-06-29 22:20:04.000000000 +0200
+@@ -224,8 +224,7 @@
+
+ /* get picture attributes */
+ get_pic_info (cam);
+-// set_pic_info(cam);
+- /* set_pic_info(cam); */
++ set_pic_info (cam);
+ cam->contrast = cam->vid_pic.contrast;
+ cam->brightness = cam->vid_pic.brightness;
+ cam->colour = cam->vid_pic.colour;
+--- camorama-0.19/src/v4l.c 2007-09-16 14:48:05.000000000 +0200
++++ camorama-0.19.new/src/v4l.c 2008-06-29 22:20:23.000000000 +0200
+@@ -158,8 +158,8 @@
+ if(cam->debug) {
+ g_message("SET PIC");
+ }
+- //cam->vid_pic.palette = VIDEO_PALETTE_RGB24;
+- //cam->vid_pic.depth = 24;
++ cam->vid_pic.palette = VIDEO_PALETTE_RGB24;
++ cam->vid_pic.depth = 24;
+ //cam->vid_pic.palette = VIDEO_PALETTE_YUV420P;
+ if(ioctl(cam->dev, VIDIOCSPICT, &cam->vid_pic) == -1) {
+ if(cam->debug) {
+@@ -232,6 +232,8 @@
+ exit(0);
+ }
+
++ cam->x = cam->vid_win.width;
++ cam->y = cam->vid_win.height;
+ }
+
+ void set_buffer(cam * cam)
+--- camorama-0.19/src/camorama-window.c~ 2007-09-16 15:36:55.000000000 +0200
++++ camorama-0.19/src/camorama-window.c 2009-06-23 20:19:16.000000000 +0200
+@@ -209,11 +209,7 @@ load_interface(cam* cam) {
+
+ logo = gtk_icon_theme_load_icon(gtk_icon_theme_get_for_screen(gtk_widget_get_screen(glade_xml_get_widget(cam->xml, "main_window"))), CAMORAMA_STOCK_WEBCAM, 24, 0, NULL);
+ gtk_window_set_default_icon(logo);
+- logo = (GdkPixbuf *) create_pixbuf (PACKAGE_DATA_DIR "/pixmaps/camorama.png");
+- if (logo == NULL) {
+- printf ("\n\nLOGO NO GO\n\n");
+- }
+-
++ logo = gtk_icon_theme_load_icon(gtk_icon_theme_get_for_screen(gtk_widget_get_screen(glade_xml_get_widget(cam->xml, "main_window"))), "camorama", 48, 0, NULL);
+ if (cam->show_adjustments == FALSE) {
+ gtk_widget_hide (glade_xml_get_widget
+ (cam->xml, "adjustments_table"));
diff --git a/media-video/camorama/files/camorama-0.19-gconf.patch b/media-video/camorama/files/camorama-0.19-gconf.patch
new file mode 100644
index 000000000000..5a1a19e9b576
--- /dev/null
+++ b/media-video/camorama/files/camorama-0.19-gconf.patch
@@ -0,0 +1,40 @@
+# Make camorama respect --disable-schemas-install configure switch
+# https://bugs.gentoo.org/show_bug.cgi?id=243274
+#
+# Makefile.am | 4 ++++
+# Makefile.in | 7 ++++---
+# 2 files changed, 8 insertions(+), 3 deletions(-)
+#
+#
+--- a/data/Makefile.am 2008-11-30 12:39:56.000000000 +0100
++++ b/data/Makefile.am 2008-11-30 12:41:33.000000000 +0100
+@@ -24,9 +24,13 @@
+ cp $(app_DATA) ~/.gnome/application-registry
+ cp $(keys_DATA) ~/.gnome/mime-info/
+
++if GCONF_SCHEMAS_INSTALL
+ install-data-local:
+ GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(schema_DATA)
+ $(GCONFTOOL) --shutdown
++else
++install-data-local:
++endif
+
+ EXTRA_DIST = $(glade_DATA) $(schema_in_files) $(stuff_DATA)
+
+--- a/data/Makefile.in 2008-11-30 12:41:10.000000000 +0100
++++ b/data/Makefile.in 2008-11-30 12:42:24.000000000 +0100
+@@ -448,9 +437,10 @@
+ cp $(app_DATA) ~/.gnome/application-registry
+ cp $(keys_DATA) ~/.gnome/mime-info/
+
+-install-data-local:
+- GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(schema_DATA)
+- $(GCONFTOOL) --shutdown
++@GCONF_SCHEMAS_INSTALL_TRUE@install-data-local:
++@GCONF_SCHEMAS_INSTALL_TRUE@ GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(schema_DATA)
++@GCONF_SCHEMAS_INSTALL_TRUE@ $(GCONFTOOL) --shutdown
++@GCONF_SCHEMAS_INSTALL_FALSE@install-data-local:
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
+ .NOEXPORT:
diff --git a/media-video/camorama/files/camorama-0.19-glib-232.patch b/media-video/camorama/files/camorama-0.19-glib-232.patch
new file mode 100644
index 000000000000..d6a76b8e45c2
--- /dev/null
+++ b/media-video/camorama/files/camorama-0.19-glib-232.patch
@@ -0,0 +1,24 @@
+diff -Nu a/src/camorama-stock-items.h b/src/camorama-stock-items.h
+--- a/src/camorama-stock-items.h 2007-06-14 16:05:33.000000000 +0200
++++ b/src/camorama-stock-items.h 2012-05-02 22:40:21.000000000 +0200
+@@ -1,7 +1,7 @@
+ #ifndef CAMORAMA_STOCK_ITEMS_H
+ #define CAMORAMA_STOCK_ITEMS_H
+
+-#include <glib/gmacros.h>
++#include <glib.h>
+
+ G_BEGIN_DECLS
+
+diff -Nu a/src/glib-helpers.h b/src/glib-helpers.h
+--- a/src/glib-helpers.h 2007-06-14 16:05:33.000000000 +0200
++++ b/src/glib-helpers.h 2012-05-02 22:46:06.000000000 +0200
+@@ -24,7 +24,7 @@
+ #ifndef GLIB_HELPERS_H
+ #define GLIB_HELPERS_H
+
+-#include <glib/gmacros.h>
++#include <glib.h>
+
+ G_BEGIN_DECLS
+
diff --git a/media-video/camorama/files/camorama-0.19-libv4l.patch b/media-video/camorama/files/camorama-0.19-libv4l.patch
new file mode 100644
index 000000000000..ada58fe7dd2f
--- /dev/null
+++ b/media-video/camorama/files/camorama-0.19-libv4l.patch
@@ -0,0 +1,198 @@
+http://cvs.fedoraproject.org/viewvc/rpms/camorama/devel/
+
+--- camorama-0.19/src/Makefile.am 2007-09-16 14:48:05.000000000 +0200
++++ camorama-0.19.new/src/Makefile.am 2009-06-24 15:01:37.000000000 +0200
+@@ -36,7 +36,7 @@
+ filter.h \
+ $(BUILT_SOURCES)\
+ $(NULL)
+-camorama_LDADD = $(PACKAGE_LIBS)
++camorama_LDADD = $(PACKAGE_LIBS) -lv4l1
+
+ DISTCLEANFILES=$(BUILT_SOURCES)
+
+--- camorama-0.19/src/Makefile.in 2007-10-06 21:06:28.000000000 +0200
++++ camorama-0.19.new/src/Makefile.in 2009-06-24 15:01:50.000000000 +0200
+@@ -248,7 +248,7 @@
+ $(BUILT_SOURCES)\
+ $(NULL)
+
+-camorama_LDADD = $(PACKAGE_LIBS)
++camorama_LDADD = $(PACKAGE_LIBS) -lv4l1
+ DISTCLEANFILES = $(BUILT_SOURCES)
+ all: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) all-am
+--- camorama-0.19/src/callbacks.c 2009-06-24 15:01:55.000000000 +0200
++++ camorama-0.19.new/src/callbacks.c 2009-06-24 14:55:42.000000000 +0200
+@@ -9,6 +9,7 @@
+ #include <libgnomeui/gnome-propertybox.h>
+ #include <libgnomeui/gnome-window-icon.h>
+ #include <pthread.h>
++#include <libv4l1.h>
+
+ extern GtkWidget *main_window, *prefswindow;
+ //extern state func_state;
+@@ -390,7 +391,7 @@
+
+ /*
+ * if(cam->read == FALSE) {
+- * cam->pic = mmap(0, cam->vid_buf.size, PROT_READ | PROT_WRITE, MAP_SHARED, cam->dev, 0);
++ * cam->pic = v4l1_mmap(0, cam->vid_buf.size, PROT_READ | PROT_WRITE, MAP_SHARED, cam->dev, 0);
+ *
+ * if((unsigned char *) -1 == (unsigned char *) cam->pic) {
+ * if(cam->debug == TRUE) {
+@@ -401,7 +402,7 @@
+ * }
+ * }else{
+ * cam->pic_buf = malloc(cam->x * cam->y * cam->depth);
+- * read(cam->dev,cam->pic,(cam->x * cam->y * 3));
++ * v4l1_read(cam->dev,cam->pic,(cam->x * cam->y * 3));
+ * }
+ */
+
+@@ -427,7 +428,7 @@
+ * if(cam->read == FALSE) {
+ * * for(frame = 0; frame < cam->vid_buf.frames; frame++) {
+ * * cam->vid_map.frame = frame;
+- * * if(ioctl(cam->dev, VIDIOCMCAPTURE, &cam->vid_map) < 0) {
++ * * if(v4l1_ioctl(cam->dev, VIDIOCMCAPTURE, &cam->vid_map) < 0) {
+ * * if(cam->debug == TRUE) {
+ * * fprintf(stderr, "Unable to capture image (VIDIOCMCAPTURE) during resize.\n");
+ * * }
+@@ -547,7 +548,7 @@
+ int i, count = 0;
+ GdkGC *gc;
+
+- read (cam->dev, cam->pic, (cam->x * cam->y * 3));
++ v4l1_read (cam->dev, cam->pic, (cam->x * cam->y * 3));
+ frames2++;
+ /*
+ * update_rec.x = 0;
+@@ -588,7 +589,7 @@
+
+ i = -1;
+ while (i < 0) {
+- i = ioctl (cam->dev, VIDIOCSYNC, &frame);
++ i = v4l1_ioctl (cam->dev, VIDIOCSYNC, &frame);
+
+ if (i < 0 && errno == EINTR) {
+ if (cam->debug == TRUE) {
+@@ -630,7 +631,7 @@
+ 0, cam->x, cam->y);
+
+ cam->vid_map.frame = frame;
+- if (ioctl (cam->dev, VIDIOCMCAPTURE, &cam->vid_map) < 0) {
++ if (v4l1_ioctl (cam->dev, VIDIOCMCAPTURE, &cam->vid_map) < 0) {
+ if (cam->debug == TRUE) {
+ fprintf (stderr, "Unable to capture image (VIDIOCMCAPTURE)\n");
+ }
+@@ -677,7 +678,7 @@
+ void init_cam (GtkWidget * capture, cam * cam)
+ {
+ cam->pic =
+- mmap (0, cam->vid_buf.size, PROT_READ | PROT_WRITE,
++ v4l1_mmap (0, cam->vid_buf.size, PROT_READ | PROT_WRITE,
+ MAP_SHARED, cam->dev, 0);
+
+ if ((unsigned char *) -1 == (unsigned char *) cam->pic) {
+@@ -692,7 +693,7 @@
+ cam->vid_map.format = cam->vid_pic.palette;
+ for (frame = 0; frame < cam->vid_buf.frames; frame++) {
+ cam->vid_map.frame = frame;
+- if (ioctl (cam->dev, VIDIOCMCAPTURE, &cam->vid_map) < 0) {
++ if (v4l1_ioctl (cam->dev, VIDIOCMCAPTURE, &cam->vid_map) < 0) {
+ if (cam->debug == TRUE) {
+ fprintf (stderr,
+ "Unable to capture image (VIDIOCMCAPTURE).\n");
+--- camorama-0.19/src/main.c 2009-06-24 15:01:55.000000000 +0200
++++ camorama-0.19.new/src/main.c 2009-06-24 14:59:35.000000000 +0200
+@@ -9,6 +9,7 @@
+ #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
+ #include <gdk-pixbuf-xlib/gdk-pixbuf-xlibrgb.h>
+ #include <locale.h>
++#include <libv4l1.h>
+
+ #include "camorama-display.h"
+ #include "camorama-stock-items.h"
+@@ -206,7 +207,7 @@
+ gdk_pixbuf_xlib_init (display, 0);
+ cam->desk_depth = xlib_rgb_get_depth ();
+
+- cam->dev = open (cam->video_dev, O_RDWR);
++ cam->dev = v4l1_open (cam->video_dev, O_RDWR);
+
+ camera_cap (cam);
+ get_win_info (cam);
+@@ -284,5 +285,8 @@
+
+ gtk_timeout_add (2000, (GSourceFunc) fps, cam->status);
+ gtk_main ();
++ v4l1_munmap(cam->pic, cam->vid_buf.size);
++ v4l1_close(cam->dev);
++
+ return 0;
+ }
+--- camorama-0.19/src/v4l.c 2009-06-24 15:01:55.000000000 +0200
++++ camorama-0.19.new/src/v4l.c 2009-06-24 14:54:09.000000000 +0200
+@@ -2,6 +2,7 @@
+ #include<time.h>
+ #include<errno.h>
+ #include<gnome.h>
++#include <libv4l1.h>
+ #include "support.h"
+
+ extern int frame_number;
+@@ -87,7 +88,7 @@
+ void camera_cap(cam * cam)
+ {
+ char *msg;
+- if(ioctl(cam->dev, VIDIOCGCAP, &cam->vid_cap) == -1) {
++ if(v4l1_ioctl(cam->dev, VIDIOCGCAP, &cam->vid_cap) == -1) {
+ if(cam->debug == TRUE) {
+ fprintf(stderr, "VIDIOCGCAP -- could not get camera capabilities, exiting.....\n");
+ }
+@@ -161,7 +162,7 @@
+ cam->vid_pic.palette = VIDEO_PALETTE_RGB24;
+ cam->vid_pic.depth = 24;
+ //cam->vid_pic.palette = VIDEO_PALETTE_YUV420P;
+- if(ioctl(cam->dev, VIDIOCSPICT, &cam->vid_pic) == -1) {
++ if(v4l1_ioctl(cam->dev, VIDIOCSPICT, &cam->vid_pic) == -1) {
+ if(cam->debug) {
+ g_message("VIDIOCSPICT -- could not set picture info, exiting....");
+ }
+@@ -176,7 +177,7 @@
+ //set_pic_info(cam);
+ char *msg;
+
+- if(ioctl(cam->dev, VIDIOCGPICT, &cam->vid_pic) == -1) {
++ if(v4l1_ioctl(cam->dev, VIDIOCGPICT, &cam->vid_pic) == -1) {
+ msg = g_strdup_printf(_("Could not connect to video device (%s).\nPlease check connection."), cam->video_dev);
+ error_dialog(msg);
+ if(cam->debug == TRUE) {
+@@ -201,7 +202,7 @@
+ void get_win_info(cam * cam)
+ {
+ gchar *msg;
+- if(ioctl(cam->dev, VIDIOCGWIN, &cam->vid_win) == -1) {
++ if(v4l1_ioctl(cam->dev, VIDIOCGWIN, &cam->vid_win) == -1) {
+ msg = g_strdup_printf(_("Could not connect to video device (%s).\nPlease check connection."), cam->video_dev);
+ error_dialog(msg);
+ if(cam->debug == TRUE) {
+@@ -222,7 +223,7 @@
+ void set_win_info(cam * cam)
+ {
+ gchar *msg;
+- if(ioctl(cam->dev, VIDIOCSWIN, &cam->vid_win) == -1) {
++ if(v4l1_ioctl(cam->dev, VIDIOCSWIN, &cam->vid_win) == -1) {
+ msg = g_strdup_printf(_("Could not connect to video device (%s).\nPlease check connection."), cam->video_dev);
+ error_dialog(msg);
+ if(cam->debug == TRUE) {
+@@ -239,7 +240,7 @@
+ void set_buffer(cam * cam)
+ {
+ char *msg;
+- if(ioctl(cam->dev, VIDIOCGMBUF, &cam->vid_buf) == -1) {
++ if(v4l1_ioctl(cam->dev, VIDIOCGMBUF, &cam->vid_buf) == -1) {
+ msg = g_strdup_printf(_("Could not connect to video device (%s).\nPlease check connection."), cam->video_dev);
+ error_dialog(msg);
+ if(cam->debug == TRUE) {
diff --git a/media-video/camorama/files/camorama-0.19-no-more-videodev_h.patch b/media-video/camorama/files/camorama-0.19-no-more-videodev_h.patch
new file mode 100644
index 000000000000..84c8f68ba72b
--- /dev/null
+++ b/media-video/camorama/files/camorama-0.19-no-more-videodev_h.patch
@@ -0,0 +1,14 @@
+http://pkgs.fedoraproject.org/gitweb/?p=camorama.git;a=blob_plain;f=camorama-0.19-no-more-videodev_h.patch;hb=HEAD
+
+--- src/v4l.h
++++ src/v4l.h
+@@ -12,8 +12,7 @@
+ #include <sys/mman.h>
+ #include <fcntl.h>
+ #include <gtk/gtk.h>
+-#include <linux/types.h>
+-#include <linux/videodev.h>
++#include <libv4l1.h>
+ #include <signal.h>
+ #include <png.h>
+ #include <glade/glade.h>
diff --git a/media-video/camorama/metadata.xml b/media-video/camorama/metadata.xml
new file mode 100644
index 000000000000..2c5e04917119
--- /dev/null
+++ b/media-video/camorama/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>video</herd>
+<maintainer>
+ <email>media-video@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/media-video/ccextractor/Manifest b/media-video/ccextractor/Manifest
new file mode 100644
index 000000000000..02e77b93c0a8
--- /dev/null
+++ b/media-video/ccextractor/Manifest
@@ -0,0 +1,3 @@
+DIST ccextractor-0.59-src.zip 168198 SHA256 13ca427527661e99f156c72ebd09b5bb4eb735904a83c2b3eb3f8aec66425ecb
+DIST ccextractor.src.0.68.zip 927590 SHA256 b4d711b88995bbf4e22b70076b802b162fcaca3eff95263e01ed502edc7dbd00 SHA512 c73eb007db7058cf17a818cd5bdf20dfb6f6f3585f55d9f7f1b894aaedcc6b74ac0c2b34b517b44491cdefe2fe7b1fc0035802326b61f7f6330acdb854b8c2ad WHIRLPOOL 4d6b245212f37d79076fc6afe6bdd4bc754c6ffb5c94559aea1f1428270de395daf7720e8cf7d346681975cb68d8357ef2aaed326a59d9a37eea7d7ddc157f3b
+DIST ccextractor.src.0.69.zip 940531 SHA256 bfb6d1174e7a440a624f39ade3c9b9ccbdebb9111ec308578d68aba89a8ec50a SHA512 51c3218a9a8e88aa86acfdd0cbd51bc52a734bde77dbea32c7e2a0f63835b25e0e86ea4b228564e5e996a5a19c74d5513d057bf510c324280f0c155a96b77775 WHIRLPOOL f27c377ab7f535900f858f138867cc8d12b76b05bc2eabbd0309c4ffcd7cd19865f419d4f0fe2b8bd1b480a6594f4a8a0104212fba6923da126b56ed31425c96
diff --git a/media-video/ccextractor/ccextractor-0.59.ebuild b/media-video/ccextractor/ccextractor-0.59.ebuild
new file mode 100644
index 000000000000..bc594baafecc
--- /dev/null
+++ b/media-video/ccextractor/ccextractor-0.59.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit toolchain-funcs
+
+DESCRIPTION="Extract closed captioning subtitles from video to SRT"
+HOMEPAGE="http://ccextractor.sourceforge.net/"
+SRC_URI="mirror://sourceforge/ccextractor/${P}-src.zip"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND="app-arch/unzip"
+
+S="${WORKDIR}/${PN}"
+
+src_compile() {
+ cd src
+ $(tc-getCXX) ${CXXFLAGS} ${LDFLAGS} -D_FILE_OFFSET_BITS=64 -o ccextractor *.cpp || die
+}
+
+src_install() {
+ dobin src/ccextractor
+ dodoc docs/*.TXT
+}
diff --git a/media-video/ccextractor/ccextractor-0.68.ebuild b/media-video/ccextractor/ccextractor-0.68.ebuild
new file mode 100644
index 000000000000..c5abf7af2885
--- /dev/null
+++ b/media-video/ccextractor/ccextractor-0.68.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Extract closed captioning subtitles from video to SRT"
+HOMEPAGE="http://ccextractor.sourceforge.net/"
+SRC_URI="mirror://sourceforge/ccextractor/${PN}.src.${PV}.zip"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="app-arch/unzip
+ media-libs/libpng
+ sys-libs/zlib"
+
+S="${WORKDIR}/${PN}.${PV}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-libpng.patch" || die
+ rm -r src/libpng src/zlib || die
+}
+
+src_compile() {
+ cd src
+ $(tc-getCXX) ${CXXFLAGS} ${LDFLAGS} -DHAVE_LIBPNG -DGPAC_CONFIG_LINUX -D_FILE_OFFSET_BITS=64 -Igpacmp4/ -o ccextractor $(find . -name '*.cpp') $(find . -name '*.c') -lpng || die
+}
+
+src_install() {
+ dobin src/ccextractor
+ dodoc docs/*.TXT
+}
diff --git a/media-video/ccextractor/ccextractor-0.69.ebuild b/media-video/ccextractor/ccextractor-0.69.ebuild
new file mode 100644
index 000000000000..26e2145ebb9c
--- /dev/null
+++ b/media-video/ccextractor/ccextractor-0.69.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Extract closed captioning subtitles from video to SRT"
+HOMEPAGE="http://ccextractor.sourceforge.net/"
+SRC_URI="mirror://sourceforge/ccextractor/${PN}.src.${PV}.zip"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="app-arch/unzip
+ media-libs/libpng
+ sys-libs/zlib"
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ rm -r src/libpng src/zlib || die
+}
+
+src_compile() {
+ cd src
+ $(tc-getCXX) ${CXXFLAGS} ${LDFLAGS} -DHAVE_LIBPNG -DGPAC_CONFIG_LINUX -D_FILE_OFFSET_BITS=64 -Igpacmp4/ -o ccextractor $(find . -name '*.cpp') $(find . -name '*.c') -lpng || die
+}
+
+src_install() {
+ dobin src/ccextractor
+ dodoc docs/*.TXT
+}
diff --git a/media-video/ccextractor/files/ccextractor-0.68-libpng.patch b/media-video/ccextractor/files/ccextractor-0.68-libpng.patch
new file mode 100644
index 000000000000..518d434df369
--- /dev/null
+++ b/media-video/ccextractor/files/ccextractor-0.68-libpng.patch
@@ -0,0 +1,11 @@
+--- src/608_spupng.cpp.orig 2014-03-19 10:32:47.578960867 -0600
++++ src/608_spupng.cpp 2014-03-19 10:33:00.692179157 -0600
+@@ -490,7 +490,7 @@
+ {
+ unsigned int i;
+
+- if (setjmp (png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(png_ptr)))
+ return 0;
+
+ png_init_io (png_ptr, fppng); \ No newline at end of file
diff --git a/media-video/ccextractor/metadata.xml b/media-video/ccextractor/metadata.xml
new file mode 100644
index 000000000000..76d8e402b9f1
--- /dev/null
+++ b/media-video/ccextractor/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <longdescription lang="en">
+A tool that analyzes video files and produces independent subtitle files from the closed captions data. Exports to SRT subtitle format.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">ccextractor</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/cclive/Manifest b/media-video/cclive/Manifest
new file mode 100644
index 000000000000..1bdf4cee1256
--- /dev/null
+++ b/media-video/cclive/Manifest
@@ -0,0 +1 @@
+DIST cclive-0.9.3.tar.xz 296720 SHA256 2edeaf5d76455723577e0b593f0322a97f1e0c8b0cffcc70eca8b5d17374a495 SHA512 0d8f6f870e24e2906542c1e02745009597fca2e879261bef7a81e07f8dec016ee200d8a4b37dd0f20b3ad27c12e2445fed1f6a9dc262a6c27e40222048bb5438 WHIRLPOOL 441a3ef5e7c7633c91b4761a1f728998997648ebb6a7984e6a1dafea418a8863be76ffff7dc3e3727ddff81d4ed5f16d5454fb0e0b84c3dcea7e8214f27f8d35
diff --git a/media-video/cclive/cclive-0.9.3-r1.ebuild b/media-video/cclive/cclive-0.9.3-r1.ebuild
new file mode 100644
index 000000000000..e911be3df68f
--- /dev/null
+++ b/media-video/cclive/cclive-0.9.3-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
+
+inherit eutils
+
+DESCRIPTION="Command line tool for extracting videos from various websites"
+HOMEPAGE="http://cclive.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PV:0:3}/${P}.tar.xz"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~ppc64 x86"
+
+RDEPEND=">=media-libs/libquvi-0.4.0
+ >=dev-cpp/glibmm-2.24:2
+ >=dev-libs/boost-1.49
+ >=dev-libs/glib-2.24:2
+ >=net-misc/curl-7.20
+ >=dev-libs/libpcre-8.02[cxx]"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-iostream.patch #527658
+}
+
+src_configure() {
+ econf --disable-ccl
+}
diff --git a/media-video/cclive/files/cclive-0.9.3-iostream.patch b/media-video/cclive/files/cclive-0.9.3-iostream.patch
new file mode 100644
index 000000000000..f7bfd074919f
--- /dev/null
+++ b/media-video/cclive/files/cclive-0.9.3-iostream.patch
@@ -0,0 +1,80 @@
+https://github.com/legatvs/cclive/pull/2
+
+From dcaed542d002cbf857e0bca1fa12f8ab501c419a Mon Sep 17 00:00:00 2001
+From: Alexandre Rostovtsev <tetromino@gentoo.org>
+Date: Fri, 26 Dec 2014 13:49:36 -0500
+Subject: [PATCH] Add explicit <iostream> includes, fixes build with Boost 1.56
+
+See https://bugs.gentoo.org/show_bug.cgi?id=527658 and
+https://bugs.gentoo.org/show_bug.cgi?id=533506
+---
+ src/cc/error.h | 1 +
+ src/cc/input.h | 1 +
+ src/cc/log.h | 1 +
+ src/cc/options.h | 1 +
+ src/cc/sig.h | 1 +
+ 5 files changed, 5 insertions(+)
+
+diff --git a/src/cc/error.h b/src/cc/error.h
+index c1d80ab..f6a3e6d 100644
+--- a/src/cc/error.h
++++ b/src/cc/error.h
+@@ -28,6 +28,7 @@
+ #include <boost/exception/get_error_info.hpp>
+ #include <boost/exception/errinfo_errno.hpp>
+ #include <boost/tuple/tuple.hpp>
++#include <iostream>
+ #include <cerrno>
+
+ namespace cc
+diff --git a/src/cc/input.h b/src/cc/input.h
+index 98c334b..523e9fe 100644
+--- a/src/cc/input.h
++++ b/src/cc/input.h
+@@ -23,6 +23,7 @@
+
+ #include <ccinternal>
+
++#include <iostream>
+ #include <istream>
+ #include <sstream>
+
+diff --git a/src/cc/log.h b/src/cc/log.h
+index 2b2c986..aaf3b32 100644
+--- a/src/cc/log.h
++++ b/src/cc/log.h
+@@ -25,6 +25,7 @@
+
+ #include <boost/iostreams/filtering_stream.hpp>
+ #include <boost/filesystem.hpp>
++#include <iostream>
+ #include <fstream>
+
+ #include <ccerror>
+diff --git a/src/cc/options.h b/src/cc/options.h
+index 6c45ce8..6a7e40c 100644
+--- a/src/cc/options.h
++++ b/src/cc/options.h
+@@ -37,6 +37,7 @@
+ #include <boost/filesystem.hpp>
+ #include <boost/foreach.hpp>
+ #include <boost/format.hpp>
++#include <iostream>
+ #include <fstream>
+
+ #include <ccerror>
+diff --git a/src/cc/sig.h b/src/cc/sig.h
+index 56de768..cca23ad 100644
+--- a/src/cc/sig.h
++++ b/src/cc/sig.h
+@@ -26,6 +26,7 @@
+ #include <sys/ioctl.h>
+ #include <sys/types.h>
+ #include <unistd.h>
++#include <iostream>
+ #include <csignal>
+ #include <cstdio>
+
+--
+2.2.1
+
diff --git a/media-video/cclive/metadata.xml b/media-video/cclive/metadata.xml
new file mode 100644
index 000000000000..318029858c42
--- /dev/null
+++ b/media-video/cclive/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>video</herd>
+ <longdescription lang="en">
+ Command line tool for extracting videos from Youtube, Google Video,
+ Dailymotion, Guba (free) and Stage6 websites
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">cclive</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/chaplin/Manifest b/media-video/chaplin/Manifest
new file mode 100644
index 000000000000..e68e2e5cc17d
--- /dev/null
+++ b/media-video/chaplin/Manifest
@@ -0,0 +1 @@
+DIST chaplin-1.10.tgz 23843 RMD160 2a24075486edd52b5ed24254b5ff9a8d845bf4fc SHA1 864fe0942998f79044f3cb3ce8decc8831edbcfe SHA256 064d3226d003477ae81273cee3870b5797f647623f67eb05e5c1e2e910d89228
diff --git a/media-video/chaplin/chaplin-1.10-r1.ebuild b/media-video/chaplin/chaplin-1.10-r1.ebuild
new file mode 100644
index 000000000000..fed2d9681c7b
--- /dev/null
+++ b/media-video/chaplin/chaplin-1.10-r1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils toolchain-funcs
+
+DESCRIPTION="This is a program to raw copy chapters from a dvd using libdvdread"
+HOMEPAGE="http://www.lallafa.de/bp/chaplin.html"
+SRC_URI="http://www.lallafa.de/bp/files/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="transcode vcd"
+
+DEPEND=">=media-libs/libdvdread-0.9.4"
+RDEPEND="${DEPEND}
+ || ( media-gfx/imagemagick media-gfx/graphicsmagick[imagemagick] )
+ media-video/mjpegtools
+ transcode? ( >=media-video/transcode-0.6.2 )
+ vcd? ( >=media-video/vcdimager-0.7.2 )"
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-libdvdread-0.9.6.patch \
+ "${FILESDIR}"/${P}-asneeded.patch
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ dobin chaplin chaplin-genmenu
+}
diff --git a/media-video/chaplin/files/chaplin-1.10-asneeded.patch b/media-video/chaplin/files/chaplin-1.10-asneeded.patch
new file mode 100644
index 000000000000..f7cb499407a8
--- /dev/null
+++ b/media-video/chaplin/files/chaplin-1.10-asneeded.patch
@@ -0,0 +1,15 @@
+--- chaplin.orig/Makefile 2004-03-21 18:44:18.000000000 +0100
++++ chaplin/Makefile 2009-10-25 18:34:26.082229887 +0100
+@@ -6,10 +6,10 @@
+ all: build
+
+ build:
+- gcc -DNDEBUG -Wall -I$(LIBDVDREAD)/include -L$(LIBDVDREAD)/lib -ldvdread -Wl,-rpath,$(LIBDVDREAD)/lib -o chaplin chaplin.c -lm
++ $(CC) $(CFLAGS) $(LDFLAGS) -DNDEBUG -Wall -I$(LIBDVDREAD)/include -Wl,-rpath,$(LIBDVDREAD)/lib -o chaplin chaplin.c -L$(LIBDVDREAD)/lib -ldvdread -lm
+
+ debug:
+- gcc -Wall -I$(LIBDVDREAD)/include -L$(LIBDVDREAD)/lib -ldvdread -Wl,-rpath,$(LIBDVDREAD)/lib -o chaplin chaplin.c -lm
++ $(CC) $(CFLAGS) $(LDFLAGS) -Wall -I$(LIBDVDREAD)/include -Wl,-rpath,$(LIBDVDREAD)/lib -o chaplin chaplin.c -L$(LIBDVDREAD)/lib -ldvdread -lm
+
+ dist:
+ cd .. ; tar cvfz chaplin.tgz chaplin/Makefile chaplin/chaplin.c chaplin/chaplin-genmenu chaplin/chaplin
diff --git a/media-video/chaplin/files/chaplin-1.10-libdvdread-0.9.6.patch b/media-video/chaplin/files/chaplin-1.10-libdvdread-0.9.6.patch
new file mode 100644
index 000000000000..7e68dd67a692
--- /dev/null
+++ b/media-video/chaplin/files/chaplin-1.10-libdvdread-0.9.6.patch
@@ -0,0 +1,11 @@
+diff -N -u -r chaplin/chaplin.c chaplin-new/chaplin.c
+--- chaplin/chaplin.c 2004-03-21 18:45:44.000000000 +0100
++++ chaplin-new/chaplin.c 2006-06-29 22:36:54.457745979 +0200
+@@ -18,6 +18,7 @@
+ #include <ctype.h>
+ #include <string.h>
+ #include <math.h>
++#include <inttypes.h>
+
+ /* libdvdread stuff */
+ #include <dvdread/dvd_reader.h>
diff --git a/media-video/chaplin/metadata.xml b/media-video/chaplin/metadata.xml
new file mode 100644
index 000000000000..6cd197348689
--- /dev/null
+++ b/media-video/chaplin/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="transcode">Enable DVD ripping and transcoding</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-video/cheese/Manifest b/media-video/cheese/Manifest
new file mode 100644
index 000000000000..dee6b3f268a4
--- /dev/null
+++ b/media-video/cheese/Manifest
@@ -0,0 +1,3 @@
+DIST cheese-3.12.2.tar.xz 1777924 SHA256 a7b45369e75e222e3bd5e9a4408a0e6c230be0c49d359a387d36a42e17e3bc64 SHA512 4548ac903cc435f8ab5e55fbf684239d9a8da2413448506a1bfd6a387348e9b8b08dc3f292e8eff5bab3491ff079cadcb901f82fd42dadd75b801e154a15cdf3 WHIRLPOOL a8312e428771059cbdc982e458bb119af507e2a667f2af9743cdfe2ed6a25829432e7ea7a5dca27932999b7f3ab1cf16f99a0b31cec8f9094fd9941b85b57dfb
+DIST cheese-3.14.2.tar.xz 1804900 SHA256 3074a567e0080d7b8fc0512bf3b08c3397e38083cce1767104624288f033a517 SHA512 cf89baab6858bd2fa100e4dec24067d0bcc49f27632331b99a4f442f235ffca14630af2bf11317cbdc3850202c71bab1920101b9190091c2f0ff9bd4274c0753 WHIRLPOOL 7c909d3d991d97b674a0edd48e639e11d1c81eb9b938861c6f5555f722785f1f9c5b6a74ca79820d6c7bb24ba159154fc402a19248dcadcc1e3aea444b11bc4e
+DIST cheese-3.16.1.tar.xz 1823864 SHA256 44622f6ad6d8703b22c6d40219ae317959495ccc9994b563b324592933ff90a0 SHA512 c5af1fb76b53e8f1331f5e30052c05f5555eb6baf1c6e0a3b63c962e99507c83240175b5e1d84817425a34f0f1ebd3c51ea126799873390685f61ae4a7add043 WHIRLPOOL 901cd41f7923d456f7f7f78ac248014e9223eba41e3560e3198c160250b9c148bb1c35dd2c22df6560b97c30a2ba278c54dbc626b752100de473561bd1e77785
diff --git a/media-video/cheese/cheese-3.12.2-r1.ebuild b/media-video/cheese/cheese-3.12.2-r1.ebuild
new file mode 100644
index 000000000000..379a9859f9f7
--- /dev/null
+++ b/media-video/cheese/cheese-3.12.2-r1.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+VALA_MIN_API_VERSION="0.24"
+
+inherit gnome2 vala virtualx
+
+DESCRIPTION="A cheesy program to take pictures and videos from your webcam"
+HOMEPAGE="https://wiki.gnome.org/Apps/Cheese"
+
+LICENSE="GPL-2+"
+SLOT="0/7" # subslot = libcheese soname version
+IUSE="+introspection test"
+KEYWORDS="~alpha amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc x86"
+
+# using clutter-gst-2.0.0 results in GLSL errors; bug #478702
+COMMON_DEPEND="
+ >=dev-libs/glib-2.39.90:2
+ >=x11-libs/gtk+-3.10:3[introspection?]
+ >=x11-libs/cairo-1.10:=
+ >=x11-libs/pango-1.28.0
+ >=gnome-base/gnome-desktop-2.91.6:3=
+ >=gnome-base/librsvg-2.32.0:2
+ >=media-libs/libcanberra-0.26[gtk3]
+ >=media-libs/clutter-1.13.2:1.0[introspection?]
+ >=media-libs/clutter-gtk-0.91.8:1.0
+ >=media-libs/clutter-gst-2.0.6:2.0
+ media-libs/cogl:1.0=[introspection?]
+
+ media-video/gnome-video-effects
+ x11-libs/gdk-pixbuf:2[jpeg,introspection?]
+ x11-libs/libX11
+ x11-libs/libXtst
+
+ media-libs/gstreamer:1.0[introspection?]
+ media-libs/gst-plugins-base:1.0[introspection?,ogg,pango,theora,vorbis,X]
+
+ virtual/libgudev:=
+ introspection? ( >=dev-libs/gobject-introspection-0.6.7 )
+"
+RDEPEND="${COMMON_DEPEND}
+ media-libs/gst-plugins-bad:1.0
+ media-libs/gst-plugins-good:1.0
+
+ media-plugins/gst-plugins-jpeg:1.0
+ media-plugins/gst-plugins-v4l2:1.0
+ media-plugins/gst-plugins-vpx:1.0
+"
+DEPEND="${COMMON_DEPEND}
+ $(vala_depend)
+ app-text/docbook-xml-dtd:4.3
+ app-text/yelp-tools
+ dev-libs/libxml2:2
+ >=dev-util/gtk-doc-am-1.14
+ >=dev-util/intltool-0.50
+ virtual/pkgconfig
+ x11-proto/xf86vidmodeproto
+ test? ( dev-libs/glib:2[utils] )
+"
+
+src_prepare() {
+ # FIXME: looks like a regression from an underlying library
+ sed -e 's|\(g_test_add_func.*photo_path.*;\)|/*\1*/|' \
+ -e 's|\(g_test_add_func.*video_path.*;\)|/*\1*/|' \
+ -i "${S}"/tests/test-libcheese.c || die
+
+ vala_src_prepare
+ gnome2_src_prepare
+}
+
+src_configure() {
+ gnome2_src_configure \
+ GST_INSPECT=$(type -P true) \
+ $(use_enable introspection) \
+ --disable-lcov \
+ --disable-static \
+ ITSTOOL=$(type -P true)
+}
+
+src_compile() {
+ # Clutter-related sandbox violations when USE="doc introspection" and
+ # FEATURES="-userpriv" (see bug #385917).
+ unset DISPLAY
+ gnome2_src_compile
+}
+
+src_test() {
+ Xemake check
+}
diff --git a/media-video/cheese/cheese-3.14.2.ebuild b/media-video/cheese/cheese-3.14.2.ebuild
new file mode 100644
index 000000000000..027a716dc2d8
--- /dev/null
+++ b/media-video/cheese/cheese-3.14.2.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+VALA_MIN_API_VERSION="0.26"
+
+inherit gnome2 vala virtualx
+
+DESCRIPTION="A cheesy program to take pictures and videos from your webcam"
+HOMEPAGE="https://wiki.gnome.org/Apps/Cheese"
+
+LICENSE="GPL-2+"
+SLOT="0/7" # subslot = libcheese soname version
+IUSE="+introspection test"
+KEYWORDS="amd64 ~arm ~ia64 ~ppc ~ppc64 x86"
+
+# using clutter-gst-2.0.0 results in GLSL errors; bug #478702
+COMMON_DEPEND="
+ >=dev-libs/glib-2.39.90:2
+ >=x11-libs/gtk+-3.13.4:3[introspection?]
+ >=gnome-base/gnome-desktop-2.91.6:3=
+ >=media-libs/libcanberra-0.26[gtk3]
+ >=media-libs/clutter-1.13.2:1.0[introspection?]
+ >=media-libs/clutter-gtk-0.91.8:1.0
+ >=media-libs/clutter-gst-2.0.6:2.0
+ media-libs/cogl:1.0=[introspection?]
+
+ media-video/gnome-video-effects
+ x11-libs/gdk-pixbuf:2[jpeg,introspection?]
+ x11-libs/libX11
+ x11-libs/libXtst
+
+ media-libs/gstreamer:1.0[introspection?]
+ media-libs/gst-plugins-base:1.0[introspection?,ogg,pango,theora,vorbis,X]
+
+ virtual/libgudev:=
+ introspection? ( >=dev-libs/gobject-introspection-0.6.7 )
+"
+RDEPEND="${COMMON_DEPEND}
+ media-libs/gst-plugins-bad:1.0
+ media-libs/gst-plugins-good:1.0
+
+ media-plugins/gst-plugins-jpeg:1.0
+ media-plugins/gst-plugins-v4l2:1.0
+ media-plugins/gst-plugins-vpx:1.0
+"
+DEPEND="${COMMON_DEPEND}
+ $(vala_depend)
+ app-text/docbook-xml-dtd:4.3
+ app-text/yelp-tools
+ dev-libs/appstream-glib
+ dev-libs/libxml2:2
+ dev-util/gdbus-codegen
+ >=dev-util/gtk-doc-am-1.14
+ >=dev-util/intltool-0.50
+ virtual/pkgconfig
+ x11-proto/xf86vidmodeproto
+ test? ( dev-libs/glib:2[utils] )
+"
+
+src_prepare() {
+ vala_src_prepare
+ gnome2_src_prepare
+}
+
+src_configure() {
+ gnome2_src_configure \
+ GST_INSPECT=$(type -P true) \
+ $(use_enable introspection) \
+ --disable-lcov \
+ --disable-static \
+ ITSTOOL=$(type -P true)
+}
+
+src_compile() {
+ # Clutter-related sandbox violations when USE="doc introspection" and
+ # FEATURES="-userpriv" (see bug #385917).
+ unset DISPLAY
+ gnome2_src_compile
+}
+
+src_test() {
+ Xemake check
+}
diff --git a/media-video/cheese/cheese-3.16.1.ebuild b/media-video/cheese/cheese-3.16.1.ebuild
new file mode 100644
index 000000000000..3eff6f955dd1
--- /dev/null
+++ b/media-video/cheese/cheese-3.16.1.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+VALA_MIN_API_VERSION="0.26"
+
+inherit gnome2 vala virtualx
+
+DESCRIPTION="A cheesy program to take pictures and videos from your webcam"
+HOMEPAGE="https://wiki.gnome.org/Apps/Cheese"
+
+LICENSE="GPL-2+"
+SLOT="0/7" # subslot = libcheese soname version
+IUSE="+introspection test"
+KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~ppc64 ~x86"
+
+# using clutter-gst-2.0.0 results in GLSL errors; bug #478702
+COMMON_DEPEND="
+ >=dev-libs/glib-2.39.90:2
+ >=x11-libs/gtk+-3.13.4:3[introspection?]
+ >=gnome-base/gnome-desktop-2.91.6:3=
+ >=media-libs/libcanberra-0.26[gtk3]
+ >=media-libs/clutter-1.13.2:1.0[introspection?]
+ >=media-libs/clutter-gtk-0.91.8:1.0
+ >=media-libs/clutter-gst-2.0.6:2.0
+ media-libs/cogl:1.0=[introspection?]
+
+ media-video/gnome-video-effects
+ x11-libs/gdk-pixbuf:2[jpeg,introspection?]
+ x11-libs/libX11
+ x11-libs/libXtst
+
+ media-libs/gstreamer:1.0[introspection?]
+ media-libs/gst-plugins-base:1.0[introspection?,ogg,pango,theora,vorbis,X]
+
+ virtual/libgudev:=
+ introspection? ( >=dev-libs/gobject-introspection-0.6.7 )
+"
+RDEPEND="${COMMON_DEPEND}
+ media-libs/gst-plugins-bad:1.0
+ media-libs/gst-plugins-good:1.0
+
+ media-plugins/gst-plugins-jpeg:1.0
+ media-plugins/gst-plugins-v4l2:1.0
+ media-plugins/gst-plugins-vpx:1.0
+"
+DEPEND="${COMMON_DEPEND}
+ $(vala_depend)
+ app-text/docbook-xml-dtd:4.3
+ app-text/yelp-tools
+ dev-libs/appstream-glib
+ dev-libs/libxml2:2
+ dev-util/gdbus-codegen
+ >=dev-util/gtk-doc-am-1.14
+ >=dev-util/intltool-0.50
+ virtual/pkgconfig
+ x11-proto/xf86vidmodeproto
+ test? ( dev-libs/glib:2[utils] )
+"
+
+src_prepare() {
+ vala_src_prepare
+ gnome2_src_prepare
+}
+
+src_configure() {
+ gnome2_src_configure \
+ GST_INSPECT=$(type -P true) \
+ $(use_enable introspection) \
+ --disable-lcov \
+ --disable-static \
+ ITSTOOL=$(type -P true)
+}
+
+src_compile() {
+ # Clutter-related sandbox violations when USE="doc introspection" and
+ # FEATURES="-userpriv" (see bug #385917).
+ unset DISPLAY
+ gnome2_src_compile
+}
+
+src_test() {
+ Xemake check
+}
diff --git a/media-video/cheese/metadata.xml b/media-video/cheese/metadata.xml
new file mode 100644
index 000000000000..d9b68e42d737
--- /dev/null
+++ b/media-video/cheese/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>gnome</herd>
+ <longdescription lang="en">
+ Cheese uses your webcam to take photos and videos, applies fancy special
+ effects, and lets you share the fun with others.
+ </longdescription>
+</pkgmetadata>
+
diff --git a/media-video/cinelerra/Manifest b/media-video/cinelerra/Manifest
new file mode 100644
index 000000000000..29c9ef5ad5e4
--- /dev/null
+++ b/media-video/cinelerra/Manifest
@@ -0,0 +1,2 @@
+DIST cinelerra-20120707.tar.xz 22542220 SHA256 b909531fd1f5a11b85463ea06a62f703f2be67cbe79cd90c035d569a3019f5ad SHA512 af5ed92c223c1e0658ea3320aeefb568b94299ec14947e422f845b72bb271e7592142ac3d119daa9ce2a1b15e708d5ae2214a051f6d4ba67bd3ec733fc607171 WHIRLPOOL add200da410aafb3ad8bd6113061ba055a57978b4f9b717275b0c22375968e7aaa6c5c5a1d0f1ce2c4da3a630b9218fe2e5ae795b30bdfbfb532a3d793fd6065
+DIST cinelerra-20140710.tar.xz 24843336 SHA256 3a7c72e68c7fa8d20f0186bd9460453973e2ffdccc9e0fff1fd9114610361ff2 SHA512 ede8e3888c24022802b45909b8977ec449262f17bd488bf1fab9885b3cb76fa0a66f82e780e204bde2cd3e1da2952aec927d733f21b9883601f128478eeb81db WHIRLPOOL cf56e7f3531ff4f6e2d350bb5fc247f71106f60f016dc20fc7e73556cd05dd97c812b61709109210f76e30c67552e03f9927a52e92f6ce6d83227438cdc4314b
diff --git a/media-video/cinelerra/cinelerra-20120707.ebuild b/media-video/cinelerra/cinelerra-20120707.ebuild
new file mode 100644
index 000000000000..eaee626918c6
--- /dev/null
+++ b/media-video/cinelerra/cinelerra-20120707.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils multilib flag-o-matic
+
+DESCRIPTION="The most advanced non-linear video editor and compositor"
+HOMEPAGE="http://www.cinelerra.org/"
+SRC_URI="mirror://gentoo/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="cpu_flags_x86_3dnow alsa altivec css ieee1394 cpu_flags_x86_mmx opengl oss"
+
+RDEPEND="media-libs/a52dec:=
+ media-libs/faac:=
+ media-libs/faad2:=
+ >=media-libs/freetype-2
+ media-libs/libdv:=
+ >=media-libs/libogg-1.2:=
+ media-libs/libpng:0=
+ media-libs/libsndfile:=
+ >=media-libs/libtheora-1.1:=
+ >=media-libs/libvorbis-1.3:=
+ >=media-libs/openexr-1.5:=
+ media-libs/tiff:0=
+ media-libs/x264:=
+ media-sound/lame:=
+ >=media-video/mjpegtools-2
+ >=sci-libs/fftw-3
+ x11-libs/libX11:=
+ x11-libs/libXext:=
+ x11-libs/libXft:=
+ x11-libs/libXv:=
+ x11-libs/libXvMC:=
+ x11-libs/libXxf86vm:=
+ virtual/ffmpeg
+ || ( media-video/ffmpeg:0 media-libs/libpostproc )
+ virtual/jpeg:0
+ alsa? ( media-libs/alsa-lib:= )
+ ieee1394? (
+ media-libs/libiec61883:=
+ >=sys-libs/libraw1394-1.2.0:=
+ >=sys-libs/libavc1394-0.5.0:=
+ )
+ opengl? (
+ virtual/glu
+ virtual/opengl
+ )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig
+ cpu_flags_x86_mmx? ( dev-lang/nasm )"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-entry.patch \
+ "${FILESDIR}"/${PN}-ffmpeg.patch \
+ "${FILESDIR}"/${PN}-underlinking.patch \
+ "${FILESDIR}"/${PN}-ffmpeg-0.11.patch \
+ "${FILESDIR}"/${PN}-std_and_str_h.patch \
+ "${FILESDIR}"/${PN}-libav9.patch
+
+ if has_version '>=media-video/ffmpeg-2' ; then
+ epatch "${FILESDIR}"/${PN}-ffmpeg2.patch
+ fi
+
+ eautoreconf
+}
+
+src_configure() {
+ append-cppflags -D__STDC_CONSTANT_MACROS #321945
+ append-ldflags -Wl,-z,noexecstack #212959
+
+ econf \
+ $(use_enable oss) \
+ $(use_enable alsa) \
+ --disable-esd \
+ $(use_enable ieee1394 firewire) \
+ $(use_enable css) \
+ $(use_enable cpu_flags_x86_mmx mmx) \
+ $(use_enable cpu_flags_x86_3dnow 3dnow) \
+ $(use_enable altivec) \
+ $(use_enable opengl) \
+ --with-plugindir=/usr/$(get_libdir)/${PN} \
+ --with-buildinfo=cust/"Gentoo - ${PV}" \
+ --with-external-ffmpeg
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dohtml -a png,html,texi,sdw -r doc/*
+
+ rm -rf "${D}"/usr/include
+ mv -vf "${D}"/usr/bin/mpeg3cat{,.hv} || die
+ mv -vf "${D}"/usr/bin/mpeg3dump{,.hv} || die
+ mv -vf "${D}"/usr/bin/mpeg3toc{,.hv} || die
+ dosym /usr/bin/mpeg2enc /usr/$(get_libdir)/${PN}/mpeg2enc.plugin
+
+ prune_libtool_files --all
+}
diff --git a/media-video/cinelerra/cinelerra-20140710.ebuild b/media-video/cinelerra/cinelerra-20140710.ebuild
new file mode 100644
index 000000000000..6574dea8929a
--- /dev/null
+++ b/media-video/cinelerra/cinelerra-20140710.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils multilib flag-o-matic
+
+DESCRIPTION="The most advanced non-linear video editor and compositor"
+HOMEPAGE="http://www.cinelerra.org/"
+SRC_URI="http://dev.gentoo.org/~ssuominen/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="cpu_flags_x86_3dnow alsa altivec css debug ieee1394 cpu_flags_x86_mmx opengl oss"
+
+RDEPEND="media-libs/a52dec:=
+ media-libs/faac:=
+ media-libs/faad2:=
+ >=media-libs/freetype-2
+ media-libs/libdv:=
+ >=media-libs/libogg-1.2:=
+ media-libs/libpng:0=
+ media-libs/libsndfile:=
+ >=media-libs/libtheora-1.1:=
+ >=media-libs/libvorbis-1.3:=
+ >=media-libs/openexr-1.5:=
+ media-libs/tiff:0=
+ media-libs/x264:=
+ media-sound/lame:=
+ >=media-video/mjpegtools-2
+ >=sci-libs/fftw-3
+ x11-libs/libX11:=
+ x11-libs/libXext:=
+ x11-libs/libXft:=
+ x11-libs/libXv:=
+ x11-libs/libXvMC:=
+ x11-libs/libXxf86vm:=
+ virtual/ffmpeg
+ || ( media-video/ffmpeg:0 media-libs/libpostproc )
+ virtual/jpeg:0
+ alsa? ( media-libs/alsa-lib:= )
+ ieee1394? (
+ media-libs/libiec61883:=
+ >=sys-libs/libraw1394-1.2.0:=
+ >=sys-libs/libavc1394-0.5.0:=
+ )
+ opengl? (
+ virtual/glu
+ virtual/opengl
+ )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig
+ cpu_flags_x86_mmx? ( dev-lang/nasm )"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-validate_desktop_entry.patch \
+ "${FILESDIR}"/${PN}-ffmpeg.patch \
+ "${FILESDIR}"/${P}-underlinking.patch \
+ "${FILESDIR}"/${P}-ffmpeg-0.11.patch \
+ "${FILESDIR}"/${PN}-libav9.patch \
+ "${FILESDIR}"/${PN}-pngtoh.patch \
+ "${FILESDIR}"/${PN}-nofindobject.patch
+
+ if has_version '>=media-video/ffmpeg-2' ; then
+ epatch "${FILESDIR}"/${PN}-ffmpeg2.patch
+ fi
+
+ eautoreconf
+}
+
+src_configure() {
+ append-cppflags -D__STDC_CONSTANT_MACROS #321945
+ append-ldflags -Wl,-z,noexecstack #212959
+
+ local myconf
+ use debug && myconf='--enable-x-error-output'
+
+ econf \
+ $(use_enable oss) \
+ $(use_enable alsa) \
+ --disable-esd \
+ $(use_enable ieee1394 firewire) \
+ $(use_enable css) \
+ $(use_enable cpu_flags_x86_mmx mmx) \
+ $(use_enable cpu_flags_x86_3dnow 3dnow) \
+ $(use_enable altivec) \
+ $(use_enable opengl) \
+ --with-plugindir=/usr/$(get_libdir)/${PN} \
+ --with-buildinfo=cust/"Gentoo - ${PV}" \
+ --with-external-ffmpeg \
+ ${myconf}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dohtml -a png,html,texi,sdw -r doc/*
+
+ rm -rf "${D}"/usr/include
+ mv -vf "${D}"/usr/bin/mpeg3cat{,.hv} || die
+ mv -vf "${D}"/usr/bin/mpeg3dump{,.hv} || die
+ mv -vf "${D}"/usr/bin/mpeg3toc{,.hv} || die
+ dosym /usr/bin/mpeg2enc /usr/$(get_libdir)/${PN}/mpeg2enc.plugin
+
+ prune_libtool_files --all
+}
diff --git a/media-video/cinelerra/files/cinelerra-20140710-ffmpeg-0.11.patch b/media-video/cinelerra/files/cinelerra-20140710-ffmpeg-0.11.patch
new file mode 100644
index 000000000000..2aebd7008c3c
--- /dev/null
+++ b/media-video/cinelerra/files/cinelerra-20140710-ffmpeg-0.11.patch
@@ -0,0 +1,134 @@
+--- cinelerra/ffmpeg.C
++++ cinelerra/ffmpeg.C
+@@ -23,7 +23,6 @@
+
+ int FFMPEG::init(char *codec_string) {
+
+- avcodec_init();
+ avcodec_register_all();
+
+ CodecID id = codec_id(codec_string);
+--- cinelerra/fileac3.C
++++ cinelerra/fileac3.C
+@@ -84,7 +84,6 @@
+
+ if(wr)
+ {
+- avcodec_init();
+ avcodec_register_all();
+ codec = avcodec_find_encoder(CODEC_ID_AC3);
+ if(!codec)
+--- configure.ac
++++ configure.ac
+@@ -497,7 +497,7 @@
+ AC_ARG_WITH([external-ffmpeg], AC_HELP_STRING([--with-external-ffmpeg], [use external ffmpeg library]))
+
+ if test "x$with_external_ffmpeg" = "xyes"; then
+- PKG_CHECK_MODULES([FFMPEG_TEMP], [libavcodec libpostproc])
++ PKG_CHECK_MODULES([FFMPEG_TEMP], [libavcodec libpostproc libavutil])
+ FFMPEG_FOLDER=""
+ FFMPEG_EXTERNALTEXT="External ffmpeg"
+
+@@ -515,10 +515,10 @@
+ AC_MSG_RESULT($enable_ffmpeg_swscale)
+ if test x"$enable_ffmpeg_swscale" = xyes; then
+ dnl AC_DEFINE(HAVE_SWSCALER)
+- PKG_CHECK_MODULES([FFMPEG], [libavcodec libpostproc libswscale])
++ PKG_CHECK_MODULES([FFMPEG], [libavcodec libpostproc libswscale libavutil])
+ FFMPEG_CFLAGS="$FFMPEG_CFLAGS -I/usr/include/libavcodec -I/usr/include/libswscale -DHAVE_SWSCALER"
+ else
+- PKG_CHECK_MODULES([FFMPEG], [libavcodec libpostproc])
++ PKG_CHECK_MODULES([FFMPEG], [libavcodec libpostproc libavutil])
+ fi
+ FFMPEG_EXTERNALTEXT="External ffmpeg"
+ else
+--- quicktime/mpeg4.c
++++ quicktime/mpeg4.c
+@@ -624,12 +624,12 @@
+ else
+ // ffmpeg section
+ {
++ AVDictionary ** opts = NULL;
+ static char *video_rc_eq="tex^qComp";
+ codec->encode_initialized[current_field] = 1;
+ if(!ffmpeg_initialized)
+ {
+ ffmpeg_initialized = 1;
+- avcodec_init();
+ avcodec_register_all();
+ }
+
+@@ -673,8 +673,10 @@
+ context->b_quant_offset = 1.25;
+ #if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
+ context->error_resilience = FF_ER_CAREFUL;
+-#else
++#elif LIBAVCODEC_VERSION_INT < ((54<<16)+(0<<8)+0)
+ context->error_recognition = FF_ER_CAREFUL;
++#else
++ context->err_recognition |= AV_EF_CAREFUL;
+ #endif
+ context->error_concealment = 3;
+ context->frame_skip_cmp = FF_CMP_DCTMAX;
+@@ -699,7 +701,7 @@
+ context->profile= FF_PROFILE_UNKNOWN;
+ context->rc_buffer_aggressivity = 1.0;
+ context->level= FF_LEVEL_UNKNOWN;
+- context->flags |= CODEC_FLAG_H263P_UMV;
++ av_dict_set(opts, "umv", "1", 0);
+ context->flags |= CODEC_FLAG_AC_PRED;
+
+ // All the forbidden settings can be extracted from libavcodec/mpegvideo.c of ffmpeg...
+@@ -717,10 +719,8 @@
+ (codec->ffmpeg_id == CODEC_ID_MPEG4 ||
+ codec->ffmpeg_id == CODEC_ID_MPEG1VIDEO ||
+ codec->ffmpeg_id == CODEC_ID_MPEG2VIDEO ||
+- codec->ffmpeg_id == CODEC_ID_H263P ||
+- codec->ffmpeg_id == CODEC_FLAG_H263P_SLICE_STRUCT))
++ codec->ffmpeg_id == CODEC_ID_H263P ))
+ {
+- avcodec_thread_init(context, file->cpus);
+ context->thread_count = file->cpus;
+ }
+
+@@ -740,7 +740,7 @@
+ * codec->fix_bitrate,
+ * codec->quantizer);
+ */
+- avcodec_open(context, codec->encoder[current_field]);
++ avcodec_open2(context, codec->encoder[current_field], opts);
+
+ avcodec_get_frame_defaults(&codec->picture[current_field]);
+
+--- quicktime/qtffmpeg.c
++++ quicktime/qtffmpeg.c
+@@ -54,7 +54,6 @@
+ if(!ffmpeg_initialized)
+ {
+ ffmpeg_initialized = 1;
+- avcodec_init();
+ avcodec_register_all();
+ }
+
+@@ -90,10 +89,8 @@
+ (ffmpeg_id == CODEC_ID_MPEG4 ||
+ ffmpeg_id == CODEC_ID_MPEG1VIDEO ||
+ ffmpeg_id == CODEC_ID_MPEG2VIDEO ||
+- ffmpeg_id == CODEC_ID_H263P ||
+- ffmpeg_id == CODEC_FLAG_H263P_SLICE_STRUCT))
++ ffmpeg_id == CODEC_ID_H263P ))
+ {
+- avcodec_thread_init(context, cpus);
+ context->thread_count = cpus;
+ }
+ if(avcodec_open(context,
+--- quicktime/wma.c
++++ quicktime/wma.c
+@@ -67,7 +67,6 @@
+ if(!ffmpeg_initialized)
+ {
+ ffmpeg_initialized = 1;
+- avcodec_init();
+ avcodec_register_all();
+ }
+
diff --git a/media-video/cinelerra/files/cinelerra-20140710-underlinking.patch b/media-video/cinelerra/files/cinelerra-20140710-underlinking.patch
new file mode 100644
index 000000000000..a7dc74f2d445
--- /dev/null
+++ b/media-video/cinelerra/files/cinelerra-20140710-underlinking.patch
@@ -0,0 +1,16 @@
+http://bugs.gentoo.org/367509
+
+pluginserver.C is using dlsym, dlopen, dlclose and dlerror
+
+--- cinelerra/Makefile.am
++++ cinelerra/Makefile.am
+@@ -692,7 +692,8 @@
+ $(LIBDV_LIBS) \
+ -luuid \
+ $(MJPEG_LIBS) \
+- -lstdc++
++ -lstdc++ \
++ -ldl
+
+ EXTRA_DIST = gen-feather-h
+
diff --git a/media-video/cinelerra/files/cinelerra-20140710-validate_desktop_entry.patch b/media-video/cinelerra/files/cinelerra-20140710-validate_desktop_entry.patch
new file mode 100644
index 000000000000..006217586630
--- /dev/null
+++ b/media-video/cinelerra/files/cinelerra-20140710-validate_desktop_entry.patch
@@ -0,0 +1,14 @@
+--- image/cinelerra-cv.desktop
++++ image/cinelerra-cv.desktop
+@@ -5,9 +5,8 @@
+ Name[fr]=Cinelerra-CV
+ Name[es]=Cinelerra-CV
+ Comment=Video Editor
+-Categories=Application;AudioVideo;Multimedia;VideoEditing;
+-Encoding=UTF-8
++Categories=AudioVideo;
+ Exec=cinelerra
+-Icon=cinelerra-cv.xpm
++Icon=cinelerra-cv
+ Terminal=false
+ Type=Application
diff --git a/media-video/cinelerra/files/cinelerra-entry.patch b/media-video/cinelerra/files/cinelerra-entry.patch
new file mode 100644
index 000000000000..22987d895a6d
--- /dev/null
+++ b/media-video/cinelerra/files/cinelerra-entry.patch
@@ -0,0 +1,14 @@
+--- image/cinelerra.desktop
++++ image/cinelerra.desktop
+@@ -5,9 +5,8 @@
+ Name[fr]=Cinelerra
+ Name[es]=Cinelerra
+ Comment=Video Editor
+-Categories=Application;AudioVideo;Multimedia;
+-Encoding=UTF-8
++Categories=AudioVideo;
+ Exec=cinelerra
+-Icon=cinelerra.xpm
++Icon=cinelerra
+ Terminal=false
+ Type=Application
diff --git a/media-video/cinelerra/files/cinelerra-ffmpeg-0.11.patch b/media-video/cinelerra/files/cinelerra-ffmpeg-0.11.patch
new file mode 100644
index 000000000000..6d59cc8408ed
--- /dev/null
+++ b/media-video/cinelerra/files/cinelerra-ffmpeg-0.11.patch
@@ -0,0 +1,156 @@
+Let it build with ffmpeg-0.11
+
+Index: cinelerra-20111223/cinelerra/ffmpeg.C
+===================================================================
+--- cinelerra-20111223.orig/cinelerra/ffmpeg.C
++++ cinelerra-20111223/cinelerra/ffmpeg.C
+@@ -23,7 +23,6 @@ FFMPEG::FFMPEG(Asset *asset) {
+
+ int FFMPEG::init(char *codec_string) {
+
+- avcodec_init();
+ avcodec_register_all();
+
+ CodecID id = codec_id(codec_string);
+Index: cinelerra-20111223/cinelerra/fileac3.C
+===================================================================
+--- cinelerra-20111223.orig/cinelerra/fileac3.C
++++ cinelerra-20111223/cinelerra/fileac3.C
+@@ -84,7 +84,6 @@ int FileAC3::open_file(int rd, int wr)
+
+ if(wr)
+ {
+- avcodec_init();
+ avcodec_register_all();
+ codec = avcodec_find_encoder(CODEC_ID_AC3);
+ if(!codec)
+Index: cinelerra-20111223/configure.in
+===================================================================
+--- cinelerra-20111223.orig/configure.in
++++ cinelerra-20111223/configure.in
+@@ -338,7 +338,7 @@ AC_SUBST(CPU_CFLAGS)
+ AC_ARG_WITH([external-ffmpeg], AC_HELP_STRING([--with-external-ffmpeg], [use external ffmpeg library]))
+
+ if test "x$with_external_ffmpeg" = "xyes"; then
+- PKG_CHECK_MODULES([FFMPEG_TEMP], [libavcodec libpostproc])
++ PKG_CHECK_MODULES([FFMPEG_TEMP], [libavcodec libpostproc libavutil])
+ FFMPEG_FOLDER=""
+ FFMPEG_EXTERNALTEXT="External ffmpeg"
+
+@@ -356,10 +356,10 @@ if test "x$with_external_ffmpeg" = "xyes
+ AC_MSG_RESULT($enable_ffmpeg_swscale)
+ if test x"$enable_ffmpeg_swscale" = xyes; then
+ dnl AC_DEFINE(HAVE_SWSCALER)
+- PKG_CHECK_MODULES([FFMPEG], [libavcodec libpostproc libswscale])
++ PKG_CHECK_MODULES([FFMPEG], [libavcodec libpostproc libswscale libavutil])
+ FFMPEG_CFLAGS="$FFMPEG_CFLAGS -I/usr/include/libavcodec -I/usr/include/libswscale -DHAVE_SWSCALER"
+ else
+- PKG_CHECK_MODULES([FFMPEG], [libavcodec libpostproc])
++ PKG_CHECK_MODULES([FFMPEG], [libavcodec libpostproc libavutil])
+ fi
+ FFMPEG_EXTERNALTEXT="External ffmpeg"
+ else
+Index: cinelerra-20111223/quicktime/mpeg4.c
+===================================================================
+--- cinelerra-20111223.orig/quicktime/mpeg4.c
++++ cinelerra-20111223/quicktime/mpeg4.c
+@@ -8,6 +8,7 @@
+
+
+ #include "libavcodec/avcodec.h"
++#include "libavutil/dict.h"
+ #include "colormodels.h"
+ #include "funcprotos.h"
+ #include "qtffmpeg.h"
+@@ -624,12 +625,12 @@ static int encode(quicktime_t *file, uns
+ else
+ // ffmpeg section
+ {
++ AVDictionary ** opts = NULL;
+ static char *video_rc_eq="tex^qComp";
+ codec->encode_initialized[current_field] = 1;
+ if(!ffmpeg_initialized)
+ {
+ ffmpeg_initialized = 1;
+- avcodec_init();
+ avcodec_register_all();
+ }
+
+@@ -673,8 +674,10 @@ static int encode(quicktime_t *file, uns
+ context->b_quant_offset = 1.25;
+ #if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
+ context->error_resilience = FF_ER_CAREFUL;
+-#else
++#elif LIBAVCODEC_VERSION_INT < ((54<<16)+(0<<8)+0)
+ context->error_recognition = FF_ER_CAREFUL;
++#else
++ context->err_recognition |= AV_EF_CAREFUL;
+ #endif
+ context->error_concealment = 3;
+ context->frame_skip_cmp = FF_CMP_DCTMAX;
+@@ -699,7 +702,7 @@ static int encode(quicktime_t *file, uns
+ context->profile= FF_PROFILE_UNKNOWN;
+ context->rc_buffer_aggressivity = 1.0;
+ context->level= FF_LEVEL_UNKNOWN;
+- context->flags |= CODEC_FLAG_H263P_UMV;
++ av_dict_set(opts, "umv", "1", 0);
+ context->flags |= CODEC_FLAG_AC_PRED;
+
+ // All the forbidden settings can be extracted from libavcodec/mpegvideo.c of ffmpeg...
+@@ -717,10 +720,8 @@ static int encode(quicktime_t *file, uns
+ (codec->ffmpeg_id == CODEC_ID_MPEG4 ||
+ codec->ffmpeg_id == CODEC_ID_MPEG1VIDEO ||
+ codec->ffmpeg_id == CODEC_ID_MPEG2VIDEO ||
+- codec->ffmpeg_id == CODEC_ID_H263P ||
+- codec->ffmpeg_id == CODEC_FLAG_H263P_SLICE_STRUCT))
++ codec->ffmpeg_id == CODEC_ID_H263P ))
+ {
+- avcodec_thread_init(context, file->cpus);
+ context->thread_count = file->cpus;
+ }
+
+@@ -740,7 +741,7 @@ static int encode(quicktime_t *file, uns
+ * codec->fix_bitrate,
+ * codec->quantizer);
+ */
+- avcodec_open(context, codec->encoder[current_field]);
++ avcodec_open2(context, codec->encoder[current_field], opts);
+
+ avcodec_get_frame_defaults(&codec->picture[current_field]);
+
+Index: cinelerra-20111223/quicktime/qtffmpeg.c
+===================================================================
+--- cinelerra-20111223.orig/quicktime/qtffmpeg.c
++++ cinelerra-20111223/quicktime/qtffmpeg.c
+@@ -54,7 +54,6 @@ quicktime_ffmpeg_t* quicktime_new_ffmpeg
+ if(!ffmpeg_initialized)
+ {
+ ffmpeg_initialized = 1;
+- avcodec_init();
+ avcodec_register_all();
+ }
+
+@@ -90,10 +89,8 @@ quicktime_ffmpeg_t* quicktime_new_ffmpeg
+ (ffmpeg_id == CODEC_ID_MPEG4 ||
+ ffmpeg_id == CODEC_ID_MPEG1VIDEO ||
+ ffmpeg_id == CODEC_ID_MPEG2VIDEO ||
+- ffmpeg_id == CODEC_ID_H263P ||
+- ffmpeg_id == CODEC_FLAG_H263P_SLICE_STRUCT))
++ ffmpeg_id == CODEC_ID_H263P ))
+ {
+- avcodec_thread_init(context, cpus);
+ context->thread_count = cpus;
+ }
+ if(avcodec_open(context,
+Index: cinelerra-20111223/quicktime/wma.c
+===================================================================
+--- cinelerra-20111223.orig/quicktime/wma.c
++++ cinelerra-20111223/quicktime/wma.c
+@@ -67,7 +67,6 @@ static int init_decode(quicktime_audio_m
+ if(!ffmpeg_initialized)
+ {
+ ffmpeg_initialized = 1;
+- avcodec_init();
+ avcodec_register_all();
+ }
+
diff --git a/media-video/cinelerra/files/cinelerra-ffmpeg.patch b/media-video/cinelerra/files/cinelerra-ffmpeg.patch
new file mode 100644
index 000000000000..6f7962fb1a54
--- /dev/null
+++ b/media-video/cinelerra/files/cinelerra-ffmpeg.patch
@@ -0,0 +1,76 @@
+Fix build with ffmpeg/libav trunk / 0.7
+
+Index: cinelerra-20101104/cinelerra/ffmpeg.C
+===================================================================
+--- cinelerra-20101104.orig/cinelerra/ffmpeg.C
++++ cinelerra-20101104/cinelerra/ffmpeg.C
+@@ -364,12 +364,15 @@ int FFMPEG::decode(uint8_t *data, long d
+
+ // NOTE: frame must already have data space allocated
+
++ AVPacket pkt;
+ got_picture = 0;
+- int length = avcodec_decode_video(context,
++ av_init_packet( &pkt );
++ pkt.data = data;
++ pkt.size = data_size;
++ int length = avcodec_decode_video2(context,
+ picture,
+ &got_picture,
+- data,
+- data_size);
++ &pkt);
+
+ if (length < 0) {
+ printf("FFMPEG::decode error decoding frame\n");
+Index: cinelerra-20101104/quicktime/qtffmpeg.c
+===================================================================
+--- cinelerra-20101104.orig/quicktime/qtffmpeg.c
++++ cinelerra-20101104/quicktime/qtffmpeg.c
+@@ -181,6 +181,7 @@ static int decode_wrapper(quicktime_t *f
+
+ if(!result)
+ {
++ AVPacket pkt;
+
+
+ // No way to determine if there was an error based on nonzero status.
+@@ -189,11 +190,13 @@ static int decode_wrapper(quicktime_t *f
+ ffmpeg->decoder_context[current_field]->skip_frame = AVDISCARD_NONREF /* AVDISCARD_BIDIR */;
+ else
+ ffmpeg->decoder_context[current_field]->skip_frame = AVDISCARD_DEFAULT;
+- result = avcodec_decode_video(ffmpeg->decoder_context[current_field],
++ av_init_packet( &pkt );
++ pkt.data = ffmpeg->work_buffer;
++ pkt.size = bytes + header_bytes;
++ result = avcodec_decode_video2(ffmpeg->decoder_context[current_field],
+ &ffmpeg->picture[current_field],
+ &got_picture,
+- ffmpeg->work_buffer,
+- bytes + header_bytes);
++ &pkt);
+
+
+
+Index: cinelerra-20101104/quicktime/wma.c
+===================================================================
+--- cinelerra-20101104.orig/quicktime/wma.c
++++ cinelerra-20101104/quicktime/wma.c
+@@ -195,11 +195,14 @@ printf("decode 2 %x %llx %llx\n", chunk_
+ chunk_size);
+ #else
+ bytes_decoded = AVCODEC_MAX_AUDIO_FRAME_SIZE;
+- result = avcodec_decode_audio2(codec->decoder_context,
++ AVPacket pkt;
++ av_init_packet( &pkt );
++ pkt.data = codec->packet_buffer;
++ pkt.size = chunk_size;
++ result = avcodec_decode_audio3(codec->decoder_context,
+ (int16_t*)(codec->work_buffer + codec->output_size * sample_size),
+ &bytes_decoded,
+- codec->packet_buffer,
+- chunk_size);
++ &pkt);
+ #endif
+
+ pthread_mutex_unlock(&ffmpeg_lock);
diff --git a/media-video/cinelerra/files/cinelerra-ffmpeg2.patch b/media-video/cinelerra/files/cinelerra-ffmpeg2.patch
new file mode 100644
index 000000000000..01680ac952f1
--- /dev/null
+++ b/media-video/cinelerra/files/cinelerra-ffmpeg2.patch
@@ -0,0 +1,218 @@
+https://bugs.gentoo.org/show_bug.cgi?id=479394
+By Helmut Jarausch
+
+--- cinelerra/ffmpeg.h.ORIG 2012-07-06 22:40:26.000000000 +0200
++++ cinelerra/ffmpeg.h 2013-08-01 12:58:12.342474136 +0200
+@@ -26,7 +26,7 @@
+ static int convert_cmodel_transfer(VFrame *frame_in,VFrame *frame_out);
+ static int init_picture_from_frame(AVPicture *picture, VFrame *frame);
+
+- static CodecID codec_id(char *codec_string);
++ static AVCodecID codec_id(char *codec_string);
+
+ private:
+ static PixelFormat color_model_to_pix_fmt(int color_model);
+--- cinelerra/ffmpeg.C.ORIG 2013-08-01 11:24:43.794419246 +0200
++++ cinelerra/ffmpeg.C 2013-08-01 12:57:48.121473899 +0200
+@@ -25,7 +25,7 @@
+
+ avcodec_register_all();
+
+- CodecID id = codec_id(codec_string);
++ AVCodecID id = codec_id(codec_string);
+ codec = avcodec_find_decoder(id);
+ if (codec == NULL) {
+ printf("FFMPEG::init no decoder for '%s'", codec_string);
+@@ -51,7 +51,7 @@
+ }
+
+
+-CodecID FFMPEG::codec_id(char *codec_string) {
++AVCodecID FFMPEG::codec_id(char *codec_string) {
+ #define CODEC_IS(x) (! strncmp(codec_string, x, 4))
+
+ if (CODEC_IS(QUICKTIME_DV) ||
+--- quicktime/ffmpeg/ffmpeg.c.ORIG 2012-07-06 22:40:26.000000000 +0200
++++ quicktime/ffmpeg/ffmpeg.c 2013-08-01 12:57:59.025474005 +0200
+@@ -2663,7 +2663,7 @@
+ return 0;
+ }
+
+-static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
++static enum AVCodecID find_codec_or_die(const char *name, int type, int encoder)
+ {
+ const char *codec_string = encoder ? "encoder" : "decoder";
+ AVCodec *codec;
+--- quicktime/ffmpeg/libavformat/electronicarts.c.ORIG 2012-07-06 22:40:26.000000000 +0200
++++ quicktime/ffmpeg/libavformat/electronicarts.c 2013-08-01 13:00:57.855475755 +0200
+@@ -49,11 +49,11 @@
+ typedef struct EaDemuxContext {
+ int big_endian;
+
+- enum CodecID video_codec;
++ enum AVCodecID video_codec;
+ AVRational time_base;
+ int video_stream_index;
+
+- enum CodecID audio_codec;
++ enum AVCodecID audio_codec;
+ int audio_stream_index;
+ int audio_frame_counter;
+
+--- quicktime/ffmpeg/libavformat/img2.c.ORIG 2012-07-06 22:40:26.000000000 +0200
++++ quicktime/ffmpeg/libavformat/img2.c 2013-08-01 12:59:21.408474812 +0200
+@@ -34,7 +34,7 @@
+ } VideoData;
+
+ typedef struct {
+- enum CodecID id;
++ enum AVCodecID id;
+ const char *str;
+ } IdStrMap;
+
+@@ -97,7 +97,7 @@
+ }
+ return -1;
+ }
+-static enum CodecID av_str2id(const IdStrMap *tags, const char *str)
++static enum AVCodecID av_str2id(const IdStrMap *tags, const char *str)
+ {
+ str= strrchr(str, '.');
+ if(!str) return CODEC_ID_NONE;
+@@ -175,7 +175,7 @@
+ return 0;
+ }
+
+-enum CodecID av_guess_image2_codec(const char *filename){
++enum AVCodecID av_guess_image2_codec(const char *filename){
+ return av_str2id(img_tags, filename);
+ }
+
+--- quicktime/ffmpeg/libavformat/matroskadec.c.ORIG 2012-07-06 22:40:26.000000000 +0200
++++ quicktime/ffmpeg/libavformat/matroskadec.c 2013-08-01 12:59:57.556475165 +0200
+@@ -2476,7 +2476,7 @@
+ AVStream *st;
+
+ for (i = 0; i < matroska->num_tracks; i++) {
+- enum CodecID codec_id = CODEC_ID_NONE;
++ enum AVCodecID codec_id = CODEC_ID_NONE;
+ uint8_t *extradata = NULL;
+ int extradata_size = 0;
+ int extradata_offset = 0;
+@@ -2495,7 +2495,7 @@
+ }
+ }
+
+- /* Set the FourCC from the CodecID. */
++ /* Set the FourCC from the AVCodecID. */
+ /* This is the MS compatibility mode which stores a
+ * BITMAPINFOHEADER in the CodecPrivate. */
+ if (!strcmp(track->codec_id,
+@@ -2600,7 +2600,7 @@
+
+ if (codec_id == CODEC_ID_NONE) {
+ av_log(matroska->ctx, AV_LOG_INFO,
+- "Unknown/unsupported CodecID %s.\n",
++ "Unknown/unsupported AVCodecID %s.\n",
+ track->codec_id);
+ }
+
+--- quicktime/ffmpeg/libavformat/matroska.h.ORIG 2012-07-06 22:40:26.000000000 +0200
++++ quicktime/ffmpeg/libavformat/matroska.h 2013-08-01 13:00:22.218475407 +0200
+@@ -220,12 +220,12 @@
+
+ typedef struct CodecTags{
+ char str[16];
+- enum CodecID id;
++ enum AVCodecID id;
+ }CodecTags;
+
+ typedef struct CodecMime{
+ char str[32];
+- enum CodecID id;
++ enum AVCodecID id;
+ }CodecMime;
+
+ #define MATROSKA_CODEC_ID_VIDEO_VFW_FOURCC "V_MS/VFW/FOURCC"
+--- quicktime/ffmpeg/libavformat/mov.c.ORIG 2012-07-06 22:40:26.000000000 +0200
++++ quicktime/ffmpeg/libavformat/mov.c 2013-08-01 12:59:33.935474934 +0200
+@@ -678,7 +678,7 @@
+
+ for(pseudo_stream_id=0; pseudo_stream_id<entries; pseudo_stream_id++) {
+ //Parsing Sample description table
+- enum CodecID id;
++ enum AVCodecID id;
+ int dref_id;
+ MOV_atom_t a = { 0, 0, 0 };
+ offset_t start_pos = url_ftell(pb);
+--- quicktime/ffmpeg/libavformat/mxf.c.ORIG 2012-07-06 22:40:26.000000000 +0200
++++ quicktime/ffmpeg/libavformat/mxf.c 2013-08-01 12:59:12.025474720 +0200
+@@ -157,7 +157,7 @@
+ typedef struct {
+ UID uid;
+ unsigned matching_len;
+- enum CodecID id;
++ enum AVCodecID id;
+ } MXFCodecUL;
+
+ typedef struct {
+--- quicktime/ffmpeg/libavformat/riff.h.ORIG 2012-07-06 22:40:26.000000000 +0200
++++ quicktime/ffmpeg/libavformat/riff.h 2013-08-01 12:59:45.950475052 +0200
+@@ -48,7 +48,7 @@
+ extern const AVCodecTag codec_wav_tags[];
+
+ unsigned int codec_get_tag(const AVCodecTag *tags, int id);
+-enum CodecID codec_get_id(const AVCodecTag *tags, unsigned int tag);
++enum AVCodecID codec_get_id(const AVCodecTag *tags, unsigned int tag);
+ void ff_parse_specific_params(AVCodecContext *stream, int *au_rate, int *au_ssize, int *au_scale);
+
+ #endif /* FFMPEG_RIFF_H */
+--- quicktime/ffmpeg/libavformat/rtp.c.ORIG 2012-07-06 22:40:26.000000000 +0200
++++ quicktime/ffmpeg/libavformat/rtp.c 2013-08-01 12:59:01.778474619 +0200
+@@ -40,7 +40,7 @@
+ int pt;
+ const char enc_name[6];
+ enum CodecType codec_type;
+- enum CodecID codec_id;
++ enum AVCodecID codec_id;
+ int clock_rate;
+ int audio_channels;
+ } AVRtpPayloadTypes[]=
+@@ -120,7 +120,7 @@
+ return "";
+ }
+
+-enum CodecID ff_rtp_codec_id(const char *buf, enum CodecType codec_type)
++enum AVCodecID ff_rtp_codec_id(const char *buf, enum CodecType codec_type)
+ {
+ int i;
+
+--- quicktime/ffmpeg/libavformat/rtp_internal.h.ORIG 2012-07-06 22:40:26.000000000 +0200
++++ quicktime/ffmpeg/libavformat/rtp_internal.h 2013-08-01 13:00:09.147475279 +0200
+@@ -61,7 +61,7 @@
+ // fields from AVRtpDynamicPayloadType_s
+ const char enc_name[50]; /* XXX: still why 50 ? ;-) */
+ enum CodecType codec_type;
+- enum CodecID codec_id;
++ enum AVCodecID codec_id;
+
+ // may be null
+ int (*parse_sdp_a_line) (AVStream * stream,
+@@ -123,7 +123,7 @@
+
+ void ff_rtp_send_data(AVFormatContext *s1, const uint8_t *buf1, int len, int m);
+ const char *ff_rtp_enc_name(int payload_type);
+-enum CodecID ff_rtp_codec_id(const char *buf, enum CodecType codec_type);
++enum AVCodecID ff_rtp_codec_id(const char *buf, enum CodecType codec_type);
+
+ void av_register_rtp_dynamic_payload_handlers(void);
+
+--- quicktime/wma.h.ORIG 2012-07-06 22:40:26.000000000 +0200
++++ quicktime/wma.h 2013-08-01 13:11:46.431482103 +0200
+@@ -3,5 +3,6 @@
+
+ extern void quicktime_init_codec_wmav1(quicktime_audio_map_t *);
+ extern void quicktime_init_codec_wmav2(quicktime_audio_map_t *);
++#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000
+
+ #endif
diff --git a/media-video/cinelerra/files/cinelerra-libav9.patch b/media-video/cinelerra/files/cinelerra-libav9.patch
new file mode 100644
index 000000000000..47a4d6f231e1
--- /dev/null
+++ b/media-video/cinelerra/files/cinelerra-libav9.patch
@@ -0,0 +1,93 @@
+diff -urN cinelerra-20120707/cinelerra/ffmpeg.C /tmp/cinelerra-20120707/cinelerra/ffmpeg.C
+--- cinelerra-20120707/cinelerra/ffmpeg.C 2013-06-22 18:07:43.632978553 +0200
++++ /tmp/cinelerra-20120707/cinelerra/ffmpeg.C 2013-06-22 18:07:21.668979334 +0200
+@@ -32,9 +32,9 @@
+ return 1;
+ }
+
+- context = avcodec_alloc_context();
++ context = avcodec_alloc_context3(NULL);
+
+- if (avcodec_open(context, codec)) {
++ if (avcodec_open2(context, codec, NULL)) {
+ printf("FFMPEG::init avcodec_open() failed\n");
+ }
+
+diff -urN cinelerra-20120707/cinelerra/fileac3.C /tmp/cinelerra-20120707/cinelerra/fileac3.C
+--- cinelerra-20120707/cinelerra/fileac3.C 2013-06-22 18:07:43.632978553 +0200
++++ /tmp/cinelerra-20120707/cinelerra/fileac3.C 2013-06-22 18:07:21.668979334 +0200
+@@ -91,11 +91,11 @@
+ eprintf("codec not found.\n");
+ return 1;
+ }
+- codec_context = avcodec_alloc_context();
++ codec_context = avcodec_alloc_context3(NULL);
+ codec_context->bit_rate = asset->ac3_bitrate * 1000;
+ codec_context->sample_rate = asset->sample_rate;
+ codec_context->channels = asset->channels;
+- if(avcodec_open(codec_context, codec))
++ if(avcodec_open2(codec_context, codec, NULL))
+ {
+ eprintf("failed to open codec.\n");
+ return 1;
+diff -urN cinelerra-20120707/quicktime/mpeg4.c /tmp/cinelerra-20120707/quicktime/mpeg4.c
+--- cinelerra-20120707/quicktime/mpeg4.c 2013-06-22 18:07:43.633978553 +0200
++++ /tmp/cinelerra-20120707/quicktime/mpeg4.c 2013-06-22 18:07:21.690979334 +0200
+@@ -642,7 +642,7 @@
+ return 1;
+ }
+
+- codec->encoder_context[current_field] = avcodec_alloc_context();
++ codec->encoder_context[current_field] = avcodec_alloc_context3(NULL);
+ AVCodecContext *context = codec->encoder_context[current_field];
+
+ context->width = width_i;
+@@ -676,8 +676,6 @@
+ context->error_resilience = FF_ER_CAREFUL;
+ #elif LIBAVCODEC_VERSION_INT < ((54<<16)+(0<<8)+0)
+ context->error_recognition = FF_ER_CAREFUL;
+-#else
+- context->err_recognition |= AV_EF_CAREFUL;
+ #endif
+ context->error_concealment = 3;
+ context->frame_skip_cmp = FF_CMP_DCTMAX;
+diff -urN cinelerra-20120707/quicktime/qtffmpeg.c /tmp/cinelerra-20120707/quicktime/qtffmpeg.c
+--- cinelerra-20120707/quicktime/qtffmpeg.c 2013-06-22 18:07:43.633978553 +0200
++++ /tmp/cinelerra-20120707/quicktime/qtffmpeg.c 2013-06-22 18:07:21.690979334 +0200
+@@ -67,7 +67,7 @@
+ return 0;
+ }
+
+- AVCodecContext *context = ptr->decoder_context[i] = avcodec_alloc_context();
++ AVCodecContext *context = ptr->decoder_context[i] = avcodec_alloc_context3(NULL);
+ static char fake_data[] = { 0, 0, 0, 0, 0, 0, 0, 0 };
+ context->width = ptr->width_i;
+ context->height = ptr->height_i;
+@@ -93,8 +93,8 @@
+ {
+ context->thread_count = cpus;
+ }
+- if(avcodec_open(context,
+- ptr->decoder[i]) < 0)
++ if(avcodec_open2(context,
++ ptr->decoder[i], NULL) < 0)
+ {
+ printf("quicktime_new_ffmpeg: avcodec_open failed.\n");
+ quicktime_delete_ffmpeg(ptr);
+diff -urN cinelerra-20120707/quicktime/wma.c /tmp/cinelerra-20120707/quicktime/wma.c
+--- cinelerra-20120707/quicktime/wma.c 2013-06-22 18:07:43.634978553 +0200
++++ /tmp/cinelerra-20120707/quicktime/wma.c 2013-06-22 18:07:21.690979334 +0200
+@@ -76,10 +76,10 @@
+ printf("init_decode: avcodec_find_decoder returned NULL.\n");
+ return 1;
+ }
+- codec->decoder_context = avcodec_alloc_context();
++ codec->decoder_context = avcodec_alloc_context3(NULL);
+ codec->decoder_context->sample_rate = trak->mdia.minf.stbl.stsd.table[0].sample_rate;
+ codec->decoder_context->channels = track_map->channels;
+- if(avcodec_open(codec->decoder_context, codec->decoder) < 0)
++ if(avcodec_open2(codec->decoder_context, codec->decoder, NULL) < 0)
+ {
+ printf("init_decode: avcodec_open failed.\n");
+ return 1;
+
diff --git a/media-video/cinelerra/files/cinelerra-nofindobject.patch b/media-video/cinelerra/files/cinelerra-nofindobject.patch
new file mode 100644
index 000000000000..99acf2b643c7
--- /dev/null
+++ b/media-video/cinelerra/files/cinelerra-nofindobject.patch
@@ -0,0 +1,16 @@
+Depends on features removed in opencv3.
+https://bugs.gentoo.org/show_bug.cgi?id=554516
+
+Index: cinelerra-20140710/configure.ac
+===================================================================
+--- cinelerra-20140710.orig/configure.ac
++++ cinelerra-20140710/configure.ac
+@@ -317,7 +317,7 @@ fi
+ AC_DEFINE_UNQUOTED(HAVE_OPENCV_SURF, $HAVE_OPENCV_SURF,
+ [define if SURF support is compiled into opencv])
+ if test "x$opencv" = "xyes" && test "x$opencvh" = "xyes" ; then
+- enable_findobject=ok
++ enable_findobject=no
+ fi
+ AM_CONDITIONAL(ENABLE_FINDOBJECT,test "x$enable_findobject" = "xok")
+ ############## END OF MISC LIBRARIES
diff --git a/media-video/cinelerra/files/cinelerra-pngtoh.patch b/media-video/cinelerra/files/cinelerra-pngtoh.patch
new file mode 100644
index 000000000000..81a8432b8729
--- /dev/null
+++ b/media-video/cinelerra/files/cinelerra-pngtoh.patch
@@ -0,0 +1,15 @@
+https://bugs.gentoo.org/show_bug.cgi?id=526118
+http://bugs.cinelerra-cv.org/ticket/1005
+
+Author: Bernd Feige
+
+--- guicast/pngtoh.c 2015-01-29 13:41:01 +0000
++++ guicast/pngtoh.c 2015-01-29 13:41:07 +0000
+@@ -148,4 +148,6 @@
+ fprintf(out, "};\n\n#endif\n");
+ fclose(out);
+ }
++
++ return 0;
+ }
+
diff --git a/media-video/cinelerra/files/cinelerra-std_and_str_h.patch b/media-video/cinelerra/files/cinelerra-std_and_str_h.patch
new file mode 100644
index 000000000000..2f8801ee087e
--- /dev/null
+++ b/media-video/cinelerra/files/cinelerra-std_and_str_h.patch
@@ -0,0 +1,81 @@
+Include required headers for free(), memcpy(), strcpy(), bcopy(), and more
+Thanks to Martin von Gagern for reporting and initial patch
+See, http://bugs.gentoo.org/show_bug.cgi?id=465478
+
+--- cinelerra/vdevicebuz.C
++++ cinelerra/vdevicebuz.C
+@@ -49,6 +49,8 @@
+ #include <sys/ioctl.h>
+ #include <sys/mman.h>
+ #include <unistd.h>
++#include <string.h>
++#include <strings.h>
+
+ #define BASE_VIDIOCPRIVATE 192
+
+--- cinelerra/videodevice.C
++++ cinelerra/videodevice.C
+@@ -53,6 +53,7 @@
+
+ #include <unistd.h>
+ #include <fcntl.h>
++#include <string.h>
+
+ KeepaliveThread::KeepaliveThread(VideoDevice *device)
+ : Thread()
+--- libmpeg3/audio/ac3.c
++++ libmpeg3/audio/ac3.c
+@@ -1,3 +1,4 @@
++#include <stdlib.h>
+ #include <stdint.h>
+ #include <stdio.h>
+
+--- libmpeg3/audio/layer3.c
++++ libmpeg3/audio/layer3.c
+@@ -4,6 +4,7 @@
+ #include "tables.h"
+
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <string.h>
+
+ struct gr_info_s
+--- mplexlo/mplex.c
++++ mplexlo/mplex.c
+@@ -1,6 +1,6 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+-
++#include <string.h>
+
+ #include "libmpeg3.h"
+ #include "mpeg3protos.h"
+--- quicktime/graphics.c
++++ quicktime/graphics.c
+@@ -1,5 +1,6 @@
+ #include "graphics.h"
+
++#include <stdlib.h>
+ #include <string.h>
+
+ /* Graphics acceleration routines */
+--- quicktime/libmjpeg.c
++++ quicktime/libmjpeg.c
+@@ -17,6 +17,7 @@
+
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include "colormodels.h"
+ #include "libmjpeg.h"
+
+--- quicktime/qtpng.c
++++ quicktime/qtpng.c
+@@ -1,6 +1,7 @@
+ #include "colormodels.h"
+ #include "funcprotos.h"
+ #include <png.h>
++#include <string.h>
+ #include "quicktime.h"
+ #include "qtpng.h"
+
diff --git a/media-video/cinelerra/files/cinelerra-underlinking.patch b/media-video/cinelerra/files/cinelerra-underlinking.patch
new file mode 100644
index 000000000000..1411d57cccd8
--- /dev/null
+++ b/media-video/cinelerra/files/cinelerra-underlinking.patch
@@ -0,0 +1,15 @@
+http://bugs.gentoo.org/367509
+
+pluginserver.C is using dlsym, dlopen, dlclose and dlerror
+
+--- cinelerra/Makefile.am
++++ cinelerra/Makefile.am
+@@ -685,6 +685,7 @@
+ $(FIREWIRE_LDFLAGS) \
+ $(LIBDV_LIBS) \
+ -luuid \
+- $(MJPEG_LIBS)
++ $(MJPEG_LIBS) \
++ -ldl
+
+ EXTRA_DIST = gen-feather-h
diff --git a/media-video/cinelerra/metadata.xml b/media-video/cinelerra/metadata.xml
new file mode 100644
index 000000000000..92e4dbc04f50
--- /dev/null
+++ b/media-video/cinelerra/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>video</herd>
+</pkgmetadata>
diff --git a/media-video/clive/Manifest b/media-video/clive/Manifest
new file mode 100644
index 000000000000..fa39c350a679
--- /dev/null
+++ b/media-video/clive/Manifest
@@ -0,0 +1 @@
+DIST clive-2.3.0.1.tar.gz 43551 SHA256 69b5d6014bdb097395b2d2ac945ebb5f6a73aff78d48fd67f533ddf33a615f33 SHA512 7426d6e8f19c358b30a7d33257d7ee536802eb35442d3cac68f6742613696ab1b280457a65d980237b53b692c5cf311725e46a5d8c27c7f2200172d050337cfc WHIRLPOOL 2e0a03dd700932eaf996ef5eea6059fdca197818ebc886fc4a1e1a6a846a1335334397115aed3c616005882e378ddbbcf3802423494f306360087dd74fc3cf5d
diff --git a/media-video/clive/clive-2.3.0.1.ebuild b/media-video/clive/clive-2.3.0.1.ebuild
new file mode 100644
index 000000000000..a4db5317b7d6
--- /dev/null
+++ b/media-video/clive/clive-2.3.0.1.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit perl-app
+
+DESCRIPTION="Command line tool for extracting videos from various websites"
+HOMEPAGE="http://clive.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PV:0:3}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~ppc64 x86"
+IUSE="clipboard pager password test"
+
+RDEPEND=">=dev-perl/BerkeleyDB-0.34
+ >=dev-perl/Config-Tiny-2.12
+ >=virtual/perl-Digest-SHA-5.47
+ >=dev-perl/HTML-TokeParser-Simple-2.37
+ >=dev-perl/Class-Singleton-1.4
+ >=dev-perl/WWW-Curl-4.05
+ >=dev-perl/XML-Simple-2.18
+ >=dev-perl/Getopt-ArgvFile-1.11
+ dev-perl/JSON-XS
+ dev-perl/URI
+ virtual/perl-Getopt-Long
+ virtual/perl-File-Spec
+ clipboard? ( >=dev-perl/Clipboard-0.09 )
+ pager? ( >=dev-perl/IO-Pager-0.05 )
+ password? ( >=dev-perl/Expect-1.21 )
+ media-libs/quvi
+ || ( net-misc/wget net-misc/curl )"
+DEPEND="test? ( dev-perl/Test-Pod ${RDEPEND} )"
+
+SRC_TEST=do
+mydoc="NEWS"
+
+src_install() {
+ perl-module_src_install
+ dodir /etc/clive
+ cat <<-EOF > "${ED}"/etc/clive/config || die
+ --quvi "quvi %u"
+ --get-with "if type -P wget >/dev/null 2>&1; then wget -c -O %f %u; else curl -L -C - -o %f %u; fi"
+ --filename-format "%t.%s"
+ EOF
+}
+
+src_test() {
+ if [ -z "${I_WANT_CLIVE_HOSTS_TESTS}" ] ; then
+ elog "If you wish to run the full testsuite of ${PN}"
+ elog "Please set the variable 'I_WANT_CLIVE_HOSTS_TESTS' variable"
+ elog "Note that the tests try to download some videos from various websites"
+ elog "and thus may randomly fail depending on the site's status."
+ export NO_INTERNET=1
+ fi
+ perl-module_src_test
+}
diff --git a/media-video/clive/metadata.xml b/media-video/clive/metadata.xml
new file mode 100644
index 000000000000..3af39e89a618
--- /dev/null
+++ b/media-video/clive/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">Command line tool for extracting videos from Youtube, Google Video,
+ Dailymotion, Guba (free) and Stage6 websites</longdescription>
+ <use>
+ <flag name="clipboard">Support reading from X clipboard</flag>
+ <flag name="pager">Support pager!?</flag>
+ <flag name="password">Support password controlled sites</flag>
+ </use>
+ <upstream>
+ <remote-id type="google-code">clive</remote-id>
+ <remote-id type="sourceforge">clive</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/coherence/Manifest b/media-video/coherence/Manifest
new file mode 100644
index 000000000000..efde3236eb0c
--- /dev/null
+++ b/media-video/coherence/Manifest
@@ -0,0 +1 @@
+DIST Coherence-0.6.6.2.tar.gz 364908 SHA256 0b54a6ba88c1ff6274aadb68ff37b8a3961b4c6acf5ded291c5dea936a311ba4 SHA512 dd5cfa68c3b21456e75c44d9d3947b424ebf9684320726393f8da59237ed84e28d4af8414702b6f93e840e7d12a2078e59f48702a288987495d76d11861c7473 WHIRLPOOL 0162af34fdb17abaafcb11d3a2ade750b4a0ed0a70d6d91004b85bb1b285dbcdbfb87b9acd56fb74e64d78e415aa677e3cbf54e893020aa84fa96482fbfd15ce
diff --git a/media-video/coherence/coherence-0.6.6.2.ebuild b/media-video/coherence/coherence-0.6.6.2.ebuild
new file mode 100644
index 000000000000..609fa0bf3590
--- /dev/null
+++ b/media-video/coherence/coherence-0.6.6.2.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+PYTHON_DEPEND="2:2.5"
+PYTHON_USE_WITH="sqlite"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="2.4 3.* *-jython"
+
+inherit distutils python
+
+MY_P="Coherence-${PV}"
+
+DESCRIPTION="A framework written in Python for DLNA/UPnP components"
+HOMEPAGE="https://coherence.beebits.net/"
+SRC_URI="http://coherence.beebits.net/download/${MY_P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 ~sparc x86"
+IUSE=""
+
+# deps are not exact and need some work
+DEPEND="dev-python/louie
+ dev-python/twisted-core
+ dev-python/twisted-web
+ dev-python/configobj
+ dev-python/gst-python:0.10
+ dev-python/nevow"
+RDEPEND="${DEPEND}
+ dev-python/axiom
+ dev-python/gdata
+ dev-python/feedparser
+ dev-python/tagpy"
+
+S="${WORKDIR}/${MY_P}"
+
+src_install() {
+ DOCS="docs/*"
+ distutils_src_install
+ newinitd "${FILESDIR}"/coherence-init coherence
+}
diff --git a/media-video/coherence/files/coherence-init b/media-video/coherence/files/coherence-init
new file mode 100644
index 000000000000..6e71e8f77f6d
--- /dev/null
+++ b/media-video/coherence/files/coherence-init
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+
+depend() {
+ need net
+ after bootmisc
+}
+
+start() {
+ ebegin "Starting Coherence"
+ start-stop-daemon --start --exec /usr/bin/coherence \
+ --pidfile /var/run/coherence.pid \
+ --background \
+ -- -c /etc/coherence.conf
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Coherence"
+ start-stop-daemon --stop --exec /usr/bin/coherence \
+ --pidfile /var/run/coherence.pid
+ eend $?
+}
+
diff --git a/media-video/coherence/metadata.xml b/media-video/coherence/metadata.xml
new file mode 100644
index 000000000000..d9df1878d8e2
--- /dev/null
+++ b/media-video/coherence/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>video</herd>
+</pkgmetadata>
diff --git a/media-video/coriander/Manifest b/media-video/coriander/Manifest
new file mode 100644
index 000000000000..06be4d7d9b94
--- /dev/null
+++ b/media-video/coriander/Manifest
@@ -0,0 +1 @@
+DIST coriander-2.0.2.tar.gz 465690 SHA256 5c7fd31cb58d398e2742352bf1ffbd2ca22e06686c6668ecfd437735c2b79123 SHA512 f28ee4c50da3e47bfb93ac13b9aa277ba854d91fb4ef1f7ae71b2ce57b26ad746a1741a4ef6fb0b415b77ebcf4dae07241ec3acb876f845219c69ed6679498c8 WHIRLPOOL 356e645b0ad1589e8820a31a800087c5fc3814bbb31d75fbf90f08bac0b2654335317c0ee56cc3c3bab2a369282219b401d8e41245984c0dbc8f64f29de70efd
diff --git a/media-video/coriander/coriander-2.0.2.ebuild b/media-video/coriander/coriander-2.0.2.ebuild
new file mode 100644
index 000000000000..e54d3d615a60
--- /dev/null
+++ b/media-video/coriander/coriander-2.0.2.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+DESCRIPTION="A Gnome2 GUI for firewire camera control and capture"
+HOMEPAGE="http://sourceforge.net/projects/coriander/"
+
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE=""
+
+# ffmpeg? ( media-video/ffmpeg ) left out, because ffmpeg support is in
+# development
+RDEPEND="
+ >=media-libs/libdc1394-2.0.0
+ media-libs/libsdl
+ media-libs/tiff:0
+ gnome-base/libgnomeui
+ gnome-base/libbonoboui
+ gnome-base/libgnomecanvas
+ gnome-base/libgnome
+ gnome-base/orbit
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+"
diff --git a/media-video/coriander/metadata.xml b/media-video/coriander/metadata.xml
new file mode 100644
index 000000000000..4b89161be7e1
--- /dev/null
+++ b/media-video/coriander/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">coriander</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/cpdvd/Manifest b/media-video/cpdvd/Manifest
new file mode 100644
index 000000000000..9b0731d4249c
--- /dev/null
+++ b/media-video/cpdvd/Manifest
@@ -0,0 +1 @@
+DIST cpdvd-1.10.gz 3512 SHA256 a6a012305c903a033fd9e35b1052cf0584ef22f57e9bf7493bdd2dea67c96c49
diff --git a/media-video/cpdvd/cpdvd-1.10-r1.ebuild b/media-video/cpdvd/cpdvd-1.10-r1.ebuild
new file mode 100644
index 000000000000..08d574cba05b
--- /dev/null
+++ b/media-video/cpdvd/cpdvd-1.10-r1.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+IUSE=""
+
+S="${WORKDIR}"
+
+DESCRIPTION="transfer a DVD title to your harddisk with ease on Linux"
+HOMEPAGE="http://www.lallafa.de/bp/cpdvd.html"
+SRC_URI="http://www.lallafa.de/bp/files/${P}.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+
+DEPEND=""
+
+RDEPEND=">=media-video/transcode-0.6.2[dvd]
+ >=dev-lang/perl-5.8.0-r12
+ >=media-video/cpvts-1.2"
+
+src_install () {
+ newbin ${P} ${PN} || die
+}
diff --git a/media-video/cpdvd/metadata.xml b/media-video/cpdvd/metadata.xml
new file mode 100644
index 000000000000..c572c7d9b478
--- /dev/null
+++ b/media-video/cpdvd/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>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/media-video/cpvts/Manifest b/media-video/cpvts/Manifest
new file mode 100644
index 000000000000..00418f19107f
--- /dev/null
+++ b/media-video/cpvts/Manifest
@@ -0,0 +1 @@
+DIST cpvts-1.2.tgz 4200 RMD160 69da89f27c1281f8a5ffa6cffc4bbe810488850f SHA1 ebcfa950d4cceda13574a85ed2cfc60617ac4872 SHA256 cfaeb890e5ec6bd17423af8aed781410fcc4a1aebc4678598b109bb00573ee6b
diff --git a/media-video/cpvts/cpvts-1.2.ebuild b/media-video/cpvts/cpvts-1.2.ebuild
new file mode 100644
index 000000000000..cdbcf5e2a9be
--- /dev/null
+++ b/media-video/cpvts/cpvts-1.2.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils toolchain-funcs
+
+IUSE=""
+
+MY_S="${WORKDIR}/${PN}"
+
+DESCRIPTION="raw copy title sets from a DVD to your harddisc"
+SRC_URI="http://www.lallafa.de/bp/files/${P}.tgz"
+HOMEPAGE="http://www.lallafa.de/bp/cpvts.html"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="amd64 ppc x86"
+
+DEPEND="media-libs/libdvdread"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}/${P}-dvdread.patch"
+}
+
+echodo() {
+ echo "$@"
+ "$@" || die "failed"
+}
+
+src_compile () {
+ cd ${MY_S} || die
+
+ echodo $(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,-rpath,/usr/lib -o cpvts \
+ cpvts.c -lm -ldvdread
+}
+
+src_install () {
+ dobin ${MY_S}/${PN} || die
+}
diff --git a/media-video/cpvts/files/cpvts-1.2-dvdread.patch b/media-video/cpvts/files/cpvts-1.2-dvdread.patch
new file mode 100644
index 000000000000..50bc92078b36
--- /dev/null
+++ b/media-video/cpvts/files/cpvts-1.2-dvdread.patch
@@ -0,0 +1,11 @@
+diff -Naur cpvts-orig/cpvts.c cpvts/cpvts.c
+--- cpvts-orig/cpvts.c 2006-03-31 20:47:16.000000000 -0600
++++ cpvts/cpvts.c 2006-03-31 20:47:40.000000000 -0600
+@@ -16,6 +16,7 @@
+ #include <ctype.h>
+ #include <string.h>
+ #include <math.h>
++#include <stdint.h>
+
+ /* libdvdread stuff */
+ #include <dvdread/dvd_reader.h>
diff --git a/media-video/cpvts/metadata.xml b/media-video/cpvts/metadata.xml
new file mode 100644
index 000000000000..c572c7d9b478
--- /dev/null
+++ b/media-video/cpvts/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>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/media-video/cxfe/Manifest b/media-video/cxfe/Manifest
new file mode 100644
index 000000000000..59eb28745b3d
--- /dev/null
+++ b/media-video/cxfe/Manifest
@@ -0,0 +1 @@
+DIST cxfe-0.9.2.tar.bz2 77475 SHA256 030addcf0ea670b4c3525cb7411e958ac0a527a845c1925ec84830eb38a4f0dc
diff --git a/media-video/cxfe/cxfe-0.9.2.ebuild b/media-video/cxfe/cxfe-0.9.2.ebuild
new file mode 100644
index 000000000000..cd8384b98eef
--- /dev/null
+++ b/media-video/cxfe/cxfe-0.9.2.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+DESCRIPTION="A command line interface for xine"
+HOMEPAGE="http://people.iola.dk/anders/cxfe/"
+
+SRC_URI="http://people.iola.dk/anders/cxfe/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="lirc"
+
+RDEPEND=">=media-libs/xine-lib-1_rc1
+ x11-libs/libX11
+ x11-libs/libXext
+ lirc? ( app-misc/lirc )
+ sys-libs/ncurses"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/${P}-asneeded.patch"
+}
+
+src_install() {
+ dobin cxfe
+ dodoc README TODO lircrc-example
+}
diff --git a/media-video/cxfe/files/cxfe-0.9.2-asneeded.patch b/media-video/cxfe/files/cxfe-0.9.2-asneeded.patch
new file mode 100644
index 000000000000..b3de1b1c78a2
--- /dev/null
+++ b/media-video/cxfe/files/cxfe-0.9.2-asneeded.patch
@@ -0,0 +1,15 @@
+Index: cxfe-0.9.2/Makefile.in
+===================================================================
+--- cxfe-0.9.2.orig/Makefile.in
++++ cxfe-0.9.2/Makefile.in
+@@ -14,8 +14,8 @@ mandir = $(prefix)/man/man1
+ CC = @CC@ -Wall
+ CPPFLAGS = @CPPFLAGS@
+ CFLAGS = $(CPPFLAGS) @CFLAGS@ `xine-config --cflags`
+-LIBS = @LIBS@
+-LDFLAGS = `xine-config --libs` -L/usr/X11R6/lib -lXext@LDFLAGS@ @LIBS@ -lX11
++LDLIBS = `xine-config --libs` -L/usr/X11R6/lib -lXext @LIBS@ -lX11
++LDFLAGS = @LDFLAGS@
+ INSTALL = @INSTALL@
+
+ #CC=gcc -Wall -g -O2
diff --git a/media-video/cxfe/metadata.xml b/media-video/cxfe/metadata.xml
new file mode 100644
index 000000000000..1cadc2e4ec21
--- /dev/null
+++ b/media-video/cxfe/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>video</herd>
+<maintainer>
+ <email>media-video@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/media-video/devede/Manifest b/media-video/devede/Manifest
new file mode 100644
index 000000000000..e779a33d2579
--- /dev/null
+++ b/media-video/devede/Manifest
@@ -0,0 +1,4 @@
+DIST devede-3.16.9.tar.bz2 2368434 SHA256 eccaba86893935ff898e7b26d772214403362a6c8d729645778146560c1ac0c1
+DIST devede-3.21.0.tar.bz2 2536646 SHA256 a892f257ac284dc6f3b0fcfe56813e26a8c86c627747a27046991892c19704ac
+DIST devede-3.22.0.tar.bz2 2559428 SHA256 7966e46c76f6c180ead33ec57844ef2efb7a8139123da59e0cc3044c8ebb4572 SHA512 5212545bc8a16987bfd4894e65c66cff1259012f529097b13ced32d54e833e7e9e4a2f500ebbca37a4c174c6507ca99575038cb4fe53e15693fca78beda883b4 WHIRLPOOL 507d69ff04d703bd05145ce289526a0cfd33279eabeece2bf07697ecf1bdde3766bd090f01d93b352df1e767cf5ef2f73e838175e77200d51034fcf73ac221c6
+DIST devede-3.23.0.tar.bz2 2680546 SHA256 9e217ca46f5f275cb0c3cadbe8c830fa1fde774c004bd95a343d1255be6f25e1 SHA512 a1b634ca8d546b56db11a9d61c9086a822d415e0fa4f77ea702aaad20254afb70ca719595b7b6ba783797bd2335ccedca9b80288e8d0fdd6beb7b1b7ad3f85d5 WHIRLPOOL 6473d4a0f0bc0acabe7d269df2b62034648e5bcd3f5cedd3403faaae8dba078b5c5ead3ea93de9bca0d0e551fe08fb15a568000cff8c1f94896d606760768c8d
diff --git a/media-video/devede/devede-3.16.9.ebuild b/media-video/devede/devede-3.16.9.ebuild
new file mode 100644
index 000000000000..4a3c13210d92
--- /dev/null
+++ b/media-video/devede/devede-3.16.9.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+PYTHON_DEPEND=2
+
+inherit multilib python
+
+DESCRIPTION="Program to create video CDs and DVDs, suitable to be played in home DVD players"
+HOMEPAGE="http://www.rastersoft.com/programas/devede.html"
+SRC_URI="http://www.rastersoft.com/descargas/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND=">=x11-libs/gtk+-2.16:2
+ >=dev-python/pygtk-2.16
+ >=media-video/mplayer-1.0_rc1
+ media-video/dvdauthor
+ media-video/vcdimager
+ virtual/cdrtools"
+DEPEND=""
+
+S=${WORKDIR}/${P%*b}
+
+pkg_setup() {
+ python_set_active_version 2
+}
+
+src_prepare() {
+ python_convert_shebangs -r 2 .
+}
+
+src_install() {
+ ./install.sh prefix="/usr" libdir="/usr/$(get_libdir)" \
+ pkgdocdir="/usr/share/doc/${PF}" DESTDIR="${D}" \
+ || die "install.sh failed."
+}
+
+pkg_postinst() {
+ python_mod_optimize /usr/$(get_libdir)/${PN}
+ elog "To create DIVX/MPEG4 files, be sure that MPlayer is compiled with LAME support."
+ elog "In this case you want to check for both the encode and mp3 USE flags."
+ elog "To change the font used to render the subtitles, choose a TrueType font you like"
+ elog "and copy it in \$HOME/.spumux directory, renaming it to devedesans.ttf."
+}
+
+pkg_postrm() {
+ python_mod_cleanup /usr/$(get_libdir)/${PN}
+}
diff --git a/media-video/devede/devede-3.21.0.ebuild b/media-video/devede/devede-3.21.0.ebuild
new file mode 100644
index 000000000000..b853f24a18de
--- /dev/null
+++ b/media-video/devede/devede-3.21.0.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+PYTHON_DEPEND="2:2.7"
+
+inherit multilib python
+
+DESCRIPTION="Program to create video CDs and DVDs, suitable to be played in home DVD players"
+HOMEPAGE="http://www.rastersoft.com/programas/devede.html"
+SRC_URI="http://www.rastersoft.com/descargas/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+# from upstream ChangeLog in 3.21.0: Now uses FFMpeg as the default backend
+IUSE="+ffmpeg"
+
+RDEPEND="dev-python/dbus-python
+ dev-python/pycairo
+ dev-python/pygobject:2
+ >=dev-python/pygtk-2.16
+ media-video/dvdauthor
+ media-video/mplayer
+ media-video/vcdimager
+ virtual/cdrtools
+ ffmpeg? ( virtual/ffmpeg[mp3] )"
+DEPEND=""
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_prepare() {
+ python_convert_shebangs -r 2 .
+}
+
+src_install() {
+ ./install.sh DESTDIR="${D}" libdir="/usr/$(get_libdir)" \
+ pkgdocdir=/usr/share/doc/${PF} prefix=/usr || die
+}
+
+pkg_postinst() {
+ python_mod_optimize /usr/$(get_libdir)/${PN}
+ elog "To create DIVX/MPEG4 files, be sure that MPlayer is compiled with LAME support."
+ elog "In this case you want to check for both the encode and mp3 USE flags."
+ elog "To change the font used to render the subtitles, choose a TrueType font you like"
+ elog "and copy it in \$HOME/.spumux directory, renaming it to devedesans.ttf."
+}
+
+pkg_postrm() {
+ python_mod_cleanup /usr/$(get_libdir)/${PN}
+}
diff --git a/media-video/devede/devede-3.22.0.ebuild b/media-video/devede/devede-3.22.0.ebuild
new file mode 100644
index 000000000000..d1dbe3e9d932
--- /dev/null
+++ b/media-video/devede/devede-3.22.0.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+PYTHON_DEPEND="2:2.7"
+
+inherit multilib python
+
+DESCRIPTION="Program to create video CDs and DVDs, suitable to be played in home DVD players"
+HOMEPAGE="http://www.rastersoft.com/programas/devede.html"
+SRC_URI="http://www.rastersoft.com/descargas/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+# from upstream ChangeLog in 3.21.0: Now uses FFMpeg as the default backend
+IUSE="+ffmpeg"
+
+RDEPEND="dev-python/dbus-python
+ dev-python/pycairo
+ dev-python/pygobject:2
+ >=dev-python/pygtk-2.16
+ media-video/dvdauthor
+ media-video/mplayer
+ media-video/vcdimager
+ virtual/cdrtools
+ ffmpeg? ( virtual/ffmpeg[mp3] )"
+DEPEND=""
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_prepare() {
+ python_convert_shebangs -r 2 .
+}
+
+src_install() {
+ ./install.sh DESTDIR="${D}" libdir="/usr/$(get_libdir)" \
+ pkgdocdir=/usr/share/doc/${PF} prefix=/usr || die
+}
+
+pkg_postinst() {
+ python_mod_optimize /usr/$(get_libdir)/${PN}
+ elog "To create DIVX/MPEG4 files, be sure that MPlayer is compiled with LAME support."
+ elog "In this case you want to check for both the encode and mp3 USE flags."
+ elog "To change the font used to render the subtitles, choose a TrueType font you like"
+ elog "and copy it in \$HOME/.spumux directory, renaming it to devedesans.ttf."
+}
+
+pkg_postrm() {
+ python_mod_cleanup /usr/$(get_libdir)/${PN}
+}
diff --git a/media-video/devede/devede-3.23.0.ebuild b/media-video/devede/devede-3.23.0.ebuild
new file mode 100644
index 000000000000..3ad27065281c
--- /dev/null
+++ b/media-video/devede/devede-3.23.0.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+PYTHON_DEPEND="2:2.7"
+
+inherit multilib python
+
+DESCRIPTION="Program to create video CDs and DVDs, suitable to be played in home DVD players"
+HOMEPAGE="http://www.rastersoft.com/programas/devede.html"
+SRC_URI="http://www.rastersoft.com/descargas/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="-mencoder"
+
+RDEPEND="dev-python/dbus-python
+ dev-python/pycairo
+ dev-python/pygobject:2
+ >=dev-python/pygtk-2.16
+ media-video/dvdauthor
+ mencoder? ( media-video/mplayer[mp3,encode] )
+ media-video/vcdimager
+ virtual/cdrtools
+ !mencoder? ( virtual/ffmpeg[mp3,encode]
+ || ( media-video/mplayer2[symlink] media-video/mplayer ) )"
+DEPEND=""
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_prepare() {
+ python_convert_shebangs -r 2 .
+}
+
+src_install() {
+ ./install.sh DESTDIR="${D}" libdir="/usr/$(get_libdir)" \
+ pkgdocdir=/usr/share/doc/${PF} prefix=/usr || die
+}
+
+pkg_postinst() {
+ python_mod_optimize /usr/$(get_libdir)/${PN}
+ elog "To change the font used to render the subtitles, choose a TrueType font you like"
+ elog "and copy it in \$HOME/.spumux directory, renaming it to devedesans.ttf."
+}
+
+pkg_postrm() {
+ python_mod_cleanup /usr/$(get_libdir)/${PN}
+}
diff --git a/media-video/devede/metadata.xml b/media-video/devede/metadata.xml
new file mode 100644
index 000000000000..d893518b9d6b
--- /dev/null
+++ b/media-video/devede/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+
+ <use>
+ <flag name="mencoder">
+ Prefer MPlayer mencoder over Libav avconv or FFmpeg ffmpeg for encoding.
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/media-video/dfbsee/Manifest b/media-video/dfbsee/Manifest
new file mode 100644
index 000000000000..7f20a41dbc13
--- /dev/null
+++ b/media-video/dfbsee/Manifest
@@ -0,0 +1 @@
+DIST DFBSee-0.7.4.tar.gz 147346 SHA256 778115b9fba23de3dabc9ac117b73e2762d795fc97c299075434d74ae2dd87e8 SHA512 c2c3c78b72fae804d5923891be5ec07827162189ecb22d71cf061130ec3bf5a63d121b093ebc90e185d1c890c7ca98d4484f2bee91e42ee84993889d93b2d6ea WHIRLPOOL 083547c7a13136caaabf88fa5dfeeaeede9278d534f00a7d5cd8618e1639de70f514c8d66185ea9c37898b114f7ad639d0aee5da5a9afa09a8279b2d1dbb5477
diff --git a/media-video/dfbsee/dfbsee-0.7.4-r1.ebuild b/media-video/dfbsee/dfbsee-0.7.4-r1.ebuild
new file mode 100644
index 000000000000..7224a72aca18
--- /dev/null
+++ b/media-video/dfbsee/dfbsee-0.7.4-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils toolchain-funcs
+
+MY_PN="DFBSee"
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="an image viewer and video player based on DirectFB"
+HOMEPAGE="http://directfb.org/index.php?path=Projects%2FDFBSee"
+SRC_URI="http://www.directfb.org/download/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 -sparc x86"
+IUSE=""
+
+RDEPEND=">=dev-libs/DirectFB-0.9.24[png]"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-direcfb-0.9.24.patch"
+ epatch "${FILESDIR}/${P}-gcc4.patch"
+ epatch "${FILESDIR}/${P}-standardtypes.patch"
+}
+
+src_configure() {
+ tc-export CC
+ default
+}
diff --git a/media-video/dfbsee/files/dfbsee-0.7.4-direcfb-0.9.24.patch b/media-video/dfbsee/files/dfbsee-0.7.4-direcfb-0.9.24.patch
new file mode 100644
index 000000000000..8a8d0cf4d3fa
--- /dev/null
+++ b/media-video/dfbsee/files/dfbsee-0.7.4-direcfb-0.9.24.patch
@@ -0,0 +1,21 @@
+diff -Nru orig-DFBSee-0.7.4/src/main.c DFBSee-0.7.4/src/main.c
+--- orig-DFBSee-0.7.4/src/main.c 2005-12-05 15:12:38.000000000 +0800
++++ DFBSee-0.7.4/src/main.c 2005-12-05 15:14:14.000000000 +0800
+@@ -53,7 +53,7 @@
+ main (int argc,
+ char **argv)
+ {
+- DFBCardCapabilities caps;
++ DFBGraphicsDeviceDescription caps;
+ DFBSurfaceDescription dsc;
+ IDirectFBEventBuffer *buffer;
+ IDirectFBSurface *image_area;
+@@ -78,7 +78,7 @@
+ /* create the super interface */
+ DFBCHECK (DirectFBCreate (&dfb));
+
+- dfb->GetCardCapabilities (dfb, &caps);
++ dfb->GetDeviceDescription (dfb, &caps);
+ hw_stretchblit = caps.acceleration_mask & DFXL_STRETCHBLIT;
+
+ dfb->SetCooperativeLevel (dfb, DFSCL_FULLSCREEN);
diff --git a/media-video/dfbsee/files/dfbsee-0.7.4-gcc4.patch b/media-video/dfbsee/files/dfbsee-0.7.4-gcc4.patch
new file mode 100644
index 000000000000..5f17937b85e3
--- /dev/null
+++ b/media-video/dfbsee/files/dfbsee-0.7.4-gcc4.patch
@@ -0,0 +1,65 @@
+diff -Nru orig-DFBSee-0.7.4/src/rotate.c DFBSee-0.7.4/src/rotate.c
+--- orig-DFBSee-0.7.4/src/rotate.c 2005-12-05 15:37:52.000000000 +0800
++++ DFBSee-0.7.4/src/rotate.c 2005-12-05 15:38:10.000000000 +0800
+@@ -43,9 +43,9 @@
+ {\
+ *d = *s;\
+ s++;\
+- (__u8*)d += dest_pitch;\
++ d = ((void*) d) + dest_pitch;\
+ }\
+- (__u8*)src += src_pitch;\
++ src = ((void*) src) + src_pitch;\
+ }\
+ }\
+
+@@ -53,7 +53,7 @@
+ {\
+ type d;\
+ type s;\
+- (__u8 *) dest += (height - 1) * dest_pitch;\
++ dest = ((void*) dest) + (height - 1) * dest_pitch;\
+ for (w = 0; w < width; w++)\
+ {\
+ h = height;\
+@@ -63,9 +63,9 @@
+ {\
+ *d = *s;\
+ s++;\
+- (__u8*)d -= dest_pitch;\
++ d = ((void*) d) - dest_pitch;\
+ }\
+- (__u8*)src += src_pitch;\
++ src = ((void*) src) + src_pitch;\
+ }\
+ }\
+
+@@ -73,7 +73,7 @@
+ {\
+ type d;\
+ type s;\
+- (__u8 *) dest += (height - 1) * dest_pitch;\
++ dest = ((void*) dest) + (height - 1) * dest_pitch;\
+ while (--height)\
+ {\
+ d = (type) dest + width - 1;\
+@@ -85,8 +85,8 @@
+ s++;\
+ d--;\
+ }\
+- (__u8*)src += src_pitch;\
+- (__u8*)dest -= dest_pitch;\
++ src = ((void*) src) - src_pitch;\
++ dest = ((void*) dest) + dest_pitch;\
+ }\
+ }\
+
+@@ -172,7 +172,7 @@
+ source->Lock (source, DSLF_READ, &src, &src_pitch);
+ destination->Lock (destination, DSLF_READ, &dest, &dest_pitch);
+
+- (__u8 *) dest += dest_pitch * y + DFB_BYTES_PER_PIXEL (pixelformat) * x;
++ dest += dest_pitch * y + DFB_BYTES_PER_PIXEL (pixelformat) * x;
+
+ rotate (dest, dest_pitch,
+ src, src_pitch, width, height, DFB_BYTES_PER_PIXEL (pixelformat),
diff --git a/media-video/dfbsee/files/dfbsee-0.7.4-standardtypes.patch b/media-video/dfbsee/files/dfbsee-0.7.4-standardtypes.patch
new file mode 100644
index 000000000000..c1a864965e87
--- /dev/null
+++ b/media-video/dfbsee/files/dfbsee-0.7.4-standardtypes.patch
@@ -0,0 +1,43 @@
+Index: DFBSee-0.7.4/src/rotate.c
+===================================================================
+--- DFBSee-0.7.4.orig/src/rotate.c
++++ DFBSee-0.7.4/src/rotate.c
+@@ -110,10 +110,10 @@ rotate (void *dest,
+ switch (bpp)
+ {
+ case 2:
+- ROTATE_LEFT (__u16 *)
++ ROTATE_LEFT (uint16_t *)
+ break;
+ case 4:
+- ROTATE_LEFT (__u32 *)
++ ROTATE_LEFT (uint32_t *)
+ break;
+ default:
+ break;
+@@ -125,10 +125,10 @@ rotate (void *dest,
+ switch (bpp)
+ {
+ case 2:
+- ROTATE_RIGHT (__u16 *)
++ ROTATE_RIGHT (uint16_t *)
+ break;
+ case 4:
+- ROTATE_RIGHT (__u32 *)
++ ROTATE_RIGHT (uint32_t *)
+ break;
+ default:
+ break;
+@@ -139,10 +139,10 @@ rotate (void *dest,
+ switch (bpp)
+ {
+ case 2:
+- ROTATE_HALF (__u16 *)
++ ROTATE_HALF (uint16_t *)
+ break;
+ case 4:
+- ROTATE_HALF (__u32 *)
++ ROTATE_HALF (uint32_t *)
+ break;
+ default:
+ break;
diff --git a/media-video/dfbsee/metadata.xml b/media-video/dfbsee/metadata.xml
new file mode 100644
index 000000000000..1cadc2e4ec21
--- /dev/null
+++ b/media-video/dfbsee/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>video</herd>
+<maintainer>
+ <email>media-video@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/media-video/dirac/Manifest b/media-video/dirac/Manifest
new file mode 100644
index 000000000000..6fa4368f18e9
--- /dev/null
+++ b/media-video/dirac/Manifest
@@ -0,0 +1 @@
+DIST dirac-1.0.2.tar.gz 918366 SHA256 816b16f18d235ff8ccd40d95fc5b4fad61ae47583e86607932929d70bf1f00fd SHA512 71d49fe17da4069ea28581565d5a4c4f64565848b51d04b39a646bdaa9afc899a265e9ace34af57fba64b03562e8c2259f882f6f17c1e49d1057cd8e69d1250c WHIRLPOOL bb01f8a444f79cd194300ff83cae484bd0ff7be58c712cdaf5f525524f68474a89e093999df770d469d38fedae84559f8fab0b087cb448c52dc21daeaeb29ce8
diff --git a/media-video/dirac/dirac-1.0.2-r1.ebuild b/media-video/dirac/dirac-1.0.2-r1.ebuild
new file mode 100644
index 000000000000..c3e2c2dd1717
--- /dev/null
+++ b/media-video/dirac/dirac-1.0.2-r1.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils multilib-minimal
+
+DESCRIPTION="Open Source video codec"
+HOMEPAGE="http://dirac.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="MPL-1.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="debug doc cpu_flags_x86_mmx static-libs"
+
+RDEPEND=""
+DEPEND="
+ doc? (
+ app-doc/doxygen
+ virtual/latex-base
+ media-gfx/graphviz
+ || ( >=app-text/texlive-core-2014 app-text/dvipdfm )
+ )"
+DOCS=( AUTHORS ChangeLog NEWS README TODO )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.5.2-doc.patch
+ AT_M4DIR="m4" eautoreconf
+ export VARTEXFONTS="${T}/fonts"
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ $(use_enable static-libs static) \
+ $(use_enable cpu_flags_x86_mmx mmx) \
+ $(use_enable debug) \
+ $(multilib_is_native_abi && echo $(use_enable doc))
+ if ! multilib_is_native_abi ; then
+ sed -i -e 's/ encoder decoder util//' Makefile || die
+ fi
+}
+
+multilib_src_install() {
+ emake \
+ DESTDIR="${D}" \
+ htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \
+ latexdir="${EPREFIX}/usr/share/doc/${PF}/programmers" \
+ algodir="${EPREFIX}/usr/share/doc/${PF}/algorithm" \
+ faqdir="${EPREFIX}/usr/share/doc/${PF}" \
+ install
+}
+
+multilib_src_install_all() {
+ prune_libtool_files --all
+ einstalldocs
+}
diff --git a/media-video/dirac/dirac-1.0.2.ebuild b/media-video/dirac/dirac-1.0.2.ebuild
new file mode 100644
index 000000000000..d60ae3b9fffb
--- /dev/null
+++ b/media-video/dirac/dirac-1.0.2.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit autotools eutils
+
+DESCRIPTION="Open Source video codec"
+HOMEPAGE="http://dirac.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="MPL-1.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="debug doc cpu_flags_x86_mmx static-libs"
+
+RDEPEND=""
+DEPEND="
+ doc? (
+ app-doc/doxygen
+ virtual/latex-base
+ media-gfx/graphviz
+ app-text/dvipdfm
+ )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.5.2-doc.patch
+ AT_M4DIR="m4" eautoreconf
+}
+
+src_configure() {
+ export VARTEXFONTS="${T}/fonts"
+
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable cpu_flags_x86_mmx mmx) \
+ $(use_enable debug) \
+ $(use_enable doc)
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \
+ latexdir="${EPREFIX}/usr/share/doc/${PF}/programmers" \
+ algodir="${EPREFIX}/usr/share/doc/${PF}/algorithm" \
+ faqdir="${EPREFIX}/usr/share/doc/${PF}" \
+ install
+
+ dodoc AUTHORS ChangeLog NEWS README TODO
+
+ find "${ED}"usr -name '*.la' -exec rm -f {} +
+}
diff --git a/media-video/dirac/files/dirac-0.5.2-doc.patch b/media-video/dirac/files/dirac-0.5.2-doc.patch
new file mode 100644
index 000000000000..211486635dbd
--- /dev/null
+++ b/media-video/dirac/files/dirac-0.5.2-doc.patch
@@ -0,0 +1,59 @@
+diff -x '*~' -ur dirac-0.5.2/configure.ac dirac-0.5.2-doc/configure.ac
+--- dirac-0.5.2/configure.ac 2005-05-20 15:05:25.000000000 +0200
++++ dirac-0.5.2-doc/configure.ac 2005-06-10 03:31:58.683588784 +0200
+@@ -105,28 +105,37 @@
+ dnl -----------------------------------------------
+ dnl Checks for optional programs.
+ dnl -----------------------------------------------
+-AC_CHECK_PROG(HAVE_DOXYGEN, doxygen, true, false)
+- if test $HAVE_DOXYGEN = "false"; then
+- AC_MSG_WARN([*** doxygen not found, code documentation will not be built])
+- fi
+-AM_CONDITIONAL(HAVE_DOXYGEN, $HAVE_DOXYGEN)
++AC_ARG_ENABLE(doc, AC_HELP_STRING([--enable-doc], [enables doc building (no)]), [enabledoc=${enableval}], [enabledoc=no])
+
+-AC_CHECK_PROG(HAVE_DOT, dot, true, false)
+- if test $HAVE_DOT = "false"; then
+- AC_MSG_WARN([*** dot not found, inheritance diagrams will not be generated in code documentation])
++if test "x$enabledoc" != "xno"; then
++ AC_CHECK_PROG(HAVE_DOXYGEN, doxygen, true, false)
++ if test $HAVE_DOXYGEN = "false"; then
++ AC_MSG_WARN([*** doxygen not found, code documentation will not be built])
++ fi
++
++ AC_CHECK_PROG(HAVE_DOT, dot, true, false)
++ if test $HAVE_DOT = "false"; then
++ AC_MSG_WARN([*** dot not found, inheritance diagrams will not be generated in code documentation])
++ fi
++
++ AC_CHECK_PROG(HAVE_LATEX, latex, true, false)
++ if test $HAVE_LATEX = "false"; then
++ AC_MSG_WARN([*** latex not found, algorithm documentation will not be built])
++ fi
++
++ AC_CHECK_PROG(HAVE_DVIPDFM, dvipdfm, true, false)
++ if test $HAVE_DVIPDFM = "false"; then
++ AC_MSG_WARN([*** dvipdfm not found, programmer documentation will not be built])
+ fi
++else
++HAVE_DOXYGEN=false
++HAVE_DOT=false
++HAVE_LATEX=false
++HAVE_DVIPDFM=false
++fi
++AM_CONDITIONAL(HAVE_DOXYGEN, $HAVE_DOXYGEN)
+ AM_CONDITIONAL(HAVE_DOT, $HAVE_DOT)
+-
+-AC_CHECK_PROG(HAVE_LATEX, latex, true, false)
+- if test $HAVE_LATEX = "false"; then
+- AC_MSG_WARN([*** latex not found, algorithm documentation will not be built])
+- fi
+ AM_CONDITIONAL(HAVE_LATEX, $HAVE_LATEX)
+-
+-AC_CHECK_PROG(HAVE_DVIPDFM, dvipdfm, true, false)
+- if test $HAVE_DVIPDFM = "false"; then
+- AC_MSG_WARN([*** dvipdfm not found, programmer documentation will not be built])
+- fi
+ AM_CONDITIONAL(HAVE_DVIPDFM, $HAVE_DVIPDFM)
+
+ AC_ARG_ENABLE(overlay,
diff --git a/media-video/dirac/metadata.xml b/media-video/dirac/metadata.xml
new file mode 100644
index 000000000000..0627acf562a8
--- /dev/null
+++ b/media-video/dirac/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">dirac</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/dv2sub/Manifest b/media-video/dv2sub/Manifest
new file mode 100644
index 000000000000..f2577dacf424
--- /dev/null
+++ b/media-video/dv2sub/Manifest
@@ -0,0 +1 @@
+DIST dv2sub-0.3.tar.gz 121756 SHA256 6ce33bd59de3fe50cf5aa95a7455cf0b34586e72af44fa59c3e5dd9b50f7ca8c
diff --git a/media-video/dv2sub/dv2sub-0.3.ebuild b/media-video/dv2sub/dv2sub-0.3.ebuild
new file mode 100644
index 000000000000..5be2639fa6d6
--- /dev/null
+++ b/media-video/dv2sub/dv2sub-0.3.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+DESCRIPTION="extract info or subtitles from DV stream"
+HOMEPAGE="http://dv2sub.sourceforge.net/"
+SRC_URI="mirror://sourceforge/dv2sub/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="kino"
+
+DEPEND="media-libs/libdv"
+RDEPEND="${DEPEND}
+ kino? (
+ media-video/kino
+ media-video/dvdauthor
+ virtual/ffmpeg
+ )"
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ dodoc AUTHORS ChangeLog README TODO
+ if use kino; then
+ insinto /usr/share/kino/scripts/exports
+ exeinto /usr/share/kino/scripts/exports
+ doins kino_scripts/dv2sub_spumux.xml
+ doexe kino_scripts/*.sh
+ fi
+}
diff --git a/media-video/dv2sub/metadata.xml b/media-video/dv2sub/metadata.xml
new file mode 100644
index 000000000000..b24d9c82485d
--- /dev/null
+++ b/media-video/dv2sub/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <longdescription lang="en">
+ Utility dv2sub reads raw DV stream from file argument dv-file or
+ standard input if absent. It can generate a parameter log about
+ every input DV frame or create MicroDVD subtitles with the
+ recording date and time.
+ </longdescription>
+ <use>
+ <flag name="kino">install kino plugin</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">dv2sub</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/dvbackup/Manifest b/media-video/dvbackup/Manifest
new file mode 100644
index 000000000000..9305bd080fef
--- /dev/null
+++ b/media-video/dvbackup/Manifest
@@ -0,0 +1 @@
+DIST dvbackup-0.0.4.tar.gz 115303 SHA256 0020cd05d9985f5fcf80d49315373265d6d6a755efb0e18d337254f2aea249e1
diff --git a/media-video/dvbackup/dvbackup-0.0.4-r1.ebuild b/media-video/dvbackup/dvbackup-0.0.4-r1.ebuild
new file mode 100644
index 000000000000..6d691f2052b7
--- /dev/null
+++ b/media-video/dvbackup/dvbackup-0.0.4-r1.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils
+
+DESCRIPTION="A small utility for creating backups on DV tapes"
+HOMEPAGE="http://dvbackup.sourceforge.net/"
+SRC_URI="mirror://sourceforge/dvbackup/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+DEPEND="sys-libs/glibc
+ dev-libs/popt
+ sys-libs/zlib"
+
+RDEPEND="${DEPEND}
+ media-libs/libdv"
+
+src_prepare() {
+ local i
+
+ epatch "${FILESDIR}/${P}-gcc4.diff"
+
+ # fix Makefile to respect $LDFLAGS
+ sed -i -e 's:gcc \$(CFLAGS):\$(CC) \$(CFLAGS) \$(LDFLAGS):g' \
+ -e 's:^\(CFLAGS=\):#\1:g' Makefile
+
+ # convert LATIN1 docs to UTF-8
+ for i in ChangeLog ReleaseNotes; do
+ if [ -f "${i}" ]; then
+ echo ">>> Converting ${i} to UTF-8"
+ iconv -f LATIN1 -t UTF8 -o "${i}~" "${i}" && mv -f "${i}~" "${i}" || rm -f "${i}~"
+ fi
+ done
+}
+
+src_compile() {
+ emake dvbackup || die "emake failed"
+}
+
+src_install() {
+ dobin dvbackup
+ insinto /usr/share/${PN}
+ doins underrun-ntsc.dv underrun-pal.dv
+ dodoc AUTHORS ChangeLog ReleaseNotes
+ dohtml dvbackup.html
+}
diff --git a/media-video/dvbackup/files/dvbackup-0.0.4-gcc4.diff b/media-video/dvbackup/files/dvbackup-0.0.4-gcc4.diff
new file mode 100644
index 000000000000..1ab2c4b07eb8
--- /dev/null
+++ b/media-video/dvbackup/files/dvbackup-0.0.4-gcc4.diff
@@ -0,0 +1,11 @@
+diff -Naur dvbackup-0.0.4.orig/dvconnect.c dvbackup-0.0.4/dvconnect.c
+--- dvbackup-0.0.4.orig/dvconnect.c 2002-03-24 20:27:10.000000000 +0100
++++ dvbackup-0.0.4/dvconnect.c 2009-11-05 16:16:10.467442012 +0100
+@@ -9,6 +9,7 @@
+
+ #include <pthread.h>
+ #include <signal.h>
++#include <string.h>
+
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
diff --git a/media-video/dvbackup/metadata.xml b/media-video/dvbackup/metadata.xml
new file mode 100644
index 000000000000..fd6948928d80
--- /dev/null
+++ b/media-video/dvbackup/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">dvbackup</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/dvbsnoop/Manifest b/media-video/dvbsnoop/Manifest
new file mode 100644
index 000000000000..5e8f33245015
--- /dev/null
+++ b/media-video/dvbsnoop/Manifest
@@ -0,0 +1 @@
+DIST dvbsnoop-1.4.50.tar.gz 333992 SHA256 7658498b26a5d2a0242e81f0cfafa0e43a2bec56f8674e7ac197dfc310866ec6 SHA512 288b98e9205b9ee6638b65cd0d7c463c2c243c1f7e650a6df8592acd3f40eca3352a563cc8a1a04f0f2731b3718e6dc3d09f56f59da4b59fbe25b86acf434f81 WHIRLPOOL 2e9c779cf2689759be0c04b74952313d2b026e4819f7064fe919cbd41465a325300e1e0e0f864983b881006dea3de2fe30365c375f430d667e0cfc589eeb4690
diff --git a/media-video/dvbsnoop/dvbsnoop-1.4.50-r1.ebuild b/media-video/dvbsnoop/dvbsnoop-1.4.50-r1.ebuild
new file mode 100644
index 000000000000..3d9534bb4a2b
--- /dev/null
+++ b/media-video/dvbsnoop/dvbsnoop-1.4.50-r1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="DVB/MPEG stream analyzer program"
+SRC_URI="mirror://sourceforge/dvbsnoop/${P}.tar.gz"
+HOMEPAGE="http://dvbsnoop.sourceforge.net/"
+LICENSE="GPL-2"
+KEYWORDS="amd64 ~ppc x86"
+DEPEND="virtual/linuxtv-dvb-headers"
+
+RDEPEND=""
+SLOT="0"
+IUSE=""
+
+src_prepare () {
+ epatch "${FILESDIR}/${P}-crc32.patch"
+}
+
+src_install () {
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ dodoc AUTHORS ChangeLog README
+}
diff --git a/media-video/dvbsnoop/files/dvbsnoop-1.4.50-crc32.patch b/media-video/dvbsnoop/files/dvbsnoop-1.4.50-crc32.patch
new file mode 100644
index 000000000000..eb663a4426c4
--- /dev/null
+++ b/media-video/dvbsnoop/files/dvbsnoop-1.4.50-crc32.patch
@@ -0,0 +1,59 @@
+diff -rupN dvbsnoop-1.4.50-origdeb/src/misc/crc32.c dvbsnoop-1.4.50/src/misc/crc32.c
+--- dvbsnoop-1.4.50-origdeb/src/misc/crc32.c 2006-01-02 21:24:04.000000000 +0200
++++ dvbsnoop-1.4.50/src/misc/crc32.c 2010-01-19 13:21:37.000000000 +0200
+@@ -17,14 +17,14 @@ $Id$
+
+
+
+-#include <sys/types.h>
++#include <stdint.h>
+ #include "crc32.h"
+
+
+
+ // CRC32 lookup table for polynomial 0x04c11db7
+
+-static u_long crc_table[256] = {
++static uint32_t crc_table[256] = {
+ 0x00000000, 0x04c11db7, 0x09823b6e, 0x0d4326d9, 0x130476dc, 0x17c56b6b,
+ 0x1a864db2, 0x1e475005, 0x2608edb8, 0x22c9f00f, 0x2f8ad6d6, 0x2b4bcb61,
+ 0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd, 0x4c11db70, 0x48d0c6c7,
+@@ -69,10 +69,10 @@ static u_long crc_table[256] = {
+ 0x933eb0bb, 0x97ffad0c, 0xafb010b1, 0xab710d06, 0xa6322bdf, 0xa2f33668,
+ 0xbcb4666d, 0xb8757bda, 0xb5365d03, 0xb1f740b4};
+
+-u_long crc32 (char *data, int len)
++uint32_t crc32 (char *data, int len)
+ {
+ register int i;
+- u_long crc = 0xffffffff;
++ uint32_t crc = 0xffffffff;
+
+ for (i=0; i<len; i++)
+ crc = (crc << 8) ^ crc_table[((crc >> 24) ^ *data++) & 0xff];
+diff -rupN dvbsnoop-1.4.50-origdeb/src/misc/crc32.h dvbsnoop-1.4.50/src/misc/crc32.h
+--- dvbsnoop-1.4.50-origdeb/src/misc/crc32.h 2006-01-02 21:24:04.000000000 +0200
++++ dvbsnoop-1.4.50/src/misc/crc32.h 2010-01-19 13:21:37.000000000 +0200
+@@ -19,8 +19,9 @@ $Id$
+ #ifndef __CRC32_H
+ #define __CRC32_H
+
++#include <stdint.h>
+
+-u_long crc32 (char *data, int len);
++uint32_t crc32 (char *data, int len);
+
+
+ #endif
+diff -rupN dvbsnoop-1.4.50-origdeb/src/sections/sectables.c dvbsnoop-1.4.50/src/sections/sectables.c
+--- dvbsnoop-1.4.50-origdeb/src/sections/sectables.c 2005-12-29 05:43:40.000000000 +0200
++++ dvbsnoop-1.4.50/src/sections/sectables.c 2010-01-19 13:59:07.000000000 +0200
+@@ -269,7 +269,7 @@ void decodeSI_packet (u_char *buf, int l
+ softcrc_fail = 0;
+
+ if (opt->soft_crc) {
+- u_long crc = crc32 ((char *)buf,len);
++ uint32_t crc = crc32 ((char *)buf,len);
+ if (crc) {
+ softcrc_fail = 1;
+ }
diff --git a/media-video/dvbsnoop/metadata.xml b/media-video/dvbsnoop/metadata.xml
new file mode 100644
index 000000000000..70732c4e54bf
--- /dev/null
+++ b/media-video/dvbsnoop/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">dvbsnoop</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/dvd-slideshow/Manifest b/media-video/dvd-slideshow/Manifest
new file mode 100644
index 000000000000..c6dc96b75849
--- /dev/null
+++ b/media-video/dvd-slideshow/Manifest
@@ -0,0 +1,3 @@
+DIST dvd-slideshow-0.8.4-2.tar.gz 162905 SHA256 0587cbe4b39b415aec232ada3213b4352c3b9eecec82a64594f1deb8b14a809d
+DIST dvd-slideshow-examples-0.8.4-1.tar.gz 1565431 SHA256 2bb1c227136783c9eb7a43ee7fad4b8b0871e70a4269ed5b7604b13ff88ebed7
+DIST dvd-slideshow-themes-0.8.4-1.tar.gz 1225865 SHA256 3a929836c9a4afbb3b134718ea548d0f562f48c52d0026ff7bc1b99bebc4d5a1
diff --git a/media-video/dvd-slideshow/dvd-slideshow-0.8.4.2.ebuild b/media-video/dvd-slideshow/dvd-slideshow-0.8.4.2.ebuild
new file mode 100644
index 000000000000..6e1c98bf4b70
--- /dev/null
+++ b/media-video/dvd-slideshow/dvd-slideshow-0.8.4.2.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit versionator
+
+MY_P=${PN}-$(replace_version_separator 3 '-')
+
+DESCRIPTION="DVD Slideshow - Turn your pictures into a dvd with menus!"
+HOMEPAGE="http://dvd-slideshow.sourceforge.net/wiki/Main_Page"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz
+ examples? ( mirror://sourceforge/${PN}/${PN}-examples-0.8.4-1.tar.gz )
+ themes? ( mirror://sourceforge/${PN}/${PN}-themes-0.8.4-1.tar.gz )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="examples mp3 themes vorbis"
+
+RDEPEND="media-sound/sox
+ || ( media-gfx/imagemagick media-gfx/graphicsmagick[imagemagick] )
+ media-video/mjpegtools
+ >media-video/dvdauthor-0.6.11
+ virtual/cdrtools
+ virtual/ffmpeg
+ app-cdr/dvd+rw-tools
+ mp3? ( media-sound/lame )
+ vorbis? ( media-libs/libvorbis )
+ sys-devel/bc
+ media-gfx/jhead"
+DEPEND=""
+
+S=${WORKDIR}/${MY_P}
+
+src_install() {
+ dobin dir2slideshow dvd-menu dvd-slideshow gallery1-to-slideshow \
+ jigl2slideshow
+
+ dodoc doc/changelog.txt dvd-slideshowrc TODO.txt
+ dohtml doc/*.html
+ doman man/*.1
+
+ if use examples; then
+ docinto examples
+ dodoc -r "${WORKDIR}"/dvd-slideshow-examples-0.8.4-1/*
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+
+ if use themes; then
+ rm "${WORKDIR}"/dvd-slideshow-themes-0.8.4-1/themes.readme.txt
+ insinto /usr/share/themes/${PF}
+ doins -r "${WORKDIR}"/dvd-slideshow-themes-0.8.4-1/*
+ fi
+}
diff --git a/media-video/dvd-slideshow/metadata.xml b/media-video/dvd-slideshow/metadata.xml
new file mode 100644
index 000000000000..1b05378ec9bd
--- /dev/null
+++ b/media-video/dvd-slideshow/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="themes">Install theme pack</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">dvd-slideshow</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/dvd9to5/Manifest b/media-video/dvd9to5/Manifest
new file mode 100644
index 000000000000..f64b6cd99e13
--- /dev/null
+++ b/media-video/dvd9to5/Manifest
@@ -0,0 +1 @@
+DIST dvd9to5-0.1.7.tar.bz2 11803 RMD160 dde2dcaa3865ecf7d846f28ee8e102325bdcb02a SHA1 422a4fd1fca99c49d8fb2777c879588542265b27 SHA256 181d6eed53624e6b4364506d12aa9f2ce64cef821503553f769c83b1bfdcecb9
diff --git a/media-video/dvd9to5/dvd9to5-0.1.7.ebuild b/media-video/dvd9to5/dvd9to5-0.1.7.ebuild
new file mode 100644
index 000000000000..f18f26f83763
--- /dev/null
+++ b/media-video/dvd9to5/dvd9to5-0.1.7.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Perl script to backup the main feature of a DVD-9 on DVD-5"
+HOMEPAGE="http://lakedaemon.netmindz.net/dvd9to5/"
+SRC_URI="http://lakedaemon.netmindz.net/dvd9to5/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+RDEPEND=">=media-video/transcode-0.6.11
+ >=media-video/mjpegtools-1.6.2
+ >=media-video/dvdauthor-0.6.10
+ app-cdr/dvd+rw-tools
+ dev-lang/perl"
+
+src_compile() {
+ true # nothing to do
+}
+
+src_install() {
+ dobin dvd9to5.pl
+ dodoc CHANGELOG README TODO dvd9to5.conf.example
+}
diff --git a/media-video/dvd9to5/metadata.xml b/media-video/dvd9to5/metadata.xml
new file mode 100644
index 000000000000..6c50827683d5
--- /dev/null
+++ b/media-video/dvd9to5/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>video</herd>
+<maintainer>
+ <email>media-video@gentoo.org</email>
+</maintainer>
+<longdescription lang="en">
+A program to rip double layer discs (9gig) to single layer discs (5 gig).
+</longdescription>
+</pkgmetadata>
+
diff --git a/media-video/dvdauthor/Manifest b/media-video/dvdauthor/Manifest
new file mode 100644
index 000000000000..8e4bf086d135
--- /dev/null
+++ b/media-video/dvdauthor/Manifest
@@ -0,0 +1,3 @@
+DIST dvdauthor-0.6.18.tar.gz 392809 SHA256 0e21c2d9c09f7e347c4c9bd7b691455f524ec2e91bcafc18b84d7b7fb3a9cb26 SHA512 15bed459a77ad83c998007aab54619954adf0ba63a71978c3374c64a3506e82583cdb042383c1b2e1ccef83243c968d8f66ccb7182333c02aef30678124242c0 WHIRLPOOL aac6101559c74c1f64648c84555d7c0608dc92219600d0a7b355f0752143ce06950ca544750dcdaa1a79ecee252d04e201635d4248c95052f5f3dd0689c6a5f9
+DIST dvdauthor-0.7.0.tar.gz 414191 SHA256 aea6af7b99eba38ffa9dc5ad1521c2cc652e043cea0e7482e239d2a3fc2f34d0 SHA512 2f450ef02dac774a8611f3398f71a8d9d4f7ebb3c9de56ec1c4ec2d54350f371bf32387f95bc90dcd399618819f46cd589cacfef6f7aae68ee3addda5e9ce892 WHIRLPOOL af960e9ad82c8e0da7c67dfde6c471803ed1d53eda8f373a4f1d3dd54edb2a0a91b654d65855a6171032e12230db0d2bb7e2e016d76c5222591e0ea70dbeb65b
+DIST dvdauthor-0.7.1.tar.gz 421324 SHA256 501fb11b09c6eb9c5a229dcb400bd81e408cc78d34eab6749970685023c51fe9 SHA512 0875300df4711bf5758cb8a3ec03793689abd403cdebfc5736463d9b6df49a22e66e9e1f0c2abfcb7d25469c2e7f7e76789f7779cc0743ec972f8965b0f744a9 WHIRLPOOL c07526bbdbd75b4ddc0f2a1057f2bf27dbb5c63b4e4495b3a051d530af58ba4d4d75ec15dff2e3628cd1cb46b476ecb6a3d640ec30e1e6692d832549108b3e63
diff --git a/media-video/dvdauthor/dvdauthor-0.6.18.ebuild b/media-video/dvdauthor/dvdauthor-0.6.18.ebuild
new file mode 100644
index 000000000000..f4b581b4f042
--- /dev/null
+++ b/media-video/dvdauthor/dvdauthor-0.6.18.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils
+
+DESCRIPTION="Tools for generating DVD files to be played on standalone DVD players"
+HOMEPAGE="http://dvdauthor.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 sparc x86"
+IUSE=""
+
+RDEPEND="media-libs/libdvdread
+ >=media-gfx/imagemagick-5.5.7.14
+ >=dev-libs/libxml2-2.6.0
+ media-libs/freetype
+ dev-libs/fribidi
+ media-libs/libpng"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${PN}
+
+DOCS=( AUTHORS ChangeLog README TODO )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-libpng15.patch
+}
diff --git a/media-video/dvdauthor/dvdauthor-0.7.0.ebuild b/media-video/dvdauthor/dvdauthor-0.7.0.ebuild
new file mode 100644
index 000000000000..f842a04f20a8
--- /dev/null
+++ b/media-video/dvdauthor/dvdauthor-0.7.0.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="Tools for generating DVD files to be played on standalone DVD players"
+HOMEPAGE="http://dvdauthor.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 sparc x86"
+IUSE="graphicsmagick"
+
+RDEPEND=">=dev-libs/fribidi-0.19.2
+ dev-libs/libxml2
+ >=media-libs/freetype-2
+ media-libs/libdvdread
+ media-libs/libpng
+ graphicsmagick? ( media-gfx/graphicsmagick )
+ !graphicsmagick? ( >=media-gfx/imagemagick-5.5.7.14 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${PN}
+
+DOCS=( AUTHORS ChangeLog README TODO )
+
+src_prepare() {
+ use graphicsmagick && \
+ sed -i -e 's:ExportImagePixels:dIsAbLeAuToMaGiC&:' configure
+
+ epatch "${FILESDIR}"/${P}-libpng15.patch
+}
+
+src_configure() {
+ append-cppflags "$($(tc-getPKG_CONFIG) --cflags fribidi)" #417041
+ econf
+}
diff --git a/media-video/dvdauthor/dvdauthor-0.7.1.ebuild b/media-video/dvdauthor/dvdauthor-0.7.1.ebuild
new file mode 100644
index 000000000000..37e34143fa62
--- /dev/null
+++ b/media-video/dvdauthor/dvdauthor-0.7.1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="Tools for generating DVD files to be played on standalone DVD players"
+HOMEPAGE="http://dvdauthor.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 sparc x86"
+IUSE="graphicsmagick"
+
+RDEPEND=">=dev-libs/fribidi-0.19.2
+ dev-libs/libxml2
+ >=media-libs/freetype-2
+ media-libs/libdvdread
+ media-libs/libpng:0=
+ graphicsmagick? ( media-gfx/graphicsmagick )
+ !graphicsmagick? ( >=media-gfx/imagemagick-5.5.7.14 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${PN}
+
+DOCS=( AUTHORS ChangeLog README TODO )
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-glibc220.patch"
+ use graphicsmagick && \
+ sed -i -e 's:ExportImagePixels:dIsAbLeAuToMaGiC&:' configure
+}
+
+src_configure() {
+ use graphicsmagick && \
+ append-cppflags "$($(tc-getPKG_CONFIG) --cflags GraphicsMagick)" #459976
+ append-cppflags "$($(tc-getPKG_CONFIG) --cflags fribidi)" #417041
+ econf
+}
diff --git a/media-video/dvdauthor/files/dvdauthor-0.6.18-libpng15.patch b/media-video/dvdauthor/files/dvdauthor-0.6.18-libpng15.patch
new file mode 100644
index 000000000000..6ecd44c1e8d2
--- /dev/null
+++ b/media-video/dvdauthor/files/dvdauthor-0.6.18-libpng15.patch
@@ -0,0 +1,19 @@
+--- src/spuunmux.c
++++ src/spuunmux.c
+@@ -37,6 +37,7 @@
+
+ #include <netinet/in.h>
+
++#include <zlib.h>
+ #include <png.h>
+
+ #include "rgb.h"
+@@ -483,7 +484,7 @@
+ return -1;
+ }
+
+- if (setjmp(png_ptr->jmpbuf)) {
++ if (setjmp(png_jmpbuf(png_ptr))) {
+ png_destroy_write_struct(&png_ptr, &info_ptr);
+ fclose(fp);
+ return -1;
diff --git a/media-video/dvdauthor/files/dvdauthor-0.7.0-libpng15.patch b/media-video/dvdauthor/files/dvdauthor-0.7.0-libpng15.patch
new file mode 100644
index 000000000000..2bb63638032f
--- /dev/null
+++ b/media-video/dvdauthor/files/dvdauthor-0.7.0-libpng15.patch
@@ -0,0 +1,19 @@
+--- src/spuunmux.c
++++ src/spuunmux.c
+@@ -39,6 +39,7 @@
+ #include <netinet/in.h>
+
+ #include <png.h>
++#include <zlib.h>
+
+ #include "rgb.h"
+ #include "common.h"
+@@ -610,7 +611,7 @@
+ png_destroy_write_struct(&png_ptr, (png_infopp)NULL);
+ return -1;
+ } /*if*/
+- if (setjmp(png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(png_ptr)))
+ {
+ png_destroy_write_struct(&png_ptr, &info_ptr);
+ fclose(fp);
diff --git a/media-video/dvdauthor/files/dvdauthor-0.7.1-glibc220.patch b/media-video/dvdauthor/files/dvdauthor-0.7.1-glibc220.patch
new file mode 100644
index 000000000000..880c63aa79d7
--- /dev/null
+++ b/media-video/dvdauthor/files/dvdauthor-0.7.1-glibc220.patch
@@ -0,0 +1,162 @@
+From 5b890b47aaf6f692c876faf435e6bf8990e7a45d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta@iki.fi>
+Date: Sat, 19 Jul 2014 21:06:58 +0300
+Subject: [PATCH] compat.h needs stuff from config.h so include it there
+
+This was brought up by dvdvml.* not including it and thus causing a
+build failure on Fedora (22) devel. While at it, uninclude config.h
+from files where it was included just for compat.h reasons.
+---
+ src/compat.h | 2 ++
+ src/conffile.c | 1 -
+ src/dvdauthor.c | 2 --
+ src/dvdcompile.c | 2 --
+ src/dvdpgc.c | 1 -
+ src/dvdunauthor.c | 2 --
+ src/dvduncompile.c | 1 -
+ src/dvdvob.c | 2 --
+ src/readxml.c | 2 --
+ src/spuunmux.c | 1 -
+ src/subgen-encode.c | 2 --
+ 11 files changed, 2 insertions(+), 16 deletions(-)
+
+diff --git a/src/compat.h b/src/compat.h
+index 126dcd7..93de081 100644
+--- a/src/compat.h
++++ b/src/compat.h
+@@ -1,6 +1,8 @@
+ // basic headers
+ #define _GNU_SOURCE /* really just for strndup */
+
++#include "config.h"
++
+ #ifdef HAVE_STDBOOL_H
+ # include <stdbool.h>
+ #else
+diff --git a/src/conffile.c b/src/conffile.c
+index cab661a..36ded07 100644
+--- a/src/conffile.c
++++ b/src/conffile.c
+@@ -21,7 +21,6 @@
+ * MA 02110-1301 USA.
+ */
+
+-#include "config.h"
+ #include "compat.h"
+ #include <errno.h>
+ #include "conffile.h"
+diff --git a/src/dvdauthor.c b/src/dvdauthor.c
+index d591d68..4860258 100644
+--- a/src/dvdauthor.c
++++ b/src/dvdauthor.c
+@@ -20,8 +20,6 @@
+ * MA 02110-1301 USA.
+ */
+
+-#include "config.h"
+-
+ #include "compat.h"
+
+ #include <sys/types.h>
+diff --git a/src/dvdcompile.c b/src/dvdcompile.c
+index fd232b6..47f13e5 100644
+--- a/src/dvdcompile.c
++++ b/src/dvdcompile.c
+@@ -20,8 +20,6 @@
+ * MA 02110-1301 USA.
+ */
+
+-#include "config.h"
+-
+ #include "compat.h"
+ #include <assert.h>
+
+diff --git a/src/dvdpgc.c b/src/dvdpgc.c
+index e0adc61..cf6eb04 100644
+--- a/src/dvdpgc.c
++++ b/src/dvdpgc.c
+@@ -20,7 +20,6 @@
+ * MA 02110-1301 USA.
+ */
+
+-#include "config.h"
+ #include "compat.h"
+ #include <errno.h>
+ #include <assert.h>
+diff --git a/src/dvdunauthor.c b/src/dvdunauthor.c
+index ccd422f..f988cdf 100644
+--- a/src/dvdunauthor.c
++++ b/src/dvdunauthor.c
+@@ -23,8 +23,6 @@
+ * MA 02110-1301 USA.
+ */
+
+-#include "config.h"
+-
+ #include "compat.h"
+
+ #include <ctype.h>
+diff --git a/src/dvduncompile.c b/src/dvduncompile.c
+index 0c5eaf1..a064011 100644
+--- a/src/dvduncompile.c
++++ b/src/dvduncompile.c
+@@ -22,7 +22,6 @@
+ * MA 02110-1301 USA.
+ */
+
+-#include "config.h"
+ #include "compat.h"
+
+ #include <stdio.h>
+diff --git a/src/dvdvob.c b/src/dvdvob.c
+index 2d7e2b8..2146689 100644
+--- a/src/dvdvob.c
++++ b/src/dvdvob.c
+@@ -20,8 +20,6 @@
+ * MA 02110-1301 USA.
+ */
+
+-#include "config.h"
+-
+ #include "compat.h"
+
+ #include <assert.h>
+diff --git a/src/readxml.c b/src/readxml.c
+index 61ff0a1..3b83f07 100644
+--- a/src/readxml.c
++++ b/src/readxml.c
+@@ -20,8 +20,6 @@
+ * MA 02110-1301 USA.
+ */
+
+-#include "config.h"
+-
+ #include "compat.h"
+
+ #include <assert.h>
+diff --git a/src/spuunmux.c b/src/spuunmux.c
+index 1981e41..94fcb10 100644
+--- a/src/spuunmux.c
++++ b/src/spuunmux.c
+@@ -31,7 +31,6 @@
+ * MA 02110-1301 USA.
+ */
+
+-#include "config.h"
+ #include "compat.h"
+
+ #include <fcntl.h>
+diff --git a/src/subgen-encode.c b/src/subgen-encode.c
+index 53ed4b2..962e902 100644
+--- a/src/subgen-encode.c
++++ b/src/subgen-encode.c
+@@ -21,8 +21,6 @@
+ * MA 02110-1301 USA.
+ */
+
+-#include "config.h"
+-
+ #include "compat.h"
+
+ #include <assert.h>
+ \ No newline at end of file
diff --git a/media-video/dvdauthor/metadata.xml b/media-video/dvdauthor/metadata.xml
new file mode 100644
index 000000000000..07aa9c9d8ea8
--- /dev/null
+++ b/media-video/dvdauthor/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="graphicsmagick">Use <pkg>media-gfx/graphicsmagick</pkg> instead of <pkg>media-gfx/imagemagick</pkg></flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">dvdauthor</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/dvdbackup/Manifest b/media-video/dvdbackup/Manifest
new file mode 100644
index 000000000000..5ff2323dee41
--- /dev/null
+++ b/media-video/dvdbackup/Manifest
@@ -0,0 +1,2 @@
+DIST dvdbackup-0.4.1.tar.bz2 188496 SHA256 8194fe84950f3886551e75357d56c0fff3bd5fbd47d3b661c75d57d60cd3c6be SHA512 4f6fcb06f3bc9c0066e9cb51582707accc9629c8239f15d84a05a877927292449dda515796bd91069b1280ceb99dab50213cf6f3fbc79e6f56242923d9e2ae86 WHIRLPOOL 10e386a69fd20e280ec9cecd2bdd08c583c2ed91d43a9d6dc2e0ebd2aa9a3a2061fa895d2c03e8f7735804026cb96079dac4cd18f45764bccef1043a1c7353db
+DIST dvdbackup-0.4.2.tar.xz 178660 SHA256 ef8c56fbb82b15b7eef00d2d3118c8253f9770009ed7bb2a5d4849acf88183e6 SHA512 df9abb2ca0b8a7cd7855ddff94dae249b06b2ec0ee42f3e9c53aa46aebd9885bdf26dacecbd4a20ff5f642ea10c0c64b811d25c23802c8a2b1489281900fbe0d WHIRLPOOL 8c1612b3fc33d9d22c52fce705289f371d026650f85a8ecde2e5d29d540a5649f594a139bebe15d76bfdd8839af6468fd0175a43e56e335f0e8f66e622b7d3a0
diff --git a/media-video/dvdbackup/dvdbackup-0.4.1.ebuild b/media-video/dvdbackup/dvdbackup-0.4.1.ebuild
new file mode 100644
index 000000000000..86c0463da034
--- /dev/null
+++ b/media-video/dvdbackup/dvdbackup-0.4.1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="Backup content from DVD to hard disk"
+HOMEPAGE="http://dvdbackup.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-solaris"
+IUSE="nls"
+
+RDEPEND=">=media-libs/libdvdread-4.2.0_pre
+ nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )"
+
+DOCS=( AUTHORS ChangeLog NEWS README )
+
+src_configure() {
+ econf \
+ $(use_enable nls) \
+ --disable-rpath \
+ --docdir=/usr/share/doc/${PF}
+}
diff --git a/media-video/dvdbackup/dvdbackup-0.4.2.ebuild b/media-video/dvdbackup/dvdbackup-0.4.2.ebuild
new file mode 100644
index 000000000000..c68d6d5a5489
--- /dev/null
+++ b/media-video/dvdbackup/dvdbackup-0.4.2.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="Backup content from DVD to hard disk"
+HOMEPAGE="http://dvdbackup.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-solaris"
+IUSE="nls"
+
+RDEPEND=">=media-libs/libdvdread-4.2.0_pre
+ nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )"
+
+DOCS=( AUTHORS ChangeLog NEWS README )
+
+src_configure() {
+ econf \
+ $(use_enable nls) \
+ --disable-rpath \
+ --docdir=/usr/share/doc/${PF}
+}
diff --git a/media-video/dvdbackup/metadata.xml b/media-video/dvdbackup/metadata.xml
new file mode 100644
index 000000000000..8b06e13576fb
--- /dev/null
+++ b/media-video/dvdbackup/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">dvdbackup</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/dvdimagecmp/Manifest b/media-video/dvdimagecmp/Manifest
new file mode 100644
index 000000000000..d3cb2b047c3f
--- /dev/null
+++ b/media-video/dvdimagecmp/Manifest
@@ -0,0 +1 @@
+DIST dvdimagecmp-0.3.tgz 10483 RMD160 19ae3eff959e3367f5e31db6e004441476647f1d SHA1 56c63ea845ad85e77f693c6765a6ca40d7ec1388 SHA256 453df95038dfa7cf5de679323d82963f62adbf39b72cc863542a05ae1dba25a1
diff --git a/media-video/dvdimagecmp/dvdimagecmp-0.3-r1.ebuild b/media-video/dvdimagecmp/dvdimagecmp-0.3-r1.ebuild
new file mode 100644
index 000000000000..002e11a4f4e8
--- /dev/null
+++ b/media-video/dvdimagecmp/dvdimagecmp-0.3-r1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils toolchain-funcs flag-o-matic
+
+IUSE=""
+
+DESCRIPTION="Tool to compare a burned DVD with an image to check for errors"
+HOMEPAGE="http://panteltje.com/panteltje/dvd/"
+SRC_URI="http://panteltje.com/panteltje/dvd/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/${P}.diff"
+}
+
+src_compile() {
+ append-flags -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" || die "emake failed"
+}
+
+src_install() {
+ dobin dvdimagecmp
+ dodoc CHANGES README
+}
diff --git a/media-video/dvdimagecmp/files/dvdimagecmp-0.3.diff b/media-video/dvdimagecmp/files/dvdimagecmp-0.3.diff
new file mode 100644
index 000000000000..95917293c130
--- /dev/null
+++ b/media-video/dvdimagecmp/files/dvdimagecmp-0.3.diff
@@ -0,0 +1,23 @@
+diff -Naur dvdimagecmp-0.3.orig/dvdimagecmp.c dvdimagecmp-0.3/dvdimagecmp.c
+--- dvdimagecmp-0.3.orig/dvdimagecmp.c 2005-01-04 14:54:52.000000000 +0100
++++ dvdimagecmp-0.3/dvdimagecmp.c 2007-10-06 15:36:34.000000000 +0200
+@@ -33,6 +33,7 @@
+ #include <errno.h>
+ #include <ctype.h>
+ #include <time.h>
++#include <string.h>
+
+ #define MAX_RETRIES 1
+ #define BUFFER_SIZE 2048*16
+diff -Naur dvdimagecmp-0.3.orig/Makefile dvdimagecmp-0.3/Makefile
+--- dvdimagecmp-0.3.orig/Makefile 2005-01-04 14:54:52.000000000 +0100
++++ dvdimagecmp-0.3/Makefile 2007-10-06 15:36:59.000000000 +0200
+@@ -13,7 +13,7 @@
+ # -ltermcap
+
+ a.out : $(OBJECT)
+- $(CC) -o dvdimagecmp $(OBJECT)
++ $(CC) $(LDFLAGS) -o dvdimagecmp $(OBJECT)
+
+ # DEPENDENCIES
+
diff --git a/media-video/dvdimagecmp/metadata.xml b/media-video/dvdimagecmp/metadata.xml
new file mode 100644
index 000000000000..edccfe5754d2
--- /dev/null
+++ b/media-video/dvdimagecmp/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>video</herd>
+<maintainer>
+<email>media-video@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/media-video/dvdrip/Manifest b/media-video/dvdrip/Manifest
new file mode 100644
index 000000000000..eaf4a3141763
--- /dev/null
+++ b/media-video/dvdrip/Manifest
@@ -0,0 +1 @@
+DIST dvdrip-0.98.11.tar.gz 2075302 SHA256 586c20968b2daa55c0afaaf334d5b9b8b6896d6ea45078a577e165806858c3a5 SHA512 8bb2e4cb72666ac3f7d1953e02ac868070503f00b05ea39b4961f54042088d07abd4ef020a9cefec11e96e965d84dd95d00288e7562d92551f480ccba88b9dce WHIRLPOOL f7c62a87a518944ebdb06dded99b71f563bbf6d95a0d62adfcb37b0faabf15bfe1b8900a8fcd4438d0c82fe038114fc717a40a80a2bfe94dd59f7530c388624e
diff --git a/media-video/dvdrip/dvdrip-0.98.11-r2.ebuild b/media-video/dvdrip/dvdrip-0.98.11-r2.ebuild
new file mode 100644
index 000000000000..e922eb4a29e4
--- /dev/null
+++ b/media-video/dvdrip/dvdrip-0.98.11-r2.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils flag-o-matic perl-module
+
+DESCRIPTION="dvd::rip is a graphical frontend for transcode"
+HOMEPAGE="http://www.exit1.org/dvdrip/"
+SRC_URI="http://www.exit1.org/dvdrip/dist/${P}.tar.gz"
+
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86"
+IUSE="ffmpeg fping mplayer ogg subtitles vcd vorbis xine xvid"
+
+DEPEND=">=dev-perl/Event-ExecFlow-0.64
+ >=dev-perl/Event-RPC-0.89
+ dev-perl/gtk2-perl
+ >=dev-perl/gtk2-ex-formfactory-0.65
+ >=dev-perl/libintl-perl-1.16
+ || ( media-gfx/graphicsmagick[imagemagick] media-gfx/imagemagick )
+ >=media-video/transcode-1.1.0[dvd,jpeg,mp3,ogg,vorbis]
+ >=virtual/perl-podlators-2.5.3
+"
+RDEPEND="${DEPEND}
+ x11-libs/gdk-pixbuf:2[jpeg]
+ x11-libs/gtk+:2
+ ffmpeg? ( virtual/ffmpeg )
+ fping? ( >=net-analyzer/fping-2.2 )
+ mplayer? ( media-video/mplayer )
+ ogg? ( media-sound/ogmtools )
+ subtitles? ( media-video/subtitleripper )
+ vcd? (
+ media-video/transcode[mjpeg]
+ >=media-video/mjpegtools-1.6.0
+ )
+ vorbis? ( media-sound/vorbis-tools )
+ xine? ( media-video/xine-ui )
+ xvid? ( media-video/xvid4conf )
+ >=media-video/lsdvd-0.15"
+
+pkg_setup() {
+ filter-flags -ftracer
+ export SKIP_UNPACK_REQUIRED_MODULES=1 #255269
+
+ perl_set_version
+}
+
+src_prepare() {
+ sed -i -e 's:$(CC):$(CC) $(OTHERLDFLAGS):' src/Makefile || die #333739
+ epatch "${FILESDIR}"/${P}-fix_parallel_make.patch
+ # Fix default device for >=udev-180 wrt #224559
+ sed -i -e 's:/dev/dvd:/dev/cdrom:' lib/Video/DVDRip/Config.pm || die
+}
+
+src_install() {
+ newicon lib/Video/DVDRip/icon.xpm dvdrip.xpm
+ make_desktop_entry dvdrip dvd::rip
+
+ mydoc="Changes* Credits README TODO" perl-module_src_install
+}
+
+pkg_postinst() {
+ # bug 173924
+ if use fping; then
+ ewarn "For dvdrip-master to work correctly with cluster mode,"
+ ewarn "the fping binary must be setuid."
+ ewarn ""
+ ewarn "Run this command to fix it:"
+ ewarn "chmod u=rwsx,g=rx,o=rx /usr/sbin/fping"
+ ewarn ""
+ ewarn "Note that this is a security risk when enabled."
+ fi
+}
diff --git a/media-video/dvdrip/files/dvdrip-0.98.11-fix_parallel_make.patch b/media-video/dvdrip/files/dvdrip-0.98.11-fix_parallel_make.patch
new file mode 100644
index 000000000000..df766c07cbcc
--- /dev/null
+++ b/media-video/dvdrip/files/dvdrip-0.98.11-fix_parallel_make.patch
@@ -0,0 +1,28 @@
+http://bugs.gentoo.org/266739
+
+--- src/Makefile
++++ src/Makefile
+@@ -3,10 +3,10 @@
+ all: ../bin/dvdrip-splitpipe ../bin/dvdrip-progress
+
+ ../bin/dvdrip-splitpipe: dvdrip-splitpipe.c
+- $(CC) $(OTHERLDFLAGS) $(CFLAGS) -o dvdrip-splitpipe dvdrip-splitpipe.c && mv dvdrip-splitpipe ../bin
++ $(CC) $(OTHERLDFLAGS) $(CFLAGS) -o ../bin/dvdrip-splitpipe dvdrip-splitpipe.c
+
+ ../bin/dvdrip-progress: dvdrip-progress.c
+- $(CC) $(OTHERLDFLAGS) $(CFLAGS) -o dvdrip-progress dvdrip-progress.c && mv dvdrip-progress ../bin
++ $(CC) $(OTHERLDFLAGS) $(CFLAGS) -o ../bin/dvdrip-progress dvdrip-progress.c
+
+ clean:
+ rm -f dvdrip-splitpipe ../bin/dvdrip-splitpipe dvdrip-progress ../bin/dvdrip-progress
+--- Makefile.PL
++++ Makefile.PL
+@@ -52,7 +52,7 @@
+ sub MY::postamble {
+ '
+ bin/dvdrip-splitpipe bin/dvdrip-progress: src/Makefile
+- cd src && make
++ cd src && ( $(MAKE) CC=$(CC) )
+ ';
+ }
+
diff --git a/media-video/dvdrip/metadata.xml b/media-video/dvdrip/metadata.xml
new file mode 100644
index 000000000000..56992d03b50b
--- /dev/null
+++ b/media-video/dvdrip/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>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name='fping'>Enables fping support for cluster rendering</flag>
+ <flag name='subtitles'>Enables support for subtitle ripping</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-video/dvdstyler/Manifest b/media-video/dvdstyler/Manifest
new file mode 100644
index 000000000000..28c879204d48
--- /dev/null
+++ b/media-video/dvdstyler/Manifest
@@ -0,0 +1,2 @@
+DIST DVDStyler-2.7.2.tar.bz2 5982155 SHA256 b30df3870b9cfcac5bc4387d276aec10e0913ce66c63007f1393123afda180be SHA512 f4913ff5ed11e7cedccb8408bea9adbfae7494afde9062c4acc7e65014af821d4b5acacbce57fd07225cf3af8c21ba552897b50be67f21e242fb6f4baeed000d WHIRLPOOL 070254838db445175401c6d2fb05dc6ee5d79620a598f5a5f0c6d4d8bf9cb5b3ecfc1ad0e708b6289b37b0a5cd0a5c2b0c089c87951b60fe0d48eab85cc9410f
+DIST DVDStyler-2.9.2.tar.bz2 7861116 SHA256 88abd17b0dcdfccbdfffe6e80bcfa59df023f1ff2eed782e58d1f793a81dbd1f SHA512 5688f383b03cb0ec6c57659494d1f4f98f72c21e3e125e16ec3adfeac20555d6f26a12d3629417b46f833933f504e1d55a7fcdb2c0926643e0bfadcab8c998be WHIRLPOOL cd857c39a5de581b201b2d78d7a676b05f5dbdef3592fe835158cceb05d8b8e37cf5a4f88514469bbfac908f827843718b733566cac6fd86f6c7700bc49e0431
diff --git a/media-video/dvdstyler/dvdstyler-2.7.2.ebuild b/media-video/dvdstyler/dvdstyler-2.7.2.ebuild
new file mode 100644
index 000000000000..5c30788315ef
--- /dev/null
+++ b/media-video/dvdstyler/dvdstyler-2.7.2.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_P=${P/dvds/DVDS}
+WX_GTK_VER=2.8
+
+inherit wxwidgets
+
+DESCRIPTION="A cross-platform free DVD authoring application"
+HOMEPAGE="http://www.dvdstyler.org/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug +udev"
+
+COMMON_DEPEND=">=app-cdr/dvd+rw-tools-7.1
+ media-libs/libexif:=
+ >=media-libs/wxsvg-1.2:=
+ >=media-video/dvdauthor-0.7.1
+ >=media-video/xine-ui-0.99.7
+ virtual/cdrtools
+ >=virtual/ffmpeg-9-r1[encode]
+ virtual/jpeg:0
+ >=x11-libs/wxGTK-2.8.7:2.8=[gstreamer,X]
+ udev? ( >=virtual/libudev-215:= )"
+RDEPEND="${COMMON_DEPEND}
+ >=app-cdr/dvdisaster-0.72.4
+ media-video/mjpegtools"
+DEPEND="${COMMON_DEPEND}
+ app-arch/zip
+ app-text/xmlto
+ sys-devel/gettext
+ virtual/yacc
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ # disable obsolete GNOME 2.x libraries wrt #508854
+ sed -i -e '/PKG_CONFIG/s:libgnomeui-2.0:dIsAbLeAuToMaGiC&:' configure || die
+ # rmdir: failed to remove `tempfoobar': Directory not empty
+ sed -i -e '/rmdir "$$t"/d' docs/Makefile.in || die
+ # fix underlinking wrt #367863
+ sed -i -e 's:@LIBS@:& -ljpeg:' wxVillaLib/Makefile.in || die
+ # silence desktop-file-validate QA check
+ sed -i \
+ -e '/Icon/s:.png::' -e '/^Encoding/d' -e '/Categories/s:Application;::' \
+ data/dvdstyler.desktop || die
+}
+
+src_configure() {
+ econf \
+ --docdir=/usr/share/doc/${PF} \
+ $(use_enable debug) \
+ --with-wx-config=${WX_CONFIG}
+}
+
+src_install() {
+ default
+ rm -f "${ED}"/usr/share/doc/${PF}/{COPYING*,INSTALL*}
+}
diff --git a/media-video/dvdstyler/dvdstyler-2.9.2.ebuild b/media-video/dvdstyler/dvdstyler-2.9.2.ebuild
new file mode 100644
index 000000000000..c5bc193a50f9
--- /dev/null
+++ b/media-video/dvdstyler/dvdstyler-2.9.2.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_P=${P/dvds/DVDS}
+WX_GTK_VER=2.8
+
+inherit wxwidgets
+
+DESCRIPTION="A cross-platform free DVD authoring application"
+HOMEPAGE="http://www.dvdstyler.org/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug +udev"
+
+COMMON_DEPEND=">=app-cdr/dvd+rw-tools-7.1
+ media-libs/libexif:=
+ >=media-libs/wxsvg-1.2:=
+ >=media-video/dvdauthor-0.7.1
+ >=media-video/xine-ui-0.99.7
+ virtual/cdrtools
+ >=virtual/ffmpeg-9-r1[encode]
+ virtual/jpeg:0
+ >=x11-libs/wxGTK-2.8.7:2.8=[gstreamer,X]
+ udev? ( >=virtual/libudev-215:= )"
+RDEPEND="${COMMON_DEPEND}
+ >=app-cdr/dvdisaster-0.72.4
+ media-video/mjpegtools"
+DEPEND="${COMMON_DEPEND}
+ app-arch/zip
+ app-text/xmlto
+ sys-devel/gettext
+ virtual/yacc
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ # disable obsolete GNOME 2.x libraries wrt #508854
+ sed -i -e '/PKG_CONFIG/s:libgnomeui-2.0:dIsAbLeAuToMaGiC&:' configure || die
+ # rmdir: failed to remove `tempfoobar': Directory not empty
+ sed -i -e '/rmdir "$$t"/d' docs/Makefile.in || die
+ # fix underlinking wrt #367863
+ sed -i -e 's:@LIBS@:& -ljpeg:' wxVillaLib/Makefile.in || die
+ # silence desktop-file-validate QA check
+ sed -i \
+ -e '/Icon/s:.png::' -e '/^Encoding/d' -e '/Categories/s:Application;::' \
+ data/dvdstyler.desktop || die
+}
+
+src_configure() {
+ econf \
+ --docdir=/usr/share/doc/${PF} \
+ $(use_enable debug) \
+ --with-wx-config=${WX_CONFIG}
+}
+
+src_install() {
+ default
+ rm -f "${ED}"/usr/share/doc/${PF}/{COPYING*,INSTALL*}
+}
diff --git a/media-video/dvdstyler/metadata.xml b/media-video/dvdstyler/metadata.xml
new file mode 100644
index 000000000000..aeb24d12ca57
--- /dev/null
+++ b/media-video/dvdstyler/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">dvdstyler</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/dvgrab/Manifest b/media-video/dvgrab/Manifest
new file mode 100644
index 000000000000..31cc5a80a08a
--- /dev/null
+++ b/media-video/dvgrab/Manifest
@@ -0,0 +1 @@
+DIST dvgrab-3.5.tar.gz 205268 SHA256 5910183429d300221783d6054ff5add15bb2ae49ae33272d723a314bc2ce0af9
diff --git a/media-video/dvgrab/dvgrab-3.5.ebuild b/media-video/dvgrab/dvgrab-3.5.ebuild
new file mode 100644
index 000000000000..5df80ce2b615
--- /dev/null
+++ b/media-video/dvgrab/dvgrab-3.5.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Digital Video (DV) grabber for GNU/Linux"
+HOMEPAGE="http://www.kinodv.org/"
+SRC_URI="mirror://sourceforge/kino/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ~ppc64 x86"
+IUSE="jpeg quicktime"
+
+RDEPEND=">=sys-libs/libraw1394-1.1
+ >=media-libs/libdv-0.103
+ >=media-libs/libiec61883-1
+ >=sys-libs/libavc1394-0.5.1
+ jpeg? ( virtual/jpeg )
+ quicktime? ( media-libs/libquicktime )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_compile() {
+ econf $(use_with quicktime libquicktime) $(use_with jpeg libjpeg)
+ emake || die "emake failed."
+}
+
+src_install () {
+ emake DESTDIR="${D}" install || die "emake install failed."
+ dodoc AUTHORS ChangeLog NEWS README TODO
+}
diff --git a/media-video/dvgrab/metadata.xml b/media-video/dvgrab/metadata.xml
new file mode 100644
index 000000000000..0cc79757a8c6
--- /dev/null
+++ b/media-video/dvgrab/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">kino</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/emovix/Manifest b/media-video/emovix/Manifest
new file mode 100644
index 000000000000..cb331a56d11a
--- /dev/null
+++ b/media-video/emovix/Manifest
@@ -0,0 +1 @@
+DIST emovix-0.9.0.tar.gz 11297252 SHA256 96b84843ed80d31df5c07f6ee972362f7a0629a9b181afeb4a99b2127c07ff57 SHA512 87df6f124d8478d0704472adf80e541b3573bc448836f4525d99b614aba5bffbeea8f73b0b8e0b4a9a95375ee78d0f78352254eeb4f99be67611f4d17f5c3e2a WHIRLPOOL 913d14a18e3a982778e4d6d1e0d8d3cd61dbc7d256fc6ebe0888160446bc4c7e418700d20c652b4db4b57dd2e39105d96360af7f74c8d88ddea799e923e26d20
diff --git a/media-video/emovix/emovix-0.9.0.ebuild b/media-video/emovix/emovix-0.9.0.ebuild
new file mode 100644
index 000000000000..f7467d3fa976
--- /dev/null
+++ b/media-video/emovix/emovix-0.9.0.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Micro Linux distro to boot from a CD and play every video file localized in the CD root"
+HOMEPAGE="http://movix.sourceforge.net"
+SRC_URI="mirror://sourceforge/movix/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86"
+
+RDEPEND="virtual/cdrtools"
+DEPEND="dev-lang/perl
+ virtual/awk"
+
+src_install() {
+ emake -j1 DESTDIR="${D}" install || die "emake install failed."
+ dodoc AUTHORS ChangeLog README* TODO
+ dosym /usr/lib/win32 /usr/share/emovix/codecs
+}
diff --git a/media-video/emovix/metadata.xml b/media-video/emovix/metadata.xml
new file mode 100644
index 000000000000..689143030330
--- /dev/null
+++ b/media-video/emovix/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">movix</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/episoder/Manifest b/media-video/episoder/Manifest
new file mode 100644
index 000000000000..bf81773c15dc
--- /dev/null
+++ b/media-video/episoder/Manifest
@@ -0,0 +1 @@
+DIST episoder-0.4.7.tar.gz 17410 SHA256 ea7ccb0ac642ae9bf8b8b8442bb5aea377c8dcded8478612c4b20bd41f28a626
diff --git a/media-video/episoder/episoder-0.4.7.ebuild b/media-video/episoder/episoder-0.4.7.ebuild
new file mode 100644
index 000000000000..6f97d7da3db9
--- /dev/null
+++ b/media-video/episoder/episoder-0.4.7.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="episoder is a tool to tell you when new episodes of your favourite
+TV shows are airing"
+HOMEPAGE="http://www.desire.ch/tools/episoder/"
+SRC_URI="mirror://sourceforge/episoder/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+RDEPEND="net-misc/wget"
+
+src_install() {
+ insinto /usr/share/${PN}/
+ insopts -m755
+ doins scripts/*sh
+ doins plugins/*
+
+ dobin scripts/episoder
+ dodoc README examples/home.episoder CHANGELOG
+
+ doman episoder.1
+}
diff --git a/media-video/episoder/metadata.xml b/media-video/episoder/metadata.xml
new file mode 100644
index 000000000000..3a490c20ddc8
--- /dev/null
+++ b/media-video/episoder/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">episoder</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/ffdiaporama/Manifest b/media-video/ffdiaporama/Manifest
new file mode 100644
index 000000000000..553fda7b49eb
--- /dev/null
+++ b/media-video/ffdiaporama/Manifest
@@ -0,0 +1,8 @@
+DIST ffDiaporama-texturemate_1.0.tar.gz 60772371 SHA256 673db4e8603551970892e9b9eae28de12d190285cd7d2ba49c3b9a6c0d9df0fb SHA512 bd93c153d6f5740540b822fe73f765c3ce6e7a886894d70dd5f9c7d23a59b3f0bd2ccb1109fc2af0529fe37aaca1c8f2e0bb2807b40c2ee8dfd213d0221d2536 WHIRLPOOL 661a6085ab6d888945a631ef805dbede65f1ea2e05037d368c3070a16dd15ae62e4b22ba4416c00284686aa9dbd2e72bf9c88d27296737920a84cd85bc44d7d9
+DIST ffdiaporama_1.5.tar.gz 14576632 SHA256 9a7090d57da3383b47d44347f519092cbd3a5a62ba84f7493b2fdeb551c951bd SHA512 59967f0a43d70e963eb104514fadd34e166e16519dcb7f58056ee8be10f4d08065fab30a94cbe75c39e796e39b387e9522d9616d3b317363e6ab332f2e3512ae WHIRLPOOL e08fdc5413d8fd23a7734056f9f338818f8263271404546613502043f85439155f73204fe8a1328dc256edd821ac057c5d57077291b7044d4a289340776b261e
+DIST ffdiaporama_1.6.tar.gz 15708389 SHA256 b82c125b22f15c343cf87e5ad83e86e5278e25dc74385a9a39a5fe896d411d66 SHA512 5fa05afdb317531b13a8788e7b37816c780de0bc56b6c25a5d9d0ef4b5c6c8126b3af23d37d41d970c97c0ffe9a21d5ae87cfb99a414abc8d65be87262f8c436 WHIRLPOOL 3da97f9fa7fc4b1a483813e89f783d6490722900f104f817ad62aad5717f3ce16b5b0732bc990fbd2371b301433dfd00eea3ec374587a1687f2d7fca1516709f
+DIST ffdiaporama_2.0.1.tar.gz 36140512 SHA256 a3447a3e48b3988b4addf42938ba9d09b9c8be940ac969659637d8fb3af82729 SHA512 72152a1e6b2f770e8dcb9f893a19cb4521056e195deb805df96aebe9344f32e74a8fae17426e2896b8dae5b1263526ffd3bdc17269103bb8efdff9fb59164e1b WHIRLPOOL 121151b36ef615116c7e147e9c24fa268cb9aa196457bfbfaaaa13af37279ed0dd27da936c5d980dbd0d40c1440753c8daf774e12bcb1def267d075709cbf2dd
+DIST ffdiaporama_bin_2.1.2014.0209.tar.gz 16063604 SHA256 a1f55367a3d915045a5f4ce5db20419c2e8ea26a8cd4d56bef2e3d525e55acaa SHA512 40fc40ae8f09d311dc615051bd0bc4573f1f9ab5abe06032e161b759194c772b43c337902baf9c5a1eb027796fcdecc2fc20dce5d998091e6ccf8f696149223d WHIRLPOOL 0cc1b7343bef904e6b89bda4d9fc17066ca1e9aff4beccf0a8b615c7e42a7a84d9cb7f582c6799bfc2e4a1398ad71f8398920ff1f57c2f60cf03ac12a66ce241
+DIST ffdiaporama_rsc_2.1.2014.0209.tar.gz 17669845 SHA256 965bb1506531f7b5214d9003019aff410107908f4837fe7f2a1fcbd2e55c4447 SHA512 910b2139eb1b97a86c8d795b65255f723e346b3b4ce805878835813f9b21c7b606f811488f9099003a0e0951006df6d32663f1d8be2ffe1c355cf9311ac4be19 WHIRLPOOL 1d9ecdb96df47785b146156c54ba1a9a80e3e5ec03b9ad9c4ca08bab17fd5738d20cf7a75247840c2c08af6feca75a14974f4602b8f73736080634644be15e9e
+DIST ffdiaporama_texturemate_1.0.2014.0125.tar.gz 30352923 SHA256 47ef9a0391baa4dd145a4c9c39590afb3c7a2857da4a8fa7c74bd081f52a0417 SHA512 e9aa9607d670a620b2e3c27d6ec5bf983eb31ab3d3139edf32ebb84d9ffa58b11c822f7db4b3f3c4a430b256719803df4a3a385bd467bdda09f8710d010eb2f5 WHIRLPOOL 00b22bfcaf6d5a698fe2d0f38d6578d027ca8451707bf49edecfca0ea6b181202e05cc5d13b32d9090825b4bde5eba509f1fd4e7a68d19dab7d2440b2eaa420e
+DIST openclipart-0.18-svgonly.tar.bz2 82108957 SHA256 57572d443439759b0347da95a5457f988048976c7e13d70a09894cdee412be29 SHA512 71ad11fd2e94f4c3d560ff0fa6e0cee70ec2c8506fd4c4d7a4b7a0db25480aaca9b36d0e91862cf05347be5caa614bfb528bdfdb151342e28efba31d9a8b0473 WHIRLPOOL 151dafd9ce46cdeb2a203bec3960a81043b9ee0ba5afe508b3090dd073ddbdd0cb96d29277e814dec2b7218d3017db9820aa7a429d91ecbf2ecb1f08fd28b664
diff --git a/media-video/ffdiaporama/ffdiaporama-1.5.ebuild b/media-video/ffdiaporama/ffdiaporama-1.5.ebuild
new file mode 100644
index 000000000000..7737de350146
--- /dev/null
+++ b/media-video/ffdiaporama/ffdiaporama-1.5.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils fdo-mime gnome2-utils qt4-r2
+
+DESCRIPTION="Movie creator from photos and video clips"
+HOMEPAGE="http://ffdiaporama.tuxfamily.org"
+SRC_URI="http://download.tuxfamily.org/${PN}/Archives/${PN}_${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="media-gfx/exiv2
+ media-libs/libsdl[sound]
+ media-libs/qimageblitz
+ media-libs/taglib
+ virtual/ffmpeg[encode]
+ >=dev-qt/qtcore-4.8:4
+ >=dev-qt/qtgui-4.8:4"
+DEPEND="${RDEPEND}"
+
+DOCS=( authors.txt )
+
+src_unpack() {
+ # S=${WORKDIR} would result in unremoved files in
+ # ${WORKDIR}/../build
+ mkdir ${P} || die
+ cd ${P} || die
+ unpack ${A}
+}
+
+src_install() {
+ qt4-r2_src_install
+ doicon -s 32 ffdiaporama.png
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+}
diff --git a/media-video/ffdiaporama/ffdiaporama-1.6.ebuild b/media-video/ffdiaporama/ffdiaporama-1.6.ebuild
new file mode 100644
index 000000000000..5606f26fbbf3
--- /dev/null
+++ b/media-video/ffdiaporama/ffdiaporama-1.6.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils fdo-mime gnome2-utils qt4-r2
+
+DESCRIPTION="Movie creator from photos and video clips"
+HOMEPAGE="http://ffdiaporama.tuxfamily.org"
+SRC_URI="http://download.tuxfamily.org/${PN}/Archives/${PN}_${PV}.tar.gz
+ texturemate? ( http://download.tuxfamily.org/${PN}/Archives/ffDiaporama-texturemate_1.0.tar.gz )"
+
+LICENSE="GPL-2
+ texturemate? ( CC-BY-3.0 )"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="texturemate"
+
+RDEPEND="
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ dev-qt/qtsvg:4
+ media-gfx/exiv2
+ media-libs/libsdl[sound]
+ media-libs/qimageblitz
+ media-libs/taglib
+ >=media-video/ffmpeg-1.0:0[encode]"
+DEPEND="${RDEPEND}"
+
+DOCS=( authors.txt )
+PATCHES=( "${FILESDIR}"/${P}-ffmpeg-2.0.patch )
+
+src_unpack() {
+ # S=${WORKDIR} would result in unremoved files in
+ # ${WORKDIR}/../build
+ mkdir ${P} || die
+ cd ${P} || die
+ unpack ${A}
+}
+
+src_install() {
+ qt4-r2_src_install
+ doicon -s 32 ffdiaporama.png
+ if use texturemate; then
+ cd ffDiaporama-texturemate || die
+ ./install.sh "${D}"/usr
+ fi
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+}
diff --git a/media-video/ffdiaporama/ffdiaporama-2.0.1.ebuild b/media-video/ffdiaporama/ffdiaporama-2.0.1.ebuild
new file mode 100644
index 000000000000..761dfc34e89e
--- /dev/null
+++ b/media-video/ffdiaporama/ffdiaporama-2.0.1.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils fdo-mime gnome2-utils qt4-r2
+
+OPENCLI_PV=0.18
+OPENCLI_P=openclipart-${OPENCLI_PV}
+TEXTUREMATE_P=ffDiaporama-texturemate_1.0
+DESCRIPTION="Movie creator from photos and video clips"
+HOMEPAGE="http://ffdiaporama.tuxfamily.org"
+SRC_URI="http://download.tuxfamily.org/${PN}/Archives/${PN}_${PV}.tar.gz
+ openclipart? ( http://openclipart.org/downloads/${OPENCLI_PV}/${OPENCLI_P}-svgonly.tar.bz2 )
+ texturemate? ( http://download.tuxfamily.org/${PN}/Archives/${TEXTUREMATE_P}.tar.gz )"
+
+LICENSE="GPL-2
+ openclipart? ( CC0-1.0 )
+ texturemate? ( CC-BY-3.0 )"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="openclipart texturemate"
+
+RDEPEND="
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ dev-qt/qthelp:4
+ dev-qt/qtsql:4[sqlite]
+ dev-qt/qtsvg:4
+ media-gfx/exiv2
+ media-libs/libsdl[sound]
+ media-libs/taglib
+ !<media-video/ffmpeg-1.2:0
+ virtual/ffmpeg[encode]"
+DEPEND="${RDEPEND}"
+
+DOCS=( authors.txt )
+
+S="${WORKDIR}"
+
+src_configure() {
+ eqmake4 ffDiaporama.pro
+ qt4-r2_src_configure
+}
+
+src_install() {
+ qt4-r2_src_install
+ doicon -s 32 ffdiaporama.png
+ if use openclipart; then
+ dodir /usr/share/ffDiaporama/clipart/openclipart
+ cd "${S}"/${OPENCLI_P}-svgonly/clipart || die
+ find . -type d -maxdepth 1 -not -name . -exec cp -R '{}' "${D}"/usr/share/ffDiaporama/clipart/openclipart \; || die
+ fi
+ if use texturemate; then
+ cd "${S}"/ffDiaporama-texturemate || die
+ ./install.sh "${D}"/usr
+ fi
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+}
diff --git a/media-video/ffdiaporama/ffdiaporama-2.1.ebuild b/media-video/ffdiaporama/ffdiaporama-2.1.ebuild
new file mode 100644
index 000000000000..fcf056d0d08f
--- /dev/null
+++ b/media-video/ffdiaporama/ffdiaporama-2.1.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils fdo-mime gnome2-utils qt4-r2
+
+BIN_PV=${PV}.2014.0209
+RSC_PV=${PV}.2014.0209
+TMT_PV=1.0.2014.0125
+OPENCLI_PV=0.18
+OPENCLI_P=openclipart-${OPENCLI_PV}
+DESCRIPTION="Movie creator from photos and video clips"
+HOMEPAGE="http://ffdiaporama.tuxfamily.org"
+SRC_URI="http://ffdiaporama.tuxfamily.org/script/GetPackage.php?f=${PN}_bin_${BIN_PV}.tar.gz -> ${PN}_bin_${BIN_PV}.tar.gz
+ http://ffdiaporama.tuxfamily.org/script/GetPackage.php?f=${PN}_rsc_${RSC_PV}.tar.gz -> ${PN}_rsc_${RSC_PV}.tar.gz
+ openclipart? ( http://openclipart.org/downloads/${OPENCLI_PV}/${OPENCLI_P}-svgonly.tar.bz2 )
+ texturemate? ( http://ffdiaporama.tuxfamily.org/script/GetPackage.php?f=${PN}_texturemate_${TMT_PV}.tar.gz -> ${PN}_texturemate_${TMT_PV}.tar.gz )"
+
+LICENSE="GPL-2
+ openclipart? ( CC0-1.0 )
+ texturemate? ( CC-BY-3.0 )"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="libav openclipart texturemate"
+
+RDEPEND="
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ dev-qt/qthelp:4
+ dev-qt/qtsql:4[sqlite]
+ dev-qt/qtsvg:4
+ media-gfx/exiv2
+ media-libs/libsdl[sound]
+ media-libs/taglib
+ !libav? ( >media-video/ffmpeg-1.2:0=[encode] )
+ libav? ( >=media-video/libav-9:0=[encode] )"
+DEPEND="${RDEPEND}"
+
+DOCS=( authors.txt )
+PATCHES=( "${FILESDIR}"/${P}-ffmpeg-2.4.patch )
+
+S="${WORKDIR}/ffDiaporama"
+
+src_prepare() {
+ echo "SUBDIRS += ../ffDiaporama_rsc" >> ffDiaporama.pro || die
+ if use texturemate; then
+ echo "SUBDIRS += ../ffDiaporama_texturemate" >> ffDiaporama.pro || die
+ fi
+ qt4-r2_src_prepare
+}
+
+src_install() {
+ qt4-r2_src_install
+ doicon -s 32 ffdiaporama.png
+ if use openclipart; then
+ dodir /usr/share/ffDiaporama/clipart/openclipart
+ cd "${WORKDIR}"/${OPENCLI_P}-svgonly/clipart || die
+ find . -type d -maxdepth 1 -not -name . -exec cp -R '{}' "${D}"/usr/share/ffDiaporama/clipart/openclipart \; || die
+ fi
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+}
diff --git a/media-video/ffdiaporama/files/ffdiaporama-1.6-ffmpeg-2.0.patch b/media-video/ffdiaporama/files/ffdiaporama-1.6-ffmpeg-2.0.patch
new file mode 100644
index 000000000000..6142cd5a37f8
--- /dev/null
+++ b/media-video/ffdiaporama/files/ffdiaporama-1.6-ffmpeg-2.0.patch
@@ -0,0 +1,32 @@
+https://bugs.gentoo.org/show_bug.cgi?id=476530
+
+--- src/engine/cDeviceModelDef.h 2013-06-19 18:22:52.000000000 +0200
++++ src/engine/cDeviceModelDef.h 2013-07-21 14:11:48.014827071 +0200
+@@ -64,6 +64,11 @@
+ #include <libavformat/avformat.h>
+ #include <libavformat/avio.h>
+
++ #if (LIBAVCODEC_VERSION_INT>=AV_VERSION_INT(55,18,0))
++ typedef AVCodecID CodecID;
++ #define AVCODEC_MAX_AUDIO_FRAME_SIZE 192
++ #endif
++
+ #if ((LIBAVUTIL_VERSION_INT>=AV_VERSION_INT(51,73,0))&&(LIBAVCODEC_VERSION_INT>=AV_VERSION_INT(54,31,0))&&(LIBAVFORMAT_VERSION_INT>=AV_VERSION_INT(54,19,0)))
+ #define LIBAV_09
+ #if defined(USELIBAVRESAMPLE)
+
+--- src/engine/cBaseMediaFile.cpp 2013-06-19 18:22:52.000000000 +0200
++++ src/engine/cBaseMediaFile.cpp 2013-07-21 14:15:18.754228717 +0200
+@@ -2167,7 +2167,11 @@
+ }
+
+ #else
+- int Ret=av_buffersrc_add_frame(VideoFilterIn,FrameBufferYUV,0);
++ #if (LIBAVFILTER_VERSION_INT < AV_VERSION_INT(3,79,0))
++ int Ret=av_buffersrc_add_frame(VideoFilterIn,FrameBufferYUV,0);
++ #else
++ int Ret=av_buffersrc_add_frame(VideoFilterIn,FrameBufferYUV);
++ #endif
+ if (Ret<0) {
+ ToLog(LOGMSG_CRITICAL,QString("Error in cVideoFile::VideoFilter_Process : av_buffersrc_add_frame"));
+ return VC_ERROR;
diff --git a/media-video/ffdiaporama/files/ffdiaporama-2.0-libav9-deinterlacing.patch b/media-video/ffdiaporama/files/ffdiaporama-2.0-libav9-deinterlacing.patch
new file mode 100644
index 000000000000..fe07b26b6b06
--- /dev/null
+++ b/media-video/ffdiaporama/files/ffdiaporama-2.0-libav9-deinterlacing.patch
@@ -0,0 +1,26 @@
+--- src/engine/cBaseMediaFile.cpp 2013-11-23 10:44:04.586110402 +0100
++++ src/engine/cBaseMediaFile.cpp 2013-11-23 12:14:24.914285498 +0100
+@@ -2150,11 +2150,23 @@
+
+ #elif defined(LIBAV) && (LIBAVVERSIONINT<=9)
+ // LIBAV9
++ AVFilterBufferRef *m_pBufferRef=NULL;
+ int Ret=av_buffersrc_write_frame(VideoFilterIn,FrameBufferYUV);
+ if (Ret<0) {
+ ToLog(LOGMSG_CRITICAL,QString("Error in cVideoFile::VideoFilter_Process : av_buffersrc_write_frame"));
+ return VC_ERROR;
+ }
++ while ((Ret=av_buffersink_read(VideoFilterOut,&m_pBufferRef)) >= 0) {
++ if (!m_pBufferRef) return VC_ERROR; // for first frame ther is no return
++ FrameBufferYUV->interlaced_frame=m_pBufferRef->video->interlaced;
++ FrameBufferYUV->top_field_first =m_pBufferRef->video->top_field_first;
++ if (m_pBufferRef) {
++ if (FrameBufferYUV->opaque) avfilter_unref_buffer((AVFilterBufferRef *)FrameBufferYUV->opaque);
++ FrameBufferYUV->opaque=(void *)avfilter_ref_buffer(m_pBufferRef,AV_PERM_READ);
++ avfilter_unref_buffer(m_pBufferRef);
++ m_pBufferRef = NULL;
++ }
++ }
+ #else
+ // FFMPEG 1.2
+ int Ret=av_buffersrc_add_frame(VideoFilterIn,FrameBufferYUV,0);
diff --git a/media-video/ffdiaporama/files/ffdiaporama-2.1-ffmpeg-2.4.patch b/media-video/ffdiaporama/files/ffdiaporama-2.1-ffmpeg-2.4.patch
new file mode 100644
index 000000000000..7a8e664add37
--- /dev/null
+++ b/media-video/ffdiaporama/files/ffdiaporama-2.1-ffmpeg-2.4.patch
@@ -0,0 +1,16 @@
+--- src/ffDiaporama/engine/cDeviceModelDef.h 2015-02-14 10:02:12.592365100 +0100
++++ src/ffDiaporama/engine/cDeviceModelDef.h 2015-02-14 10:01:59.202463800 +0100
+@@ -84,7 +84,12 @@
+ #elif (LIBAVUTIL_VERSION_MICRO>=100)&&(LIBAVCODEC_VERSION_MICRO>=100)&&(LIBAVFORMAT_VERSION_MICRO>=100)&&(LIBAVDEVICE_VERSION_MICRO>=100)&&(LIBAVFILTER_VERSION_MICRO>=100)&&(LIBSWSCALE_VERSION_MICRO>=100)
+ #define FFMPEG
+ #include "libswresample/swresample.h"
+- #define RESAMPLE_MAX_CHANNELS SWR_CH_MAX
++ #ifdef SWR_CH_MAX
++ #define RESAMPLE_MAX_CHANNELS SWR_CH_MAX
++ #else
++ #define RESAMPLE_MAX_CHANNELS 32
++ #endif
++
+ #include "libavfilter/avcodec.h"
+ #include "libavfilter/buffersink.h"
+ #include "libavfilter/buffersrc.h"
diff --git a/media-video/ffdiaporama/metadata.xml b/media-video/ffdiaporama/metadata.xml
new file mode 100644
index 000000000000..3271eedfdbe6
--- /dev/null
+++ b/media-video/ffdiaporama/metadata.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>hasufell@gentoo.org</email>
+ <name>Julian Ospald</name>
+ <description>Maintainer, assign bugs to him</description>
+ </maintainer>
+ <maintainer>
+ <email>olivier.laurantin@laposte.net</email>
+ <name>Olivier Laurantin</name>
+ <description>Proxy maintainer. CC him on bugs</description>
+ </maintainer>
+ <upstream>
+ <changelog>http://ffdiaporama.tuxfamily.org/?page_id=7266&amp;lang=en</changelog>
+ <doc lang="en">http://ffdiaporama.tuxfamily.org/?page_id=6268</doc>
+ <bugs-to>http://ffdiaporama.tuxfamily.org/Forum/viewforum.php?id=4</bugs-to>
+ </upstream>
+ <longdescription lang="en">
+ffDiaporama is an application for creating video sequences consisting of
+
+ - titles, fixed or animated.
+ - images or photos, fixed or animated.
+ - movie clips
+ - music
+
+These sequences are assembled into a slide show by means of transitions to produce complete videos
+The following options are available:
+
+
+ - Reframing of images and photos
+ - Cutting of video clips
+ - Adding text, notes to images, photos, sequences and animations
+ - Graphical filters on the images and the videos (conversion into black and white, dust removal, equalization of colors, etc.)
+ - Creation of animation by zoom, rotation or Ken Burns Effect on images or photos
+ - Correction of the images and the videos during animations (luminosity, contrast, gamma, colors, etc.)
+ - Transitions between sequences with definition of the transition type, sequence by sequence.
+ - Addition of a background sound (wav, mp3 or ogg) with customizable effects for volume, fade in/out and passage in pause, sequence by sequence.
+ - Generation of videos usable on most current video equipment (DVD player/smartphone, multimedia box, hard drive, etc.) but also publishable on the main video-sharing Websites (YouTube, Dailymotion, etc.)
+ - Video formats from QVGA (320×240) to Full HD (1920×1080) by way of the DVD and HD 720 formats.
+ - Image geometry (aspect ratio) : 4:3, 16:9 or 2.35:1 (cinema)
+ - Possible formats for rendering : avi, mpg, mp4, mkv
+ </longdescription>
+ <use>
+ <flag name='openclipart'>Support openslipart database</flag>
+ <flag name='texturemate'>Install extra backgrounds</flag>
+ </use>
+</pkgmetadata>
+
diff --git a/media-video/ffmpeg/Manifest b/media-video/ffmpeg/Manifest
new file mode 100644
index 000000000000..ae1622108a0b
--- /dev/null
+++ b/media-video/ffmpeg/Manifest
@@ -0,0 +1,3 @@
+DIST ffmpeg-2.6.3.tar.bz2 7803314 SHA256 59eb98c1b5896ac29abc0385f7c875d1b4942d695818818d418ee71eea1e0cfb SHA512 0998fa0cc2711b556fc28ce498e986f8f0b3ba7a30394c6b6cd494a542917eafb3d4d758f75e33fb39db4a631eca40515aa36c8b278fa3ffc9be006995d31029 WHIRLPOOL bfd074cf0b7a315d42c3559f4edeb46fc693918c9958e8e8b19d08f2e8c2765cf26f0ca9007d34a5dd07b69775cf06ab517c2a56926c46ade8bb7a782f492512
+DIST ffmpeg-2.6.4.tar.bz2 7811925 SHA256 184f49e6b359426c398ad6c67d89abd362558373a43d3d92f86e554571655a5d SHA512 76c8bb3b23f2d2bac73b1561ef31bb3d1da49b2e182d84a13bf0bf49ea84cd0d64566c9dfafc4ac9d660aa4cecc0f08272b9ee284d1d09776e4599b87920c308 WHIRLPOOL 2d68715fb284979d703905919289c897c5cb002c3d466aca6c9759ca9f93443b749a24747cf218d005d728680ad137990880ec99210b6fb49038587966dd79f4
+DIST ffmpeg-2.7.2.tar.bz2 8157217 SHA256 7ceb7550ad628c526fa6c9ff23fdfb687a62f54d90c4a730998d8c2b417b9ef2 SHA512 cce58c63ae14dcbd3bdc4758af8427e18ac589f8bd4f2701e54b5e0e61669d5aab212e5829feb67a0fd33bc52b2d64adff93729c0696c44a0f6064a0752433dd WHIRLPOOL dd286393427b89be266ad2b122138dab578843d16bdf9b989b9546734f489c8c5c3d1ab0443ff5039b440a8430802ffe24f0fc38553688ec80984a1cce2ba2a3
diff --git a/media-video/ffmpeg/ffmpeg-2.6.3.ebuild b/media-video/ffmpeg/ffmpeg-2.6.3.ebuild
new file mode 100644
index 000000000000..fb7c820039ef
--- /dev/null
+++ b/media-video/ffmpeg/ffmpeg-2.6.3.ebuild
@@ -0,0 +1,450 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+# Subslot: libavutil major.libavcodec major.libavformat major
+# Since FFmpeg ships several libraries, subslot is kind of limited here.
+# Most consumers will use those three libraries, if a "less used" library
+# changes its soname, consumers will have to be rebuilt the old way
+# (preserve-libs).
+# If, for example, a package does not link to libavformat and only libavformat
+# changes its ABI then this package will be rebuilt needlessly. Hence, such a
+# package is free _not_ to := depend on FFmpeg but I would strongly encourage
+# doing so since such a case is unlikely.
+FFMPEG_SUBSLOT=54.56.56
+
+SCM=""
+if [ "${PV#9999}" != "${PV}" ] ; then
+ SCM="git-2"
+ EGIT_REPO_URI="git://source.ffmpeg.org/ffmpeg.git"
+fi
+
+inherit eutils flag-o-matic multilib multilib-minimal toolchain-funcs ${SCM}
+
+DESCRIPTION="Complete solution to record, convert and stream audio and video. Includes libavcodec"
+HOMEPAGE="http://ffmpeg.org/"
+if [ "${PV#9999}" != "${PV}" ] ; then
+ SRC_URI=""
+elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot
+ SRC_URI="mirror://gentoo/${P}.tar.bz2"
+else # Release
+ SRC_URI="http://ffmpeg.org/releases/${P/_/-}.tar.bz2"
+fi
+FFMPEG_REVISION="${PV#*_p}"
+
+SLOT="0/${FFMPEG_SUBSLOT}"
+LICENSE="
+ !gpl? ( LGPL-2.1 )
+ gpl? ( GPL-2 )
+ amr? (
+ gpl? ( GPL-3 )
+ !gpl? ( LGPL-3 )
+ )
+ encode? (
+ aac? (
+ gpl? ( GPL-3 )
+ !gpl? ( LGPL-3 )
+ )
+ amrenc? (
+ gpl? ( GPL-3 )
+ !gpl? ( LGPL-3 )
+ )
+ )
+ samba? ( GPL-3 )
+"
+if [ "${PV#9999}" = "${PV}" ] ; then
+ KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
+fi
+
+# Options to use as use_enable in the foo[:bar] form.
+# This will feed configure with $(use_enable foo bar)
+# or $(use_enable foo foo) if no :bar is set.
+# foo is added to IUSE.
+FFMPEG_FLAG_MAP=(
+ +bzip2:bzlib cpudetection:runtime-cpudetect debug doc gnutls +gpl
+ +hardcoded-tables +iconv lzma +network openssl +postproc
+ samba:libsmbclient sdl:ffplay vaapi vdpau X:xlib xcb:libxcb
+ xcb:libxcb-shm xcb:libxcb-xfixes +zlib
+ # libavdevice options
+ cdio:libcdio iec61883:libiec61883 ieee1394:libdc1394 libcaca openal
+ opengl
+ # indevs
+ libv4l:libv4l2 pulseaudio:libpulse
+ # decoders
+ amr:libopencore-amrwb amr:libopencore-amrnb fdk:libfdk-aac
+ jpeg2k:libopenjpeg bluray:libbluray celt:libcelt gme:libgme gsm:libgsm
+ modplug:libmodplug opus:libopus quvi:libquvi rtmp:librtmp ssh:libssh
+ schroedinger:libschroedinger speex:libspeex vorbis:libvorbis vpx:libvpx
+ zvbi:libzvbi
+ # libavfilter options
+ bs2b:libbs2b flite:libflite frei0r fribidi:libfribidi fontconfig ladspa
+ libass truetype:libfreetype
+ # libswresample options
+ libsoxr
+ # Threads; we only support pthread for now but ffmpeg supports more
+ +threads:pthreads
+)
+
+# Same as above but for encoders, i.e. they do something only with USE=encode.
+FFMPEG_ENCODER_FLAG_MAP=(
+ aac:libvo-aacenc amrenc:libvo-amrwbenc mp3:libmp3lame
+ aacplus:libaacplus faac:libfaac theora:libtheora twolame:libtwolame
+ wavpack:libwavpack webp:libwebp x264:libx264 x265:libx265 xvid:libxvid
+)
+
+IUSE="
+ alsa +encode examples jack oss pic static-libs test v4l
+ ${FFMPEG_FLAG_MAP[@]%:*}
+ ${FFMPEG_ENCODER_FLAG_MAP[@]%:*}
+"
+
+# Strings for CPU features in the useflag[:configure_option] form
+# if :configure_option isn't set, it will use 'useflag' as configure option
+ARM_CPU_FEATURES=( armv5te armv6 armv6t2 neon armvfp:vfp )
+MIPS_CPU_FEATURES=( mipsdspr1 mipsdspr2 mipsfpu )
+PPC_CPU_FEATURES=( altivec )
+X86_CPU_FEATURES_RAW=( 3dnow:amd3dnow 3dnowext:amd3dnowext avx:avx avx2:avx2 fma3:fma3 fma4:fma4 mmx:mmx mmxext:mmxext sse:sse sse2:sse2 sse3:sse3 ssse3:ssse3 sse4_1:sse4 sse4_2:sse42 xop:xop )
+X86_CPU_FEATURES=( ${X86_CPU_FEATURES_RAW[@]/#/cpu_flags_x86_} )
+X86_CPU_REQUIRED_USE="
+ cpu_flags_x86_avx2? ( cpu_flags_x86_avx )
+ cpu_flags_x86_fma4? ( cpu_flags_x86_avx )
+ cpu_flags_x86_fma3? ( cpu_flags_x86_avx )
+ cpu_flags_x86_xop? ( cpu_flags_x86_avx )
+ cpu_flags_x86_avx? ( cpu_flags_x86_sse4_2 )
+ cpu_flags_x86_sse4_2? ( cpu_flags_x86_sse4_1 )
+ cpu_flags_x86_sse4_1? ( cpu_flags_x86_ssse3 )
+ cpu_flags_x86_ssse3? ( cpu_flags_x86_sse3 )
+ cpu_flags_x86_sse3? ( cpu_flags_x86_sse2 )
+ cpu_flags_x86_sse2? ( cpu_flags_x86_sse )
+ cpu_flags_x86_sse? ( cpu_flags_x86_mmxext )
+ cpu_flags_x86_mmxext? ( cpu_flags_x86_mmx )
+ cpu_flags_x86_3dnowext? ( cpu_flags_x86_3dnow )
+ cpu_flags_x86_3dnow? ( cpu_flags_x86_mmx )
+"
+
+IUSE="${IUSE}
+ ${ARM_CPU_FEATURES[@]%:*}
+ ${MIPS_CPU_FEATURES[@]%:*}
+ ${PPC_CPU_FEATURES[@]%:*}
+ ${X86_CPU_FEATURES[@]%:*}
+"
+
+CPU_REQUIRED_USE="
+ ${X86_CPU_REQUIRED_USE}
+"
+
+# "$(tc-arch):XXX" form where XXX_CPU_FEATURES are the cpu features that apply to
+# $(tc-arch).
+CPU_FEATURES_MAP="
+ arm:ARM
+ arm64:ARM
+ mips:MIPS
+ ppc:PPC
+ ppc64:PPC
+ x86:X86
+ amd64:X86
+"
+
+FFTOOLS=( aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt graph2dot ismindex pktdumper qt-faststart trasher )
+IUSE="${IUSE} ${FFTOOLS[@]/#/+fftools_}"
+
+RDEPEND="
+ alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
+ amr? ( >=media-libs/opencore-amr-0.1.3-r1[${MULTILIB_USEDEP}] )
+ bluray? ( >=media-libs/libbluray-0.3.0-r1[${MULTILIB_USEDEP}] )
+ bs2b? ( >=media-libs/libbs2b-3.1.0-r1[${MULTILIB_USEDEP}] )
+ bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
+ cdio? ( >=dev-libs/libcdio-paranoia-0.90_p1-r1[${MULTILIB_USEDEP}] )
+ celt? ( >=media-libs/celt-0.11.1-r1[${MULTILIB_USEDEP}] )
+ encode? (
+ aac? ( >=media-libs/vo-aacenc-0.1.3[${MULTILIB_USEDEP}] )
+ aacplus? ( >=media-libs/libaacplus-2.0.2-r1[${MULTILIB_USEDEP}] )
+ amrenc? ( >=media-libs/vo-amrwbenc-0.1.2-r1[${MULTILIB_USEDEP}] )
+ faac? ( >=media-libs/faac-1.28-r3[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/lame-3.99.5-r1[${MULTILIB_USEDEP}] )
+ theora? (
+ >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}]
+ >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
+ )
+ twolame? ( >=media-sound/twolame-0.3.13-r1[${MULTILIB_USEDEP}] )
+ wavpack? ( >=media-sound/wavpack-4.60.1-r1[${MULTILIB_USEDEP}] )
+ webp? ( >=media-libs/libwebp-0.3.0[${MULTILIB_USEDEP}] )
+ x264? ( >=media-libs/x264-0.0.20130506:=[${MULTILIB_USEDEP}] )
+ x265? ( >=media-libs/x265-1.2:=[${MULTILIB_USEDEP}] )
+ xvid? ( >=media-libs/xvid-1.3.2-r1[${MULTILIB_USEDEP}] )
+ )
+ fdk? ( >=media-libs/fdk-aac-0.1.3:=[${MULTILIB_USEDEP}] )
+ flite? ( >=app-accessibility/flite-1.4-r4[${MULTILIB_USEDEP}] )
+ fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] )
+ frei0r? ( media-plugins/frei0r-plugins )
+ fribidi? ( >=dev-libs/fribidi-0.19.6[${MULTILIB_USEDEP}] )
+ gme? ( >=media-libs/game-music-emu-0.6.0[${MULTILIB_USEDEP}] )
+ gnutls? ( >=net-libs/gnutls-2.12.23-r6[${MULTILIB_USEDEP}] )
+ gsm? ( >=media-sound/gsm-1.0.13-r1[${MULTILIB_USEDEP}] )
+ iconv? ( >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}] )
+ iec61883? (
+ >=media-libs/libiec61883-1.2.0-r1[${MULTILIB_USEDEP}]
+ >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}]
+ >=sys-libs/libavc1394-0.5.4-r1[${MULTILIB_USEDEP}]
+ )
+ ieee1394? (
+ >=media-libs/libdc1394-2.2.1[${MULTILIB_USEDEP}]
+ >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}]
+ )
+ jack? ( >=media-sound/jack-audio-connection-kit-0.121.3-r1[${MULTILIB_USEDEP}] )
+ jpeg2k? ( >=media-libs/openjpeg-1.5.0:0[${MULTILIB_USEDEP}] )
+ libass? ( >=media-libs/libass-0.10.2[${MULTILIB_USEDEP}] )
+ libcaca? ( >=media-libs/libcaca-0.99_beta18-r1[${MULTILIB_USEDEP}] )
+ libsoxr? ( >=media-libs/soxr-0.1.0[${MULTILIB_USEDEP}] )
+ libv4l? ( >=media-libs/libv4l-0.9.5[${MULTILIB_USEDEP}] )
+ lzma? ( >=app-arch/xz-utils-5.0.5-r1[${MULTILIB_USEDEP}] )
+ modplug? ( >=media-libs/libmodplug-0.8.8.4-r1[${MULTILIB_USEDEP}] )
+ openal? ( >=media-libs/openal-1.15.1[${MULTILIB_USEDEP}] )
+ opengl? ( >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}] )
+ openssl? ( >=dev-libs/openssl-1.0.1h-r2[${MULTILIB_USEDEP}] )
+ opus? ( >=media-libs/opus-1.0.2-r2[${MULTILIB_USEDEP}] )
+ pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] )
+ quvi? ( media-libs/libquvi:0.4[${MULTILIB_USEDEP}] )
+ rtmp? ( >=media-video/rtmpdump-2.4_p20131018[${MULTILIB_USEDEP}] )
+ samba? ( >=net-fs/samba-3.6.23-r1[${MULTILIB_USEDEP}] )
+ schroedinger? ( >=media-libs/schroedinger-1.0.11-r1[${MULTILIB_USEDEP}] )
+ sdl? ( >=media-libs/libsdl-1.2.15-r4[sound,video,${MULTILIB_USEDEP}] )
+ speex? ( >=media-libs/speex-1.2_rc1-r1[${MULTILIB_USEDEP}] )
+ ssh? ( >=net-libs/libssh-0.5.5[${MULTILIB_USEDEP}] )
+ truetype? ( >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}] )
+ vaapi? ( >=x11-libs/libva-1.2.1-r1[${MULTILIB_USEDEP}] )
+ vdpau? ( >=x11-libs/libvdpau-0.7[${MULTILIB_USEDEP}] )
+ vorbis? (
+ >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}]
+ >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
+ )
+ vpx? ( >=media-libs/libvpx-1.2.0_pre20130625[${MULTILIB_USEDEP}] )
+ X? (
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
+ !xcb? ( >=x11-libs/libXfixes-5.0.1[${MULTILIB_USEDEP}] )
+ >=x11-libs/libXv-1.0.10[${MULTILIB_USEDEP}]
+ )
+ xcb? ( >=x11-libs/libxcb-1.4[${MULTILIB_USEDEP}] )
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
+ zvbi? ( >=media-libs/zvbi-0.2.35[${MULTILIB_USEDEP}] )
+ !media-video/qt-faststart
+ postproc? ( !media-libs/libpostproc )
+"
+
+DEPEND="${RDEPEND}
+ >=sys-devel/make-3.81
+ doc? ( app-text/texi2html )
+ fontconfig? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ gnutls? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ ieee1394? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ ladspa? ( >=media-libs/ladspa-sdk-1.13-r2[${MULTILIB_USEDEP}] )
+ libv4l? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ cpu_flags_x86_mmx? ( >=dev-lang/yasm-1.2 )
+ rtmp? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ schroedinger? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ test? ( net-misc/wget sys-devel/bc )
+ truetype? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ v4l? ( sys-kernel/linux-headers )
+"
+
+RDEPEND="${RDEPEND}
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+
+# Code requiring FFmpeg to be built under gpl license
+GPL_REQUIRED_USE="
+ postproc? ( gpl )
+ frei0r? ( gpl )
+ cdio? ( gpl )
+ samba? ( gpl )
+ zvbi? ( gpl )
+ encode? (
+ x264? ( gpl )
+ x265? ( gpl )
+ xvid? ( gpl )
+ X? ( !xcb? ( gpl ) )
+ )
+"
+REQUIRED_USE="
+ libv4l? ( v4l )
+ fftools_cws2fws? ( zlib )
+ test? ( encode )
+ ${GPL_REQUIRED_USE}
+ ${CPU_REQUIRED_USE}"
+RESTRICT="
+ encode? ( faac? ( bindist ) aacplus? ( bindist ) )
+ gpl? ( openssl? ( bindist ) fdk? ( bindist ) )
+"
+
+S=${WORKDIR}/${P/_/-}
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/libavutil/avconfig.h
+)
+
+src_prepare() {
+ if [[ "${PV%_p*}" != "${PV}" ]] ; then # Snapshot
+ export revision=git-N-${FFMPEG_REVISION}
+ fi
+ epatch_user
+}
+
+multilib_src_configure() {
+ local myconf=( ${EXTRA_FFMPEG_CONF} )
+
+ local ffuse=( "${FFMPEG_FLAG_MAP[@]}" )
+ use openssl && use gpl && myconf+=( --enable-nonfree )
+ use samba && myconf+=( --enable-version3 )
+
+ # Encoders
+ if use encode ; then
+ ffuse+=( "${FFMPEG_ENCODER_FLAG_MAP[@]}" )
+
+ # Licensing.
+ if use aac || use amrenc ; then
+ myconf+=( --enable-version3 )
+ fi
+ if use aacplus || use faac ; then
+ myconf+=( --enable-nonfree )
+ fi
+ else
+ myconf+=( --disable-encoders )
+ fi
+
+ # Indevs
+ use v4l || myconf+=( --disable-indev=v4l2 --disable-outdev=v4l2 )
+ for i in alsa oss jack ; do
+ use ${i} || myconf+=( --disable-indev=${i} )
+ done
+ use xcb || ffuse+=( X:x11grab )
+
+ # Outdevs
+ for i in alsa oss sdl ; do
+ use ${i} || myconf+=( --disable-outdev=${i} )
+ done
+
+ # Decoders
+ use amr && myconf+=( --enable-version3 )
+ use fdk && use gpl && myconf+=( --enable-nonfree )
+
+ for i in "${ffuse[@]#+}" ; do
+ myconf+=( $(use_enable ${i%:*} ${i#*:}) )
+ done
+
+ # (temporarily) disable non-multilib deps
+ if ! multilib_is_native_abi; then
+ for i in frei0r ; do
+ myconf+=( --disable-${i} )
+ done
+ fi
+
+ # CPU features
+ for i in ${CPU_FEATURES_MAP} ; do
+ if [ "$(tc-arch)" = "${i%:*}" ] ; then
+ local var="${i#*:}_CPU_FEATURES[@]"
+ for j in ${!var} ; do
+ use ${j%:*} || myconf+=( --disable-${j#*:} )
+ done
+ fi
+ done
+
+ if use pic ; then
+ myconf+=( --enable-pic )
+ # disable asm code if PIC is required
+ # as the provided asm decidedly is not PIC for x86.
+ [[ ${ABI} == x86 ]] && myconf+=( --disable-asm )
+ fi
+ [[ ${ABI} == x32 ]] && myconf+=( --disable-asm ) #427004
+
+ # Try to get cpu type based on CFLAGS.
+ # Bug #172723
+ # We need to do this so that features of that CPU will be better used
+ # If they contain an unknown CPU it will not hurt since ffmpeg's configure
+ # will just ignore it.
+ for i in $(get-flag mcpu) $(get-flag mtune) $(get-flag march) ; do
+ [[ ${i} = native ]] && i="host" # bug #273421
+ myconf+=( --cpu=${i} )
+ break
+ done
+
+ # Mandatory configuration
+ myconf=(
+ --enable-avfilter
+ --enable-avresample
+ --disable-stripping
+ "${myconf[@]}"
+ )
+
+ # cross compile support
+ if tc-is-cross-compiler ; then
+ myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- )
+ case ${CHOST} in
+ *freebsd*)
+ myconf+=( --target-os=freebsd )
+ ;;
+ mingw32*)
+ myconf+=( --target-os=mingw32 )
+ ;;
+ *linux*)
+ myconf+=( --target-os=linux )
+ ;;
+ esac
+ fi
+
+ set -- "${S}/configure" \
+ --prefix="${EPREFIX}/usr" \
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \
+ --shlibdir="${EPREFIX}/usr/$(get_libdir)" \
+ --mandir="${EPREFIX}/usr/share/man" \
+ --enable-shared \
+ --cc="$(tc-getCC)" \
+ --cxx="$(tc-getCXX)" \
+ --ar="$(tc-getAR)" \
+ --optflags=" " \
+ $(use_enable static-libs static) \
+ "${myconf[@]}"
+ echo "${@}"
+ "${@}" || die
+}
+
+multilib_src_compile() {
+ emake V=1
+
+ if multilib_is_native_abi; then
+ for i in "${FFTOOLS[@]}" ; do
+ if use fftools_${i} ; then
+ emake V=1 tools/${i}
+ fi
+ done
+ fi
+}
+
+multilib_src_install() {
+ emake V=1 DESTDIR="${D}" install install-man
+
+ if multilib_is_native_abi; then
+ for i in "${FFTOOLS[@]}" ; do
+ if use fftools_${i} ; then
+ dobin tools/${i}
+ fi
+ done
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc Changelog README.md CREDITS doc/*.txt doc/APIchanges
+ [ -f "RELEASE_NOTES" ] && dodoc "RELEASE_NOTES"
+ use doc && dohtml -r doc/*
+ if use examples ; then
+ dodoc -r doc/examples
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+}
+
+multilib_src_test() {
+ LD_LIBRARY_PATH="${BUILD_DIR}/libpostproc:${BUILD_DIR}/libswscale:${BUILD_DIR}/libswresample:${BUILD_DIR}/libavcodec:${BUILD_DIR}/libavdevice:${BUILD_DIR}/libavfilter:${BUILD_DIR}/libavformat:${BUILD_DIR}/libavutil:${BUILD_DIR}/libavresample" \
+ emake V=1 fate
+}
diff --git a/media-video/ffmpeg/ffmpeg-2.6.4.ebuild b/media-video/ffmpeg/ffmpeg-2.6.4.ebuild
new file mode 100644
index 000000000000..c970d54625f9
--- /dev/null
+++ b/media-video/ffmpeg/ffmpeg-2.6.4.ebuild
@@ -0,0 +1,450 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+# Subslot: libavutil major.libavcodec major.libavformat major
+# Since FFmpeg ships several libraries, subslot is kind of limited here.
+# Most consumers will use those three libraries, if a "less used" library
+# changes its soname, consumers will have to be rebuilt the old way
+# (preserve-libs).
+# If, for example, a package does not link to libavformat and only libavformat
+# changes its ABI then this package will be rebuilt needlessly. Hence, such a
+# package is free _not_ to := depend on FFmpeg but I would strongly encourage
+# doing so since such a case is unlikely.
+FFMPEG_SUBSLOT=54.56.56
+
+SCM=""
+if [ "${PV#9999}" != "${PV}" ] ; then
+ SCM="git-2"
+ EGIT_REPO_URI="git://source.ffmpeg.org/ffmpeg.git"
+fi
+
+inherit eutils flag-o-matic multilib multilib-minimal toolchain-funcs ${SCM}
+
+DESCRIPTION="Complete solution to record, convert and stream audio and video. Includes libavcodec"
+HOMEPAGE="http://ffmpeg.org/"
+if [ "${PV#9999}" != "${PV}" ] ; then
+ SRC_URI=""
+elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot
+ SRC_URI="mirror://gentoo/${P}.tar.bz2"
+else # Release
+ SRC_URI="http://ffmpeg.org/releases/${P/_/-}.tar.bz2"
+fi
+FFMPEG_REVISION="${PV#*_p}"
+
+SLOT="0/${FFMPEG_SUBSLOT}"
+LICENSE="
+ !gpl? ( LGPL-2.1 )
+ gpl? ( GPL-2 )
+ amr? (
+ gpl? ( GPL-3 )
+ !gpl? ( LGPL-3 )
+ )
+ encode? (
+ aac? (
+ gpl? ( GPL-3 )
+ !gpl? ( LGPL-3 )
+ )
+ amrenc? (
+ gpl? ( GPL-3 )
+ !gpl? ( LGPL-3 )
+ )
+ )
+ samba? ( GPL-3 )
+"
+if [ "${PV#9999}" = "${PV}" ] ; then
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
+fi
+
+# Options to use as use_enable in the foo[:bar] form.
+# This will feed configure with $(use_enable foo bar)
+# or $(use_enable foo foo) if no :bar is set.
+# foo is added to IUSE.
+FFMPEG_FLAG_MAP=(
+ +bzip2:bzlib cpudetection:runtime-cpudetect debug doc gnutls +gpl
+ +hardcoded-tables +iconv lzma +network openssl +postproc
+ samba:libsmbclient sdl:ffplay vaapi vdpau X:xlib xcb:libxcb
+ xcb:libxcb-shm xcb:libxcb-xfixes +zlib
+ # libavdevice options
+ cdio:libcdio iec61883:libiec61883 ieee1394:libdc1394 libcaca openal
+ opengl
+ # indevs
+ libv4l:libv4l2 pulseaudio:libpulse
+ # decoders
+ amr:libopencore-amrwb amr:libopencore-amrnb fdk:libfdk-aac
+ jpeg2k:libopenjpeg bluray:libbluray celt:libcelt gme:libgme gsm:libgsm
+ modplug:libmodplug opus:libopus quvi:libquvi rtmp:librtmp ssh:libssh
+ schroedinger:libschroedinger speex:libspeex vorbis:libvorbis vpx:libvpx
+ zvbi:libzvbi
+ # libavfilter options
+ bs2b:libbs2b flite:libflite frei0r fribidi:libfribidi fontconfig ladspa
+ libass truetype:libfreetype
+ # libswresample options
+ libsoxr
+ # Threads; we only support pthread for now but ffmpeg supports more
+ +threads:pthreads
+)
+
+# Same as above but for encoders, i.e. they do something only with USE=encode.
+FFMPEG_ENCODER_FLAG_MAP=(
+ aac:libvo-aacenc amrenc:libvo-amrwbenc mp3:libmp3lame
+ aacplus:libaacplus faac:libfaac theora:libtheora twolame:libtwolame
+ wavpack:libwavpack webp:libwebp x264:libx264 x265:libx265 xvid:libxvid
+)
+
+IUSE="
+ alsa +encode examples jack oss pic static-libs test v4l
+ ${FFMPEG_FLAG_MAP[@]%:*}
+ ${FFMPEG_ENCODER_FLAG_MAP[@]%:*}
+"
+
+# Strings for CPU features in the useflag[:configure_option] form
+# if :configure_option isn't set, it will use 'useflag' as configure option
+ARM_CPU_FEATURES=( armv5te armv6 armv6t2 neon armvfp:vfp )
+MIPS_CPU_FEATURES=( mipsdspr1 mipsdspr2 mipsfpu )
+PPC_CPU_FEATURES=( altivec )
+X86_CPU_FEATURES_RAW=( 3dnow:amd3dnow 3dnowext:amd3dnowext avx:avx avx2:avx2 fma3:fma3 fma4:fma4 mmx:mmx mmxext:mmxext sse:sse sse2:sse2 sse3:sse3 ssse3:ssse3 sse4_1:sse4 sse4_2:sse42 xop:xop )
+X86_CPU_FEATURES=( ${X86_CPU_FEATURES_RAW[@]/#/cpu_flags_x86_} )
+X86_CPU_REQUIRED_USE="
+ cpu_flags_x86_avx2? ( cpu_flags_x86_avx )
+ cpu_flags_x86_fma4? ( cpu_flags_x86_avx )
+ cpu_flags_x86_fma3? ( cpu_flags_x86_avx )
+ cpu_flags_x86_xop? ( cpu_flags_x86_avx )
+ cpu_flags_x86_avx? ( cpu_flags_x86_sse4_2 )
+ cpu_flags_x86_sse4_2? ( cpu_flags_x86_sse4_1 )
+ cpu_flags_x86_sse4_1? ( cpu_flags_x86_ssse3 )
+ cpu_flags_x86_ssse3? ( cpu_flags_x86_sse3 )
+ cpu_flags_x86_sse3? ( cpu_flags_x86_sse2 )
+ cpu_flags_x86_sse2? ( cpu_flags_x86_sse )
+ cpu_flags_x86_sse? ( cpu_flags_x86_mmxext )
+ cpu_flags_x86_mmxext? ( cpu_flags_x86_mmx )
+ cpu_flags_x86_3dnowext? ( cpu_flags_x86_3dnow )
+ cpu_flags_x86_3dnow? ( cpu_flags_x86_mmx )
+"
+
+IUSE="${IUSE}
+ ${ARM_CPU_FEATURES[@]%:*}
+ ${MIPS_CPU_FEATURES[@]%:*}
+ ${PPC_CPU_FEATURES[@]%:*}
+ ${X86_CPU_FEATURES[@]%:*}
+"
+
+CPU_REQUIRED_USE="
+ ${X86_CPU_REQUIRED_USE}
+"
+
+# "$(tc-arch):XXX" form where XXX_CPU_FEATURES are the cpu features that apply to
+# $(tc-arch).
+CPU_FEATURES_MAP="
+ arm:ARM
+ arm64:ARM
+ mips:MIPS
+ ppc:PPC
+ ppc64:PPC
+ x86:X86
+ amd64:X86
+"
+
+FFTOOLS=( aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt graph2dot ismindex pktdumper qt-faststart trasher )
+IUSE="${IUSE} ${FFTOOLS[@]/#/+fftools_}"
+
+RDEPEND="
+ alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
+ amr? ( >=media-libs/opencore-amr-0.1.3-r1[${MULTILIB_USEDEP}] )
+ bluray? ( >=media-libs/libbluray-0.3.0-r1[${MULTILIB_USEDEP}] )
+ bs2b? ( >=media-libs/libbs2b-3.1.0-r1[${MULTILIB_USEDEP}] )
+ bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
+ cdio? ( >=dev-libs/libcdio-paranoia-0.90_p1-r1[${MULTILIB_USEDEP}] )
+ celt? ( >=media-libs/celt-0.11.1-r1[${MULTILIB_USEDEP}] )
+ encode? (
+ aac? ( >=media-libs/vo-aacenc-0.1.3[${MULTILIB_USEDEP}] )
+ aacplus? ( >=media-libs/libaacplus-2.0.2-r1[${MULTILIB_USEDEP}] )
+ amrenc? ( >=media-libs/vo-amrwbenc-0.1.2-r1[${MULTILIB_USEDEP}] )
+ faac? ( >=media-libs/faac-1.28-r3[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/lame-3.99.5-r1[${MULTILIB_USEDEP}] )
+ theora? (
+ >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}]
+ >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
+ )
+ twolame? ( >=media-sound/twolame-0.3.13-r1[${MULTILIB_USEDEP}] )
+ wavpack? ( >=media-sound/wavpack-4.60.1-r1[${MULTILIB_USEDEP}] )
+ webp? ( >=media-libs/libwebp-0.3.0[${MULTILIB_USEDEP}] )
+ x264? ( >=media-libs/x264-0.0.20130506:=[${MULTILIB_USEDEP}] )
+ x265? ( >=media-libs/x265-1.2:=[${MULTILIB_USEDEP}] )
+ xvid? ( >=media-libs/xvid-1.3.2-r1[${MULTILIB_USEDEP}] )
+ )
+ fdk? ( >=media-libs/fdk-aac-0.1.3:=[${MULTILIB_USEDEP}] )
+ flite? ( >=app-accessibility/flite-1.4-r4[${MULTILIB_USEDEP}] )
+ fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] )
+ frei0r? ( media-plugins/frei0r-plugins )
+ fribidi? ( >=dev-libs/fribidi-0.19.6[${MULTILIB_USEDEP}] )
+ gme? ( >=media-libs/game-music-emu-0.6.0[${MULTILIB_USEDEP}] )
+ gnutls? ( >=net-libs/gnutls-2.12.23-r6[${MULTILIB_USEDEP}] )
+ gsm? ( >=media-sound/gsm-1.0.13-r1[${MULTILIB_USEDEP}] )
+ iconv? ( >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}] )
+ iec61883? (
+ >=media-libs/libiec61883-1.2.0-r1[${MULTILIB_USEDEP}]
+ >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}]
+ >=sys-libs/libavc1394-0.5.4-r1[${MULTILIB_USEDEP}]
+ )
+ ieee1394? (
+ >=media-libs/libdc1394-2.2.1[${MULTILIB_USEDEP}]
+ >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}]
+ )
+ jack? ( >=media-sound/jack-audio-connection-kit-0.121.3-r1[${MULTILIB_USEDEP}] )
+ jpeg2k? ( >=media-libs/openjpeg-1.5.0:0[${MULTILIB_USEDEP}] )
+ libass? ( >=media-libs/libass-0.10.2[${MULTILIB_USEDEP}] )
+ libcaca? ( >=media-libs/libcaca-0.99_beta18-r1[${MULTILIB_USEDEP}] )
+ libsoxr? ( >=media-libs/soxr-0.1.0[${MULTILIB_USEDEP}] )
+ libv4l? ( >=media-libs/libv4l-0.9.5[${MULTILIB_USEDEP}] )
+ lzma? ( >=app-arch/xz-utils-5.0.5-r1[${MULTILIB_USEDEP}] )
+ modplug? ( >=media-libs/libmodplug-0.8.8.4-r1[${MULTILIB_USEDEP}] )
+ openal? ( >=media-libs/openal-1.15.1[${MULTILIB_USEDEP}] )
+ opengl? ( >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}] )
+ openssl? ( >=dev-libs/openssl-1.0.1h-r2[${MULTILIB_USEDEP}] )
+ opus? ( >=media-libs/opus-1.0.2-r2[${MULTILIB_USEDEP}] )
+ pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] )
+ quvi? ( media-libs/libquvi:0.4[${MULTILIB_USEDEP}] )
+ rtmp? ( >=media-video/rtmpdump-2.4_p20131018[${MULTILIB_USEDEP}] )
+ samba? ( >=net-fs/samba-3.6.23-r1[${MULTILIB_USEDEP}] )
+ schroedinger? ( >=media-libs/schroedinger-1.0.11-r1[${MULTILIB_USEDEP}] )
+ sdl? ( >=media-libs/libsdl-1.2.15-r4[sound,video,${MULTILIB_USEDEP}] )
+ speex? ( >=media-libs/speex-1.2_rc1-r1[${MULTILIB_USEDEP}] )
+ ssh? ( >=net-libs/libssh-0.5.5[${MULTILIB_USEDEP}] )
+ truetype? ( >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}] )
+ vaapi? ( >=x11-libs/libva-1.2.1-r1[${MULTILIB_USEDEP}] )
+ vdpau? ( >=x11-libs/libvdpau-0.7[${MULTILIB_USEDEP}] )
+ vorbis? (
+ >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}]
+ >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
+ )
+ vpx? ( >=media-libs/libvpx-1.2.0_pre20130625[${MULTILIB_USEDEP}] )
+ X? (
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
+ !xcb? ( >=x11-libs/libXfixes-5.0.1[${MULTILIB_USEDEP}] )
+ >=x11-libs/libXv-1.0.10[${MULTILIB_USEDEP}]
+ )
+ xcb? ( >=x11-libs/libxcb-1.4[${MULTILIB_USEDEP}] )
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
+ zvbi? ( >=media-libs/zvbi-0.2.35[${MULTILIB_USEDEP}] )
+ !media-video/qt-faststart
+ postproc? ( !media-libs/libpostproc )
+"
+
+DEPEND="${RDEPEND}
+ >=sys-devel/make-3.81
+ doc? ( app-text/texi2html )
+ fontconfig? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ gnutls? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ ieee1394? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ ladspa? ( >=media-libs/ladspa-sdk-1.13-r2[${MULTILIB_USEDEP}] )
+ libv4l? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ cpu_flags_x86_mmx? ( >=dev-lang/yasm-1.2 )
+ rtmp? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ schroedinger? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ test? ( net-misc/wget sys-devel/bc )
+ truetype? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ v4l? ( sys-kernel/linux-headers )
+"
+
+RDEPEND="${RDEPEND}
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+
+# Code requiring FFmpeg to be built under gpl license
+GPL_REQUIRED_USE="
+ postproc? ( gpl )
+ frei0r? ( gpl )
+ cdio? ( gpl )
+ samba? ( gpl )
+ zvbi? ( gpl )
+ encode? (
+ x264? ( gpl )
+ x265? ( gpl )
+ xvid? ( gpl )
+ X? ( !xcb? ( gpl ) )
+ )
+"
+REQUIRED_USE="
+ libv4l? ( v4l )
+ fftools_cws2fws? ( zlib )
+ test? ( encode )
+ ${GPL_REQUIRED_USE}
+ ${CPU_REQUIRED_USE}"
+RESTRICT="
+ encode? ( faac? ( bindist ) aacplus? ( bindist ) )
+ gpl? ( openssl? ( bindist ) fdk? ( bindist ) )
+"
+
+S=${WORKDIR}/${P/_/-}
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/libavutil/avconfig.h
+)
+
+src_prepare() {
+ if [[ "${PV%_p*}" != "${PV}" ]] ; then # Snapshot
+ export revision=git-N-${FFMPEG_REVISION}
+ fi
+ epatch_user
+}
+
+multilib_src_configure() {
+ local myconf=( ${EXTRA_FFMPEG_CONF} )
+
+ local ffuse=( "${FFMPEG_FLAG_MAP[@]}" )
+ use openssl && use gpl && myconf+=( --enable-nonfree )
+ use samba && myconf+=( --enable-version3 )
+
+ # Encoders
+ if use encode ; then
+ ffuse+=( "${FFMPEG_ENCODER_FLAG_MAP[@]}" )
+
+ # Licensing.
+ if use aac || use amrenc ; then
+ myconf+=( --enable-version3 )
+ fi
+ if use aacplus || use faac ; then
+ myconf+=( --enable-nonfree )
+ fi
+ else
+ myconf+=( --disable-encoders )
+ fi
+
+ # Indevs
+ use v4l || myconf+=( --disable-indev=v4l2 --disable-outdev=v4l2 )
+ for i in alsa oss jack ; do
+ use ${i} || myconf+=( --disable-indev=${i} )
+ done
+ use xcb || ffuse+=( X:x11grab )
+
+ # Outdevs
+ for i in alsa oss sdl ; do
+ use ${i} || myconf+=( --disable-outdev=${i} )
+ done
+
+ # Decoders
+ use amr && myconf+=( --enable-version3 )
+ use fdk && use gpl && myconf+=( --enable-nonfree )
+
+ for i in "${ffuse[@]#+}" ; do
+ myconf+=( $(use_enable ${i%:*} ${i#*:}) )
+ done
+
+ # (temporarily) disable non-multilib deps
+ if ! multilib_is_native_abi; then
+ for i in frei0r ; do
+ myconf+=( --disable-${i} )
+ done
+ fi
+
+ # CPU features
+ for i in ${CPU_FEATURES_MAP} ; do
+ if [ "$(tc-arch)" = "${i%:*}" ] ; then
+ local var="${i#*:}_CPU_FEATURES[@]"
+ for j in ${!var} ; do
+ use ${j%:*} || myconf+=( --disable-${j#*:} )
+ done
+ fi
+ done
+
+ if use pic ; then
+ myconf+=( --enable-pic )
+ # disable asm code if PIC is required
+ # as the provided asm decidedly is not PIC for x86.
+ [[ ${ABI} == x86 ]] && myconf+=( --disable-asm )
+ fi
+ [[ ${ABI} == x32 ]] && myconf+=( --disable-asm ) #427004
+
+ # Try to get cpu type based on CFLAGS.
+ # Bug #172723
+ # We need to do this so that features of that CPU will be better used
+ # If they contain an unknown CPU it will not hurt since ffmpeg's configure
+ # will just ignore it.
+ for i in $(get-flag mcpu) $(get-flag mtune) $(get-flag march) ; do
+ [[ ${i} = native ]] && i="host" # bug #273421
+ myconf+=( --cpu=${i} )
+ break
+ done
+
+ # Mandatory configuration
+ myconf=(
+ --enable-avfilter
+ --enable-avresample
+ --disable-stripping
+ "${myconf[@]}"
+ )
+
+ # cross compile support
+ if tc-is-cross-compiler ; then
+ myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- )
+ case ${CHOST} in
+ *freebsd*)
+ myconf+=( --target-os=freebsd )
+ ;;
+ mingw32*)
+ myconf+=( --target-os=mingw32 )
+ ;;
+ *linux*)
+ myconf+=( --target-os=linux )
+ ;;
+ esac
+ fi
+
+ set -- "${S}/configure" \
+ --prefix="${EPREFIX}/usr" \
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \
+ --shlibdir="${EPREFIX}/usr/$(get_libdir)" \
+ --mandir="${EPREFIX}/usr/share/man" \
+ --enable-shared \
+ --cc="$(tc-getCC)" \
+ --cxx="$(tc-getCXX)" \
+ --ar="$(tc-getAR)" \
+ --optflags=" " \
+ $(use_enable static-libs static) \
+ "${myconf[@]}"
+ echo "${@}"
+ "${@}" || die
+}
+
+multilib_src_compile() {
+ emake V=1
+
+ if multilib_is_native_abi; then
+ for i in "${FFTOOLS[@]}" ; do
+ if use fftools_${i} ; then
+ emake V=1 tools/${i}
+ fi
+ done
+ fi
+}
+
+multilib_src_install() {
+ emake V=1 DESTDIR="${D}" install install-man
+
+ if multilib_is_native_abi; then
+ for i in "${FFTOOLS[@]}" ; do
+ if use fftools_${i} ; then
+ dobin tools/${i}
+ fi
+ done
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc Changelog README.md CREDITS doc/*.txt doc/APIchanges
+ [ -f "RELEASE_NOTES" ] && dodoc "RELEASE_NOTES"
+ use doc && dohtml -r doc/*
+ if use examples ; then
+ dodoc -r doc/examples
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+}
+
+multilib_src_test() {
+ LD_LIBRARY_PATH="${BUILD_DIR}/libpostproc:${BUILD_DIR}/libswscale:${BUILD_DIR}/libswresample:${BUILD_DIR}/libavcodec:${BUILD_DIR}/libavdevice:${BUILD_DIR}/libavfilter:${BUILD_DIR}/libavformat:${BUILD_DIR}/libavutil:${BUILD_DIR}/libavresample" \
+ emake V=1 fate
+}
diff --git a/media-video/ffmpeg/ffmpeg-2.7.2.ebuild b/media-video/ffmpeg/ffmpeg-2.7.2.ebuild
new file mode 100644
index 000000000000..280e101cd368
--- /dev/null
+++ b/media-video/ffmpeg/ffmpeg-2.7.2.ebuild
@@ -0,0 +1,450 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+# Subslot: libavutil major.libavcodec major.libavformat major
+# Since FFmpeg ships several libraries, subslot is kind of limited here.
+# Most consumers will use those three libraries, if a "less used" library
+# changes its soname, consumers will have to be rebuilt the old way
+# (preserve-libs).
+# If, for example, a package does not link to libavformat and only libavformat
+# changes its ABI then this package will be rebuilt needlessly. Hence, such a
+# package is free _not_ to := depend on FFmpeg but I would strongly encourage
+# doing so since such a case is unlikely.
+FFMPEG_SUBSLOT=54.56.56
+
+SCM=""
+if [ "${PV#9999}" != "${PV}" ] ; then
+ SCM="git-2"
+ EGIT_REPO_URI="git://source.ffmpeg.org/ffmpeg.git"
+fi
+
+inherit eutils flag-o-matic multilib multilib-minimal toolchain-funcs ${SCM}
+
+DESCRIPTION="Complete solution to record, convert and stream audio and video. Includes libavcodec"
+HOMEPAGE="http://ffmpeg.org/"
+if [ "${PV#9999}" != "${PV}" ] ; then
+ SRC_URI=""
+elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot
+ SRC_URI="mirror://gentoo/${P}.tar.bz2"
+else # Release
+ SRC_URI="http://ffmpeg.org/releases/${P/_/-}.tar.bz2"
+fi
+FFMPEG_REVISION="${PV#*_p}"
+
+SLOT="0/${FFMPEG_SUBSLOT}"
+LICENSE="
+ !gpl? ( LGPL-2.1 )
+ gpl? ( GPL-2 )
+ amr? (
+ gpl? ( GPL-3 )
+ !gpl? ( LGPL-3 )
+ )
+ encode? (
+ aac? (
+ gpl? ( GPL-3 )
+ !gpl? ( LGPL-3 )
+ )
+ amrenc? (
+ gpl? ( GPL-3 )
+ !gpl? ( LGPL-3 )
+ )
+ )
+ samba? ( GPL-3 )
+"
+if [ "${PV#9999}" = "${PV}" ] ; then
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
+fi
+
+# Options to use as use_enable in the foo[:bar] form.
+# This will feed configure with $(use_enable foo bar)
+# or $(use_enable foo foo) if no :bar is set.
+# foo is added to IUSE.
+FFMPEG_FLAG_MAP=(
+ +bzip2:bzlib cpudetection:runtime-cpudetect debug doc gnutls +gpl
+ +hardcoded-tables +iconv lzma +network openssl +postproc
+ samba:libsmbclient sdl:ffplay vaapi vdpau X:xlib xcb:libxcb
+ xcb:libxcb-shm xcb:libxcb-xfixes +zlib
+ # libavdevice options
+ cdio:libcdio iec61883:libiec61883 ieee1394:libdc1394 libcaca openal
+ opengl
+ # indevs
+ libv4l:libv4l2 pulseaudio:libpulse
+ # decoders
+ amr:libopencore-amrwb amr:libopencore-amrnb fdk:libfdk-aac
+ jpeg2k:libopenjpeg bluray:libbluray celt:libcelt gme:libgme gsm:libgsm
+ modplug:libmodplug opus:libopus quvi:libquvi rtmp:librtmp ssh:libssh
+ schroedinger:libschroedinger speex:libspeex vorbis:libvorbis vpx:libvpx
+ zvbi:libzvbi
+ # libavfilter options
+ bs2b:libbs2b flite:libflite frei0r fribidi:libfribidi fontconfig ladspa
+ libass truetype:libfreetype
+ # libswresample options
+ libsoxr
+ # Threads; we only support pthread for now but ffmpeg supports more
+ +threads:pthreads
+)
+
+# Same as above but for encoders, i.e. they do something only with USE=encode.
+FFMPEG_ENCODER_FLAG_MAP=(
+ aac:libvo-aacenc amrenc:libvo-amrwbenc mp3:libmp3lame
+ aacplus:libaacplus faac:libfaac theora:libtheora twolame:libtwolame
+ wavpack:libwavpack webp:libwebp x264:libx264 x265:libx265 xvid:libxvid
+)
+
+IUSE="
+ alsa +encode examples jack oss pic static-libs test v4l
+ ${FFMPEG_FLAG_MAP[@]%:*}
+ ${FFMPEG_ENCODER_FLAG_MAP[@]%:*}
+"
+
+# Strings for CPU features in the useflag[:configure_option] form
+# if :configure_option isn't set, it will use 'useflag' as configure option
+ARM_CPU_FEATURES=( armv5te armv6 armv6t2 neon armvfp:vfp )
+MIPS_CPU_FEATURES=( mipsdspr1 mipsdspr2 mipsfpu )
+PPC_CPU_FEATURES=( altivec )
+X86_CPU_FEATURES_RAW=( 3dnow:amd3dnow 3dnowext:amd3dnowext avx:avx avx2:avx2 fma3:fma3 fma4:fma4 mmx:mmx mmxext:mmxext sse:sse sse2:sse2 sse3:sse3 ssse3:ssse3 sse4_1:sse4 sse4_2:sse42 xop:xop )
+X86_CPU_FEATURES=( ${X86_CPU_FEATURES_RAW[@]/#/cpu_flags_x86_} )
+X86_CPU_REQUIRED_USE="
+ cpu_flags_x86_avx2? ( cpu_flags_x86_avx )
+ cpu_flags_x86_fma4? ( cpu_flags_x86_avx )
+ cpu_flags_x86_fma3? ( cpu_flags_x86_avx )
+ cpu_flags_x86_xop? ( cpu_flags_x86_avx )
+ cpu_flags_x86_avx? ( cpu_flags_x86_sse4_2 )
+ cpu_flags_x86_sse4_2? ( cpu_flags_x86_sse4_1 )
+ cpu_flags_x86_sse4_1? ( cpu_flags_x86_ssse3 )
+ cpu_flags_x86_ssse3? ( cpu_flags_x86_sse3 )
+ cpu_flags_x86_sse3? ( cpu_flags_x86_sse2 )
+ cpu_flags_x86_sse2? ( cpu_flags_x86_sse )
+ cpu_flags_x86_sse? ( cpu_flags_x86_mmxext )
+ cpu_flags_x86_mmxext? ( cpu_flags_x86_mmx )
+ cpu_flags_x86_3dnowext? ( cpu_flags_x86_3dnow )
+ cpu_flags_x86_3dnow? ( cpu_flags_x86_mmx )
+"
+
+IUSE="${IUSE}
+ ${ARM_CPU_FEATURES[@]%:*}
+ ${MIPS_CPU_FEATURES[@]%:*}
+ ${PPC_CPU_FEATURES[@]%:*}
+ ${X86_CPU_FEATURES[@]%:*}
+"
+
+CPU_REQUIRED_USE="
+ ${X86_CPU_REQUIRED_USE}
+"
+
+# "$(tc-arch):XXX" form where XXX_CPU_FEATURES are the cpu features that apply to
+# $(tc-arch).
+CPU_FEATURES_MAP="
+ arm:ARM
+ arm64:ARM
+ mips:MIPS
+ ppc:PPC
+ ppc64:PPC
+ x86:X86
+ amd64:X86
+"
+
+FFTOOLS=( aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt graph2dot ismindex pktdumper qt-faststart trasher )
+IUSE="${IUSE} ${FFTOOLS[@]/#/+fftools_}"
+
+RDEPEND="
+ alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
+ amr? ( >=media-libs/opencore-amr-0.1.3-r1[${MULTILIB_USEDEP}] )
+ bluray? ( >=media-libs/libbluray-0.3.0-r1[${MULTILIB_USEDEP}] )
+ bs2b? ( >=media-libs/libbs2b-3.1.0-r1[${MULTILIB_USEDEP}] )
+ bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
+ cdio? ( >=dev-libs/libcdio-paranoia-0.90_p1-r1[${MULTILIB_USEDEP}] )
+ celt? ( >=media-libs/celt-0.11.1-r1[${MULTILIB_USEDEP}] )
+ encode? (
+ aac? ( >=media-libs/vo-aacenc-0.1.3[${MULTILIB_USEDEP}] )
+ aacplus? ( >=media-libs/libaacplus-2.0.2-r1[${MULTILIB_USEDEP}] )
+ amrenc? ( >=media-libs/vo-amrwbenc-0.1.2-r1[${MULTILIB_USEDEP}] )
+ faac? ( >=media-libs/faac-1.28-r3[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/lame-3.99.5-r1[${MULTILIB_USEDEP}] )
+ theora? (
+ >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}]
+ >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
+ )
+ twolame? ( >=media-sound/twolame-0.3.13-r1[${MULTILIB_USEDEP}] )
+ wavpack? ( >=media-sound/wavpack-4.60.1-r1[${MULTILIB_USEDEP}] )
+ webp? ( >=media-libs/libwebp-0.3.0[${MULTILIB_USEDEP}] )
+ x264? ( >=media-libs/x264-0.0.20130506:=[${MULTILIB_USEDEP}] )
+ x265? ( >=media-libs/x265-1.6:=[${MULTILIB_USEDEP}] )
+ xvid? ( >=media-libs/xvid-1.3.2-r1[${MULTILIB_USEDEP}] )
+ )
+ fdk? ( >=media-libs/fdk-aac-0.1.3:=[${MULTILIB_USEDEP}] )
+ flite? ( >=app-accessibility/flite-1.4-r4[${MULTILIB_USEDEP}] )
+ fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] )
+ frei0r? ( media-plugins/frei0r-plugins )
+ fribidi? ( >=dev-libs/fribidi-0.19.6[${MULTILIB_USEDEP}] )
+ gme? ( >=media-libs/game-music-emu-0.6.0[${MULTILIB_USEDEP}] )
+ gnutls? ( >=net-libs/gnutls-2.12.23-r6[${MULTILIB_USEDEP}] )
+ gsm? ( >=media-sound/gsm-1.0.13-r1[${MULTILIB_USEDEP}] )
+ iconv? ( >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}] )
+ iec61883? (
+ >=media-libs/libiec61883-1.2.0-r1[${MULTILIB_USEDEP}]
+ >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}]
+ >=sys-libs/libavc1394-0.5.4-r1[${MULTILIB_USEDEP}]
+ )
+ ieee1394? (
+ >=media-libs/libdc1394-2.2.1[${MULTILIB_USEDEP}]
+ >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}]
+ )
+ jack? ( >=media-sound/jack-audio-connection-kit-0.121.3-r1[${MULTILIB_USEDEP}] )
+ jpeg2k? ( >=media-libs/openjpeg-1.5.0:0[${MULTILIB_USEDEP}] )
+ libass? ( >=media-libs/libass-0.10.2[${MULTILIB_USEDEP}] )
+ libcaca? ( >=media-libs/libcaca-0.99_beta18-r1[${MULTILIB_USEDEP}] )
+ libsoxr? ( >=media-libs/soxr-0.1.0[${MULTILIB_USEDEP}] )
+ libv4l? ( >=media-libs/libv4l-0.9.5[${MULTILIB_USEDEP}] )
+ lzma? ( >=app-arch/xz-utils-5.0.5-r1[${MULTILIB_USEDEP}] )
+ modplug? ( >=media-libs/libmodplug-0.8.8.4-r1[${MULTILIB_USEDEP}] )
+ openal? ( >=media-libs/openal-1.15.1[${MULTILIB_USEDEP}] )
+ opengl? ( >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}] )
+ openssl? ( >=dev-libs/openssl-1.0.1h-r2[${MULTILIB_USEDEP}] )
+ opus? ( >=media-libs/opus-1.0.2-r2[${MULTILIB_USEDEP}] )
+ pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] )
+ quvi? ( media-libs/libquvi:0.4[${MULTILIB_USEDEP}] )
+ rtmp? ( >=media-video/rtmpdump-2.4_p20131018[${MULTILIB_USEDEP}] )
+ samba? ( >=net-fs/samba-3.6.23-r1[${MULTILIB_USEDEP}] )
+ schroedinger? ( >=media-libs/schroedinger-1.0.11-r1[${MULTILIB_USEDEP}] )
+ sdl? ( >=media-libs/libsdl-1.2.15-r4[sound,video,${MULTILIB_USEDEP}] )
+ speex? ( >=media-libs/speex-1.2_rc1-r1[${MULTILIB_USEDEP}] )
+ ssh? ( >=net-libs/libssh-0.5.5[${MULTILIB_USEDEP}] )
+ truetype? ( >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}] )
+ vaapi? ( >=x11-libs/libva-1.2.1-r1[${MULTILIB_USEDEP}] )
+ vdpau? ( >=x11-libs/libvdpau-0.7[${MULTILIB_USEDEP}] )
+ vorbis? (
+ >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}]
+ >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
+ )
+ vpx? ( >=media-libs/libvpx-1.2.0_pre20130625[${MULTILIB_USEDEP}] )
+ X? (
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
+ !xcb? ( >=x11-libs/libXfixes-5.0.1[${MULTILIB_USEDEP}] )
+ >=x11-libs/libXv-1.0.10[${MULTILIB_USEDEP}]
+ )
+ xcb? ( >=x11-libs/libxcb-1.4[${MULTILIB_USEDEP}] )
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
+ zvbi? ( >=media-libs/zvbi-0.2.35[${MULTILIB_USEDEP}] )
+ !media-video/qt-faststart
+ postproc? ( !media-libs/libpostproc )
+"
+
+DEPEND="${RDEPEND}
+ >=sys-devel/make-3.81
+ doc? ( app-text/texi2html )
+ fontconfig? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ gnutls? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ ieee1394? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ ladspa? ( >=media-libs/ladspa-sdk-1.13-r2[${MULTILIB_USEDEP}] )
+ libv4l? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ cpu_flags_x86_mmx? ( >=dev-lang/yasm-1.2 )
+ rtmp? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ schroedinger? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ test? ( net-misc/wget sys-devel/bc )
+ truetype? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ v4l? ( sys-kernel/linux-headers )
+"
+
+RDEPEND="${RDEPEND}
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+
+# Code requiring FFmpeg to be built under gpl license
+GPL_REQUIRED_USE="
+ postproc? ( gpl )
+ frei0r? ( gpl )
+ cdio? ( gpl )
+ samba? ( gpl )
+ zvbi? ( gpl )
+ encode? (
+ x264? ( gpl )
+ x265? ( gpl )
+ xvid? ( gpl )
+ X? ( !xcb? ( gpl ) )
+ )
+"
+REQUIRED_USE="
+ libv4l? ( v4l )
+ fftools_cws2fws? ( zlib )
+ test? ( encode )
+ ${GPL_REQUIRED_USE}
+ ${CPU_REQUIRED_USE}"
+RESTRICT="
+ encode? ( faac? ( bindist ) aacplus? ( bindist ) )
+ gpl? ( openssl? ( bindist ) fdk? ( bindist ) )
+"
+
+S=${WORKDIR}/${P/_/-}
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/libavutil/avconfig.h
+)
+
+src_prepare() {
+ if [[ "${PV%_p*}" != "${PV}" ]] ; then # Snapshot
+ export revision=git-N-${FFMPEG_REVISION}
+ fi
+ epatch_user
+}
+
+multilib_src_configure() {
+ local myconf=( ${EXTRA_FFMPEG_CONF} )
+
+ local ffuse=( "${FFMPEG_FLAG_MAP[@]}" )
+ use openssl && use gpl && myconf+=( --enable-nonfree )
+ use samba && myconf+=( --enable-version3 )
+
+ # Encoders
+ if use encode ; then
+ ffuse+=( "${FFMPEG_ENCODER_FLAG_MAP[@]}" )
+
+ # Licensing.
+ if use aac || use amrenc ; then
+ myconf+=( --enable-version3 )
+ fi
+ if use aacplus || use faac ; then
+ myconf+=( --enable-nonfree )
+ fi
+ else
+ myconf+=( --disable-encoders )
+ fi
+
+ # Indevs
+ use v4l || myconf+=( --disable-indev=v4l2 --disable-outdev=v4l2 )
+ for i in alsa oss jack ; do
+ use ${i} || myconf+=( --disable-indev=${i} )
+ done
+ use xcb || ffuse+=( X:x11grab )
+
+ # Outdevs
+ for i in alsa oss sdl ; do
+ use ${i} || myconf+=( --disable-outdev=${i} )
+ done
+
+ # Decoders
+ use amr && myconf+=( --enable-version3 )
+ use fdk && use gpl && myconf+=( --enable-nonfree )
+
+ for i in "${ffuse[@]#+}" ; do
+ myconf+=( $(use_enable ${i%:*} ${i#*:}) )
+ done
+
+ # (temporarily) disable non-multilib deps
+ if ! multilib_is_native_abi; then
+ for i in frei0r ; do
+ myconf+=( --disable-${i} )
+ done
+ fi
+
+ # CPU features
+ for i in ${CPU_FEATURES_MAP} ; do
+ if [ "$(tc-arch)" = "${i%:*}" ] ; then
+ local var="${i#*:}_CPU_FEATURES[@]"
+ for j in ${!var} ; do
+ use ${j%:*} || myconf+=( --disable-${j#*:} )
+ done
+ fi
+ done
+
+ if use pic ; then
+ myconf+=( --enable-pic )
+ # disable asm code if PIC is required
+ # as the provided asm decidedly is not PIC for x86.
+ [[ ${ABI} == x86 ]] && myconf+=( --disable-asm )
+ fi
+ [[ ${ABI} == x32 ]] && myconf+=( --disable-asm ) #427004
+
+ # Try to get cpu type based on CFLAGS.
+ # Bug #172723
+ # We need to do this so that features of that CPU will be better used
+ # If they contain an unknown CPU it will not hurt since ffmpeg's configure
+ # will just ignore it.
+ for i in $(get-flag mcpu) $(get-flag mtune) $(get-flag march) ; do
+ [[ ${i} = native ]] && i="host" # bug #273421
+ myconf+=( --cpu=${i} )
+ break
+ done
+
+ # Mandatory configuration
+ myconf=(
+ --enable-avfilter
+ --enable-avresample
+ --disable-stripping
+ "${myconf[@]}"
+ )
+
+ # cross compile support
+ if tc-is-cross-compiler ; then
+ myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- )
+ case ${CHOST} in
+ *freebsd*)
+ myconf+=( --target-os=freebsd )
+ ;;
+ mingw32*)
+ myconf+=( --target-os=mingw32 )
+ ;;
+ *linux*)
+ myconf+=( --target-os=linux )
+ ;;
+ esac
+ fi
+
+ set -- "${S}/configure" \
+ --prefix="${EPREFIX}/usr" \
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \
+ --shlibdir="${EPREFIX}/usr/$(get_libdir)" \
+ --mandir="${EPREFIX}/usr/share/man" \
+ --enable-shared \
+ --cc="$(tc-getCC)" \
+ --cxx="$(tc-getCXX)" \
+ --ar="$(tc-getAR)" \
+ --optflags=" " \
+ $(use_enable static-libs static) \
+ "${myconf[@]}"
+ echo "${@}"
+ "${@}" || die
+}
+
+multilib_src_compile() {
+ emake V=1
+
+ if multilib_is_native_abi; then
+ for i in "${FFTOOLS[@]}" ; do
+ if use fftools_${i} ; then
+ emake V=1 tools/${i}
+ fi
+ done
+ fi
+}
+
+multilib_src_install() {
+ emake V=1 DESTDIR="${D}" install install-man
+
+ if multilib_is_native_abi; then
+ for i in "${FFTOOLS[@]}" ; do
+ if use fftools_${i} ; then
+ dobin tools/${i}
+ fi
+ done
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc Changelog README.md CREDITS doc/*.txt doc/APIchanges
+ [ -f "RELEASE_NOTES" ] && dodoc "RELEASE_NOTES"
+ use doc && dohtml -r doc/*
+ if use examples ; then
+ dodoc -r doc/examples
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+}
+
+multilib_src_test() {
+ LD_LIBRARY_PATH="${BUILD_DIR}/libpostproc:${BUILD_DIR}/libswscale:${BUILD_DIR}/libswresample:${BUILD_DIR}/libavcodec:${BUILD_DIR}/libavdevice:${BUILD_DIR}/libavfilter:${BUILD_DIR}/libavformat:${BUILD_DIR}/libavutil:${BUILD_DIR}/libavresample" \
+ emake V=1 fate
+}
diff --git a/media-video/ffmpeg/ffmpeg-9999.ebuild b/media-video/ffmpeg/ffmpeg-9999.ebuild
new file mode 100644
index 000000000000..ca8ee9ff8c25
--- /dev/null
+++ b/media-video/ffmpeg/ffmpeg-9999.ebuild
@@ -0,0 +1,452 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+# Subslot: libavutil major.libavcodec major.libavformat major
+# Since FFmpeg ships several libraries, subslot is kind of limited here.
+# Most consumers will use those three libraries, if a "less used" library
+# changes its soname, consumers will have to be rebuilt the old way
+# (preserve-libs).
+# If, for example, a package does not link to libavformat and only libavformat
+# changes its ABI then this package will be rebuilt needlessly. Hence, such a
+# package is free _not_ to := depend on FFmpeg but I would strongly encourage
+# doing so since such a case is unlikely.
+FFMPEG_SUBSLOT=54.56.56
+
+SCM=""
+if [ "${PV#9999}" != "${PV}" ] ; then
+ SCM="git-2"
+ EGIT_REPO_URI="git://source.ffmpeg.org/ffmpeg.git"
+fi
+
+inherit eutils flag-o-matic multilib multilib-minimal toolchain-funcs ${SCM}
+
+DESCRIPTION="Complete solution to record, convert and stream audio and video. Includes libavcodec"
+HOMEPAGE="http://ffmpeg.org/"
+if [ "${PV#9999}" != "${PV}" ] ; then
+ SRC_URI=""
+elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot
+ SRC_URI="mirror://gentoo/${P}.tar.bz2"
+else # Release
+ SRC_URI="http://ffmpeg.org/releases/${P/_/-}.tar.bz2"
+fi
+FFMPEG_REVISION="${PV#*_p}"
+
+SLOT="0/${FFMPEG_SUBSLOT}"
+LICENSE="
+ !gpl? ( LGPL-2.1 )
+ gpl? ( GPL-2 )
+ amr? (
+ gpl? ( GPL-3 )
+ !gpl? ( LGPL-3 )
+ )
+ encode? (
+ aac? (
+ gpl? ( GPL-3 )
+ !gpl? ( LGPL-3 )
+ )
+ amrenc? (
+ gpl? ( GPL-3 )
+ !gpl? ( LGPL-3 )
+ )
+ )
+ samba? ( GPL-3 )
+"
+if [ "${PV#9999}" = "${PV}" ] ; then
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
+fi
+
+# Options to use as use_enable in the foo[:bar] form.
+# This will feed configure with $(use_enable foo bar)
+# or $(use_enable foo foo) if no :bar is set.
+# foo is added to IUSE.
+FFMPEG_FLAG_MAP=(
+ +bzip2:bzlib cpudetection:runtime-cpudetect debug doc gnutls +gpl
+ +hardcoded-tables +iconv lzma +network openssl +postproc
+ samba:libsmbclient sdl:ffplay vaapi vdpau X:xlib xcb:libxcb
+ xcb:libxcb-shm xcb:libxcb-xfixes +zlib
+ # libavdevice options
+ cdio:libcdio iec61883:libiec61883 ieee1394:libdc1394 libcaca openal
+ opengl
+ # indevs
+ libv4l:libv4l2 pulseaudio:libpulse
+ # decoders
+ amr:libopencore-amrwb amr:libopencore-amrnb fdk:libfdk-aac
+ jpeg2k:libopenjpeg bluray:libbluray celt:libcelt gme:libgme gsm:libgsm
+ modplug:libmodplug opus:libopus quvi:libquvi rtmp:librtmp ssh:libssh
+ schroedinger:libschroedinger speex:libspeex vorbis:libvorbis vpx:libvpx
+ zvbi:libzvbi
+ # libavfilter options
+ bs2b:libbs2b flite:libflite frei0r fribidi:libfribidi fontconfig ladspa
+ libass truetype:libfreetype
+ # libswresample options
+ libsoxr
+ # Threads; we only support pthread for now but ffmpeg supports more
+ +threads:pthreads
+)
+
+# Same as above but for encoders, i.e. they do something only with USE=encode.
+FFMPEG_ENCODER_FLAG_MAP=(
+ aac:libvo-aacenc amrenc:libvo-amrwbenc mp3:libmp3lame
+ aacplus:libaacplus faac:libfaac snappy:libsnappy theora:libtheora
+ twolame:libtwolame wavpack:libwavpack webp:libwebp x264:libx264 x265:libx265
+ xvid:libxvid
+)
+
+IUSE="
+ alsa +encode examples jack oss pic static-libs test v4l
+ ${FFMPEG_FLAG_MAP[@]%:*}
+ ${FFMPEG_ENCODER_FLAG_MAP[@]%:*}
+"
+
+# Strings for CPU features in the useflag[:configure_option] form
+# if :configure_option isn't set, it will use 'useflag' as configure option
+ARM_CPU_FEATURES=( armv5te armv6 armv6t2 neon armvfp:vfp )
+MIPS_CPU_FEATURES=( mipsdspr1 mipsdspr2 mipsfpu )
+PPC_CPU_FEATURES=( altivec )
+X86_CPU_FEATURES_RAW=( 3dnow:amd3dnow 3dnowext:amd3dnowext avx:avx avx2:avx2 fma3:fma3 fma4:fma4 mmx:mmx mmxext:mmxext sse:sse sse2:sse2 sse3:sse3 ssse3:ssse3 sse4_1:sse4 sse4_2:sse42 xop:xop )
+X86_CPU_FEATURES=( ${X86_CPU_FEATURES_RAW[@]/#/cpu_flags_x86_} )
+X86_CPU_REQUIRED_USE="
+ cpu_flags_x86_avx2? ( cpu_flags_x86_avx )
+ cpu_flags_x86_fma4? ( cpu_flags_x86_avx )
+ cpu_flags_x86_fma3? ( cpu_flags_x86_avx )
+ cpu_flags_x86_xop? ( cpu_flags_x86_avx )
+ cpu_flags_x86_avx? ( cpu_flags_x86_sse4_2 )
+ cpu_flags_x86_sse4_2? ( cpu_flags_x86_sse4_1 )
+ cpu_flags_x86_sse4_1? ( cpu_flags_x86_ssse3 )
+ cpu_flags_x86_ssse3? ( cpu_flags_x86_sse3 )
+ cpu_flags_x86_sse3? ( cpu_flags_x86_sse2 )
+ cpu_flags_x86_sse2? ( cpu_flags_x86_sse )
+ cpu_flags_x86_sse? ( cpu_flags_x86_mmxext )
+ cpu_flags_x86_mmxext? ( cpu_flags_x86_mmx )
+ cpu_flags_x86_3dnowext? ( cpu_flags_x86_3dnow )
+ cpu_flags_x86_3dnow? ( cpu_flags_x86_mmx )
+"
+
+IUSE="${IUSE}
+ ${ARM_CPU_FEATURES[@]%:*}
+ ${MIPS_CPU_FEATURES[@]%:*}
+ ${PPC_CPU_FEATURES[@]%:*}
+ ${X86_CPU_FEATURES[@]%:*}
+"
+
+CPU_REQUIRED_USE="
+ ${X86_CPU_REQUIRED_USE}
+"
+
+# "$(tc-arch):XXX" form where XXX_CPU_FEATURES are the cpu features that apply to
+# $(tc-arch).
+CPU_FEATURES_MAP="
+ arm:ARM
+ arm64:ARM
+ mips:MIPS
+ ppc:PPC
+ ppc64:PPC
+ x86:X86
+ amd64:X86
+"
+
+FFTOOLS=( aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt graph2dot ismindex pktdumper qt-faststart trasher )
+IUSE="${IUSE} ${FFTOOLS[@]/#/+fftools_}"
+
+RDEPEND="
+ alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
+ amr? ( >=media-libs/opencore-amr-0.1.3-r1[${MULTILIB_USEDEP}] )
+ bluray? ( >=media-libs/libbluray-0.3.0-r1[${MULTILIB_USEDEP}] )
+ bs2b? ( >=media-libs/libbs2b-3.1.0-r1[${MULTILIB_USEDEP}] )
+ bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
+ cdio? ( >=dev-libs/libcdio-paranoia-0.90_p1-r1[${MULTILIB_USEDEP}] )
+ celt? ( >=media-libs/celt-0.11.1-r1[${MULTILIB_USEDEP}] )
+ encode? (
+ aac? ( >=media-libs/vo-aacenc-0.1.3[${MULTILIB_USEDEP}] )
+ aacplus? ( >=media-libs/libaacplus-2.0.2-r1[${MULTILIB_USEDEP}] )
+ amrenc? ( >=media-libs/vo-amrwbenc-0.1.2-r1[${MULTILIB_USEDEP}] )
+ faac? ( >=media-libs/faac-1.28-r3[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/lame-3.99.5-r1[${MULTILIB_USEDEP}] )
+ snappy? ( >=app-arch/snappy-1.1.2-r1[${MULTILIB_USEDEP}] )
+ theora? (
+ >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}]
+ >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
+ )
+ twolame? ( >=media-sound/twolame-0.3.13-r1[${MULTILIB_USEDEP}] )
+ wavpack? ( >=media-sound/wavpack-4.60.1-r1[${MULTILIB_USEDEP}] )
+ webp? ( >=media-libs/libwebp-0.3.0[${MULTILIB_USEDEP}] )
+ x264? ( >=media-libs/x264-0.0.20130506:=[${MULTILIB_USEDEP}] )
+ x265? ( >=media-libs/x265-1.6:=[${MULTILIB_USEDEP}] )
+ xvid? ( >=media-libs/xvid-1.3.2-r1[${MULTILIB_USEDEP}] )
+ )
+ fdk? ( >=media-libs/fdk-aac-0.1.3:=[${MULTILIB_USEDEP}] )
+ flite? ( >=app-accessibility/flite-1.4-r4[${MULTILIB_USEDEP}] )
+ fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] )
+ frei0r? ( media-plugins/frei0r-plugins )
+ fribidi? ( >=dev-libs/fribidi-0.19.6[${MULTILIB_USEDEP}] )
+ gme? ( >=media-libs/game-music-emu-0.6.0[${MULTILIB_USEDEP}] )
+ gnutls? ( >=net-libs/gnutls-2.12.23-r6[${MULTILIB_USEDEP}] )
+ gsm? ( >=media-sound/gsm-1.0.13-r1[${MULTILIB_USEDEP}] )
+ iconv? ( >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}] )
+ iec61883? (
+ >=media-libs/libiec61883-1.2.0-r1[${MULTILIB_USEDEP}]
+ >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}]
+ >=sys-libs/libavc1394-0.5.4-r1[${MULTILIB_USEDEP}]
+ )
+ ieee1394? (
+ >=media-libs/libdc1394-2.2.1[${MULTILIB_USEDEP}]
+ >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}]
+ )
+ jack? ( >=media-sound/jack-audio-connection-kit-0.121.3-r1[${MULTILIB_USEDEP}] )
+ jpeg2k? ( >=media-libs/openjpeg-1.5.0:0[${MULTILIB_USEDEP}] )
+ libass? ( >=media-libs/libass-0.10.2[${MULTILIB_USEDEP}] )
+ libcaca? ( >=media-libs/libcaca-0.99_beta18-r1[${MULTILIB_USEDEP}] )
+ libsoxr? ( >=media-libs/soxr-0.1.0[${MULTILIB_USEDEP}] )
+ libv4l? ( >=media-libs/libv4l-0.9.5[${MULTILIB_USEDEP}] )
+ lzma? ( >=app-arch/xz-utils-5.0.5-r1[${MULTILIB_USEDEP}] )
+ modplug? ( >=media-libs/libmodplug-0.8.8.4-r1[${MULTILIB_USEDEP}] )
+ openal? ( >=media-libs/openal-1.15.1[${MULTILIB_USEDEP}] )
+ opengl? ( >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}] )
+ openssl? ( >=dev-libs/openssl-1.0.1h-r2[${MULTILIB_USEDEP}] )
+ opus? ( >=media-libs/opus-1.0.2-r2[${MULTILIB_USEDEP}] )
+ pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] )
+ quvi? ( media-libs/libquvi:0.4[${MULTILIB_USEDEP}] )
+ rtmp? ( >=media-video/rtmpdump-2.4_p20131018[${MULTILIB_USEDEP}] )
+ samba? ( >=net-fs/samba-3.6.23-r1[${MULTILIB_USEDEP}] )
+ schroedinger? ( >=media-libs/schroedinger-1.0.11-r1[${MULTILIB_USEDEP}] )
+ sdl? ( >=media-libs/libsdl-1.2.15-r4[sound,video,${MULTILIB_USEDEP}] )
+ speex? ( >=media-libs/speex-1.2_rc1-r1[${MULTILIB_USEDEP}] )
+ ssh? ( >=net-libs/libssh-0.5.5[${MULTILIB_USEDEP}] )
+ truetype? ( >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}] )
+ vaapi? ( >=x11-libs/libva-1.2.1-r1[${MULTILIB_USEDEP}] )
+ vdpau? ( >=x11-libs/libvdpau-0.7[${MULTILIB_USEDEP}] )
+ vorbis? (
+ >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}]
+ >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
+ )
+ vpx? ( >=media-libs/libvpx-1.2.0_pre20130625[${MULTILIB_USEDEP}] )
+ X? (
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
+ !xcb? ( >=x11-libs/libXfixes-5.0.1[${MULTILIB_USEDEP}] )
+ >=x11-libs/libXv-1.0.10[${MULTILIB_USEDEP}]
+ )
+ xcb? ( >=x11-libs/libxcb-1.4[${MULTILIB_USEDEP}] )
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
+ zvbi? ( >=media-libs/zvbi-0.2.35[${MULTILIB_USEDEP}] )
+ !media-video/qt-faststart
+ postproc? ( !media-libs/libpostproc )
+"
+
+DEPEND="${RDEPEND}
+ >=sys-devel/make-3.81
+ doc? ( app-text/texi2html )
+ fontconfig? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ gnutls? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ ieee1394? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ ladspa? ( >=media-libs/ladspa-sdk-1.13-r2[${MULTILIB_USEDEP}] )
+ libv4l? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ cpu_flags_x86_mmx? ( >=dev-lang/yasm-1.2 )
+ rtmp? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ schroedinger? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ test? ( net-misc/wget sys-devel/bc )
+ truetype? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ v4l? ( sys-kernel/linux-headers )
+"
+
+RDEPEND="${RDEPEND}
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+
+# Code requiring FFmpeg to be built under gpl license
+GPL_REQUIRED_USE="
+ postproc? ( gpl )
+ frei0r? ( gpl )
+ cdio? ( gpl )
+ samba? ( gpl )
+ zvbi? ( gpl )
+ encode? (
+ x264? ( gpl )
+ x265? ( gpl )
+ xvid? ( gpl )
+ X? ( !xcb? ( gpl ) )
+ )
+"
+REQUIRED_USE="
+ libv4l? ( v4l )
+ fftools_cws2fws? ( zlib )
+ test? ( encode )
+ ${GPL_REQUIRED_USE}
+ ${CPU_REQUIRED_USE}"
+RESTRICT="
+ encode? ( faac? ( bindist ) aacplus? ( bindist ) )
+ gpl? ( openssl? ( bindist ) fdk? ( bindist ) )
+"
+
+S=${WORKDIR}/${P/_/-}
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/libavutil/avconfig.h
+)
+
+src_prepare() {
+ if [[ "${PV%_p*}" != "${PV}" ]] ; then # Snapshot
+ export revision=git-N-${FFMPEG_REVISION}
+ fi
+ epatch_user
+}
+
+multilib_src_configure() {
+ local myconf=( ${EXTRA_FFMPEG_CONF} )
+
+ local ffuse=( "${FFMPEG_FLAG_MAP[@]}" )
+ use openssl && use gpl && myconf+=( --enable-nonfree )
+ use samba && myconf+=( --enable-version3 )
+
+ # Encoders
+ if use encode ; then
+ ffuse+=( "${FFMPEG_ENCODER_FLAG_MAP[@]}" )
+
+ # Licensing.
+ if use aac || use amrenc ; then
+ myconf+=( --enable-version3 )
+ fi
+ if use aacplus || use faac ; then
+ myconf+=( --enable-nonfree )
+ fi
+ else
+ myconf+=( --disable-encoders )
+ fi
+
+ # Indevs
+ use v4l || myconf+=( --disable-indev=v4l2 --disable-outdev=v4l2 )
+ for i in alsa oss jack ; do
+ use ${i} || myconf+=( --disable-indev=${i} )
+ done
+ use xcb || ffuse+=( X:x11grab )
+
+ # Outdevs
+ for i in alsa oss sdl ; do
+ use ${i} || myconf+=( --disable-outdev=${i} )
+ done
+
+ # Decoders
+ use amr && myconf+=( --enable-version3 )
+ use fdk && use gpl && myconf+=( --enable-nonfree )
+
+ for i in "${ffuse[@]#+}" ; do
+ myconf+=( $(use_enable ${i%:*} ${i#*:}) )
+ done
+
+ # (temporarily) disable non-multilib deps
+ if ! multilib_is_native_abi; then
+ for i in frei0r ; do
+ myconf+=( --disable-${i} )
+ done
+ fi
+
+ # CPU features
+ for i in ${CPU_FEATURES_MAP} ; do
+ if [ "$(tc-arch)" = "${i%:*}" ] ; then
+ local var="${i#*:}_CPU_FEATURES[@]"
+ for j in ${!var} ; do
+ use ${j%:*} || myconf+=( --disable-${j#*:} )
+ done
+ fi
+ done
+
+ if use pic ; then
+ myconf+=( --enable-pic )
+ # disable asm code if PIC is required
+ # as the provided asm decidedly is not PIC for x86.
+ [[ ${ABI} == x86 ]] && myconf+=( --disable-asm )
+ fi
+ [[ ${ABI} == x32 ]] && myconf+=( --disable-asm ) #427004
+
+ # Try to get cpu type based on CFLAGS.
+ # Bug #172723
+ # We need to do this so that features of that CPU will be better used
+ # If they contain an unknown CPU it will not hurt since ffmpeg's configure
+ # will just ignore it.
+ for i in $(get-flag mcpu) $(get-flag mtune) $(get-flag march) ; do
+ [[ ${i} = native ]] && i="host" # bug #273421
+ myconf+=( --cpu=${i} )
+ break
+ done
+
+ # Mandatory configuration
+ myconf=(
+ --enable-avfilter
+ --enable-avresample
+ --disable-stripping
+ "${myconf[@]}"
+ )
+
+ # cross compile support
+ if tc-is-cross-compiler ; then
+ myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- )
+ case ${CHOST} in
+ *freebsd*)
+ myconf+=( --target-os=freebsd )
+ ;;
+ mingw32*)
+ myconf+=( --target-os=mingw32 )
+ ;;
+ *linux*)
+ myconf+=( --target-os=linux )
+ ;;
+ esac
+ fi
+
+ set -- "${S}/configure" \
+ --prefix="${EPREFIX}/usr" \
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \
+ --shlibdir="${EPREFIX}/usr/$(get_libdir)" \
+ --mandir="${EPREFIX}/usr/share/man" \
+ --enable-shared \
+ --cc="$(tc-getCC)" \
+ --cxx="$(tc-getCXX)" \
+ --ar="$(tc-getAR)" \
+ --optflags=" " \
+ $(use_enable static-libs static) \
+ "${myconf[@]}"
+ echo "${@}"
+ "${@}" || die
+}
+
+multilib_src_compile() {
+ emake V=1
+
+ if multilib_is_native_abi; then
+ for i in "${FFTOOLS[@]}" ; do
+ if use fftools_${i} ; then
+ emake V=1 tools/${i}
+ fi
+ done
+ fi
+}
+
+multilib_src_install() {
+ emake V=1 DESTDIR="${D}" install install-man
+
+ if multilib_is_native_abi; then
+ for i in "${FFTOOLS[@]}" ; do
+ if use fftools_${i} ; then
+ dobin tools/${i}
+ fi
+ done
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc Changelog README.md CREDITS doc/*.txt doc/APIchanges
+ [ -f "RELEASE_NOTES" ] && dodoc "RELEASE_NOTES"
+ use doc && dohtml -r doc/*
+ if use examples ; then
+ dodoc -r doc/examples
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+}
+
+multilib_src_test() {
+ LD_LIBRARY_PATH="${BUILD_DIR}/libpostproc:${BUILD_DIR}/libswscale:${BUILD_DIR}/libswresample:${BUILD_DIR}/libavcodec:${BUILD_DIR}/libavdevice:${BUILD_DIR}/libavfilter:${BUILD_DIR}/libavformat:${BUILD_DIR}/libavutil:${BUILD_DIR}/libavresample" \
+ emake V=1 fate
+}
diff --git a/media-video/ffmpeg/metadata.xml b/media-video/ffmpeg/metadata.xml
new file mode 100644
index 000000000000..f5dbd10fdd8a
--- /dev/null
+++ b/media-video/ffmpeg/metadata.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="aacplus">AAC+ encoding via <pkg>media-libs/libaacplus</pkg>.</flag>
+ <flag name="amr">Enables Adaptive Multi-Rate Audio support</flag>
+ <flag name="amrenc">Enables Adaptive Multi-Rate Audio encoding support with <pkg>media-libs/vo-amrwbenc</pkg>.</flag>
+ <flag name="armv5te">Enables optimizations for armv5te processors.</flag>
+ <flag name="armv6">Enables optimizations for armv6 processors.</flag>
+ <flag name="armv6t2">Enables optimizations for armv6t2 processors.</flag>
+ <flag name="armvfp">Enables VFP optimizations for ARM processors.</flag>
+ <flag name="bluray">Enable playback of Blu-ray filesystems</flag>
+ <flag name="bs2b">Enables <pkg>media-libs/libbs2b</pkg> based Bauer stereo-to-binaural filter.</flag>
+ <flag name="cdio">Enables audio CD grabbing with <pkg>dev-libs/libcdio</pkg>.</flag>
+ <flag name="celt">Adds Xiph CELT audio decoding support via <pkg>media-libs/celt</pkg></flag>
+ <flag name="cpudetection">Enables runtime CPU detection (useful for bindist, compatibility on other CPUs)</flag>
+ <flag name="faac">Use external faac library for AAC encoding</flag>
+ <flag name="fdk">Use external fdk-aac library for AAC encoding</flag>
+ <flag name="flite">Adds a text-to-speech filter based on <pkg>app-accessibility/flite</pkg>.</flag>
+ <flag name="frei0r">Enable frei0r wrapping in libavfilter</flag>
+ <flag name="fribidi">Enables fribidi support in the drawtext filter.</flag>
+ <flag name="gme">Enables support for <pkg>media-libs/game-music-emu</pkg> for playing various video game music formats.</flag>
+ <flag name="gpl">Build GPL code. Should be enabled unless you require LGPL binaries.</flag>
+ <flag name="hardcoded-tables">Use pre-calculated tables rather than calculating them on the fly.</flag>
+ <flag name="iec61883"> Support for FireWire DV/HDV input device using <pkg>media-libs/libiec61883</pkg>.</flag>
+ <flag name="libsoxr">Enables audio resampling through <pkg>media-libs/soxr</pkg>.</flag>
+ <flag name="libv4l">Uses <pkg>media-libs/libv4l</pkg> for video4linux instead of direct calls. Adds support for more devices via the userspace library.</flag>
+ <flag name="mipsdspr1">Enables MIPS DSP ASE R1 optimizations.</flag>
+ <flag name="mipsdspr2">Enables MIPS DSP ASE R2 optimizations.</flag>
+ <flag name="mipsfpu">Enables floating point MIPS optimizations.</flag>
+ <flag name="network">Enables network streaming support</flag>
+ <flag name="openssl">Enables <pkg>dev-libs/openssl</pkg> support. Adds support for encrypted network protocols (TLS/HTTPS).</flag>
+ <flag name="opus">Adds (decoding) support for the Opus codec via <pkg>media-libs/opus</pkg>.</flag>
+ <flag name="pic">Force shared libraries to be built as PIC (this is slower)</flag>
+ <flag name="postproc">Build and install libpostproc.</flag>
+ <flag name="quvi">Adds support for playing media from Internet services using the quvi project.</flag>
+ <flag name="rtmp">Enable Real Time Messaging Protocol using librtmp</flag>
+ <flag name="schroedinger">Enable Dirac video support (an advanced royalty-free video compression format) via libschroedinger (high-speed implementation in C of the Dirac codec).</flag>
+ <flag name="snappy">Enable <pkg>app-arch/snappy</pkg> support. Required for e.g. Vidvox Hap encoder.</flag>
+ <flag name="ssh">Enable SSH/sftp support via <pkg>net-libs/libssh</pkg>.</flag>
+ <flag name="twolame">Enables MP2 encoding via <pkg>media-sound/twolame</pkg> as an alternative to the internal encoder.</flag>
+ <flag name="vpx">Enables vp8 codec support using libvpx: Decoding vp8 does not require this to be enabled but libvpx can also be used for decoding; encoding vp8 requires this useflag to be enabled though.</flag>
+ <flag name="webp">Enables WebP encoding with <pkg>media-libs/libwebp</pkg>.</flag>
+ <flag name="x265">Enables HEVC encoding with <pkg>media-libs/x265</pkg>.</flag>
+ <flag name="zvbi">Enables <pkg>media-libs/zvbi</pkg> based teletext decoder.</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-video/ffmpeg2theora/Manifest b/media-video/ffmpeg2theora/Manifest
new file mode 100644
index 000000000000..ef0a9fd8f7b5
--- /dev/null
+++ b/media-video/ffmpeg2theora/Manifest
@@ -0,0 +1 @@
+DIST ffmpeg2theora-0.29.tar.bz2 90143 SHA256 214110e2a5afdd8ff8e0be18152e893dbff5dabc1ae1d1124e64d9f93eae946d SHA512 5e5cf1dbc6807a15b3a3e8526955ef341357b6a3106a6449a54b5dc09c652a9df34b5e93c9cbf05e1efad87542364cb8335e173a59a184aa2ff38ec4b536a725 WHIRLPOOL d093a0b0a5d90f6b9a3d959ff662e5e8c9f8ca36d51122f0c293d2189493bdf6daa710fa94be0fdca0d63166c3102dba82da1e533e1876e62f3ed4ec47b65bea
diff --git a/media-video/ffmpeg2theora/ffmpeg2theora-0.29-r1.ebuild b/media-video/ffmpeg2theora/ffmpeg2theora-0.29-r1.ebuild
new file mode 100644
index 000000000000..0296d485629d
--- /dev/null
+++ b/media-video/ffmpeg2theora/ffmpeg2theora-0.29-r1.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 toolchain-funcs scons-utils
+
+DESCRIPTION="A simple converter to create Ogg Theora files"
+HOMEPAGE="http://www.v2v.cc/~j/ffmpeg2theora/"
+SRC_URI="http://www.v2v.cc/~j/${PN}/downloads/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~ppc64 ~sparc x86 ~x86-fbsd"
+IUSE="kate"
+
+RDEPEND="
+ || ( media-video/ffmpeg:0 media-libs/libpostproc <media-video/libav-0.8.2-r1 )
+ >=virtual/ffmpeg-0.10
+ >=media-libs/libvorbis-1.1
+ >=media-libs/libogg-1.1
+ >=media-libs/libtheora-1.1[encode]
+ kate? ( >=media-libs/libkate-0.3.7 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-swr.patch \
+ "${FILESDIR}"/${P}-ffmpeg2.patch \
+ "${FILESDIR}"/${P}-underlinking.patch
+}
+
+src_configure() {
+ myesconsargs=(
+ APPEND_CCFLAGS="${CFLAGS}"
+ APPEND_LINKFLAGS="${LDFLAGS}"
+ prefix=/usr
+ mandir=PREFIX/share/man
+ libkate=$(usex kate 1 0)
+ )
+}
+
+src_compile() {
+ escons
+}
+
+src_install() {
+ escons destdir="${D}" install
+ dodoc AUTHORS ChangeLog README subtitles.txt TODO
+}
diff --git a/media-video/ffmpeg2theora/ffmpeg2theora-0.29-r2.ebuild b/media-video/ffmpeg2theora/ffmpeg2theora-0.29-r2.ebuild
new file mode 100644
index 000000000000..5e58da482b73
--- /dev/null
+++ b/media-video/ffmpeg2theora/ffmpeg2theora-0.29-r2.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs scons-utils
+
+DESCRIPTION="A simple converter to create Ogg Theora files"
+HOMEPAGE="http://www.v2v.cc/~j/ffmpeg2theora/"
+SRC_URI="http://www.v2v.cc/~j/${PN}/downloads/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="kate libav"
+
+RDEPEND="
+ !libav? ( media-video/ffmpeg:0= )
+ libav? ( media-libs/libpostproc:0=
+ media-video/libav:0= )
+ >=media-libs/libvorbis-1.1
+ >=media-libs/libogg-1.1
+ >=media-libs/libtheora-1.1[encode]
+ kate? ( >=media-libs/libkate-0.3.7 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-swr.patch \
+ "${FILESDIR}"/${P}-ffmpeg2.patch \
+ "${FILESDIR}"/${P}-underlinking.patch
+}
+
+src_configure() {
+ myesconsargs=(
+ APPEND_CCFLAGS="${CFLAGS}"
+ APPEND_LINKFLAGS="${LDFLAGS}"
+ prefix=/usr
+ mandir=PREFIX/share/man
+ libkate=$(usex kate 1 0)
+ )
+}
+
+src_compile() {
+ escons
+}
+
+src_install() {
+ escons destdir="${D}" install
+ dodoc AUTHORS ChangeLog README subtitles.txt TODO
+}
diff --git a/media-video/ffmpeg2theora/files/ffmpeg2theora-0.29-ffmpeg2.patch b/media-video/ffmpeg2theora/files/ffmpeg2theora-0.29-ffmpeg2.patch
new file mode 100644
index 000000000000..a9ca9042d2f6
--- /dev/null
+++ b/media-video/ffmpeg2theora/files/ffmpeg2theora-0.29-ffmpeg2.patch
@@ -0,0 +1,40 @@
+commit d3435a6a83dc656379de9e6523ecf8d565da6ca6
+Author: Jan Gerber <j@xiph.org>
+Date: Sun May 26 15:25:42 2013 +0200
+
+ don't use deprecated AVCODEC_MAX_AUDIO_FRAME_SIZE
+
+diff --git a/src/ffmpeg2theora.c b/src/ffmpeg2theora.c
+index cde63b9..8bebf28 100644
+--- a/src/ffmpeg2theora.c
++++ b/src/ffmpeg2theora.c
+@@ -47,6 +47,9 @@
+ #include "ffmpeg2theora.h"
+ #include "avinfo.h"
+
++#define MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio
++
++
+ #define LENGTH(x) (sizeof(x) / sizeof(*x))
+
+ enum {
+@@ -1069,8 +1072,8 @@ void ff2theora_output(ff2theora this) {
+ int first = 1;
+ int audio_eos = 0, video_eos = 0, audio_done = 0, video_done = 0;
+ int ret;
+- int16_t *audio_buf=av_malloc(4*AVCODEC_MAX_AUDIO_FRAME_SIZE);
+- int16_t *resampled=av_malloc(4*AVCODEC_MAX_AUDIO_FRAME_SIZE);
++ int16_t *audio_buf=av_malloc(4*MAX_AUDIO_FRAME_SIZE);
++ int16_t *resampled=av_malloc(4*MAX_AUDIO_FRAME_SIZE);
+ int16_t *audio_p=NULL;
+ int no_frames;
+ int no_samples;
+@@ -1531,7 +1534,7 @@ void ff2theora_output(ff2theora this) {
+ while((audio_eos && !audio_done) || avpkt.size > 0 ) {
+ int samples=0;
+ int samples_out=0;
+- int data_size = 4*AVCODEC_MAX_AUDIO_FRAME_SIZE;
++ int data_size = 4*MAX_AUDIO_FRAME_SIZE;
+ int bytes_per_sample = av_get_bytes_per_sample(aenc->sample_fmt);
+
+ if (avpkt.size > 0) {
diff --git a/media-video/ffmpeg2theora/files/ffmpeg2theora-0.29-swr.patch b/media-video/ffmpeg2theora/files/ffmpeg2theora-0.29-swr.patch
new file mode 100644
index 000000000000..b1117a87ea6f
--- /dev/null
+++ b/media-video/ffmpeg2theora/files/ffmpeg2theora-0.29-swr.patch
@@ -0,0 +1,24 @@
+commit a72baecd4dc7b01c0785b481460dde0fbab9a90a
+Author: Jan Gerber <j@xiph.org>
+Date: Fri Nov 23 20:21:54 2012 +0100
+
+ only depend on libswresample for local branch
+
+ libav does not have libswresample so its not in ubuntu.
+
+diff --git a/SConstruct b/SConstruct
+index 90520c3..01d234a 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -152,10 +152,10 @@ if not env.GetOption('clean'):
+ "libavcodec >= 52.30.0",
+ "libpostproc",
+ "libswscale",
+- "libswresample",
+ "libavutil",
+ ]
+ if os.path.exists("./ffmpeg"):
++ FFMPEG_LIBS.append('libswresample')
+ pkg_path = list(set(map(os.path.dirname, glob('./ffmpeg/*/*.pc'))))
+ pkg_path.append(os.environ.get('PKG_CONFIG_PATH', ''))
+ os.environ['PKG_CONFIG_PATH'] = ':'.join(pkg_path)
diff --git a/media-video/ffmpeg2theora/files/ffmpeg2theora-0.29-underlinking.patch b/media-video/ffmpeg2theora/files/ffmpeg2theora-0.29-underlinking.patch
new file mode 100644
index 000000000000..dc877603913a
--- /dev/null
+++ b/media-video/ffmpeg2theora/files/ffmpeg2theora-0.29-underlinking.patch
@@ -0,0 +1,21 @@
+For example, pow() from mathlib is used directly in src/ffmpeg2theora.c:
+
+<snip>
+v = pow(v, g) * 255.0; // mplayer's vf_eq2.c multiplies with 256 here, strange...
+</snip>
+
+For build failure and log, see Gentoo bug #504698
+
+--- SConstruct
++++ SConstruct
+@@ -206,9 +206,8 @@
+ if env['crossmingw']:
+ env.Append(CCFLAGS=['-Wl,-subsystem,windows'])
+ env.Append(LIBS=['m'])
+- elif env['static']:
+- env.Append(LIBS=['m', 'dl'])
+
++ env.Append(LIBS=['m', 'dl'])
+
+ env = conf.Finish()
+
diff --git a/media-video/ffmpeg2theora/metadata.xml b/media-video/ffmpeg2theora/metadata.xml
new file mode 100644
index 000000000000..6c1f70ed2108
--- /dev/null
+++ b/media-video/ffmpeg2theora/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="kate">Adds support for Ogg Kate subtitles via libkate.</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-video/ffmpegthumbnailer/Manifest b/media-video/ffmpegthumbnailer/Manifest
new file mode 100644
index 000000000000..a036401d12af
--- /dev/null
+++ b/media-video/ffmpegthumbnailer/Manifest
@@ -0,0 +1,2 @@
+DIST ffmpegthumbnailer-2.0.10.tar.bz2 2154028 SHA256 a3022c86aa3e704849e424147bd4a319867e18930d66a4a4c93c0baefdd1fc60 SHA512 1fcfcfe9457a3e3e70a749f3234f79d080fbbb40d4d1f65b84e1c46a7051c75368afaffb25a39b43f8e205ffdbc2e156e6fb5848514fce4a1a3f5222458c1b9d WHIRLPOOL fe60513d2a26db622d02f6f38f04009590337415aeb02b441757949e4402cdfeb33d37cb295720f8dd66ebae9dcfdba9304c88256ccda4800e015fa40650151b
+DIST ffmpegthumbnailer-2.0.8.tar.gz 367186 SHA256 2c8bbefa838d38ea42fc8ac78258cda36865d974c991624b14cffdb92a3bc68b SHA512 6062d4b8f5326bde96c8c6dceaac52e1fabcec93f0a0ee4be19e203050e6c80426a006076a27e4a12582e05daceebd37beef008154fdd92a87f365fdff68ca83 WHIRLPOOL 6b0bd942777515f690f212df5616dffc4fc1c6e0e0e5be67128b376347b18d75eb144d25e9f8ac841b41099703092af5784edc31f34d7dbf81b742d678233e79
diff --git a/media-video/ffmpegthumbnailer/ffmpegthumbnailer-2.0.10.ebuild b/media-video/ffmpegthumbnailer/ffmpegthumbnailer-2.0.10.ebuild
new file mode 100644
index 000000000000..96de427c9ba5
--- /dev/null
+++ b/media-video/ffmpegthumbnailer/ffmpegthumbnailer-2.0.10.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils
+
+DESCRIPTION="Lightweight video thumbnailer that can be used by file managers"
+HOMEPAGE="https://github.com/dirkvdb/ffmpegthumbnailer"
+SRC_URI="https://github.com/dirkvdb/${PN}/releases/download/${PV}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="gnome gtk jpeg libav png test"
+
+RDEPEND="
+ gtk? ( dev-libs/glib:2= )
+ jpeg? ( virtual/jpeg:0= )
+ !libav? ( >=media-video/ffmpeg-2.7:0= )
+ libav? ( >=media-video/libav-11:0= )
+ png? ( media-libs/libpng:0= )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+"
+REQUIRED_USE="gnome? ( gtk )"
+
+PATCHES=(
+ "${FILESDIR}/${P}-config-summary.patch"
+ "${FILESDIR}/${P}-installdirs.patch"
+ "${FILESDIR}/${P}-set-locale.patch"
+)
+
+DOCS=( AUTHORS ChangeLog README.md )
+
+src_prepare() {
+ rm -rf out* || die
+
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DENABLE_GIO=$(usex gtk)
+ -DENABLE_TESTS=$(usex test)
+ -DENABLE_THUMBNAILER=$(usex gnome)
+ -DHAVE_JPEG=$(usex jpeg)
+ -DHAVE_PNG=$(usex png)
+ )
+ cmake-utils_src_configure
+}
diff --git a/media-video/ffmpegthumbnailer/ffmpegthumbnailer-2.0.8.ebuild b/media-video/ffmpegthumbnailer/ffmpegthumbnailer-2.0.8.ebuild
new file mode 100644
index 000000000000..1e473cdf2867
--- /dev/null
+++ b/media-video/ffmpegthumbnailer/ffmpegthumbnailer-2.0.8.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils libtool
+
+DESCRIPTION="Lightweight video thumbnailer that can be used by file managers"
+HOMEPAGE="http://code.google.com/p/ffmpegthumbnailer/"
+SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd"
+IUSE="gnome gtk jpeg png"
+
+COMMON_DEPEND=">=virtual/ffmpeg-0.10.2
+ png? ( media-libs/libpng:0= )
+ jpeg? ( virtual/jpeg )"
+RDEPEND="${COMMON_DEPEND}
+ gtk? ( >=dev-libs/glib-2.30 )"
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig"
+REQUIRED_USE="gnome? ( gtk )"
+
+DOCS="AUTHORS ChangeLog README"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-memcpy.patch
+ elibtoolize
+}
+
+src_configure() {
+ econf \
+ --disable-static \
+ $(use_enable png) \
+ $(use_enable jpeg) \
+ $(use_enable gtk gio) \
+ $(use_enable gnome thumbnailer)
+}
+
+src_install() {
+ default
+ prune_libtool_files --all
+}
diff --git a/media-video/ffmpegthumbnailer/files/ffmpegthumbnailer-2.0.10-config-summary.patch b/media-video/ffmpegthumbnailer/files/ffmpegthumbnailer-2.0.10-config-summary.patch
new file mode 100644
index 000000000000..608494559217
--- /dev/null
+++ b/media-video/ffmpegthumbnailer/files/ffmpegthumbnailer-2.0.10-config-summary.patch
@@ -0,0 +1,23 @@
+From 9c2a5fe997a6d8b00bef49eabb7bc49840882ec6 Mon Sep 17 00:00:00 2001
+From: Dirk Vanden Boer <dirk.vdb@gmail.com>
+Date: Wed, 29 Apr 2015 20:19:58 +0200
+Subject: [PATCH] Fixed configuration summary
+
+---
+ .travis.yml | 1 +
+ CMakeLists.txt | 2 +-
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 22803d9..6b6e515 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -239,7 +239,7 @@ ELSE ()
+ MESSAGE(STATUS "register thumbnailer : disabled")
+ ENDIF ()
+
+-IF (ENABLE_UNITTEST)
++IF (ENABLE_TESTS)
+ MESSAGE(STATUS "unittests : enabled")
+ ELSE ()
+ MESSAGE(STATUS "unittests : disabled")
diff --git a/media-video/ffmpegthumbnailer/files/ffmpegthumbnailer-2.0.10-installdirs.patch b/media-video/ffmpegthumbnailer/files/ffmpegthumbnailer-2.0.10-installdirs.patch
new file mode 100644
index 000000000000..33a96b85735d
--- /dev/null
+++ b/media-video/ffmpegthumbnailer/files/ffmpegthumbnailer-2.0.10-installdirs.patch
@@ -0,0 +1,47 @@
+From 621274d694dee1f8c92f5db99a5cff98e82c6bd4 Mon Sep 17 00:00:00 2001
+From: Dirk Vanden Boer <dirk.vdb@gmail.com>
+Date: Sat, 2 May 2015 09:33:34 +0200
+Subject: [PATCH] Use proper gnu installation dirs (Thanks to Vallimar)
+
+---
+ CMakeLists.txt | 15 ++++++++-------
+ ChangeLog | 1 +
+ 2 files changed, 9 insertions(+), 7 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 6b6e515..badb7cf 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -25,6 +25,7 @@ ENDIF ()
+
+ PROJECT(${PACKAGE})
+ INCLUDE(CPack)
++INCLUDE(GNUInstallDirs)
+
+ SET(CMAKE_EXPORT_COMPILE_COMMANDS 1)
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+@@ -189,17 +190,17 @@ ELSE ()
+ ENDIF ()
+
+ INSTALL(TARGETS ffmpegthumbnailer ${STATIC_LIB} ${SHARED_LIB}
+- LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
+- RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
+- ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
+- PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_PREFIX}/include/libffmpegthumbnailer
++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
++ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libffmpegthumbnailer
+ )
+
+-INSTALL(FILES man/ffmpegthumbnailer.1 DESTINATION ${CMAKE_INSTALL_PREFIX}/man/man1)
+-INSTALL(FILES ${CMAKE_BINARY_DIR}/libffmpegthumbnailer.pc DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig)
++INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/man/ffmpegthumbnailer.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
++INSTALL(FILES ${CMAKE_BINARY_DIR}/libffmpegthumbnailer.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+
+ IF (ENABLE_THUMBNAILER)
+- INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/dist/ffmpegthumbnailer.thumbnailer DESTINATION ${CMAKE_INSTALL_PREFIX}/share/thumbnailers)
++ INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/dist/ffmpegthumbnailer.thumbnailer DESTINATION ${CMAKE_INSTALL_DATADIR}/thumbnailers)
+ ENDIF ()
+
+ CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/config.h.in ${CMAKE_BINARY_DIR}/config.h)
diff --git a/media-video/ffmpegthumbnailer/files/ffmpegthumbnailer-2.0.10-set-locale.patch b/media-video/ffmpegthumbnailer/files/ffmpegthumbnailer-2.0.10-set-locale.patch
new file mode 100644
index 000000000000..b1a198a93a1e
--- /dev/null
+++ b/media-video/ffmpegthumbnailer/files/ffmpegthumbnailer-2.0.10-set-locale.patch
@@ -0,0 +1,46 @@
+From 718f1b1147fe7e9138e2d503ed151e589d643772 Mon Sep 17 00:00:00 2001
+From: Dirk Vanden Boer <dirk.vdb@gmail.com>
+Date: Sat, 18 Jul 2015 10:24:28 +0200
+Subject: [PATCH] Set locale to the user specified locale
+
+---
+ main.cpp | 5 ++---
+ test/testrunner.cpp | 7 ++-----
+ 2 files changed, 4 insertions(+), 8 deletions(-)
+
+diff --git a/main.cpp b/main.cpp
+index 6cb6c55..7cb7089 100644
+--- a/main.cpp
++++ b/main.cpp
+@@ -54,10 +54,9 @@ int main(int argc, char** argv)
+ string outputFile;
+ string imageFormat;
+
+- if (!setlocale(LC_CTYPE, "en_US.UTF-8"))
++ if (!std::setlocale(LC_CTYPE, ""))
+ {
+- std::cerr << "Locale not specified. Check LANG, LC_CTYPE, LC_ALL" << std::endl;
+- return 1;
++ std::cerr << "Failed to set locale" << std::endl;
+ }
+
+ while ((option = getopt (argc, argv, "i:o:s:t:q:c:afwhvp")) != -1)
+diff --git a/test/testrunner.cpp b/test/testrunner.cpp
+index 7023d25..20a4903 100644
+--- a/test/testrunner.cpp
++++ b/test/testrunner.cpp
+@@ -4,12 +4,9 @@
+ #include <gtest/gtest.h>
+
+ int main(int argc, char **argv) {
+- std::cout << "Running ffmpegthumbnailer tests" << std::endl;
+-
+- if (!setlocale(LC_CTYPE, "en_US.UTF-8"))
++ if (!std::setlocale(LC_CTYPE, ""))
+ {
+- std::cerr << "Locale not specified. Check LANG, LC_CTYPE, LC_ALL" << std::endl;
+- return 1;
++ std::cerr << "Failed to set locale" << std::endl;
+ }
+
+ testing::InitGoogleTest(&argc, argv);
diff --git a/media-video/ffmpegthumbnailer/files/ffmpegthumbnailer-2.0.8-memcpy.patch b/media-video/ffmpegthumbnailer/files/ffmpegthumbnailer-2.0.8-memcpy.patch
new file mode 100644
index 000000000000..5b9c68613e74
--- /dev/null
+++ b/media-video/ffmpegthumbnailer/files/ffmpegthumbnailer-2.0.8-memcpy.patch
@@ -0,0 +1,13 @@
+libffmpegthumbnailer/pngwriter.cpp: In function 'void ffmpegthumbnailer::writeDataCallback(png_structp, png_bytep, png_size_t)':
+libffmpegthumbnailer/pngwriter.cpp:111:52: error: 'memcpy' was not declared in this scope
+
+--- libffmpegthumbnailer/pngwriter.cpp
++++ libffmpegthumbnailer/pngwriter.cpp
+@@ -17,6 +17,7 @@
+ #include "pngwriter.h"
+ #include <stdexcept>
+ #include <cassert>
++#include <cstring>
+
+ using namespace std;
+
diff --git a/media-video/ffmpegthumbnailer/metadata.xml b/media-video/ffmpegthumbnailer/metadata.xml
new file mode 100644
index 000000000000..26303e949898
--- /dev/null
+++ b/media-video/ffmpegthumbnailer/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="google-code">ffmpegthumbnailer</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/flumotion/Manifest b/media-video/flumotion/Manifest
new file mode 100644
index 000000000000..4820bf4c74e8
--- /dev/null
+++ b/media-video/flumotion/Manifest
@@ -0,0 +1,2 @@
+DIST flumotion-0.10.1.tar.bz2 1640721 SHA256 8c6913a3b2ed7adb6294c644762bebdac4d75b1b752a4ffd3589dcfa5b778d21 SHA512 ef157a73c97de934deaad22e1be8b3f109e47a0898a674f542d17b84edcca50f6ca6c4790419a9514e291ec8e4651ba840491e21439c5342d03a4a46c5805bfb WHIRLPOOL 9796f22e862c69220dabbfd9b9c899d6b5d5e4d6bb20203016f3ab7ac6c8ecd36cdbfea03438384be101407eeddfcfd6fc47337edcd15dd1a4f67dcb222d8e71
+DIST flumotion-0.8.1.tar.bz2 1516513 SHA256 ae53684e504ef8793a08e70d17892a090c53ebf9bd470f8081b9c9949d53db4d SHA512 87fa4b517d9ab59d0fc624e1047aad26d4319cedd36c6cfaab751fc3c984281b18c640caa8a363b39b3df1c2a6d5a4adbe627525dac155ef263b635884300994 WHIRLPOOL 9ceca56fd9d63b0bcceff9354f5f90d7d724d6fc37e218031d4124ee19bad07ed18aca39407d3b75a1cd1f2c54d0892bafc13fb04d8f6208119e463f52239b8b
diff --git a/media-video/flumotion/files/flumotion-init-0.2.0 b/media-video/flumotion/files/flumotion-init-0.2.0
new file mode 100755
index 000000000000..de571785ff38
--- /dev/null
+++ b/media-video/flumotion/files/flumotion-init-0.2.0
@@ -0,0 +1,17 @@
+#!/sbin/runscript
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting Flumotion"
+ HOME=/usr/share/flumotion start-stop-daemon -o --start --chuid flumotion:flumotion --exec /usr/sbin/flumotion start
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Flumotion"
+ /usr/sbin/flumotion stop
+ eend $?
+}
diff --git a/media-video/flumotion/files/flumotion-init-3 b/media-video/flumotion/files/flumotion-init-3
new file mode 100644
index 000000000000..898eae048766
--- /dev/null
+++ b/media-video/flumotion/files/flumotion-init-3
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting Flumotion"
+ if [ ! -d /var/run/flumotion ] ; then
+ mkdir /var/run/flumotion
+ chown flumotion:flumotion /var/run/flumotion
+ chmod 755 /var/run/flumotion
+ fi
+
+ start-stop-daemon -o --start --chuid flumotion:flumotion --exec /usr/sbin/flumotion start
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Flumotion"
+ /usr/sbin/flumotion stop
+ eend $?
+}
diff --git a/media-video/flumotion/flumotion-0.10.1.ebuild b/media-video/flumotion/flumotion-0.10.1.ebuild
new file mode 100644
index 000000000000..52222970c1f4
--- /dev/null
+++ b/media-video/flumotion/flumotion-0.10.1.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils fdo-mime flag-o-matic multilib python-single-r1 toolchain-funcs user virtualx # AC_CHECK_PROG for Xvfb
+
+DESCRIPTION="Flumotion Streaming server"
+HOMEPAGE="http://www.flumotion.net/"
+SRC_URI="http://www.flumotion.net/src/${PN}/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1" # LICENSE.LGPL
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="doc test"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+# TODO:
+
+# These would be from 0.6.2's ebuild
+# media-plugins/gst-plugins-libpng:0.10
+# dev-python/twisted-web
+# dev-python/twisted-names
+# dev-python/imaging
+
+# These are from README
+RDEPEND="
+ dev-python/gst-python:0.10[${PYTHON_USEDEP}]
+ dev-python/kiwi[${PYTHON_USEDEP}]
+ dev-python/pycairo[${PYTHON_USEDEP}]
+ dev-python/pygtk:2[${PYTHON_USEDEP}]
+ dev-python/twisted-core[${PYTHON_USEDEP}]
+ media-libs/gstreamer:0.10
+ media-libs/gst-plugins-base:0.10
+ media-libs/gst-plugins-good:0.10
+ media-plugins/gst-plugins-ogg:0.10
+ media-plugins/gst-plugins-theora:0.10
+ media-plugins/gst-plugins-vorbis:0.10
+"
+# These are from README and error and trial FEATURES="test" Import's
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPEND}
+ dev-util/intltool
+ sys-devel/gettext
+ virtual/pkgconfig
+ doc? ( dev-python/epydoc[${PYTHON_USEDEP}] )
+ test? ( dev-python/icalendar[${PYTHON_USEDEP}]
+ dev-python/pychecker[${PYTHON_USEDEP}]
+ dev-python/twisted-conch[${PYTHON_USEDEP}] )"
+
+src_prepare() {
+ # Fix .desktop file
+ sed -e 's/.png//' -i data/flumotion-admin.desktop.in || die
+
+ # Fix shebangs
+ sed -e '1 s:.*:#!/usr/bin/env python:' \
+ -i bin/flu*.in bin/runtest.in misc/flu*.in || die
+ python_fix_shebang bin/flu*.in bin/runtest.in misc/flu*.in
+}
+
+src_configure() {
+ append-cflags -fno-strict-aliasing
+
+ econf \
+ --localstatedir=/var \
+ $(use_enable doc docs)
+}
+
+src_compile() {
+ emake -j1 fdpass_so_LINK="$(tc-getCC) ${LDFLAGS} -shared -o fdpass.so"
+}
+
+src_test() {
+ # FIXME: restrict unittests to flumotion source folder
+ # other tests are failing in weird ways and does not seem to test much of flumotion
+ Xemake -j1 check -C flumotion
+}
+
+src_install() {
+ emake -j1 DESTDIR="${D}" install
+ einstalldocs
+ dodoc RELEASE
+
+ keepdir /var/log/flumotion
+
+ newinitd "${FILESDIR}"/flumotion-init-3 flumotion
+
+ # /usr/share/hal/fdi/policy/20thirdparty/91-flumotion-device-policy.fdi
+ rm -rf "${D}"/usr/share/hal || die
+
+ dodir /etc/flumotion
+ dodir /etc/flumotion/managers
+ dodir /etc/flumotion/managers/default
+ dodir /etc/flumotion/managers/default/flows
+ dodir /etc/flumotion/workers
+
+ pushd conf
+ insinto /etc/flumotion/managers/default
+ doins managers/default/planet.xml
+ insinto /etc/flumotion/workers
+ doins workers/default.xml
+ insinto /etc/flumotion
+ doins default.pem
+ popd
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+
+ if ! enewgroup flumotion || ! enewuser flumotion -1 -1 /usr/share/flumotion flumotion,audio,video,sys; then
+ die "Unable to add flumotion user and flumotion group."
+ fi
+
+ for dir in /usr/share/flumotion /var/log/flumotion ; do
+ chown -R flumotion:flumotion "${dir}"
+ chmod -R 755 "${dir}"
+ done
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+}
diff --git a/media-video/flumotion/flumotion-0.8.1-r1.ebuild b/media-video/flumotion/flumotion-0.8.1-r1.ebuild
new file mode 100644
index 000000000000..ff28bf39ef8a
--- /dev/null
+++ b/media-video/flumotion/flumotion-0.8.1-r1.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils fdo-mime flag-o-matic multilib python-single-r1 toolchain-funcs user virtualx # AC_CHECK_PROG for Xvfb
+
+DESCRIPTION="Flumotion Streaming server"
+HOMEPAGE="http://www.flumotion.net/"
+SRC_URI="http://www.flumotion.net/src/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2" # LICENSE.Flumotion
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc test"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+# TODO:
+
+# These would be from 0.6.2's ebuild
+# media-plugins/gst-plugins-libpng:0.10
+# dev-python/twisted-web
+# dev-python/twisted-names
+# dev-python/imaging
+
+# These are from README
+RDEPEND="
+ dev-python/gst-python:0.10[${PYTHON_USEDEP}]
+ dev-python/kiwi[${PYTHON_USEDEP}]
+ dev-python/pycairo[${PYTHON_USEDEP}]
+ dev-python/pygtk:2[${PYTHON_USEDEP}]
+ dev-python/twisted-core[${PYTHON_USEDEP}]
+ media-libs/gstreamer:0.10
+ media-libs/gst-plugins-base:0.10
+ media-libs/gst-plugins-good:0.10
+ media-plugins/gst-plugins-ogg:0.10
+ media-plugins/gst-plugins-theora:0.10
+ media-plugins/gst-plugins-vorbis:0.10
+"
+# These are from README and error and trial FEATURES="test" Import's
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPEND}
+ dev-util/intltool
+ sys-devel/gettext
+ virtual/pkgconfig
+ doc? ( dev-python/epydoc[${PYTHON_USEDEP}] )
+ test? ( dev-python/icalendar[${PYTHON_USEDEP}]
+ dev-python/pychecker[${PYTHON_USEDEP}]
+ dev-python/twisted-conch[${PYTHON_USEDEP}] )"
+
+src_prepare() {
+ # Fix .desktop file
+ sed -e 's/.png//' -i data/flumotion-admin.desktop.in || die
+
+ # Fix shebangs
+ sed -e '1 s:.*:#!/usr/bin/env python:' \
+ -i bin/flu*.in bin/runtest.in misc/flu*.in || die
+ python_fix_shebang bin/flu*.in bin/runtest.in misc/flu*.in
+}
+
+src_configure() {
+ append-cflags -fno-strict-aliasing
+
+ econf \
+ --localstatedir=/var \
+ $(use_enable doc docs)
+}
+
+src_compile() {
+ emake -j1 fdpass_so_LINK="$(tc-getCC) ${LDFLAGS} -shared -o fdpass.so"
+}
+
+src_test() {
+ # FIXME: restrict unittests to flumotion source folder
+ # other tests are failing in weird ways and does not seem to test much of flumotion
+ Xemake -j1 check -C flumotion
+}
+
+src_install() {
+ emake -j1 DESTDIR="${D}" install
+ einstalldocs
+ dodoc RELEASE
+
+ keepdir /var/log/flumotion
+
+ newinitd "${FILESDIR}"/flumotion-init-3 flumotion
+
+ # /usr/share/hal/fdi/policy/20thirdparty/91-flumotion-device-policy.fdi
+ rm -rf "${D}"/usr/share/hal || die
+
+ dodir /etc/flumotion
+ dodir /etc/flumotion/managers
+ dodir /etc/flumotion/managers/default
+ dodir /etc/flumotion/managers/default/flows
+ dodir /etc/flumotion/workers
+
+ pushd conf
+ insinto /etc/flumotion/managers/default
+ doins managers/default/planet.xml
+ insinto /etc/flumotion/workers
+ doins workers/default.xml
+ insinto /etc/flumotion
+ doins default.pem
+ popd
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+
+ if ! enewgroup flumotion || ! enewuser flumotion -1 -1 /usr/share/flumotion flumotion,audio,video,sys; then
+ die "Unable to add flumotion user and flumotion group."
+ fi
+
+ for dir in /usr/share/flumotion /var/log/flumotion ; do
+ chown -R flumotion:flumotion "${dir}"
+ chmod -R 755 "${dir}"
+ done
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+}
diff --git a/media-video/flumotion/flumotion-0.8.1.ebuild b/media-video/flumotion/flumotion-0.8.1.ebuild
new file mode 100644
index 000000000000..6724950daf32
--- /dev/null
+++ b/media-video/flumotion/flumotion-0.8.1.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+PYTHON_DEPEND="2:2.6"
+
+inherit eutils user flag-o-matic multilib python toolchain-funcs virtualx # AC_CHECK_PROG for Xvfb
+
+DESCRIPTION="Flumotion Streaming server"
+HOMEPAGE="http://www.flumotion.net/"
+SRC_URI="http://www.flumotion.net/src/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2" # LICENSE.Flumotion
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc test"
+
+# TODO:
+
+# These would be from 0.6.2's ebuild
+# media-plugins/gst-plugins-libpng:0.10
+# dev-python/twisted-web
+# dev-python/twisted-names
+# dev-python/imaging
+
+# These are from README
+RDEPEND="dev-python/gst-python:0.10
+ dev-python/kiwi
+ dev-python/pycairo
+ =dev-python/pygtk-2*
+ dev-python/twisted-core
+ media-libs/gstreamer:0.10
+ media-libs/gst-plugins-base:0.10
+ media-libs/gst-plugins-good:0.10
+ media-plugins/gst-plugins-ogg:0.10
+ media-plugins/gst-plugins-theora:0.10
+ media-plugins/gst-plugins-vorbis:0.10"
+# These are from README and error and trial FEATURES="test" Import's
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ doc? ( dev-python/epydoc )
+ test? ( dev-python/icalendar
+ dev-python/pychecker
+ dev-python/twisted-conch )"
+
+src_prepare() {
+ rm -f py-compile
+ ln -s $(type -P true) py-compile
+}
+
+src_configure() {
+ append-cflags -fno-strict-aliasing
+
+ econf \
+ --localstatedir=/var \
+ $(use_enable doc docs)
+}
+
+src_compile() {
+ emake -j1 fdpass_so_LINK="$(tc-getCC) ${LDFLAGS} -shared -o fdpass.so" || die
+}
+
+src_test() {
+ Xemake -j1 check || die
+}
+
+src_install() {
+ emake -j1 DESTDIR="${D}" install || die
+ dodoc AUTHORS ChangeLog NEWS README RELEASE TODO
+
+ keepdir /var/log/flumotion
+ keepdir /var/run/flumotion
+
+ newinitd "${FILESDIR}"/flumotion-init-0.2.0 flumotion
+
+ # /usr/share/hal/fdi/policy/20thirdparty/91-flumotion-device-policy.fdi
+ rm -rf "${D}"/usr/share/hal
+
+ dodir /etc/flumotion
+ dodir /etc/flumotion/managers
+ dodir /etc/flumotion/managers/default
+ dodir /etc/flumotion/managers/default/flows
+ dodir /etc/flumotion/workers
+
+ pushd conf
+ insinto /etc/flumotion/managers/default
+ doins managers/default/planet.xml || die
+ insinto /etc/flumotion/workers
+ doins workers/default.xml || die
+ insinto /etc/flumotion
+ doins default.pem || die
+ popd
+}
+
+pkg_postinst() {
+ if ! enewgroup flumotion || ! enewuser flumotion -1 -1 /usr/share/flumotion flumotion,audio,video,sys; then
+ die "Unable to add flumotion user and flumotion group."
+ fi
+
+ for dir in /usr/share/flumotion /var/log/flumotion /var/run/flumotion; do
+ chown -R flumotion:flumotion "${dir}"
+ chmod -R 755 "${dir}"
+ done
+
+ python_mod_optimize /usr/$(get_libdir)/flumotion/python
+}
+
+pkg_postrm() {
+ python_mod_cleanup /usr/$(get_libdir)/flumotion/python
+}
diff --git a/media-video/flumotion/metadata.xml b/media-video/flumotion/metadata.xml
new file mode 100644
index 000000000000..dec0396a21e7
--- /dev/null
+++ b/media-video/flumotion/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>gstreamer</herd>
+</pkgmetadata>
diff --git a/media-video/flvstreamer/Manifest b/media-video/flvstreamer/Manifest
new file mode 100644
index 000000000000..c99d4c969d8c
--- /dev/null
+++ b/media-video/flvstreamer/Manifest
@@ -0,0 +1 @@
+DIST flvstreamer-2.1c.tar.gz 77308 RMD160 d057451cb663ee6e6ddf8e2be713ccce7624ac93 SHA1 109c524425ed943cf21a0d25ea3a2a669b2cb112 SHA256 1bba81fcd1518ec05af1017522d4ef92b9a2ae3a0da6a09396050cc7cc550729
diff --git a/media-video/flvstreamer/flvstreamer-2.1c.ebuild b/media-video/flvstreamer/flvstreamer-2.1c.ebuild
new file mode 100644
index 000000000000..5ab993eb0bb0
--- /dev/null
+++ b/media-video/flvstreamer/flvstreamer-2.1c.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit toolchain-funcs
+
+DESCRIPTION="Open source command-line RTMP client intended to stream audio or video flash content"
+HOMEPAGE="http://savannah.nongnu.org/projects/flvstreamer/"
+SRC_URI="mirror://nongnu/${PN}/source/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE=""
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ #fix Makefile ( bug #298535 and bug #318353)
+ sed -i 's/\$(MAKEFLAGS)//g' Makefile \
+ || die "failed to fixe Makefile"
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" \
+ CXX="$(tc-getCXX)" \
+ CFLAGS="${CFLAGS} `sed -n 's/DEF=\(.*\)/\1/p' Makefile`" \
+ CXXFLAGS="${CXXFLAGS}" \
+ LDFLAGS="${LDFLAGS}" linux
+}
+
+src_install() {
+ dobin {${PN},streams} || die "dobin failed"
+ dodoc README ChangeLog || die "dodoc failed"
+}
diff --git a/media-video/flvstreamer/metadata.xml b/media-video/flvstreamer/metadata.xml
new file mode 100644
index 000000000000..662c2b16ab57
--- /dev/null
+++ b/media-video/flvstreamer/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>video</herd>
+ <herd>sound</herd>
+ <maintainer>
+ <email>hwoarang@gentoo.org</email>
+ <name>Markos Chandras</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/media-video/frameworks/Manifest b/media-video/frameworks/Manifest
new file mode 100644
index 000000000000..c78b961ceaf9
--- /dev/null
+++ b/media-video/frameworks/Manifest
@@ -0,0 +1 @@
+DIST frameworks-0.3.7.tar.gz 116266 SHA256 bf069ea0701c0d86485aa75bd7dc367acdc2efbb9a7aa425110b8cf473dd7f08
diff --git a/media-video/frameworks/frameworks-0.3.7.ebuild b/media-video/frameworks/frameworks-0.3.7.ebuild
new file mode 100644
index 000000000000..6c9eabfdf0e2
--- /dev/null
+++ b/media-video/frameworks/frameworks-0.3.7.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+DESCRIPTION="A small v4l frame capture utility especially suited for stop motion animation"
+SRC_URI="http://frameworks.polycrystal.org/release/${P}.tar.gz"
+HOMEPAGE="http://frameworks.polycrystal.org"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~ppc ~x86 ~amd64"
+IUSE=""
+
+RDEPEND=">=gnome-base/libglade-2
+ x11-libs/gtk+:2"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_install () {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS ChangeLog NEWS README TODO
+}
diff --git a/media-video/frameworks/metadata.xml b/media-video/frameworks/metadata.xml
new file mode 100644
index 000000000000..8ced8df8afcc
--- /dev/null
+++ b/media-video/frameworks/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>video</herd>
+<maintainer>
+ <email>media-video@gentoo.org</email>
+</maintainer>
+<longdescription lang="en">
+A small frame capture utiliy compatible with v4l usefull especially for doing stop motion animations.
+</longdescription>
+</pkgmetadata>
+
diff --git a/media-video/gaupol/Manifest b/media-video/gaupol/Manifest
new file mode 100644
index 000000000000..461237cfb771
--- /dev/null
+++ b/media-video/gaupol/Manifest
@@ -0,0 +1,2 @@
+DIST gaupol-0.19.2.tar.gz 651580 SHA256 4e30fb7f4ff328561243450367be0c1ec80878f7107cac8eda6db9877a90aff4 SHA512 5d95c4f2610e7305f91c29701f4d2edfbd69f782a296c5152515d3391cb58ab83c34412c67f0bbbdf6159198bb90da1f43652b483efc0320dec5870f077e9884 WHIRLPOOL 272e7c9fc4c8e41b2ef4832c6de161e83303894055d3f9c8e91dc58a1fe3c5170186f1de3f7bd36bbdbf8fbacefff170f9d52a714acdd85596be15dfa804265d
+DIST gaupol-0.28.2.tar.xz 495248 SHA256 d02d81ace0d41dbf7707251cd86e28876acf86dd82c36e34371d38cd21212d4c SHA512 e3b47e35fe7825a105870e6e691ee85f168d7f171eb2da2775b88a099069b0593a9878fe9ec8f47fa824d8aa5a18f28278c78731538a64d900401b13d38ae7d8 WHIRLPOOL 36abedf44872c904520663d3c845cfcfcdc8a438ef1b8ac09910dc13cac8a88a22dcdcaee44ebd05ad4f504df67694dafc45b44aa0da632296d864a56a1cf9fb
diff --git a/media-video/gaupol/gaupol-0.19.2-r1.ebuild b/media-video/gaupol/gaupol-0.19.2-r1.ebuild
new file mode 100644
index 000000000000..95344e1cd379
--- /dev/null
+++ b/media-video/gaupol/gaupol-0.19.2-r1.ebuild
@@ -0,0 +1,60 @@
+# 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 fdo-mime gnome2-utils versionator
+
+MAJOR_MINOR_VERSION="$(get_version_component_range 1-2)"
+
+DESCRIPTION="Gaupol is a subtitle editor for text-based subtitles"
+HOMEPAGE="http://home.gna.org/gaupol"
+SRC_URI="http://download.gna.org/${PN}/${MAJOR_MINOR_VERSION}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~x86"
+IUSE="spell"
+
+RDEPEND="dev-python/chardet[${PYTHON_USEDEP}]
+ >=dev-python/pygtk-2.16[${PYTHON_USEDEP}]
+ spell? (
+ app-text/iso-codes
+ >=dev-python/pyenchant-1.4[${PYTHON_USEDEP}]
+ )"
+DEPEND="${RDEPEND}
+ dev-util/intltool
+ sys-devel/gettext"
+
+DOCS=( AUTHORS ChangeLog CREDITS NEWS TODO README )
+
+src_compile() {
+ addpredict /root/.gconf
+ addpredict /root/.gconfd
+ distutils-r1_src_compile
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+ elog "Previewing support needs MPlayer or VLC."
+
+ if use spell; then
+ elog "Additionally, spell-checking requires a dictionary, any of"
+ elog "Aspell/Pspell, Ispell, MySpell, Uspell, Hspell or AppleSpell."
+ fi
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+}
diff --git a/media-video/gaupol/gaupol-0.28.2.ebuild b/media-video/gaupol/gaupol-0.28.2.ebuild
new file mode 100644
index 000000000000..3bca8584fbee
--- /dev/null
+++ b/media-video/gaupol/gaupol-0.28.2.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python{3_3,3_4} )
+
+inherit distutils-r1 fdo-mime gnome2-utils versionator
+
+MAJOR_MINOR_VERSION="$(get_version_component_range 1-2)"
+
+DESCRIPTION="A subtitle editor for text-based subtitles"
+HOMEPAGE="http://home.gna.org/gaupol"
+SRC_URI="http://download.gna.org/${PN}/${MAJOR_MINOR_VERSION}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="spell"
+
+RDEPEND="app-text/iso-codes
+ dev-python/chardet[${PYTHON_USEDEP}]
+ dev-python/pygobject:3[${PYTHON_USEDEP}]
+ x11-libs/gtk+:3[introspection]
+ spell? (
+ >=dev-python/pyenchant-1.4[${PYTHON_USEDEP}]
+ app-text/gtkspell:3
+ )"
+DEPEND="${RDEPEND}
+ dev-util/intltool
+ sys-devel/gettext"
+
+DOCS=( AUTHORS.md NEWS.md TODO.md README.md README.aeidon.md )
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+ elog "Previewing support needs MPlayer or VLC."
+
+ if use spell; then
+ elog "Additionally, spell-checking requires a dictionary, any of"
+ elog "Aspell/Pspell, Ispell, MySpell, Uspell, Hspell or AppleSpell."
+ fi
+}
diff --git a/media-video/gaupol/metadata.xml b/media-video/gaupol/metadata.xml
new file mode 100644
index 000000000000..862cfbc4e837
--- /dev/null
+++ b/media-video/gaupol/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>video</herd>
+ <herd>python</herd>
+</pkgmetadata>
diff --git a/media-video/get_flash_videos/Manifest b/media-video/get_flash_videos/Manifest
new file mode 100644
index 000000000000..41f0fedd56f8
--- /dev/null
+++ b/media-video/get_flash_videos/Manifest
@@ -0,0 +1 @@
+DIST App-get_flash_videos-1.24.tar.gz 82383 SHA256 9d402facf8d6adfd55365662902ab58a5cb5f0f56861385bed944e22052f9133 SHA512 e726a50e9301e40193ad34a555fbbcd9cc26da4ef9157ef42a41bd54e500b482e9bcbeea5c474f89e83c9af4154ad41ce9a1b5430299cbb5a1c6c256c78c5b32 WHIRLPOOL 1430a38e75637e8bd5623e4824607d78c8563676f3bc7b317ba6258a8c30b7eff55945c6fdf5a3230c8b894d34a3e7a29c57b2607abd1eea5b39a00aa9196bb9
diff --git a/media-video/get_flash_videos/files/get_flash_videos-youtubefix.patch b/media-video/get_flash_videos/files/get_flash_videos-youtubefix.patch
new file mode 100644
index 000000000000..0bca2bbd450d
--- /dev/null
+++ b/media-video/get_flash_videos/files/get_flash_videos-youtubefix.patch
@@ -0,0 +1,100 @@
+https://bugs.gentoo.org/show_bug.cgi?id=405761
+
+https://github.com/richcollins/get-flash-videos/commit/27e0f1d214e291debfd567b1652908d0ef6b79d1#lib/FlashVideo/Site
+
+--- lib/FlashVideo/Site/Youtube.pm~ 2010-11-30 14:34:17.000000000 +0000
++++ lib/FlashVideo/Site/Youtube.pm 2012-02-20 23:56:35.000000000 +0000
+@@ -26,6 +26,7 @@
+ if($embed_url !~ m!youtube\.com/watch!) {
+ $browser->get($embed_url);
+ if ($browser->response->header('Location') =~ m!/swf/.*video_id=([^&]+)!
++ || $browser->content =~ m!\<iframe[^\>]*src="http://www.youtube.com/embed/([^"]+)"!i
+ || $embed_url =~ m!/v/([-_a-z0-9]+)!i
+ || $browser->uri =~ m!v%3D([-_a-z0-9]+)!i) {
+ # We ended up on a embedded SWF or other redirect page
+@@ -48,12 +49,19 @@
+ # If the page contains fmt_url_map, then process this. With this, we
+ # don't require the 't' parameter.
+ if ($browser->content =~ /["']fmt_url_map["']:\s{0,3}(["'][^"']+["'])/) {
+- debug "Using fmt_url_map method from page ($1)";
+- return $self->download_fmt_map($prefs, $browser, $title, {}, @{from_json $1});
++ my $fmt_map = $1;
++ if ($fmt_map !~ /\|/) {
++ # $fmt_map is double escaped. We should unescape it here just
++ # once. Be careful not to unescape ',' in the URL.
++ $fmt_map = uri_unescape($fmt_map);
++ }
++ debug "Using fmt_url_map method from page ($fmt_map)";
++ return $self->download_fmt_map($prefs, $browser, $title, {}, @{from_json $fmt_map});
+ }
+
+ my $video_id;
+ if ($browser->content =~ /(?:var pageVideoId =|(?:CFG_)?VIDEO_ID'?\s*:)\s*'(.+?)'/
++ || $browser->content =~ /"video_id": "([^"]+)"/
+ || $embed_url =~ /v=([^&]+)/) {
+ $video_id = $1;
+ } else {
+@@ -125,6 +133,9 @@
+ } elsif($info{fmt_url_map}) {
+ debug "Using fmt_url_map method from info";
+ return $self->download_fmt_map($prefs, $browser, $title, \%info, $info{fmt_url_map});
++ } elsif($info{url_encoded_fmt_stream_map}) {
++ debug "Using url_encoded_fmt_stream_map method from info";
++ return $self->download_url_encoded_fmt_stream_map($prefs, $browser, $title, \%info, $info{url_encoded_fmt_stream_map});
+ }
+ }
+
+@@ -132,6 +143,53 @@
+ return download_get_video($browser, $prefs, $video_id, $title, $t);
+ }
+
++sub download_url_encoded_fmt_stream_map {
++ my($self, $prefs, $browser, $title, $info, $fmt_map) = @_;
++
++ my $fmt_url_map = parse_youtube_url_encoded_fmt_stream_map($fmt_map);
++
++ if (!$title and $browser->uri->as_string =~ m'/user/.*?#') {
++ my $video_id = (split /\//, $browser->uri->fragment)[-1];
++
++ my %info = get_youtube_video_info($browser->clone, $video_id);
++
++ $title = $info->{title};
++ }
++
++ my $preferred_quality = $prefs->quality->choose(map { $fmt_url_map->{$_->{id}}
++ ? { resolution => $_->{resolution}, url => $fmt_url_map->{$_->{id}} }
++ : () } @formats);
++
++ $browser->allow_redirects;
++
++ return $preferred_quality->{url}, title_to_filename($title, "mp4");
++}
++
++sub parse_youtube_url_encoded_fmt_stream_map {
++ my($raw_map) = @_;;
++
++ my $map = {};
++
++ foreach my $params (split /,/, $raw_map) {
++
++ my $format = "";
++ my $url = "";
++
++ foreach my $pair (split /&/, $params) {
++ my ($name, $value) = split /=/, $pair;
++ if ($name eq "itag"){
++ $format = $value;
++ } elsif ($name eq "url") {
++ $url = uri_unescape($value);
++ }
++ }
++
++ $map->{$format} = $url;
++ }
++
++ return $map;
++}
++
+ sub download_fmt_map {
+ my($self, $prefs, $browser, $title, $info, $fmt_map) = @_;
+
diff --git a/media-video/get_flash_videos/get_flash_videos-1.24-r1.ebuild b/media-video/get_flash_videos/get_flash_videos-1.24-r1.ebuild
new file mode 100644
index 000000000000..9bef5ee6db4d
--- /dev/null
+++ b/media-video/get_flash_videos/get_flash_videos-1.24-r1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils perl-module readme.gentoo
+
+MY_PN="App-${PN}"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Downloads videos from various Flash-based video hosting sites"
+HOMEPAGE="http://code.google.com/p/get-flash-videos/"
+SRC_URI="http://get-flash-videos.googlecode.com/files/${MY_P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="amd64 x86 ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="test"
+
+RDEPEND="dev-perl/WWW-Mechanize
+ virtual/perl-Module-CoreList
+ dev-perl/HTML-TokeParser-Simple"
+DEPEND="${RDEPEND}
+ dev-perl/UNIVERSAL-require
+ test? ( media-video/rtmpdump
+ dev-perl/Tie-IxHash
+ dev-perl/XML-Simple
+ dev-perl/Crypt-Rijndael
+ dev-perl/Data-AMF
+ virtual/perl-IO-Compress )"
+
+SRC_TEST="do"
+
+S="${WORKDIR}/${MY_P}"
+SRC_TEST="do"
+myinst="DESTDIR=${D}"
+
+src_prepare() {
+ DISABLE_AUTOFORMATTING="yes"
+ DOC_CONTENTS="Downloading videos from RTMP server requires the following packages:
+- media-video/rtmpdump
+- dev-perl/Tie-IxHash
+Other optional dependencies:
+- dev-perl/XML-Simple
+- dev-perl/Crypt-Rijndael
+- dev-perl/Data-AMF
+- virtual/perl-IO-Compress"
+
+ # 405761
+ epatch "${FILESDIR}"/${PN}-youtubefix.patch
+ perl-module_src_prepare
+}
+
+src_install() {
+ perl-module_src_install
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+}
diff --git a/media-video/get_flash_videos/get_flash_videos-9999.ebuild b/media-video/get_flash_videos/get_flash_videos-9999.ebuild
new file mode 100644
index 000000000000..638ba3da66cd
--- /dev/null
+++ b/media-video/get_flash_videos/get_flash_videos-9999.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils perl-module git-2
+
+MY_PN="App-${PN}"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Downloads videos from various Flash-based video hosting sites"
+HOMEPAGE="http://code.google.com/p/get-flash-videos/"
+EGIT_REPO_URI="git://github.com/monsieurvideo/get-flash-videos.git"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS=""
+IUSE="test"
+
+RDEPEND="dev-perl/WWW-Mechanize
+ virtual/perl-Module-CoreList
+ dev-perl/HTML-TokeParser-Simple
+ dev-perl/Module-Find"
+DEPEND="${RDEPEND}
+ dev-perl/UNIVERSAL-require
+ test? ( media-video/rtmpdump
+ dev-perl/Tie-IxHash
+ dev-perl/XML-Simple
+ dev-perl/Crypt-Rijndael
+ dev-perl/Data-AMF
+ virtual/perl-IO-Compress )"
+
+SRC_TEST="do"
+
+S="${WORKDIR}/${MY_P}"
+SRC_TEST="do"
+myinst="DESTDIR=${D}"
+
+src_prepare() {
+ perl-module_src_prepare
+}
+
+pkg_postinst() {
+ elog "Downloading videos from RTMP server requires the following packages :"
+ elog " media-video/rtmpdump"
+ elog " dev-perl/Tie-IxHash"
+ elog "Others optional dependencies :"
+ elog " dev-perl/XML-Simple"
+ elog " dev-perl/Crypt-Rijndael"
+ elog " dev-perl/Data-AMF"
+ elog " virtual/perl-IO-Compress"
+}
diff --git a/media-video/get_flash_videos/metadata.xml b/media-video/get_flash_videos/metadata.xml
new file mode 100644
index 000000000000..a1ae20d2a71a
--- /dev/null
+++ b/media-video/get_flash_videos/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>hwoarang@gentoo.org</email>
+ <name>Markos Chandras</name>
+ </maintainer>
+ <longdescription lang="en">
+ </longdescription>
+ <upstream>
+ <remote-id type="google-code">get-flash-videos</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/gnome-mplayer/Manifest b/media-video/gnome-mplayer/Manifest
new file mode 100644
index 000000000000..bdab957a2abb
--- /dev/null
+++ b/media-video/gnome-mplayer/Manifest
@@ -0,0 +1,2 @@
+DIST gnome-mplayer-1.0.8.tar.gz 1062691 SHA256 bbd914ab620341e0c074374d2079c335eaea3c93cde746ebc7357577e7b00414 SHA512 795530313a6b8135e328e0cb8f5d9081b0b5caf8f81b1ab182a2876241bd662b96d2ef25164dc6f436fb66168472f3716e033697f0aeffe5f84c59cd8de420c2 WHIRLPOOL eb1b7a69dc058d8d1a6ab10a11cff506f8676fa2954a2202c267eb1969f36c8f84ed59cd17ccc71f19e9e4a66d1f5c7356ff779cda5e30c6086fcc2b917db18d
+DIST gnome-mplayer-1.0.9.tar.gz 1082199 SHA256 e43ca4929e7dc591256a16a793c7cce2678e07e948ee8ef11ed46cce2b3d81db SHA512 5aaea17afddaf2f949b798b87d4d6306130b9622d2dae68a7f24abebc2174cac7cb17c3112dac6629a0643e31098865462c10355dfcd43f16d2503848e18fa7d WHIRLPOOL 393618f0d5716496fb83c32a87862ae6a6a83cefd0ae01120dddeffaea82039f2197df3708ec0443615d8afcd040a41fb39fac9b36cc9c66448e3c123ad47853
diff --git a/media-video/gnome-mplayer/gnome-mplayer-1.0.8.ebuild b/media-video/gnome-mplayer/gnome-mplayer-1.0.8.ebuild
new file mode 100644
index 000000000000..292053cd9f0a
--- /dev/null
+++ b/media-video/gnome-mplayer/gnome-mplayer-1.0.8.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit fdo-mime gnome2-utils
+
+DESCRIPTION="A GTK+ interface to MPlayer"
+HOMEPAGE="http://code.google.com/p/gnome-mplayer/"
+SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~ppc ~ppc64 x86 ~x86-fbsd"
+IUSE="alsa +dbus +dconf gda gnome ipod libnotify musicbrainz pulseaudio"
+
+COMMON_DEPEND=">=dev-libs/glib-2.30
+ >=media-libs/gmtk-${PV}[dconf=]
+ >=x11-libs/gtk+-3.2:3
+ x11-libs/libX11
+ x11-libs/libXScrnSaver
+ alsa? ( media-libs/alsa-lib )
+ dbus? ( >=dev-libs/dbus-glib-0.100 )
+ gda? ( gnome-extra/libgda:5 )
+ gnome? ( gnome-base/nautilus )
+ ipod? ( >=media-libs/libgpod-0.7 )
+ libnotify? ( >=x11-libs/libnotify-0.7 )
+ musicbrainz? (
+ media-libs/musicbrainz:3
+ net-misc/curl
+ )
+ pulseaudio? ( >=media-sound/pulseaudio-0.9.14 )"
+RDEPEND="${COMMON_DEPEND}
+ x11-themes/gnome-icon-theme-symbolic
+ || ( >=media-video/mplayer-1.0_rc4_p20100101[libass] media-video/mplayer2[libass] )"
+DEPEND="${COMMON_DEPEND}
+ sys-devel/gettext
+ virtual/pkgconfig"
+
+DOCS="ChangeLog README DOCS/*.txt DOCS/tech/*.txt"
+
+src_configure() {
+ econf \
+ --enable-gtk3 \
+ $(use_enable gnome nautilus) \
+ --with-gio \
+ $(use_with dbus) \
+ $(use_with gda libgda) \
+ $(use_with alsa) \
+ $(use_with pulseaudio) \
+ $(use_with libnotify) \
+ $(use_with ipod libgpod) \
+ $(use_with musicbrainz libmusicbrainz3)
+}
+
+src_install() {
+ default
+ rm -rf "${ED}"/usr/share/doc/${PN}
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+ gnome2_schemas_savelist
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+ gnome2_schemas_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+ gnome2_schemas_update
+}
diff --git a/media-video/gnome-mplayer/gnome-mplayer-1.0.9.ebuild b/media-video/gnome-mplayer/gnome-mplayer-1.0.9.ebuild
new file mode 100644
index 000000000000..7efca1c3c6fb
--- /dev/null
+++ b/media-video/gnome-mplayer/gnome-mplayer-1.0.9.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit fdo-mime gnome2-utils
+
+DESCRIPTION="A GTK+ interface to MPlayer"
+HOMEPAGE="http://code.google.com/p/gnome-mplayer/"
+SRC_URI="http://${PN}.googlecode.com/svn/packages/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~ppc ~ppc64 x86 ~x86-fbsd"
+IUSE="alsa +dbus +dconf gda gnome ipod libnotify musicbrainz pulseaudio"
+
+COMMON_DEPEND=">=dev-libs/glib-2.30
+ >=media-libs/gmtk-${PV}[dconf=]
+ >=x11-libs/gtk+-3.2:3
+ x11-libs/libX11
+ x11-libs/libXScrnSaver
+ alsa? ( media-libs/alsa-lib )
+ dbus? ( >=dev-libs/dbus-glib-0.100 )
+ gda? ( gnome-extra/libgda:5 )
+ gnome? ( gnome-base/nautilus )
+ ipod? ( >=media-libs/libgpod-0.7 )
+ libnotify? ( >=x11-libs/libnotify-0.7 )
+ musicbrainz? (
+ media-libs/musicbrainz:3
+ net-misc/curl
+ )
+ pulseaudio? ( >=media-sound/pulseaudio-0.9.14 )"
+RDEPEND="${COMMON_DEPEND}
+ x11-themes/gnome-icon-theme-symbolic
+ || ( >=media-video/mplayer-1.0_rc4_p20100101[libass] media-video/mplayer2[libass] )"
+DEPEND="${COMMON_DEPEND}
+ sys-devel/gettext
+ virtual/pkgconfig"
+
+DOCS="ChangeLog README DOCS/*.txt DOCS/tech/*.txt"
+
+src_configure() {
+ # TODO: temporarily --disable-nemo only because it's untested and new feature in 1.0.9
+ econf \
+ --enable-gtk3 \
+ $(use_enable gnome nautilus) \
+ --disable-nemo \
+ --with-gio \
+ $(use_with dbus) \
+ $(use_with gda libgda) \
+ $(use_with alsa) \
+ $(use_with pulseaudio) \
+ $(use_with libnotify) \
+ $(use_with ipod libgpod) \
+ $(use_with musicbrainz libmusicbrainz3)
+}
+
+src_install() {
+ default
+ rm -rf "${ED}"/usr/share/doc/${PN}
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+ gnome2_schemas_savelist
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+ gnome2_schemas_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+ gnome2_schemas_update
+}
diff --git a/media-video/gnome-mplayer/metadata.xml b/media-video/gnome-mplayer/metadata.xml
new file mode 100644
index 000000000000..e77a792b8a4b
--- /dev/null
+++ b/media-video/gnome-mplayer/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>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name='dconf'>Enable support for <pkg>gnome-base/dconf</pkg></flag>
+ <flag name='gda'>Enable support for <pkg>gnome-extra/libgda</pkg></flag>
+ </use>
+</pkgmetadata>
diff --git a/media-video/gnome-subtitles/Manifest b/media-video/gnome-subtitles/Manifest
new file mode 100644
index 000000000000..6507b71dc08b
--- /dev/null
+++ b/media-video/gnome-subtitles/Manifest
@@ -0,0 +1,2 @@
+DIST gnome-subtitles-1.2.tar.gz 1116649 SHA256 0232937123159a9e87d110f29b921704c9934472dd4a7c6de437fed159fb498c SHA512 7be09d284ae256959e86f582ac7c2d67eb9f8f869a75ce4024491e8d0f0e97333e687dd31b09676a7c28f5f32cc0462a520cb1a88288e6e9deb7e6a32eceac0d WHIRLPOOL 6bcf3c2986279ecf41602579cafe288a1e0d3e5fab4b3f2291c592a42e0e4ae55001755a25b16f435062085bd972d1631af684e35ceec9d3aa4e1b75c00b52ef
+DIST gnome-subtitles-1.3.tar.gz 1182246 SHA256 eb1b5954c0bda76da16d6887244a7c0769a80f7cfb3aa8ad838ba087d1d44aa9 SHA512 eef9fcb616d98248249c0a18102f8d36e68edcb966de848dc130d60892546a55f5485fe5448a36aabe68abe42a4e09357bbe4a473f5e4c0a8f319ac1368c23d1 WHIRLPOOL 2dc650462422fe11fabfc9e2677616777cabb054faf8dd5d4a65b9de41d3bf46b3561eed2a079bc45b9e0ec051d22f69b2482f073bf459e464c301553dfbb8bc
diff --git a/media-video/gnome-subtitles/gnome-subtitles-1.2.ebuild b/media-video/gnome-subtitles/gnome-subtitles-1.2.ebuild
new file mode 100644
index 000000000000..6a8ebd75f28a
--- /dev/null
+++ b/media-video/gnome-subtitles/gnome-subtitles-1.2.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+GCONF_DEBUG="no"
+GNOME2_LA_PUNT="yes"
+
+inherit mono gnome2
+
+DESCRIPTION="Video subtitling for the Gnome desktop"
+HOMEPAGE="http://gnome-subtitles.sourceforge.net/"
+SRC_URI="mirror://sourceforge/gnome-subtitles/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE=""
+KEYWORDS="amd64 ppc x86"
+
+RDEPEND=">=dev-lang/mono-1.1
+ >=dev-dotnet/glade-sharp-2.12
+ >=dev-dotnet/gtk-sharp-2.12
+ >=dev-dotnet/gconf-sharp-2.12
+ media-libs/gstreamer:0.10
+ >=app-text/gtkspell-2.0:2
+ >=app-text/enchant-1.3
+ media-libs/gst-plugins-base:0.10"
+DEPEND="${RDEPEND}
+ app-text/scrollkeeper
+ virtual/pkgconfig
+ app-text/gnome-doc-utils"
+
+DOCS="AUTHORS ChangeLog NEWS README"
diff --git a/media-video/gnome-subtitles/gnome-subtitles-1.3.ebuild b/media-video/gnome-subtitles/gnome-subtitles-1.3.ebuild
new file mode 100644
index 000000000000..2e3eb1bf3599
--- /dev/null
+++ b/media-video/gnome-subtitles/gnome-subtitles-1.3.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+GNOME2_LA_PUNT="yes"
+
+inherit mono-env gnome2
+
+DESCRIPTION="Video subtitling for the Gnome desktop"
+HOMEPAGE="http://gnome-subtitles.sourceforge.net/"
+SRC_URI="mirror://sourceforge/gnome-subtitles/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE=""
+KEYWORDS="~amd64 ~ppc ~x86"
+
+RDEPEND=">=dev-lang/mono-1.1
+ >=dev-dotnet/glade-sharp-2.12
+ >=dev-dotnet/gtk-sharp-2.12
+ >=dev-dotnet/gconf-sharp-2.12
+ media-libs/gstreamer:1.0
+ >=app-text/gtkspell-2.0:2
+ >=app-text/enchant-1.3
+ media-libs/gst-plugins-base:1.0"
+DEPEND="${RDEPEND}
+ app-text/scrollkeeper
+ virtual/pkgconfig
+ app-text/gnome-doc-utils"
+
+DOCS="AUTHORS ChangeLog NEWS README"
diff --git a/media-video/gnome-subtitles/metadata.xml b/media-video/gnome-subtitles/metadata.xml
new file mode 100644
index 000000000000..82a9dd81ffbf
--- /dev/null
+++ b/media-video/gnome-subtitles/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <herd>proxy-maintainers</herd>
+ <herd>dotnet</herd>
+ <maintainer>
+ <email>mail@pedrocastro.org</email>
+ <name>Pedro Castro</name>
+ <description>Upstream</description>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">gnome-subtitles</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/gnome-video-effects/Manifest b/media-video/gnome-video-effects/Manifest
new file mode 100644
index 000000000000..a6eba9dd643f
--- /dev/null
+++ b/media-video/gnome-video-effects/Manifest
@@ -0,0 +1 @@
+DIST gnome-video-effects-0.4.1.tar.xz 145016 SHA256 34be42713a97caf698b84ce7e1158aa21cc0977df7f7a7477cece226bc8d844a SHA512 532a9ebdd95b049d43c2a8dccbd1d8e87e2adccf6a825a232e136e5bc0cbcbf0102e2b0777883a44de663a8f51cee972ac8682926b26146eade15d6b66f95e2a WHIRLPOOL 26ba91a8428463511f36fd23766e3a84cc5d1ec756a9f358268aa316d31e802ecda7a50a22d5969a9bc81248452d38995fd9f8be5b02a3a8e68f4e2f4714154e
diff --git a/media-video/gnome-video-effects/gnome-video-effects-0.4.1.ebuild b/media-video/gnome-video-effects/gnome-video-effects-0.4.1.ebuild
new file mode 100644
index 000000000000..2d3841418fee
--- /dev/null
+++ b/media-video/gnome-video-effects/gnome-video-effects-0.4.1.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+GCONF_DEBUG="no"
+
+inherit gnome2
+
+DESCRIPTION="Effects for Cheese, the webcam video and picture application"
+HOMEPAGE="https://wiki.gnome.org/Projects/GnomeVideoEffects"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc x86"
+IUSE=""
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ >=dev-util/intltool-0.40.0
+ >=sys-devel/gettext-0.17
+"
+
+# This ebuild does not install any binaries
+RESTRICT="binchecks strip"
diff --git a/media-video/gnome-video-effects/metadata.xml b/media-video/gnome-video-effects/metadata.xml
new file mode 100644
index 000000000000..6788bc4c7246
--- /dev/null
+++ b/media-video/gnome-video-effects/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>gnome</herd>
+<herd>video</herd>
+<herd>gstreamer</herd>
+</pkgmetadata>
diff --git a/media-video/google2srt/Manifest b/media-video/google2srt/Manifest
new file mode 100644
index 000000000000..dbbdcf598c66
--- /dev/null
+++ b/media-video/google2srt/Manifest
@@ -0,0 +1,3 @@
+DIST Google2SRT-0.5.3.zip 334238 SHA256 bcc43a2b50f82373122382adf0e17b0bd3bb0170fd58d74c4582b52faa73a7de SHA512 948aa0085750db96d16da8a693c16e14c2546aebf305544c13984c043671c81e7e94e03e4659227a9be9edf3dc25d78968c0e6d7e6dbb81d925aa3aa0fedb331 WHIRLPOOL 5cd701ea8c3d93791c1199cfad990c697023ddb9ad8308ddd8ec0e14d50661aa108fec7cd82b9654adbc1a777ca36e8f42c20bb133f704676a55d16bd3055fff
+DIST Google2SRT-0.5.6.zip 355167 SHA256 9f021954ff2ed3b386211a839784ae213403981f53068c51a9d2733865b249bb SHA512 edb7b1ee4440f4962220557c794090edb9b3647a64deb70c19170bb4af3edbb5abc93ddd6061badf458c6cd92c17024b91bbdfa95bb1b366d1092b659db08094 WHIRLPOOL 63b120cf28019c0c39132c99e3877ec264b5396a15003c1a235fd296aab4b178048a45a406c5697adef4ac45ab0ea5ac845a4c4665de2f0fce8b4a360ccea2c7
+DIST google2srt-icon.png 1848 SHA256 d832d20322e79ad74950e0bd2168f402d18f4de2ffeff0ba7d573092b0d6e588 SHA512 051d8ffe8488e2521cdfbfd045d6b5159a18619e12dc1216b1687514cf3f1cebdf2167af372c2ec46d3886412350f5872e8a8c245fee341a30fec51615b5140f WHIRLPOOL 5a9a0c9388a0e2d8e76d87a4ff0446b83399cb5c8ca5d8718982356431a2abc9461517363590cad8dca534e75c172aecc841956392bc01b94ec965bbcb15f98b
diff --git a/media-video/google2srt/files/build.xml b/media-video/google2srt/files/build.xml
new file mode 100644
index 000000000000..b1c7e3c775bb
--- /dev/null
+++ b/media-video/google2srt/files/build.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0"?>
+
+<project name="Google2SRT" default="jar">
+ <!-- some properties -->
+ <property name="src.dir" value="src" />
+ <property name="lib.dir" value="lib" />
+ <property name="resources.dir" value="resources" />
+ <property name="docs.dir" value="apidocs" />
+ <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="mainclass.jar" value="GUI" />
+ <property name="source.enc" value="UTF-8" />
+ <property name="target.jdk" value="1.6" />
+
+ <!-- classpath -->
+ <path id="refcp">
+ <fileset dir="${lib.dir}">
+ <include name="**/*.jar" />
+ </fileset>
+ </path>
+
+ <!-- init -->
+ <target name="init">
+ <mkdir dir="${dist.dir}" />
+ <mkdir dir="${docs.dir}" />
+ <mkdir dir="${build.dir}" />
+ </target>
+
+ <!-- compile everything -->
+ <target name="compile" depends="init">
+ <javac srcdir="${src.dir}"
+ destdir="${build.dir}"
+ source="${target.jdk}"
+ target="${target.jdk}"
+ classpathref="refcp"
+ encoding="${source.enc}"/>
+ <copy todir="${build.dir}">
+ <fileset dir="${resources.dir}" />
+ </copy>
+ </target>
+
+ <!-- build the jar files -->
+ <target name="build" depends="compile">
+ <jar jarfile="${project.jar}" basedir="${build.dir}">
+ <manifest>
+ <attribute name="Main-Class" value="${mainclass.jar}" />
+ </manifest>
+ </jar>
+ </target>
+
+ <!-- generate javadocs -->
+ <target name="javadoc" depends="init">
+ <javadoc sourcepath="${src.dir}"
+ destdir="${docs.dir}"
+ packagenames="*"
+ author="true"
+ version="true"
+ use="true"
+ charset="UTF-8"
+ encoding="${source.enc}"
+ defaultexcludes="yes"
+ classpathref="refcp"
+ windowtitle="${ant.project.name} API">
+ <fileset dir="${src.dir}" defaultexcludes="yes">
+ <include name="**/*.java"/>
+ </fileset>
+ </javadoc>
+ </target>
+
+ <!-- clean up -->
+ <target name="clean">
+ <delete dir="${build.dir}" />
+ <delete dir="${docs.dir}" />
+ <delete dir="${dist.dir}" />
+ </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-video/google2srt/google2srt-0.5.3.ebuild b/media-video/google2srt/google2srt-0.5.3.ebuild
new file mode 100644
index 000000000000..6bbf61cc8b95
--- /dev/null
+++ b/media-video/google2srt/google2srt-0.5.3.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+JAVA_PKG_IUSE="doc source"
+
+inherit eutils java-pkg-2 java-ant-2
+
+MY_PN="Google2SRT"
+MY_P="${MY_PN}-${PV}"
+MAINCLASS="GUI"
+
+DESCRIPTION="Convert subtitles from Google Video and YouTube to SubRip (.srt) format"
+HOMEPAGE="http://google2srt.sourceforge.net/en/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.zip
+ http://sbriesen.de/gentoo/distfiles/google2srt-icon.png"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="html"
+
+COMMON_DEP="dev-java/jdom:1.0"
+
+RDEPEND=">=virtual/jre-1.6
+ ${COMMON_DEP}"
+
+DEPEND=">=virtual/jdk-1.6
+ ${COMMON_DEP}"
+
+S="${WORKDIR}/${MY_P}"
+
+java_prepare() {
+ # copy build.xml
+ cp -f "${FILESDIR}/build.xml" build.xml || die
+
+ # move resources
+ mkdir -p "resources"
+ mv -f src/*.{jpg,properties} "resources/"
+
+ # update library packages
+ cd lib
+ rm -f jdom.jar ../${MY_PN}.jar || die
+ java-pkg_jar-from jdom-1.0
+ java-pkg_ensure-no-bundled-jars
+}
+
+src_compile() {
+ eant build $(use_doc)
+}
+
+src_install() {
+ java-pkg_dojar dist/${MY_PN}.jar
+ java-pkg_dolauncher ${MY_PN} --main ${MAINCLASS} --java_args -Xmx256m
+ newicon "${DISTDIR}/${PN}-icon.png" "${MY_PN}.png"
+ make_desktop_entry ${MY_PN} ${MY_PN} ${MY_PN}
+ use doc && java-pkg_dojavadoc apidocs
+ use source && java-pkg_dosrc src
+ use html && dohtml -r doc
+ newdoc Changelog.txt ChangeLog
+ newdoc README.TXT README
+}
diff --git a/media-video/google2srt/google2srt-0.5.6.ebuild b/media-video/google2srt/google2srt-0.5.6.ebuild
new file mode 100644
index 000000000000..ce5e84064429
--- /dev/null
+++ b/media-video/google2srt/google2srt-0.5.6.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+JAVA_PKG_IUSE="doc source"
+
+inherit eutils java-pkg-2 java-ant-2
+
+MY_PN="Google2SRT"
+MY_P="${MY_PN}-${PV}"
+MAINCLASS="GUI"
+
+DESCRIPTION="Convert subtitles from Google Video and YouTube to SubRip (.srt) format"
+HOMEPAGE="http://google2srt.sourceforge.net/en/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.zip
+ http://sbriesen.de/gentoo/distfiles/google2srt-icon.png"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="html"
+
+COMMON_DEP="dev-java/jdom:1.0"
+
+RDEPEND=">=virtual/jre-1.6
+ ${COMMON_DEP}"
+
+DEPEND=">=virtual/jdk-1.6
+ ${COMMON_DEP}"
+
+S="${WORKDIR}/${MY_P}"
+
+java_prepare() {
+ # copy build.xml
+ cp -f "${FILESDIR}/build.xml" build.xml || die
+
+ # move resources
+ mkdir -p "resources"
+ mv -f src/*.{jpg,properties} "resources/"
+
+ # update library packages
+ cd lib
+ rm -f jdom.jar ../${MY_PN}.jar || die
+ java-pkg_jar-from jdom-1.0
+ java-pkg_ensure-no-bundled-jars
+}
+
+src_compile() {
+ eant build $(use_doc)
+}
+
+src_install() {
+ java-pkg_dojar dist/${MY_PN}.jar
+ java-pkg_dolauncher ${MY_PN} --main ${MAINCLASS} --java_args -Xmx256m
+ newicon "${DISTDIR}/${PN}-icon.png" "${MY_PN}.png"
+ make_desktop_entry ${MY_PN} ${MY_PN} ${MY_PN}
+ use doc && java-pkg_dojavadoc apidocs
+ use source && java-pkg_dosrc src
+ use html && dohtml -r doc
+ newdoc Changelog.txt ChangeLog
+ newdoc README.TXT README
+}
diff --git a/media-video/google2srt/metadata.xml b/media-video/google2srt/metadata.xml
new file mode 100644
index 000000000000..1d4bb6fd9529
--- /dev/null
+++ b/media-video/google2srt/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <longdescription lang="en">
+ Google2SRT allows you to convert subtitles from Google Video and YouTube
+ to SubRip (.srt) format, which is recognized by most video players. You
+ can download XML subtitles or simply type video's URL, Google2SRT will
+ do the rest.
+ </longdescription>
+ <use>
+ <flag name="html">Install HTML documentation</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">google2srt</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/gpac/Manifest b/media-video/gpac/Manifest
new file mode 100644
index 000000000000..f16d0afd90ff
--- /dev/null
+++ b/media-video/gpac/Manifest
@@ -0,0 +1,2 @@
+DIST gpac-0.5.0.tar.gz 7861057 SHA256 42971ac39511a1b6d1db39af664ce887b38c8657328c88cd200d87a02de81c24 SHA512 dee7701c791c441c1f050d9591d4e4dd7bdd2908f535233b114959c9a0adc256b3d5e40f5c84fd0f8b1c6764bfe6b35ec0af6bfd1fb056d593aeedca75105278 WHIRLPOOL 1797afa09864a1e9632c121dc2076963ec5e73395abdcd76896d23dc675e03847a42d733ae9fc3bb29bd26b7b336ea0f49e6e8e79c87a0bd0458cd429a7bf271
+DIST gpac-0.5.1_pre5456.tar.xz 5938432 SHA256 81746ad1d9a8ae0a84c73652d1af5d86d9c36229b278422c13e353893893a83c SHA512 25883e32d83dc2b4649c506b86f745d2f8eaaaa75fff629b534205979aeb519a167243e62ec0d78e453d1edc27435acffd521a8c08a739cde05196f61e93ac47 WHIRLPOOL af5a89cb52802bc45edd29c6f0f5ce9f48decea16eef8a76c33c7161a6d48b3d43f1a2b4c3049d2f1f92d0c3f22b787a33c1652f42d2c0cf3b84ad58c2fb7589
diff --git a/media-video/gpac/files/110_all_implicitdecls.patch b/media-video/gpac/files/110_all_implicitdecls.patch
new file mode 100644
index 000000000000..71017b53b9eb
--- /dev/null
+++ b/media-video/gpac/files/110_all_implicitdecls.patch
@@ -0,0 +1,22 @@
+Index: gpac/applications/generators/SVG/svggen.h
+===================================================================
+--- gpac.orig/applications/generators/SVG/svggen.h
++++ gpac/applications/generators/SVG/svggen.h
+@@ -107,6 +107,17 @@ typedef struct {
+ } SVGGenAttrGrp;
+
+
++SVGGenAttribute *findAttribute(SVGGenElement *e, char *name);
++void generateAttributes(FILE *output, GF_List *attributes, Bool inDefine);
++void generateSVGCode_V1(GF_List *svg_elements);
++void generate_laser_tables_da(GF_List *atts);
++void generate_laser_tables(GF_List *svg_elements);
++u32 generateCoreInfo(FILE *output, SVGGenElement *elt, u32 start);
++u32 generateGenericInfo(FILE *output, SVGGenElement *elt, u32 index, char *pointer_root, u32 start);
++void svgNameToImplementationName(xmlChar *svg_name, char implementation_name[50]);
++void generate_table(GF_List *elements);
++void generateSVGCode_V2(GF_List *svg_elements);
++void generateSVGCode_V3(GF_List *svg_elements);
+
+ /*******************************************
+ * Structures needed for static allocation *
diff --git a/media-video/gpac/files/210_all_system_libogg.patch b/media-video/gpac/files/210_all_system_libogg.patch
new file mode 100644
index 000000000000..e09f57c43750
--- /dev/null
+++ b/media-video/gpac/files/210_all_system_libogg.patch
@@ -0,0 +1,28 @@
+--- src/Makefile.old 2012-07-15 15:34:54.000000000 +0200
++++ src/Makefile 2012-07-15 15:39:51.000000000 +0200
+@@ -92,9 +92,6 @@
+ ifeq ($(DISABLE_M2PS), no)
+ LIBGPAC_MEDIATOOLS+=media_tools/mpeg2_ps.o
+ endif
+-ifeq ($(DISABLE_OGG), no)
+-LIBGPAC_MEDIATOOLS+=media_tools/gpac_ogg.o
+-endif
+ ifeq ($(DISABLE_MCRYPT), no)
+ LIBGPAC_MEDIATOOLS+=media_tools/ismacryp.o
+ endif
+@@ -230,6 +227,15 @@
+ endif
+ endif
+
++#6 - OGG support
++ifeq ($(CONFIG_OGG), no)
++else
++LINKLIBS+= -logg
++ifeq ($(CONFIG_OGG), local)
++NEED_LOCAL_LIB="yes"
++MEDIATOOLS_CFLAGS+=-I"$(LOCAL_INC_PATH)/ogg"
++endif
++endif
+
+ ## libgpac compositor compilation options
+ COMPOSITOR_CFLAGS=
diff --git a/media-video/gpac/files/ffmpeg25.patch b/media-video/gpac/files/ffmpeg25.patch
new file mode 100644
index 000000000000..5451b8e1199a
--- /dev/null
+++ b/media-video/gpac/files/ffmpeg25.patch
@@ -0,0 +1,43 @@
+Add proper versionned checks for avformat_close_input
+https://bugs.gentoo.org/show_bug.cgi?id=536526
+
+diff --git a/modules/ffmpeg_in/ffmpeg_demux.c b/modules/ffmpeg_in/ffmpeg_demux.c
+index a5202ee..975a945 100644
+--- a/modules/ffmpeg_in/ffmpeg_demux.c
++++ b/modules/ffmpeg_in/ffmpeg_demux.c
+@@ -301,7 +301,7 @@ static Bool FFD_CanHandleURL(GF_InputService *plug, const char *url)
+ }
+
+ exit:
+-#ifndef FF_API_CLOSE_INPUT_FILE
++#if LIBAVFORMAT_VERSION_MAJOR < 54
+ if (ctx) av_close_input_file(ctx);
+ #else
+ if (ctx) avformat_close_input(&ctx);
+@@ -680,7 +680,7 @@ static GF_Err FFD_ConnectService(GF_InputService *plug, GF_ClientService *serv,
+
+ ffd->seekable = (av_seek_frame(ffd->ctx, -1, 0, AVSEEK_FLAG_BACKWARD)<0) ? 0 : 1;
+ if (!ffd->seekable) {
+-#ifndef FF_API_CLOSE_INPUT_FILE
++#if LIBAVFORMAT_VERSION_MAJOR < 54
+ av_close_input_file(ffd->ctx);
+ #else
+ avformat_close_input(&ffd->ctx);
+@@ -699,7 +699,7 @@ static GF_Err FFD_ConnectService(GF_InputService *plug, GF_ClientService *serv,
+
+ err_exit:
+ GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[FFMPEG] Error opening file %s: %s\n", url, gf_error_to_string(e)));
+-#ifndef FF_API_CLOSE_INPUT_FILE
++#if LIBAVFORMAT_VERSION_MAJOR < 54
+ if (ffd->ctx) av_close_input_file(ffd->ctx);
+ #else
+ if (ffd->ctx) avformat_close_input(&ffd->ctx);
+@@ -757,7 +757,7 @@ static GF_Err FFD_CloseService(GF_InputService *plug)
+
+ ffd->is_running = 0;
+
+-#ifndef FF_API_CLOSE_INPUT_FILE
++#if LIBAVFORMAT_VERSION_MAJOR < 54
+ if (ffd->ctx) av_close_input_file(ffd->ctx);
+ #else
+ if (ffd->ctx) avformat_close_input(&ffd->ctx);
diff --git a/media-video/gpac/files/gpac-0.5.0-build-fixes.patch b/media-video/gpac/files/gpac-0.5.0-build-fixes.patch
new file mode 100644
index 000000000000..741fd28b6f81
--- /dev/null
+++ b/media-video/gpac/files/gpac-0.5.0-build-fixes.patch
@@ -0,0 +1,113 @@
+diff -ur gpac/configure gpac.new/configure
+--- gpac/configure 2012-05-25 08:05:57.000000000 -0400
++++ gpac.new/configure 2012-10-04 13:59:58.000000000 -0400
+@@ -103,6 +103,7 @@
+ has_openjpeg="no"
+ gprof_build="no"
+ static_build="no"
++static_libs="no"
+ want_pic="no"
+ has_joystick="no"
+ has_xul="no"
+@@ -221,6 +222,7 @@
+ --disable-platinum disable Platinum UPnP support
+ --disable-alsa disable Alsa audio
+ --disable-oss-audio disable OSS audio
++ --disable-sdl disable SDL support
+ --enable-jack enable Jack audio
+ --disable-jack disable Jack audio
+ --enable-pulseaudio enable Pulse audio
+@@ -236,6 +238,7 @@
+ --enable-amr-wb enable AMR WB library
+ --enable-amr enable both AMR NB and WB libraries
+ --enable-static-bin GPAC static build
++ --enable-static-lib GPAC static libraries build
+ --static-mp4box configure for static linking of MP4Box.
+ --enable-depth enables depth handling in the compositor
+
+@@ -1607,6 +1610,8 @@
+ ;;
+ --enable-static-bin) static_build="yes";
+ ;;
++ --enable-static-lib) static_libs="yes";
++ ;;
+ --disable-ipv6) has_ipv6="no"
+ ;;
+ --disable-wx) has_wx="no"
+@@ -1615,6 +1620,8 @@
+ ;;
+ --disable-oss-audio) has_oss_audio="no"
+ ;;
++ --disable-sdl) has_sdl="no"
++ ;;
+ --disable-x11-shm) has_x11_shm="no"
+ ;;
+ --disable-x11-xv) has_x11_xv="no"
+@@ -2157,6 +2164,7 @@
+ echo "debug version: $debuginfo"
+ echo "GProf enabled: $gprof_build"
+ echo "Static build enabled: $static_build"
++echo "Static libs build enabled: $static_libs"
+ echo "Memory tracking enabled: $use_memory_tracking"
+ echo "Use standard memory allocator: $use_std_alloc"
+ echo "fixed-point version: $use_fixed_point"
+@@ -2700,6 +2708,7 @@
+ echo "DEBUGBUILD=$debuginfo" >> config.mak
+ echo "GPROFBUILD=$gprof_build" >> config.mak
+ echo "STATICBUILD=$static_build" >> config.mak
++echo "STATICLIBS=$static_libs" >> config.mak
+
+ echo "CONFIG_IPV6=$has_ipv6" >> config.mak
+ if test "$has_ipv6" = "yes" ; then
+@@ -2893,8 +2893,6 @@
+ mkdir ./bin/gcc/temp
+ fi
+
+-echo '%.opic : %.c' >> config.mak
+-echo ' $(CC) $(CFLAGS) $(PIC_CFLAGS) -c $< -o $@' >> config.mak
+
+ #pkg-config
+ echo "prefix=$prefix" > gpac.pc
+diff -ur gpac/Makefile gpac.new/Makefile
+--- gpac/Makefile 2012-05-25 08:05:57.000000000 -0400
++++ gpac.new/Makefile 2012-10-04 14:05:08.000000000 -0400
+@@ -119,9 +119,6 @@
+ $(INSTALL) $(INSTFLAGS) -m 755 bin/gcc/libgpac.$(DYN_LIB_SUFFIX).$(VERSION_SONAME) $(DESTDIR)$(prefix)/$(libdir)/libgpac.$(DYN_LIB_SUFFIX).$(VERSION_SONAME)
+ ln -sf libgpac.$(DYN_LIB_SUFFIX).$(VERSION_SONAME) $(DESTDIR)$(prefix)/$(libdir)/libgpac.so.$(VERSION_MAJOR)
+ ln -sf libgpac.$(DYN_LIB_SUFFIX).$(VERSION_SONAME) $(DESTDIR)$(prefix)/$(libdir)/libgpac.so
+-ifeq ($(DESTDIR)$(prefix),$(prefix))
+- ldconfig || true
+-endif
+ endif
+ endif
+
+@@ -138,7 +135,9 @@
+ $(INSTALL) $(INSTFLAGS) -m 644 $(SRC_PATH)/include/gpac/enst/*.h "$(DESTDIR)$(prefix)/include/gpac/enst"
+ endif
+ mkdir -p "$(DESTDIR)$(prefix)/$(libdir)"
++ifeq ($(STATICLIBS),yes)
+ $(INSTALL) $(INSTFLAGS) -m 644 "./bin/gcc/libgpac_static.a" "$(DESTDIR)$(prefix)/$(libdir)"
++endif
+ $(MAKE) installdylib
+
+ uninstall-lib:
+diff -ur gpac/src/Makefile gpac.new/src/Makefile
+--- gpac/src/Makefile 2012-10-04 14:14:18.000000000 -0400
++++ gpac.new/src/Makefile 2012-10-04 13:59:58.000000000 -0400
+@@ -291,12 +291,16 @@
+
+ $(LIB): $(LIBGPAC_UTILS) $(LIBGPAC_IETF) $(LIBGPAC_BIFS) $(LIBGPAC_ODF) $(LIBGPAC_LASER) $(LIBGPAC_ISOM) $(LIBGPAC_SCENEMANAGER) $(LIBGPAC_TERMINAL) compositor scenegraph mediatools mcrypt $(OBJS)
+ ifeq ($(CONFIG_DARWIN),yes)
++ifeq ($(STATICLIBS),yes)
+ libtool -s -o ../bin/gcc/libgpac_static.a $(OBJS)
+ ranlib ../bin/gcc/libgpac_static.a
++endif
+ $(CC) $(SHFLAGS) $(LD_SONAME) $(LDFLAGS) -o ../bin/gcc/$@ $(OBJS) $(EXTRALIBS)
+ else
++ifeq ($(STATICLIBS),yes)
+ ar cr ../bin/gcc/libgpac_static.a $(OBJS)
+ ranlib ../bin/gcc/libgpac_static.a
++endif
+ $(CC) $(SHFLAGS) $(LD_SONAME) $(LDFLAGS) -o ../bin/gcc/$@ $(OBJS) $(EXTRALIBS)
+ ifeq (,$(findstring yes, $(CONFIG_WIN32)))
+ mv ../bin/gcc/$@ ../bin/gcc/$@.$(VERSION_SONAME)
diff --git a/media-video/gpac/files/gpac-0.5.0-ffmpeg2.patch b/media-video/gpac/files/gpac-0.5.0-ffmpeg2.patch
new file mode 100644
index 000000000000..f9dd4ba340a7
--- /dev/null
+++ b/media-video/gpac/files/gpac-0.5.0-ffmpeg2.patch
@@ -0,0 +1,28 @@
+Index: gpac/modules/ffmpeg_in/ffmpeg_demux.c
+===================================================================
+--- gpac.orig/modules/ffmpeg_in/ffmpeg_demux.c
++++ gpac/modules/ffmpeg_in/ffmpeg_demux.c
+@@ -614,7 +614,7 @@ static GF_Err FFD_ConnectService(GF_Inpu
+ }
+ /*setup downloader*/
+ av_in->flags |= AVFMT_NOFILE;
+-#if (LIBAVFORMAT_VERSION_MAJOR < 55) /*commit ffmpeg 603b8bc2a109978c8499b06d2556f1433306eca7*/
++#if (LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53,4,0)) /*commit ffmpeg 603b8bc2a109978c8499b06d2556f1433306eca7*/
+ res = avformat_open_input(&ffd->ctx, szName, av_in, NULL);
+ #else
+ res = av_open_input_stream(&ffd->ctx, &ffd->io, szName, av_in, NULL);
+Index: gpac/modules/ffmpeg_in/ffmpeg_in.h
+===================================================================
+--- gpac.orig/modules/ffmpeg_in/ffmpeg_in.h
++++ gpac/modules/ffmpeg_in/ffmpeg_in.h
+@@ -96,6 +96,10 @@ void gf_av_vlog(void* avcl, int level, c
+ #endif
+
+
++#ifndef AVCODEC_MAX_AUDIO_FRAME_SIZE
++#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio
++#endif
++
+
+
+ /*FFMPEG decoder module */
diff --git a/media-video/gpac/files/gpac-0.5.0-libav9.patch b/media-video/gpac/files/gpac-0.5.0-libav9.patch
new file mode 100644
index 000000000000..687bffc009db
--- /dev/null
+++ b/media-video/gpac/files/gpac-0.5.0-libav9.patch
@@ -0,0 +1,93 @@
+--- ./work/gpac/modules/ffmpeg_in/ffmpeg_decode.c.original 2012-02-29 18:24:24.000000000 +0200
++++ ./work/gpac/modules/ffmpeg_in/ffmpeg_decode.c 2013-05-28 13:45:02.415980878 +0300
+@@ -169,7 +169,7 @@ static GF_Err FFDEC_AttachStream(GF_Base
+ frame = &ffd->base_frame;
+ }
+ if (!(*ctx)){
+- *ctx = avcodec_alloc_context();
++ *ctx = avcodec_alloc_context3(NULL);
+ }
+
+ /*private FFMPEG DSI*/
+@@ -317,7 +317,7 @@ static GF_Err FFDEC_AttachStream(GF_Base
+ (*ctx)->pix_fmt = ffd->raw_pix_fmt;
+ if ((*ctx)->extradata && strstr((*ctx)->extradata, "BottomUp")) ffd->flipped = 1;
+ } else {
+- if (avcodec_open((*ctx), (*codec) )<0) return GF_NON_COMPLIANT_BITSTREAM;
++ if (avcodec_open2((*ctx), (*codec), NULL)<0) return GF_NON_COMPLIANT_BITSTREAM;
+ }
+
+ /*setup audio streams*/
+@@ -749,7 +749,7 @@ redecode:
+ here this means the DSI was broken, so no big deal*/
+ avcodec_close(ctx);
+ *codec = avcodec_find_decoder(CODEC_ID_H263);
+- if (! (*codec) || (avcodec_open(ctx, *codec)<0)) return GF_NON_COMPLIANT_BITSTREAM;
++ if (! (*codec) || (avcodec_open2(ctx, *codec, NULL)<0)) return GF_NON_COMPLIANT_BITSTREAM;
+ #if USE_AVCODEC2
+ if (avcodec_decode_video2(ctx, frame, &gotpic, &pkt) < 0) {
+ #else
+@@ -759,7 +759,7 @@ redecode:
+ avcodec_close(ctx);
+ *codec = avcodec_find_decoder(old_codec);
+ assert(*codec);
+- avcodec_open(ctx, *codec);
++ avcodec_open2(ctx, *codec, NULL);
+ return GF_NON_COMPLIANT_BITSTREAM;
+ }
+ }
+--- ./work/gpac/modules/ffmpeg_in/ffmpeg_demux.c.original 2012-04-04 15:57:37.000000000 +0300
++++ ./work/gpac/modules/ffmpeg_in/ffmpeg_demux.c 2013-05-28 13:58:57.416188668 +0300
+@@ -290,7 +290,7 @@ static Bool FFD_CanHandleURL(GF_InputSer
+ return 0;
+ }
+ }
+- if (!ctx || av_find_stream_info(ctx) <0) goto exit;
++ if (!ctx || avformat_find_stream_info(ctx, NULL) <0) goto exit;
+
+ /*figure out if we can use codecs or not*/
+ has_video = has_audio = 0;
+@@ -614,7 +614,7 @@ static GF_Err FFD_ConnectService(GF_Inpu
+ }
+ /*setup downloader*/
+ av_in->flags |= AVFMT_NOFILE;
+-#if FF_API_FORMAT_PARAMETERS /*commit ffmpeg 603b8bc2a109978c8499b06d2556f1433306eca7*/
++#if (LIBAVFORMAT_VERSION_MAJOR < 55) /*commit ffmpeg 603b8bc2a109978c8499b06d2556f1433306eca7*/
+ res = avformat_open_input(&ffd->ctx, szName, av_in, NULL);
+ #else
+ res = av_open_input_stream(&ffd->ctx, &ffd->io, szName, av_in, NULL);
+@@ -637,7 +637,7 @@ static GF_Err FFD_ConnectService(GF_Inpu
+
+ GF_LOG(GF_LOG_DEBUG, GF_LOG_CONTAINER, ("[FFMPEG] looking for streams in %s - %d streams - type %s\n", ffd->ctx->filename, ffd->ctx->nb_streams, ffd->ctx->iformat->name));
+
+- res = av_find_stream_info(ffd->ctx);
++ res = avformat_find_stream_info(ffd->ctx, NULL);
+ if (res <0) {
+ GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[FFMPEG] cannot locate streams - error %d\n", res));
+ e = GF_NOT_SUPPORTED;
+@@ -699,7 +699,7 @@ static GF_Err FFD_ConnectService(GF_Inpu
+ if (!ffd->seekable) {
+ av_close_input_file(ffd->ctx);
+ open_file(&ffd->ctx, szName, av_in);
+- av_find_stream_info(ffd->ctx);
++ avformat_find_stream_info(ffd->ctx, NULL);
+ }
+ }
+
+--- ./work/gpac/modules/redirect_av/ffmpeg_ts_muxer.c.original 2011-05-03 16:00:46.000000000 +0300
++++ ./work/gpac/modules/redirect_av/ffmpeg_ts_muxer.c 2013-05-28 13:39:10.694202510 +0300
+@@ -231,12 +231,12 @@ GF_AbstractTSMuxer * ts_amux_new(GF_AVRe
+ dump_format(ts->oc, 0, avr->destination, 1);
+ GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[AVRedirect] DUMPING to %s...\n", ts->destination));
+
+- if (avcodec_open(ts->video_st->codec, avr->videoCodec) < 0) {
++ if (avcodec_open2(ts->video_st->codec, avr->videoCodec, NULL) < 0) {
+ GF_LOG(GF_LOG_ERROR, GF_LOG_MODULE, ("[AVRedirect] failed to open video codec\n"));
+ return NULL;
+ }
+ #if REDIRECT_AV_AUDIO_ENABLED
+- if (avcodec_open(ts->audio_st->codec, avr->audioCodec) < 0) {
++ if (avcodec_open2(ts->audio_st->codec, avr->audioCodec, NULL) < 0) {
+ GF_LOG(GF_LOG_ERROR, GF_LOG_MODULE, ("[AVRedirect] failed to open audio codec\n"));
+ return NULL;
+ }
diff --git a/media-video/gpac/files/gpac-0.5.0-mp42ts.patch b/media-video/gpac/files/gpac-0.5.0-mp42ts.patch
new file mode 100644
index 000000000000..2ab9b542075e
--- /dev/null
+++ b/media-video/gpac/files/gpac-0.5.0-mp42ts.patch
@@ -0,0 +1,17 @@
+It is built but not installed.
+https://bugs.gentoo.org/show_bug.cgi?id=459630
+
+Index: gpac/Makefile
+===================================================================
+--- gpac.orig/Makefile
++++ gpac/Makefile
+@@ -59,6 +59,9 @@ install:
+ $(INSTALL) -d "$(DESTDIR)$(prefix)/bin"
+ ifeq ($(DISABLE_ISOFF), no)
+ $(INSTALL) $(INSTFLAGS) -m 755 bin/gcc/MP4Box "$(DESTDIR)$(prefix)/bin"
++ifeq ($(DISABLE_M2TS), no)
++ $(INSTALL) $(INSTFLAGS) -m 755 bin/gcc/mp42ts "$(DESTDIR)$(prefix)/bin"
++endif
+ endif
+ ifeq ($(DISABLE_PLAYER), no)
+ $(INSTALL) $(INSTFLAGS) -m 755 bin/gcc/MP4Client "$(DESTDIR)$(prefix)/bin"
diff --git a/media-video/gpac/files/gpac-0.5.0-respect_ldflags.patch b/media-video/gpac/files/gpac-0.5.0-respect_ldflags.patch
new file mode 100644
index 000000000000..3b37cfe0dfc8
--- /dev/null
+++ b/media-video/gpac/files/gpac-0.5.0-respect_ldflags.patch
@@ -0,0 +1,45 @@
+http://bugs.gentoo.org/258331
+http://bugs.gentoo.org/310257
+http://bugs.gentoo.org/331067
+
+Also fix underlinkage of the pulse module.
+
+Index: gpac/modules/jack/Makefile
+===================================================================
+--- gpac.orig/modules/jack/Makefile
++++ gpac/modules/jack/Makefile
+@@ -25,7 +25,7 @@ LIB=gm_jack.$(DYN_LIB_SUFFIX)
+ all: $(LIB)
+
+ $(LIB): $(OBJS)
+- $(CC) $(SHFLAGS) -o ../../bin/gcc/$@ $(OBJS) $(EXTRALIBS) -L../../bin/gcc -lgpac -L/usr/lib -ljack
++ $(CC) $(SHFLAGS) $(LDFLAGS) -o ../../bin/gcc/$@ $(OBJS) $(EXTRALIBS) -L../../bin/gcc -lgpac -L/usr/lib -ljack
+
+
+ %.o: %.c
+Index: gpac/modules/oss_audio/Makefile
+===================================================================
+--- gpac.orig/modules/oss_audio/Makefile
++++ gpac/modules/oss_audio/Makefile
+@@ -35,7 +35,7 @@ LIB=gm_oss_audio.$(DYN_LIB_SUFFIX)
+ all: $(LIB)
+
+ $(LIB): $(OBJS)
+- $(CC) $(SHFLAGS) -o ../../bin/gcc/$@ $(OBJS) $(EXTRALIBS) -L../../bin/gcc -lgpac $(OSS_LDFLAGS)
++ $(CC) $(SHFLAGS) $(LDFLAGS) -o ../../bin/gcc/$@ $(OBJS) $(EXTRALIBS) -L../../bin/gcc -lgpac $(OSS_LDFLAGS)
+ ifeq ($(STATICBUILD),yes)
+ $(CC) $(SHFLAGS) $(LDFLAGS) -o ../../bin/gcc/gm_oss_audio-static.$(DYN_LIB_SUFFIX) $(OBJS) $(EXTRALIBS) -L../../bin/gcc -lgpac_static $(OSS_LDFLAGS)
+ endif
+Index: gpac/modules/pulseaudio/Makefile
+===================================================================
+--- gpac.orig/modules/pulseaudio/Makefile
++++ gpac/modules/pulseaudio/Makefile
+@@ -25,7 +25,7 @@ LIB=gm_pulseaudio.$(DYN_LIB_SUFFIX)
+ all: $(LIB)
+
+ $(LIB): $(OBJS)
+- $(CC) $(SHFLAGS) -o ../../bin/gcc/$@ $(OBJS) $(EXTRALIBS) -L../../bin/gcc -lgpac -L/usr/lib -lpulse-simple
++ $(CC) $(SHFLAGS) $(LDFLAGS) -o ../../bin/gcc/$@ $(OBJS) $(EXTRALIBS) -L../../bin/gcc -lgpac -L/usr/lib -lpulse-simple -lpulse
+
+
+ %.o: %.c
diff --git a/media-video/gpac/files/gpac-0.5.1-build-fixes.patch b/media-video/gpac/files/gpac-0.5.1-build-fixes.patch
new file mode 100644
index 000000000000..c28e80343e49
--- /dev/null
+++ b/media-video/gpac/files/gpac-0.5.1-build-fixes.patch
@@ -0,0 +1,206 @@
+Index: Makefile
+===================================================================
+--- Makefile (revision 5456)
++++ Makefile (working copy)
+@@ -78,6 +78,9 @@
+ ifeq ($(DISABLE_ISOFF), no)
+ $(INSTALL) $(INSTFLAGS) -m 755 bin/gcc/MP4Box "$(DESTDIR)$(prefix)/bin"
+ endif
++ifeq ($(DISABLE_M2TS), no)
++ $(INSTALL) $(INSTFLAGS) -m 755 bin/gcc/mp42ts "$(DESTDIR)$(prefix)/bin"
++endif
+ ifeq ($(DISABLE_PLAYER), no)
+ $(INSTALL) $(INSTFLAGS) -m 755 bin/gcc/MP4Client "$(DESTDIR)$(prefix)/bin"
+ endif
+@@ -142,9 +145,6 @@
+ $(INSTALL) $(INSTFLAGS) -m 755 bin/gcc/libgpac.$(DYN_LIB_SUFFIX).$(VERSION_SONAME) $(DESTDIR)$(prefix)/$(libdir)/libgpac.$(DYN_LIB_SUFFIX).$(VERSION_SONAME)
+ ln -sf libgpac.$(DYN_LIB_SUFFIX).$(VERSION_SONAME) $(DESTDIR)$(prefix)/$(libdir)/libgpac.so.$(VERSION_MAJOR)
+ ln -sf libgpac.$(DYN_LIB_SUFFIX).$(VERSION_SONAME) $(DESTDIR)$(prefix)/$(libdir)/libgpac.so
+-ifeq ($(DESTDIR)$(prefix),$(prefix))
+- ldconfig || true
+-endif
+ endif
+ endif
+
+@@ -161,7 +161,9 @@
+ $(INSTALL) $(INSTFLAGS) -m 644 $(SRC_PATH)/include/gpac/enst/*.h "$(DESTDIR)$(prefix)/include/gpac/enst"
+ endif
+ mkdir -p "$(DESTDIR)$(prefix)/$(libdir)"
++ifeq ($(STATICLIBS),yes)
+ $(INSTALL) $(INSTFLAGS) -m 644 "./bin/gcc/libgpac_static.a" "$(DESTDIR)$(prefix)/$(libdir)"
++endif
+ $(MAKE) installdylib
+
+ uninstall-lib:
+Index: applications/mp4box/main.c
+===================================================================
+--- applications/mp4box/main.c (revision 5456)
++++ applications/mp4box/main.c (working copy)
+@@ -1508,10 +1508,10 @@
+ (*descs)[(*nb_descs)-1][len] = 0;
+ }
+ else if (!strnicmp(opts, "xlink=", 6)) {
+- if (strlen(opts+6) > 199) {
++ if (strlen(opts+6) > 99) {
+ GF_LOG(GF_LOG_ERROR, GF_LOG_DASH, ("[DASH] XLink cannot exceed 99 characters in MP4Box, truncating ...\n"));
+ }
+- strncpy(di->xlink, opts+6, 199);
++ strncpy(di->xlink, opts+6, 99);
+ }
+
+ if (!sep) break;
+Index: configure
+===================================================================
+--- configure (revision 5456)
++++ configure (working copy)
+@@ -101,6 +101,7 @@
+ has_openjpeg="no"
+ gprof_build="no"
+ static_build="no"
++static_libs="no"
+ want_pic="no"
+ has_joystick="no"
+ has_xul="no"
+@@ -230,6 +231,7 @@
+ --disable-platinum disable Platinum UPnP support
+ --disable-alsa disable Alsa audio
+ --disable-oss-audio disable OSS audio
++ --disable-sdl disable SDL support
+ --enable-jack enable Jack audio
+ --disable-jack disable Jack audio
+ --enable-pulseaudio enable Pulse audio
+@@ -245,6 +247,7 @@
+ --enable-amr-wb enable AMR WB library
+ --enable-amr enable both AMR NB and WB libraries
+ --enable-static-bin GPAC static build
++ --enable-static-lib GPAC static libraries build
+ --static-mp4box configure for static linking of MP4Box.
+ --enable-depth enables depth handling in the compositor
+
+@@ -1761,6 +1764,8 @@
+ ;;
+ --enable-static-bin) static_build="yes";
+ ;;
++ --enable-static-lib) static_libs="yes";
++ ;;
+ --disable-ipv6) has_ipv6="no"
+ ;;
+ --disable-wx) has_wx="no"
+@@ -1769,6 +1774,8 @@
+ ;;
+ --disable-oss-audio) has_oss_audio="no"
+ ;;
++ --disable-sdl) has_sdl="no"
++ ;;
+ --disable-x11-shm) has_x11_shm="no"
+ ;;
+ --disable-x11-xv) has_x11_xv="no"
+@@ -2422,6 +2429,7 @@
+ echo "debug version: $debuginfo"
+ echo "GProf enabled: $gprof_build"
+ echo "Static build enabled: $static_build"
++echo "Static libs build enabled: $static_libs"
+ echo "Memory tracking enabled: $use_memory_tracking"
+ echo "Use standard memory allocator: $use_std_alloc"
+ echo "Fixed-Point Version: $use_fixed_point"
+@@ -3039,6 +3047,7 @@
+ echo "DEBUGBUILD=$debuginfo" >> config.mak
+ echo "GPROFBUILD=$gprof_build" >> config.mak
+ echo "STATICBUILD=$static_build" >> config.mak
++echo "STATICLIBS=$static_libs" >> config.mak
+
+ echo "CONFIG_IPV6=$has_ipv6" >> config.mak
+ if test "$has_ipv6" = "yes" ; then
+@@ -3237,12 +3246,6 @@
+ fi
+
+
+-echo '%.opic : %.c' >> config.mak
+-if test "$verbose" = "no" ; then
+-echo ' @echo " CC $<"' >> config.mak
+-fi
+-echo ' $(CC) $(CFLAGS) $(PIC_CFLAGS) -c $< -o $@' >> config.mak
+-
+ echo '%.o : %.c' >> config.mak
+ if test "$verbose" = "no" ; then
+ echo ' @echo " CC $<"' >> config.mak
+Index: modules/jack/Makefile
+===================================================================
+--- modules/jack/Makefile (revision 5456)
++++ modules/jack/Makefile (working copy)
+@@ -25,7 +25,7 @@
+ all: $(LIB)
+
+ $(LIB): $(OBJS)
+- $(CC) $(SHFLAGS) -o ../../bin/gcc/$@ $(OBJS) $(EXTRALIBS) -L../../bin/gcc -lgpac -L/usr/lib -ljack
++ $(CC) $(SHFLAGS) $(LDFLAGS) -o ../../bin/gcc/$@ $(OBJS) $(EXTRALIBS) -L../../bin/gcc -lgpac -L/usr/lib -ljack
+
+ clean:
+ rm -f $(OBJS) ../../bin/gcc/$(LIB)
+Index: modules/oss_audio/Makefile
+===================================================================
+--- modules/oss_audio/Makefile (revision 5456)
++++ modules/oss_audio/Makefile (working copy)
+@@ -35,7 +35,7 @@
+ all: $(LIB)
+
+ $(LIB): $(OBJS)
+- $(CC) $(SHFLAGS) -o ../../bin/gcc/$@ $(OBJS) $(EXTRALIBS) -L../../bin/gcc -lgpac $(OSS_LDFLAGS)
++ $(CC) $(SHFLAGS) $(LDFLAGS) -o ../../bin/gcc/$@ $(OBJS) $(EXTRALIBS) -L../../bin/gcc -lgpac $(OSS_LDFLAGS)
+ ifeq ($(STATICBUILD),yes)
+ $(CC) $(SHFLAGS) $(LDFLAGS) -o ../../bin/gcc/gm_oss_audio-static.$(DYN_LIB_SUFFIX) $(OBJS) $(EXTRALIBS) -L../../bin/gcc -lgpac_static $(OSS_LDFLAGS)
+ endif
+Index: modules/pulseaudio/Makefile
+===================================================================
+--- modules/pulseaudio/Makefile (revision 5456)
++++ modules/pulseaudio/Makefile (working copy)
+@@ -25,7 +25,7 @@
+ all: $(LIB)
+
+ $(LIB): $(OBJS)
+- $(CC) $(SHFLAGS) -o ../../bin/gcc/$@ $(OBJS) $(EXTRALIBS) -L../../bin/gcc -lgpac -L/usr/lib -lpulse-simple
++ $(CC) $(SHFLAGS) $(LDFLAGS) -o ../../bin/gcc/$@ $(OBJS) $(EXTRALIBS) -L../../bin/gcc -lgpac -L/usr/lib -lpulse-simple -lpulse
+
+ clean:
+ rm -f $(OBJS) ../../bin/gcc/$(LIB)
+Index: modules/vtt_in/vtt_dec.c
+===================================================================
+--- modules/vtt_in/vtt_dec.c (revision 5456)
++++ modules/vtt_in/vtt_dec.c (working copy)
+@@ -128,6 +128,7 @@
+
+ case GPAC_OTI_SCENE_VTT_MP4:
+ {
++#ifdef GPAC_HAS_SPIDERMONKEY
+ char start[100], end[100];
+ GF_List *cues;
+ cues = gf_webvtt_parse_cues_from_data(inBuffer, inBufferLength, 0);
+@@ -142,6 +143,7 @@
+ }
+ }
+ gf_list_del(cues);
++#endif
+ }
+ break;
+
+Index: src/Makefile
+===================================================================
+--- src/Makefile (revision 5456)
++++ src/Makefile (working copy)
+@@ -607,12 +607,16 @@
+ @echo "OBJS $(OBJS)"
+ @echo "LIBS $(EXTRALIBS)"
+ ifeq ($(CONFIG_DARWIN),yes)
++ifeq ($(STATICLIBS),yes)
+ $(LIBTOOL) -s -o ../bin/gcc/libgpac_static.a $(OBJS)
+ $(RANLIB) ../bin/gcc/libgpac_static.a
++endif
+ $(CC) $(SHFLAGS) $(LD_SONAME) $(LDFLAGS) -o $@ $(OBJS) $(EXTRALIBS)
+ else
++ifeq ($(STATICLIBS),yes)
+ $(AR) cr ../bin/gcc/libgpac_static.a $(OBJS)
+ $(RANLIB) ../bin/gcc/libgpac_static.a
++endif
+ $(CC) $(SHFLAGS) $(LD_SONAME) $(LDFLAGS) -o $@ $(OBJS) $(EXTRALIBS)
+ ifeq (,$(findstring yes, $(CONFIG_WIN32)))
+ mv $@ $@.$(VERSION_SONAME)
diff --git a/media-video/gpac/gpac-0.5.0-r1.ebuild b/media-video/gpac/gpac-0.5.0-r1.ebuild
new file mode 100644
index 000000000000..9ddbb428c07e
--- /dev/null
+++ b/media-video/gpac/gpac-0.5.0-r1.ebuild
@@ -0,0 +1,129 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils flag-o-matic multilib toolchain-funcs
+
+DESCRIPTION="GPAC is an implementation of the MPEG-4 Systems standard developed from scratch in ANSI C"
+HOMEPAGE="http://gpac.wp.mines-telecom.fr/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ppc ppc64 sparc x86 ~x86-fbsd"
+IUSE="a52 aac alsa debug dvb ffmpeg ipv6 jack jpeg jpeg2k mad opengl oss png pulseaudio sdl ssl static-libs theora truetype vorbis xml xvid"
+
+S="${WORKDIR}"/${PN}
+
+RDEPEND="
+ a52? ( media-libs/a52dec )
+ aac? ( >=media-libs/faad2-2.0 )
+ alsa? ( media-libs/alsa-lib )
+ dvb? ( media-tv/linuxtv-dvb-apps )
+ ffmpeg? ( virtual/ffmpeg )
+ jack? ( media-sound/jack-audio-connection-kit )
+ jpeg? ( virtual/jpeg )
+ mad? ( >=media-libs/libmad-0.15.1b )
+ opengl? ( virtual/opengl media-libs/freeglut virtual/glu )
+ >=media-libs/libogg-1.1
+ png? ( >=media-libs/libpng-1.4 )
+ vorbis? ( >=media-libs/libvorbis-1.1 )
+ theora? ( media-libs/libtheora )
+ truetype? ( >=media-libs/freetype-2.1.4 )
+ xml? ( >=dev-libs/libxml2-2.6.0 )
+ xvid? ( >=media-libs/xvid-1.0.1 )
+ sdl? ( media-libs/libsdl )
+ jpeg2k? ( media-libs/openjpeg:0 )
+ ssl? ( dev-libs/openssl )
+ pulseaudio? ( media-sound/pulseaudio )
+ x11-libs/libXt
+ x11-libs/libX11
+ x11-libs/libXv
+ x11-libs/libXext"
+# disabled upstream, see applications/Makefile
+# wxwidgets? ( =x11-libs/wxGTK-2.8* )
+
+DEPEND="${RDEPEND}"
+
+my_use() {
+ local flag="$1" pflag="${2:-$1}"
+ if use ${flag}; then
+ echo "--use-${pflag}=system"
+ else
+ echo "--use-${pflag}=no"
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/110_all_implicitdecls.patch \
+ "${FILESDIR}"/210_all_system_libogg.patch \
+ "${FILESDIR}"/${P}-build-fixes.patch \
+ "${FILESDIR}"/${P}-libav9.patch \
+ "${FILESDIR}"/${P}-ffmpeg2.patch \
+ "${FILESDIR}"/${P}-mp42ts.patch \
+ "${FILESDIR}"/${P}-respect_ldflags.patch
+
+ # remove last of internal ogg
+ sed -i \
+ -e 's:<gpac/internal/ogg.h>:<ogg/ogg.h>:' \
+ src/media_tools/{av_parsers,gpac_ogg,media_import,media_export}.c || die
+ rm -f include/gpac/internal/ogg.h || die
+
+ chmod +x configure
+
+ # make sure configure looks for wx without needing eselect set
+ # if use wxwidgets; then
+ # WX_GTK_VER=2.8
+ # need-wxwidgets unicode
+ # sed -i -e "s:wx-config:${WX_CONFIG}:g" configure || die
+ #else
+ # sed -i -e "s:wx-config:wx-config-doesnotexist:g" configure || die
+ #fi
+}
+
+src_configure() {
+ tc-export CC CXX AR RANLIB
+
+ econf \
+ --enable-svg \
+ --enable-pic \
+ --disable-amr \
+ --use-js=no \
+ --use-ogg=system \
+ $(use_enable alsa) \
+ $(use_enable debug) \
+ $(use_enable ipv6) \
+ $(use_enable jack jack yes) \
+ $(use_enable opengl) \
+ $(use_enable oss oss-audio) \
+ $(use_enable pulseaudio pulseaudio yes) \
+ $(use_enable sdl) \
+ $(use_enable ssl) \
+ $(use_enable static-libs static-lib) \
+ --disable-wx \
+ $(my_use a52) \
+ $(my_use aac faad) \
+ $(my_use dvb dvbx) \
+ $(my_use ffmpeg) \
+ $(my_use jpeg) \
+ $(my_use jpeg2k openjpeg) \
+ $(my_use mad) \
+ $(my_use png) \
+ $(my_use theora) \
+ $(my_use truetype ft) \
+ $(my_use vorbis) \
+ $(my_use xvid) \
+ --extra-cflags="${CFLAGS}" \
+ --cc="$(tc-getCC)" \
+ --libdir="/$(get_libdir)"
+}
+
+src_install() {
+ emake STRIP="true" DESTDIR="${D}" install
+ emake STRIP="true" DESTDIR="${D}" install-lib
+ dodoc AUTHORS BUGS Changelog README TODO INSTALLME
+ dodoc doc/*.txt
+ dohtml doc/*.html
+}
diff --git a/media-video/gpac/gpac-0.5.1_pre5456.ebuild b/media-video/gpac/gpac-0.5.1_pre5456.ebuild
new file mode 100644
index 000000000000..bb85dde97281
--- /dev/null
+++ b/media-video/gpac/gpac-0.5.1_pre5456.ebuild
@@ -0,0 +1,120 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+if [[ ${PV} == *9999 ]] ; then
+ SCM="subversion"
+ ESVN_REPO_URI="svn://svn.code.sf.net/p/gpac/code/trunk/gpac"
+ KEYWORDS="alpha sparc"
+else
+ if [[ ${PV%_p*} != ${PV} ]] ; then
+ SRC_URI="http://dev.gentoo.org/~lu_zero/${PN}/${P}.tar.xz"
+ else
+ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+ fi
+ KEYWORDS="alpha amd64 ppc ppc64 sparc x86 ~x86-fbsd"
+fi
+
+inherit eutils flag-o-matic multilib toolchain-funcs ${SCM}
+
+DESCRIPTION="GPAC is an implementation of the MPEG-4 Systems standard developed from scratch in ANSI C"
+HOMEPAGE="http://gpac.wp.mines-telecom.fr/"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="a52 aac alsa debug dvb ffmpeg ipv6 jack jpeg jpeg2k mad opengl oss png pulseaudio sdl ssl static-libs theora truetype vorbis xml xvid"
+
+S="${WORKDIR}"/${PN}
+
+RDEPEND="
+ a52? ( media-libs/a52dec )
+ aac? ( >=media-libs/faad2-2.0 )
+ alsa? ( media-libs/alsa-lib )
+ dvb? ( media-tv/linuxtv-dvb-apps )
+ ffmpeg? ( virtual/ffmpeg )
+ jack? ( media-sound/jack-audio-connection-kit )
+ jpeg? ( virtual/jpeg )
+ mad? ( >=media-libs/libmad-0.15.1b )
+ opengl? ( virtual/opengl media-libs/freeglut virtual/glu )
+ >=media-libs/libogg-1.1
+ png? ( >=media-libs/libpng-1.4 )
+ vorbis? ( >=media-libs/libvorbis-1.1 )
+ theora? ( media-libs/libtheora )
+ truetype? ( >=media-libs/freetype-2.1.4 )
+ xml? ( >=dev-libs/libxml2-2.6.0 )
+ xvid? ( >=media-libs/xvid-1.0.1 )
+ sdl? ( media-libs/libsdl )
+ jpeg2k? ( media-libs/openjpeg:0 )
+ ssl? ( dev-libs/openssl )
+ pulseaudio? ( media-sound/pulseaudio )
+ x11-libs/libXt
+ x11-libs/libX11
+ x11-libs/libXv
+ x11-libs/libXext"
+# disabled upstream, see applications/Makefile
+# wxwidgets? ( =x11-libs/wxGTK-2.8* )
+
+DEPEND="${RDEPEND}"
+
+my_use() {
+ local flag="$1" pflag="${2:-$1}"
+ if use ${flag}; then
+ echo "--use-${pflag}=system"
+ else
+ echo "--use-${pflag}=no"
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/110_all_implicitdecls.patch \
+ "${FILESDIR}"/${PN}-0.5.1-build-fixes.patch \
+ "${FILESDIR}"/ffmpeg25.patch
+ sed -i -e "s:\(--disable-.*\)=\*):\1):" configure || die
+}
+
+src_configure() {
+ tc-export CC CXX AR RANLIB
+
+ econf \
+ --enable-svg \
+ --enable-pic \
+ --disable-amr \
+ --use-js=no \
+ --use-ogg=system \
+ $(use_enable alsa) \
+ $(use_enable debug) \
+ $(use_enable ipv6) \
+ $(use_enable jack jack yes) \
+ $(use_enable opengl) \
+ $(use_enable oss oss-audio) \
+ $(use_enable pulseaudio pulseaudio yes) \
+ $(use_enable sdl) \
+ $(use_enable ssl) \
+ $(use_enable static-libs static-lib) \
+ --disable-wx \
+ $(my_use a52) \
+ $(my_use aac faad) \
+ $(my_use dvb dvbx) \
+ $(my_use ffmpeg) \
+ $(my_use jpeg) \
+ $(my_use jpeg2k openjpeg) \
+ $(my_use mad) \
+ $(my_use png) \
+ $(my_use theora) \
+ $(my_use truetype ft) \
+ $(my_use vorbis) \
+ $(my_use xvid) \
+ --extra-cflags="${CFLAGS}" \
+ --cc="$(tc-getCC)" \
+ --libdir="/$(get_libdir)"
+}
+
+src_install() {
+ emake STRIP="true" DESTDIR="${D}" install
+ emake STRIP="true" DESTDIR="${D}" install-lib
+ dodoc AUTHORS BUGS Changelog README TODO INSTALLME
+ dodoc doc/*.txt
+ dohtml doc/*.html
+}
diff --git a/media-video/gpac/gpac-9999.ebuild b/media-video/gpac/gpac-9999.ebuild
new file mode 100644
index 000000000000..d2209c42a53b
--- /dev/null
+++ b/media-video/gpac/gpac-9999.ebuild
@@ -0,0 +1,115 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+if [[ ${PV} == *9999 ]] ; then
+ SCM="subversion"
+ ESVN_REPO_URI="svn://svn.code.sf.net/p/gpac/code/trunk/gpac"
+ KEYWORDS=""
+else
+ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+fi
+
+inherit eutils flag-o-matic multilib toolchain-funcs ${SCM}
+
+DESCRIPTION="GPAC is an implementation of the MPEG-4 Systems standard developed from scratch in ANSI C"
+HOMEPAGE="http://gpac.wp.mines-telecom.fr/"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="a52 aac alsa debug dvb ffmpeg ipv6 jack jpeg jpeg2k mad opengl oss png pulseaudio sdl ssl static-libs theora truetype vorbis xml xvid"
+
+S="${WORKDIR}"/${PN}
+
+RDEPEND="
+ a52? ( media-libs/a52dec )
+ aac? ( >=media-libs/faad2-2.0 )
+ alsa? ( media-libs/alsa-lib )
+ dvb? ( media-tv/linuxtv-dvb-apps )
+ ffmpeg? ( virtual/ffmpeg )
+ jack? ( media-sound/jack-audio-connection-kit )
+ jpeg? ( virtual/jpeg )
+ mad? ( >=media-libs/libmad-0.15.1b )
+ opengl? ( virtual/opengl media-libs/freeglut virtual/glu )
+ >=media-libs/libogg-1.1
+ png? ( >=media-libs/libpng-1.4 )
+ vorbis? ( >=media-libs/libvorbis-1.1 )
+ theora? ( media-libs/libtheora )
+ truetype? ( >=media-libs/freetype-2.1.4 )
+ xml? ( >=dev-libs/libxml2-2.6.0 )
+ xvid? ( >=media-libs/xvid-1.0.1 )
+ sdl? ( media-libs/libsdl )
+ jpeg2k? ( media-libs/openjpeg:0 )
+ ssl? ( dev-libs/openssl )
+ pulseaudio? ( media-sound/pulseaudio )
+ x11-libs/libXt
+ x11-libs/libX11
+ x11-libs/libXv
+ x11-libs/libXext"
+# disabled upstream, see applications/Makefile
+# wxwidgets? ( =x11-libs/wxGTK-2.8* )
+
+DEPEND="${RDEPEND}"
+
+my_use() {
+ local flag="$1" pflag="${2:-$1}"
+ if use ${flag}; then
+ echo "--use-${pflag}=system"
+ else
+ echo "--use-${pflag}=no"
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/110_all_implicitdecls.patch \
+ "${FILESDIR}"/${PN}-0.5.1-build-fixes.patch
+ sed -i -e "s:\(--disable-.*\)=\*):\1):" configure || die
+}
+
+src_configure() {
+ tc-export CC CXX AR RANLIB
+
+ econf \
+ --enable-svg \
+ --enable-pic \
+ --disable-amr \
+ --use-js=no \
+ --use-ogg=system \
+ $(use_enable alsa) \
+ $(use_enable debug) \
+ $(use_enable ipv6) \
+ $(use_enable jack jack yes) \
+ $(use_enable opengl) \
+ $(use_enable oss oss-audio) \
+ $(use_enable pulseaudio pulseaudio yes) \
+ $(use_enable sdl) \
+ $(use_enable ssl) \
+ $(use_enable static-libs static-lib) \
+ --disable-wx \
+ $(my_use a52) \
+ $(my_use aac faad) \
+ $(my_use dvb dvbx) \
+ $(my_use ffmpeg) \
+ $(my_use jpeg) \
+ $(my_use jpeg2k openjpeg) \
+ $(my_use mad) \
+ $(my_use png) \
+ $(my_use theora) \
+ $(my_use truetype ft) \
+ $(my_use vorbis) \
+ $(my_use xvid) \
+ --extra-cflags="${CFLAGS}" \
+ --cc="$(tc-getCC)" \
+ --libdir="/$(get_libdir)"
+}
+
+src_install() {
+ emake STRIP="true" DESTDIR="${D}" install
+ emake STRIP="true" DESTDIR="${D}" install-lib
+ dodoc AUTHORS BUGS Changelog README TODO INSTALLME
+ dodoc doc/*.txt
+ dohtml doc/*.html
+}
diff --git a/media-video/gpac/metadata.xml b/media-video/gpac/metadata.xml
new file mode 100644
index 000000000000..57a763019a92
--- /dev/null
+++ b/media-video/gpac/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">gpac</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/griffith/Manifest b/media-video/griffith/Manifest
new file mode 100644
index 000000000000..6e073f282a5d
--- /dev/null
+++ b/media-video/griffith/Manifest
@@ -0,0 +1,2 @@
+DIST griffith-0.13.tar.gz 1565903 SHA256 60576d33aa855ab45d654288d7bf2ead8accecb72fd2acbc373656294ab8f242 SHA512 dc8117b1a89253a87eb303c5229e6cdffde26b52de9ac4a3409dcc3f6dca64105f13a98cace225a932aefb2d620e828eea66bae57f40328b7ee3c06a944f0bed WHIRLPOOL 9f46b25e345f5e3b6823c7a5faff173d6d63921b812f7b6de7c0f7c691f881f4252560baae5f4a8660b2f0e94370dcb28e60264d1c261e0b64f03c8d710bcdf1
+DIST griffith-extra-artwork-0.9.4.tar.gz 124008 SHA256 96bc01a05ad54aad9fabcf411809c46c78b990fc7656ea004cebdfd8ea9894fd SHA512 09e912b4511c5c4a7b501d9a8f98223d20e58574e667cdb759e66f743cce14b45cce8bf0f9502ff2aacfc09e7a7b37966a887205a74a6e028b832703a65a2734 WHIRLPOOL 166dcf1bee1ef07452d00b7c87f487fea5417a0b6d156afd127f8723c6d2c44d2a0e4a5719ab5f85c662b7bbc30f0fadd8ba7873908cdf7ae85167b07a518e6b
diff --git a/media-video/griffith/files/0.10-fix_lib_path.patch b/media-video/griffith/files/0.10-fix_lib_path.patch
new file mode 100644
index 000000000000..952448f0f013
--- /dev/null
+++ b/media-video/griffith/files/0.10-fix_lib_path.patch
@@ -0,0 +1,13 @@
+Index: lib/initialize.py
+===================================================================
+--- lib.orig/initialize.py
++++ lib/initialize.py
+@@ -73,7 +73,7 @@ def locations(self, home_dir):
+ os.environ['LANG'] = lang
+
+ elif os.name == 'posix':
+- locations['share'] = os.path.abspath(os.path.join(locations['lib'], '..'))
++ locations['share'] = os.path.abspath(os.path.join(locations['lib'], '../../share/griffith/'))
+ locations['glade'] = os.path.join(locations['share'], 'glade')
+ locations['i18n'] = os.path.abspath(os.path.join(locations['share'], '..', 'locale'))
+ if not os.path.isdir(locations['i18n']):
diff --git a/media-video/griffith/files/griffith-0.12.1-sqlalchemy-0.7.patch b/media-video/griffith/files/griffith-0.12.1-sqlalchemy-0.7.patch
new file mode 100644
index 000000000000..d3e6a5b6e182
--- /dev/null
+++ b/media-video/griffith/files/griffith-0.12.1-sqlalchemy-0.7.patch
@@ -0,0 +1,39 @@
+Index: griffith-0.12.1/lib/add.py
+===================================================================
+--- griffith-0.12.1.orig/lib/add.py
++++ griffith-0.12.1/lib/add.py
+@@ -26,7 +26,7 @@ import logging
+ import os
+
+ import gtk
+-from sqlalchemy.exceptions import IntegrityError
++from sqlalchemy.exc import IntegrityError
+
+ import quick_filter
+ import db
+Index: griffith-0.12.1/lib/db/tables.py
+===================================================================
+--- griffith-0.12.1.orig/lib/db/tables.py
++++ griffith-0.12.1/lib/db/tables.py
+@@ -64,7 +64,7 @@ movies = Table('movies', metadata,
+ Column('poster_md5', ForeignKey(posters.c.md5sum)),
+ Column('loaned', Boolean, nullable=False, default=False),
+ Column('seen', Boolean, nullable=False, default=False),
+- Column('rating', SmallInteger(2)),
++ Column('rating', SmallInteger),
+ Column('color', SmallInteger),
+ Column('cond', SmallInteger), # MySQL will not accept name "condition"
+ Column('layers', SmallInteger),
+Index: griffith-0.12.1/lib/sql.py
+===================================================================
+--- griffith-0.12.1.orig/lib/sql.py
++++ griffith-0.12.1/lib/sql.py
+@@ -29,7 +29,7 @@ import logging
+ import os.path
+
+ from sqlalchemy import create_engine, or_, and_, not_, exists, asc, desc
+-from sqlalchemy.exceptions import OperationalError
++from sqlalchemy.exc import OperationalError
+ from sqlalchemy.orm import sessionmaker, scoped_session
+ from sqlalchemy.sql.expression import Update, Delete
+
diff --git a/media-video/griffith/griffith-0.13-r1.ebuild b/media-video/griffith/griffith-0.13-r1.ebuild
new file mode 100644
index 000000000000..0b6ea928e6ab
--- /dev/null
+++ b/media-video/griffith/griffith-0.13-r1.ebuild
@@ -0,0 +1,76 @@
+# 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='sqlite'
+
+inherit versionator python-single-r1 multilib
+
+ARTWORK_PV="0.9.4"
+
+DESCRIPTION="Movie collection manager"
+HOMEPAGE="http://www.griffith.cc/"
+SRC_URI="http://launchpad.net/${PN}/trunk/${PV}/+download/${P}.tar.gz
+ http://dev.gentoo.org/~hwoarang/distfiles/${PN}-extra-artwork-${ARTWORK_PV}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~x86-fbsd"
+IUSE="doc"
+
+RDEPEND="virtual/python-imaging
+ gnome-base/libglade
+ dev-python/pyxml[${PYTHON_USEDEP}]
+ >=dev-python/pygtk-2.6.1:2[${PYTHON_USEDEP}]
+ dev-python/pygobject:2[${PYTHON_USEDEP}]
+ >=dev-python/sqlalchemy-0.5.2[${PYTHON_USEDEP}]
+ >=dev-python/reportlab-1.19[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}
+ doc? ( app-text/docbook2X )"
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ use doc || { sed -i -e '/docs/d' Makefile || die ; }
+ sed -i \
+ -e 's#/pl/#/pl.UTF-8/#' \
+ "${S}"/docs/pl/Makefile || die "sed failed"
+
+ sed -i \
+ -e 's/ISO-8859-1/UTF-8/' \
+ "${S}"/lib/gconsole.py || die "sed failed"
+
+ epatch "${FILESDIR}/0.10-fix_lib_path.patch"
+}
+
+src_compile() {
+ # Nothing to compile and default `emake` spews an error message
+ true
+}
+
+src_install() {
+ use doc || { sed -i -e '/docs/d' Makefile || die ; }
+
+ emake \
+ LIBDIR="${D}/usr/$(get_libdir)/griffith" \
+ DESTDIR="${D}" DOC2MAN=docbook2man.pl install
+ dodoc AUTHORS ChangeLog README THANKS TODO NEWS TRANSLATORS
+
+ cd "${WORKDIR}/${PN}-extra-artwork-${ARTWORK_PV}/"
+ emake DESTDIR="${D}" install
+ # This carries over from -0.13 but appears to have no effect.
+ python_optimize "${D}"usr/share/${PN}
+}
+
+pkg_postinst() {
+ einfo
+ einfo "${PN} can make use of the following optional dependencies"
+ einfo "dev-python/chardet: CSV file encoding detections"
+ einfo "dev-python/mysql-python: Python interface for MySQL connectivity"
+ einfo ">=dev-python/psycopg-2.4: Python interface for PostgreSQL connectivity"
+ einfo
+}
diff --git a/media-video/griffith/griffith-0.13.ebuild b/media-video/griffith/griffith-0.13.ebuild
new file mode 100644
index 000000000000..f744bd39661d
--- /dev/null
+++ b/media-video/griffith/griffith-0.13.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+PYTHON_DEPEND="2"
+PYTHON_USE_WITH=sqlite
+
+inherit eutils versionator python multilib
+
+ARTWORK_PV="0.9.4"
+
+DESCRIPTION="Movie collection manager"
+HOMEPAGE="http://www.griffith.cc/"
+SRC_URI="http://launchpad.net/${PN}/trunk/${PV}/+download/${P}.tar.gz
+ http://dev.gentoo.org/~hwoarang/distfiles/${PN}-extra-artwork-${ARTWORK_PV}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86 ~x86-fbsd"
+IUSE="doc"
+
+RDEPEND="virtual/python-imaging
+ gnome-base/libglade
+ dev-python/pyxml
+ >=dev-python/pygtk-2.6.1:2
+ dev-python/pygobject:2
+ >=dev-python/sqlalchemy-0.5.2
+ >=dev-python/reportlab-1.19"
+DEPEND="${RDEPEND}
+ doc? ( app-text/docbook2X )"
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_prepare() {
+ sed -i \
+ -e 's#/pl/#/pl.UTF-8/#' \
+ "${S}"/docs/pl/Makefile || die "sed failed"
+
+ sed -i \
+ -e 's/ISO-8859-1/UTF-8/' \
+ "${S}"/lib/gconsole.py || die "sed failed"
+ epatch "${FILESDIR}/0.10-fix_lib_path.patch"
+}
+
+src_compile() {
+ # Nothing to compile and default `emake` spews an error message
+ true
+}
+
+src_install() {
+ use doc || { sed -i -e '/docs/d' Makefile || die ; }
+
+ emake \
+ LIBDIR="${D}/usr/$(get_libdir)/griffith" \
+ DESTDIR="${D}" DOC2MAN=docbook2man.pl install
+ dodoc AUTHORS ChangeLog README THANKS TODO NEWS TRANSLATORS
+
+ cd "${WORKDIR}/${PN}-extra-artwork-${ARTWORK_PV}/"
+ emake DESTDIR="${D}" install
+}
+
+pkg_postinst() {
+ python_mod_optimize /usr/$(get_libdir)/${PN}
+ einfo
+ einfo "${PN} can make use of the following optional dependencies"
+ einfo "dev-python/chardet: CSV file encoding detections"
+ einfo "dev-python/mysql-python: Python interface for MySQL connectivity"
+ einfo ">=dev-python/psycopg-2.4: Python interface for PostgreSQL connectivity"
+ einfo
+}
+
+pkg_postrm() {
+ python_mod_cleanup /usr/$(get_libdir)/${PN}
+}
diff --git a/media-video/griffith/metadata.xml b/media-video/griffith/metadata.xml
new file mode 100644
index 000000000000..8553c721b731
--- /dev/null
+++ b/media-video/griffith/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>video</herd>
+ <maintainer>
+ <email>hwoarang@gentoo.org</email>
+ <name>Markos Chandras</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="launchpad">griffith</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/gtk-recordmydesktop/Manifest b/media-video/gtk-recordmydesktop/Manifest
new file mode 100644
index 000000000000..63f5eb77d071
--- /dev/null
+++ b/media-video/gtk-recordmydesktop/Manifest
@@ -0,0 +1 @@
+DIST gtk-recordmydesktop-0.3.8.tar.gz 176381 SHA256 61ad43a6e4f0bf86d8553f03297e4b1b137b47337fa150ce1da8c24494ca8326 SHA512 7d9785b81b17e7a8fbfcd7dfd227f4bce38b450150b89819b30e9b0e17c4053bda02fc1f653a18ddf4ca2a0f2157dd3c18f061b3ca661c10a9dd7208b1183e49 WHIRLPOOL 1464618ae3e7f93759c5407593bf5da9baaeeace13ec64a25d92c5611a10eb1f5cc84753516f574352a4c58f9c2919657b5bada0d94af0d57706a667110457c6
diff --git a/media-video/gtk-recordmydesktop/files/gtk-recordmydesktop-0.3.8-check-for-jack.patch b/media-video/gtk-recordmydesktop/files/gtk-recordmydesktop-0.3.8-check-for-jack.patch
new file mode 100644
index 000000000000..7743d43199cd
--- /dev/null
+++ b/media-video/gtk-recordmydesktop/files/gtk-recordmydesktop-0.3.8-check-for-jack.patch
@@ -0,0 +1,36 @@
+--- gtk-recordmydesktop-0.3.8.orig/src/rmdPrefsWidget.py 2009-10-12 12:40:32.470028483 +0100
++++ gtk-recordmydesktop-0.3.8/src/rmdPrefsWidget.py 2009-10-12 12:41:08.086044353 +0100
+@@ -323,11 +323,33 @@
+ for i in range(4):
+ self.labelbox[i].show()
+ self.notebook.show()
++
++ def which(self,program):
++ import os
++ def is_exe(fpath):
++ return os.path.exists(fpath) and os.access(fpath, os.X_OK)
++
++ fpath, fname = os.path.split(program)
++ if fpath:
++ if is_exe(program):
++ return program
++ else:
++ for path in os.environ["PATH"].split(os.pathsep):
++ exe_file = os.path.join(path, program)
++ if is_exe(exe_file):
++ return exe_file
++
++ return None
++
++
+ def __runJackLSP__(self,button=None):
+ if button!=None:
+ self.__getSelectedPorts__()
+ self.ports=[]
+ failed=0
++ if self.which('jack_lsp') == None:
++ self.jack_button.set_sensitive(False)
++ return
+ (stdin,stdout,stderr)=os.popen3(['jack_lsp'],'t')
+ ports=stdout.readlines()
+ stdin.close()
diff --git a/media-video/gtk-recordmydesktop/gtk-recordmydesktop-0.3.8-r3.ebuild b/media-video/gtk-recordmydesktop/gtk-recordmydesktop-0.3.8-r3.ebuild
new file mode 100644
index 000000000000..23dd835ca122
--- /dev/null
+++ b/media-video/gtk-recordmydesktop/gtk-recordmydesktop-0.3.8-r3.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+inherit eutils python-single-r1
+
+DESCRIPTION="GTK+ interface for RecordMyDesktop"
+HOMEPAGE="http://recordmydesktop.sourceforge.net/"
+SRC_URI="mirror://sourceforge/recordmydesktop/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+# Test is buggy : bug #186752
+# Tries to run intl-toolupdate without it being substituted from
+# configure, make test tries run make check in flumotion/test what
+# makes me think that this file has been copied from flumotion without
+# much care...
+RESTRICT=test
+
+RDEPEND=">=x11-libs/gtk+-2.10.0:2
+ dev-python/pygtk:2
+ >=media-video/recordmydesktop-0.3.5
+ x11-apps/xwininfo
+ ${PYTHON_DEPS}"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-check-for-jack.patch
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ python_fix_shebang "${D}/usr/bin/gtk-recordMyDesktop"
+ sed -i 's#gtk-recordmydesktop.png#gtk-recordmydesktop#' "${D}/usr/share/applications/gtk-recordmydesktop.desktop" || die
+ dodoc NEWS README AUTHORS ChangeLog
+}
diff --git a/media-video/gtk-recordmydesktop/metadata.xml b/media-video/gtk-recordmydesktop/metadata.xml
new file mode 100644
index 000000000000..7856fb20cfe0
--- /dev/null
+++ b/media-video/gtk-recordmydesktop/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">recordmydesktop</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/guvcview/Manifest b/media-video/guvcview/Manifest
new file mode 100644
index 000000000000..ee9a0dcc4c78
--- /dev/null
+++ b/media-video/guvcview/Manifest
@@ -0,0 +1,5 @@
+DIST guvcview-src-1.6.1.tar.gz 480184 SHA256 b11abb8e5778ebd47adb8486d7762b9494b033f4e8be5b523c16a96a8fc80acb SHA512 dee99d6240dd963353d1519b3f40f5bf19f20cf5013b9d51c45cfae9166f2b1b21e816cbcc0a8a8e441e778edbd1544eca794cda51242b0c1ef52862de6b8acd WHIRLPOOL 30fc07389cbb1661220a863b645be4760fd0138de62443eb123ffb9f79b58b186f5e7c595cb4b0f07accdb512da3706b8e987bb3144ae059f8dc975710a84545
+DIST guvcview-src-1.7.1.tar.gz 464478 SHA256 1809f784210b295c0ba35297977e3416d6ff2545d0b467138d1beff18e731e53 SHA512 af590250a035e0d95005e4b88b2ae3eaba1c427ff857361afbbfa58a3ec5537f67cada31b8d72802384af2a39691c9fb2185d2f8ce5c3d3068d1fa4fc23882fe WHIRLPOOL 1ea05bb8ce3a8923f4e46bbbc76af2c6dedfffcfa6bcf6787ffdead7d1253a36475cf18344c145c948178592cd1caa3aa3e741439f747aadb79cf8d9a3172ebb
+DIST guvcview-src-1.7.2.tar.gz 508179 SHA256 4bedf9ce57edf60e761e7de9563a39a3ae43e4076cf9b3b8887218ec63754696 SHA512 e8bd3d9fe465486971d1d94bc73a31eb704194ce21c1482fd0d13c2cd6e256828bd99b20f5a3d7e97eb8b80c2faa5cacd4394f979c87b84b5b184d84670d8f77 WHIRLPOOL 4a5bef8dd92a8435290fec34dd8fea80f77ea1fe15e13d6e33a45f01482fd6dbce68a1ef374a8558ecb07c974c21f582c02bc5f16aff1a92efb5747e9adb0293
+DIST guvcview-src-1.7.3.tar.gz 761780 SHA256 d98612fa7bb6a5a408b26755bcefdee9c5d505e5dc0e2a45a7f316652d96da99 SHA512 36ec97e127043d9548bed2f915cd45611ba751cee3c38119382911d0c037944b0fb0abd2486155eade39c9b14c7ef3657c9b4bde1cc62666004fbf77de58db91 WHIRLPOOL 225eaad1fd40356b4699e51de1b14d6f367809d8f7bf0288392083ace20b433a770d4cba666f4edb7c636089ac3b9bf144830507d1dee13088ca44b872104483
+DIST guvcview-src-2.0.1.tar.gz 960661 SHA256 dffb86c01bd2e25216d9fbc0c246342246818036d9f63e0488111d757d9b018d SHA512 b3877f00f4caf224eac2010f62e1c3d575b94f84cd0a8da7a5f1df6c851384c7a9e356de905ce27e143dc9761137ae1cce146bb4f6c0aa6d270dd53551bce67a WHIRLPOOL 9cbf94219f5816e5fb0b98f3a7b7ad618bf3162dcd5a7b6dc9162a842470c2643f4503f6d15fc0c1c00de4901ecde5bf188680bacac279f4721bda02a7efecf5
diff --git a/media-video/guvcview/guvcview-1.6.1.ebuild b/media-video/guvcview/guvcview-1.6.1.ebuild
new file mode 100644
index 000000000000..d552a9db276a
--- /dev/null
+++ b/media-video/guvcview/guvcview-1.6.1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools
+
+MY_P=${PN}-src-${PV}
+
+DESCRIPTION="GTK+ UVC Viewer"
+HOMEPAGE="http://guvcview.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="pulseaudio"
+
+RDEPEND=">=dev-libs/glib-2.10
+ media-libs/libpng:0
+ >=media-libs/libsdl-1.2.10
+ media-libs/libv4l
+ >=media-libs/portaudio-19_pre
+ virtual/udev
+ virtual/ffmpeg
+ x11-libs/gtk+:3
+ pulseaudio? ( >=media-sound/pulseaudio-0.9.15 )
+ !<sys-kernel/linux-headers-3.4-r2" #448260
+DEPEND="${RDEPEND}
+ dev-util/intltool
+ sys-devel/gettext
+ virtual/os-headers
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ sed -i -e '/^docdir/,/^$/d' Makefile.am || die
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-debian-menu \
+ $(use_enable pulseaudio pulse)
+}
diff --git a/media-video/guvcview/guvcview-1.7.1.ebuild b/media-video/guvcview/guvcview-1.7.1.ebuild
new file mode 100644
index 000000000000..56f3f6125aab
--- /dev/null
+++ b/media-video/guvcview/guvcview-1.7.1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools
+
+MY_P=${PN}-src-${PV}
+
+DESCRIPTION="GTK+ UVC Viewer"
+HOMEPAGE="http://guvcview.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="pulseaudio"
+
+RDEPEND=">=dev-libs/glib-2.10
+ media-libs/libpng:0=
+ >=media-libs/libsdl-1.2.10
+ media-libs/libv4l
+ >=media-libs/portaudio-19_pre
+ virtual/udev
+ virtual/ffmpeg
+ x11-libs/gtk+:3
+ pulseaudio? ( >=media-sound/pulseaudio-0.9.15 )
+ !<sys-kernel/linux-headers-3.4-r2" #448260
+DEPEND="${RDEPEND}
+ dev-util/intltool
+ sys-devel/gettext
+ virtual/os-headers
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ sed -i '/^docdir/,/^$/d' Makefile.am || die
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-debian-menu \
+ $(use_enable pulseaudio pulse)
+}
diff --git a/media-video/guvcview/guvcview-1.7.2.ebuild b/media-video/guvcview/guvcview-1.7.2.ebuild
new file mode 100644
index 000000000000..1e849d1b9629
--- /dev/null
+++ b/media-video/guvcview/guvcview-1.7.2.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools
+
+MY_P=${PN}-src-${PV}
+
+DESCRIPTION="GTK+ UVC Viewer"
+HOMEPAGE="http://guvcview.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="pulseaudio"
+
+RDEPEND=">=dev-libs/glib-2.10
+ media-libs/libpng:0=
+ >=media-libs/libsdl-1.2.10
+ media-libs/libv4l
+ >=media-libs/portaudio-19_pre
+ virtual/ffmpeg
+ virtual/libusb:1
+ virtual/udev
+ x11-libs/gtk+:3
+ pulseaudio? ( >=media-sound/pulseaudio-0.9.15 )
+ !<sys-kernel/linux-headers-3.4-r2" #448260
+DEPEND="${RDEPEND}
+ dev-util/intltool
+ sys-devel/gettext
+ virtual/os-headers
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ sed -i '/^docdir/,/^$/d' Makefile.am || die
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-debian-menu \
+ $(use_enable pulseaudio pulse)
+}
diff --git a/media-video/guvcview/guvcview-1.7.3.ebuild b/media-video/guvcview/guvcview-1.7.3.ebuild
new file mode 100644
index 000000000000..3bdad208a356
--- /dev/null
+++ b/media-video/guvcview/guvcview-1.7.3.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools
+
+MY_P=${PN}-src-${PV}
+
+DESCRIPTION="GTK+ UVC Viewer"
+HOMEPAGE="http://guvcview.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="pulseaudio"
+
+RDEPEND=">=dev-libs/glib-2.10
+ media-libs/libpng:0=
+ >=media-libs/libsdl-1.2.10
+ media-libs/libv4l
+ >=media-libs/portaudio-19_pre
+ virtual/ffmpeg
+ virtual/libusb:1
+ virtual/udev
+ x11-libs/gtk+:3
+ pulseaudio? ( >=media-sound/pulseaudio-0.9.15 )
+ !<sys-kernel/linux-headers-3.4-r2" #448260
+DEPEND="${RDEPEND}
+ dev-util/intltool
+ sys-devel/gettext
+ virtual/os-headers
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ sed -i '/^docdir/,/^$/d' Makefile.am || die
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-debian-menu \
+ $(use_enable pulseaudio pulse)
+}
diff --git a/media-video/guvcview/guvcview-2.0.1.ebuild b/media-video/guvcview/guvcview-2.0.1.ebuild
new file mode 100644
index 000000000000..baa4792d0236
--- /dev/null
+++ b/media-video/guvcview/guvcview-2.0.1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools
+
+MY_P=${PN}-src-${PV}
+
+DESCRIPTION="GTK+ UVC Viewer"
+HOMEPAGE="http://guvcview.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="gsl pulseaudio"
+
+RDEPEND=">=dev-libs/glib-2.10
+ media-libs/libpng:0=
+ media-libs/libsdl2
+ media-libs/libv4l
+ >=media-libs/portaudio-19_pre
+ virtual/ffmpeg
+ virtual/libusb:1
+ virtual/udev
+ >=x11-libs/gtk+-3.6:3
+ pulseaudio? ( >=media-sound/pulseaudio-0.9.15 )
+ gsl? ( >=sci-libs/gsl-1.15 )
+ !<sys-kernel/linux-headers-3.4-r2" #448260
+DEPEND="${RDEPEND}
+ dev-util/intltool
+ sys-devel/gettext
+ virtual/os-headers
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ sed -i '/^docdir/,/^$/d' Makefile.am || die
+ eautoreconf
+}
+
+src_configure() {
+ # configure.ac is bad, see https://sourceforge.net/p/guvcview/tickets/16/
+ econf \
+ --disable-debian-menu \
+ $(use pulseaudio || echo '--disable-pulse') \
+ $(use gsl || echo '--disable-gsl')
+}
diff --git a/media-video/guvcview/metadata.xml b/media-video/guvcview/metadata.xml
new file mode 100644
index 000000000000..5739a5c57b50
--- /dev/null
+++ b/media-video/guvcview/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">guvcview</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/gxine/Manifest b/media-video/gxine/Manifest
new file mode 100644
index 000000000000..0392d7e95b33
--- /dev/null
+++ b/media-video/gxine/Manifest
@@ -0,0 +1 @@
+DIST gxine-0.5.907.tar.xz 910528 SHA256 b5c925806a35cb23a24a80a39d494cefb529e22c957987741f269a994ab258d5 SHA512 dd35c8a8810c233e81a28e9f10504645662d60dc9609451e7c49c5d516bb041b61a3b9c8f330021af1e527064cf3f62f37bde98402df7426f501d0c78c571045 WHIRLPOOL 01037e358c515f01bd42ec48e54d92e7672162098a4d0a279f979dd01d9a6354dd37f7194f36f9dfc804a8730bd792676cef39e48b608104724a787bf9c51e57
diff --git a/media-video/gxine/files/gxine-0.5.905-desktop.patch b/media-video/gxine/files/gxine-0.5.905-desktop.patch
new file mode 100644
index 000000000000..c5777a157506
--- /dev/null
+++ b/media-video/gxine/files/gxine-0.5.905-desktop.patch
@@ -0,0 +1,12 @@
+--- gxine.desktop.in
++++ gxine.desktop.in
+@@ -14,5 +14,5 @@
+ Terminal=false
+ Type=Application
+ StartupNotify=true
+-Categories=AudioVideo;GTK;Player;TV;
+-MimeType=x-content/video-dvd;x-content/audio-cdda;x-content/video-vcd;x-content/video-svcd;
+\ No newline at end of file
++Categories=AudioVideo;Video;GTK;Player;TV;
++MimeType=x-content/audio-cdda;
+\ No newline at end of file
diff --git a/media-video/gxine/files/gxine-0.5.905-fix-nspr-useage.patch b/media-video/gxine/files/gxine-0.5.905-fix-nspr-useage.patch
new file mode 100644
index 000000000000..9d0e5f87da5c
--- /dev/null
+++ b/media-video/gxine/files/gxine-0.5.905-fix-nspr-useage.patch
@@ -0,0 +1,11 @@
+--- a/src/Makefile.am 2011-01-02 11:33:09.675000001 -0600
++++ b/src/Makefile.am 2011-01-02 11:34:05.205000001 -0600
+@@ -4,7 +4,7 @@
+ -I$(top_builddir)/pixmaps $(LIRC_INCLUDE)
+
+ AM_CFLAGS = $(GNU99) $(XINE_CFLAGS) $(X_CFLAGS) \
+- $(GTK2_CFLAGS) $(GTHREAD2_CFLAGS) \
++ $(GTK2_CFLAGS) $(GTHREAD2_CFLAGS) $(NSPR_CFLAGS) \
+ $(HAL_CFLAGS) $(UDEV_CFLAGS) $(DBUS_CFLAGS) $(JS_CFLAGS) \
+ -DLOCALEDIR=\"$(localedir)\"
+
diff --git a/media-video/gxine/files/gxine-0.5.906-endif.patch b/media-video/gxine/files/gxine-0.5.906-endif.patch
new file mode 100644
index 000000000000..40c4a8a39458
--- /dev/null
+++ b/media-video/gxine/files/gxine-0.5.906-endif.patch
@@ -0,0 +1,14 @@
+lirc.c:227:3: error: ‘gxine_lirc_thread’ undeclared (first use in this function)
+
+--- src/lirc.c
++++ src/lirc.c
+@@ -223,8 +223,8 @@
+ if (gxine_lirc_thread_created)
+ pthread_join (gxine_lirc_thread, NULL);
+ gxine_lirc_start ();
+-#endif
+ JS_SET_RVAL (cx, vp, gxine_lirc_thread ? JSVAL_TRUE : JSVAL_FALSE);
++#endif
+ return JS_TRUE;
+ }
+
diff --git a/media-video/gxine/files/gxine-0.5.907-glib-2.31.patch b/media-video/gxine/files/gxine-0.5.907-glib-2.31.patch
new file mode 100644
index 000000000000..9edea6c84af6
--- /dev/null
+++ b/media-video/gxine/files/gxine-0.5.907-glib-2.31.patch
@@ -0,0 +1,34 @@
+http://bugs.gentoo.org/412323
+
+--- src/console_output.h
++++ src/console_output.h
+@@ -21,7 +21,7 @@
+ #ifndef GXINE_CONSOLE_OUTPUT_H
+ #define GXINE_CONSOLE_OUTPUT_H
+
+-#include <glib/gmessages.h>
++#include <glib.h>
+
+ void console_output_init (void);
+
+--- src/engine.c
++++ src/engine.c
+@@ -30,7 +30,7 @@
+ #include <errno.h>
+ #include <unistd.h>
+
+-#include <glib/gthread.h>
++#include <glib.h>
+
+ #include "engine.h"
+ #include "ui.h"
+--- src/main.c
++++ src/main.c
+@@ -46,7 +46,6 @@
+ #include <gdk/gdk.h>
+ #include <gdk/gdkkeysyms.h>
+ #include <glib.h>
+-#include <glib/gmessages.h>
+
+ #include "desktop_integration.h"
+ #include "engine.h"
diff --git a/media-video/gxine/files/gxine-0.5.907-underlinking.patch b/media-video/gxine/files/gxine-0.5.907-underlinking.patch
new file mode 100644
index 000000000000..21f8a697766f
--- /dev/null
+++ b/media-video/gxine/files/gxine-0.5.907-underlinking.patch
@@ -0,0 +1,23 @@
+--- configure.ac
++++ configure.ac
+@@ -333,6 +333,20 @@
+ AC_SUBST(THREAD_LIBS)
+
+ dnl ---------------------------------------------
++dnl Check for libdl/libdld for dlopen()
++dnl ---------------------------------------------
++AC_SEARCH_LIBS([dlopen], [dl dld], [], [
++ AC_MSG_ERROR([unable to find the dlopen() function])
++])
++
++dnl ---------------------------------------------
++dnl Check for libm for log10()
++dnl ---------------------------------------------
++AC_SEARCH_LIBS([log10], [m], [], [
++ AC_MSG_ERROR([unable to find the log10() function])
++])
++
++dnl ---------------------------------------------
+ dnl Check for xine-lib
+ dnl ---------------------------------------------
+ AM_PATH_XINE([$XINE_LIB_MIN_VER],, AC_MSG_ERROR([*** Please install xine-lib (devel) first ***]))
diff --git a/media-video/gxine/gxine-0.5.907-r1.ebuild b/media-video/gxine/gxine-0.5.907-r1.ebuild
new file mode 100644
index 000000000000..ee4629106c24
--- /dev/null
+++ b/media-video/gxine/gxine-0.5.907-r1.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils fdo-mime gnome2-utils multilib nsplugins
+
+DESCRIPTION="GTK+ Front-End for libxine"
+HOMEPAGE="http://xine.sourceforge.net/"
+SRC_URI="mirror://sourceforge/xine/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86"
+IUSE="linguas_cs linguas_de lirc nls nsplugin udev +xcb xinerama"
+
+COMMON_DEPEND=">=media-libs/xine-lib-1.1.20
+ x11-libs/gtk+:2
+ >=dev-libs/glib-2
+ >=dev-lang/spidermonkey-1.8.2.15:0
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXrender
+ lirc? ( app-misc/lirc )
+ nls? ( virtual/libintl )
+ nsplugin? ( dev-libs/nspr
+ x11-libs/libXaw
+ x11-libs/libXt )
+ udev? ( virtual/libgudev:= )
+ xcb? ( x11-libs/libxcb )
+ xinerama? ( x11-libs/libXinerama )"
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )"
+
+src_prepare() {
+ # ld: cannot find -ljs
+ sed -i -e '/JS_LIBS="`spidermonkey_locate_lib/s:js:mozjs:' m4/_js.m4 || die
+
+ if has_version '>=dev-lang/spidermonkey-1.8.7:0'; then
+ sed -i -e 's:mozjs185:mozjs187:' m4/_js.m4 || die #422983
+ fi
+
+ epatch \
+ "${FILESDIR}"/${PN}-0.5.905-desktop.patch \
+ "${FILESDIR}"/${PN}-0.5.905-fix-nspr-useage.patch \
+ "${FILESDIR}"/${PN}-0.5.906-endif.patch \
+ "${FILESDIR}"/${PN}-0.5.907-glib-2.31.patch \
+ "${FILESDIR}"/${PN}-0.5.907-underlinking.patch
+
+ # need to disable calling of xine-list when running without
+ # userpriv, otherwise we get sandbox violations (bug #233847)
+ if [[ ${EUID} == "0" ]]; then
+ sed -i -e 's:^XINE_LIST=.*$:XINE_LIST=:' configure.ac || die
+ fi
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable nls) \
+ $(use_enable lirc) \
+ --enable-watchdog \
+ $(use_with xcb) \
+ $(has_version '<dev-lang/spidermonkey-1.8.5' && echo --with-spidermonkey=/usr/include/js) \
+ $(use_with nsplugin browser-plugin) \
+ $(use_with udev gudev) \
+ --without-hal \
+ --without-dbus \
+ $(use_with xinerama)
+}
+
+src_install() {
+ emake DESTDIR="${D}" \
+ docdir=/usr/share/doc/${PF} \
+ docsdir=/usr/share/doc/${PF} \
+ install
+
+ dodoc AUTHORS BUGS ChangeLog README{,_l10n} TODO
+
+ use linguas_cs && dodoc README.cs
+ use linguas_de && dodoc README.de
+
+ use nsplugin && inst_plugin /usr/$(get_libdir)/gxine/gxineplugin.so
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+}
diff --git a/media-video/gxine/metadata.xml b/media-video/gxine/metadata.xml
new file mode 100644
index 000000000000..1eba2fb5514f
--- /dev/null
+++ b/media-video/gxine/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">xine</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/h264enc/Manifest b/media-video/h264enc/Manifest
new file mode 100644
index 000000000000..26a5eea309e0
--- /dev/null
+++ b/media-video/h264enc/Manifest
@@ -0,0 +1,2 @@
+DIST h264enc-9.4.0.tar.gz 120198 SHA256 f87b36cec4d6ef90a21e518773be0a075ad13bf55456c0d6c06fedb9e2990ec0
+DIST h264enc-9.4.1.tar.gz 120268 SHA256 a7f53c278b0a3b62c84f1d9a16612bdcd3f63062cb1bf46d6983ba36c81b57bb
diff --git a/media-video/h264enc/h264enc-9.4.0.ebuild b/media-video/h264enc/h264enc-9.4.0.ebuild
new file mode 100644
index 000000000000..9f4d1972263b
--- /dev/null
+++ b/media-video/h264enc/h264enc-9.4.0.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="Script to encode H.264/AVC/MPEG-4 Part 10 formats"
+HOMEPAGE="http://h264enc.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="aac dvd flac lame matroska mp4 ogm vorbis"
+
+RDEPEND="
+ media-video/mplayer[encode,x264]
+ sys-apps/coreutils
+ sys-apps/pv
+ sys-devel/bc
+ sys-process/time
+ aac? (
+ media-libs/faac
+ media-sound/aacplusenc )
+ dvd? ( media-video/lsdvd )
+ flac? ( media-libs/flac )
+ lame? ( media-sound/lame )
+ matroska? ( media-video/mkvtoolnix )
+ mp4? ( >=media-video/gpac-0.4.5[a52] )
+ ogm? ( media-sound/ogmtools )
+ vorbis? ( media-sound/vorbis-tools )"
+DEPEND=""
+
+src_install() {
+ dobin ${PN}
+ doman man/${PN}.1
+ dodoc doc/*
+ docinto matrices
+ dodoc matrices/*
+}
diff --git a/media-video/h264enc/h264enc-9.4.1.ebuild b/media-video/h264enc/h264enc-9.4.1.ebuild
new file mode 100644
index 000000000000..9f4d1972263b
--- /dev/null
+++ b/media-video/h264enc/h264enc-9.4.1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="Script to encode H.264/AVC/MPEG-4 Part 10 formats"
+HOMEPAGE="http://h264enc.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="aac dvd flac lame matroska mp4 ogm vorbis"
+
+RDEPEND="
+ media-video/mplayer[encode,x264]
+ sys-apps/coreutils
+ sys-apps/pv
+ sys-devel/bc
+ sys-process/time
+ aac? (
+ media-libs/faac
+ media-sound/aacplusenc )
+ dvd? ( media-video/lsdvd )
+ flac? ( media-libs/flac )
+ lame? ( media-sound/lame )
+ matroska? ( media-video/mkvtoolnix )
+ mp4? ( >=media-video/gpac-0.4.5[a52] )
+ ogm? ( media-sound/ogmtools )
+ vorbis? ( media-sound/vorbis-tools )"
+DEPEND=""
+
+src_install() {
+ dobin ${PN}
+ doman man/${PN}.1
+ dodoc doc/*
+ docinto matrices
+ dodoc matrices/*
+}
diff --git a/media-video/h264enc/metadata.xml b/media-video/h264enc/metadata.xml
new file mode 100644
index 000000000000..a8cedca7a02f
--- /dev/null
+++ b/media-video/h264enc/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="ogm">Support for OGM container format</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">h264enc</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/handbrake/Manifest b/media-video/handbrake/Manifest
new file mode 100644
index 000000000000..7ada6bbef898
--- /dev/null
+++ b/media-video/handbrake/Manifest
@@ -0,0 +1,3 @@
+DIST handbrake-0.10.0.tar.bz2 10370718 SHA256 a91042da3cc08454844f7c171ee2fde4f0ed08176407fc0328d5118227ed4114 SHA512 e1793bf11aae384a63bdbb055b7b8998e13053d4519890ef6b6eb73988c5fb88c18e394e6c8f0af92cf7ba62a19ee83d908701a1f376adc2804c31192584d590 WHIRLPOOL 04379fd65000282c7472539aa6621ac668970529c3349f55c1ce5d60a6d96047a3a7e2d5d0d97ec002970769c7b8228ae67ac5623e814c3b2b27192351d8546b
+DIST handbrake-0.10.1.tar.bz2 10441776 SHA256 7ea42031fd4d5efd04903a9aae79c952c50fd43b6f7bf08fd1a93f6b358a23f5 SHA512 8e51a8d141749467a51bc781f3f961d507f693d3081b55964c4cb5a04407fd43331739db3a61c290c35c6da51003705e0e8fafe4c2c157c7a25c9c62df49856d WHIRLPOOL a735fcacf9b157cb2959d351d3fdb043c222ec664893fbd249dbebfceebd9951aabf757cd8c1a19c8911504591c22e67b20ae555dcb07d3cff6140f8f58ffdce
+DIST handbrake-0.9.9.tar.bz2 9315199 SHA256 a71dd774104cda00cfb51a813550351d638253791f2f419d04a66f3158a835b3 SHA512 c891e78f5fbc62fd46055bf6cd62e631bc181a2a21167dcf3fe18cbc4b57bb36c11d52dcf39b3c923b807160e79fb2b1f3c36d60f3024149206a86e7bd6d5b68 WHIRLPOOL edcb7758ba68e35b70700bbf484ac7794739a14302d205c080ad4fdf3151b460ee54b0c8dfffd68bca2ccb1a7d4379c9bbb7c3a9939c6bd6a06e1be95f09169e
diff --git a/media-video/handbrake/files/handbrake-0.9.9-add-gmodule-to-gtk-configure.patch b/media-video/handbrake/files/handbrake-0.9.9-add-gmodule-to-gtk-configure.patch
new file mode 100644
index 000000000000..e6f7c44e8517
--- /dev/null
+++ b/media-video/handbrake/files/handbrake-0.9.9-add-gmodule-to-gtk-configure.patch
@@ -0,0 +1,11 @@
+--- HandBrake-0.9.9.orig/gtk/configure.ac 2013-09-01 12:13:06.684612296 +0300
++++ HandBrake-0.9.9/gtk/configure.ac 2013-09-01 20:09:35.446706059 +0300
+@@ -96,7 +96,7 @@ case $host in
+ pkg_gudev="gudev-1.0"
+ ;;
+ esac
+- GHB_PACKAGES="gthread-2.0 gio-2.0 libnotify dbus-glib-1 $pkg_gudev"
++ GHB_PACKAGES="gthread-2.0 gmodule-2.0 gio-2.0 libnotify dbus-glib-1 $pkg_gudev"
+ mingw_flag=no
+ ;;
+ esac
diff --git a/media-video/handbrake/files/handbrake-0.9.9-fix-compilation-with-mp4v2-v1.9.1.patch b/media-video/handbrake/files/handbrake-0.9.9-fix-compilation-with-mp4v2-v1.9.1.patch
new file mode 100644
index 000000000000..c558d4398e07
--- /dev/null
+++ b/media-video/handbrake/files/handbrake-0.9.9-fix-compilation-with-mp4v2-v1.9.1.patch
@@ -0,0 +1,73 @@
+https://github.com/rbrito/pkg-handbrake/blob/master/debian/patches/0005-libhb-Fix-compilation-with-mp4v2-v1.9.1.patch
+
+From: =?UTF-8?q?Rog=C3=A9rio=20Brito?= <rbrito@ime.usp.br>
+Date: Sun, 22 Apr 2012 05:34:40 -0300
+Subject: libhb: Fix compilation with mp4v2 v1.9.1.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Forwarded: no
+Last-Update: 2012-05-15
+Reviewed-by: Rogério Theodoro de Brito <rbrito@ime.usp.br>
+Signed-off-by: Rogério Theodoro de Brito <rbrito@ime.usp.br>
+---
+ libhb/decmetadata.c | 4 ++--
+ libhb/muxmp4.c | 8 ++++----
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+--- a/libhb/decmetadata.c
++++ b/libhb/decmetadata.c
+@@ -13,7 +13,7 @@
+ MP4FileHandle input_file;
+ hb_deep_log( 2, "Got an MP4 input, read the metadata");
+
+- input_file = MP4Read( title->path, 0 );
++ input_file = MP4Read(title->path);
+
+ if( input_file != MP4_INVALID_FILE_HANDLE )
+ {
+@@ -92,7 +92,7 @@
+ }
+ }
+
+- MP4Close( input_file );
++ MP4Close(input_file, 0);
+ }
+ }
+
+--- a/libhb/muxmp4.c
++++ b/libhb/muxmp4.c
+@@ -93,13 +93,13 @@
+ if (job->largeFileSize)
+ /* Use 64-bit MP4 file */
+ {
+- m->file = MP4Create( job->file, MP4_DETAILS_ERROR, MP4_CREATE_64BIT_DATA );
++ m->file = MP4Create( job->file, MP4_CREATE_64BIT_DATA );
+ hb_deep_log( 2, "muxmp4: using 64-bit MP4 formatting.");
+ }
+ else
+ /* Limit MP4s to less than 4 GB */
+ {
+- m->file = MP4Create( job->file, MP4_DETAILS_ERROR, 0 );
++ m->file = MP4Create( job->file, 0 );
+ }
+
+ if (m->file == MP4_INVALID_FILE_HANDLE)
+@@ -1331,14 +1331,14 @@
+ MP4TagsFree( tags );
+ }
+
+- MP4Close( m->file );
++ MP4Close( m->file, 0 );
+
+ if ( job->mp4_optimize )
+ {
+ hb_log( "muxmp4: optimizing file" );
+ char filename[1024]; memset( filename, 0, 1024 );
+ snprintf( filename, 1024, "%s.tmp", job->file );
+- MP4Optimize( job->file, filename, MP4_DETAILS_ERROR );
++ MP4Optimize( job->file, filename );
+ remove( job->file );
+ rename( filename, job->file );
+ }
diff --git a/media-video/handbrake/files/handbrake-0.9.9-remove-faac-dependency.patch b/media-video/handbrake/files/handbrake-0.9.9-remove-faac-dependency.patch
new file mode 100644
index 000000000000..e2726d28dda9
--- /dev/null
+++ b/media-video/handbrake/files/handbrake-0.9.9-remove-faac-dependency.patch
@@ -0,0 +1,203 @@
+Forward ported version of https://github.com/rbrito/pkg-handbrake/blob/master/debian/patches/0010-Remove-FAAC-dependency.patch
+
+diff -ur a/gtk/src/audiohandler.c b/gtk/src/audiohandler.c
+--- a/gtk/src/audiohandler.c 2013-05-05 15:39:27.715401407 +0200
++++ b/gtk/src/audiohandler.c 2013-05-05 15:42:09.312067074 +0200
+@@ -70,10 +70,7 @@
+ if (hb_audio_encoders[ii].encoder == fallback &&
+ !(hb_audio_encoders[ii].muxers & mux))
+ {
+- if ( mux == HB_MUX_MKV )
+- fallback = HB_ACODEC_LAME;
+- else
+- fallback = HB_ACODEC_FAAC;
++ fallback = HB_ACODEC_LAME;
+ break;
+ }
+ }
+@@ -130,7 +127,7 @@
+ return HB_ACODEC_LAME;
+
+ case HB_ACODEC_AAC_PASS:
+- return HB_ACODEC_FAAC;
++ return HB_ACODEC_FFAAC;
+
+ case HB_ACODEC_AC3_PASS:
+ return HB_ACODEC_AC3;
+diff -ur a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c
+--- a/gtk/src/hb-backend.c 2013-05-05 15:39:27.738734740 +0200
++++ b/gtk/src/hb-backend.c 2013-05-05 15:43:13.702066676 +0200
+@@ -3767,7 +3767,7 @@
+ gint
+ ghb_get_default_acodec()
+ {
+- return HB_ACODEC_FAAC;
++ return HB_ACODEC_LAME;
+ }
+
+ static void
+@@ -4505,13 +4505,9 @@
+ {
+ codec = HB_ACODEC_AC3;
+ }
+- else if (mux == HB_MUX_MKV)
+- {
+- codec = HB_ACODEC_LAME;
+- }
+ else
+ {
+- codec = HB_ACODEC_FAAC;
++ codec = HB_ACODEC_LAME;
+ }
+ value = ghb_lookup_acodec_value(codec);
+ ghb_settings_take_value(asettings, "AudioEncoder", value);
+@@ -4525,7 +4521,7 @@
+ if (codec == HB_ACODEC_VORBIS)
+ {
+ a_unsup = "Vorbis";
+- codec = HB_ACODEC_FAAC;
++ codec = HB_ACODEC_LAME;
+ }
+ }
+ if (a_unsup)
+diff -ur a/gtk/src/preset_xlat.c b/gtk/src/preset_xlat.c
+--- a/gtk/src/preset_xlat.c 2013-05-05 15:39:27.775401407 +0200
++++ b/gtk/src/preset_xlat.c 2013-05-05 15:43:34.888733211 +0200
+@@ -260,7 +260,6 @@
+
+ static value_map_t acodec_xlat[] =
+ {
+- {"AAC (faac)", "faac"},
+ {"AC3 Passthru", "ac3"},
+ {"MP3 (lame)", "lame"},
+ {"Vorbis (vorbis)", "vorbis"},
+diff -ur a/gtk/src/presets.c b/gtk/src/presets.c
+--- a/gtk/src/presets.c 2013-05-05 15:39:27.778734740 +0200
++++ b/gtk/src/presets.c 2013-05-05 15:43:59.888733056 +0200
+@@ -2029,8 +2029,6 @@
+
+ static value_map_t acodec_xlat_compat[] =
+ {
+- {"AAC (CoreAudio)", "faac"},
+- {"HE-AAC (CoreAudio)", "faac"},
+ {"AC3 (ffmpeg)", "ac3"},
+ {"AC3", "ac3"},
+ {"MP3 Passthru", "mp3pass"},
+diff -ur a/libhb/common.c b/libhb/common.c
+--- a/libhb/common.c 2013-05-05 15:39:27.788734740 +0200
++++ b/libhb/common.c 2013-05-05 15:45:02.782066001 +0200
+@@ -126,7 +126,6 @@
+ { "AAC (CoreAudio)", "ca_aac", HB_ACODEC_CA_AAC, HB_MUX_MP4|HB_MUX_MKV },
+ { "HE-AAC (CoreAudio)", "ca_haac", HB_ACODEC_CA_HAAC, HB_MUX_MP4|HB_MUX_MKV },
+ #endif
+- { "AAC (faac)", "faac", HB_ACODEC_FAAC, HB_MUX_MP4|HB_MUX_MKV },
+ #ifdef USE_FDK_AAC
+ { "AAC (FDK)", "fdk_aac", HB_ACODEC_FDK_AAC, HB_MUX_MP4|HB_MUX_MKV },
+ { "HE-AAC (FDK)", "fdk_haac", HB_ACODEC_FDK_HAAC, HB_MUX_MP4|HB_MUX_MKV },
+diff -ur a/libhb/common.h b/libhb/common.h
+--- a/libhb/common.h 2013-05-05 15:39:27.788734740 +0200
++++ b/libhb/common.h 2013-05-05 15:45:23.358732540 +0200
+@@ -945,7 +945,6 @@
+ extern hb_work_object_t hb_decavcodeca;
+ extern hb_work_object_t hb_decavcodecv;
+ extern hb_work_object_t hb_declpcm;
+-extern hb_work_object_t hb_encfaac;
+ extern hb_work_object_t hb_enclame;
+ extern hb_work_object_t hb_encvorbis;
+ extern hb_work_object_t hb_muxer;
+diff -ur a/libhb/encfaac.c b/libhb/encfaac.c
+--- a/libhb/encfaac.c 2013-05-05 15:39:27.802068073 +0200
++++ b/libhb/encfaac.c 2013-05-05 15:45:51.798732364 +0200
+@@ -1,3 +1,4 @@
++#if 0
+ /* encfaac.c
+
+ Copyright (c) 2003-2013 HandBrake Team
+@@ -287,3 +288,4 @@
+ return HB_WORK_OK;
+ }
+
++#endif /* 0 */
+\ No newline at end of file
+diff -ur a/libhb/hb.c b/libhb/hb.c
+--- a/libhb/hb.c 2013-05-05 15:39:27.805401407 +0200
++++ b/libhb/hb.c 2013-05-05 15:46:21.548732180 +0200
+@@ -487,7 +487,6 @@
+ hb_register( &hb_decavcodeca );
+ hb_register( &hb_decavcodecv );
+ hb_register( &hb_declpcm );
+- hb_register( &hb_encfaac );
+ hb_register( &hb_enclame );
+ hb_register( &hb_encvorbis );
+ hb_register( &hb_muxer );
+@@ -588,7 +587,6 @@
+ hb_register( &hb_decavcodeca );
+ hb_register( &hb_decavcodecv );
+ hb_register( &hb_declpcm );
+- hb_register( &hb_encfaac );
+ hb_register( &hb_enclame );
+ hb_register( &hb_encvorbis );
+ hb_register( &hb_muxer );
+diff -ur a/libhb/internal.h b/libhb/internal.h
+--- a/libhb/internal.h 2013-05-05 15:39:27.805401407 +0200
++++ b/libhb/internal.h 2013-05-05 15:46:28.215398806 +0200
+@@ -409,7 +409,6 @@
+ WORK_DECAVCODEC,
+ WORK_DECAVCODECV,
+ WORK_DECLPCM,
+- WORK_ENCFAAC,
+ WORK_ENCLAME,
+ WORK_ENCVORBIS,
+ WORK_ENC_CA_AAC,
+diff -ur a/libhb/module.defs b/libhb/module.defs
+--- a/libhb/module.defs 2013-05-05 15:39:27.808734740 +0200
++++ b/libhb/module.defs 2013-05-05 15:46:41.458732057 +0200
+@@ -1,4 +1,4 @@
+-__deps__ := A52DEC BZIP2 FAAC FFMPEG FONTCONFIG FREETYPE LAME LIBASS LIBDCA \
++__deps__ := A52DEC BZIP2 FFMPEG FONTCONFIG FREETYPE LAME LIBASS LIBDCA \
+ LIBDVDREAD LIBDVDNAV LIBICONV LIBMKV LIBOGG LIBSAMPLERATE LIBTHEORA LIBVORBIS LIBXML2 \
+ MP4V2 MPEG2DEC PTHREADW32 X264 ZLIB LIBBLURAY FDKAAC
+
+@@ -95,7 +95,7 @@
+ LIBHB.lib = $(LIBHB.build/)hb.lib
+
+ LIBHB.dll.libs = $(foreach n, \
+- a52 ass avcodec avformat avutil avresample dvdnav dvdread faac \
++ a52 ass avcodec avformat avutil avresample dvdnav dvdread \
+ fontconfig freetype mkv mpeg2 mp3lame mp4v2 \
+ ogg samplerate swscale theora vorbis vorbisenc x264 xml2 bluray, \
+ $(CONTRIB.build/)lib/lib$(n).a )
+diff -ur a/libhb/muxmkv.c b/libhb/muxmkv.c
+--- a/libhb/muxmkv.c 2013-05-05 15:39:27.808734740 +0200
++++ b/libhb/muxmkv.c 2013-05-05 15:47:03.052065256 +0200
+@@ -256,7 +256,6 @@
+ }
+ track->codecID = MK_ACODEC_FLAC;
+ break;
+- case HB_ACODEC_FAAC:
+ case HB_ACODEC_FFAAC:
+ case HB_ACODEC_CA_AAC:
+ case HB_ACODEC_CA_HAAC:
+diff -ur a/libhb/work.c b/libhb/work.c
+--- a/libhb/work.c 2013-05-05 15:39:27.818734740 +0200
++++ b/libhb/work.c 2013-05-05 15:47:14.658731851 +0200
+@@ -135,7 +135,6 @@
+ switch (codec)
+ {
+ case HB_ACODEC_AC3: return hb_get_work(WORK_ENCAVCODEC_AUDIO);
+- case HB_ACODEC_FAAC: return hb_get_work(WORK_ENCFAAC);
+ case HB_ACODEC_LAME: return hb_get_work(WORK_ENCLAME);
+ case HB_ACODEC_VORBIS: return hb_get_work(WORK_ENCVORBIS);
+ case HB_ACODEC_CA_AAC: return hb_get_work(WORK_ENC_CA_AAC);
+diff -ur a/test/module.defs b/test/module.defs
+--- a/test/module.defs 2013-05-05 15:39:27.975401406 +0200
++++ b/test/module.defs 2013-05-05 15:47:35.322065057 +0200
+@@ -14,7 +14,7 @@
+ TEST.libs = $(LIBHB.a)
+
+ TEST.GCC.l = \
+- a52 ass avcodec avformat avutil avresample dvdnav dvdread faac \
++ a52 ass avcodec avformat avutil avresample dvdnav dvdread \
+ fontconfig freetype fribidi mkv mpeg2 mp3lame mp4v2 ogg \
+ samplerate swscale theoraenc theoradec vorbis vorbisenc x264 \
+ bluray xml2 bz2 z
diff --git a/media-video/handbrake/files/handbrake-9999-expand-MK_SUBTITLE_PGS.patch b/media-video/handbrake/files/handbrake-9999-expand-MK_SUBTITLE_PGS.patch
new file mode 100644
index 000000000000..27faeb172ef4
--- /dev/null
+++ b/media-video/handbrake/files/handbrake-9999-expand-MK_SUBTITLE_PGS.patch
@@ -0,0 +1,9 @@
+--- a/trunk/libhb/muxmkv.c
++++ b/trunk/libhb/muxmkv.c
+@@ -348,5 +348,5 @@
+ track->codecPrivate = NULL;
+ track->codecPrivateSize = 0;
+- track->codecID = MK_SUBTITLE_PGS;
++ track->codecID = "S_HDMV/PGS";
+ break;
+ case SSASUB: \ No newline at end of file
diff --git a/media-video/handbrake/files/handbrake-9999-fix-compilation-with-mp4v2-v1.9.1.patch b/media-video/handbrake/files/handbrake-9999-fix-compilation-with-mp4v2-v1.9.1.patch
new file mode 100644
index 000000000000..daec03f7e4d8
--- /dev/null
+++ b/media-video/handbrake/files/handbrake-9999-fix-compilation-with-mp4v2-v1.9.1.patch
@@ -0,0 +1,75 @@
+https://github.com/rbrito/pkg-handbrake/blob/master/debian/patches/0005-libhb-Fix-compilation-with-mp4v2-v1.9.1.patch
+
+Forward ported by Tom Wijsman <TomWij@gentoo.org>.
+
+From: =?UTF-8?q?Rog=C3=A9rio=20Brito?= <rbrito@ime.usp.br>
+Date: Sun, 22 Apr 2012 05:34:40 -0300
+Subject: libhb: Fix compilation with mp4v2 v1.9.1.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Forwarded: no
+Last-Update: 2012-05-15
+Reviewed-by: Rogério Theodoro de Brito <rbrito@ime.usp.br>
+Signed-off-by: Rogério Theodoro de Brito <rbrito@ime.usp.br>
+---
+ libhb/decmetadata.c | 4 ++--
+ libhb/muxmp4.c | 8 ++++----
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+--- a/libhb/decmetadata.c
++++ b/libhb/decmetadata.c
+@@ -13,7 +13,7 @@
+ MP4FileHandle input_file;
+ hb_deep_log( 2, "Got an MP4 input, read the metadata");
+
+- input_file = MP4Read( title->path, 0 );
++ input_file = MP4Read(title->path);
+
+ if( input_file != MP4_INVALID_FILE_HANDLE )
+ {
+@@ -92,7 +92,7 @@
+ }
+ }
+
+- MP4Close( input_file );
++ MP4Close(input_file, 0);
+ }
+ }
+
+--- a/libhb/muxmp4.c
++++ b/libhb/muxmp4.c
+@@ -93,13 +93,13 @@
+ if (job->largeFileSize)
+ /* Use 64-bit MP4 file */
+ {
+- m->file = MP4Create(m->path, MP4_DETAILS_ERROR, MP4_CREATE_64BIT_DATA);
++ m->file = MP4Create(m->path, MP4_CREATE_64BIT_DATA);
+ hb_deep_log( 2, "muxmp4: using 64-bit MP4 formatting.");
+ }
+ else
+ /* Limit MP4s to less than 4 GB */
+ {
+- m->file = MP4Create(m->path, MP4_DETAILS_ERROR, 0);
++ m->file = MP4Create(m->path, 0);
+ }
+
+ if (m->file == MP4_INVALID_FILE_HANDLE)
+@@ -1331,14 +1331,14 @@
+ MP4TagsFree( tags );
+ }
+
+- MP4Close( m->file );
++ MP4Close( m->file, 0 );
+
+ if ( job->mp4_optimize )
+ {
+ hb_log( "muxmp4: optimizing file" );
+ char filename[1024]; memset( filename, 0, 1024 );
+ snprintf(filename, 1024, "%s.tmp", m->path);
+- MP4Optimize(m->path, filename, MP4_DETAILS_ERROR);
++ MP4Optimize(m->path, filename);
+ remove(m->path);
+ rename(filename, m->path);
+ }
diff --git a/media-video/handbrake/files/handbrake-9999-remove-dvdnav-dup.patch b/media-video/handbrake/files/handbrake-9999-remove-dvdnav-dup.patch
new file mode 100644
index 000000000000..be96bf22c661
--- /dev/null
+++ b/media-video/handbrake/files/handbrake-9999-remove-dvdnav-dup.patch
@@ -0,0 +1,20 @@
+--- libhb/dvdnav.c 2013-05-05 16:14:10.265388521 +0200
++++ libhb/dvdnav.c.2 2013-05-05 16:14:18.325388471 +0200
+@@ -1225,16 +1225,7 @@
+ {
+ for (kk = 0; kk < buttons; kk++)
+ {
+- dvdnav_t *dvdnav_copy;
+-
+- result = dvdnav_dup( &dvdnav_copy, d->dvdnav );
+- if (result != DVDNAV_STATUS_OK)
+- {
+- hb_log("dvdnav dup failed: %s", dvdnav_err_to_string(d->dvdnav));
+- goto done;
+- }
+- title = try_button( dvdnav_copy, kk, list_title );
+- dvdnav_free_dup( dvdnav_copy );
++ title = try_button( d->dvdnav, kk, list_title );
+
+ if ( title >= 0 )
+ {
diff --git a/media-video/handbrake/files/handbrake-9999-remove-faac-dependency.patch b/media-video/handbrake/files/handbrake-9999-remove-faac-dependency.patch
new file mode 100644
index 000000000000..7e8ab99730a8
--- /dev/null
+++ b/media-video/handbrake/files/handbrake-9999-remove-faac-dependency.patch
@@ -0,0 +1,84 @@
+--- a/libhb/common.c
++++ b/libhb/common.c
+@@ -243,7 +243,6 @@
+ {
+ // legacy encoders, back to HB 0.9.4 whenever possible (disabled)
+ { { "", "dts", NULL, HB_ACODEC_DCA_PASS, HB_MUX_MASK_MP4|HB_MUX_MASK_MKV, }, NULL, 0, HB_GID_ACODEC_DTS_PASS, },
+- { { "AAC (faac)", "faac", NULL, 0, HB_MUX_MASK_MP4|HB_MUX_MASK_MKV, }, NULL, 0, HB_GID_ACODEC_AAC, },
+ { { "AAC (ffmpeg)", "ffaac", NULL, HB_ACODEC_FFAAC, HB_MUX_MASK_MP4|HB_MUX_MASK_MKV, }, NULL, 0, HB_GID_ACODEC_AAC, },
+ { { "AC3 (ffmpeg)", "ffac3", NULL, HB_ACODEC_AC3, HB_MUX_MASK_MP4|HB_MUX_MASK_MKV, }, NULL, 0, HB_GID_ACODEC_AC3, },
+ { { "MP3 (lame)", "lame", NULL, HB_ACODEC_LAME, HB_MUX_MASK_MP4|HB_MUX_MASK_MKV, }, NULL, 0, HB_GID_ACODEC_MP3, },
+--- a/scripts/manicure.rb
++++ b/scripts/manicure.rb
+@@ -349,7 +349,7 @@
+ audioEncoders << "copy:dtshd"
+ when /AAC Pass/
+ audioEncoders << "copy:aac"
+- when "AAC (ffmpeg)", "AAC (avcodec)", "AAC (faac)"
++ when "AAC (ffmpeg)", "AAC (avcodec)"
+ audioEncoders << "av_aac"
+ when "AAC (FDK)"
+ audioEncoders << "fdk_aac"
+@@ -466,7 +466,7 @@
+ case hash["AudioEncoderFallback"]
+ when /AC3/
+ audioEncoderFallback << "ac3"
+- when "AAC (ffmpeg)", "AAC (avcodec)", "AAC (faac)"
++ when "AAC (ffmpeg)", "AAC (avcodec)"
+ audioEncoderFallback << "av_aac"
+ when "AAC (FDK)"
+ audioEncoderFallback << "fdk_aac"
+@@ -753,7 +753,7 @@
+ audioEncoders << "copy:dtshd"
+ when /AAC Pass/
+ audioEncoders << "copy:aac"
+- when "AAC (ffmpeg)", "AAC (avcodec)", "AAC (faac)"
++ when "AAC (ffmpeg)", "AAC (avcodec)"
+ audioEncoders << "av_aac"
+ when "AAC (FDK)"
+ audioEncoders << "fdk_aac"
+@@ -870,7 +870,7 @@
+ case hash["AudioEncoderFallback"]
+ when /AC3/
+ audioEncoderFallback << "ac3"
+- when "AAC (ffmpeg)", "AAC (avcodec)", "AAC (faac)"
++ when "AAC (ffmpeg)", "AAC (avcodec)"
+ audioEncoderFallback << "av_aac"
+ when "AAC (FDK)"
+ audioEncoderFallback << "fdk_aac"
+@@ -1163,7 +1163,7 @@
+ audioEncoders << "copy:dtshd"
+ when /AAC Pass/
+ audioEncoders << "copy:aac"
+- when "AAC (ffmpeg)", "AAC (avcodec)", "AAC (faac)"
++ when "AAC (ffmpeg)", "AAC (avcodec)"
+ audioEncoders << "av_aac"
+ when "AAC (FDK)"
+ audioEncoders << "fdk_aac"
+@@ -1298,7 +1298,7 @@
+ case hash["AudioEncoderFallback"]
+ when /AC3/
+ audioEncoderFallback << "ac3"
+- when "AAC (ffmpeg)", "AAC (avcodec)", "AAC (faac)"
++ when "AAC (ffmpeg)", "AAC (avcodec)"
+ audioEncoderFallback << "av_aac"
+ when "AAC (FDK)"
+ audioEncoderFallback << "fdk_aac"
+@@ -1615,7 +1615,7 @@
+ audioEncoders << "copy:dtshd"
+ when /AAC Pass/
+ audioEncoders << "copy:aac"
+- when "AAC (ffmpeg)", "AAC (avcodec)", "AAC (faac)"
++ when "AAC (ffmpeg)", "AAC (avcodec)"
+ audioEncoders << "av_aac"
+ when "AAC (FDK)"
+ audioEncoders << "fdk_aac"
+@@ -1732,7 +1732,7 @@
+ case hash["AudioEncoderFallback"]
+ when /AC3/
+ audioEncoderFallback << "ac3"
+- when "AAC (ffmpeg)", "AAC (avcodec)", "AAC (faac)"
++ when "AAC (ffmpeg)", "AAC (avcodec)"
+ audioEncoderFallback << "av_aac"
+ when "AAC (FDK)"
+ audioEncoderFallback << "fdk_aac"
diff --git a/media-video/handbrake/files/handbrake-9999-use-older-libmkv.patch b/media-video/handbrake/files/handbrake-9999-use-older-libmkv.patch
new file mode 100644
index 000000000000..8c25415a9656
--- /dev/null
+++ b/media-video/handbrake/files/handbrake-9999-use-older-libmkv.patch
@@ -0,0 +1,14 @@
+https://github.com/rbrito/pkg-handbrake/blob/master/debian/patches/0016-use-older-libmkv.patch
+
+--- a/libhb/muxmkv.c
++++ b/libhb/muxmkv.c
+@@ -289,8 +289,7 @@
+ {
+ // For HE-AAC, write outputSamplingFreq too
+ // samplingFreq is half of outputSamplingFreq
+- track->extra.audio.outputSamplingFreq = (float)audio->config.out.samplerate;
+- track->extra.audio.samplingFreq = track->extra.audio.outputSamplingFreq / 2.;
++ track->extra.audio.samplingFreq = audio->config.out.samplerate / 2.;
+ }
+ else
+ { \ No newline at end of file
diff --git a/media-video/handbrake/files/handbrake-9999-use-unpatched-a52.patch b/media-video/handbrake/files/handbrake-9999-use-unpatched-a52.patch
new file mode 100644
index 000000000000..a50d22d9d5d9
--- /dev/null
+++ b/media-video/handbrake/files/handbrake-9999-use-unpatched-a52.patch
@@ -0,0 +1,26 @@
+https://github.com/rbrito/pkg-handbrake/blob/master/debian/patches/0014-Use-unpatched-a52.patch
+
+Author: Reinhard Tartler <siretart@tauware.de>
+Description: Use unpatched a52
+
+In upstream liba52, the state field is private.
+
+Forwarded: no
+--- a/libhb/deca52.c
++++ b/libhb/deca52.c
+@@ -387,12 +387,15 @@ static hb_buffer_t* Decode(hb_work_objec
+ pv->channel_layout,
+ pv->nchannels);
+ }
++#if 0
++ // FIXME: debian uses an unpatched liba52
+ if (pv->use_mix_levels)
+ {
+ hb_audio_resample_set_mix_levels(pv->resample,
+ (double)pv->state->slev,
+ (double)pv->state->clev);
+ }
++#endif
+ if (hb_audio_resample_update(pv->resample))
+ {
+ hb_log("deca52: hb_audio_resample_update() failed"); \ No newline at end of file
diff --git a/media-video/handbrake/handbrake-0.10.0-r1.ebuild b/media-video/handbrake/handbrake-0.10.0-r1.ebuild
new file mode 100644
index 000000000000..6e2a245155ec
--- /dev/null
+++ b/media-video/handbrake/handbrake-0.10.0-r1.ebuild
@@ -0,0 +1,148 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools eutils gnome2-utils python-any-r1
+
+if [[ ${PV} = *9999* ]]; then
+ ESVN_REPO_URI="svn://svn.handbrake.fr/HandBrake/trunk"
+ inherit subversion
+ KEYWORDS=""
+else
+ SRC_URI="http://handbrake.fr/rotation.php?file=HandBrake-${PV}.tar.bz2 -> ${P}.tar.bz2"
+ S="${WORKDIR}/HandBrake-${PV}"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Open-source, GPL-licensed, multiplatform, multithreaded video transcoder"
+HOMEPAGE="http://handbrake.fr/"
+LICENSE="GPL-2"
+
+SLOT="0"
+IUSE="+fdk gstreamer gtk libav libav-aac"
+
+REQUIRED_USE="^^ ( fdk libav-aac )"
+
+RDEPEND="
+ dev-libs/jansson
+ media-libs/a52dec
+ media-libs/libass
+ media-libs/libbluray
+ media-libs/libdvdnav
+ media-libs/libdvdread
+ media-libs/libsamplerate
+ media-libs/libtheora
+ media-libs/libvorbis
+ media-libs/libvpx
+ media-libs/x264:=
+ media-sound/lame
+ sys-libs/zlib
+ libav? ( >=media-video/libav-10.1:0= )
+ !libav? ( >=media-video/ffmpeg-2.3:0= )
+ gstreamer? (
+ media-libs/gstreamer:1.0
+ media-libs/gst-plugins-base:1.0
+ media-libs/gst-plugins-good:1.0
+ media-libs/gst-plugins-bad:1.0
+ media-libs/gst-plugins-ugly:1.0
+ media-plugins/gst-plugins-a52dec:1.0
+ media-plugins/gst-plugins-libav:1.0
+ media-plugins/gst-plugins-x264:1.0
+ )
+ gtk? (
+ >=x11-libs/gtk+-3.10
+ dev-libs/dbus-glib
+ dev-libs/glib:2
+ x11-libs/cairo
+ x11-libs/gdk-pixbuf:2
+ x11-libs/libnotify
+ x11-libs/pango
+ virtual/libgudev:=
+ )
+ fdk? ( media-libs/fdk-aac )
+ "
+ #x265? ( =media-libs/x265-1.4 )
+
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ dev-lang/yasm
+ dev-util/intltool
+ sys-devel/automake"
+
+pkg_setup() {
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ # Get rid of leftover bundled library build definitions,
+ sed -i 's:.*\(/contrib\|contrib/\).*::g' \
+ "${S}"/make/include/main.defs \
+ || die "Contrib removal failed."
+
+ # Remove libdvdnav duplication and call it on the original instead.
+ # It may work this way; if not, we should try to mimic the duplication.
+ epatch "${FILESDIR}"/${PN}-9999-remove-dvdnav-dup.patch
+
+ # Remove faac dependency; TODO: figure out if we need to do this at all.
+ epatch "${FILESDIR}"/${PN}-9999-remove-faac-dependency.patch
+
+ cd "${S}/gtk"
+ # Don't run autogen.sh.
+ sed -i '/autogen.sh/d' module.rules || die "Removing autogen.sh call failed"
+ eautoreconf
+}
+
+src_configure() {
+ ./configure \
+ --force \
+ --verbose \
+ --prefix="${EPREFIX}/usr" \
+ --disable-gtk-update-checks \
+ $(use_enable libav-aac) \
+ $(use_enable fdk fdk-aac) \
+ $(use_enable gtk) \
+ $(usex !gstreamer --disable-gst) \
+ --disable-x265 || die "Configure failed."
+ # $(use_enable x265) \
+}
+
+src_compile() {
+ emake -C build
+
+ # TODO: Documentation building is currently broken, try to fix it.
+ #
+ # if use doc ; then
+ # emake -C build doc
+ # fi
+}
+
+src_install() {
+ emake -C build DESTDIR="${D}" install
+
+ dodoc AUTHORS CREDITS NEWS THANKS TRANSLATIONS
+}
+
+pkg_postinst() {
+ einfo "For the CLI version of HandBrake, you can use \`HandBrakeCLI\`."
+
+ if use gtk ; then
+ einfo ""
+ einfo "For the GTK+ version of HandBrake, you can run \`ghb\`."
+ fi
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/media-video/handbrake/handbrake-0.10.1.ebuild b/media-video/handbrake/handbrake-0.10.1.ebuild
new file mode 100644
index 000000000000..6e2a245155ec
--- /dev/null
+++ b/media-video/handbrake/handbrake-0.10.1.ebuild
@@ -0,0 +1,148 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools eutils gnome2-utils python-any-r1
+
+if [[ ${PV} = *9999* ]]; then
+ ESVN_REPO_URI="svn://svn.handbrake.fr/HandBrake/trunk"
+ inherit subversion
+ KEYWORDS=""
+else
+ SRC_URI="http://handbrake.fr/rotation.php?file=HandBrake-${PV}.tar.bz2 -> ${P}.tar.bz2"
+ S="${WORKDIR}/HandBrake-${PV}"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Open-source, GPL-licensed, multiplatform, multithreaded video transcoder"
+HOMEPAGE="http://handbrake.fr/"
+LICENSE="GPL-2"
+
+SLOT="0"
+IUSE="+fdk gstreamer gtk libav libav-aac"
+
+REQUIRED_USE="^^ ( fdk libav-aac )"
+
+RDEPEND="
+ dev-libs/jansson
+ media-libs/a52dec
+ media-libs/libass
+ media-libs/libbluray
+ media-libs/libdvdnav
+ media-libs/libdvdread
+ media-libs/libsamplerate
+ media-libs/libtheora
+ media-libs/libvorbis
+ media-libs/libvpx
+ media-libs/x264:=
+ media-sound/lame
+ sys-libs/zlib
+ libav? ( >=media-video/libav-10.1:0= )
+ !libav? ( >=media-video/ffmpeg-2.3:0= )
+ gstreamer? (
+ media-libs/gstreamer:1.0
+ media-libs/gst-plugins-base:1.0
+ media-libs/gst-plugins-good:1.0
+ media-libs/gst-plugins-bad:1.0
+ media-libs/gst-plugins-ugly:1.0
+ media-plugins/gst-plugins-a52dec:1.0
+ media-plugins/gst-plugins-libav:1.0
+ media-plugins/gst-plugins-x264:1.0
+ )
+ gtk? (
+ >=x11-libs/gtk+-3.10
+ dev-libs/dbus-glib
+ dev-libs/glib:2
+ x11-libs/cairo
+ x11-libs/gdk-pixbuf:2
+ x11-libs/libnotify
+ x11-libs/pango
+ virtual/libgudev:=
+ )
+ fdk? ( media-libs/fdk-aac )
+ "
+ #x265? ( =media-libs/x265-1.4 )
+
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ dev-lang/yasm
+ dev-util/intltool
+ sys-devel/automake"
+
+pkg_setup() {
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ # Get rid of leftover bundled library build definitions,
+ sed -i 's:.*\(/contrib\|contrib/\).*::g' \
+ "${S}"/make/include/main.defs \
+ || die "Contrib removal failed."
+
+ # Remove libdvdnav duplication and call it on the original instead.
+ # It may work this way; if not, we should try to mimic the duplication.
+ epatch "${FILESDIR}"/${PN}-9999-remove-dvdnav-dup.patch
+
+ # Remove faac dependency; TODO: figure out if we need to do this at all.
+ epatch "${FILESDIR}"/${PN}-9999-remove-faac-dependency.patch
+
+ cd "${S}/gtk"
+ # Don't run autogen.sh.
+ sed -i '/autogen.sh/d' module.rules || die "Removing autogen.sh call failed"
+ eautoreconf
+}
+
+src_configure() {
+ ./configure \
+ --force \
+ --verbose \
+ --prefix="${EPREFIX}/usr" \
+ --disable-gtk-update-checks \
+ $(use_enable libav-aac) \
+ $(use_enable fdk fdk-aac) \
+ $(use_enable gtk) \
+ $(usex !gstreamer --disable-gst) \
+ --disable-x265 || die "Configure failed."
+ # $(use_enable x265) \
+}
+
+src_compile() {
+ emake -C build
+
+ # TODO: Documentation building is currently broken, try to fix it.
+ #
+ # if use doc ; then
+ # emake -C build doc
+ # fi
+}
+
+src_install() {
+ emake -C build DESTDIR="${D}" install
+
+ dodoc AUTHORS CREDITS NEWS THANKS TRANSLATIONS
+}
+
+pkg_postinst() {
+ einfo "For the CLI version of HandBrake, you can use \`HandBrakeCLI\`."
+
+ if use gtk ; then
+ einfo ""
+ einfo "For the GTK+ version of HandBrake, you can run \`ghb\`."
+ fi
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/media-video/handbrake/handbrake-0.9.9-r1.ebuild b/media-video/handbrake/handbrake-0.9.9-r1.ebuild
new file mode 100644
index 000000000000..9a579e8b3bdf
--- /dev/null
+++ b/media-video/handbrake/handbrake-0.9.9-r1.ebuild
@@ -0,0 +1,185 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools eutils gnome2-utils python-any-r1
+
+if [[ ${PV} = *9999* ]]; then
+ ESVN_REPO_URI="svn://svn.handbrake.fr/HandBrake/trunk"
+ inherit subversion
+ KEYWORDS=""
+else
+ SRC_URI="http://handbrake.fr/rotation.php?file=HandBrake-${PV}.tar.bz2 -> ${P}.tar.bz2"
+ S="${WORKDIR}/HandBrake-${PV}"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Open-source, GPL-licensed, multiplatform, multithreaded video transcoder"
+HOMEPAGE="http://handbrake.fr/"
+LICENSE="GPL-2"
+
+SLOT="0"
+IUSE="fdk ffmpeg gstreamer gtk"
+
+# Use either ffmpeg or gst-plugins/mpeg2dec for decoding MPEG-2.
+REQUIRED_USE="!ffmpeg? ( gstreamer )"
+
+RDEPEND="
+ media-libs/a52dec
+ media-libs/libass
+ media-libs/libbluray
+ media-libs/libdvdnav
+ media-libs/libdvdread
+ media-libs/libmpeg2
+ media-libs/libmp4v2:0
+ media-libs/libmkv
+ media-libs/libsamplerate
+ media-libs/libtheora
+ media-libs/libvorbis
+ media-libs/x264:=
+ media-sound/lame
+ ffmpeg? ( || ( >=media-video/libav-9 >=media-video/ffmpeg-1.2.1:0 ) )
+ sys-libs/zlib
+ gstreamer? (
+ media-libs/gstreamer:1.0
+ media-libs/gst-plugins-base:1.0
+ media-libs/gst-plugins-good:1.0
+ media-libs/gst-plugins-bad:1.0
+ media-libs/gst-plugins-ugly:1.0
+ media-plugins/gst-plugins-a52dec:1.0
+ media-plugins/gst-plugins-libav:1.0
+ media-plugins/gst-plugins-x264:1.0
+ !ffmpeg? ( media-plugins/gst-plugins-mpeg2dec:1.0 )
+ )
+ gtk? (
+ x11-libs/gtk+:3
+ dev-libs/dbus-glib
+ dev-libs/glib:2
+ x11-libs/cairo
+ x11-libs/gdk-pixbuf:2
+ x11-libs/libnotify
+ x11-libs/pango
+ virtual/libgudev:=
+ )
+ fdk? ( media-libs/fdk-aac )
+ "
+
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ dev-lang/yasm
+ dev-util/intltool
+ sys-devel/automake"
+
+pkg_setup() {
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ # Get rid of leftover bundled library build definitions,
+ # the version 0.9.9 supports the use of system libraries.
+ sed -i 's:.*\(/contrib\|contrib/\).*::g' \
+ "${S}"/make/include/main.defs \
+ || die "Contrib removal failed."
+
+ # Instead of adding a #define to libmkv, we expand it in place.
+ epatch "${FILESDIR}"/${PN}-9999-expand-MK_SUBTITLE_PGS.patch
+
+ # Fix compilation against the released 1.9.1 version of mp4v2.
+ epatch "${FILESDIR}"/${P}-fix-compilation-with-mp4v2-v1.9.1.patch
+
+ # Remove libdvdnav duplication and call it on the original instead.
+ # It may work this way; if not, we should try to mimic the duplication.
+ epatch "${FILESDIR}"/${PN}-9999-remove-dvdnav-dup.patch
+
+ # Remove faac dependency until its compilation errors can be resolved.
+ epatch "${FILESDIR}"/${P}-remove-faac-dependency.patch
+ sed -i 's/-lfaac//' gtk/configure.ac || die
+
+ # Make use of an older version of libmkv.
+ epatch "${FILESDIR}"/${PN}-9999-use-older-libmkv.patch
+
+ # Make use of an unpatched version of a52 that does not make a private field public.
+ epatch "${FILESDIR}"/${PN}-9999-use-unpatched-a52.patch
+
+ # Add gmodule to the linker command line for bug #482674.
+ epatch "${FILESDIR}"/${P}-add-gmodule-to-gtk-configure.patch
+
+ # Fixup configure.ac with newer automake
+ cd "${S}/gtk"
+ sed -i \
+ -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:g' \
+ -e 's:AM_PROG_CC_STDC:AC_PROG_CC:g' \
+ -e 's:am_cv_prog_cc_stdc:ac_cv_prog_cc_stdc:g' \
+ configure.ac || die "Fixing up configure.ac failed"
+
+ # Don't run autogen.sh
+ sed -i '/autogen.sh/d' module.rules || die "Removing autogen.sh call failed"
+ eautoreconf
+}
+
+src_configure() {
+ local myconf=""
+
+ if ! use gtk ; then
+ myconf+=" --disable-gtk"
+ fi
+
+ if ! use gstreamer ; then
+ myconf+=" --disable-gst"
+ fi
+
+ if use ffmpeg ; then
+ myconf+=" --enable-ff-mpeg2"
+ fi
+
+ if use fdk ; then
+ myconf+=" --enable-fdk-aac"
+ fi
+
+ ./configure \
+ --force \
+ --prefix="${EPREFIX}/usr" \
+ --disable-gtk-update-checks \
+ ${myconf} || die "Configure failed."
+}
+
+src_compile() {
+ emake -C build
+
+ # Documentation building is currently broken.
+ #
+ # if use doc ; then
+ # emake -C build doc
+ # fi
+}
+
+src_install() {
+ emake -C build DESTDIR="${D}" install
+
+ dodoc AUTHORS CREDITS NEWS THANKS TRANSLATIONS
+}
+
+pkg_postinst() {
+ einfo "For the CLI version of HandBrake, you can use \`HandBrakeCLI\`."
+
+ if use gtk ; then
+ einfo ""
+ einfo "For the GTK+ version of HandBrake, you can run \`ghb\`."
+ fi
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/media-video/handbrake/handbrake-9999.ebuild b/media-video/handbrake/handbrake-9999.ebuild
new file mode 100644
index 000000000000..6e2a245155ec
--- /dev/null
+++ b/media-video/handbrake/handbrake-9999.ebuild
@@ -0,0 +1,148 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools eutils gnome2-utils python-any-r1
+
+if [[ ${PV} = *9999* ]]; then
+ ESVN_REPO_URI="svn://svn.handbrake.fr/HandBrake/trunk"
+ inherit subversion
+ KEYWORDS=""
+else
+ SRC_URI="http://handbrake.fr/rotation.php?file=HandBrake-${PV}.tar.bz2 -> ${P}.tar.bz2"
+ S="${WORKDIR}/HandBrake-${PV}"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Open-source, GPL-licensed, multiplatform, multithreaded video transcoder"
+HOMEPAGE="http://handbrake.fr/"
+LICENSE="GPL-2"
+
+SLOT="0"
+IUSE="+fdk gstreamer gtk libav libav-aac"
+
+REQUIRED_USE="^^ ( fdk libav-aac )"
+
+RDEPEND="
+ dev-libs/jansson
+ media-libs/a52dec
+ media-libs/libass
+ media-libs/libbluray
+ media-libs/libdvdnav
+ media-libs/libdvdread
+ media-libs/libsamplerate
+ media-libs/libtheora
+ media-libs/libvorbis
+ media-libs/libvpx
+ media-libs/x264:=
+ media-sound/lame
+ sys-libs/zlib
+ libav? ( >=media-video/libav-10.1:0= )
+ !libav? ( >=media-video/ffmpeg-2.3:0= )
+ gstreamer? (
+ media-libs/gstreamer:1.0
+ media-libs/gst-plugins-base:1.0
+ media-libs/gst-plugins-good:1.0
+ media-libs/gst-plugins-bad:1.0
+ media-libs/gst-plugins-ugly:1.0
+ media-plugins/gst-plugins-a52dec:1.0
+ media-plugins/gst-plugins-libav:1.0
+ media-plugins/gst-plugins-x264:1.0
+ )
+ gtk? (
+ >=x11-libs/gtk+-3.10
+ dev-libs/dbus-glib
+ dev-libs/glib:2
+ x11-libs/cairo
+ x11-libs/gdk-pixbuf:2
+ x11-libs/libnotify
+ x11-libs/pango
+ virtual/libgudev:=
+ )
+ fdk? ( media-libs/fdk-aac )
+ "
+ #x265? ( =media-libs/x265-1.4 )
+
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ dev-lang/yasm
+ dev-util/intltool
+ sys-devel/automake"
+
+pkg_setup() {
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ # Get rid of leftover bundled library build definitions,
+ sed -i 's:.*\(/contrib\|contrib/\).*::g' \
+ "${S}"/make/include/main.defs \
+ || die "Contrib removal failed."
+
+ # Remove libdvdnav duplication and call it on the original instead.
+ # It may work this way; if not, we should try to mimic the duplication.
+ epatch "${FILESDIR}"/${PN}-9999-remove-dvdnav-dup.patch
+
+ # Remove faac dependency; TODO: figure out if we need to do this at all.
+ epatch "${FILESDIR}"/${PN}-9999-remove-faac-dependency.patch
+
+ cd "${S}/gtk"
+ # Don't run autogen.sh.
+ sed -i '/autogen.sh/d' module.rules || die "Removing autogen.sh call failed"
+ eautoreconf
+}
+
+src_configure() {
+ ./configure \
+ --force \
+ --verbose \
+ --prefix="${EPREFIX}/usr" \
+ --disable-gtk-update-checks \
+ $(use_enable libav-aac) \
+ $(use_enable fdk fdk-aac) \
+ $(use_enable gtk) \
+ $(usex !gstreamer --disable-gst) \
+ --disable-x265 || die "Configure failed."
+ # $(use_enable x265) \
+}
+
+src_compile() {
+ emake -C build
+
+ # TODO: Documentation building is currently broken, try to fix it.
+ #
+ # if use doc ; then
+ # emake -C build doc
+ # fi
+}
+
+src_install() {
+ emake -C build DESTDIR="${D}" install
+
+ dodoc AUTHORS CREDITS NEWS THANKS TRANSLATIONS
+}
+
+pkg_postinst() {
+ einfo "For the CLI version of HandBrake, you can use \`HandBrakeCLI\`."
+
+ if use gtk ; then
+ einfo ""
+ einfo "For the GTK+ version of HandBrake, you can run \`ghb\`."
+ fi
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/media-video/handbrake/metadata.xml b/media-video/handbrake/metadata.xml
new file mode 100644
index 000000000000..dd004ba8b99c
--- /dev/null
+++ b/media-video/handbrake/metadata.xml
@@ -0,0 +1,18 @@
+<?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>
+ <longdescription>
+ Open-source, GPL-licensed, multiplatform, multithreaded video transcoder.
+ </longdescription>
+ <use>
+ <flag name="ffmpeg">Use FFmpeg from <pkg>media-video/ffmpeg</pkg> to decode MPEG-2 instead of <pkg>media-plugins/gst-plugins-mpeg2dec</pkg>.</flag>
+ <flag name="gstreamer">Support for the streaming media framework from <pkg>media-libs/gstreamer</pkg>.</flag>
+ <flag name="gtk">Support for Gimp ToolKit + from <pkg>x11-libs/gtk+</pkg>, requirement for a GUI-based HandBrake.</flag>
+ <flag name="fdk">Support for encoding AAC using <pkg>media-libs/fdk-aac</pkg>.</flag>
+ <flag name="libav-aac">Support for encoding AAC using <pkg>media-libs/libav</pkg>'s internal encoder.</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-video/hasciicam/Manifest b/media-video/hasciicam/Manifest
new file mode 100644
index 000000000000..79101579c9b3
--- /dev/null
+++ b/media-video/hasciicam/Manifest
@@ -0,0 +1,2 @@
+DIST hasciicam_1.1.1.orig.tar.gz 148487 SHA256 504d917a09ad17f466c0884189865e5d43e3d1ac05c263837666bf08d7dc526c
+DIST hasciicam_1.1.2.tar.gz 141155 SHA256 724ec6b059b41f77fdd7f201b04c271852f377b5008eba70c74476ce03dd0766
diff --git a/media-video/hasciicam/hasciicam-1.1.1.ebuild b/media-video/hasciicam/hasciicam-1.1.1.ebuild
new file mode 100644
index 000000000000..de196abd5842
--- /dev/null
+++ b/media-video/hasciicam/hasciicam-1.1.1.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="a webcam software displaying ascii art using aalib"
+HOMEPAGE="http://ascii.dyne.org"
+SRC_URI="ftp://ftp.dyne.org/${PN}/releases/${PN}_${PV}.orig.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND="media-libs/aalib"
+RDEPEND="${DEPEND}
+ media-fonts/font-misc-misc" #387909
+
+DOCS=( AUTHORS ChangeLog NEWS README TODO )
diff --git a/media-video/hasciicam/hasciicam-1.1.2.ebuild b/media-video/hasciicam/hasciicam-1.1.2.ebuild
new file mode 100644
index 000000000000..c5754811ce77
--- /dev/null
+++ b/media-video/hasciicam/hasciicam-1.1.2.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="A webcam software displaying ascii art using aalib"
+HOMEPAGE="http://ascii.dyne.org/"
+SRC_URI="http://ftp.dyne.org/${PN}/releases/${PN}_${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="media-libs/aalib
+ net-libs/ftplib"
+RDEPEND="${DEPEND}
+ media-fonts/font-misc-misc" #387909
+
+DOCS=( AUTHORS NEWS README TODO ) # ChangeLog is dead
diff --git a/media-video/hasciicam/metadata.xml b/media-video/hasciicam/metadata.xml
new file mode 100644
index 000000000000..1cadc2e4ec21
--- /dev/null
+++ b/media-video/hasciicam/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>video</herd>
+<maintainer>
+ <email>media-video@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/media-video/hwdecode-demos/Manifest b/media-video/hwdecode-demos/Manifest
new file mode 100644
index 000000000000..f416605aa5ef
--- /dev/null
+++ b/media-video/hwdecode-demos/Manifest
@@ -0,0 +1 @@
+DIST hwdecode-demos-0.9.5.tar.gz 642660 SHA256 35ef7bac5b95c61920ab6bae825060755051659c610c095739d9ae33b3d39d07 SHA512 2596949a6027c7d9a4053911501febaca319a4593cad23fc854d5f366e8be914fdbb7ecd08aac784fc9798dcf46147de249bf848a5a3fa513d06585c1f9f6748 WHIRLPOOL d494537d25dc17d0d8c4c058625898ea5be28522d2b7b8a30eea01662a053795fe0065d75db12a6babdeb081642689300123196d8a27ba9bb38d970cfbde614c
diff --git a/media-video/hwdecode-demos/files/avutil.patch b/media-video/hwdecode-demos/files/avutil.patch
new file mode 100644
index 000000000000..6c518d9a2ef8
--- /dev/null
+++ b/media-video/hwdecode-demos/files/avutil.patch
@@ -0,0 +1,15 @@
+Index: hwdecode-demos-0.9.5/src/Makefile.am
+===================================================================
+--- hwdecode-demos-0.9.5.orig/src/Makefile.am
++++ hwdecode-demos-0.9.5/src/Makefile.am
+@@ -93,8 +93,8 @@ endif
+ if USE_FFMPEG
+ ffmpeg_PROGS = ffmpeg_h264 ffmpeg_vc1 ffmpeg_mpeg2 ffmpeg_mpeg4
+ ffmpeg_source_c = ffmpeg.c ffmpeg_video.c
+-ffmpeg_CFLAGS = -DUSE_FFMPEG $(LIBAVCODEC_CFLAGS) $(LIBAVFORMAT_CFLAGS) $(LIBSWSCALE_CFLAGS)
+-ffmpeg_LIBS = $(LIBAVCODEC_LIBS) $(LIBAVFORMAT_LIBS) $(LIBSWSCALE_LIBS)
++ffmpeg_CFLAGS = -DUSE_FFMPEG $(LIBAVCODEC_CFLAGS) $(LIBAVFORMAT_CFLAGS) $(LIBSWSCALE_CFLAGS) $(LIBAVUTIL_CFLAGS)
++ffmpeg_LIBS = $(LIBAVCODEC_LIBS) $(LIBAVFORMAT_LIBS) $(LIBSWSCALE_LIBS) $(LIBAVUTIL_LIBS)
+ if USE_VAAPI
+ ffmpeg_source_c += $(vaapi_source_c)
+ ffmpeg_CFLAGS += $(vaapi_CFLAGS)
diff --git a/media-video/hwdecode-demos/files/dl.patch b/media-video/hwdecode-demos/files/dl.patch
new file mode 100644
index 000000000000..d46789452ec7
--- /dev/null
+++ b/media-video/hwdecode-demos/files/dl.patch
@@ -0,0 +1,31 @@
+From c00dd0bd93d961bc2dfaea3406c59b672741fd26 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= <vjaquez@igalia.com>
+Date: Fri, 1 Feb 2013 15:14:57 +0100
+Subject: [PATCH] Fix missing linking depenendency on -ldl
+
+Recent versions of GCC ship with a linker that doesn't add the deps of the
+DSOs of the linking process. This behavior is also found in GNU gold. This
+change fixes building with those linkers.
+
+Some references
+
+http://wiki.debian.org/ToolChain/DSOLinking
+https://fedoraproject.org/wiki/UnderstandingDSOLinkChange
+---
+ configure.ac | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+Index: hwdecode-demos-0.9.5/configure.ac
+===================================================================
+--- hwdecode-demos-0.9.5.orig/configure.ac
++++ hwdecode-demos-0.9.5/configure.ac
+@@ -69,6 +69,9 @@ fi
+ dnl Checks for libraries.
+ AC_CHECK_LIB(rt, timer_create)
+
++dnl Checks if dl() comes from the C library or -ldl
++AC_SEARCH_LIBS([dlopen], [dl])
++
+ dnl Checks for library functions.
+ AC_CHECK_FUNCS(clock_gettime)
+
diff --git a/media-video/hwdecode-demos/files/ffmpeg-1.patch b/media-video/hwdecode-demos/files/ffmpeg-1.patch
new file mode 100644
index 000000000000..f0b223e1401c
--- /dev/null
+++ b/media-video/hwdecode-demos/files/ffmpeg-1.patch
@@ -0,0 +1,73 @@
+Index: hwdecode-demos-0.9.5/src/ffmpeg.c
+===================================================================
+--- hwdecode-demos-0.9.5.orig/src/ffmpeg.c
++++ hwdecode-demos-0.9.5/src/ffmpeg.c
+@@ -53,7 +53,6 @@ static int ffmpeg_init(void)
+ return -1;
+ }
+
+- avcodec_init();
+ avcodec_register_all();
+
+ ffmpeg_context = ffmpeg;
+@@ -148,7 +147,6 @@ static int get_buffer(struct AVCodecCont
+ void *surface = (void *)(uintptr_t)vaapi->surface_id;
+
+ pic->type = FF_BUFFER_TYPE_USER;
+- pic->age = 1;
+ pic->data[0] = surface;
+ pic->data[1] = NULL;
+ pic->data[2] = NULL;
+Index: hwdecode-demos-0.9.5/src/ffmpeg_video.c
+===================================================================
+--- hwdecode-demos-0.9.5.orig/src/ffmpeg_video.c
++++ hwdecode-demos-0.9.5/src/ffmpeg_video.c
+@@ -23,6 +23,7 @@
+
+ #ifdef HAVE_LIBAVFORMAT_AVFORMAT_H
+ # include <libavformat/avformat.h>
++# include <libavformat/avio.h>
+ #endif
+ #ifdef HAVE_FFMPEG_AVFORMAT_H
+ # include <ffmpeg/avformat.h>
+@@ -59,7 +60,7 @@
+ int decode(void)
+ {
+ AVProbeData pd;
+- ByteIOContext ioctx;
++ AVIOContext *ioctx;
+ AVInputFormat *format = NULL;
+ AVFormatContext *ic = NULL;
+ AVCodec *codec;
+@@ -84,15 +85,20 @@ int decode(void)
+ goto end;
+ format->flags |= AVFMT_NOFILE;
+
+- if (init_put_byte(&ioctx, (uint8_t *)video_data, video_data_size, 0, NULL, NULL, NULL, NULL) < 0)
++ ioctx = avio_alloc_context((uint8_t *)video_data, video_data_size, 0, NULL, NULL, NULL, NULL);
++ if (!ioctx)
+ goto end;
+
+- if (av_open_input_stream(&ic, &ioctx, "", format, NULL) < 0)
++ ic = avformat_alloc_context();
++ if(!ic)
++ goto end;
++ ic->pb = ioctx;
++ if (avformat_open_input(&ic, "", format, NULL) < 0)
+ goto end;
+
+ if (av_find_stream_info(ic) < 0)
+ goto end;
+- dump_format(ic, 0, "", 0);
++ av_dump_format(ic, 0, "", 0);
+
+ video_stream = NULL;
+ for (i = 0; i < ic->nb_streams; i++) {
+@@ -135,6 +141,6 @@ end:
+ if (avctx)
+ avcodec_close(avctx);
+ if (ic)
+- av_close_input_stream(ic);
++ avformat_close_input(&ic);
+ return error;
+ }
diff --git a/media-video/hwdecode-demos/files/ffmpeg.patch b/media-video/hwdecode-demos/files/ffmpeg.patch
new file mode 100644
index 000000000000..fa8bdaf2cd4d
--- /dev/null
+++ b/media-video/hwdecode-demos/files/ffmpeg.patch
@@ -0,0 +1,33 @@
+Index: hwdecode-demos-0.9.5/src/ffmpeg.c
+===================================================================
+--- hwdecode-demos-0.9.5.orig/src/ffmpeg.c
++++ hwdecode-demos-0.9.5/src/ffmpeg.c
+@@ -193,10 +193,14 @@ int ffmpeg_decode(AVCodecContext *avctx,
+ {
+ CommonContext * const common = common_get_context();
+ FFmpegContext * const ffmpeg = ffmpeg_get_context();
++ AVPacket pkt;
+ int got_picture;
+
+ got_picture = 0;
+- if (avcodec_decode_video(avctx, ffmpeg->frame, &got_picture, (uint8_t *)buf, buf_size) < 0)
++ av_init_packet( &pkt );
++ pkt.data = buf;
++ pkt.size = buf_size;
++ if (avcodec_decode_video2(avctx, ffmpeg->frame, &got_picture, &pkt) < 0)
+ return -1;
+
+ if (got_picture && hwaccel_type() == HWACCEL_NONE) {
+Index: hwdecode-demos-0.9.5/src/ffmpeg_video.c
+===================================================================
+--- hwdecode-demos-0.9.5.orig/src/ffmpeg_video.c
++++ hwdecode-demos-0.9.5/src/ffmpeg_video.c
+@@ -96,7 +96,7 @@ int decode(void)
+
+ video_stream = NULL;
+ for (i = 0; i < ic->nb_streams; i++) {
+- if (ic->streams[i]->codec->codec_type == CODEC_TYPE_VIDEO && !video_stream)
++ if (ic->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO && !video_stream)
+ video_stream = ic->streams[i];
+ else
+ ic->streams[i]->discard = AVDISCARD_ALL;
diff --git a/media-video/hwdecode-demos/files/libav9.patch b/media-video/hwdecode-demos/files/libav9.patch
new file mode 100644
index 000000000000..df5dbdf03be1
--- /dev/null
+++ b/media-video/hwdecode-demos/files/libav9.patch
@@ -0,0 +1,42 @@
+Pouze v /tmp/hwdecode-demos-0.9.5/src/: config.h
+Pouze v /tmp/hwdecode-demos-0.9.5/src/: .deps
+diff -ur /var/tmp/portage/media-video/hwdecode-demos-0.9.5/work/hwdecode-demos-0.9.5/src/ffmpeg_video.c /tmp/hwdecode-demos-0.9.5/src/ffmpeg_video.c
+--- /var/tmp/portage/media-video/hwdecode-demos-0.9.5/work/hwdecode-demos-0.9.5/src/ffmpeg_video.c 2013-06-22 19:45:54.776768969 +0200
++++ /tmp/hwdecode-demos-0.9.5/src/ffmpeg_video.c 2013-06-22 19:45:44.720769327 +0200
+@@ -96,7 +96,7 @@
+ if (avformat_open_input(&ic, "", format, NULL) < 0)
+ goto end;
+
+- if (av_find_stream_info(ic) < 0)
++ if (avformat_find_stream_info(ic, NULL) < 0)
+ goto end;
+ av_dump_format(ic, 0, "", 0);
+
+@@ -115,7 +115,7 @@
+
+ if ((codec = avcodec_find_decoder(avctx->codec_id)) == NULL)
+ goto end;
+- if (avcodec_open(avctx, codec) < 0)
++ if (avcodec_open2(avctx, codec, NULL) < 0)
+ goto end;
+
+ got_picture = 0;
+Pouze v /tmp/hwdecode-demos-0.9.5/src/: Makefile
+Pouze v /tmp/hwdecode-demos-0.9.5/src/: stamp-h1
+diff -ur /var/tmp/portage/media-video/hwdecode-demos-0.9.5/work/hwdecode-demos-0.9.5/src/utils_glx.h /tmp/hwdecode-demos-0.9.5/src/utils_glx.h
+--- /var/tmp/portage/media-video/hwdecode-demos-0.9.5/work/hwdecode-demos-0.9.5/src/utils_glx.h 2011-01-06 09:15:35.000000000 +0100
++++ /tmp/hwdecode-demos-0.9.5/src/utils_glx.h 2013-06-22 19:45:44.720769327 +0200
+@@ -28,6 +28,13 @@
+ #include <GL/glx.h>
+ #include <GL/glxext.h>
+
++#if GL_GLEXT_VERSION >= 85
++ /* XXX: PFNGLMULTITEXCOORD2FPROC got out of the GL_VERSION_1_3_DEPRECATED
++ block and is not defined if GL_VERSION_1_3 is defined in <GL/gl.h>
++ Redefine the type here as an interim solution */
++ typedef void (*PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t);
++#endif
++
+ const char *
+ gl_get_error_string(GLenum error);
+
diff --git a/media-video/hwdecode-demos/files/vaapi.patch b/media-video/hwdecode-demos/files/vaapi.patch
new file mode 100644
index 000000000000..a6d3e902a9a8
--- /dev/null
+++ b/media-video/hwdecode-demos/files/vaapi.patch
@@ -0,0 +1,38 @@
+From 5afe6345d8ca1c673cbddcf8c7bc3af7709d5454 Mon Sep 17 00:00:00 2001
+From: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
+Date: Tue, 10 Jul 2012 14:43:37 +0200
+Subject: [PATCH] vaapi: fix build with recent VA-API versions.
+
+---
+ src/vaapi.c | 2 ++
+ src/vaapi_compat.h | 5 +++++
+ 2 files changed, 7 insertions(+), 0 deletions(-)
+
+Index: hwdecode-demos-0.9.5/src/vaapi.c
+===================================================================
+--- hwdecode-demos-0.9.5.orig/src/vaapi.c
++++ hwdecode-demos-0.9.5/src/vaapi.c
+@@ -92,7 +92,9 @@ static const char *string_of_VADisplayAt
+ TYPE(Hue);
+ TYPE(Saturation);
+ TYPE(BackgroundColor);
++#if !VA_CHECK_VERSION(0,34,0)
+ TYPE(DirectSurface);
++#endif
+ #undef TYPE
+ default: break;
+ }
+Index: hwdecode-demos-0.9.5/src/vaapi_compat.h
+===================================================================
+--- hwdecode-demos-0.9.5.orig/src/vaapi_compat.h
++++ hwdecode-demos-0.9.5/src/vaapi_compat.h
+@@ -91,4 +91,9 @@ typedef struct _VASliceParameterBufferBa
+ (VA_MINOR_VERSION == 31 && \
+ VA_MICRO_VERSION == 0 && VA_SDS_VERSION < 5)))
+
++#if VA_CHECK_VERSION(0,34,0)
++/* New vaCreateSurfaces() API with surface attributes */
++# include <va/va_compat.h>
++#endif
++
+ #endif /* VAAPI_COMPAT_H */
diff --git a/media-video/hwdecode-demos/hwdecode-demos-0.9.5.ebuild b/media-video/hwdecode-demos/hwdecode-demos-0.9.5.ebuild
new file mode 100644
index 000000000000..b824c55ce17b
--- /dev/null
+++ b/media-video/hwdecode-demos/hwdecode-demos-0.9.5.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit base autotools
+
+DESCRIPTION="Standalone programs showing off various HW acceleration APIs"
+HOMEPAGE="http://www.splitted-desktop.com/~gbeauchesne/hwdecode-demos/"
+SRC_URI="http://www.splitted-desktop.com/~gbeauchesne/hwdecode-demos/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="opengl vaapi vdpau"
+
+RDEPEND="virtual/ffmpeg
+ x11-libs/libX11
+ opengl? ( virtual/opengl virtual/glu )
+ vaapi? ( x11-libs/libva )
+ vdpau? ( x11-libs/libvdpau )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}/ffmpeg.patch"
+ "${FILESDIR}/ffmpeg-1.patch"
+ "${FILESDIR}/libav9.patch"
+ "${FILESDIR}/vaapi.patch"
+ "${FILESDIR}/dl.patch"
+ "${FILESDIR}/avutil.patch"
+)
+
+src_prepare() {
+ base_src_prepare
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-crystalhd \
+ $(use_enable opengl glx) \
+ $(use_enable vaapi) \
+ $(use_enable vdpau) \
+ --disable-xvba
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc NEWS README
+}
diff --git a/media-video/hwdecode-demos/metadata.xml b/media-video/hwdecode-demos/metadata.xml
new file mode 100644
index 000000000000..c572c7d9b478
--- /dev/null
+++ b/media-video/hwdecode-demos/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>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/media-video/imagination/Manifest b/media-video/imagination/Manifest
new file mode 100644
index 000000000000..ee1f6d9a4f25
--- /dev/null
+++ b/media-video/imagination/Manifest
@@ -0,0 +1 @@
+DIST imagination-3.0.tar.gz 3327784 SHA256 417d8586d9c85109b87d30b9c196d63531a637cbc2ffb3c12b48a873bfcb4b1e SHA512 0780ab572d8f4fc1e728befef79f974169438d723f67205e677c06cbe0dac06745868936e7d3eab5fc42728902f6b06eb5f9d7e836532c289df005ddab2104b8 WHIRLPOOL f091ea5d65b79cdd2b74cb330a91b9da3b707e0f775af4aa9f0d523e414705fce25e630d32f4c4b6433068a0ce61d48352fa61842b8e736233a6c3eff2a897e7
diff --git a/media-video/imagination/files/imagination-3.0-cflags.patch b/media-video/imagination/files/imagination-3.0-cflags.patch
new file mode 100644
index 000000000000..1b38a9aeff71
--- /dev/null
+++ b/media-video/imagination/files/imagination-3.0-cflags.patch
@@ -0,0 +1,34 @@
+diff --git a/configure.in b/configure.in
+index 0be7802..d19c8ec 100644
+--- a/configure.in
++++ b/configure.in
+@@ -24,7 +24,7 @@
+ AM_PROG_LIBTOOL
+ LIBTOOL="$LIBTOOL --silent"
+
+-pkg_modules="gtk+-2.0 >= 2.14.0 gthread-2.0"
++pkg_modules="gtk+-2.0 >= 2.14.0 gthread-2.0 gmodule-2.0"
+ PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
+
+ sox_modules="sox >= 14.2.0"
+@@ -33,6 +33,11 @@
+ plugins_modules="cairo >= 1.6 glib-2.0 > 2.18.0"
+ PKG_CHECK_MODULES(PLUGINS, [$plugins_modules])
+
++dnl Check for libm for sqrtf()
++AC_SEARCH_LIBS([sqrtf], [m], [], [
++ AC_MSG_ERROR([unable to find the sqrtf() function])
++])
++
+ # get svn revision
+ REVISION="r0"
+ if test "x${REVISION}" = "xr0"
+@@ -46,7 +51,7 @@
+ if test "x${REVISION}" != "xr0"
+ then
+ # force debug mode for a SVN working copy
+- CFLAGS="-g -Wall"
++ CFLAGS +="-Wall"
+ else
+ REVISION="-1"
+ fi
diff --git a/media-video/imagination/imagination-3.0-r1.ebuild b/media-video/imagination/imagination-3.0-r1.ebuild
new file mode 100644
index 000000000000..bff3ad21d083
--- /dev/null
+++ b/media-video/imagination/imagination-3.0-r1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit autotools eutils
+
+DESCRIPTION="Simple DVD slideshow maker"
+HOMEPAGE="http://imagination.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="linguas_cs linguas_de linguas_en_GB linguas_fr linguas_it linguas_pt_BR
+linguas_sv linguas_zh_CN linguas_zh_TW"
+
+DEPEND="x11-libs/gtk+:2
+ media-sound/sox"
+RDEPEND="${DEPEND}
+ virtual/ffmpeg"
+
+LANGS="cs de en_GB fr it pt_BR sv zh_CN zh_TW"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-cflags.patch
+ # enable translations. Bug #380011
+ sed -i -e "/#define PLUGINS_INSTALLED/s:0:1:" "${S}"/src/support.h || die
+ rm "${S}"/po/LINGUAS
+ for x in ${LANGS}; do
+ if ! has ${x} ${LINGUAS}; then
+ rm "${S}"/po/${x}.po || die
+ else
+ echo -n "${x} " >> "${S}"/po/LINGUAS
+ fi
+ done
+ eautoreconf
+}
+
+src_install() {
+ default
+ doicon icons/48x48/${PN}.png
+}
diff --git a/media-video/imagination/imagination-3.0.ebuild b/media-video/imagination/imagination-3.0.ebuild
new file mode 100644
index 000000000000..333e127fc633
--- /dev/null
+++ b/media-video/imagination/imagination-3.0.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit autotools eutils
+
+DESCRIPTION="Simple DVD slideshow maker"
+HOMEPAGE="http://imagination.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="linguas_cs linguas_de linguas_en_GB linguas_fr linguas_it linguas_pt_BR
+linguas_sv linguas_zh_CN linguas_zh_TW"
+
+DEPEND="x11-libs/gtk+:2
+ media-sound/sox"
+RDEPEND="${DEPEND}
+ virtual/ffmpeg"
+
+LANGS="cs de en_GB fr it pt_BR sv zh_CN zh_TW"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-cflags.patch
+ eautoreconf
+}
+
+src_install() {
+ default
+ doicon icons/48x48/${PN}.png
+}
diff --git a/media-video/imagination/metadata.xml b/media-video/imagination/metadata.xml
new file mode 100644
index 000000000000..9f1fdd3b37f4
--- /dev/null
+++ b/media-video/imagination/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>hwoarang@gentoo.org</email>
+ <name>Markos Chandras</name>
+ </maintainer>
+ <longdescription lang="en">
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">imagination</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/isight-firmware-tools/Manifest b/media-video/isight-firmware-tools/Manifest
new file mode 100644
index 000000000000..092183649d2d
--- /dev/null
+++ b/media-video/isight-firmware-tools/Manifest
@@ -0,0 +1 @@
+DIST isight-firmware-tools-1.6.tar.gz 229122 SHA256 3181973db8a1cadd68785cd81959c8e1e9dc8110342ec1639a50db53d82a367e SHA512 1d72e10d1ff97665c96113c70786307e0b5d1cd24cd8f5fcd15ddd7b608ff1596023139a41f550a9fd288bd8968f69d348b433f5a739179fc0e3f8fa3e143fea WHIRLPOOL ac29469f205a3150f8ef0d95fc7c3b113559f325b172a8c4ccb1758195da32024b278d3e46b2eb899eca4e140758ef6b2381086b7f6e5c837adbb5b4bd3d520f
diff --git a/media-video/isight-firmware-tools/files/isight-firmware-tools-1.5.90-build-O0.patch b/media-video/isight-firmware-tools/files/isight-firmware-tools-1.5.90-build-O0.patch
new file mode 100644
index 000000000000..8308cf6860b2
--- /dev/null
+++ b/media-video/isight-firmware-tools/files/isight-firmware-tools-1.5.90-build-O0.patch
@@ -0,0 +1,32 @@
+--- src/export.c
++++ src/export.c
+@@ -35,6 +35,8 @@
+ #include <glib/gi18n.h>
+ #include <glib/gstdio.h>
+
++#include <locale.h>
++
+ /* OPTIONS */
+ static gchar *input = NULL;
+ static gchar *output = "isight.ihx";
+--- src/extract.c
++++ src/extract.c
+@@ -36,6 +36,8 @@
+ #include <glib/gi18n.h>
+ #include <glib/gstdio.h>
+
++#include <locale.h>
++
+ /*
+ * Foreach file identified by their sha1sum, we store the offset where
+ * the firmware begin in the file.
+--- src/load.h
++++ src/load.h
+@@ -36,6 +36,8 @@
+ #include <glib.h>
+ #include <usb.h>
+
++#include <locale.h>
++
+ #ifndef _LOAD_H_
+ #define _LOAD_H_
diff --git a/media-video/isight-firmware-tools/isight-firmware-tools-1.6-r1.ebuild b/media-video/isight-firmware-tools/isight-firmware-tools-1.6-r1.ebuild
new file mode 100644
index 000000000000..dec6aa14dde1
--- /dev/null
+++ b/media-video/isight-firmware-tools/isight-firmware-tools-1.6-r1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils versionator udev
+
+MY_MAJORV="$(get_version_component_range 1).6"
+
+DESCRIPTION="Extract, load or export firmware for the iSight webcams"
+HOMEPAGE="https://launchpad.net/isight-firmware-tools"
+SRC_URI="http://launchpad.net/${PN}/main/${MY_MAJORV}/+download/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND=">=dev-libs/glib-2.14:2
+ dev-libs/libgcrypt:0
+ virtual/libusb:0
+ virtual/udev"
+DEPEND="${RDEPEND}
+ >=dev-util/intltool-0.40
+ sys-apps/texinfo
+ virtual/pkgconfig"
+
+src_prepare() {
+ # Fix build with -O0, bug #221325
+ epatch "${FILESDIR}"/${PN}-1.5.90-build-O0.patch
+
+ sed -i \
+ -e "s:@udevdir@:$(get_udevdir):" \
+ src/isight.rules.in.in || die
+}
+
+src_configure() {
+ # https://bugs.launchpad.net/isight-firmware-tools/+bug/243255
+ econf --docdir=/usr/share/doc/${PF}
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ libudevdir="$(get_udevdir)" \
+ rulesdir="$(get_udevdir)"/rules.d \
+ install
+
+ mv -vf "${D}/$(get_udevdir)"/rules.d/{isight.rules,70-isight.rules}
+
+ dodoc AUTHORS ChangeLog HOWTO NEWS README
+ rm -f "${D}"/usr/share/doc/${PF}/HOWTO
+}
+
+pkg_postinst() {
+ elog "You need to extract your firmware prior to being able to loading it"
+ elog "ift-extract --apple-driver /macos/System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBVideoSupport.kext/Contents/MacOS/AppleUSBVideoSupport"
+ elog "If you do not have OSX you can get AppleUSBVideoSupport from"
+ elog "http://www.mediafire.com/?81xtkqyttjt"
+}
diff --git a/media-video/isight-firmware-tools/metadata.xml b/media-video/isight-firmware-tools/metadata.xml
new file mode 100644
index 000000000000..b480f9f9e385
--- /dev/null
+++ b/media-video/isight-firmware-tools/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>eva@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="launchpad">isight-firmware-tools</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/istanbul/Manifest b/media-video/istanbul/Manifest
new file mode 100644
index 000000000000..62c46dbc6d55
--- /dev/null
+++ b/media-video/istanbul/Manifest
@@ -0,0 +1,2 @@
+DIST istanbul-0.2.2.1_pre20120909.tar.bz2 407102 SHA256 596c80bb94bf99b52110b7e2676b2e3008e3e82290319fdf1f5a31ee535de8a9 SHA512 f0e03a251781e07392bee3401a4ec4bb61719be8d66160228aa28a48774c393e4f4de6538bbd041285e85a96d85a6f103c76d6a9f5fb60eb424f7397e2f2809c WHIRLPOOL beed58df0244e4b957281760d8051aa7b5ec8605b0d9f76ae5a38a463b2e9948ce276d9e53cde0fbd167c1b1a2cfe4cd40e5c64049e2dd762fb13352eb1cf107
+DIST istanbul-0.2.2.tar.bz2 349075 SHA256 3baa2462ecf1b13d0d95cd035fe0f0fc0fcc3df8cb04a3b7f237e90e9a40acd5 SHA512 b7d5b99cb3860414f4139fd1fa887e4d58f99fc5c94f9d24d7a96f03e82ec7338d733e3ab7d8b8db6ae2c00f69aa48a099b957a23e3827c7d6505ab92bbb5c60 WHIRLPOOL 07a8b9406a017f8ac36f3062620dac507e034e5a5eadb401dc189e9f34b83d3549475fe63191cd2aad898a30a8f6afcc7128a6febed127efa7546decdca4660d
diff --git a/media-video/istanbul/files/istanbul-0.2.2-desktop-file.patch b/media-video/istanbul/files/istanbul-0.2.2-desktop-file.patch
new file mode 100644
index 000000000000..b71df11077c2
--- /dev/null
+++ b/media-video/istanbul/files/istanbul-0.2.2-desktop-file.patch
@@ -0,0 +1,18 @@
+diff --git a/data/istanbul.desktop.in b/data/istanbul.desktop.in
+index 4235410..a1b5772 100644
+--- a/data/istanbul.desktop.in
++++ b/data/istanbul.desktop.in
+@@ -1,11 +1,10 @@
+ [Desktop Entry]
+-Encoding=UTF-8
+ _Name=Istanbul Desktop Session Recorder
+ _GenericName=Desktop Session Recorder
+ _Comment=Record a video of your desktop session
+ Exec=istanbul
+ Terminal=false
+ Type=Application
+-Icon=istanbul.png
+-Categories=GNOME;Application;AudioVideo;
++Icon=istanbul
++Categories=GTK;GNOME;AudioVideo;
+ StartupNotify=false
diff --git a/media-video/istanbul/files/istanbul-0.2.2-dir-overwrite.patch b/media-video/istanbul/files/istanbul-0.2.2-dir-overwrite.patch
new file mode 100644
index 000000000000..c5873874d3c2
--- /dev/null
+++ b/media-video/istanbul/files/istanbul-0.2.2-dir-overwrite.patch
@@ -0,0 +1,31 @@
+From: Luca Bruno <lucab@debian.org>
+Subject: istanbul: saving screencasts can overwrite directories
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=592258
+
+diff --git a/istanbul/main/save_window.py b/istanbul/main/save_window.py
+index dc79ce8..87e5ab0 100644
+--- a/istanbul/main/save_window.py
++++ b/istanbul/main/save_window.py
+@@ -256,7 +256,7 @@ class SaveWindow(gtk.Window):
+ try:
+ trysave = gnomevfs.xfer_uri(gnomevfs.URI("file://%s" % self.location),
+ gnomevfs.URI(self.filechooser.get_uri()),
+- gnomevfs.XFER_DELETE_ITEMS,
++ gnomevfs.XFER_REMOVESOURCE,
+ gnomevfs.XFER_ERROR_MODE_ABORT,
+ gnomevfs.XFER_OVERWRITE_MODE_ABORT)
+ except gnomevfs.FileExistsError:
+@@ -272,10 +272,12 @@ class SaveWindow(gtk.Window):
+ dialog.hide()
+ if res == gtk.RESPONSE_YES:
+ try:
++ if os.path.isdir(self.filechooser.get_uri()[7:]):
++ raise Exception()
+ trysave = gnomevfs.xfer_uri(
+ gnomevfs.URI("file://%s" % self.location),
+ gnomevfs.URI(self.filechooser.get_uri()),
+- gnomevfs.XFER_DELETE_ITEMS,
++ gnomevfs.XFER_REMOVESOURCE,
+ gnomevfs.XFER_ERROR_MODE_ABORT,
+ gnomevfs.XFER_OVERWRITE_MODE_REPLACE)
+ except Exception:
diff --git a/media-video/istanbul/files/istanbul-0.2.2-fix-grab-xid.patch b/media-video/istanbul/files/istanbul-0.2.2-fix-grab-xid.patch
new file mode 100644
index 000000000000..95f534aca284
--- /dev/null
+++ b/media-video/istanbul/files/istanbul-0.2.2-fix-grab-xid.patch
@@ -0,0 +1,36 @@
+From: Jef Spaleta <jspaleta@gmail.com>
+Subject: Try to get the xid on realization of the videowidget
+Origin: upstream
+Bug: https://bugzilla.gnome.org/show_bug.cgi?id=604938
+Bug-Debian: http://bugs.debian.org/554568
+
+Index: istanbul-0.2.2/istanbul/main/save_window.py
+===================================================================
+--- istanbul-0.2.2.orig/istanbul/main/save_window.py 2010-07-08 10:38:56.609390459 +0200
++++ istanbul-0.2.2/istanbul/main/save_window.py 2010-07-08 10:38:53.153107943 +0200
+@@ -35,8 +35,13 @@
+ def __init__(self):
+ gtk.DrawingArea.__init__(self)
+ self.imagesink = None
++ self._xid = None
+ self.unset_flags(gtk.DOUBLE_BUFFERED)
+
++ def do_realize(self):
++ gtk.DrawingArea.do_realize(self)
++ self._xid = self.window.xid
++
+ def do_expose_event(self, event):
+ if self.imagesink:
+ self.imagesink.expose()
+@@ -45,9 +50,9 @@
+ return True
+
+ def set_sink(self, sink):
+- assert self.window.xid
++ assert self._xid is not None
+ self.imagesink = sink
+- self.imagesink.set_xwindow_id(self.window.xid)
++ self.imagesink.set_xwindow_id(self._xid)
+
+ class SaveWindow(gtk.Window):
+ UPDATE_INTERVAL = 500
diff --git a/media-video/istanbul/files/istanbul-0.2.2-fix-preview-window.patch b/media-video/istanbul/files/istanbul-0.2.2-fix-preview-window.patch
new file mode 100644
index 000000000000..181c0622e41b
--- /dev/null
+++ b/media-video/istanbul/files/istanbul-0.2.2-fix-preview-window.patch
@@ -0,0 +1,23 @@
+From: Jef Spaleta <jspaleta@gmail.com>
+Subject: Additional patch to fix preview video widget in save_window.py
+Origin: upstream
+Bug: https://bugzilla.gnome.org/show_bug.cgi?id=604938
+Bug-Debian: http://bugs.debian.org/554568
+
+Index: istanbul-0.2.2/istanbul/main/save_window.py
+===================================================================
+--- istanbul-0.2.2.orig/istanbul/main/save_window.py 2010-07-08 10:39:51.433390429 +0200
++++ istanbul-0.2.2/istanbul/main/save_window.py 2010-07-08 10:39:49.184894943 +0200
+@@ -143,8 +143,11 @@
+ yoptions=0)
+ table.set_row_spacing(0,6)
+ table.set_row_spacing(1,6)
++ def init_videowidget( widget):
++ widget._xid = widget.window.xid
++ self.player.pause()
+ self.videowidget.connect_after('realize',
+- lambda *x: self.player.pause() )
++ init_videowidget )
+ self.videowidget.set_size_request(width, height)
+
+ # create save, edit, cancel buttons
diff --git a/media-video/istanbul/files/istanbul-0.2.2-macro-typo.patch b/media-video/istanbul/files/istanbul-0.2.2-macro-typo.patch
new file mode 100644
index 000000000000..6528f86b9399
--- /dev/null
+++ b/media-video/istanbul/files/istanbul-0.2.2-macro-typo.patch
@@ -0,0 +1,21 @@
+Avoid autoreconf failure by globbing everything in [] in the macro definition.
+
+Gentoo: http://bugs.gentoo.org/show_bug.cgi?id=230325
+
+--- a/common/gst-feature.m4 2009-07-27 11:29:22.000000000 +0200
++++ b/common/gst-feature.m4 2009-07-27 11:29:28.000000000 +0200
+@@ -46,13 +46,13 @@
+ dnl GST_PLUGINS_NO will contain those that won't be built
+
+ AC_DEFUN([GST_CHECK_FEATURE],
++[dnl
+ echo
+ AC_MSG_NOTICE(*** checking feature: [$2] ***)
+ if test "x[$3]" != "x"
+ then
+ AC_MSG_NOTICE(*** for plug-ins: [$3] ***)
+ fi
+-[dnl
+ builtin(define, [gst_endisable], ifelse($5, [disabled], [enable], [disable]))dnl
+ dnl if it is set to NO, then don't even consider it for building
+ NOUSE=
diff --git a/media-video/istanbul/files/istanbul-0.2.2-noalsa.patch b/media-video/istanbul/files/istanbul-0.2.2-noalsa.patch
new file mode 100644
index 000000000000..772dc700c777
--- /dev/null
+++ b/media-video/istanbul/files/istanbul-0.2.2-noalsa.patch
@@ -0,0 +1,17 @@
+From: Luca Bruno <lucab@debian.org>
+Subject: istanbul: Uninstallable on kfreebsd-* (depends on gstreamer0.10-alsa)
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=591739
+
+Index: istanbul-0.2.2/istanbul/main/screencast.py
+===================================================================
+--- istanbul-0.2.2.orig/istanbul/main/screencast.py 2010-08-17 11:38:02.898762661 +0200
++++ istanbul-0.2.2/istanbul/main/screencast.py 2010-08-17 11:38:51.154511463 +0200
+@@ -95,7 +95,7 @@
+ if Preferences().has_gconf():
+ asource = 'gconfaudiosrc name=audiosource'
+ else:
+- asource = 'alsasrc name=audiosource'
++ asource = 'autoaudiosrc name=audiosource'
+ acappipeline = '%s ! audioconvert ! vorbisenc' % asource
+
+ vencode_pipeline = 'video/x-raw-yuv,width=%d,height=%d,framerate=%s '\
diff --git a/media-video/istanbul/istanbul-0.2.2.1_pre20120909.ebuild b/media-video/istanbul/istanbul-0.2.2.1_pre20120909.ebuild
new file mode 100644
index 000000000000..b530d8fd5931
--- /dev/null
+++ b/media-video/istanbul/istanbul-0.2.2.1_pre20120909.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+GNOME2_LA_PUNT="yes"
+PYTHON_DEPEND="2"
+
+inherit eutils gnome2 python autotools
+
+HOMEPAGE="http://live.gnome.org/Istanbul"
+DESCRIPTION="Istanbul is a screencast application for the Unix desktop"
+#SRC_URI="http://zaheer.merali.org/${P}.tar.bz2"
+SRC_URI="http://dev.gentoo.org/~tetromino/distfiles/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2" # Note: not GPL-2+
+SLOT=0
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="
+ >=dev-python/pygtk-2.6
+ dev-python/gst-python:0.10
+ dev-python/python-xlib
+ >=dev-python/egg-python-2.11.3
+ >=dev-python/gnome-vfs-python-2
+ >=dev-python/gconf-python-2
+ >=gnome-base/gconf-2
+ >=media-libs/libtheora-1.0_alpha6[encode]
+
+ >=media-libs/gst-plugins-base-0.10.8:0.10
+ media-plugins/gst-plugins-gconf:0.10
+ media-plugins/gst-plugins-ogg:0.10
+ media-plugins/gst-plugins-libpng:0.10
+ media-plugins/gst-plugins-theora:0.10
+ media-plugins/gst-plugins-vorbis:0.10
+"
+DEPEND="${RDEPEND}
+ >=dev-util/intltool-0.35.0
+ virtual/pkgconfig
+"
+
+S="${WORKDIR}/${PN}-0.2.2.1"
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_prepare() {
+ python_clean_py-compile_files
+ cp py-compile common/py-compile-destdir || die
+
+ # .desktop file validation failures
+ epatch "${FILESDIR}/${PN}-0.2.2-desktop-file.patch"
+
+ # important Debian patches
+ epatch "${FILESDIR}/${PN}-0.2.2-fix-grab-xid.patch"
+ epatch "${FILESDIR}/${PN}-0.2.2-fix-preview-window.patch"
+ epatch "${FILESDIR}/${PN}-0.2.2-dir-overwrite.patch"
+ epatch "${FILESDIR}/${PN}-0.2.2-noalsa.patch"
+
+ eautoreconf
+
+ gnome2_src_prepare
+}
+
+src_configure() {
+ mkdir -p "${T}/home"
+ export HOME="${T}/home"
+ export GST_REGISTRY=${T}/home/registry.cache.xml
+ addpredict /root/.gconfd
+ addpredict /root/.gconf
+ addpredict /root/.gnome2
+
+ gnome2_src_configure
+}
+
+pkg_postinst() {
+ gnome2_pkg_postinst
+ python_mod_optimize istanbul
+}
+
+pkg_postrm() {
+ gnome2_pkg_postrm
+ python_mod_cleanup istanbul
+}
diff --git a/media-video/istanbul/istanbul-0.2.2.ebuild b/media-video/istanbul/istanbul-0.2.2.ebuild
new file mode 100644
index 000000000000..8246fc893788
--- /dev/null
+++ b/media-video/istanbul/istanbul-0.2.2.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+PYTHON_DEPEND="2"
+
+inherit eutils gnome2 python autotools
+
+HOMEPAGE="http://live.gnome.org/Istanbul"
+DESCRIPTION="Istanbul is a screencast application for the Unix desktop"
+SRC_URI="http://zaheer.merali.org/${P}.tar.bz2"
+
+LICENSE="GPL-2" # Note: not GPL-2+
+SLOT=0
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+ >=dev-python/pygtk-2.6
+ dev-python/gst-python:0.10
+ dev-python/python-xlib
+ >=dev-python/egg-python-2.11.3
+ >=dev-python/gnome-vfs-python-2
+ >=dev-python/gconf-python-2
+ >=gnome-base/gconf-2
+ >=media-libs/libtheora-1.0_alpha6[encode]
+
+ >=media-libs/gst-plugins-base-0.10.8:0.10
+ media-plugins/gst-plugins-gconf:0.10
+ media-plugins/gst-plugins-ogg:0.10
+ media-plugins/gst-plugins-libpng:0.10
+ media-plugins/gst-plugins-theora:0.10
+ media-plugins/gst-plugins-vorbis:0.10
+"
+DEPEND="${RDEPEND}
+ >=dev-util/intltool-0.35.0
+ virtual/pkgconfig
+"
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_prepare() {
+ python_clean_py-compile_files
+ cp py-compile common/py-compile-destdir || die
+
+ # fix autoreconf failure, bug #230325
+ epatch "${FILESDIR}/${P}-macro-typo.patch"
+
+ eautoreconf
+
+ gnome2_src_prepare
+}
+
+src_configure() {
+ mkdir -p "${T}/home"
+ export HOME="${T}/home"
+ export GST_REGISTRY=${T}/home/registry.cache.xml
+ addpredict /root/.gconfd
+ addpredict /root/.gconf
+ addpredict /root/.gnome2
+
+ gnome2_src_configure
+}
+
+pkg_postinst() {
+ gnome2_pkg_postinst
+ python_mod_optimize istanbul
+}
+
+pkg_postrm() {
+ gnome2_pkg_postrm
+ python_mod_cleanup istanbul
+}
diff --git a/media-video/istanbul/metadata.xml b/media-video/istanbul/metadata.xml
new file mode 100644
index 000000000000..9e260ceca3e3
--- /dev/null
+++ b/media-video/istanbul/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>gstreamer</herd>
+</pkgmetadata>
diff --git a/media-video/jubler/Manifest b/media-video/jubler/Manifest
new file mode 100644
index 000000000000..a56121547cd6
--- /dev/null
+++ b/media-video/jubler/Manifest
@@ -0,0 +1 @@
+DIST Jubler-source-4.6.1.tar.bz2 1971701 SHA256 1aeed14cc500165470b29884585432e9d14940c314bafa0f6318789005dd18f1 SHA512 629aef58f98d2d8569a58a4c68c9bf440cd4693ca8847a0b8ad9e84458cd88de44542b5fc84e25033c1e22b26a4d675e070c5a58203a6bbe671072e5cdc2680a WHIRLPOOL bf3e95a5515e3895a6773433681f5abfebc159f30b8a91acf51aa6ea961247db8686ab3d92112725b5443b5f1ffb16a5cc4c46036e7b3fa6a5a562e6c7ae211d
diff --git a/media-video/jubler/files/jubler-4.6.1-ffmpeg-1.patch b/media-video/jubler/files/jubler-4.6.1-ffmpeg-1.patch
new file mode 100644
index 000000000000..18df9069d198
--- /dev/null
+++ b/media-video/jubler/files/jubler-4.6.1-ffmpeg-1.patch
@@ -0,0 +1,274 @@
+Index: Jubler-4.6.1/resources/ffmpeg/ffdecode/decodeaudio.c
+===================================================================
+--- Jubler-4.6.1.orig/resources/ffmpeg/ffdecode/decodeaudio.c
++++ Jubler-4.6.1/resources/ffmpeg/ffdecode/decodeaudio.c
+@@ -67,19 +67,19 @@ jboolean decodeAudio(JNIEnv * env, jobje
+ AVStream *audio_st=NULL;
+ int got_audio, len, err=0, audio_index=-1, i=0, pack_duration=0, packsize=0, codec_is_open=-1, video_index=-1, codec_enc_is_open=-1;
+ jlong pack_pts=0;
+- char *outbuf=NULL;
++ AVFrame *outbuf=NULL;
+ unsigned char *packptr;
+ jboolean ret = JNI_TRUE, nobrk = JNI_TRUE;
+
+ av_register_all();
+
+ /* Open the input/output files */
+- err = av_open_input_file(&fcx, input_filename, NULL, 0, NULL);
++ err = avformat_open_input(&fcx, input_filename, NULL, NULL);
+ if(err<0){
+ DEBUG(env, this, "decodeAudio", "Could not open file '%s'.", input_filename);
+ ret = JNI_FALSE;
+ }
+- outbuf = malloc(AVCODEC_MAX_AUDIO_FRAME_SIZE);
++ outbuf = avcodec_alloc_frame();
+ if(outbuf==NULL) {
+ DEBUG(env, this, "decodeAudio", "Could not allocate memory for outbuf.");
+ ret = JNI_FALSE;
+@@ -129,7 +129,7 @@ jboolean decodeAudio(JNIEnv * env, jobje
+ }
+ else {
+ /* open it */
+- if ((codec_is_open = avcodec_open(ccx, codec)) < 0) {
++ if ((codec_is_open = avcodec_open2(ccx, codec, NULL)) < 0) {
+ DEBUG(env, this, "decodeAudio", "Could not open codec.");
+ ret = JNI_FALSE;
+ }
+@@ -158,10 +158,10 @@ jboolean decodeAudio(JNIEnv * env, jobje
+ }
+
+ /* use wav as the output format of the file */
+- fmt = guess_format(NULL, output_filename, NULL);
++ fmt = av_guess_format(NULL, output_filename, NULL);
+ if (!fmt) {
+ DEBUG(env, this, "decodeAudio", "Could not deduce output format from file extension: using WAV.");
+- fmt = guess_format("wav", NULL, NULL);
++ fmt = av_guess_format("wav", NULL, NULL);
+ }
+ if (!fmt) {
+ DEBUG(env, this, "decodeAudio", "Could not find suitable output format.");
+@@ -182,35 +182,28 @@ jboolean decodeAudio(JNIEnv * env, jobje
+ audio_st = add_audio_stream(env, this, ofcx, fmt->audio_codec, ccx->sample_rate, ccx->channels);
+ }
+
+- /* set the output parameters (must be done even if no parameters) */
+- if (av_set_parameters(ofcx, NULL) < 0) {
+- DEBUG(env, this, "decodeAudio", "Invalid output format parameters.");
+- ret = JNI_FALSE;
+- }
+- else {
+ codec_enc = avcodec_find_encoder(audio_st->codec->codec_id);
+ if (!codec_enc) {
+ DEBUG(env, this, "decodeAudio", "Encoder codec not found.");
+ ret = JNI_FALSE;
+ }
+ else {
+- if ((codec_enc_is_open = avcodec_open(audio_st->codec, codec_enc)) < 0) {
++ if ((codec_enc_is_open = avcodec_open2(audio_st->codec, codec_enc, NULL)) < 0) {
+ DEBUG(env, this, "decodeAudio", "Could not open encoder codec.");
+ ret = JNI_FALSE;
+ }
+ else {
+ if (!(fmt->flags & AVFMT_NOFILE)) {
+- if (url_fopen(&ofcx->pb, output_filename, URL_WRONLY) < 0) {
++ if (avio_open(&ofcx->pb, output_filename, AVIO_FLAG_WRITE) < 0) {
+ DEBUG(env, this, "decodeAudio", "Could not open file '%s'", output_filename);
+ ret = JNI_FALSE;
+ }
+ else {
+- av_write_header(ofcx);
++ avformat_write_header(ofcx,NULL);
+ }
+ }
+ }
+ }
+- }
+ }
+ }
+ else {
+@@ -243,7 +236,7 @@ jboolean decodeAudio(JNIEnv * env, jobje
+ ccx->request_channels = 2;
+ }
+ got_audio = AVCODEC_MAX_AUDIO_FRAME_SIZE;
+- len = avcodec_decode_audio2(ccx, (short *)outbuf, &got_audio, packptr, packsize);
++ len = avcodec_decode_audio4(ccx, outbuf, &got_audio, &pkt);
+
+ if (len < 0) {
+ DEBUG(env, this, "decodeAudio", "Error while decoding.");
+@@ -258,7 +251,7 @@ jboolean decodeAudio(JNIEnv * env, jobje
+ * this is the frame we want */
+ if (pack_pts >= seek_time_start) {
+ /* if a frame has been decoded, output it */
+- audio_enc_out(env, this, ofcx, audio_st, (short *)outbuf, got_audio);
++ audio_enc_out(env, this, ofcx, audio_st, (short *)(outbuf->data[0]), av_samples_get_buffer_size(NULL, ccx->channels, outbuf->nb_samples, ccx->sample_fmt, 1));
+ /* if the next frame gets past our stop time, we want to stop decoding */
+ if ( pack_pts + pack_duration > seek_time_stop ) {
+ av_free_packet(&pkt);
+@@ -269,7 +262,7 @@ jboolean decodeAudio(JNIEnv * env, jobje
+ /* If the next frame will be past our start seek time, this is the frame we want */
+ else if (pack_pts + pack_duration > seek_time_start) {
+ /* if a frame has been decoded, output it */
+- audio_enc_out(env, this, ofcx, audio_st, (short *)outbuf, got_audio);
++ audio_enc_out(env, this, ofcx, audio_st, (short *)(outbuf->data[0]), av_samples_get_buffer_size(NULL, ccx->channels, outbuf->nb_samples, ccx->sample_fmt, 1));
+ /* if the next frame gets past our stop time, we want to stop decoding */
+ if ( pack_pts + pack_duration > seek_time_stop ) {
+ av_free_packet(&pkt);
+@@ -301,7 +294,7 @@ jboolean decodeAudio(JNIEnv * env, jobje
+
+ /* close the output file */
+ if (!(fmt->flags & AVFMT_NOFILE) && ofcx->pb != NULL) {
+- url_fclose(ofcx->pb);
++ avio_close(ofcx->pb);
+ }
+
+ /* free the stream */
+@@ -309,7 +302,7 @@ jboolean decodeAudio(JNIEnv * env, jobje
+ }
+
+ if(codec_is_open >= 0) avcodec_close(ccx);
+- if(outbuf != NULL) free(outbuf);
++ if(outbuf != NULL) av_free(outbuf);
+ if(fcx != NULL) av_close_input_file(fcx);
+
+ return ret;
+Index: Jubler-4.6.1/resources/ffmpeg/ffdecode/decodeframe.c
+===================================================================
+--- Jubler-4.6.1.orig/resources/ffmpeg/ffdecode/decodeframe.c
++++ Jubler-4.6.1/resources/ffmpeg/ffdecode/decodeframe.c
+@@ -122,7 +122,7 @@ AVPicture* decodeFrame(JNIEnv * env, job
+ AVFrame *frame=avcodec_alloc_frame();
+
+ /* Open the input file */
+- err = av_open_input_file(&fcx, input_filename, NULL, 0, NULL);
++ err = avformat_open_input(&fcx, input_filename, NULL, NULL);
+ if(err<0){
+ DEBUG(env, this, "decodeFrame", "Could not open file '%s'.", input_filename);
+ retflag = FALSE;
+@@ -157,7 +157,7 @@ AVPicture* decodeFrame(JNIEnv * env, job
+ }
+ else {
+ // Open codec
+- if((codec_is_open = avcodec_open(ccx, codec)) < 0 ) {
++ if((codec_is_open = avcodec_open2(ccx, codec, NULL)) < 0 ) {
+ DEBUG(env, this, "decodeFrame", "Could not open codec.");
+ retflag = FALSE;
+ }
+@@ -190,7 +190,7 @@ AVPicture* decodeFrame(JNIEnv * env, job
+ pack_duration = av_rescale_q(pkt.duration, fcx->streams[video_index]->time_base, AV_TIME_BASE_Q);
+ comp_pts += pkt.duration;
+ // Decode this packet
+- len = avcodec_decode_video(ccx, frame, &got_picture, pkt.data, pkt.size);
++ len = avcodec_decode_video2(ccx, frame, &got_picture, &pkt);
+ if (len < 0) {
+ DEBUG(env, this, "decodeFrame", "Error while decoding.");
+ retflag = FALSE;
+@@ -265,7 +265,7 @@ int file_info(JNIEnv * env, jobject this
+ av_register_all();
+
+ // Open the input file.
+- err = av_open_input_file(&fcx, input_filename, NULL, 0, NULL);
++ err = avformat_open_input(&fcx, input_filename, NULL, NULL);
+ if(err<0){
+ DEBUG(env, this, "file_info", "Could not open file '%s'.", input_filename);
+ return 1;
+@@ -275,9 +275,9 @@ int file_info(JNIEnv * env, jobject this
+ err = av_find_stream_info(fcx);
+
+ // Give us information about the file and exit
+- dump_format(fcx, 0, input_filename, FALSE);
++ av_dump_format(fcx, 0, input_filename, FALSE);
+
+- av_close_input_file(fcx);
++ avformat_close_input(&fcx);
+ return 0;
+ }
+
+Index: Jubler-4.6.1/resources/ffmpeg/ffdecode/grabinfo.c
+===================================================================
+--- Jubler-4.6.1.orig/resources/ffmpeg/ffdecode/grabinfo.c
++++ Jubler-4.6.1/resources/ffmpeg/ffdecode/grabinfo.c
+@@ -82,7 +82,7 @@ void get_information(JNIEnv * env, jobje
+ av_register_all();
+
+ // Open the input file.
+- err = av_open_input_file(&fcx, video_c, NULL, 0, NULL);
++ err = avformat_open_input(&fcx, video_c, NULL, NULL);
+ if(err<0) {
+ DEBUG(env, this, "get_information", "Could not open file '%s'.", video_c);
+ ret = JNI_FALSE;
+Index: Jubler-4.6.1/resources/ffmpeg/ffdecode/makecache.c
+===================================================================
+--- Jubler-4.6.1.orig/resources/ffmpeg/ffdecode/makecache.c
++++ Jubler-4.6.1/resources/ffmpeg/ffdecode/makecache.c
+@@ -59,7 +59,7 @@ JNIEXPORT jboolean JNICALL Java_com_pana
+ float ratewindow = 0;
+ unsigned int offset=0, maxbyte=0, sampledcounter=1;
+ FILE *cachefile=NULL;
+- uint8_t *outbuf=NULL;
++ AVFrame *outbuf=NULL;
+ jboolean nobrk = JNI_TRUE;
+
+ int ENDIANESS = isLittleEndian();
+@@ -81,7 +81,7 @@ JNIEXPORT jboolean JNICALL Java_com_pana
+ ret = JNI_TRUE;
+
+ // Open the input file.
+- err = av_open_input_file(&fcx, audio_c, NULL, 0, NULL);
++ err = avformat_open_input(&fcx, audio_c, NULL, NULL);
+ cachefile = fopen(cache_c, "wb");
+ if(err<0){
+ DEBUG(env, this, "makeCache", "Could not open audio file '%s'.", audio_c);
+@@ -91,7 +91,7 @@ JNIEXPORT jboolean JNICALL Java_com_pana
+ DEBUG(env, this, "makeCache", "Could not open cache file '%s'.", cache_c);
+ ret = JNI_FALSE;
+ }
+- outbuf = malloc(AVCODEC_MAX_AUDIO_FRAME_SIZE);
++ outbuf = avcodec_alloc_frame();
+ if(outbuf==NULL) {
+ DEBUG(env, this, "makeCache", "Could not allocate memory for outbuf.");
+ ret = JNI_FALSE;
+@@ -123,7 +123,7 @@ JNIEXPORT jboolean JNICALL Java_com_pana
+ }
+ else {
+ /* open it */
+- if ((codec_is_open = avcodec_open(ccx, codec)) < 0) {
++ if ((codec_is_open = avcodec_open2(ccx, codec,NULL)) < 0) {
+ DEBUG(env, this, "makeCache", "Could not open codec.");
+ ret = JNI_FALSE;
+ }
+@@ -175,7 +175,7 @@ JNIEXPORT jboolean JNICALL Java_com_pana
+ pack_pts = av_rescale_q(pkt.pts, fcx->streams[audio_index]->time_base, AV_TIME_BASE_Q);
+ // Decode the paket
+ got_audio = AVCODEC_MAX_AUDIO_FRAME_SIZE;
+- len = avcodec_decode_audio2(ccx, (short *)outbuf, &got_audio, pkt.data, pkt.size);
++ len = avcodec_decode_audio4(ccx, outbuf, &got_audio, &pkt);
+
+ if (len < 0) {
+ DEBUG(env, this, "makeCache", "Error while decoding.");
+@@ -196,7 +196,7 @@ JNIEXPORT jboolean JNICALL Java_com_pana
+ if (bytecounter+offset + step*channels >= maxbyte) {
+ for (j = 1; j <= channels ; j++) {
+ // actually sample is not the whole sample, but the data for one channel each time
+- sample = (char)outbuf[bytecounter+ENDIANESS];
++ sample = (char)outbuf->data[0][bytecounter+ENDIANESS];
+ // min max averaging: only keep the highest and the lowest sample value
+ if (maxsample[j-1] < sample) maxsample[j-1] = sample;
+ if (minsample[j-1] > sample) minsample[j-1] = sample;
+@@ -215,7 +215,7 @@ JNIEXPORT jboolean JNICALL Java_com_pana
+ }
+ else {
+ for (j = 1; j <= channels; j++) {
+- sample = (char)outbuf[bytecounter+ENDIANESS];
++ sample = (char)outbuf->data[0][bytecounter+ENDIANESS];
+ // min max averaging
+ if (maxsample[j-1] < sample) maxsample[j-1] = sample;
+ if (minsample[j-1] > sample) minsample[j-1] = sample;
+@@ -254,7 +254,7 @@ JNIEXPORT jboolean JNICALL Java_com_pana
+ if(minsample != NULL) free(minsample);
+ if(cachefile != NULL) fclose(cachefile);
+ if(codec_is_open >= 0) avcodec_close(ccx);
+- if(outbuf != NULL) free(outbuf);
++ if(outbuf != NULL) av_free(outbuf);
+ if(fcx != NULL) av_close_input_file(fcx);
+
+ return ret;
diff --git a/media-video/jubler/files/jubler-4.6.1-ffmpeg-2.patch b/media-video/jubler/files/jubler-4.6.1-ffmpeg-2.patch
new file mode 100644
index 000000000000..28f50b57d6ad
--- /dev/null
+++ b/media-video/jubler/files/jubler-4.6.1-ffmpeg-2.patch
@@ -0,0 +1,37 @@
+diff --git a/Jubler-4.6.1/resources/ffmpeg/ffdecode/decodeaudio.c b/Jubler-4.6.1/resources/ffmpeg/ffdecode/decodeaudio.c
+index 92bf071..d163010 100644
+--- a/Jubler-4.6.1/resources/ffmpeg/ffdecode/decodeaudio.c
++++ b/Jubler-4.6.1/resources/ffmpeg/ffdecode/decodeaudio.c
+@@ -37,6 +37,13 @@ jboolean decodeAudio(JNIEnv* env, jobject this, const char *input_filename, cons
+ AVStream *add_audio_stream(JNIEnv* env, jobject this, AVFormatContext *oc, int codec_id, int sample_rate, int channels);
+ void audio_enc_out(JNIEnv * env, jobject this, AVFormatContext *ofcx, AVStream *audio_st, const short *samples, int buf_size);
+
++#ifndef AVCODEC_MAX_AUDIO_FRAME_SIZE
++#ifndef MAX_AUDIO_FRAME_SIZE
++#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio
++#else
++#define AVCODEC_MAX_AUDIO_FRAME_SIZE MAX_AUDIO_FRAME_SIZE
++#endif
++#endif
+
+ JNIEXPORT jboolean JNICALL Java_com_panayotis_jubler_media_preview_decoders_FFMPEG_createClip(JNIEnv * env, jobject this, jstring audio, jstring wav, jlong start, jlong stop) {
+ const char * audio_c;
+diff --git a/Jubler-4.6.1/resources/ffmpeg/ffdecode/makecache.c b/Jubler-4.6.1/resources/ffmpeg/ffdecode/makecache.c
+index d7ea88b..0190b79 100644
+--- a/Jubler-4.6.1/resources/ffmpeg/ffdecode/makecache.c
++++ b/Jubler-4.6.1/resources/ffmpeg/ffdecode/makecache.c
+@@ -38,6 +38,14 @@
+ #include "defaults.h"
+ #include "utilities.h"
+
++#ifndef AVCODEC_MAX_AUDIO_FRAME_SIZE
++#ifndef MAX_AUDIO_FRAME_SIZE
++#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio
++#else
++#define AVCODEC_MAX_AUDIO_FRAME_SIZE MAX_AUDIO_FRAME_SIZE
++#endif
++#endif
++
+ JNIEXPORT jboolean JNICALL Java_com_panayotis_jubler_media_preview_decoders_NativeDecoder_makeCache(JNIEnv * env, jobject this, jstring audio, jstring cache, jstring original) {
+ const char *audio_c;
+ const char *cache_c;
diff --git a/media-video/jubler/files/jubler-4.6.1-gentoo.patch b/media-video/jubler/files/jubler-4.6.1-gentoo.patch
new file mode 100644
index 000000000000..25afdba2fcc9
--- /dev/null
+++ b/media-video/jubler/files/jubler-4.6.1-gentoo.patch
@@ -0,0 +1,163 @@
+diff -Nur Jubler-4.6.1/build.xml Jubler-4.6.1_patched/build.xml
+--- Jubler-4.6.1/build.xml 2011-02-05 23:46:03.000000000 +0200
++++ Jubler-4.6.1_patched/build.xml 2011-02-13 14:46:56.562977001 +0200
+@@ -1,36 +1,9 @@
+ <?xml version="1.0" encoding="UTF-8"?>
+-<project name="Jubler" default="dist" basedir=".">
++<project name="Jubler" default="allparts" basedir=".">
+ <description>Builds, tests, and runs the project Jubler.</description>
+ <property file="core/src/com/panayotis/jubler/information/version.prop" />
+-
+- <taskdef resource="net/sf/antcontrib/antlib.xml">
+- <classpath>
+- <pathelement location="resources/libs/ant-contrib/ant-contrib-1.0b3.jar"/>
+- </classpath>
+- </taskdef>
++ <taskdef resource="net/sf/antcontrib/antlib.xml"/>
+
+- <taskdef name="jarbundler"
+- onerror="report"
+- classpath="/opt/local/share/java/jarbundler.jar"
+- classname="net.sourceforge.jarbundler.JarBundler" />
+-
+- <taskdef name="izpack"
+- onerror="report"
+- classpath="../../Tools/IzPack/standalone-compiler.jar"
+- classname="com.izforge.izpack.ant.IzPackTask"/>
+-
+- <taskdef name="launch4j"
+- onerror="report"
+- classpath="/opt/local/share/launch4j/launch4j.jar:/opt/local/share/launch4j/lib/xstream.jar"
+- classname="net.sf.launch4j.ant.Launch4jTask"/>
+-
+- <target name="jupidator">
+- <ant antfile="../jupidator/build.xml" inheritall="false" target="jar"/>
+- <copy file="../jupidator/dist/jupidator.jar" todir="dist/lib"/>
+- <ant antfile="../jupidator/build.xml" inheritall="false" target="clean"/>
+- </target>
+-
+-
+ <target name="i18n">
+ <exec dir="resources/i18n" executable="bash" failonerror="true">
+ <arg line="compile"/>
+@@ -45,12 +18,14 @@
+ <move file="resources/help/jubler-faq.html" todir="dist/help"/>
+ <copy file="resources/help/question.png" todir="dist/help"/>
+ </target>
+-
++
++ <target name="jupidator"/>
++
+ <target name="changelog" depends="jupidator">
+ <delete file="ChangeLog.html"/>
+ <echo message="" file="ChangeLog.html"/>
+- <java fork="true" classname="com.panayotis.jupidator.helpers.ChangeLogCreator" classpath="dist/lib/jupidator.jar">
+- <arg value="http://www.jubler.org/files/updates/update.xml"/>
++ <java fork="true" classname="com.panayotis.jupidator.helpers.ChangeLogCreator" classpath="resources/libs/jupidator.jar">
++ <arg value="update-${version}.xml"/>
+ <arg value="ChangeLog.html"/>
+ </java>
+ </target>
+@@ -311,7 +286,7 @@
+ </target>
+
+ <!-- Create an isntallation-like file tree -->
+- <target name="-linuxinstall" depends="-linuxproperties, -cleandestdir, -linuxdesktopintegration">
++ <target name="-linuxinstall" depends="-linuxproperties, -cleandestdir, linuxdesktopintegration">
+ <!-- Basic Jubler files -->
+ <copy file="dist/Jubler.jar" todir="${libdir}"/>
+ <copy todir="${libdir}/lib">
+@@ -337,7 +312,7 @@
+ </target>
+
+ <!-- Linux desktop intergration -->
+- <target name="-linuxdesktopintegration" depends="-linuxproperties">
++ <target name="linuxdesktopintegration" depends="-linuxproperties">
+ <!-- Icon files -->
+ <copy file="resources/installers/linux/jubler.menu" tofile="${sharedir}/menu/jubler"/>
+ <copy file="resources/installers/linux/jubler.xpm" todir="${sharedir}/pixmaps"/>
+diff -Nur Jubler-4.6.1/core/src/com/panayotis/jubler/information/HelpBrowser.java Jubler-4.6.1_patched/core/src/com/panayotis/jubler/information/HelpBrowser.java
+--- Jubler-4.6.1/core/src/com/panayotis/jubler/information/HelpBrowser.java 2011-01-31 01:19:02.000000000 +0200
++++ Jubler-4.6.1_patched/core/src/com/panayotis/jubler/information/HelpBrowser.java 2011-02-12 14:38:50.220780001 +0200
+@@ -47,7 +47,7 @@
+
+ history = new ArrayList<String>();
+
+- String initpage = "file:" + SystemFileFinder.getJublerAppPath() + "/help/jubler-faq.html";
++ String initpage = "file:" + SystemFileFinder.getJublerAppPath() + "/../help/jubler-faq.html";
+ setPage(initpage);
+ history.add(initpage);
+
+diff -Nur Jubler-4.6.1/core/src/com/panayotis/jubler/os/SystemDependent.java Jubler-4.6.1_patched/core/src/com/panayotis/jubler/os/SystemDependent.java
+--- Jubler-4.6.1/core/src/com/panayotis/jubler/os/SystemDependent.java 2011-01-31 01:19:02.000000000 +0200
++++ Jubler-4.6.1_patched/core/src/com/panayotis/jubler/os/SystemDependent.java 2011-02-12 14:43:25.740780001 +0200
+@@ -182,7 +182,7 @@
+ Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + url);
+ else { //assume Unix or Linux
+ String[] browsers = {
+- "firefox", "konqueror", "opera", "epiphany", "mozilla", "netscape"};
++ "xdg-open", "firefox", "konqueror", "opera", "epiphany", "mozilla", "netscape"};
+ String browser = null;
+ for (int count = 0; count < browsers.length && browser == null; count++)
+ if (Runtime.getRuntime().exec(
+diff -Nur Jubler-4.6.1/core/src/com/panayotis/jubler/os/SystemFileFinder.java Jubler-4.6.1_patched/core/src/com/panayotis/jubler/os/SystemFileFinder.java
+--- Jubler-4.6.1/core/src/com/panayotis/jubler/os/SystemFileFinder.java 2011-02-05 01:59:45.000000000 +0200
++++ Jubler-4.6.1_patched/core/src/com/panayotis/jubler/os/SystemFileFinder.java 2011-02-12 14:38:18.520780001 +0200
+@@ -56,9 +56,8 @@
+
+ public static boolean loadLibrary(String name) {
+ File libfile = findFile("lib" + FileCommunicator.FS + System.mapLibraryName(name));
+- if (libfile != null)
+ try {
+- System.load(libfile.getAbsolutePath());
++ System.loadLibrary(name);
+ return true;
+ } catch (UnsatisfiedLinkError e) {
+ DEBUG.debug(e);
+diff -Nur Jubler-4.6.1/resources/ffmpeg/ffdecode/Makefile Jubler-4.6.1_patched/resources/ffmpeg/ffdecode/Makefile
+--- Jubler-4.6.1/resources/ffmpeg/ffdecode/Makefile 2011-01-31 16:26:26.000000000 +0200
++++ Jubler-4.6.1_patched/resources/ffmpeg/ffdecode/Makefile 2011-02-15 20:26:34.213149001 +0200
+@@ -12,9 +12,6 @@
+ # Name of the produced library
+ PROJ=ffdecode
+
+-# Paths of include files
+-JAVA_HOME=${shell /bin/sh ../../system/findjava.sh -j}
+-
+ # Current Path
+ CPATH=${shell pwd}
+
+@@ -42,7 +39,6 @@
+ # Various options
+ FFCONF=configure
+ LIBSUF=_${SYSTEM}.${ARCH}
+-MAKEOPTS=-j3
+
+ # Find requested files
+ NATIVES=${shell cd ../../src && grep -r ' native ' * | grep -v '/.svn/' | gawk -F ':' '{print $$1}' | uniq | sed -e 's/\.java$$//g' | tr '/' '.' }
+@@ -136,7 +132,6 @@
+ CCPREF_NOS=${shell echo ${CCPREF} | sed -e 's/-$$//g' }
+ DCONFIG=--with-mp4v2 --host=${CCPREF_NOS}
+
+-CC=${CCPREF}gcc
+ RANLIB=${CCPREF}ranlib
+
+ ifeq (${NOSTRIP},)
+@@ -151,7 +146,7 @@
+ .SUFFIXES:.o .c
+
+ .c.o:
+- ${CC} ${CFLAGS} ${GCCOPTS} -std=c99 -pedantic -O3 -Wall ${INCS} ${JINCLUDE} -c -o $@ $?
++ ${CC} ${CFLAGS} ${GCCOPTS} -std=c99 -pedantic -Wall ${INCS} ${JINCLUDE} -c -o $@ $?
+
+
+ develop:javacheck
+@@ -208,7 +203,7 @@
+ LIB:${LIBNAME}
+
+ ${LIBNAME}:${LIBRARYREQ} ${OBJS} ${RANLIBREQ}
+- ${LD} ${GCCOPTS} -o ${LIBNAME} ${OBJS} ${LIBS}
++ ${LD} ${LDFLAGS} ${GCCOPTS} -o ${LIBNAME} ${OBJS} ${LIBS}
+ ${STRIPCMD} ${LIBNAME}
+
+
diff --git a/media-video/jubler/files/update-4.6.1.xml b/media-video/jubler/files/update-4.6.1.xml
new file mode 100644
index 000000000000..130d59aacafb
--- /dev/null
+++ b/media-video/jubler/files/update-4.6.1.xml
@@ -0,0 +1,326 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<updatelist application="Jubler" baseurl="http://www.jubler.org/files/updates" icon="icons/jubler.png" jupidator="600">
+
+ <mirror constructor="${URL}${FILEBASE}-${FILEPATH}${FILEEXT}${FILECOMPR}" url="http://jubler.googlecode.com/files/Jubler-"/>
+
+ <architect tag="any" os="" arch="">
+ <launcher exec="${JAVABIN}">
+ <argument value="-jar"/>
+ <argument value="${APPHOME}/Jubler.jar"/>
+ </launcher>
+ </architect>
+
+ <architect tag="macosx" os="mac" arch="i386">
+ <launcher exec="${APPHOME}/../../MacOS/JavaApplicationStub"/>
+ </architect>
+
+ <architect tag="macosx" os="mac" arch="ppc">
+ <launcher exec="${APPHOME}/../../MacOS/JavaApplicationStub"/>
+ </architect>
+
+ <architect tag="macosx" os="mac" arch="x86">
+ <launcher exec="${APPHOME}/../../MacOS/JavaApplicationStub"/>
+ </architect>
+
+ <architect tag="linux_i386" os="Linux" arch="i386">
+ <launcher exec="${JAVABIN}">
+ <argument value="-jar"/>
+ <argument value="${APPHOME}/Jubler.jar"/>
+ </launcher>
+ </architect>
+
+ <architect tag="linux_amd64" os="Linux" arch="amd64">
+ <launcher exec="${JAVABIN}">
+ <argument value="-jar"/>
+ <argument value="${APPHOME}/Jubler.jar"/>
+ </launcher>
+ </architect>
+
+ <architect tag="win32" os="Windows" arch="x86">
+ <launcher exec="${APPHOME}\Jubler.exe"/>
+ </architect>
+
+ <version release="1106" version="4.6.1">
+ <description>
+ Fixed ffdecode library for 64 bit Mac OS X. Dutch translation.
+ </description>
+ <arch name="win32">
+ <file name="Jubler.exe" sourcedir="4.6.1" destdir="${APPHOME}" size="720681" compress="gz"/>
+ </arch>
+ <arch name="macosx">
+ <file name="Info.plist" sourcedir="4.6.1" destdir="${APPHOME}/../../" size="601" compress="gz"/>
+ <file name="Jubler.jar" sourcedir="4.6.1" destdir="${APPHOME}" size="675217" compress="gz"/>
+ <file name="libffdecode.jnilib" sourcedir="4.6.1" destdir="${APPHOME}/lib" size="4902215" compress="gz"/>
+ </arch>
+ <arch name="any">
+ <file name="Jubler.jar" sourcedir="4.6.1" destdir="${APPHOME}" size="675217" compress="gz"/>
+ </arch>
+ <arch name="all">
+ <file name="nl.jar" sourcedir="4.6.1" destdir="${APPHOME}/i18n" size="29264" compress="gz"/>
+ </arch>
+ </version>
+
+ <version release="1083" version="4.6">
+ <description>
+ Plugin system introduced. Updates to GoogleTranslate, MPlayer. Many bug fixes ans minor improvements.
+ </description>
+ <arch name="win32">
+ <file name="Jubler.exe" sourcedir="4.6" destdir="${APPHOME}" size="720582" compress="gz"/>
+ </arch>
+ <arch name="macosx">
+ <file name="Info.plist" sourcedir="4.6" destdir="${APPHOME}/../../" size="599" compress="gz"/>
+ <file name="Jubler.jar" sourcedir="4.6" destdir="${APPHOME}" size="675200" compress="gz"/>
+ <file name="macapp.jar" sourcedir="4.6" destdir="${APPHOME}/lib/" size="4565"/>
+ </arch>
+ <arch name="any">
+ <file name="Jubler.jar" sourcedir="4.6" destdir="${APPHOME}" size="675200" compress="gz"/>
+ </arch>
+ <arch name="all">
+ <file name="aspell.jar" sourcedir="4.6" destdir="${APPHOME}/lib/" size="6578"/>
+ <file name="autoupdate.jar" sourcedir="4.6" destdir="${APPHOME}/lib/" size="1940"/>
+ <file name="basetextsubs.jar" sourcedir="4.6" destdir="${APPHOME}/lib/" size="20847"/>
+ <file name="googletranslate.jar" sourcedir="4.6" destdir="${APPHOME}/lib/" size="18881"/>
+ <file name="mplayer.jar" sourcedir="4.6" destdir="${APPHOME}/lib/" size="8032"/>
+ <file name="zemberek.jar" sourcedir="4.6" destdir="${APPHOME}/lib/" size="3193"/>
+ <file name="cs.jar" sourcedir="4.6" destdir="${APPHOME}/i18n/" size="28377"/>
+ <file name="de.jar" sourcedir="4.6" destdir="${APPHOME}/i18n/" size="27379"/>
+ <file name="el.jar" sourcedir="4.6" destdir="${APPHOME}/i18n/" size="33120"/>
+ <file name="es.jar" sourcedir="4.6" destdir="${APPHOME}/i18n/" size="29243"/>
+ <file name="fr.jar" sourcedir="4.6" destdir="${APPHOME}/i18n/" size="30089"/>
+ <file name="it.jar" sourcedir="4.6" destdir="${APPHOME}/i18n/" size="30813"/>
+ <file name="pt.jar" sourcedir="4.6" destdir="${APPHOME}/i18n/" size="29012"/>
+ <file name="sr.jar" sourcedir="4.6" destdir="${APPHOME}/i18n/" size="20194"/>
+ <file name="tr.jar" sourcedir="4.6" destdir="${APPHOME}/i18n/" size="27872"/>
+ <file name="jubler-faq.html" sourcedir="4.6" destdir="${APPHOME}/help/" size="5402" compress="gz"/>
+ </arch>
+ </version>
+
+ <version release="775" version="4.1.3">
+ <description>
+ Fixed Save not wroking. Fixed Recents menu, when display non-existent entries.
+ </description>
+ <arch name="win32">
+ <file name="Jubler.exe" sourcedir="4.1.3" destdir="${APPHOME}" size="750826" compress="gz"/>
+ </arch>
+ <arch name="any">
+ <file name="Jubler.jar" sourcedir="4.1.3" destdir="${APPHOME}" size="706856" compress="gz"/>
+ </arch>
+ </version>
+
+ <version release="684" version="4.1.2">
+ <description>
+ Fixed a bug in x64 version of Windows. Fixed a bug in trimmed 64-bit Leopard.
+ </description>
+ <arch name="win32">
+ <file name="Jubler.exe" sourcedir="4.1.2" destdir="${APPHOME}" size="750138" compress="gz"/>
+ </arch>
+ <arch name="macosx">
+ <file name="Jubler.jar" sourcedir="4.1.2" destdir="${APPHOME}" size="706775" compress="gz"/>
+ <file name="JavaApplicationStub" sourcedir="4.1.2" destdir="${APPHOME}/../../MacOS" size="8714" compress="gz"/>
+ <chmod file="${APPHOME}/../../MacOS/JavaApplicationStub" attr="a+x"/>
+ </arch>
+ </version>
+
+ <version release="681" version="4.1.1">
+ <description>
+ Updated auto-update library. Fixed bug not updating Recents menu. Fixed bug agressively truncating save file name. Modular translation files.
+ </description>
+ <arch name="macosx">
+ <file name="Jubler.jar" sourcedir="4.1.1" destdir="${APPHOME}" size="706794" compress="gz"/>
+ <file name="jupidator.jar" sourcedir="4.1.1" destdir="${APPHOME}/lib" size="121077"/>
+ <file name="cs.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="28706"/>
+ <file name="de.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="29094"/>
+ <file name="el.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="31983"/>
+ <file name="es.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="29504"/>
+ <file name="fr.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="21845"/>
+ <file name="pt.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="29361"/>
+ <file name="sr.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="20822"/>
+ <file name="tr.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="29658"/>
+ </arch>
+ <arch name="win32">
+ <file name="Jubler.exe" sourcedir="4.1.1" destdir="${APPHOME}" size="750790" compress="gz"/>
+ <file name="jupidator.jar" sourcedir="4.1.1" destdir="${APPHOME}/lib" size="121077"/>
+ <file name="cs.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="28706"/>
+ <file name="de.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="29094"/>
+ <file name="el.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="31983"/>
+ <file name="es.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="29504"/>
+ <file name="fr.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="21845"/>
+ <file name="pt.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="29361"/>
+ <file name="sr.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="20822"/>
+ <file name="tr.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="29658"/>
+ </arch>
+ <arch name="linux_amd64">
+ <file name="Jubler.jar" sourcedir="4.1.1" destdir="${APPHOME}" size="706794" compress="gz"/>
+ <file name="jupidator.jar" sourcedir="4.1.1" destdir="${APPHOME}/lib" size="121077"/>
+ <file name="cs.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="28706"/>
+ <file name="de.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="29094"/>
+ <file name="el.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="31983"/>
+ <file name="es.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="29504"/>
+ <file name="fr.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="21845"/>
+ <file name="pt.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="29361"/>
+ <file name="sr.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="20822"/>
+ <file name="tr.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="29658"/>
+ </arch>
+ <arch name="linux_i386">
+ <file name="Jubler.jar" sourcedir="4.1.1" destdir="${APPHOME}" size="706794" compress="gz"/>
+ <file name="jupidator.jar" sourcedir="4.1.1" destdir="${APPHOME}/lib" size="121077"/>
+ <file name="cs.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="28706"/>
+ <file name="de.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="29094"/>
+ <file name="el.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="31983"/>
+ <file name="es.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="29504"/>
+ <file name="fr.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="21845"/>
+ <file name="pt.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="29361"/>
+ <file name="sr.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="20822"/>
+ <file name="tr.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="29658"/>
+ </arch>
+ <arch name="any">
+ <file name="Jubler.jar" sourcedir="4.1.1" destdir="${APPHOME}" size="706794" compress="gz"/>
+ <file name="jupidator.jar" sourcedir="4.1.1" destdir="${APPHOME}/lib" size="121077"/>
+ <file name="cs.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="28706"/>
+ <file name="de.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="29094"/>
+ <file name="el.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="31983"/>
+ <file name="es.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="29504"/>
+ <file name="fr.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="21845"/>
+ <file name="pt.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="29361"/>
+ <file name="sr.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="20822"/>
+ <file name="tr.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="29658"/>
+ </arch>
+ </version>
+
+ <version release="669" version="4.1">
+ <description>
+ Only one instance of Jubler is now run in a system. Every file remembers loading parameters and uses it when saving. Improved load/save dialog, which encapsulates the information inside the load dialog. General GUI improvements, especially in Mac OSX. Relaxed file loading, when file contains encoding errors. Improved subtitle support. Improved visuals in Video Console window. More compact Preferences dialog. Minor changes and bug fixes.
+ </description>
+ <arch name="macosx">
+ <file name="Jubler.jar" sourcedir="4.1" destdir="${APPHOME}" size="924599" compress="bzip2"/>
+ </arch>
+ <arch name="win32">
+ <file name="Jubler.exe" sourcedir="4.1" destdir="${APPHOME}" size="975784" compress="bzip2"/>
+ </arch>
+ <arch name="linux_i386">
+ <file name="Jubler.jar" sourcedir="4.1" destdir="${APPHOME}" size="924599" compress="bzip2"/>
+ </arch>
+ <arch name="linux_amd64">
+ <file name="Jubler.jar" sourcedir="4.1" destdir="${APPHOME}" size="924599" compress="bzip2"/>
+ </arch>
+ <arch name="any">
+ <file name="Jubler.jar" sourcedir="4.1" destdir="${APPHOME}" size="924599" compress="bzip2"/>
+ </arch>
+ </version>
+
+ <version release="559" version="4.0">
+ <description>
+ Auto-update support. Jubler is able to smart update with minimum user interaction. Improved time fixed tool for overlapping subtitles. Improved FFMPEG color model.
+ </description>
+ </version>
+ <version release="22" version="3.9.6">
+ <description>
+ Improved Google translator parsing engine. Fixed compile issues with ffmpeg under OS X 10.4. Fixed Linux GTK Look and Feel bug with time-spinner under Java 6.0.
+ </description>
+ </version>
+ <version release="21" version="3.9.5">
+ <description>
+ Autosave/recovery of changed subtitles. Automatic translate of subtitles through Google. Updated to latest FFMPEG. Small GUI improvements. Better SRT support. Minor bug fixes and enhancements.
+ </description>
+ </version>
+ <version release="20" version="3.9.0">
+ <description>
+ Improved user interface. Preview interface integrated inside main Jubler window. Subtitle number is now visible, if desired. Use of preset file encodings. Visual display, using color, of affected subtitles. Maximize waveform visualization. Support of AAC audio streams.
+ </description>
+ </version>
+ <version release="19" version="3.4.1">
+ <description>
+ MPlayer uses threads to properly handle out and error stream. Updated to latest ffmpeg library. Support of correct MIME type under Linux.
+ </description>
+ </version>
+ <version release="18" version="3.4.0">
+ <description>
+ SRT supports font formatting. Subtitle statistics. Better handling of preview bars. Improved splitting interface. Updated Media files configuration. Display number of lines and characters per line while editing. MPlayer display formatted subtitles - use of ASS format instead of SRT. Linux man and doc paths fixed. Support for Quicktime Texttrack subtitles. Fixed an error with MPL2 subtitles. Frame icon now properly display under Windows/Linux. Quit confirmation dialogue properly works under Mac. Check for new version only once per day. Better display of selected subtitles. Fixed serious memory allocation error in Windows. Various bug fixes and updates.
+ </description>
+ </version>
+ <version release="17" version="3.3.0">
+ <description>
+ Automatic detection of MPlayer/ASpell executables. Preview window GUI updates. Alt-mousewheel / alt-click slows down rotation in JTimeSpinner boxes. Support for Spruce DVDMaestro (STL) and MPL2 subtitles (without formatting). Fixed autoload for Java 1.6 in Linux. Added missing tooltips. Fixed gettext bug with ' character. Improved ffmpeg support. Keep application alive if "Close window" is selected. New window will not fully overlap old one. Spanish, French and Serbian translations introduced. Czech, German, Portuguese and Greek translation corrections. Various bug fixes and usability improvements.
+ </description>
+ </version>
+ <version release="16" version="3.2.0">
+ <description>
+ Doube click on icons launch Jubler (in Mac OSX, Windows and Debian systems). MPlayer fixes. Jubler installs in systems with JRE 1.6. MPlayer supports different audio stream. Video playback doesn't change system mixers. FFMPEG time offset and WMV bug fixes. Better handling of audio caches. Updated to newer version of FFMPEG. ASpell updates supported languages when opening preferences. Major internal changes and cleanups. Initial Debian package.
+ </description>
+ </version>
+ <version release="15" version="3.1.0">
+ <description>
+ Read frames per second from the movie now supported. Movie synchronization on the fly, based on time differences between time points supported. Updated recoring of subtitles on the fly. A lot of fine tuning. Zemberek updates.
+ </description>
+ </version>
+ <version release="14" version="3.0.0">
+ <description>
+ FFDecode bugs fixed, preview should be much more stable and accurate. Preview bug fixed, where wrong duration was reported. Tools remember last values. Column width is now saved. Now it is compatible with latest version of MPlayer. Updated to newest ffmpeg sources. Turkish translation added. Support for zemberek added. Preliminary built-in FAQ subsystem. Tweaks and code changes. New icons and splash screen. Linux installation script fixes. Supports cocoASpell under Mac OSX.
+ </description>
+ </version>
+ <version release="13" version="3.0.0-rc4">
+ <description>
+ Fixed bugs: audio line not closing, saving file with an illegal character set, banner not closing, Jubler crashing when audio codec could not be opened, Jubler didn't start under Linux. Mac OSX port is now universal binary. Synchronize subtitle texts and timestamps. Subtitle preview updates live on key events. Automatic version check through internet. Smaller code changes.
+ </description>
+ </version>
+ <version release="12" version="3.0.0-rc3">
+ <description>
+ Initial Mac OS X version. Big endian bugs fixed. "Quit" introduced. Menu shortcuts are now editable. MPlayer threading issues fixed. Cache is created only when needed. Full AC3 support.
+ </description>
+ </version>
+ <version release="11" version="3.0.0-rc2">
+ <description>
+ Great speedup improvements were made on subtitle preview. Alpha channel values in SSA/ASS format were flipped. MPlayer options may now be edited. Recent items are sorted according to their call. A bug with the installer not properly detecting JRE was fixed. Subtitle preview fixes were done.
+ </description>
+ </version>
+ <version release="10" version="3.0.0-rc1">
+ <description>
+ Czech translation. Subtitle text display on frame preview (draft and full details) using Java 2D. Default display frame when no library is present, or no actual frame preview is required. When FFDecode library is missing, a notice is displayed and no more a popup dialog appers. Subtitle is movable on wave panel too (in preview). Display subtitle time when moving subtitles in preview. Revert, clone and open recent subtitles in File menu. Video preview in normal and half size. Reparent current subtitles (for translations). MPlayer now supports default font size (and font name in Linux). Only static version of ffmpeg for linux is provided. Varius bug fixes.
+ </description>
+ </version>
+ <version release="9" version="2.9.9">
+ <description>
+ Preview of subtitles added (dependance on FFMPEG library). Frame preview of the current frame, waveform preview and waveform listening is supported. Graphically display of subtitles, which can be moved and resized. Jubler no longer distributed as JAR file but using self expandable platform specific installers (due to FFMPEG). Mouse wheel over subtitle time changes its value. Various bug fixes and other enchacements.
+ </description>
+ </version>
+ <version release="8" version="2.5.1">
+ <description>
+ Fix while trying to save a splitted subtitle file.
+ </description>
+ </version>
+ <version release="7" version="2.5.0">
+ <description>
+ Suport for SubStation Alpha (SSA), Advanced SubStation (ASS), and SubViewer (1+2) subtitle formats. A German translation. Styles are supported (when saving in SubStation formats). A translating mode. A lot of fine tuning and bugfixes.
+ </description>
+ </version>
+ <version release="6" version="2.0.0">
+ <description>
+ Mostly code cleanup and changes in the "about" box.
+ </description>
+ </version>
+ <version release="5" version="2.0-rc1">
+ <description>
+ This version adds I18n support through gettext.
+ </description>
+ </version>
+ <version release="4" version="1.9.3">
+ <description>
+ Find and replace and global replace features were added. The focus of the subtitle textbox was fixed.
+ </description>
+ </version>
+ <version release="3" version="1.9.1">
+ <description>
+ Enhancements were made to the command line arguments of mplayer in order to play correctly under the Windows ports of MPlayer. A few unimportant corrections were made to the ASpell options.
+ </description>
+ </version>
+ <version release="2" version="1.9.0">
+ <description>
+ This version has great improvements in the mplayer frontend, ASpell support, GUI lifting, and new tools.
+ </description>
+ </version>
+ <version release="1" version="0.9">
+ <description>
+ Initial announcement
+ </description>
+ </version>
+</updatelist> \ No newline at end of file
diff --git a/media-video/jubler/jubler-4.6.1-r3.ebuild b/media-video/jubler/jubler-4.6.1-r3.ebuild
new file mode 100644
index 000000000000..6e377d6971ef
--- /dev/null
+++ b/media-video/jubler/jubler-4.6.1-r3.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+WANT_ANT_TASKS="ant-nodeps ant-contrib"
+inherit fdo-mime eutils java-pkg-2 java-ant-2 toolchain-funcs
+
+MY_PN=${PN/#j/J}
+DESCRIPTION="Java subtitle editor"
+HOMEPAGE="http://www.jubler.org/"
+SRC_URI="http://${PN}.googlecode.com/files/${MY_PN}-source-${PV}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="mplayer nls spell"
+
+RDEPEND=">=virtual/jre-1.5
+ virtual/ffmpeg
+ mplayer? ( media-video/mplayer[libass] )
+ spell? (
+ app-text/aspell
+ >=dev-java/zemberek-2.0[linguas_tr]
+ )"
+
+DEPEND=">=virtual/jdk-1.5
+ virtual/ffmpeg
+ app-text/xmlto
+ >=dev-java/jupidator-0.6.0
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )"
+
+S=${WORKDIR}/${MY_PN}-${PV}
+
+src_unpack() {
+ unpack ${A}
+ cp "${FILESDIR}"/update-${PV}.xml "${S}" || die
+}
+
+java_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+ epatch "${FILESDIR}"/${P}-ffmpeg-1.patch
+ epatch "${FILESDIR}"/${P}-ffmpeg-2.patch
+ chmod +x resources/installers/linux/iconinstall
+ #cd resources/libs || die
+ java-pkg_jarfrom --build-only --into resources/libs jupidator
+ rm -R plugins/{autoupdate,macapp} || die "unneeded plugin cleanup failed"
+ rm -R resources/libs/ant-contrib || die "jar cleanup failed"
+ if ! use mplayer; then
+ rm -R plugins/mplayer || die "mplayer plugin removal failed"
+ fi
+ if ! use spell; then
+ rm -R plugins/{zemberek,aspell} || die "spellcheck plugin removal failed"
+ fi
+ sed -i -e "s/CODEC_TYPE/AVMEDIA_TYPE/g" $(find resources/ffmpeg/ffdecode -name "*.c")
+ sed -i -e "s:PKT_FLAG_KEY:AV_PKT_FLAG_KEY:g" $(find resources/ffmpeg/ffdecode -name "*.c")
+}
+
+src_compile() {
+ java-pkg_filter-compiler ecj-3.2
+ ANT_TASKS="ant-nodeps ant-contrib" eant $(use nls && echo allparts) $(use nls || echo parts) help changelog || die "eant failed"
+ #cp -v dist/help/jubler-faq.html build/classes/help || die "cp failed"
+ cd resources/ffmpeg/ffdecode || die
+ CC=$(tc-getCC) NOSTRIP=true emake linuxdyn || die "make failed"
+}
+
+src_install() {
+ java-pkg_dojar dist/Jubler.jar
+ use nls && java-pkg_dojar dist/i18n/*.jar
+ insinto /usr/share/jubler/lib/lib
+ doins dist/lib/*.jar || die "Plugin installation failed"
+ #java-pkg_dojar dist/lib/*.jar
+ use spell && java-pkg_register-dependency zemberek zemberek2-cekirdek.jar
+ use spell && java-pkg_register-dependency zemberek zemberek2-tr.jar
+ java-pkg_doso resources/ffmpeg/ffdecode/libffdecode.so
+ doicon resources/installers/linux/jubler.png
+ domenu resources/installers/linux/jubler.desktop
+
+ DESTDIR="${D}" eant linuxdesktopintegration
+ rm -vr "${D}/usr/share/menu" || die
+
+ java-pkg_dolauncher jubler --main Jubler
+ dohtml ChangeLog.html || die "dohtml failed"
+ dodoc README || die "dodoc failed"
+ doman resources/installers/linux/jubler.1 || die "doman failed"
+ insinto /usr/share/jubler/help
+ doins dist/help/* || die "doins failed"
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+}
diff --git a/media-video/jubler/metadata.xml b/media-video/jubler/metadata.xml
new file mode 100644
index 000000000000..b6ef6ca43386
--- /dev/null
+++ b/media-video/jubler/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>java</herd>
+ <maintainer>
+ <email>java@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="google-code">jubler</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/kaffeine/Manifest b/media-video/kaffeine/Manifest
new file mode 100644
index 000000000000..78d91185f289
--- /dev/null
+++ b/media-video/kaffeine/Manifest
@@ -0,0 +1 @@
+DIST kaffeine-1.2.2.tar.gz 489727 SHA256 b6476a93ddbf84142d4fe29f0757de871e11ce6ca32590affe863a75a231c8cb SHA512 31db518943c223e635822369548949a0c2162cdbbe59edbadb77f4820acf697293d67681553d5552b9435471240fee551786c8c652f1ae5ab9cfe9b8a9cf4459 WHIRLPOOL 232f4875398c4ce889cbf1f3d0aeadefce09d5c6ed64aaf82df9fb57472b7fc814f20fb0fec54db715b45965ff79ae2ae064bb008c4c5fcf96d5b4dd3c860157
diff --git a/media-video/kaffeine/files/kaffeine-1.2.2-gcc4.7.patch b/media-video/kaffeine/files/kaffeine-1.2.2-gcc4.7.patch
new file mode 100644
index 000000000000..e74563e0bc67
--- /dev/null
+++ b/media-video/kaffeine/files/kaffeine-1.2.2-gcc4.7.patch
@@ -0,0 +1,32 @@
+commit 2da9df1e67004c3cfa879578c351300a99f23da1
+Author: Christoph Pfister <christophpfister@gmail.com>
+Date: Wed Apr 4 21:22:09 2012 +0200
+
+ fix build for gcc 4.7
+
+diff --git a/src/dvb/dvbepg.cpp b/src/dvb/dvbepg.cpp
+index 7fc8f68..e70d8b8 100644
+--- a/src/dvb/dvbepg.cpp
++++ b/src/dvb/dvbepg.cpp
+@@ -690,15 +690,15 @@ void AtscEpgFilter::processEitSection(const char *data, int size)
+ // 1980-01-06T000000 minus 15 secs (= UTC - GPS in 2011)
+ QDateTime baseDateTime = QDateTime(QDate(1980, 1, 5), QTime(23, 59, 45), Qt::UTC);
+
+- for (AtscEitSectionEntry entry = eitSection.entries(); (entryCount > 0) && entry.isValid();
+- --entryCount, entry.advance()) {
++ for (AtscEitSectionEntry eitEntry = eitSection.entries();
++ (entryCount > 0) && eitEntry.isValid(); --entryCount, eitEntry.advance()) {
+ DvbEpgEntry epgEntry;
+ epgEntry.channel = channel;
+- epgEntry.begin = baseDateTime.addSecs(entry.startTime());
+- epgEntry.duration = QTime().addSecs(entry.duration());
+- epgEntry.title = entry.title();
++ epgEntry.begin = baseDateTime.addSecs(eitEntry.startTime());
++ epgEntry.duration = QTime().addSecs(eitEntry.duration());
++ epgEntry.title = eitEntry.title();
+
+- quint32 id = ((quint32(fakeChannel.networkId) << 16) | quint32(entry.eventId()));
++ quint32 id = ((quint32(fakeChannel.networkId) << 16) | quint32(eitEntry.eventId()));
+ DvbSharedEpgEntry entry = epgEntries.value(id);
+
+ if (entry.isValid() && (entry->channel == epgEntry.channel) &&
diff --git a/media-video/kaffeine/kaffeine-1.2.2-r1.ebuild b/media-video/kaffeine/kaffeine-1.2.2-r1.ebuild
new file mode 100644
index 000000000000..eabd2404a0dd
--- /dev/null
+++ b/media-video/kaffeine/kaffeine-1.2.2-r1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+KDE_LINGUAS="ar ast be bg ca ca@valencia cs da de el en_GB eo es et fi fr ga gl
+hr hu it ja km ko ku lt mai nb nds nl nn pa pl pt pt_BR ro ru se sk
+sr@ijekavian sr@ijekavianlatin sr@latin sv th tr uk zh_CN zh_TW"
+KDE_SCM="git"
+inherit kde4-base
+
+DESCRIPTION="KDE media player with digital TV support"
+HOMEPAGE="http://kaffeine.kde.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2 FDL-1.2"
+SLOT="4"
+KEYWORDS="amd64 ppc x86"
+IUSE="debug"
+
+DEPEND="
+ x11-libs/libXScrnSaver
+ dev-qt/qtsql:4[sqlite]
+ >=media-libs/xine-lib-1.1.18.1
+"
+RDEPEND="${DEPEND}"
+
+DOCS=( Changelog NOTES )
+
+PATCHES=( "${FILESDIR}/${PN}-1.2.2-gcc4.7.patch" )
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_build debug DEBUG_MODULE)
+ )
+
+ kde4-base_src_configure
+}
diff --git a/media-video/kaffeine/metadata.xml b/media-video/kaffeine/metadata.xml
new file mode 100644
index 000000000000..62c56c83007a
--- /dev/null
+++ b/media-video/kaffeine/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>video</herd>
+ <herd>kde</herd>
+ <upstream>
+ <remote-id type="sourceforge">kaffeine</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/kamerka/Manifest b/media-video/kamerka/Manifest
new file mode 100644
index 000000000000..df0b18f87abe
--- /dev/null
+++ b/media-video/kamerka/Manifest
@@ -0,0 +1 @@
+DIST kamerka-0.10.tar.gz 138234 SHA256 8331021ab5420362f32803bae7329449a756f4839993305a1271390de3ef4df8 SHA512 786f7fcce3dccbe1500a36b9a35ee9cef4c099e8b08a35bfe04fcfc05cf68d9def973a66f5d5e44c6cc2b0e0b9534023d67b753cb3c8587d9785f387bd3bda2b WHIRLPOOL 5c3397b91e41e6a2f5464134c839a90c37212821146ae8392e4a72855692d0194e4d1e666bd82e7036fc8ea75c965aaf0ae2c4aef898ca8d389684a1fe697b12
diff --git a/media-video/kamerka/kamerka-0.10.ebuild b/media-video/kamerka/kamerka-0.10.ebuild
new file mode 100644
index 000000000000..794a4817fde7
--- /dev/null
+++ b/media-video/kamerka/kamerka-0.10.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+KDE_LINGUAS="cs de es nl pl pt ru sr sr@ijekavian sr@ijekavianlatin sr@Latn uk zh_CN zh_TW"
+inherit kde4-base
+
+SRC_URI="http://dosowisko.net/${PN}/downloads/${P}.tar.gz"
+DESCRIPTION="Simple photo taking application with fancy animated interface"
+HOMEPAGE="http://dos1.github.io/kamerka/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="
+ dev-qt/qtdeclarative:4
+ media-libs/libv4l
+ media-libs/phonon[qt4]
+ media-libs/qimageblitz
+"
+DEPEND="${RDEPEND}"
diff --git a/media-video/kamerka/metadata.xml b/media-video/kamerka/metadata.xml
new file mode 100644
index 000000000000..a23f444b67d6
--- /dev/null
+++ b/media-video/kamerka/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>kde</herd>
+</pkgmetadata>
diff --git a/media-video/kdenlive/Manifest b/media-video/kdenlive/Manifest
new file mode 100644
index 000000000000..e449e660f107
--- /dev/null
+++ b/media-video/kdenlive/Manifest
@@ -0,0 +1,2 @@
+DIST kdenlive-0.9.10.tar.bz2 4666332 SHA256 f68fdb39173e69ce422fdd57bbc4ced47711317e538b0101eee6a1bc9cedb763 SHA512 47314e4a095a74fb6e0d9aec8450d857a3624c0127372c88c94a73ae504f565b77c8197970dc61f9a2478664069e6bf822495b50c92491a4aae5d43c9afc4e2a WHIRLPOOL fd6c2b23ad2d2dc157decaaa4df072366617bcd9e37cbaa03633a6279695d033c3e2365c82b7f0cf0e064978177052cd5b74481bc51ce1842abaf39bca776063
+DIST kdenlive-0.9.8.tar.bz2 3342895 SHA256 870d68a19ac6012e09d3eedfd9b63983a79b5bcc9eabd465720466ed3fcd4128 SHA512 910405e0d1c03d4547cdd3bb2d36da0eeed5b20615c39ccd5740807bbf5e5cfcfa5474341db256812b619e2342827c3e997f15dddfef36bc8637ce0113b7ae0b WHIRLPOOL 3330a0c9b4769411f6bdd03ca2b2405aa348eb13d72d033d77d8685b93f6df6297c9e6a5772c9105488c07b9a56d75261ee42113c522ce46f3c9f1179d4784e1
diff --git a/media-video/kdenlive/kdenlive-0.9.10.ebuild b/media-video/kdenlive/kdenlive-0.9.10.ebuild
new file mode 100644
index 000000000000..3bc619b027e0
--- /dev/null
+++ b/media-video/kdenlive/kdenlive-0.9.10.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+KDE_HANDBOOK="optional"
+KDE_MINIMAL="4.13.1"
+OPENGL_REQUIRED="always"
+inherit kde4-base
+
+DESCRIPTION="A non-linear video editing suite for KDE"
+HOMEPAGE="http://www.kdenlive.org/"
+SRC_URI="mirror://kde/stable/${PN}/${PV}/src/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="4"
+KEYWORDS="~amd64 ~ppc ~x86 ~x86-linux"
+IUSE="debug nepomuk v4l"
+
+RDEPEND="
+ dev-libs/qjson
+ $(add_kdebase_dep kdelibs 'nepomuk?')
+ >=media-libs/mlt-0.9.0[ffmpeg,sdl,xml,melt,qt4,kdenlive]
+ virtual/ffmpeg[encode,sdl,X]
+ v4l? ( media-libs/libv4l )
+"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+"
+
+DOCS=(AUTHORS ChangeLog README)
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_with nepomuk)
+ $(cmake-utils_use_with v4l LibV4L2)
+ )
+ kde4-base_src_configure
+}
diff --git a/media-video/kdenlive/kdenlive-0.9.8.ebuild b/media-video/kdenlive/kdenlive-0.9.8.ebuild
new file mode 100644
index 000000000000..9731fda86896
--- /dev/null
+++ b/media-video/kdenlive/kdenlive-0.9.8.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+KDE_HANDBOOK="optional"
+KDE_MINIMAL="4.13.1"
+OPENGL_REQUIRED="always"
+inherit kde4-base
+
+DESCRIPTION="A non-linear video editing suite for KDE"
+HOMEPAGE="http://www.kdenlive.org/"
+SRC_URI="mirror://kde/stable/${PN}/${PV}/src/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="4"
+KEYWORDS="amd64 ~ppc x86 ~x86-linux"
+IUSE="debug nepomuk v4l"
+
+RDEPEND="
+ dev-libs/qjson
+ $(add_kdebase_dep kdelibs 'nepomuk?')
+ >=media-libs/mlt-0.9.0[ffmpeg,sdl,xml,melt,qt4,kdenlive]
+ virtual/ffmpeg[encode,sdl,X]
+ v4l? ( media-libs/libv4l )
+"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+"
+
+DOCS=(AUTHORS ChangeLog README)
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_with nepomuk)
+ $(cmake-utils_use_with v4l LibV4L2)
+ )
+ kde4-base_src_configure
+}
diff --git a/media-video/kdenlive/metadata.xml b/media-video/kdenlive/metadata.xml
new file mode 100644
index 000000000000..e7640d8aa310
--- /dev/null
+++ b/media-video/kdenlive/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>video</herd>
+ <herd>kde</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="nepomuk">Enable Nepomuk based semantic desktop support (deprecated)</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-video/kffmpegthumbnailer/Manifest b/media-video/kffmpegthumbnailer/Manifest
new file mode 100644
index 000000000000..aa4b6d48b87c
--- /dev/null
+++ b/media-video/kffmpegthumbnailer/Manifest
@@ -0,0 +1 @@
+DIST kffmpegthumbnailer-1.1.0.tar.gz 9098 SHA256 5b488a4e77229847c7d92f7fc5f7760ba3e4977c83565b741446202a0073f2b2 SHA512 e5d801728636f5de1a5c4a4c7ac47e96b66d9cb59b093b5113b145303363f97c1290b455309519b94546054e0317ca2fb2d35bd0c65be924d4b79bd9c0356cc5 WHIRLPOOL 5587983c89ec63f0c6706d7810e08b63f3e4deda98f50db6c4932662a73d65e9896f3a3e3887339356c773c3e1b9799b0d380dd540fdc3fcdda575b2bdb532dc
diff --git a/media-video/kffmpegthumbnailer/kffmpegthumbnailer-1.1.0-r3.ebuild b/media-video/kffmpegthumbnailer/kffmpegthumbnailer-1.1.0-r3.ebuild
new file mode 100644
index 000000000000..c16568153a04
--- /dev/null
+++ b/media-video/kffmpegthumbnailer/kffmpegthumbnailer-1.1.0-r3.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit kde4-base
+
+DESCRIPTION="KDE thumbnailer based on ffmpegthumbnailer"
+HOMEPAGE="http://code.google.com/p/ffmpegthumbnailer/"
+SRC_URI="http://ffmpegthumbnailer.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="4"
+KEYWORDS="amd64 x86"
+IUSE="debug"
+
+DEPEND="
+ >=media-video/ffmpegthumbnailer-2
+"
+RDEPEND="${DEPEND}
+ $(add_kdeapps_dep kdebase-kioslaves)
+"
+
+DOCS=( Changelog README )
+
+src_prepare() {
+ sed -e "/Encoding=UTF-8/d" \
+ -i kffmpegthumbnailer.desktop || die "fixing .desktop file failed"
+ kde4-base_src_prepare
+}
diff --git a/media-video/kffmpegthumbnailer/metadata.xml b/media-video/kffmpegthumbnailer/metadata.xml
new file mode 100644
index 000000000000..cb33053f8c78
--- /dev/null
+++ b/media-video/kffmpegthumbnailer/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>kde</herd>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="google-code">ffmpegthumbnailer</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/kino/Manifest b/media-video/kino/Manifest
new file mode 100644
index 000000000000..e6ac1bc558a0
--- /dev/null
+++ b/media-video/kino/Manifest
@@ -0,0 +1 @@
+DIST kino-1.3.4.tar.gz 11090771 SHA256 114d046d76ad9980180e28ababd3c58a457cc9211d693705ce03a90a66011a08 SHA512 065695e6115f3f994ed89ebf52e64c4b8da100f7a973a8c686fd7e7377104b838968800c6a8e31913fd5e2be568076c60d588b840e51da3d082841546a53fc32 WHIRLPOOL 9d7ecc79d23dd8d8c4c0b64da2cd425f48305a81da6b6ae6acb2cad1f4b78fb9ade26ef0e8d36c560aa5f6340fb7221ac7ff3f08b1fecfcdea7d0b7d9614c034
diff --git a/media-video/kino/files/kino-1.3.4-libav-0.7.patch b/media-video/kino/files/kino-1.3.4-libav-0.7.patch
new file mode 100644
index 000000000000..65c5bc38276d
--- /dev/null
+++ b/media-video/kino/files/kino-1.3.4-libav-0.7.patch
@@ -0,0 +1,60 @@
+--- kino-1.3.4.orig/src/frame.cc 2011-07-17 14:54:59.089481638 +0200
++++ kino-1.3.4/src/frame.cc 2011-07-17 15:09:23.199481714 +0200
+@@ -1063,7 +1063,12 @@
+ AVPicture dest;
+ int got_picture;
+
+- avcodec_decode_video( libavcodec, frame, &got_picture, data, GetFrameSize() );
++ AVPacket pkt;
++ av_init_packet(&pkt);
++ pkt.data = data;
++ pkt.size = GetFrameSize();
++
++ avcodec_decode_video2( libavcodec, frame, &got_picture, &pkt );
+ if ( got_picture )
+ {
+ avpicture_fill( &dest, static_cast<uint8_t*>( rgb ), PIX_FMT_RGB24, GetWidth(), GetHeight() );
+@@ -1123,7 +1128,12 @@
+ AVPicture output;
+ int got_picture;
+
+- avcodec_decode_video( libavcodec, frame, &got_picture, data, GetFrameSize() );
++ AVPacket pkt;
++ av_init_packet(&pkt);
++ pkt.data = data;
++ pkt.size = GetFrameSize();
++
++ avcodec_decode_video2( libavcodec, frame, &got_picture, &pkt );
+ if ( got_picture )
+ {
+ avpicture_fill( &output, static_cast<uint8_t*>( yuv ), PIX_FMT_YUV422, GetWidth(), GetHeight() );
+@@ -1156,7 +1166,12 @@
+ AVFrame *frame = avcodec_alloc_frame();
+ int got_picture;
+
+- avcodec_decode_video( libavcodec, frame, &got_picture, data, GetFrameSize() );
++ AVPacket pkt;
++ av_init_packet(&pkt);
++ pkt.data = data;
++ pkt.size = GetFrameSize();
++
++ avcodec_decode_video2( libavcodec, frame, &got_picture, &pkt );
+
+ int width = GetWidth(), height = GetHeight();
+
+@@ -1319,12 +1334,12 @@
+ #if defined(HAVE_LIBAVCODEC)
+ if ( avformatEncoder == NULL )
+ {
+- avformatEncoder = av_alloc_format_context();
++ avformatEncoder = avformat_alloc_context();
+ if ( avformatEncoder )
+ {
+- avformatEncoder->oformat = guess_format( "dv", NULL, NULL );
++ avformatEncoder->oformat = av_guess_format( "dv", NULL, NULL );
+ AVStream* vst = av_new_stream( avformatEncoder, 0 );
+- vst->codec->codec_type = CODEC_TYPE_VIDEO;
++ vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
+ vst->codec->codec_id = CODEC_ID_DVVIDEO;
+ vst->codec->bit_rate = 25000000;
+ vst->start_time = 0;
diff --git a/media-video/kino/files/kino-1.3.4-libav-0.8.patch b/media-video/kino/files/kino-1.3.4-libav-0.8.patch
new file mode 100644
index 000000000000..f98cbda0bc49
--- /dev/null
+++ b/media-video/kino/files/kino-1.3.4-libav-0.8.patch
@@ -0,0 +1,57 @@
+--- kino-1.3.4.orig/src/frame.cc 2012-05-14 19:55:42.153772418 -0700
++++ kino-1.3.4/src/frame.cc 2012-05-14 20:28:34.448838653 -0700
+@@ -101,8 +101,9 @@
+ #if defined(HAVE_LIBAVCODEC)
+ pthread_mutex_lock( &avcodec_mutex );
+ av_register_all();
+- libavcodec = avcodec_alloc_context();
+- avcodec_open( libavcodec, avcodec_find_decoder( CODEC_ID_DVVIDEO ) );
++ libavcodec = avcodec_alloc_context3(NULL);
++ avcodec_open2( libavcodec,
++ avcodec_find_decoder( CODEC_ID_DVVIDEO ), NULL );
+ pthread_mutex_unlock( &avcodec_mutex );
+ data = ( unsigned char* ) av_mallocz( 144000 );
+ #if defined(HAVE_SWSCALE)
+@@ -1338,7 +1339,7 @@
+ if ( avformatEncoder )
+ {
+ avformatEncoder->oformat = av_guess_format( "dv", NULL, NULL );
+- AVStream* vst = av_new_stream( avformatEncoder, 0 );
++ AVStream* vst = avformat_new_stream( avformatEncoder, NULL );
+ vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
+ vst->codec->codec_id = CODEC_ID_DVVIDEO;
+ vst->codec->bit_rate = 25000000;
+@@ -1364,12 +1365,10 @@
+ vst->sample_aspect_ratio = avcodecEncoder->sample_aspect_ratio;
+ #endif
+ avcodecEncoder->thread_count = 2;
+- avcodec_thread_init( avcodecEncoder, avcodecEncoder->thread_count );
+ avcodecEncoder->time_base= isPAL ? ( AVRational ){ 1, 25 } : ( AVRational ){ 1001, 30000 };
+ avcodecEncoder->pix_fmt = isPAL ? PIX_FMT_YUV420P : PIX_FMT_YUV411P;
+ avcodecEncoder->flags |= CODEC_FLAG_INTERLACED_DCT;
+- av_set_parameters( avformatEncoder, NULL );
+- avcodec_open( avcodecEncoder, avcodec_find_encoder( CODEC_ID_DVVIDEO ) );
++ avcodec_open2( avcodecEncoder, avcodec_find_encoder( CODEC_ID_DVVIDEO ), NULL );
+ av_new_packet( &avpacketEncoder, 144000 );
+ tempImage = ( uint8_t* ) av_malloc(
+ avpicture_get_size( avcodecEncoder->pix_fmt, avcodecEncoder->width, avcodecEncoder->height ) );
+@@ -1475,16 +1474,16 @@
+
+ // Encode
+ bytesInFrame = avcodec_encode_video( avcodecEncoder, avpacketEncoder.data, size, output );
+- url_open_buf( &avformatEncoder->pb, data, bytesInFrame, URL_WRONLY );
++ avformatEncoder->pb = avio_alloc_context(data, bytesInFrame, 0, NULL, NULL, NULL, NULL);
+ avpacketEncoder.size = bytesInFrame;
+ if ( !isEncoderHeaderWritten )
+ {
+- av_write_header( avformatEncoder );
++ avformat_write_header( avformatEncoder, NULL );
+ isEncoderHeaderWritten = true;
+ }
+ av_write_frame( avformatEncoder, &avpacketEncoder );
+ #if LIBAVFORMAT_VERSION_INT >= ((52<<16)+(0<<8)+0)
+- url_close_buf( avformatEncoder->pb );
++ avio_close( avformatEncoder->pb );
+ #else
+ url_close_buf( &avformatEncoder->pb );
+ #endif
diff --git a/media-video/kino/files/kino-1.3.4-libavcodec-pkg-config.patch b/media-video/kino/files/kino-1.3.4-libavcodec-pkg-config.patch
new file mode 100644
index 000000000000..d6a8953cf00a
--- /dev/null
+++ b/media-video/kino/files/kino-1.3.4-libavcodec-pkg-config.patch
@@ -0,0 +1,11 @@
+--- a/kino-1.3.4/configure.in 2009-09-08 02:35:23.000000000 -0400
++++ b/kino-1.3.4/configure.in 2014-01-27 14:53:01.366063037 -0500
+@@ -221,7 +221,7 @@
+ if (test "x$avcodec_include" != x) || (test "x$avcodec_lib" != x) ; then
+ local_legacy_ffmpeg_test
+ else
+- PKG_CHECK_MODULES(AVCODEC, libavformat,
++ PKG_CHECK_MODULES(AVCODEC, [libavcodec libavformat libavutil],
+ [
+ AC_DEFINE(HAVE_LIBAVCODEC, 1, [Enable FFMPEG libavcodec])
+ AC_SUBST(AVCODEC_LIBS)
diff --git a/media-video/kino/files/kino-1.3.4-v4l1.patch b/media-video/kino/files/kino-1.3.4-v4l1.patch
new file mode 100644
index 000000000000..c6757743cd7e
--- /dev/null
+++ b/media-video/kino/files/kino-1.3.4-v4l1.patch
@@ -0,0 +1,22 @@
+--- kino-1.3.3.orig/ffmpeg/libavdevice/v4l.c 2011-05-17 02:20:37.161004916 +0400
++++ kino-1.3.3.orig/ffmpeg/libavdevice/v4l.c 2011-05-17 02:21:57.302377529 +0400
+@@ -26,7 +26,7 @@
+ #include <sys/mman.h>
+ #include <sys/time.h>
+ #define _LINUX_TIME_H 1
+-#include <linux/videodev.h>
++#include <libv4l1-videodev.h>
+ #include <time.h>
+
+ typedef struct {
+--- kino-1.3.3.orig/src/v4l.h 2011-05-17 02:20:38.896969666 +0400
++++ kino-1.3.3.orig/src/v4l.h 2011-05-17 02:21:39.922730395 +0400
+@@ -40,7 +40,7 @@
+
+ #define _DEVICE_H_
+ #define _LINUX_TIME_H
+-#include <linux/videodev.h>
++#include <libv4l1-videodev.h>
+
+ #include "displayer.h"
+
diff --git a/media-video/kino/kino-1.3.4.ebuild b/media-video/kino/kino-1.3.4.ebuild
new file mode 100644
index 000000000000..0b5fb07ccc85
--- /dev/null
+++ b/media-video/kino/kino-1.3.4.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils udev
+
+DESCRIPTION="Kino is a non-linear DV editor for GNU/Linux"
+HOMEPAGE="http://www.kinodv.org/"
+SRC_URI="mirror://sourceforge/kino/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 ~sparc x86"
+IUSE="alsa dvdr gpac lame gstreamer quicktime sox vorbis"
+
+# This ebuild would benefit a lot of USE dependencies but that has to wait for
+# EAPI 2. The usual fix is to issue built_with_use checks but in that particu-
+# lar case it would make the ebuild rather complicated to write and maintain
+# (certain features can be enabled in various different ways). Also it would
+# also force the emerge process to stop a bit too often for users not to comp-
+# lain. Thus, if you need features like theora, x264, xvid and maybe others,
+# make sure you activate the required support where it should be (ffmpeg, mostly).
+
+# Optional dependency on cinelerra-cvs (as a replacement for libquicktime)
+# dropped because kino may run with it but won't build anymore.
+
+CDEPEND=">=x11-libs/gtk+-2.6.0
+ >=gnome-base/libglade-2.5.0
+ >=dev-libs/glib-2
+ x11-libs/libXv
+ dev-libs/libxml2
+ media-libs/audiofile
+ >=sys-libs/libraw1394-1.0.0
+ >=sys-libs/libavc1394-0.4.1
+ >=media-libs/libdv-0.103
+ media-libs/libsamplerate
+ media-libs/libiec61883
+ media-libs/libv4l
+ alsa? ( >=media-libs/alsa-lib-1.0.9 )
+ virtual/ffmpeg
+ quicktime? ( >=media-libs/libquicktime-0.9.5 )"
+DEPEND="${CDEPEND}
+ dev-util/intltool"
+RDEPEND="${CDEPEND}
+ media-video/mjpegtools
+ media-sound/rawrec
+ dvdr? ( media-video/dvdauthor
+ app-cdr/dvd+rw-tools )
+ gpac? ( media-video/gpac )
+ lame? ( media-sound/lame )
+ gstreamer? ( media-libs/gst-plugins-base:0.10 )
+ sox? ( media-sound/sox )
+ vorbis? ( media-sound/vorbis-tools )"
+
+DOCS="AUTHORS BUGS ChangeLog NEWS README* TODO"
+
+src_prepare() {
+ # Deactivating automagic alsa configuration, bug #134725
+ if ! use alsa ; then
+ sed -i -e "s:HAVE_ALSA 1:HAVE_ALSA 0:" configure || die
+ fi
+
+ # Fix bug #169590
+ # https://sourceforge.net/tracker/?func=detail&aid=3304495&group_id=14103&atid=314103
+ sed -i \
+ -e '/\$(LIBQUICKTIME_LIBS) \\/d' \
+ -e '/^[[:space:]]*\$(SRC_LIBS)/ a\
+ \$(LIBQUICKTIME_LIBS) \\' \
+ src/Makefile.in || die
+
+ # Fix test failure discovered in bug #193947
+ # https://sourceforge.net/tracker/?func=detail&aid=3304499&group_id=14103&atid=314103
+ sed -i -e '$a\
+\
+ffmpeg/libavcodec/ps2/idct_mmi.c\
+ffmpeg/libavcodec/sparc/dsputil_vis.c\
+ffmpeg/libavcodec/sparc/vis.h\
+ffmpeg/libavutil/bswap.h\
+ffmpeg/libswscale/yuv2rgb_template.c\
+src/export.h\
+src/message.cc\
+src/page_bttv.cc' po/POTFILES.in || die
+
+ sed -i -e 's:^#include <quicktime.h>:#include <lqt/quicktime.h>:' src/filehandler.h || die
+ epatch "${FILESDIR}/${P}-v4l1.patch"
+ epatch "${FILESDIR}/${P}-libav-0.7.patch"
+ epatch "${FILESDIR}/${P}-libav-0.8.patch"
+ epatch "${FILESDIR}/${P}-libavcodec-pkg-config.patch"
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-local-ffmpeg \
+ $(use_enable quicktime) \
+ $(use_with sparc dv1394) \
+ --with-udev-rules-dir="$(get_udevdir)"/rules.d \
+ CPPFLAGS="-I${ROOT}usr/include/libavcodec -I${ROOT}usr/include/libavformat -I${ROOT}usr/include/libswscale"
+}
+
+src_install() {
+ default
+ mv "${ED}/$(get_udevdir)"/rules.d/{,99-}kino.rules
+ fowners root:root -R /usr/share/kino/help #177378
+ prune_libtool_files --all #385361
+}
diff --git a/media-video/kino/metadata.xml b/media-video/kino/metadata.xml
new file mode 100644
index 000000000000..576101d0b53d
--- /dev/null
+++ b/media-video/kino/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>calchan@gentoo.org</email>
+ <name>Denis Dupeyron</name>
+ </maintainer>
+ <use>
+ <flag name="gpac">Enable GPAC support when exporting to 3GPP format</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">kino</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/kmplayer/Manifest b/media-video/kmplayer/Manifest
new file mode 100644
index 000000000000..542eb5eeabf5
--- /dev/null
+++ b/media-video/kmplayer/Manifest
@@ -0,0 +1 @@
+DIST kmplayer-0.11.3d.tar.bz2 573173 SHA256 7ebecbc906edcc13e1ae94f4791da80ed4ef73164ef6b81d76c71708c39a6bfb SHA512 c2f0fa1864eecd9a0bf3039639aad41bc36bc6ff8742a8e9714c6df72dd4ee63f80c36036a0582ee8464b48ce22eb96814600ddb199c61fda0b87cfd4c457797 WHIRLPOOL 1a651d1dee10b0ee3609055d645835b4b19e5acf47df39a7773d297749407ea49c893e154f77013469ee4c23724c55ae8c2032b5ca00ddf8f560eb5feb8d1f12
diff --git a/media-video/kmplayer/files/kmplayer-flash.patch b/media-video/kmplayer/files/kmplayer-flash.patch
new file mode 100644
index 000000000000..0a6a72b10531
--- /dev/null
+++ b/media-video/kmplayer/files/kmplayer-flash.patch
@@ -0,0 +1,12 @@
+diff -urN kmplayer-0.11.3d.old/src/kmplayer_part.desktop kmplayer-0.11.3d/src/kmplayer_part.desktop
+--- kmplayer-0.11.3d.old/src/kmplayer_part.desktop 2012-06-10 14:35:46.000000000 +0200
++++ kmplayer-0.11.3d/src/kmplayer_part.desktop 2012-09-11 14:42:04.160426844 +0200
+@@ -93,7 +93,7 @@
+ Comment[zh_TW]=影像播放器外掛程式(與 QuickTime,XMovie,Windows Media 與 RealPlayer 相容)
+ X-KDE-Library=libkmplayerpart
+ # Keep in sync with the audio types in kmplayer.desktop
+-MimeType=application/ogg;application/smil;application/vnd.ms-asf;application/vnd.rn-realmedia;application/x-kmplayer;application/x-mplayer2;application/x-ogg;application/xspf+xml;audio/basic;audio/m3u;audio/mp4;audio/mpeg;audio/mpegurl;audio/vnd.rn-realaudio;audio/vorbis;audio/x-aiff;audio/x-flac;audio/x-m3u;audio/x-matroska;audio/x-mp2;audio/x-mp3;audio/x-mpegurl;audio/x-ms-asx;audio/x-ms-wma;audio/x-musepack;audio/x-mod;audio/x-oggflac;audio/x-pn-realaudio;audio/x-scpls;audio/x-speex;audio/x-vorbis;audio/x-wav;video/avi;video/mediaplayer;video/mp4;video/mpeg;video/quicktime;video/vnd.rn-realvideo;video/x-avi;video/x-flic;video/x-matroska;video/x-ms-asf;video/x-msvideo;video/x-ms-wmp;video/x-ms-wmv;video/x-ogm;video/x-theora;x-scheme-handler/mms;x-scheme-handler/pnm;x-scheme-handler/rtspt;x-scheme-handler/rtspu;
++MimeType=application/x-shockwave-flash;application/ogg;application/smil;application/vnd.ms-asf;application/vnd.rn-realmedia;application/x-kmplayer;application/x-mplayer2;application/x-ogg;application/xspf+xml;audio/basic;audio/m3u;audio/mp4;audio/mpeg;audio/mpegurl;audio/vnd.rn-realaudio;audio/vorbis;audio/x-aiff;audio/x-flac;audio/x-m3u;audio/x-matroska;audio/x-mp2;audio/x-mp3;audio/x-mpegurl;audio/x-ms-asx;audio/x-ms-wma;audio/x-musepack;audio/x-mod;audio/x-oggflac;audio/x-pn-realaudio;audio/x-scpls;audio/x-speex;audio/x-vorbis;audio/x-wav;video/avi;video/mediaplayer;video/mp4;video/mpeg;video/quicktime;video/vnd.rn-realvideo;video/x-avi;video/x-flic;video/x-matroska;video/x-ms-asf;video/x-msvideo;video/x-ms-wmp;video/x-ms-wmv;video/x-ogm;video/x-theora;x-scheme-handler/mms;x-scheme-handler/pnm;x-scheme-handler/rtspt;x-scheme-handler/rtspu;
+ Type=Service
+ Icon=kmplayer
+ X-KDE-ServiceTypes=KParts/ReadOnlyPart,Browser/View,KMediaPlayer/Player
diff --git a/media-video/kmplayer/kmplayer-0.11.3d-r3.ebuild b/media-video/kmplayer/kmplayer-0.11.3d-r3.ebuild
new file mode 100644
index 000000000000..5b2dac1172a2
--- /dev/null
+++ b/media-video/kmplayer/kmplayer-0.11.3d-r3.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+KDE_LINGUAS="bg bs ca ca@valencia cs da de el en_GB eo es et fr ga gl hr hu it
+ja km ku lt lv mai nb nds nl nn pl pt pt_BR ro ru sk sr sr@latin sv th tr ug uk
+zh_CN zh_TW"
+KDE_HANDBOOK="optional"
+inherit kde4-base
+
+DESCRIPTION="Video player plugin for Konqueror and basic MPlayer/Xine/ffmpeg/ffserver/VDR frontend"
+HOMEPAGE="https://projects.kde.org/projects/extragear/multimedia/kmplayer"
+SRC_URI="http://kmplayer.kde.org/pkgs/${P}.tar.bz2"
+
+LICENSE="GPL-2 FDL-1.2 LGPL-2.1"
+SLOT="4"
+KEYWORDS="amd64 x86"
+IUSE="cairo debug expat npp"
+
+DEPEND="
+ media-libs/phonon[qt4]
+ x11-libs/libX11
+ expat? ( >=dev-libs/expat-2.0.1 )
+ cairo? (
+ x11-libs/cairo
+ x11-libs/pango
+ )
+ npp? (
+ dev-libs/dbus-glib
+ $(add_kdeapps_dep kreadconfig)
+ >=x11-libs/gtk+-2.10.14:2
+ www-plugins/adobe-flash
+ )
+"
+RDEPEND="${DEPEND}
+ media-video/mplayer
+"
+
+src_prepare() {
+ use npp && epatch "${FILESDIR}/${PN}-flash.patch"
+ sed -e '/add_subdirectory(icons)/d' \
+ -i CMakeLists.txt || die
+
+ kde4-base_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use cairo KMPLAYER_BUILT_WITH_CAIRO)
+ $(cmake-utils_use expat KMPLAYER_BUILT_WITH_EXPAT)
+ $(cmake-utils_use npp KMPLAYER_BUILT_WITH_NPP)
+ )
+ kde4-base_src_configure
+}
+
+src_install() {
+ kde4-base_src_install
+
+ if use npp; then
+ kwriteconfig --file "${ED}/usr/share/config/kmplayerrc" --group "application/x-shockwave-flash" --key player npp
+ kwriteconfig --file "${ED}/usr/share/config/kmplayerrc" --group "application/x-shockwave-flash" --key plugin /usr/lib/nsbrowser/plugins/libflashplayer.so
+ fi
+}
diff --git a/media-video/kmplayer/metadata.xml b/media-video/kmplayer/metadata.xml
new file mode 100644
index 000000000000..3c7839b53efe
--- /dev/null
+++ b/media-video/kmplayer/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>kde</herd>
+ <herd>video</herd>
+ <use>
+ <flag name="npp">Compile the npp backend that plays xembed style browser plugins.</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-video/kplayer/Manifest b/media-video/kplayer/Manifest
new file mode 100644
index 000000000000..a0b118bbe19c
--- /dev/null
+++ b/media-video/kplayer/Manifest
@@ -0,0 +1 @@
+DIST kplayer-0.7.2.tar.xz 5546012 SHA256 c5e52ae74815878930e15ed0be398617d20394eec8c8f183ddd5e39a433d5d7b SHA512 f4560b6e502845fa2d3328d1221d4808f33d3eb4d1416b575b1c718f41366d769e53ef2e1823356319c4df4040003a54c5ac4b5bfc18d1ba75ec0f72bcd5b611 WHIRLPOOL c0b79637af7e5061a5d6b766ffa62531fe2ee57a5af5816d21edaf48acecb57a52418a85663e2de0874bc1fe3e774148cdd500c6c9a0527d4bd34096ff31b620
diff --git a/media-video/kplayer/kplayer-0.7.2-r1.ebuild b/media-video/kplayer/kplayer-0.7.2-r1.ebuild
new file mode 100644
index 000000000000..072a8876046a
--- /dev/null
+++ b/media-video/kplayer/kplayer-0.7.2-r1.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+KDE_LINGUAS="bg bs ca ca@valencia cs da de el en_GB es et eu fr ga gl he hi hne
+it ja km lt mai nb nds nl pa pl pt pt_BR ro ru sr sr@ijekavian sr@ijekavianlatin
+sr@latin sv th tr uk zh_CN zh_TW"
+KDE_HANDBOOK=optional
+inherit kde4-base
+
+DESCRIPTION="KPlayer is a KDE media player based on mplayer"
+HOMEPAGE="https://projects.kde.org/projects/unmaintained/kplayer"
+SRC_URI="mirror://kde/stable/${PN}/${PV}/src/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="4"
+KEYWORDS="amd64 x86"
+IUSE="debug"
+
+RDEPEND="${DEPEND}
+ || ( >=media-video/mplayer-1.0_rc1 media-video/mplayer2 )
+"
diff --git a/media-video/kplayer/metadata.xml b/media-video/kplayer/metadata.xml
new file mode 100644
index 000000000000..276e593205a6
--- /dev/null
+++ b/media-video/kplayer/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>video</herd>
+ <herd>kde</herd>
+</pkgmetadata>
diff --git a/media-video/libav/Manifest b/media-video/libav/Manifest
new file mode 100644
index 000000000000..b2e34091a1df
--- /dev/null
+++ b/media-video/libav/Manifest
@@ -0,0 +1,8 @@
+DIST 0001-x86-Put-COPY3_IF_LT-under-HAVE_6REGS.patch.gz 736 SHA256 3df88fc60ad15116c03fd3f70d41f1a18db98b095add0fb937309116d7cf7201 SHA512 dbdfdf7fc1d42ebd93b0853e85ba0c07d816035c126a9303e6a5656bb9faeea16f16068d7e4aa67c7c4ade8ca09f64669e67f52d7d0a2a65518fa3897d586311 WHIRLPOOL 3038214bd498a195f405a0ce6eece3b04004802f50e05cb1ed081bd0345f93a7a00663902f50207061998a33cb4f5f8fcc1f63c8056233e79a3ad43d9823e9c5
+DIST fate-10.tar.xz 558524508 SHA256 65779319ff75a5d93f20132a7c348db2ff6f0f0275fb64a23f81fbda6e44c1cb SHA512 5e569b899961d82c579d974eb13b8a5263ae7a83dc788119d6abf923c9c133029fd861960a85c316e0b0a0bd61722cc3bcb393a65d9d2c551084c0b1103cc582 WHIRLPOOL d9e0bb01ae809ca57a566ae804b9e30ff0239e43047a7f93d07ab0d31e95c7f06cadd651dd3badc2b906f34ffa12669cff87910ffe115f34c3279615f8afaddb
+DIST fate-11.tar.xz 691009480 SHA256 4de446ae8c665e9410475c58f6294720f34cfdb1f20d29bbc0ee2576f810d597 SHA512 f9dc152964e3f19cf32d5d4cbc923a2bd05ba3b0f8f3880122df79d32852ee9d4795a0bfd66d7a2925299e9e9533888df6103e212ea3e5cbfe799d17ffa2b433 WHIRLPOOL 11034760105d1028330712f5ead087dffc9edc119945d618f6b02b37f4599db4c575a04c72f77cd5c6f180dc8e8ac2c9c1786d748b759aef2efd38191fcc6361
+DIST fate-9.tar.xz 467671500 SHA256 27d10fd49267452ac787c3f43501a4a21d0ccaccc5ddd6d79d8a6150ee276532 SHA512 8e45539f2512ef915b37c857226c0243940259f269b8f99393b9defa3352d7b8c1fcc5078f4f0d40dc0509737f0c915e179cedcc77f71fe5d96b1b956169a202 WHIRLPOOL d280ac32c6d84f121be8d733774e72a4df3f2e84d71051aea509ef5ca3289c94fd548bf03ff12215e045bf20c83426c547e6b5eb446429d167f38af7c7aa9803
+DIST libav-10.5.tar.xz 4650900 SHA256 c7a57042a5e4720152d27a0beea961ae52a3ae1d916a88c78c1e192e9e0d5f86 SHA512 fa4837daa3bf40f05902ac2d849179d104b1f9881b63b460363e577849cd55b0795e6e41aadec817eac89d1eaca88ce4a9ad0eb2dbf1dd789496dd9cd2637c59 WHIRLPOOL 03ba4cb4dbe8da4dee4a242dc14333ed6b1a2198783f687d143d65cd9c25a5f05aa7b30e49b784309af04045d4726ee3a702159da72ed00d76eaa1be01b7c4d3
+DIST libav-11.3.tar.xz 4858864 SHA256 12ae6c051967765ae5faeddf94c4584129ac0b18edb884afffc5fcedcdb5e030 SHA512 f25b9fb7392d5bb4df35937f79beae26bd8f6606f0ad7cdebf16963834eb9b423d882f6a3a44b5120a5d5d853c7c31bb8c3420a427cd2b360f41a48a6d5df284 WHIRLPOOL 721c4cbe7ee3f7307d24c0e4f1cc1f8ab8b0ccd50ddf88b77ecf1cae05f06fc80d7527e9f7a0a098a6d95d0e7fed50082aaffa07935eab6e9131f7c9be6e696c
+DIST libav-9.14.tar.xz 4077424 SHA256 e4baf0c2adbd941a827854794dd6af9c29cd2042b23501c5828e9b8e1725f61d SHA512 fa8e83cb92a5a565cd23c63467c64972a69a4cbd652b946c7891b73180b609890f67a6f89f009ed263fb9e2c769236f3a8f7f70b0fce4c4373fa93a49470c04d WHIRLPOOL 178ba6c6ad0ecd8ad59eb3bf7a0d4289a3c253d82981cf3ad454e3b222848ae4f875e37cfd280be43faa25a9614c445106555c9f3b5ee4497aec9d71f39ac1af
+DIST libav-9.17.tar.xz 4080028 SHA256 e32d5f152bce1de283c002a35eb6e71f265877633dee8a40db4d16381dd5d17c SHA512 20af83d4b6a23c159c2386b6592ba6a6acf3f2c54e8aeb16dd0c8a64d637fbde24f37b864698b1143c6802b64a7b5e8ddfe0e7601b35c35686a789e2b3232f5a WHIRLPOOL ec07b5dd116e87416a9841044e09a6ef9b124fe4882f53e88711a32813d3d3a1d71f5067854bbd553ecdadec401dbbb8b504bfc1c6966bfd5e2db79459fb9995
diff --git a/media-video/libav/libav-10.5.ebuild b/media-video/libav/libav-10.5.ebuild
new file mode 100644
index 000000000000..dc840a28e34a
--- /dev/null
+++ b/media-video/libav/libav-10.5.ebuild
@@ -0,0 +1,324 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+if [[ ${PV} == *9999 ]] ; then
+ SCM="git-2"
+ EGIT_REPO_URI="git://git.libav.org/libav.git"
+ [[ ${PV%9999} != "" ]] && EGIT_BRANCH="release/${PV%.9999}"
+fi
+
+inherit eutils flag-o-matic multilib multilib-minimal toolchain-funcs ${SCM}
+
+DESCRIPTION="Complete solution to record, convert and stream audio and video"
+HOMEPAGE="http://libav.org/"
+if [[ ${PV} == *9999 ]] ; then
+ SRC_URI=""
+elif [[ ${PV%_p*} != ${PV} ]] ; then # Gentoo snapshot
+ SRC_URI="http://dev.gentoo.org/~lu_zero/libav/${P}.tar.xz"
+else # Official release
+ SRC_URI="http://${PN}.org/releases/${P}.tar.xz"
+fi
+
+SRC_URI+=" test? ( http://dev.gentoo.org/~lu_zero/libav/fate-10.tar.xz )"
+
+LICENSE="LGPL-2.1 gpl? ( GPL-3 )"
+SLOT="0/10"
+[[ ${PV} == *9999 ]] || KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64
+~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos
+~x64-solaris ~x86-solaris"
+IUSE="aac alsa amr +bzip2 cdio cpudetection custom-cflags debug doc +encode
+ faac fdk frei0r +gpl gsm +hardcoded-tables ieee1394 jack jpeg2k mp3
+ +network openssl opus oss pic pulseaudio rtmp schroedinger sdl speex ssl
+ static-libs test theora threads tools truetype v4l vaapi vdpau vorbis vpx X
+ wavpack webp x264 xvid +zlib"
+
+# String for CPU features in the useflag[:configure_option] form
+# if :configure_option isn't set, it will use 'useflag' as configure option
+CPU_FEATURES="cpu_flags_x86_3dnow:amd3dnow cpu_flags_x86_3dnowext:amd3dnowext altivec cpu_flags_x86_avx:avx cpu_flags_x86_mmx:mmx cpu_flags_x86_mmxext:mmxext neon cpu_flags_x86_ssse3:ssse3 vis cpu_flags_x86_avx2:avx2"
+for i in ${CPU_FEATURES} ; do
+ IUSE+=" ${i%:*}"
+done
+
+RDEPEND="
+ !media-video/ffmpeg:0
+ alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
+ amr? ( >=media-libs/opencore-amr-0.1.3-r1[${MULTILIB_USEDEP}] )
+ bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
+ cdio? (
+ || (
+ >=dev-libs/libcdio-paranoia-0.90_p1-r1[${MULTILIB_USEDEP}]
+ <dev-libs/libcdio-0.90[-minimal,${MULTILIB_USEDEP}]
+ )
+ )
+ encode? (
+ aac? ( >=media-libs/vo-aacenc-0.1.3[${MULTILIB_USEDEP}] )
+ amr? ( >=media-libs/vo-amrwbenc-0.1.2-r1[${MULTILIB_USEDEP}] )
+ faac? ( >=media-libs/faac-1.28-r3[${MULTILIB_USEDEP}] )
+ fdk? ( >=media-libs/fdk-aac-0.1.2[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/lame-3.99.5-r1[${MULTILIB_USEDEP}] )
+ theora? (
+ >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}]
+ >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
+ )
+ vorbis? (
+ >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}]
+ >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
+ )
+ webp? ( >=media-libs/libwebp-0.3.0[${MULTILIB_USEDEP}] )
+ wavpack? ( >=media-sound/wavpack-4.60.1-r1[${MULTILIB_USEDEP}] )
+ x264? ( >=media-libs/x264-0.0.20130506:=[${MULTILIB_USEDEP}] )
+ xvid? ( >=media-libs/xvid-1.3.2-r1[${MULTILIB_USEDEP}] )
+ )
+ frei0r? ( media-plugins/frei0r-plugins )
+ gsm? ( >=media-sound/gsm-1.0.13-r1[${MULTILIB_USEDEP}] )
+ ieee1394? (
+ >=media-libs/libdc1394-2.2.1[${MULTILIB_USEDEP}]
+ >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}]
+ )
+ jack? ( >=media-sound/jack-audio-connection-kit-0.121.3-r1[${MULTILIB_USEDEP}] )
+ jpeg2k? ( >=media-libs/openjpeg-1.5.0:0[${MULTILIB_USEDEP}] )
+ opus? ( >=media-libs/opus-1.0.2-r2[${MULTILIB_USEDEP}] )
+ pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] )
+ rtmp? ( >=media-video/rtmpdump-2.4_p20131018[${MULTILIB_USEDEP}] )
+ ssl? (
+ openssl? ( >=dev-libs/openssl-1.0.1h-r2[${MULTILIB_USEDEP}] )
+ !openssl? ( >=net-libs/gnutls-2.12.23-r6[${MULTILIB_USEDEP}] )
+ )
+ sdl? ( >=media-libs/libsdl-1.2.15-r4[sound,video,${MULTILIB_USEDEP}] )
+ schroedinger? ( >=media-libs/schroedinger-1.0.11-r1[${MULTILIB_USEDEP}] )
+ speex? ( >=media-libs/speex-1.2_rc1-r1[${MULTILIB_USEDEP}] )
+ truetype? ( >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}] )
+ vaapi? ( >=x11-libs/libva-1.2.1-r1[${MULTILIB_USEDEP}] )
+ vdpau? ( >=x11-libs/libvdpau-0.7[${MULTILIB_USEDEP}] )
+ vpx? ( >=media-libs/libvpx-1.2.0_pre20130625[${MULTILIB_USEDEP}] )
+ X? (
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXfixes-5.0.1[${MULTILIB_USEDEP}]
+ )
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
+"
+
+DEPEND="${RDEPEND}
+ >=sys-devel/make-3.81
+ doc? ( app-text/texi2html )
+ ieee1394? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ cpu_flags_x86_mmx? ( dev-lang/yasm )
+ rtmp? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ schroedinger? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ ssl? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ test? ( sys-devel/bc )
+ truetype? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ v4l? ( sys-kernel/linux-headers )
+"
+
+RDEPEND="${RDEPEND}
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+
+# faac can't be binary distributed
+# openssl support marked as nonfree
+# faac and aac are concurent implementations
+# amr and aac require at least lgpl3
+# x264 requires gpl2
+REQUIRED_USE="rtmp? ( network )
+ amr? ( gpl ) aac? ( gpl ) x264? ( gpl ) X? ( gpl ) cdio? ( gpl )
+ test? ( encode zlib )
+"
+
+# Test on live ebuild are not possible as they require trunk fate
+RESTRICT="test faac? ( bindist ) fdk? ( bindist ) openssl? ( bindist )"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/libavutil/avconfig.h
+)
+
+src_prepare() {
+ epatch_user
+
+ # if we have snapshot then we need to hardcode the version
+ if [[ ${PV%_p*} != ${PV} ]]; then
+ sed -i -e "s/UNKNOWN/DATE-${PV#*_pre}/" "${S}/version.sh" || die
+ fi
+
+ TOOLS=( aviocat graph2dot ismindex pktdumper qt-faststart trasher )
+ use zlib && TOOLS+=( cws2fws )
+
+ MAKEOPTS+=" V=1"
+}
+
+multilib_src_configure() {
+ local myconf=( ${EXTRA_LIBAV_CONF} )
+ local uses i
+
+ myconf+=(
+ $(use_enable gpl)
+ $(use_enable gpl version3)
+ --enable-avfilter
+ )
+
+ # enabled by default
+ uses="debug doc network zlib"
+ for i in ${uses}; do
+ use ${i} || myconf+=( --disable-${i} )
+ done
+ use bzip2 || myconf+=( --disable-bzlib )
+ use sdl || myconf+=( --disable-avplay )
+
+ if use ssl; then
+ use openssl && myconf+=( --enable-openssl --enable-nonfree ) \
+ || myconf+=( --enable-gnutls )
+ fi
+
+ use custom-cflags && myconf+=( --disable-optimizations )
+ use cpudetection && myconf+=( --enable-runtime-cpudetect )
+
+ use vdpau || myconf+=( --disable-vdpau )
+
+ use vaapi && myconf+=( --enable-vaapi )
+
+ # Encoders
+ if use encode; then
+ use faac && myconf+=( --enable-nonfree )
+ use fdk && myconf+=( --enable-nonfree --enable-libfdk-aac )
+ use mp3 && myconf+=( --enable-libmp3lame )
+ use amr && myconf+=( --enable-libvo-amrwbenc )
+ use aac && myconf+=( --enable-libvo-aacenc )
+ uses="faac theora vorbis wavpack webp x264 xvid"
+ for i in ${uses}; do
+ use ${i} && myconf+=( --enable-lib${i} )
+ done
+ else
+ myconf+=( --disable-encoders )
+ fi
+
+ # libavdevice options
+ use cdio && myconf+=( --enable-libcdio )
+ use ieee1394 && myconf+=( --enable-libdc1394 )
+ use pulseaudio && myconf+=( --enable-libpulse )
+
+ # Indevs
+ # v4l1 is gone since linux-headers-2.6.38
+ myconf+=( --disable-indev=v4l )
+ use v4l || myconf+=( --disable-indev=v4l2 )
+ for i in alsa oss jack; do
+ use ${i} || myconf+=( --disable-indev=${i} )
+ done
+ use X && myconf+=( --enable-x11grab )
+ # Outdevs
+ for i in alsa oss ; do
+ use ${i} || myconf+=( --disable-outdev=${i} )
+ done
+ # libavfilter options
+ multilib_is_native_abi && use frei0r && myconf+=( --enable-frei0r )
+ use truetype && myconf+=( --enable-libfreetype )
+
+ # Threads; we only support pthread for now
+ use threads && myconf+=( --enable-pthreads )
+
+ # Decoders
+ use amr && myconf+=( --enable-libopencore-amrwb --enable-libopencore-amrnb )
+ uses="gsm opus rtmp schroedinger speex vpx"
+ for i in ${uses}; do
+ use ${i} && myconf+=( --enable-lib${i} )
+ done
+ use jpeg2k && myconf+=( --enable-libopenjpeg )
+
+ # CPU features
+ for i in ${CPU_FEATURES}; do
+ use ${i%:*} || myconf+=( --disable-${i#*:} )
+ done
+
+ # pass the right -mfpu as extra
+ use neon && myconf+=( --extra-cflags=-mfpu=neon )
+
+ # disable mmx accelerated code if PIC is required
+ # as the provided asm decidedly is not PIC for x86.
+ if use pic && [[ ${ABI} == x86 ]]; then
+ myconf+=( --disable-mmx --disable-mmxext )
+ fi
+
+ # Option to force building pic
+ use pic && myconf+=( --enable-pic )
+
+ # cross compile support
+ if tc-is-cross-compiler ; then
+ myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- )
+ case ${CHOST} in
+ *freebsd*)
+ myconf+=( --target-os=freebsd )
+ ;;
+ mingw32*)
+ myconf+=( --target-os=mingw32 )
+ ;;
+ *linux*)
+ myconf+=( --target-os=linux )
+ ;;
+ esac
+ fi
+
+ # Misc stuff
+ use hardcoded-tables && myconf+=( --enable-hardcoded-tables )
+
+ # Specific workarounds for too-few-registers arch...
+ if [[ ${ABI} == x86 ]]; then
+ local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
+ filter-flags -fforce-addr -momit-leaf-frame-pointer
+ append-flags -fomit-frame-pointer
+ is-flag -O? || append-flags -O2
+ if use debug; then
+ # no need to warn about debug if not using debug flag
+ ewarn ""
+ ewarn "Debug information will be almost useless as the frame pointer is omitted."
+ ewarn "This makes debugging harder, so crashes that has no fixed behavior are"
+ ewarn "difficult to fix. Please have that in mind."
+ ewarn ""
+ fi
+ fi
+
+ set -- "${S}"/configure \
+ --prefix="${EPREFIX}"/usr \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --shlibdir="${EPREFIX}"/usr/$(get_libdir) \
+ --mandir="${EPREFIX}"/usr/share/man \
+ --enable-shared \
+ --cc="$(tc-getCC)" \
+ --ar="$(tc-getAR)" \
+ --optflags="${CFLAGS}" \
+ --extra-cflags="${CFLAGS}" \
+ $(use_enable static-libs static) \
+ "${myconf[@]}"
+ echo "${@}"
+ "${@}" || die
+}
+
+multilib_src_compile() {
+ emake
+
+ if use tools; then
+ tc-export CC
+
+ emake ${TOOLS[@]/#/tools/}
+ fi
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install install-man
+ use doc && dodoc doc/*.html
+
+ if use tools; then
+ dobin ${TOOLS[@]/#/tools/}
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc Changelog README INSTALL
+}
+
+multilib_src_test() {
+ LD_LIBRARY_PATH="${BUILD_DIR}/libavcore:${BUILD_DIR}/libswscale:${BUILD_DIR}/libavcodec:${BUILD_DIR}/libavdevice:${BUILD_DIR}/libavfilter:${BUILD_DIR}/libavformat:${BUILD_DIR}/libavutil" \
+ emake -j1 fate
+}
diff --git a/media-video/libav/libav-10.9999.ebuild b/media-video/libav/libav-10.9999.ebuild
new file mode 100644
index 000000000000..4747228eb333
--- /dev/null
+++ b/media-video/libav/libav-10.9999.ebuild
@@ -0,0 +1,325 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+if [[ ${PV} == *9999 ]] ; then
+ SCM="git-2"
+ EGIT_REPO_URI="git://git.libav.org/libav.git"
+ [[ ${PV%9999} != "" ]] && EGIT_BRANCH="release/${PV%.9999}"
+fi
+
+inherit eutils flag-o-matic multilib multilib-minimal toolchain-funcs ${SCM}
+
+DESCRIPTION="Complete solution to record, convert and stream audio and video"
+HOMEPAGE="http://libav.org/"
+if [[ ${PV} == *9999 ]] ; then
+ SRC_URI=""
+elif [[ ${PV%_p*} != ${PV} ]] ; then # Gentoo snapshot
+ SRC_URI="http://dev.gentoo.org/~lu_zero/libav/${P}.tar.xz"
+else # Official release
+ SRC_URI="http://${PN}.org/releases/${P}.tar.xz"
+fi
+
+SRC_URI+=" test? ( http://dev.gentoo.org/~lu_zero/libav/fate-10.tar.xz )"
+
+LICENSE="LGPL-2.1 gpl? ( GPL-3 )"
+SLOT="0/10"
+[[ ${PV} == *9999 ]] || KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64
+~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos
+~x64-solaris ~x86-solaris"
+IUSE="aac alsa amr +bzip2 cdio cpudetection custom-cflags debug doc +encode
+ faac fdk frei0r +gpl gsm +hardcoded-tables ieee1394 jack jpeg2k mp3
+ +network openssl opus oss pic pulseaudio rtmp schroedinger sdl speex ssl
+ static-libs test theora threads tools truetype v4l vaapi vdpau vorbis vpx X
+ wavpack webp x264 xvid +zlib"
+
+# String for CPU features in the useflag[:configure_option] form
+# if :configure_option isn't set, it will use 'useflag' as configure option
+CPU_FEATURES="cpu_flags_x86_3dnow:amd3dnow cpu_flags_x86_3dnowext:amd3dnowext altivec cpu_flags_x86_avx:avx cpu_flags_x86_mmx:mmx cpu_flags_x86_mmxext:mmxext neon cpu_flags_x86_ssse3:ssse3 vis cpu_flags_x86_avx2:avx2"
+for i in ${CPU_FEATURES} ; do
+ IUSE+=" ${i%:*}"
+done
+
+RDEPEND="
+ !media-video/ffmpeg:0
+ alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
+ amr? ( >=media-libs/opencore-amr-0.1.3-r1[${MULTILIB_USEDEP}] )
+ bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
+ cdio? (
+ || (
+ >=dev-libs/libcdio-paranoia-0.90_p1-r1[${MULTILIB_USEDEP}]
+ <dev-libs/libcdio-0.90[-minimal,${MULTILIB_USEDEP}]
+ )
+ )
+ encode? (
+ aac? ( >=media-libs/vo-aacenc-0.1.3[${MULTILIB_USEDEP}] )
+ amr? ( >=media-libs/vo-amrwbenc-0.1.2-r1[${MULTILIB_USEDEP}] )
+ faac? ( >=media-libs/faac-1.28-r3[${MULTILIB_USEDEP}] )
+ fdk? ( >=media-libs/fdk-aac-0.1.2[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/lame-3.99.5-r1[${MULTILIB_USEDEP}] )
+ theora? (
+ >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}]
+ >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
+ )
+ vorbis? (
+ >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}]
+ >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
+ )
+ webp? ( >=media-libs/libwebp-0.3.0[${MULTILIB_USEDEP}] )
+ wavpack? ( >=media-sound/wavpack-4.60.1-r1[${MULTILIB_USEDEP}] )
+ x264? ( >=media-libs/x264-0.0.20130506:=[${MULTILIB_USEDEP}] )
+ xvid? ( >=media-libs/xvid-1.3.2-r1[${MULTILIB_USEDEP}] )
+ )
+ frei0r? ( media-plugins/frei0r-plugins )
+ gsm? ( >=media-sound/gsm-1.0.13-r1[${MULTILIB_USEDEP}] )
+ ieee1394? (
+ >=media-libs/libdc1394-2.2.1[${MULTILIB_USEDEP}]
+ >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}]
+ )
+ jack? ( >=media-sound/jack-audio-connection-kit-0.121.3-r1[${MULTILIB_USEDEP}] )
+ jpeg2k? ( >=media-libs/openjpeg-1.5.0:0[${MULTILIB_USEDEP}] )
+ opus? ( >=media-libs/opus-1.0.2-r2[${MULTILIB_USEDEP}] )
+ pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] )
+ rtmp? ( >=media-video/rtmpdump-2.4_p20131018[${MULTILIB_USEDEP}] )
+ ssl? (
+ openssl? ( >=dev-libs/openssl-1.0.1h-r2[${MULTILIB_USEDEP}] )
+ !openssl? ( >=net-libs/gnutls-2.12.23-r6[${MULTILIB_USEDEP}] )
+ )
+ sdl? ( >=media-libs/libsdl-1.2.15-r4[sound,video,${MULTILIB_USEDEP}] )
+ schroedinger? ( >=media-libs/schroedinger-1.0.11-r1[${MULTILIB_USEDEP}] )
+ speex? ( >=media-libs/speex-1.2_rc1-r1[${MULTILIB_USEDEP}] )
+ truetype? ( >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}] )
+ vaapi? ( >=x11-libs/libva-1.2.1-r1[${MULTILIB_USEDEP}] )
+ vdpau? ( >=x11-libs/libvdpau-0.7[${MULTILIB_USEDEP}] )
+ vpx? ( >=media-libs/libvpx-1.2.0_pre20130625[${MULTILIB_USEDEP}] )
+ X? (
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXfixes-5.0.1[${MULTILIB_USEDEP}]
+ )
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
+"
+
+DEPEND="${RDEPEND}
+ >=sys-devel/make-3.81
+ doc? ( app-text/texi2html )
+ ieee1394? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ cpu_flags_x86_mmx? ( dev-lang/yasm )
+ rtmp? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ schroedinger? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ ssl? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ test? ( sys-devel/bc )
+ truetype? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ v4l? ( sys-kernel/linux-headers )
+"
+
+RDEPEND="${RDEPEND}
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+
+# faac can't be binary distributed
+# openssl support marked as nonfree
+# faac and aac are concurent implementations
+# amr and aac require at least lgpl3
+# x264 requires gpl2
+REQUIRED_USE="rtmp? ( network )
+ amr? ( gpl ) aac? ( gpl ) x264? ( gpl ) X? ( gpl ) cdio? ( gpl )
+ test? ( encode zlib )
+"
+
+# Test on live ebuild are not possible as they require trunk fate
+RESTRICT="test faac? ( bindist ) fdk? ( bindist ) openssl? ( bindist )"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/libavutil/avconfig.h
+)
+
+src_prepare() {
+ epatch_user
+
+ # if we have snapshot then we need to hardcode the version
+ if [[ ${PV%_p*} != ${PV} ]]; then
+ sed -i -e "s/UNKNOWN/DATE-${PV#*_pre}/" "${S}/version.sh" || die
+ fi
+
+ TOOLS=( aviocat graph2dot ismindex pktdumper qt-faststart trasher )
+ use zlib && TOOLS+=( cws2fws )
+
+ MAKEOPTS+=" V=1"
+}
+
+multilib_src_configure() {
+ local myconf=( ${EXTRA_LIBAV_CONF} )
+ local uses i
+
+ myconf+=(
+ $(use_enable gpl)
+ $(use_enable gpl version3)
+ --enable-avfilter
+ )
+
+ # enabled by default
+ uses="debug doc network zlib"
+ for i in ${uses}; do
+ use ${i} || myconf+=( --disable-${i} )
+ done
+ use bzip2 || myconf+=( --disable-bzlib )
+ use sdl || myconf+=( --disable-avplay )
+
+ if use ssl; then
+ use openssl && myconf+=( --enable-openssl --enable-nonfree ) \
+ || myconf+=( --enable-gnutls )
+ fi
+
+ use custom-cflags && myconf+=( --disable-optimizations )
+ use cpudetection && myconf+=( --enable-runtime-cpudetect )
+
+ use vdpau || myconf+=( --disable-vdpau )
+
+ use vaapi && myconf+=( --enable-vaapi )
+
+ # Encoders
+ if use encode; then
+ use faac && myconf+=( --enable-nonfree )
+ use fdk && myconf+=( --enable-nonfree --enable-libfdk-aac )
+ use mp3 && myconf+=( --enable-libmp3lame )
+ use amr && myconf+=( --enable-libvo-amrwbenc )
+ use aac && myconf+=( --enable-libvo-aacenc )
+ uses="faac theora vorbis wavpack webp x264 xvid"
+ for i in ${uses}; do
+ use ${i} && myconf+=( --enable-lib${i} )
+ done
+ else
+ myconf+=( --disable-encoders )
+ fi
+
+ # libavdevice options
+ use cdio && myconf+=( --enable-libcdio )
+ use ieee1394 && myconf+=( --enable-libdc1394 )
+ use pulseaudio && myconf+=( --enable-libpulse )
+
+ # Indevs
+ # v4l1 is gone since linux-headers-2.6.38
+ myconf+=( --disable-indev=v4l )
+ use v4l || myconf+=( --disable-indev=v4l2 )
+ for i in alsa oss jack; do
+ use ${i} || myconf+=( --disable-indev=${i} )
+ done
+ use X && myconf+=( --enable-x11grab )
+ # Outdevs
+ for i in alsa oss ; do
+ use ${i} || myconf+=( --disable-outdev=${i} )
+ done
+ # libavfilter options
+ multilib_is_native_abi && use frei0r && myconf+=( --enable-frei0r )
+ use truetype && myconf+=( --enable-libfreetype )
+
+ # Threads; we only support pthread for now
+ use threads && myconf+=( --enable-pthreads )
+
+ # Decoders
+ use amr && myconf+=( --enable-libopencore-amrwb --enable-libopencore-amrnb )
+ uses="gsm opus rtmp schroedinger speex vpx"
+ for i in ${uses}; do
+ use ${i} && myconf+=( --enable-lib${i} )
+ done
+ use jpeg2k && myconf+=( --enable-libopenjpeg )
+
+ # CPU features
+ for i in ${CPU_FEATURES}; do
+ use ${i%:*} || myconf+=( --disable-${i#*:} )
+ done
+
+ # pass the right -mfpu as extra
+ use neon && myconf+=( --extra-cflags=-mfpu=neon )
+
+ # disable mmx accelerated code if PIC is required
+ # as the provided asm decidedly is not PIC for x86.
+ if use pic && [[ ${ABI} == x86 ]]; then
+ myconf+=( --disable-mmx --disable-mmxext )
+ fi
+
+ # Option to force building pic
+ use pic && myconf+=( --enable-pic )
+
+ # cross compile support
+ if tc-is-cross-compiler ; then
+ myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- )
+ case ${CHOST} in
+ *freebsd*)
+ myconf+=( --target-os=freebsd )
+ ;;
+ mingw32*)
+ myconf+=( --target-os=mingw32 )
+ ;;
+ *linux*)
+ myconf+=( --target-os=linux )
+ ;;
+ esac
+ fi
+
+ # Misc stuff
+ use hardcoded-tables && myconf+=( --enable-hardcoded-tables )
+
+ # Specific workarounds for too-few-registers arch...
+ if [[ ${ABI} == x86 ]]; then
+ local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
+ filter-flags -fforce-addr -momit-leaf-frame-pointer
+ append-flags -fomit-frame-pointer
+ is-flag -O? || append-flags -O2
+ if use debug; then
+ # no need to warn about debug if not using debug flag
+ ewarn ""
+ ewarn "Debug information will be almost useless as the frame pointer is omitted."
+ ewarn "This makes debugging harder, so crashes that has no fixed behavior are"
+ ewarn "difficult to fix. Please have that in mind."
+ ewarn ""
+ fi
+ fi
+
+ set -- "${S}"/configure \
+ --prefix="${EPREFIX}"/usr \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --shlibdir="${EPREFIX}"/usr/$(get_libdir) \
+ --mandir="${EPREFIX}"/usr/share/man \
+ --enable-shared \
+ --cc="$(tc-getCC)" \
+ --ar="$(tc-getAR)" \
+ --optflags="${CFLAGS}" \
+ --extra-cflags="${CFLAGS}" \
+ $(use_enable static-libs static) \
+ "${myconf[@]}"
+ echo "${@}"
+ "${@}" || die
+}
+
+multilib_src_compile() {
+ emake
+
+ if use tools; then
+ tc-export CC
+
+ emake ${TOOLS[@]/#/tools/}
+ fi
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install install-man
+
+ if use tools; then
+ dobin ${TOOLS[@]/#/tools/}
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc Changelog README INSTALL
+ dodoc doc/*.txt
+ use doc && dodoc doc/*.html
+}
+
+multilib_src_test() {
+ LD_LIBRARY_PATH="${BUILD_DIR}/libavcore:${BUILD_DIR}/libswscale:${BUILD_DIR}/libavcodec:${BUILD_DIR}/libavdevice:${BUILD_DIR}/libavfilter:${BUILD_DIR}/libavformat:${BUILD_DIR}/libavutil" \
+ emake -j1 fate
+}
diff --git a/media-video/libav/libav-11.3.ebuild b/media-video/libav/libav-11.3.ebuild
new file mode 100644
index 000000000000..b5a0aaa7cf6c
--- /dev/null
+++ b/media-video/libav/libav-11.3.ebuild
@@ -0,0 +1,344 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic multilib multilib-minimal toolchain-funcs
+
+if [[ ${PV} == *9999 ]] ; then
+ : ${EGIT_REPO_URI:="git://git.libav.org/libav.git"}
+ if [[ ${PV%9999} != "" ]] ; then
+ : ${EGIT_BRANCH:="release/${PV%.9999}"}
+ fi
+ inherit git-r3
+fi
+
+DESCRIPTION="Complete solution to record, convert and stream audio and video"
+HOMEPAGE="https://libav.org/"
+if [[ ${PV} == *9999 ]] ; then
+ SRC_URI=""
+elif [[ ${PV%_p*} != ${PV} ]] ; then # Gentoo snapshot
+ SRC_URI="http://dev.gentoo.org/~lu_zero/libav/${P}.tar.xz"
+else # Official release
+ SRC_URI="https://libav.org/releases/${P}.tar.xz"
+ SRC_URI+=" http://dev.gentoo.org/~lu_zero/libav/patches/0001-x86-Put-COPY3_IF_LT-under-HAVE_6REGS.patch.gz"
+fi
+# 9999 does not have fate-*.tar.xz
+[[ ${PV%9999} != "" ]] && SRC_URI+=" test? ( http://dev.gentoo.org/~lu_zero/libav/fate-${PV%%.*}.tar.xz )"
+
+LICENSE="LGPL-2.1 gpl? ( GPL-3 )"
+SLOT="0/11"
+[[ ${PV} == *9999 ]] || \
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+IUSE="aac alsa amr bs2b +bzip2 cdio cpudetection custom-cflags debug doc +encode faac fdk
+ frei0r fontconfig +gpl gsm +hardcoded-tables ieee1394 jack jpeg2k mp3
+ +network openssl opus oss pic pulseaudio rtmp schroedinger sdl speex ssl
+ static-libs test theora threads tools truetype twolame v4l vaapi vdpau vorbis vpx X
+ wavpack webp x264 x265 xvid +zlib"
+
+# String for CPU features in the useflag[:configure_option] form
+# if :configure_option isn't set, it will use 'useflag' as configure option
+CPU_FEATURES="altivec armv5te armv6 armv6t2 armvfp:vfp neon"
+X86_CPU_FEATURES="3dnow:amd3dnow 3dnowext:amd3dnowext mmx mmxext sse sse2 sse3 ssse3 sse4_1:sse4 sse4_2:sse42 avx xop fma3 fma4 avx2"
+for i in ${X86_CPU_FEATURES} ; do
+ CPU_FEATURES+=" cpu_flags_x86_${i%:*}:${i#*:}"
+done
+for i in ${CPU_FEATURES} ; do
+ IUSE+=" ${i%:*}"
+done
+
+RDEPEND="
+ !media-video/ffmpeg:0
+ alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
+ amr? ( >=media-libs/opencore-amr-0.1.3-r1[${MULTILIB_USEDEP}] )
+ bs2b? ( >=media-libs/libbs2b-3.1.0-r1[${MULTILIB_USEDEP}] )
+ bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
+ cdio? ( >=dev-libs/libcdio-paranoia-0.90_p1-r1[${MULTILIB_USEDEP}] )
+ encode? (
+ aac? ( >=media-libs/vo-aacenc-0.1.3[${MULTILIB_USEDEP}] )
+ amr? ( >=media-libs/vo-amrwbenc-0.1.2-r1[${MULTILIB_USEDEP}] )
+ faac? ( >=media-libs/faac-1.28-r3[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/lame-3.99.5-r1[${MULTILIB_USEDEP}] )
+ theora? (
+ >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}]
+ >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
+ )
+ twolame? ( >=media-sound/twolame-0.3.13-r1[${MULTILIB_USEDEP}] )
+ vorbis? (
+ >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}]
+ >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
+ )
+ webp? ( >=media-libs/libwebp-0.3.0[${MULTILIB_USEDEP}] )
+ wavpack? ( >=media-sound/wavpack-4.60.1-r1[${MULTILIB_USEDEP}] )
+ x264? ( >=media-libs/x264-0.0.20130506:=[${MULTILIB_USEDEP}] )
+ x265? ( >=media-libs/x265-1.2:=[${MULTILIB_USEDEP}] )
+ xvid? ( >=media-libs/xvid-1.3.2-r1[${MULTILIB_USEDEP}] )
+ )
+ fdk? ( >=media-libs/fdk-aac-0.1.2[${MULTILIB_USEDEP}] )
+ frei0r? ( media-plugins/frei0r-plugins )
+ gsm? ( >=media-sound/gsm-1.0.13-r1[${MULTILIB_USEDEP}] )
+ ieee1394? (
+ >=media-libs/libdc1394-2.2.1[${MULTILIB_USEDEP}]
+ >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}]
+ )
+ jack? ( >=media-sound/jack-audio-connection-kit-0.121.3-r1[${MULTILIB_USEDEP}] )
+ jpeg2k? ( >=media-libs/openjpeg-1.5.0:0[${MULTILIB_USEDEP}] )
+ opus? ( >=media-libs/opus-1.0.2-r2[${MULTILIB_USEDEP}] )
+ pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] )
+ rtmp? ( >=media-video/rtmpdump-2.4_p20131018[${MULTILIB_USEDEP}] )
+ ssl? (
+ openssl? ( >=dev-libs/openssl-1.0.1h-r2[${MULTILIB_USEDEP}] )
+ !openssl? ( >=net-libs/gnutls-2.12.23-r6[${MULTILIB_USEDEP}] )
+ )
+ sdl? ( >=media-libs/libsdl-1.2.15-r4[sound,video,${MULTILIB_USEDEP}] )
+ schroedinger? ( >=media-libs/schroedinger-1.0.11-r1[${MULTILIB_USEDEP}] )
+ speex? ( >=media-libs/speex-1.2_rc1-r1[${MULTILIB_USEDEP}] )
+ truetype? ( >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}] )
+ fontconfig? ( >=media-libs/fontconfig-2.10[${MULTILIB_USEDEP}] )
+ vaapi? ( >=x11-libs/libva-1.2.1-r1[${MULTILIB_USEDEP}] )
+ vdpau? ( >=x11-libs/libvdpau-0.7[${MULTILIB_USEDEP}] )
+ vpx? ( >=media-libs/libvpx-1.2.0_pre20130625[${MULTILIB_USEDEP}] )
+ X? (
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXfixes-5.0.1[${MULTILIB_USEDEP}]
+ )
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
+"
+
+DEPEND="${RDEPEND}
+ >=sys-devel/make-3.81
+ doc? ( app-text/texi2html )
+ ieee1394? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ cpu_flags_x86_mmx? ( dev-lang/yasm )
+ rtmp? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ schroedinger? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ ssl? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ test? ( sys-devel/bc )
+ truetype? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ fontconfig? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ v4l? ( sys-kernel/linux-headers )
+"
+
+RDEPEND="${RDEPEND}
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+
+# faac can't be binary distributed
+# openssl support marked as nonfree
+# faac and aac are concurent implementations
+# amr and aac require at least lgpl3
+# x264 requires gpl2
+REQUIRED_USE="
+ rtmp? ( network )
+ amr? ( gpl ) aac? ( gpl ) x264? ( gpl ) X? ( gpl ) cdio? ( gpl ) x265? ( gpl )
+ test? ( encode zlib )
+ fontconfig? ( truetype )
+"
+RESTRICT="faac? ( bindist ) fdk? ( bindist ) openssl? ( bindist )"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/libavutil/avconfig.h
+)
+
+src_unpack() {
+ [[ ${PV} == *9999 ]] && git-r3_src_unpack
+ # 9999 does not have fate-*.tar.xz
+ [[ ${PV%9999} != "" ]] && default_src_unpack
+}
+
+src_prepare() {
+ epatch_user
+
+ epatch "${WORKDIR}/0001-x86-Put-COPY3_IF_LT-under-HAVE_6REGS.patch"
+
+ # if we have snapshot then we need to hardcode the version
+ if [[ ${PV%_p*} != ${PV} ]]; then
+ sed -i -e "s/UNKNOWN/DATE-${PV#*_pre}/" "${S}/version.sh" || die
+ fi
+
+ TOOLS=( aviocat graph2dot ismindex pktdumper qt-faststart trasher )
+ use zlib && TOOLS+=( cws2fws )
+
+ MAKEOPTS+=" V=1"
+}
+
+multilib_src_configure() {
+ local myconf=( ${EXTRA_LIBAV_CONF} )
+ local uses i
+
+ # 9999 does not have fate-*.tar.xz
+ [[ ${PV%9999} != "" ]] && use test && myconf+=( --samples="${WORKDIR}/fate" )
+
+ myconf+=(
+ $(use_enable gpl)
+ $(use_enable gpl version3)
+ --enable-avfilter
+ )
+
+ # enabled by default
+ uses="debug doc network zlib"
+ for i in ${uses}; do
+ use ${i} || myconf+=( --disable-${i} )
+ done
+ use bzip2 || myconf+=( --disable-bzlib )
+ use sdl || myconf+=( --disable-avplay )
+
+ if use ssl; then
+ use openssl && myconf+=( --enable-openssl --enable-nonfree ) \
+ || myconf+=( --enable-gnutls )
+ fi
+
+ use custom-cflags && myconf+=( --disable-optimizations )
+ use cpudetection && myconf+=( --enable-runtime-cpudetect )
+
+ use vdpau || myconf+=( --disable-vdpau )
+
+ use vaapi && myconf+=( --enable-vaapi )
+
+ # Encoders
+ if use encode; then
+ use faac && myconf+=( --enable-nonfree )
+ use mp3 && myconf+=( --enable-libmp3lame )
+ use amr && myconf+=( --enable-libvo-amrwbenc )
+ use aac && myconf+=( --enable-libvo-aacenc )
+ uses="faac theora twolame vorbis wavpack webp x264 x265 xvid"
+ for i in ${uses}; do
+ use ${i} && myconf+=( --enable-lib${i} )
+ done
+ else
+ myconf+=( --disable-encoders )
+ fi
+
+ # libavdevice options
+ use cdio && myconf+=( --enable-libcdio )
+ use ieee1394 && myconf+=( --enable-libdc1394 )
+ use pulseaudio && myconf+=( --enable-libpulse )
+
+ # Indevs
+ # v4l1 is gone since linux-headers-2.6.38
+ myconf+=( --disable-indev=v4l )
+ use v4l || myconf+=( --disable-indev=v4l2 )
+ for i in alsa oss jack; do
+ use ${i} || myconf+=( --disable-indev=${i} )
+ done
+ use X && myconf+=( --enable-x11grab )
+ # Outdevs
+ for i in alsa oss ; do
+ use ${i} || myconf+=( --disable-outdev=${i} )
+ done
+ # libavfilter options
+ use bs2b && myconf+=( --enable-libbs2b )
+ multilib_is_native_abi && use frei0r && myconf+=( --enable-frei0r )
+ use truetype && myconf+=( --enable-libfreetype )
+ use fontconfig && myconf+=( --enable-libfontconfig )
+
+ # Threads; we only support pthread for now
+ use threads && myconf+=( --enable-pthreads )
+
+ # Decoders
+ use amr && myconf+=( --enable-libopencore-amrwb --enable-libopencore-amrnb )
+ use fdk && myconf+=( --enable-nonfree --enable-libfdk-aac )
+ uses="gsm opus rtmp schroedinger speex vpx"
+ for i in ${uses}; do
+ use ${i} && myconf+=( --enable-lib${i} )
+ done
+ use jpeg2k && myconf+=( --enable-libopenjpeg )
+
+ # CPU features
+ for i in ${CPU_FEATURES}; do
+ use ${i%:*} || myconf+=( --disable-${i#*:} )
+ done
+
+ # pass the right -mfpu as extra
+ use neon && append-cflags -mfpu=neon
+
+ # disable mmx accelerated code if PIC is required
+ # as the provided asm decidedly is not PIC for x86.
+ if use pic && [[ ${ABI} == x86 ]]; then
+ myconf+=( --disable-mmx --disable-mmxext )
+ fi
+
+ # Option to force building pic
+ use pic && myconf+=( --enable-pic )
+
+ # cross compile support
+ if tc-is-cross-compiler ; then
+ myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- )
+ case ${CHOST} in
+ *freebsd*)
+ myconf+=( --target-os=freebsd )
+ ;;
+ mingw32*)
+ myconf+=( --target-os=mingw32 )
+ ;;
+ *linux*)
+ myconf+=( --target-os=linux )
+ ;;
+ esac
+ fi
+
+ # Misc stuff
+ use hardcoded-tables && myconf+=( --enable-hardcoded-tables )
+
+ # Specific workarounds for too-few-registers arch...
+ if [[ ${ABI} == x86 ]]; then
+ local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
+ filter-flags -fforce-addr -momit-leaf-frame-pointer
+ append-flags -fomit-frame-pointer
+ is-flag -O? || append-flags -O2
+ if use debug; then
+ # no need to warn about debug if not using debug flag
+ ewarn ""
+ ewarn "Debug information will be almost useless as the frame pointer is omitted."
+ ewarn "This makes debugging harder, so crashes that has no fixed behavior are"
+ ewarn "difficult to fix. Please have that in mind."
+ ewarn ""
+ fi
+ fi
+
+ set -- "${S}"/configure \
+ --prefix="${EPREFIX}"/usr \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --shlibdir="${EPREFIX}"/usr/$(get_libdir) \
+ --mandir="${EPREFIX}"/usr/share/man \
+ --enable-shared \
+ --cc="$(tc-getCC)" \
+ --ar="$(tc-getAR)" \
+ --optflags="${CFLAGS}" \
+ --extra-cflags="${CFLAGS}" \
+ $(use_enable static-libs static) \
+ "${myconf[@]}"
+ echo "${@}"
+ "${@}" || die
+}
+
+multilib_src_compile() {
+ emake
+
+ if use tools; then
+ tc-export CC
+
+ emake ${TOOLS[@]/#/tools/}
+ fi
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install install-man
+ use doc && dodoc doc/*.html
+
+ if use tools; then
+ dobin ${TOOLS[@]/#/tools/}
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc Changelog README.md INSTALL
+}
+
+multilib_src_test() {
+ local _libs="$(for i in lib*/;do echo -n "${BUILD_DIR}/${i%/}:";done)"
+ einfo "LD_LIBRARY_PATH is set to \"${_libs}\""
+ LD_LIBRARY_PATH="${_libs}" emake -k -j1 fate
+}
diff --git a/media-video/libav/libav-11.9999.ebuild b/media-video/libav/libav-11.9999.ebuild
new file mode 100644
index 000000000000..0d2bc1fe39ca
--- /dev/null
+++ b/media-video/libav/libav-11.9999.ebuild
@@ -0,0 +1,341 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic multilib multilib-minimal toolchain-funcs
+
+if [[ ${PV} == *9999 ]] ; then
+ : ${EGIT_REPO_URI:="git://git.libav.org/libav.git"}
+ if [[ ${PV%9999} != "" ]] ; then
+ : ${EGIT_BRANCH:="release/${PV%.9999}"}
+ fi
+ inherit git-r3
+fi
+
+DESCRIPTION="Complete solution to record, convert and stream audio and video"
+HOMEPAGE="https://libav.org/"
+if [[ ${PV} == *9999 ]] ; then
+ SRC_URI=""
+elif [[ ${PV%_p*} != ${PV} ]] ; then # Gentoo snapshot
+ SRC_URI="http://dev.gentoo.org/~lu_zero/libav/${P}.tar.xz"
+else # Official release
+ SRC_URI="https://libav.org/releases/${P}.tar.xz"
+fi
+# 9999 does not have fate-*.tar.xz
+[[ ${PV%9999} != "" ]] && SRC_URI+=" test? ( http://dev.gentoo.org/~lu_zero/libav/fate-${PV%%.*}.tar.xz )"
+
+LICENSE="LGPL-2.1 gpl? ( GPL-3 )"
+SLOT="0/11"
+[[ ${PV} == *9999 ]] || \
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+IUSE="aac alsa amr bs2b +bzip2 cdio cpudetection custom-cflags debug doc +encode faac fdk
+ frei0r fontconfig +gpl gsm +hardcoded-tables ieee1394 jack jpeg2k mp3
+ +network openssl opus oss pic pulseaudio rtmp schroedinger sdl speex ssl
+ static-libs test theora threads tools truetype twolame v4l vaapi vdpau vorbis vpx X
+ wavpack webp x264 x265 xvid +zlib"
+
+# String for CPU features in the useflag[:configure_option] form
+# if :configure_option isn't set, it will use 'useflag' as configure option
+CPU_FEATURES="altivec armv5te armv6 armv6t2 armvfp:vfp neon"
+X86_CPU_FEATURES="3dnow:amd3dnow 3dnowext:amd3dnowext mmx mmxext sse sse2 sse3 ssse3 sse4_1:sse4 sse4_2:sse42 avx xop fma3 fma4 avx2"
+for i in ${X86_CPU_FEATURES} ; do
+ CPU_FEATURES+=" cpu_flags_x86_${i%:*}:${i#*:}"
+done
+for i in ${CPU_FEATURES} ; do
+ IUSE+=" ${i%:*}"
+done
+
+RDEPEND="
+ !media-video/ffmpeg:0
+ alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
+ amr? ( >=media-libs/opencore-amr-0.1.3-r1[${MULTILIB_USEDEP}] )
+ bs2b? ( >=media-libs/libbs2b-3.1.0-r1[${MULTILIB_USEDEP}] )
+ bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
+ cdio? ( >=dev-libs/libcdio-paranoia-0.90_p1-r1[${MULTILIB_USEDEP}] )
+ encode? (
+ aac? ( >=media-libs/vo-aacenc-0.1.3[${MULTILIB_USEDEP}] )
+ amr? ( >=media-libs/vo-amrwbenc-0.1.2-r1[${MULTILIB_USEDEP}] )
+ faac? ( >=media-libs/faac-1.28-r3[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/lame-3.99.5-r1[${MULTILIB_USEDEP}] )
+ theora? (
+ >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}]
+ >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
+ )
+ twolame? ( >=media-sound/twolame-0.3.13-r1[${MULTILIB_USEDEP}] )
+ vorbis? (
+ >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}]
+ >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
+ )
+ webp? ( >=media-libs/libwebp-0.3.0[${MULTILIB_USEDEP}] )
+ wavpack? ( >=media-sound/wavpack-4.60.1-r1[${MULTILIB_USEDEP}] )
+ x264? ( >=media-libs/x264-0.0.20130506:=[${MULTILIB_USEDEP}] )
+ x265? ( >=media-libs/x265-1.2:=[${MULTILIB_USEDEP}] )
+ xvid? ( >=media-libs/xvid-1.3.2-r1[${MULTILIB_USEDEP}] )
+ )
+ fdk? ( >=media-libs/fdk-aac-0.1.2[${MULTILIB_USEDEP}] )
+ frei0r? ( media-plugins/frei0r-plugins )
+ gsm? ( >=media-sound/gsm-1.0.13-r1[${MULTILIB_USEDEP}] )
+ ieee1394? (
+ >=media-libs/libdc1394-2.2.1[${MULTILIB_USEDEP}]
+ >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}]
+ )
+ jack? ( >=media-sound/jack-audio-connection-kit-0.121.3-r1[${MULTILIB_USEDEP}] )
+ jpeg2k? ( >=media-libs/openjpeg-1.5.0:0[${MULTILIB_USEDEP}] )
+ opus? ( >=media-libs/opus-1.0.2-r2[${MULTILIB_USEDEP}] )
+ pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] )
+ rtmp? ( >=media-video/rtmpdump-2.4_p20131018[${MULTILIB_USEDEP}] )
+ ssl? (
+ openssl? ( >=dev-libs/openssl-1.0.1h-r2[${MULTILIB_USEDEP}] )
+ !openssl? ( >=net-libs/gnutls-2.12.23-r6[${MULTILIB_USEDEP}] )
+ )
+ sdl? ( >=media-libs/libsdl-1.2.15-r4[sound,video,${MULTILIB_USEDEP}] )
+ schroedinger? ( >=media-libs/schroedinger-1.0.11-r1[${MULTILIB_USEDEP}] )
+ speex? ( >=media-libs/speex-1.2_rc1-r1[${MULTILIB_USEDEP}] )
+ truetype? ( >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}] )
+ fontconfig? ( >=media-libs/fontconfig-2.10[${MULTILIB_USEDEP}] )
+ vaapi? ( >=x11-libs/libva-1.2.1-r1[${MULTILIB_USEDEP}] )
+ vdpau? ( >=x11-libs/libvdpau-0.7[${MULTILIB_USEDEP}] )
+ vpx? ( >=media-libs/libvpx-1.2.0_pre20130625[${MULTILIB_USEDEP}] )
+ X? (
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXfixes-5.0.1[${MULTILIB_USEDEP}]
+ )
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
+"
+
+DEPEND="${RDEPEND}
+ >=sys-devel/make-3.81
+ doc? ( app-text/texi2html )
+ ieee1394? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ cpu_flags_x86_mmx? ( dev-lang/yasm )
+ rtmp? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ schroedinger? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ ssl? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ test? ( sys-devel/bc )
+ truetype? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ fontconfig? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ v4l? ( sys-kernel/linux-headers )
+"
+
+RDEPEND="${RDEPEND}
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+
+# faac can't be binary distributed
+# openssl support marked as nonfree
+# faac and aac are concurent implementations
+# amr and aac require at least lgpl3
+# x264 requires gpl2
+REQUIRED_USE="
+ rtmp? ( network )
+ amr? ( gpl ) aac? ( gpl ) x264? ( gpl ) X? ( gpl ) cdio? ( gpl ) x265? ( gpl )
+ test? ( encode zlib )
+ fontconfig? ( truetype )
+"
+RESTRICT="faac? ( bindist ) fdk? ( bindist ) openssl? ( bindist )"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/libavutil/avconfig.h
+)
+
+src_unpack() {
+ [[ ${PV} == *9999 ]] && git-r3_src_unpack
+ # 9999 does not have fate-*.tar.xz
+ [[ ${PV%9999} != "" ]] && default_src_unpack
+}
+
+src_prepare() {
+ epatch_user
+
+ # if we have snapshot then we need to hardcode the version
+ if [[ ${PV%_p*} != ${PV} ]]; then
+ sed -i -e "s/UNKNOWN/DATE-${PV#*_pre}/" "${S}/version.sh" || die
+ fi
+
+ TOOLS=( aviocat graph2dot ismindex pktdumper qt-faststart trasher )
+ use zlib && TOOLS+=( cws2fws )
+
+ MAKEOPTS+=" V=1"
+}
+
+multilib_src_configure() {
+ local myconf=( ${EXTRA_LIBAV_CONF} )
+ local uses i
+
+ # 9999 does not have fate-*.tar.xz
+ [[ ${PV%9999} != "" ]] && use test && myconf+=( --samples="${WORKDIR}/fate" )
+
+ myconf+=(
+ $(use_enable gpl)
+ $(use_enable gpl version3)
+ --enable-avfilter
+ )
+
+ # enabled by default
+ uses="debug doc network zlib"
+ for i in ${uses}; do
+ use ${i} || myconf+=( --disable-${i} )
+ done
+ use bzip2 || myconf+=( --disable-bzlib )
+ use sdl || myconf+=( --disable-avplay )
+
+ if use ssl; then
+ use openssl && myconf+=( --enable-openssl --enable-nonfree ) \
+ || myconf+=( --enable-gnutls )
+ fi
+
+ use custom-cflags && myconf+=( --disable-optimizations )
+ use cpudetection && myconf+=( --enable-runtime-cpudetect )
+
+ use vdpau || myconf+=( --disable-vdpau )
+
+ use vaapi && myconf+=( --enable-vaapi )
+
+ # Encoders
+ if use encode; then
+ use faac && myconf+=( --enable-nonfree )
+ use mp3 && myconf+=( --enable-libmp3lame )
+ use amr && myconf+=( --enable-libvo-amrwbenc )
+ use aac && myconf+=( --enable-libvo-aacenc )
+ uses="faac theora twolame vorbis wavpack webp x264 x265 xvid"
+ for i in ${uses}; do
+ use ${i} && myconf+=( --enable-lib${i} )
+ done
+ else
+ myconf+=( --disable-encoders )
+ fi
+
+ # libavdevice options
+ use cdio && myconf+=( --enable-libcdio )
+ use ieee1394 && myconf+=( --enable-libdc1394 )
+ use pulseaudio && myconf+=( --enable-libpulse )
+
+ # Indevs
+ # v4l1 is gone since linux-headers-2.6.38
+ myconf+=( --disable-indev=v4l )
+ use v4l || myconf+=( --disable-indev=v4l2 )
+ for i in alsa oss jack; do
+ use ${i} || myconf+=( --disable-indev=${i} )
+ done
+ use X && myconf+=( --enable-x11grab )
+ # Outdevs
+ for i in alsa oss ; do
+ use ${i} || myconf+=( --disable-outdev=${i} )
+ done
+ # libavfilter options
+ use bs2b && myconf+=( --enable-libbs2b )
+ multilib_is_native_abi && use frei0r && myconf+=( --enable-frei0r )
+ use truetype && myconf+=( --enable-libfreetype )
+ use fontconfig && myconf+=( --enable-libfontconfig )
+
+ # Threads; we only support pthread for now
+ use threads && myconf+=( --enable-pthreads )
+
+ # Decoders
+ use amr && myconf+=( --enable-libopencore-amrwb --enable-libopencore-amrnb )
+ use fdk && myconf+=( --enable-nonfree --enable-libfdk-aac )
+ uses="gsm opus rtmp schroedinger speex vpx"
+ for i in ${uses}; do
+ use ${i} && myconf+=( --enable-lib${i} )
+ done
+ use jpeg2k && myconf+=( --enable-libopenjpeg )
+
+ # CPU features
+ for i in ${CPU_FEATURES}; do
+ use ${i%:*} || myconf+=( --disable-${i#*:} )
+ done
+
+ # pass the right -mfpu as extra
+ use neon && append-cflags -mfpu=neon
+
+ # disable mmx accelerated code if PIC is required
+ # as the provided asm decidedly is not PIC for x86.
+ if use pic && [[ ${ABI} == x86 ]]; then
+ myconf+=( --disable-mmx --disable-mmxext )
+ fi
+
+ # Option to force building pic
+ use pic && myconf+=( --enable-pic )
+
+ # cross compile support
+ if tc-is-cross-compiler ; then
+ myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- )
+ case ${CHOST} in
+ *freebsd*)
+ myconf+=( --target-os=freebsd )
+ ;;
+ mingw32*)
+ myconf+=( --target-os=mingw32 )
+ ;;
+ *linux*)
+ myconf+=( --target-os=linux )
+ ;;
+ esac
+ fi
+
+ # Misc stuff
+ use hardcoded-tables && myconf+=( --enable-hardcoded-tables )
+
+ # Specific workarounds for too-few-registers arch...
+ if [[ ${ABI} == x86 ]]; then
+ local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
+ filter-flags -fforce-addr -momit-leaf-frame-pointer
+ append-flags -fomit-frame-pointer
+ is-flag -O? || append-flags -O2
+ if use debug; then
+ # no need to warn about debug if not using debug flag
+ ewarn ""
+ ewarn "Debug information will be almost useless as the frame pointer is omitted."
+ ewarn "This makes debugging harder, so crashes that has no fixed behavior are"
+ ewarn "difficult to fix. Please have that in mind."
+ ewarn ""
+ fi
+ fi
+
+ set -- "${S}"/configure \
+ --prefix="${EPREFIX}"/usr \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --shlibdir="${EPREFIX}"/usr/$(get_libdir) \
+ --mandir="${EPREFIX}"/usr/share/man \
+ --enable-shared \
+ --cc="$(tc-getCC)" \
+ --ar="$(tc-getAR)" \
+ --optflags="${CFLAGS}" \
+ --extra-cflags="${CFLAGS}" \
+ $(use_enable static-libs static) \
+ "${myconf[@]}"
+ echo "${@}"
+ "${@}" || die
+}
+
+multilib_src_compile() {
+ emake
+
+ if use tools; then
+ tc-export CC
+
+ emake ${TOOLS[@]/#/tools/}
+ fi
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install install-man
+ use doc && dodoc doc/*.html
+
+ if use tools; then
+ dobin ${TOOLS[@]/#/tools/}
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc Changelog README.md INSTALL
+}
+
+multilib_src_test() {
+ local _libs="$(for i in lib*/;do echo -n "${BUILD_DIR}/${i%/}:";done)"
+ einfo "LD_LIBRARY_PATH is set to \"${_libs}\""
+ LD_LIBRARY_PATH="${_libs}" emake -k -j1 fate
+}
diff --git a/media-video/libav/libav-9.14.ebuild b/media-video/libav/libav-9.14.ebuild
new file mode 100644
index 000000000000..1f24f93f9589
--- /dev/null
+++ b/media-video/libav/libav-9.14.ebuild
@@ -0,0 +1,323 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+if [[ ${PV} == *9999 ]] ; then
+ SCM="git-2"
+ EGIT_REPO_URI="git://git.libav.org/libav.git"
+ [[ ${PV%9999} != "" ]] && EGIT_BRANCH="release/${PV%.9999}"
+fi
+
+inherit eutils flag-o-matic multilib multilib-minimal toolchain-funcs ${SCM}
+
+DESCRIPTION="Complete solution to record, convert and stream audio and video"
+HOMEPAGE="http://libav.org/"
+if [[ ${PV} == *9999 ]] ; then
+ SRC_URI=""
+elif [[ ${PV%_p*} != ${PV} ]] ; then # Gentoo snapshot
+ SRC_URI="http://dev.gentoo.org/~lu_zero/libav/${P}.tar.xz"
+else # Official release
+ SRC_URI="http://${PN}.org/releases/${P}.tar.xz"
+fi
+
+SRC_URI+=" test? ( http://dev.gentoo.org/~lu_zero/libav/fate-9.tar.xz )"
+
+LICENSE="LGPL-2.1 gpl? ( GPL-3 )"
+SLOT="0/9"
+
+# Don't move KEYWORDS on the previous line or ekeyword won't work # 399061
+[[ ${PV} == *9999 ]] || \
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+IUSE="aac alsa amr +bzip2 cdio cpudetection custom-cflags debug doc +encode
+ faac fdk frei0r +gpl gsm +hardcoded-tables ieee1394 jack jpeg2k mp3
+ +network openssl opus oss pic pulseaudio rtmp schroedinger sdl speex ssl
+ static-libs test theora threads tools truetype v4l vaapi vdpau vorbis vpx X
+ x264 xvid +zlib"
+
+# String for CPU features in the useflag[:configure_option] form
+# if :configure_option isn't set, it will use 'useflag' as configure option
+CPU_FEATURES="cpu_flags_x86_3dnow:amd3dnow cpu_flags_x86_3dnowext:amd3dnowext altivec cpu_flags_x86_avx:avx cpu_flags_x86_mmx:mmx cpu_flags_x86_mmxext:mmxext neon cpu_flags_x86_ssse3:ssse3 vis"
+for i in ${CPU_FEATURES} ; do
+ IUSE+=" ${i%:*}"
+done
+
+RDEPEND="
+ !media-video/ffmpeg:0
+ alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
+ amr? ( >=media-libs/opencore-amr-0.1.3-r1[${MULTILIB_USEDEP}] )
+ bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
+ cdio? (
+ || (
+ >=dev-libs/libcdio-paranoia-0.90_p1-r1[${MULTILIB_USEDEP}]
+ <dev-libs/libcdio-0.90[-minimal,${MULTILIB_USEDEP}]
+ )
+ )
+ encode? (
+ aac? ( >=media-libs/vo-aacenc-0.1.3[${MULTILIB_USEDEP}] )
+ amr? ( >=media-libs/vo-amrwbenc-0.1.2-r1[${MULTILIB_USEDEP}] )
+ faac? ( >=media-libs/faac-1.28-r3[${MULTILIB_USEDEP}] )
+ fdk? ( >=media-libs/fdk-aac-0.1.2[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/lame-3.99.5-r1[${MULTILIB_USEDEP}] )
+ theora? (
+ >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}]
+ >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
+ )
+ vorbis? (
+ >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}]
+ >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
+ )
+ x264? ( >=media-libs/x264-0.0.20130506:=[${MULTILIB_USEDEP}] )
+ xvid? ( >=media-libs/xvid-1.3.2-r1[${MULTILIB_USEDEP}] )
+ )
+ frei0r? ( media-plugins/frei0r-plugins )
+ gsm? ( >=media-sound/gsm-1.0.13-r1[${MULTILIB_USEDEP}] )
+ ieee1394? (
+ >=media-libs/libdc1394-2.2.1[${MULTILIB_USEDEP}]
+ >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}]
+ )
+ jack? ( >=media-sound/jack-audio-connection-kit-0.121.3-r1[${MULTILIB_USEDEP}] )
+ jpeg2k? ( >=media-libs/openjpeg-1.5.0:0[${MULTILIB_USEDEP}] )
+ opus? ( >=media-libs/opus-1.0.2-r2[${MULTILIB_USEDEP}] )
+ pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] )
+ rtmp? ( >=media-video/rtmpdump-2.4_p20131018[${MULTILIB_USEDEP}] )
+ ssl? (
+ openssl? ( >=dev-libs/openssl-1.0.1h-r2[${MULTILIB_USEDEP}] )
+ !openssl? ( >=net-libs/gnutls-2.12.23-r6[${MULTILIB_USEDEP}] )
+ )
+ sdl? ( >=media-libs/libsdl-1.2.15-r4[sound,video,${MULTILIB_USEDEP}] )
+ schroedinger? ( >=media-libs/schroedinger-1.0.11-r1[${MULTILIB_USEDEP}] )
+ speex? ( >=media-libs/speex-1.2_rc1-r1[${MULTILIB_USEDEP}] )
+ truetype? ( >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}] )
+ vaapi? ( >=x11-libs/libva-1.2.1-r1[${MULTILIB_USEDEP}] )
+ vdpau? ( >=x11-libs/libvdpau-0.7[${MULTILIB_USEDEP}] )
+ vpx? ( >=media-libs/libvpx-1.2.0_pre20130625[${MULTILIB_USEDEP}] )
+ X? (
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXfixes-5.0.1[${MULTILIB_USEDEP}]
+ )
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
+"
+
+DEPEND="${RDEPEND}
+ >=sys-devel/make-3.81
+ doc? ( app-text/texi2html )
+ ieee1394? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ cpu_flags_x86_mmx? ( dev-lang/yasm )
+ rtmp? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ schroedinger? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ ssl? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ test? ( sys-devel/bc )
+ truetype? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ v4l? ( sys-kernel/linux-headers )
+"
+
+RDEPEND="${RDEPEND}
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+
+# faac can't be binary distributed
+# openssl support marked as nonfree
+# faac and aac are concurent implementations
+# amr and aac require at least lgpl3
+# x264 requires gpl2
+REQUIRED_USE="rtmp? ( network )
+ amr? ( gpl ) aac? ( gpl ) x264? ( gpl ) X? ( gpl ) cdio? ( gpl )
+ test? ( encode zlib )
+"
+RESTRICT="faac? ( bindist ) fdk? ( bindist ) openssl? ( bindist )"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/libavutil/avconfig.h
+)
+
+src_prepare() {
+ # if we have snapshot then we need to hardcode the version
+ if [[ ${PV%_p*} != ${PV} ]]; then
+ sed -i -e "s/UNKNOWN/DATE-${PV#*_pre}/" "${S}/version.sh" || die
+ fi
+
+ TOOLS=( aviocat graph2dot ismindex pktdumper qt-faststart trasher )
+ use zlib && TOOLS+=( cws2fws )
+
+ MAKEOPTS+=" V=1"
+}
+
+multilib_src_configure() {
+ local myconf=( ${EXTRA_LIBAV_CONF} )
+ local uses i
+
+ myconf+=(
+ $(use_enable gpl)
+ $(use_enable gpl version3)
+ --enable-avfilter
+ )
+
+ # enabled by default
+ uses="debug doc network zlib"
+ for i in ${uses}; do
+ use ${i} || myconf+=( --disable-${i} )
+ done
+ use bzip2 || myconf+=( --disable-bzlib )
+ use sdl || myconf+=( --disable-avplay )
+
+ if use ssl; then
+ use openssl && myconf+=( --enable-openssl --enable-nonfree ) \
+ || myconf+=( --enable-gnutls )
+ fi
+
+ use custom-cflags && myconf+=( --disable-optimizations )
+ use cpudetection && myconf+=( --enable-runtime-cpudetect )
+
+ use vdpau || myconf+=( --disable-vdpau )
+
+ use vaapi && myconf+=( --enable-vaapi )
+
+ # Encoders
+ if use encode; then
+ use faac && myconf+=( --enable-nonfree )
+ use fdk && myconf+=( --enable-nonfree --enable-libfdk-aac )
+ use mp3 && myconf+=( --enable-libmp3lame )
+ use amr && myconf+=( --enable-libvo-amrwbenc )
+ use aac && myconf+=( --enable-libvo-aacenc )
+ uses="faac theora vorbis x264 xvid"
+ for i in ${uses}; do
+ use ${i} && myconf+=( --enable-lib${i} )
+ done
+ else
+ myconf+=( --disable-encoders )
+ fi
+
+ # libavdevice options
+ use cdio && myconf+=( --enable-libcdio )
+ use ieee1394 && myconf+=( --enable-libdc1394 )
+ use pulseaudio && myconf+=( --enable-libpulse )
+
+ # Indevs
+ # v4l1 is gone since linux-headers-2.6.38
+ myconf+=( --disable-indev=v4l )
+ use v4l || myconf+=( --disable-indev=v4l2 )
+ for i in alsa oss jack; do
+ use ${i} || myconf+=( --disable-indev=${i} )
+ done
+ use X && myconf+=( --enable-x11grab )
+ # Outdevs
+ for i in alsa oss ; do
+ use ${i} || myconf+=( --disable-outdev=${i} )
+ done
+ # libavfilter options
+ multilib_is_native_abi && use frei0r && myconf+=( --enable-frei0r )
+ use truetype && myconf+=( --enable-libfreetype )
+
+ # Threads; we only support pthread for now
+ use threads && myconf+=( --enable-pthreads )
+
+ # Decoders
+ use amr && myconf+=( --enable-libopencore-amrwb --enable-libopencore-amrnb )
+ uses="gsm opus rtmp schroedinger speex vpx"
+ for i in ${uses}; do
+ use ${i} && myconf+=( --enable-lib${i} )
+ done
+ use jpeg2k && myconf+=( --enable-libopenjpeg )
+
+ # CPU features
+ for i in ${CPU_FEATURES}; do
+ use ${i%:*} || myconf+=( --disable-${i#*:} )
+ done
+
+ # pass the right -mfpu as extra
+ use neon && myconf+=( --extra-cflags=-mfpu=neon )
+
+ # disable mmx accelerated code if PIC is required
+ # as the provided asm decidedly is not PIC for x86.
+ if use pic && [[ ${ABI} == x86 ]] ; then
+ myconf+=( --disable-mmx --disable-mmxext )
+ fi
+
+ # Option to force building pic
+ use pic && myconf+=( --enable-pic )
+
+ # cross compile support
+ if tc-is-cross-compiler ; then
+ myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- )
+ case ${CHOST} in
+ *freebsd*)
+ myconf+=( --target-os=freebsd )
+ ;;
+ mingw32*)
+ myconf+=( --target-os=mingw32 )
+ ;;
+ *linux*)
+ myconf+=( --target-os=linux )
+ ;;
+ esac
+ fi
+
+ # Misc stuff
+ use hardcoded-tables && myconf+=( --enable-hardcoded-tables )
+
+ # Specific workarounds for too-few-registers arch...
+ if [[ ${ABI} == x86 ]]; then
+ local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
+ filter-flags -fforce-addr -momit-leaf-frame-pointer
+ append-flags -fomit-frame-pointer
+ is-flag -O? || append-flags -O2
+ if use debug; then
+ # no need to warn about debug if not using debug flag
+ ewarn ""
+ ewarn "Debug information will be almost useless as the frame pointer is omitted."
+ ewarn "This makes debugging harder, so crashes that has no fixed behavior are"
+ ewarn "difficult to fix. Please have that in mind."
+ ewarn ""
+ fi
+ fi
+
+ set -- "${S}"/configure \
+ --prefix="${EPREFIX}"/usr \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --shlibdir="${EPREFIX}"/usr/$(get_libdir) \
+ --mandir="${EPREFIX}"/usr/share/man \
+ --enable-shared \
+ --cc="$(tc-getCC)" \
+ --ar="$(tc-getAR)" \
+ --optflags="${CFLAGS}" \
+ --extra-cflags="${CFLAGS}" \
+ $(use_enable static-libs static) \
+ "${myconf[@]}"
+ echo "${@}"
+ "${@}" || die
+}
+
+multilib_src_compile() {
+ emake
+
+ if multilib_is_native_abi && use tools; then
+ tc-export CC
+
+ emake ${TOOLS[@]/#/tools/}
+ fi
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install install-man
+
+ use doc && dodoc doc/*.html
+
+ if multilib_is_native_abi && use tools; then
+ dobin ${TOOLS[@]/#/tools/}
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc Changelog README INSTALL
+ dodoc doc/*.txt
+}
+
+multilib_src_test() {
+ echo ${WORKDIR}/fate
+ LD_LIBRARY_PATH="${BUILD_DIR}/libswscale:${BUILD_DIR}/libavcodec:${BUILD_DIR}/libavdevice:${BUILD_DIR}/libavfilter:${BUILD_DIR}/libavformat:${BUILD_DIR}/libavresample:${BUILD_DIR}/libavutil" \
+ emake -j1 fate SAMPLES="${WORKDIR}/fate"
+}
diff --git a/media-video/libav/libav-9.17.ebuild b/media-video/libav/libav-9.17.ebuild
new file mode 100644
index 000000000000..1f24f93f9589
--- /dev/null
+++ b/media-video/libav/libav-9.17.ebuild
@@ -0,0 +1,323 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+if [[ ${PV} == *9999 ]] ; then
+ SCM="git-2"
+ EGIT_REPO_URI="git://git.libav.org/libav.git"
+ [[ ${PV%9999} != "" ]] && EGIT_BRANCH="release/${PV%.9999}"
+fi
+
+inherit eutils flag-o-matic multilib multilib-minimal toolchain-funcs ${SCM}
+
+DESCRIPTION="Complete solution to record, convert and stream audio and video"
+HOMEPAGE="http://libav.org/"
+if [[ ${PV} == *9999 ]] ; then
+ SRC_URI=""
+elif [[ ${PV%_p*} != ${PV} ]] ; then # Gentoo snapshot
+ SRC_URI="http://dev.gentoo.org/~lu_zero/libav/${P}.tar.xz"
+else # Official release
+ SRC_URI="http://${PN}.org/releases/${P}.tar.xz"
+fi
+
+SRC_URI+=" test? ( http://dev.gentoo.org/~lu_zero/libav/fate-9.tar.xz )"
+
+LICENSE="LGPL-2.1 gpl? ( GPL-3 )"
+SLOT="0/9"
+
+# Don't move KEYWORDS on the previous line or ekeyword won't work # 399061
+[[ ${PV} == *9999 ]] || \
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+IUSE="aac alsa amr +bzip2 cdio cpudetection custom-cflags debug doc +encode
+ faac fdk frei0r +gpl gsm +hardcoded-tables ieee1394 jack jpeg2k mp3
+ +network openssl opus oss pic pulseaudio rtmp schroedinger sdl speex ssl
+ static-libs test theora threads tools truetype v4l vaapi vdpau vorbis vpx X
+ x264 xvid +zlib"
+
+# String for CPU features in the useflag[:configure_option] form
+# if :configure_option isn't set, it will use 'useflag' as configure option
+CPU_FEATURES="cpu_flags_x86_3dnow:amd3dnow cpu_flags_x86_3dnowext:amd3dnowext altivec cpu_flags_x86_avx:avx cpu_flags_x86_mmx:mmx cpu_flags_x86_mmxext:mmxext neon cpu_flags_x86_ssse3:ssse3 vis"
+for i in ${CPU_FEATURES} ; do
+ IUSE+=" ${i%:*}"
+done
+
+RDEPEND="
+ !media-video/ffmpeg:0
+ alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
+ amr? ( >=media-libs/opencore-amr-0.1.3-r1[${MULTILIB_USEDEP}] )
+ bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
+ cdio? (
+ || (
+ >=dev-libs/libcdio-paranoia-0.90_p1-r1[${MULTILIB_USEDEP}]
+ <dev-libs/libcdio-0.90[-minimal,${MULTILIB_USEDEP}]
+ )
+ )
+ encode? (
+ aac? ( >=media-libs/vo-aacenc-0.1.3[${MULTILIB_USEDEP}] )
+ amr? ( >=media-libs/vo-amrwbenc-0.1.2-r1[${MULTILIB_USEDEP}] )
+ faac? ( >=media-libs/faac-1.28-r3[${MULTILIB_USEDEP}] )
+ fdk? ( >=media-libs/fdk-aac-0.1.2[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/lame-3.99.5-r1[${MULTILIB_USEDEP}] )
+ theora? (
+ >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}]
+ >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
+ )
+ vorbis? (
+ >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}]
+ >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
+ )
+ x264? ( >=media-libs/x264-0.0.20130506:=[${MULTILIB_USEDEP}] )
+ xvid? ( >=media-libs/xvid-1.3.2-r1[${MULTILIB_USEDEP}] )
+ )
+ frei0r? ( media-plugins/frei0r-plugins )
+ gsm? ( >=media-sound/gsm-1.0.13-r1[${MULTILIB_USEDEP}] )
+ ieee1394? (
+ >=media-libs/libdc1394-2.2.1[${MULTILIB_USEDEP}]
+ >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}]
+ )
+ jack? ( >=media-sound/jack-audio-connection-kit-0.121.3-r1[${MULTILIB_USEDEP}] )
+ jpeg2k? ( >=media-libs/openjpeg-1.5.0:0[${MULTILIB_USEDEP}] )
+ opus? ( >=media-libs/opus-1.0.2-r2[${MULTILIB_USEDEP}] )
+ pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] )
+ rtmp? ( >=media-video/rtmpdump-2.4_p20131018[${MULTILIB_USEDEP}] )
+ ssl? (
+ openssl? ( >=dev-libs/openssl-1.0.1h-r2[${MULTILIB_USEDEP}] )
+ !openssl? ( >=net-libs/gnutls-2.12.23-r6[${MULTILIB_USEDEP}] )
+ )
+ sdl? ( >=media-libs/libsdl-1.2.15-r4[sound,video,${MULTILIB_USEDEP}] )
+ schroedinger? ( >=media-libs/schroedinger-1.0.11-r1[${MULTILIB_USEDEP}] )
+ speex? ( >=media-libs/speex-1.2_rc1-r1[${MULTILIB_USEDEP}] )
+ truetype? ( >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}] )
+ vaapi? ( >=x11-libs/libva-1.2.1-r1[${MULTILIB_USEDEP}] )
+ vdpau? ( >=x11-libs/libvdpau-0.7[${MULTILIB_USEDEP}] )
+ vpx? ( >=media-libs/libvpx-1.2.0_pre20130625[${MULTILIB_USEDEP}] )
+ X? (
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXfixes-5.0.1[${MULTILIB_USEDEP}]
+ )
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
+"
+
+DEPEND="${RDEPEND}
+ >=sys-devel/make-3.81
+ doc? ( app-text/texi2html )
+ ieee1394? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ cpu_flags_x86_mmx? ( dev-lang/yasm )
+ rtmp? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ schroedinger? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ ssl? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ test? ( sys-devel/bc )
+ truetype? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ v4l? ( sys-kernel/linux-headers )
+"
+
+RDEPEND="${RDEPEND}
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+
+# faac can't be binary distributed
+# openssl support marked as nonfree
+# faac and aac are concurent implementations
+# amr and aac require at least lgpl3
+# x264 requires gpl2
+REQUIRED_USE="rtmp? ( network )
+ amr? ( gpl ) aac? ( gpl ) x264? ( gpl ) X? ( gpl ) cdio? ( gpl )
+ test? ( encode zlib )
+"
+RESTRICT="faac? ( bindist ) fdk? ( bindist ) openssl? ( bindist )"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/libavutil/avconfig.h
+)
+
+src_prepare() {
+ # if we have snapshot then we need to hardcode the version
+ if [[ ${PV%_p*} != ${PV} ]]; then
+ sed -i -e "s/UNKNOWN/DATE-${PV#*_pre}/" "${S}/version.sh" || die
+ fi
+
+ TOOLS=( aviocat graph2dot ismindex pktdumper qt-faststart trasher )
+ use zlib && TOOLS+=( cws2fws )
+
+ MAKEOPTS+=" V=1"
+}
+
+multilib_src_configure() {
+ local myconf=( ${EXTRA_LIBAV_CONF} )
+ local uses i
+
+ myconf+=(
+ $(use_enable gpl)
+ $(use_enable gpl version3)
+ --enable-avfilter
+ )
+
+ # enabled by default
+ uses="debug doc network zlib"
+ for i in ${uses}; do
+ use ${i} || myconf+=( --disable-${i} )
+ done
+ use bzip2 || myconf+=( --disable-bzlib )
+ use sdl || myconf+=( --disable-avplay )
+
+ if use ssl; then
+ use openssl && myconf+=( --enable-openssl --enable-nonfree ) \
+ || myconf+=( --enable-gnutls )
+ fi
+
+ use custom-cflags && myconf+=( --disable-optimizations )
+ use cpudetection && myconf+=( --enable-runtime-cpudetect )
+
+ use vdpau || myconf+=( --disable-vdpau )
+
+ use vaapi && myconf+=( --enable-vaapi )
+
+ # Encoders
+ if use encode; then
+ use faac && myconf+=( --enable-nonfree )
+ use fdk && myconf+=( --enable-nonfree --enable-libfdk-aac )
+ use mp3 && myconf+=( --enable-libmp3lame )
+ use amr && myconf+=( --enable-libvo-amrwbenc )
+ use aac && myconf+=( --enable-libvo-aacenc )
+ uses="faac theora vorbis x264 xvid"
+ for i in ${uses}; do
+ use ${i} && myconf+=( --enable-lib${i} )
+ done
+ else
+ myconf+=( --disable-encoders )
+ fi
+
+ # libavdevice options
+ use cdio && myconf+=( --enable-libcdio )
+ use ieee1394 && myconf+=( --enable-libdc1394 )
+ use pulseaudio && myconf+=( --enable-libpulse )
+
+ # Indevs
+ # v4l1 is gone since linux-headers-2.6.38
+ myconf+=( --disable-indev=v4l )
+ use v4l || myconf+=( --disable-indev=v4l2 )
+ for i in alsa oss jack; do
+ use ${i} || myconf+=( --disable-indev=${i} )
+ done
+ use X && myconf+=( --enable-x11grab )
+ # Outdevs
+ for i in alsa oss ; do
+ use ${i} || myconf+=( --disable-outdev=${i} )
+ done
+ # libavfilter options
+ multilib_is_native_abi && use frei0r && myconf+=( --enable-frei0r )
+ use truetype && myconf+=( --enable-libfreetype )
+
+ # Threads; we only support pthread for now
+ use threads && myconf+=( --enable-pthreads )
+
+ # Decoders
+ use amr && myconf+=( --enable-libopencore-amrwb --enable-libopencore-amrnb )
+ uses="gsm opus rtmp schroedinger speex vpx"
+ for i in ${uses}; do
+ use ${i} && myconf+=( --enable-lib${i} )
+ done
+ use jpeg2k && myconf+=( --enable-libopenjpeg )
+
+ # CPU features
+ for i in ${CPU_FEATURES}; do
+ use ${i%:*} || myconf+=( --disable-${i#*:} )
+ done
+
+ # pass the right -mfpu as extra
+ use neon && myconf+=( --extra-cflags=-mfpu=neon )
+
+ # disable mmx accelerated code if PIC is required
+ # as the provided asm decidedly is not PIC for x86.
+ if use pic && [[ ${ABI} == x86 ]] ; then
+ myconf+=( --disable-mmx --disable-mmxext )
+ fi
+
+ # Option to force building pic
+ use pic && myconf+=( --enable-pic )
+
+ # cross compile support
+ if tc-is-cross-compiler ; then
+ myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- )
+ case ${CHOST} in
+ *freebsd*)
+ myconf+=( --target-os=freebsd )
+ ;;
+ mingw32*)
+ myconf+=( --target-os=mingw32 )
+ ;;
+ *linux*)
+ myconf+=( --target-os=linux )
+ ;;
+ esac
+ fi
+
+ # Misc stuff
+ use hardcoded-tables && myconf+=( --enable-hardcoded-tables )
+
+ # Specific workarounds for too-few-registers arch...
+ if [[ ${ABI} == x86 ]]; then
+ local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
+ filter-flags -fforce-addr -momit-leaf-frame-pointer
+ append-flags -fomit-frame-pointer
+ is-flag -O? || append-flags -O2
+ if use debug; then
+ # no need to warn about debug if not using debug flag
+ ewarn ""
+ ewarn "Debug information will be almost useless as the frame pointer is omitted."
+ ewarn "This makes debugging harder, so crashes that has no fixed behavior are"
+ ewarn "difficult to fix. Please have that in mind."
+ ewarn ""
+ fi
+ fi
+
+ set -- "${S}"/configure \
+ --prefix="${EPREFIX}"/usr \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --shlibdir="${EPREFIX}"/usr/$(get_libdir) \
+ --mandir="${EPREFIX}"/usr/share/man \
+ --enable-shared \
+ --cc="$(tc-getCC)" \
+ --ar="$(tc-getAR)" \
+ --optflags="${CFLAGS}" \
+ --extra-cflags="${CFLAGS}" \
+ $(use_enable static-libs static) \
+ "${myconf[@]}"
+ echo "${@}"
+ "${@}" || die
+}
+
+multilib_src_compile() {
+ emake
+
+ if multilib_is_native_abi && use tools; then
+ tc-export CC
+
+ emake ${TOOLS[@]/#/tools/}
+ fi
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install install-man
+
+ use doc && dodoc doc/*.html
+
+ if multilib_is_native_abi && use tools; then
+ dobin ${TOOLS[@]/#/tools/}
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc Changelog README INSTALL
+ dodoc doc/*.txt
+}
+
+multilib_src_test() {
+ echo ${WORKDIR}/fate
+ LD_LIBRARY_PATH="${BUILD_DIR}/libswscale:${BUILD_DIR}/libavcodec:${BUILD_DIR}/libavdevice:${BUILD_DIR}/libavfilter:${BUILD_DIR}/libavformat:${BUILD_DIR}/libavresample:${BUILD_DIR}/libavutil" \
+ emake -j1 fate SAMPLES="${WORKDIR}/fate"
+}
diff --git a/media-video/libav/libav-9999.ebuild b/media-video/libav/libav-9999.ebuild
new file mode 100644
index 000000000000..87f430eee26d
--- /dev/null
+++ b/media-video/libav/libav-9999.ebuild
@@ -0,0 +1,341 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic multilib multilib-minimal toolchain-funcs
+
+if [[ ${PV} == *9999 ]] ; then
+ : ${EGIT_REPO_URI:="git://git.libav.org/libav.git"}
+ if [[ ${PV%9999} != "" ]] ; then
+ : ${EGIT_BRANCH:="release/${PV%.9999}"}
+ fi
+ inherit git-r3
+fi
+
+DESCRIPTION="Complete solution to record, convert and stream audio and video"
+HOMEPAGE="https://libav.org/"
+if [[ ${PV} == *9999 ]] ; then
+ SRC_URI=""
+elif [[ ${PV%_p*} != ${PV} ]] ; then # Gentoo snapshot
+ SRC_URI="http://dev.gentoo.org/~lu_zero/libav/${P}.tar.xz"
+else # Official release
+ SRC_URI="https://libav.org/releases/${P}.tar.xz"
+fi
+# 9999 does not have fate-*.tar.xz
+[[ ${PV%9999} != "" ]] && SRC_URI+=" test? ( http://dev.gentoo.org/~lu_zero/libav/fate-${PV%%.*}.tar.xz )"
+
+LICENSE="LGPL-2.1 gpl? ( GPL-3 )"
+SLOT="0/12"
+[[ ${PV} == *9999 ]] || KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64
+~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos
+~x64-solaris ~x86-solaris"
+IUSE="aac alsa amr bs2b +bzip2 cdio cpudetection custom-cflags debug doc +encode faac fdk
+ frei0r fontconfig +gpl gsm +hardcoded-tables ieee1394 jack jpeg2k mp3
+ +network openssl opus oss pic pulseaudio rtmp schroedinger sdl speex ssl
+ static-libs test theora threads tools truetype twolame v4l vaapi vdpau vorbis vpx X
+ wavpack webp x264 x265 xvid +zlib"
+
+# String for CPU features in the useflag[:configure_option] form
+# if :configure_option isn't set, it will use 'useflag' as configure option
+CPU_FEATURES="altivec armv5te armv6 armv6t2 armvfp:vfp neon"
+X86_CPU_FEATURES="3dnow:amd3dnow 3dnowext:amd3dnowext mmx mmxext sse sse2 sse3 ssse3 sse4_1:sse4 sse4_2:sse42 avx xop fma3 fma4 avx2"
+for i in ${X86_CPU_FEATURES} ; do
+ CPU_FEATURES+=" cpu_flags_x86_${i%:*}:${i#*:}"
+done
+for i in ${CPU_FEATURES} ; do
+ IUSE+=" ${i%:*}"
+done
+
+RDEPEND="
+ !media-video/ffmpeg:0
+ alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
+ amr? ( >=media-libs/opencore-amr-0.1.3-r1[${MULTILIB_USEDEP}] )
+ bs2b? ( >=media-libs/libbs2b-3.1.0-r1[${MULTILIB_USEDEP}] )
+ bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
+ cdio? ( >=dev-libs/libcdio-paranoia-0.90_p1-r1[${MULTILIB_USEDEP}] )
+ encode? (
+ aac? ( >=media-libs/vo-aacenc-0.1.3[${MULTILIB_USEDEP}] )
+ amr? ( >=media-libs/vo-amrwbenc-0.1.2-r1[${MULTILIB_USEDEP}] )
+ faac? ( >=media-libs/faac-1.28-r3[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/lame-3.99.5-r1[${MULTILIB_USEDEP}] )
+ theora? (
+ >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}]
+ >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
+ )
+ twolame? ( >=media-sound/twolame-0.3.13-r1[${MULTILIB_USEDEP}] )
+ vorbis? (
+ >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}]
+ >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
+ )
+ webp? ( >=media-libs/libwebp-0.3.0[${MULTILIB_USEDEP}] )
+ wavpack? ( >=media-sound/wavpack-4.60.1-r1[${MULTILIB_USEDEP}] )
+ x264? ( >=media-libs/x264-0.0.20130506:=[${MULTILIB_USEDEP}] )
+ x265? ( >=media-libs/x265-1.2:=[${MULTILIB_USEDEP}] )
+ xvid? ( >=media-libs/xvid-1.3.2-r1[${MULTILIB_USEDEP}] )
+ )
+ fdk? ( >=media-libs/fdk-aac-0.1.2[${MULTILIB_USEDEP}] )
+ frei0r? ( media-plugins/frei0r-plugins )
+ gsm? ( >=media-sound/gsm-1.0.13-r1[${MULTILIB_USEDEP}] )
+ ieee1394? (
+ >=media-libs/libdc1394-2.2.1[${MULTILIB_USEDEP}]
+ >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}]
+ )
+ jack? ( >=media-sound/jack-audio-connection-kit-0.121.3-r1[${MULTILIB_USEDEP}] )
+ jpeg2k? ( >=media-libs/openjpeg-1.5.0:0[${MULTILIB_USEDEP}] )
+ opus? ( >=media-libs/opus-1.0.2-r2[${MULTILIB_USEDEP}] )
+ pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] )
+ rtmp? ( >=media-video/rtmpdump-2.4_p20131018[${MULTILIB_USEDEP}] )
+ ssl? (
+ openssl? ( >=dev-libs/openssl-1.0.1h-r2[${MULTILIB_USEDEP}] )
+ !openssl? ( >=net-libs/gnutls-2.12.23-r6[${MULTILIB_USEDEP}] )
+ )
+ sdl? ( >=media-libs/libsdl-1.2.15-r4[sound,video,${MULTILIB_USEDEP}] )
+ schroedinger? ( >=media-libs/schroedinger-1.0.11-r1[${MULTILIB_USEDEP}] )
+ speex? ( >=media-libs/speex-1.2_rc1-r1[${MULTILIB_USEDEP}] )
+ truetype? ( >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}] )
+ fontconfig? ( >=media-libs/fontconfig-2.10[${MULTILIB_USEDEP}] )
+ vaapi? ( >=x11-libs/libva-1.2.1-r1[${MULTILIB_USEDEP}] )
+ vdpau? ( >=x11-libs/libvdpau-0.7[${MULTILIB_USEDEP}] )
+ vpx? ( >=media-libs/libvpx-1.2.0_pre20130625[${MULTILIB_USEDEP}] )
+ X? (
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libxcb-1.9.1[${MULTILIB_USEDEP}]
+ )
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
+"
+
+DEPEND="${RDEPEND}
+ >=sys-devel/make-3.81
+ doc? ( app-text/texi2html )
+ ieee1394? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ cpu_flags_x86_mmx? ( dev-lang/yasm )
+ rtmp? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ schroedinger? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ ssl? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ test? ( sys-devel/bc )
+ truetype? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ fontconfig? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ v4l? ( sys-kernel/linux-headers )
+"
+
+RDEPEND="${RDEPEND}
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+
+# faac can't be binary distributed
+# openssl support marked as nonfree
+# faac and aac are concurent implementations
+# amr and aac require at least lgpl3
+# x264 requires gpl2
+REQUIRED_USE="
+ rtmp? ( network )
+ amr? ( gpl ) aac? ( gpl ) x264? ( gpl ) X? ( gpl ) cdio? ( gpl ) x265? ( gpl )
+ test? ( encode zlib )
+ fontconfig? ( truetype )
+"
+RESTRICT="faac? ( bindist ) fdk? ( bindist ) openssl? ( bindist )"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/libavutil/avconfig.h
+)
+
+src_unpack() {
+ [[ ${PV} == *9999 ]] && git-r3_src_unpack
+ # 9999 does not have fate-*.tar.xz
+ [[ ${PV%9999} != "" ]] && default_src_unpack
+}
+
+src_prepare() {
+ epatch_user
+
+ # if we have snapshot then we need to hardcode the version
+ if [[ ${PV%_p*} != ${PV} ]]; then
+ sed -i -e "s/UNKNOWN/DATE-${PV#*_pre}/" "${S}/version.sh" || die
+ fi
+
+ TOOLS=( aviocat graph2dot ismindex pktdumper qt-faststart trasher )
+ use zlib && TOOLS+=( cws2fws )
+
+ MAKEOPTS+=" V=1"
+}
+
+multilib_src_configure() {
+ local myconf=( ${EXTRA_LIBAV_CONF} )
+ local uses i
+
+ # 9999 does not have fate-*.tar.xz
+ [[ ${PV%9999} != "" ]] && use test && myconf+=( --samples="${WORKDIR}/fate" )
+
+ myconf+=(
+ $(use_enable gpl)
+ $(use_enable gpl version3)
+ --enable-avfilter
+ )
+
+ # enabled by default
+ uses="debug doc network zlib"
+ for i in ${uses}; do
+ use ${i} || myconf+=( --disable-${i} )
+ done
+ use bzip2 || myconf+=( --disable-bzlib )
+ use sdl || myconf+=( --disable-avplay )
+
+ if use ssl; then
+ use openssl && myconf+=( --enable-openssl --enable-nonfree ) \
+ || myconf+=( --enable-gnutls )
+ fi
+
+ use custom-cflags && myconf+=( --disable-optimizations )
+ use cpudetection && myconf+=( --enable-runtime-cpudetect )
+
+ use vdpau || myconf+=( --disable-vdpau )
+
+ use vaapi && myconf+=( --enable-vaapi )
+
+ # Encoders
+ if use encode; then
+ use faac && myconf+=( --enable-nonfree )
+ use mp3 && myconf+=( --enable-libmp3lame )
+ use amr && myconf+=( --enable-libvo-amrwbenc )
+ use aac && myconf+=( --enable-libvo-aacenc )
+ uses="faac theora twolame vorbis wavpack webp x264 x265 xvid"
+ for i in ${uses}; do
+ use ${i} && myconf+=( --enable-lib${i} )
+ done
+ else
+ myconf+=( --disable-encoders )
+ fi
+
+ # libavdevice options
+ use cdio && myconf+=( --enable-libcdio )
+ use ieee1394 && myconf+=( --enable-libdc1394 )
+ use pulseaudio && myconf+=( --enable-libpulse )
+
+ # Indevs
+ # v4l1 is gone since linux-headers-2.6.38
+ myconf+=( --disable-indev=v4l )
+ use v4l || myconf+=( --disable-indev=v4l2 )
+ for i in alsa oss jack; do
+ use ${i} || myconf+=( --disable-indev=${i} )
+ done
+ use X && myconf+=( --enable-libxcb )
+ # Outdevs
+ for i in alsa oss ; do
+ use ${i} || myconf+=( --disable-outdev=${i} )
+ done
+ # libavfilter options
+ use bs2b && myconf+=( --enable-libbs2b )
+ multilib_is_native_abi && use frei0r && myconf+=( --enable-frei0r )
+ use truetype && myconf+=( --enable-libfreetype )
+ use fontconfig && myconf+=( --enable-libfontconfig )
+
+ # Threads; we only support pthread for now
+ use threads && myconf+=( --enable-pthreads )
+
+ # Decoders
+ use amr && myconf+=( --enable-libopencore-amrwb --enable-libopencore-amrnb )
+ use fdk && myconf+=( --enable-nonfree --enable-libfdk-aac )
+ uses="gsm opus rtmp schroedinger speex vpx"
+ for i in ${uses}; do
+ use ${i} && myconf+=( --enable-lib${i} )
+ done
+ use jpeg2k && myconf+=( --enable-libopenjpeg )
+
+ # CPU features
+ for i in ${CPU_FEATURES}; do
+ use ${i%:*} || myconf+=( --disable-${i#*:} )
+ done
+
+ # pass the right -mfpu as extra
+ use neon && append-cflags -mfpu=neon
+
+ # disable mmx accelerated code if PIC is required
+ # as the provided asm decidedly is not PIC for x86.
+ if use pic && [[ ${ABI} == x86 ]]; then
+ myconf+=( --disable-mmx --disable-mmxext )
+ fi
+
+ # Option to force building pic
+ use pic && myconf+=( --enable-pic )
+
+ # cross compile support
+ if tc-is-cross-compiler ; then
+ myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- )
+ case ${CHOST} in
+ *freebsd*)
+ myconf+=( --target-os=freebsd )
+ ;;
+ mingw32*)
+ myconf+=( --target-os=mingw32 )
+ ;;
+ *linux*)
+ myconf+=( --target-os=linux )
+ ;;
+ esac
+ fi
+
+ # Misc stuff
+ use hardcoded-tables && myconf+=( --enable-hardcoded-tables )
+
+ # Specific workarounds for too-few-registers arch...
+ if [[ ${ABI} == x86 ]]; then
+ local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
+ filter-flags -fforce-addr -momit-leaf-frame-pointer
+ append-flags -fomit-frame-pointer
+ is-flag -O? || append-flags -O2
+ if use debug; then
+ # no need to warn about debug if not using debug flag
+ ewarn ""
+ ewarn "Debug information will be almost useless as the frame pointer is omitted."
+ ewarn "This makes debugging harder, so crashes that has no fixed behavior are"
+ ewarn "difficult to fix. Please have that in mind."
+ ewarn ""
+ fi
+ fi
+
+ set -- "${S}"/configure \
+ --prefix="${EPREFIX}"/usr \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --shlibdir="${EPREFIX}"/usr/$(get_libdir) \
+ --mandir="${EPREFIX}"/usr/share/man \
+ --enable-shared \
+ --cc="$(tc-getCC)" \
+ --ar="$(tc-getAR)" \
+ --optflags="${CFLAGS}" \
+ --extra-cflags="${CFLAGS}" \
+ $(use_enable static-libs static) \
+ "${myconf[@]}"
+ echo "${@}"
+ "${@}" || die
+}
+
+multilib_src_compile() {
+ emake
+
+ if use tools; then
+ tc-export CC
+
+ emake ${TOOLS[@]/#/tools/}
+ fi
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install install-man
+ use doc && dodoc doc/*.html
+
+ if use tools; then
+ dobin ${TOOLS[@]/#/tools/}
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc Changelog README.md INSTALL
+}
+
+multilib_src_test() {
+ local _libs="$(for i in lib*/;do echo -n "${BUILD_DIR}/${i%/}:";done)"
+ einfo "LD_LIBRARY_PATH is set to \"${_libs}\""
+ LD_LIBRARY_PATH="${_libs}" emake -k -j1 fate
+}
diff --git a/media-video/libav/metadata.xml b/media-video/libav/metadata.xml
new file mode 100644
index 000000000000..a9f4504e0231
--- /dev/null
+++ b/media-video/libav/metadata.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>video</herd>
+<maintainer>
+ <email>media-video@gentoo.org</email>
+</maintainer>
+<use>
+ <flag name="aac">Use external vo-aacenc library for AAC encoding</flag>
+ <flag name="amr">Enable Adaptive Multi-Rate Audio support</flag>
+ <flag name="armv5te">Enable optimizations for armv5te processors</flag>
+ <flag name="armv6">Enable optimizations for armv6 processors</flag>
+ <flag name="armv6t2">Enable optimizations for armv6t2 processors</flag>
+ <flag name="armvfp">Enable VFP optimizations for ARM processors</flag>
+ <flag name="bs2b">Enable <pkg>media-libs/libbs2b</pkg> based Bauer stereo-to-binaural audio filter</flag>
+ <flag name="cdio">Enable audio CD grabbing with <pkg>dev-libs/libcdio</pkg>.</flag>
+ <flag name="cpudetection">Enables runtime CPU detection (useful for bindist, compatibility on other CPUs).</flag>
+ <flag name="faac">Use external faac library for AAC encoding</flag>
+ <flag name="fdk">Use external fdk-aac library for AAC encoding and decoding</flag>
+ <flag name="frei0r">Enable frei0r wrapping in libavfilter</flag>
+ <flag name="gpl">Build all GPL licensed code. Without this flag set the package is build under LGPL license.</flag>
+ <flag name="hardcoded-tables">Use pre-calculated tables rather than calculating them on the fly.</flag>
+ <flag name="network">Enable network streaming support.</flag>
+ <flag name="openssl">Prefer <pkg>dev-libs/openssl</pkg> over <pkg>net-libs/gnutls</pkg> to provide SSL/TLS support (notice: the resulting binaries are unredistributable).</flag>
+ <flag name="opus">Use the external opus library for encoding and decoding.</flag>
+ <flag name="pulseaudio">Enable pulseaudio input support.</flag>
+ <flag name="pic">Force shared libraries to be built as PIC (this is slower).</flag>
+ <flag name="rtmp">Enable Real Time Messaging Protocol using librtmp instead the native implementation.</flag>
+ <flag name="schroedinger">Enable Dirac video support (an advanced royalty-free video compression format) via libschroedinger (high-speed implementation in C of the Dirac codec).</flag>
+ <flag name="ssl">Enable SSL/TLS support using <pkg>dev-libs/openssl</pkg> or <pkg>dev-libs/gnutls</pkg>.</flag>
+ <flag name="tools">Build and install small tools like aviocat, cws2fws, graph2dot, ismindex, qt-faststart.</flag>
+ <flag name="twolame">Enable MP2 encoding via <pkg>media-sound/twolame</pkg> as an alternative to the internal encoder</flag>
+ <flag name="vis"> Adds support for SIMD optimizations for UltraSPARC processors.</flag>
+ <flag name="vpx">Enable vp8 encoding support using <pkg>libvpx.</pkg></flag>
+ <flag name="webp">Enable WebP encoding with <pkg>media-libs/libwebp</pkg>.</flag>
+ <flag name="x265">Enable HEVC encoding with <pkg>media-libs/x265</pkg>.</flag>
+</use>
+</pkgmetadata>
diff --git a/media-video/lives/Manifest b/media-video/lives/Manifest
new file mode 100644
index 000000000000..4236331ad62b
--- /dev/null
+++ b/media-video/lives/Manifest
@@ -0,0 +1 @@
+DIST LiVES-1.4.6.tar.bz2 3086311 RMD160 8a3da63940f3449479b393cd1718c4842fa9c01e SHA1 6e5aa19ab29247d73d85be4924ad4bb50b863764 SHA256 67fb57571b80da680463f53f4e1aa2ac92d88f9437b7c9feb048faef7e617d59
diff --git a/media-video/lives/lives-1.4.6.ebuild b/media-video/lives/lives-1.4.6.ebuild
new file mode 100644
index 000000000000..74854555fce7
--- /dev/null
+++ b/media-video/lives/lives-1.4.6.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit autotools eutils
+
+MY_P=LiVES-${PV}
+
+DESCRIPTION="LiVES is a Video Editing System"
+HOMEPAGE="http://lives.sf.net"
+SRC_URI="http://www.xs4all.nl/~salsaman/lives/current/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="libvisual matroska nls ogg theora" # static-libs
+
+RDEPEND="media-video/mplayer
+ || ( media-gfx/imagemagick media-gfx/graphicsmagick[imagemagick] )
+ dev-lang/perl
+ >=dev-libs/glib-2.14
+ >=x11-libs/gtk+-2.16:2
+ media-libs/libsdl
+ media-libs/libv4l
+ virtual/ffmpeg
+ virtual/jpeg
+ media-sound/sox
+ virtual/cdrtools
+ || ( dev-lang/python:2.7 dev-lang/python:2.6 )
+ media-plugins/frei0r-plugins
+ media-sound/jack-audio-connection-kit
+ >=media-video/mjpegtools-1.6.2
+ sys-libs/libavc1394
+ libvisual? ( media-libs/libvisual )
+ matroska? ( media-video/mkvtoolnix )
+ ogg? ( media-sound/ogmtools )
+ theora? ( media-libs/libtheora )"
+DEPEND="${DEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )"
+
+DOCS=( AUTHORS BUGS ChangeLog FEATURES GETTING.STARTED NEWS README )
+
+src_prepare() {
+ esvn_clean
+
+ # Don't try to detect installed copies wrt #295293
+ sed -i -e '/^PKG_CHECK_MODULES(WEED/s:true:false:' configure.in || die
+ sed -i -e '/test/s:sendOSC:dIsAbLeAuToMaGiC:' libOSC/sendOSC/Makefile.am || die
+
+ # Use python 2.x as per reference in plugins
+ sed -i \
+ -e '/#!.*env/s:python:python2:' \
+ lives-plugins/plugins/encoders/multi_encoder* \
+ lives-plugins/marcos-encoders/lives_*_encoder* || die
+
+ AT_M4DIR="mk/autoconf" eautoreconf # for the seds
+}
+
+src_configure() {
+ # $(use_enable static-libs static)
+ econf \
+ --disable-static \
+ $(use_enable libvisual) \
+ $(use_enable nls)
+}
+
+src_install() {
+ default
+
+ rm -f "${ED}"usr/bin/lives #384727
+ dosym lives-exe /usr/bin/lives
+
+ find "${ED}"usr -name '*.la' -exec rm -f {} +
+ # use static-libs ||
+ rm -f "${ED}"usr/lib*/libweed-*.a
+}
diff --git a/media-video/lives/metadata.xml b/media-video/lives/metadata.xml
new file mode 100644
index 000000000000..6c02db49f2ff
--- /dev/null
+++ b/media-video/lives/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>lu_zero@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="libvisual">Enable libvisual support</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-video/loopy/Manifest b/media-video/loopy/Manifest
new file mode 100644
index 000000000000..b631fce1c733
--- /dev/null
+++ b/media-video/loopy/Manifest
@@ -0,0 +1 @@
+DIST 120880-loopy_0.5.3.tar.gz 34450 SHA256 e3b4aa89da8c99bae93b357fff4c64145c5c4ee5115a875fbd71f59380819df6
diff --git a/media-video/loopy/loopy-0.5.3.ebuild b/media-video/loopy/loopy-0.5.3.ebuild
new file mode 100644
index 000000000000..518b7f70970c
--- /dev/null
+++ b/media-video/loopy/loopy-0.5.3.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+KDE_LINGUAS="cs de hu pt_BR"
+inherit kde4-base
+
+MY_P=${P/-/_}
+
+DESCRIPTION="Simple video player for KDE"
+HOMEPAGE="http://www.kde-apps.org/content/show.php/Loopy?content=120880"
+SRC_URI="http://www.kde-apps.org/CONTENT/content-files/120880-${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="4"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug"
+
+S=${WORKDIR}/${MY_P}
+
+DOCS=( THEMING )
diff --git a/media-video/loopy/metadata.xml b/media-video/loopy/metadata.xml
new file mode 100644
index 000000000000..914f6144a6d5
--- /dev/null
+++ b/media-video/loopy/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>kde</herd>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/media-video/lsdvd/Manifest b/media-video/lsdvd/Manifest
new file mode 100644
index 000000000000..6813257d7d17
--- /dev/null
+++ b/media-video/lsdvd/Manifest
@@ -0,0 +1 @@
+DIST lsdvd-0.17.tar.gz 99250 SHA256 7d2c5bd964acd266b99a61d9054ea64e01204e8e3e1a107abe41b1274969e488 SHA512 d217ebe063c9d4c1584abe99cba5c5d09e1d600d26c58f90d542235f9a629433aa24f24fd8399c639e21391e7a5e8bdf54a9c85083aed63eae1090f4c23677e0 WHIRLPOOL 247e50b5487b8e623c5795bafca066f54879c365a49e239c522de825d4422760a4245223b367f815c381f0bd8eafe5963709f8c7a85a36a0d11b767093acab87
diff --git a/media-video/lsdvd/files/lsdvd-0.16-chapter-count.patch b/media-video/lsdvd/files/lsdvd-0.16-chapter-count.patch
new file mode 100644
index 000000000000..f51bd03762fc
--- /dev/null
+++ b/media-video/lsdvd/files/lsdvd-0.16-chapter-count.patch
@@ -0,0 +1,25 @@
+Using tt_srpt->title[].nr_of_ptts from the VMG IFO as a reference to the
+chapter count is often wrong, and noted as such in the source code. Use
+the program chain instead.
+
+--- lsdvd-0.16/lsdvd.c.orig 2014-08-22 21:47:06.009490680 -0600
++++ lsdvd-0.16/lsdvd.c 2014-08-22 21:47:30.947257942 -0600
+@@ -347,6 +347,7 @@
+ }
+
+ dvd_info.titles[j].chapter_count_reported = ifo_zero->tt_srpt->title[j].nr_of_ptts;
++ dvd_info.titles[j].chapter_count = pgc->nr_of_programs;
+ dvd_info.titles[j].cell_count = pgc->nr_of_cells;
+ dvd_info.titles[j].audiostream_count = vtsi_mat->nr_of_vts_audio_streams;
+ dvd_info.titles[j].subtitle_count = vtsi_mat->nr_of_vts_subp_streams;
+--- lsdvd-0.16/ohuman.c.orig 2014-08-22 21:47:00.993538145 -0600
++++ lsdvd-0.16/ohuman.c 2014-08-22 21:47:45.533121749 -0600
+@@ -20,7 +20,7 @@
+ // (int)(dvd_info->titles[j].general.length / 60) % 60,
+ // (float)((int)(dvd_info->titles[j].general.length * 1000) % 6000) / 1000); //,
+ // dvd_info->titles[j].general.length);
+- printf("Chapters: %02d, Cells: %02d, ", dvd_info->titles[j].chapter_count_reported, dvd_info->titles[j].cell_count);
++ printf("Chapters: %02d, Cells: %02d, ", dvd_info->titles[j].chapter_count, dvd_info->titles[j].cell_count);
+ printf("Audio streams: %02d, Subpictures: %02d", dvd_info->titles[j].audiostream_count, dvd_info->titles[j].subtitle_count);
+ printf("\n");
+
diff --git a/media-video/lsdvd/files/lsdvd-0.16-newline.patch b/media-video/lsdvd/files/lsdvd-0.16-newline.patch
new file mode 100644
index 000000000000..4f0ec1a74cd4
--- /dev/null
+++ b/media-video/lsdvd/files/lsdvd-0.16-newline.patch
@@ -0,0 +1,22 @@
+Removes extra newline from output like this:
+
+Title: 01, Length: 02:18:41.834 Chapters: 06, Cells: 06, Audio streams: 01, Subpictures: 03
+
+Title: 02, Length: 00:46:16.000 Chapters: 03, Cells: 03, Audio streams: 01, Subpictures: 03
+
+Title: 03, Length: 00:46:11.834 Chapters: 03, Cells: 03, Audio streams: 01, Subpictures: 03
+--- lsdvd-0.16/ohuman.c.orig 2014-08-22 21:47:00.993538145 -0600
++++ lsdvd-0.16/ohuman.c 2014-08-22 21:52:11.964633226 -0600
+@@ -111,11 +111,10 @@
+ printf("\n");
+ }
+ }
+- printf("\n");
+ }
+ }
+
+ if (! opt_t) {
+- printf("Longest track: %02d\n\n", dvd_info->longest_track);
++ printf("Longest track: %02d\n", dvd_info->longest_track);
+ }
+ }
diff --git a/media-video/lsdvd/files/lsdvd-0.16-title.patch b/media-video/lsdvd/files/lsdvd-0.16-title.patch
new file mode 100644
index 000000000000..44511a126e64
--- /dev/null
+++ b/media-video/lsdvd/files/lsdvd-0.16-title.patch
@@ -0,0 +1,27 @@
+See, http://bugs.gentoo.org/show_bug.cgi?id=233113
+
+lsdvd always reads the infos for all titles (even if only a single title was
+selected with "-t") and bails out if there is an error.
+
+Now, if for example title 5 is unreadable but you're interested in title 1, you
+should be able to get the info by using "-t 1", but that doesn't work, as lsdvd
+errors out before even starting the output because it can't read title 5.
+
+To solve this my patch makes lsdvd ignore read errors in titles it wouldn't
+display anyway.
+
+Patch by Martin Thierer
+
+diff -uw lsdvd-0.16.orig/lsdvd.c lsdvd-0.16/lsdvd.c
+--- lsdvd-0.16.orig/lsdvd.c 2006-03-02 14:48:11.000000000 +0100
++++ lsdvd-0.16/lsdvd.c 2008-07-27 20:11:55.000000000 +0200
+@@ -292,7 +292,7 @@
+
+ for (i=1; i <= ifo_zero->vts_atrt->nr_of_vtss; i++) {
+ ifo[i] = ifoOpen(dvd, i);
+- if ( !ifo[i] ) {
++ if ( !ifo[i] && opt_t == i ) {
+ fprintf( stderr, "Can't open ifo %d!\n", i);
+ return 4;
+ }
+
diff --git a/media-video/lsdvd/files/lsdvd-0.16-types.patch b/media-video/lsdvd/files/lsdvd-0.16-types.patch
new file mode 100644
index 000000000000..b20f8ea2cb4b
--- /dev/null
+++ b/media-video/lsdvd/files/lsdvd-0.16-types.patch
@@ -0,0 +1,27 @@
+Index: lsdvd-0.16/configure.in
+===================================================================
+--- lsdvd-0.16.orig/configure.in
++++ lsdvd-0.16/configure.in
+@@ -10,8 +10,8 @@ fi
+
+ AC_CHECK_LIB(dvdread, DVDOpen, , AC_MSG_ERROR([libdvdread not found!]))
+ AC_MSG_CHECKING([for dvdread/ifo_read.h])
+-AC_TRY_COMPILE([#include <dvdread/ifo_read.h>
+- #include <stdint.h>], ,
++AC_TRY_COMPILE([#include <stdint.h>
++ #include <dvdread/ifo_read.h>], ,
+ AC_MSG_RESULT([yes]),
+ AC_MSG_RESULT([no])
+ AC_MSG_ERROR([Header files for dvdread not found]))
+Index: lsdvd-0.16/lsdvd.c
+===================================================================
+--- lsdvd-0.16.orig/lsdvd.c
++++ lsdvd-0.16/lsdvd.c
+@@ -13,6 +13,7 @@
+ * 2003-04-19 Cleanups get_title_name, added dvdtime2msec, added helper macros,
+ * output info structures in form of a Perl module, by Henk Vergonet.
+ */
++#include <stdint.h>
+ #include <dvdread/ifo_read.h>
+ #include <string.h>
+ #include <sys/stat.h>
diff --git a/media-video/lsdvd/files/lsdvd-0.16-usec.patch b/media-video/lsdvd/files/lsdvd-0.16-usec.patch
new file mode 100644
index 000000000000..bfaa16e9615d
--- /dev/null
+++ b/media-video/lsdvd/files/lsdvd-0.16-usec.patch
@@ -0,0 +1,21 @@
+diff -uw lsdvd-0.16.orig/lsdvd.c lsdvd-0.16/lsdvd.c
+--- lsdvd-0.16.orig/lsdvd.c 2006-03-02 14:48:11.000000000 +0100
++++ lsdvd-0.16/lsdvd.c 2008-05-18 13:58:15.000000000 +0200
+@@ -92,7 +92,7 @@
+ ms += (((dt->second & 0xf0) >> 3) * 5 + (dt->second & 0x0f)) * 1000;
+
+ if(fps > 0)
+- ms += ((dt->frame_u & 0x30) >> 3) * 5 + (dt->frame_u & 0x0f) * 1000.0 / fps;
++ ms += (((dt->frame_u & 0x30) >> 3) * 5 + (dt->frame_u & 0x0f)) * 1000.0 / fps;
+
+ return ms;
+ }
+@@ -107,7 +107,7 @@
+ {
+ double fps = frames_per_s[(dt->frame_u & 0xc0) >> 6];
+
+- pt->usec = pt->usec + ((dt->frame_u & 0x30) >> 3) * 5 + (dt->frame_u & 0x0f) * 1000.0 / fps;
++ pt->usec = pt->usec + (((dt->frame_u & 0x30) >> 3) * 5 + (dt->frame_u & 0x0f)) * 1000.0 / fps;
+ pt->second = pt->second + ((dt->second & 0xf0) >> 3) * 5 + (dt->second & 0x0f);
+ pt->minute = pt->minute + ((dt->minute & 0xf0) >> 3) * 5 + (dt->minute & 0x0f);
+ pt->hour = pt->hour + ((dt->hour & 0xf0) >> 3) * 5 + (dt->hour & 0x0f);
diff --git a/media-video/lsdvd/files/lsdvd-0.17-autotools.patch b/media-video/lsdvd/files/lsdvd-0.17-autotools.patch
new file mode 100644
index 000000000000..c2f7e9456ed9
--- /dev/null
+++ b/media-video/lsdvd/files/lsdvd-0.17-autotools.patch
@@ -0,0 +1,12 @@
+--- configure.ac.orig 2014-10-04 00:36:04.484376722 -0600
++++ configure.ac 2014-10-04 00:36:25.080207028 -0600
+@@ -1,9 +1,6 @@
+ AC_INIT([lsdvd], [0.17])
+ AM_INIT_AUTOMAKE([foreign])
+ AC_PROG_CC
+-if eval "test x$GCC = xyes"; then # Enable warnings when using GCC
+- CFLAGS="$CFLAGS -W -Wall -Wcast-align -Wcast-qual -Wpointer-arith -Wreturn-type -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wformat -Werror=format-security"
+-fi
+ AC_SYS_LARGEFILE
+ PKG_CHECK_MODULES([DVDREAD], [dvdread >= 4.1.3])
+ AC_ARG_ENABLE([debug], \ No newline at end of file
diff --git a/media-video/lsdvd/lsdvd-0.17.ebuild b/media-video/lsdvd/lsdvd-0.17.ebuild
new file mode 100644
index 000000000000..f9cac643bfd9
--- /dev/null
+++ b/media-video/lsdvd/lsdvd-0.17.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="Utility for getting info out of DVDs"
+HOMEPAGE="http://sourceforge.net/projects/lsdvd/"
+SRC_URI="mirror://sourceforge/lsdvd/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ia64 ppc ppc64 sparc x86 ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos"
+IUSE=""
+
+RDEPEND="media-libs/libdvdread"
+DEPEND="${RDEPEND}"
+DOCS="AUTHORS README ChangeLog"
+
+src_prepare() {
+ rm "${S}/aclocal.m4" "${S}/Makefile.in"
+ epatch "${FILESDIR}"/${P}-autotools.patch
+ eautoreconf
+}
diff --git a/media-video/lsdvd/metadata.xml b/media-video/lsdvd/metadata.xml
new file mode 100644
index 000000000000..657b63f08556
--- /dev/null
+++ b/media-video/lsdvd/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">lsdvd</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/luvcview/Manifest b/media-video/luvcview/Manifest
new file mode 100644
index 000000000000..901879f48008
--- /dev/null
+++ b/media-video/luvcview/Manifest
@@ -0,0 +1,2 @@
+DIST luvcview_0.2.6-4.diff.gz 8227 RMD160 8a27ecaa94de42fdee1c387659d56d7394860b33 SHA1 3a006a9b1685d18022f9731918366c194943ec78 SHA256 2e71076ef242751d7931d7ef3198d0e5688e29ab86be4f0125891dc972e46fb1
+DIST luvcview_0.2.6.orig.tar.gz 100318 RMD160 3257bbd92699dcb5ee94a6c8b9e38f1ecd508226 SHA1 1a3e54c0e365532261f727e27cb0179601b6980f SHA256 73c37160efaf62b896009d5686e7b21e37c1860a75e0454e8e5dbdded8a4e2d0
diff --git a/media-video/luvcview/luvcview-0.2.6.ebuild b/media-video/luvcview/luvcview-0.2.6.ebuild
new file mode 100644
index 000000000000..805bee013843
--- /dev/null
+++ b/media-video/luvcview/luvcview-0.2.6.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 eutils toolchain-funcs
+
+PATCH_LEVEL=4
+
+DESCRIPTION="USB Video Class grabber"
+HOMEPAGE="http://packages.qa.debian.org/l/luvcview.html"
+SRC_URI="mirror://debian/pool/main/l/${PN}/${PN}_${PV}.orig.tar.gz
+ mirror://debian/pool/main/l/${PN}/${PN}_${PV}-${PATCH_LEVEL}.diff.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="media-libs/libsdl
+ media-libs/libv4l"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ EPATCH_OPTS="-p1" epatch "${WORKDIR}"/${PN}_${PV}-${PATCH_LEVEL}.diff
+ EPATCH_FORCE=yes EPATCH_SUFFIX=patch epatch debian/patches
+ sed -i -e 's:videodev.h:videodev2.h:' *.{c,h} || die
+ sed -i -e 's:-O2::' Makefile || die
+}
+
+src_compile() {
+ emake CC="$(tc-getCC) ${LDFLAGS}" || die
+}
+
+src_install() {
+ dobin luvcview || die
+ doman debian/luvcview.1 || die
+ dodoc Changelog README ToDo || die
+}
diff --git a/media-video/luvcview/metadata.xml b/media-video/luvcview/metadata.xml
new file mode 100644
index 000000000000..92e4dbc04f50
--- /dev/null
+++ b/media-video/luvcview/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>video</herd>
+</pkgmetadata>
diff --git a/media-video/lxdvdrip/Manifest b/media-video/lxdvdrip/Manifest
new file mode 100644
index 000000000000..220ad408a4b8
--- /dev/null
+++ b/media-video/lxdvdrip/Manifest
@@ -0,0 +1 @@
+DIST lxdvdrip-1.77.tgz 714310 SHA256 3b31ebb1c7edb02989bd2c3b6dbfd9d960cfdf6d950ae403639f1d5b63aac41f SHA512 d9b3003d52b90ad0f6c02054cb3171b4613b4210b5681c76f2e6e42d4a233438b1323c93b92457fd2e048e7ddef0df2089d82ea8bf3f9983c453ff99f122cca3 WHIRLPOOL 6953884fdf51e1b824dd7a77a0aea813e3766693207a6f8446840c0f385ed71d5182adcc84406b25c77fd94a7768cb5c5a9a1f1837af508279d5505b91d9df52
diff --git a/media-video/lxdvdrip/files/lxdvdrip-1.70-vamps-makefile.patch b/media-video/lxdvdrip/files/lxdvdrip-1.70-vamps-makefile.patch
new file mode 100644
index 000000000000..e2fb8775931e
--- /dev/null
+++ b/media-video/lxdvdrip/files/lxdvdrip-1.70-vamps-makefile.patch
@@ -0,0 +1,13 @@
+Index: lxdvdrip/vamps/Makefile
+===================================================================
+--- lxdvdrip.orig/vamps/Makefile
++++ lxdvdrip/vamps/Makefile
+@@ -21,7 +21,7 @@ CC = gcc
+ CFLAGS ?= -O2 -g -D_LARGEFILE_SOURCE -DLARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 \
+ -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_REENTRANT
+ CFLAGS += -Wall
+-LDFLAGS += -s
++LDFLAGS +=
+ LOADLIBES += -lm -lpthread -ldvdread
+
+ INSTALL ?= install
diff --git a/media-video/lxdvdrip/files/lxdvdrip-1.76-makefile.patch b/media-video/lxdvdrip/files/lxdvdrip-1.76-makefile.patch
new file mode 100644
index 000000000000..efebf922e2ba
--- /dev/null
+++ b/media-video/lxdvdrip/files/lxdvdrip-1.76-makefile.patch
@@ -0,0 +1,28 @@
+Index: lxdvdrip/Makefile
+===================================================================
+--- lxdvdrip.orig/Makefile
++++ lxdvdrip/Makefile
+@@ -3,13 +3,16 @@ HINWEIS0 = 'Bitte Konfigdatei in /etc mi
+ HINWEIS1 = 'Check the configuration file in /etc with the Changelog'
+ HINWEIS2 = 'Comparez le fichier de config. en /etc avec le Changelog'
+
+-all:
+- gcc -g -lm -ldvdread -lpthread -o lxdvdrip lxdvdrip.c streamanalyze.c ifo.c dvdinfo.c dvdbackup.c dvdcell.c systools.c vaporize.c dvdtools.c dvdcopy.c requant.c cputest.c tcmemcpy.c dvdformat.c badsect.c mpeg2dec.c
+- gcc -g -lm -o lxac3scan lxac3scan.c
+- cd vamps && make && cd ..
+- cd dvdbackup && make && cd ..
+- cd requant && make && cd ..
+- cd buffer && make && cd ..
++LXDVDRIP_SOURCES = lxdvdrip.c streamanalyze.c ifo.c dvdinfo.c dvdbackup.c dvdcell.c systools.c vaporize.c dvdtools.c dvdcopy.c requant.c cputest.c tcmemcpy.c dvdformat.c badsect.c mpeg2dec.c
++LXDVDRIP_OBJS = $(LXDVDRIP_SOURCES:%.c=%.o)
++
++all: lxdvdrip lxac3scan
++
++lxdvdrip: $(LXDVDRIP_OBJS)
++ $(CC) $(LDFLAGS) -o $@ $^ -lm -ldvdread -lpthread
++
++lxac3scan: lxac3scan.o
++ $(CC) $(LDFLAGS) -o $@ $^ -lm
+
+ clean:
+ rm -f lxdvdrip lxac3scan *.o
diff --git a/media-video/lxdvdrip/files/lxdvdrip-1.77-makefile.patch b/media-video/lxdvdrip/files/lxdvdrip-1.77-makefile.patch
new file mode 100644
index 000000000000..35df8fb65400
--- /dev/null
+++ b/media-video/lxdvdrip/files/lxdvdrip-1.77-makefile.patch
@@ -0,0 +1,43 @@
+--- Makefile.orig 2014-03-17 15:40:30.886570544 -0600
++++ Makefile 2014-03-17 15:41:22.729159468 -0600
+@@ -3,31 +3,15 @@
+ HINWEIS1 = 'Check the configuration file in /etc with the Changelog'
+ HINWEIS2 = 'Comparez le fichier de config. en /etc avec le Changelog'
+
+-all:
+- if test -f badsect.o; then rm *.o; fi
+- gcc -g -c badsect.c
+- gcc -g -c cputest.c
+- gcc -g -c dvdbackup.c
+- gcc -g -c dvdcell.c
+- gcc -g -c dvdcopy.c
+- gcc -g -c dvdformat.c
+- gcc -g -c dvdinfo.c
+- gcc -g -c dvdtools.c
+- gcc -g -c ifo.c
+- gcc -g -c lxdvdrip.c
+- gcc -g -c mpeg2dec.c
+- gcc -g -c requant.c
+- gcc -g -c streamanalyze.c
+- gcc -g -c systools.c
+- gcc -g -c tcmemcpy.c
+- gcc -g -c vaporize.c
+- gcc -pthread -g -o lxdvdrip *o -ldvdread -lm
+- if test -f badsect.o; then rm *.o; fi
+- gcc -g -lm -o lxac3scan lxac3scan.c
+- cd vamps && make && cd ..
+- cd dvdbackup && make && cd ..
+- cd requant && make && cd ..
+- cd mbuffer && make && cd ..
++LXDVDRIP_SOURCES = lxdvdrip.o streamanalyze.o ifo.o dvdinfo.o dvdbackup.o dvdcell.o systools.o vaporize.o dvdtools.o dvdcopy.o requant.o cputest.o tcmemcpy.o dvdformat.o badsect.o mpeg2dec.o
++
++all: lxdvdrip lxac3scan
++
++lxdvdrip: $(LXDVDRIP_SOURCES)
++ $(CC) $(LDFLAGS) -o $@ $(LXDVDRIP_SOURCES) -lm -ldvdread -lpthread
++
++lxac3scan: lxac3scan.o
++ $(CC) $(LDFLAGS) -o $@ $< -lm
+
+ clean:
+ rm -f lxdvdrip lxac3scan *.o
diff --git a/media-video/lxdvdrip/files/lxdvdrip-1.77-vamps-makefile.patch b/media-video/lxdvdrip/files/lxdvdrip-1.77-vamps-makefile.patch
new file mode 100644
index 000000000000..7c32d44ef371
--- /dev/null
+++ b/media-video/lxdvdrip/files/lxdvdrip-1.77-vamps-makefile.patch
@@ -0,0 +1,11 @@
+--- vamps/Makefile.orig 2014-03-17 15:44:50.086513525 -0600
++++ vamps/Makefile 2014-03-17 15:44:56.443321441 -0600
+@@ -21,7 +21,7 @@
+ CFLAGS ?= -O2 -g -D_LARGEFILE_SOURCE -DLARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 \
+ -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_REENTRANT
+ CFLAGS += -Wall
+-LDFLAGS += -s
++LDFLAGS +=
+ LOADLIBES += -lm -pthread -ldvdread
+
+ INSTALL ?= install
diff --git a/media-video/lxdvdrip/lxdvdrip-1.77.ebuild b/media-video/lxdvdrip/lxdvdrip-1.77.ebuild
new file mode 100644
index 000000000000..1e73e89718b0
--- /dev/null
+++ b/media-video/lxdvdrip/lxdvdrip-1.77.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Command line tool to automate the process of ripping and burning DVDs"
+SRC_URI="mirror://sourceforge/lxdvdrip/${P}.tgz"
+HOMEPAGE="http://sourceforge.net/projects/lxdvdrip/"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+DEPEND="media-libs/libdvdread"
+RDEPEND="${DEPEND}
+ >=media-video/dvdauthor-0.6.9
+ media-video/streamdvd
+ media-video/mpgtx"
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-makefile.patch"
+ epatch "${FILESDIR}/${P}-vamps-makefile.patch"
+}
+
+src_compile() {
+ CC="$(tc-getCC)" emake || die "emake failed"
+ cd "${S}/vamps"
+ emake CC="$(tc-getCC)" || die "emake lxdvdip vamps failed"
+}
+
+src_install () {
+ dobin lxdvdrip || die
+ dobin lxac3scan || die
+ dodoc doc-pak/Changelog* doc-pak/Credits doc-pak/Debugging.*
+ dodoc doc-pak/lxdvdrip.conf* doc-pak/README*
+ doman lxdvdrip.1
+
+ insinto /usr/share
+ doins lxdvdrip.wav
+
+ insinto /etc
+ newins doc-pak/lxdvdrip.conf.EN lxdvdrip.conf
+
+ cd "${S}/vamps"
+ emake PREFIX="${D}/usr" install || die "make install failed for vamps!"
+}
diff --git a/media-video/lxdvdrip/metadata.xml b/media-video/lxdvdrip/metadata.xml
new file mode 100644
index 000000000000..26d1bcd90abc
--- /dev/null
+++ b/media-video/lxdvdrip/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">lxdvdrip</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/m2vrequantizer/Manifest b/media-video/m2vrequantizer/Manifest
new file mode 100644
index 000000000000..1fd4d16de2dc
--- /dev/null
+++ b/media-video/m2vrequantizer/Manifest
@@ -0,0 +1 @@
+DIST M2VRequantizer-20060306.tgz 25576 SHA256 d024b58efd8ab6e9facc5cbd07da93036baad07c3f5531e794acc58f3b2a0a97
diff --git a/media-video/m2vrequantizer/m2vrequantizer-0.0.2_pre20060306.ebuild b/media-video/m2vrequantizer/m2vrequantizer-0.0.2_pre20060306.ebuild
new file mode 100644
index 000000000000..66dbe5078c83
--- /dev/null
+++ b/media-video/m2vrequantizer/m2vrequantizer-0.0.2_pre20060306.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+MY_P="${PN/m2vr/M2VR}-20060306"
+
+DESCRIPTION="Tool to requantize mpeg2 videos"
+HOMEPAGE="http://www.metakine.com/products/dvdremaster/modules.html"
+SRC_URI="mirror://vdrfiles/requant/${MY_P}.tgz"
+
+KEYWORDS="~amd64 x86"
+SLOT="0"
+LICENSE="GPL-2"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/M2VRequantiser
+
+src_prepare() {
+
+ sed -i "s:#elif defined(__i386__):#elif defined(__i386__) || defined(__amd64__):" main.c
+}
+
+src_compile() {
+
+ gcc -c ${CFLAGS} main.c -o requant.o
+ gcc ${CFLAGS} ${LDFLAGS} requant.o -o requant -lm
+}
+
+src_install() {
+
+ dobin requant
+}
diff --git a/media-video/m2vrequantizer/metadata.xml b/media-video/m2vrequantizer/metadata.xml
new file mode 100644
index 000000000000..40d504a77773
--- /dev/null
+++ b/media-video/m2vrequantizer/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>video</herd>
+<maintainer>
+<email>vdr@gentoo.org</email>
+<name>Gentoo VDR Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/media-video/makemkv/Manifest b/media-video/makemkv/Manifest
new file mode 100644
index 000000000000..996262eca24c
--- /dev/null
+++ b/media-video/makemkv/Manifest
@@ -0,0 +1,2 @@
+DIST makemkv-bin-1.9.5.tar.gz 5257139 SHA256 57468cc5d34fc442f2d4a7888e1baa2ec7f006027dc5ba3322472724636ef3e3 SHA512 6d1555593fedcb1c28a2a5b091db16f190b7615c41ba3c03b3824141910581f82387af95ebd76afb7b0b81dde9d6f345a28305a4c69bce78972e881aee1c16f8 WHIRLPOOL 517c458ec158481462c16326b0655ff8095a31b03cce8235aa26a0ea57cdd5af2c8e5c8780ada7d6242ea692367c6e8c0fdd385e8d99c74c1d2e10a16901e34b
+DIST makemkv-oss-1.9.5.tar.gz 4405616 SHA256 cfd1729a40063dde2a52d3100091d2a0002aa616f87597108fa8d11c3ab5b5c6 SHA512 f7865fb8cba9fb0a6e595f427bf3c19054d5e2d45495a9b9c8cedbfa807211968f797f02661d143549877f7543f0991ca080a05f6ade36d9b6212fffa2675b5e WHIRLPOOL 9df57929bb350db7a97ce36f7cb86476d4c5ec7b534fd1e59d9a23f48ebce993d8c00df68cdc8259f5b951af6a2241173fbbf2a504073c3e3d009bf73c028a09
diff --git a/media-video/makemkv/files/makemkv-makefile.patch b/media-video/makemkv/files/makemkv-makefile.patch
new file mode 100644
index 000000000000..224273a5286e
--- /dev/null
+++ b/media-video/makemkv/files/makemkv-makefile.patch
@@ -0,0 +1,18 @@
+--- makemkv-oss-1.9.3/Makefile.in.orig 2015-06-02 13:34:00.000000000 +0200
++++ makemkv-oss-1.9.3/Makefile.in 2015-06-04 12:32:29.752291023 +0200
+@@ -47,7 +47,7 @@
+ endif
+
+ out/%: out/%.full
+- $(OBJCOPY) --strip-all --strip-debug --strip-unneeded --discard-all $< $@
++ $(OBJCOPY) --discard-all $< $@
+
+ out/libdriveio.so.0.full:
+ mkdir -p out
+@@ -91,5 +91,5 @@
+
+ tmp/image_data.o : makemkvgui/bin/image_data.bin
+ mkdir -p tmp
+- $(LD) -r -b binary -o $@ $<
++ $(LD) -r -b binary -z noexecstack -o $@ $<
+
diff --git a/media-video/makemkv/files/makemkv-path.patch b/media-video/makemkv/files/makemkv-path.patch
new file mode 100644
index 000000000000..88f44a9d4ceb
--- /dev/null
+++ b/media-video/makemkv/files/makemkv-path.patch
@@ -0,0 +1,13 @@
+--- makemkv-oss-1.8.10/makemkvgui/src/api_linux.cpp.orig 2014-04-13 14:01:36.000000000 +0100
++++ makemkv-oss-1.8.10/makemkvgui/src/api_linux.cpp 2014-05-08 00:09:52.863784998 +0100
+@@ -36,9 +36,7 @@
+ }
+
+ static const char* const app_locations[]={
+- "/bin",
+- "/usr/bin",
+- "/usr/local/bin",
++ "/opt/bin",
+ NULL };
+
+ const char* const* ApGetAppLocations()
diff --git a/media-video/makemkv/makemkv-1.9.5.ebuild b/media-video/makemkv/makemkv-1.9.5.ebuild
new file mode 100644
index 000000000000..74150adfc94b
--- /dev/null
+++ b/media-video/makemkv/makemkv-1.9.5.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils gnome2-utils multilib flag-o-matic
+
+MY_P=makemkv-oss-${PV}
+MY_PB=makemkv-bin-${PV}
+
+DESCRIPTION="Tool for ripping and streaming Blu-ray, HD-DVD and DVD discs"
+HOMEPAGE="http://www.makemkv.com/"
+SRC_URI="http://www.makemkv.com/download/${MY_P}.tar.gz
+ http://www.makemkv.com/download/${MY_PB}.tar.gz"
+
+LICENSE="LGPL-2.1 MPL-1.1 MakeMKV-EULA openssl"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="libav multilib qt4"
+
+QA_PREBUILT="opt/bin/makemkvcon opt/bin/mmdtsdec"
+
+RDEPEND="
+ sys-libs/glibc[multilib?]
+ dev-libs/expat
+ dev-libs/openssl:0
+ sys-libs/zlib
+ qt4? (
+ virtual/opengl
+ dev-qt/qtcore:4
+ dev-qt/qtdbus:4
+ dev-qt/qtgui:4
+ )
+ !libav? ( >=media-video/ffmpeg-1.0.0:0= )
+ libav? ( >=media-video/libav-0.8.9:0= )
+"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/makemkv-oss-${PV}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-{makefile,path}.patch
+}
+
+src_configure() {
+ replace-flags -O* -Os
+ local args=""
+ use qt4 || args="--disable-gui"
+ if [[ -x ${ECONF_SOURCE:-.}/configure ]] ; then
+ econf $args
+ fi
+}
+
+src_compile() {
+ emake GCC="$(tc-getCC) ${CFLAGS} ${LDFLAGS}"
+}
+
+src_install() {
+ # install oss package
+ dolib.so out/libdriveio.so.0
+ dolib.so out/libmakemkv.so.1
+ dolib.so out/libmmbd.so.0
+ dosym libdriveio.so.0 /usr/$(get_libdir)/libdriveio.so.0.${PV}
+ dosym libdriveio.so.0 /usr/$(get_libdir)/libdriveio.so
+ dosym libmakemkv.so.1 /usr/$(get_libdir)/libmakemkv.so.1.${PV}
+ dosym libmakemkv.so.1 /usr/$(get_libdir)/libmakemkv.so
+ dosym libmmbd.so.0 /usr/$(get_libdir)/libmmbd.so
+ dosym libmmbd.so.0 /usr/$(get_libdir)/libmmbd.so.0.${PV}
+ into /opt
+
+ if use qt4; then
+ dobin out/makemkv
+
+ local res
+ for res in 16 22 32 64 128; do
+ newicon -s ${res} makemkvgui/share/icons/${res}x${res}/makemkv.png ${PN}.png
+ done
+
+ make_desktop_entry ${PN} MakeMKV ${PN} 'Qt;AudioVideo;Video'
+ fi
+
+ # install bin package
+ pushd "${WORKDIR}"/${MY_PB}/bin >/dev/null
+ if use x86; then
+ dobin i386/{makemkvcon,mmdtsdec}
+ elif use amd64; then
+ dobin amd64/makemkvcon
+ use multilib && dobin i386/mmdtsdec
+ fi
+ popd >/dev/null
+
+ # install license and default profile
+ pushd "${WORKDIR}"/${MY_PB}/src/share >/dev/null
+ insinto /usr/share/MakeMKV
+ doins *.{gz,xml}
+ popd >/dev/null
+}
+
+pkg_preinst() { gnome2_icon_savelist; }
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+
+ elog "While MakeMKV is in beta mode, upstream has provided a license"
+ elog "to use if you do not want to purchase one."
+ elog ""
+ elog "See this forum thread for more information, including the key:"
+ elog "http://www.makemkv.com/forum2/viewtopic.php?f=5&t=1053"
+ elog ""
+ elog "Note that beta license may have an expiration date and you will"
+ elog "need to check for newer licenses/releases. "
+ elog ""
+ elog "If this is a new install, remember to copy the default profile"
+ elog "to the config directory:"
+ elog "cp /usr/share/MakeMKV/default.mmcp.xml ~/.MakeMKV/"
+ elog ""
+ elog "MakeMKV can also act as a drop-in replacement for libaacs and"
+ elog "libbdplus, allowing transparent decryption of a wider range of"
+ elog "titles under players like VLC and mplayer. To enable this, set"
+ elog "the following variables when launching the player:"
+ elog "LIBAACS_PATH=libmmbd LIBBDPLUS_PATH=libmmbd"
+}
+
+pkg_postrm() { gnome2_icon_cache_update; }
diff --git a/media-video/makemkv/metadata.xml b/media-video/makemkv/metadata.xml
new file mode 100644
index 000000000000..767b0076a3cd
--- /dev/null
+++ b/media-video/makemkv/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>chewi@gentoo.org</email>
+ <name>James Le Cuirot</name>
+ </maintainer>
+ <longdescription>
+ MakeMKV is your one-click solution to convert video that you own
+ into free and patents-unencumbered format that can be played
+ everywhere. MakeMKV is a format converter, otherwise called
+ transcoder. It converts the video clips from proprietary (and
+ usually encrypted) disc into a set of MKV files, preserving most
+ information but not changing it in any way. The MKV format can
+ store multiple video/audio tracks with all meta-information and
+ preserve chapters. There are many players that can play MKV
+ files nearly on all platforms, and there are tools to convert
+ MKV files to many formats, including DVD and Blu-ray discs.
+
+ Additionally MakeMKV can instantly stream decrypted video
+ without intermediate conversion to wide range of players, so you
+ may watch Blu-ray and DVD discs with your favorite player on
+ your favorite OS or on your favorite device.
+</longdescription>
+</pkgmetadata>
diff --git a/media-video/matroxset/Manifest b/media-video/matroxset/Manifest
new file mode 100644
index 000000000000..13a3bcc67bef
--- /dev/null
+++ b/media-video/matroxset/Manifest
@@ -0,0 +1 @@
+DIST matroxset-0.4.tar.gz 24996 RMD160 ded03eecbb35812d2a2d6f8d8077320573c3c01b SHA1 e4d8841c19edfc746639953829c715c4b163efa1 SHA256 7f160b45cd945be10c5cea31a423143ac3be94b0ddf9c3e8edf6f5e5d0199003
diff --git a/media-video/matroxset/matroxset-0.4.ebuild b/media-video/matroxset/matroxset-0.4.ebuild
new file mode 100644
index 000000000000..e95269de33d0
--- /dev/null
+++ b/media-video/matroxset/matroxset-0.4.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit toolchain-funcs
+
+IUSE=""
+
+DESCRIPTION="Matrox utility to switch output modes (activate tvout)"
+HOMEPAGE="ftp://platan.vc.cvut.cz/pub/linux/matrox-latest/"
+SRC_URI="ftp://platan.vc.cvut.cz/pub/linux/matrox-latest/${P}.tar.gz"
+
+DEPEND="sys-libs/ncurses"
+RDEPEND="${DEPEND}"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="amd64 ppc x86"
+
+doecho() {
+ echo "$@"
+ "$@"
+}
+
+src_compile() {
+ doecho $(tc-getCC) -o ${PN} \
+ ${CFLAGS} ${LDFLAGS} \
+ ${PN}.c -lncurses \
+ || die "build failed"
+
+ #prepare small README
+ cat >> "${S}"/README << _EOF_
+This utility has been created by Petr Vandrovec
+
+Not much info here, but here are some pointers
+http://davedina.apestaart.org/download/doc/Matrox-TVOUT-HOWTO-0.1.txt
+http://www.netnode.de/howto/matrox-fb.html
+_EOF_
+}
+
+src_install() {
+ dobin matroxset || die
+
+ dodoc README || die
+}
diff --git a/media-video/matroxset/metadata.xml b/media-video/matroxset/metadata.xml
new file mode 100644
index 000000000000..d4279a059acd
--- /dev/null
+++ b/media-video/matroxset/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>video</herd>
+ <herd>media-tv</herd>
+</pkgmetadata>
diff --git a/media-video/maven-poke/Manifest b/media-video/maven-poke/Manifest
new file mode 100644
index 000000000000..23b4ac7f5225
--- /dev/null
+++ b/media-video/maven-poke/Manifest
@@ -0,0 +1 @@
+DIST maven-poke-0.0.1.tgz 12974 RMD160 024355f2632bb5fa8adcdf2cb7237a6fc8539bfa SHA1 418ec8da10574383403c4a3dce6c8ee04e1e8fe6 SHA256 352c04766d023924bf73cc41841869b8b3ff38bd5759b1f2370d1537bb73caeb
diff --git a/media-video/maven-poke/maven-poke-0.0.1.ebuild b/media-video/maven-poke/maven-poke-0.0.1.ebuild
new file mode 100644
index 000000000000..34a27922c77d
--- /dev/null
+++ b/media-video/maven-poke/maven-poke-0.0.1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Matrox utility to read and set maven registers (tune tvout)"
+HOMEPAGE="ftp://platan.vc.cvut.cz/pub/linux/matrox-latest/"
+SRC_URI="ftp://platan.vc.cvut.cz/pub/linux/matrox-latest/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~ppc ~x86"
+IUSE=""
+
+src_compile() {
+ emake all || die
+
+ #prepare small README
+ cat >> "${S}"/README << _EOF_
+This utility has been created by Petr Vandrovec.
+It was formerly called maven-prog (and the executable was matrox).
+
+A listing of maven registers
+http://platan.vc.cvut.cz/~vana/maven/mavenreg.html
+
+Not much info here, but here are some pointers
+http://davedina.apestaart.org/download/doc/Matrox-TVOUT-HOWTO-0.1.txt
+http://www.netnode.de/howto/matrox-fb.html
+_EOF_
+}
+
+src_install() {
+ newbin matrox maven-poke || die
+ dodoc README
+}
diff --git a/media-video/maven-poke/metadata.xml b/media-video/maven-poke/metadata.xml
new file mode 100644
index 000000000000..d4279a059acd
--- /dev/null
+++ b/media-video/maven-poke/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>video</herd>
+ <herd>media-tv</herd>
+</pkgmetadata>
diff --git a/media-video/mediainfo/Manifest b/media-video/mediainfo/Manifest
new file mode 100644
index 000000000000..d61ff2cd50a4
--- /dev/null
+++ b/media-video/mediainfo/Manifest
@@ -0,0 +1,3 @@
+DIST mediainfo_0.7.65.tar.bz2 2246510 SHA256 f035ae99eb160b1dd3129443574671631302810d71310dc72ceaa8f7a4c7e80d SHA512 6dc37cbecbe347dbe3fd2d1206b347c70a8fd2e8cd061537f015bd7510db94c1c8e84dfe74bafad3e00e2d13545a43509acf262d5db57e041ff3d7577a5d82e8 WHIRLPOOL 40a17113bc70277d9c6886430147d9e0025851b2d0bb9fd8310cc046165ce4b722d436b14e932976bc05456ba1fdf7194bf4d4b4ddba038ee0edd531635c4825
+DIST mediainfo_0.7.72.tar.bz2 1293016 SHA256 2173f7e5224233374925ee60ba99d37519e2f7402e2145177c76e3f899a85813 SHA512 e40c16a4dd5c9bd35d6424d6ab962d39f863633726d0deec1a7c37a122778a5b4dcc390a821aeda7bba2b84ff3f6e19d6cae744839dc31b15f08d1c2245bf12b WHIRLPOOL 144f669c69fd29aa9fe3b306ed897362c6adf013f920cb8ca852a6dccdbf626879b07432f422d80679a4ac0325c16a42f95017fba4ff40dd634fe7177961f45e
+DIST mediainfo_0.7.73.tar.bz2 1467006 SHA256 a7cae29ac45a642c6747746db150382ed88e42891b3b0bcfa59648d8838fab92 SHA512 46bfcacac8fb554ee1adbe5afb65d94330dea520bfea69fb4a0099e7da9159eedfc79023a6ca300443abfdc06caa1d455ad920957bbdb6307450ced0128dcd41 WHIRLPOOL 4fd45fd4d218bab60ea7935c0743b8ccfd218eb7790d314172f89bef1b8d33b397cfcf86bbd38de57c7c9f92bf30bbc27e262959f249506d8da00ef64c2add98
diff --git a/media-video/mediainfo/mediainfo-0.7.65.ebuild b/media-video/mediainfo/mediainfo-0.7.65.ebuild
new file mode 100644
index 000000000000..9840058b3af5
--- /dev/null
+++ b/media-video/mediainfo/mediainfo-0.7.65.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+WX_GTK_VER="2.8"
+
+inherit eutils autotools wxwidgets multilib
+
+DESCRIPTION="MediaInfo supplies technical and tag information about media files"
+HOMEPAGE="http://mediaarea.net/mediainfo/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}_${PV}.tar.bz2"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="curl mms wxwidgets"
+
+RDEPEND="sys-libs/zlib
+ media-libs/libzen
+ ~media-libs/lib${P}[curl=,mms=]
+ wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[X] )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S=${WORKDIR}/MediaInfo
+
+pkg_setup() {
+ TARGETS="CLI"
+ use wxwidgets && TARGETS+=" GUI"
+}
+
+src_prepare() {
+ local target
+ for target in ${TARGETS}; do
+ cd "${S}"/Project/GNU/${target}
+ sed -i -e "s:-O2::" configure.ac
+ eautoreconf
+ done
+}
+
+src_configure() {
+ local target
+ for target in ${TARGETS}; do
+ cd "${S}"/Project/GNU/${target}
+ local args=""
+ [[ ${target} == "GUI" ]] && args="--with-wxwidgets --with-wx-gui"
+ econf ${args}
+ done
+}
+
+src_compile() {
+ local target
+ for target in ${TARGETS}; do
+ cd "${S}"/Project/GNU/${target}
+ default
+ done
+}
+src_install() {
+ local target
+ for target in ${TARGETS}; do
+ cd "${S}"/Project/GNU/${target}
+ default
+ dodoc "${S}"/History_${target}.txt
+ if [[ ${target} == "GUI" ]]; then
+ newicon "${S}"/Source/Resource/Image/MediaInfo.png ${PN}.png
+ make_desktop_entry ${PN}-gui MediaInfo ${PN} "AudioVideo;GTK"
+ fi
+ done
+}
diff --git a/media-video/mediainfo/mediainfo-0.7.72.ebuild b/media-video/mediainfo/mediainfo-0.7.72.ebuild
new file mode 100644
index 000000000000..5da2a2252e38
--- /dev/null
+++ b/media-video/mediainfo/mediainfo-0.7.72.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+WX_GTK_VER="3.0"
+
+inherit eutils autotools wxwidgets multilib
+
+DESCRIPTION="MediaInfo supplies technical and tag information about media files"
+HOMEPAGE="http://mediaarea.net/mediainfo/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}_${PV}.tar.bz2"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="curl mms wxwidgets"
+
+RDEPEND="sys-libs/zlib
+ media-libs/libzen
+ ~media-libs/lib${P}[curl=,mms=]
+ wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[X] )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S=${WORKDIR}/MediaInfo
+
+pkg_setup() {
+ TARGETS="CLI"
+ use wxwidgets && TARGETS+=" GUI"
+}
+
+src_prepare() {
+ local target
+ for target in ${TARGETS}; do
+ cd "${S}"/Project/GNU/${target}
+ sed -i -e "s:-O2::" configure.ac
+ eautoreconf
+ done
+}
+
+src_configure() {
+ local target
+ for target in ${TARGETS}; do
+ cd "${S}"/Project/GNU/${target}
+ local args=""
+ [[ ${target} == "GUI" ]] && args="--with-wxwidgets --with-wx-gui"
+ econf ${args}
+ done
+}
+
+src_compile() {
+ local target
+ for target in ${TARGETS}; do
+ cd "${S}"/Project/GNU/${target}
+ default
+ done
+}
+src_install() {
+ local target
+ for target in ${TARGETS}; do
+ cd "${S}"/Project/GNU/${target}
+ default
+ dodoc "${S}"/History_${target}.txt
+ if [[ ${target} == "GUI" ]]; then
+ newicon "${S}"/Source/Resource/Image/MediaInfo.png ${PN}.png
+ make_desktop_entry ${PN}-gui MediaInfo ${PN} "AudioVideo;GTK"
+ fi
+ done
+}
diff --git a/media-video/mediainfo/mediainfo-0.7.73.ebuild b/media-video/mediainfo/mediainfo-0.7.73.ebuild
new file mode 100644
index 000000000000..5da2a2252e38
--- /dev/null
+++ b/media-video/mediainfo/mediainfo-0.7.73.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+WX_GTK_VER="3.0"
+
+inherit eutils autotools wxwidgets multilib
+
+DESCRIPTION="MediaInfo supplies technical and tag information about media files"
+HOMEPAGE="http://mediaarea.net/mediainfo/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}_${PV}.tar.bz2"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="curl mms wxwidgets"
+
+RDEPEND="sys-libs/zlib
+ media-libs/libzen
+ ~media-libs/lib${P}[curl=,mms=]
+ wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[X] )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S=${WORKDIR}/MediaInfo
+
+pkg_setup() {
+ TARGETS="CLI"
+ use wxwidgets && TARGETS+=" GUI"
+}
+
+src_prepare() {
+ local target
+ for target in ${TARGETS}; do
+ cd "${S}"/Project/GNU/${target}
+ sed -i -e "s:-O2::" configure.ac
+ eautoreconf
+ done
+}
+
+src_configure() {
+ local target
+ for target in ${TARGETS}; do
+ cd "${S}"/Project/GNU/${target}
+ local args=""
+ [[ ${target} == "GUI" ]] && args="--with-wxwidgets --with-wx-gui"
+ econf ${args}
+ done
+}
+
+src_compile() {
+ local target
+ for target in ${TARGETS}; do
+ cd "${S}"/Project/GNU/${target}
+ default
+ done
+}
+src_install() {
+ local target
+ for target in ${TARGETS}; do
+ cd "${S}"/Project/GNU/${target}
+ default
+ dodoc "${S}"/History_${target}.txt
+ if [[ ${target} == "GUI" ]]; then
+ newicon "${S}"/Source/Resource/Image/MediaInfo.png ${PN}.png
+ make_desktop_entry ${PN}-gui MediaInfo ${PN} "AudioVideo;GTK"
+ fi
+ done
+}
diff --git a/media-video/mediainfo/metadata.xml b/media-video/mediainfo/metadata.xml
new file mode 100644
index 000000000000..7cc6e853becc
--- /dev/null
+++ b/media-video/mediainfo/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>video</herd>
+ <upstream>
+ <remote-id type="sourceforge">mediainfo</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/metadata.xml b/media-video/metadata.xml
new file mode 100644
index 000000000000..21e3aff12af5
--- /dev/null
+++ b/media-video/metadata.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE catmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<catmetadata>
+ <longdescription lang="en">
+ The media-video category contains video-related applications.
+ </longdescription>
+ <longdescription lang="de">
+ Die Kategorie media-video enthält Applikationen rund um das Thema Video.
+ </longdescription>
+ <longdescription lang="es">
+ La categoría media-video contiene aplicaciones para video.
+ </longdescription>
+ <longdescription lang="ja">
+ media-videoカテゴリーにはビデオ関連のアプリケーションが含まれています。
+ </longdescription>
+ <longdescription lang="nl">
+ De media-video categorie bevat video-applicaties.
+ </longdescription>
+ <longdescription lang="vi">
+ Nhóm media-video chứa các ứng dụng liên quan đến phim ảnh.
+ </longdescription>
+ <longdescription lang="sk">
+ Kategória media-video obsahuje aplikácie pre prácu s videomateriálom.
+ </longdescription>
+ <longdescription lang="it">
+ La categoria media-video contiene applicazioni video.
+ </longdescription>
+ <longdescription lang="pt">
+ A categoria media-video contém aplicações de vídeo.
+ </longdescription>
+ <longdescription lang="pl">
+ Kategoria media-video zawiera pakiety związane z odtwarzaniem i
+ przetwarzaniem filmów.
+ </longdescription>
+</catmetadata>
+
diff --git a/media-video/minitube/Manifest b/media-video/minitube/Manifest
new file mode 100644
index 000000000000..f7eb93907f0f
--- /dev/null
+++ b/media-video/minitube/Manifest
@@ -0,0 +1,3 @@
+DIST minitube-2.0.tar.gz 713577 SHA256 1ba1dd7725e6e0c92653fdee7bcfa4b833346d2ef4c091d94b181b60bb592554 SHA512 f08f49549486f22d6156aa4344fd0698e03b0fcf669530010a648467cd3da1edbe6ee9e7c7578c69c7f410a03afe2e5c25bb84e6e1dc70c6534210566789f81e WHIRLPOOL 415d5b17a0862aa74c09a4950be43cd78b5ab5f26c7d0bd5d4c4b78d97989b181ecdc86955f843348b52fc582346fbae32d664f43e5ba76fcc995a59c572776b
+DIST minitube-2.3.tar.gz 955192 SHA256 7fb24e295dc3e2f4ce41add1ef71c7b1fef57383578f46af8e271710c86c2247 SHA512 bfbd0a7bc73ba70172d3107b2c530d64764cb4e4e34aea8b33a4a9306ddc7570dcae1c33a6de07e7890142df9a39c3d4454edea0bf53d8e0ea2027fd91605d03 WHIRLPOOL 14e545cf2c2a7931a049ad6264fbd91d6f426906421ec1bbea06f96f15fd4a7678a24c106e8abd1ce17b0a2bcf1e69304c8321c3d381b872d95ae4bad81c2e40
+DIST minitube-2.4.tar.gz 984265 SHA256 1d8a427a4120d623c689969d92904bf66bf7d3edafcb0f6f9eb7f24d6db39c7b SHA512 45a90322540a281b337511af5e52a25bb5d908d3e37b6d7d4a068a2cb0d598095b6a312f862c7043851ceeda63c66944213646ba154ae505229da7fbe48251dc WHIRLPOOL 932ebcbf2397ceba78af6823f6eeb56edbf9b4c58dfd15218d10572d6a47110867b969b4711a1bcc0a00d3d47361ddec3c98fea7f69d5b56db40b842dba57b97
diff --git a/media-video/minitube/files/minitube-1.9-gcc47.patch b/media-video/minitube/files/minitube-1.9-gcc47.patch
new file mode 100644
index 000000000000..4589eb538748
--- /dev/null
+++ b/media-video/minitube/files/minitube-1.9-gcc47.patch
@@ -0,0 +1,12 @@
+Index: minitube/src/qtsingleapplication/qtlocalpeer.cpp
+===================================================================
+--- minitube.orig/src/qtsingleapplication/qtlocalpeer.cpp
++++ minitube/src/qtsingleapplication/qtlocalpeer.cpp
+@@ -58,6 +58,7 @@ static PProcessIdToSessionId pProcessIdT
+ #endif
+ #if defined(Q_OS_UNIX)
+ #include <time.h>
++#include <unistd.h>
+ #endif
+
+ namespace QtLP_Private {
diff --git a/media-video/minitube/files/minitube-2.0-disable-updates.patch b/media-video/minitube/files/minitube-2.0-disable-updates.patch
new file mode 100644
index 000000000000..0117fd95d0ff
--- /dev/null
+++ b/media-video/minitube/files/minitube-2.0-disable-updates.patch
@@ -0,0 +1,16 @@
+https://bugs.gentoo.org/show_bug.cgi?id=455976
+
+Index: minitube/src/mainwindow.cpp
+===================================================================
+--- minitube.orig/src/mainwindow.cpp
++++ minitube/src/mainwindow.cpp
+@@ -145,9 +145,6 @@ MainWindow::MainWindow() :
+ mouseTimer->setInterval(5000);
+ mouseTimer->setSingleShot(true);
+ connect(mouseTimer, SIGNAL(timeout()), SLOT(hideMouse()));
+-
+- QTimer::singleShot(0, this, SLOT(checkForUpdate()));
+-
+ }
+
+ MainWindow::~MainWindow() {
diff --git a/media-video/minitube/files/minitube-2.1.3-disable-updates.patch b/media-video/minitube/files/minitube-2.1.3-disable-updates.patch
new file mode 100644
index 000000000000..869850a5c6e5
--- /dev/null
+++ b/media-video/minitube/files/minitube-2.1.3-disable-updates.patch
@@ -0,0 +1,13 @@
+Index: minitube/src/mainwindow.cpp
+===================================================================
+--- minitube.orig/src/mainwindow.cpp
++++ minitube/src/mainwindow.cpp
+@@ -197,8 +197,6 @@ void MainWindow::lazyInit() {
+
+ JsFunctions::instance();
+
+- checkForUpdate();
+-
+ ChannelAggregator::instance()->start();
+ }
+
diff --git a/media-video/minitube/files/minitube-2.4-disable-updates.patch b/media-video/minitube/files/minitube-2.4-disable-updates.patch
new file mode 100644
index 000000000000..0c18317e19f8
--- /dev/null
+++ b/media-video/minitube/files/minitube-2.4-disable-updates.patch
@@ -0,0 +1,13 @@
+Index: minitube-2.4/src/mainwindow.cpp
+===================================================================
+--- minitube-2.4.orig/src/mainwindow.cpp
++++ minitube-2.4/src/mainwindow.cpp
+@@ -206,8 +206,6 @@ void MainWindow::lazyInit() {
+ connect(mouseTimer, SIGNAL(timeout()), SLOT(hideMouse()));
+
+ JsFunctions::instance();
+-
+- checkForUpdate();
+ }
+
+ void MainWindow::changeEvent(QEvent* event) {
diff --git a/media-video/minitube/metadata.xml b/media-video/minitube/metadata.xml
new file mode 100644
index 000000000000..1eef459cfc70
--- /dev/null
+++ b/media-video/minitube/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>qt</herd>
+ <herd>video</herd>
+ <maintainer>
+ <email>hwoarang@gentoo.org</email>
+ <name>Markos Chandras</name>
+ </maintainer>
+ <use>
+ <flag name="download">Enable support for downloading YouTube videos</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">flaviotordini/minitube</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/minitube/minitube-2.0.ebuild b/media-video/minitube/minitube-2.0.ebuild
new file mode 100644
index 000000000000..5a2feb604e39
--- /dev/null
+++ b/media-video/minitube/minitube-2.0.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PLOCALES="ar ca ca_ES da de_DE el en es es_AR es_ES fi fi_FI fr he_IL hr hu
+ia it jv nl pl pl_PL pt_BR ro ru sk sl tr zh_CN"
+
+inherit l10n qt4-r2
+
+DESCRIPTION="Qt4 YouTube Client"
+HOMEPAGE="http://flavio.tordini.org/minitube"
+SRC_URI="http://flavio.tordini.org/files/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug gstreamer kde"
+
+DEPEND=">=dev-qt/qtgui-4.6:4[accessibility,gtkstyle]
+ >=dev-qt/qtdbus-4.6:4
+ kde? ( || ( media-libs/phonon[gstreamer?,qt4] >=dev-qt/qtphonon-4.6:4 ) )
+ !kde? ( || ( >=dev-qt/qtphonon-4.6:4 media-libs/phonon[gstreamer?,qt4] ) )
+ gstreamer? (
+ media-plugins/gst-plugins-soup:0.10
+ media-plugins/gst-plugins-ffmpeg:0.10
+ media-plugins/gst-plugins-faac:0.10
+ media-plugins/gst-plugins-faad:0.10
+ media-plugins/gst-plugins-theora
+ )
+"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${PN}
+
+DOCS="AUTHORS CHANGES TODO"
+
+#455976
+PATCHES=( "${FILESDIR}"/${P}-disable-updates.patch )
+
+src_prepare() {
+ qt4-r2_src_prepare
+
+ # Remove unneeded translations
+ local trans=
+ for x in $(l10n_get_locales); do
+ trans+="${x}.ts "
+ done
+ if [[ -n ${trans} ]]; then
+ sed -i -e "/^TRANSLATIONS/s/+=.*/+=${trans}/" locale/locale.pri || die
+ fi
+ # gcc-4.7. Bug #422977. Will probably be fixed
+ # once ubuntu moves to gcc-4.7
+ epatch "${FILESDIR}"/${PN}-1.9-gcc47.patch
+}
+
+src_install() {
+ qt4-r2_src_install
+ newicon images/app.png minitube.png
+}
diff --git a/media-video/minitube/minitube-2.3-r1.ebuild b/media-video/minitube/minitube-2.3-r1.ebuild
new file mode 100644
index 000000000000..89a5985f3de4
--- /dev/null
+++ b/media-video/minitube/minitube-2.3-r1.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PLOCALES="ar ca ca_ES da de_DE el en es es_AR es_ES fi fi_FI fr he_IL hr hu
+ia it jv nl pl pl_PL pt_BR ro ru sk sl tr zh_CN"
+PLOCALE_BACKUP="en"
+
+inherit l10n qt4-r2
+
+DESCRIPTION="Qt4 YouTube Client"
+HOMEPAGE="http://flavio.tordini.org/minitube"
+# As usual, upstream never releases proper tarballs
+SRC_URI="http://dev.gentoo.org/~hwoarang/distfiles/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug download gstreamer kde"
+
+DEPEND=">=dev-qt/qtgui-4.8:4[accessibility]
+ >=dev-qt/qtdbus-4.8:4
+ >=dev-qt/qtsql-4.8:4
+ dev-qt/qtsingleapplication[qt4(+),X]
+ kde? ( || ( media-libs/phonon[gstreamer?,qt4] >=dev-qt/qtphonon-4.8:4 ) )
+ !kde? ( || ( >=dev-qt/qtphonon-4.8:4 media-libs/phonon[gstreamer?,qt4] ) )
+ gstreamer? (
+ media-plugins/gst-plugins-soup:0.10
+ media-plugins/gst-plugins-ffmpeg:0.10
+ media-plugins/gst-plugins-faac:0.10
+ media-plugins/gst-plugins-faad:0.10
+ media-plugins/gst-plugins-theora
+ )
+"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${PN}
+
+DOCS="AUTHORS CHANGES TODO"
+
+#455976
+PATCHES=( "${FILESDIR}"/${PN}-2.1.3-disable-updates.patch )
+
+src_prepare() {
+ qt4-r2_src_prepare
+
+ # Remove unneeded translations
+ local trans=
+ for x in $(l10n_get_locales); do
+ trans+="${x}.ts "
+ done
+ if [[ -n ${trans} ]]; then
+ sed -i -e "/^TRANSLATIONS/s/+=.*/+=${trans}/" locale/locale.pri || die
+ fi
+ sed -i \
+ 's|include(src/qtsingleapplication/qtsingleapplication.pri)|CONFIG += qtsingleapplication|g' \
+ ${PN}.pro || die "Failed to unbundle qtsingleapplication"
+ # Enable video downloads. Bug #491344
+ use download && { echo "DEFINES += APP_DOWNLOADS" >> ${PN}.pro; }
+}
+
+src_install() {
+ qt4-r2_src_install
+ newicon images/app.png minitube.png
+}
+
+pkg_postinst() {
+ if use download; then
+ elog "You activated the 'download' USE flag. This allows you to"
+ elog "download videos from youtube, which might violate the youtube"
+ elog "terms-of-service (TOS) in some legislations. If downloading"
+ elog "youtube-videos is not allowed in your legislation, please"
+ elog "disable the 'download' use flag. For details on the youtube TOS,"
+ elog "see http://www.youtube.com/t/terms"
+ fi
+}
diff --git a/media-video/minitube/minitube-2.4.ebuild b/media-video/minitube/minitube-2.4.ebuild
new file mode 100644
index 000000000000..b87730474813
--- /dev/null
+++ b/media-video/minitube/minitube-2.4.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PLOCALES="ar ca ca_ES da de_DE el en es es_AR es_ES fi fi_FI fr he_IL hr hu
+ia it jv nl pl pl_PL pt_BR ro ru sk sl tr zh_CN"
+PLOCALE_BACKUP="en"
+
+inherit l10n qt4-r2
+
+DESCRIPTION="Qt4 YouTube Client"
+HOMEPAGE="http://flavio.tordini.org/minitube"
+SRC_URI="https://github.com/flaviotordini/${PN}/archive/${PV}.tar.gz ->
+${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug download gstreamer kde"
+
+DEPEND=">=dev-qt/qtgui-4.8:4[accessibility]
+ >=dev-qt/qtdbus-4.8:4
+ >=dev-qt/qtsql-4.8:4
+ dev-qt/qtsingleapplication[qt4(+),X]
+ kde? ( || ( media-libs/phonon[gstreamer?,qt4] >=dev-qt/qtphonon-4.8:4 ) )
+ !kde? ( || ( >=dev-qt/qtphonon-4.8:4 media-libs/phonon[gstreamer?,qt4] ) )
+ gstreamer? (
+ media-plugins/gst-plugins-soup:0.10
+ media-plugins/gst-plugins-ffmpeg:0.10
+ media-plugins/gst-plugins-faac:0.10
+ media-plugins/gst-plugins-faad:0.10
+ media-plugins/gst-plugins-theora
+ )
+"
+RDEPEND="${DEPEND}"
+
+DOCS="AUTHORS CHANGES TODO"
+
+#455976
+PATCHES=( "${FILESDIR}"/${P}-disable-updates.patch )
+
+pkg_pretend() {
+ if [[ -z ${MINITUBE_GOOGLE_API_KEY} ]]; then
+ eerror ""
+ eerror "Since version 2.4, you need to generate a Google API Key to use"
+ eerror "with this application. Please head over to"
+ eerror "https://console.developers.google.com/ and"
+ eerror "https://github.com/flaviotordini/minitube/blob/master/README.md"
+ eerror "for more information. Once you have generated your key,"
+ eerror "please export it to your environment ie :"
+ eerror "'export MINITUBE_GOOGLE_API_KEY=\"YourAPIKeyHere\""
+ eerror "and then try to merge this package again"
+ eerror ""
+ die "MINITUBE_GOOGLE_API_KEY env variable not defined!"
+ fi
+}
+
+src_prepare() {
+ qt4-r2_src_prepare
+
+ # Remove unneeded translations
+ local trans=
+ for x in $(l10n_get_locales); do
+ trans+="${x}.ts "
+ done
+ if [[ -n ${trans} ]]; then
+ sed -i -e "/^TRANSLATIONS/s/+=.*/+=${trans}/" locale/locale.pri || die
+ fi
+ sed -i \
+ 's|include(src/qtsingleapplication/qtsingleapplication.pri)|CONFIG += qtsingleapplication|g' \
+ ${PN}.pro || die "Failed to unbundle qtsingleapplication"
+ # Enable video downloads. Bug #491344
+ use download && { echo "DEFINES += APP_DOWNLOADS" >> ${PN}.pro; }
+ echo "DEFINES += APP_GOOGLE_API_KEY=${MINITUBE_GOOGLE_API_KEY}" >> ${PN}.pro
+}
+
+src_install() {
+ qt4-r2_src_install
+ newicon images/app.png minitube.png
+}
+
+pkg_postinst() {
+ if use download; then
+ elog "You activated the 'download' USE flag. This allows you to"
+ elog "download videos from youtube, which might violate the youtube"
+ elog "terms-of-service (TOS) in some legislations. If downloading"
+ elog "youtube-videos is not allowed in your legislation, please"
+ elog "disable the 'download' use flag. For details on the youtube TOS,"
+ elog "see http://www.youtube.com/t/terms"
+ fi
+}
diff --git a/media-video/miro/Manifest b/media-video/miro/Manifest
new file mode 100644
index 000000000000..937ee6fa64a4
--- /dev/null
+++ b/media-video/miro/Manifest
@@ -0,0 +1,3 @@
+DIST miro-4.0.6.tar.gz 13078726 SHA256 f51261d4505f0e9b2e429476ccfc8ce787ade6bfddb13a3eb05dee74a111d7da
+DIST miro-5.0.4.tar.gz 12990017 SHA256 4841c70c59a16647a77ea6c05a6d4d450bcc7973b9d33236d7cff2dbacf1c33a SHA512 fd4c9d95c921361209491f725bd979512c41b8dbffca5c310991fb3c112c8e1d401fccfa3f7de9baba7e169fbe7061501c876b848f765765e0d853b7fb240312 WHIRLPOOL 4aa2f75a2702dbf71523ab5d14db63cb819a85c849dbaa2deea9ed675ff95d88dc79d0e47db223939dedf72f2bd4085521ce501f26711c7be98ca49e0626a4bd
+DIST miro-6.0.tar.gz 13121803 SHA256 558d194278fe5d602ba4d5d6737035b150e907c57da3344afa2ec462062f026b SHA512 d7770af3d4c63812c69cdbf05af7d7a2fe017736dc118ad509ce4e5b9ae66f917bf541e8abba5dd2318f22dac1f8698e77fe7da339ebaf7a72181faa77183370 WHIRLPOOL 961dd8ccf5c311f459f1d51bf939b8b64abbdd4e14721ad51438583e5a509aa764fdb0e286fd6a268be92d1c2a5a734d52b982ff38e27788e4cbfa996c5cfa4e
diff --git a/media-video/miro/files/miro-5.0.4-ffmpeg-1.patch b/media-video/miro/files/miro-5.0.4-ffmpeg-1.patch
new file mode 100644
index 000000000000..93e92ed583ae
--- /dev/null
+++ b/media-video/miro/files/miro-5.0.4-ffmpeg-1.patch
@@ -0,0 +1,78 @@
+commit efe8bec33931522f60719102f53099f1796c7b75
+Author: Ben Dean-Kawamura <ben@pculture.org>
+Date: Fri Aug 31 16:30:59 2012 -0400
+
+ Update segmenter code to not use deprecated functions
+
+diff --git a/tv/linux/miro-segmenter.c b/tv/linux/miro-segmenter.c
+index 1bfdda3..fd2a726 100644
+--- a/tv/linux/miro-segmenter.c
++++ b/tv/linux/miro-segmenter.c
+@@ -156,7 +156,7 @@ int main(int argc, char **argv)
+ exit(1);
+ }
+
+- ret = av_open_input_file(&ic, input, ifmt, 0, NULL);
++ ret = avformat_open_input(&ic, input, ifmt, 0);
+ if (ret != 0) {
+ fprintf(stderr, "Could not open input file, make sure it is an mpegts file: %d\n", ret);
+ exit(1);
+@@ -215,12 +215,7 @@ int main(int argc, char **argv)
+ }
+ }
+
+- if (av_set_parameters(oc, NULL) < 0) {
+- fprintf(stderr, "Invalid output format parameters\n");
+- exit(1);
+- }
+-
+- dump_format(oc, 0, input, 1);
++ av_dump_format(oc, 0, input, 1);
+
+ if (video_st) {
+ codec = avcodec_find_decoder(video_st->codec->codec_id);
+@@ -233,12 +228,12 @@ int main(int argc, char **argv)
+ }
+ }
+
+- if (url_fopen(&oc->pb, output_filename, URL_WRONLY) < 0) {
++ if (avio_open(&oc->pb, output_filename, AVIO_FLAG_WRITE) < 0) {
+ fprintf(stderr, "Could not open '%s'\n", output_filename);
+ exit(1);
+ }
+
+- if (av_write_header(oc)) {
++ if (avformat_write_header(oc, NULL)) {
+ fprintf(stderr, "Could not write mpegts header to first output file\n");
+
+ exit(1);
+@@ -274,10 +269,10 @@ int main(int argc, char **argv)
+ }
+
+ if (segment_time - prev_segment_time >= segment_duration) {
+- put_flush_packet(oc->pb);
+- url_fclose(oc->pb);
++ avio_flush(oc->pb);
++ avio_close(oc->pb);
+
+- if (url_fopen(&oc->pb, output_filename, URL_WRONLY) < 0) {
++ if (avio_open(&oc->pb, output_filename, AVIO_FLAG_WRITE) < 0) {
+ fprintf(stderr, "Could not open '%s'\n", output_filename);
+ break;
+ }
+@@ -307,13 +302,13 @@ int main(int argc, char **argv)
+ av_freep(&oc->streams[i]);
+ }
+
+- url_fclose(oc->pb);
++ avio_close(oc->pb);
+ av_free(oc);
+
+ /* End-of-transcode marker. */
+ {
+ struct sockaddr_in sockaddr;
+- int rc, s;
++ int rc, s;
+
+ memset(&sockaddr, 0, sizeof(sockaddr));
+ sockaddr.sin_family = AF_INET;
diff --git a/media-video/miro/metadata.xml b/media-video/miro/metadata.xml
new file mode 100644
index 000000000000..1baa46d82420
--- /dev/null
+++ b/media-video/miro/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>jdhore@gentoo.org</email>
+ <name>Jeff Horelick</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/media-video/miro/miro-4.0.6.ebuild b/media-video/miro/miro-4.0.6.ebuild
new file mode 100644
index 000000000000..78f7dbab53c4
--- /dev/null
+++ b/media-video/miro/miro-4.0.6.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+PYTHON_DEPEND="2:2.7"
+PYTHON_USE_WITH="sqlite"
+inherit eutils fdo-mime gnome2-utils distutils
+
+DESCRIPTION="Open source video player and podcast client"
+HOMEPAGE="http://www.getmiro.com/"
+SRC_URI="http://ftp.osuosl.org/pub/pculture.org/${PN}/src/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="libnotify aac musepack xvid"
+
+CDEPEND="
+ dev-libs/glib:2
+ >=dev-python/pyrex-0.9.6.4
+ dev-python/pygtk:2
+ dev-python/pygobject:2
+ >=virtual/ffmpeg-0.6.90"
+
+RDEPEND="${CDEPEND}
+ dev-python/dbus-python
+ dev-python/pycairo
+ dev-python/gconf-python
+ dev-python/gst-python:0.10
+ dev-python/pyrex
+ >=dev-python/pywebkitgtk-1.1.5
+ dev-python/pycurl
+ >=net-libs/rb_libtorrent-0.14.1[python]
+ media-libs/mutagen
+ media-plugins/gst-plugins-meta:0.10
+ media-plugins/gst-plugins-pango:0.10
+ aac? ( media-plugins/gst-plugins-faad:0.10 )
+ libnotify? ( dev-python/notify-python )
+ musepack? ( media-plugins/gst-plugins-musepack:0.10 )
+ xvid? ( media-plugins/gst-plugins-xvid:0.10 )"
+
+DEPEND="${CDEPEND}"
+
+S="${WORKDIR}/${P}/linux"
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_prepare() {
+ distutils_src_prepare
+}
+
+src_install() {
+ # doing the mv now otherwise, distutils_src_install will install it
+ mv README README.gtk || die "mv failed"
+
+ distutils_src_install
+
+ # installing docs
+ dodoc README.gtk ../{CREDITS,README} || die "dodoc failed"
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ distutils_pkg_postinst
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+
+ ewarn
+ ewarn "If miro doesn't play some video or audio format, please"
+ ewarn "check your USE flags on media-plugins/gst-plugins-meta"
+ ewarn
+ elog "Miro for Linux doesn't support Adobe Flash, therefore you"
+ elog "you will not see any embedded video player on MiroGuide."
+ elog
+}
+
+pkg_postrm() {
+ distutils_pkg_postrm
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+}
diff --git a/media-video/miro/miro-5.0.4.ebuild b/media-video/miro/miro-5.0.4.ebuild
new file mode 100644
index 000000000000..efefdf5a4958
--- /dev/null
+++ b/media-video/miro/miro-5.0.4.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+PYTHON_DEPEND="2:2.7"
+PYTHON_USE_WITH="sqlite"
+inherit eutils fdo-mime gnome2-utils distutils
+
+DESCRIPTION="Open source video player and podcast client"
+HOMEPAGE="http://www.getmiro.com/"
+SRC_URI="http://ftp.osuosl.org/pub/pculture.org/${PN}/src/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="libnotify aac musepack xvid"
+
+CDEPEND="
+ dev-libs/glib:2
+ >=dev-python/pyrex-0.9.6.4
+ dev-python/pygtk:2
+ dev-python/pygobject:2
+ >=virtual/ffmpeg-0.6.90"
+
+RDEPEND="${CDEPEND}
+ dev-python/dbus-python
+ dev-python/pycairo
+ dev-python/gconf-python
+ dev-python/gst-python:0.10
+ dev-python/pyrex
+ >=dev-python/pywebkitgtk-1.1.5
+ dev-python/pycurl
+ >=net-libs/rb_libtorrent-0.14.1[python]
+ media-libs/mutagen
+ media-plugins/gst-plugins-meta:0.10
+ media-plugins/gst-plugins-pango:0.10
+ aac? ( media-plugins/gst-plugins-faad:0.10 )
+ libnotify? ( dev-python/notify-python )
+ musepack? ( media-plugins/gst-plugins-musepack:0.10 )
+ xvid? ( media-plugins/gst-plugins-xvid:0.10 )
+ net-dns/avahi[mdnsresponder-compat]"
+
+DEPEND="${CDEPEND}"
+
+# 2 unexpected failures, requires a running gconf which MAY not exist
+# but failing tests not a regression from 4.0.6
+RESTRICT="test"
+
+S="${WORKDIR}/${P}/linux"
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_prepare() {
+ distutils_src_prepare
+ epatch "${FILESDIR}/${P}-ffmpeg-1.patch"
+}
+
+src_install() {
+ # doing the mv now otherwise, distutils_src_install will install it
+ mv README README.gtk || die "mv failed"
+
+ distutils_src_install
+
+ # installing docs
+ dodoc README.gtk ../{CREDITS,README} || die "dodoc failed"
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ distutils_pkg_postinst
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+
+ ewarn
+ ewarn "If miro doesn't play some video or audio format, please"
+ ewarn "check your USE flags on media-plugins/gst-plugins-meta"
+ ewarn
+ elog "Miro for Linux doesn't support Adobe Flash, therefore you"
+ elog "you will not see any embedded video player on MiroGuide."
+ elog
+}
+
+pkg_postrm() {
+ distutils_pkg_postrm
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+}
diff --git a/media-video/miro/miro-6.0.ebuild b/media-video/miro/miro-6.0.ebuild
new file mode 100644
index 000000000000..ba8f821d0257
--- /dev/null
+++ b/media-video/miro/miro-6.0.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+PYTHON_DEPEND="2:2.7"
+PYTHON_USE_WITH="sqlite"
+inherit eutils fdo-mime gnome2-utils distutils
+
+DESCRIPTION="Open source video player and podcast client"
+HOMEPAGE="http://www.getmiro.com/"
+SRC_URI="http://ftp.osuosl.org/pub/pculture.org/${PN}/src/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="libnotify aac musepack xvid"
+
+CDEPEND="
+ dev-libs/glib:2
+ >=dev-python/pyrex-0.9.6.4
+ dev-python/pygtk:2
+ dev-python/pygobject:2
+ >=virtual/ffmpeg-0.6.90"
+
+RDEPEND="${CDEPEND}
+ dev-python/dbus-python
+ dev-python/pycairo
+ dev-python/gconf-python
+ dev-python/gst-python:0.10
+ dev-python/pyrex
+ >=dev-python/pywebkitgtk-1.1.5
+ dev-python/pycurl
+ >=net-libs/rb_libtorrent-0.14.1[python]
+ media-libs/mutagen
+ media-plugins/gst-plugins-meta:0.10
+ media-plugins/gst-plugins-pango:0.10
+ aac? ( media-plugins/gst-plugins-faad:0.10 )
+ libnotify? ( dev-python/notify-python )
+ musepack? ( media-plugins/gst-plugins-musepack:0.10 )
+ xvid? ( media-plugins/gst-plugins-xvid:0.10 )
+ net-dns/avahi[mdnsresponder-compat]"
+
+DEPEND="${CDEPEND}"
+
+# 2 unexpected failures, requires a running gconf which MAY not exist
+# but failing tests not a regression from 4.0.6
+RESTRICT="test"
+
+S="${WORKDIR}/${P}/linux"
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_prepare() {
+ distutils_src_prepare
+}
+
+src_install() {
+ # doing the mv now otherwise, distutils_src_install will install it
+ mv README README.gtk || die "mv failed"
+
+ distutils_src_install
+
+ # installing docs
+ dodoc README.gtk ../{CREDITS,README} || die "dodoc failed"
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ distutils_pkg_postinst
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+
+ ewarn
+ ewarn "If miro doesn't play some video or audio format, please"
+ ewarn "check your USE flags on media-plugins/gst-plugins-meta"
+ ewarn
+ elog "Miro for Linux doesn't support Adobe Flash, therefore you"
+ elog "you will not see any embedded video player on MiroGuide."
+ elog
+}
+
+pkg_postrm() {
+ distutils_pkg_postrm
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+}
diff --git a/media-video/mjpegtools/Manifest b/media-video/mjpegtools/Manifest
new file mode 100644
index 000000000000..c59997eaa331
--- /dev/null
+++ b/media-video/mjpegtools/Manifest
@@ -0,0 +1 @@
+DIST mjpegtools-2.1.0.tar.gz 1844336 SHA256 864f143d7686377f8ab94d91283c696ebd906bf256b2eacc7e9fb4dddcedc407 SHA512 10d3288f47d7cc4de87fa63f65e0fd4bd0a9af95db77155eecccecae7a7e60ebab83eaec44cf7a2c3d9e627f0cc086eda208abee1a7a74cbf3f85e87bb979ac5 WHIRLPOOL e2e869a328e95dab22331ea1f03a669553ee01682a8e76d27d33da8b1cda46e042d252ff2b1974d08b2109ab1a664f4d5247ee92d7846876d496c7e63b472af9
diff --git a/media-video/mjpegtools/files/mjpegtools-2.1.0-no_format.patch b/media-video/mjpegtools/files/mjpegtools-2.1.0-no_format.patch
new file mode 100644
index 000000000000..20ed99628fb6
--- /dev/null
+++ b/media-video/mjpegtools/files/mjpegtools-2.1.0-no_format.patch
@@ -0,0 +1,70 @@
+--- ./lavtools/lav_io.c.orig 2014-07-27 17:48:21.474622974 +0100
++++ ./lavtools/lav_io.c 2014-07-27 17:48:48.838881166 +0100
+@@ -926,7 +926,7 @@ lav_file_t *lav_open_input_file(char *fi
+ strcat(errmsg, ", quicktime");
+ #endif
+ strcat(errmsg, ").\n");
+- fprintf(stderr, errmsg);
++ fprintf(stderr, "%s", errmsg);
+ free(lav_fd);
+ internal_error = ERROR_FORMAT; /* Format not recognized */
+ return 0;
+--- ./lavtools/lavtrans.c.orig 2014-07-27 17:58:09.410282056 +0100
++++ ./lavtools/lavtrans.c 2014-07-27 17:59:24.769016140 +0100
+@@ -275,7 +275,7 @@ int main(int argc, char ** argv)
+ if (process_image_frame != -1)
+ {
+ nv = el_get_video_frame(vbuff, process_image_frame, &el);
+- sprintf(imgfname,outfile);
++ sprintf(imgfname, "%s", outfile);
+ imgfd = fopen(imgfname,"wb");
+ if (imgfd==0) system_error("opening image file","fopen");
+ res = fwrite(vbuff,nv,1,imgfd);
+--- ./lavtools/jpeg2yuv.c.orig 2014-07-27 18:00:55.600900476 +0100
++++ ./lavtools/jpeg2yuv.c 2014-07-27 18:01:36.848301893 +0100
+@@ -451,7 +451,7 @@ static int generate_YUV4MPEG(parameters_
+
+ if (firstjpeg) {
+ p = firstjpeg;
+- sprintf(jpegname, firstjpeg);
++ sprintf(jpegname, "%s", firstjpeg);
+ firstjpeg = NULL;
+ }
+ else {
+--- ./mplex/main.cpp.orig 2014-07-27 18:11:38.282143657 +0100
++++ ./mplex/main.cpp 2014-07-27 18:06:40.352252415 +0100
+@@ -614,7 +614,7 @@ bool CmdLineMultiplexJob::ParseWorkaroun
+ if( flag_table[flag].longname != 0 )
+ message += sep;
+ }
+- mjpeg_error( message.c_str() );
++ mjpeg_error( "%s", message.c_str() );
+ return false;
+ }
+
+--- ./yuvfilters/yuvkineco.c.orig 2014-07-27 18:15:01.476097522 +0100
++++ ./yuvfilters/yuvkineco.c 2014-07-27 18:15:29.540366245 +0100
+@@ -48,7 +48,7 @@ buf_debug(char *buf, FILE *fp, const cha
+ } else {
+ #ifdef MJPEGTOOLS
+ buf[n] = '\0';
+- mjpeg_debug(buf);
++ mjpeg_debug("%s", buf);
+ #else
+ fputs(buf, stderr);
+ #endif
+--- ./yuvfilters/yuvfilters.h.orig 2014-07-27 18:37:02.712645244 +0100
++++ ./yuvfilters/yuvfilters.h 2014-07-27 19:13:28.156101800 +0100
+@@ -34,9 +34,9 @@ extern "C" {
+
+ #ifdef MJPEGTOOLS
+ # define perror(MSG) mjpeg_error("%s: %s", MSG, strerror(errno))
+-# define WERROR(MSG) mjpeg_error(MSG)
+-# define WERRORL(MSG) mjpeg_error(MSG)
+-# define WWARN(MSG) mjpeg_warn(MSG)
++# define WERROR(MSG) mjpeg_error("%s", MSG)
++# define WERRORL(MSG) mjpeg_error("%s", MSG)
++# define WWARN(MSG) mjpeg_warn("%s", MSG)
+ #else
+ # define WERROR(MSG) write(2, MSG "\n", sizeof MSG)
+ # define WERRORL(MSG) do { write(2, MSG, strlen(MSG)); write(2, "\n", 1); } while (0)
diff --git a/media-video/mjpegtools/files/mjpegtools-2.1.0-pic.patch b/media-video/mjpegtools/files/mjpegtools-2.1.0-pic.patch
new file mode 100644
index 000000000000..7d0d1b60c017
--- /dev/null
+++ b/media-video/mjpegtools/files/mjpegtools-2.1.0-pic.patch
@@ -0,0 +1,69 @@
+Index: y4mdenoise/Makefile.am
+===================================================================
+RCS file: /cvsroot/mjpeg/mjpeg_play/y4mdenoise/Makefile.am,v
+retrieving revision 1.12
+retrieving revision 1.13
+diff -u -r1.12 -r1.13
+--- y4mdenoise/Makefile.am 1 Apr 2012 08:44:49 -0000 1.12
++++ y4mdenoise/Makefile.am 28 Nov 2013 22:39:41 -0000 1.13
+@@ -4,8 +4,8 @@
+
+ EXTRA_DIST = implementation.html
+
+-AM_CFLAGS = -DNDEBUG -finline-functions @PROGRAM_NOPIC@
+-AM_CXXFLAGS = -DNDEBUG -finline-functions @PROGRAM_NOPIC@
++AM_CFLAGS = -DNDEBUG -finline-functions
++AM_CXXFLAGS = -DNDEBUG -finline-functions
+
+ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/utils
+
+Index: y4munsharp/Makefile.am
+===================================================================
+RCS file: /cvsroot/mjpeg/mjpeg_play/y4munsharp/Makefile.am,v
+retrieving revision 1.2
+retrieving revision 1.3
+diff -u -r1.2 -r1.3
+--- y4munsharp/Makefile.am 16 Jun 2005 17:09:38 -0000 1.2
++++ y4munsharp/Makefile.am 28 Nov 2013 22:39:41 -0000 1.3
+@@ -4,7 +4,7 @@
+
+ INCLUDES = -I $(top_srcdir)/utils -I $(top_srcdir)
+
+-y4munharp_CFLAGS=@PROGRAM_NOPIC@
++y4munharp_CFLAGS=
+
+ bin_PROGRAMS = y4munsharp
+
+Index: y4mutils/Makefile.am
+===================================================================
+RCS file: /cvsroot/mjpeg/mjpeg_play/y4mutils/Makefile.am,v
+retrieving revision 1.7
+retrieving revision 1.8
+diff -u -r1.7 -r1.8
+--- y4mutils/Makefile.am 1 Apr 2012 08:44:49 -0000 1.7
++++ y4mutils/Makefile.am 28 Nov 2013 22:39:41 -0000 1.8
+@@ -2,7 +2,7 @@
+
+ MAINTAINERCLEANFILES = Makefile.in
+
+-AM_CFLAGS = @PROGRAM_NOPIC@
++AM_CFLAGS =
+ AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/utils
+
+ LIBMJPEGUTILS = $(top_builddir)/utils/libmjpegutils.la
+Index: yuvscaler/Makefile.am
+===================================================================
+RCS file: /cvsroot/mjpeg/mjpeg_play/yuvscaler/Makefile.am,v
+retrieving revision 1.5
+retrieving revision 1.6
+diff -u -r1.5 -r1.6
+--- yuvscaler/Makefile.am 1 Apr 2012 08:44:49 -0000 1.5
++++ yuvscaler/Makefile.am 28 Nov 2013 22:39:41 -0000 1.6
+@@ -18,6 +18,6 @@
+
+ EXTRA_DIST = yuvscaler_implementation.txt
+
+-yuvscaler_CFLAGS=@PROGRAM_NOPIC@
++yuvscaler_CFLAGS=
+ yuvscaler_SOURCES = yuvscaler.c yuvscaler_resample.c yuvscaler_bicubic.c
+ yuvscaler_LDADD = $(LIBMJPEGUTILS) $(LIBM_LIBS)
diff --git a/media-video/mjpegtools/files/mjpegtools-2.1.0-sdl-cflags.patch b/media-video/mjpegtools/files/mjpegtools-2.1.0-sdl-cflags.patch
new file mode 100644
index 000000000000..3bb7563caaa3
--- /dev/null
+++ b/media-video/mjpegtools/files/mjpegtools-2.1.0-sdl-cflags.patch
@@ -0,0 +1,11 @@
+diff a/y4mutils/Makefile.am b/y4mutils/Makefile.am
+--- a/y4mutils/Makefile.am
++++ b/y4mutils/Makefile.am
+@@ -44,6 +44,7 @@ y4mspatialfilter_LDADD = $(LIBMJPEGUTILS) $(LIBM_LIBS)
+
+ y4mhist_SOURCES = y4mhist.c
+ y4mhist_LDADD = $(SDL_LIBS) $(SDLgfx_LIBS) $(LIBMJPEGUTILS)
++y4mhist_CPPFLAGS = $(AM_CPPFLAGS) $(SDL_CFLAGS)
+
+ y4mblack_SOURCES = y4mblack.c
+ y4mblack_LDADD = $(LIBMJPEGUTILS)
diff --git a/media-video/mjpegtools/metadata.xml b/media-video/mjpegtools/metadata.xml
new file mode 100644
index 000000000000..15e084cb227d
--- /dev/null
+++ b/media-video/mjpegtools/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>video</herd>
+ <herd>media-tv</herd>
+ <maintainer>
+ <email>billie@gentoo.org</email>
+ <name>Daniel Pielmeier</name>
+ </maintainer>
+ <use>
+ <flag name="sdlgfx">Enables y4mhist to display a graphical histogram</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">mjpeg</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/mjpegtools/mjpegtools-2.1.0-r2.ebuild b/media-video/mjpegtools/mjpegtools-2.1.0-r2.ebuild
new file mode 100644
index 000000000000..2ea7cf4386c2
--- /dev/null
+++ b/media-video/mjpegtools/mjpegtools-2.1.0-r2.ebuild
@@ -0,0 +1,117 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils flag-o-matic multilib-minimal toolchain-funcs
+
+DESCRIPTION="Tools for MJPEG video"
+HOMEPAGE="http://mjpeg.sourceforge.net/"
+SRC_URI="mirror://sourceforge/mjpeg/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="1"
+KEYWORDS="alpha amd64 ~arm hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd"
+IUSE="dv gtk cpu_flags_x86_mmx png quicktime sdl sdlgfx static-libs"
+REQUIRED_USE="sdlgfx? ( sdl )"
+
+RDEPEND="virtual/jpeg:0=[${MULTILIB_USEDEP}]
+ quicktime? ( >=media-libs/libquicktime-1.2.4-r1[${MULTILIB_USEDEP}] )
+ dv? ( >=media-libs/libdv-1.0.0-r3[${MULTILIB_USEDEP}] )
+ png? ( media-libs/libpng:0= )
+ gtk? ( x11-libs/gtk+:2 )
+ sdl? ( >=media-libs/libsdl-1.2.15-r4[${MULTILIB_USEDEP}]
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ sdlgfx? ( media-libs/sdl-gfx )
+ )"
+
+DEPEND="${RDEPEND}
+ cpu_flags_x86_mmx? ( dev-lang/nasm )
+ >=sys-apps/sed-4
+ virtual/awk
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]"
+
+RDEPEND="${RDEPEND}
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-medialibs-20140508-r4
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-pic.patch
+ # https://sourceforge.net/p/mjpeg/bugs/139/
+ epatch "${FILESDIR}"/${P}-sdl-cflags.patch
+ epatch "${FILESDIR}"/mjpegtools-2.1.0-no_format.patch
+ eautoreconf
+ sed -i -e '/ARCHFLAGS=/s:=.*:=:' configure
+}
+
+multilib_src_configure() {
+ [[ $(gcc-major-version) -eq 3 ]] && append-flags -mno-sse2
+
+ local myconf=(
+ --enable-compile-warnings
+ $(use_enable cpu_flags_x86_mmx simd-accel)
+ $(use_enable static-libs static)
+ --enable-largefile
+
+ $(use_with quicktime libquicktime)
+ $(use_with dv libdv)
+ $(use_with sdl libsdl)
+ --without-v4l
+ $(use_with sdl x)
+
+ # used by tools only
+ $(multilib_native_use_with gtk)
+ $(multilib_native_use_with png libpng)
+ $(multilib_native_use_with sdlgfx)
+
+ # used only in V4LCONF_LIBS that is not used anywhere...
+ --without-dga
+ )
+
+ ECONF_SOURCE=${S} \
+ econf "${myconf[@]}"
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ default
+ else
+ # avoid building programs
+ emake bin_PROGRAMS=
+ fi
+}
+
+multilib_src_test() {
+ # there are no tests at the moment, so it would just build
+ # all programs in non-native ABIs...
+ multilib_is_native_abi && default
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ default
+ else
+ emake DESTDIR="${D}" install \
+ bin_PROGRAMS=
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ dodoc mjpeg_howto.txt PLANS HINTS docs/FAQ.txt
+
+ prune_libtool_files --all
+}
+
+pkg_postinst() {
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ elog "mjpegtools installs user contributed scripts which require additional"
+ elog "dependencies not pulled in by the installation."
+ elog "These have to be installed manually."
+ elog "Currently known extra dpendencies are: ffmpeg, mencoder from mplayer,"
+ elog "parts of transcode, mpeg2dec from libmpeg2, sox, toolame, vcdimager, python."
+ fi
+}
diff --git a/media-video/mjpg-streamer/Manifest b/media-video/mjpg-streamer/Manifest
new file mode 100644
index 000000000000..3dcd4b596519
--- /dev/null
+++ b/media-video/mjpg-streamer/Manifest
@@ -0,0 +1,2 @@
+DIST mjpg-streamer-0_pre20120421.tar.bz2 471104 SHA256 cba3027eece48735e104522adf4682169431e0879555c1d22395b4669189aab8
+DIST mjpg-streamer-0_pre20120621.tar.bz2 471546 SHA256 585c4fd8f96f9d84d36f5c95cec79c411c2018bb2ebb10bcf73a2394ffe29c20 SHA512 dfc6077ec03fe4f239d8e25b65b7808bd489a954d8cf3aeed444e68fd9536720c2c888a5fa9f4b8d0152dab5ca0bd166a46f2cb22a357ba816eb5bc79ff11332 WHIRLPOOL 925f66c586028369858e55c62dfce136755f0958df7835869e29a0cfbad045842f5d39526ae646d728c0021c89bd31da0e89efcb556d04a5def96eaab5257af3
diff --git a/media-video/mjpg-streamer/files/0_pre20120421-make-var-instead-of-cmd.patch b/media-video/mjpg-streamer/files/0_pre20120421-make-var-instead-of-cmd.patch
new file mode 100644
index 000000000000..98d89c555e04
--- /dev/null
+++ b/media-video/mjpg-streamer/files/0_pre20120421-make-var-instead-of-cmd.patch
@@ -0,0 +1,118 @@
+Index: Makefile
+===================================================================
+--- Makefile (revision 150)
++++ Makefile (working copy)
+@@ -63,64 +63,64 @@
+ chmod 755 $(APP_BINARY)
+
+ output_autofocus.so: mjpg_streamer.h utils.h
+- make -C plugins/output_autofocus all
++ $(MAKE) -C plugins/output_autofocus all
+ cp plugins/output_autofocus/output_autofocus.so .
+
+ input_testpicture.so: mjpg_streamer.h utils.h
+- make -C plugins/input_testpicture all
++ $(MAKE) -C plugins/input_testpicture all
+ cp plugins/input_testpicture/input_testpicture.so .
+
+
+ ifeq ($(USE_LIBV4L2),true)
+ input_uvc.so: mjpg_streamer.h utils.h
+- make -C plugins/input_uvc USE_LIBV4L2=true all
++ $(MAKE) -C plugins/input_uvc USE_LIBV4L2=true all
+ cp plugins/input_uvc/input_uvc.so .
+ else
+ input_uvc.so: mjpg_streamer.h utils.h
+- make -C plugins/input_uvc all
++ $(MAKE) -C plugins/input_uvc all
+ cp plugins/input_uvc/input_uvc.so .
+ endif
+
+ input_control.so: mjpg_streamer.h utils.h
+- make -C plugins/input_control all
++ $(MAKE) -C plugins/input_control all
+ cp plugins/input_control/input_control.so .
+
+ output_file.so: mjpg_streamer.h utils.h
+- make -C plugins/output_file all
++ $(MAKE) -C plugins/output_file all
+ cp plugins/output_file/output_file.so .
+
+ ifeq ($(WXP_COMPAT),true)
+ output_http.so: mjpg_streamer.h utils.h
+- make -C plugins/output_http -DWXP_COMPAT all
++ $(MAKE) -C plugins/output_http -DWXP_COMPAT all
+ cp plugins/output_http/output_http.so .
+ else
+ output_http.so: mjpg_streamer.h utils.h
+- make -C plugins/output_http all
++ $(MAKE) -C plugins/output_http all
+ cp plugins/output_http/output_http.so .
+ endif
+
+ output_udp.so: mjpg_streamer.h utils.h
+- make -C plugins/output_udp all
++ $(MAKE) -C plugins/output_udp all
+ cp plugins/output_udp/output_udp.so .
+
+ input_gspcav1.so: mjpg_streamer.h utils.h
+- make -C plugins/input_gspcav1 all
++ $(MAKE) -C plugins/input_gspcav1 all
+ cp plugins/input_gspcav1/input_gspcav1.so .
+
+ input_file.so: mjpg_streamer.h utils.h
+- make -C plugins/input_file all
++ $(MAKE) -C plugins/input_file all
+ cp plugins/input_file/input_file.so .
+
+ output_rtsp.so: mjpg_streamer.h utils.h
+- make -C plugins/output_rtsp all
++ $(MAKE) -C plugins/output_rtsp all
+ cp plugins/output_rtsp/output_rtsp.so .
+
+ output_ptp2.so: mjpg_streamer.h utils.h
+- make -C plugins/input_ptp2 all
++ $(MAKE) -C plugins/input_ptp2 all
+ cp plugins/input_ptp2/input_ptp2.so .
+
+ #input_http.so: mjpg_streamer.h utils.h
+-# make -C plugins/input_http all
++# $(MAKE) -C plugins/input_http all
+ # cp plugins/input_http/input_http.so .
+
+ # The viewer plugin requires the SDL library for compilation
+@@ -129,22 +129,22 @@
+ # execute the following command:
+ # make output_viewer.so
+ output_viewer.so: mjpg_streamer.h utils.h
+- make -C plugins/output_viewer all
++ $(MAKE) -C plugins/output_viewer all
+ cp plugins/output_viewer/output_viewer.so .
+
+ # cleanup
+ clean:
+- make -C plugins/input_uvc $@
+- make -C plugins/input_testpicture $@
+- make -C plugins/output_file $@
+- make -C plugins/output_http $@
+- make -C plugins/output_udp $@
+- make -C plugins/output_autofocus $@
+- make -C plugins/input_gspcav1 $@
+- make -C plugins/output_viewer $@
+- make -C plugins/input_control $@
+- make -C plugins/output_rtsp $@
+-# make -C plugins/input_http $@
++ $(MAKE) -C plugins/input_uvc $@
++ $(MAKE) -C plugins/input_testpicture $@
++ $(MAKE) -C plugins/output_file $@
++ $(MAKE) -C plugins/output_http $@
++ $(MAKE) -C plugins/output_udp $@
++ $(MAKE) -C plugins/output_autofocus $@
++ $(MAKE) -C plugins/input_gspcav1 $@
++ $(MAKE) -C plugins/output_viewer $@
++ $(MAKE) -C plugins/input_control $@
++ $(MAKE) -C plugins/output_rtsp $@
++# $(MAKE) -C plugins/input_http $@
+ rm -f *.a *.o $(APP_BINARY) core *~ *.so *.lo
+
+ # useful to make a backup "make tgz"
diff --git a/media-video/mjpg-streamer/files/0_pre20120621-make-var-instead-of-cmd.patch b/media-video/mjpg-streamer/files/0_pre20120621-make-var-instead-of-cmd.patch
new file mode 100644
index 000000000000..98d89c555e04
--- /dev/null
+++ b/media-video/mjpg-streamer/files/0_pre20120621-make-var-instead-of-cmd.patch
@@ -0,0 +1,118 @@
+Index: Makefile
+===================================================================
+--- Makefile (revision 150)
++++ Makefile (working copy)
+@@ -63,64 +63,64 @@
+ chmod 755 $(APP_BINARY)
+
+ output_autofocus.so: mjpg_streamer.h utils.h
+- make -C plugins/output_autofocus all
++ $(MAKE) -C plugins/output_autofocus all
+ cp plugins/output_autofocus/output_autofocus.so .
+
+ input_testpicture.so: mjpg_streamer.h utils.h
+- make -C plugins/input_testpicture all
++ $(MAKE) -C plugins/input_testpicture all
+ cp plugins/input_testpicture/input_testpicture.so .
+
+
+ ifeq ($(USE_LIBV4L2),true)
+ input_uvc.so: mjpg_streamer.h utils.h
+- make -C plugins/input_uvc USE_LIBV4L2=true all
++ $(MAKE) -C plugins/input_uvc USE_LIBV4L2=true all
+ cp plugins/input_uvc/input_uvc.so .
+ else
+ input_uvc.so: mjpg_streamer.h utils.h
+- make -C plugins/input_uvc all
++ $(MAKE) -C plugins/input_uvc all
+ cp plugins/input_uvc/input_uvc.so .
+ endif
+
+ input_control.so: mjpg_streamer.h utils.h
+- make -C plugins/input_control all
++ $(MAKE) -C plugins/input_control all
+ cp plugins/input_control/input_control.so .
+
+ output_file.so: mjpg_streamer.h utils.h
+- make -C plugins/output_file all
++ $(MAKE) -C plugins/output_file all
+ cp plugins/output_file/output_file.so .
+
+ ifeq ($(WXP_COMPAT),true)
+ output_http.so: mjpg_streamer.h utils.h
+- make -C plugins/output_http -DWXP_COMPAT all
++ $(MAKE) -C plugins/output_http -DWXP_COMPAT all
+ cp plugins/output_http/output_http.so .
+ else
+ output_http.so: mjpg_streamer.h utils.h
+- make -C plugins/output_http all
++ $(MAKE) -C plugins/output_http all
+ cp plugins/output_http/output_http.so .
+ endif
+
+ output_udp.so: mjpg_streamer.h utils.h
+- make -C plugins/output_udp all
++ $(MAKE) -C plugins/output_udp all
+ cp plugins/output_udp/output_udp.so .
+
+ input_gspcav1.so: mjpg_streamer.h utils.h
+- make -C plugins/input_gspcav1 all
++ $(MAKE) -C plugins/input_gspcav1 all
+ cp plugins/input_gspcav1/input_gspcav1.so .
+
+ input_file.so: mjpg_streamer.h utils.h
+- make -C plugins/input_file all
++ $(MAKE) -C plugins/input_file all
+ cp plugins/input_file/input_file.so .
+
+ output_rtsp.so: mjpg_streamer.h utils.h
+- make -C plugins/output_rtsp all
++ $(MAKE) -C plugins/output_rtsp all
+ cp plugins/output_rtsp/output_rtsp.so .
+
+ output_ptp2.so: mjpg_streamer.h utils.h
+- make -C plugins/input_ptp2 all
++ $(MAKE) -C plugins/input_ptp2 all
+ cp plugins/input_ptp2/input_ptp2.so .
+
+ #input_http.so: mjpg_streamer.h utils.h
+-# make -C plugins/input_http all
++# $(MAKE) -C plugins/input_http all
+ # cp plugins/input_http/input_http.so .
+
+ # The viewer plugin requires the SDL library for compilation
+@@ -129,22 +129,22 @@
+ # execute the following command:
+ # make output_viewer.so
+ output_viewer.so: mjpg_streamer.h utils.h
+- make -C plugins/output_viewer all
++ $(MAKE) -C plugins/output_viewer all
+ cp plugins/output_viewer/output_viewer.so .
+
+ # cleanup
+ clean:
+- make -C plugins/input_uvc $@
+- make -C plugins/input_testpicture $@
+- make -C plugins/output_file $@
+- make -C plugins/output_http $@
+- make -C plugins/output_udp $@
+- make -C plugins/output_autofocus $@
+- make -C plugins/input_gspcav1 $@
+- make -C plugins/output_viewer $@
+- make -C plugins/input_control $@
+- make -C plugins/output_rtsp $@
+-# make -C plugins/input_http $@
++ $(MAKE) -C plugins/input_uvc $@
++ $(MAKE) -C plugins/input_testpicture $@
++ $(MAKE) -C plugins/output_file $@
++ $(MAKE) -C plugins/output_http $@
++ $(MAKE) -C plugins/output_udp $@
++ $(MAKE) -C plugins/output_autofocus $@
++ $(MAKE) -C plugins/input_gspcav1 $@
++ $(MAKE) -C plugins/output_viewer $@
++ $(MAKE) -C plugins/input_control $@
++ $(MAKE) -C plugins/output_rtsp $@
++# $(MAKE) -C plugins/input_http $@
+ rm -f *.a *.o $(APP_BINARY) core *~ *.so *.lo
+
+ # useful to make a backup "make tgz"
diff --git a/media-video/mjpg-streamer/files/mjpg-streamer.confd b/media-video/mjpg-streamer/files/mjpg-streamer.confd
new file mode 100644
index 000000000000..07a81b04dcee
--- /dev/null
+++ b/media-video/mjpg-streamer/files/mjpg-streamer.confd
@@ -0,0 +1,21 @@
+# The input plugins and options:
+# uvc
+# testpicture
+# file
+#ex. INPUT_PLUGIN="uvc"
+INPUT_PLUGIN=""
+INPUT_PLUGIN_OPTS=""
+
+# The output plugins and options:
+# autofocus
+# file
+# http
+# udp
+# rtsp
+#ex. OUTPUT_PLUGIN="http"
+OUTPUT_PLUGIN=""
+OUTPUT_PLUGIN_OPTS=""
+
+# Deamon runing as user/group
+MJPG_STREAMER_USER="nobody"
+MJPG_STREAMER_GROUP="video"
diff --git a/media-video/mjpg-streamer/files/mjpg-streamer.initd b/media-video/mjpg-streamer/files/mjpg-streamer.initd
new file mode 100644
index 000000000000..d64a39ab9621
--- /dev/null
+++ b/media-video/mjpg-streamer/files/mjpg-streamer.initd
@@ -0,0 +1,48 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+MJPG_STREAMER_PIDFILE="${MJPG_STREAMER_PIDFILE:-/var/run/${SVCNAME}.pid}"
+MY_NAME=${SVCNAME//-/_}
+
+depend() {
+ use logger
+}
+
+checkconfig() {
+ local vars
+
+ [[ ${INPUT_PLUGIN} ]] || vars+=\ INPUT_PLUGIN
+ [[ ${OUTPUT_PLUGIN} ]] || vars+=\ OUTPUT_PLUGIN
+ [[ ${MJPG_STREAMER_USER} ]] || vars+=\ MJPG_STREAMER_USER
+ [[ ${MJPG_STREAMER_GROUP} ]] || vars+=\ MJPG_STREAMER_GROUP
+ vars="${vars# }"
+
+ if [[ ${vars} ]]; then
+ eerror "Required variables in /etc/conf.d/${SVCNAME} are not set:"
+ eerror " ${vars// /, }"
+ return 1
+ fi
+
+ return 0
+}
+
+start() {
+ checkconfig || return $?
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --exec /usr/bin/${MY_NAME} \
+ --user "${MJPG_STREAMER_USER}" \
+ --group "${MJPG_STREAMER_GROUP}" -w 100 -b -m \
+ --pidfile "${MJPG_STREAMER_PIDFILE}" \
+ -- -i "/usr/lib/input_${INPUT_PLUGIN}.so ${INPUT_PLUGIN_OPTS}" \
+ -o "/usr/lib/output_${OUTPUT_PLUGIN}.so ${OUTPUT_PLUGIN_OPTS}"
+ eend $? "Check syslog to see why startup failed."
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --exec /usr/bin/${MY_NAME} \
+ --pidfile "${MJPG_STREAMER_PIDFILE}"
+ eend $?
+}
diff --git a/media-video/mjpg-streamer/metadata.xml b/media-video/mjpg-streamer/metadata.xml
new file mode 100644
index 000000000000..bd61883a65c5
--- /dev/null
+++ b/media-video/mjpg-streamer/metadata.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>andrzej.pauli@gmail.com</email>
+ <name>Andrzej Pauli</name>
+ <description>Maintainer. Assign bugs to him.</description>
+ </maintainer>
+ <maintainer>
+ <email>aidecoe@gentoo.org</email>
+ <name>Amadeusz Żołnowski</name>
+ <description>Proxy maintainer. CC him on bugs.</description>
+ </maintainer>
+ <longdescription lang="en">
+ MJPG-streamer takes JPGs from Linux-UVC compatible webcams, filesystem or
+ other input plugins and streams them as M-JPEG via HTTP to webbrowsers,
+ VLC and other software. It is the successor of uvc-streamer, a Linux-UVC
+ streaming application with Pan/Tilt
+ </longdescription>
+ <use>
+ <flag name='input_testpicture'>Plugin for sending compiled in, test
+ pictures</flag>
+ <flag name='input_control'>Plugin giving ability to control camera
+ movement (only specific cameras)</flag>
+ <flag name='input_file'>Plugin that watches given directory and send
+ it's content</flag>
+ <flag name='input_uvc'>Plugin that sends video stream from UVC
+ compatible camera</flag>
+ <flag name='output_file'>Plugin that saves received content under given
+ location</flag>
+ <flag name='output_udp'>Plugin receiving content over UDP and storing to
+ a directory</flag>
+ <flag name='output_http'>Small HTTP server plugin which sends WWW
+ directory content and streams image content</flag>
+ <flag name='output_autofocus'>Auto focusing plugin</flag>
+ <flag name='output_rtsp'>Plugin which provides a mechanism to take
+ snapshots with a trigger from a UDP packet</flag>
+ <flag name='www'>Installs WWW content</flag>
+ <flag name='v4l'>Uses <pkg>media-libs/libv4l</pkg> function mapping for
+ input_uvc plugin</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-video/mjpg-streamer/mjpg-streamer-0_pre20120421.ebuild b/media-video/mjpg-streamer/mjpg-streamer-0_pre20120421.ebuild
new file mode 100644
index 000000000000..2e1db0993aa3
--- /dev/null
+++ b/media-video/mjpg-streamer/mjpg-streamer-0_pre20120421.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils
+
+DESCRIPTION="MJPG-streamer takes JPGs from Linux-UVC compatible webcams"
+HOMEPAGE="http://sourceforge.net/projects/mjpg-streamer"
+SRC_URI="http://dev.gentoo.org/~aidecoe/distfiles/${CATEGORY}/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+
+INPUT_PLUGINS="input_testpicture input_control input_file input_uvc"
+OUTPUT_PLUGINS="output_file output_udp output_http output_autofocus output_rtsp"
+IUSE_PLUGINS="${INPUT_PLUGINS} ${OUTPUT_PLUGINS} +input_file +output_http"
+IUSE="${IUSE_PLUGINS} www v4l"
+REQUIRED_USE="|| ( ${INPUT_PLUGINS} )
+ || ( ${OUTPUT_PLUGINS} )
+ v4l? ( input_uvc )"
+
+RDEPEND="virtual/jpeg
+ v4l? ( input_uvc? ( media-libs/libv4l ) )"
+DEPEND="${RDEPEND}
+ input_testpicture? ( media-gfx/imagemagick )"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PV}-make-var-instead-of-cmd.patch"
+
+ local flag switch
+
+ for flag in ${IUSE_PLUGINS}; do
+ use ${flag} && switch='' || switch='#'
+ sed -i \
+ -e "s|^#*PLUGINS +\?= ${flag}.so|${switch}PLUGINS += ${flag}.so|" \
+ Makefile
+ done
+}
+
+src_compile() {
+ local v4l=$(use v4l && use input_uvc && echo 'USE_LIBV4L2=true')
+ emake ${v4l}
+}
+
+src_install() {
+ into /usr
+ dobin ${PN//-/_}
+ dolib.so *.so
+
+ if use www ; then
+ insinto /usr/share/${PN}
+ doins -r www
+ fi
+
+ dodoc README TODO
+
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+}
+
+pkg_postinst() {
+ elog "Remember to set an input and output plugin for mjpg-streamer."
+
+ if use www ; then
+ echo
+ elog "An example webinterface has been installed into"
+ elog "/usr/share/mjpg-streamer/www for your usage."
+ fi
+}
diff --git a/media-video/mjpg-streamer/mjpg-streamer-0_pre20120621.ebuild b/media-video/mjpg-streamer/mjpg-streamer-0_pre20120621.ebuild
new file mode 100644
index 000000000000..8c7283be1048
--- /dev/null
+++ b/media-video/mjpg-streamer/mjpg-streamer-0_pre20120621.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils
+
+DESCRIPTION="MJPG-streamer takes JPGs from Linux-UVC compatible webcams"
+HOMEPAGE="http://sourceforge.net/projects/mjpg-streamer"
+SRC_URI="http://dev.gentoo.org/~aidecoe/distfiles/${CATEGORY}/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+
+INPUT_PLUGINS="input_testpicture input_control input_file input_uvc"
+OUTPUT_PLUGINS="output_file output_udp output_http output_autofocus output_rtsp"
+IUSE_PLUGINS="${INPUT_PLUGINS} ${OUTPUT_PLUGINS}"
+IUSE="input_testpicture input_control +input_file input_uvc output_file
+ output_udp +output_http output_autofocus output_rtsp
+ www v4l"
+REQUIRED_USE="|| ( ${INPUT_PLUGINS} )
+ || ( ${OUTPUT_PLUGINS} )
+ v4l? ( input_uvc )"
+
+RDEPEND="virtual/jpeg
+ v4l? ( input_uvc? ( media-libs/libv4l ) )"
+DEPEND="${RDEPEND}
+ input_testpicture? ( media-gfx/imagemagick )"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PV}-make-var-instead-of-cmd.patch"
+
+ local flag switch
+
+ for flag in ${IUSE_PLUGINS}; do
+ use ${flag} && switch='' || switch='#'
+ sed -i \
+ -e "s|^#*PLUGINS +\?= ${flag}.so|${switch}PLUGINS += ${flag}.so|" \
+ Makefile
+ done
+}
+
+src_compile() {
+ local v4l=$(use v4l && use input_uvc && echo 'USE_LIBV4L2=true')
+ emake ${v4l}
+}
+
+src_install() {
+ into /usr
+ dobin ${PN//-/_}
+ dolib.so *.so
+
+ if use www ; then
+ insinto /usr/share/${PN}
+ doins -r www
+ fi
+
+ dodoc README TODO
+
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+}
+
+pkg_postinst() {
+ elog "Remember to set an input and output plugin for mjpg-streamer."
+
+ if use www ; then
+ echo
+ elog "An example webinterface has been installed into"
+ elog "/usr/share/mjpg-streamer/www for your usage."
+ fi
+}
diff --git a/media-video/mkclean/Manifest b/media-video/mkclean/Manifest
new file mode 100644
index 000000000000..a8c9e29b5dfa
--- /dev/null
+++ b/media-video/mkclean/Manifest
@@ -0,0 +1,2 @@
+DIST mkclean-0.8.6.tar.bz2 730851 SHA256 6e81a7522ef47ddfefb4ae1f5d9bee217190741b6660f5240dba85bc4faf4a44
+DIST mkclean-0.8.7.tar.bz2 737877 SHA256 88713065a172d1ab7fd34c8854a42f6bf8d0e794957265340328a2f692ad46d9 SHA512 74c7a9d5f6998b0b8b6b8880064b794e72d2f4733a31cede4be3b88092254ed03545a7d4637ca1e9cab17615584594b96f8b2c072921e3640abeec2de052eb1f WHIRLPOOL 9c16947d916df05d47e57799e2f24f92bb01f37f5c88148b2d07a26069cbfc65bd8945af81e52a10e9bd8da18484776f6c39c9bea85b97f5120f2fbe461509c6
diff --git a/media-video/mkclean/metadata.xml b/media-video/mkclean/metadata.xml
new file mode 100644
index 000000000000..29823979ed85
--- /dev/null
+++ b/media-video/mkclean/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>video</herd>
+ <longdescription lang="en">
+ mkclean is a command line tool to clean and optimize Matroska (.mkv / .mka / .mks / .mk3d) and WebM (.webm / .weba) files that have already been muxed. It reorders the elements with the Cues at the front, so your Matroska files are ready to be streamed efficiently over the web. It also removes elements not found in the Matroska specs and the extra Meta Seek list of Clusters that some program add to their file. It can also optionally remux the Cluster blocks to start each boundary with a keyframe and the matching audio/subtitle blocks for that keyframe.
+ </longdescription>
+</pkgmetadata>
diff --git a/media-video/mkclean/mkclean-0.8.6-r1.ebuild b/media-video/mkclean/mkclean-0.8.6-r1.ebuild
new file mode 100644
index 000000000000..6774cfdf91ba
--- /dev/null
+++ b/media-video/mkclean/mkclean-0.8.6-r1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils
+
+DESCRIPTION="mkclean is a command line tool to clean and optimize Matroska files"
+HOMEPAGE="http://www.matroska.org/downloads/mkclean.html"
+SRC_URI="http://downloads.sourceforge.net/project/matroska/${PN}/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ ./configure # non-standard configure
+
+ # fixing generated makefiles
+ sed -i -e 's|^\(LFLAGS.*+=.*\$(LIBS)\)|\1 \$(LDFLAGS)|g' \
+ -e 's|^\(STRIP.*=\)|\1 echo|g' $(find -name "*.mak")
+}
+
+src_compile() {
+ emake -f GNUmakefile -j1
+ emake -C mkclean -f mkWDclean.mak -j1
+ emake -C mkclean/regression -f mkcleanreg.mak -j1
+}
+
+src_install() {
+ dobin release/*/mk*clean*
+ newdoc ChangeLog.txt ChangeLog
+ newdoc ReadMe.txt README
+}
diff --git a/media-video/mkclean/mkclean-0.8.7.ebuild b/media-video/mkclean/mkclean-0.8.7.ebuild
new file mode 100644
index 000000000000..42f5aa8e3981
--- /dev/null
+++ b/media-video/mkclean/mkclean-0.8.7.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="mkclean is a command line tool to clean and optimize Matroska files"
+HOMEPAGE="http://www.matroska.org/downloads/mkclean.html"
+SRC_URI="http://downloads.sourceforge.net/project/matroska/${PN}/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+src_configure() {
+ # non-standard configure
+ ./configure || die
+
+ # fixing generated makefiles
+ sed -i -e 's|^\(LFLAGS.*+=.*\$(LIBS)\)|\1 \$(LDFLAGS)|g' \
+ -e 's|^\(STRIP.*=\)|\1 echo|g' $(find -name "*.mak") || die
+}
+
+src_compile() {
+ emake -f GNUmakefile -j1
+ emake -C mkclean -f mkWDclean.mak -j1
+ emake -C mkclean/regression -f mkcleanreg.mak -j1
+}
+
+src_install() {
+ dobin release/*/mk*clean*
+ newdoc ChangeLog.txt ChangeLog
+ newdoc ReadMe.txt README
+}
diff --git a/media-video/mkvalidator/Manifest b/media-video/mkvalidator/Manifest
new file mode 100644
index 000000000000..ca3b80b266d1
--- /dev/null
+++ b/media-video/mkvalidator/Manifest
@@ -0,0 +1,4 @@
+DIST mkvalidator-0.3.7.tar.bz2 579174 SHA256 236247098052022757243a3c7ae5939b4ca34e07c573e3344346c4ca66c66ba1
+DIST mkvalidator-0.4.0.tar.bz2 579322 SHA256 68457cb1a11b0beffc9395690a38754bfceefb6a210cc4039f689e0e70aea520
+DIST mkvalidator-0.4.1.tar.bz2 588267 SHA256 dedb36df9ea25d27795105649dcf9b5cab5de1ea03fc12c7bfade44d33cf58ba SHA512 13942cffaac8b0138df27cdbeae0afb22d90617195e1c863d2f43b46b0d0c57c9fc1637b635cdfb810bb20d80a50e2e545efdac0e636d4ae3c9fd097979b53c2 WHIRLPOOL db9ba20a956485b376f202a101fbdbf49fcb5bf88e52f93e8cea1fa4957e743e7dc6461b1c0c8ee6cb36bbb7e5e6fb0d49613f5195023b107dfa3552805f2157
+DIST mkvalidator-0.4.2.tar.bz2 579080 SHA256 9f626b8ae790642d63533da00639c61ef9b0548f6e75cd17544acb352efab77f SHA512 e7b9c8fba15389fddee177b3c27fb6b1ce16f143cecb830d05989a07a06a4eac2b11e56ad39f129f2d1410a16cff481abd6dc21d7c1eb1ab3c64e9826f90869c WHIRLPOOL 69825698b3de29f187c99f33eaa513cf82e65a38dfeb9c23c7da847f457c8c108525b4b8cfd2481380107a2661ca89cc2e25041be3409bcaaa5c964c88fd4ed3
diff --git a/media-video/mkvalidator/metadata.xml b/media-video/mkvalidator/metadata.xml
new file mode 100644
index 000000000000..7c38ace4ee30
--- /dev/null
+++ b/media-video/mkvalidator/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>video</herd>
+ <longdescription lang="en">
+ mkvalidator is a simple command line tool to verify Matroska and WebM files for spec conformance. It checks the various bogus or missing key elements against the EBML DocType version of the file and reports the errors/warnings in the command line.
+ </longdescription>
+</pkgmetadata>
diff --git a/media-video/mkvalidator/mkvalidator-0.3.7-r1.ebuild b/media-video/mkvalidator/mkvalidator-0.3.7-r1.ebuild
new file mode 100644
index 000000000000..063b7c89f21f
--- /dev/null
+++ b/media-video/mkvalidator/mkvalidator-0.3.7-r1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils
+
+DESCRIPTION="mkvalidator is a command line tool to verify Matroska files for spec conformance"
+HOMEPAGE="http://www.matroska.org/downloads/mkvalidator.html"
+SRC_URI="http://downloads.sourceforge.net/project/matroska/${PN}/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ ./configure # non-standard configure
+
+ # fixing generated makefiles
+ sed -i -e 's|^\(LFLAGS.*+=.*\$(LIBS)\)|\1 \$(LDFLAGS)|g' \
+ -e 's|^\(STRIP.*=\)|\1 echo|g' $(find -name "*.mak")
+}
+
+src_install() {
+ dobin release/*/mkv*
+ newdoc ChangeLog.txt ChangeLog
+ newdoc ReadMe.txt README
+}
diff --git a/media-video/mkvalidator/mkvalidator-0.4.0.ebuild b/media-video/mkvalidator/mkvalidator-0.4.0.ebuild
new file mode 100644
index 000000000000..c295782133d8
--- /dev/null
+++ b/media-video/mkvalidator/mkvalidator-0.4.0.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils
+
+DESCRIPTION="mkvalidator is a command line tool to verify Matroska files for spec conformance"
+HOMEPAGE="http://www.matroska.org/downloads/mkvalidator.html"
+SRC_URI="http://downloads.sourceforge.net/project/matroska/${PN}/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ ./configure # non-standard configure
+
+ # fixing generated makefiles
+ sed -i -e 's|^\(LFLAGS.*+=.*\$(LIBS)\)|\1 \$(LDFLAGS)|g' \
+ -e 's|^\(STRIP.*=\)|\1 echo|g' $(find -name "*.mak")
+}
+
+src_compile() {
+ emake -j1
+}
+
+src_install() {
+ dobin release/*/mkv*
+ newdoc ChangeLog.txt ChangeLog
+ newdoc ReadMe.txt README
+}
diff --git a/media-video/mkvalidator/mkvalidator-0.4.1.ebuild b/media-video/mkvalidator/mkvalidator-0.4.1.ebuild
new file mode 100644
index 000000000000..8eb8e8eef68c
--- /dev/null
+++ b/media-video/mkvalidator/mkvalidator-0.4.1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="mkvalidator is a command line tool to verify Matroska files for spec conformance"
+HOMEPAGE="http://www.matroska.org/downloads/mkvalidator.html"
+SRC_URI="http://downloads.sourceforge.net/project/matroska/${PN}/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+src_configure() {
+ # non-standard configure
+ ./configure || die
+
+ # fixing generated makefiles
+ sed -i -e 's|^\(LFLAGS.*+=.*\$(LIBS)\)|\1 \$(LDFLAGS)|g' \
+ -e 's|^\(STRIP.*=\)|\1 echo|g' $(find -name "*.mak") || die
+}
+
+src_compile() {
+ emake -j1
+}
+
+src_install() {
+ dobin release/*/mkv*
+ newdoc ChangeLog.txt ChangeLog
+ newdoc ReadMe.txt README
+}
diff --git a/media-video/mkvalidator/mkvalidator-0.4.2.ebuild b/media-video/mkvalidator/mkvalidator-0.4.2.ebuild
new file mode 100644
index 000000000000..9136f024a97a
--- /dev/null
+++ b/media-video/mkvalidator/mkvalidator-0.4.2.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="mkvalidator is a command line tool to verify Matroska files for spec conformance"
+HOMEPAGE="http://www.matroska.org/downloads/mkvalidator.html"
+SRC_URI="http://downloads.sourceforge.net/project/matroska/${PN}/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+src_configure() {
+ # non-standard configure
+ ./configure || die
+
+ # fixing generated makefiles
+ sed -i -e 's|^\(LFLAGS.*+=.*\$(LIBS)\)|\1 \$(LDFLAGS)|g' \
+ -e 's|^\(STRIP.*=\)|\1 echo|g' $(find -name "*.mak") || die
+}
+
+src_compile() {
+ emake -j1
+}
+
+src_install() {
+ dobin release/*/mkv*
+ newdoc ChangeLog.txt ChangeLog
+ newdoc ReadMe.txt README
+}
diff --git a/media-video/mkvtoolnix/Manifest b/media-video/mkvtoolnix/Manifest
new file mode 100644
index 000000000000..aaac3129750f
--- /dev/null
+++ b/media-video/mkvtoolnix/Manifest
@@ -0,0 +1,2 @@
+DIST mkvtoolnix-6.6.0.tar.xz 5174424 SHA256 cb1f965617fe064cf78457d3fbd0685eb31ae5b7e205cf4c8e74b6f27f3399e3 SHA512 c86f10a0a919e6d28c2587b60663c38713cfa6ca0a5188524b81af2fd60e4ea626a01431d29c6ae5885eae05d71af93d857986c5008aec4963dacc3ead9dc26f WHIRLPOOL 55a15bb2fdb62af85e189c39b1a1391d33eb08b4ba116fc307965be6817a944b21d18c034b9a3da16a6e84e93544dbd59f3c7fe9406ab454e15cf8ee1eb815c3
+DIST mkvtoolnix-8.2.0.tar.xz 5856988 SHA256 eb6d3d7a0254bb4326dccc9983418801783198cdf4a259f31261dab4e843a5c4 SHA512 200fad08f6912081d7aabbae9330dc41b90af8d6fdce592090b9fedf2325a91f70d3a85ff40b03b57b0682a075050b6b73307872c1e716e8261849c3fb97968b WHIRLPOOL 1b25cd8913eb02018d62de369171ee1a48d31cbce6684c0c7febd2f88c3286bbf386c825ddeae54ef411dc14cc128c9e833408f9b0ac9cb1d5e525ba34aaa4ae
diff --git a/media-video/mkvtoolnix/files/mkvtoolnix-5.8.0-boost-configure.patch b/media-video/mkvtoolnix/files/mkvtoolnix-5.8.0-boost-configure.patch
new file mode 100644
index 000000000000..72b94b9688c8
--- /dev/null
+++ b/media-video/mkvtoolnix/files/mkvtoolnix-5.8.0-boost-configure.patch
@@ -0,0 +1,63 @@
+diff --git a/ac/ax_boost_filesystem.m4 b/ac/ax_boost_filesystem.m4
+index 97c4ad0..87b94a8 100644
+--- a/ac/ax_boost_filesystem.m4
++++ b/ac/ax_boost_filesystem.m4
+@@ -81,14 +81,14 @@ AC_DEFUN([AX_BOOST_FILESYSTEM],
+ AC_DEFINE(HAVE_BOOST_FILESYSTEM,,[define if the Boost::Filesystem library is available])
+ BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
+ if test "x$ax_boost_user_filesystem_lib" = "x"; then
+- for libextension in `ls $BOOSTLIBDIR/libboost_filesystem*.{so,dylib,a}* 2>/dev/null | sed 's,.*/,,' | sed -e 's,^lib\(boost_filesystem.*\)\.so.*$,\1,' -e 's,^lib\(boost_filesystem.*\)\.dylib.*$,\1,' -e 's,^lib\(boost_filesystem.*\)\.a.*$,\1,'`; do
++ for libextension in `ls $BOOSTLIBDIR/libboost_filesystem*.so* $BOOSTLIBDIR/libboost_filesystem*.dylib* $BOOSTLIBDIR/libboost_filesystem*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_filesystem.*\)\.\(dylib\|a\|so\).*$;\1;'` ; do
+ ax_lib=${libextension}
+ AC_CHECK_LIB($ax_lib, exit,
+ [BOOST_FILESYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_FILESYSTEM_LIB) link_filesystem="yes"; break],
+ [link_filesystem="no"],[$BOOST_SYSTEM_LIB])
+ done
+ if test "x$link_filesystem" != "xyes"; then
+- for libextension in `ls $BOOSTLIBDIR/boost_filesystem*.{dll,a}* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_filesystem.*\)\.dll.*$;\1;' -e 's;^\(boost_filesystem.*\)\.a*$;\1;'` ; do
++ for libextension in `ls $BOOSTLIBDIR/boost_filesystem*.dll* $BOOSTLIBDIR/boost_filesystem*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_filesystem.*\)\.\(dll\|a\).*$;\1;'` ; do
+ ax_lib=${libextension}
+ AC_CHECK_LIB($ax_lib, exit,
+ [BOOST_FILESYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_FILESYSTEM_LIB) link_filesystem="yes"; break],
+diff --git a/ac/ax_boost_regex.m4 b/ac/ax_boost_regex.m4
+index ffd537f..2cef64f 100644
+--- a/ac/ax_boost_regex.m4
++++ b/ac/ax_boost_regex.m4
+@@ -75,14 +75,14 @@ AC_DEFUN([AX_BOOST_REGEX],
+ AC_DEFINE(HAVE_BOOST_REGEX,,[define if the Boost::Regex library is available])
+ BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
+ if test "x$ax_boost_user_regex_lib" = "x"; then
+- for libextension in `ls $BOOSTLIBDIR/libboost_regex*.{so,dylib,a}* 2>/dev/null | sed 's,.*/,,' | sed -e 's,^lib\(boost_regex.*\)\.so.*$,\1,' -e 's,^lib\(boost_regex.*\)\.dylib.*$,\1,' -e 's,^lib\(boost_regex.*\)\.a.*$,\1,'`; do
++ for libextension in `ls $BOOSTLIBDIR/libboost_regex*.so* $BOOSTLIBDIR/libboost_regex*.dylib* $BOOSTLIBDIR/libboost_regex*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_regex.*\)\.so.*$;\1;' -e 's;^lib\(boost_regex.*\)\.dylib.*;\1;' -e 's;^lib\(boost_regex.*\)\.a.*$;\1;'` ; do
+ ax_lib=${libextension}
+ AC_CHECK_LIB($ax_lib, exit,
+ [BOOST_REGEX_LIB="-l$ax_lib"; AC_SUBST(BOOST_REGEX_LIB) link_regex="yes"; break],
+ [link_regex="no"])
+ done
+ if test "x$link_regex" != "xyes"; then
+- for libextension in `ls $BOOSTLIBDIR/boost_regex*.{dll,a}* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_regex.*\)\.dll.*$;\1;' -e 's;^\(boost_regex.*\)\.a*$;\1;'` ; do
++ for libextension in `ls $BOOSTLIBDIR/boost_regex*.dll* $BOOSTLIBDIR/boost_regex*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_regex.*\)\.dll.*$;\1;' -e 's;^\(boost_regex.*\)\.a.*$;\1;'` ; do
+ ax_lib=${libextension}
+ AC_CHECK_LIB($ax_lib, exit,
+ [BOOST_REGEX_LIB="-l$ax_lib"; AC_SUBST(BOOST_REGEX_LIB) link_regex="yes"; break],
+diff --git a/ac/ax_boost_system.m4 b/ac/ax_boost_system.m4
+index b0685b9..a71907b 100644
+--- a/ac/ax_boost_system.m4
++++ b/ac/ax_boost_system.m4
+@@ -83,14 +83,14 @@ AC_DEFUN([AX_BOOST_SYSTEM],
+
+ LDFLAGS_SAVE=$LDFLAGS
+ if test "x$ax_boost_user_system_lib" = "x"; then
+- for libextension in `ls $BOOSTLIBDIR/libboost_system*.{so,dylib,a}* 2>/dev/null | sed 's,.*/,,' | sed -e 's,^lib\(boost_system.*\)\.so.*$,\1,' -e 's,^lib\(boost_system.*\)\.dylib.*$,\1,' -e 's,^lib\(boost_system.*\)\.a.*$,\1,'`; do
++ for libextension in `ls $BOOSTLIBDIR/libboost_system*.a* $BOOSTLIBDIR/libboost_system*.so* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_system.*\)\.\(so\|a\).*$;\1;'` ; do
+ ax_lib=${libextension}
+ AC_CHECK_LIB($ax_lib, exit,
+ [BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break],
+ [link_system="no"])
+ done
+ if test "x$link_system" != "xyes"; then
+- for libextension in `ls $BOOSTLIBDIR/boost_system*.{dll,a}* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_system.*\)\.dll.*$;\1;' -e 's;^\(boost_system.*\)\.a*$;\1;'` ; do
++ for libextension in `ls $BOOSTLIBDIR/boost_system*.{dll,a}* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_system.*\)\.\(dll\|a\).*$;\1;'` ; do
+ ax_lib=${libextension}
+ AC_CHECK_LIB($ax_lib, exit,
+ [BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break],
diff --git a/media-video/mkvtoolnix/files/mkvtoolnix-5.8.0-system-pugixml.patch b/media-video/mkvtoolnix/files/mkvtoolnix-5.8.0-system-pugixml.patch
new file mode 100644
index 000000000000..a3fcf21947e5
--- /dev/null
+++ b/media-video/mkvtoolnix/files/mkvtoolnix-5.8.0-system-pugixml.patch
@@ -0,0 +1,31 @@
+--- mkvtoolnix-5.8.0/rake.d/target.rb
++++ mkvtoolnix-5.8.0/rake.d/target.rb
+@@ -107,7 +107,6 @@
+ when :mtxunittest then "tests/unit/libmtxunittest.a"
+ when :avi then "lib/avilib-0.6.10/libavi.a"
+ when :rmff then "lib/librmff/librmff.a"
+- when :pugixml then "lib/pugixml/src/libpugixml.a"
+ when :mpegparser then "src/mpegparser/libmpegparser.a"
+ when :ebml then c?("EBML_MATROSKA_INTERNAL") ? "lib/libebml/src/libebml.a" : nil
+ when :matroska then c?("EBML_MATROSKA_INTERNAL") ? "lib/libmatroska/src/libmatroska.a" : nil
+--- mkvtoolnix-5.8.0/Rakefile
++++ mkvtoolnix-5.8.0/Rakefile
+@@ -55,8 +55,8 @@
+ $applications = $programs.collect { |name| "src/#{$application_subdirs[name]}#{name}" + c(:EXEEXT) }
+ $manpages = $programs.collect { |name| "doc/man/#{name}.1" }
+
+- $system_includes = "-I. -Ilib -Ilib/avilib-0.6.10 -Ilib/utf8-cpp/source -Ilib/pugixml/src -Isrc"
+- $system_libdirs = "-Llib/avilib-0.6.10 -Llib/librmff -Llib/pugixml/src -Lsrc/common"
++ $system_includes = "-I. -Ilib -Ilib/avilib-0.6.10 -Ilib/utf8-cpp/source -Isrc"
++ $system_libdirs = "-Llib/avilib-0.6.10 -Llib/librmff -Lsrc/common"
+
+ $source_directories = %w{lib/avilib-0.6.10 lib/librmff src src/input src/output src/common src/common/chapters src/common/compression src/common/strings src/common/tags src/common/xml
+ src/mmg src/mmg/header_editor src/mmg/options src/mmg/tabs src/extract src/propedit src/merge src/info src/mpegparser}
+@@ -605,7 +605,6 @@
+
+ [ { :name => 'avi', :dir => 'lib/avilib-0.6.10' },
+ { :name => 'rmff', :dir => 'lib/librmff' },
+- { :name => 'pugixml', :dir => 'lib/pugixml/src' },
+ { :name => 'mpegparser', :dir => 'src/mpegparser' },
+ { :name => 'mtxcommon', :dir => [ 'src/common' ] + %w{chapters compression strings tags xml }.collect { |e| "src/common/#{e}" } },
+ { :name => 'mtxinput', :dir => 'src/input' },
diff --git a/media-video/mkvtoolnix/files/mkvtoolnix-6.6.0-boost-1.56.patch b/media-video/mkvtoolnix/files/mkvtoolnix-6.6.0-boost-1.56.patch
new file mode 100644
index 000000000000..c99d06b52de5
--- /dev/null
+++ b/media-video/mkvtoolnix/files/mkvtoolnix-6.6.0-boost-1.56.patch
@@ -0,0 +1,52 @@
+diff -Nuar mkvtoolnix-6.6.0/src/common/iso639.cpp mkvtoolnix-6.6.0-fix/src/common/iso639.cpp
+--- mkvtoolnix-6.6.0/src/common/iso639.cpp 2013-12-01 16:51:35.000000000 +0000
++++ mkvtoolnix-6.6.0-fix/src/common/iso639.cpp 2015-02-09 07:00:26.134735208 +0000
+@@ -13,6 +13,7 @@
+
+ #include "common/common_pch.h"
+
++#include <boost/version.hpp>
+ #include <unordered_map>
+
+ #include "common/iso639.h"
+@@ -590,20 +591,36 @@
+ auto range = iso639_languages | badap::indexed(0);
+ auto end = boost::end(range);
+ for (auto lang = boost::begin(range); lang != end; lang++) {
+- auto names = split(lang->english_name, ";");
++#if BOOST_VERSION < 105600
++ auto const &english_name = lang->english_name;
++ auto index = lang.index();
++#else
++ auto const &english_name = lang->value().english_name;
++ auto index = lang->index();
++#endif
++
++ auto names = split(english_name, ";");
+ strip(names);
+ if (brng::find(names, s) != names.end())
+- return lang.index();
++ return index;
+ }
+
+ if (!allow_short_english_name)
+ return -1;
+
+ for (auto lang = boost::begin(range); lang != end; lang++) {
+- auto names = split(lang->english_name, ";");
++#if BOOST_VERSION < 105600
++ auto const &english_name = lang->english_name;
++ auto index = lang.index();
++#else
++ auto const &english_name = lang->value().english_name;
++ auto index = lang->index();
++#endif
++
++ auto names = split(english_name, ";");
+ strip(names);
+ if (names.end() != brng::find_if(names, [&](std::string const &name) { return balg::istarts_with(name, s); }))
+- return lang.index();
++ return index;
+ }
+
+ return -1;
diff --git a/media-video/mkvtoolnix/files/mkvtoolnix-8.2.0-fix-curl-support.patch b/media-video/mkvtoolnix/files/mkvtoolnix-8.2.0-fix-curl-support.patch
new file mode 100644
index 000000000000..67ce30fdbbc6
--- /dev/null
+++ b/media-video/mkvtoolnix/files/mkvtoolnix-8.2.0-fix-curl-support.patch
@@ -0,0 +1,11 @@
+--- a/src/mkvtoolnix-gui/main_window/main_window.cpp
++++ b/src/mkvtoolnix-gui/main_window/main_window.cpp
+@@ -118,7 +118,7 @@ MainWindow::setupMenu() {
+ #if defined(HAVE_CURL_EASY_H)
+ connect(ui->actionHelpCheckForUpdates, &QAction::triggered, this, &MainWindow::checkForUpdates);
+ #else
+- ui->actionGUICheckForUpdates->setVisible(false);
++ ui->actionHelpCheckForUpdates->setVisible(false);
+ #endif // HAVE_CURL_EASY_H
+ }
+
diff --git a/media-video/mkvtoolnix/metadata.xml b/media-video/mkvtoolnix/metadata.xml
new file mode 100644
index 000000000000..d9df1878d8e2
--- /dev/null
+++ b/media-video/mkvtoolnix/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>video</herd>
+</pkgmetadata>
diff --git a/media-video/mkvtoolnix/mkvtoolnix-6.6.0.ebuild b/media-video/mkvtoolnix/mkvtoolnix-6.6.0.ebuild
new file mode 100644
index 000000000000..5deefec95577
--- /dev/null
+++ b/media-video/mkvtoolnix/mkvtoolnix-6.6.0.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils multilib toolchain-funcs versionator wxwidgets multiprocessing autotools
+
+DESCRIPTION="Tools to create, alter, and inspect Matroska files"
+HOMEPAGE="http://www.bunkus.org/videotools/mkvtoolnix"
+SRC_URI="http://www.bunkus.org/videotools/mkvtoolnix/sources/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ~ppc64 x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="debug pch qt4 wxwidgets"
+
+RDEPEND="
+ >=dev-libs/libebml-1.3.0:=
+ >=media-libs/libmatroska-1.4.1:=
+ >=dev-libs/boost-1.46.0:=
+ dev-libs/pugixml
+ media-libs/flac
+ media-libs/libogg
+ media-libs/libvorbis
+ sys-apps/file
+ >=sys-devel/gcc-4.6
+ sys-libs/zlib
+ qt4? (
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ )
+ wxwidgets? ( x11-libs/wxGTK:2.8[X] )
+"
+DEPEND="${RDEPEND}
+ dev-lang/ruby
+ virtual/pkgconfig
+"
+
+pkg_pretend() {
+ # http://bugs.gentoo.org/419257
+ local ver=4.6
+ local msg="You need at least GCC ${ver}.x for C++11 range-based 'for' and nullptr support."
+ if ! version_is_at_least ${ver} $(gcc-version); then
+ eerror ${msg}
+ die ${msg}
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-5.8.0-system-pugixml.patch \
+ "${FILESDIR}"/${PN}-5.8.0-boost-configure.patch \
+ "${FILESDIR}"/${PN}-6.6.0-boost-1.56.patch
+ eautoreconf
+}
+
+src_configure() {
+ local myconf
+
+ if use wxwidgets ; then
+ WX_GTK_VER="2.8"
+ need-wxwidgets unicode
+ myconf="--with-wx-config=${WX_CONFIG}"
+ fi
+
+ econf \
+ $(use_enable debug) \
+ $(use_enable qt4 qt) \
+ $(use_enable wxwidgets) \
+ $(usex pch "" --disable-precompiled-headers) \
+ ${myconf} \
+ --disable-optimization \
+ --docdir="${EPREFIX}"/usr/share/doc/${PF} \
+ --with-boost="${EPREFIX}"/usr \
+ --with-boost-libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --without-curl
+}
+
+src_compile() {
+ ./drake V=1 -j$(makeopts_jobs) || die
+}
+
+src_install() {
+ DESTDIR="${D}" ./drake -j$(makeopts_jobs) install || die
+
+ dodoc AUTHORS ChangeLog README TODO
+ doman doc/man/*.1
+
+ use wxwidgets && docompress -x /usr/share/doc/${PF}/guide
+}
diff --git a/media-video/mkvtoolnix/mkvtoolnix-8.2.0-r1.ebuild b/media-video/mkvtoolnix/mkvtoolnix-8.2.0-r1.ebuild
new file mode 100644
index 000000000000..962ee4fafd38
--- /dev/null
+++ b/media-video/mkvtoolnix/mkvtoolnix-8.2.0-r1.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+WX_GTK_VER="3.0"
+inherit eutils multilib toolchain-funcs versionator wxwidgets multiprocessing autotools
+
+DESCRIPTION="Tools to create, alter, and inspect Matroska files"
+HOMEPAGE="http://www.bunkus.org/videotools/mkvtoolnix"
+SRC_URI="http://www.bunkus.org/videotools/mkvtoolnix/sources/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="curl debug pch qt5 wxwidgets"
+
+ruby_atom() {
+ local ruby_slot=${1/ruby/}
+ ruby_slot="${ruby_slot:0:1}.${ruby_slot:1:2}"
+ echo "dev-lang/ruby:${ruby_slot}"
+}
+
+# hacks to avoid using the ruby eclasses since this requires something similar
+# to the python-any-r1 eclass for ruby which currently doesn't exist
+RUBY_IMPLS=( ruby22 ruby21 ruby20 )
+RUBY_BDEPS="$(for ruby_impl in "${RUBY_IMPLS[@]}"; do
+ echo "( $(ruby_atom ${ruby_impl}) virtual/rubygems[ruby_targets_${ruby_impl}] )"; done)"
+
+RDEPEND="
+ >=dev-libs/boost-1.46.0:=
+ >=dev-libs/libebml-1.3.1:=
+ dev-libs/pugixml
+ media-libs/flac
+ >=media-libs/libmatroska-1.4.2:=
+ media-libs/libogg
+ media-libs/libvorbis
+ sys-apps/file
+ >=sys-devel/gcc-4.6
+ sys-libs/zlib
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtwidgets:5
+ )
+ wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[X] )
+"
+DEPEND="${RDEPEND}
+ || ( ${RUBY_BDEPS} )
+ sys-devel/gettext
+ virtual/pkgconfig
+"
+
+pkg_pretend() {
+ # http://bugs.gentoo.org/419257
+ local ver=4.6
+ local msg="You need at least GCC ${ver}.x for C++11 range-based 'for' and nullptr support."
+ if ! version_is_at_least ${ver} $(gcc-version); then
+ eerror ${msg}
+ die ${msg}
+ fi
+}
+
+src_prepare() {
+ local ruby_impl
+ for ruby_impl in "${RUBY_IMPLS[@]}"; do
+ if has_version "$(ruby_atom ${ruby_impl})"; then
+ export RUBY=${ruby_impl}
+ break
+ fi
+ done
+ [[ -z ${RUBY} ]] && die "No available ruby implementations to build with"
+
+ epatch "${FILESDIR}"/${PN}-5.8.0-boost-configure.patch
+ epatch "${FILESDIR}"/${P}-fix-curl-support.patch #555340
+ epatch_user
+ eautoreconf
+}
+
+src_configure() {
+ local myconf
+
+ if use qt5 ; then
+ # ac/qt5.m4 finds default Qt version set by qtchooser, bug #532600
+ myconf+=(
+ --with-moc=/usr/$(get_libdir)/qt5/bin/moc
+ --with-uic=/usr/$(get_libdir)/qt5/bin/uic
+ --with-rcc=/usr/$(get_libdir)/qt5/bin/rcc
+ --with-mkvtoolnix-gui
+ )
+ fi
+
+ if use wxwidgets ; then
+ need-wxwidgets unicode
+ myconf+=( --with-wx-config=${WX_CONFIG} )
+ fi
+
+ econf \
+ $(use_enable debug) \
+ $(use_enable qt5 qt) \
+ $(use_enable wxwidgets) \
+ $(use_with curl) \
+ $(usex pch "" --disable-precompiled-headers) \
+ "${myconf[@]}" \
+ --disable-optimization \
+ --docdir="${EPREFIX}"/usr/share/doc/${PF} \
+ --with-boost="${EPREFIX}"/usr \
+ --with-boost-libdir="${EPREFIX}"/usr/$(get_libdir)
+}
+
+src_compile() {
+ "${RUBY}" ./drake V=1 -j$(makeopts_jobs) || die
+}
+
+src_install() {
+ DESTDIR="${D}" "${RUBY}" ./drake -j$(makeopts_jobs) install || die
+
+ dodoc AUTHORS ChangeLog README.md TODO
+ doman doc/man/*.1
+
+ use wxwidgets && docompress -x /usr/share/doc/${PF}/guide
+}
diff --git a/media-video/motion/Manifest b/media-video/motion/Manifest
new file mode 100644
index 000000000000..a8e665f89c35
--- /dev/null
+++ b/media-video/motion/Manifest
@@ -0,0 +1 @@
+DIST motion-3.2.12.tar.gz 425729 SHA256 a597f8d7ec0bf3c5fb62722c4eead59717fe01c2ae0d256c642027cea74b2f0a SHA512 d44620f8865420da71ff1dc1e1d8ba8e5465b395f2cf3b2cc9a91d3d415694b26376a9f8e3a1b78ffd0efde22d9e0338daa77237aed38c060dc3577af4c0864c WHIRLPOOL 0b7618d48161e8ffefacc5331d1078004d87839b532100c37bfaf06e99772921228feea6eea063301dfdc9e5f5a1dc07fd0847858440c6f876c1e03deaa078c8
diff --git a/media-video/motion/files/ffmpeg-1.patch b/media-video/motion/files/ffmpeg-1.patch
new file mode 100644
index 000000000000..56c83c474f09
--- /dev/null
+++ b/media-video/motion/files/ffmpeg-1.patch
@@ -0,0 +1,95 @@
+Description: Fix FFmpeg guess_format() deprecation warning
+Author: Angel Carpintero <motiondevelop@gmail.com>
+Origin: Upstream, https://github.com/sackmotion/motion/commit/527377#svn517
+Last-Update: 2012-02-12
+
+--- a/ffmpeg.c
++++ b/ffmpeg.c
+@@ -36,6 +36,11 @@
+ # endif /* __GNUC__ */
+ #endif /* LIBAVCODEC_BUILD > 4680 */
+
++#if defined LIBAVFORMAT_VERSION_MAJOR && defined LIBAVFORMAT_VERSION_MINOR
++#if LIBAVFORMAT_VERSION_MAJOR < 53 && LIBAVFORMAT_VERSION_MINOR < 45
++ #define GUESS_NO_DEPRECATED
++#endif
++#endif
+
+ #if LIBAVFORMAT_BUILD >= 4616
+ /* The API for av_write_frame changed with FFmpeg version 0.4.9pre1.
+@@ -258,7 +263,11 @@
+ /* We use "mpeg1video" for raw mpeg1 format. Using "mpeg" would
+ * result in a muxed output file, which isn't appropriate here.
+ */
+- of = guess_format("mpeg1video", NULL, NULL);
++#ifdef GUESS_NO_DEPRECATED
++ of = guess_format("mpeg1video", NULL, NULL);
++#else
++ of = av_guess_format("mpeg1video", NULL, NULL);
++#endif
+ if (of) {
+ /* But we want the trailer to be correctly written. */
+ of->write_trailer = mpeg1_write_trailer;
+@@ -270,24 +279,44 @@
+ #endif
+ } else if (strcmp(codec, "mpeg4") == 0) {
+ ext = ".avi";
+- of = guess_format("avi", NULL, NULL);
++#ifdef GUESS_NO_DEPRECATED
++ of = guess_format("mpeg1video", NULL, NULL);
++#else
++ of = av_guess_format("avi", NULL, NULL);
++#endif
+ } else if (strcmp(codec, "msmpeg4") == 0) {
+ ext = ".avi";
+- of = guess_format("avi", NULL, NULL);
++#ifdef GUESS_NO_DEPRECATED
++ of = guess_format("mpeg1video", NULL, NULL);
++#else
++ of = av_guess_format("avi", NULL, NULL);
++#endif
+ if (of) {
+ /* Manually override the codec id. */
+ of->video_codec = CODEC_ID_MSMPEG4V2;
+ }
+ } else if (strcmp(codec, "swf") == 0) {
+ ext = ".swf";
+- of = guess_format("swf", NULL, NULL);
++#ifdef GUESS_NO_DEPRECATED
++ of = guess_format("mpeg1video", NULL, NULL);
++#else
++ of = av_guess_format("swf", NULL, NULL);
++#endif
+ } else if (strcmp(codec, "flv") == 0) {
+ ext = ".flv";
+- of = guess_format("flv", NULL, NULL);
++#ifdef GUESS_NO_DEPRECATED
++ of = guess_format("mpeg1video", NULL, NULL);
++#else
++ of = av_guess_format("flv", NULL, NULL);
++#endif
+ of->video_codec = CODEC_ID_FLV1;
+ } else if (strcmp(codec, "ffv1") == 0) {
+ ext = ".avi";
+- of = guess_format("avi", NULL, NULL);
++#ifdef GUESS_NO_DEPRECATED
++ of = guess_format("mpeg1video", NULL, NULL);
++#else
++ of = av_guess_format("avi", NULL, NULL);
++#endif
+ if (of) {
+ /* Use the FFMPEG Lossless Video codec (experimental!).
+ Requires strict_std_compliance to be <= -2 */
+@@ -295,7 +324,11 @@
+ }
+ } else if (strcmp(codec, "mov") == 0) {
+ ext = ".mov";
+- of = guess_format("mov", NULL, NULL);
++#ifdef GUESS_NO_DEPRECATED
++ of = guess_format("mpeg1video", NULL, NULL);
++#else
++ of = av_guess_format("mov", NULL, NULL);
++#endif
+ } else {
+ motion_log(LOG_ERR, 0, "ffmpeg_video_codec option value %s is not supported", codec);
+ return NULL;
diff --git a/media-video/motion/files/ffmpeg-2.patch b/media-video/motion/files/ffmpeg-2.patch
new file mode 100644
index 000000000000..480819d9987d
--- /dev/null
+++ b/media-video/motion/files/ffmpeg-2.patch
@@ -0,0 +1,141 @@
+Description: Improve detection of av_register_protocol() for ffmpeg.
+Author: Angel Carpintero <motiondevelop@gmail.com>
+Origin: Upstream, https://github.com/sackmotion/motion/commit/7aec4b#svn538
+Last-Update: 2012-02-12
+
+--- a/configure.in
++++ b/configure.in
+@@ -316,7 +316,7 @@
+ #
+ else if test "${FFMPEG_DIR}" = "yes"; then
+ # AUTODETECT STATIC/SHARED LIB
+- AC_MSG_CHECKING(for ffmpeg autodetecting)
++ AC_MSG_CHECKING(for ffmpeg autodetecting libraries)
+
+ if test -f /usr/lib64/libavcodec.a -o -f /usr/lib64/libavcodec.so && test -f /usr/lib64/libavformat.a -o -f /usr/lib64/libavformat.so ; then
+ AC_MSG_RESULT(found in /usr/lib64)
+@@ -347,7 +347,7 @@
+ echo ""
+ fi
+ else
+- AC_MSG_CHECKING(for ffmpeg in -> [${FFMPEG_DIR}] <-)
++ AC_MSG_CHECKING(for ffmpeg libraries in -> [${FFMPEG_DIR}] <-)
+ if test -f ${FFMPEG_DIR}/lib/libavcodec.a -o -f ${FFMPEG_DIR}/lib/libavcodec.so && test -f ${FFMPEG_DIR}/lib/libavformat.a -o -f ${FFMPEG_DIR}/lib/libavformat.so ; then
+ AC_MSG_RESULT(found)
+ FFMPEG_OK="found"
+@@ -392,9 +392,11 @@
+ elif test -f ${FFMPEG_DIR}/include/libavformat/avformat.h; then
+ AC_MSG_RESULT(found ${FFMPEG_DIR}/include/libavformat/avformat.h)
+ FFMPEG_CFLAGS="-I${FFMPEG_DIR}/include -DFFMPEG_NEW_INCLUDES"
++ AVFORMAT="-I${FFMPEG_DIR}/include/libavformat"
+ elif test -f ${FFMPEG_DIR}/include/ffmpeg/libavformat/avformat.h; then
+ AC_MSG_RESULT(found ${FFMPEG_DIR}/include/ffmpeg/libavformat/avformat.h)
+ FFMPEG_CFLAGS="-I${FFMPEG_DIR}/include/ffmpeg -DFFMPEG_NEW_INCLUDES"
++ AVFORMAT="-I${FFMPEG_DIR}/include/ffmpeg/libavformat"
+ else
+ AC_MSG_RESULT(not found)
+ FFMPEG_OK="no_found"
+@@ -423,9 +425,11 @@
+ AC_MSG_CHECKING([file_protocol is defined in ffmpeg ?])
+ saved_CFLAGS=$CFLAGS
+ saved_LIBS=$LIBS
+- CFLAGS="${FFMPEG_CFLAGS}"
++
++
++ CFLAGS="${FFMPEG_CFLAGS} ${AVFORMAT}"
+ LIBS="$TEMP_LIBS"
+-
++
+ AC_COMPILE_IFELSE(
+ [
+ #include <avformat.h>
+@@ -442,7 +446,35 @@
+ ]
+ )
+ CFLAGS=$saved_CFLAGS
+- LIBS=$saved_LIBS
++ LIBS=$saved_LIBS
++
++ AC_MSG_CHECKING([av_register_protocol is defined in ffmpeg ?])
++ saved_CFLAGS=$CFLAGS
++ saved_LIBS=$LIBS
++ CFLAGS="${FFMPEG_CFLAGS} ${AVFORMAT}"
++ LIBS="$TEMP_LIBS"
++
++ AC_COMPILE_IFELSE(
++ [
++ #include <avformat.h>
++ URLProtocol test_file_protocol;
++ int main(void){
++ av_register_protocol(&test_file_protocol);
++ return 0;
++ }
++ ],
++ [
++ AC_MSG_RESULT(yes)
++ TEMP_CFLAGS="${TEMP_CFLAGS} -DHAVE_FFMPEG_AV_REGISTER_PROTOCOL"
++ ],
++ [
++ AC_MSG_RESULT(no)
++ ]
++ )
++
++ CFLAGS=$saved_CFLAGS
++ LIBS=$saved_LIBS
++
+ fi
+ fi
+ fi
+--- a/ffmpeg.c
++++ b/ffmpeg.c
+@@ -232,11 +232,11 @@
+ mpeg1_file_protocol.url_seek = file_protocol.url_seek;
+ mpeg1_file_protocol.url_close = file_protocol.url_close;
+
+- /* Register the append file protocol. */
+-#if LIBAVFORMAT_BUILD >= (52<<16 | 31<<8)
++/* Register the append file protocol. */
++#ifdef HAVE_FFMPEG_AV_REGISTER_PROTOCOL
+ av_register_protocol(&mpeg1_file_protocol);
+ #else
+- register_protocol(&mpeg1_file_protocol);
++ av_register_protocol2(&mpeg1_file_protocol, sizeof(mpeg1_file_protocol));
+ #endif
+ }
+
+@@ -410,7 +410,11 @@
+
+ ffmpeg->c = c = AVSTREAM_CODEC_PTR(ffmpeg->video_st);
+ c->codec_id = ffmpeg->oc->oformat->video_codec;
++#if LIBAVCODEC_VERSION_MAJOR < 53
+ c->codec_type = CODEC_TYPE_VIDEO;
++#else
++ c->codec_type = AVMEDIA_TYPE_VIDEO;
++#endif
+ is_mpeg1 = c->codec_id == CODEC_ID_MPEG1VIDEO;
+
+ if (strcmp(ffmpeg_video_codec, "ffv1") == 0)
+@@ -679,7 +683,11 @@
+ if (ffmpeg->oc->oformat->flags & AVFMT_RAWPICTURE) {
+ /* raw video case. The API will change slightly in the near future for that */
+ #ifdef FFMPEG_AVWRITEFRAME_NEWAPI
++#if LIBAVCODEC_VERSION_MAJOR < 53
+ pkt.flags |= PKT_FLAG_KEY;
++#else
++ pkt.flags |= AV_PKT_FLAG_KEY;
++#endif
+ pkt.data = (uint8_t *)pic;
+ pkt.size = sizeof(AVPicture);
+ ret = av_write_frame(ffmpeg->oc, &pkt);
+@@ -700,7 +708,11 @@
+ #ifdef FFMPEG_AVWRITEFRAME_NEWAPI
+ pkt.pts = AVSTREAM_CODEC_PTR(ffmpeg->video_st)->coded_frame->pts;
+ if (AVSTREAM_CODEC_PTR(ffmpeg->video_st)->coded_frame->key_frame) {
++#if LIBAVCODEC_VERSION_MAJOR < 53
+ pkt.flags |= PKT_FLAG_KEY;
++#else
++ pkt.flags |= AV_PKT_FLAG_KEY;
++#endif
+ }
+ pkt.data = ffmpeg->video_outbuf;
+ pkt.size = out_size;
diff --git a/media-video/motion/files/ffmpeg-3.patch b/media-video/motion/files/ffmpeg-3.patch
new file mode 100644
index 000000000000..1d6be1959229
--- /dev/null
+++ b/media-video/motion/files/ffmpeg-3.patch
@@ -0,0 +1,35 @@
+Description: Fix avoid crash producing MPEG4 with newer FFmpeg.
+Author: Angel Carpintero <motiondevelop@gmail.com>
+Origin: Upstream, https://github.com/sackmotion/motion/commit/734155#svn539
+Bug: http://www.lavrsen.dk/foswiki/bin/view/Motion/BugReport2011x10x05x071936
+Last-Update: 2012-02-12
+
+--- a/configure.in
++++ b/configure.in
+@@ -1099,6 +1099,10 @@
+ LIBS="${TEMP_LIBS}"
+ LDFLAGS="${TEMP_LDFLAGS}"
+
++
++AC_CHECK_FUNC(avformat_alloc_context, AC_DEFINE([have_avformat_alloc_context],1,[Define to 1 if you have avformat_alloc_context support]))
++AC_CHECK_FUNC(av_avformat_alloc_context, AC_DEFINE([have_av_avformat_alloc_context],1,[Define to 1 if you have av_avformat_alloc_context support]))
++
+ #
+ # Add the right exec path for rc scripts
+ #
+--- a/ffmpeg.c
++++ b/ffmpeg.c
+@@ -373,7 +373,13 @@
+ snprintf(ffmpeg->codec, sizeof(ffmpeg->codec), "%s", ffmpeg_video_codec);
+
+ /* allocation the output media context */
++#ifdef have_avformat_alloc_context
++ ffmpeg->oc = avformat_alloc_context();
++#elif defined have_av_avformat_alloc_context
++ ffmpeg->oc = av_alloc_format_context();
++#else
+ ffmpeg->oc = av_mallocz(sizeof(AVFormatContext));
++#endif
+
+ if (!ffmpeg->oc) {
+ motion_log(LOG_ERR, 1, "Memory error while allocating output media context");
diff --git a/media-video/motion/files/ffmpeg-4.patch b/media-video/motion/files/ffmpeg-4.patch
new file mode 100644
index 000000000000..05abd9e28410
--- /dev/null
+++ b/media-video/motion/files/ffmpeg-4.patch
@@ -0,0 +1,68 @@
+Description: Improve av_register_protocol2()/av_register_protocol() detection
+Author: Angel Carpintero <motiondevelop@gmail.com>
+Origin: Upstream, https://github.com/sackmotion/motion/commit/5dd9ed#svn540#svn540
+Last-Update: 2012-02-12
+
+--- a/configure.in
++++ b/configure.in
+@@ -448,33 +448,6 @@
+ CFLAGS=$saved_CFLAGS
+ LIBS=$saved_LIBS
+
+- AC_MSG_CHECKING([av_register_protocol is defined in ffmpeg ?])
+- saved_CFLAGS=$CFLAGS
+- saved_LIBS=$LIBS
+- CFLAGS="${FFMPEG_CFLAGS} ${AVFORMAT}"
+- LIBS="$TEMP_LIBS"
+-
+- AC_COMPILE_IFELSE(
+- [
+- #include <avformat.h>
+- URLProtocol test_file_protocol;
+- int main(void){
+- av_register_protocol(&test_file_protocol);
+- return 0;
+- }
+- ],
+- [
+- AC_MSG_RESULT(yes)
+- TEMP_CFLAGS="${TEMP_CFLAGS} -DHAVE_FFMPEG_AV_REGISTER_PROTOCOL"
+- ],
+- [
+- AC_MSG_RESULT(no)
+- ]
+- )
+-
+- CFLAGS=$saved_CFLAGS
+- LIBS=$saved_LIBS
+-
+ fi
+ fi
+ fi
+@@ -1102,6 +1075,9 @@
+
+ AC_CHECK_FUNC(avformat_alloc_context, AC_DEFINE([have_avformat_alloc_context],1,[Define to 1 if you have avformat_alloc_context support]))
+ AC_CHECK_FUNC(av_avformat_alloc_context, AC_DEFINE([have_av_avformat_alloc_context],1,[Define to 1 if you have av_avformat_alloc_context support]))
++AC_CHECK_FUNC(av_register_protocol2, AC_DEFINE([have_av_register_protocol2],1,[Define to 1 if you have av_register_protocol2 support]))
++AC_CHECK_FUNC(av_register_protocol, AC_DEFINE([have_av_register_protocol],1,[Define to 1 if you have av_register_protocol support]))
++
+
+ #
+ # Add the right exec path for rc scripts
+--- a/ffmpeg.c
++++ b/ffmpeg.c
+@@ -233,10 +233,12 @@
+ mpeg1_file_protocol.url_close = file_protocol.url_close;
+
+ /* Register the append file protocol. */
+-#ifdef HAVE_FFMPEG_AV_REGISTER_PROTOCOL
++#ifdef have_av_register_protocol2
++ av_register_protocol2(&mpeg1_file_protocol, sizeof(mpeg1_file_protocol));
++#elif defined have_av_register_protocol
+ av_register_protocol(&mpeg1_file_protocol);
+ #else
+- av_register_protocol2(&mpeg1_file_protocol, sizeof(mpeg1_file_protocol));
++# warning av_register_protocolXXX missing
+ #endif
+ }
+
diff --git a/media-video/motion/files/ffmpeg-5.patch b/media-video/motion/files/ffmpeg-5.patch
new file mode 100644
index 000000000000..c7d114b1470a
--- /dev/null
+++ b/media-video/motion/files/ffmpeg-5.patch
@@ -0,0 +1,122 @@
+Convert to avio API.
+Disable mpeg1 append code based or the ffurl API as mpeg1 is blacklisted with
+new ffmpeg versions in this code anyway.
+Fix build with ffmpeg-1
+
+Index: motion-3.2.12/ffmpeg.c
+===================================================================
+--- motion-3.2.12.orig/ffmpeg.c
++++ motion-3.2.12/ffmpeg.c
+@@ -73,6 +73,7 @@ AVFrame *ffmpeg_prepare_frame(struct ffm
+ /* This is the trailer used to end mpeg1 videos. */
+ static unsigned char mpeg1_trailer[] = {0x00, 0x00, 0x01, 0xb7};
+
++#ifndef FFMPEG_NO_NONSTD_MPEG1
+ /* Append version of the file open function used in libavformat when opening
+ * an ordinary file. The original file open function truncates an existing
+ * file, but this version appends to it instead.
+@@ -118,6 +119,7 @@ URLProtocol mpeg1_file_protocol = {
+ .url_open = file_open_append
+ };
+
++#endif
+
+ #ifdef HAVE_FFMPEG_NEW
+
+@@ -132,6 +134,7 @@ URLProtocol mpeg1_file_protocol = {
+ #include "avstring.h"
+ #endif
+
++#ifndef FFMPEG_NO_NONSTD_MPEG1
+ static int file_open(URLContext *h, const char *filename, int flags)
+ {
+ int access_flags, fd;
+@@ -195,6 +198,7 @@ URLProtocol file_protocol = {
+ };
+
+ #endif
++#endif
+
+
+ /* We set AVOutputFormat->write_trailer to this function for mpeg1. That way,
+@@ -203,8 +207,8 @@ URLProtocol file_protocol = {
+ static int mpeg1_write_trailer(AVFormatContext *s)
+ {
+ #if LIBAVFORMAT_BUILD >= (52<<16)
+- put_buffer(s->pb, mpeg1_trailer, 4);
+- put_flush_packet(s->pb);
++ avio_write(s->pb, mpeg1_trailer, 4);
++ avio_flush(s->pb);
+ #else
+ put_buffer(&s->pb, mpeg1_trailer, 4);
+ put_flush_packet(&s->pb);
+@@ -226,6 +230,7 @@ void ffmpeg_init()
+ /* Copy the functions to use for the append file protocol from the standard
+ * file protocol.
+ */
++#ifndef FFMPEG_NO_NONSTD_MPEG1
+ mpeg1_file_protocol.url_read = file_protocol.url_read;
+ mpeg1_file_protocol.url_write = file_protocol.url_write;
+ mpeg1_file_protocol.url_seek = file_protocol.url_seek;
+@@ -239,6 +244,7 @@ void ffmpeg_init()
+ #else
+ register_protocol(&mpeg1_file_protocol);
+ #endif
++#endif
+ }
+
+ /* Obtains the output format used for the specified codec. For mpeg4 codecs,
+@@ -422,13 +428,6 @@ struct ffmpeg *ffmpeg_open(char *ffmpeg_
+ c->flags |= CODEC_FLAG_GLOBAL_HEADER;
+ }
+
+- /* set the output parameters (must be done even if no parameters). */
+- if (av_set_parameters(ffmpeg->oc, NULL) < 0) {
+- motion_log(LOG_ERR, 0, "ffmpeg av_set_parameters error: Invalid output format parameters");
+- ffmpeg_cleanups(ffmpeg);
+- return NULL;
+- }
+-
+ /* Dump the format settings. This shows how the various streams relate to each other */
+ //dump_format(ffmpeg->oc, 0, filename, 1);
+
+@@ -504,7 +503,7 @@ struct ffmpeg *ffmpeg_open(char *ffmpeg_
+ snprintf(file_proto, sizeof(file_proto), "%s", filename);
+
+
+- if (url_fopen(&ffmpeg->oc->pb, file_proto, URL_WRONLY) < 0) {
++ if (avio_open(&ffmpeg->oc->pb, file_proto, AVIO_FLAG_WRITE) < 0) {
+ /* path did not exist? */
+ if (errno == ENOENT) {
+ /* create path for file (don't use file_proto)... */
+@@ -514,7 +513,7 @@ struct ffmpeg *ffmpeg_open(char *ffmpeg_
+ }
+
+ /* and retry opening the file (use file_proto) */
+- if (url_fopen(&ffmpeg->oc->pb, file_proto, URL_WRONLY) < 0) {
++ if (avio_open(&ffmpeg->oc->pb, file_proto, AVIO_FLAG_WRITE) < 0) {
+ motion_log(LOG_ERR, 1, "url_fopen - error opening file %s",filename);
+ ffmpeg_cleanups(ffmpeg);
+ return NULL;
+@@ -535,7 +534,11 @@ struct ffmpeg *ffmpeg_open(char *ffmpeg_
+ }
+
+ /* write the stream header, if any */
+- av_write_header(ffmpeg->oc);
++ if(avformat_write_header(ffmpeg->oc, NULL) < 0) {
++ motion_log(LOG_ERR, 1, "Error while writing header for %s", filename);
++ ffmpeg_cleanups(ffmpeg);
++ return NULL;
++ }
+
+ return ffmpeg;
+ }
+@@ -602,7 +605,7 @@ void ffmpeg_close(struct ffmpeg *ffmpeg)
+ if (!(ffmpeg->oc->oformat->flags & AVFMT_NOFILE)) {
+ /* close the output file */
+ #if LIBAVFORMAT_BUILD >= (52<<16)
+- url_fclose(ffmpeg->oc->pb);
++ avio_close(ffmpeg->oc->pb);
+ #else
+ url_fclose(&ffmpeg->oc->pb);
+ #endif /* LIBAVFORMAT_BUILD >= (52<<16) */
diff --git a/media-video/motion/files/libav-9.patch b/media-video/motion/files/libav-9.patch
new file mode 100644
index 000000000000..39b4059df0bd
--- /dev/null
+++ b/media-video/motion/files/libav-9.patch
@@ -0,0 +1,21 @@
+diff -urN motion-3.2.12.old/ffmpeg.c motion-3.2.12/ffmpeg.c
+--- motion-3.2.12.old/ffmpeg.c 2013-06-17 20:36:45.355529743 +0200
++++ motion-3.2.12/ffmpeg.c 2013-06-17 20:35:41.868532001 +0200
+@@ -409,7 +409,7 @@
+ ffmpeg->video_st = NULL;
+
+ if (ffmpeg->oc->oformat->video_codec != CODEC_ID_NONE) {
+- ffmpeg->video_st = av_new_stream(ffmpeg->oc, 0);
++ ffmpeg->video_st = avformat_new_stream(ffmpeg->oc, 0);
+ if (!ffmpeg->video_st) {
+ motion_log(LOG_ERR, 1, "av_new_stream - could not alloc stream");
+ ffmpeg_cleanups(ffmpeg);
+@@ -487,7 +487,7 @@
+ pthread_mutex_lock(&global_lock);
+
+ /* open the codec */
+- if (avcodec_open(c, codec) < 0) {
++ if (avcodec_open2(c, codec, NULL) < 0) {
+ /* Release the lock. */
+ pthread_mutex_unlock(&global_lock);
+ motion_log(LOG_ERR, 1, "avcodec_open - could not open codec");
diff --git a/media-video/motion/files/motion-3.2.12-workaround-v4l1_deprecation.patch b/media-video/motion/files/motion-3.2.12-workaround-v4l1_deprecation.patch
new file mode 100644
index 000000000000..04a18dc62c8e
--- /dev/null
+++ b/media-video/motion/files/motion-3.2.12-workaround-v4l1_deprecation.patch
@@ -0,0 +1,35 @@
+motion has both v4l1 and v4l2 support but they are not separate except in upstream version control.
+so, temporarily use the libv4l1-videodev.h from libv4l to allow succesful build of the v4l2 (pay attention here!) backend.
+
+--- motion.h
++++ motion.h
+@@ -40,7 +40,7 @@
+
+ #define _LINUX_TIME_H 1
+ #if !defined(WITHOUT_V4L) && !defined(BSD)
+-#include <linux/videodev.h>
++#include <libv4l1-videodev.h>
+ #endif
+
+ #include <pthread.h>
+--- track.c
++++ track.c
+@@ -11,6 +11,7 @@
+ #include "motion.h"
+
+ #ifndef WITHOUT_V4L
++#include <linux/videodev2.h>
+ #include "pwc-ioctl.h"
+ #endif
+
+--- video.h
++++ video.h
+@@ -12,7 +12,7 @@
+
+ #define _LINUX_TIME_H 1
+ #ifndef WITHOUT_V4L
+-#include <linux/videodev.h>
++#include <libv4l1-videodev.h>
+ #include <sys/mman.h>
+ #include "pwc-ioctl.h"
+ #endif
diff --git a/media-video/motion/files/motion.confd b/media-video/motion/files/motion.confd
new file mode 100644
index 000000000000..f79c97aee968
--- /dev/null
+++ b/media-video/motion/files/motion.confd
@@ -0,0 +1,4 @@
+# Set the user and group under which motion will be ran
+
+MOTION_USER="motion"
+MOTION_GROUP="video"
diff --git a/media-video/motion/files/motion.initd-r2 b/media-video/motion/files/motion.initd-r2
new file mode 100644
index 000000000000..c2e2740f0f4e
--- /dev/null
+++ b/media-video/motion/files/motion.initd-r2
@@ -0,0 +1,39 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+extra_started_commands="reload"
+
+_create_motion_run_dir() {
+ local dir="/var/run/motion"
+ if ! [ -d "$dir" ]; then
+ mkdir -p -m750 "$dir"
+ chown ${MOTION_USER}:${MOTION_GROUP} "$dir"
+ fi
+}
+
+depend() {
+ need modules
+ after mysql
+}
+
+start() {
+ _create_motion_run_dir
+
+ ebegin "Starting motion detection"
+ start-stop-daemon --start -u ${MOTION_USER} -g ${MOTION_GROUP} --quiet --exec /usr/bin/motion
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping motion detection"
+ start-stop-daemon --stop --quiet --exec /usr/bin/motion
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading motion detection configuration"
+ start-stop-daemon --stop --signal HUP --exec /usr/bin/motion
+ eend $?
+}
diff --git a/media-video/motion/metadata.xml b/media-video/motion/metadata.xml
new file mode 100644
index 000000000000..e47a59dd51e8
--- /dev/null
+++ b/media-video/motion/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">motion</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/motion/motion-3.2.12-r2.ebuild b/media-video/motion/motion-3.2.12-r2.ebuild
new file mode 100644
index 000000000000..ebee6c437d1c
--- /dev/null
+++ b/media-video/motion/motion-3.2.12-r2.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils user
+
+DESCRIPTION="A software motion detector"
+HOMEPAGE="http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm ~ppc x86"
+IUSE="ffmpeg mysql postgres +v4l"
+
+RDEPEND="sys-libs/zlib
+ virtual/jpeg
+ ffmpeg? ( virtual/ffmpeg )
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql )"
+# note: libv4l is only in dependencies for the libv4l1-videodev.h header file
+# used by the -workaround-v4l1_deprecation.patch.
+DEPEND="${RDEPEND}
+ v4l? ( virtual/os-headers media-libs/libv4l )"
+
+pkg_setup() {
+ enewuser motion -1 -1 -1 video
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/ffmpeg-1.patch \
+ "${FILESDIR}"/ffmpeg-2.patch \
+ "${FILESDIR}"/ffmpeg-3.patch \
+ "${FILESDIR}"/ffmpeg-4.patch \
+ "${FILESDIR}"/ffmpeg-5.patch \
+ "${FILESDIR}"/libav-9.patch \
+ "${FILESDIR}"/${P}-workaround-v4l1_deprecation.patch
+}
+
+src_configure() {
+ econf \
+ $(use_with v4l) \
+ $(use_with ffmpeg) \
+ $(use_with mysql) \
+ $(use_with postgres pgsql) \
+ --without-optimizecpu
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ DOC='CHANGELOG CODE_STANDARD CREDITS FAQ README' \
+ docdir=/usr/share/doc/${PF} \
+ EXAMPLES='thread*.conf' \
+ examplesdir=/usr/share/doc/${PF}/examples \
+ install
+
+ dohtml *.html
+
+ newinitd "${FILESDIR}"/motion.initd-r2 motion
+ newconfd "${FILESDIR}"/motion.confd motion
+
+ mv -vf "${D}"/etc/motion{-dist,}.conf || die
+}
+
+pkg_postinst() {
+ elog "You need to setup /etc/motion.conf before running"
+ elog "motion for the first time."
+ elog "You can install motion detection as a service, use:"
+ elog "rc-update add motion default"
+}
diff --git a/media-video/motion/motion-3.2.12-r3.ebuild b/media-video/motion/motion-3.2.12-r3.ebuild
new file mode 100644
index 000000000000..a09010371cfe
--- /dev/null
+++ b/media-video/motion/motion-3.2.12-r3.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils readme.gentoo user
+
+DESCRIPTION="A software motion detector"
+HOMEPAGE="http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm ~ppc x86"
+IUSE="ffmpeg libav mysql postgres +v4l"
+
+RDEPEND="
+ sys-libs/zlib
+ virtual/jpeg
+ ffmpeg? (
+ libav? ( media-video/libav:= )
+ !libav? ( media-video/ffmpeg:0= )
+ )
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql )
+"
+# note: libv4l is only in dependencies for the libv4l1-videodev.h header file
+# used by the -workaround-v4l1_deprecation.patch.
+DEPEND="${RDEPEND}
+ v4l? ( virtual/os-headers media-libs/libv4l )
+"
+
+DISABLE_AUTOFORMATTING="yes"
+DOC_CONTENTS="You need to setup /etc/motion.conf before running
+motion for the first time.
+You can install motion detection as a service, use:
+rc-update add motion default
+"
+
+pkg_setup() {
+ enewuser motion -1 -1 -1 video
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/ffmpeg-1.patch \
+ "${FILESDIR}"/ffmpeg-2.patch \
+ "${FILESDIR}"/ffmpeg-3.patch \
+ "${FILESDIR}"/ffmpeg-4.patch \
+ "${FILESDIR}"/ffmpeg-5.patch \
+ "${FILESDIR}"/libav-9.patch \
+ "${FILESDIR}"/${P}-workaround-v4l1_deprecation.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_with v4l) \
+ $(use_with ffmpeg) \
+ $(use_with mysql) \
+ $(use_with postgres pgsql) \
+ --without-optimizecpu
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ DOC='CHANGELOG CODE_STANDARD CREDITS FAQ README' \
+ docdir=/usr/share/doc/${PF} \
+ EXAMPLES='thread*.conf' \
+ examplesdir=/usr/share/doc/${PF}/examples \
+ install
+
+ dohtml *.html
+
+ newinitd "${FILESDIR}"/motion.initd-r2 motion
+ newconfd "${FILESDIR}"/motion.confd motion
+
+ mv -vf "${D}"/etc/motion{-dist,}.conf || die
+
+ readme.gentoo_create_doc
+}
diff --git a/media-video/motiontrack/Manifest b/media-video/motiontrack/Manifest
new file mode 100644
index 000000000000..0153d75b3242
--- /dev/null
+++ b/media-video/motiontrack/Manifest
@@ -0,0 +1 @@
+DIST motiontrack-0.1.3.tar.gz 136592 RMD160 58bcb299bd0158daddf6165e75ad829d2c878ee3 SHA1 57671d4f9c7def44b040debc97090a4525bff5d4 SHA256 57bd0e19f4e2a1bbb8c0e5b5143592d26f0d9fdd31f62ab6968c71a3f9e7d859
diff --git a/media-video/motiontrack/metadata.xml b/media-video/motiontrack/metadata.xml
new file mode 100644
index 000000000000..b145c90e5cef
--- /dev/null
+++ b/media-video/motiontrack/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="multiprocess">Enables multi-process support (SMP/cluster) for motiontrack programs</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-video/motiontrack/motiontrack-0.1.3.ebuild b/media-video/motiontrack/motiontrack-0.1.3.ebuild
new file mode 100644
index 000000000000..f4e8f9863af2
--- /dev/null
+++ b/media-video/motiontrack/motiontrack-0.1.3.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="A set of tools that detect motion between two images"
+SRC_URI="http://gemia.de/motion/${P}.tar.gz"
+HOMEPAGE="http://motiontrack.sourceforge.net"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~x86 ~ppc ~ppc64 ~sparc ~mips ~alpha ~hppa ~amd64"
+
+IUSE="gd imagemagick debug multiprocess"
+
+DEPEND="debug? (
+ gd? (
+ imagemagick? ( >=media-gfx/imagemagick-5.5.7 )
+ !imagemagick? ( media-libs/gd )
+ )
+ !gd? ( >=media-gfx/imagemagick-5.5.7 )
+ )
+ !debug? (
+ imagemagick? (
+ gd? ( media-libs/gd )
+ !gd? ( >=media-gfx/imagemagick-5.5.7 )
+ )
+ !imagemagick? ( media-libs/gd )
+ )"
+
+src_compile() {
+
+ local myconf
+
+ if use gd; then
+ if use imagemagick; then
+ elog "motiontrack can only use one of libgd or imagemagick, not both."
+ elog "default is libgd when debug is unset, imagemagick otherwise."
+ elog "please unset one of these use flags if you have other intentions."
+ fi
+ fi
+ if use debug; then
+ #default to imagemagick for providing better features
+ #for debugging
+ myconf="--enable-debug"
+ if use gd; then
+ if use imagemagick; then
+ myconf="${myconf} --enable-magick --disable-gd";
+ else
+ myconf="${myconf} --disable-magick --enable-gd";
+ fi
+ else
+ myconf="${myconf} --enable-magick --disable-gd";
+ fi
+ else
+ #default to libgd for being faster
+ myconf="--disable-debug"
+ if use imagemagick; then
+ if use gd; then
+ myconf="${myconf} --disable-magick --enable-gd";
+ else
+ myconf="${myconf} --enable-magick --disable-gd";
+ fi
+ else
+ myconf="${myconf} --disable-magick --enable-gd";
+ fi
+ fi
+
+ econf $myconf \
+ $(use_enable multiprocess cluster) \
+ || die "configure failed"
+ emake || die "make failed"
+
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die "install failed"
+ dodoc README src/TheCode.txt
+}
diff --git a/media-video/movit/Manifest b/media-video/movit/Manifest
new file mode 100644
index 000000000000..1416774117a8
--- /dev/null
+++ b/media-video/movit/Manifest
@@ -0,0 +1,5 @@
+DIST gtest-1.7.0.zip 1164254 SHA256 247ca18dd83f53deb1328be17e4b1be31514cedfc1e3424f672bf11fd7e0d60d SHA512 8859369f2dd32cbc2ac01aba029aa3ff20a321f40658b9643aff442d34c33468221866b801b28c66a28af47dbcd362d26941fc98db92b6efb7e41ea5b7be1a07 WHIRLPOOL 0c31a385159551859c1afe76480b3fb1b560d666db9a0afc5cbda92bcd53bf129f85a8f902c6ded0779c2b4c49aacec59ba5a4d5ce316a07bf08174f4fc64049
+DIST movit-1.1.1.tar.gz 507273 SHA256 4fd1a90608a1b06cd9faf20ec99cd4d0a5cb18a9047621babef4b2abfa5c78cc SHA512 ad51bd00ad83878eb48f0949f6e0435ef66abad9e8f571244bb90b89baf7c14eb7bba72edb42541fc2f979bff9b0f50035396679bf6ec569a9ebb6447b63dbe9 WHIRLPOOL de3c5e753dc806ed98ea96bcb97e100475555c2becda69a8db85a139bd01859156151c7c2e089329c45a540c8a99768a0e35394f3599bb576a681ecbf9d0916a
+DIST movit-1.1.2.tar.gz 858539 SHA256 417e1810d588e5b4b2e82f05c2b6a86f4d14a3d9d9f4f26f4e009fce064d6a4a SHA512 082aab059864fd4feb9a66c0e7bab64babedfbdcc442ab5b1522ab60f678039d03e9c1c88095abe0e7196367c3ec1c8a9c90134cf5f97e4af31a3f7cbe98d661 WHIRLPOOL d305bd194d38b6da263471df443ef98c6854b2637eccfc6c376d0b9556a1c5be1e56b1d38f3097a0b2b8f91451728ffa4e476b46b17e829eb534f25c7053b7d1
+DIST movit-1.1.3.tar.gz 510811 SHA256 897fa5df7b261446dbed439c200f77b18a48e3693a0e6d666acf04eede806360 SHA512 ca8baa92907421d762a475fd06380fd3c9301df008ff60aaadf584f06185b0beed80633603073252492d4ad7f514ea6e09917862ba4d4630cf3bb0ecffa6f02f WHIRLPOOL 8f7efd99ee75b1e4990eac7a26fc0b0673fdfcecb49dfcc83211a0bd0e4af06a3b7b14b2b744b3823f0df6be49c020e2d9666f73257c53581fb24094330097b2
+DIST movit-1.1.tar.gz 507154 SHA256 41dcd3ccefbe218b7ccc47a7ac2577cf261f1ea10298f26ff16ffc353adf0f25 SHA512 ecb84f918b28b507c06cde680da5114fdf19b224a71e202d6f932de0e080e941f7977e590476eda9ffc9fc5839126b1f2d1056dd80039ced894281a51eebcf30 WHIRLPOOL c349a9f12b5966e57fa0b09811bbf3cf4a36abbb06b3df5cc3b9fa1b42efa7e902be9625b09e161d0250034aa05c3901db5ec9e24b8af554fb046ad725cda04a
diff --git a/media-video/movit/metadata.xml b/media-video/movit/metadata.xml
new file mode 100644
index 000000000000..6719fcd2bb35
--- /dev/null
+++ b/media-video/movit/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/media-video/movit/movit-1.1.1.ebuild b/media-video/movit/movit-1.1.1.ebuild
new file mode 100644
index 000000000000..d58f45cffef3
--- /dev/null
+++ b/media-video/movit/movit-1.1.1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# no sane way to use OpenGL from within tests?
+RESTRICT="test"
+
+DESCRIPTION="Modern Video Toolkit"
+HOMEPAGE="http://movit.sesse.net/"
+# Tests need gtest, makefile unconditionally builds tests, so ... yey!
+SRC_URI="http://movit.sesse.net/${P}.tar.gz
+ http://googletest.googlecode.com/files/gtest-1.7.0.zip"
+LICENSE="GPL-2+"
+SLOT="0"
+
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="media-libs/mesa
+ dev-cpp/eigen:3
+ media-libs/libepoxy
+ sci-libs/fftw
+ media-libs/libsdl2
+ "
+DEPEND="${RDEPEND}"
+
+src_compile() {
+ GTEST_DIR="${WORKDIR}/gtest-1.7.0" emake
+}
+
+src_test() {
+ GTEST_DIR="${WORKDIR}/gtest-1.7.0" emake check
+}
diff --git a/media-video/movit/movit-1.1.2.ebuild b/media-video/movit/movit-1.1.2.ebuild
new file mode 100644
index 000000000000..d58f45cffef3
--- /dev/null
+++ b/media-video/movit/movit-1.1.2.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# no sane way to use OpenGL from within tests?
+RESTRICT="test"
+
+DESCRIPTION="Modern Video Toolkit"
+HOMEPAGE="http://movit.sesse.net/"
+# Tests need gtest, makefile unconditionally builds tests, so ... yey!
+SRC_URI="http://movit.sesse.net/${P}.tar.gz
+ http://googletest.googlecode.com/files/gtest-1.7.0.zip"
+LICENSE="GPL-2+"
+SLOT="0"
+
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="media-libs/mesa
+ dev-cpp/eigen:3
+ media-libs/libepoxy
+ sci-libs/fftw
+ media-libs/libsdl2
+ "
+DEPEND="${RDEPEND}"
+
+src_compile() {
+ GTEST_DIR="${WORKDIR}/gtest-1.7.0" emake
+}
+
+src_test() {
+ GTEST_DIR="${WORKDIR}/gtest-1.7.0" emake check
+}
diff --git a/media-video/movit/movit-1.1.3.ebuild b/media-video/movit/movit-1.1.3.ebuild
new file mode 100644
index 000000000000..d58f45cffef3
--- /dev/null
+++ b/media-video/movit/movit-1.1.3.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# no sane way to use OpenGL from within tests?
+RESTRICT="test"
+
+DESCRIPTION="Modern Video Toolkit"
+HOMEPAGE="http://movit.sesse.net/"
+# Tests need gtest, makefile unconditionally builds tests, so ... yey!
+SRC_URI="http://movit.sesse.net/${P}.tar.gz
+ http://googletest.googlecode.com/files/gtest-1.7.0.zip"
+LICENSE="GPL-2+"
+SLOT="0"
+
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="media-libs/mesa
+ dev-cpp/eigen:3
+ media-libs/libepoxy
+ sci-libs/fftw
+ media-libs/libsdl2
+ "
+DEPEND="${RDEPEND}"
+
+src_compile() {
+ GTEST_DIR="${WORKDIR}/gtest-1.7.0" emake
+}
+
+src_test() {
+ GTEST_DIR="${WORKDIR}/gtest-1.7.0" emake check
+}
diff --git a/media-video/movit/movit-1.1.ebuild b/media-video/movit/movit-1.1.ebuild
new file mode 100644
index 000000000000..ab70c4a6a4b7
--- /dev/null
+++ b/media-video/movit/movit-1.1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# no sane way to use OpenGL from within tests?
+RESTRICT="test"
+
+DESCRIPTION="Modern Video Toolkit"
+HOMEPAGE="http://movit.sesse.net/"
+# Tests need gtest, makefile unconditionally builds tests, so ... yey!
+SRC_URI="http://movit.sesse.net/${P}.tar.gz
+ http://googletest.googlecode.com/files/gtest-1.7.0.zip"
+LICENSE="GPL-2+"
+SLOT="0"
+
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="media-libs/mesa
+ dev-cpp/eigen:3
+ media-libs/libepoxy
+ sci-libs/fftw
+ "
+DEPEND="${RDEPEND}"
+
+src_compile() {
+ GTEST_DIR="${WORKDIR}/gtest-1.7.0" emake
+}
+
+src_test() {
+ GTEST_DIR="${WORKDIR}/gtest-1.7.0" emake check
+}
diff --git a/media-video/mpeg-tools/Manifest b/media-video/mpeg-tools/Manifest
new file mode 100644
index 000000000000..f7e733b1398a
--- /dev/null
+++ b/media-video/mpeg-tools/Manifest
@@ -0,0 +1 @@
+DIST mpeg_encode-1.5b-src.tar.gz 2028724 SHA256 dd8db42f88393bb0ff0d738defa271729a8aa9b8de24ed13bc6bd27014f2daf5 SHA512 df6f9def3ba05c752ebdc5311c512688d6fae380480009dad55b4183a378685eca79943c075166b21ed3bfd0cce7697761abc6ec795f57c0ed1c60c2a5cba469 WHIRLPOOL 9e1f06ffa4518903280bc1693fa6c8ae0b71ebcf4936889ed3e74ee6144d22a6de8e347797f61001b037d5148abf5a35edfd11968f12e565f06c8a0fdfb0d2b4
diff --git a/media-video/mpeg-tools/files/mpeg-tools-1.5b-64bit_fixes.patch b/media-video/mpeg-tools/files/mpeg-tools-1.5b-64bit_fixes.patch
new file mode 100644
index 000000000000..fa2e70304dbe
--- /dev/null
+++ b/media-video/mpeg-tools/files/mpeg-tools-1.5b-64bit_fixes.patch
@@ -0,0 +1,286 @@
+--- work/convert/eyuvtojpeg.c
++++ work/convert/eyuvtojpeg.c
+@@ -22,6 +22,7 @@
+ /*==============*
+ * HEADER FILES *
+ *==============*/
++#include <string.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <malloc.h>
+@@ -43,7 +44,7 @@
+ void AllocYCC(void);
+
+
+-void main(int argc, char **argv)
++int main(int argc, char **argv)
+ {
+ FILE *fpointer;
+ char command[256];
+@@ -105,6 +106,7 @@
+ fprintf(stdout, "Converting to JPEG %s\n", dest);
+ sprintf(command, "cjpeg /tmp/foobar > %s", dest);
+ system(command);
++ return 0;
+ }
+
+
+--- work/convert/eyuvtoppm.c
++++ work/convert/eyuvtoppm.c
+@@ -22,6 +22,7 @@
+ /*==============*
+ * HEADER FILES *
+ *==============*/
++#include <string.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <malloc.h>
+@@ -43,7 +44,7 @@
+ void AllocYCC(void);
+
+
+-void main(int argc, char **argv)
++int main(int argc, char **argv)
+ {
+ FILE *fpointer;
+ char src[256], dest[256];
+@@ -109,7 +110,7 @@
+
+ WritePPM(fpointer);
+ fclose(fpointer);
+-
++ return 0;
+ }
+
+ void Usage(void)
+--- work/convert/mtv/archdep.h
++++ work/convert/mtv/archdep.h
+@@ -45,16 +45,46 @@
+ ((char *)(to))[5] = ((char *)(from))[2]; \
+ ((char *)(to))[6] = ((char *)(from))[1]; \
+ ((char *)(to))[7] = ((char *)(from))[0];
+-#endif /*little-endian*/
++#endif /*little-endian 32bit*/
++
++#if defined (__x86_64)
++#define DECODE_SHORT(from, to) \
++ ((char *)(to))[0] = ((char *)(from))[1]; \
++ ((char *)(to))[1] = ((char *)(from))[0];
++#define DECODE_INT(from, to) \
++ ((char *)(to))[0] = ((char *)(from))[3]; \
++ ((char *)(to))[1] = ((char *)(from))[2]; \
++ ((char *)(to))[2] = ((char *)(from))[1]; \
++ ((char *)(to))[3] = ((char *)(from))[0];
++
++#define DECODE_LONG(from, to) \
++ ((char *)(to))[0] = ((char *)(from))[7]; \
++ ((char *)(to))[1] = ((char *)(from))[6]; \
++ ((char *)(to))[2] = ((char *)(from))[5]; \
++ ((char *)(to))[3] = ((char *)(from))[4]; \
++ ((char *)(to))[4] = ((char *)(from))[3]; \
++ ((char *)(to))[5] = ((char *)(from))[2]; \
++ ((char *)(to))[6] = ((char *)(from))[1]; \
++ ((char *)(to))[7] = ((char *)(from))[0];
++
++#define DECODE_FLOAT(from, to) DECODE_INT((to), (from))
++
++#define DECODE_DOUBLE(from, to) DECODE_LONG((to), (from))
++
++#endif /*little-endian, 64bit*/
+
+
+ /* Most architectures are symmetrical with respect to conversions. */
+-#if defined (mc68000) || defined (sparc) || defined (i386)
++#if defined (mc68000) || defined (sparc) || defined (i386) || defined(__x86_64)
+ #define ENCODE_SHORT(from, to) DECODE_SHORT((from), (to))
+ #define ENCODE_LONG(from, to) DECODE_LONG((from), (to))
+ #define ENCODE_FLOAT(from, to) DECODE_FLOAT((from), (to))
+ #define ENCODE_DOUBLE(from, to) DECODE_DOUBLE((from), (to))
+
++#if defined(__x86_64)
++#define ENCODE_INT(from, to) DECODE_INT((from), (to))
++#endif
++
+ /* Define types of specific length */
+ typedef char i_8;
+ typedef short i_16;
+--- work/convert/mtv/movieToVid.c
++++ work/convert/mtv/movieToVid.c
+@@ -295,7 +295,7 @@
+ exit (0);
+ }
+
+-void
++int
+ main (argc, argv)
+ int argc;
+ char **argv;
+@@ -326,4 +326,5 @@
+ WriteScriptFile (argv[1], argv[2], argv[3], argv[4],
+ &header, offsets, numFrames);
+ fprintf (stderr, "done\n");
++ return 0;
+ }
+--- work/convert/ppmtoeyuv.c
++++ work/convert/ppmtoeyuv.c
+@@ -39,6 +39,11 @@
+ * HEADER FILES *
+ *==============*/
+
++#include <malloc.h>
++#include <unistd.h>
++#include <string.h>
++#include <stdlib.h>
++#include <ctype.h>
+ #include <stdio.h>
+ #include "ansi.h"
+
+@@ -65,7 +66,7 @@
+ static void PPMtoYUV _ANSI_ARGS_((void));
+
+
+-void main(int argc, char **argv)
++int main(int argc, char **argv)
+ {
+ if ( ! ReadPPM(stdin) )
+ {
+@@ -76,6 +77,7 @@
+ PPMtoYUV();
+
+ WriteYUV(stdout);
++ return 0;
+ }
+
+
+--- work/mpeg_encode/bitio.c
++++ work/mpeg_encode/bitio.c
+@@ -79,6 +79,8 @@
+ * HEADER FILES *
+ *==============*/
+
++#include <unistd.h>
++#include <time.h>
+ #include <assert.h>
+ #include "all.h"
+ #include "byteorder.h"
+--- work/mpeg_encode/jpeg.c
++++ work/mpeg_encode/jpeg.c
+@@ -65,6 +65,8 @@
+ *==============*/
+
+ #include <stdio.h>
++#include <sys/types.h>
++#include <unistd.h>
+ #include "all.h"
+ #include "mtypes.h"
+ #include "frames.h"
+--- work/mpeg_encode/headers/libpnmrw.h
++++ work/mpeg_encode/headers/libpnmrw.h
+@@ -20,9 +20,6 @@
+ ** that point here, feel free to tweak or remove these declarations.
+ */
+ #include <malloc.h>
+-#if !defined(sco) && !defined(sgi) && !defined(IRIX)
+-extern char* malloc();
+-#endif
+ /* End of configurable definitions. */
+
+
+--- work/mpeg_encode/libpnmrw.c
++++ work/mpeg_encode/libpnmrw.c
+@@ -27,6 +27,9 @@
+ /* #define MSDOS */
+ #endif
+
++#include <stdlib.h>
++#include <unistd.h>
++#include <errno.h>
+ #include <stdio.h>
+ #include "libpnmrw.h"
+
+@@ -128,11 +128,9 @@
+ pm_perror( reason )
+ char* reason;
+ {
+- extern char* sys_errlist[];
+- extern int errno;
+ char* e;
+
+- e = sys_errlist[errno];
++ e = strerror(errno);
+
+ if ( reason != 0 && reason[0] != '\0' )
+ (void) fprintf( stderr, "%s: %s - %s\n", progname, reason, e );
+@@ -361,7 +361,7 @@
+ int cols, format;
+ {
+ register int col, bitshift, b;
+- register int item;
++ register int item = 0;
+ register bit* bP;
+
+ switch ( format )
+--- work/mpeg_encode/opts.c
++++ work/mpeg_encode/opts.c
+@@ -35,6 +35,7 @@
+ * HEADER FILES *
+ *==============*/
+
++#include <stdlib.h>
+ #include <stdio.h>
+ #include <string.h>
+ #include "opts.h"
+--- work/mpeg_encode/iframe.c
++++ work/mpeg_encode/iframe.c
+@@ -235,6 +235,8 @@
+ int SetFCodeHelper _ANSI_ARGS_((int sr));
+ void CalcDistortion _ANSI_ARGS_((MpegFrame *current, int y, int x));
+
++void Mpost_UnQuantZigBlockLaplace _ANSI_ARGS_((FlatBlock in, Block out, int qscale, boolean iblock));
++
+ int
+ SetFCodeHelper(SR)
+ int SR;
+--- work/convert/jmovie2jpeg.c
++++ work/convert/jmovie2jpeg.c
+@@ -33,6 +33,9 @@
+ ************************************************************************/
+
+ #include <stdio.h>
++#include <string.h>
++#include <stdlib.h>
++#include <unistd.h>
+
+ #define HEADER_SIZE 607 /*JFIF header size used on output images*/
+
+@@ -54,7 +54,6 @@
+ FILE *inFile; /* Jmovie file pointer */
+ FILE *outFile; /* JPEG file pointer for output file */
+ FILE *audiooutfile; /* SPARC .AU audio output file pointer*/
+- extern char *malloc();
+ int fd, i; /* input file descriptor and a counting variable*/
+ int start, end; /* first and last frames to be extracted */
+ char ofname[256]; /* output filename string */
+@@ -283,12 +283,12 @@
+ if (fread (&(image_offset),sizeof(int),1,inFile) != 1)
+ {
+ perror("Error in reading image offset");
+- exit();
++ exit(1);
+ }
+ if (fread (&(audio_tracks),sizeof(int),1,inFile) != 1)
+ {
+ perror("Error in reading audio tracks");
+- exit();
++ exit(1);
+ }
+ if (audio_tracks != 1)
+ {
+@@ -373,6 +373,7 @@
+ fclose(inFile);
+ fclose(audiooutfile);
+
++ return 0;
+ }
+
+
diff --git a/media-video/mpeg-tools/files/mpeg-tools-1.5b-as-needed.patch b/media-video/mpeg-tools/files/mpeg-tools-1.5b-as-needed.patch
new file mode 100644
index 000000000000..58c74e124f09
--- /dev/null
+++ b/media-video/mpeg-tools/files/mpeg-tools-1.5b-as-needed.patch
@@ -0,0 +1,47 @@
+--- convert/Makefile 2009-08-25 21:19:42.000000000 +0200
++++ convert/Makefile.new 2009-08-25 21:22:54.000000000 +0200
+@@ -53,13 +53,13 @@
+ all: $(TARGETS)
+
+ vidtoppm: vidtoppm.c
+- $(CC) -lXvid -lX11 $(INCLUDE) -o vidtoppm vidtoppm.c
++ $(CC) $(LDFLAGS) $(INCLUDE) $@.o -o $@ -lXvid -lX11
+
+ vidtojpeg: vidtojpeg.c
+- $(CC) -lXvid -lX11 $(INCLUDE) -o vidtojpeg vidtojpeg.c
++ $(CC) $(LDFLAGS) $(INCLUDE) $@.o -o $@ -lXvid -lX11
+
+ vidtoeyuv: vidtoeyuv.c
+- $(CC) -lXvid -lX11 $(INCLUDE) -o vidtoeyuv vidtoeyuv.c
++ $(CC) $(LDFLAGS) $(INCLUDE) $@.o -o $@ -lXvid -lX11
+
+ wc:; wc -l *.[ch] *.pl *.table
+ clean:; rm -f *.o core *~ gmon.out $(TARGETS)
+--- convert/mtv/Makefile 2009-08-25 21:19:42.000000000 +0200
++++ convert/mtv/Makefile.new 2009-08-25 21:24:31.000000000 +0200
+@@ -15,12 +15,12 @@
+ default: movieToVid
+
+ movieToVid: movieToVid.o
+- $(CC) $(CFLAGS) -o movieToVid movieToVid.o
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $@.o
+
+ clean:
+ rm -f core lintout makeout tags Makefile.bak *.o \
+ movieToVid
+
+ purify: $(OBJ)
+- $(PURIFY) $(CC) $(OBJ) -o movieToVid.purify
++ $(PURIFY) $(CC) $(LDFLAGS) $(OBJ) -o movieToVid.purify
+
+--- mpeg_encode//Makefile 2009-08-25 21:19:43.000000000 +0200
++++ mpeg_encode//Makefile.new 2009-08-25 21:27:12.000000000 +0200
+@@ -203,7 +203,6 @@
+ ############
+
+ mpeg_encode: $(MP_ALL_OBJS) $(JPEG_LIB)
+- $(PURIFY) $(CC) $(CFLAGS) -o $@ $(MP_ALL_OBJS) $(LIBDIRS) $(LIBS)
+- strip mpeg_encode
++ $(PURIFY) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(MP_ALL_OBJS) $(LIBDIRS) $(LIBS)
+
+ profile: $(MP_ALL_OBJS)
diff --git a/media-video/mpeg-tools/files/mpeg-tools-1.5b-build.patch b/media-video/mpeg-tools/files/mpeg-tools-1.5b-build.patch
new file mode 100644
index 000000000000..70a96c439e9c
--- /dev/null
+++ b/media-video/mpeg-tools/files/mpeg-tools-1.5b-build.patch
@@ -0,0 +1,56 @@
+--- convert/Makefile
++++ convert/Makefile
+@@ -24,7 +24,7 @@
+ #CC = cc
+
+ # compiler flags
+-CFLAGS = -O -g -Wall -W -Wreturn-type -Wunused -Wmissing-prototypes $(PROFLAG)
++CFLAGS += -Wall -W -Wreturn-type -Wunused -Wmissing-prototypes $(PROFLAG)
+
+ # if you have an ANSI C Compiler, use the following line, otherwise
+ # uncomment the longer .c.o rule, also
+@@ -52,15 +52,6 @@
+
+ all: $(TARGETS)
+
+-ppmtoeyuv: ppmtoeyuv.c
+- $(CC) -o ppmtoeyuv ppmtoeyuv.c
+-
+-jmovie2jpeg: jmovie2jpeg.c
+- $(CC) -o jmovie2jpeg jmovie2jpeg.c
+-
+-mpeg_demux: mpeg_demux.c
+- $(CC) -O -o mpeg_demux mpeg_demux.c
+-
+ vidtoppm: vidtoppm.c
+ $(CC) -lXvid -lX11 $(INCLUDE) -o vidtoppm vidtoppm.c
+
+--- convert/mtv/Makefile
++++ convert/mtv/Makefile
+@@ -4,7 +4,7 @@
+
+ PURIFY = $(PURIFYHOME)/purify
+
+-CFLAGS= -g -I.
++CFLAGS+= -I.
+
+ #CFLAGS= -O -DLITTLE_ENDIEN
+ LFLAGS=
+@@ -15,7 +15,7 @@
+ default: movieToVid
+
+ movieToVid: movieToVid.o
+- cc ${CFLAGS} -o movieToVid movieToVid.o
++ $(CC) $(CFLAGS) -o movieToVid movieToVid.o
+
+ clean:
+ rm -f core lintout makeout tags Makefile.bak *.o \
+--- mpeg_encode/Makefile.orig 2005-09-26 16:01:51.000000000 -0400
++++ mpeg_encode/Makefile 2005-09-26 16:02:11.000000000 -0400
+@@ -97,5 +97,5 @@
+
+ # gcc
+-CFLAGS = $(INCLUDEDIR) $(DEBUGFLAG) -Wall -Wmissing-prototypes $(PROFLAG) $(PROTOFLAG)
++CFLAGS += $(INCLUDEDIR) -Wall -Wmissing-prototypes $(PROFLAG) $(PROTOFLAG)
+
+ # gcc-strict
diff --git a/media-video/mpeg-tools/files/mpeg-tools-1.5b-jpeg.patch b/media-video/mpeg-tools/files/mpeg-tools-1.5b-jpeg.patch
new file mode 100644
index 000000000000..633321879e8d
--- /dev/null
+++ b/media-video/mpeg-tools/files/mpeg-tools-1.5b-jpeg.patch
@@ -0,0 +1,56 @@
+--- jpeg.c
++++ jpeg.c
+@@ -77,13 +77,10 @@
+
+ /* make it happier.... */
+ #undef DCTSIZE2
+-#include "jpeg/jpeglib.h"
+-
++#include "jpeglib.h"
+
+ #define HEADER_SIZE 607 /*JFIF header size used on output images*/
+
+-
+-
+ /*=======================================================================*
+ * *
+ * JMovie2JPEG *
+@@ -514,8 +511,12 @@
+ #ifdef JPEG4
+ buffer_height = 8; /* could be 2, 4,8 rows high */
+ #else
+- buffer_height = cinfo.max_v_samp_factor * cinfo.min_DCT_scaled_size;
+-#endif
++ #if JPEG_LIB_VERSION >= 80
++ buffer_height = cinfo.max_v_samp_factor * cinfo.min_DCT_v_scaled_size;
++ #else
++ buffer_height = cinfo.max_v_samp_factor * cinfo.min_DCT_scaled_size;
++ #endif
++#endif /* JPEG4 */
+
+ for(cp=0,compptr = cinfo.comp_info;cp<cinfo.num_components;
+ cp++,compptr++) {
+--- Makefile
++++ Makefile
+@@ -36,9 +36,9 @@
+ ##############
+ # JPEG STUFF #
+ ##############
+-JPEG_LIB = jpeg/libjpeg.a
+-JPEG_DIR = -Ijpeg
+-JPEG_LIB_DIR = -Ljpeg
++JPEG_LIB = -ljpeg
++JPEG_DIR =
++JPEG_LIB_DIR =
+ MP_JPEG_OBJS = jpeg.o
+ MP_JPEG_SRCS = jpeg.c
+
+@@ -57,7 +57,7 @@
+ #################
+ # INCLUDE FILES #
+ #################
+-INCLUDEDIR = -Iheaders -I/usr/include $(JPEG_DIR)
++INCLUDEDIR = -Iheaders
+
+ ############################################################################
+ # LIBRARIES # specify library directories; need jpg lib and maybe pbm #
diff --git a/media-video/mpeg-tools/files/mpeg-tools-1.5b-powerpc.patch b/media-video/mpeg-tools/files/mpeg-tools-1.5b-powerpc.patch
new file mode 100644
index 000000000000..3eb2d5f15a60
--- /dev/null
+++ b/media-video/mpeg-tools/files/mpeg-tools-1.5b-powerpc.patch
@@ -0,0 +1,20 @@
+--- convert/mtv/archdep.h 2010-03-11 04:35:04.596642403 +0000
++++ convert/mtv/archdep.h 2010-03-11 04:34:38.949974604 +0000
+@@ -17,7 +17,7 @@
+ * Note that these macros *do not* work for in-place transformations.
+ */
+
+-#if defined (mc68000) || defined (sparc)
++#if defined (mc68000) || defined (sparc) || defined (__powerpc__) || defined(__POWERPC__)
+ #define DECODE_SHORT(from, to) *((short *)(to)) = *((short *)(from))
+ #define DECODE_LONG(from, to) *((long *)(to)) = *((long *)(from))
+ #define DECODE_FLOAT(from, to) *((float *)(to)) = *((float *)(from))
+@@ -75,7 +75,7 @@
+
+
+ /* Most architectures are symmetrical with respect to conversions. */
+-#if defined (mc68000) || defined (sparc) || defined (i386) || defined(__x86_64)
++#if defined (mc68000) || defined (sparc) || defined (i386) || defined(__x86_64) || defined(__powerpc__) || defined(__POWERPC__)
+ #define ENCODE_SHORT(from, to) DECODE_SHORT((from), (to))
+ #define ENCODE_LONG(from, to) DECODE_LONG((from), (to))
+ #define ENCODE_FLOAT(from, to) DECODE_FLOAT((from), (to))
diff --git a/media-video/mpeg-tools/files/mpeg-tools-1.5b-system-jpeg-7.patch b/media-video/mpeg-tools/files/mpeg-tools-1.5b-system-jpeg-7.patch
new file mode 100644
index 000000000000..3b0ad4792a54
--- /dev/null
+++ b/media-video/mpeg-tools/files/mpeg-tools-1.5b-system-jpeg-7.patch
@@ -0,0 +1,26 @@
+diff -ur mpeg_encode.orig/jpeg.c mpeg_encode/jpeg.c
+--- mpeg_encode.orig/jpeg.c 2009-08-24 21:33:18.000000000 +0300
++++ mpeg_encode/jpeg.c 2009-08-24 22:23:08.000000000 +0300
+@@ -80,13 +80,9 @@
+ /* make it happier.... */
+ #undef DCTSIZE2
+ #include "jpeglib.h"
+-#include "jpegint.h"
+-
+
+ #define HEADER_SIZE 607 /*JFIF header size used on output images*/
+
+-
+-
+ /*=======================================================================*
+ * *
+ * JMovie2JPEG *
+@@ -517,7 +513,7 @@
+ #ifdef JPEG4
+ buffer_height = 8; /* could be 2, 4,8 rows high */
+ #else
+- buffer_height = cinfo.max_v_samp_factor * cinfo.min_DCT_scaled_size;
++ buffer_height = cinfo.max_v_samp_factor * cinfo.min_DCT_v_scaled_size;
+ #endif
+
+ for(cp=0,compptr = cinfo.comp_info;cp<cinfo.num_components;
diff --git a/media-video/mpeg-tools/files/mpeg-tools-1.5b-system-jpeg.patch b/media-video/mpeg-tools/files/mpeg-tools-1.5b-system-jpeg.patch
new file mode 100644
index 000000000000..7be3905577c3
--- /dev/null
+++ b/media-video/mpeg-tools/files/mpeg-tools-1.5b-system-jpeg.patch
@@ -0,0 +1,38 @@
+Use the system jpeg rather than the bundled one
+
+--- mpeg_encode/Makefile
++++ mpeg_encode/Makefile
+@@ -36,9 +36,9 @@
+ ##############
+ # JPEG STUFF #
+ ##############
+-JPEG_LIB = jpeg/libjpeg.a
+-JPEG_DIR = -Ijpeg
+-JPEG_LIB_DIR = -Ljpeg
++JPEG_LIB = -ljpeg
++JPEG_DIR =
++JPEG_LIB_DIR =
+ MP_JPEG_OBJS = jpeg.o
+ MP_JPEG_SRCS = jpeg.c
+
+@@ -57,7 +57,7 @@
+ #################
+ # INCLUDE FILES #
+ #################
+-INCLUDEDIR = -Iheaders -I/usr/include $(JPEG_DIR)
++INCLUDEDIR = -Iheaders
+
+ ############################################################################
+ # LIBRARIES # specify library directories; need jpg lib and maybe pbm #
+--- mpeg_encode/jpeg.c
++++ mpeg_encode/jpeg.c
+@@ -79,7 +79,8 @@
+
+ /* make it happier.... */
+ #undef DCTSIZE2
+-#include "jpeg/jpeglib.h"
++#include "jpeglib.h"
++#include "jpegint.h"
+
+
+ #define HEADER_SIZE 607 /*JFIF header size used on output images*/
diff --git a/media-video/mpeg-tools/files/mpeg-tools-1.5b-tempfile-convert.patch b/media-video/mpeg-tools/files/mpeg-tools-1.5b-tempfile-convert.patch
new file mode 100644
index 000000000000..2bab1511bf59
--- /dev/null
+++ b/media-video/mpeg-tools/files/mpeg-tools-1.5b-tempfile-convert.patch
@@ -0,0 +1,169 @@
+--- convert/eyuvtojpeg.c
++++ convert/eyuvtojpeg.c
+@@ -25,6 +25,7 @@
+ #include <string.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <unistd.h>
+ #include <malloc.h>
+
+ typedef unsigned char uint8;
+@@ -47,8 +48,9 @@
+ int main(int argc, char **argv)
+ {
+ FILE *fpointer;
+- char command[256];
+- char src[256], dest[256];
++ char command[4096];
++ char src[4096], dest[4096], tempfile[4096];
++ int ret;
+
+ if ((strcmp(argv[1],"-?") == 0) ||
+ (strcmp(argv[1],"-h") == 0) ||
+@@ -99,14 +101,16 @@
+ YUVtoPPM();
+
+ fprintf(stdout, "Writing PPM\n");
+- fpointer = fopen("/tmp/foobar", "w");
++ sprintf(tempfile, "%s.tmp", dest);
++ fpointer = fopen(tempfile, "w");
+ WritePPM(fpointer);
+ fclose(fpointer);
+
+ fprintf(stdout, "Converting to JPEG %s\n", dest);
+- sprintf(command, "cjpeg /tmp/foobar > %s", dest);
+- system(command);
+- return 0;
++ sprintf(command, "cjpeg %s > %s", tempfile, dest);
++ ret = system(command);
++ unlink(tempfile);
++ return ret;
+ }
+
+
+--- convert/vidtoeyuv.c
++++ convert/vidtoeyuv.c
+@@ -125,9 +125,9 @@
+ XImage *ximage;
+ char *tdata;
+ char *obase;
+- char ofname[256];
++ char ofname[4096], tempfile[4096];
+ int height, width;
+- char command[256];
++ char command[4096];
+ int nth;
+
+ if ((argc != 7) && (argc != 8))usage (argv[0]);
+@@ -223,9 +223,11 @@
+
+
+ sprintf(ofname, "%s%d.yuv", obase, i);
+- outFile = fopen("/tmp/foobar", "w");
++ sprintf(tempfile, "%s%d.yuv.tmp", obase, i);
++ outFile = fopen(tempfile, "w");
+ if (!outFile) {
+ perror("Couldn't open output file.");
++ exit(1);
+ }
+
+ for (r=0; r<height; r++) {
+@@ -241,9 +243,10 @@
+
+ free(tdata);
+
+- sprintf(command, "rawtoppm %d %d < /tmp/foobar | ppmtoyuv > %s",
+- width, height, ofname);
++ sprintf(command, "rawtoppm %d %d < %s | ppmtoyuv > %s",
++ width, height, tempfile, ofname);
+ system(command);
++ unlink(tempfile);
+
+ for (j=0; j<nth-1; j++) {
+ if (read (fd, &image, sizeof(image)) != sizeof(image)) {
+--- convert/vidtojpeg.c
++++ convert/vidtojpeg.c
+@@ -123,9 +123,9 @@
+ XImage *ximage;
+ char *tdata;
+ char *obase;
+- char ofname[256];
++ char ofname[4096], tempfile[4096];
+ int height, width;
+- char command[256];
++ char command[4096];
+
+
+ if ((argc != 7) && (argc != 8))usage (argv[0]);
+@@ -221,9 +221,11 @@
+
+
+ sprintf(ofname, "%s.%d.jpeg", obase, i);
+- outFile = fopen("/tmp/foobar", "w");
++ sprintf(tempfile, "%s.%d.jpeg.tmp", obase, i);
++ outFile = fopen(tempfile, "w");
+ if (!outFile) {
+ perror("Couldn't open output file.");
++ exit(1);
+ }
+
+ for (r=0; r<height; r++) {
+@@ -239,9 +241,10 @@
+
+ free(tdata);
+
+- sprintf(command, "rawtoppm %d %d < /tmp/foobar | cjpeg > %s",
+- width, height, ofname);
++ sprintf(command, "rawtoppm %d %d < %s | cjpeg > %s",
++ width, height, tempfile, ofname);
+ system(command);
++ unlink(tempfile);
+ }
+ }
+
+--- convert/vidtoppm.c
++++ convert/vidtoppm.c
+@@ -220,9 +220,11 @@
+
+
+ sprintf(ofname, "%s%d.ppm", obase, i);
+- outFile = fopen("/tmp/foobar", "w");
++ sprintf(tempfile, "%s%d.ppm.tmp", obase, i);
++ outFile = fopen(tempfile, "w");
+ if (!outFile) {
+ perror("Couldn't open output file.");
++ exit(1);
+ }
+
+ for (r=0; r<height; r++) {
+@@ -238,8 +240,9 @@
+
+ free(tdata);
+
+- sprintf(command, "rawtoppm %d %d < /tmp/foobar > %s",
+- width, height, ofname);
++ sprintf(command, "rawtoppm %d %d < %s > %s",
++ width, height, tempfile, ofname);
+ system(command);
++ unlink(tempfile);
+ }
+ }
+--- convert/eyuvtoppm.c
++++ convert/eyuvtoppm.c
+@@ -100,13 +100,9 @@
+ fpointer = fopen(dest, "w");
+ if (fpointer == NULL) {
+ fprintf(stderr, "Problems opening %s!\n", dest);
+- fprintf(stderr, "Trying /tmp/foobar instead\n");
+- strcpy(dest, "/tmp/foobar");
+- fpointer = fopen(dest, "w");
+- if (fpointer == NULL) {
+- fprintf(stderr, "Nope, exiting.\n");
+- exit(1);
+- }}
++ perror("");
++ exit(1);
++ }
+
+ WritePPM(fpointer);
+ fclose(fpointer);
diff --git a/media-video/mpeg-tools/files/mpeg-tools-1.5b-tempfile-mpeg-encode.patch b/media-video/mpeg-tools/files/mpeg-tools-1.5b-tempfile-mpeg-encode.patch
new file mode 100644
index 000000000000..1b33bc5dd1c8
--- /dev/null
+++ b/media-video/mpeg-tools/files/mpeg-tools-1.5b-tempfile-mpeg-encode.patch
@@ -0,0 +1,87 @@
+--- mpeg_encode/parallel.c
++++ mpeg_encode/parallel.c
+@@ -586,6 +586,8 @@
+ * SIDE EFFECTS: none
+ *
+ *===========================================================================*/
++/* internal hook into the ReadFrame function */
++void _ReadFrame(MpegFrame *frame, char *fileName, FILE *fileHook, char *conversion, boolean addPath);
+ void
+ GetRemoteFrame(frame, frameNumber)
+ MpegFrame *frame;
+@@ -615,8 +617,13 @@
+
+ if ( frameNumber != -1 ) {
+ if ( separateConversion ) {
+- sprintf(fileName, "/tmp/foobar%d", machineNumber);
+- filePtr = fopen(fileName, "wb");
++ int fd;
++ snprintf(fileName, sizeof(fileName), "/tmp/mpeg_encode_foobar%dXXXXXX", machineNumber);
++ fd = mkstemp(fileName);
++ if (fd == -1 || (filePtr = fdopen(fd, "wb")) == NULL) {
++ perror("ERROR: mpeg_encode->GetRemoteFrame");
++ exit(1);
++ }
+
+ /* read in stuff, SafeWrite to file, perform local conversion */
+ do {
+@@ -628,10 +635,12 @@
+ fwrite(smallBuffer, 1, numBytes, filePtr);
+ } while ( numBytes == 1000 );
+ fflush(filePtr);
+- fclose(filePtr);
++ rewind(filePtr);
+
+ /* now do slave conversion */
+- ReadFrame(frame, fileName, slaveConversion, FALSE);
++ _ReadFrame(frame, NULL, filePtr, slaveConversion, FALSE);
++ /* _ReadFrame() will close the file pointer for us */
++ /* fclose(filePtr); */
+ } else {
+ Frame_AllocYCC(frame);
+
+--- mpeg_encode/readframe.c
++++ mpeg_encode/readframe.c
+@@ -227,14 +227,22 @@
+ * SIDE EFFECTS: none
+ *
+ *===========================================================================*/
++void _ReadFrame(MpegFrame *frame, char *fileName, FILE *fileHook, char *conversion, boolean addPath);
++
++void ReadFrame(MpegFrame *frame, char *fileName, char *conversion, boolean addPath)
++{
++ _ReadFrame(frame, fileName, NULL, conversion, addPath);
++}
++
+ void
+-ReadFrame(frame, fileName, conversion, addPath)
++_ReadFrame(frame, fileName, fileHook, conversion, addPath)
+ MpegFrame *frame;
+ char *fileName;
++ FILE *fileHook;
+ char *conversion;
+ boolean addPath;
+ {
+- FILE *ifp;
++ FILE *ifp = fileHook;
+ char command[1024];
+ char fullFileName[1024];
+ MpegFrame tempFrame;
+@@ -274,6 +282,9 @@
+ }
+ #endif
+
++ if (fileHook)
++ goto file_is_already_opened;
++
+ if ( fileType == ANY_FILE_TYPE ) {
+ char *convertPtr, *commandPtr, *charPtr;
+
+@@ -325,6 +336,7 @@
+ exit(1);
+ }
+
++file_is_already_opened:
+ switch(baseFormat) {
+ case YUV_FILE_TYPE:
+
diff --git a/media-video/mpeg-tools/files/mpeg-tools-1.5b-tempfile-tests.patch b/media-video/mpeg-tools/files/mpeg-tools-1.5b-tempfile-tests.patch
new file mode 100644
index 000000000000..260f279d2d4b
--- /dev/null
+++ b/media-video/mpeg-tools/files/mpeg-tools-1.5b-tempfile-tests.patch
@@ -0,0 +1,204 @@
+When running tests, don't use /tmp for obvious reasons
+
+Also rewrite the diffscript in sh since csh isnt always available
+
+--- mepg_encode/Makefile
++++ mepg_encode/Makefile
+@@ -187,16 +187,16 @@
+ #########
+
+ test:
+- rm -f /tmp/ts.stat
+- ./mpeg_encode -stat /tmp/ts.stat ./tst/ts.param
+- csh ./tst/diffscript /tmp/ts.stat ./tst/ts.stat /tmp/ts.mpg ./tst/ts.mpg
++ rm -f ./tst/ts.stat.new
++ ./mpeg_encode -stat ./tst/ts.stat.new ./tst/ts.param
++ sh ./tst/diffscript.sh ./tst/ts.stat.new ./tst/ts.stat ./tst/ts.mpg.new ./tst/ts.mpg
+
+ testd:
+- rm -f /tmp/tsd.stat
+- ./mpeg_encode -stat /tmp/tsd.stat ./tst/tsd.param
+- csh ./tst/diffscript /tmp/tsd.stat ./tst/tsd.stat /tmp/tsd.mpg ./tst/tsd.mpg
++ rm -f ./tst/tsd.stat.new
++ ./mpeg_encode -stat ./tst/tsd.stat.new ./tst/tsd.param
++ sh ./tst/diffscript.sh ./tst/tsd.stat.new ./tst/tsd.stat ./tst/tsd.mpg.new ./tst/tsd.mpg
+
+-test_all: test testd
++test_all check: test testd
+
+ ############
+ # BINARIES #
+--- mepg_encode/tst/diffscript.sh
++++ mepg_encode/tst/diffscript.sh
+@@ -0,0 +1,16 @@
++diff $1 $2 > ./foobar
++egrep Blocks ./foobar > ./blockbar
++
++if test ! -s ./blockbar ; then
++ diff $3 $4 > ./foobar.mpg
++ if test -s ./foobar.mpg ; then
++ echo "FAILURE! (different output -- probably endian bug). Please send bug report."
++ exit 1
++ else
++ echo "SUCCESS."
++ exit 0
++ fi
++else
++ echo "FAILURE! (different exection). Please send bug report."
++ exit 1
++fi
+--- mpeg_encode/tst/test_all
++++ mpeg_encode/tst/test_all
+@@ -1,19 +1,19 @@
+-#!/bin/csh -f
++#!/bin/sh
+ cd ..
+-echo "First we encode three mpegs... (note requires 5MB on /tmp)"
+-rm -f /tmp/ts{,2,d}.{mpg,stat}
+-./mpeg_encode -stat /tmp/ts.stat ./tst/ts.param
+-./mpeg_encode -stat /tmp/ts2.stat ./tst/ts2.param
+-./mpeg_encode -stat /tmp/tsd.stat ./tst/tsd.param
++echo "First we encode three mpegs... (note requires 5MB in ./tst)"
++rm -f ./tst/ts{,2,d}.{mpg,stat}.new
++./mpeg_encode -stat ./tst/ts.stat.new ./tst/ts.param
++./mpeg_encode -stat ./tst/ts2.stat.new ./tst/ts2.param
++./mpeg_encode -stat ./tst/tsd.stat.new ./tst/tsd.param
+
+ cd tst
+
+ echo "Test one - tst/ts.param"
+-csh diffscript /tmp/ts.stat ts.stat /tmp/ts.mpg ts.mpg
++sh diffscript.sh ./ts.stat.new ts.stat ./ts.mpg.new ts.mpg
+
+ echo "Test two - tst/ts2.param (different pattern)"
+-csh diffscript /tmp/ts2.stat ts2.stat /tmp/ts2.mpg ts2.mpg
++sh diffscript.sh ./ts2.stat.new ts2.stat ./ts2.mpg.new ts2.mpg
+
+ echo "Test three - tst/tsd.param (uses decoded frames)"
+-csh diffscript /tmp/tsd.stat tsd.stat /tmp/tsd.mpg tsd.mpg
++sh diffscript.sh ./tsd.stat.new tsd.stat ./tsd.mpg.new tsd.mpg
+
+--- mpeg_encode/tst/diffscript
++++ mpeg_encode/tst/diffscript
+@@ -3,23 +3,23 @@
+ #
+ # NOTE: if this script doesn't work, then basically all you need to know
+ # is that the stat files should be the same except for the times.
+-# So the /tmp/blockbar below should be empty if the test succeeded, and non-
++# So the ./blockbar below should be empty if the test succeeded, and non-
+ # empty if it failed. Then the .mpg files are compared.
+ #
+
+-rm -f /tmp/foobar
+-rm -f /tmp/blockbar
++rm -f ./foobar
++rm -f ./blockbar
+
+-diff $1 $2 > /tmp/foobar
++diff $1 $2 > ./foobar
+
+-# /tmp/foobar must exist, since starting times will be different
++# ./foobar must exist, since starting times will be different
+
+-egrep Blocks /tmp/foobar > /tmp/blockbar
++egrep Blocks ./foobar > ./blockbar
+
+-# /tmp/blockbar may or may not exist
+-if ( -z /tmp/blockbar ) then
+- diff $3 $4 > /tmp/foobar.mpg
+- if ( -z /tmp/foobar.mpg ) then
++# ./blockbar may or may not exist
++if ( -z ./blockbar ) then
++ diff $3 $4 > ./foobar.mpg
++ if ( -z ./foobar.mpg ) then
+ echo "SUCCESS."
+ else
+ echo "FAILURE! (different output -- probably endian bug). Please send bug report."
+--- mpeg_encode/tst/ts.param
++++ mpeg_encode/tst/ts.param
+@@ -1,7 +1,7 @@
+ # test suite parameter file
+
+ PATTERN IBBPBBPBBP
+-OUTPUT /tmp/ts.mpg
++OUTPUT ./tst/ts.mpg.new
+
+ YUV_SIZE 352x240
+
+--- mpeg_encode/tst/tsd.param
++++ mpeg_encode/tst/tsd.param
+@@ -1,7 +1,7 @@
+ # test suite parameter file
+
+ PATTERN IBBBPBBBBP
+-OUTPUT /tmp/tsd.mpg
++OUTPUT ./tst/tsd.mpg.new
+
+ YUV_SIZE 352x240
+
+--- mpeg_encode/tst/gop.param
++++ mpeg_encode/tst/gop.param
+@@ -1,7 +1,7 @@
+ # test suite parameter file
+
+ PATTERN IBPBIBPBPB
+-OUTPUT /tmp/ts.mpg
++OUTPUT ./tst/ts.mpg.new
+
+ YUV_SIZE 352x240
+
+--- mpeg_encode/tst/short.param
++++ mpeg_encode/tst/short.param
+@@ -1,7 +1,7 @@
+ # test suite parameter file
+
+ PATTERN IBBBPBBB
+-OUTPUT /tmp/ts.mpg
++OUTPUT ./tst/ts.mpg.new
+
+ YUV_SIZE 352x240
+
+--- mpeg_encode/tst/ts2.param
++++ mpeg_encode/tst/ts2.param
+@@ -2,7 +2,7 @@
+
+ PATTERN IBBPBBPBB
+
+-OUTPUT /tmp/ts2.mpg
++OUTPUT ./tst/ts2.mpg.new
+
+ YUV_SIZE 352x240
+
+--- mpeg_encode/tst/ts3.param
++++ mpeg_encode/tst/ts3.param
+@@ -1,7 +1,7 @@
+ # test suite parameter file
+
+ PATTERN IBPB
+-OUTPUT /tmp/ts.mpg
++OUTPUT ./tst/ts.mpg.new
+
+ YUV_SIZE 352x240
+
+--- mpeg_encode/tst/ts4.param
++++ mpeg_encode/tst/ts4.param
+@@ -1,7 +1,7 @@
+ # test suite parameter file
+
+ PATTERN IBBBPBBBBP
+-OUTPUT /tmp/ts.mpg
++OUTPUT ./tst/ts.mpg.new
+
+ YUV_SIZE 352x240
+
+--- mpeg_encode/tst/tstl.param
++++ mpeg_encode/tst/tstl.param
+@@ -1,7 +1,7 @@
+ # test suite parameter file
+
+ PATTERN IBBBPBBBBP
+-OUTPUT /tmp/ts.mpg
++OUTPUT ./tst/ts.mpg.new
+
+ YUV_SIZE 352x240
+
diff --git a/media-video/mpeg-tools/metadata.xml b/media-video/mpeg-tools/metadata.xml
new file mode 100644
index 000000000000..1cadc2e4ec21
--- /dev/null
+++ b/media-video/mpeg-tools/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>video</herd>
+<maintainer>
+ <email>media-video@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/media-video/mpeg-tools/mpeg-tools-1.5b-r4.ebuild b/media-video/mpeg-tools/mpeg-tools-1.5b-r4.ebuild
new file mode 100644
index 000000000000..9b728aa7d3f5
--- /dev/null
+++ b/media-video/mpeg-tools/mpeg-tools-1.5b-r4.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+MY_PN=mpeg_encode
+DESCRIPTION="Tools for MPEG video"
+HOMEPAGE="http://bmrc.berkeley.edu/research/mpeg/mpeg_encode.html"
+SRC_URI="ftp://mm-ftp.cs.berkeley.edu/pub/multimedia/mpeg/encode/${MY_PN}-${PV}-src.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
+IUSE=""
+
+RDEPEND="x11-libs/libX11
+ virtual/jpeg:0"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${MY_PN}
+
+src_prepare() {
+ cd "${WORKDIR}"
+ epatch "${FILESDIR}"/${P}-build.patch
+ epatch "${FILESDIR}"/${P}-64bit_fixes.patch
+ epatch "${FILESDIR}"/${P}-tempfile-convert.patch
+ epatch "${FILESDIR}"/${P}-as-needed.patch
+ epatch "${FILESDIR}"/${P}-powerpc.patch
+ cd "${S}"
+ rm -r jpeg
+ epatch "${FILESDIR}"/${P}-system-jpeg.patch
+ epatch "${FILESDIR}"/${P}-system-jpeg-7.patch
+ epatch "${FILESDIR}"/${P}-tempfile-mpeg-encode.patch
+ epatch "${FILESDIR}"/${P}-tempfile-tests.patch
+ # don't include malloc.h, but use stdlib.h instead
+ sed -i -e 's:#include <malloc.h>:#include <stdlib.h>:' \
+ convert/*.c convert/mtv/*.c *.c headers/*.h || die
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+ emake -C convert CC="$(tc-getCC)"
+ emake -C convert/mtv CC="$(tc-getCC)"
+}
+
+src_install() {
+ dobin mpeg_encode
+ doman docs/*.1
+ dodoc BUGS CHANGES README TODO VERSION
+ dodoc docs/EXTENSIONS docs/INPUT.FORMAT docs/*.param docs/param-summary
+ docinto examples
+ dodoc examples/*
+
+ cd ../convert
+ dobin eyuvtojpeg jmovie2jpeg mpeg_demux mtv/movieToVid
+ newdoc README README.convert
+ newdoc mtv/README README.mtv
+}
+
+pkg_postinst() {
+ if [[ -z $(best_version media-libs/netpbm) ]]; then
+ elog "If you are looking for eyuvtoppm or ppmtoeyuv, please"
+ elog "emerge the netpbm package. It has updated versions."
+ fi
+}
diff --git a/media-video/mpeg-tools/mpeg-tools-1.5b-r5.ebuild b/media-video/mpeg-tools/mpeg-tools-1.5b-r5.ebuild
new file mode 100644
index 000000000000..0a494c89d4f0
--- /dev/null
+++ b/media-video/mpeg-tools/mpeg-tools-1.5b-r5.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+MY_PN=mpeg_encode
+DESCRIPTION="Tools for MPEG video"
+HOMEPAGE="http://bmrc.berkeley.edu/research/mpeg/mpeg_encode.html"
+SRC_URI="ftp://mm-ftp.cs.berkeley.edu/pub/multimedia/mpeg/encode/${MY_PN}-${PV}-src.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
+IUSE=""
+
+RDEPEND="x11-libs/libX11
+ virtual/jpeg:0"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${MY_PN}
+
+src_prepare() {
+ cd "${WORKDIR}"
+ epatch "${FILESDIR}"/${P}-build.patch
+ epatch "${FILESDIR}"/${P}-64bit_fixes.patch
+ epatch "${FILESDIR}"/${P}-tempfile-convert.patch
+ epatch "${FILESDIR}"/${P}-as-needed.patch
+ epatch "${FILESDIR}"/${P}-powerpc.patch
+ cd "${S}"
+ rm -r jpeg
+ epatch "${FILESDIR}"/${P}-jpeg.patch
+ epatch "${FILESDIR}"/${P}-tempfile-mpeg-encode.patch
+ epatch "${FILESDIR}"/${P}-tempfile-tests.patch
+ # don't include malloc.h, but use stdlib.h instead
+ sed -i -e 's:#include <malloc.h>:#include <stdlib.h>:' \
+ convert/*.c convert/mtv/*.c *.c headers/*.h || die
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+ emake -C convert CC="$(tc-getCC)"
+ emake -C convert/mtv CC="$(tc-getCC)"
+}
+
+src_install() {
+ dobin mpeg_encode
+ doman docs/*.1
+ dodoc BUGS CHANGES README TODO VERSION
+ dodoc docs/EXTENSIONS docs/INPUT.FORMAT docs/*.param docs/param-summary
+ docinto examples
+ dodoc examples/*
+
+ cd ../convert
+ dobin eyuvtojpeg jmovie2jpeg mpeg_demux mtv/movieToVid
+ newdoc README README.convert
+ newdoc mtv/README README.mtv
+}
+
+pkg_postinst() {
+ if [[ -z $(best_version media-libs/netpbm) ]]; then
+ elog "If you are looking for eyuvtoppm or ppmtoeyuv, please"
+ elog "emerge the netpbm package. It has updated versions."
+ fi
+}
diff --git a/media-video/mpeg2vidcodec/Manifest b/media-video/mpeg2vidcodec/Manifest
new file mode 100644
index 000000000000..a9b54ccee8a9
--- /dev/null
+++ b/media-video/mpeg2vidcodec/Manifest
@@ -0,0 +1 @@
+DIST mpeg2vidcodec_v12.tar.gz 259790 SHA256 e59da9988b2e964026c8370658771954a724e8319cc266f75c6aef2a85c40076 SHA512 2a46f486102ac2a1ae99a0f75b196c5aa01f8a99a6230723a2000ca8411adbca6c3e07d70f7cb269b17ce5fa4bf318e6dd4bfa83ecf8e137e8efca2bb352735c WHIRLPOOL acc31a2d493245e30a5e91d001b8cb5e5a3f1d3aab00141664a39030e0a90e24454c7c676a4dd2ff881721d39540895d5da62ea0b4d3b1b0f69d24dac785ce69
diff --git a/media-video/mpeg2vidcodec/metadata.xml b/media-video/mpeg2vidcodec/metadata.xml
new file mode 100644
index 000000000000..1cadc2e4ec21
--- /dev/null
+++ b/media-video/mpeg2vidcodec/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>video</herd>
+<maintainer>
+ <email>media-video@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/media-video/mpeg2vidcodec/mpeg2vidcodec-12-r1.ebuild b/media-video/mpeg2vidcodec/mpeg2vidcodec-12-r1.ebuild
new file mode 100644
index 000000000000..c1af87628b05
--- /dev/null
+++ b/media-video/mpeg2vidcodec/mpeg2vidcodec-12-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit toolchain-funcs
+
+MY_P="${PN}_v${PV}"
+DESCRIPTION="MPEG Library"
+HOMEPAGE="http://www.mpeg.org/"
+SRC_URI="http://www.mpeg.org/pub_ftp/mpeg/mssg/${MY_P}.tar.gz"
+
+LICENSE="mpeg2enc"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris"
+IUSE=""
+RESTRICT="mirror bindist" #465088
+
+S=${WORKDIR}/mpeg2
+
+src_prepare() {
+ sed -i -e 's:make:$(MAKE):' Makefile || die
+
+ sed -i -e 's:$(CC) $(CFLAGS):\0 $(LDFLAGS):' \
+ src/mpeg2enc/Makefile src/mpeg2dec/Makefile || die
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
+}
+
+src_install() {
+ dobin src/mpeg2dec/mpeg2decode src/mpeg2enc/mpeg2encode
+ dodoc README doc/*
+}
diff --git a/media-video/mpglen/Manifest b/media-video/mpglen/Manifest
new file mode 100644
index 000000000000..ab565cfd9eeb
--- /dev/null
+++ b/media-video/mpglen/Manifest
@@ -0,0 +1 @@
+DIST mpglen.tar.gz 10149 RMD160 4cc2b8a714bde28016fb9699172765f66a1e46cf SHA1 de11d6cd4fe08b31001095bc09ba2710fd7f752b SHA256 2783dd1c1e6cd464ae637c638782e8b6bd575ec453297ec513736dc6cef884f8
diff --git a/media-video/mpglen/metadata.xml b/media-video/mpglen/metadata.xml
new file mode 100644
index 000000000000..edccfe5754d2
--- /dev/null
+++ b/media-video/mpglen/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>video</herd>
+<maintainer>
+<email>media-video@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/media-video/mpglen/mpglen-0.1.ebuild b/media-video/mpglen/mpglen-0.1.ebuild
new file mode 100644
index 000000000000..cf6e23802046
--- /dev/null
+++ b/media-video/mpglen/mpglen-0.1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="A program to scan through a MPEG file and count the number of GOPs and frames"
+HOMEPAGE="http://www.iamnota.net/mpglen/"
+SRC_URI="http://www.iamnota.net/mpglen/${PN}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+S=${WORKDIR}/${PN}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ echo 'all: mpglen' > Makefile
+ append-lfs-flags
+}
+
+src_compile() {
+ tc-export CC
+ emake || die "emake failed"
+}
+
+src_install () {
+ dobin ${PN} || die
+ dodoc AUTHORS Changelog README
+}
diff --git a/media-video/mpgtx/Manifest b/media-video/mpgtx/Manifest
new file mode 100644
index 000000000000..8c23cbfebd46
--- /dev/null
+++ b/media-video/mpgtx/Manifest
@@ -0,0 +1 @@
+DIST mpgtx-1.3.1.tar.gz 89170 SHA256 8815e73e98b862f12ba1ef5eaaf49407cf211c1f668c5ee325bf04af27f8e377 SHA512 0f568673811f709383b3f262b19d3ec69de6807671c05a98266b21f2bfa6a8b85d2a8b95c3cec38bb012afb9d8add19a3f38b74b3e90f66cf233a1d26aaca805 WHIRLPOOL 7e52a0f74609837c07d2b0792f862e05a37598c037c2828b1521220527fc08922250cd6974e932877f726cfc699fc884f615d0ad307db6aaa45e44a35d7e0d53
diff --git a/media-video/mpgtx/files/mpgtx-1.3.1-configure.patch b/media-video/mpgtx/files/mpgtx-1.3.1-configure.patch
new file mode 100644
index 000000000000..ec36e76ba641
--- /dev/null
+++ b/media-video/mpgtx/files/mpgtx-1.3.1-configure.patch
@@ -0,0 +1,69 @@
+--- configure.old 2006-12-07 19:51:08.000000000 +0100
++++ configure 2006-12-07 19:51:02.000000000 +0100
+@@ -9,7 +9,6 @@
+ prefix="/usr/local"
+ manprefix='$(PREFIX)'
+ #compiler flags
+-CC="g++"
+ common_cflags="-Wall"
+ devel_cflags="-g -Werror -fno-builtin"
+ optimization_cflags="-O3"
+@@ -36,7 +35,6 @@
+
+ if [ "${HOSTNAME}" = "powerpc-apple-darwin6.0" ]; then
+ #compiler flags
+-CC="c++"
+ common_cflags="-pedantic -Wall"
+ #devel_cflags="-g -Werror -fno-builtin"
+ devel_cflags="-g -fno-builtin"
+@@ -153,8 +151,15 @@
+ if test "$gcc_minor" = "0" -o "$gcc_minor" = "1"; then
+ optimization_cflags="-O2";
+ fi
++ if test "$gcc_minor" -ge 4; then
++ optimization_cflags="$optimization_cflags -fno-unit-at-a-time"
++ fi
++elif test "$gcc_major" -ge "4"; then
++ optimization_cflags="$optimization_cflags -fno-unit-at-a-time"
+ fi
+
++
++
+ # Now check if the system handles large file support
+ # unless user has specified not to do so
+ if test $LFS = "yes"; then
+@@ -165,7 +170,7 @@
+ return (int)(fseeko(stdin,0,SEEK_SET));
+ }
+ EOF
+- $CC __LFStest.cpp -o __LFStestPASSED -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE 1>__LFSout 2>__LFSerror
++ ${CXX:-c++} __LFStest.cpp -o __LFStestPASSED -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE 1>__LFSout 2>__LFSerror
+ if test -f __LFStestPASSED; then
+ echo "PASSED";
+ cflags="$cflags -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE";
+@@ -211,7 +211,6 @@
+ fi
+
+ if test $devel = "no" -a $debug = "no"; then
+-lflags="$lflags -s";
+ cflags="$cflags $optimization_cflags";
+ fi
+
+@@ -293,15 +298,15 @@
+ @echo ""
+
+ mpgtx : commandline.cxx mpegOut.o mpeg.o chunkTab.o id3command.o common.hh
+- $CC \$(CFLAGS) \$(OFLAGS) -o mpgtx commandline.cxx mpegOut.o mpeg.o chunkTab.o id3command.o \$(LFLAGS)
++ \$(CXX) \$(CFLAGS) \$(OFLAGS) \$(LDFLAGS) -o mpgtx commandline.cxx mpegOut.o mpeg.o chunkTab.o id3command.o \$(LFLAGS)
+ mpegOut.o : mpegOut.cxx mpegOut.hh mpeg.hh common.hh
+- $CC \$(CFLAGS) \$(OFLAGS) -c mpegOut.cxx
++ \$(CXX) \$(CFLAGS) \$(OFLAGS) -c mpegOut.cxx
+ mpeg.o : mpeg.cxx mpeg.hh mpegOut.hh common.hh
+- $CC \$(CFLAGS) \$(OFLAGS) -c mpeg.cxx
++ \$(CXX) \$(CFLAGS) \$(OFLAGS) -c mpeg.cxx
+ chunkTab.o : chunkTab.cxx chunkTab.hh common.hh
+- $CC \$(CFLAGS) \$(OFLAGS) -c chunkTab.cxx
++ \$(CXX) \$(CFLAGS) \$(OFLAGS) -c chunkTab.cxx
+ id3command.o : id3command.cxx id3command.hh common.hh
+- $CC \$(CFLAGS) \$(OFLAGS) -c id3command.cxx
++ \$(CXX) \$(CFLAGS) \$(OFLAGS) -c id3command.cxx
diff --git a/media-video/mpgtx/files/mpgtx-1.3.1-dont-ignore-cxx-flags.patch b/media-video/mpgtx/files/mpgtx-1.3.1-dont-ignore-cxx-flags.patch
new file mode 100644
index 000000000000..3a7f5da67458
--- /dev/null
+++ b/media-video/mpgtx/files/mpgtx-1.3.1-dont-ignore-cxx-flags.patch
@@ -0,0 +1,11 @@
+--- mpgtx-1.3.1/configure.old 2006-12-09 00:26:18.000000000 +0100
++++ mpgtx-1.3.1/configure 2006-12-09 00:28:52.000000000 +0100
+@@ -11,7 +11,7 @@
+ #compiler flags
+ common_cflags="-Wall"
+ devel_cflags="-g -Werror -fno-builtin"
+-optimization_cflags="-O3"
++optimization_cflags="${CXXFLAGS}"
+ release_cflags=$optimization_cflags
+ OFLAGS="-ansi"
+ cflags=$common_cflags
diff --git a/media-video/mpgtx/metadata.xml b/media-video/mpgtx/metadata.xml
new file mode 100644
index 000000000000..9d7e585c63e9
--- /dev/null
+++ b/media-video/mpgtx/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">mpgtx</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/mpgtx/mpgtx-1.3.1-r2.ebuild b/media-video/mpgtx/mpgtx-1.3.1-r2.ebuild
new file mode 100644
index 000000000000..34f40ead518b
--- /dev/null
+++ b/media-video/mpgtx/mpgtx-1.3.1-r2.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 eutils toolchain-funcs
+
+DESCRIPTION="Command line MPEG audio/video/system file toolbox"
+SRC_URI="mirror://sourceforge/mpgtx/${P}.tar.gz"
+HOMEPAGE="http://mpgtx.sourceforge.net/"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris"
+IUSE=""
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-configure.patch \
+ "${FILESDIR}"/${P}-dont-ignore-cxx-flags.patch
+ tc-export CXX
+}
+
+src_configure() {
+ ./configure --parachute || die
+}
+
+src_install() {
+ dobin mpgtx
+
+ dosym mpgtx /usr/bin/mpgjoin
+ dosym mpgtx /usr/bin/mpgsplit
+ dosym mpgtx /usr/bin/mpgcat
+ dosym mpgtx /usr/bin/mpginfo
+ dosym mpgtx /usr/bin/mpgdemux
+ dosym mpgtx /usr/bin/tagmp3
+
+ doman man/mpgtx.1 man/tagmp3.1
+
+ dosym /usr/share/man/man1/mpgtx.1 /usr/share/man/man1/mpgcat.1
+ dosym /usr/share/man/man1/mpgtx.1 /usr/share/man/man1/mpgjoin.1
+ dosym /usr/share/man/man1/mpgtx.1 /usr/share/man/man1/mpginfo.1
+ dosym /usr/share/man/man1/mpgtx.1 /usr/share/man/man1/mpgsplit.1
+ dosym /usr/share/man/man1/mpgtx.1 /usr/share/man/man1/mpgdemux.1
+
+ dodoc AUTHORS ChangeLog README TODO
+}
diff --git a/media-video/mplay-sh/Manifest b/media-video/mplay-sh/Manifest
new file mode 100644
index 000000000000..ebde216cb759
--- /dev/null
+++ b/media-video/mplay-sh/Manifest
@@ -0,0 +1 @@
+DIST mplay-0.5.3.tgz 26829 SHA256 2dee614796b97a1790ab58f0ee5f248d663376b2d2478061387535ddb6b5cc8e
diff --git a/media-video/mplay-sh/metadata.xml b/media-video/mplay-sh/metadata.xml
new file mode 100644
index 000000000000..5f9f14619db8
--- /dev/null
+++ b/media-video/mplay-sh/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-video/mplay-sh/mplay-sh-0.5.3-r1.ebuild b/media-video/mplay-sh/mplay-sh-0.5.3-r1.ebuild
new file mode 100644
index 000000000000..8a53b8a311ca
--- /dev/null
+++ b/media-video/mplay-sh/mplay-sh-0.5.3-r1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+MY_P="mplay-${PV}"
+
+DESCRIPTION="mplayer wrapper script as backend for vdr-mplayer"
+HOMEPAGE="http://www.vdr-portal.de/board/thread.php?threadid=62306"
+SRC_URI="mirror://gentoo/${MY_P}.tgz
+ http://dev.gentoo.org/~zzam/distfiles/${MY_P}.tgz"
+
+KEYWORDS="x86 ~amd64"
+SLOT="0"
+LICENSE="GPL-2"
+IUSE=""
+
+DEPEND="media-tv/gentoo-vdr-scripts"
+RDEPEND=">=media-video/mplayer-0.90_rc4"
+
+S=${WORKDIR}/${MY_P}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ sed -i mplay.sh \
+ -e 's#$CONFDIR/silence.wav#/usr/share/vdr/mplay-sh/silence.wav#'
+ sed -i conf.examples/mplayrc \
+ -e 's#^MPLAY_PLAY.*#MPLAY_PLAY="/var/vdr/tmp/mplay.play"#'
+}
+
+src_install() {
+ exeinto /usr/share/vdr/mplayer/bin
+ doexe mplay.sh
+
+ insinto /etc/vdr/plugins/mplay
+ doins conf.examples/*.conf conf.examples/mplayrc
+
+ insinto /usr/share/vdr/mplay-sh
+ doins conf.examples/silence.wav
+
+ dodoc README* HISTORY
+ keepdir /var/vdr/tmp
+ chown vdr:vdr -R "${D}/var/vdr"
+}
diff --git a/media-video/mplayer-resume/Manifest b/media-video/mplayer-resume/Manifest
new file mode 100644
index 000000000000..47f8996ddaf4
--- /dev/null
+++ b/media-video/mplayer-resume/Manifest
@@ -0,0 +1 @@
+DIST mplayer-resume-2.0.tar.gz 5251 SHA256 482f5de621ff17baa3571eb6f5fccf4afa38c982bfb8c8fbd58178ae375c173b
diff --git a/media-video/mplayer-resume/metadata.xml b/media-video/mplayer-resume/metadata.xml
new file mode 100644
index 000000000000..d9df1878d8e2
--- /dev/null
+++ b/media-video/mplayer-resume/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>video</herd>
+</pkgmetadata>
diff --git a/media-video/mplayer-resume/mplayer-resume-2.0.ebuild b/media-video/mplayer-resume/mplayer-resume-2.0.ebuild
new file mode 100644
index 000000000000..21e558bfcedc
--- /dev/null
+++ b/media-video/mplayer-resume/mplayer-resume-2.0.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+DESCRIPTION="MPlayer wrapper script to save/resume playback position"
+HOMEPAGE="http://www.spaceparanoids.org/trac/bend/wiki/mplayer-resume"
+SRC_URI="http://spaceparanoids.org/downloads/mplayer-resume/${P}.tar.gz"
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="+lirc"
+DEPEND=""
+RDEPEND="lirc? ( app-misc/lirc
+ media-video/mplayer[lirc] )
+ dev-lang/php[cli]
+ || ( <dev-lang/php-5.3[pcre] >=dev-lang/php-5.3 )
+ media-video/mplayer"
+
+src_compile() {
+ return;
+}
+
+src_install() {
+ dobin mplayer-resume
+ dodoc ChangeLog README
+}
+
+pkg_postinst() {
+ elog "To get mplayer-resume to save playback position with LIRC,"
+ elog "you will need to setup an entry in ~/.lircrc to run "
+ elog "'get_time_pos' and then 'quit'. More instructions are"
+ elog "detailed in the README, but the position will not be saved"
+ elog "until you set it up."
+ elog ""
+ elog "Playback position files are saved in ~/.mplayer/playback"
+}
diff --git a/media-video/mplayer-sh/Manifest b/media-video/mplayer-sh/Manifest
new file mode 100644
index 000000000000..7789fbc71a1c
--- /dev/null
+++ b/media-video/mplayer-sh/Manifest
@@ -0,0 +1,2 @@
+DIST mplayer.sh-0.8.6.tar.gz 7568 SHA256 3d98b55f7b173296ac40d14b967f525459f415b340322de53cd8105cca4851ef
+DIST mplayer.sh-0.8.7.tar.gz 7851 SHA256 271f1105efcc6292117d826255f873da4ef70cf517f523d65a36036c74c60dcf
diff --git a/media-video/mplayer-sh/files/mplayer-sh-0.8.6-parameter-aid.diff b/media-video/mplayer-sh/files/mplayer-sh-0.8.6-parameter-aid.diff
new file mode 100644
index 000000000000..3b329215564b
--- /dev/null
+++ b/media-video/mplayer-sh/files/mplayer-sh-0.8.6-parameter-aid.diff
@@ -0,0 +1,84 @@
+--- mplayer.sh.orig 2006-03-26 23:31:10.000000000 +0200
++++ mplayer.sh 2006-03-26 23:50:39.000000000 +0200
+@@ -6,6 +6,7 @@
+ declare VERSION="0.8.6"
+
+ # History (as always in the source code :-)
++# - add -aid to mplayer when AID is given (Matthias Schwarzott <zzam@gentoo.org>)
+ # 0.8.6 - fixed a copy'n'paste bug regarding the subtitle background
+ # alpha color (thanks to Christian Haider)
+ # - changed the fps values from rational values to integer ones
+@@ -208,6 +209,11 @@
+ fi
+ debugvar REMOTE "$REMOTE"
+
++ if test -n "${AID}"; then
++ AUDIO="-aid ${AID}"
++ fi
++ debugvar AUDIO "${AUDIO}"
++
+ if ! test -z "$USERDEF"; then echolog "*** Use Option USERDEF at your own risk!"; fi
+ debugvar USERDEF "$USERDEF"
+
+@@ -478,15 +484,24 @@
+ declare -i NEW_X NEW_Y
+ declare -i HALF_Y FULL_Y
+ declare ORIG_FPS NEW_FPS ORIG_ASPECT VIDEO_FORMAT AUDIO_CODEC
+-declare CMDLINE AOUT REMOTE USERDEF SUFFIX
++declare CMDLINE AOUT REMOTE AUDIO USERDEF SUFFIX
+ declare FILE="$1"
+-declare SLAVE="$2"
++shift
+ declare -a XResPAL[0]
+ declare -a XResNTSC[0]
+ declare FDSTR=""
+ declare SUBTITLES=""
+ declare DETC=""
+
++while [[ -n $1 ]]; do
++ case ${1} in
++ SLAVE) SLAVE=SLAVE ;;
++ AID) AID=${2}; shift ;;
++ esac
++
++ shift
++done
++
+ echolog "*** Starting mplayer.sh Version $VERSION"
+
+ if test -z "$FILE"; then echolog "*** USAGE: mplayer.sh <File_to_be_played>"; exit; fi
+@@ -504,18 +519,18 @@
+ if test \( "$FILE" == "$DVDFiles/DVD" -o "$FILE" == "$DVDFiles/VCD" \) -a -n "$DVDFiles" -a -n "$DVD"; then
+ if test "$FILE" == "$DVDFiles/DVD"; then
+ $USEAC3 && AOUT="$AC3AOUT"
+- CMDLINE="$MPLAYER -vo $VO $AOUT -alang $DVDLANG $DVDOPTIONS $FDSTR $CACHESTR $REMOTE $USERDEF -dvd-device $DVD dvd://"
++ CMDLINE="$MPLAYER -vo $VO $AOUT -alang $DVDLANG $DVDOPTIONS $FDSTR $CACHESTR $AUDIO $REMOTE $USERDEF -dvd-device $DVD dvd://"
+ fi
+ if test "$FILE" == "$DVDFiles/VCD"; then
+- CMDLINE="$MPLAYER -vo $VO $AOUT $VCDOPTIONS $FDSTR $CACHESTR $REMOTE $USERDEF -cdrom-device $DVD vcd://"
++ CMDLINE="$MPLAYER -vo $VO $AOUT $VCDOPTIONS $FDSTR $CACHESTR $AUDIO $REMOTE $USERDEF -cdrom-device $DVD vcd://"
+ fi
+ unset FILE
+ elif test "${SUFFIX}" == ".cue"; then
+ if $MPLAYER_V1; then
+- CMDLINE="$MPLAYER -vo $VO $AOUT $FDSTR $CACHESTR $REMOTE $USERDEF cue://$FILE:2"
++ CMDLINE="$MPLAYER -vo $VO $AOUT $FDSTR $CACHESTR $AUDIO $REMOTE $USERDEF cue://$FILE:2"
+ unset FILE
+ else
+- CMDLINE="$MPLAYER -vo $VO $AOUT $FDSTR $CACHESTR $REMOTE $USERDEF -vcd 2 -cuefile"
++ CMDLINE="$MPLAYER -vo $VO $AOUT $FDSTR $CACHESTR $AUDIO $REMOTE $USERDEF -vcd 2 -cuefile"
+ fi
+ else
+ # Try to determine the video attributes
+@@ -545,9 +560,9 @@
+ \( $NTSC -a $NEW_FPS == "30" -a \( \( $ORIG_X == "352" -a $ORIG_Y == "240" \) -o \( $ORIG_Y == "480" -a \
+ \( $ORIG_X == "352" -o $ORIG_X == "480" -o $ORIG_X == "512" -o $ORIG_X == "640" -o $ORIG_X == "704" -o $ORIG_X == "720" \) \) \) \) \
+ \) ; then
+- CMDLINE="$MPLAYER -vo $VO $AOUT $FDSTR $CACHESTR $REMOTE $USERDEF"
++ CMDLINE="$MPLAYER -vo $VO $AOUT $FDSTR $CACHESTR $AUDIO $REMOTE $USERDEF"
+ else
+- CMDLINE="$MPLAYER -vo $VO $AOUT -vop $VOP:$NEW_FPS,expand=$NEW_X:$REAL_Y:-1:-1:1,scale=$NEW_X:${NEW_Y}${DETC} $SPEED $FDSTR $CACHESTR $REMOTE $SUBTITLES $USERDEF $FORCEIDX"
++ CMDLINE="$MPLAYER -vo $VO $AOUT -vop $VOP:$NEW_FPS,expand=$NEW_X:$REAL_Y:-1:-1:1,scale=$NEW_X:${NEW_Y}${DETC} $SPEED $FDSTR $CACHESTR $AUDIO $REMOTE $SUBTITLES $USERDEF $FORCEIDX"
+ fi
+ fi
+
diff --git a/media-video/mplayer-sh/files/mplayer-sh-0.8.7-parameter-aid.diff b/media-video/mplayer-sh/files/mplayer-sh-0.8.7-parameter-aid.diff
new file mode 100644
index 000000000000..3de61e76cd1b
--- /dev/null
+++ b/media-video/mplayer-sh/files/mplayer-sh-0.8.7-parameter-aid.diff
@@ -0,0 +1,84 @@
+--- mplayer.sh.orig 2007-02-11 16:34:07.000000000 +0100
++++ mplayer.sh 2007-05-05 18:17:48.000000000 +0200
+@@ -12,6 +12,7 @@
+ # - calculate USE_SPEED with 30 fps instead of 29.97
+ # - use '-vf' and '-af' instead of '-vop' and '-aop', as the
+ # latter are deprecated
++# - add -aid to mplayer when AID is given (Matthias Schwarzott <zzam@gentoo.org>)
+ #
+ # 0.8.6 - fixed a copy'n'paste bug regarding the subtitle background
+ # alpha color (thanks to Christian Haider)
+@@ -215,6 +216,11 @@
+ fi
+ debugvar REMOTE "$REMOTE"
+
++ if test -n "${AID}"; then
++ AUDIO="-aid ${AID}"
++ fi
++ debugvar AUDIO "${AUDIO}"
++
+ if ! test -z "$USERDEF"; then echolog "*** Use Option USERDEF at your own risk!"; fi
+ debugvar USERDEF "$USERDEF"
+
+@@ -485,15 +491,24 @@
+ declare -i NEW_X NEW_Y
+ declare -i HALF_Y FULL_Y
+ declare ORIG_FPS NEW_FPS ORIG_ASPECT VIDEO_FORMAT AUDIO_CODEC
+-declare CMDLINE AOUT REMOTE USERDEF SUFFIX
++declare CMDLINE AOUT REMOTE AUDIO USERDEF SUFFIX
+ declare FILE="$1"
+-declare SLAVE="$2"
++shift
+ declare -a XResPAL[0]
+ declare -a XResNTSC[0]
+ declare FDSTR=""
+ declare SUBTITLES=""
+ declare DETC=""
+
++while [[ -n $1 ]]; do
++ case ${1} in
++ SLAVE) SLAVE=SLAVE ;;
++ AID) AID=${2}; shift ;;
++ esac
++
++ shift
++done
++
+ echolog "*** Starting mplayer.sh Version $VERSION"
+
+ if test -z "$FILE"; then echolog "*** USAGE: mplayer.sh <File_to_be_played>"; exit; fi
+@@ -511,18 +526,18 @@
+ if test \( "$FILE" == "$DVDFiles/DVD" -o "$FILE" == "$DVDFiles/VCD" \) -a -n "$DVDFiles" -a -n "$DVD"; then
+ if test "$FILE" == "$DVDFiles/DVD"; then
+ $USEAC3 && AOUT="$AC3AOUT"
+- CMDLINE="$MPLAYER -vo $VO $AOUT -alang $DVDLANG $DVDOPTIONS $FDSTR $CACHESTR $REMOTE $USERDEF -dvd-device $DVD dvd://"
++ CMDLINE="$MPLAYER -vo $VO $AOUT -alang $DVDLANG $DVDOPTIONS $FDSTR $CACHESTR $AUDIO $REMOTE $USERDEF -dvd-device $DVD dvd://"
+ fi
+ if test "$FILE" == "$DVDFiles/VCD"; then
+- CMDLINE="$MPLAYER -vo $VO $AOUT $VCDOPTIONS $FDSTR $CACHESTR $REMOTE $USERDEF -cdrom-device $DVD vcd://"
++ CMDLINE="$MPLAYER -vo $VO $AOUT $VCDOPTIONS $FDSTR $CACHESTR $AUDIO $REMOTE $USERDEF -cdrom-device $DVD vcd://"
+ fi
+ unset FILE
+ elif test "${SUFFIX}" == ".cue"; then
+ if $MPLAYER_V1; then
+- CMDLINE="$MPLAYER -vo $VO $AOUT $FDSTR $CACHESTR $REMOTE $USERDEF cue://$FILE:2"
++ CMDLINE="$MPLAYER -vo $VO $AOUT $FDSTR $CACHESTR $AUDIO $REMOTE $USERDEF cue://$FILE:2"
+ unset FILE
+ else
+- CMDLINE="$MPLAYER -vo $VO $AOUT $FDSTR $CACHESTR $REMOTE $USERDEF -vcd 2 -cuefile"
++ CMDLINE="$MPLAYER -vo $VO $AOUT $FDSTR $CACHESTR $AUDIO $REMOTE $USERDEF -vcd 2 -cuefile"
+ fi
+ else
+ # Try to determine the video attributes
+@@ -552,9 +567,9 @@
+ \( $NTSC -a $NEW_FPS == "30" -a \( \( $ORIG_X == "352" -a $ORIG_Y == "240" \) -o \( $ORIG_Y == "480" -a \
+ \( $ORIG_X == "352" -o $ORIG_X == "480" -o $ORIG_X == "512" -o $ORIG_X == "544" -o $ORIG_X == "640" -o $ORIG_X == "704" -o $ORIG_X == "720" \) \) \) \) \
+ \) ; then
+- CMDLINE="$MPLAYER -vo $VO $AOUT $FDSTR $CACHESTR $REMOTE $USERDEF"
++ CMDLINE="$MPLAYER -vo $VO $AOUT $FDSTR $CACHESTR $AUDIO $REMOTE $USERDEF"
+ else
+- CMDLINE="$MPLAYER -vo $VO $AOUT -vf scale=$NEW_X:${NEW_Y}${DETC},expand=$NEW_X:$REAL_Y:-1:-1:1,$VOP:$NEW_FPS $SPEED $FDSTR $CACHESTR $REMOTE $SUBTITLES $USERDEF $FORCEIDX"
++ CMDLINE="$MPLAYER -vo $VO $AOUT -vf scale=$NEW_X:${NEW_Y}${DETC},expand=$NEW_X:$REAL_Y:-1:-1:1,$VOP:$NEW_FPS $SPEED $FDSTR $CACHESTR $AUDIO $REMOTE $SUBTITLES $USERDEF $FORCEIDX"
+ fi
+ fi
+
diff --git a/media-video/mplayer-sh/metadata.xml b/media-video/mplayer-sh/metadata.xml
new file mode 100644
index 000000000000..e346761c018b
--- /dev/null
+++ b/media-video/mplayer-sh/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">
+ API script between Plugin vdr-mplayer and mplayer.
+ </longdescription>
+</pkgmetadata>
diff --git a/media-video/mplayer-sh/mplayer-sh-0.8.6-r2.ebuild b/media-video/mplayer-sh/mplayer-sh-0.8.6-r2.ebuild
new file mode 100644
index 000000000000..01e1c0c9cc6e
--- /dev/null
+++ b/media-video/mplayer-sh/mplayer-sh-0.8.6-r2.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+RESTRICT="mirror bindist"
+
+inherit eutils
+
+DESCRIPTION="Video Disk Recorder Mplayer API Script"
+HOMEPAGE="http://batleth.sapienti-sat.org/"
+SRC_URI="http://batleth.sapienti-sat.org/projects/VDR/mplayer.sh-${PV}.tar.gz"
+
+KEYWORDS="x86 ~amd64"
+SLOT="0"
+LICENSE="all-rights-reserved"
+IUSE=""
+
+RDEPEND=">=media-video/mplayer-0.90_rc4"
+
+S=${WORKDIR}
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-parameter-aid.diff"
+
+ sed -i "s:^declare CFGFIL.*$:declare CFGFIL=\"\/etc\/vdr\/plugins\/mplayer\/mplayer.sh.conf\":" mplayer.sh
+ sed -i mplayer.sh.conf -e "s:^LIRCRC.*$:LIRCRC=\/etc\/lircd.conf:" \
+ -e "s:^MPLAYER=.*$:MPLAYER=\/usr\/bin\/mplayer:"
+}
+
+src_install() {
+
+ insinto /etc/vdr/plugins/mplayer
+ doins mplayer.sh.conf
+
+ into /usr/share/vdr/mplayer
+ dobin mplayer.sh
+
+ dodir /etc/vdr/plugins/DVD-VCD
+ touch "${D}"/etc/vdr/plugins/DVD-VCD/{DVD,VCD}
+ fowners vdr:video /etc/vdr/plugins/DVD-VCD/{DVD,VCD}
+}
diff --git a/media-video/mplayer-sh/mplayer-sh-0.8.7.ebuild b/media-video/mplayer-sh/mplayer-sh-0.8.7.ebuild
new file mode 100644
index 000000000000..8a645260ef2f
--- /dev/null
+++ b/media-video/mplayer-sh/mplayer-sh-0.8.7.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils
+
+RESTRICT="mirror bindist"
+
+DESCRIPTION="Video Disk Recorder Mplayer API Script"
+HOMEPAGE="http://batleth.sapienti-sat.org/projects/VDR/"
+SRC_URI="http://batleth.sapienti-sat.org/projects/VDR/versions/mplayer.sh-${PV}.tar.gz"
+
+KEYWORDS="x86 ~amd64"
+SLOT="0"
+LICENSE="all-rights-reserved"
+IUSE=""
+
+RDEPEND=">=media-video/mplayer-0.1.20070321"
+
+S=${WORKDIR}
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-parameter-aid.diff"
+
+ sed -i "s:^declare CFGFIL.*$:declare CFGFIL=\"\/etc\/vdr\/plugins\/mplayer\/mplayer.sh.conf\":" mplayer.sh
+ sed -i mplayer.sh.conf -e "s:^LIRCRC.*$:LIRCRC=\/etc\/lircd.conf:" \
+ -e "s:^MPLAYER=.*$:MPLAYER=\/usr\/bin\/mplayer:"
+}
+
+src_install() {
+
+ insinto /etc/vdr/plugins/mplayer
+ doins mplayer.sh.conf
+
+ into /usr/share/vdr/mplayer
+ dobin mplayer.sh
+
+ dodir /etc/vdr/plugins/DVD-VCD
+ touch "${D}"/etc/vdr/plugins/DVD-VCD/{DVD,VCD}
+ fowners vdr:vdr /etc/vdr/plugins/DVD-VCD/{DVD,VCD}
+}
diff --git a/media-video/mplayer/Manifest b/media-video/mplayer/Manifest
new file mode 100644
index 000000000000..8aad2a9450d7
--- /dev/null
+++ b/media-video/mplayer/Manifest
@@ -0,0 +1,8 @@
+DIST MPlayer-1.1.1.tar.xz 11202492 SHA256 ce8fc7c3179e6a57eb3a58cb7d1604388756b8a61764cc93e095e7aff3798c76 SHA512 06371d47b02caec83c7662f6bb4a827eafb7f3309f6cda959a0f49b647df031166a6e7c5d530b57b580104289ee260aa96f3f43cbfffcef816cea776b0d5aed0 WHIRLPOOL 3cd0f3845cd45961b778c384a322bc628cc9cd6fef3801b62389bd616a443ba5270c378a889412a7dc72d37ff26704d5d989d2c995a2a4a6540f6313ccacbb63
+DIST font-arial-cp1250.tar.bz2 249705 SHA256 423a07e780bb130cd8e4730715545c5d919c248dda595aab7a0a01de3c83fd12 SHA512 4f77ff5ceb8ec6e5d9f8f34d8950a6a6276d1fd5a947772fcbdb6554988b1ea665c12b82f45164f91fb7bd08000cb4afc26fa35beb4c760464160e22b9b8c340 WHIRLPOOL d635f54be65b0ca1047d943b6f6da433cda9fce6ed74fcab993501cf7f6b443eb711e182cd7fff09e553d251b5fd1c60196aa22e8370cba99fa175ed5ecdb47f
+DIST font-arial-iso-8859-1.tar.bz2 234242 SHA256 9730f481764f367c9089d0166fb6ccf9148808ffbbfeca635cf0e6db75765d29 SHA512 a1d03b6f09c48f48b7733f3bc0402ceab239a9abf88b860d852ea9fe69b4da690208a79d6f29d30204f5b37becf10672e8e8c0bfef201846d80ec54df617d029 WHIRLPOOL 8050362b125d3ca98214526cee2fa685e31487d13a6483c765bfc844bdc5e07beeba2c1ba313458096d43a63edd6c5e80b8b388c2792fc0ec7421e4072d8ca25
+DIST font-arial-iso-8859-2.tar.bz2 222208 SHA256 71debfc960007c2f6242dfc91e8b1c005b30a99e129aeb00ab8c03f4371b41c1 SHA512 5671e628303fd816f64a51ad10e2f4dd9c3dc1b34c379a2ecf489b83931db7af668aaa4e00e96a00cacd63ed98daeae6b6a4d5925edfb06fc98d3a923f70257d WHIRLPOOL 08178087b4ea1dfb2250f4673785e31dd876b06af51c51b2bddc172b23e6e33cbc1b2c6b710a317e42dc05486974b26ed0ad3ca50a185567aa77d49bd1e72aee
+DIST mplayer-1.2_pre20130729.tar.xz 5358436 SHA256 9928cd6d0d765eb38f2824c501b94e5b6e0a2ec6e39a0c788654c5508c9eb9ab SHA512 e76ae7a1aeca9e853edf5403f3e3ae60dace980076a12160c501e18d019184af08256829f8e657b9fdbf549126bf518cf5dbe2860eda906e6fcd3ccc44a5f5a5 WHIRLPOOL b4007e4a00fd8b0b2d75a6d375f3b334b3251ea8dd677a5c1d562e4997fbbee81981bbbde9a88a61dc83bfc2d3e5dac6f93e7ff882088ba8b0c3df7c2cd9a6bd
+DIST mplayer-1.2_pre20141011.tar.xz 5357084 SHA256 5657720f44602e5fef04b215ce4116014d08934772cf9011038327b9e413d14d SHA512 9d7497b9ca0ea6f260251f410020b40be8cd9baa95e06d6f6d3d8e299a87ae3a56d8451bd078ca4077de38f7e8907da1763e3dbd21357769e282f91241f650da WHIRLPOOL 39903730b0d9eb8ea17730f282a1ba70c923ffa3f5c31a9ad9b8d56cc5e7bef75531159f06ded141e08581171df4016e8486892067bad2c82086d4c6147731b4
+DIST mplayer-1.2_pre20150214.tar.xz 5240936 SHA256 1b252ad20a77bc1ade022deaeb5e13f88422f9c1a9eeee646334107a35e8bdd3 SHA512 9cfa28ce6d8ec6c9d070e4573744d788dde9df63c24525667a0144c436bbb9336f01f3a4b9a5d22114decd7772151d3c0a7d6a902d2528092e374572d5d793e4 WHIRLPOOL bb05b6712b0e0e9db475e4845c7dde728722a7ec7ed442a33d0f5af43f2922c2883bc71916a0f4006bfd3ec29e165903c6e46668afb6e0c9832791be725d81d7
+DIST mplayer-1.2_pre20150730.tar.xz 5251124 SHA256 b21380a29031165fbd583e2153c200c8e55b18d4104ed8b362db0423dc8f0002 SHA512 807642960b334c00763816e1564577e635f5ea8b42a3eb9684905502a9adb82350d1a4ca42089b1db4178340a3342d9340bd855db562532fe8a6097a3d09bc65 WHIRLPOOL c0279c736a65b8e0a36f39279e54a8e91e875b2f799cd4982b6f1d55156c5355e72f553dc6f78c75548909dd3d37d8fd7237c3729a6687a685ef8124ae99afbf
diff --git a/media-video/mplayer/files/dump_ffmpeg.sh b/media-video/mplayer/files/dump_ffmpeg.sh
new file mode 100755
index 000000000000..885946df8cc7
--- /dev/null
+++ b/media-video/mplayer/files/dump_ffmpeg.sh
@@ -0,0 +1,74 @@
+#!/bin/sh
+
+FFMPEG_DIR=ffmpeg
+FFMPEG_MOVED_DIR=ffmpeg_removed
+SYSTEM_FFMPEG_DIR=${EPREFIX}/usr/include
+
+# Move directories
+
+[ -d "${FFMPEG_DIR}" ] && mv "${FFMPEG_DIR}" "${FFMPEG_MOVED_DIR}"
+[ -d "${FFMPEG_MOVED_DIR}" ] || exit 1
+[ -d "${FFMPEG_DIR}" ] || mkdir "${FFMPEG_DIR}"
+
+# Keep required files and check them
+
+SANITIZED_REGEXP='^\#[[:space:]]*include.*\".*[.]h\"'
+sanitize_includes() {
+ sed -e "s/^\#[[:space:]]*include.*\"config[.]h\"/#include <config.h>/" \
+ -e "s/^\#[[:space:]]*include.*\"\(libav.*\/.*[.]h\)\"/#include \<\1\>/" \
+ -e "/${SANITIZED_REGEXP}/{s:\"\(.*\)\":\<${2}\/\1\>:}" ${1}
+}
+
+check_sanitized_includes() {
+ grep -q "${SANITIZED_REGEXP}" $1
+}
+
+get_header_deps() {
+ grep "^#[[:space:]]*include.*\<libav.*[.]h\>" ${1} | \
+ sed -e "s/^#[[:space:]]*include.*\<\(libav.*[.]h\)\>/\1/" | \
+ tr -d '<>' | tr '\n' ' '
+}
+
+check_header_deps() {
+ for i ; do
+ printf "Checking for the presence of ${i}...\n"
+ if [ ! -f "${SYSTEM_FFMPEG_DIR}/${i}" -a ! -f "${FFMPEG_DIR}/${i}" ] ; then
+ printf "Header depends on ${i}\n"
+ printf "... but that file cannot be found, aborting\n"
+ exit 1
+ fi
+ done
+}
+
+move_file() {
+ mydir="$(dirname $1)"
+ printf "Moving and checking file: ${1}\n"
+ [ -d "${FFMPEG_DIR}/${mydir}" ] || mkdir -p "${FFMPEG_DIR}/${mydir}"
+ if [ ! -f "${FFMPEG_DIR}/${1}" ] ; then
+ sanitize_includes "${FFMPEG_MOVED_DIR}/${1}" ${mydir} > "${FFMPEG_DIR}/${1}"
+ fi
+ if $(check_sanitized_includes "${FFMPEG_DIR}/${1}") ; then
+ printf "Error, found non sanitized file in ffmpeg:\n"
+ printf "${FFMPEG_DIR}/${1}\n"
+ printf "Please report it at bugs.gentoo.org\n"
+ exit 1
+ fi
+ if [ "${1%.h}" != "${1}" ] ; then
+ mydeps=$(get_header_deps "${FFMPEG_DIR}/${1}")
+ check_header_deps ${mydeps}
+ fi
+}
+
+# HEADERS (order matters for the consistency checks: leaves come first)
+FILES="libavutil/wchar_filename.h libavformat/os_support.h libavformat/internal.h libavutil/x86/asm.h"
+# Files that are sed'ed but not compiled, used to check for availability of
+# some codecs
+FILES="${FILES} libavcodec/allcodecs.c libavformat/allformats.c libavfilter/allfilters.c"
+
+for i in ${FILES} ; do
+ move_file $i
+done
+
+rm -rf "${FFMPEG_MOVED_DIR}"
+
+exit 0
diff --git a/media-video/mplayer/files/mplayer-1.0_rc4-pkg-config.patch b/media-video/mplayer/files/mplayer-1.0_rc4-pkg-config.patch
new file mode 100644
index 000000000000..a93136cf8671
--- /dev/null
+++ b/media-video/mplayer/files/mplayer-1.0_rc4-pkg-config.patch
@@ -0,0 +1,74 @@
+respect $PKG_CONFIG, and use pkg-config for libdvdnav/libdvdread by
+default rather than the ugly xxx-config scripts
+
+https://bugs.gentoo.org/410189
+
+hassle vapier@gentoo.org if this causes issues
+
+--- configure
++++ configure
+@@ -4042,7 +4042,7 @@ echores "$_apple_ir"
+ fi #if linux
+
+ echocheck "pkg-config"
+-_pkg_config=pkg-config
++_pkg_config=${PKG_CONFIG:-pkg-config}
+ if $($_pkg_config --version > /dev/null 2>&1); then
+ if test "$ld_static"; then
+ _pkg_config="$_pkg_config --static"
+@@ -5740,8 +5740,13 @@ if test "$_dvdread_internal" = auto ; th
+ elif test "$_dvdread" = auto ; then
+ _dvdread=no
+ if test "$_dl" = yes; then
+- _dvdreadcflags=$($_dvdreadconfig --cflags 2> /dev/null)
+- _dvdreadlibs=$($_dvdreadconfig --libs 2> /dev/null)
++ if ! $_pkg_config --exists dvdread ; then
++ _dvdreadcflags=$($_pkgconfig dvdread --cflags)
++ _dvdreadlibs=$($_pkgconfig dvdread --libs)
++ else
++ _dvdreadcflags=$($_dvdreadconfig --cflags 2> /dev/null)
++ _dvdreadlibs=$($_dvdreadconfig --libs 2> /dev/null)
++ fi
+ if header_check dvdread/dvd_reader.h $_dvdreadcflags $_dvdreadlibs $ld_dl ; then
+ _dvdread=yes
+ extra_cflags="$extra_cflags $_dvdreadcflags"
+@@ -7721,13 +7726,20 @@ if test "$_dvdnav" = auto ; then
+ dvdnav_internal=yes
+ res_comment="internal"
+ else
+- $_dvdnavconfig --version --minilibs >> $TMPLOG 2>&1 || _dvdnav=no
++ if ! $_pkg_config --exists dvdnavmini ; then
++ $_dvdnavconfig --version --minilibs >> $TMPLOG 2>&1 || _dvdnav=no
++ fi
+ fi
+ fi
+ if test "$_dvdnav" = auto ; then
+ _dvdnav=no
+- _dvdnavdir=$($_dvdnavconfig --cflags)
+- _dvdnavlibs=$($_dvdnavconfig --libs)
++ if $_pkg_config --exists dvdnavmini ; then
++ _dvdnavdir=$($_pkg_config --cflags dvdnavmini)
++ _dvdnavlibs=$($_pkg_config --libs dvdnavmini)
++ else
++ _dvdnavdir=$($_dvdnavconfig --cflags)
++ _dvdnavlibs=$($_dvdnavconfig --libs)
++ fi
+ statement_check_broken stdint.h dvdnav/dvdnav.h 'dvdnav_t *dvd = 0' $_dvdnavdir $_dvdnavlibs $ld_dl $ld_pthread && _dvdnav=yes
+ fi
+ if test "$_dvdnav" = yes ; then
+@@ -7736,8 +7748,13 @@ if test "$_dvdnav" = yes ; then
+ cflags_libdvdnav="-Ilibdvdnav"
+ inputmodules="dvdnav(internal) $inputmodules"
+ else
+- extra_cflags="$extra_cflags $($_dvdnavconfig --cflags)"
+- extra_ldflags="$extra_ldflags $($_dvdnavconfig --minilibs)"
++ if $_pkg_config --exists dvdnavmini ; then
++ extra_cflags="$extra_cflags $($_pkg_config --cflags dvdnavmini)"
++ extra_ldflags="$extra_ldflags $($_pkg_config --libs dvdnavmini)"
++ else
++ extra_cflags="$extra_cflags $($_dvdnavconfig --cflags)"
++ extra_ldflags="$extra_ldflags $($_dvdnavconfig --minilibs)"
++ fi
+ inputmodules="dvdnav $inputmodules"
+ fi
+ else
diff --git a/media-video/mplayer/files/mplayer-1.1-codecid.patch b/media-video/mplayer/files/mplayer-1.1-codecid.patch
new file mode 100644
index 000000000000..38a58aa0f47b
--- /dev/null
+++ b/media-video/mplayer/files/mplayer-1.1-codecid.patch
@@ -0,0 +1,19 @@
+r35075 | iive | 2012-08-11 12:42:43 -0400 (Sat, 11 Aug 2012) | 4 lines
+
+Quick Build Fix. FFmpeg CodecID is redefined as AVCodecID.
+It needs the FFmpeg includes in all places that use it.
+
+
+Index: libmpdemux/mp_taglists.h
+===================================================================
+--- libmpdemux/mp_taglists.h (revision 35074)
++++ libmpdemux/mp_taglists.h (revision 35075)
+@@ -20,6 +20,8 @@
+ #define MPLAYER_MP_TAGLISTS_H
+
+ #include <stdint.h>
++#include "libavutil/common.h"
++#include "libavformat/avformat.h"
+
+ enum CodecID mp_tag2codec_id(uint32_t tag, int audio);
+ uint32_t mp_codec_id2tag(enum CodecID codec_id, uint32_t old_tag, int audio);
diff --git a/media-video/mplayer/files/mplayer-1.1-ffmpeg.patch b/media-video/mplayer/files/mplayer-1.1-ffmpeg.patch
new file mode 100644
index 000000000000..6ec6ef72fe8c
--- /dev/null
+++ b/media-video/mplayer/files/mplayer-1.1-ffmpeg.patch
@@ -0,0 +1,34 @@
+Let it build with ffmpeg 0.10.3.
+
+Index: MPlayer-1.1/fmt-conversion.c
+===================================================================
+--- MPlayer-1.1.orig/fmt-conversion.c
++++ MPlayer-1.1/fmt-conversion.c
+@@ -65,9 +65,13 @@ static const struct {
+ {IMGFMT_RGBA, PIX_FMT_RGB0},
+ {IMGFMT_RGB64LE, PIX_FMT_RGBA64LE},
+ {IMGFMT_RGB64BE, PIX_FMT_RGBA64BE},
++#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(51, 50, 0)
+ {IMGFMT_422A, PIX_FMT_YUVA422P},
++#endif
++#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(51, 35, 101)
+ {IMGFMT_444A, PIX_FMT_YUVA444P},
+ #endif
++#endif
+ #if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(51, 20, 1)
+ {IMGFMT_GBR24P, PIX_FMT_GBRP},
+ #endif
+Index: MPlayer-1.1/libmpdemux/mp_taglists.c
+===================================================================
+--- MPlayer-1.1.orig/libmpdemux/mp_taglists.c
++++ MPlayer-1.1/libmpdemux/mp_taglists.c
+@@ -125,7 +125,9 @@ static const struct AVCodecTag mp_bmp_ta
+ { CODEC_ID_BMV_VIDEO, MKTAG('B', 'M', 'V', 'V')},
+ { CODEC_ID_C93, MKTAG('C', '9', '3', 'V')},
+ { CODEC_ID_CDGRAPHICS, MKTAG('C', 'D', 'G', 'R')},
++#if LIBAVCODEC_VERSION_INT > AV_VERSION_INT(54,1,0)
+ { CODEC_ID_CDXL, MKTAG('C', 'D', 'X', 'L')},
++#endif
+ { CODEC_ID_CMV, MKTAG('M', 'V', 'I', 'f')},
+ { CODEC_ID_DFA, MKTAG('C', 'D', 'F', 'A')},
+ { CODEC_ID_DNXHD, MKTAG('A', 'V', 'd', 'n')},
diff --git a/media-video/mplayer/files/mplayer-1.1-libav-0.8.patch b/media-video/mplayer/files/mplayer-1.1-libav-0.8.patch
new file mode 100644
index 000000000000..acfb60584a96
--- /dev/null
+++ b/media-video/mplayer/files/mplayer-1.1-libav-0.8.patch
@@ -0,0 +1,21 @@
+--- mplayer-1.0~svn34750.orig/libmpcodecs/vd_ffmpeg.c
++++ mplayer-1.0~svn34750/libmpcodecs/vd_ffmpeg.c
+@@ -47,6 +47,18 @@
+
+ #include "libavcodec/avcodec.h"
+
++#ifndef AV_EF_COMPLIANT
++#define AV_EF_COMPLIANT 0
++#endif
++
++#ifndef AV_EF_CAREFUL
++#define AV_EF_CAREFUL 0
++#endif
++
++#ifndef AV_EF_AGGRESSIVE
++#define AV_EF_AGGRESSIVE 0
++#endif
++
+ #if AVPALETTE_SIZE > 1024
+ #error palette too large, adapt libmpcodecs/vf.c:vf_get_image
+ #endif
diff --git a/media-video/mplayer/files/mplayer-1.1-libav-9.patch b/media-video/mplayer/files/mplayer-1.1-libav-9.patch
new file mode 100644
index 000000000000..a2630b61bbcf
--- /dev/null
+++ b/media-video/mplayer/files/mplayer-1.1-libav-9.patch
@@ -0,0 +1,488 @@
+diff -urN MPlayer-1.1.orig//av_opts.c MPlayer-1.1/av_opts.c
+--- MPlayer-1.1.orig//av_opts.c 2012-01-28 14:51:57.000000000 +0100
++++ MPlayer-1.1/av_opts.c 2013-01-17 09:29:34.472213703 +0100
+@@ -42,7 +42,7 @@
+ arg = strchr(str, '=');
+ if(arg) *arg++= 0;
+
+- if(av_set_string3(v, str, arg, 0, NULL) < 0){
++ if(av_opt_set(v, str, arg, 0) < 0){
+ free(start);
+ return -1;
+ }
+diff -urN MPlayer-1.1.orig//bstr.c MPlayer-1.1/bstr.c
+--- MPlayer-1.1.orig//bstr.c 2010-07-19 00:00:48.000000000 +0200
++++ MPlayer-1.1/bstr.c 2013-01-17 09:43:10.787183988 +0100
+@@ -18,6 +18,7 @@
+
+ #include <string.h>
+ #include <libavutil/avutil.h>
++#include <libavutil/common.h>
+
+ #include "bstr.h"
+
+diff -urN MPlayer-1.1.orig//codec-cfg.c MPlayer-1.1/codec-cfg.c
+--- MPlayer-1.1.orig//codec-cfg.c 2012-05-08 12:56:22.000000000 +0200
++++ MPlayer-1.1/codec-cfg.c 2013-01-17 09:34:39.860202586 +0100
+@@ -54,6 +54,7 @@
+ #include "help_mp.h"
+
+ #include "libavutil/avutil.h"
++#include "libavutil/common.h"
+ #include "libmpcodecs/img_format.h"
+ #include "codec-cfg.h"
+
+diff -urN MPlayer-1.1.orig//fmt-conversion.c MPlayer-1.1/fmt-conversion.c
+--- MPlayer-1.1.orig//fmt-conversion.c 2013-01-17 09:16:03.213243232 +0100
++++ MPlayer-1.1/fmt-conversion.c 2013-01-17 09:28:32.490215959 +0100
+@@ -26,134 +26,134 @@
+
+ static const struct {
+ int fmt;
+- enum PixelFormat pix_fmt;
++ enum AVPixelFormat pix_fmt;
+ } conversion_map[] = {
+- {IMGFMT_ARGB, PIX_FMT_ARGB},
+- {IMGFMT_BGRA, PIX_FMT_BGRA},
+- {IMGFMT_BGR24, PIX_FMT_BGR24},
+- {IMGFMT_BGR16BE, PIX_FMT_RGB565BE},
+- {IMGFMT_BGR16LE, PIX_FMT_RGB565LE},
+- {IMGFMT_BGR15BE, PIX_FMT_RGB555BE},
+- {IMGFMT_BGR15LE, PIX_FMT_RGB555LE},
+- {IMGFMT_BGR12BE, PIX_FMT_RGB444BE},
+- {IMGFMT_BGR12LE, PIX_FMT_RGB444LE},
+- {IMGFMT_BGR8, PIX_FMT_RGB8},
+- {IMGFMT_BGR4, PIX_FMT_RGB4},
+- {IMGFMT_BGR1, PIX_FMT_MONOBLACK},
+- {IMGFMT_RGB1, PIX_FMT_MONOBLACK},
+- {IMGFMT_RG4B, PIX_FMT_BGR4_BYTE},
+- {IMGFMT_BG4B, PIX_FMT_RGB4_BYTE},
+- {IMGFMT_RGB48LE, PIX_FMT_RGB48LE},
+- {IMGFMT_RGB48BE, PIX_FMT_RGB48BE},
+- {IMGFMT_ABGR, PIX_FMT_ABGR},
+- {IMGFMT_RGBA, PIX_FMT_RGBA},
+- {IMGFMT_RGB24, PIX_FMT_RGB24},
+- {IMGFMT_RGB16BE, PIX_FMT_BGR565BE},
+- {IMGFMT_RGB16LE, PIX_FMT_BGR565LE},
+- {IMGFMT_RGB15BE, PIX_FMT_BGR555BE},
+- {IMGFMT_RGB15LE, PIX_FMT_BGR555LE},
+- {IMGFMT_RGB12BE, PIX_FMT_BGR444BE},
+- {IMGFMT_RGB12LE, PIX_FMT_BGR444LE},
+- {IMGFMT_RGB8, PIX_FMT_BGR8},
+- {IMGFMT_RGB4, PIX_FMT_BGR4},
+- {IMGFMT_BGR8, PIX_FMT_PAL8},
+-// NB: This works only because PIX_FMT_0RGB32 is a CPP Macro.
+-// note that most other PIX_FMT values are enums
+-#ifdef PIX_FMT_0RGB32
+- {IMGFMT_BGR32, PIX_FMT_0RGB32},
+- {IMGFMT_BGRA, PIX_FMT_BGR0},
+- {IMGFMT_RGBA, PIX_FMT_RGB0},
+- {IMGFMT_RGB64LE, PIX_FMT_RGBA64LE},
+- {IMGFMT_RGB64BE, PIX_FMT_RGBA64BE},
++ {IMGFMT_ARGB, AV_PIX_FMT_ARGB},
++ {IMGFMT_BGRA, AV_PIX_FMT_BGRA},
++ {IMGFMT_BGR24, AV_PIX_FMT_BGR24},
++ {IMGFMT_BGR16BE, AV_PIX_FMT_RGB565BE},
++ {IMGFMT_BGR16LE, AV_PIX_FMT_RGB565LE},
++ {IMGFMT_BGR15BE, AV_PIX_FMT_RGB555BE},
++ {IMGFMT_BGR15LE, AV_PIX_FMT_RGB555LE},
++ {IMGFMT_BGR12BE, AV_PIX_FMT_RGB444BE},
++ {IMGFMT_BGR12LE, AV_PIX_FMT_RGB444LE},
++ {IMGFMT_BGR8, AV_PIX_FMT_RGB8},
++ {IMGFMT_BGR4, AV_PIX_FMT_RGB4},
++ {IMGFMT_BGR1, AV_PIX_FMT_MONOBLACK},
++ {IMGFMT_RGB1, AV_PIX_FMT_MONOBLACK},
++ {IMGFMT_RG4B, AV_PIX_FMT_BGR4_BYTE},
++ {IMGFMT_BG4B, AV_PIX_FMT_RGB4_BYTE},
++ {IMGFMT_RGB48LE, AV_PIX_FMT_RGB48LE},
++ {IMGFMT_RGB48BE, AV_PIX_FMT_RGB48BE},
++ {IMGFMT_ABGR, AV_PIX_FMT_ABGR},
++ {IMGFMT_RGBA, AV_PIX_FMT_RGBA},
++ {IMGFMT_RGB24, AV_PIX_FMT_RGB24},
++ {IMGFMT_RGB16BE, AV_PIX_FMT_BGR565BE},
++ {IMGFMT_RGB16LE, AV_PIX_FMT_BGR565LE},
++ {IMGFMT_RGB15BE, AV_PIX_FMT_BGR555BE},
++ {IMGFMT_RGB15LE, AV_PIX_FMT_BGR555LE},
++ {IMGFMT_RGB12BE, AV_PIX_FMT_BGR444BE},
++ {IMGFMT_RGB12LE, AV_PIX_FMT_BGR444LE},
++ {IMGFMT_RGB8, AV_PIX_FMT_BGR8},
++ {IMGFMT_RGB4, AV_PIX_FMT_BGR4},
++ {IMGFMT_BGR8, AV_PIX_FMT_PAL8},
++// NB: This works only because AV_PIX_FMT_0RGB32 is a CPP Macro.
++// note that most other AV_PIX_FMT values are enums
++#ifdef AV_PIX_FMT_0RGB32
++ {IMGFMT_BGR32, AV_PIX_FMT_0RGB32},
++ {IMGFMT_BGRA, AV_PIX_FMT_BGR0},
++ {IMGFMT_RGBA, AV_PIX_FMT_RGB0},
++ {IMGFMT_RGB64LE, AV_PIX_FMT_RGBA64LE},
++ {IMGFMT_RGB64BE, AV_PIX_FMT_RGBA64BE},
+ #if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(51, 50, 0)
+- {IMGFMT_422A, PIX_FMT_YUVA422P},
++ {IMGFMT_422A, AV_PIX_FMT_YUVA422P},
+ #endif
+ #if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(51, 35, 101)
+- {IMGFMT_444A, PIX_FMT_YUVA444P},
++ {IMGFMT_444A, AV_PIX_FMT_YUVA444P},
+ #endif
+ #endif
+ #if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(51, 20, 1)
+- {IMGFMT_GBR24P, PIX_FMT_GBRP},
++ {IMGFMT_GBR24P, AV_PIX_FMT_GBRP},
+ #endif
+- {IMGFMT_YUY2, PIX_FMT_YUYV422},
+- {IMGFMT_UYVY, PIX_FMT_UYVY422},
+- {IMGFMT_NV12, PIX_FMT_NV12},
+- {IMGFMT_NV21, PIX_FMT_NV21},
+- {IMGFMT_Y800, PIX_FMT_GRAY8},
+- {IMGFMT_Y8, PIX_FMT_GRAY8},
+- {IMGFMT_YVU9, PIX_FMT_YUV410P},
+- {IMGFMT_IF09, PIX_FMT_YUV410P},
+- {IMGFMT_YV12, PIX_FMT_YUV420P},
+- {IMGFMT_I420, PIX_FMT_YUV420P},
+- {IMGFMT_IYUV, PIX_FMT_YUV420P},
+- {IMGFMT_411P, PIX_FMT_YUV411P},
+- {IMGFMT_422P, PIX_FMT_YUV422P},
+- {IMGFMT_444P, PIX_FMT_YUV444P},
+- {IMGFMT_440P, PIX_FMT_YUV440P},
+-
+- {IMGFMT_420A, PIX_FMT_YUVA420P},
+-
+- {IMGFMT_420P16_LE, PIX_FMT_YUV420P16LE},
+- {IMGFMT_420P16_BE, PIX_FMT_YUV420P16BE},
+- {IMGFMT_420P10_LE, PIX_FMT_YUV420P10LE},
+- {IMGFMT_420P10_BE, PIX_FMT_YUV420P10BE},
+- {IMGFMT_420P9_LE, PIX_FMT_YUV420P9LE},
+- {IMGFMT_420P9_BE, PIX_FMT_YUV420P9BE},
+- {IMGFMT_422P16_LE, PIX_FMT_YUV422P16LE},
+- {IMGFMT_422P16_BE, PIX_FMT_YUV422P16BE},
+- {IMGFMT_422P10_LE, PIX_FMT_YUV422P10LE},
+- {IMGFMT_422P10_BE, PIX_FMT_YUV422P10BE},
+- {IMGFMT_422P9_LE, PIX_FMT_YUV422P9LE},
+- {IMGFMT_422P9_BE, PIX_FMT_YUV422P9BE},
+- {IMGFMT_444P16_LE, PIX_FMT_YUV444P16LE},
+- {IMGFMT_444P16_BE, PIX_FMT_YUV444P16BE},
+- {IMGFMT_444P10_LE, PIX_FMT_YUV444P10LE},
+- {IMGFMT_444P10_BE, PIX_FMT_YUV444P10BE},
+- {IMGFMT_444P9_LE, PIX_FMT_YUV444P9LE},
+- {IMGFMT_444P9_BE, PIX_FMT_YUV444P9BE},
++ {IMGFMT_YUY2, AV_PIX_FMT_YUYV422},
++ {IMGFMT_UYVY, AV_PIX_FMT_UYVY422},
++ {IMGFMT_NV12, AV_PIX_FMT_NV12},
++ {IMGFMT_NV21, AV_PIX_FMT_NV21},
++ {IMGFMT_Y800, AV_PIX_FMT_GRAY8},
++ {IMGFMT_Y8, AV_PIX_FMT_GRAY8},
++ {IMGFMT_YVU9, AV_PIX_FMT_YUV410P},
++ {IMGFMT_IF09, AV_PIX_FMT_YUV410P},
++ {IMGFMT_YV12, AV_PIX_FMT_YUV420P},
++ {IMGFMT_I420, AV_PIX_FMT_YUV420P},
++ {IMGFMT_IYUV, AV_PIX_FMT_YUV420P},
++ {IMGFMT_411P, AV_PIX_FMT_YUV411P},
++ {IMGFMT_422P, AV_PIX_FMT_YUV422P},
++ {IMGFMT_444P, AV_PIX_FMT_YUV444P},
++ {IMGFMT_440P, AV_PIX_FMT_YUV440P},
++
++ {IMGFMT_420A, AV_PIX_FMT_YUVA420P},
++
++ {IMGFMT_420P16_LE, AV_PIX_FMT_YUV420P16LE},
++ {IMGFMT_420P16_BE, AV_PIX_FMT_YUV420P16BE},
++ {IMGFMT_420P10_LE, AV_PIX_FMT_YUV420P10LE},
++ {IMGFMT_420P10_BE, AV_PIX_FMT_YUV420P10BE},
++ {IMGFMT_420P9_LE, AV_PIX_FMT_YUV420P9LE},
++ {IMGFMT_420P9_BE, AV_PIX_FMT_YUV420P9BE},
++ {IMGFMT_422P16_LE, AV_PIX_FMT_YUV422P16LE},
++ {IMGFMT_422P16_BE, AV_PIX_FMT_YUV422P16BE},
++ {IMGFMT_422P10_LE, AV_PIX_FMT_YUV422P10LE},
++ {IMGFMT_422P10_BE, AV_PIX_FMT_YUV422P10BE},
++ {IMGFMT_422P9_LE, AV_PIX_FMT_YUV422P9LE},
++ {IMGFMT_422P9_BE, AV_PIX_FMT_YUV422P9BE},
++ {IMGFMT_444P16_LE, AV_PIX_FMT_YUV444P16LE},
++ {IMGFMT_444P16_BE, AV_PIX_FMT_YUV444P16BE},
++ {IMGFMT_444P10_LE, AV_PIX_FMT_YUV444P10LE},
++ {IMGFMT_444P10_BE, AV_PIX_FMT_YUV444P10BE},
++ {IMGFMT_444P9_LE, AV_PIX_FMT_YUV444P9LE},
++ {IMGFMT_444P9_BE, AV_PIX_FMT_YUV444P9BE},
+
+ // YUVJ are YUV formats that use the full Y range and not just
+ // 16 - 235 (see colorspaces.txt).
+ // Currently they are all treated the same way.
+- {IMGFMT_YV12, PIX_FMT_YUVJ420P},
+- {IMGFMT_422P, PIX_FMT_YUVJ422P},
+- {IMGFMT_444P, PIX_FMT_YUVJ444P},
+- {IMGFMT_440P, PIX_FMT_YUVJ440P},
+-
+- {IMGFMT_XVMC_MOCO_MPEG2, PIX_FMT_XVMC_MPEG2_MC},
+- {IMGFMT_XVMC_IDCT_MPEG2, PIX_FMT_XVMC_MPEG2_IDCT},
+- {IMGFMT_VDPAU_MPEG1, PIX_FMT_VDPAU_MPEG1},
+- {IMGFMT_VDPAU_MPEG2, PIX_FMT_VDPAU_MPEG2},
+- {IMGFMT_VDPAU_H264, PIX_FMT_VDPAU_H264},
+- {IMGFMT_VDPAU_WMV3, PIX_FMT_VDPAU_WMV3},
+- {IMGFMT_VDPAU_VC1, PIX_FMT_VDPAU_VC1},
+- {IMGFMT_VDPAU_MPEG4, PIX_FMT_VDPAU_MPEG4},
+- {0, PIX_FMT_NONE}
++ {IMGFMT_YV12, AV_PIX_FMT_YUVJ420P},
++ {IMGFMT_422P, AV_PIX_FMT_YUVJ422P},
++ {IMGFMT_444P, AV_PIX_FMT_YUVJ444P},
++ {IMGFMT_440P, AV_PIX_FMT_YUVJ440P},
++
++ {IMGFMT_XVMC_MOCO_MPEG2, AV_PIX_FMT_XVMC_MPEG2_MC},
++ {IMGFMT_XVMC_IDCT_MPEG2, AV_PIX_FMT_XVMC_MPEG2_IDCT},
++ {IMGFMT_VDPAU_MPEG1, AV_PIX_FMT_VDPAU_MPEG1},
++ {IMGFMT_VDPAU_MPEG2, AV_PIX_FMT_VDPAU_MPEG2},
++ {IMGFMT_VDPAU_H264, AV_PIX_FMT_VDPAU_H264},
++ {IMGFMT_VDPAU_WMV3, AV_PIX_FMT_VDPAU_WMV3},
++ {IMGFMT_VDPAU_VC1, AV_PIX_FMT_VDPAU_VC1},
++ {IMGFMT_VDPAU_MPEG4, AV_PIX_FMT_VDPAU_MPEG4},
++ {0, AV_PIX_FMT_NONE}
+ };
+
+-enum PixelFormat imgfmt2pixfmt(int fmt)
++enum AVPixelFormat imgfmt2pixfmt(int fmt)
+ {
+ int i;
+- enum PixelFormat pix_fmt;
++ enum AVPixelFormat pix_fmt;
+ for (i = 0; conversion_map[i].fmt; i++)
+ if (conversion_map[i].fmt == fmt)
+ break;
+ pix_fmt = conversion_map[i].pix_fmt;
+- if (pix_fmt == PIX_FMT_NONE)
++ if (pix_fmt == AV_PIX_FMT_NONE)
+ mp_msg(MSGT_GLOBAL, MSGL_ERR, "Unsupported format %s\n", vo_format_name(fmt));
+ return pix_fmt;
+ }
+
+-int pixfmt2imgfmt(enum PixelFormat pix_fmt)
++int pixfmt2imgfmt(enum AVPixelFormat pix_fmt)
+ {
+ int i;
+ int fmt;
+- for (i = 0; conversion_map[i].pix_fmt != PIX_FMT_NONE; i++)
++ for (i = 0; conversion_map[i].pix_fmt != AV_PIX_FMT_NONE; i++)
+ if (conversion_map[i].pix_fmt == pix_fmt)
+ break;
+ fmt = conversion_map[i].fmt;
+ if (!fmt)
+- mp_msg(MSGT_GLOBAL, MSGL_ERR, "Unsupported PixelFormat %i\n", pix_fmt);
++ mp_msg(MSGT_GLOBAL, MSGL_ERR, "Unsupported AVPixelFormat %i\n", pix_fmt);
+ return fmt;
+ }
+
+diff -urN MPlayer-1.1.orig//fmt-conversion.h MPlayer-1.1/fmt-conversion.h
+--- MPlayer-1.1.orig//fmt-conversion.h 2011-03-01 22:44:15.000000000 +0100
++++ MPlayer-1.1/fmt-conversion.h 2013-01-17 09:28:38.120215759 +0100
+@@ -23,8 +23,8 @@
+ #include "libavutil/avutil.h"
+ #include "libavutil/samplefmt.h"
+
+-enum PixelFormat imgfmt2pixfmt(int fmt);
+-int pixfmt2imgfmt(enum PixelFormat pix_fmt);
++enum AVPixelFormat imgfmt2pixfmt(int fmt);
++int pixfmt2imgfmt(enum AVPixelFormat pix_fmt);
+ enum AVSampleFormat affmt2samplefmt(int fmt);
+ int samplefmt2affmt(enum AVSampleFormat sample_fmt);
+
+diff -urN MPlayer-1.1.orig//libaf/af_format.c MPlayer-1.1/libaf/af_format.c
+--- MPlayer-1.1.orig//libaf/af_format.c 2011-10-26 17:12:35.000000000 +0200
++++ MPlayer-1.1/libaf/af_format.c 2013-01-17 09:43:32.770183189 +0100
+@@ -34,6 +34,7 @@
+ #include "libvo/fastmemcpy.h"
+
+ #include "libavutil/avutil.h"
++#include "libavutil/common.h"
+
+ /* Functions used by play to convert the input audio to the correct
+ format */
+diff -urN MPlayer-1.1.orig//libaf/af_lavcac3enc.c MPlayer-1.1/libaf/af_lavcac3enc.c
+--- MPlayer-1.1.orig//libaf/af_lavcac3enc.c 2012-02-19 16:21:23.000000000 +0100
++++ MPlayer-1.1/libaf/af_lavcac3enc.c 2013-01-17 09:44:27.103181211 +0100
+@@ -32,6 +32,7 @@
+ #include "reorder_ch.h"
+ #include "av_helpers.h"
+
++#include "libavutil/common.h"
+ #include "libavcodec/avcodec.h"
+ #include "libavutil/intreadwrite.h"
+
+diff -urN MPlayer-1.1.orig//libmpcodecs/vf.c MPlayer-1.1/libmpcodecs/vf.c
+--- MPlayer-1.1.orig//libmpcodecs/vf.c 2012-05-30 23:08:05.000000000 +0200
++++ MPlayer-1.1/libmpcodecs/vf.c 2013-01-17 09:50:25.861168154 +0100
+@@ -40,6 +40,7 @@
+ #include "vf.h"
+
+ #include "libvo/fastmemcpy.h"
++#include "libavutil/common.h"
+ #include "libavutil/mem.h"
+
+ extern const vf_info_t vf_info_1bpp;
+diff -urN MPlayer-1.1.orig//libmpcodecs/vf_geq.c MPlayer-1.1/libmpcodecs/vf_geq.c
+--- MPlayer-1.1.orig//libmpcodecs/vf_geq.c 2011-04-19 09:32:36.000000000 +0200
++++ MPlayer-1.1/libmpcodecs/vf_geq.c 2013-01-17 09:44:01.045182161 +0100
+@@ -34,6 +34,8 @@
+
+ #include "libavcodec/avcodec.h"
+ #include "libavutil/eval.h"
++#include "libavutil/common.h"
++#include "libavutil/mem.h"
+
+ struct vf_priv_s {
+ AVExpr * e[3];
+diff -urN MPlayer-1.1.orig//libmpcodecs/vf_gradfun.c MPlayer-1.1/libmpcodecs/vf_gradfun.c
+--- MPlayer-1.1.orig//libmpcodecs/vf_gradfun.c 2010-04-06 11:46:47.000000000 +0200
++++ MPlayer-1.1/libmpcodecs/vf_gradfun.c 2013-01-17 09:47:10.679175257 +0100
+@@ -39,6 +39,7 @@
+ #include "vf.h"
+ #include "libvo/fastmemcpy.h"
+ #include "libavutil/avutil.h"
++#include "libavutil/common.h"
+ #include "libavutil/x86_cpu.h"
+
+ struct vf_priv_s {
+diff -urN MPlayer-1.1.orig//libmpcodecs/vf_sab.c MPlayer-1.1/libmpcodecs/vf_sab.c
+--- MPlayer-1.1.orig//libmpcodecs/vf_sab.c 2011-05-25 15:46:32.000000000 +0200
++++ MPlayer-1.1/libmpcodecs/vf_sab.c 2013-01-17 09:28:59.964214957 +0100
+@@ -32,6 +32,7 @@
+ #endif
+
+ #include "libavutil/avutil.h"
++#include "libavutil/mem.h"
+ #include "img_format.h"
+ #include "mp_image.h"
+ #include "vf.h"
+diff -urN MPlayer-1.1.orig//libmpcodecs/vf_screenshot.c MPlayer-1.1/libmpcodecs/vf_screenshot.c
+--- MPlayer-1.1.orig//libmpcodecs/vf_screenshot.c 2012-02-19 23:09:30.000000000 +0100
++++ MPlayer-1.1/libmpcodecs/vf_screenshot.c 2013-01-17 09:28:04.643216971 +0100
+@@ -39,6 +39,7 @@
+
+ #include "libswscale/swscale.h"
+ #include "libavcodec/avcodec.h"
++#include "libavutil/mem.h"
+
+ struct vf_priv_s {
+ int frameno;
+diff -urN MPlayer-1.1.orig//libmpdemux/demux_lavf.c MPlayer-1.1/libmpdemux/demux_lavf.c
+--- MPlayer-1.1.orig//libmpdemux/demux_lavf.c 2012-04-07 22:08:53.000000000 +0200
++++ MPlayer-1.1/libmpdemux/demux_lavf.c 2013-01-17 09:41:44.880187116 +0100
+@@ -317,20 +317,20 @@
+ sh_audio->samplerate= codec->sample_rate;
+ sh_audio->i_bps= codec->bit_rate/8;
+ switch (codec->codec_id) {
+- case CODEC_ID_PCM_S8:
+- case CODEC_ID_PCM_U8:
++ case AV_CODEC_ID_PCM_S8:
++ case AV_CODEC_ID_PCM_U8:
+ sh_audio->samplesize = 1;
+ break;
+- case CODEC_ID_PCM_S16LE:
+- case CODEC_ID_PCM_S16BE:
+- case CODEC_ID_PCM_U16LE:
+- case CODEC_ID_PCM_U16BE:
++ case AV_CODEC_ID_PCM_S16LE:
++ case AV_CODEC_ID_PCM_S16BE:
++ case AV_CODEC_ID_PCM_U16LE:
++ case AV_CODEC_ID_PCM_U16BE:
+ sh_audio->samplesize = 2;
+ break;
+- case CODEC_ID_PCM_ALAW:
++ case AV_CODEC_ID_PCM_ALAW:
+ sh_audio->format = 0x6;
+ break;
+- case CODEC_ID_PCM_MULAW:
++ case AV_CODEC_ID_PCM_MULAW:
+ sh_audio->format = 0x7;
+ break;
+ }
+@@ -358,7 +358,7 @@
+ priv->vstreams[priv->video_streams] = i;
+ bih=calloc(sizeof(*bih) + codec->extradata_size,1);
+
+- if(codec->codec_id == CODEC_ID_RAWVIDEO) {
++ if(codec->codec_id == AV_CODEC_ID_RAWVIDEO) {
+ switch (codec->pix_fmt) {
+ case PIX_FMT_RGB24:
+ codec->codec_tag= MKTAG(24, 'B', 'G', 'R');
+@@ -423,24 +423,24 @@
+ case AVMEDIA_TYPE_SUBTITLE:{
+ sh_sub_t* sh_sub;
+ char type;
+- if(codec->codec_id == CODEC_ID_TEXT)
++ if(codec->codec_id == AV_CODEC_ID_TEXT)
+ type = 't';
+- else if(codec->codec_id == CODEC_ID_MOV_TEXT)
++ else if(codec->codec_id == AV_CODEC_ID_MOV_TEXT)
+ type = 'm';
+- else if(codec->codec_id == CODEC_ID_SSA)
++ else if(codec->codec_id == AV_CODEC_ID_SSA)
+ type = 'a';
+- else if(codec->codec_id == CODEC_ID_DVD_SUBTITLE)
++ else if(codec->codec_id == AV_CODEC_ID_DVD_SUBTITLE)
+ type = 'v';
+- else if(codec->codec_id == CODEC_ID_XSUB)
++ else if(codec->codec_id == AV_CODEC_ID_XSUB)
+ type = 'x';
+- else if(codec->codec_id == CODEC_ID_DVB_SUBTITLE)
++ else if(codec->codec_id == AV_CODEC_ID_DVB_SUBTITLE)
+ type = 'b';
+- else if(codec->codec_id == CODEC_ID_DVB_TELETEXT)
++ else if(codec->codec_id == AV_CODEC_ID_DVB_TELETEXT)
+ type = 'd';
+- else if(codec->codec_id == CODEC_ID_HDMV_PGS_SUBTITLE)
++ else if(codec->codec_id == AV_CODEC_ID_HDMV_PGS_SUBTITLE)
+ type = 'p';
+-#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(54, 14, 100)
+- else if(codec->codec_id == CODEC_ID_EIA_608)
++#if LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(54, 14, 100)
++ else if(codec->codec_id == AV_CODEC_ID_EIA_608)
+ type = 'c';
+ #endif
+ else if(codec->codec_tag == MKTAG('c', '6', '0', '8'))
+@@ -465,7 +465,7 @@
+ break;
+ }
+ case AVMEDIA_TYPE_ATTACHMENT:{
+- if (st->codec->codec_id == CODEC_ID_TTF) {
++ if (st->codec->codec_id == AV_CODEC_ID_TTF) {
+ AVDictionaryEntry *fnametag = av_dict_get(st->metadata, "filename", NULL, 0);
+ demuxer_add_attachment(demuxer, fnametag ? fnametag->value : NULL,
+ "application/x-truetype-font",
+@@ -808,7 +808,7 @@
+ prog->aid = program->stream_index[i];
+ break;
+ case AVMEDIA_TYPE_SUBTITLE:
+- if(prog->sid == -2 && priv->avfc->streams[program->stream_index[i]]->codec->codec_id == CODEC_ID_TEXT)
++ if(prog->sid == -2 && priv->avfc->streams[program->stream_index[i]]->codec->codec_id == AV_CODEC_ID_TEXT)
+ prog->sid = program->stream_index[i];
+ break;
+ }
+diff -urN MPlayer-1.1.orig//stream/cache2.c MPlayer-1.1/stream/cache2.c
+--- MPlayer-1.1.orig//stream/cache2.c 2012-03-04 16:11:50.000000000 +0100
++++ MPlayer-1.1/stream/cache2.c 2013-01-17 09:30:01.501212718 +0100
+@@ -40,6 +40,7 @@
+ #include <errno.h>
+
+ #include "libavutil/avutil.h"
++#include "libavutil/common.h"
+ #include "osdep/shmem.h"
+ #include "osdep/timer.h"
+ #if defined(__MINGW32__)
+diff -urN MPlayer-1.1.orig//sub/spudec.c MPlayer-1.1/sub/spudec.c
+--- MPlayer-1.1.orig//sub/spudec.c 2012-04-23 20:39:16.000000000 +0200
++++ MPlayer-1.1/sub/spudec.c 2013-01-17 09:46:50.054176009 +0100
+@@ -42,6 +42,7 @@
+ #include "spudec.h"
+ #include "vobsub.h"
+ #include "libavutil/avutil.h"
++#include "libavutil/common.h"
+ #include "libavutil/intreadwrite.h"
+ #include "libswscale/swscale.h"
+
+diff -urN MPlayer-1.1.orig//sub/sub_cc.c MPlayer-1.1/sub/sub_cc.c
+--- MPlayer-1.1.orig//sub/sub_cc.c 2012-04-07 22:08:53.000000000 +0200
++++ MPlayer-1.1/sub/sub_cc.c 2013-01-17 09:46:31.413176687 +0100
+@@ -42,6 +42,7 @@
+ #include "sub.h"
+
+ #include "libavutil/avutil.h"
++#include "libavutil/common.h"
+
+
+ #define CC_MAX_LINE_LENGTH 64
diff --git a/media-video/mplayer/files/mplayer-1.1-missingbreak.patch b/media-video/mplayer/files/mplayer-1.1-missingbreak.patch
new file mode 100644
index 000000000000..0dd7064e8f0c
--- /dev/null
+++ b/media-video/mplayer/files/mplayer-1.1-missingbreak.patch
@@ -0,0 +1,18 @@
+------------------------------------------------------------------------
+r35436 | upsuper | 2012-11-21 08:37:24 -0300 (Wed, 21 Nov 2012) | 2 lines
+
+Add missing break.
+
+------------------------------------------------------------------------
+Index: libmpcodecs/ad_ffmpeg.c
+===================================================================
+--- libmpcodecs/ad_ffmpeg.c (revision 35435)
++++ libmpcodecs/ad_ffmpeg.c (revision 35436)
+@@ -245,6 +245,7 @@
+ case 4:
+ copy_samples_planar(4, frame->nb_samples, channels,
+ buf, frame->extended_data);
++ break;
+ default:
+ copy_samples_planar(sample_size, frame->nb_samples, channels,
+ buf, frame->extended_data);
diff --git a/media-video/mplayer/files/mplayer-1.1-planaraudio.patch b/media-video/mplayer/files/mplayer-1.1-planaraudio.patch
new file mode 100644
index 000000000000..48dcb4cb4823
--- /dev/null
+++ b/media-video/mplayer/files/mplayer-1.1-planaraudio.patch
@@ -0,0 +1,138 @@
+------------------------------------------------------------------------
+r35228 | cigaes | 2012-10-04 15:04:42 -0300 (Thu, 04 Oct 2012) | 5 lines
+
+ad_ffmpeg: basic support for planar formats.
+
+Upgrade to avcodec_decode_audio4().
+Planar formats are immediately converted to packet formats.
+A lot of optimizations are still possible.
+------------------------------------------------------------------------
+
+
+Index: libmpcodecs/ad_ffmpeg.c
+===================================================================
+--- libmpcodecs/ad_ffmpeg.c (revision 35227)
++++ libmpcodecs/ad_ffmpeg.c (revision 35228)
+@@ -57,7 +57,7 @@
+ {
+ int broken_srate = 0;
+ int samplerate = lavc_context->sample_rate;
+- int sample_format = samplefmt2affmt(lavc_context->sample_fmt);
++ int sample_format = samplefmt2affmt(av_get_packed_sample_fmt(lavc_context->sample_fmt));
+ if (!sample_format)
+ sample_format = sh_audio->sample_format;
+ if(sh_audio->wf){
+@@ -169,10 +169,10 @@
+ sh_audio->i_bps=sh_audio->wf->nAvgBytesPerSec;
+
+ switch (lavc_context->sample_fmt) {
+- case AV_SAMPLE_FMT_U8:
+- case AV_SAMPLE_FMT_S16:
+- case AV_SAMPLE_FMT_S32:
+- case AV_SAMPLE_FMT_FLT:
++ case AV_SAMPLE_FMT_U8: case AV_SAMPLE_FMT_U8P:
++ case AV_SAMPLE_FMT_S16: case AV_SAMPLE_FMT_S16P:
++ case AV_SAMPLE_FMT_S32: case AV_SAMPLE_FMT_S32P:
++ case AV_SAMPLE_FMT_FLT: case AV_SAMPLE_FMT_FLTP:
+ break;
+ default:
+ return 0;
+@@ -202,10 +202,68 @@
+ return CONTROL_UNKNOWN;
+ }
+
++static av_always_inline void copy_samples_planar(unsigned bps,
++ unsigned nb_samples,
++ unsigned nb_channels,
++ unsigned char *dst,
++ unsigned char **src)
++{
++ unsigned s, c, o = 0;
++
++ for (s = 0; s < nb_samples; s++) {
++ for (c = 0; c < nb_channels; c++) {
++ memcpy(dst, src[c] + o, bps);
++ dst += bps;
++ }
++ o += bps;
++ }
++}
++
++static int copy_samples(AVCodecContext *avc, AVFrame *frame,
++ unsigned char *buf, int max_size)
++{
++ int channels = avc->channels;
++ int sample_size = av_get_bytes_per_sample(avc->sample_fmt);
++ int size = channels * sample_size * frame->nb_samples;
++
++ if (size > max_size) {
++ av_log(avc, AV_LOG_ERROR,
++ "Buffer overflow while decoding a single frame\n");
++ return AVERROR(EINVAL); /* same as avcodec_decode_audio3 */
++ }
++ /* TODO reorder channels at the same time */
++ if (av_sample_fmt_is_planar(avc->sample_fmt)) {
++ switch (sample_size) {
++ case 1:
++ copy_samples_planar(1, frame->nb_samples, channels,
++ buf, frame->extended_data);
++ break;
++ case 2:
++ copy_samples_planar(2, frame->nb_samples, channels,
++ buf, frame->extended_data);
++ break;
++ case 4:
++ copy_samples_planar(4, frame->nb_samples, channels,
++ buf, frame->extended_data);
++ default:
++ copy_samples_planar(sample_size, frame->nb_samples, channels,
++ buf, frame->extended_data);
++ }
++ } else {
++ memcpy(buf, frame->data[0], size);
++ }
++ return size;
++}
++
+ static int decode_audio(sh_audio_t *sh_audio,unsigned char *buf,int minlen,int maxlen)
+ {
+ unsigned char *start=NULL;
+- int y,len=-1;
++ int y,len=-1, got_frame;
++ AVFrame *frame = avcodec_alloc_frame();
++
++ if (!frame)
++ return AVERROR(ENOMEM);
++
+ while(len<minlen){
+ AVPacket pkt;
+ int len2=maxlen;
+@@ -230,7 +288,7 @@
+ sh_audio->pts = pts;
+ sh_audio->pts_bytes = 0;
+ }
+- y=avcodec_decode_audio3(sh_audio->context,(int16_t*)buf,&len2,&pkt);
++ y=avcodec_decode_audio4(sh_audio->context, frame, &got_frame, &pkt);
+ //printf("return:%d samples_out:%d bitstream_in:%d sample_sum:%d\n", y, len2, x, len); fflush(stdout);
+ // LATM may need many packets to find mux info
+ if (y == AVERROR(EAGAIN))
+@@ -238,6 +296,11 @@
+ if(y<0){ mp_msg(MSGT_DECAUDIO,MSGL_V,"lavc_audio: error\n");break; }
+ if(!sh_audio->parser && y<x)
+ sh_audio->ds->buffer_pos+=y-x; // put back data (HACK!)
++ if (!got_frame)
++ continue;
++ len2 = copy_samples(sh_audio->context, frame, buf, maxlen);
++ if (len2 < 0)
++ return len2;
+ if(len2>0){
+ if (((AVCodecContext *)sh_audio->context)->channels >= 5) {
+ int samplesize = av_get_bytes_per_sample(((AVCodecContext *)
+@@ -258,5 +321,7 @@
+ if (setup_format(sh_audio, sh_audio->context))
+ break;
+ }
++
++ av_free(frame);
+ return len;
+ }
diff --git a/media-video/mplayer/files/mplayer-1.1.1-avcodecidsubrip.patch b/media-video/mplayer/files/mplayer-1.1.1-avcodecidsubrip.patch
new file mode 100644
index 000000000000..2e357db34785
--- /dev/null
+++ b/media-video/mplayer/files/mplayer-1.1.1-avcodecidsubrip.patch
@@ -0,0 +1,17 @@
+Index: MPlayer-1.1.1/libmpdemux/demux_lavf.c
+===================================================================
+--- MPlayer-1.1.1.orig/libmpdemux/demux_lavf.c
++++ MPlayer-1.1.1/libmpdemux/demux_lavf.c
+@@ -423,7 +423,11 @@ static void handle_stream(demuxer_t *dem
+ case AVMEDIA_TYPE_SUBTITLE:{
+ sh_sub_t* sh_sub;
+ char type;
+- if(codec->codec_id == AV_CODEC_ID_TEXT)
++ if(codec->codec_id == AV_CODEC_ID_TEXT
++#if LIBAVUTIL_VERSION_MICRO >= 100
++ || codec->codec_id == AV_CODEC_ID_SUBRIP
++#endif
++ )
+ type = 't';
+ else if(codec->codec_id == AV_CODEC_ID_MOV_TEXT)
+ type = 'm';
diff --git a/media-video/mplayer/files/mplayer-1.1.1-codecidsubrip.patch b/media-video/mplayer/files/mplayer-1.1.1-codecidsubrip.patch
new file mode 100644
index 000000000000..27bd9db7943c
--- /dev/null
+++ b/media-video/mplayer/files/mplayer-1.1.1-codecidsubrip.patch
@@ -0,0 +1,17 @@
+Index: MPlayer-1.1.1/libmpdemux/demux_lavf.c
+===================================================================
+--- MPlayer-1.1.1.orig/libmpdemux/demux_lavf.c
++++ MPlayer-1.1.1/libmpdemux/demux_lavf.c
+@@ -423,7 +423,11 @@ static void handle_stream(demuxer_t *dem
+ case AVMEDIA_TYPE_SUBTITLE:{
+ sh_sub_t* sh_sub;
+ char type;
+- if(codec->codec_id == CODEC_ID_TEXT)
++ if(codec->codec_id == CODEC_ID_TEXT
++#if LIBAVUTIL_VERSION_MICRO >= 100
++ || codec->codec_id == AV_CODEC_ID_SUBRIP
++#endif
++ )
+ type = 't';
+ else if(codec->codec_id == CODEC_ID_MOV_TEXT)
+ type = 'm';
diff --git a/media-video/mplayer/files/mplayer-1.2_pre20130729-compat.patch b/media-video/mplayer/files/mplayer-1.2_pre20130729-compat.patch
new file mode 100644
index 000000000000..c26b6d20b51c
--- /dev/null
+++ b/media-video/mplayer/files/mplayer-1.2_pre20130729-compat.patch
@@ -0,0 +1,62 @@
+Allow it to build against FFmpeg 1.2.1 and libav 9.8
+
+Index: mplayer-1.2_pre20130729/fmt-conversion.c
+===================================================================
+--- mplayer-1.2_pre20130729.orig/fmt-conversion.c
++++ mplayer-1.2_pre20130729/fmt-conversion.c
+@@ -64,8 +64,10 @@ static const struct {
+ { IMGFMT_RGB64LE, AV_PIX_FMT_RGBA64LE },
+ { IMGFMT_RGB64BE, AV_PIX_FMT_RGBA64BE },
+ #endif /* LIBAVUTIL_VERSION_MICRO >= 100 */
++#if ( LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(52,10,0) ) && ( LIBAVUTIL_VERSION_MICRO < 100 || LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(52,25,100) )
+ { IMGFMT_XYZ12LE, AV_PIX_FMT_XYZ12LE },
+ { IMGFMT_XYZ12BE, AV_PIX_FMT_XYZ12BE },
++#endif
+ { IMGFMT_422A, AV_PIX_FMT_YUVA422P },
+ { IMGFMT_444A, AV_PIX_FMT_YUVA444P },
+ { IMGFMT_GBR24P, AV_PIX_FMT_GBRP },
+Index: mplayer-1.2_pre20130729/libmpdemux/demux_lavf.c
+===================================================================
+--- mplayer-1.2_pre20130729.orig/libmpdemux/demux_lavf.c
++++ mplayer-1.2_pre20130729/libmpdemux/demux_lavf.c
+@@ -443,7 +443,9 @@ static void handle_stream(demuxer_t *dem
+ type = 'm';
+ else if (codec->codec_id == AV_CODEC_ID_SSA
+ #if LIBAVUTIL_VERSION_MICRO >= 100
++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,3,100)
+ || codec->codec_id == AV_CODEC_ID_ASS
++#endif
+ #endif /* LIBAVUTIL_VERSION_MICRO >= 100 */
+ )
+ type = 'a';
+Index: mplayer-1.2_pre20130729/libmpdemux/mp_taglists.c
+===================================================================
+--- mplayer-1.2_pre20130729.orig/libmpdemux/mp_taglists.c
++++ mplayer-1.2_pre20130729/libmpdemux/mp_taglists.c
+@@ -31,8 +31,10 @@ static const struct AVCodecTag mp_wav_ta
+ { AV_CODEC_ID_ADPCM_ADX, MKTAG('S', 'a', 'd', 'x') },
+ #if LIBAVUTIL_VERSION_MICRO >= 100
+ { AV_CODEC_ID_ADPCM_AFC, MKTAG('A', 'F', 'C', ' ') },
++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,8,100)
+ { AV_CODEC_ID_ADPCM_DTK, MKTAG('D', 'T', 'K', ' ') },
+ #endif
++#endif
+ { AV_CODEC_ID_ADPCM_IMA_APC, MKTAG('A', 'P', 'C', 'A') },
+ { AV_CODEC_ID_ADPCM_EA, MKTAG('A', 'D', 'E', 'A') },
+ { AV_CODEC_ID_ADPCM_EA_R1, MKTAG('E', 'A', 'R', '1') },
+Index: mplayer-1.2_pre20130729/libmpcodecs/ve_lavc.c
+===================================================================
+--- mplayer-1.2_pre20130729.orig/libmpcodecs/ve_lavc.c
++++ mplayer-1.2_pre20130729/libmpcodecs/ve_lavc.c
+@@ -579,7 +579,11 @@ static int config(struct vf_instance *vf
+ lavc_venc_context->level = lavc_param_level;
+
+ if(lavc_param_avopt){
++#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(52,7,0)
+ if(av_dict_parse_string(&opts, lavc_param_avopt, "=", ",", 0) < 0){
++#else
++ if(parse_avopts(lavc_venc_context, lavc_param_avopt) < 0){
++#endif
+ mp_msg(MSGT_MENCODER,MSGL_ERR, "Your options /%s/ look like gibberish to me pal\n", lavc_param_avopt);
+ return 0;
+ }
diff --git a/media-video/mplayer/files/mplayer-1.2_pre20150214-pulseaudio-6.0.patch b/media-video/mplayer/files/mplayer-1.2_pre20150214-pulseaudio-6.0.patch
new file mode 100644
index 000000000000..578d6fa52277
--- /dev/null
+++ b/media-video/mplayer/files/mplayer-1.2_pre20150214-pulseaudio-6.0.patch
@@ -0,0 +1,33 @@
+diff -Naur mplayer-1.2_pre20150214/libao2/ao_pulse.c mplayer-1.2_pre20150214_2/libao2/ao_pulse.c
+--- mplayer-1.2_pre20150214/libao2/ao_pulse.c 2015-02-15 06:30:21.000000000 +1000
++++ mplayer-1.2_pre20150214_2/libao2/ao_pulse.c 2015-05-17 14:07:07.615640169 +1000
+@@ -53,6 +53,8 @@
+
+ static int broken_pause;
+
++static size_t bytes_per_sample;
++
+ LIBAO_EXTERN(pulse)
+
+ #define GENERIC_ERR_MSG(ctx, str) \
+@@ -201,6 +203,8 @@
+ }
+
+ pa_channel_map_init_auto(&map, ss.channels, PA_CHANNEL_MAP_ALSA);
++ bytes_per_sample = af_fmt2bits(ao_data.format) / 8;
++ bytes_per_sample *= ao_data.channels;
+ ao_data.bps = pa_bytes_per_second(&ss);
+
+ if (!(mainloop = pa_threaded_mainloop_new())) {
+@@ -297,6 +301,11 @@
+
+ /** Play the specified data to the pulseaudio server */
+ static int play(void* data, int len, int flags) {
++ //Align length to frame size
++ len=len - (len % bytes_per_sample);
++ if (len==0) {
++ return 0;
++ }
+ pa_threaded_mainloop_lock(mainloop);
+ if (pa_stream_write(stream, data, len, NULL, 0, PA_SEEK_RELATIVE) < 0) {
+ GENERIC_ERR_MSG(context, "pa_stream_write() failed");
diff --git a/media-video/mplayer/files/prepare_mplayer.sh b/media-video/mplayer/files/prepare_mplayer.sh
new file mode 100644
index 000000000000..57d47425689f
--- /dev/null
+++ b/media-video/mplayer/files/prepare_mplayer.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+VERSION=$(date +%Y%m%d)
+PACKAGE="mplayer-1.2_pre${VERSION}"
+DUMP_FFMPEG="$(dirname $0)/dump_ffmpeg.sh"
+
+svn checkout svn://svn.mplayerhq.hu/mplayer/trunk ${PACKAGE}
+
+pushd ${PACKAGE} > /dev/null
+ # ffmpeg is in git now so no svn external anymore
+ rm -rf ffmpeg
+ git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg/
+ sh "$DUMP_FFMPEG"
+ STORE_VERSION=$(LC_ALL=C svn info 2> /dev/null | grep Revision | cut -d' ' -f2)
+ printf "$STORE_VERSION" > snapshot_version
+popd > /dev/null
+
+find "${PACKAGE}" -type d -name '.svn' -prune -print0 | xargs -0 rm -rf
+find "${PACKAGE}" -type d -name '.git' -prune -print0 | xargs -0 rm -rf
+
+tar cJf ${PACKAGE}.tar.xz ${PACKAGE}
+rm -rf ${PACKAGE}/
+
+echo "Tarball: \"${PACKAGE}.tar.xz\""
+
+echo "** all done **"
diff --git a/media-video/mplayer/metadata.xml b/media-video/mplayer/metadata.xml
new file mode 100644
index 000000000000..0e3701050a08
--- /dev/null
+++ b/media-video/mplayer/metadata.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="bl">Blinkenlights video output</flag>
+ <flag name="bluray">Enable playback of Blu-ray filesystems</flag>
+ <flag name="bs2b">Enable Bauer stereophonic-to-binaural headphone filter</flag>
+ <flag name="cdio">Use libcdio for CD support (instead of cdparanoia)</flag>
+ <flag name="cpudetection">Enables runtime CPU detection (useful for binpkgs, compatibility on other CPUs)</flag>
+ <flag name="dvdnav">Use forked libdvdnav, navigate menus in GUIs</flag>
+ <flag name="enca">Enables support for charset discovery and conversion</flag>
+ <flag name="faac">Use external faac library for AAC encoding</flag>
+ <flag name="faad">Use external faad library for AAC decoding</flag>
+ <flag name="libmpeg2">Build support for mpeg2 over media-libs/libmpeg2 rather than using ffmpeg.</flag>
+ <flag name="live">Enables live.com streaming media support</flag>
+ <flag name="md5sum">Enables md5sum video output</flag>
+ <flag name="mng">MNG input support</flag>
+ <flag name="network">Enables network streaming support</flag>
+ <flag name="nut">Enables support for the NUT container format</flag>
+ <flag name="osdmenu">Enables support for on-screen display (OSD) menus</flag>
+ <flag name="pnm">Add PNM video output option, to create PPM/PGM/PGMYUV images</flag>
+ <flag name="pvr">Enable Video4Linux2 MPEG PVR</flag>
+ <flag name="radio">Enable V4L2 radio interface and support</flag>
+ <flag name="rar">Enable Unique RAR File Library</flag>
+ <flag name="rtc">Enables usage of the linux real time clock. The alternative is software emulation of rtc</flag>
+ <flag name="rtmp">Enables RTMPDump Streaming Media support</flag>
+ <flag name="shm">Enable support for shm</flag>
+ <flag name="tga">Enables Targa video output</flag>
+ <flag name="toolame">Enable toolame MPEG-2 encoding</flag>
+ <flag name="tremor">Enable internal support for Vorbis</flag>
+ <flag name="twolame">Enable twolame MPEG-2 encoding</flag>
+ <flag name="vidix">Support for vidix video output</flag>
+ <flag name="xanim">Enables support for xanim based codecs</flag>
+ <flag name="xvmc">Enables X-Video Motion Compensation support</flag>
+ <flag name="zoran">Enables ZR360[56]7/ZR36060 video output</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-video/mplayer/mplayer-1.1.1-r1.ebuild b/media-video/mplayer/mplayer-1.1.1-r1.ebuild
new file mode 100644
index 000000000000..777777b7b829
--- /dev/null
+++ b/media-video/mplayer/mplayer-1.1.1-r1.ebuild
@@ -0,0 +1,658 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+EGIT_REPO_URI="git://git.videolan.org/ffmpeg.git"
+ESVN_REPO_URI="svn://svn.mplayerhq.hu/mplayer/trunk"
+[[ ${PV} = *9999* ]] && SVN_ECLASS="subversion git-2" || SVN_ECLASS=""
+
+inherit toolchain-funcs eutils flag-o-matic multilib base ${SVN_ECLASS}
+
+IUSE="cpu_flags_x86_3dnow cpu_flags_x86_3dnowext +a52 aalib +alsa altivec aqua bidi bl bluray
+bs2b cddb +cdio cdparanoia cpudetection debug dga
+directfb doc +dts +dv dvb +dvd +dvdnav +enca +encode faac +faad fbcon
+ftp gif ggi gsm +iconv ipv6 jack joystick jpeg jpeg2k kernel_linux ladspa
++libass libcaca libmpeg2 lirc +live lzo mad md5sum +cpu_flags_x86_mmx cpu_flags_x86_mmxext mng +mp3 nas
++network nut openal +opengl +osdmenu oss png pnm pulseaudio pvr +quicktime
+radio +rar +rtc rtmp samba selinux +shm sdl +speex cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_ssse3
+tga +theora +tremor +truetype +toolame +twolame +unicode v4l vdpau vidix
++vorbis +X +x264 xanim xinerama +xscreensaver +xv +xvid xvmc zoran"
+
+VIDEO_CARDS="s3virge mga tdfx"
+for x in ${VIDEO_CARDS}; do
+ IUSE+=" video_cards_${x}"
+done
+
+FONT_URI="
+ mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2
+ mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2
+ mirror://mplayer/releases/fonts/font-arial-cp1250.tar.bz2
+"
+if [[ ${PV} == *9999* ]]; then
+ RELEASE_URI=""
+elif [ "${PV%_rc*}" = "${PV}" ]; then
+ MY_P="MPlayer-${PV}"
+ S="${WORKDIR}/${MY_P}"
+ RELEASE_URI="mirror://mplayer/releases/${MY_P}.tar.xz"
+else
+ RELEASE_URI="mirror://gentoo/${P}.tar.xz"
+fi
+SRC_URI="${RELEASE_URI}
+ !truetype? ( ${FONT_URI} )"
+
+DESCRIPTION="Media Player for Linux"
+HOMEPAGE="http://www.mplayerhq.hu/"
+
+FONT_RDEPS="
+ virtual/ttf-fonts
+ media-libs/fontconfig
+ >=media-libs/freetype-2.2.1:2
+"
+X_RDEPS="
+ x11-libs/libXext
+ x11-libs/libXxf86vm
+"
+# Rar: althrought -gpl version is nice, it cant do most functions normal rars can
+# nemesi? ( net-libs/libnemesi )
+RDEPEND+="
+ sys-libs/ncurses
+ app-arch/bzip2
+ sys-libs/zlib
+ >=virtual/ffmpeg-0.10.3
+ a52? ( media-libs/a52dec )
+ aalib? ( media-libs/aalib )
+ alsa? ( media-libs/alsa-lib )
+ bidi? ( dev-libs/fribidi )
+ bluray? ( >=media-libs/libbluray-0.2.1 )
+ bs2b? ( media-libs/libbs2b )
+ cdio? ( || ( dev-libs/libcdio-paranoia <dev-libs/libcdio-0.90[-minimal] ) )
+ cdparanoia? ( !cdio? ( media-sound/cdparanoia ) )
+ dga? ( x11-libs/libXxf86dga )
+ directfb? ( dev-libs/DirectFB )
+ dts? ( media-libs/libdca )
+ dv? ( media-libs/libdv )
+ dvb? ( virtual/linuxtv-dvb-headers )
+ dvd? ( >=media-libs/libdvdread-4.1.3 )
+ dvdnav? ( >=media-libs/libdvdnav-4.1.3 )
+ encode? (
+ !twolame? ( toolame? ( media-sound/toolame ) )
+ twolame? ( media-sound/twolame )
+ faac? ( media-libs/faac )
+ mp3? ( media-sound/lame )
+ x264? ( >=media-libs/x264-0.0.20100423 )
+ xvid? ( media-libs/xvid )
+ )
+ enca? ( app-i18n/enca )
+ faad? ( media-libs/faad2 )
+ ggi? ( media-libs/libggi media-libs/libggiwmh )
+ gif? ( media-libs/giflib )
+ gsm? ( media-sound/gsm )
+ iconv? ( virtual/libiconv )
+ jack? ( media-sound/jack-audio-connection-kit )
+ jpeg? ( virtual/jpeg:0 )
+ jpeg2k? ( media-libs/openjpeg:0 )
+ ladspa? ( media-libs/ladspa-sdk )
+ libass? ( >=media-libs/libass-0.9.10[enca?] )
+ libcaca? ( media-libs/libcaca )
+ libmpeg2? ( media-libs/libmpeg2 )
+ lirc? ( app-misc/lirc )
+ live? ( media-plugins/live )
+ lzo? ( >=dev-libs/lzo-2 )
+ mad? ( media-libs/libmad )
+ mng? ( media-libs/libmng )
+ mp3? ( media-sound/mpg123 )
+ nas? ( media-libs/nas )
+ nut? ( >=media-libs/libnut-661 )
+ openal? ( media-libs/openal )
+ opengl? ( virtual/opengl )
+ png? ( media-libs/libpng )
+ pnm? ( media-libs/netpbm )
+ pulseaudio? ( media-sound/pulseaudio )
+ rar? (
+ || (
+ app-arch/unrar
+ app-arch/rar
+ )
+ )
+ rtmp? ( media-video/rtmpdump )
+ samba? ( net-fs/samba )
+ selinux? ( sec-policy/selinux-mplayer )
+ sdl? ( media-libs/libsdl )
+ speex? ( media-libs/speex )
+ theora? ( media-libs/libtheora[encode?] )
+ truetype? ( ${FONT_RDEPS} )
+ vdpau? ( x11-libs/libvdpau )
+ vorbis? ( media-libs/libvorbis )
+ X? ( ${X_RDEPS} )
+ xanim? ( media-video/xanim )
+ xinerama? ( x11-libs/libXinerama )
+ xscreensaver? ( x11-libs/libXScrnSaver )
+ xv? ( x11-libs/libXv )
+ xvmc? ( x11-libs/libXvMC )
+"
+
+X_DEPS="
+ x11-proto/videoproto
+ x11-proto/xf86vidmodeproto
+"
+ASM_DEP="dev-lang/yasm"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ dga? ( x11-proto/xf86dgaproto )
+ X? ( ${X_DEPS} )
+ xinerama? ( x11-proto/xineramaproto )
+ xscreensaver? ( x11-proto/scrnsaverproto )
+ amd64? ( ${ASM_DEP} )
+ doc? (
+ dev-libs/libxslt app-text/docbook-xml-dtd
+ app-text/docbook-xsl-stylesheets
+ )
+ x86? ( ${ASM_DEP} )
+ x86-fbsd? ( ${ASM_DEP} )
+"
+
+SLOT="0"
+LICENSE="GPL-2"
+if [[ ${PV} != *9999* ]]; then
+ KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+else
+ KEYWORDS=""
+fi
+
+# faac codecs are nonfree, win32codecs are nonfree
+# libcdio support: prefer libcdio over cdparanoia and don't check for cddb w/cdio
+# dvd navigation requires dvd read support
+# ass and freetype font require iconv and ass requires freetype fonts
+# unicode transformations are usefull only with iconv
+# libvorbis require external tremor to work
+# radio requires oss or alsa backend
+# xvmc requires xvideo support
+REQUIRED_USE="
+ dvdnav? ( dvd )
+ libass? ( truetype )
+ truetype? ( iconv )
+ ggi? ( X )
+ xinerama? ( X )
+ dga? ( X )
+ opengl? ( || ( X aqua ) )
+ osdmenu? ( || ( X aqua ) )
+ vdpau? ( X )
+ vidix? ( X )
+ xscreensaver? ( X )
+ xv? ( X )
+ xvmc? ( xv )"
+RESTRICT="faac? ( bindist )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.0_rc4-pkg-config.patch"
+ "${FILESDIR}/${PN}-1.1-ffmpeg.patch"
+ "${FILESDIR}/${PN}-1.1-libav-0.8.patch"
+ "${FILESDIR}/${PN}-1.1-codecid.patch"
+)
+
+pkg_setup() {
+ if [[ ${PV} == *9999* ]]; then
+ elog
+ elog "This is a live ebuild which installs the latest from upstream's"
+ elog "subversion repository, and is unsupported by Gentoo."
+ elog "Everything but bugs in the ebuild itself will be ignored."
+ elog
+ fi
+
+ if use cpudetection; then
+ ewarn
+ ewarn "You've enabled the cpudetection flag. This feature is"
+ ewarn "included mainly for people who want to use the same"
+ ewarn "binary on another system with a different CPU architecture."
+ ewarn "MPlayer will already detect your CPU settings by default at"
+ ewarn "buildtime; this flag is used for runtime detection."
+ ewarn "You won't need this turned on if you are only building"
+ ewarn "mplayer for this system. Also, if your compile fails, try"
+ ewarn "disabling this use flag."
+ fi
+}
+
+src_unpack() {
+ if [[ ${PV} = *9999* ]]; then
+ subversion_src_unpack
+ cd "${WORKDIR}"
+ rm -rf "${WORKDIR}/${P}/ffmpeg/"
+ ( S="${WORKDIR}/${P}/ffmpeg/" git-2_src_unpack )
+ else
+ unpack ${A}
+ fi
+
+ if [[ ${PV} = *9999* ]] || [[ "${PV%_rc*}" = "${PV}" ]]; then
+ cd "${S}"
+ cp "${FILESDIR}/dump_ffmpeg.sh" . || die
+ chmod +x dump_ffmpeg.sh
+ ./dump_ffmpeg.sh || die
+ fi
+
+ if ! use truetype; then
+ unpack font-arial-iso-8859-1.tar.bz2 \
+ font-arial-iso-8859-2.tar.bz2 \
+ font-arial-cp1250.tar.bz2
+ fi
+}
+
+src_prepare() {
+ local svf=snapshot_version
+ if [[ ${PV} = *9999* ]]; then
+ # Set SVN version manually
+ subversion_wc_info
+ printf "${ESVN_WC_REVISION}" > $svf
+ fi
+ if [ ! -f VERSION ] ; then
+ [ -f "$svf" ] || die "Missing ${svf}. Did you generate your snapshot with prepare_mplayer.sh?"
+ local sv=$(<$svf)
+ printf "SVN-r${sv} (Gentoo)" > VERSION
+ fi
+
+ # fix path to bash executable in configure scripts
+ sed -i -e "1c\#!${EPREFIX}/bin/bash" configure version.sh || die
+
+ if has_version dev-libs/libcdio-paranoia; then
+ sed -i \
+ -e 's:cdio/cdda.h:cdio/paranoia/cdda.h:' \
+ -e 's:cdio/paranoia.h:cdio/paranoia/paranoia.h:' \
+ configure stream/stream_cdda.c || die
+ fi
+
+ base_src_prepare
+ if has_version '>=media-video/libav-9_rc' || has_version '>=media-video/ffmpeg-1.1' ; then
+ epatch "${FILESDIR}/${PN}-1.1-libav-9.patch" \
+ "${FILESDIR}/${PN}-1.1-planaraudio.patch" \
+ "${FILESDIR}/${PN}-1.1-missingbreak.patch" \
+ "${FILESDIR}/${PN}-1.1.1-avcodecidsubrip.patch"
+ elif has_version '>=media-video/ffmpeg-1' ; then
+ epatch "${FILESDIR}/${PN}-1.1.1-codecidsubrip.patch"
+ fi
+
+ # Use sane default for >=virtual/udev-197
+ sed -i -e '/default_dvd_device/s:/dev/dvd:/dev/cdrom:' configure || die
+}
+
+src_configure() {
+ local myconf=""
+ local uses i
+
+ # set LINGUAS
+ [[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/da/dk}"
+
+ # mplayer ebuild uses "use foo || --disable-foo" to forcibly disable
+ # compilation in almost every situation. The reason for this is
+ # because if --enable is used, it will force the build of that option,
+ # regardless of whether the dependency is available or not.
+
+ ###################
+ #Optional features#
+ ###################
+ # disable svga since we don't want it
+ # disable arts since we don't have kde3
+ # always disable internal ass
+ myconf+="
+ --disable-svga --disable-svgalib_helper
+ --disable-ass-internal
+ --disable-arts
+ --disable-kai
+ $(use_enable network networking)
+ $(use_enable joystick)
+ "
+ uses="bl bluray enca ftp rtc" # nemesi <- not working with in-tree ebuild
+ myconf+=" --disable-nemesi" # nemesi automagic disable
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ use bidi || myconf+=" --disable-fribidi"
+ use ipv6 || myconf+=" --disable-inet6"
+ use libass || myconf+=" --disable-ass"
+ use nut || myconf+=" --disable-libnut"
+ use rar || myconf+=" --disable-unrarexec"
+ use samba || myconf+=" --disable-smb"
+ use lirc || myconf+=" --disable-lirc --disable-lircc --disable-apple-ir"
+
+ # libcdio support: prefer libcdio over cdparanoia
+ # don't check for cddb w/cdio
+ if use cdio; then
+ myconf+=" --disable-cdparanoia"
+ else
+ myconf+=" --disable-libcdio"
+ use cdparanoia || myconf+=" --disable-cdparanoia"
+ use cddb || myconf+=" --disable-cddb"
+ fi
+
+ ################################
+ # DVD read, navigation support #
+ ################################
+ #
+ # dvdread - accessing a DVD
+ # dvdnav - navigation of menus
+ #
+ # use external libdvdcss, dvdread and dvdnav
+ myconf+=" --disable-dvdread-internal --disable-libdvdcss-internal"
+ use dvd || myconf+=" --disable-dvdread"
+ use dvdnav || myconf+=" --disable-dvdnav"
+
+ #############
+ # Subtitles #
+ #############
+ #
+ # SRT/ASS/SSA (subtitles) requires freetype support
+ # freetype support requires iconv
+ # iconv optionally can use unicode
+ use truetype || myconf+=" --disable-freetype"
+ use iconv || myconf+=" --disable-iconv --charset=noconv"
+ use iconv && use unicode && myconf+=" --charset=UTF-8"
+
+ #####################################
+ # DVB / Video4Linux / Radio support #
+ #####################################
+ myconf+=" --disable-tv-bsdbt848"
+ # broken upstream, won't work with recent kernels
+ myconf+=" --disable-ivtv"
+ # gone since linux-headers-2.6.38
+ myconf+=" --disable-tv-v4l1"
+ if { use dvb || use v4l || use pvr || use radio; }; then
+ use dvb || myconf+=" --disable-dvb"
+ use pvr || myconf+=" --disable-pvr"
+ use v4l || myconf+=" --disable-tv-v4l2"
+ if use radio && { use dvb || use v4l; }; then
+ myconf+="
+ --enable-radio
+ $(use_enable encode radio-capture)
+ "
+ else
+ myconf+="
+ --disable-radio-v4l2
+ --disable-radio-bsdbt848
+ "
+ fi
+ else
+ myconf+="
+ --disable-tv
+ --disable-tv-v4l2
+ --disable-radio
+ --disable-radio-v4l2
+ --disable-radio-bsdbt848
+ --disable-dvb
+ --disable-v4l2
+ --disable-pvr"
+ fi
+
+ ##########
+ # Codecs #
+ ##########
+ myconf+=" --disable-musepack" # Use internal musepack codecs for SV7 and SV8 support
+ myconf+=" --disable-libmpeg2-internal" # always use system media-libs/libmpeg2
+ use dts || myconf+=" --disable-libdca"
+ # Disable internal mp3lib, bug #384849
+ # Samuli Suominen: Looks like MPlayer in Portage is using internal mp3lib by
+ # default, where as mpg123 upstream has incorporated all the optimizations
+ # from mplayer's mp3lib in libmpg123 and more.
+ # It makes very little sense to use the internal copy as default anymore.
+ myconf+=" --disable-mp3lib"
+ if ! use mp3; then
+ myconf+="
+ --disable-mp3lame
+ --disable-mpg123
+ "
+ fi
+ uses="a52 bs2b dv gsm lzo rtmp"
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-lib${i}"
+ done
+
+ uses="faad gif jpeg libmpeg2 live mad mng png pnm speex tga theora xanim"
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ use jpeg2k || myconf+=" --disable-libopenjpeg"
+ if use vorbis || use tremor; then
+ use tremor || myconf+=" --disable-tremor-internal"
+ use vorbis || myconf+=" --disable-libvorbis"
+ else
+ myconf+="
+ --disable-tremor-internal
+ --disable-tremor
+ --disable-libvorbis
+ "
+ fi
+ # Encoding
+ uses="faac x264 xvid toolame twolame"
+ if use encode; then
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ else
+ myconf+=" --disable-mencoder"
+ for i in ${uses}; do
+ myconf+=" --disable-${i}"
+ use ${i} && elog "Useflag \"${i}\" will only be useful for encoding, i.e., with \"encode\" useflag enabled."
+ done
+ fi
+
+ #################
+ # Binary codecs #
+ #################
+ # bug 213836
+ use quicktime || myconf+=" --disable-qtx"
+ myconf+=" --disable-real --disable-win32dll"
+
+ ################
+ # Video Output #
+ ################
+ uses="directfb md5sum sdl"
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ use aalib || myconf+=" --disable-aa"
+ use fbcon || myconf+=" --disable-fbdev"
+ use fbcon && use video_cards_s3virge && myconf+=" --enable-s3fb"
+ use libcaca || myconf+=" --disable-caca"
+ use zoran || myconf+=" --disable-zr"
+
+ if ! use kernel_linux || ! use video_cards_mga; then
+ myconf+=" --disable-mga --disable-xmga"
+ fi
+
+ if use video_cards_tdfx; then
+ myconf+="
+ $(use_enable video_cards_tdfx tdfxvid)
+ $(use_enable fbcon tdfxfb)
+ "
+ else
+ myconf+="
+ --disable-3dfx
+ --disable-tdfxvid
+ --disable-tdfxfb
+ "
+ fi
+
+ # sun card, disable by default, see bug #258729
+ myconf+=" --disable-xvr100"
+
+ ################
+ # Audio Output #
+ ################
+ myconf+=" --disable-esd"
+ uses="alsa jack ladspa nas openal"
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ use pulseaudio || myconf+=" --disable-pulse"
+ if ! use radio; then
+ use oss || myconf+=" --disable-ossaudio"
+ fi
+
+ ####################
+ # Advanced Options #
+ ####################
+ # Platform specific flags, hardcoded on amd64 (see below)
+ use cpudetection && myconf+=" --enable-runtime-cpudetection"
+
+ uses="3dnow 3dnowext mmx mmxext sse sse2 ssse3"
+ for i in ${uses}; do
+ myconf+=" $(use_enable cpu_flags_x86_${i} ${i})"
+ done
+
+ uses="altivec shm"
+ for i in ${uses}; do
+ myconf+=" $(use_enable ${i})"
+ done
+
+ use debug && myconf+=" --enable-debug=3"
+
+ if use x86 && gcc-specs-pie; then
+ filter-flags -fPIC -fPIE
+ append-ldflags -nopie
+ fi
+
+ ###########################
+ # X enabled configuration #
+ ###########################
+ myconf+=" --disable-gui"
+ myconf+=" --disable-vesa"
+ uses="ggi vdpau xinerama xv"
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ use dga || myconf+=" --disable-dga1 --disable-dga2"
+ use opengl || myconf+=" --disable-gl"
+ use osdmenu && myconf+=" --enable-menu"
+ use vidix || myconf+=" --disable-vidix --disable-vidix-pcidb"
+ use xscreensaver || myconf+=" --disable-xss"
+ use X || myconf+=" --disable-x11"
+ if use xvmc; then
+ myconf+=" --enable-xvmc --with-xvmclib=XvMCW"
+ else
+ myconf+=" --disable-xvmc"
+ fi
+
+ ############################
+ # OSX (aqua) configuration #
+ ############################
+ if use aqua; then
+ myconf+="
+ --enable-macosx-finder
+ --enable-macosx-bundle
+ "
+ fi
+
+ tc-export PKG_CONFIG
+ ./configure \
+ --cc="$(tc-getCC)" \
+ --host-cc="$(tc-getBUILD_CC)" \
+ --prefix="${EPREFIX}/usr" \
+ --bindir="${EPREFIX}/usr/bin" \
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \
+ --confdir="${EPREFIX}/etc/mplayer" \
+ --datadir="${EPREFIX}/usr/share/mplayer${namesuf}" \
+ --mandir="${EPREFIX}/usr/share/man" \
+ --disable-ffmpeg_a \
+ ${myconf} || die
+}
+
+src_compile() {
+ base_src_compile
+ # Build only user-requested docs if they're available.
+ if use doc ; then
+ # select available languages from $LINGUAS
+ LINGUAS=${LINGUAS/zh/zh_CN}
+ local ALLOWED_LINGUAS="cs de en es fr hu it pl ru zh_CN"
+ local BUILT_DOCS=""
+ for i in ${LINGUAS} ; do
+ has ${i} ${ALLOWED_LINGUAS} && BUILT_DOCS+=" ${i}"
+ done
+ if [[ -z $BUILT_DOCS ]]; then
+ emake -j1 html-chunked
+ else
+ for i in ${BUILT_DOCS}; do
+ emake -j1 html-chunked-${i}
+ done
+ fi
+ fi
+}
+
+src_install() {
+ local i
+
+ emake \
+ DESTDIR="${D}" \
+ INSTALLSTRIP="" \
+ install
+
+ dodoc AUTHORS Changelog Copyright README etc/codecs.conf
+
+ docinto tech/
+ dodoc DOCS/tech/{*.txt,MAINTAINERS,mpsub.sub,playtree,TODO,wishlist}
+ docinto TOOLS/
+ dodoc -r TOOLS
+ docinto tech/mirrors/
+ dodoc DOCS/tech/mirrors/*
+
+ if use doc; then
+ docinto html/
+ dohtml -r "${S}"/DOCS/HTML/*
+ fi
+
+ if ! use truetype; then
+ dodir /usr/share/mplayer/fonts
+ # Do this generic, as the mplayer people like to change the structure
+ # of their zips ...
+ for i in $(find "${WORKDIR}/" -type d -name 'font-arial-*'); do
+ cp -pPR "${i}" "${ED}/usr/share/mplayer/fonts"
+ done
+ # Fix the font symlink ...
+ rm -rf "${ED}/usr/share/mplayer/font"
+ dosym fonts/font-arial-14-iso-8859-1 /usr/share/mplayer/font
+ fi
+
+ insinto /etc/mplayer
+ newins "${S}/etc/example.conf" mplayer.conf
+ cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
+# Config options can be section specific, global
+# options should go in the default section
+[default]
+_EOF_
+ doins "${S}/etc/input.conf"
+ if use osdmenu; then
+ doins "${S}/etc/menu.conf"
+ fi
+
+ if use truetype; then
+ cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
+fontconfig=1
+subfont-osd-scale=4
+subfont-text-scale=3
+_EOF_
+ fi
+
+ # bug 256203
+ if use rar; then
+ cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
+unrarexec=${EPREFIX}/usr/bin/unrar
+_EOF_
+ fi
+
+ dosym ../../../etc/mplayer/mplayer.conf /usr/share/mplayer/mplayer.conf
+ newbin "${S}/TOOLS/midentify.sh" midentify
+}
+
+pkg_preinst() {
+ [[ -d ${EROOT}/usr/share/mplayer/Skin/default ]] && \
+ rm -rf "${EROOT}/usr/share/mplayer/Skin/default"
+}
+
+pkg_postrm() {
+ # Cleanup stale symlinks
+ [ -L "${EROOT}/usr/share/mplayer/font" -a \
+ ! -e "${EROOT}/usr/share/mplayer/font" ] && \
+ rm -f "${EROOT}/usr/share/mplayer/font"
+
+ [ -L "${EROOT}/usr/share/mplayer/subfont.ttf" -a \
+ ! -e "${EROOT}/usr/share/mplayer/subfont.ttf" ] && \
+ rm -f "${EROOT}/usr/share/mplayer/subfont.ttf"
+}
diff --git a/media-video/mplayer/mplayer-1.2_pre20130729.ebuild b/media-video/mplayer/mplayer-1.2_pre20130729.ebuild
new file mode 100644
index 000000000000..b3503efbf2aa
--- /dev/null
+++ b/media-video/mplayer/mplayer-1.2_pre20130729.ebuild
@@ -0,0 +1,633 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI="git://git.videolan.org/ffmpeg.git"
+ESVN_REPO_URI="svn://svn.mplayerhq.hu/mplayer/trunk"
+[[ ${PV} = *9999* ]] && SVN_ECLASS="subversion git-2" || SVN_ECLASS=""
+
+inherit toolchain-funcs eutils flag-o-matic multilib base ${SVN_ECLASS}
+
+IUSE="cpu_flags_x86_3dnow cpu_flags_x86_3dnowext a52 aalib +alsa altivec aqua bidi bl bluray
+bs2b cddb +cdio cdparanoia cpudetection debug dga
+directfb doc dts dv dvb +dvd +dvdnav +enca +encode faac faad fbcon
+ftp gif ggi gsm +iconv ipv6 jack joystick jpeg jpeg2k kernel_linux ladspa
++libass libcaca libmpeg2 lirc live lzo mad md5sum +cpu_flags_x86_mmx cpu_flags_x86_mmxext mng mp3 nas
++network nut openal opengl +osdmenu oss png pnm pulseaudio pvr
+radio rar rtc rtmp samba selinux +shm sdl speex cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_ssse3
+tga theora tremor +truetype toolame twolame +unicode v4l vdpau vidix
+vorbis +X x264 xanim xinerama +xscreensaver +xv xvid xvmc zoran"
+
+VIDEO_CARDS="s3virge mga tdfx"
+for x in ${VIDEO_CARDS}; do
+ IUSE+=" video_cards_${x}"
+done
+
+FONT_URI="
+ mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2
+ mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2
+ mirror://mplayer/releases/fonts/font-arial-cp1250.tar.bz2
+"
+if [[ ${PV} == *9999* ]]; then
+ RELEASE_URI=""
+elif [ "${PV%_rc*}" = "${PV}" -a "${PV%_pre*}" = "${PV}" ]; then
+ MY_P="MPlayer-${PV}"
+ S="${WORKDIR}/${MY_P}"
+ RELEASE_URI="mirror://mplayer/releases/${MY_P}.tar.xz"
+else
+ RELEASE_URI="mirror://gentoo/${P}.tar.xz"
+fi
+SRC_URI="${RELEASE_URI}
+ !truetype? ( ${FONT_URI} )"
+
+DESCRIPTION="Media Player for Linux"
+HOMEPAGE="http://www.mplayerhq.hu/"
+
+FONT_RDEPS="
+ virtual/ttf-fonts
+ media-libs/fontconfig
+ >=media-libs/freetype-2.2.1:2
+"
+X_RDEPS="
+ x11-libs/libXext
+ x11-libs/libXxf86vm
+"
+# Rar: althrought -gpl version is nice, it cant do most functions normal rars can
+# nemesi? ( net-libs/libnemesi )
+RDEPEND+="
+ sys-libs/ncurses
+ app-arch/bzip2
+ sys-libs/zlib
+ || ( >=media-video/ffmpeg-1.2.1:0 >=media-video/libav-9.8 )
+ a52? ( media-libs/a52dec )
+ aalib? ( media-libs/aalib )
+ alsa? ( media-libs/alsa-lib )
+ bidi? ( dev-libs/fribidi )
+ bluray? ( >=media-libs/libbluray-0.2.1 )
+ bs2b? ( media-libs/libbs2b )
+ cdio? ( dev-libs/libcdio )
+ cdparanoia? ( !cdio? ( media-sound/cdparanoia ) )
+ dga? ( x11-libs/libXxf86dga )
+ directfb? ( dev-libs/DirectFB )
+ dts? ( media-libs/libdca )
+ dv? ( media-libs/libdv )
+ dvb? ( virtual/linuxtv-dvb-headers )
+ dvd? ( >=media-libs/libdvdread-4.1.3 )
+ dvdnav? ( >=media-libs/libdvdnav-4.1.3 )
+ encode? (
+ !twolame? ( toolame? ( media-sound/toolame ) )
+ twolame? ( media-sound/twolame )
+ faac? ( media-libs/faac )
+ mp3? ( media-sound/lame )
+ x264? ( >=media-libs/x264-0.0.20100423:= )
+ xvid? ( media-libs/xvid )
+ )
+ enca? ( app-i18n/enca )
+ faad? ( media-libs/faad2 )
+ ggi? ( media-libs/libggi media-libs/libggiwmh )
+ gif? ( media-libs/giflib )
+ gsm? ( media-sound/gsm )
+ iconv? ( virtual/libiconv )
+ jack? ( media-sound/jack-audio-connection-kit )
+ jpeg? ( virtual/jpeg:0 )
+ jpeg2k? ( media-libs/openjpeg:0 )
+ ladspa? ( media-libs/ladspa-sdk )
+ libass? ( >=media-libs/libass-0.9.10:=[enca?] )
+ libcaca? ( media-libs/libcaca )
+ libmpeg2? ( media-libs/libmpeg2 )
+ lirc? ( app-misc/lirc )
+ live? ( media-plugins/live )
+ lzo? ( >=dev-libs/lzo-2 )
+ mad? ( media-libs/libmad )
+ mng? ( media-libs/libmng:= )
+ mp3? ( media-sound/mpg123 )
+ nas? ( media-libs/nas )
+ nut? ( >=media-libs/libnut-661 )
+ openal? ( media-libs/openal )
+ opengl? ( virtual/opengl )
+ png? ( media-libs/libpng )
+ pnm? ( media-libs/netpbm )
+ pulseaudio? ( media-sound/pulseaudio )
+ rar? (
+ || (
+ app-arch/unrar
+ app-arch/rar
+ )
+ )
+ rtmp? ( media-video/rtmpdump )
+ samba? ( net-fs/samba )
+ sdl? ( media-libs/libsdl )
+ speex? ( media-libs/speex )
+ theora? ( media-libs/libtheora[encode?] )
+ tremor? ( media-libs/tremor )
+ truetype? ( ${FONT_RDEPS} )
+ vdpau? ( x11-libs/libvdpau )
+ vorbis? ( !tremor? ( media-libs/libvorbis ) )
+ X? ( ${X_RDEPS} )
+ xanim? ( media-video/xanim )
+ xinerama? ( x11-libs/libXinerama )
+ xscreensaver? ( x11-libs/libXScrnSaver )
+ xv? ( x11-libs/libXv )
+ xvmc? ( x11-libs/libXvMC )
+"
+
+X_DEPS="
+ x11-proto/videoproto
+ x11-proto/xf86vidmodeproto
+"
+ASM_DEP="dev-lang/yasm"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ dga? ( x11-proto/xf86dgaproto )
+ X? ( ${X_DEPS} )
+ xinerama? ( x11-proto/xineramaproto )
+ xscreensaver? ( x11-proto/scrnsaverproto )
+ amd64? ( ${ASM_DEP} )
+ doc? (
+ dev-libs/libxslt app-text/docbook-xml-dtd
+ app-text/docbook-xsl-stylesheets
+ )
+ x86? ( ${ASM_DEP} )
+ x86-fbsd? ( ${ASM_DEP} )
+"
+RDEPEND+="
+ selinux? ( sec-policy/selinux-mplayer )
+"
+
+SLOT="0"
+LICENSE="GPL-2"
+if [[ ${PV} != *9999* ]]; then
+ KEYWORDS="alpha amd64 arm hppa ppc ppc64 ~sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+else
+ KEYWORDS="alpha hppa ppc ppc64"
+fi
+
+# faac codecs are nonfree
+# libcdio support: prefer libcdio over cdparanoia and don't check for cddb w/cdio
+# dvd navigation requires dvd read support
+# ass and freetype font require iconv and ass requires freetype fonts
+# unicode transformations are usefull only with iconv
+# radio requires oss or alsa backend
+# xvmc requires xvideo support
+REQUIRED_USE="
+ dga? ( X )
+ dvdnav? ( dvd )
+ enca? ( iconv )
+ ggi? ( X )
+ libass? ( truetype )
+ opengl? ( X )
+ osdmenu? ( X )
+ truetype? ( iconv )
+ vdpau? ( X )
+ vidix? ( X )
+ xinerama? ( X )
+ xscreensaver? ( X )
+ xv? ( X )
+ xvmc? ( xv )"
+RESTRICT="faac? ( bindist )"
+
+PATCHES=( "${FILESDIR}/${P}-compat.patch" )
+
+pkg_setup() {
+ if [[ ${PV} == *9999* ]]; then
+ elog
+ elog "This is a live ebuild which installs the latest from upstream's"
+ elog "subversion repository, and is unsupported by Gentoo."
+ elog "Everything but bugs in the ebuild itself will be ignored."
+ elog
+ fi
+
+ if use cpudetection; then
+ ewarn
+ ewarn "You've enabled the cpudetection flag. This feature is"
+ ewarn "included mainly for people who want to use the same"
+ ewarn "binary on another system with a different CPU architecture."
+ ewarn "MPlayer will already detect your CPU settings by default at"
+ ewarn "buildtime; this flag is used for runtime detection."
+ ewarn "You won't need this turned on if you are only building"
+ ewarn "mplayer for this system. Also, if your compile fails, try"
+ ewarn "disabling this use flag."
+ fi
+
+ if has_version 'media-video/libav' ; then
+ ewarn "Please note that upstream uses media-video/ffmpeg."
+ ewarn "media-video/libav should be fine in theory but if you"
+ ewarn "experience any problem, try to move to media-video/ffmpeg."
+ fi
+}
+
+src_unpack() {
+ if [[ ${PV} = *9999* ]]; then
+ subversion_src_unpack
+ cd "${WORKDIR}"
+ rm -rf "${WORKDIR}/${P}/ffmpeg/"
+ ( S="${WORKDIR}/${P}/ffmpeg/" git-2_src_unpack )
+ else
+ unpack ${A}
+ fi
+
+ if [[ ${PV} = *9999* ]] || [ "${PV%_rc*}" = "${PV}" -a "${PV%_pre*}" = "${PV}" ]; then
+ cd "${S}"
+ cp "${FILESDIR}/dump_ffmpeg.sh" . || die
+ chmod +x dump_ffmpeg.sh
+ ./dump_ffmpeg.sh || die
+ fi
+
+ if ! use truetype; then
+ unpack font-arial-iso-8859-1.tar.bz2 \
+ font-arial-iso-8859-2.tar.bz2 \
+ font-arial-cp1250.tar.bz2
+ fi
+}
+
+src_prepare() {
+ local svf=snapshot_version
+ if [[ ${PV} = *9999* ]]; then
+ # Set SVN version manually
+ subversion_wc_info
+ printf "${ESVN_WC_REVISION}" > $svf
+ fi
+ if [ ! -f VERSION ] ; then
+ [ -f "$svf" ] || die "Missing ${svf}. Did you generate your snapshot with prepare_mplayer.sh?"
+ local sv=$(<$svf)
+ printf "SVN-r${sv} (Gentoo)" > VERSION
+ fi
+
+ # fix path to bash executable in configure scripts
+ sed -i -e "1c\#!${EPREFIX}/bin/bash" configure version.sh || die
+
+ base_src_prepare
+
+ # Use sane default for >=virtual/udev-197
+ sed -i -e '/default_dvd_device/s:/dev/dvd:/dev/cdrom:' configure || die
+}
+
+src_configure() {
+ local myconf=""
+ local uses i
+
+ # set LINGUAS
+ [[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/da/dk}"
+ [[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/zh/zh_CN}" #482968
+
+ # mplayer ebuild uses "use foo || --disable-foo" to forcibly disable
+ # compilation in almost every situation. The reason for this is
+ # because if --enable is used, it will force the build of that option,
+ # regardless of whether the dependency is available or not.
+
+ ###################
+ #Optional features#
+ ###################
+ # disable svga since we don't want it
+ # disable arts since we don't have kde3
+ # always disable internal ass
+ # disable opus and ilbc since it only controls support in internal
+ # ffmpeg which we do not use
+ myconf+="
+ --disable-svga --disable-svgalib_helper
+ --disable-ass-internal
+ --disable-arts
+ --disable-kai
+ --disable-libopus
+ --disable-libilbc
+ $(use_enable network networking)
+ $(use_enable joystick)
+ "
+ uses="bl bluray enca ftp rtc" # nemesi <- not working with in-tree ebuild
+ myconf+=" --disable-nemesi" # nemesi automagic disable
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ use bidi || myconf+=" --disable-fribidi"
+ use ipv6 || myconf+=" --disable-inet6"
+ use libass || myconf+=" --disable-ass"
+ use nut || myconf+=" --disable-libnut"
+ use rar || myconf+=" --disable-unrarexec"
+ use samba || myconf+=" --disable-smb"
+ use lirc || myconf+=" --disable-lirc --disable-lircc --disable-apple-ir"
+
+ # libcdio support: prefer libcdio over cdparanoia
+ # don't check for cddb w/cdio
+ if use cdio; then
+ myconf+=" --disable-cdparanoia"
+ else
+ myconf+=" --disable-libcdio"
+ use cdparanoia || myconf+=" --disable-cdparanoia"
+ use cddb || myconf+=" --disable-cddb"
+ fi
+
+ ################################
+ # DVD read, navigation support #
+ ################################
+ #
+ # dvdread - accessing a DVD
+ # dvdnav - navigation of menus
+ #
+ # use external libdvdcss, dvdread and dvdnav
+ myconf+=" --disable-dvdread-internal --disable-libdvdcss-internal"
+ use dvd || myconf+=" --disable-dvdread"
+ use dvdnav || myconf+=" --disable-dvdnav"
+
+ #############
+ # Subtitles #
+ #############
+ #
+ # SRT/ASS/SSA (subtitles) requires freetype support
+ # freetype support requires iconv
+ # iconv optionally can use unicode
+ use truetype || myconf+=" --disable-freetype"
+ use iconv || myconf+=" --disable-iconv --charset=noconv"
+ use iconv && use unicode && myconf+=" --charset=UTF-8"
+
+ #####################################
+ # DVB / Video4Linux / Radio support #
+ #####################################
+ myconf+=" --disable-tv-bsdbt848"
+ # broken upstream, won't work with recent kernels
+ myconf+=" --disable-ivtv"
+ # gone since linux-headers-2.6.38
+ myconf+=" --disable-tv-v4l1"
+ if { use dvb || use v4l || use pvr || use radio; }; then
+ use dvb || myconf+=" --disable-dvb"
+ use pvr || myconf+=" --disable-pvr"
+ use v4l || myconf+=" --disable-tv-v4l2"
+ if use radio && { use dvb || use v4l; }; then
+ myconf+="
+ --enable-radio
+ $(use_enable encode radio-capture)
+ "
+ else
+ myconf+="
+ --disable-radio-v4l2
+ --disable-radio-bsdbt848
+ "
+ fi
+ else
+ myconf+="
+ --disable-tv
+ --disable-tv-v4l2
+ --disable-radio
+ --disable-radio-v4l2
+ --disable-radio-bsdbt848
+ --disable-dvb
+ --disable-v4l2
+ --disable-pvr"
+ fi
+
+ ##########
+ # Codecs #
+ ##########
+ myconf+=" --disable-musepack" # Use internal musepack codecs for SV7 and SV8 support
+ myconf+=" --disable-libmpeg2-internal" # always use system media-libs/libmpeg2
+ use dts || myconf+=" --disable-libdca"
+ if ! use mp3; then
+ myconf+="
+ --disable-mp3lame
+ --disable-mpg123
+ "
+ fi
+ uses="a52 bs2b dv gsm lzo rtmp vorbis"
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-lib${i}"
+ done
+
+ uses="faad gif jpeg libmpeg2 live mad mng png pnm speex tga theora tremor xanim"
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ use jpeg2k || myconf+=" --disable-libopenjpeg"
+
+ # Encoding
+ uses="faac x264 xvid toolame twolame"
+ if use encode; then
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ else
+ myconf+=" --disable-mencoder"
+ for i in ${uses}; do
+ myconf+=" --disable-${i}"
+ use ${i} && elog "Useflag \"${i}\" will only be useful for encoding, i.e., with \"encode\" useflag enabled."
+ done
+ fi
+
+ #################
+ # Binary codecs #
+ #################
+ myconf+=" --disable-qtx --disable-real --disable-win32dll"
+
+ ################
+ # Video Output #
+ ################
+ uses="directfb md5sum sdl"
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ use aalib || myconf+=" --disable-aa"
+ use fbcon || myconf+=" --disable-fbdev"
+ use fbcon && use video_cards_s3virge && myconf+=" --enable-s3fb"
+ use libcaca || myconf+=" --disable-caca"
+ use zoran || myconf+=" --disable-zr"
+
+ if ! use kernel_linux || ! use video_cards_mga; then
+ myconf+=" --disable-mga --disable-xmga"
+ fi
+
+ if use video_cards_tdfx; then
+ myconf+="
+ $(use_enable video_cards_tdfx tdfxvid)
+ $(use_enable fbcon tdfxfb)
+ "
+ else
+ myconf+="
+ --disable-3dfx
+ --disable-tdfxvid
+ --disable-tdfxfb
+ "
+ fi
+
+ # sun card, disable by default, see bug #258729
+ myconf+=" --disable-xvr100"
+
+ ################
+ # Audio Output #
+ ################
+ myconf+=" --disable-esd"
+ uses="alsa jack ladspa nas openal"
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ use pulseaudio || myconf+=" --disable-pulse"
+ if ! use radio; then
+ use oss || myconf+=" --disable-ossaudio"
+ fi
+
+ ####################
+ # Advanced Options #
+ ####################
+ # Platform specific flags, hardcoded on amd64 (see below)
+ use cpudetection && myconf+=" --enable-runtime-cpudetection"
+
+ uses="3dnow 3dnowext mmx mmxext sse sse2 ssse3"
+ for i in ${uses}; do
+ myconf+=" $(use_enable cpu_flags_x86_${i} ${i})"
+ done
+
+ uses="altivec shm"
+ for i in ${uses}; do
+ myconf+=" $(use_enable ${i})"
+ done
+
+ use debug && myconf+=" --enable-debug=3"
+
+ if use x86 && gcc-specs-pie; then
+ filter-flags -fPIC -fPIE
+ append-ldflags -nopie
+ fi
+
+ ###########################
+ # X enabled configuration #
+ ###########################
+ myconf+=" --disable-gui"
+ myconf+=" --disable-vesa"
+ uses="ggi vdpau xinerama xv"
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ use dga || myconf+=" --disable-dga1 --disable-dga2"
+ use opengl || myconf+=" --disable-gl"
+ use osdmenu && myconf+=" --enable-menu"
+ use vidix || myconf+=" --disable-vidix --disable-vidix-pcidb"
+ use xscreensaver || myconf+=" --disable-xss"
+ use X || myconf+=" --disable-x11"
+ if use xvmc; then
+ myconf+=" --enable-xvmc --with-xvmclib=XvMCW"
+ else
+ myconf+=" --disable-xvmc"
+ fi
+
+ ############################
+ # OSX (aqua) configuration #
+ ############################
+ if use aqua; then
+ myconf+="
+ --enable-macosx-finder
+ --enable-macosx-bundle
+ "
+ fi
+
+ ./configure \
+ --cc="$(tc-getCC)" \
+ --host-cc="$(tc-getBUILD_CC)" \
+ --prefix="${EPREFIX}/usr" \
+ --bindir="${EPREFIX}/usr/bin" \
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \
+ --confdir="${EPREFIX}/etc/mplayer" \
+ --datadir="${EPREFIX}/usr/share/mplayer${namesuf}" \
+ --mandir="${EPREFIX}/usr/share/man" \
+ --disable-ffmpeg_a \
+ ${myconf} || die
+}
+
+src_compile() {
+ base_src_compile
+ # Build only user-requested docs if they're available.
+ if use doc ; then
+ # select available languages from $LINGUAS
+ local ALLOWED_LINGUAS="cs de en es fr hu it pl ru zh_CN"
+ local BUILT_DOCS=""
+ for i in ${LINGUAS} ; do
+ has ${i} ${ALLOWED_LINGUAS} && BUILT_DOCS+=" ${i}"
+ done
+ if [[ -z $BUILT_DOCS ]]; then
+ emake -j1 html-chunked
+ else
+ for i in ${BUILT_DOCS}; do
+ emake -j1 html-chunked-${i}
+ done
+ fi
+ fi
+}
+
+src_install() {
+ local i
+
+ emake \
+ DESTDIR="${D}" \
+ INSTALLSTRIP="" \
+ install
+
+ dodoc AUTHORS Changelog Copyright README etc/codecs.conf
+
+ docinto tech/
+ dodoc DOCS/tech/{*.txt,MAINTAINERS,mpsub.sub,playtree,TODO,wishlist}
+ docinto TOOLS/
+ dodoc -r TOOLS
+ docinto tech/mirrors/
+ dodoc DOCS/tech/mirrors/*
+
+ if use doc; then
+ docinto html/
+ dohtml -r "${S}"/DOCS/HTML/*
+ fi
+
+ if ! use truetype; then
+ dodir /usr/share/mplayer/fonts
+ # Do this generic, as the mplayer people like to change the structure
+ # of their zips ...
+ for i in $(find "${WORKDIR}/" -type d -name 'font-arial-*'); do
+ cp -pPR "${i}" "${ED}/usr/share/mplayer/fonts"
+ done
+ # Fix the font symlink ...
+ rm -rf "${ED}/usr/share/mplayer/font"
+ dosym fonts/font-arial-14-iso-8859-1 /usr/share/mplayer/font
+ fi
+
+ insinto /etc/mplayer
+ newins "${S}/etc/example.conf" mplayer.conf
+ cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
+# Config options can be section specific, global
+# options should go in the default section
+[default]
+_EOF_
+ doins "${S}/etc/input.conf"
+ if use osdmenu; then
+ doins "${S}/etc/menu.conf"
+ fi
+
+ if use truetype; then
+ cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
+fontconfig=1
+subfont-osd-scale=4
+subfont-text-scale=3
+_EOF_
+ fi
+
+ # bug 256203
+ if use rar; then
+ cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
+unrarexec=${EPREFIX}/usr/bin/unrar
+_EOF_
+ fi
+
+ dosym ../../../etc/mplayer/mplayer.conf /usr/share/mplayer/mplayer.conf
+ newbin "${S}/TOOLS/midentify.sh" midentify
+}
+
+pkg_preinst() {
+ [[ -d ${EROOT}/usr/share/mplayer/Skin/default ]] && \
+ rm -rf "${EROOT}/usr/share/mplayer/Skin/default"
+}
+
+pkg_postrm() {
+ # Cleanup stale symlinks
+ [ -L "${EROOT}/usr/share/mplayer/font" -a \
+ ! -e "${EROOT}/usr/share/mplayer/font" ] && \
+ rm -f "${EROOT}/usr/share/mplayer/font"
+
+ [ -L "${EROOT}/usr/share/mplayer/subfont.ttf" -a \
+ ! -e "${EROOT}/usr/share/mplayer/subfont.ttf" ] && \
+ rm -f "${EROOT}/usr/share/mplayer/subfont.ttf"
+}
diff --git a/media-video/mplayer/mplayer-1.2_pre20141011.ebuild b/media-video/mplayer/mplayer-1.2_pre20141011.ebuild
new file mode 100644
index 000000000000..53ca60c3b979
--- /dev/null
+++ b/media-video/mplayer/mplayer-1.2_pre20141011.ebuild
@@ -0,0 +1,631 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI="git://git.videolan.org/ffmpeg.git"
+ESVN_REPO_URI="svn://svn.mplayerhq.hu/mplayer/trunk"
+[[ ${PV} = *9999* ]] && SVN_ECLASS="subversion git-2" || SVN_ECLASS=""
+
+inherit toolchain-funcs eutils flag-o-matic multilib base ${SVN_ECLASS}
+
+IUSE="cpu_flags_x86_3dnow cpu_flags_x86_3dnowext a52 aalib +alsa altivec aqua bidi bl bluray
+bs2b cddb +cdio cdparanoia cpudetection debug dga
+directfb doc dts dv dvb +dvd +dvdnav +enca +encode faac faad fbcon
+ftp gif ggi gsm +iconv ipv6 jack joystick jpeg jpeg2k kernel_linux ladspa
++libass libcaca libmpeg2 lirc live lzo mad md5sum +cpu_flags_x86_mmx cpu_flags_x86_mmxext mng mp3 nas
++network nut openal opengl +osdmenu oss png pnm pulseaudio pvr
+radio rar rtc rtmp samba selinux +shm sdl speex cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_ssse3
+tga theora tremor +truetype toolame twolame +unicode v4l vdpau vidix
+vorbis +X x264 xanim xinerama +xscreensaver +xv xvid xvmc zoran"
+
+VIDEO_CARDS="s3virge mga tdfx"
+for x in ${VIDEO_CARDS}; do
+ IUSE+=" video_cards_${x}"
+done
+
+FONT_URI="
+ mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2
+ mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2
+ mirror://mplayer/releases/fonts/font-arial-cp1250.tar.bz2
+"
+if [[ ${PV} == *9999* ]]; then
+ RELEASE_URI=""
+elif [ "${PV%_rc*}" = "${PV}" -a "${PV%_pre*}" = "${PV}" ]; then
+ MY_P="MPlayer-${PV}"
+ S="${WORKDIR}/${MY_P}"
+ RELEASE_URI="mirror://mplayer/releases/${MY_P}.tar.xz"
+else
+ RELEASE_URI="mirror://gentoo/${P}.tar.xz"
+fi
+SRC_URI="${RELEASE_URI}
+ !truetype? ( ${FONT_URI} )"
+
+DESCRIPTION="Media Player for Linux"
+HOMEPAGE="http://www.mplayerhq.hu/"
+
+FONT_RDEPS="
+ virtual/ttf-fonts
+ media-libs/fontconfig
+ >=media-libs/freetype-2.2.1:2
+"
+X_RDEPS="
+ x11-libs/libXext
+ x11-libs/libXxf86vm
+"
+# Rar: althrought -gpl version is nice, it cant do most functions normal rars can
+# nemesi? ( net-libs/libnemesi )
+RDEPEND+="
+ sys-libs/ncurses
+ app-arch/bzip2
+ sys-libs/zlib
+ >=media-video/ffmpeg-2.0:0
+ a52? ( media-libs/a52dec )
+ aalib? ( media-libs/aalib )
+ alsa? ( media-libs/alsa-lib )
+ bidi? ( dev-libs/fribidi )
+ bluray? ( >=media-libs/libbluray-0.2.1 )
+ bs2b? ( media-libs/libbs2b )
+ cdio? ( dev-libs/libcdio )
+ cdparanoia? ( !cdio? ( media-sound/cdparanoia ) )
+ dga? ( x11-libs/libXxf86dga )
+ directfb? ( dev-libs/DirectFB )
+ dts? ( media-libs/libdca )
+ dv? ( media-libs/libdv )
+ dvb? ( virtual/linuxtv-dvb-headers )
+ dvd? ( >=media-libs/libdvdread-4.1.3 )
+ dvdnav? ( >=media-libs/libdvdnav-4.1.3 )
+ encode? (
+ !twolame? ( toolame? ( media-sound/toolame ) )
+ twolame? ( media-sound/twolame )
+ faac? ( media-libs/faac )
+ mp3? ( media-sound/lame )
+ x264? ( >=media-libs/x264-0.0.20100423:= )
+ xvid? ( media-libs/xvid )
+ )
+ enca? ( app-i18n/enca )
+ faad? ( media-libs/faad2 )
+ ggi? ( media-libs/libggi media-libs/libggiwmh )
+ gif? ( media-libs/giflib )
+ gsm? ( media-sound/gsm )
+ iconv? ( virtual/libiconv )
+ jack? ( media-sound/jack-audio-connection-kit )
+ jpeg? ( virtual/jpeg:0 )
+ jpeg2k? ( media-libs/openjpeg:0 )
+ ladspa? ( media-libs/ladspa-sdk )
+ libass? ( >=media-libs/libass-0.9.10:=[enca?] )
+ libcaca? ( media-libs/libcaca )
+ libmpeg2? ( media-libs/libmpeg2 )
+ lirc? ( app-misc/lirc )
+ live? ( media-plugins/live )
+ lzo? ( >=dev-libs/lzo-2 )
+ mad? ( media-libs/libmad )
+ mng? ( media-libs/libmng:= )
+ mp3? ( media-sound/mpg123 )
+ nas? ( media-libs/nas )
+ nut? ( >=media-libs/libnut-661 )
+ openal? ( media-libs/openal )
+ opengl? ( virtual/opengl )
+ png? ( media-libs/libpng )
+ pnm? ( media-libs/netpbm )
+ pulseaudio? ( media-sound/pulseaudio )
+ rar? (
+ || (
+ app-arch/unrar
+ app-arch/rar
+ )
+ )
+ rtmp? ( media-video/rtmpdump )
+ samba? ( net-fs/samba )
+ sdl? ( media-libs/libsdl )
+ speex? ( media-libs/speex )
+ theora? ( media-libs/libtheora[encode?] )
+ tremor? ( media-libs/tremor )
+ truetype? ( ${FONT_RDEPS} )
+ vdpau? ( x11-libs/libvdpau )
+ vorbis? ( !tremor? ( media-libs/libvorbis ) )
+ X? ( ${X_RDEPS} )
+ xanim? ( media-video/xanim )
+ xinerama? ( x11-libs/libXinerama )
+ xscreensaver? ( x11-libs/libXScrnSaver )
+ xv? ( x11-libs/libXv )
+ xvmc? ( x11-libs/libXvMC )
+"
+
+X_DEPS="
+ x11-proto/videoproto
+ x11-proto/xf86vidmodeproto
+"
+ASM_DEP="dev-lang/yasm"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ dga? ( x11-proto/xf86dgaproto )
+ X? ( ${X_DEPS} )
+ xinerama? ( x11-proto/xineramaproto )
+ xscreensaver? ( x11-proto/scrnsaverproto )
+ amd64? ( ${ASM_DEP} )
+ doc? (
+ dev-libs/libxslt app-text/docbook-xml-dtd
+ app-text/docbook-xsl-stylesheets
+ )
+ x86? ( ${ASM_DEP} )
+ x86-fbsd? ( ${ASM_DEP} )
+"
+RDEPEND+="
+ selinux? ( sec-policy/selinux-mplayer )
+"
+
+SLOT="0"
+LICENSE="GPL-2"
+if [[ ${PV} != *9999* ]]; then
+ KEYWORDS="~amd64 ~arm ~hppa ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+else
+ KEYWORDS=""
+fi
+
+# faac codecs are nonfree
+# libcdio support: prefer libcdio over cdparanoia and don't check for cddb w/cdio
+# dvd navigation requires dvd read support
+# ass and freetype font require iconv and ass requires freetype fonts
+# unicode transformations are usefull only with iconv
+# radio requires oss or alsa backend
+# xvmc requires xvideo support
+REQUIRED_USE="
+ dga? ( X )
+ dvdnav? ( dvd )
+ enca? ( iconv )
+ ggi? ( X )
+ libass? ( truetype )
+ opengl? ( X )
+ osdmenu? ( X )
+ truetype? ( iconv )
+ vdpau? ( X )
+ vidix? ( X )
+ xinerama? ( X )
+ xscreensaver? ( X )
+ xv? ( X )
+ xvmc? ( xv )"
+RESTRICT="faac? ( bindist )"
+
+pkg_setup() {
+ if [[ ${PV} == *9999* ]]; then
+ elog
+ elog "This is a live ebuild which installs the latest from upstream's"
+ elog "subversion repository, and is unsupported by Gentoo."
+ elog "Everything but bugs in the ebuild itself will be ignored."
+ elog
+ fi
+
+ if use cpudetection; then
+ ewarn
+ ewarn "You've enabled the cpudetection flag. This feature is"
+ ewarn "included mainly for people who want to use the same"
+ ewarn "binary on another system with a different CPU architecture."
+ ewarn "MPlayer will already detect your CPU settings by default at"
+ ewarn "buildtime; this flag is used for runtime detection."
+ ewarn "You won't need this turned on if you are only building"
+ ewarn "mplayer for this system. Also, if your compile fails, try"
+ ewarn "disabling this use flag."
+ fi
+
+ if has_version 'media-video/libav' ; then
+ ewarn "Please note that upstream uses media-video/ffmpeg."
+ ewarn "media-video/libav should be fine in theory but if you"
+ ewarn "experience any problem, try to move to media-video/ffmpeg."
+ fi
+}
+
+src_unpack() {
+ if [[ ${PV} = *9999* ]]; then
+ subversion_src_unpack
+ cd "${WORKDIR}"
+ rm -rf "${WORKDIR}/${P}/ffmpeg/"
+ ( S="${WORKDIR}/${P}/ffmpeg/" git-2_src_unpack )
+ else
+ unpack ${A}
+ fi
+
+ if [[ ${PV} = *9999* ]] || [[ "${PV%_rc*}" = "${PV}" ]]; then
+ cd "${S}"
+ cp "${FILESDIR}/dump_ffmpeg.sh" . || die
+ chmod +x dump_ffmpeg.sh
+ ./dump_ffmpeg.sh || die
+ fi
+
+ if ! use truetype; then
+ unpack font-arial-iso-8859-1.tar.bz2 \
+ font-arial-iso-8859-2.tar.bz2 \
+ font-arial-cp1250.tar.bz2
+ fi
+}
+
+src_prepare() {
+ local svf=snapshot_version
+ if [[ ${PV} = *9999* ]]; then
+ # Set SVN version manually
+ subversion_wc_info
+ printf "${ESVN_WC_REVISION}" > $svf
+ fi
+ if [ ! -f VERSION ] ; then
+ [ -f "$svf" ] || die "Missing ${svf}. Did you generate your snapshot with prepare_mplayer.sh?"
+ local sv=$(<$svf)
+ printf "SVN-r${sv} (Gentoo)" > VERSION
+ fi
+
+ # fix path to bash executable in configure scripts
+ sed -i -e "1c\#!${EPREFIX}/bin/bash" configure version.sh || die
+
+ base_src_prepare
+
+ # Use sane default for >=virtual/udev-197
+ sed -i -e '/default_dvd_device/s:/dev/dvd:/dev/cdrom:' configure || die
+}
+
+src_configure() {
+ local myconf=""
+ local uses i
+
+ # set LINGUAS
+ [[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/da/dk}"
+ [[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/zh/zh_CN}" #482968
+
+ # mplayer ebuild uses "use foo || --disable-foo" to forcibly disable
+ # compilation in almost every situation. The reason for this is
+ # because if --enable is used, it will force the build of that option,
+ # regardless of whether the dependency is available or not.
+
+ ###################
+ #Optional features#
+ ###################
+ # disable svga since we don't want it
+ # disable arts since we don't have kde3
+ # always disable internal ass
+ # disable opus and ilbc since it only controls support in internal
+ # ffmpeg which we do not use
+ myconf+="
+ --disable-svga --disable-svgalib_helper
+ --disable-ass-internal
+ --disable-arts
+ --disable-kai
+ --disable-libopus
+ --disable-libilbc
+ $(use_enable network networking)
+ $(use_enable joystick)
+ "
+ uses="bl bluray enca ftp rtc" # nemesi <- not working with in-tree ebuild
+ myconf+=" --disable-nemesi" # nemesi automagic disable
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ use bidi || myconf+=" --disable-fribidi"
+ use ipv6 || myconf+=" --disable-inet6"
+ use libass || myconf+=" --disable-ass"
+ use nut || myconf+=" --disable-libnut"
+ use rar || myconf+=" --disable-unrarexec"
+ use samba || myconf+=" --disable-smb"
+ use lirc || myconf+=" --disable-lirc --disable-lircc --disable-apple-ir"
+
+ # libcdio support: prefer libcdio over cdparanoia
+ # don't check for cddb w/cdio
+ if use cdio; then
+ myconf+=" --disable-cdparanoia"
+ else
+ myconf+=" --disable-libcdio"
+ use cdparanoia || myconf+=" --disable-cdparanoia"
+ use cddb || myconf+=" --disable-cddb"
+ fi
+
+ ################################
+ # DVD read, navigation support #
+ ################################
+ #
+ # dvdread - accessing a DVD
+ # dvdnav - navigation of menus
+ #
+ # use external libdvdcss, dvdread and dvdnav
+ myconf+=" --disable-dvdread-internal --disable-libdvdcss-internal"
+ use dvd || myconf+=" --disable-dvdread"
+ use dvdnav || myconf+=" --disable-dvdnav"
+
+ #############
+ # Subtitles #
+ #############
+ #
+ # SRT/ASS/SSA (subtitles) requires freetype support
+ # freetype support requires iconv
+ # iconv optionally can use unicode
+ use truetype || myconf+=" --disable-freetype"
+ use iconv || myconf+=" --disable-iconv --charset=noconv"
+ use iconv && use unicode && myconf+=" --charset=UTF-8"
+
+ #####################################
+ # DVB / Video4Linux / Radio support #
+ #####################################
+ myconf+=" --disable-tv-bsdbt848"
+ # broken upstream, won't work with recent kernels
+ myconf+=" --disable-ivtv"
+ # gone since linux-headers-2.6.38
+ myconf+=" --disable-tv-v4l1"
+ if { use dvb || use v4l || use pvr || use radio; }; then
+ use dvb || myconf+=" --disable-dvb"
+ use pvr || myconf+=" --disable-pvr"
+ use v4l || myconf+=" --disable-tv-v4l2"
+ if use radio && { use dvb || use v4l; }; then
+ myconf+="
+ --enable-radio
+ $(use_enable encode radio-capture)
+ "
+ else
+ myconf+="
+ --disable-radio-v4l2
+ --disable-radio-bsdbt848
+ "
+ fi
+ else
+ myconf+="
+ --disable-tv
+ --disable-tv-v4l2
+ --disable-radio
+ --disable-radio-v4l2
+ --disable-radio-bsdbt848
+ --disable-dvb
+ --disable-v4l2
+ --disable-pvr"
+ fi
+
+ ##########
+ # Codecs #
+ ##########
+ myconf+=" --disable-musepack" # Use internal musepack codecs for SV7 and SV8 support
+ myconf+=" --disable-libmpeg2-internal" # always use system media-libs/libmpeg2
+ use dts || myconf+=" --disable-libdca"
+ if ! use mp3; then
+ myconf+="
+ --disable-mp3lame
+ --disable-mpg123
+ "
+ fi
+ uses="a52 bs2b dv gsm lzo rtmp vorbis"
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-lib${i}"
+ done
+
+ uses="faad gif jpeg libmpeg2 live mad mng png pnm speex tga theora tremor xanim"
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ use jpeg2k || myconf+=" --disable-libopenjpeg"
+
+ # Encoding
+ uses="faac x264 xvid toolame twolame"
+ if use encode; then
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ else
+ myconf+=" --disable-mencoder"
+ for i in ${uses}; do
+ myconf+=" --disable-${i}"
+ use ${i} && elog "Useflag \"${i}\" will only be useful for encoding, i.e., with \"encode\" useflag enabled."
+ done
+ fi
+
+ #################
+ # Binary codecs #
+ #################
+ myconf+=" --disable-qtx --disable-real --disable-win32dll"
+
+ ################
+ # Video Output #
+ ################
+ uses="directfb md5sum sdl"
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ use aalib || myconf+=" --disable-aa"
+ use fbcon || myconf+=" --disable-fbdev"
+ use fbcon && use video_cards_s3virge && myconf+=" --enable-s3fb"
+ use libcaca || myconf+=" --disable-caca"
+ use zoran || myconf+=" --disable-zr"
+
+ if ! use kernel_linux || ! use video_cards_mga; then
+ myconf+=" --disable-mga --disable-xmga"
+ fi
+
+ if use video_cards_tdfx; then
+ myconf+="
+ $(use_enable video_cards_tdfx tdfxvid)
+ $(use_enable fbcon tdfxfb)
+ "
+ else
+ myconf+="
+ --disable-3dfx
+ --disable-tdfxvid
+ --disable-tdfxfb
+ "
+ fi
+
+ # sun card, disable by default, see bug #258729
+ myconf+=" --disable-xvr100"
+
+ ################
+ # Audio Output #
+ ################
+ myconf+=" --disable-esd"
+ uses="alsa jack ladspa nas openal"
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ use pulseaudio || myconf+=" --disable-pulse"
+ if ! use radio; then
+ use oss || myconf+=" --disable-ossaudio"
+ fi
+
+ ####################
+ # Advanced Options #
+ ####################
+ # Platform specific flags, hardcoded on amd64 (see below)
+ use cpudetection && myconf+=" --enable-runtime-cpudetection"
+
+ uses="3dnow 3dnowext mmx mmxext sse sse2 ssse3"
+ for i in ${uses}; do
+ myconf+=" $(use_enable cpu_flags_x86_${i} ${i})"
+ done
+
+ uses="altivec shm"
+ for i in ${uses}; do
+ myconf+=" $(use_enable ${i})"
+ done
+
+ use debug && myconf+=" --enable-debug=3"
+
+ if use x86 && gcc-specs-pie; then
+ filter-flags -fPIC -fPIE
+ append-ldflags -nopie
+ fi
+
+ ###########################
+ # X enabled configuration #
+ ###########################
+ myconf+=" --disable-gui"
+ myconf+=" --disable-vesa"
+ uses="ggi vdpau xinerama xv"
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ use dga || myconf+=" --disable-dga1 --disable-dga2"
+ use opengl || myconf+=" --disable-gl"
+ use osdmenu && myconf+=" --enable-menu"
+ use vidix || myconf+=" --disable-vidix --disable-vidix-pcidb"
+ use xscreensaver || myconf+=" --disable-xss"
+ use X || myconf+=" --disable-x11"
+ if use xvmc; then
+ myconf+=" --enable-xvmc --with-xvmclib=XvMCW"
+ else
+ myconf+=" --disable-xvmc"
+ fi
+
+ ############################
+ # OSX (aqua) configuration #
+ ############################
+ if use aqua; then
+ myconf+="
+ --enable-macosx-finder
+ --enable-macosx-bundle
+ "
+ fi
+
+ ./configure \
+ --cc="$(tc-getCC)" \
+ --host-cc="$(tc-getBUILD_CC)" \
+ --prefix="${EPREFIX}/usr" \
+ --bindir="${EPREFIX}/usr/bin" \
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \
+ --confdir="${EPREFIX}/etc/mplayer" \
+ --datadir="${EPREFIX}/usr/share/mplayer${namesuf}" \
+ --mandir="${EPREFIX}/usr/share/man" \
+ --disable-ffmpeg_a \
+ ${myconf} || die
+}
+
+src_compile() {
+ base_src_compile
+ # Build only user-requested docs if they're available.
+ if use doc ; then
+ # select available languages from $LINGUAS
+ local ALLOWED_LINGUAS="cs de en es fr hu it pl ru zh_CN"
+ local BUILT_DOCS=""
+ for i in ${LINGUAS} ; do
+ has ${i} ${ALLOWED_LINGUAS} && BUILT_DOCS+=" ${i}"
+ done
+ if [[ -z $BUILT_DOCS ]]; then
+ emake -j1 html-chunked
+ else
+ for i in ${BUILT_DOCS}; do
+ emake -j1 html-chunked-${i}
+ done
+ fi
+ fi
+}
+
+src_install() {
+ local i
+
+ emake \
+ DESTDIR="${D}" \
+ INSTALLSTRIP="" \
+ install
+
+ dodoc AUTHORS Changelog Copyright README etc/codecs.conf
+
+ docinto tech/
+ dodoc DOCS/tech/{*.txt,MAINTAINERS,mpsub.sub,playtree,TODO,wishlist}
+ docinto TOOLS/
+ dodoc -r TOOLS
+ docinto tech/mirrors/
+ dodoc DOCS/tech/mirrors/*
+
+ if use doc; then
+ docinto html/
+ dohtml -r "${S}"/DOCS/HTML/*
+ fi
+
+ if ! use truetype; then
+ dodir /usr/share/mplayer/fonts
+ # Do this generic, as the mplayer people like to change the structure
+ # of their zips ...
+ for i in $(find "${WORKDIR}/" -type d -name 'font-arial-*'); do
+ cp -pPR "${i}" "${ED}/usr/share/mplayer/fonts"
+ done
+ # Fix the font symlink ...
+ rm -rf "${ED}/usr/share/mplayer/font"
+ dosym fonts/font-arial-14-iso-8859-1 /usr/share/mplayer/font
+ fi
+
+ insinto /etc/mplayer
+ newins "${S}/etc/example.conf" mplayer.conf
+ cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
+# Config options can be section specific, global
+# options should go in the default section
+[default]
+_EOF_
+ doins "${S}/etc/input.conf"
+ if use osdmenu; then
+ doins "${S}/etc/menu.conf"
+ fi
+
+ if use truetype; then
+ cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
+fontconfig=1
+subfont-osd-scale=4
+subfont-text-scale=3
+_EOF_
+ fi
+
+ # bug 256203
+ if use rar; then
+ cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
+unrarexec=${EPREFIX}/usr/bin/unrar
+_EOF_
+ fi
+
+ dosym ../../../etc/mplayer/mplayer.conf /usr/share/mplayer/mplayer.conf
+ newbin "${S}/TOOLS/midentify.sh" midentify
+}
+
+pkg_preinst() {
+ [[ -d ${EROOT}/usr/share/mplayer/Skin/default ]] && \
+ rm -rf "${EROOT}/usr/share/mplayer/Skin/default"
+}
+
+pkg_postrm() {
+ # Cleanup stale symlinks
+ [ -L "${EROOT}/usr/share/mplayer/font" -a \
+ ! -e "${EROOT}/usr/share/mplayer/font" ] && \
+ rm -f "${EROOT}/usr/share/mplayer/font"
+
+ [ -L "${EROOT}/usr/share/mplayer/subfont.ttf" -a \
+ ! -e "${EROOT}/usr/share/mplayer/subfont.ttf" ] && \
+ rm -f "${EROOT}/usr/share/mplayer/subfont.ttf"
+}
diff --git a/media-video/mplayer/mplayer-1.2_pre20150214-r1.ebuild b/media-video/mplayer/mplayer-1.2_pre20150214-r1.ebuild
new file mode 100644
index 000000000000..8a084325770f
--- /dev/null
+++ b/media-video/mplayer/mplayer-1.2_pre20150214-r1.ebuild
@@ -0,0 +1,633 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI="git://git.videolan.org/ffmpeg.git"
+ESVN_REPO_URI="svn://svn.mplayerhq.hu/mplayer/trunk"
+[[ ${PV} = *9999* ]] && SVN_ECLASS="subversion git-2" || SVN_ECLASS=""
+
+inherit toolchain-funcs eutils flag-o-matic multilib base ${SVN_ECLASS}
+
+IUSE="cpu_flags_x86_3dnow cpu_flags_x86_3dnowext a52 aalib +alsa altivec aqua bidi bl bluray
+bs2b cddb +cdio cdparanoia cpudetection debug dga
+directfb doc dts dv dvb +dvd +dvdnav +enca +encode faac faad fbcon
+ftp gif ggi gsm +iconv ipv6 jack joystick jpeg jpeg2k kernel_linux ladspa
++libass libcaca libmpeg2 lirc live lzo mad md5sum +cpu_flags_x86_mmx cpu_flags_x86_mmxext mng mp3 nas
++network nut openal opengl +osdmenu oss png pnm pulseaudio pvr
+radio rar rtc rtmp samba selinux +shm sdl speex cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_ssse3
+tga theora tremor +truetype toolame twolame +unicode v4l vdpau vidix
+vorbis +X x264 xanim xinerama +xscreensaver +xv xvid xvmc zoran"
+
+VIDEO_CARDS="s3virge mga tdfx"
+for x in ${VIDEO_CARDS}; do
+ IUSE+=" video_cards_${x}"
+done
+
+FONT_URI="
+ mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2
+ mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2
+ mirror://mplayer/releases/fonts/font-arial-cp1250.tar.bz2
+"
+if [[ ${PV} == *9999* ]]; then
+ RELEASE_URI=""
+elif [ "${PV%_rc*}" = "${PV}" -a "${PV%_pre*}" = "${PV}" ]; then
+ MY_P="MPlayer-${PV}"
+ S="${WORKDIR}/${MY_P}"
+ RELEASE_URI="mirror://mplayer/releases/${MY_P}.tar.xz"
+else
+ RELEASE_URI="mirror://gentoo/${P}.tar.xz"
+fi
+SRC_URI="${RELEASE_URI}
+ !truetype? ( ${FONT_URI} )"
+
+DESCRIPTION="Media Player for Linux"
+HOMEPAGE="http://www.mplayerhq.hu/"
+
+FONT_RDEPS="
+ virtual/ttf-fonts
+ media-libs/fontconfig
+ >=media-libs/freetype-2.2.1:2
+"
+X_RDEPS="
+ x11-libs/libXext
+ x11-libs/libXxf86vm
+"
+# Rar: althrought -gpl version is nice, it cant do most functions normal rars can
+# nemesi? ( net-libs/libnemesi )
+RDEPEND+="
+ sys-libs/ncurses
+ app-arch/bzip2
+ sys-libs/zlib
+ >=media-video/ffmpeg-2.0:0=
+ a52? ( media-libs/a52dec )
+ aalib? ( media-libs/aalib )
+ alsa? ( media-libs/alsa-lib )
+ bidi? ( dev-libs/fribidi )
+ bluray? ( >=media-libs/libbluray-0.2.1 )
+ bs2b? ( media-libs/libbs2b )
+ cdio? ( dev-libs/libcdio )
+ cdparanoia? ( !cdio? ( media-sound/cdparanoia ) )
+ dga? ( x11-libs/libXxf86dga )
+ directfb? ( dev-libs/DirectFB )
+ dts? ( media-libs/libdca )
+ dv? ( media-libs/libdv )
+ dvb? ( virtual/linuxtv-dvb-headers )
+ dvd? ( >=media-libs/libdvdread-4.1.3 )
+ dvdnav? ( >=media-libs/libdvdnav-4.1.3 )
+ encode? (
+ !twolame? ( toolame? ( media-sound/toolame ) )
+ twolame? ( media-sound/twolame )
+ faac? ( media-libs/faac )
+ mp3? ( media-sound/lame )
+ x264? ( >=media-libs/x264-0.0.20100423:= )
+ xvid? ( media-libs/xvid )
+ )
+ enca? ( app-i18n/enca )
+ faad? ( media-libs/faad2 )
+ ggi? ( media-libs/libggi media-libs/libggiwmh )
+ gif? ( media-libs/giflib )
+ gsm? ( media-sound/gsm )
+ iconv? ( virtual/libiconv )
+ jack? ( media-sound/jack-audio-connection-kit )
+ jpeg? ( virtual/jpeg:0 )
+ jpeg2k? ( media-libs/openjpeg:0 )
+ ladspa? ( media-libs/ladspa-sdk )
+ libass? ( >=media-libs/libass-0.9.10:=[enca?] )
+ libcaca? ( media-libs/libcaca )
+ libmpeg2? ( media-libs/libmpeg2 )
+ lirc? ( app-misc/lirc )
+ live? ( media-plugins/live )
+ lzo? ( >=dev-libs/lzo-2 )
+ mad? ( media-libs/libmad )
+ mng? ( media-libs/libmng:= )
+ mp3? ( media-sound/mpg123 )
+ nas? ( media-libs/nas )
+ nut? ( >=media-libs/libnut-661 )
+ openal? ( media-libs/openal )
+ opengl? ( virtual/opengl )
+ png? ( media-libs/libpng:0= )
+ pnm? ( media-libs/netpbm )
+ pulseaudio? ( media-sound/pulseaudio )
+ rar? (
+ || (
+ app-arch/unrar
+ app-arch/rar
+ )
+ )
+ rtmp? ( media-video/rtmpdump )
+ samba? ( net-fs/samba )
+ sdl? ( media-libs/libsdl )
+ speex? ( media-libs/speex )
+ theora? ( media-libs/libtheora[encode?] )
+ tremor? ( media-libs/tremor )
+ truetype? ( ${FONT_RDEPS} )
+ vdpau? ( x11-libs/libvdpau )
+ vorbis? ( !tremor? ( media-libs/libvorbis ) )
+ X? ( ${X_RDEPS} )
+ xanim? ( media-video/xanim )
+ xinerama? ( x11-libs/libXinerama )
+ xscreensaver? ( x11-libs/libXScrnSaver )
+ xv? ( x11-libs/libXv )
+ xvmc? ( x11-libs/libXvMC )
+"
+
+X_DEPS="
+ x11-proto/videoproto
+ x11-proto/xf86vidmodeproto
+"
+ASM_DEP="dev-lang/yasm"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ dga? ( x11-proto/xf86dgaproto )
+ X? ( ${X_DEPS} )
+ xinerama? ( x11-proto/xineramaproto )
+ xscreensaver? ( x11-proto/scrnsaverproto )
+ amd64? ( ${ASM_DEP} )
+ doc? (
+ dev-libs/libxslt app-text/docbook-xml-dtd
+ app-text/docbook-xsl-stylesheets
+ )
+ x86? ( ${ASM_DEP} )
+ x86-fbsd? ( ${ASM_DEP} )
+"
+RDEPEND+="
+ selinux? ( sec-policy/selinux-mplayer )
+"
+
+SLOT="0"
+LICENSE="GPL-2"
+if [[ ${PV} != *9999* ]]; then
+ KEYWORDS="alpha amd64 arm ~hppa ppc ppc64 sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+else
+ KEYWORDS="alpha amd64 arm ~hppa ppc ppc64 sparc"
+fi
+
+# faac codecs are nonfree
+# libcdio support: prefer libcdio over cdparanoia and don't check for cddb w/cdio
+# dvd navigation requires dvd read support
+# ass and freetype font require iconv and ass requires freetype fonts
+# unicode transformations are usefull only with iconv
+# radio requires oss or alsa backend
+# xvmc requires xvideo support
+REQUIRED_USE="
+ dga? ( X )
+ dvdnav? ( dvd )
+ enca? ( iconv )
+ ggi? ( X )
+ libass? ( truetype )
+ opengl? ( X )
+ osdmenu? ( X )
+ truetype? ( iconv )
+ vdpau? ( X )
+ vidix? ( X )
+ xinerama? ( X )
+ xscreensaver? ( X )
+ xv? ( X )
+ xvmc? ( xv )"
+RESTRICT="faac? ( bindist )"
+
+PATCHES=(
+ # Work with pulseaudio-6, bug #549680, https://trac.mplayerhq.hu/ticket/2241
+ "${FILESDIR}"/${PN}-1.2_pre20150214-pulseaudio-6.0.patch
+)
+
+pkg_setup() {
+ if [[ ${PV} == *9999* ]]; then
+ elog
+ elog "This is a live ebuild which installs the latest from upstream's"
+ elog "subversion repository, and is unsupported by Gentoo."
+ elog "Everything but bugs in the ebuild itself will be ignored."
+ elog
+ fi
+
+ if use cpudetection; then
+ ewarn
+ ewarn "You've enabled the cpudetection flag. This feature is"
+ ewarn "included mainly for people who want to use the same"
+ ewarn "binary on another system with a different CPU architecture."
+ ewarn "MPlayer will already detect your CPU settings by default at"
+ ewarn "buildtime; this flag is used for runtime detection."
+ ewarn "You won't need this turned on if you are only building"
+ ewarn "mplayer for this system. Also, if your compile fails, try"
+ ewarn "disabling this use flag."
+ fi
+
+ if has_version 'media-video/libav' ; then
+ ewarn "Please note that upstream uses media-video/ffmpeg."
+ ewarn "media-video/libav should be fine in theory but if you"
+ ewarn "experience any problem, try to move to media-video/ffmpeg."
+ fi
+}
+
+src_unpack() {
+ if [[ ${PV} = *9999* ]]; then
+ subversion_src_unpack
+ cd "${WORKDIR}"
+ rm -rf "${WORKDIR}/${P}/ffmpeg/"
+ ( S="${WORKDIR}/${P}/ffmpeg/" git-2_src_unpack )
+ else
+ unpack ${A}
+ fi
+
+ if [[ ${PV} = *9999* ]] || [[ "${PV%_rc*}" = "${PV}" ]]; then
+ cd "${S}"
+ cp "${FILESDIR}/dump_ffmpeg.sh" . || die
+ chmod +x dump_ffmpeg.sh
+ ./dump_ffmpeg.sh || die
+ fi
+
+ if ! use truetype; then
+ unpack font-arial-iso-8859-1.tar.bz2 \
+ font-arial-iso-8859-2.tar.bz2 \
+ font-arial-cp1250.tar.bz2
+ fi
+}
+
+src_prepare() {
+ local svf=snapshot_version
+ if [[ ${PV} = *9999* ]]; then
+ # Set SVN version manually
+ subversion_wc_info
+ printf "${ESVN_WC_REVISION}" > $svf
+ fi
+ if [ ! -f VERSION ] ; then
+ [ -f "$svf" ] || die "Missing ${svf}. Did you generate your snapshot with prepare_mplayer.sh?"
+ local sv=$(<$svf)
+ printf "SVN-r${sv} (Gentoo)" > VERSION
+ fi
+
+ # fix path to bash executable in configure scripts
+ sed -i -e "1c\#!${EPREFIX}/bin/bash" configure version.sh || die
+
+ base_src_prepare
+
+ # Use sane default for >=virtual/udev-197
+ sed -i -e '/default_dvd_device/s:/dev/dvd:/dev/cdrom:' configure || die
+}
+
+src_configure() {
+ local myconf=""
+ local uses i
+
+ # set LINGUAS
+ [[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/da/dk}"
+ [[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/zh/zh_CN}" #482968
+
+ # mplayer ebuild uses "use foo || --disable-foo" to forcibly disable
+ # compilation in almost every situation. The reason for this is
+ # because if --enable is used, it will force the build of that option,
+ # regardless of whether the dependency is available or not.
+
+ ###################
+ #Optional features#
+ ###################
+ # disable svga since we don't want it
+ # disable arts since we don't have kde3
+ # always disable internal ass
+ # disable opus and ilbc since it only controls support in internal
+ # ffmpeg which we do not use
+ myconf+="
+ --disable-svga --disable-svgalib_helper
+ --disable-ass-internal
+ --disable-arts
+ --disable-kai
+ --disable-libopus
+ --disable-libilbc
+ $(use_enable network networking)
+ $(use_enable joystick)
+ "
+ uses="bl bluray enca ftp rtc" # nemesi <- not working with in-tree ebuild
+ myconf+=" --disable-nemesi" # nemesi automagic disable
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ use bidi || myconf+=" --disable-fribidi"
+ use ipv6 || myconf+=" --disable-inet6"
+ use libass || myconf+=" --disable-ass"
+ use nut || myconf+=" --disable-libnut"
+ use rar || myconf+=" --disable-unrarexec"
+ use samba || myconf+=" --disable-smb"
+ use lirc || myconf+=" --disable-lirc --disable-lircc --disable-apple-ir"
+
+ # libcdio support: prefer libcdio over cdparanoia
+ # don't check for cddb w/cdio
+ if use cdio; then
+ myconf+=" --disable-cdparanoia"
+ else
+ myconf+=" --disable-libcdio"
+ use cdparanoia || myconf+=" --disable-cdparanoia"
+ use cddb || myconf+=" --disable-cddb"
+ fi
+
+ ################################
+ # DVD read, navigation support #
+ ################################
+ #
+ # dvdread - accessing a DVD
+ # dvdnav - navigation of menus
+ use dvd || myconf+=" --disable-dvdread"
+ use dvdnav || myconf+=" --disable-dvdnav"
+
+ #############
+ # Subtitles #
+ #############
+ #
+ # SRT/ASS/SSA (subtitles) requires freetype support
+ # freetype support requires iconv
+ # iconv optionally can use unicode
+ use truetype || myconf+=" --disable-freetype"
+ use iconv || myconf+=" --disable-iconv --charset=noconv"
+ use iconv && use unicode && myconf+=" --charset=UTF-8"
+
+ #####################################
+ # DVB / Video4Linux / Radio support #
+ #####################################
+ myconf+=" --disable-tv-bsdbt848"
+ # broken upstream, won't work with recent kernels
+ myconf+=" --disable-ivtv"
+ # gone since linux-headers-2.6.38
+ myconf+=" --disable-tv-v4l1"
+ if { use dvb || use v4l || use pvr || use radio; }; then
+ use dvb || myconf+=" --disable-dvb"
+ use pvr || myconf+=" --disable-pvr"
+ use v4l || myconf+=" --disable-tv-v4l2"
+ if use radio && { use dvb || use v4l; }; then
+ myconf+="
+ --enable-radio
+ $(use_enable encode radio-capture)
+ "
+ else
+ myconf+="
+ --disable-radio-v4l2
+ --disable-radio-bsdbt848
+ "
+ fi
+ else
+ myconf+="
+ --disable-tv
+ --disable-tv-v4l2
+ --disable-radio
+ --disable-radio-v4l2
+ --disable-radio-bsdbt848
+ --disable-dvb
+ --disable-v4l2
+ --disable-pvr"
+ fi
+
+ ##########
+ # Codecs #
+ ##########
+ myconf+=" --disable-musepack" # Use internal musepack codecs for SV7 and SV8 support
+ myconf+=" --disable-libmpeg2-internal" # always use system media-libs/libmpeg2
+ use dts || myconf+=" --disable-libdca"
+ if ! use mp3; then
+ myconf+="
+ --disable-mp3lame
+ --disable-mpg123
+ "
+ fi
+ uses="a52 bs2b dv gsm lzo rtmp vorbis"
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-lib${i}"
+ done
+
+ uses="faad gif jpeg libmpeg2 live mad mng png pnm speex tga theora tremor xanim"
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ use jpeg2k || myconf+=" --disable-libopenjpeg"
+
+ # Encoding
+ uses="faac x264 xvid toolame twolame"
+ if use encode; then
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ else
+ myconf+=" --disable-mencoder"
+ for i in ${uses}; do
+ myconf+=" --disable-${i}"
+ use ${i} && elog "Useflag \"${i}\" will only be useful for encoding, i.e., with \"encode\" useflag enabled."
+ done
+ fi
+
+ #################
+ # Binary codecs #
+ #################
+ myconf+=" --disable-qtx --disable-real --disable-win32dll"
+
+ ################
+ # Video Output #
+ ################
+ uses="directfb md5sum sdl"
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ use aalib || myconf+=" --disable-aa"
+ use fbcon || myconf+=" --disable-fbdev"
+ use fbcon && use video_cards_s3virge && myconf+=" --enable-s3fb"
+ use libcaca || myconf+=" --disable-caca"
+ use zoran || myconf+=" --disable-zr"
+
+ if ! use kernel_linux || ! use video_cards_mga; then
+ myconf+=" --disable-mga --disable-xmga"
+ fi
+
+ if use video_cards_tdfx; then
+ myconf+="
+ $(use_enable video_cards_tdfx tdfxvid)
+ $(use_enable fbcon tdfxfb)
+ "
+ else
+ myconf+="
+ --disable-3dfx
+ --disable-tdfxvid
+ --disable-tdfxfb
+ "
+ fi
+
+ # sun card, disable by default, see bug #258729
+ myconf+=" --disable-xvr100"
+
+ ################
+ # Audio Output #
+ ################
+ myconf+=" --disable-esd"
+ uses="alsa jack ladspa nas openal"
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ use pulseaudio || myconf+=" --disable-pulse"
+ if ! use radio; then
+ use oss || myconf+=" --disable-ossaudio"
+ fi
+
+ ####################
+ # Advanced Options #
+ ####################
+ # Platform specific flags, hardcoded on amd64 (see below)
+ use cpudetection && myconf+=" --enable-runtime-cpudetection"
+
+ uses="3dnow 3dnowext mmx mmxext sse sse2 ssse3"
+ for i in ${uses}; do
+ myconf+=" $(use_enable cpu_flags_x86_${i} ${i})"
+ done
+
+ uses="altivec shm"
+ for i in ${uses}; do
+ myconf+=" $(use_enable ${i})"
+ done
+
+ use debug && myconf+=" --enable-debug=3"
+
+ if use x86 && gcc-specs-pie; then
+ filter-flags -fPIC -fPIE
+ append-ldflags -nopie
+ fi
+
+ ###########################
+ # X enabled configuration #
+ ###########################
+ myconf+=" --disable-gui"
+ myconf+=" --disable-vesa"
+ uses="ggi vdpau xinerama xv"
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ use dga || myconf+=" --disable-dga1 --disable-dga2"
+ use opengl || myconf+=" --disable-gl"
+ use osdmenu && myconf+=" --enable-menu"
+ use vidix || myconf+=" --disable-vidix --disable-vidix-pcidb"
+ use xscreensaver || myconf+=" --disable-xss"
+ use X || myconf+=" --disable-x11"
+ if use xvmc; then
+ myconf+=" --enable-xvmc --with-xvmclib=XvMCW"
+ else
+ myconf+=" --disable-xvmc"
+ fi
+
+ ############################
+ # OSX (aqua) configuration #
+ ############################
+ if use aqua; then
+ myconf+="
+ --enable-macosx-finder
+ --enable-macosx-bundle
+ "
+ fi
+
+ ./configure \
+ --cc="$(tc-getCC)" \
+ --host-cc="$(tc-getBUILD_CC)" \
+ --prefix="${EPREFIX}/usr" \
+ --bindir="${EPREFIX}/usr/bin" \
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \
+ --confdir="${EPREFIX}/etc/mplayer" \
+ --datadir="${EPREFIX}/usr/share/mplayer${namesuf}" \
+ --mandir="${EPREFIX}/usr/share/man" \
+ --disable-ffmpeg_a \
+ ${myconf} || die
+}
+
+src_compile() {
+ base_src_compile
+ # Build only user-requested docs if they're available.
+ if use doc ; then
+ # select available languages from $LINGUAS
+ local ALLOWED_LINGUAS="cs de en es fr hu it pl ru zh_CN"
+ local BUILT_DOCS=""
+ for i in ${LINGUAS} ; do
+ has ${i} ${ALLOWED_LINGUAS} && BUILT_DOCS+=" ${i}"
+ done
+ if [[ -z $BUILT_DOCS ]]; then
+ emake -j1 html-chunked
+ else
+ for i in ${BUILT_DOCS}; do
+ emake -j1 html-chunked-${i}
+ done
+ fi
+ fi
+}
+
+src_install() {
+ local i
+
+ emake \
+ DESTDIR="${D}" \
+ INSTALLSTRIP="" \
+ install
+
+ dodoc AUTHORS Changelog Copyright README etc/codecs.conf
+
+ docinto tech/
+ dodoc DOCS/tech/{*.txt,MAINTAINERS,mpsub.sub,playtree,TODO,wishlist}
+ docinto TOOLS/
+ dodoc -r TOOLS
+ docinto tech/mirrors/
+ dodoc DOCS/tech/mirrors/*
+
+ if use doc; then
+ docinto html/
+ dohtml -r "${S}"/DOCS/HTML/*
+ fi
+
+ if ! use truetype; then
+ dodir /usr/share/mplayer/fonts
+ # Do this generic, as the mplayer people like to change the structure
+ # of their zips ...
+ for i in $(find "${WORKDIR}/" -type d -name 'font-arial-*'); do
+ cp -pPR "${i}" "${ED}/usr/share/mplayer/fonts"
+ done
+ # Fix the font symlink ...
+ rm -rf "${ED}/usr/share/mplayer/font"
+ dosym fonts/font-arial-14-iso-8859-1 /usr/share/mplayer/font
+ fi
+
+ insinto /etc/mplayer
+ newins "${S}/etc/example.conf" mplayer.conf
+ cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
+# Config options can be section specific, global
+# options should go in the default section
+[default]
+_EOF_
+ doins "${S}/etc/input.conf"
+ if use osdmenu; then
+ doins "${S}/etc/menu.conf"
+ fi
+
+ if use truetype; then
+ cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
+fontconfig=1
+subfont-osd-scale=4
+subfont-text-scale=3
+_EOF_
+ fi
+
+ # bug 256203
+ if use rar; then
+ cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
+unrarexec=${EPREFIX}/usr/bin/unrar
+_EOF_
+ fi
+
+ dosym ../../../etc/mplayer/mplayer.conf /usr/share/mplayer/mplayer.conf
+ newbin "${S}/TOOLS/midentify.sh" midentify
+}
+
+pkg_preinst() {
+ [[ -d ${EROOT}/usr/share/mplayer/Skin/default ]] && \
+ rm -rf "${EROOT}/usr/share/mplayer/Skin/default"
+}
+
+pkg_postrm() {
+ # Cleanup stale symlinks
+ [ -L "${EROOT}/usr/share/mplayer/font" -a \
+ ! -e "${EROOT}/usr/share/mplayer/font" ] && \
+ rm -f "${EROOT}/usr/share/mplayer/font"
+
+ [ -L "${EROOT}/usr/share/mplayer/subfont.ttf" -a \
+ ! -e "${EROOT}/usr/share/mplayer/subfont.ttf" ] && \
+ rm -f "${EROOT}/usr/share/mplayer/subfont.ttf"
+}
diff --git a/media-video/mplayer/mplayer-1.2_pre20150214.ebuild b/media-video/mplayer/mplayer-1.2_pre20150214.ebuild
new file mode 100644
index 000000000000..a386d8874acd
--- /dev/null
+++ b/media-video/mplayer/mplayer-1.2_pre20150214.ebuild
@@ -0,0 +1,628 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI="git://git.videolan.org/ffmpeg.git"
+ESVN_REPO_URI="svn://svn.mplayerhq.hu/mplayer/trunk"
+[[ ${PV} = *9999* ]] && SVN_ECLASS="subversion git-2" || SVN_ECLASS=""
+
+inherit toolchain-funcs eutils flag-o-matic multilib base ${SVN_ECLASS}
+
+IUSE="cpu_flags_x86_3dnow cpu_flags_x86_3dnowext a52 aalib +alsa altivec aqua bidi bl bluray
+bs2b cddb +cdio cdparanoia cpudetection debug dga
+directfb doc dts dv dvb +dvd +dvdnav +enca +encode faac faad fbcon
+ftp gif ggi gsm +iconv ipv6 jack joystick jpeg jpeg2k kernel_linux ladspa
++libass libcaca libmpeg2 lirc live lzo mad md5sum +cpu_flags_x86_mmx cpu_flags_x86_mmxext mng mp3 nas
++network nut openal opengl +osdmenu oss png pnm pulseaudio pvr
+radio rar rtc rtmp samba selinux +shm sdl speex cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_ssse3
+tga theora tremor +truetype toolame twolame +unicode v4l vdpau vidix
+vorbis +X x264 xanim xinerama +xscreensaver +xv xvid xvmc zoran"
+
+VIDEO_CARDS="s3virge mga tdfx"
+for x in ${VIDEO_CARDS}; do
+ IUSE+=" video_cards_${x}"
+done
+
+FONT_URI="
+ mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2
+ mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2
+ mirror://mplayer/releases/fonts/font-arial-cp1250.tar.bz2
+"
+if [[ ${PV} == *9999* ]]; then
+ RELEASE_URI=""
+elif [ "${PV%_rc*}" = "${PV}" -a "${PV%_pre*}" = "${PV}" ]; then
+ MY_P="MPlayer-${PV}"
+ S="${WORKDIR}/${MY_P}"
+ RELEASE_URI="mirror://mplayer/releases/${MY_P}.tar.xz"
+else
+ RELEASE_URI="mirror://gentoo/${P}.tar.xz"
+fi
+SRC_URI="${RELEASE_URI}
+ !truetype? ( ${FONT_URI} )"
+
+DESCRIPTION="Media Player for Linux"
+HOMEPAGE="http://www.mplayerhq.hu/"
+
+FONT_RDEPS="
+ virtual/ttf-fonts
+ media-libs/fontconfig
+ >=media-libs/freetype-2.2.1:2
+"
+X_RDEPS="
+ x11-libs/libXext
+ x11-libs/libXxf86vm
+"
+# Rar: althrought -gpl version is nice, it cant do most functions normal rars can
+# nemesi? ( net-libs/libnemesi )
+RDEPEND+="
+ sys-libs/ncurses
+ app-arch/bzip2
+ sys-libs/zlib
+ >=media-video/ffmpeg-2.0:0
+ a52? ( media-libs/a52dec )
+ aalib? ( media-libs/aalib )
+ alsa? ( media-libs/alsa-lib )
+ bidi? ( dev-libs/fribidi )
+ bluray? ( >=media-libs/libbluray-0.2.1 )
+ bs2b? ( media-libs/libbs2b )
+ cdio? ( dev-libs/libcdio )
+ cdparanoia? ( !cdio? ( media-sound/cdparanoia ) )
+ dga? ( x11-libs/libXxf86dga )
+ directfb? ( dev-libs/DirectFB )
+ dts? ( media-libs/libdca )
+ dv? ( media-libs/libdv )
+ dvb? ( virtual/linuxtv-dvb-headers )
+ dvd? ( >=media-libs/libdvdread-4.1.3 )
+ dvdnav? ( >=media-libs/libdvdnav-4.1.3 )
+ encode? (
+ !twolame? ( toolame? ( media-sound/toolame ) )
+ twolame? ( media-sound/twolame )
+ faac? ( media-libs/faac )
+ mp3? ( media-sound/lame )
+ x264? ( >=media-libs/x264-0.0.20100423:= )
+ xvid? ( media-libs/xvid )
+ )
+ enca? ( app-i18n/enca )
+ faad? ( media-libs/faad2 )
+ ggi? ( media-libs/libggi media-libs/libggiwmh )
+ gif? ( media-libs/giflib )
+ gsm? ( media-sound/gsm )
+ iconv? ( virtual/libiconv )
+ jack? ( media-sound/jack-audio-connection-kit )
+ jpeg? ( virtual/jpeg:0 )
+ jpeg2k? ( media-libs/openjpeg:0 )
+ ladspa? ( media-libs/ladspa-sdk )
+ libass? ( >=media-libs/libass-0.9.10:=[enca?] )
+ libcaca? ( media-libs/libcaca )
+ libmpeg2? ( media-libs/libmpeg2 )
+ lirc? ( app-misc/lirc )
+ live? ( media-plugins/live )
+ lzo? ( >=dev-libs/lzo-2 )
+ mad? ( media-libs/libmad )
+ mng? ( media-libs/libmng:= )
+ mp3? ( media-sound/mpg123 )
+ nas? ( media-libs/nas )
+ nut? ( >=media-libs/libnut-661 )
+ openal? ( media-libs/openal )
+ opengl? ( virtual/opengl )
+ png? ( media-libs/libpng:0= )
+ pnm? ( media-libs/netpbm )
+ pulseaudio? ( media-sound/pulseaudio )
+ rar? (
+ || (
+ app-arch/unrar
+ app-arch/rar
+ )
+ )
+ rtmp? ( media-video/rtmpdump )
+ samba? ( net-fs/samba )
+ sdl? ( media-libs/libsdl )
+ speex? ( media-libs/speex )
+ theora? ( media-libs/libtheora[encode?] )
+ tremor? ( media-libs/tremor )
+ truetype? ( ${FONT_RDEPS} )
+ vdpau? ( x11-libs/libvdpau )
+ vorbis? ( !tremor? ( media-libs/libvorbis ) )
+ X? ( ${X_RDEPS} )
+ xanim? ( media-video/xanim )
+ xinerama? ( x11-libs/libXinerama )
+ xscreensaver? ( x11-libs/libXScrnSaver )
+ xv? ( x11-libs/libXv )
+ xvmc? ( x11-libs/libXvMC )
+"
+
+X_DEPS="
+ x11-proto/videoproto
+ x11-proto/xf86vidmodeproto
+"
+ASM_DEP="dev-lang/yasm"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ dga? ( x11-proto/xf86dgaproto )
+ X? ( ${X_DEPS} )
+ xinerama? ( x11-proto/xineramaproto )
+ xscreensaver? ( x11-proto/scrnsaverproto )
+ amd64? ( ${ASM_DEP} )
+ doc? (
+ dev-libs/libxslt app-text/docbook-xml-dtd
+ app-text/docbook-xsl-stylesheets
+ )
+ x86? ( ${ASM_DEP} )
+ x86-fbsd? ( ${ASM_DEP} )
+"
+RDEPEND+="
+ selinux? ( sec-policy/selinux-mplayer )
+"
+
+SLOT="0"
+LICENSE="GPL-2"
+if [[ ${PV} != *9999* ]]; then
+ KEYWORDS="~alpha amd64 arm hppa ppc ppc64 ~sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+else
+ KEYWORDS="arm hppa"
+fi
+
+# faac codecs are nonfree
+# libcdio support: prefer libcdio over cdparanoia and don't check for cddb w/cdio
+# dvd navigation requires dvd read support
+# ass and freetype font require iconv and ass requires freetype fonts
+# unicode transformations are usefull only with iconv
+# radio requires oss or alsa backend
+# xvmc requires xvideo support
+REQUIRED_USE="
+ dga? ( X )
+ dvdnav? ( dvd )
+ enca? ( iconv )
+ ggi? ( X )
+ libass? ( truetype )
+ opengl? ( X )
+ osdmenu? ( X )
+ truetype? ( iconv )
+ vdpau? ( X )
+ vidix? ( X )
+ xinerama? ( X )
+ xscreensaver? ( X )
+ xv? ( X )
+ xvmc? ( xv )"
+RESTRICT="faac? ( bindist )"
+
+pkg_setup() {
+ if [[ ${PV} == *9999* ]]; then
+ elog
+ elog "This is a live ebuild which installs the latest from upstream's"
+ elog "subversion repository, and is unsupported by Gentoo."
+ elog "Everything but bugs in the ebuild itself will be ignored."
+ elog
+ fi
+
+ if use cpudetection; then
+ ewarn
+ ewarn "You've enabled the cpudetection flag. This feature is"
+ ewarn "included mainly for people who want to use the same"
+ ewarn "binary on another system with a different CPU architecture."
+ ewarn "MPlayer will already detect your CPU settings by default at"
+ ewarn "buildtime; this flag is used for runtime detection."
+ ewarn "You won't need this turned on if you are only building"
+ ewarn "mplayer for this system. Also, if your compile fails, try"
+ ewarn "disabling this use flag."
+ fi
+
+ if has_version 'media-video/libav' ; then
+ ewarn "Please note that upstream uses media-video/ffmpeg."
+ ewarn "media-video/libav should be fine in theory but if you"
+ ewarn "experience any problem, try to move to media-video/ffmpeg."
+ fi
+}
+
+src_unpack() {
+ if [[ ${PV} = *9999* ]]; then
+ subversion_src_unpack
+ cd "${WORKDIR}"
+ rm -rf "${WORKDIR}/${P}/ffmpeg/"
+ ( S="${WORKDIR}/${P}/ffmpeg/" git-2_src_unpack )
+ else
+ unpack ${A}
+ fi
+
+ if [[ ${PV} = *9999* ]] || [[ "${PV%_rc*}" = "${PV}" ]]; then
+ cd "${S}"
+ cp "${FILESDIR}/dump_ffmpeg.sh" . || die
+ chmod +x dump_ffmpeg.sh
+ ./dump_ffmpeg.sh || die
+ fi
+
+ if ! use truetype; then
+ unpack font-arial-iso-8859-1.tar.bz2 \
+ font-arial-iso-8859-2.tar.bz2 \
+ font-arial-cp1250.tar.bz2
+ fi
+}
+
+src_prepare() {
+ local svf=snapshot_version
+ if [[ ${PV} = *9999* ]]; then
+ # Set SVN version manually
+ subversion_wc_info
+ printf "${ESVN_WC_REVISION}" > $svf
+ fi
+ if [ ! -f VERSION ] ; then
+ [ -f "$svf" ] || die "Missing ${svf}. Did you generate your snapshot with prepare_mplayer.sh?"
+ local sv=$(<$svf)
+ printf "SVN-r${sv} (Gentoo)" > VERSION
+ fi
+
+ # fix path to bash executable in configure scripts
+ sed -i -e "1c\#!${EPREFIX}/bin/bash" configure version.sh || die
+
+ base_src_prepare
+
+ # Use sane default for >=virtual/udev-197
+ sed -i -e '/default_dvd_device/s:/dev/dvd:/dev/cdrom:' configure || die
+}
+
+src_configure() {
+ local myconf=""
+ local uses i
+
+ # set LINGUAS
+ [[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/da/dk}"
+ [[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/zh/zh_CN}" #482968
+
+ # mplayer ebuild uses "use foo || --disable-foo" to forcibly disable
+ # compilation in almost every situation. The reason for this is
+ # because if --enable is used, it will force the build of that option,
+ # regardless of whether the dependency is available or not.
+
+ ###################
+ #Optional features#
+ ###################
+ # disable svga since we don't want it
+ # disable arts since we don't have kde3
+ # always disable internal ass
+ # disable opus and ilbc since it only controls support in internal
+ # ffmpeg which we do not use
+ myconf+="
+ --disable-svga --disable-svgalib_helper
+ --disable-ass-internal
+ --disable-arts
+ --disable-kai
+ --disable-libopus
+ --disable-libilbc
+ $(use_enable network networking)
+ $(use_enable joystick)
+ "
+ uses="bl bluray enca ftp rtc" # nemesi <- not working with in-tree ebuild
+ myconf+=" --disable-nemesi" # nemesi automagic disable
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ use bidi || myconf+=" --disable-fribidi"
+ use ipv6 || myconf+=" --disable-inet6"
+ use libass || myconf+=" --disable-ass"
+ use nut || myconf+=" --disable-libnut"
+ use rar || myconf+=" --disable-unrarexec"
+ use samba || myconf+=" --disable-smb"
+ use lirc || myconf+=" --disable-lirc --disable-lircc --disable-apple-ir"
+
+ # libcdio support: prefer libcdio over cdparanoia
+ # don't check for cddb w/cdio
+ if use cdio; then
+ myconf+=" --disable-cdparanoia"
+ else
+ myconf+=" --disable-libcdio"
+ use cdparanoia || myconf+=" --disable-cdparanoia"
+ use cddb || myconf+=" --disable-cddb"
+ fi
+
+ ################################
+ # DVD read, navigation support #
+ ################################
+ #
+ # dvdread - accessing a DVD
+ # dvdnav - navigation of menus
+ use dvd || myconf+=" --disable-dvdread"
+ use dvdnav || myconf+=" --disable-dvdnav"
+
+ #############
+ # Subtitles #
+ #############
+ #
+ # SRT/ASS/SSA (subtitles) requires freetype support
+ # freetype support requires iconv
+ # iconv optionally can use unicode
+ use truetype || myconf+=" --disable-freetype"
+ use iconv || myconf+=" --disable-iconv --charset=noconv"
+ use iconv && use unicode && myconf+=" --charset=UTF-8"
+
+ #####################################
+ # DVB / Video4Linux / Radio support #
+ #####################################
+ myconf+=" --disable-tv-bsdbt848"
+ # broken upstream, won't work with recent kernels
+ myconf+=" --disable-ivtv"
+ # gone since linux-headers-2.6.38
+ myconf+=" --disable-tv-v4l1"
+ if { use dvb || use v4l || use pvr || use radio; }; then
+ use dvb || myconf+=" --disable-dvb"
+ use pvr || myconf+=" --disable-pvr"
+ use v4l || myconf+=" --disable-tv-v4l2"
+ if use radio && { use dvb || use v4l; }; then
+ myconf+="
+ --enable-radio
+ $(use_enable encode radio-capture)
+ "
+ else
+ myconf+="
+ --disable-radio-v4l2
+ --disable-radio-bsdbt848
+ "
+ fi
+ else
+ myconf+="
+ --disable-tv
+ --disable-tv-v4l2
+ --disable-radio
+ --disable-radio-v4l2
+ --disable-radio-bsdbt848
+ --disable-dvb
+ --disable-v4l2
+ --disable-pvr"
+ fi
+
+ ##########
+ # Codecs #
+ ##########
+ myconf+=" --disable-musepack" # Use internal musepack codecs for SV7 and SV8 support
+ myconf+=" --disable-libmpeg2-internal" # always use system media-libs/libmpeg2
+ use dts || myconf+=" --disable-libdca"
+ if ! use mp3; then
+ myconf+="
+ --disable-mp3lame
+ --disable-mpg123
+ "
+ fi
+ uses="a52 bs2b dv gsm lzo rtmp vorbis"
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-lib${i}"
+ done
+
+ uses="faad gif jpeg libmpeg2 live mad mng png pnm speex tga theora tremor xanim"
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ use jpeg2k || myconf+=" --disable-libopenjpeg"
+
+ # Encoding
+ uses="faac x264 xvid toolame twolame"
+ if use encode; then
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ else
+ myconf+=" --disable-mencoder"
+ for i in ${uses}; do
+ myconf+=" --disable-${i}"
+ use ${i} && elog "Useflag \"${i}\" will only be useful for encoding, i.e., with \"encode\" useflag enabled."
+ done
+ fi
+
+ #################
+ # Binary codecs #
+ #################
+ myconf+=" --disable-qtx --disable-real --disable-win32dll"
+
+ ################
+ # Video Output #
+ ################
+ uses="directfb md5sum sdl"
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ use aalib || myconf+=" --disable-aa"
+ use fbcon || myconf+=" --disable-fbdev"
+ use fbcon && use video_cards_s3virge && myconf+=" --enable-s3fb"
+ use libcaca || myconf+=" --disable-caca"
+ use zoran || myconf+=" --disable-zr"
+
+ if ! use kernel_linux || ! use video_cards_mga; then
+ myconf+=" --disable-mga --disable-xmga"
+ fi
+
+ if use video_cards_tdfx; then
+ myconf+="
+ $(use_enable video_cards_tdfx tdfxvid)
+ $(use_enable fbcon tdfxfb)
+ "
+ else
+ myconf+="
+ --disable-3dfx
+ --disable-tdfxvid
+ --disable-tdfxfb
+ "
+ fi
+
+ # sun card, disable by default, see bug #258729
+ myconf+=" --disable-xvr100"
+
+ ################
+ # Audio Output #
+ ################
+ myconf+=" --disable-esd"
+ uses="alsa jack ladspa nas openal"
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ use pulseaudio || myconf+=" --disable-pulse"
+ if ! use radio; then
+ use oss || myconf+=" --disable-ossaudio"
+ fi
+
+ ####################
+ # Advanced Options #
+ ####################
+ # Platform specific flags, hardcoded on amd64 (see below)
+ use cpudetection && myconf+=" --enable-runtime-cpudetection"
+
+ uses="3dnow 3dnowext mmx mmxext sse sse2 ssse3"
+ for i in ${uses}; do
+ myconf+=" $(use_enable cpu_flags_x86_${i} ${i})"
+ done
+
+ uses="altivec shm"
+ for i in ${uses}; do
+ myconf+=" $(use_enable ${i})"
+ done
+
+ use debug && myconf+=" --enable-debug=3"
+
+ if use x86 && gcc-specs-pie; then
+ filter-flags -fPIC -fPIE
+ append-ldflags -nopie
+ fi
+
+ ###########################
+ # X enabled configuration #
+ ###########################
+ myconf+=" --disable-gui"
+ myconf+=" --disable-vesa"
+ uses="ggi vdpau xinerama xv"
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ use dga || myconf+=" --disable-dga1 --disable-dga2"
+ use opengl || myconf+=" --disable-gl"
+ use osdmenu && myconf+=" --enable-menu"
+ use vidix || myconf+=" --disable-vidix --disable-vidix-pcidb"
+ use xscreensaver || myconf+=" --disable-xss"
+ use X || myconf+=" --disable-x11"
+ if use xvmc; then
+ myconf+=" --enable-xvmc --with-xvmclib=XvMCW"
+ else
+ myconf+=" --disable-xvmc"
+ fi
+
+ ############################
+ # OSX (aqua) configuration #
+ ############################
+ if use aqua; then
+ myconf+="
+ --enable-macosx-finder
+ --enable-macosx-bundle
+ "
+ fi
+
+ ./configure \
+ --cc="$(tc-getCC)" \
+ --host-cc="$(tc-getBUILD_CC)" \
+ --prefix="${EPREFIX}/usr" \
+ --bindir="${EPREFIX}/usr/bin" \
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \
+ --confdir="${EPREFIX}/etc/mplayer" \
+ --datadir="${EPREFIX}/usr/share/mplayer${namesuf}" \
+ --mandir="${EPREFIX}/usr/share/man" \
+ --disable-ffmpeg_a \
+ ${myconf} || die
+}
+
+src_compile() {
+ base_src_compile
+ # Build only user-requested docs if they're available.
+ if use doc ; then
+ # select available languages from $LINGUAS
+ local ALLOWED_LINGUAS="cs de en es fr hu it pl ru zh_CN"
+ local BUILT_DOCS=""
+ for i in ${LINGUAS} ; do
+ has ${i} ${ALLOWED_LINGUAS} && BUILT_DOCS+=" ${i}"
+ done
+ if [[ -z $BUILT_DOCS ]]; then
+ emake -j1 html-chunked
+ else
+ for i in ${BUILT_DOCS}; do
+ emake -j1 html-chunked-${i}
+ done
+ fi
+ fi
+}
+
+src_install() {
+ local i
+
+ emake \
+ DESTDIR="${D}" \
+ INSTALLSTRIP="" \
+ install
+
+ dodoc AUTHORS Changelog Copyright README etc/codecs.conf
+
+ docinto tech/
+ dodoc DOCS/tech/{*.txt,MAINTAINERS,mpsub.sub,playtree,TODO,wishlist}
+ docinto TOOLS/
+ dodoc -r TOOLS
+ docinto tech/mirrors/
+ dodoc DOCS/tech/mirrors/*
+
+ if use doc; then
+ docinto html/
+ dohtml -r "${S}"/DOCS/HTML/*
+ fi
+
+ if ! use truetype; then
+ dodir /usr/share/mplayer/fonts
+ # Do this generic, as the mplayer people like to change the structure
+ # of their zips ...
+ for i in $(find "${WORKDIR}/" -type d -name 'font-arial-*'); do
+ cp -pPR "${i}" "${ED}/usr/share/mplayer/fonts"
+ done
+ # Fix the font symlink ...
+ rm -rf "${ED}/usr/share/mplayer/font"
+ dosym fonts/font-arial-14-iso-8859-1 /usr/share/mplayer/font
+ fi
+
+ insinto /etc/mplayer
+ newins "${S}/etc/example.conf" mplayer.conf
+ cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
+# Config options can be section specific, global
+# options should go in the default section
+[default]
+_EOF_
+ doins "${S}/etc/input.conf"
+ if use osdmenu; then
+ doins "${S}/etc/menu.conf"
+ fi
+
+ if use truetype; then
+ cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
+fontconfig=1
+subfont-osd-scale=4
+subfont-text-scale=3
+_EOF_
+ fi
+
+ # bug 256203
+ if use rar; then
+ cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
+unrarexec=${EPREFIX}/usr/bin/unrar
+_EOF_
+ fi
+
+ dosym ../../../etc/mplayer/mplayer.conf /usr/share/mplayer/mplayer.conf
+ newbin "${S}/TOOLS/midentify.sh" midentify
+}
+
+pkg_preinst() {
+ [[ -d ${EROOT}/usr/share/mplayer/Skin/default ]] && \
+ rm -rf "${EROOT}/usr/share/mplayer/Skin/default"
+}
+
+pkg_postrm() {
+ # Cleanup stale symlinks
+ [ -L "${EROOT}/usr/share/mplayer/font" -a \
+ ! -e "${EROOT}/usr/share/mplayer/font" ] && \
+ rm -f "${EROOT}/usr/share/mplayer/font"
+
+ [ -L "${EROOT}/usr/share/mplayer/subfont.ttf" -a \
+ ! -e "${EROOT}/usr/share/mplayer/subfont.ttf" ] && \
+ rm -f "${EROOT}/usr/share/mplayer/subfont.ttf"
+}
diff --git a/media-video/mplayer/mplayer-1.2_pre20150730.ebuild b/media-video/mplayer/mplayer-1.2_pre20150730.ebuild
new file mode 100644
index 000000000000..633438f2218d
--- /dev/null
+++ b/media-video/mplayer/mplayer-1.2_pre20150730.ebuild
@@ -0,0 +1,633 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI="git://git.videolan.org/ffmpeg.git"
+ESVN_REPO_URI="svn://svn.mplayerhq.hu/mplayer/trunk"
+[[ ${PV} = *9999* ]] && SVN_ECLASS="subversion git-2" || SVN_ECLASS=""
+
+inherit toolchain-funcs eutils flag-o-matic multilib base ${SVN_ECLASS}
+
+IUSE="cpu_flags_x86_3dnow cpu_flags_x86_3dnowext a52 aalib +alsa altivec aqua bidi bl bluray
+bs2b cddb +cdio cdparanoia cpudetection debug dga
+directfb doc dts dv dvb +dvd +dvdnav +enca +encode faac faad fbcon
+ftp gif ggi gsm +iconv ipv6 jack joystick jpeg jpeg2k kernel_linux ladspa
++libass libcaca libmpeg2 lirc live lzo mad md5sum +cpu_flags_x86_mmx cpu_flags_x86_mmxext mng mp3 nas
++network nut openal opengl +osdmenu oss png pnm pulseaudio pvr
+radio rar rtc rtmp samba selinux +shm sdl speex cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_ssse3
+tga theora tremor +truetype toolame twolame +unicode v4l vdpau vidix
+vorbis +X x264 xanim xinerama +xscreensaver +xv xvid xvmc zoran"
+
+VIDEO_CARDS="s3virge mga tdfx"
+for x in ${VIDEO_CARDS}; do
+ IUSE+=" video_cards_${x}"
+done
+
+FONT_URI="
+ mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2
+ mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2
+ mirror://mplayer/releases/fonts/font-arial-cp1250.tar.bz2
+"
+if [[ ${PV} == *9999* ]]; then
+ RELEASE_URI=""
+elif [ "${PV%_rc*}" = "${PV}" -a "${PV%_pre*}" = "${PV}" ]; then
+ MY_P="MPlayer-${PV}"
+ S="${WORKDIR}/${MY_P}"
+ RELEASE_URI="mirror://mplayer/releases/${MY_P}.tar.xz"
+else
+ RELEASE_URI="mirror://gentoo/${P}.tar.xz"
+fi
+SRC_URI="${RELEASE_URI}
+ !truetype? ( ${FONT_URI} )"
+
+DESCRIPTION="Media Player for Linux"
+HOMEPAGE="http://www.mplayerhq.hu/"
+
+FONT_RDEPS="
+ virtual/ttf-fonts
+ media-libs/fontconfig
+ >=media-libs/freetype-2.2.1:2
+"
+X_RDEPS="
+ x11-libs/libXext
+ x11-libs/libXxf86vm
+"
+# Rar: althrought -gpl version is nice, it cant do most functions normal rars can
+# nemesi? ( net-libs/libnemesi )
+RDEPEND+="
+ sys-libs/ncurses
+ app-arch/bzip2
+ sys-libs/zlib
+ >=media-video/ffmpeg-2.6:0=
+ a52? ( media-libs/a52dec )
+ aalib? ( media-libs/aalib )
+ alsa? ( media-libs/alsa-lib )
+ bidi? ( dev-libs/fribidi )
+ bluray? ( >=media-libs/libbluray-0.2.1 )
+ bs2b? ( media-libs/libbs2b )
+ cdio? ( dev-libs/libcdio )
+ cdparanoia? ( !cdio? ( media-sound/cdparanoia ) )
+ dga? ( x11-libs/libXxf86dga )
+ directfb? ( dev-libs/DirectFB )
+ dts? ( media-libs/libdca )
+ dv? ( media-libs/libdv )
+ dvb? ( virtual/linuxtv-dvb-headers )
+ dvd? ( >=media-libs/libdvdread-4.1.3 )
+ dvdnav? ( >=media-libs/libdvdnav-4.1.3 )
+ encode? (
+ !twolame? ( toolame? ( media-sound/toolame ) )
+ twolame? ( media-sound/twolame )
+ faac? ( media-libs/faac )
+ mp3? ( media-sound/lame )
+ x264? ( >=media-libs/x264-0.0.20100423:= )
+ xvid? ( media-libs/xvid )
+ )
+ enca? ( app-i18n/enca )
+ faad? ( media-libs/faad2 )
+ ggi? ( media-libs/libggi media-libs/libggiwmh )
+ gif? ( media-libs/giflib )
+ gsm? ( media-sound/gsm )
+ iconv? ( virtual/libiconv )
+ jack? ( media-sound/jack-audio-connection-kit )
+ jpeg? ( virtual/jpeg:0 )
+ jpeg2k? ( media-libs/openjpeg:0 )
+ ladspa? ( media-libs/ladspa-sdk )
+ libass? ( >=media-libs/libass-0.9.10:=[enca?] )
+ libcaca? ( media-libs/libcaca )
+ libmpeg2? ( media-libs/libmpeg2 )
+ lirc? ( app-misc/lirc )
+ live? ( media-plugins/live )
+ lzo? ( >=dev-libs/lzo-2 )
+ mad? ( media-libs/libmad )
+ mng? ( media-libs/libmng:= )
+ mp3? ( media-sound/mpg123 )
+ nas? ( media-libs/nas )
+ nut? ( >=media-libs/libnut-661 )
+ openal? ( media-libs/openal )
+ opengl? ( virtual/opengl )
+ png? ( media-libs/libpng:0= )
+ pnm? ( media-libs/netpbm )
+ pulseaudio? ( media-sound/pulseaudio )
+ rar? (
+ || (
+ app-arch/unrar
+ app-arch/rar
+ )
+ )
+ rtmp? ( media-video/rtmpdump )
+ samba? ( net-fs/samba )
+ sdl? ( media-libs/libsdl )
+ speex? ( media-libs/speex )
+ theora? ( media-libs/libtheora[encode?] )
+ tremor? ( media-libs/tremor )
+ truetype? ( ${FONT_RDEPS} )
+ vdpau? ( x11-libs/libvdpau )
+ vorbis? ( !tremor? ( media-libs/libvorbis ) )
+ X? ( ${X_RDEPS} )
+ xanim? ( media-video/xanim )
+ xinerama? ( x11-libs/libXinerama )
+ xscreensaver? ( x11-libs/libXScrnSaver )
+ xv? ( x11-libs/libXv )
+ xvmc? ( x11-libs/libXvMC )
+"
+
+X_DEPS="
+ x11-proto/videoproto
+ x11-proto/xf86vidmodeproto
+"
+ASM_DEP="dev-lang/yasm"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ dga? ( x11-proto/xf86dgaproto )
+ X? ( ${X_DEPS} )
+ xinerama? ( x11-proto/xineramaproto )
+ xscreensaver? ( x11-proto/scrnsaverproto )
+ amd64? ( ${ASM_DEP} )
+ doc? (
+ dev-libs/libxslt app-text/docbook-xml-dtd
+ app-text/docbook-xsl-stylesheets
+ )
+ x86? ( ${ASM_DEP} )
+ x86-fbsd? ( ${ASM_DEP} )
+"
+RDEPEND+="
+ selinux? ( sec-policy/selinux-mplayer )
+"
+
+SLOT="0"
+LICENSE="GPL-2"
+if [[ ${PV} != *9999* ]]; then
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+else
+ KEYWORDS=""
+fi
+
+# faac codecs are nonfree
+# libcdio support: prefer libcdio over cdparanoia and don't check for cddb w/cdio
+# dvd navigation requires dvd read support
+# ass and freetype font require iconv and ass requires freetype fonts
+# unicode transformations are usefull only with iconv
+# radio requires oss or alsa backend
+# xvmc requires xvideo support
+REQUIRED_USE="
+ dga? ( X )
+ dvdnav? ( dvd )
+ enca? ( iconv )
+ ggi? ( X )
+ libass? ( truetype )
+ opengl? ( X )
+ osdmenu? ( X )
+ truetype? ( iconv )
+ vdpau? ( X )
+ vidix? ( X )
+ xinerama? ( X )
+ xscreensaver? ( X )
+ xv? ( X )
+ xvmc? ( xv )"
+RESTRICT="faac? ( bindist )"
+
+PATCHES=(
+ # Work with pulseaudio-6, bug #549680, https://trac.mplayerhq.hu/ticket/2241
+ "${FILESDIR}"/${PN}-1.2_pre20150214-pulseaudio-6.0.patch
+)
+
+pkg_setup() {
+ if [[ ${PV} == *9999* ]]; then
+ elog
+ elog "This is a live ebuild which installs the latest from upstream's"
+ elog "subversion repository, and is unsupported by Gentoo."
+ elog "Everything but bugs in the ebuild itself will be ignored."
+ elog
+ fi
+
+ if use cpudetection; then
+ ewarn
+ ewarn "You've enabled the cpudetection flag. This feature is"
+ ewarn "included mainly for people who want to use the same"
+ ewarn "binary on another system with a different CPU architecture."
+ ewarn "MPlayer will already detect your CPU settings by default at"
+ ewarn "buildtime; this flag is used for runtime detection."
+ ewarn "You won't need this turned on if you are only building"
+ ewarn "mplayer for this system. Also, if your compile fails, try"
+ ewarn "disabling this use flag."
+ fi
+
+ if has_version 'media-video/libav' ; then
+ ewarn "Please note that upstream uses media-video/ffmpeg."
+ ewarn "media-video/libav should be fine in theory but if you"
+ ewarn "experience any problem, try to move to media-video/ffmpeg."
+ fi
+}
+
+src_unpack() {
+ if [[ ${PV} = *9999* ]]; then
+ subversion_src_unpack
+ cd "${WORKDIR}"
+ rm -rf "${WORKDIR}/${P}/ffmpeg/"
+ ( S="${WORKDIR}/${P}/ffmpeg/" git-2_src_unpack )
+ else
+ unpack ${A}
+ fi
+
+ if [[ ${PV} = *9999* ]] || [[ "${PV%_rc*}" = "${PV}" ]]; then
+ cd "${S}"
+ cp "${FILESDIR}/dump_ffmpeg.sh" . || die
+ chmod +x dump_ffmpeg.sh
+ ./dump_ffmpeg.sh || die
+ fi
+
+ if ! use truetype; then
+ unpack font-arial-iso-8859-1.tar.bz2 \
+ font-arial-iso-8859-2.tar.bz2 \
+ font-arial-cp1250.tar.bz2
+ fi
+}
+
+src_prepare() {
+ local svf=snapshot_version
+ if [[ ${PV} = *9999* ]]; then
+ # Set SVN version manually
+ subversion_wc_info
+ printf "${ESVN_WC_REVISION}" > $svf
+ fi
+ if [ ! -f VERSION ] ; then
+ [ -f "$svf" ] || die "Missing ${svf}. Did you generate your snapshot with prepare_mplayer.sh?"
+ local sv=$(<$svf)
+ printf "SVN-r${sv} (Gentoo)" > VERSION
+ fi
+
+ # fix path to bash executable in configure scripts
+ sed -i -e "1c\#!${EPREFIX}/bin/bash" configure version.sh || die
+
+ base_src_prepare
+
+ # Use sane default for >=virtual/udev-197
+ sed -i -e '/default_dvd_device/s:/dev/dvd:/dev/cdrom:' configure || die
+}
+
+src_configure() {
+ local myconf=""
+ local uses i
+
+ # set LINGUAS
+ [[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/da/dk}"
+ [[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/zh/zh_CN}" #482968
+
+ # mplayer ebuild uses "use foo || --disable-foo" to forcibly disable
+ # compilation in almost every situation. The reason for this is
+ # because if --enable is used, it will force the build of that option,
+ # regardless of whether the dependency is available or not.
+
+ ###################
+ #Optional features#
+ ###################
+ # disable svga since we don't want it
+ # disable arts since we don't have kde3
+ # always disable internal ass
+ # disable opus and ilbc since it only controls support in internal
+ # ffmpeg which we do not use
+ myconf+="
+ --disable-svga --disable-svgalib_helper
+ --disable-ass-internal
+ --disable-arts
+ --disable-kai
+ --disable-libopus
+ --disable-libilbc
+ $(use_enable network networking)
+ $(use_enable joystick)
+ "
+ uses="bl bluray enca ftp rtc" # nemesi <- not working with in-tree ebuild
+ myconf+=" --disable-nemesi" # nemesi automagic disable
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ use bidi || myconf+=" --disable-fribidi"
+ use ipv6 || myconf+=" --disable-inet6"
+ use libass || myconf+=" --disable-ass"
+ use nut || myconf+=" --disable-libnut"
+ use rar || myconf+=" --disable-unrarexec"
+ use samba || myconf+=" --disable-smb"
+ use lirc || myconf+=" --disable-lirc --disable-lircc --disable-apple-ir"
+
+ # libcdio support: prefer libcdio over cdparanoia
+ # don't check for cddb w/cdio
+ if use cdio; then
+ myconf+=" --disable-cdparanoia"
+ else
+ myconf+=" --disable-libcdio"
+ use cdparanoia || myconf+=" --disable-cdparanoia"
+ use cddb || myconf+=" --disable-cddb"
+ fi
+
+ ################################
+ # DVD read, navigation support #
+ ################################
+ #
+ # dvdread - accessing a DVD
+ # dvdnav - navigation of menus
+ use dvd || myconf+=" --disable-dvdread"
+ use dvdnav || myconf+=" --disable-dvdnav"
+
+ #############
+ # Subtitles #
+ #############
+ #
+ # SRT/ASS/SSA (subtitles) requires freetype support
+ # freetype support requires iconv
+ # iconv optionally can use unicode
+ use truetype || myconf+=" --disable-freetype"
+ use iconv || myconf+=" --disable-iconv --charset=noconv"
+ use iconv && use unicode && myconf+=" --charset=UTF-8"
+
+ #####################################
+ # DVB / Video4Linux / Radio support #
+ #####################################
+ myconf+=" --disable-tv-bsdbt848"
+ # broken upstream, won't work with recent kernels
+ myconf+=" --disable-ivtv"
+ # gone since linux-headers-2.6.38
+ myconf+=" --disable-tv-v4l1"
+ if { use dvb || use v4l || use pvr || use radio; }; then
+ use dvb || myconf+=" --disable-dvb"
+ use pvr || myconf+=" --disable-pvr"
+ use v4l || myconf+=" --disable-tv-v4l2"
+ if use radio && { use dvb || use v4l; }; then
+ myconf+="
+ --enable-radio
+ $(use_enable encode radio-capture)
+ "
+ else
+ myconf+="
+ --disable-radio-v4l2
+ --disable-radio-bsdbt848
+ "
+ fi
+ else
+ myconf+="
+ --disable-tv
+ --disable-tv-v4l2
+ --disable-radio
+ --disable-radio-v4l2
+ --disable-radio-bsdbt848
+ --disable-dvb
+ --disable-v4l2
+ --disable-pvr"
+ fi
+
+ ##########
+ # Codecs #
+ ##########
+ myconf+=" --disable-musepack" # Use internal musepack codecs for SV7 and SV8 support
+ myconf+=" --disable-libmpeg2-internal" # always use system media-libs/libmpeg2
+ use dts || myconf+=" --disable-libdca"
+ if ! use mp3; then
+ myconf+="
+ --disable-mp3lame
+ --disable-mpg123
+ "
+ fi
+ uses="a52 bs2b dv gsm lzo rtmp vorbis"
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-lib${i}"
+ done
+
+ uses="faad gif jpeg libmpeg2 live mad mng png pnm speex tga theora tremor xanim"
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ use jpeg2k || myconf+=" --disable-libopenjpeg"
+
+ # Encoding
+ uses="faac x264 xvid toolame twolame"
+ if use encode; then
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ else
+ myconf+=" --disable-mencoder"
+ for i in ${uses}; do
+ myconf+=" --disable-${i}"
+ use ${i} && elog "Useflag \"${i}\" will only be useful for encoding, i.e., with \"encode\" useflag enabled."
+ done
+ fi
+
+ #################
+ # Binary codecs #
+ #################
+ myconf+=" --disable-qtx --disable-real --disable-win32dll"
+
+ ################
+ # Video Output #
+ ################
+ uses="directfb md5sum sdl"
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ use aalib || myconf+=" --disable-aa"
+ use fbcon || myconf+=" --disable-fbdev"
+ use fbcon && use video_cards_s3virge && myconf+=" --enable-s3fb"
+ use libcaca || myconf+=" --disable-caca"
+ use zoran || myconf+=" --disable-zr"
+
+ if ! use kernel_linux || ! use video_cards_mga; then
+ myconf+=" --disable-mga --disable-xmga"
+ fi
+
+ if use video_cards_tdfx; then
+ myconf+="
+ $(use_enable video_cards_tdfx tdfxvid)
+ $(use_enable fbcon tdfxfb)
+ "
+ else
+ myconf+="
+ --disable-3dfx
+ --disable-tdfxvid
+ --disable-tdfxfb
+ "
+ fi
+
+ # sun card, disable by default, see bug #258729
+ myconf+=" --disable-xvr100"
+
+ ################
+ # Audio Output #
+ ################
+ myconf+=" --disable-esd"
+ uses="alsa jack ladspa nas openal"
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ use pulseaudio || myconf+=" --disable-pulse"
+ if ! use radio; then
+ use oss || myconf+=" --disable-ossaudio"
+ fi
+
+ ####################
+ # Advanced Options #
+ ####################
+ # Platform specific flags, hardcoded on amd64 (see below)
+ use cpudetection && myconf+=" --enable-runtime-cpudetection"
+
+ uses="3dnow 3dnowext mmx mmxext sse sse2 ssse3"
+ for i in ${uses}; do
+ myconf+=" $(use_enable cpu_flags_x86_${i} ${i})"
+ done
+
+ uses="altivec shm"
+ for i in ${uses}; do
+ myconf+=" $(use_enable ${i})"
+ done
+
+ use debug && myconf+=" --enable-debug=3"
+
+ if use x86 && gcc-specs-pie; then
+ filter-flags -fPIC -fPIE
+ append-ldflags -nopie
+ fi
+
+ ###########################
+ # X enabled configuration #
+ ###########################
+ myconf+=" --disable-gui"
+ myconf+=" --disable-vesa"
+ uses="ggi vdpau xinerama xv"
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ use dga || myconf+=" --disable-dga1 --disable-dga2"
+ use opengl || myconf+=" --disable-gl"
+ use osdmenu && myconf+=" --enable-menu"
+ use vidix || myconf+=" --disable-vidix --disable-vidix-pcidb"
+ use xscreensaver || myconf+=" --disable-xss"
+ use X || myconf+=" --disable-x11"
+ if use xvmc; then
+ myconf+=" --enable-xvmc --with-xvmclib=XvMCW"
+ else
+ myconf+=" --disable-xvmc"
+ fi
+
+ ############################
+ # OSX (aqua) configuration #
+ ############################
+ if use aqua; then
+ myconf+="
+ --enable-macosx-finder
+ --enable-macosx-bundle
+ "
+ fi
+
+ ./configure \
+ --cc="$(tc-getCC)" \
+ --host-cc="$(tc-getBUILD_CC)" \
+ --prefix="${EPREFIX}/usr" \
+ --bindir="${EPREFIX}/usr/bin" \
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \
+ --confdir="${EPREFIX}/etc/mplayer" \
+ --datadir="${EPREFIX}/usr/share/mplayer${namesuf}" \
+ --mandir="${EPREFIX}/usr/share/man" \
+ --disable-ffmpeg_a \
+ ${myconf} || die
+}
+
+src_compile() {
+ base_src_compile
+ # Build only user-requested docs if they're available.
+ if use doc ; then
+ # select available languages from $LINGUAS
+ local ALLOWED_LINGUAS="cs de en es fr hu it pl ru zh_CN"
+ local BUILT_DOCS=""
+ for i in ${LINGUAS} ; do
+ has ${i} ${ALLOWED_LINGUAS} && BUILT_DOCS+=" ${i}"
+ done
+ if [[ -z $BUILT_DOCS ]]; then
+ emake -j1 html-chunked
+ else
+ for i in ${BUILT_DOCS}; do
+ emake -j1 html-chunked-${i}
+ done
+ fi
+ fi
+}
+
+src_install() {
+ local i
+
+ emake \
+ DESTDIR="${D}" \
+ INSTALLSTRIP="" \
+ install
+
+ dodoc AUTHORS Changelog Copyright README etc/codecs.conf
+
+ docinto tech/
+ dodoc DOCS/tech/{*.txt,MAINTAINERS,mpsub.sub,playtree,TODO,wishlist}
+ docinto TOOLS/
+ dodoc -r TOOLS
+ docinto tech/mirrors/
+ dodoc DOCS/tech/mirrors/*
+
+ if use doc; then
+ docinto html/
+ dohtml -r "${S}"/DOCS/HTML/*
+ fi
+
+ if ! use truetype; then
+ dodir /usr/share/mplayer/fonts
+ # Do this generic, as the mplayer people like to change the structure
+ # of their zips ...
+ for i in $(find "${WORKDIR}/" -type d -name 'font-arial-*'); do
+ cp -pPR "${i}" "${ED}/usr/share/mplayer/fonts"
+ done
+ # Fix the font symlink ...
+ rm -rf "${ED}/usr/share/mplayer/font"
+ dosym fonts/font-arial-14-iso-8859-1 /usr/share/mplayer/font
+ fi
+
+ insinto /etc/mplayer
+ newins "${S}/etc/example.conf" mplayer.conf
+ cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
+# Config options can be section specific, global
+# options should go in the default section
+[default]
+_EOF_
+ doins "${S}/etc/input.conf"
+ if use osdmenu; then
+ doins "${S}/etc/menu.conf"
+ fi
+
+ if use truetype; then
+ cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
+fontconfig=1
+subfont-osd-scale=4
+subfont-text-scale=3
+_EOF_
+ fi
+
+ # bug 256203
+ if use rar; then
+ cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
+unrarexec=${EPREFIX}/usr/bin/unrar
+_EOF_
+ fi
+
+ dosym ../../../etc/mplayer/mplayer.conf /usr/share/mplayer/mplayer.conf
+ newbin "${S}/TOOLS/midentify.sh" midentify
+}
+
+pkg_preinst() {
+ [[ -d ${EROOT}/usr/share/mplayer/Skin/default ]] && \
+ rm -rf "${EROOT}/usr/share/mplayer/Skin/default"
+}
+
+pkg_postrm() {
+ # Cleanup stale symlinks
+ [ -L "${EROOT}/usr/share/mplayer/font" -a \
+ ! -e "${EROOT}/usr/share/mplayer/font" ] && \
+ rm -f "${EROOT}/usr/share/mplayer/font"
+
+ [ -L "${EROOT}/usr/share/mplayer/subfont.ttf" -a \
+ ! -e "${EROOT}/usr/share/mplayer/subfont.ttf" ] && \
+ rm -f "${EROOT}/usr/share/mplayer/subfont.ttf"
+}
diff --git a/media-video/mplayer/mplayer-9999.ebuild b/media-video/mplayer/mplayer-9999.ebuild
new file mode 100644
index 000000000000..17220524d184
--- /dev/null
+++ b/media-video/mplayer/mplayer-9999.ebuild
@@ -0,0 +1,628 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI="git://git.videolan.org/ffmpeg.git"
+ESVN_REPO_URI="svn://svn.mplayerhq.hu/mplayer/trunk"
+[[ ${PV} = *9999* ]] && SVN_ECLASS="subversion git-2" || SVN_ECLASS=""
+
+inherit toolchain-funcs eutils flag-o-matic multilib base ${SVN_ECLASS}
+
+IUSE="cpu_flags_x86_3dnow cpu_flags_x86_3dnowext a52 aalib +alsa altivec aqua bidi bl bluray
+bs2b cddb +cdio cdparanoia cpudetection debug dga
+directfb doc dts dv dvb +dvd +dvdnav +enca +encode faac faad fbcon
+ftp gif ggi gsm +iconv ipv6 jack joystick jpeg jpeg2k kernel_linux ladspa
++libass libcaca libmpeg2 lirc live lzo mad md5sum +cpu_flags_x86_mmx cpu_flags_x86_mmxext mng mp3 nas
++network nut openal opengl +osdmenu oss png pnm pulseaudio pvr
+radio rar rtc rtmp samba selinux +shm sdl speex cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_ssse3
+tga theora tremor +truetype toolame twolame +unicode v4l vdpau vidix
+vorbis +X x264 xanim xinerama +xscreensaver +xv xvid xvmc zoran"
+
+VIDEO_CARDS="s3virge mga tdfx"
+for x in ${VIDEO_CARDS}; do
+ IUSE+=" video_cards_${x}"
+done
+
+FONT_URI="
+ mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2
+ mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2
+ mirror://mplayer/releases/fonts/font-arial-cp1250.tar.bz2
+"
+if [[ ${PV} == *9999* ]]; then
+ RELEASE_URI=""
+elif [ "${PV%_rc*}" = "${PV}" -a "${PV%_pre*}" = "${PV}" ]; then
+ MY_P="MPlayer-${PV}"
+ S="${WORKDIR}/${MY_P}"
+ RELEASE_URI="mirror://mplayer/releases/${MY_P}.tar.xz"
+else
+ RELEASE_URI="mirror://gentoo/${P}.tar.xz"
+fi
+SRC_URI="${RELEASE_URI}
+ !truetype? ( ${FONT_URI} )"
+
+DESCRIPTION="Media Player for Linux"
+HOMEPAGE="http://www.mplayerhq.hu/"
+
+FONT_RDEPS="
+ virtual/ttf-fonts
+ media-libs/fontconfig
+ >=media-libs/freetype-2.2.1:2
+"
+X_RDEPS="
+ x11-libs/libXext
+ x11-libs/libXxf86vm
+"
+# Rar: althrought -gpl version is nice, it cant do most functions normal rars can
+# nemesi? ( net-libs/libnemesi )
+RDEPEND+="
+ sys-libs/ncurses
+ app-arch/bzip2
+ sys-libs/zlib
+ >=media-video/ffmpeg-2.6:0=
+ a52? ( media-libs/a52dec )
+ aalib? ( media-libs/aalib )
+ alsa? ( media-libs/alsa-lib )
+ bidi? ( dev-libs/fribidi )
+ bluray? ( >=media-libs/libbluray-0.2.1 )
+ bs2b? ( media-libs/libbs2b )
+ cdio? ( dev-libs/libcdio )
+ cdparanoia? ( !cdio? ( media-sound/cdparanoia ) )
+ dga? ( x11-libs/libXxf86dga )
+ directfb? ( dev-libs/DirectFB )
+ dts? ( media-libs/libdca )
+ dv? ( media-libs/libdv )
+ dvb? ( virtual/linuxtv-dvb-headers )
+ dvd? ( >=media-libs/libdvdread-4.1.3 )
+ dvdnav? ( >=media-libs/libdvdnav-4.1.3 )
+ encode? (
+ !twolame? ( toolame? ( media-sound/toolame ) )
+ twolame? ( media-sound/twolame )
+ faac? ( media-libs/faac )
+ mp3? ( media-sound/lame )
+ x264? ( >=media-libs/x264-0.0.20100423:= )
+ xvid? ( media-libs/xvid )
+ )
+ enca? ( app-i18n/enca )
+ faad? ( media-libs/faad2 )
+ ggi? ( media-libs/libggi media-libs/libggiwmh )
+ gif? ( media-libs/giflib )
+ gsm? ( media-sound/gsm )
+ iconv? ( virtual/libiconv )
+ jack? ( media-sound/jack-audio-connection-kit )
+ jpeg? ( virtual/jpeg:0 )
+ jpeg2k? ( media-libs/openjpeg:0 )
+ ladspa? ( media-libs/ladspa-sdk )
+ libass? ( >=media-libs/libass-0.9.10:=[enca?] )
+ libcaca? ( media-libs/libcaca )
+ libmpeg2? ( media-libs/libmpeg2 )
+ lirc? ( app-misc/lirc )
+ live? ( media-plugins/live )
+ lzo? ( >=dev-libs/lzo-2 )
+ mad? ( media-libs/libmad )
+ mng? ( media-libs/libmng:= )
+ mp3? ( media-sound/mpg123 )
+ nas? ( media-libs/nas )
+ nut? ( >=media-libs/libnut-661 )
+ openal? ( media-libs/openal )
+ opengl? ( virtual/opengl )
+ png? ( media-libs/libpng:0= )
+ pnm? ( media-libs/netpbm )
+ pulseaudio? ( media-sound/pulseaudio )
+ rar? (
+ || (
+ app-arch/unrar
+ app-arch/rar
+ )
+ )
+ rtmp? ( media-video/rtmpdump )
+ samba? ( net-fs/samba )
+ sdl? ( media-libs/libsdl )
+ speex? ( media-libs/speex )
+ theora? ( media-libs/libtheora[encode?] )
+ tremor? ( media-libs/tremor )
+ truetype? ( ${FONT_RDEPS} )
+ vdpau? ( x11-libs/libvdpau )
+ vorbis? ( !tremor? ( media-libs/libvorbis ) )
+ X? ( ${X_RDEPS} )
+ xanim? ( media-video/xanim )
+ xinerama? ( x11-libs/libXinerama )
+ xscreensaver? ( x11-libs/libXScrnSaver )
+ xv? ( x11-libs/libXv )
+ xvmc? ( x11-libs/libXvMC )
+"
+
+X_DEPS="
+ x11-proto/videoproto
+ x11-proto/xf86vidmodeproto
+"
+ASM_DEP="dev-lang/yasm"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ dga? ( x11-proto/xf86dgaproto )
+ X? ( ${X_DEPS} )
+ xinerama? ( x11-proto/xineramaproto )
+ xscreensaver? ( x11-proto/scrnsaverproto )
+ amd64? ( ${ASM_DEP} )
+ doc? (
+ dev-libs/libxslt app-text/docbook-xml-dtd
+ app-text/docbook-xsl-stylesheets
+ )
+ x86? ( ${ASM_DEP} )
+ x86-fbsd? ( ${ASM_DEP} )
+"
+RDEPEND+="
+ selinux? ( sec-policy/selinux-mplayer )
+"
+
+SLOT="0"
+LICENSE="GPL-2"
+if [[ ${PV} != *9999* ]]; then
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+else
+ KEYWORDS=""
+fi
+
+# faac codecs are nonfree
+# libcdio support: prefer libcdio over cdparanoia and don't check for cddb w/cdio
+# dvd navigation requires dvd read support
+# ass and freetype font require iconv and ass requires freetype fonts
+# unicode transformations are usefull only with iconv
+# radio requires oss or alsa backend
+# xvmc requires xvideo support
+REQUIRED_USE="
+ dga? ( X )
+ dvdnav? ( dvd )
+ enca? ( iconv )
+ ggi? ( X )
+ libass? ( truetype )
+ opengl? ( X )
+ osdmenu? ( X )
+ truetype? ( iconv )
+ vdpau? ( X )
+ vidix? ( X )
+ xinerama? ( X )
+ xscreensaver? ( X )
+ xv? ( X )
+ xvmc? ( xv )"
+RESTRICT="faac? ( bindist )"
+
+pkg_setup() {
+ if [[ ${PV} == *9999* ]]; then
+ elog
+ elog "This is a live ebuild which installs the latest from upstream's"
+ elog "subversion repository, and is unsupported by Gentoo."
+ elog "Everything but bugs in the ebuild itself will be ignored."
+ elog
+ fi
+
+ if use cpudetection; then
+ ewarn
+ ewarn "You've enabled the cpudetection flag. This feature is"
+ ewarn "included mainly for people who want to use the same"
+ ewarn "binary on another system with a different CPU architecture."
+ ewarn "MPlayer will already detect your CPU settings by default at"
+ ewarn "buildtime; this flag is used for runtime detection."
+ ewarn "You won't need this turned on if you are only building"
+ ewarn "mplayer for this system. Also, if your compile fails, try"
+ ewarn "disabling this use flag."
+ fi
+
+ if has_version 'media-video/libav' ; then
+ ewarn "Please note that upstream uses media-video/ffmpeg."
+ ewarn "media-video/libav should be fine in theory but if you"
+ ewarn "experience any problem, try to move to media-video/ffmpeg."
+ fi
+}
+
+src_unpack() {
+ if [[ ${PV} = *9999* ]]; then
+ subversion_src_unpack
+ cd "${WORKDIR}"
+ rm -rf "${WORKDIR}/${P}/ffmpeg/"
+ ( S="${WORKDIR}/${P}/ffmpeg/" git-2_src_unpack )
+ else
+ unpack ${A}
+ fi
+
+ if [[ ${PV} = *9999* ]] || [[ "${PV%_rc*}" = "${PV}" ]]; then
+ cd "${S}"
+ cp "${FILESDIR}/dump_ffmpeg.sh" . || die
+ chmod +x dump_ffmpeg.sh
+ ./dump_ffmpeg.sh || die
+ fi
+
+ if ! use truetype; then
+ unpack font-arial-iso-8859-1.tar.bz2 \
+ font-arial-iso-8859-2.tar.bz2 \
+ font-arial-cp1250.tar.bz2
+ fi
+}
+
+src_prepare() {
+ local svf=snapshot_version
+ if [[ ${PV} = *9999* ]]; then
+ # Set SVN version manually
+ subversion_wc_info
+ printf "${ESVN_WC_REVISION}" > $svf
+ fi
+ if [ ! -f VERSION ] ; then
+ [ -f "$svf" ] || die "Missing ${svf}. Did you generate your snapshot with prepare_mplayer.sh?"
+ local sv=$(<$svf)
+ printf "SVN-r${sv} (Gentoo)" > VERSION
+ fi
+
+ # fix path to bash executable in configure scripts
+ sed -i -e "1c\#!${EPREFIX}/bin/bash" configure version.sh || die
+
+ base_src_prepare
+
+ # Use sane default for >=virtual/udev-197
+ sed -i -e '/default_dvd_device/s:/dev/dvd:/dev/cdrom:' configure || die
+}
+
+src_configure() {
+ local myconf=""
+ local uses i
+
+ # set LINGUAS
+ [[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/da/dk}"
+ [[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/zh/zh_CN}" #482968
+
+ # mplayer ebuild uses "use foo || --disable-foo" to forcibly disable
+ # compilation in almost every situation. The reason for this is
+ # because if --enable is used, it will force the build of that option,
+ # regardless of whether the dependency is available or not.
+
+ ###################
+ #Optional features#
+ ###################
+ # disable svga since we don't want it
+ # disable arts since we don't have kde3
+ # always disable internal ass
+ # disable opus and ilbc since it only controls support in internal
+ # ffmpeg which we do not use
+ myconf+="
+ --disable-svga --disable-svgalib_helper
+ --disable-ass-internal
+ --disable-arts
+ --disable-kai
+ --disable-libopus
+ --disable-libilbc
+ $(use_enable network networking)
+ $(use_enable joystick)
+ "
+ uses="bl bluray enca ftp rtc" # nemesi <- not working with in-tree ebuild
+ myconf+=" --disable-nemesi" # nemesi automagic disable
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ use bidi || myconf+=" --disable-fribidi"
+ use ipv6 || myconf+=" --disable-inet6"
+ use libass || myconf+=" --disable-ass"
+ use nut || myconf+=" --disable-libnut"
+ use rar || myconf+=" --disable-unrarexec"
+ use samba || myconf+=" --disable-smb"
+ use lirc || myconf+=" --disable-lirc --disable-lircc --disable-apple-ir"
+
+ # libcdio support: prefer libcdio over cdparanoia
+ # don't check for cddb w/cdio
+ if use cdio; then
+ myconf+=" --disable-cdparanoia"
+ else
+ myconf+=" --disable-libcdio"
+ use cdparanoia || myconf+=" --disable-cdparanoia"
+ use cddb || myconf+=" --disable-cddb"
+ fi
+
+ ################################
+ # DVD read, navigation support #
+ ################################
+ #
+ # dvdread - accessing a DVD
+ # dvdnav - navigation of menus
+ use dvd || myconf+=" --disable-dvdread"
+ use dvdnav || myconf+=" --disable-dvdnav"
+
+ #############
+ # Subtitles #
+ #############
+ #
+ # SRT/ASS/SSA (subtitles) requires freetype support
+ # freetype support requires iconv
+ # iconv optionally can use unicode
+ use truetype || myconf+=" --disable-freetype"
+ use iconv || myconf+=" --disable-iconv --charset=noconv"
+ use iconv && use unicode && myconf+=" --charset=UTF-8"
+
+ #####################################
+ # DVB / Video4Linux / Radio support #
+ #####################################
+ myconf+=" --disable-tv-bsdbt848"
+ # broken upstream, won't work with recent kernels
+ myconf+=" --disable-ivtv"
+ # gone since linux-headers-2.6.38
+ myconf+=" --disable-tv-v4l1"
+ if { use dvb || use v4l || use pvr || use radio; }; then
+ use dvb || myconf+=" --disable-dvb"
+ use pvr || myconf+=" --disable-pvr"
+ use v4l || myconf+=" --disable-tv-v4l2"
+ if use radio && { use dvb || use v4l; }; then
+ myconf+="
+ --enable-radio
+ $(use_enable encode radio-capture)
+ "
+ else
+ myconf+="
+ --disable-radio-v4l2
+ --disable-radio-bsdbt848
+ "
+ fi
+ else
+ myconf+="
+ --disable-tv
+ --disable-tv-v4l2
+ --disable-radio
+ --disable-radio-v4l2
+ --disable-radio-bsdbt848
+ --disable-dvb
+ --disable-v4l2
+ --disable-pvr"
+ fi
+
+ ##########
+ # Codecs #
+ ##########
+ myconf+=" --disable-musepack" # Use internal musepack codecs for SV7 and SV8 support
+ myconf+=" --disable-libmpeg2-internal" # always use system media-libs/libmpeg2
+ use dts || myconf+=" --disable-libdca"
+ if ! use mp3; then
+ myconf+="
+ --disable-mp3lame
+ --disable-mpg123
+ "
+ fi
+ uses="a52 bs2b dv gsm lzo rtmp vorbis"
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-lib${i}"
+ done
+
+ uses="faad gif jpeg libmpeg2 live mad mng png pnm speex tga theora tremor xanim"
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ use jpeg2k || myconf+=" --disable-libopenjpeg"
+
+ # Encoding
+ uses="faac x264 xvid toolame twolame"
+ if use encode; then
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ else
+ myconf+=" --disable-mencoder"
+ for i in ${uses}; do
+ myconf+=" --disable-${i}"
+ use ${i} && elog "Useflag \"${i}\" will only be useful for encoding, i.e., with \"encode\" useflag enabled."
+ done
+ fi
+
+ #################
+ # Binary codecs #
+ #################
+ myconf+=" --disable-qtx --disable-real --disable-win32dll"
+
+ ################
+ # Video Output #
+ ################
+ uses="directfb md5sum sdl"
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ use aalib || myconf+=" --disable-aa"
+ use fbcon || myconf+=" --disable-fbdev"
+ use fbcon && use video_cards_s3virge && myconf+=" --enable-s3fb"
+ use libcaca || myconf+=" --disable-caca"
+ use zoran || myconf+=" --disable-zr"
+
+ if ! use kernel_linux || ! use video_cards_mga; then
+ myconf+=" --disable-mga --disable-xmga"
+ fi
+
+ if use video_cards_tdfx; then
+ myconf+="
+ $(use_enable video_cards_tdfx tdfxvid)
+ $(use_enable fbcon tdfxfb)
+ "
+ else
+ myconf+="
+ --disable-3dfx
+ --disable-tdfxvid
+ --disable-tdfxfb
+ "
+ fi
+
+ # sun card, disable by default, see bug #258729
+ myconf+=" --disable-xvr100"
+
+ ################
+ # Audio Output #
+ ################
+ myconf+=" --disable-esd"
+ uses="alsa jack ladspa nas openal"
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ use pulseaudio || myconf+=" --disable-pulse"
+ if ! use radio; then
+ use oss || myconf+=" --disable-ossaudio"
+ fi
+
+ ####################
+ # Advanced Options #
+ ####################
+ # Platform specific flags, hardcoded on amd64 (see below)
+ use cpudetection && myconf+=" --enable-runtime-cpudetection"
+
+ uses="3dnow 3dnowext mmx mmxext sse sse2 ssse3"
+ for i in ${uses}; do
+ myconf+=" $(use_enable cpu_flags_x86_${i} ${i})"
+ done
+
+ uses="altivec shm"
+ for i in ${uses}; do
+ myconf+=" $(use_enable ${i})"
+ done
+
+ use debug && myconf+=" --enable-debug=3"
+
+ if use x86 && gcc-specs-pie; then
+ filter-flags -fPIC -fPIE
+ append-ldflags -nopie
+ fi
+
+ ###########################
+ # X enabled configuration #
+ ###########################
+ myconf+=" --disable-gui"
+ myconf+=" --disable-vesa"
+ uses="ggi vdpau xinerama xv"
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ use dga || myconf+=" --disable-dga1 --disable-dga2"
+ use opengl || myconf+=" --disable-gl"
+ use osdmenu && myconf+=" --enable-menu"
+ use vidix || myconf+=" --disable-vidix --disable-vidix-pcidb"
+ use xscreensaver || myconf+=" --disable-xss"
+ use X || myconf+=" --disable-x11"
+ if use xvmc; then
+ myconf+=" --enable-xvmc --with-xvmclib=XvMCW"
+ else
+ myconf+=" --disable-xvmc"
+ fi
+
+ ############################
+ # OSX (aqua) configuration #
+ ############################
+ if use aqua; then
+ myconf+="
+ --enable-macosx-finder
+ --enable-macosx-bundle
+ "
+ fi
+
+ ./configure \
+ --cc="$(tc-getCC)" \
+ --host-cc="$(tc-getBUILD_CC)" \
+ --prefix="${EPREFIX}/usr" \
+ --bindir="${EPREFIX}/usr/bin" \
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \
+ --confdir="${EPREFIX}/etc/mplayer" \
+ --datadir="${EPREFIX}/usr/share/mplayer${namesuf}" \
+ --mandir="${EPREFIX}/usr/share/man" \
+ --disable-ffmpeg_a \
+ ${myconf} || die
+}
+
+src_compile() {
+ base_src_compile
+ # Build only user-requested docs if they're available.
+ if use doc ; then
+ # select available languages from $LINGUAS
+ local ALLOWED_LINGUAS="cs de en es fr hu it pl ru zh_CN"
+ local BUILT_DOCS=""
+ for i in ${LINGUAS} ; do
+ has ${i} ${ALLOWED_LINGUAS} && BUILT_DOCS+=" ${i}"
+ done
+ if [[ -z $BUILT_DOCS ]]; then
+ emake -j1 html-chunked
+ else
+ for i in ${BUILT_DOCS}; do
+ emake -j1 html-chunked-${i}
+ done
+ fi
+ fi
+}
+
+src_install() {
+ local i
+
+ emake \
+ DESTDIR="${D}" \
+ INSTALLSTRIP="" \
+ install
+
+ dodoc AUTHORS Changelog Copyright README etc/codecs.conf
+
+ docinto tech/
+ dodoc DOCS/tech/{*.txt,MAINTAINERS,mpsub.sub,playtree,TODO,wishlist}
+ docinto TOOLS/
+ dodoc -r TOOLS
+ docinto tech/mirrors/
+ dodoc DOCS/tech/mirrors/*
+
+ if use doc; then
+ docinto html/
+ dohtml -r "${S}"/DOCS/HTML/*
+ fi
+
+ if ! use truetype; then
+ dodir /usr/share/mplayer/fonts
+ # Do this generic, as the mplayer people like to change the structure
+ # of their zips ...
+ for i in $(find "${WORKDIR}/" -type d -name 'font-arial-*'); do
+ cp -pPR "${i}" "${ED}/usr/share/mplayer/fonts"
+ done
+ # Fix the font symlink ...
+ rm -rf "${ED}/usr/share/mplayer/font"
+ dosym fonts/font-arial-14-iso-8859-1 /usr/share/mplayer/font
+ fi
+
+ insinto /etc/mplayer
+ newins "${S}/etc/example.conf" mplayer.conf
+ cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
+# Config options can be section specific, global
+# options should go in the default section
+[default]
+_EOF_
+ doins "${S}/etc/input.conf"
+ if use osdmenu; then
+ doins "${S}/etc/menu.conf"
+ fi
+
+ if use truetype; then
+ cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
+fontconfig=1
+subfont-osd-scale=4
+subfont-text-scale=3
+_EOF_
+ fi
+
+ # bug 256203
+ if use rar; then
+ cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
+unrarexec=${EPREFIX}/usr/bin/unrar
+_EOF_
+ fi
+
+ dosym ../../../etc/mplayer/mplayer.conf /usr/share/mplayer/mplayer.conf
+ newbin "${S}/TOOLS/midentify.sh" midentify
+}
+
+pkg_preinst() {
+ [[ -d ${EROOT}/usr/share/mplayer/Skin/default ]] && \
+ rm -rf "${EROOT}/usr/share/mplayer/Skin/default"
+}
+
+pkg_postrm() {
+ # Cleanup stale symlinks
+ [ -L "${EROOT}/usr/share/mplayer/font" -a \
+ ! -e "${EROOT}/usr/share/mplayer/font" ] && \
+ rm -f "${EROOT}/usr/share/mplayer/font"
+
+ [ -L "${EROOT}/usr/share/mplayer/subfont.ttf" -a \
+ ! -e "${EROOT}/usr/share/mplayer/subfont.ttf" ] && \
+ rm -f "${EROOT}/usr/share/mplayer/subfont.ttf"
+}
diff --git a/media-video/mpv/Manifest b/media-video/mpv/Manifest
new file mode 100644
index 000000000000..1e56e04c2867
--- /dev/null
+++ b/media-video/mpv/Manifest
@@ -0,0 +1,5 @@
+DIST mpv-0.3.10.tar.gz 2520710 SHA256 ec1d9751f9c43f66e13a988c94748ee2e1d8188498001f905213c9ccdf573fce SHA512 fdf84439747e24b4278f09427fc22d6497d2105cf94cd3c45dfb134af917f81c4748d618e962fb13a9db2b7a260a88a409590d10aae71ac987831bc3d293196e WHIRLPOOL d9a4eb6f01ee965b915e9064d75f710dd922a0db1e8a6b9655c844548bbde37c1cca1efd495c5d0f160b4b3823947c13e08e4634c6907fbd44abe758d0a6c552
+DIST mpv-0.8.3.tar.gz 2664730 SHA256 091038c802866848e3647f2a50215fa64ead0dc36f9114457db8b353528689cf SHA512 6b0e1f86032f4f594cee7af7ee7bd577821e948ace442987747a089d32374495abb5cf6bb88c4a1a63db8a36bb4182b30a728f976224263b6a9b4d51e62b1a40 WHIRLPOOL e6de6ff24a0e07cc1dc08f0de585aeb8ef44d1d01d729e088f7d9402b82b5e5318b958083781168ae3e7cc67fce13125d41d79fac997bff5d5888268a52480ba
+DIST mpv-0.9.2.tar.gz 2701306 SHA256 c0148f55dbd17705f49bb496d0ce374419de62e1b17195d91409d7727cbd4751 SHA512 4f652a8e78d65b0ef44a06287b05250dfdfbce4cf5a6e21d3b446eedec268d83cf98afcc687272e2da2cfac9e9f69a303847dffdfd45cecdd4273b943ce50967 WHIRLPOOL 1512bacc2ce50e875770c76106a1bb2bc1d0cc5f6e2bdce91ff8c5cfc8bf13ffb48519858a5fa2a7d57880820dc12e5eb20f34ab71eca5d76ec303618da8f3fe
+DIST waf-1.7.15 90909 SHA256 e5ae7028f9b2d8ce1acb9fe1092e8010a90ba764d3ac065ea4e846743290b1d6 SHA512 5d6f75a7a81d369512c6bf70ae14c5275cfdc2b273a5801d7ee928a829ca472aac5ee9f9f2542af6369f34c1648dd12e42112efc29d602527b9ba58a311b4c17 WHIRLPOOL 84048737d1ba746454212e13696ba34d9fc722c74823f719503e29123e33869a49742fba02e24212e3f67e045c5499cf1893bbd191bf8df1dd5cae05a517a17c
+DIST waf-1.8.4 96179 SHA256 f02035fa5d8814f33f19b2b20d43822ddef6bb39b955ca196c2a247a1f9ffaa8 SHA512 3a132d8b1cba0af0e3df046c0204c5df706fae4e0fac41cf74b53f6cdea6210ed798671c7a3cb3fee70573aacab16d4c0cc699cc4b7aa74c8a416346c5513f4c WHIRLPOOL fe8d7f42e5118a1f9490a0c9add1355c969185376b57d0bab024068dd6e7364632d862bf9432e1209165c5313ae843479ef334f4bd6285db05dfebff9a1b640e
diff --git a/media-video/mpv/files/mpv-0.3.11-libav-9.patch b/media-video/mpv/files/mpv-0.3.11-libav-9.patch
new file mode 100644
index 000000000000..7ab6516ebf90
--- /dev/null
+++ b/media-video/mpv/files/mpv-0.3.11-libav-9.patch
@@ -0,0 +1,12 @@
+diff --git a/demux/demux.c b/demux/demux.c
+index 0649175..bd16a7a 100644
+--- a/demux/demux.c
++++ b/demux/demux.c
+@@ -43,6 +43,7 @@
+ #include "audio/format.h"
+
+ #include <libavcodec/avcodec.h>
++#include <libavutil/mem.h>
+
+ // Demuxer list
+ extern const struct demuxer_desc demuxer_desc_edl; \ No newline at end of file
diff --git a/media-video/mpv/metadata.xml b/media-video/mpv/metadata.xml
new file mode 100644
index 000000000000..4a59541a3b28
--- /dev/null
+++ b/media-video/mpv/metadata.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>yngwin@gentoo.org</email>
+ <description>primary maintainer</description>
+ </maintainer>
+ <maintainer>
+ <email>maksbotan@gentoo.org</email>
+ </maintainer>
+ <maintainer>
+ <email>nikoli@gmx.us</email>
+ </maintainer>
+ <herd>video</herd>
+ <herd>proxy-maintainers</herd>
+ <use>
+ <flag name="bluray">Enable playback of Blu-ray filesystems</flag>
+ <flag name="bs2b">Enable Bauer stereophonic-to-binaural headphone filter</flag>
+ <flag name="cli">Build mpv CLI player</flag>
+ <flag name="cdio">Enable CDDA support via <pkg>dev-libs/libcdio-paranoia</pkg></flag>
+ <flag name="doc-pdf">Build documentation in pdf format</flag>
+ <flag name="drm">Enable Kernel Mode Setting / Direct Rendering Manager based video output</flag>
+ <flag name="dvdnav">Enable support for DVD navigation using <pkg>media-libs/libdvdnav</pkg></flag>
+ <flag name="egl">Enable EGL backend for X11 OpenGL video output (experimental)</flag>
+ <flag name="enca">Enable support for charset discovery and conversion using <pkg>app-i18n/enca</pkg></flag>
+ <flag name="jpeg">Enable support for saving screenshots to JPEG format</flag>
+ <flag name="libguess">Enable support for charset discovery and conversion using <pkg>app-i18n/libguess</pkg></flag>
+ <flag name="libmpv">Build mpv shared library</flag>
+ <flag name="lua">Enable Lua scripting, OSC (On Screen Controller) GUI and <pkg>net-misc/youtube-dl</pkg> hook-script</flag>
+ <flag name="luajit">Use <pkg>dev-lang/luajit</pkg> instead of <pkg>dev-lang/lua</pkg></flag>
+ <flag name="mpg123">Enable support for mp3 decoding via <pkg>media-sound/mpg123</pkg> instead of relying on ffmpeg support</flag>
+ <flag name="postproc">Enable image post-processing via libpostproc</flag>
+ <flag name="pvr">Enable Video4Linux2 MPEG PVR</flag>
+ <flag name="raspberry-pi">Enable support for the Raspberry Pi</flag>
+ <flag name="rubberband">Enable high quality pitch correction via <pkg>media-libs/rubberband</pkg></flag>
+ <flag name="quvi">Enable support for streaming sites using <pkg>media-libs/libquvi</pkg></flag>
+ <flag name="radio">Enable V4L2 radio interface and support</flag>
+ <flag name="sdl">Enable <pkg>media-libs/libsdl2</pkg> based video and audio outputs</flag>
+ <flag name="shm">Enable support for shm</flag>
+ <flag name="vf-dlopen">Install additional video filters for using with -vf dlopen</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">mpv-player/mpv</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/mpv/mpv-0.3.10.ebuild b/media-video/mpv/mpv-0.3.10.ebuild
new file mode 100644
index 000000000000..7c1cdd52fc92
--- /dev/null
+++ b/media-video/mpv/mpv-0.3.10.ebuild
@@ -0,0 +1,257 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI="https://github.com/mpv-player/mpv.git"
+
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+PYTHON_REQ_USE='threads(+)'
+
+inherit eutils python-any-r1 waf-utils pax-utils fdo-mime gnome2-utils
+[[ ${PV} == *9999* ]] && inherit git-r3
+
+WAF_V="1.7.15"
+
+DESCRIPTION="Video player based on MPlayer/mplayer2"
+HOMEPAGE="http://mpv.io/"
+SRC_URI="https://waf.googlecode.com/files/waf-${WAF_V}"
+[[ ${PV} == *9999* ]] || \
+SRC_URI+=" https://github.com/mpv-player/mpv/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+[[ ${PV} == *9999* ]] || \
+KEYWORDS="alpha amd64 ~arm ppc ppc64 sparc x86 ~amd64-linux"
+IUSE="+alsa bluray bs2b +cdio -doc-pdf dvb +dvd dvdnav +enca encode +iconv jack -joystick
+jpeg ladspa lcms +libass libcaca libguess lirc lua luajit +mpg123 -openal +opengl
+oss portaudio +postproc pulseaudio pvr +quvi -radio samba sdl selinux +shm v4l vaapi vcd vdpau
+vf-dlopen wayland +X xinerama +xscreensaver +xv"
+
+REQUIRED_USE="
+ dvdnav? ( dvd )
+ enca? ( iconv )
+ lcms? ( opengl )
+ libguess? ( iconv )
+ luajit? ( lua )
+ opengl? ( || ( wayland X ) )
+ pvr? ( v4l )
+ radio? ( v4l || ( alsa oss ) )
+ vaapi? ( X )
+ vdpau? ( X )
+ wayland? ( opengl )
+ xinerama? ( X )
+ xscreensaver? ( X )
+ xv? ( X )
+"
+
+RDEPEND+="
+ || (
+ >=media-video/libav-9.10:=[encode?,threads,vaapi?,vdpau?]
+ >=media-video/ffmpeg-1.2.4:0=[encode?,threads,vaapi?,vdpau?]
+ )
+ sys-libs/ncurses
+ sys-libs/zlib
+ X? (
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXxf86vm
+ opengl? ( virtual/opengl )
+ lcms? ( media-libs/lcms:2 )
+ vaapi? ( >=x11-libs/libva-0.34.0[X(+)] )
+ vdpau? ( >=x11-libs/libvdpau-0.2 )
+ xinerama? ( x11-libs/libXinerama )
+ xscreensaver? ( x11-libs/libXScrnSaver )
+ xv? ( x11-libs/libXv )
+ )
+ alsa? ( media-libs/alsa-lib )
+ bluray? ( >=media-libs/libbluray-0.2.1 )
+ bs2b? ( media-libs/libbs2b )
+ cdio? (
+ dev-libs/libcdio
+ dev-libs/libcdio-paranoia
+ )
+ dvb? ( virtual/linuxtv-dvb-headers )
+ dvd? (
+ >=media-libs/libdvdread-4.1.3
+ dvdnav? ( >=media-libs/libdvdnav-4.2.0 )
+ )
+ enca? ( app-i18n/enca )
+ iconv? ( virtual/libiconv )
+ jack? ( media-sound/jack-audio-connection-kit )
+ jpeg? ( virtual/jpeg:0 )
+ ladspa? ( media-libs/ladspa-sdk )
+ libass? (
+ >=media-libs/libass-0.9.10:=[enca?,fontconfig]
+ virtual/ttf-fonts
+ )
+ libcaca? ( >=media-libs/libcaca-0.99_beta18 )
+ libguess? ( >=app-i18n/libguess-1.0 )
+ lirc? ( app-misc/lirc )
+ lua? (
+ !luajit? ( >=dev-lang/lua-5.1:= )
+ luajit? ( dev-lang/luajit:2 )
+ )
+ mpg123? ( >=media-sound/mpg123-1.14.0 )
+ openal? ( >=media-libs/openal-1.13 )
+ portaudio? ( >=media-libs/portaudio-19_pre20111121 )
+ postproc? (
+ || (
+ media-libs/libpostproc
+ >=media-video/ffmpeg-1.2:0[encode?,threads,vaapi?,vdpau?]
+ )
+ )
+ pulseaudio? ( media-sound/pulseaudio )
+ quvi? (
+ >=media-libs/libquvi-0.4.1:=
+ || (
+ >=media-video/libav-9.10[network]
+ >=media-video/ffmpeg-1.2.4:0[network]
+ )
+ )
+ samba? ( net-fs/samba )
+ sdl? ( media-libs/libsdl2[threads] )
+ v4l? ( media-libs/libv4l )
+ wayland? (
+ >=dev-libs/wayland-1.3.0
+ media-libs/mesa[egl,wayland]
+ >=x11-libs/libxkbcommon-0.3.0
+ )
+"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ virtual/pkgconfig
+ >=dev-lang/perl-5.8
+ dev-python/docutils
+ doc-pdf? (
+ dev-texlive/texlive-latex
+ dev-texlive/texlive-latexrecommended
+ dev-texlive/texlive-latexextra
+ dev-tex/xcolor
+ )
+ X? (
+ x11-proto/videoproto
+ x11-proto/xf86vidmodeproto
+ xinerama? ( x11-proto/xineramaproto )
+ xscreensaver? ( x11-proto/scrnsaverproto )
+ )
+"
+RDEPEND+="
+ selinux? ( sec-policy/selinux-mplayer )
+"
+DOCS=( Copyright README.md etc/example.conf etc/input.conf )
+
+pkg_setup() {
+ if use !libass; then
+ ewarn
+ ewarn "You've disabled the libass flag. No OSD or subtitles will be displayed."
+ fi
+
+ einfo "For additional format support you need to enable the support on your"
+ einfo "libavcodec/libavformat provider:"
+ einfo " media-video/libav or media-video/ffmpeg"
+
+ python-any-r1_pkg_setup
+}
+
+src_unpack() {
+ if [[ ${PV} == *9999* ]]; then
+ git-r3_src_unpack
+ else
+ default_src_unpack
+ fi
+
+ cp "${DISTDIR}"/waf-${WAF_V} "${S}"/waf || die
+ chmod 0755 "${S}"/waf || die
+}
+
+src_prepare() {
+ epatch_user
+}
+
+src_configure() {
+ # keep build reproducible
+ # do not add -g to CFLAGS
+ # SDL output is fallback for platforms where nothing better is available
+ # media-sound/rsound is in pro-audio overlay only
+ waf-utils_src_configure \
+ --disable-build-date \
+ --disable-debug-build \
+ --disable-sdl \
+ $(use_enable sdl sdl2) \
+ --disable-rsound \
+ $(use_enable encode encoding) \
+ $(use_enable joystick) \
+ $(use_enable bluray libbluray) \
+ $(use_enable vcd) \
+ $(use_enable quvi libquvi) \
+ $(use_enable samba libsmbclient) \
+ $(use_enable lirc) \
+ $(use_enable lua) \
+ $(usex luajit '--lua=luajit' '') \
+ $(use_enable doc-pdf pdf-build) \
+ $(use_enable vf-dlopen vf-dlopen-filters) \
+ $(use_enable cdio cdda) \
+ $(use_enable dvd dvdread) \
+ $(use_enable dvdnav) \
+ $(use_enable enca) \
+ $(use_enable iconv) \
+ $(use_enable libass) \
+ $(use_enable libguess) \
+ $(use_enable dvb) \
+ $(use_enable pvr) \
+ $(use_enable v4l libv4l2) \
+ $(use_enable v4l tv) \
+ $(use_enable v4l tv-v4l2) \
+ $(use_enable radio) \
+ $(use_enable radio radio-capture) \
+ $(use_enable radio radio-v4l2) \
+ $(use_enable mpg123) \
+ $(use_enable jpeg) \
+ $(use_enable libcaca caca) \
+ $(use_enable postproc libpostproc) \
+ $(use_enable alsa) \
+ $(use_enable jack) \
+ $(use_enable ladspa) \
+ $(use_enable portaudio) \
+ $(use_enable bs2b libbs2b) \
+ $(use_enable openal) \
+ $(use_enable oss oss-audio) \
+ $(use_enable pulseaudio pulse) \
+ $(use_enable shm) \
+ $(use_enable X x11) \
+ $(use_enable vaapi) \
+ $(use_enable vdpau) \
+ $(use_enable wayland) \
+ $(use_enable xinerama) \
+ $(use_enable xv) \
+ $(use_enable opengl gl) \
+ $(use_enable lcms lcms2) \
+ $(use_enable xscreensaver xss) \
+ --confdir="${EPREFIX}"/etc/${PN} \
+ --mandir="${EPREFIX}"/usr/share/man \
+ --docdir="${EPREFIX}"/usr/share/doc/${PF}
+}
+
+src_install() {
+ waf-utils_src_install
+
+ if use luajit; then
+ pax-mark -m "${ED}"usr/bin/mpv
+ fi
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+}
diff --git a/media-video/mpv/mpv-0.8.3-r1.ebuild b/media-video/mpv/mpv-0.8.3-r1.ebuild
new file mode 100644
index 000000000000..fe4b31cbae9e
--- /dev/null
+++ b/media-video/mpv/mpv-0.8.3-r1.ebuild
@@ -0,0 +1,254 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+PYTHON_REQ_USE='threads(+)'
+inherit eutils python-any-r1 waf-utils pax-utils fdo-mime gnome2-utils
+
+WAF_V="1.8.4"
+
+DESCRIPTION="Media player based on MPlayer and mplayer2"
+HOMEPAGE="http://mpv.io/"
+SRC_URI="http://ftp.waf.io/pub/release/waf-${WAF_V}"
+DOCS=( README.md etc/example.conf etc/input.conf )
+
+if [[ ${PV} == *9999* ]]; then
+ EGIT_REPO_URI="https://github.com/mpv-player/mpv.git"
+ inherit git-r3
+else
+ SRC_URI+=" https://github.com/mpv-player/mpv/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="alpha amd64 ~arm ~arm64 ~hppa ppc ppc64 sparc x86 ~amd64-linux"
+ DOCS+=( RELEASE_NOTES )
+fi
+
+# See Copyright in source tarball and bug #506946. Waf is BSD, libmpv is ISC.
+LICENSE="GPL-2+ BSD ISC"
+SLOT="0"
+IUSE="+alsa bluray bs2b cdio +cli doc-pdf dvb +dvd egl +enca encode +iconv jack
+joystick jpeg ladspa lcms +libass libav libcaca libguess libmpv lirc lua luajit
+mpg123 openal +opengl oss pulseaudio pvr samba sdl selinux v4l vaapi vdpau
+vf-dlopen wayland +X xinerama +xscreensaver xv"
+
+REQUIRED_USE="
+ || ( cli libmpv )
+ egl? ( opengl X )
+ enca? ( iconv )
+ lcms? ( opengl )
+ libguess? ( iconv )
+ luajit? ( lua )
+ opengl? ( || ( wayland X ) )
+ pvr? ( v4l )
+ vaapi? ( X )
+ vdpau? ( X )
+ wayland? ( opengl )
+ xinerama? ( X )
+ xscreensaver? ( X )
+ xv? ( X )
+"
+
+RDEPEND="
+ libav? ( >=media-video/libav-10:0=[encode?,threads,vaapi?,vdpau?] )
+ !libav? ( >=media-video/ffmpeg-2.1.4:0=[encode?,threads,vaapi?,vdpau?] )
+ sys-libs/zlib
+ X? (
+ x11-libs/libX11
+ x11-libs/libXext
+ >=x11-libs/libXrandr-1.2.0
+ opengl? (
+ virtual/opengl
+ egl? ( media-libs/mesa[egl] )
+ )
+ lcms? ( >=media-libs/lcms-2.6:2 )
+ vaapi? ( >=x11-libs/libva-0.34.0[X(+),opengl?] )
+ vdpau? ( >=x11-libs/libvdpau-0.2 )
+ xinerama? ( x11-libs/libXinerama )
+ xscreensaver? ( x11-libs/libXScrnSaver )
+ xv? ( x11-libs/libXv )
+ )
+ alsa? ( >=media-libs/alsa-lib-1.0.18 )
+ bluray? ( >=media-libs/libbluray-0.3.0 )
+ bs2b? ( media-libs/libbs2b )
+ cdio? (
+ dev-libs/libcdio
+ dev-libs/libcdio-paranoia
+ )
+ dvb? ( virtual/linuxtv-dvb-headers )
+ dvd? (
+ >=media-libs/libdvdread-4.1.3
+ >=media-libs/libdvdnav-4.2.0
+ )
+ enca? ( app-i18n/enca )
+ iconv? ( virtual/libiconv )
+ jack? ( media-sound/jack-audio-connection-kit )
+ jpeg? ( virtual/jpeg:0 )
+ ladspa? ( media-libs/ladspa-sdk )
+ libass? (
+ >=media-libs/libass-0.9.10:=[enca?,fontconfig]
+ virtual/ttf-fonts
+ )
+ libcaca? ( >=media-libs/libcaca-0.99_beta18 )
+ libguess? ( >=app-i18n/libguess-1.0 )
+ lirc? ( app-misc/lirc )
+ lua? (
+ !luajit? ( >=dev-lang/lua-5.1:= )
+ luajit? ( dev-lang/luajit:2 )
+ )
+ mpg123? ( >=media-sound/mpg123-1.14.0 )
+ openal? ( >=media-libs/openal-1.13 )
+ pulseaudio? ( media-sound/pulseaudio )
+ samba? ( net-fs/samba )
+ sdl? ( media-libs/libsdl2[threads] )
+ v4l? ( media-libs/libv4l )
+ wayland? (
+ >=dev-libs/wayland-1.6.0
+ media-libs/mesa[egl,wayland]
+ >=x11-libs/libxkbcommon-0.3.0
+ )
+"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ virtual/pkgconfig
+ >=dev-lang/perl-5.8
+ dev-python/docutils
+ doc-pdf? ( dev-python/rst2pdf )
+ X? (
+ x11-proto/videoproto
+ xinerama? ( x11-proto/xineramaproto )
+ xscreensaver? ( x11-proto/scrnsaverproto )
+ )
+"
+RDEPEND+="
+ selinux? ( sec-policy/selinux-mplayer )
+"
+
+pkg_setup() {
+ if ! use libass; then
+ ewarn "You have disabled the libass flag. No OSD or subtitles will be displayed."
+ fi
+
+ if use libav; then
+ einfo "You have enabled media-video/libav instead of media-video/ffmpeg."
+ einfo "Upstream recommends media-video/ffmpeg, as some functionality is not"
+ einfo "provided by media-video/libav."
+ fi
+
+ einfo "For additional format support you need to enable the support on your"
+ einfo "libavcodec/libavformat provider:"
+ einfo " media-video/ffmpeg or media-video/libav"
+
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ cp "${DISTDIR}"/waf-${WAF_V} "${S}"/waf || die
+ chmod 0755 "${S}"/waf || die
+ epatch_user
+}
+
+src_configure() {
+ local mywafargs=(
+ --confdir="${EPREFIX}"/etc/${PN}
+ --docdir="${EPREFIX}"/usr/share/doc/${PF}
+ $(usex cli '' '--disable-cplayer')
+ $(use_enable libmpv libmpv-shared)
+ --disable-libmpv-static
+ --disable-build-date # keep build reproducible
+ --disable-optimize # do not add '-O2' to CFLAGS
+ --disable-debug-build # do not add '-g' to CFLAGS
+ --disable-test # avoid dev-util/cmocka automagic
+ $(use_enable doc-pdf pdf-build)
+ $(use_enable vf-dlopen vf-dlopen-filters)
+ $(use_enable cli zsh-comp)
+
+ # optional features
+ $(use_enable iconv)
+ $(use_enable libguess)
+ $(use_enable samba libsmbclient)
+ $(use_enable lua)
+ $(use_enable libass)
+ $(use_enable libass libass-osd)
+ $(use_enable encode encoding)
+ $(use_enable joystick)
+ $(use_enable lirc)
+ $(use_enable bluray libbluray)
+ $(use_enable dvd dvdread)
+ $(use_enable dvd dvdnav)
+ $(use_enable cdio cdda)
+ $(use_enable enca)
+ $(use_enable mpg123)
+ $(use_enable ladspa)
+ $(use_enable bs2b libbs2b)
+ $(use_enable lcms lcms2)
+ --disable-vapoursynth # vapoursynth is not packaged
+ --disable-vapoursynth-lazy
+ --enable-libavfilter
+ --enable-libavdevice
+ $(usex luajit '--lua=luajit' '')
+
+ # audio outputs
+ $(use_enable sdl sdl2) # SDL output is fallback for platforms where nothing better is available
+ --disable-sdl1
+ $(use_enable oss oss-audio)
+ --disable-rsound # media-sound/rsound is in pro-audio overlay only
+ $(use_enable pulseaudio pulse)
+ $(use_enable jack)
+ $(use_enable openal)
+ $(use_enable alsa)
+
+ # video outputs
+ $(use_enable wayland)
+ $(use_enable X x11)
+ $(use_enable xscreensaver xss)
+ $(use_enable X xext)
+ $(use_enable xv)
+ $(use_enable xinerama)
+ $(use_enable X xrandr)
+ $(usex X "$(use_enable opengl gl-x11)" '--disable-gl-x11')
+ $(use_enable egl egl-x11)
+ $(usex wayland "$(use_enable opengl gl-wayland)" '--disable-gl-wayland')
+ $(use_enable opengl gl)
+ $(use_enable vdpau)
+ $(usex vdpau "$(use_enable opengl vdpau-gl-x11)" '--disable-vdpau-gl-x11')
+ $(use_enable vaapi)
+ $(use_enable vaapi vaapi-vpp)
+ $(usex vaapi "$(use_enable opengl vaapi-glx)" '--disable-vaapi-glx')
+ $(use_enable libcaca caca)
+ $(use_enable jpeg)
+
+ # hwaccels
+ $(use_enable vaapi vaapi-hwaccel)
+ $(use_enable vdpau vdpau-hwaccel)
+
+ # tv features
+ $(use_enable v4l tv)
+ $(use_enable v4l tv-v4l2)
+ $(use_enable v4l libv4l2)
+ $(use_enable pvr)
+ $(use_enable dvb dvbin)
+ )
+ waf-utils_src_configure "${mywafargs[@]}"
+}
+
+src_install() {
+ waf-utils_src_install
+
+ if use cli && use luajit; then
+ pax-mark -m "${ED}"usr/bin/mpv
+ fi
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+}
diff --git a/media-video/mpv/mpv-0.9.2-r1.ebuild b/media-video/mpv/mpv-0.9.2-r1.ebuild
new file mode 100644
index 000000000000..cdc11bd2a4d6
--- /dev/null
+++ b/media-video/mpv/mpv-0.9.2-r1.ebuild
@@ -0,0 +1,265 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+PYTHON_REQ_USE='threads(+)'
+inherit eutils python-any-r1 waf-utils pax-utils fdo-mime gnome2-utils
+
+WAF_V="1.8.4"
+
+DESCRIPTION="Media player based on MPlayer and mplayer2"
+HOMEPAGE="http://mpv.io/"
+SRC_URI="http://ftp.waf.io/pub/release/waf-${WAF_V}"
+DOCS=( README.md etc/example.conf etc/input.conf )
+
+if [[ ${PV} == *9999* ]]; then
+ EGIT_REPO_URI="https://github.com/mpv-player/mpv.git"
+ inherit git-r3
+else
+ SRC_URI+=" https://github.com/mpv-player/mpv/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux"
+ DOCS+=( RELEASE_NOTES )
+fi
+
+# See Copyright in source tarball and bug #506946. Waf is BSD, libmpv is ISC.
+LICENSE="GPL-2+ BSD ISC"
+SLOT="0"
+IUSE="+alsa bluray bs2b cdio +cli doc-pdf drm dvb +dvd egl +enca encode +iconv
+jack jpeg ladspa lcms +libass libav libcaca libguess libmpv lua luajit openal
++opengl oss pulseaudio pvr raspberry-pi rubberband samba sdl selinux v4l vaapi
+vdpau vf-dlopen wayland +X xinerama +xscreensaver xv"
+
+REQUIRED_USE="
+ || ( cli libmpv )
+ egl? ( opengl X )
+ enca? ( iconv )
+ lcms? ( opengl )
+ libguess? ( iconv )
+ luajit? ( lua )
+ opengl? ( || ( wayland X ) )
+ pvr? ( v4l )
+ vaapi? ( X )
+ vdpau? ( X )
+ wayland? ( opengl )
+ xinerama? ( X )
+ xscreensaver? ( X )
+ xv? ( X )
+"
+
+RDEPEND="
+ libav? ( >=media-video/libav-11:0=[encode?,threads,vaapi?,vdpau?] )
+ !libav? ( >=media-video/ffmpeg-2.4.0:0=[encode?,threads,vaapi?,vdpau?] )
+ sys-libs/zlib
+ X? (
+ x11-libs/libX11
+ x11-libs/libXext
+ >=x11-libs/libXrandr-1.2.0
+ opengl? (
+ virtual/opengl
+ egl? ( media-libs/mesa[egl] )
+ )
+ lcms? ( >=media-libs/lcms-2.6:2 )
+ vaapi? ( >=x11-libs/libva-0.34.0[X(+)] )
+ vdpau? ( >=x11-libs/libvdpau-0.2 )
+ xinerama? ( x11-libs/libXinerama )
+ xscreensaver? ( x11-libs/libXScrnSaver )
+ xv? ( x11-libs/libXv )
+ )
+ alsa? ( >=media-libs/alsa-lib-1.0.18 )
+ bluray? ( >=media-libs/libbluray-0.3.0 )
+ bs2b? ( media-libs/libbs2b )
+ cdio? (
+ dev-libs/libcdio
+ dev-libs/libcdio-paranoia
+ )
+ drm? ( x11-libs/libdrm )
+ dvb? ( virtual/linuxtv-dvb-headers )
+ dvd? (
+ >=media-libs/libdvdread-4.1.3
+ >=media-libs/libdvdnav-4.2.0
+ )
+ enca? ( app-i18n/enca )
+ iconv? ( virtual/libiconv )
+ jack? ( media-sound/jack-audio-connection-kit )
+ jpeg? ( virtual/jpeg:0 )
+ ladspa? ( media-libs/ladspa-sdk )
+ libass? (
+ >=media-libs/libass-0.12.1:=[enca?,fontconfig]
+ virtual/ttf-fonts
+ )
+ libcaca? ( >=media-libs/libcaca-0.99_beta18 )
+ libguess? ( >=app-i18n/libguess-1.0 )
+ lua? (
+ !luajit? ( || ( =dev-lang/lua-5.1*:= =dev-lang/lua-5.2*:= ) )
+ luajit? ( dev-lang/luajit:2 )
+ )
+ openal? ( >=media-libs/openal-1.13 )
+ pulseaudio? ( media-sound/pulseaudio )
+ rubberband? ( >=media-libs/rubberband-1.8.0 )
+ samba? ( net-fs/samba )
+ sdl? ( media-libs/libsdl2[threads] )
+ v4l? ( media-libs/libv4l )
+ wayland? (
+ >=dev-libs/wayland-1.6.0
+ media-libs/mesa[egl,wayland]
+ >=x11-libs/libxkbcommon-0.3.0
+ )
+"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ virtual/pkgconfig
+ >=dev-lang/perl-5.8
+ dev-python/docutils
+ doc-pdf? ( dev-python/rst2pdf )
+ X? (
+ x11-proto/videoproto
+ xinerama? ( x11-proto/xineramaproto )
+ xscreensaver? ( x11-proto/scrnsaverproto )
+ )
+"
+RDEPEND+="
+ selinux? ( sec-policy/selinux-mplayer )
+"
+
+pkg_setup() {
+ if ! use libass; then
+ ewarn "You have disabled the libass flag. No OSD or subtitles will be displayed."
+ fi
+
+ if use openal; then
+ ewarn "You have enabled the openal audio output which is a fallback"
+ ewarn "and disabled by upstream."
+ fi
+
+ if use sdl; then
+ ewarn "You have enabled the sdl video and audio outputs which are fallbacks"
+ ewarn "and disabled by upstream."
+ fi
+
+ if use libav; then
+ einfo "You have enabled media-video/libav instead of media-video/ffmpeg."
+ einfo "Upstream recommends media-video/ffmpeg, as some functionality is not"
+ einfo "provided by media-video/libav."
+ fi
+
+ einfo "For additional format support you need to enable the support on your"
+ einfo "libavcodec/libavformat provider:"
+ einfo " media-video/ffmpeg or media-video/libav"
+
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ cp "${DISTDIR}"/waf-${WAF_V} "${S}"/waf || die
+ chmod 0755 "${S}"/waf || die
+ epatch_user
+}
+
+src_configure() {
+ local mywafargs=(
+ --confdir="${EPREFIX}"/etc/${PN}
+ --docdir="${EPREFIX}"/usr/share/doc/${PF}
+ $(usex cli '' '--disable-cplayer')
+ $(use_enable libmpv libmpv-shared)
+ --disable-libmpv-static
+ --disable-build-date # keep build reproducible
+ --disable-optimize # do not add '-O2' to CFLAGS
+ --disable-debug-build # do not add '-g' to CFLAGS
+ --disable-test # avoid dev-util/cmocka automagic
+ $(use_enable doc-pdf pdf-build)
+ $(use_enable vf-dlopen vf-dlopen-filters)
+ $(use_enable cli zsh-comp)
+
+ # optional features
+ $(use_enable iconv)
+ $(use_enable libguess)
+ $(use_enable samba libsmbclient)
+ $(use_enable lua)
+ $(use_enable libass)
+ $(use_enable libass libass-osd)
+ $(use_enable encode encoding)
+ $(use_enable bluray libbluray)
+ $(use_enable dvd dvdread)
+ $(use_enable dvd dvdnav)
+ $(use_enable cdio cdda)
+ $(use_enable enca)
+ $(use_enable ladspa)
+ $(use_enable rubberband)
+ $(use_enable bs2b libbs2b)
+ $(use_enable lcms lcms2)
+ --disable-vapoursynth # vapoursynth is not packaged
+ --disable-vapoursynth-lazy
+ --enable-libavfilter
+ --enable-libavdevice
+ $(usex luajit '--lua=luajit' '')
+
+ # audio outputs
+ $(use_enable sdl sdl2) # SDL output is fallback for platforms where nothing better is available
+ --disable-sdl1
+ $(use_enable oss oss-audio)
+ --disable-rsound # media-sound/rsound is in pro-audio overlay only
+ $(use_enable pulseaudio pulse)
+ $(use_enable jack)
+ $(use_enable openal)
+ $(use_enable alsa)
+
+ # video outputs
+ $(use_enable wayland)
+ $(use_enable X x11)
+ $(use_enable xscreensaver xss)
+ $(use_enable X xext)
+ $(use_enable xv)
+ $(use_enable xinerama)
+ $(use_enable X xrandr)
+ $(usex X "$(use_enable opengl gl-x11)" '--disable-gl-x11')
+ $(use_enable egl egl-x11)
+ $(usex wayland "$(use_enable opengl gl-wayland)" '--disable-gl-wayland')
+ $(use_enable opengl gl)
+ $(use_enable vdpau)
+ $(usex vdpau "$(use_enable opengl vdpau-gl-x11)" '--disable-vdpau-gl-x11')
+ $(use_enable vaapi)
+ $(use_enable vaapi vaapi-vpp)
+ $(usex vaapi "$(use_enable opengl vaapi-glx)" '--disable-vaapi-glx')
+ $(use_enable libcaca caca)
+ $(use_enable drm)
+ $(use_enable jpeg)
+ $(use_enable raspberry-pi rpi)
+ $(use_enable raspberry-pi rpi-gles)
+
+ # hwaccels
+ $(use_enable vaapi vaapi-hwaccel)
+ $(use_enable vdpau vdpau-hwaccel)
+
+ # tv features
+ $(use_enable v4l tv)
+ $(use_enable v4l tv-v4l2)
+ $(use_enable v4l libv4l2)
+ $(use_enable pvr)
+ $(use_enable dvb dvbin)
+ )
+ waf-utils_src_configure "${mywafargs[@]}"
+}
+
+src_install() {
+ waf-utils_src_install
+
+ if use cli && use luajit; then
+ pax-mark -m "${ED}"usr/bin/mpv
+ fi
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+}
diff --git a/media-video/mpv/mpv-9999.ebuild b/media-video/mpv/mpv-9999.ebuild
new file mode 100644
index 000000000000..cdc11bd2a4d6
--- /dev/null
+++ b/media-video/mpv/mpv-9999.ebuild
@@ -0,0 +1,265 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+PYTHON_REQ_USE='threads(+)'
+inherit eutils python-any-r1 waf-utils pax-utils fdo-mime gnome2-utils
+
+WAF_V="1.8.4"
+
+DESCRIPTION="Media player based on MPlayer and mplayer2"
+HOMEPAGE="http://mpv.io/"
+SRC_URI="http://ftp.waf.io/pub/release/waf-${WAF_V}"
+DOCS=( README.md etc/example.conf etc/input.conf )
+
+if [[ ${PV} == *9999* ]]; then
+ EGIT_REPO_URI="https://github.com/mpv-player/mpv.git"
+ inherit git-r3
+else
+ SRC_URI+=" https://github.com/mpv-player/mpv/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux"
+ DOCS+=( RELEASE_NOTES )
+fi
+
+# See Copyright in source tarball and bug #506946. Waf is BSD, libmpv is ISC.
+LICENSE="GPL-2+ BSD ISC"
+SLOT="0"
+IUSE="+alsa bluray bs2b cdio +cli doc-pdf drm dvb +dvd egl +enca encode +iconv
+jack jpeg ladspa lcms +libass libav libcaca libguess libmpv lua luajit openal
++opengl oss pulseaudio pvr raspberry-pi rubberband samba sdl selinux v4l vaapi
+vdpau vf-dlopen wayland +X xinerama +xscreensaver xv"
+
+REQUIRED_USE="
+ || ( cli libmpv )
+ egl? ( opengl X )
+ enca? ( iconv )
+ lcms? ( opengl )
+ libguess? ( iconv )
+ luajit? ( lua )
+ opengl? ( || ( wayland X ) )
+ pvr? ( v4l )
+ vaapi? ( X )
+ vdpau? ( X )
+ wayland? ( opengl )
+ xinerama? ( X )
+ xscreensaver? ( X )
+ xv? ( X )
+"
+
+RDEPEND="
+ libav? ( >=media-video/libav-11:0=[encode?,threads,vaapi?,vdpau?] )
+ !libav? ( >=media-video/ffmpeg-2.4.0:0=[encode?,threads,vaapi?,vdpau?] )
+ sys-libs/zlib
+ X? (
+ x11-libs/libX11
+ x11-libs/libXext
+ >=x11-libs/libXrandr-1.2.0
+ opengl? (
+ virtual/opengl
+ egl? ( media-libs/mesa[egl] )
+ )
+ lcms? ( >=media-libs/lcms-2.6:2 )
+ vaapi? ( >=x11-libs/libva-0.34.0[X(+)] )
+ vdpau? ( >=x11-libs/libvdpau-0.2 )
+ xinerama? ( x11-libs/libXinerama )
+ xscreensaver? ( x11-libs/libXScrnSaver )
+ xv? ( x11-libs/libXv )
+ )
+ alsa? ( >=media-libs/alsa-lib-1.0.18 )
+ bluray? ( >=media-libs/libbluray-0.3.0 )
+ bs2b? ( media-libs/libbs2b )
+ cdio? (
+ dev-libs/libcdio
+ dev-libs/libcdio-paranoia
+ )
+ drm? ( x11-libs/libdrm )
+ dvb? ( virtual/linuxtv-dvb-headers )
+ dvd? (
+ >=media-libs/libdvdread-4.1.3
+ >=media-libs/libdvdnav-4.2.0
+ )
+ enca? ( app-i18n/enca )
+ iconv? ( virtual/libiconv )
+ jack? ( media-sound/jack-audio-connection-kit )
+ jpeg? ( virtual/jpeg:0 )
+ ladspa? ( media-libs/ladspa-sdk )
+ libass? (
+ >=media-libs/libass-0.12.1:=[enca?,fontconfig]
+ virtual/ttf-fonts
+ )
+ libcaca? ( >=media-libs/libcaca-0.99_beta18 )
+ libguess? ( >=app-i18n/libguess-1.0 )
+ lua? (
+ !luajit? ( || ( =dev-lang/lua-5.1*:= =dev-lang/lua-5.2*:= ) )
+ luajit? ( dev-lang/luajit:2 )
+ )
+ openal? ( >=media-libs/openal-1.13 )
+ pulseaudio? ( media-sound/pulseaudio )
+ rubberband? ( >=media-libs/rubberband-1.8.0 )
+ samba? ( net-fs/samba )
+ sdl? ( media-libs/libsdl2[threads] )
+ v4l? ( media-libs/libv4l )
+ wayland? (
+ >=dev-libs/wayland-1.6.0
+ media-libs/mesa[egl,wayland]
+ >=x11-libs/libxkbcommon-0.3.0
+ )
+"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ virtual/pkgconfig
+ >=dev-lang/perl-5.8
+ dev-python/docutils
+ doc-pdf? ( dev-python/rst2pdf )
+ X? (
+ x11-proto/videoproto
+ xinerama? ( x11-proto/xineramaproto )
+ xscreensaver? ( x11-proto/scrnsaverproto )
+ )
+"
+RDEPEND+="
+ selinux? ( sec-policy/selinux-mplayer )
+"
+
+pkg_setup() {
+ if ! use libass; then
+ ewarn "You have disabled the libass flag. No OSD or subtitles will be displayed."
+ fi
+
+ if use openal; then
+ ewarn "You have enabled the openal audio output which is a fallback"
+ ewarn "and disabled by upstream."
+ fi
+
+ if use sdl; then
+ ewarn "You have enabled the sdl video and audio outputs which are fallbacks"
+ ewarn "and disabled by upstream."
+ fi
+
+ if use libav; then
+ einfo "You have enabled media-video/libav instead of media-video/ffmpeg."
+ einfo "Upstream recommends media-video/ffmpeg, as some functionality is not"
+ einfo "provided by media-video/libav."
+ fi
+
+ einfo "For additional format support you need to enable the support on your"
+ einfo "libavcodec/libavformat provider:"
+ einfo " media-video/ffmpeg or media-video/libav"
+
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ cp "${DISTDIR}"/waf-${WAF_V} "${S}"/waf || die
+ chmod 0755 "${S}"/waf || die
+ epatch_user
+}
+
+src_configure() {
+ local mywafargs=(
+ --confdir="${EPREFIX}"/etc/${PN}
+ --docdir="${EPREFIX}"/usr/share/doc/${PF}
+ $(usex cli '' '--disable-cplayer')
+ $(use_enable libmpv libmpv-shared)
+ --disable-libmpv-static
+ --disable-build-date # keep build reproducible
+ --disable-optimize # do not add '-O2' to CFLAGS
+ --disable-debug-build # do not add '-g' to CFLAGS
+ --disable-test # avoid dev-util/cmocka automagic
+ $(use_enable doc-pdf pdf-build)
+ $(use_enable vf-dlopen vf-dlopen-filters)
+ $(use_enable cli zsh-comp)
+
+ # optional features
+ $(use_enable iconv)
+ $(use_enable libguess)
+ $(use_enable samba libsmbclient)
+ $(use_enable lua)
+ $(use_enable libass)
+ $(use_enable libass libass-osd)
+ $(use_enable encode encoding)
+ $(use_enable bluray libbluray)
+ $(use_enable dvd dvdread)
+ $(use_enable dvd dvdnav)
+ $(use_enable cdio cdda)
+ $(use_enable enca)
+ $(use_enable ladspa)
+ $(use_enable rubberband)
+ $(use_enable bs2b libbs2b)
+ $(use_enable lcms lcms2)
+ --disable-vapoursynth # vapoursynth is not packaged
+ --disable-vapoursynth-lazy
+ --enable-libavfilter
+ --enable-libavdevice
+ $(usex luajit '--lua=luajit' '')
+
+ # audio outputs
+ $(use_enable sdl sdl2) # SDL output is fallback for platforms where nothing better is available
+ --disable-sdl1
+ $(use_enable oss oss-audio)
+ --disable-rsound # media-sound/rsound is in pro-audio overlay only
+ $(use_enable pulseaudio pulse)
+ $(use_enable jack)
+ $(use_enable openal)
+ $(use_enable alsa)
+
+ # video outputs
+ $(use_enable wayland)
+ $(use_enable X x11)
+ $(use_enable xscreensaver xss)
+ $(use_enable X xext)
+ $(use_enable xv)
+ $(use_enable xinerama)
+ $(use_enable X xrandr)
+ $(usex X "$(use_enable opengl gl-x11)" '--disable-gl-x11')
+ $(use_enable egl egl-x11)
+ $(usex wayland "$(use_enable opengl gl-wayland)" '--disable-gl-wayland')
+ $(use_enable opengl gl)
+ $(use_enable vdpau)
+ $(usex vdpau "$(use_enable opengl vdpau-gl-x11)" '--disable-vdpau-gl-x11')
+ $(use_enable vaapi)
+ $(use_enable vaapi vaapi-vpp)
+ $(usex vaapi "$(use_enable opengl vaapi-glx)" '--disable-vaapi-glx')
+ $(use_enable libcaca caca)
+ $(use_enable drm)
+ $(use_enable jpeg)
+ $(use_enable raspberry-pi rpi)
+ $(use_enable raspberry-pi rpi-gles)
+
+ # hwaccels
+ $(use_enable vaapi vaapi-hwaccel)
+ $(use_enable vdpau vdpau-hwaccel)
+
+ # tv features
+ $(use_enable v4l tv)
+ $(use_enable v4l tv-v4l2)
+ $(use_enable v4l libv4l2)
+ $(use_enable pvr)
+ $(use_enable dvb dvbin)
+ )
+ waf-utils_src_configure "${mywafargs[@]}"
+}
+
+src_install() {
+ waf-utils_src_install
+
+ if use cli && use luajit; then
+ pax-mark -m "${ED}"usr/bin/mpv
+ fi
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+}
diff --git a/media-video/noad/Manifest b/media-video/noad/Manifest
new file mode 100644
index 000000000000..d1c3a022f61d
--- /dev/null
+++ b/media-video/noad/Manifest
@@ -0,0 +1,2 @@
+DIST noad-0.7.3.tar.bz2 174036 SHA256 6fb597fb0ae0e4c4c954f2feb89dcc88c4852a0f0845aa214606996abb29f6cb SHA512 0edc81c9b689c49b99cd68b80bf7acbb0af9757b4d5439edd0610ca96bf0ee4783844aa0dfe52e3303b21f5794af3ad9a216371d4e698bbf26f24bc31be43c66 WHIRLPOOL cfa03475dc657502fb4ccd67ddb8139edac4b4693e98c9897eb2ac99b38fc5cbe678f975244cd06a8d9464b5c4da9bd1b4354938d4e833e05fae5c2d7e220be2
+DIST noad-0.8.6.tar.bz2 188085 SHA256 4b087c9688d0c8e86e248c1bc775c09541625a7b7ae13a85ec000266e3b69780 SHA512 ffca9e8bc78719350ffdfe59a4f258033f843ddf761ca5d8893cde5a4968a644c0318fd86b60e7b9e78b0650f8f02c68e6f7a95f4dfb702ab30d84ad3750c9e9 WHIRLPOOL c9c5ce710021965743eb1fcad18d6d9946101e78ca802eeb2b146a214f03e3a765be72fd356dcd209b5e43414585db2b3ef43a104d6bdef76ebaa0b29baa2ab1
diff --git a/media-video/noad/files/confd_vdraddon.noad b/media-video/noad/files/confd_vdraddon.noad
new file mode 100644
index 000000000000..47699b3e8c8e
--- /dev/null
+++ b/media-video/noad/files/confd_vdraddon.noad
@@ -0,0 +1,72 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+#########
+##
+# run Noad
+# available Parameter
+# no | yes
+#
+VDR_USE_NOAD="yes"
+
+## do online scan while recording
+# you can choose between
+# no - disable online scan
+# live - scan only live recordings online (named @...)
+# all - scan all recordings with online mode
+# available Parameter
+# no | live | all
+#
+NOAD_ONLINE="no"
+
+## Use this nice-level when running noad / or no-niceness
+# available Parameter
+# no | 0 ... 19
+#NOAD_NICE_LEVEL="no"
+NOAD_NICE_LEVEL="18"
+
+## use ac3 detection
+# available Parameter
+# yes | no
+#
+NOAD_AC3="yes"
+
+## detect jumping logos
+# available Parameter
+# yes | no
+#
+NOAD_JUMP="yes"
+
+## detect overlaps
+# available Parameter
+# yes | no
+#
+NOAD_OVERLAP="yes"
+
+## send an OSD-Message to localhost:2001 ( >=vdr-1.7.15 localhost:6419 )
+# for start and end
+# available Parameter
+# yes | no
+#
+NOAD_MESSAGES="yes"
+
+## only scan if sharemarks did not produce an ptsmarks.vdr file
+# available Parameter
+# yes | no
+NOAD_ONLY_SCAN_IF_NO_PTSMARKS="yes"
+
+## only scan if there are no cut-marks already there (cutting while vdr still records)
+# available Parameter
+# yes | no
+NOAD_ONLY_SCAN_IF_NO_MARKS="yes"
+
+## add your own parameter here,
+# yust run 'noad' in konsole for more parameter
+NOAD_PARAMETER=""
+
+
+
+
+
+
diff --git a/media-video/noad/files/noad-reccmd b/media-video/noad/files/noad-reccmd
new file mode 100644
index 000000000000..3979baa574f9
--- /dev/null
+++ b/media-video/noad/files/noad-reccmd
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+VDR_RECORD_STATE=reccmd
+VDR_RECORD_NAME="${1}"
+
+. /usr/share/vdr/record/record-50-noad.sh "${VDR_RECORD_STATE}" "${VDR_RECORD_NAME}"
+
diff --git a/media-video/noad/files/patches-0.7.x/noad-0.7.3-ffmpeg_detection.diff b/media-video/noad/files/patches-0.7.x/noad-0.7.3-ffmpeg_detection.diff
new file mode 100644
index 000000000000..e757aeb884b0
--- /dev/null
+++ b/media-video/noad/files/patches-0.7.x/noad-0.7.3-ffmpeg_detection.diff
@@ -0,0 +1,13 @@
+Index: noad-0.7.3/configure.ac
+===================================================================
+--- noad-0.7.3.orig/configure.ac
++++ noad-0.7.3/configure.ac
+@@ -158,7 +158,7 @@ dnl check that libavcodec is usable
+ dnl ---------------------------------------------------------------------------
+ if test "$withffmpeg" == "1"; then
+ AC_SUBST(LIBAVCODEC,"-lavcodec")
+- AC_CHECK_LIB([avcodec],[avcodec_init],[AC_SUBST(HAVE_LIBAVCODEC,1) AC_SUBST(LIBS,"$LIBS $LIBAVCODEC ") ])
++ AC_CHECK_LIB([avcodec],[avcodec_register_all],[AC_SUBST(HAVE_LIBAVCODEC,1) AC_SUBST(LIBS,"$LIBS $LIBAVCODEC ") ])
+ fi
+
+
diff --git a/media-video/noad/files/patches-0.7.x/noad-0.7.3-hangcheck.diff b/media-video/noad/files/patches-0.7.x/noad-0.7.3-hangcheck.diff
new file mode 100644
index 000000000000..37788a197fd7
--- /dev/null
+++ b/media-video/noad/files/patches-0.7.x/noad-0.7.3-hangcheck.diff
@@ -0,0 +1,21 @@
+diff -ru noad-0.6.0-orig/main.cpp noad-0.6.0/main.cpp
+--- noad-0.6.0-orig/main.cpp 2007-05-12 17:28:01.000000000 +0200
++++ noad-0.6.0/main.cpp 2007-05-12 18:20:30.000000000 +0200
+@@ -566,10 +566,17 @@
+ signal(SIGABRT, signal_handler);
+ signal(SIGSEGV, signal_handler);
+ signal(SIGUSR1, signal_handler);
++ signal(SIGALRM, signal_handler);
+
+ // do cleanup at exit...
+ atexit(cleanUp);
+
++
++ if (!bOnline) {
++ // now start alarm timer to kill hanging noad (hardcoded 30min timeout)
++ alarm(30*60);
++ }
++
+ // now do the work..,
+ doNoad(bBefore, recDir);
+
diff --git a/media-video/noad/files/patches-0.7.x/noad-0.7.3_gcc-4.7.diff b/media-video/noad/files/patches-0.7.x/noad-0.7.3_gcc-4.7.diff
new file mode 100644
index 000000000000..ca37f8e22a87
--- /dev/null
+++ b/media-video/noad/files/patches-0.7.x/noad-0.7.3_gcc-4.7.diff
@@ -0,0 +1,17 @@
+https://bugs.gentoo.org/show_bug.cgi?id=423623
+compilefix gcc-4.7.x
+
+signed-of-by: Joerg Bornkessel <hd_brummy@gentoo.org> (2012/06/27)
+
+diff -Naur noad-0.7.3.orig/vdr_cl.h noad-0.7.3/vdr_cl.h
+--- noad-0.7.3.orig/vdr_cl.h 2012-06-27 20:27:57.000000000 +0200
++++ noad-0.7.3/vdr_cl.h 2012-06-27 20:30:56.000000000 +0200
+@@ -287,7 +287,7 @@
+ {
+ T *l = new T;
+ if (l->Parse(s))
+- Add(l);
++ this->Add(l);
+ else
+ {
+ esyslog("ERROR: error in %s, line %d", fileName, line);
diff --git a/media-video/noad/files/patches-0.7.x/noad-0.7.3_missing_include.diff b/media-video/noad/files/patches-0.7.x/noad-0.7.3_missing_include.diff
new file mode 100644
index 000000000000..c3c335c2663b
--- /dev/null
+++ b/media-video/noad/files/patches-0.7.x/noad-0.7.3_missing_include.diff
@@ -0,0 +1,14 @@
+Add missing includes for ressource limits.
+
+Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
+
+--- main.cpp
++++ main.cpp
+@@ -22,6 +22,7 @@
+
+ #include <stdlib.h>
+ #include <time.h>
++#include <sys/resource.h>
+ #include <sys/wait.h>
+ #include <signal.h>
+ #include <execinfo.h>
diff --git a/media-video/noad/files/patches-0.8.x/noad-0.8.6-ffmpeg25.patch b/media-video/noad/files/patches-0.8.x/noad-0.8.6-ffmpeg25.patch
new file mode 100644
index 000000000000..455252a74c8a
--- /dev/null
+++ b/media-video/noad/files/patches-0.8.x/noad-0.8.6-ffmpeg25.patch
@@ -0,0 +1,16 @@
+Index: noad-0.8.6/ffmpeg_decoder.cpp
+===================================================================
+--- noad-0.8.6.orig/ffmpeg_decoder.cpp
++++ noad-0.8.6/ffmpeg_decoder.cpp
+@@ -253,7 +253,11 @@ int FFMPegDecoder::decoder_exit()
+ // close the file
+ if( pFormatCtx )
+ {
++#if LIBAVFORMAT_VERSION_MAJOR < 54
+ av_close_input_file(pFormatCtx);
++#else
++ avformat_close_input(&pFormatCtx);
++#endif
+ pFormatCtx = NULL;
+ }
+ // Close the codec
diff --git a/media-video/noad/files/patches-0.8.x/noad-0.8.6-libav9.diff b/media-video/noad/files/patches-0.8.x/noad-0.8.6-libav9.diff
new file mode 100644
index 000000000000..a9b6c89d9f8c
--- /dev/null
+++ b/media-video/noad/files/patches-0.8.x/noad-0.8.6-libav9.diff
@@ -0,0 +1,106 @@
+compile fix noad-0.8.6
+testet with libav-9 ffmpeg-2.2.9
+Signed-of-by: Joerg Bornkessel <hd_brummy@gentoo.o> (22 Oct 2014)
+diff -Naur noad-0.8.6.orig/audiotools.cpp noad-0.8.6/audiotools.cpp
+--- noad-0.8.6.orig/audiotools.cpp 2014-10-22 14:26:57.809249955 +0200
++++ noad-0.8.6/audiotools.cpp 2014-10-22 14:28:06.830249955 +0200
+@@ -50,9 +50,9 @@
+ uint8_t *outbuf=NULL;
+ AVCodec *codec=NULL;
+ AVCodecContext *codecContext= NULL;
+-#if LIBAVCODEC_VERSION_MAJOR > 54
++//#if LIBAVCODEC_VERSION_MAJOR > 54
+ AVDictionary *avDictionary = NULL; // "create" an empty dictionary
+-#endif
++//#endif
+ int64_t basepts=0;
+ int64_t audiobasepts=0;
+ //int64_t audiopts=0;
+@@ -108,13 +108,13 @@
+ codecContext = avcodec_alloc_context3(codec);
+ #endif
+
+-#if LIBAVCODEC_VERSION_MAJOR > 54
++//#if LIBAVCODEC_VERSION_MAJOR > 54
+ /* open it */
+ if (avcodec_open2(codecContext, codec, &avDictionary) < 0)
+-#else
++//#else
+ /* open it */
+- if (avcodec_open(codecContext, codec) < 0)
+-#endif
++// if (avcodec_open(codecContext, codec) < 0)
++//#endif
+ {
+ fprintf(stderr, "could not open codec\n");
+ }
+@@ -129,9 +129,9 @@
+ {
+ free(outbuf);
+ avcodec_close(codecContext);
+-#if LIBAVCODEC_VERSION_MAJOR > 54
++//#if LIBAVCODEC_VERSION_MAJOR > 54
+ av_dict_free(&avDictionary);
+-#endif
++//#endif
+ av_free(codecContext);
+ av_codec_initialised = false;
+ }
+diff -Naur noad-0.8.6.orig/ffmpeg_decoder.cpp noad-0.8.6/ffmpeg_decoder.cpp
+--- noad-0.8.6.orig/ffmpeg_decoder.cpp 2014-10-22 14:26:57.808249955 +0200
++++ noad-0.8.6/ffmpeg_decoder.cpp 2014-10-22 14:38:26.366249955 +0200
+@@ -184,7 +184,7 @@
+
+ // Retrieve stream information
+ resetDecoder();
+- int openCode2 = av_find_stream_info(pFormatCtx);
++ int openCode2 = avformat_find_stream_info(pFormatCtx, NULL);
+ if(openCode2<0)
+ return -1; // Couldn't find stream information
+
+@@ -222,13 +222,13 @@
+ if(pCodec->capabilities & CODEC_CAP_TRUNCATED)
+ pCodecCtx->flags|=CODEC_FLAG_TRUNCATED;
+
+-#if LIBAVCODEC_VERSION_MAJOR > 54
++//#if LIBAVCODEC_VERSION_MAJOR > 54
+ // Open codec
+ if(avcodec_open2(pCodecCtx, pCodec,&avDictionary) < 0)
+-#else
++//#else
+ // Open codec
+- if(avcodec_open(pCodecCtx, pCodec)<0)
+-#endif
++// if(avcodec_open(pCodecCtx, pCodec)<0)
++//#endif
+ return -1; // Could not open codec
+
+
+@@ -270,10 +270,10 @@
+ pIOContext = NULL;
+ }
+ #endif
+-#if LIBAVCODEC_VERSION_MAJOR > 54
++//#if LIBAVCODEC_VERSION_MAJOR > 54
+ av_dict_free(&avDictionary);
+ avDictionary = NULL;
+-#endif
++//#endif
+ return 0;
+ }
+
+diff -Naur noad-0.8.6.orig/ffmpeg_decoder.h noad-0.8.6/ffmpeg_decoder.h
+--- noad-0.8.6.orig/ffmpeg_decoder.h 2014-10-22 14:26:57.807249955 +0200
++++ noad-0.8.6/ffmpeg_decoder.h 2014-10-22 14:36:27.213249955 +0200
+@@ -22,9 +22,9 @@
+ int i, videoStream;
+ AVCodecContext *pCodecCtx;
+ AVCodec *pCodec;
+-#if LIBAVCODEC_VERSION_MAJOR > 54
++//#if LIBAVCODEC_VERSION_MAJOR > 54
+ AVDictionary *avDictionary;
+-#endif
++//#endif
+ AVFrame *pFrame;
+
+ public:
diff --git a/media-video/noad/files/pre-shutdown-15-noad.sh b/media-video/noad/files/pre-shutdown-15-noad.sh
new file mode 100644
index 000000000000..476741e7bac7
--- /dev/null
+++ b/media-video/noad/files/pre-shutdown-15-noad.sh
@@ -0,0 +1,41 @@
+#
+# pre-shutdown script to abort shutdown in case noad is running
+
+check_runtime() {
+ local PID="$1"
+
+ # Max runtime of 30m = 1800s
+ local NOAD_MAX_TIME=1800
+ local NOW="$(date +%s)"
+ local START="$(stat --format "%Z" /proc/${PID}/)"
+ local DIFF=$(( $NOW - $START ))
+ if [ "${DIFF}" -ge "${NOAD_MAX_TIME}" ]; then
+ kill ${PID}
+ sleep 2
+ kill -9 ${PID}
+ return 0
+ else
+ # There still is a running noad process
+ return 1
+ fi
+}
+
+check_noad() {
+ local PIDOF=pidof
+ local NOAD=/usr/bin/noad
+
+ local PIDS=$(${PIDOF} ${NOAD})
+ local PID
+ local still_running=0
+ for PID in $PIDS; do
+ check_runtime "${PID}"
+ [ "$?" = "1" ] && still_running=1
+ done
+
+ if [ "${still_running}" -gt "0" ]; then
+ # stop shutdown
+ shutdown_abort_can_force "noad is running"
+ fi
+}
+
+check_noad
diff --git a/media-video/noad/files/reccmds.noad.conf b/media-video/noad/files/reccmds.noad.conf
new file mode 100644
index 000000000000..5d35495a90b8
--- /dev/null
+++ b/media-video/noad/files/reccmds.noad.conf
@@ -0,0 +1 @@
+Scan for Commercials (noad) :/usr/share/vdr/bin/noad-reccmd
diff --git a/media-video/noad/files/record-50-noad.sh b/media-video/noad/files/record-50-noad.sh
new file mode 100644
index 000000000000..6a45c03a88e6
--- /dev/null
+++ b/media-video/noad/files/record-50-noad.sh
@@ -0,0 +1,67 @@
+# $Id$
+#
+# Joerg Bornkessel <hd_brummy@gentoo.org>
+# Mathias Schwarzott <zzam@gentoo.org>
+#
+
+. /etc/conf.d/vdraddon.noad
+
+CMD="/usr/bin/noad"
+
+# Parameter to start NoAd
+# parameter are "no | yes"
+
+FORCE_OFFLINE_SCAN=no
+
+if [ "${VDR_RECORD_STATE}" = "reccmd" ]; then
+ # script started from reccmd
+ FORCE_OFFLINE_SCAN=yes
+ VDR_RECORD_STATE=after
+fi
+
+
+if [ "${FORCE_OFFLINE_SCAN}" != "yes" ]; then
+ # allow it to abort on certain conditions
+
+ # automatic noad scan disabled
+ [ "${VDR_USE_NOAD}" = "yes" ] || return
+
+ # ptsmarks existing
+ if [ "${NOAD_ONLY_SCAN_IF_NO_PTSMARKS}" = "yes" ]; then
+ [ -f "${VDR_RECORD_NAME}/ptsmarks.vdr" ] && return
+ fi
+
+ # marks existing
+ if [ "${NOAD_ONLY_SCAN_IF_NO_MARKS}" = "yes" ]; then
+ [ -f "${VDR_RECORD_NAME}/marks.vdr" ] && return
+ fi
+
+ # Add Online-scanning parameter
+ case "${NOAD_ONLINE}" in
+ live|yes)
+ CMD="${CMD} --online=1"
+ ;;
+ all)
+ CMD="${CMD} --online=2"
+ ;;
+ no)
+ # abort stage "before" here
+ [ "${VDR_RECORD_STATE}" = "before" ] && return
+ ;;
+ esac
+fi
+
+[ "${NOAD_AC3}" = "yes" ] && CMD="${CMD} -a"
+[ "${NOAD_JUMP}" = "yes" ] && CMD="${CMD} -j"
+[ "${NOAD_OVERLAP}" = "yes" ] && CMD="${CMD} -o"
+[ "${NOAD_MESSAGES}" = "yes" ] && CMD="${CMD} -O"
+
+: ${NOAD_NICE_LEVEL:=18}
+if [ "${NOAD_NICE_LEVEL}" != "no" ]; then
+ NOAD_NICE_LEVEL=$(($NOAD_NICE_LEVEL+0))
+ CMD="nice -n ${NOAD_NICE_LEVEL} ${CMD}"
+fi
+
+CMD="${CMD} ${NOAD_PARAMETER}"
+${CMD} "${VDR_RECORD_STATE}" "${VDR_RECORD_NAME}"
+
diff --git a/media-video/noad/metadata.xml b/media-video/noad/metadata.xml
new file mode 100644
index 000000000000..5c64a44cf7c5
--- /dev/null
+++ b/media-video/noad/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>vdr@gentoo.org</email>
+ <name>Gentoo VDR Project</name>
+ </maintainer>
+ <use>
+ <flag name="libmpeg2">Support for libmpeg2 library</flag>
+ </use>
+ <longdescription lang="en">
+ Mark commercial Breaks in VDR records.
+ </longdescription>
+</pkgmetadata>
diff --git a/media-video/noad/noad-0.7.3-r1.ebuild b/media-video/noad/noad-0.7.3-r1.ebuild
new file mode 100644
index 000000000000..66f79ad5101a
--- /dev/null
+++ b/media-video/noad/noad-0.7.3-r1.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils toolchain-funcs
+
+DESCRIPTION="Mark commercial Breaks in VDR records"
+HOMEPAGE="http://noad.heliohost.org/"
+SRC_URI="http://noad.heliohost.org/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="ffmpeg"
+
+RDEPEND="media-gfx/imagemagick
+ media-libs/libmpeg2:=
+ ffmpeg? ( virtual/ffmpeg )
+ !media-plugins/vdr-markad"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ EPATCH_FORCE=yes EPATCH_SUFFIX=diff EPATCH_SOURCE="${FILESDIR}"/patches-${PV%.*}.x epatch
+
+ if has_version '>=media-video/vdr-1.7.15'; then
+ sed -i -e 's:2001:6419:' -i svdrpc.cpp || die
+ fi
+
+ sed -i -e '/CXXFLAGS.*O3/d' configure.ac || die #426746
+
+ sed -i \
+ -e "s:-lMagick++:$($(tc-getPKG_CONFIG) --libs-only-l Magick++):" \
+ Makefile.am || die #467134
+
+ # FIXME: --with-tools, markpics will compile but showindex won't!
+ sed -i \
+ -e '/^noinst_PROGRAMS/s:@TOOLSRC@::' \
+ -e '/^EXTRA_PROGRAMS/s:showindex::' \
+ Makefile.am || die
+
+ # ld: audiotools.o: undefined reference to symbol 'av_free@@LIBAVUTIL_51'
+ if use ffmpeg; then
+ sed -i -e 's:-lavcodec:& -lavutil:' configure.ac || die
+ fi
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --with-magick \
+ --with-mpeginclude=/usr/include/mpeg2dec \
+ --with-tools \
+ $(usex ffmpeg '--with-ffmpeg --with-ffmpeginclude=/usr/include' '')
+}
+
+src_install() {
+ dobin noad markpics # showindex
+
+ dodoc README INSTALL
+ # example scripts are installed as dokumentation
+ dodoc allnewnoad allnoad allnoadnice clearlogos noadifnew stat2html
+
+ newconfd "${FILESDIR}"/confd_vdraddon.noad vdraddon.noad
+
+ insinto /usr/share/vdr/record
+ doins "${FILESDIR}"/record-50-noad.sh
+
+ insinto /usr/share/vdr/shutdown
+ doins "${FILESDIR}"/pre-shutdown-15-noad.sh
+
+ insinto /etc/vdr/reccmds
+ doins "${FILESDIR}"/reccmds.noad.conf
+
+ exeinto /usr/share/vdr/bin
+ doexe "${FILESDIR}"/noad-reccmd
+}
+
+pkg_postinst() {
+ elog
+ elog "To integrate noad in VDR you should do this:"
+ elog
+ elog "start and set Parameter in /etc/conf.d/vdraddon.noad"
+ elog
+ elog "Note: You can use here all pararmeters for noad,"
+ elog "please look in the documentation of noad."
+}
diff --git a/media-video/noad/noad-0.7.3.ebuild b/media-video/noad/noad-0.7.3.ebuild
new file mode 100644
index 000000000000..acce5bb5ffb6
--- /dev/null
+++ b/media-video/noad/noad-0.7.3.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils flag-o-matic autotools
+
+DESCRIPTION="Mark commercial Breaks in VDR records"
+HOMEPAGE="http://noad.heliohost.org/"
+SRC_URI="http://noad.heliohost.org/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="ffmpeg imagemagick"
+
+DEPEND="media-libs/libmpeg2
+ ffmpeg? ( >=virtual/ffmpeg-0.4.8 )
+ imagemagick? ( >=media-gfx/imagemagick-6.2.4.2-r1 )
+ !media-plugins/vdr-markad"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+
+ epatch "${FILESDIR}"/patches-0.7.x/"${P}"-hangcheck.diff
+
+ # UINT64_C is needed by ffmpeg headers
+ append-flags -D__STDC_CONSTANT_MACROS
+
+ if has_version ">=media-video/vdr-1.7.15"; then
+ sed -e "s:2001:6419:" -i svdrpc.cpp
+ fi
+
+ epatch "${FILESDIR}/patches-0.7.x/${P}_gcc-4.7.diff"
+
+ eautoreconf
+}
+
+src_configure() {
+
+ local=myconf
+ use ffmpeg && myconf="--with-ffmpeg --with-ffmpeginclude=/usr/include"
+
+ econf \
+ ${myconf} \
+ $(use_with imagemagick magick) \
+ --with-mpeginclude=/usr/include/mpeg2dec
+# --with-tools # fails on showindex, marcpics compile
+}
+
+src_install() {
+
+ dobin noad
+# fix me later!
+# dobin noad showindex
+# use imagemagick && dobin markpics
+
+ dodoc README INSTALL
+ # example scripts are installed as dokumentation
+ dodoc allnewnoad allnoad allnoadnice clearlogos noadifnew stat2html
+
+ newconfd "${FILESDIR}"/confd_vdraddon.noad vdraddon.noad
+
+ insinto /usr/share/vdr/record
+ doins "${FILESDIR}"/record-50-noad.sh
+
+ insinto /usr/share/vdr/shutdown
+ doins "${FILESDIR}"/pre-shutdown-15-noad.sh
+
+ insinto /etc/vdr/reccmds
+ doins "${FILESDIR}"/reccmds.noad.conf
+
+ exeinto /usr/share/vdr/bin
+ doexe "${FILESDIR}"/noad-reccmd
+}
+
+pkg_postinst() {
+
+ elog
+ elog "Congratulations, you have just installed noad!,"
+ elog "To integrate noad in VDR you should do this:"
+ elog
+ elog "start and set Parameter in /etc/conf.d/vdraddon.noad"
+ elog
+ elog "Note: You can use here all pararmeters for noad,"
+ elog "please look in the documentation of noad."
+}
diff --git a/media-video/noad/noad-0.8.6-r1.ebuild b/media-video/noad/noad-0.8.6-r1.ebuild
new file mode 100644
index 000000000000..0c799c8e767f
--- /dev/null
+++ b/media-video/noad/noad-0.8.6-r1.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils toolchain-funcs confutils
+
+DESCRIPTION="Mark commercial breaks in VDR recordings"
+HOMEPAGE="http://noad.net23.net/"
+SRC_URI="http://noad.net23.net/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="+ffmpeg imagemagick libmpeg2"
+
+RDEPEND="
+ libmpeg2? ( media-libs/libmpeg2:= )
+ ffmpeg? ( virtual/ffmpeg )
+ imagemagick? ( media-gfx/imagemagick )
+ !media-plugins/vdr-markad"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+REQUIRED_USE="|| ( ffmpeg libmpeg2 )"
+
+src_prepare() {
+ sed -i -e 's:2001:6419:' svdrpc.cpp main.cpp
+
+ # tested libav-9, ffmepg-2.2.9
+ epatch "${FILESDIR}/patches-0.8.x/${P}-libav9.diff" \
+ "${FILESDIR}/patches-0.8.x/${P}-ffmpeg25.patch"
+
+ eautoreconf
+}
+
+src_configure() {
+ confutils_require_any ffmpeg libmpeg2
+ econf \
+ $(usex imagemagick '--with-magick') \
+ $(usex ffmpeg '' '--without-ffmpeg') \
+ $(usex libmpeg2 '' '--without-libmpeg2') \
+ --with-tools
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)" # see bug #469810
+}
+
+src_install() {
+ dobin noad showindex checkMarks
+ use imagemagick && dobin markpics
+
+ dodoc README INSTALL
+ # example scripts are installed as dokumentation
+ dodoc allnewnoad allnoad allnoadnice clearlogos noadcall.sh noadifnew stat2html statupd
+
+ newconfd "${FILESDIR}"/confd_vdraddon.noad vdraddon.noad
+
+ insinto /usr/share/vdr/record
+ doins "${FILESDIR}"/record-50-noad.sh
+
+ insinto /usr/share/vdr/shutdown
+ doins "${FILESDIR}"/pre-shutdown-15-noad.sh
+
+ insinto /etc/vdr/reccmds
+ doins "${FILESDIR}"/reccmds.noad.conf
+
+ exeinto /usr/share/vdr/bin
+ doexe "${FILESDIR}"/noad-reccmd
+}
+
+pkg_postinst() {
+ elog
+ elog "To integrate noad in VDR you should do this:"
+ elog
+ elog "start and set Parameter in /etc/conf.d/vdraddon.noad"
+ elog
+ elog "Note: You can use here all parameters for noad,"
+ elog "please look in the documentation of noad."
+}
diff --git a/media-video/noad/noad-0.8.6.ebuild b/media-video/noad/noad-0.8.6.ebuild
new file mode 100644
index 000000000000..297a1a3e1e45
--- /dev/null
+++ b/media-video/noad/noad-0.8.6.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils toolchain-funcs confutils
+
+DESCRIPTION="Mark commercial breaks in VDR recordings"
+HOMEPAGE="http://noad.net23.net/"
+SRC_URI="http://noad.net23.net/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+ffmpeg imagemagick libmpeg2"
+
+RDEPEND="
+ libmpeg2? ( media-libs/libmpeg2:= )
+ ffmpeg? ( virtual/ffmpeg )
+ imagemagick? ( media-gfx/imagemagick )
+ !media-plugins/vdr-markad"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+REQUIRED_USE="|| ( ffmpeg libmpeg2 )"
+
+src_prepare() {
+ if has_version '>=media-video/vdr-1.7.15'; then
+ sed -i -e 's:2001:6419:' svdrpc.cpp main.cpp || die
+ fi
+ eautoreconf
+}
+
+src_configure() {
+ confutils_require_any ffmpeg libmpeg2
+ econf \
+ $(usex imagemagick '--with-magick') \
+ $(usex ffmpeg '' '--without-ffmpeg') \
+ $(usex libmpeg2 '' '--without-libmpeg2') \
+ --with-tools
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)" # see bug #469810
+}
+
+src_install() {
+ dobin noad showindex checkMarks
+ use imagemagick && dobin markpics
+
+ dodoc README INSTALL
+ # example scripts are installed as dokumentation
+ dodoc allnewnoad allnoad allnoadnice clearlogos noadcall.sh noadifnew stat2html statupd
+
+ newconfd "${FILESDIR}"/confd_vdraddon.noad vdraddon.noad
+
+ insinto /usr/share/vdr/record
+ doins "${FILESDIR}"/record-50-noad.sh
+
+ insinto /usr/share/vdr/shutdown
+ doins "${FILESDIR}"/pre-shutdown-15-noad.sh
+
+ insinto /etc/vdr/reccmds
+ doins "${FILESDIR}"/reccmds.noad.conf
+
+ exeinto /usr/share/vdr/bin
+ doexe "${FILESDIR}"/noad-reccmd
+}
+
+pkg_postinst() {
+ elog
+ elog "To integrate noad in VDR you should do this:"
+ elog
+ elog "start and set Parameter in /etc/conf.d/vdraddon.noad"
+ elog
+ elog "Note: You can use here all parameters for noad,"
+ elog "please look in the documentation of noad."
+}
diff --git a/media-video/nvidia-settings/Manifest b/media-video/nvidia-settings/Manifest
new file mode 100644
index 000000000000..2a5e32c36e8e
--- /dev/null
+++ b/media-video/nvidia-settings/Manifest
@@ -0,0 +1,3 @@
+DIST nvidia-settings-331.20.tar.bz2 1544551 SHA256 229ead42dfc43627797bd0317ac3320aeaf97426a975325986aa91d28fa7a7f0 SHA512 e2a4f4171a6b989ddd89ec606d7a9de20ada84116e004e8febf6feec683ecf5f2a02d47505336ca6224bcb235b9aa38053e8998ea02e15ee6ee930e518e197e6 WHIRLPOOL c3d4e73cb9892ecb49d1d802b9178d4636a02bc2eace93ec202041c6c798d74199ab565608e7fc99f4be122843dcd4532397ab0b53059818daf1ae78922c925f
+DIST nvidia-settings-340.58.tar.bz2 1549850 SHA256 21cd29fea50e62766d1985c84f6d6de8efa911e32abcbff8e7ccf0e43ebe25c0 SHA512 4c581a940c99fac28564ab6154f47cae496ebfda6339b7f10c5decf8fea52b6c12e5b63dfcf78f8365909e49539560a50338edb17117881b6a03c196bd51836c WHIRLPOOL b486032339c4f8c4767239e3a4b001667bceb2c3ef5f3e94f08d1c54c60a958e1c76456415769ce9ff0503b6eb3d903aa89599a0234e08447c33671c598e66c8
+DIST nvidia-settings-343.22.tar.bz2 1554803 SHA256 979936ba474ab8f14deb5f0d74fc486e862216270b4d870a4386131696ac80e1 SHA512 147b6133928082d99d9639a5c3dd587e59fcb3925f4434dba4ddff61f5493a3291fad1f9e5bb3ec996c5692b71d60c45b5ea1f9ca882390d46f068ce4773b347 WHIRLPOOL 42802c9459d95aa41d48e99c489285c821361e635442e20e08563a4f7c6b3f0617673bf101343495239212267a1973fd1bfb740ff9986916593ce6657adf3e42
diff --git a/media-video/nvidia-settings/files/nvidia-settings-319.12-jansson.patch b/media-video/nvidia-settings/files/nvidia-settings-319.12-jansson.patch
new file mode 100644
index 000000000000..586da92bc93e
--- /dev/null
+++ b/media-video/nvidia-settings/files/nvidia-settings-319.12-jansson.patch
@@ -0,0 +1,94 @@
+From af5353c68481d64ebe56e4d10f8ab8502ffcd172 Mon Sep 17 00:00:00 2001
+From: Christian Ruppert <idl0r@gentoo.org>
+Date: Sat, 20 Apr 2013 22:40:28 +0200
+Subject: [PATCH] Make Jansson optional
+
+
+Signed-off-by: Christian Ruppert <idl0r@gentoo.org>
+---
+ src/Makefile | 17 ++++++++++++-----
+ src/src.mk | 2 ++
+ utils.mk | 2 ++
+ 3 files changed, 16 insertions(+), 5 deletions(-)
+
+diff --git a/src/Makefile b/src/Makefile
+index c5da53a..cb9d173 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -59,11 +59,15 @@ ifndef VDPAU_CFLAGS
+ endif
+ endif
+
+-ifndef JANSSON_CFLAGS
+- JANSSON_CFLAGS = -Wno-cast-qual
+- ifeq ($(TARGET_ARCH),armv7l)
+- JANSSON_CFLAGS += -Wno-unused-but-set-variable
++ifeq ($(USE_EXTERNAL_JANSSON),0)
++ ifndef JANSSON_CFLAGS
++ JANSSON_CFLAGS = -Wno-cast-qual
++ ifeq ($(TARGET_ARCH),armv7l)
++ JANSSON_CFLAGS += -Wno-unused-but-set-variable
++ endif
+ endif
++else
++ LIBS += -ljansson
+ endif
+
+ ##############################################################################
+@@ -153,7 +157,9 @@ CFLAGS += -I $(XCONFIG_PARSER_DIR)/..
+ CFLAGS += -I libXNVCtrlAttributes
+ CFLAGS += -I xpm_data
+ CFLAGS += -I gtk+-2.x
++ifeq ($(USE_EXTERNAL_JANSSON),0)
+ CFLAGS += -I jansson
++endif
+ CFLAGS += -I $(COMMON_UTILS_DIR)
+ CFLAGS += -I $(VIRTUAL_RESOLUTIONS_DIR)
+ CFLAGS += -I $(OUTPUTDIR)
+@@ -162,8 +168,9 @@ CFLAGS += -DPROGRAM_NAME=\"nvidia-setttings\"
+
+ $(call BUILD_OBJECT_LIST,$(GTK_SRC)): CFLAGS += $(GTK_CFLAGS)
+
++ifeq ($(USE_EXTERNAL_JANSSON),0)
+ $(call BUILD_OBJECT_LIST,$(JANSSON_SRC)): CFLAGS += $(JANSSON_CFLAGS)
+-
++endif
+
+ ##############################################################################
+ # build rules
+diff --git a/src/src.mk b/src/src.mk
+index 327b41b..0ffd7d6 100644
+--- a/src/src.mk
++++ b/src/src.mk
+@@ -276,6 +276,7 @@ NVIDIA_SETTINGS_EXTRA_DIST += $(GTK_EXTRA_DIST)
+ #
+ # files in the src/jansson directory of nvidia-settings
+ #
++ifeq ($(USE_EXTERNAL_JANSSON),0)
+ JANSSON_SRC += jansson/load.c
+ JANSSON_SRC += jansson/value.c
+ JANSSON_SRC += jansson/pack_unpack.c
+@@ -297,6 +298,7 @@ JANSSON_EXTRA_DIST += jansson/hashtable.h
+ JANSSON_EXTRA_DIST += jansson/jansson_private.h
+
+ NVIDIA_SETTINGS_EXTRA_DIST += $(JANSSON_EXTRA_DIST)
++endif
+
+ NVIDIA_SETTINGS_DIST_FILES += $(NVIDIA_SETTINGS_SRC)
+ NVIDIA_SETTINGS_DIST_FILES += $(NVIDIA_SETTINGS_EXTRA_DIST)
+diff --git a/utils.mk b/utils.mk
+index 54b76d6..29e06a9 100644
+--- a/utils.mk
++++ b/utils.mk
+@@ -74,6 +74,8 @@ CHMOD ?= chmod
+ NV_AUTO_DEPEND ?= 1
+ NV_VERBOSE ?= 0
+
++USE_EXTERNAL_JANSSON ?= 0
++
+ ifndef TARGET_OS
+ TARGET_OS := $(shell uname)
+ endif
+--
+1.8.1.5
+
diff --git a/media-video/nvidia-settings/metadata.xml b/media-video/nvidia-settings/metadata.xml
new file mode 100644
index 000000000000..a78c793a48d0
--- /dev/null
+++ b/media-video/nvidia-settings/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>idl0r@gentoo.org</email>
+ <name>Christian Ruppert</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/media-video/nvidia-settings/nvidia-settings-331.20.ebuild b/media-video/nvidia-settings/nvidia-settings-331.20.ebuild
new file mode 100644
index 000000000000..10fd13d60bc2
--- /dev/null
+++ b/media-video/nvidia-settings/nvidia-settings-331.20.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="NVIDIA Linux X11 Settings Utility"
+HOMEPAGE="http://www.nvidia.com/"
+SRC_URI="ftp://download.nvidia.com/XFree86/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* amd64 x86 ~x86-fbsd"
+IUSE="examples"
+
+COMMON_DEPEND="x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXxf86vm
+ x11-libs/gtk+:2
+ x11-libs/gdk-pixbuf[X]
+ media-libs/mesa
+ x11-libs/pango[X]
+ x11-libs/libXv
+ x11-libs/libXrandr
+ dev-libs/glib:2
+ dev-libs/jansson"
+
+RDEPEND="
+ =x11-drivers/nvidia-drivers-3*
+ ${COMMON_DEPEND}
+ x11-libs/libvdpau"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ x11-proto/xproto"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-319.12-jansson.patch
+}
+
+src_compile() {
+ einfo "Building libXNVCtrl..."
+ emake -C src/libXNVCtrl/ clean # NVidia ships pre-built archives :(
+ emake -C src/libXNVCtrl/ \
+ CC="$(tc-getCC)" \
+ AR="$(tc-getAR)" \
+ RANLIB="$(tc-getRANLIB)" \
+ libXNVCtrl.a
+
+ einfo "Building nvidia-settings..."
+ emake -C src/ \
+ CC="$(tc-getCC)" \
+ LD="$(tc-getLD)" \
+ STRIP_CMD="$(type -P true)" \
+ NV_VERBOSE=1 \
+ USE_EXTERNAL_JANSSON=1
+}
+
+src_install() {
+ emake -C src/ DESTDIR="${D}" PREFIX=/usr USE_EXTERNAL_JANSSON=1 install
+
+ insinto /usr/$(get_libdir)
+ doins src/libXNVCtrl/libXNVCtrl.a
+
+ insinto /usr/include/NVCtrl
+ doins src/libXNVCtrl/*.h
+
+# doicon doc/${PN}.png # Installed through nvidia-drivers
+ make_desktop_entry ${PN} "NVIDIA X Server Settings" ${PN} Settings
+
+ # bug 412569 - Installed through nvidia-drivers
+# rm -rf "${D}"/usr/share/man
+
+ dodoc doc/*.txt
+
+ if use examples; then
+ docinto examples/
+ dodoc samples/*.c
+ dodoc samples/README
+ fi
+}
diff --git a/media-video/nvidia-settings/nvidia-settings-340.58.ebuild b/media-video/nvidia-settings/nvidia-settings-340.58.ebuild
new file mode 100644
index 000000000000..02860c371d31
--- /dev/null
+++ b/media-video/nvidia-settings/nvidia-settings-340.58.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="NVIDIA Linux X11 Settings Utility"
+HOMEPAGE="http://www.nvidia.com/"
+SRC_URI="ftp://download.nvidia.com/XFree86/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+IUSE="examples"
+
+COMMON_DEPEND="x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXxf86vm
+ x11-libs/gtk+:2
+ x11-libs/gdk-pixbuf[X]
+ media-libs/mesa
+ x11-libs/pango[X]
+ x11-libs/libXv
+ x11-libs/libXrandr
+ dev-libs/glib:2
+ dev-libs/jansson"
+
+RDEPEND="
+ =x11-drivers/nvidia-drivers-3*
+ ${COMMON_DEPEND}
+ x11-libs/libvdpau"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ x11-proto/xproto"
+
+src_compile() {
+ einfo "Building libXNVCtrl..."
+ emake -C src/ \
+ CC="$(tc-getCC)" \
+ AR="$(tc-getAR)" \
+ RANLIB="$(tc-getRANLIB)" \
+ build-xnvctrl
+
+ einfo "Building nvidia-settings..."
+ emake -C src/ \
+ CC="$(tc-getCC)" \
+ LD="$(tc-getLD)" \
+ STRIP_CMD="$(type -P true)" \
+ NV_VERBOSE=1 \
+ NV_USE_BUNDLED_LIBJANSSON=0
+}
+
+src_install() {
+ emake -C src/ DESTDIR="${D}" PREFIX=/usr NV_USE_BUNDLED_LIBJANSSON=0 install
+
+ insinto /usr/$(get_libdir)
+ doins src/libXNVCtrl/libXNVCtrl.a
+
+ insinto /usr/include/NVCtrl
+ doins src/libXNVCtrl/*.h
+
+# doicon doc/${PN}.png # Installed through nvidia-drivers
+ make_desktop_entry ${PN} "NVIDIA X Server Settings" ${PN} Settings
+
+ # bug 412569 - Installed through nvidia-drivers
+# rm -rf "${D}"/usr/share/man
+
+ dodoc doc/*.txt
+
+ if use examples; then
+ docinto examples/
+ dodoc samples/*.c
+ dodoc samples/README
+ fi
+}
diff --git a/media-video/nvidia-settings/nvidia-settings-343.22.ebuild b/media-video/nvidia-settings/nvidia-settings-343.22.ebuild
new file mode 100644
index 000000000000..02860c371d31
--- /dev/null
+++ b/media-video/nvidia-settings/nvidia-settings-343.22.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="NVIDIA Linux X11 Settings Utility"
+HOMEPAGE="http://www.nvidia.com/"
+SRC_URI="ftp://download.nvidia.com/XFree86/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+IUSE="examples"
+
+COMMON_DEPEND="x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXxf86vm
+ x11-libs/gtk+:2
+ x11-libs/gdk-pixbuf[X]
+ media-libs/mesa
+ x11-libs/pango[X]
+ x11-libs/libXv
+ x11-libs/libXrandr
+ dev-libs/glib:2
+ dev-libs/jansson"
+
+RDEPEND="
+ =x11-drivers/nvidia-drivers-3*
+ ${COMMON_DEPEND}
+ x11-libs/libvdpau"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ x11-proto/xproto"
+
+src_compile() {
+ einfo "Building libXNVCtrl..."
+ emake -C src/ \
+ CC="$(tc-getCC)" \
+ AR="$(tc-getAR)" \
+ RANLIB="$(tc-getRANLIB)" \
+ build-xnvctrl
+
+ einfo "Building nvidia-settings..."
+ emake -C src/ \
+ CC="$(tc-getCC)" \
+ LD="$(tc-getLD)" \
+ STRIP_CMD="$(type -P true)" \
+ NV_VERBOSE=1 \
+ NV_USE_BUNDLED_LIBJANSSON=0
+}
+
+src_install() {
+ emake -C src/ DESTDIR="${D}" PREFIX=/usr NV_USE_BUNDLED_LIBJANSSON=0 install
+
+ insinto /usr/$(get_libdir)
+ doins src/libXNVCtrl/libXNVCtrl.a
+
+ insinto /usr/include/NVCtrl
+ doins src/libXNVCtrl/*.h
+
+# doicon doc/${PN}.png # Installed through nvidia-drivers
+ make_desktop_entry ${PN} "NVIDIA X Server Settings" ${PN} Settings
+
+ # bug 412569 - Installed through nvidia-drivers
+# rm -rf "${D}"/usr/share/man
+
+ dodoc doc/*.txt
+
+ if use examples; then
+ docinto examples/
+ dodoc samples/*.c
+ dodoc samples/README
+ fi
+}
diff --git a/media-video/ogmrip/Manifest b/media-video/ogmrip/Manifest
new file mode 100644
index 000000000000..482eaf4a6bdd
--- /dev/null
+++ b/media-video/ogmrip/Manifest
@@ -0,0 +1 @@
+DIST ogmrip-1.0.1.tar.gz 3276396 SHA256 1c7bb9a346f94a0b6ba783d71df7d21ce021b2f179f5c1a2ebf870366d53ed56 SHA512 22261b1a5086fc05139e8b9924b75d9a5a5e85b18e245e32545687e72273b485fe1c5041b89db653c6e2e9714518e17ea955435a20ac26fcc875fa8d1a90994c WHIRLPOOL 7b0f34763c4cbd5d0295a08fceaca1b230d817b4dbff490c4fbc9593ab9ec3aaa1c7f2287f37fbc07d874eeff136021bf7fdb5fd8204601487890e9a23a1a251
diff --git a/media-video/ogmrip/metadata.xml b/media-video/ogmrip/metadata.xml
new file mode 100644
index 000000000000..8ec700d9cc50
--- /dev/null
+++ b/media-video/ogmrip/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>billl@users.sf.net</email>
+ <name>Olivier Rolland</name>
+ </maintainer>
+ <longdescription lang="en">
+</longdescription>
+ <use>
+ <flag name="ogm">Support for OGM container format</flag>
+ <flag name="srt">Support for SRT subtitle format</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">ogmrip</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/ogmrip/ogmrip-1.0.1.ebuild b/media-video/ogmrip/ogmrip-1.0.1.ebuild
new file mode 100644
index 000000000000..2b6e751afa25
--- /dev/null
+++ b/media-video/ogmrip/ogmrip-1.0.1.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+GCONF_DEBUG=no
+
+inherit gnome2
+
+DESCRIPTION="Graphical frontend and libraries for ripping DVDs and encoding to AVI/OGM/MKV/MP4"
+HOMEPAGE="http://ogmrip.sourceforge.net/"
+SRC_URI="mirror://sourceforge/ogmrip/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE="aac dbus debug dts gtk libnotify matroska mp3 mp4 nls ogm spell srt static-libs theora vorbis x264 xvid"
+
+COMMON_DEPEND="
+ >=dev-libs/glib-2.16:2
+ >=app-i18n/enca-1.9
+ dev-libs/libxml2
+ media-libs/libdvdread
+ >=media-video/mplayer-1.0_rc2[dvd,encode,xvid?,dts?,x264?]
+ aac? ( >=media-libs/faac-1.24 )
+ gtk? (
+ >=x11-libs/gtk+-2.12:2
+ gnome-base/libglade
+ gnome-base/gconf
+ dbus? ( dev-libs/dbus-glib )
+ libnotify? ( >=x11-libs/libnotify-0.4.3 )
+ media-video/mplayer[jpeg]
+ )
+ matroska? ( media-video/mkvtoolnix )
+ mp3? ( media-sound/lame )
+ mp4? ( >=media-video/gpac-0.4.2 )
+ ogm? ( media-sound/ogmtools )
+ spell? ( >=app-text/enchant-1.1.0 )
+ srt? ( ||
+ (
+ ( >=app-text/tesseract-2 media-libs/tiff )
+ >=app-text/gocr-0.39
+ >=app-text/ocrad-0.15
+ )
+ media-libs/libpng )
+ theora? ( media-libs/libtheora )
+ vorbis? ( media-sound/vorbis-tools )
+"
+RDEPEND="${COMMON_DEPEND}
+ gnome-base/gvfs
+"
+DEPEND="${COMMON_DEPEND}
+ dev-util/gtk-doc-am
+ nls? ( sys-devel/gettext
+ dev-util/intltool )
+ virtual/pkgconfig
+"
+
+src_configure() {
+ gnome2_src_configure \
+ $(use_enable debug maintainer-mode) \
+ $(use_enable gtk gtk-support) \
+ $(use_enable dbus dbus-support) \
+ $(use_enable spell enchant-support) \
+ $(use_enable ogm ogm-support) \
+ $(use_enable matroska mkv-support) \
+ $(use_enable mp4 mp4-support) \
+ $(use_enable xvid xvid-support) \
+ $(use_enable x264 x264-support) \
+ $(use_enable theora theora-support) \
+ $(use_enable vorbis vorbis-support) \
+ $(use_enable mp3 mp3-support) \
+ $(use_enable aac aac-support) \
+ $(use_enable srt srt-support) \
+ $(use_enable static-libs static) \
+ $(use_enable libnotify libnotify-support) \
+ $(use_enable nls) \
+ --with-html-dir=/usr/share/doc/${PF}/html
+}
+
+src_install() {
+ MAKEOPTS="${MAKEOPTS} -j1" gnome2_src_install #528670
+}
diff --git a/media-video/openshot/Manifest b/media-video/openshot/Manifest
new file mode 100644
index 000000000000..2e4ed368b26e
--- /dev/null
+++ b/media-video/openshot/Manifest
@@ -0,0 +1 @@
+DIST openshot-1.4.3.tar.gz 31990991 SHA256 5bebf1c59a8667b0263599544f2d23ce6be3ab79ce24a85b766e1e39cab859d0 SHA512 f3221c3e508ccf61d4fd2771de47f42ddb1a78996853011ee336e8ccf842a0fd97707a60c677e1465a89e6eb67911b6eb98b002959f8a29ac9e31924bbb6fcda WHIRLPOOL 4fd8d5b5db2923c8b7349032847087b9cf4ccdbade206c5c6cc9aac27ace6e99c6053bd1184cf14b20c80b4f666baf356798a5b6a8d6c7c737a9a986894943af
diff --git a/media-video/openshot/metadata.xml b/media-video/openshot/metadata.xml
new file mode 100644
index 000000000000..90763619aa83
--- /dev/null
+++ b/media-video/openshot/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <longdescription>Free, open-source, non-linear video editor to create and edit videos and movies</longdescription>
+ <upstream>
+ <remote-id type="launchpad">openshot</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/openshot/openshot-1.4.3.ebuild b/media-video/openshot/openshot-1.4.3.ebuild
new file mode 100644
index 000000000000..20ef9456a9b0
--- /dev/null
+++ b/media-video/openshot/openshot-1.4.3.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_REQ_USE=xml
+PYTHON_COMPAT=( python2_7 )
+
+inherit versionator distutils-r1 python-r1 fdo-mime
+
+DESCRIPTION="Free, open-source, non-linear video editor to create and edit videos and movies"
+HOMEPAGE="http://www.openshotvideo.com"
+SRC_URI="http://launchpad.net/${PN}/$(get_version_component_range 1-2)/${PV}/+download/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+
+IUSE="+python +ffmpeg libav"
+REQUIRED_USE="|| ( python ffmpeg )"
+
+RDEPEND="
+ dev-python/pygoocanvas[${PYTHON_USEDEP}]
+ dev-python/pygtk[${PYTHON_USEDEP}]
+ dev-python/pyxdg[${PYTHON_USEDEP}]
+ virtual/python-imaging[${PYTHON_USEDEP}]
+ >=media-libs/mlt-0.8.2[ffmpeg,frei0r,gtk,melt,python,sdl,xml]
+ ffmpeg? (
+ libav? ( media-video/libav:=[encode,sdl,x264,mp3,theora] )
+ !libav? ( media-video/ffmpeg:0=[encode,sdl,x264,mp3,theora] )
+ )
+ python? (
+ dev-python/httplib2[${PYTHON_USEDEP}]
+ dev-python/librsvg-python
+ )
+ x11-libs/gtk+:2
+"
+
+src_prepare() {
+ sed -ie '/launcher/,+1d' setup.py || die
+ sed -ie '/FAILED = /,$d' setup.py || die
+
+ # Fix up launchers to not throw an error.
+ sed -i 's/\(from \)\(openshot import main\)/\1openshot.\2/' bin/openshot || die
+ sed -i 's/\(from \)\(openshot_render import main\)/\1openshot.\2/' bin/openshot-render || die
+}
+
+python_install() {
+ distutils-r1_python_install
+}
+
+pkg_postinst() {
+ fdo-mime_mime_database_update
+ fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+ fdo-mime_mime_database_update
+ fdo-mime_desktop_database_update
+}
diff --git a/media-video/oxine/Manifest b/media-video/oxine/Manifest
new file mode 100644
index 000000000000..d0cedfcc1d69
--- /dev/null
+++ b/media-video/oxine/Manifest
@@ -0,0 +1 @@
+DIST oxine-0.7.1.tar.gz 3653511 SHA256 bfe9e4f49996234eabf788397969c90901197b2b1823cdb9a61e529f5c0f6a7d SHA512 96f6851f6277d97530b1f4d95d0f0843c9c3262d1a97ccc431e8a674441e06ca8fc24a65f83be5735f54e089d636e60fb297fa7958279b24004eecbc1711a257 WHIRLPOOL 6e8c91ceb889dfa97daaa6f291987d0becb622c6755f82d01d9489016aa2699c0de1b499e274c0129fd440b821b840e05f7c3a2c7a9ed9539a2c13b230f00880
diff --git a/media-video/oxine/metadata.xml b/media-video/oxine/metadata.xml
new file mode 100644
index 000000000000..3df2181b12a2
--- /dev/null
+++ b/media-video/oxine/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">oxine</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/oxine/oxine-0.7.1-r1.ebuild b/media-video/oxine/oxine-0.7.1-r1.ebuild
new file mode 100644
index 000000000000..56824339afa7
--- /dev/null
+++ b/media-video/oxine/oxine-0.7.1-r1.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+WANT_AUTOMAKE="1.9"
+inherit eutils
+
+DESCRIPTION="OSD frontend for Xine"
+HOMEPAGE="http://oxine.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+LICENSE="GPL-2"
+KEYWORDS="amd64 ppc ~ppc64 x86"
+SLOT="0"
+IUSE="X curl debug dvb exif joystick jpeg lirc nls png v4l"
+
+COMMON_DEPEND="media-libs/xine-lib[v4l?,X,imagemagick]
+ dvb? ( media-libs/xine-lib[v4l] )
+ dev-libs/libcdio
+ curl? ( net-misc/curl )
+ joystick? ( media-libs/libjsw )
+ jpeg? ( media-gfx/imagemagick
+ media-libs/netpbm[jpeg,zlib]
+ media-video/mjpegtools )
+ lirc? ( app-misc/lirc )
+ nls? ( virtual/libintl
+ sys-devel/gettext )
+ png? ( media-gfx/imagemagick
+ media-libs/netpbm[png,zlib]
+ media-video/mjpegtools )
+ X? ( x11-libs/libXext
+ x11-libs/libX11 )"
+RDEPEND="${COMMON_DEPEND}
+ virtual/eject"
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig"
+
+src_configure() {
+ # Note on images: Image support will be automatically disabled if
+ # netpbm, imagemagick or mjpegtools is not installed, irregardless
+ # of what the USE flags are set to.
+
+ # If one of the image USE flags is unset, disable image support
+ if use !png && use !jpeg ; then
+ myconf="${myconf} --disable-images"
+ fi
+
+ econf ${myconf} \
+ $( use_with X x ) \
+ $( use_with curl ) \
+ $( use_enable debug ) \
+ $( use_enable dvb ) \
+ $( use_enable exif ) \
+ --disable-hal \
+ $( use_enable joystick ) \
+ $( use_enable lirc ) \
+ $( use_enable nls ) \
+ $( use_enable v4l ) \
+ --disable-extractor \
+ --disable-rpath || die "econf died"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install died"
+ dodoc AUTHORS ChangeLog NEWS README TODO
+ dohtml doc/README.html doc/keymapping.pdf
+}
diff --git a/media-video/parole/Manifest b/media-video/parole/Manifest
new file mode 100644
index 000000000000..602117821059
--- /dev/null
+++ b/media-video/parole/Manifest
@@ -0,0 +1,4 @@
+DIST parole-0.5.4.tar.bz2 669806 SHA256 c0f4bd7b45a016a0a84ec86336b912d0a12388e29c316beb86193ed7d2c3bfc3 SHA512 a3be6c35ea7b118d11738dbe460a3cf8daab61d552dabbc7504f5120e86c11eba6b885f45f314e5df22ed8958959e75339423d041be3e8d5128be093941cb5ae WHIRLPOOL 390a26f4fe230c262287389558f9208f004d262157a2d3522124d613af9b117aea6c24f20d1e4a6c51cfe413248687657c389f742dafe5fe2680a9d13fb90a6a
+DIST parole-0.6.1.tar.bz2 678053 SHA256 cdff0006e36b30aa18168a5cb3b6de2e94fe55ccbc4d36c47f4448fd67379c08 SHA512 2d183596b7cd77b6ff7ce04eecd81ec837c1ec235dc9d116e1212df83da111fc9cb378daef5e83e7f55845148e2812454b88b3ed36be21fa7e08e405422cc4c4 WHIRLPOOL bfc6273d3368bf079060d1c4cebcb213c78023588058674760cc6f56219e105564314ca710e2baa8bb344be4b548df24a89f1338b6dfadaad8ab08bcc1b0e773
+DIST parole-0.7.0.tar.bz2 679514 SHA256 91a2cedfa7cc9a0ff39618af05c3757f0a4003a3507e9efe3a48e8a324db3a7c SHA512 bb6516638fba2ed6c592f3fbe6d764e384e8f8d98d10f0888fb5d1e326eaedc4e290b4633cf42949a80abca59282e44d73f7f6690303484eab6caf78efd05445 WHIRLPOOL acf721ae661342ae3ba8d7350124e60f83115e51626e8680833e2157298542347c6d1095896b5495fc228afc269fed401bcd07b4fdb8002a1af3c1d258e45fe4
+DIST parole-0.8.0.tar.bz2 813553 SHA256 2d966aeb426de81d992829e33b3f66185b19fd031a1891968b3a40d6d50239cc SHA512 d8c3d6ee411e8bb05e3b03408da56d80154313e1f4817cdd1d75fb0ae25f2761362255ba55b513d551383f8a2808603dbd4949c847d815c0a41516edeb673afe WHIRLPOOL 239d1b616d1ce7282cf818164276a93c669c54d4682c8cb47fcf6089b1f51eb9a77ef8dfe65423dfaae9eb11c95b37d9b761d47a27ff1a54c4389e61a3a26765
diff --git a/media-video/parole/metadata.xml b/media-video/parole/metadata.xml
new file mode 100644
index 000000000000..9731ebae6a76
--- /dev/null
+++ b/media-video/parole/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>xfce@gentoo.org</email>
+ <name>XFCE Team</name>
+ </maintainer>
+ <use>
+ <flag name='clutter'>Compile in Clutter GTK+ support</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-video/parole/parole-0.5.4.ebuild b/media-video/parole/parole-0.5.4.ebuild
new file mode 100644
index 000000000000..a100eaf4024e
--- /dev/null
+++ b/media-video/parole/parole-0.5.4.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit xfconf
+
+DESCRIPTION="a simple media player based on the GStreamer framework for the Xfce4 desktop"
+HOMEPAGE="http://goodies.xfce.org/projects/applications/parole/"
+SRC_URI="mirror://xfce/src/apps/${PN}/${PV%.*}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~mips x86"
+IUSE="debug libnotify taglib"
+
+COMMON_DEPEND=">=dev-libs/dbus-glib-0.100
+ >=dev-libs/glib-2.32
+ media-libs/gstreamer:1.0
+ media-libs/gst-plugins-base:1.0
+ >=x11-libs/gtk+-2.24:2
+ x11-libs/libX11
+ >=xfce-base/libxfce4ui-4.10
+ >=xfce-base/libxfce4util-4.10
+ >=xfce-base/xfconf-4.10
+ libnotify? ( >=x11-libs/libnotify-0.7 )
+ taglib? ( >=media-libs/taglib-1.4 )"
+RDEPEND="${COMMON_DEPEND}
+ media-plugins/gst-plugins-meta:1.0"
+DEPEND="${COMMON_DEPEND}
+ dev-util/intltool
+ sys-devel/gettext
+ virtual/pkgconfig
+ x11-proto/xproto"
+
+pkg_setup() {
+ XFCONF=(
+ $(use_enable taglib)
+ $(use_enable libnotify notify-plugin)
+ $(xfconf_use_debug)
+ --with-gstreamer=1.0
+ )
+
+ DOCS=( AUTHORS ChangeLog README THANKS TODO )
+}
diff --git a/media-video/parole/parole-0.6.1.ebuild b/media-video/parole/parole-0.6.1.ebuild
new file mode 100644
index 000000000000..60ef2242b44c
--- /dev/null
+++ b/media-video/parole/parole-0.6.1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit xfconf
+
+DESCRIPTION="a simple media player based on the GStreamer framework for the Xfce4 desktop"
+HOMEPAGE="http://goodies.xfce.org/projects/applications/parole/"
+SRC_URI="mirror://xfce/src/apps/${PN}/${PV%.*}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~mips ~x86"
+IUSE="debug libnotify taglib"
+
+COMMON_DEPEND=">=dev-libs/dbus-glib-0.100
+ >=dev-libs/glib-2.32
+ media-libs/gstreamer:1.0
+ media-libs/gst-plugins-base:1.0
+ sys-apps/dbus
+ >=x11-libs/gtk+-3.2:3
+ x11-libs/libX11
+ >=xfce-base/libxfce4ui-4.11[gtk3(+)]
+ >=xfce-base/libxfce4util-4.11
+ >=xfce-base/xfconf-4.10
+ libnotify? ( >=x11-libs/libnotify-0.7 )
+ taglib? ( >=media-libs/taglib-1.6 )"
+RDEPEND="${COMMON_DEPEND}
+ media-plugins/gst-plugins-meta:1.0"
+DEPEND="${COMMON_DEPEND}
+ dev-util/intltool
+ sys-devel/gettext
+ virtual/pkgconfig
+ x11-proto/xproto"
+
+pkg_setup() {
+ XFCONF=(
+ $(use_enable taglib)
+ $(use_enable libnotify notify-plugin)
+ $(xfconf_use_debug)
+ --with-gstreamer=1.0
+ )
+
+ DOCS=( AUTHORS ChangeLog README THANKS TODO )
+}
diff --git a/media-video/parole/parole-0.7.0.ebuild b/media-video/parole/parole-0.7.0.ebuild
new file mode 100644
index 000000000000..21ad823dd58e
--- /dev/null
+++ b/media-video/parole/parole-0.7.0.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 xfconf
+
+DESCRIPTION="a simple media player based on the GStreamer framework for the Xfce4 desktop"
+HOMEPAGE="http://goodies.xfce.org/projects/applications/parole/"
+SRC_URI="mirror://xfce/src/apps/${PN}/${PV%.*}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~mips ~x86"
+IUSE="clutter debug libnotify taglib"
+
+COMMON_DEPEND=">=dev-libs/dbus-glib-0.100
+ >=dev-libs/glib-2.32
+ media-libs/gstreamer:1.0
+ media-libs/gst-plugins-base:1.0
+ sys-apps/dbus
+ >=x11-libs/gtk+-3.2:3
+ x11-libs/libX11
+ >=xfce-base/libxfce4ui-4.11[gtk3(+)]
+ >=xfce-base/libxfce4util-4.11
+ >=xfce-base/xfconf-4.10
+ clutter? (
+ >=media-libs/clutter-1.16.4
+ >=media-libs/clutter-gtk-1.4.4
+ )
+ libnotify? ( >=x11-libs/libnotify-0.7 )
+ taglib? ( >=media-libs/taglib-1.6 )"
+RDEPEND="${COMMON_DEPEND}
+ media-plugins/gst-plugins-meta:1.0"
+DEPEND="${COMMON_DEPEND}
+ dev-util/intltool
+ sys-devel/gettext
+ virtual/pkgconfig
+ x11-proto/xproto"
+
+pkg_setup() {
+ XFCONF=(
+ $(use_enable clutter)
+ $(use_enable taglib)
+ $(use_enable libnotify notify-plugin)
+ $(xfconf_use_debug)
+ --with-gstreamer=1.0
+ )
+
+ DOCS=( AUTHORS ChangeLog README THANKS TODO )
+}
diff --git a/media-video/parole/parole-0.8.0-r1.ebuild b/media-video/parole/parole-0.8.0-r1.ebuild
new file mode 100644
index 000000000000..6b8441f219d6
--- /dev/null
+++ b/media-video/parole/parole-0.8.0-r1.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 xfconf
+
+DESCRIPTION="a simple media player based on the GStreamer framework for the Xfce4 desktop"
+HOMEPAGE="http://goodies.xfce.org/projects/applications/parole/"
+SRC_URI="mirror://xfce/src/apps/${PN}/${PV%.*}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~mips x86"
+IUSE="clutter debug libnotify taglib"
+
+COMMON_DEPEND=">=dev-libs/dbus-glib-0.100:=
+ >=dev-libs/glib-2.32:2=
+ media-libs/gstreamer:1.0=
+ media-libs/gst-plugins-base:1.0=
+ sys-apps/dbus:0=
+ >=x11-libs/gtk+-3.2:3=
+ x11-libs/libX11:0=
+ >=xfce-base/libxfce4ui-4.11:0=[gtk3(+)]
+ >=xfce-base/libxfce4util-4.11:0=
+ >=xfce-base/xfconf-4.10:0=
+ clutter? (
+ >=media-libs/clutter-1.16.4:1.0=
+ >=media-libs/clutter-gtk-1.4.4:1.0=
+ )
+ libnotify? ( >=x11-libs/libnotify-0.7:0= )
+ taglib? ( >=media-libs/taglib-1.6:0= )"
+RDEPEND="${COMMON_DEPEND}
+ media-plugins/gst-plugins-meta:1.0"
+DEPEND="${COMMON_DEPEND}
+ dev-util/intltool
+ sys-devel/gettext
+ virtual/pkgconfig
+ x11-proto/xproto"
+
+pkg_setup() {
+ XFCONF=(
+ $(use_enable clutter)
+ $(use_enable taglib)
+ $(use_enable libnotify notify-plugin)
+ $(xfconf_use_debug)
+ --with-gstreamer=1.0
+ )
+
+ DOCS=( AUTHORS ChangeLog README THANKS TODO )
+}
diff --git a/media-video/pgcedit/Manifest b/media-video/pgcedit/Manifest
new file mode 100644
index 000000000000..1a341f5782dc
--- /dev/null
+++ b/media-video/pgcedit/Manifest
@@ -0,0 +1,3 @@
+DIST PgcEdit_Manual_html.zip 1650202 SHA256 6cc6d0ff42dfa457022c2f9e9fafa9c088db18a9a82ab7cdfc231e1bbd8d87f4 SHA512 0cc4f824e9509dadb18e416012d32d4f1428c43fedc4af45ce22e05b216f9cd2e4700c97e7d4a9b1c4da4745940c1b53df93d1e1b919142b10279832db7c82df WHIRLPOOL 1af2e0fbd45243beed75862e2237e6416046e4e32dbd6894490ce00f19492e465f97572fe40322094eb013be09d3ff2ba218c1be34aaf1109005d0938fc3a26c
+DIST PgcEdit_source_8.6.zip 898311 SHA256 09a24eaa79668001a5834c33f84ecc335134a3e5050ce6fa25ccbe4036e747f2 SHA512 3904e48dd0004bb8b2967771424c1ca5a5754c0854ac131c37497c66c3148c6ec06b9872a4c69b08cf46bb862b073467f6c0fe8230426bf70e9bb43caf5857ac WHIRLPOOL 31784485e78baf1a861ba3b8f1c4136029a4aff58aab89dac1f9e6b6811a37cd4e35ea9e377d596287ce019c7be8ca81ed593500873aca9107a5b27c78f2773a
+DIST pgcedit.png 891 SHA256 8a7e6b96bb9714afb65683e0db7c77577f20ae97771670fca93fb56d488ad288 SHA512 f24efe76bc7a725da28d98db9e28fb111895cde83f99c4bf6cd4902c5ff32216d2399d97728de33576c61866ef725a0c3ee5466793945a978e6d26ccd0319988 WHIRLPOOL e76acabb53bf72c4290bfe561e42ffb813a38e1ca0e93f3cabf8803037114232338d5939874a066f674b9a87de2700801b55c33472eef1815b90cf3d5464548c
diff --git a/media-video/pgcedit/files/pgcedit-0.8.6-config-paths.patch b/media-video/pgcedit/files/pgcedit-0.8.6-config-paths.patch
new file mode 100644
index 000000000000..24c395522397
--- /dev/null
+++ b/media-video/pgcedit/files/pgcedit-0.8.6-config-paths.patch
@@ -0,0 +1,26 @@
+--- a/PgcEdit_main.tcl
++++ b/PgcEdit_main.tcl
+@@ -1456,9 +1456,9 @@
+ catch {file delete $::config(bindir)}
+ }
+ } else {
+- set config(apppath) [file dirname $scriptname]
+- set ::config(bindir) [file join [file dirname $scriptname] "bin"]
+- set ::config(plugindir) [file join [file dirname $scriptname] "plugins"]
++ set config(apppath) {/usr/share/pgcedit}
++ set ::config(bindir) "$config(apppath)/bin"
++ set ::config(plugindir) "$config(apppath)/plugins"
+
+ if {! [file exists $::config(tempdir)]} {
+ set ::config(tempdir) "/tmp"
+--- a/lib/main.tcl
++++ b/lib/main.tcl
+@@ -4674,7 +4674,7 @@
+ }
+
+ proc display_doc {} {
+- set rootpath [file dirname $::config(bindir)]
++ set rootpath "@DOCDIR@"
+ set filename ""
+ if {$::tcl_platform(platform) == "windows"} {
+ if {[file exists [file join $rootpath "PgcEdit_Manual.chm"]]} {
diff --git a/media-video/pgcedit/metadata.xml b/media-video/pgcedit/metadata.xml
new file mode 100644
index 000000000000..b290225f8396
--- /dev/null
+++ b/media-video/pgcedit/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name='video'>Add support for video preview</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-video/pgcedit/pgcedit-0.8.6.ebuild b/media-video/pgcedit/pgcedit-0.8.6.ebuild
new file mode 100644
index 000000000000..0593f08eae4f
--- /dev/null
+++ b/media-video/pgcedit/pgcedit-0.8.6.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils versionator
+
+MY_PN="PgcEdit"
+MY_P="${MY_PN}_source_$(get_after_major_version)"
+MY_PDOC="${MY_PN}_Manual_html"
+
+DESCRIPTION="DVD IFO and Menu editor"
+HOMEPAGE="http://download.videohelp.com/r0lZ/pgcedit/"
+SRC_URI="
+ http://download.videohelp.com/r0lZ/${PN}/versions/${MY_P}.zip
+ http://download.videohelp.com/r0lZ/${PN}/versions/${MY_PDOC}.zip
+ mirror://gentoo/${PN}.png"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="video"
+
+RDEPEND="
+ app-cdr/cdrtools
+ >=dev-lang/tcl-8.4:0
+ >=dev-lang/tk-8.4:0
+ video? ( app-emulation/wine )"
+DEPEND="app-arch/unzip"
+
+S=${WORKDIR}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-config-paths.patch
+ sed -i "s:@DOCDIR@:/usr/share/doc/${PF}/html:" lib/main.tcl || die
+ # These are only used in Windows.
+ rm bin/{mkisofs,pskill}.exe || die
+ use video || rm bin/PgcEditPreview.exe
+}
+
+src_install() {
+ newbin ${MY_PN}_main.tcl ${PN}
+
+ keepdir /usr/share/${PN}/plugins
+ insinto /usr/share/${PN}
+ doins -r bin lib
+ dohtml -r doc/*
+
+ doicon "${DISTDIR}"/${PN}.png
+ make_desktop_entry ${PN} ${MY_PN} ${PN} "AudioVideo;Video;"
+
+ dodoc HISTORY.txt TODO.txt
+}
diff --git a/media-video/pgmfindclip/Manifest b/media-video/pgmfindclip/Manifest
new file mode 100644
index 000000000000..fff0a2ed7232
--- /dev/null
+++ b/media-video/pgmfindclip/Manifest
@@ -0,0 +1 @@
+DIST pgmfindclip-1.13.tgz 4971 RMD160 15cd9365a2af33ed1cfdcacdc7e31505ad70f9c9 SHA1 ef7d91d48b52d9fe011a577e099eeb8a2f997a9f SHA256 eaa0f3d4e4904b14fba45ca45b06511839331c37c3c08463c633f4d3f12dbdf2
diff --git a/media-video/pgmfindclip/metadata.xml b/media-video/pgmfindclip/metadata.xml
new file mode 100644
index 000000000000..edccfe5754d2
--- /dev/null
+++ b/media-video/pgmfindclip/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>video</herd>
+<maintainer>
+<email>media-video@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/media-video/pgmfindclip/pgmfindclip-1.13.ebuild b/media-video/pgmfindclip/pgmfindclip-1.13.ebuild
new file mode 100644
index 000000000000..84f03032f1e9
--- /dev/null
+++ b/media-video/pgmfindclip/pgmfindclip-1.13.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit toolchain-funcs
+
+IUSE=""
+
+S="${WORKDIR}"
+
+DESCRIPTION="automatically find a clipping border for a sequence of pgm images"
+HOMEPAGE="http://www.lallafa.de/bp/pgmfindclip.html"
+SRC_URI="http://www.lallafa.de/bp/files/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+src_unpack() {
+ unpack ${A}
+
+ sed -i -e 's:gcc .* -o:$(CC) $(CFLAGS) $(LDFLAGS) -o:' "${S}"/Makefile
+}
+
+src_compile () {
+ emake CC="$(tc-getCC)" || die
+}
+
+src_install () {
+ dobin ${PN} || die
+}
diff --git a/media-video/photofilmstrip/Manifest b/media-video/photofilmstrip/Manifest
new file mode 100644
index 000000000000..5c6179a43a5d
--- /dev/null
+++ b/media-video/photofilmstrip/Manifest
@@ -0,0 +1 @@
+DIST photofilmstrip-1.9.91.tar.gz 23599455 SHA256 0c5a7e571213892b736d56aefc24b18ae1c908aa29ece3080948651999cfb46e SHA512 de4718b1090cdee39cc20f9181ca7afffb291ae922385652f8657fdfc826176e7dbc357f4805ffb55cd814456399a326ee2bf3b669e342a9ea9aec0bd503ae81 WHIRLPOOL 8f39a69cf0450ce86a4af82eecac9fb9c46a83d99f6f1a094a8b6d30687ecac94e0ac027c78d372705987989bb51448972ebff982585876875297558161f4433
diff --git a/media-video/photofilmstrip/files/photofilmstrip-1.9.91-PIL_modules_imports_fix.patch b/media-video/photofilmstrip/files/photofilmstrip-1.9.91-PIL_modules_imports_fix.patch
new file mode 100644
index 000000000000..2d5bb479da8d
--- /dev/null
+++ b/media-video/photofilmstrip/files/photofilmstrip-1.9.91-PIL_modules_imports_fix.patch
@@ -0,0 +1,103 @@
+--- photofilmstrip-1.9.91-orig/photofilmstrip/core/__init__.py 2012-01-13 15:26:36.000000000 +0200
++++ photofilmstrip-1.9.91/photofilmstrip/core/__init__.py 2013-06-10 20:43:27.759638837 +0300
+@@ -22,47 +22,47 @@
+ # WA: py2exe and PIL
+ import os
+ if os.name == "nt":
+- import Image
++ import PIL.Image as Image
+
+- import ArgImagePlugin
+- import BmpImagePlugin
+- import BufrStubImagePlugin
+- import CurImagePlugin
+- import DcxImagePlugin
+- import EpsImagePlugin
+- import FitsStubImagePlugin
+- import FliImagePlugin
+- import FpxImagePlugin
+- import GbrImagePlugin
+- import GifImagePlugin
+- import GribStubImagePlugin
+- import Hdf5StubImagePlugin
+- import IcnsImagePlugin
+- import IcoImagePlugin
+- import ImImagePlugin
+- import ImtImagePlugin
+- import IptcImagePlugin
+- import JpegImagePlugin
+- import McIdasImagePlugin
+- import MicImagePlugin
+- import MpegImagePlugin
+- import MspImagePlugin
+- import PalmImagePlugin
+- import PcdImagePlugin
+- import PcxImagePlugin
+- import PdfImagePlugin
+- import PixarImagePlugin
+- import PngImagePlugin
+- import PpmImagePlugin
+- import PsdImagePlugin
+- import SgiImagePlugin
+- import SpiderImagePlugin
+- import SunImagePlugin
+- import TgaImagePlugin
+- import TiffImagePlugin
+- import WmfImagePlugin
+- import XbmImagePlugin
+- import XpmImagePlugin
+- import XVThumbImagePlugin
++ import PIL.ArgImagePlugin as ArgImagePlugin
++ import PIL.BmpImagePlugin as BmpImagePlugin
++ import PIL.BufrStubImagePlugin as BufrStubImagePlugin
++ import PIL.CurImagePlugin as CurImagePlugin
++ import PIL.DcxImagePlugin as DcxImagePlugin
++ import PIL.EpsImagePlugin as EpsImagePlugin
++ import PIL.FitsStubImagePlugin as FitsStubImagePlugin
++ import PIL.FliImagePlugin as FliImagePlugin
++ import PIL.FpxImagePlugin as FpxImagePlugin
++ import PIL.GbrImagePlugin as GbrImagePlugin
++ import PIL.GifImagePlugin as GifImagePlugin
++ import PIL.GribStubImagePlugin as GribStubImagePlugin
++ import PIL.Hdf5StubImagePlugin as Hdf5StubImagePlugin
++ import PIL.IcnsImagePlugin as IcnsImagePlugin
++ import PIL.IcoImagePlugin as IcoImagePlugin
++ import PIL.ImImagePlugin as ImImagePlugin
++ import PIL.ImtImagePlugin as ImtImagePlugin
++ import PIL.IptcImagePlugin as IptcImagePlugin
++ import PIL.JpegImagePlugin as JpegImagePlugin
++ import PIL.McIdasImagePlugin as McIdasImagePlugin
++ import PIL.MicImagePlugin as MicImagePlugin
++ import PIL.MpegImagePlugin as MpegImagePlugin
++ import PIL.MspImagePlugin as MspImagePlugin
++ import PIL.PalmImagePlugin as PalmImagePlugin
++ import PIL.PcdImagePlugin as PcdImagePlugin
++ import PIL.PcxImagePlugin as PcxImagePlugin
++ import PIL.PdfImagePlugin as PdfImagePlugin
++ import PIL.PixarImagePlugin as PixarImagePlugin
++ import PIL.PngImagePlugin as PngImagePlugin
++ import PIL.PpmImagePlugin as PpmImagePlugin
++ import PIL.PsdImagePlugin as PsdImagePlugin
++ import PIL.SgiImagePlugin as SgiImagePlugin
++ import PIL.SpiderImagePlugin as SpiderImagePlugin
++ import PIL.SunImagePlugin as SunImagePlugin
++ import PIL.TgaImagePlugin as TgaImagePlugin
++ import PIL.TiffImagePlugin as TiffImagePlugin
++ import PIL.WmfImagePlugin as WmfImagePlugin
++ import PIL.XbmImagePlugin as XbmImagePlugin
++ import PIL.XpmImagePlugin as XpmImagePlugin
++ import PIL.XVThumbImagePlugin as XVThumbImagePlugin
+ Image._initialized=2
+ # WA: end
+--- photofilmstrip-1.9.91-orig/photofilmstrip/core/PILBackend.py 2012-01-13 15:26:36.000000000 +0200
++++ photofilmstrip-1.9.91/photofilmstrip/core/PILBackend.py 2013-06-10 20:36:00.427888547 +0300
+@@ -22,7 +22,8 @@
+ import logging
+ import cStringIO
+
+-import Image, ImageDraw
++import PIL.Image as Image
++import PIL.ImageDraw as ImageDraw
+
+ from photofilmstrip.core.Picture import Picture
+
diff --git a/media-video/photofilmstrip/metadata.xml b/media-video/photofilmstrip/metadata.xml
new file mode 100644
index 000000000000..9f19064500ee
--- /dev/null
+++ b/media-video/photofilmstrip/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>proxy-maintainers</herd>
+ <maintainer>
+ <email>phobosk@fastmail.fm</email>
+ <name>PhobosK</name>
+ </maintainer>
+ <longdescription>
+PhotoFilmStrip creates movies out of your pictures in just three steps.
+There are several output possibilities for VCD, SVCD, DVD up to FULL-HD.
+First select your photos, customize the motion path of the Ken Burns effect and
+render the video. Comments of the pictures are generated into a subtitle file.
+Furthermore an audio file can be specified to setup the background music for the
+slideshow.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">photostoryx</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/photofilmstrip/photofilmstrip-1.9.91-r1.ebuild b/media-video/photofilmstrip/photofilmstrip-1.9.91-r1.ebuild
new file mode 100644
index 000000000000..efd1a2265827
--- /dev/null
+++ b/media-video/photofilmstrip/photofilmstrip-1.9.91-r1.ebuild
@@ -0,0 +1,53 @@
+# 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="sqlite"
+
+inherit distutils-r1
+
+DESCRIPTION="Movie slideshow creator using Ken Burns effect"
+HOMEPAGE="http://www.photofilmstrip.org"
+SRC_URI="mirror://sourceforge/photostoryx/${PN}/${PV}-unstable/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+
+KEYWORDS="~amd64 ~x86"
+IUSE="cairo sdl"
+
+RDEPEND="dev-python/wxpython:2.8[cairo?,${PYTHON_USEDEP}]
+ virtual/python-imaging[${PYTHON_USEDEP}]
+ media-video/mplayer[encode]
+ sdl? ( dev-python/pygame[${PYTHON_USEDEP}] )"
+
+DEPEND="${RDEPEND}"
+
+# Fix bug #472774 (https://bugs.gentoo.org/show_bug.cgi?id=472774)
+PATCHES=(
+ "${FILESDIR}/${P}-PIL_modules_imports_fix.patch"
+)
+
+DOCS=( CHANGES COPYING README )
+
+src_prepare() {
+ # Remove unneeded icon resources update needing running X
+ sed -i \
+ -e '/self\._make_resources\(\)/d' \
+ setup.py
+
+ # Fix desktop file entry
+ sed -i \
+ -e '/^Version.*/d' \
+ data/photofilmstrip.desktop
+
+ distutils-r1_src_prepare
+}
+
+src_install() {
+ # Do not compress the apps help files
+ docompress -x /usr/share/doc/${PN}
+
+ distutils-r1_src_install
+}
diff --git a/media-video/pitivi/Manifest b/media-video/pitivi/Manifest
new file mode 100644
index 000000000000..625bb56ed5c2
--- /dev/null
+++ b/media-video/pitivi/Manifest
@@ -0,0 +1 @@
+DIST pitivi-0.94.tar.xz 3271200 SHA256 f52a0643bc5a9149069c01d0b5ef4149032473bb505e6d679dd3f3153506faec SHA512 fcf3ccb537980418af55ead196963b3503d407e23fcaf7409898c9c3e61077ae7491d91c82f6fa3eb63182a383035e1ec2ada4f046ec9b7cdf9f02829662c3c3 WHIRLPOOL c308595a582f304f8910fd04aadcfebe9743b560db48165247feb15065694441441564feb91e13a609f3d9344be05be369094b2e52638bd9a6525e95a1a00acd
diff --git a/media-video/pitivi/files/pitivi-0.94-unittest.patch b/media-video/pitivi/files/pitivi-0.94-unittest.patch
new file mode 100644
index 000000000000..a117d108f48f
--- /dev/null
+++ b/media-video/pitivi/files/pitivi-0.94-unittest.patch
@@ -0,0 +1,14 @@
+Allow fallback to a non GL sink for unittests.
+
+--- a/pitivi/utils/pipeline.py 2015-05-25 13:58:33.980916075 +0200
++++ b/pitivi/utils/pipeline.py 2015-05-25 13:57:52.277261138 +0200
+@@ -182,6 +182,9 @@
+ # Create a cluttersink element used for display. Subclasses must connect
+ # it to self._pipeline themselves
+ self.video_sink = Gst.ElementFactory.make("glimagesink", None)
++ if self.video_sink is None:
++ self.video_sink = Gst.ElementFactory.make("xvimagesink", None)
++
+ if isinstance(pipeline, GES.Pipeline):
+ self._pipeline.preview_set_video_sink(self.video_sink)
+ else:
diff --git a/media-video/pitivi/metadata.xml b/media-video/pitivi/metadata.xml
new file mode 100644
index 000000000000..8444afb93dd2
--- /dev/null
+++ b/media-video/pitivi/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>gnome</herd>
+ <herd>gstreamer</herd>
+</pkgmetadata>
diff --git a/media-video/pitivi/pitivi-0.94.ebuild b/media-video/pitivi/pitivi-0.94.ebuild
new file mode 100644
index 000000000000..450502290caf
--- /dev/null
+++ b/media-video/pitivi/pitivi-0.94.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+GNOME2_LA_PUNT="yes"
+PYTHON_COMPAT=( python{3_3,3_4} )
+PYTHON_REQ_USE="sqlite"
+
+inherit eutils gnome2 python-single-r1 virtualx
+
+DESCRIPTION="A non-linear video editor using the GStreamer multimedia framework"
+HOMEPAGE="http://www.pitivi.org"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="v4l test"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+# Do not forget to check pitivi/check.py for dependencies
+# pycanberra, gnome-desktop, libav and libnotify are optional
+COMMON_DEPEND="
+ ${PYTHON_DEPS}
+ >=dev-python/pycairo-1.10[${PYTHON_USEDEP}]
+ >=x11-libs/cairo-1.10
+"
+RDEPEND="${COMMON_DEPEND}
+ dev-libs/glib:2
+
+ >=dev-libs/gobject-introspection-1.34
+ dev-python/dbus-python[${PYTHON_USEDEP}]
+ >=dev-python/gst-python-1.4:1.0[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/pycanberra[${PYTHON_USEDEP}]
+ >=dev-python/pygobject-3.8:3[${PYTHON_USEDEP}]
+ dev-python/pyxdg[${PYTHON_USEDEP}]
+
+ gnome-base/librsvg:=
+ gnome-base/gnome-desktop:3[introspection]
+
+ >=media-libs/clutter-1.12:1.0[introspection]
+ >=media-libs/clutter-gst-2:2.0[introspection]
+ >=media-libs/clutter-gtk-1.4:1.0[introspection]
+ >=media-libs/gnonlin-1.4:1.0
+ >=media-libs/gstreamer-1.4:1.0[introspection]
+ >=media-libs/gstreamer-editing-services-1.4:1.0[introspection]
+ >=media-libs/gst-plugins-base-1.4:1.0
+ >=media-libs/gst-plugins-good-1.4:1.0
+ >=media-plugins/gst-plugins-libav-1.4:1.0
+
+ x11-libs/libnotify[introspection]
+ >=x11-libs/gtk+-3.10:3[introspection]
+
+ v4l? ( >=media-plugins/gst-plugins-v4l2-1.4:1.0 )
+"
+DEPEND="${RDEPEND}
+ app-text/yelp-tools
+ dev-python/setuptools
+ >=dev-util/intltool-0.35.5
+ sys-devel/gettext
+ virtual/pkgconfig
+ test? ( dev-python/mock[${PYTHON_USEDEP}] )
+"
+
+src_prepare() {
+ # Allow using non-GL sink when it cannot be found
+ epatch "${FILESDIR}"/${PN}-0.94-unittest.patch
+
+ gnome2_src_prepare
+}
+src_configure() {
+ gnome2_src_configure \
+ ITSTOOL="$(type -P true)" \
+ --disable-static
+}
+
+src_test() {
+ # Force Xvfb to be used
+ unset DISPLAY
+ unset DBUS_SESSION_BUS_ADDRESS
+ export PITIVI_TOP_LEVEL_DIR="${S}"
+ Xemake check
+}
+
+src_install() {
+ gnome2_src_install
+ python_fix_shebang "${D}"
+}
diff --git a/media-video/plasma-mediacenter/Manifest b/media-video/plasma-mediacenter/Manifest
new file mode 100644
index 000000000000..2bafa20168af
--- /dev/null
+++ b/media-video/plasma-mediacenter/Manifest
@@ -0,0 +1 @@
+DIST plasma-mediacenter-1.3.0.tar.bz2 449835 SHA256 7ea3c50d9fa5499f50c8e00d9d23a12d7967a340dc53986ea1099669769e46ca SHA512 d20d9175c23fb2375eef72ed367b8f1337d9e26845935a7da8ea72195945f2cdfa466b72e8f0af70c4d1a767002971a6896d41cbf93f9cf87522d99952fed607 WHIRLPOOL 377ff000663f53e433cb161a4c7db5ea2c9088a39bd644ccec9dae35441a185e994097450e884f45714ddd2baa3fe0e1120f05abdeda7c500e49793b0dcb713f
diff --git a/media-video/plasma-mediacenter/metadata.xml b/media-video/plasma-mediacenter/metadata.xml
new file mode 100644
index 000000000000..2d94d9badf67
--- /dev/null
+++ b/media-video/plasma-mediacenter/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>kde</herd>
+ <use>
+ <flag name="nepomuk">Enable Nepomuk based semantic desktop support (deprecated)</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-video/plasma-mediacenter/plasma-mediacenter-1.3.0.ebuild b/media-video/plasma-mediacenter/plasma-mediacenter-1.3.0.ebuild
new file mode 100644
index 000000000000..1173c2e4f2c7
--- /dev/null
+++ b/media-video/plasma-mediacenter/plasma-mediacenter-1.3.0.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DECLARATIVE_REQUIRED="always"
+OPENGL_REQUIRED="always"
+KDE_LINGUAS="bs ca ca@valencia cs da de el es fi fr gl hu it lv nl pl pt pt_BR sk sl sv tr uk zh_TW"
+inherit kde4-base
+
+DESCRIPTION="Unified media experience for any device capable of running KDE"
+HOMEPAGE="http://www.kde.org/ http://community.kde.org/Plasma/Plasma_Media_Center"
+
+if [[ ${KDE_BUILD_TYPE} != live ]]; then
+ SRC_URI="mirror://kde/stable/${PN}/${PV}/src/${P}.tar.bz2"
+fi
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="amd64"
+IUSE="debug nepomuk semantic-desktop"
+
+REQUIRED_USE="?? ( nepomuk semantic-desktop )"
+
+# bug 516686
+RESTRICT="test"
+
+RDEPEND="
+ $(add_kdebase_dep plasma-workspace)
+ dev-qt/qt-mobility[multimedia,qml]
+ media-libs/taglib
+ nepomuk? ( $(add_kdebase_dep nepomuk-core) )
+ semantic-desktop? ( $(add_kdebase_dep baloo) )
+"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+"
+
+S=${WORKDIR}/${PN}
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_find_package nepomuk NepomukCore)
+ $(cmake-utils_use_find_package semantic-desktop Baloo)
+ )
+
+ if ! use nepomuk && ! use semantic-desktop ; then
+ mycmakeargs+=( -DUSE_FILESYSTEM_MEDIA_SOURCE=ON )
+ fi
+
+ kde4-base_src_configure
+}
diff --git a/media-video/projectx/Manifest b/media-video/projectx/Manifest
new file mode 100644
index 000000000000..c658c0b58d08
--- /dev/null
+++ b/media-video/projectx/Manifest
@@ -0,0 +1,4 @@
+DIST projectx-0.91.0.10.tar.xz 830104 SHA256 7650e4992773c53ea2fb552ee030da8cee62cba4ca63d0f32a4551551f31ad04 SHA512 681dae4fd368a00a7ada37f8e64271c838a9c3737008b6fcd7f74679ca9fdf2cce140b0627a4c77a9a00baea76659bad0d2d710511b66026f9597ad153a2e725 WHIRLPOOL ca5aab50ce4606bb8aee6500ecca3169b2fcd319436781e3da8f2b848e049df1d4daeb6b70cda8722c4d8f64ff1405aab31e70e33ae4b56716d39fdf1ec5d188
+DIST projectx-icon.png 1692 SHA256 0736e4320fbdb211a69e839b768175f18b0b2ef91636a9b382b4024a095dd4cf SHA512 33d9e505140d2dd22d34f87ebff040530130bbb7d1e9958d7345f442bd3d6e17dff8d243e22f374217aed20139871e406e46ca6f03ca48eb338dc3630af2417a WHIRLPOOL f88d7ab5cad4e5dfb893efbaafdc64a518a5f473115f9ef3e9f8a808f88ee71b22c6fbc6fc3a2e8a1885b2b9696ca0136c05d4f4d5cd513dacc6c4851c304f33
+DIST projectx-idctfast.tar.xz 12444 SHA256 d05b86b05c4924b434a6a9bb443c05d5421f6df7a2b19616a53ef1e4b4dada45 SHA512 85dd6dd0011c166aaefd47a47c4455dda68ba6da65c9eda5a996f7d078ce3900168714c0c72c6250f7b99181fda84c6d81e3afb392ace9c12c3c5690de01c1d8 WHIRLPOOL 0a44b37eaf79be8df356a6bc7bc1119bee151c6f7949a09f8b834bd785e242ffda907fbf36ff83e182249f450d835ad58cf3a81d6dceb404634cb01474ce908a
+DIST xdg-20100731.java.xz 648 SHA256 b6a189323fcc25ae5bebc006d870b4191a3bec34c80de7e337e5ed8a39f332c6 SHA512 8b5d8e695f3f052f889002dc93742da8ba9eada173cb10ad1db525e1ad89d1c8f44200d79dc02068ccf93fdbf2e8daa5bb359dae77bacbc89cb6d4895732774b WHIRLPOOL 8a79fe5a73fae9662f0c74d293dbbe43d034484601649f170232e1b79ad0bb337fa8a6b3160683839893cc9e83171ad77e645fc64724c75321b02ef9f47efc85
diff --git a/media-video/projectx/files/build-0.90.4.00_p33.xml b/media-video/projectx/files/build-0.90.4.00_p33.xml
new file mode 100644
index 000000000000..f35638733b13
--- /dev/null
+++ b/media-video/projectx/files/build-0.90.4.00_p33.xml
@@ -0,0 +1,77 @@
+<?xml version="1.0"?>
+
+<project name="projectx" default="jar">
+ <!-- some properties -->
+ <property name="src.dir" value="src" />
+ <property name="build.dir" value="build" />
+ <property name="docs.dir" value="apidocs" />
+ <property name="dist.dir" value="dist" />
+ <property name="lib.dir" value="lib" />
+ <property name="resources.dir" value="resources" />
+ <property name="project.jar" value="${dist.dir}/${ant.project.name}.jar" />
+ <property name="target.jdk" value="1.5" />
+
+ <!-- classpath -->
+ <path id="refcp">
+ <fileset dir="${lib.dir}">
+ <include name="**/*.jar" />
+ </fileset>
+ </path>
+
+ <!-- init -->
+ <target name="init">
+ <mkdir dir="${dist.dir}" />
+ <mkdir dir="${docs.dir}" />
+ <mkdir dir="${build.dir}" />
+ </target>
+
+ <!-- compile everything -->
+ <target name="compile" depends="init">
+ <javac srcdir="${src.dir}"
+ destdir="${build.dir}"
+ source="${target.jdk}"
+ target="${target.jdk}"
+ classpathref="refcp"
+ encoding="ISO-8859-1"/>
+ <copy todir="${build.dir}">
+ <fileset dir="${resources.dir}" />
+ </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>
+
+ <!-- generate javadocs -->
+ <target name="javadoc" depends="init">
+ <javadoc sourcepath="${src.dir}"
+ packagenames="*"
+ destdir="${docs.dir}"
+ author="true"
+ version="true"
+ use="true"
+ charset="UTF-8"
+ encoding="ISO-8859-1"
+ windowtitle="${ant.project.name} API" />
+ </target>
+
+ <!-- clean up -->
+ <target name="clean">
+ <delete dir="${build.dir}" />
+ <delete dir="${docs.dir}" />
+ <delete dir="${dist.dir}" />
+ </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-video/projectx/files/projectx-0.90.4.00_p33-bl2.patch b/media-video/projectx/files/projectx-0.90.4.00_p33-bl2.patch
new file mode 100644
index 000000000000..7c5b48263cec
--- /dev/null
+++ b/media-video/projectx/files/projectx-0.90.4.00_p33-bl2.patch
@@ -0,0 +1,15 @@
+--- src/net/sourceforge/dvb/projectx/gui/Html.java 2006-11-25 22:28:52.000000000 +0100
++++ src/net/sourceforge/dvb/projectx/gui/Html.java 2007-06-10 13:37:59.000000000 +0200
+@@ -159,9 +159,10 @@
+ {
+ try
+ {
+- BrowserLauncher.openURL(u.toString());
++ BrowserLauncher launcher = new BrowserLauncher();
++ launcher.openURLinBrowser(u.toString());
+ }
+- catch (IOException e)
++ catch (Exception e)
+ {
+ Common.setMessage(Resource.getString("msg.browser.launcher.error") + " " + e);
+ }
diff --git a/media-video/projectx/files/projectx-0.90.4.00_p33-idctfast.patch b/media-video/projectx/files/projectx-0.90.4.00_p33-idctfast.patch
new file mode 100644
index 000000000000..8421dd36ae94
--- /dev/null
+++ b/media-video/projectx/files/projectx-0.90.4.00_p33-idctfast.patch
@@ -0,0 +1,37 @@
+--- src/net/sourceforge/dvb/projectx/video/MpvDecoder.java 2009-12-31 15:24:13.000000000 +0100
++++ src/net/sourceforge/dvb/projectx/video/MpvDecoder.java 2010-07-31 14:32:19.945223425 +0200
+@@ -72,7 +72,7 @@
+
+ public class MpvDecoder extends Object {
+
+- private IDCTRefNative idct;
++ private IDCTFast idct;
+ private IDCTSseNative idctsse;
+
+ private int preview_horizontal_size = 512;
+@@ -134,13 +134,13 @@
+ {
+ Arrays.fill(pixels2, 0xFF505050);
+
+- idct = new IDCTRefNative();
++ idct = new IDCTFast();
+ idctsse = new IDCTSseNative();
+
+- if (IDCTRefNative.isLibraryLoaded())
++ if (IDCTFast.isLibraryLoaded())
+ idct.init();
+
+- if (IDCTRefNative.isLibraryLoaded() || IDCTSseNative.isLibraryLoaded())
++ if (IDCTFast.isLibraryLoaded() || IDCTSseNative.isLibraryLoaded())
+ acceleration = true;
+ }
+
+@@ -2399,7 +2399,7 @@
+ }
+ }
+
+- else if (IDCTRefNative.isLibraryLoaded() && isAccelerated())
++ else if (IDCTFast.isLibraryLoaded() && isAccelerated())
+ {
+ /* copy or add block data into picture */
+ for (comp=0; comp<block_count; comp++)
diff --git a/media-video/projectx/files/projectx-0.90.4.00_p33-stdout-corrupt.patch b/media-video/projectx/files/projectx-0.90.4.00_p33-stdout-corrupt.patch
new file mode 100644
index 000000000000..47f7d71c04cb
--- /dev/null
+++ b/media-video/projectx/files/projectx-0.90.4.00_p33-stdout-corrupt.patch
@@ -0,0 +1,11 @@
+--- src/net/sourceforge/dvb/projectx/common/GuiInterface.java 2008-12-04 01:47:03.000000000 +0100
++++ src/net/sourceforge/dvb/projectx/common/GuiInterface.java 2008-12-04 02:21:11.342918380 +0100
+@@ -190,7 +190,7 @@
+ impl.updateProgressBar(percent);
+
+ else
+- System.out.print("\r" + percent + " %");
++ System.out.print(percent + " %");
+ }
+
+ /**
diff --git a/media-video/projectx/files/projectx-0.90.4.00_p33-xdg.patch b/media-video/projectx/files/projectx-0.90.4.00_p33-xdg.patch
new file mode 100644
index 000000000000..1cb675af4ebb
--- /dev/null
+++ b/media-video/projectx/files/projectx-0.90.4.00_p33-xdg.patch
@@ -0,0 +1,44 @@
+--- src/net/sourceforge/dvb/projectx/common/Settings.java 2008-02-18 19:34:48.000000000 +0100
++++ src/net/sourceforge/dvb/projectx/common/Settings.java 2010-07-31 19:44:59.151224244 +0200
+@@ -46,6 +46,8 @@
+ import java.util.Set;
+ import java.util.TreeMap;
+
++import xdg.*;
++
+ import net.sourceforge.dvb.projectx.xinput.XInputDirectory;
+
+ /**
+@@ -56,7 +58,7 @@
+ public class Settings extends Object {
+
+ /** the default ini filename */
+- private static final String DEFAULT_INI = "X.ini";
++ private static final String DEFAULT_INI = "Project-X.ini";
+
+ /** the current ini filename */
+ private String inifile = "";
+@@ -75,7 +77,7 @@
+ */
+ public Settings()
+ {
+- this(Resource.workdir + Resource.filesep + DEFAULT_INI);
++ this(xdg.config_home() + Resource.filesep + DEFAULT_INI);
+ }
+
+ /**
+@@ -161,6 +163,7 @@
+ str = inifile;
+
+ try {
++ xdg.mkdirs_file(str);
+ PrintWriter w = new PrintWriter(new FileWriter(str));
+
+ String base_key = "# Project-X INI";
+@@ -714,4 +717,4 @@
+ return inifile;
+ }
+
+-}
+\ Kein Zeilenumbruch am Dateiende.
++}
diff --git a/media-video/projectx/metadata.xml b/media-video/projectx/metadata.xml
new file mode 100644
index 000000000000..20f755bee0cd
--- /dev/null
+++ b/media-video/projectx/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>billie@gentoo.org</email>
+ <name>Daniel Pielmeier</name>
+ </maintainer>
+ <longdescription lang="en">
+ European digital radio &amp; television uses the DVB standard to broadcast
+ its data. Project X gives you a look behind the transmissions and tries
+ its best to handle &amp; repair many stream types and shows what went
+ wrong on reception.
+ </longdescription>
+</pkgmetadata>
diff --git a/media-video/projectx/projectx-0.91.0.10.ebuild b/media-video/projectx/projectx-0.91.0.10.ebuild
new file mode 100644
index 000000000000..d54a9d5cee1d
--- /dev/null
+++ b/media-video/projectx/projectx-0.91.0.10.ebuild
@@ -0,0 +1,127 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+JAVA_PKG_IUSE="doc source"
+
+inherit eutils toolchain-funcs java-pkg-2 java-ant-2
+
+XDG_P="xdg-20100731"
+
+DESCRIPTION="Converts, splits and demuxes DVB and other MPEG recordings"
+HOMEPAGE="http://project-x.sourceforge.net/"
+SRC_URI="http://dev.gentoo.org/~billie/distfiles/${P}.tar.xz
+ http://sbriesen.de/gentoo/distfiles/${PN}-idctfast.tar.xz
+ http://sbriesen.de/gentoo/distfiles/${XDG_P}.java.xz
+ http://sbriesen.de/gentoo/distfiles/${PN}-icon.png"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86"
+IUSE="X cpu_flags_x86_mmx cpu_flags_x86_sse"
+
+COMMON_DEP="dev-java/commons-net
+ X? ( =dev-java/browserlauncher2-1* )"
+
+RDEPEND=">=virtual/jre-1.5
+ ${COMMON_DEP}"
+
+DEPEND=">=virtual/jdk-1.5
+ app-arch/xz-utils
+ virtual/libiconv
+ ${COMMON_DEP}"
+
+S="${WORKDIR}/Project-X"
+
+mainclass() {
+ # read Main-Class from MANIFEST.MF
+ sed -n "s/^Main-Class: \([^ ]\+\).*/\1/p" "${S}/MANIFEST.MF" || die
+}
+
+java_prepare() {
+ local X
+
+ # apply stdout corruption patch (zzam@gentoo.org)
+ epatch "${FILESDIR}/${PN}-0.90.4.00_p33-stdout-corrupt.patch"
+
+ # apply BrowserLauncher2 patch
+ use X && epatch "${FILESDIR}/${PN}-0.90.4.00_p33-bl2.patch"
+ rm -rf src/edu || die
+
+ # apply IDCTFast patch
+ epatch "${FILESDIR}/${PN}-0.90.4.00_p33-idctfast.patch"
+
+ # apply XDG patch
+ cp -f "${WORKDIR}/${XDG_P}.java" "${S}/src/xdg.java" || die
+ epatch "${FILESDIR}/${PN}-0.90.4.00_p33-xdg.patch"
+
+ # copy build.xml
+ cp -f "${FILESDIR}/build-0.90.4.00_p33.xml" build.xml || die
+
+ # patch executable and icon
+ sed -i -e "s:^\(Exec=\).*:\1${PN}_gui:g" \
+ -e "s:^\(Icon=\).*:\1${PN}:g" *.desktop || die
+
+ # convert CRLF to LF
+ edos2unix *.txt MANIFEST.MF
+
+ # convert docs to utf-8
+ if [ -x "$(type -p iconv)" ]; then
+ for X in zutun.txt; do
+ iconv -f LATIN1 -t UTF8 -o "${X}~" "${X}" && mv -f "${X}~" "${X}" || die
+ done
+ fi
+
+ # merge/remove resources depending on USE="X"
+ if use X; then
+ mv -f htmls resources/ || die
+ else
+ rm -rf src/net/sourceforge/dvb/projectx/gui || die
+ rm resources/*.gif || die
+ fi
+
+ # update library packages
+ cd lib || die
+ rm -f {commons-net,jakarta-oro}*.jar || die
+ java-pkg_jar-from commons-net
+ use X && java-pkg_jar-from browserlauncher2-1.0
+ java-pkg_ensure-no-bundled-jars
+}
+
+src_compile() {
+ local IDCT="idct-mjpeg" # default IDCT implementation
+ if use x86 || use amd64; then
+ use cpu_flags_x86_mmx && IDCT="idct-mjpeg-mmx"
+ use cpu_flags_x86_sse && IDCT="idct-mjpeg-sse"
+ fi
+
+ eant build $(use_doc) -Dmanifest.mainclass=$(mainclass)
+
+ cd lib/PORTABLE || die
+ emake CC=$(tc-getCC) IDCT="${IDCT}" LDFLAGS="${LDFLAGS}" \
+ CPLAT="${CFLAGS} -O3 -ffast-math -fPIC"
+}
+
+src_install() {
+ java-pkg_dojar dist/${PN}.jar
+ java-pkg_doso lib/PORTABLE/libidctfast.so
+
+ java-pkg_dolauncher ${PN}_cli --main $(mainclass) \
+ --java_args "-Djava.awt.headless=true -Xmx256m"
+
+ if use X; then
+ java-pkg_dolauncher ${PN}_gui --main $(mainclass) \
+ --java_args "-Xmx256m"
+ dosym ${PN}_gui /usr/bin/${PN}
+ newicon "${DISTDIR}/${PN}-icon.png" "${PN}.png"
+ domenu *.desktop
+ else
+ dosym ${PN}_cli /usr/bin/${PN}
+ fi
+
+ dodoc *.txt
+ use doc && java-pkg_dojavadoc apidocs
+ use source && java-pkg_dosrc src
+}
diff --git a/media-video/pymp/Manifest b/media-video/pymp/Manifest
new file mode 100644
index 000000000000..2d746ba5703e
--- /dev/null
+++ b/media-video/pymp/Manifest
@@ -0,0 +1 @@
+DIST pymp-1.1.tar.bz2 132710 SHA256 924c7d0a40d349f4dfc9a0bae2126a432185dc210f740dfc6ab68fd3ec892cd8 SHA512 10647af1233c5a030cc32f5efb7790fb93568832547f8c886d49597cff36f5d5606b7b06c00c0206e9eacd6331dbb40bc2331dc30230052b4510be1ffec34500 WHIRLPOOL 1a99e46f94cc1af7bddae4cfc182f4d94530664e324322663534f187a28beb3c7610d9c4bd790142e5ad59d7ec5ddd9e22d153e60aa8181b91be64216334528f
diff --git a/media-video/pymp/metadata.xml b/media-video/pymp/metadata.xml
new file mode 100644
index 000000000000..0d9b0dcb7f33
--- /dev/null
+++ b/media-video/pymp/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>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/media-video/pymp/pymp-1.1.ebuild b/media-video/pymp/pymp-1.1.ebuild
new file mode 100644
index 000000000000..45f0b0c24b46
--- /dev/null
+++ b/media-video/pymp/pymp-1.1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+PYTHON_DEPEND="2:2.5"
+inherit eutils multilib python
+
+DESCRIPTION="a lean, flexible frontend to mplayer written in python"
+HOMEPAGE="http://jdolan.dyndns.org/trac/wiki/Pymp"
+SRC_URI="http://jdolan.dyndns.org/jaydolan/files/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86 ~amd64-fbsd"
+IUSE=""
+
+RDEPEND="media-video/mplayer
+ dev-python/pygtk"
+DEPEND="sys-apps/sed"
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_prepare() {
+ sed -i -e "s/python/python2/" -e "s:PREFIX/lib:/usr/$(get_libdir):" pymp || die "sed failed"
+}
+
+src_compile() { :; }
+
+src_install() {
+ dobin pymp || die "dobin failed"
+ insinto /usr/$(get_libdir)/pymp
+ doins *.py || die "doins failed"
+ dodoc CHANGELOG README
+ doicon pymp.png
+ make_desktop_entry pymp Pymp pymp
+}
+
+pkg_postinst() {
+ python_mod_optimize /usr/$(get_libdir)/pymp
+}
+
+pkg_postrm() {
+ python_mod_cleanup /usr/$(get_libdir)/pymp
+}
diff --git a/media-video/qgifer/Manifest b/media-video/qgifer/Manifest
new file mode 100644
index 000000000000..121f790d0917
--- /dev/null
+++ b/media-video/qgifer/Manifest
@@ -0,0 +1 @@
+DIST qgifer-0.2.1-source.tar.gz 373441 SHA256 b05f2b44faad2a94a746eb7de411875f133e6038ec81a5f3247c86a25a41e9f0 SHA512 ce48e5756cbab283d5894ddb369114e52c9cedc2fe15aed5d22aeeacc822058123d3a2f3c9a6eddf94a1eef992c3ddcad77d6941c76ba0c795c8b44209fac7df WHIRLPOOL 4095c8a6a373b234007b3015cef9ce9d4a023cf80e2701cec7ad5b2df1ab51e28cf63becb412d25e7305571e284b332542b8e15a7d49bd2d40ffe239753be5e4
diff --git a/media-video/qgifer/files/qgifer-0.2.1-desktop.patch b/media-video/qgifer/files/qgifer-0.2.1-desktop.patch
new file mode 100644
index 000000000000..2804caef7dba
--- /dev/null
+++ b/media-video/qgifer/files/qgifer-0.2.1-desktop.patch
@@ -0,0 +1,13 @@
+Index: doc/qgifer.desktop
+===================================================================
+--- doc/qgifer.desktop (revision 91)
++++ doc/qgifer.desktop (working copy)
+@@ -3,7 +3,7 @@
+ Name=QGifer
+ Icon=/usr/share/icons/qgifer.xpm
+ Type=Application
+-Categories=Graphics;2DGraphics;RasterGraphics;Video;
++Categories=Graphics;2DGraphics;RasterGraphics;Video;AudioVideo;
+ Comment=A video-based animated GIF creator
+ GenericName=A video-based animated GIF creator
+ Comment[pl]=Narzędzie do tworzenia animowanych plików GIF
diff --git a/media-video/qgifer/metadata.xml b/media-video/qgifer/metadata.xml
new file mode 100644
index 000000000000..0f6f89d4e523
--- /dev/null
+++ b/media-video/qgifer/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>andrzej.pauli@gmail.com</email>
+ <name>Andrzej Pauli</name>
+ <description>Maintainer. Assign bugs to him.</description>
+ </maintainer>
+ <herd>proxy-maintainers</herd>
+ <longdescription lang="en">
+ QGifer is a tool for extracting part of a video to an animated GIF file.
+ </longdescription>
+ <use>
+ <flag name="imagemagick">Use imagemagick for image operations</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">qgifer</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/qgifer/qgifer-0.2.1.ebuild b/media-video/qgifer/qgifer-0.2.1.ebuild
new file mode 100644
index 000000000000..47c8279b3b79
--- /dev/null
+++ b/media-video/qgifer/qgifer-0.2.1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit cmake-utils
+
+DESCRIPTION="A video-based animated GIF creator"
+HOMEPAGE="https://sourceforge.net/projects/qgifer/"
+SRC_URI="mirror://sourceforge/${PN}/${P}-source.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="debug imagemagick"
+
+RDEPEND="media-libs/giflib:0
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ imagemagick? ( media-gfx/imagemagick:0 )
+ media-libs/opencv:0[ffmpeg]
+ virtual/ffmpeg:0"
+
+DEPEND="${RDEPEND}
+ >=dev-util/cmake-2.8:0"
+
+S="${WORKDIR}/${P}-source"
+
+PATCHES=( "${FILESDIR}"/${P}-desktop.patch )
+
+src_configure() {
+ local mycmakeargs=""
+
+ use debug && mycmakeargs+=" -DRELEASE_MODE=OFF"
+
+ cmake-utils_src_configure
+}
diff --git a/media-video/qt-recordmydesktop/Manifest b/media-video/qt-recordmydesktop/Manifest
new file mode 100644
index 000000000000..0bf9176e0294
--- /dev/null
+++ b/media-video/qt-recordmydesktop/Manifest
@@ -0,0 +1 @@
+DIST qt-recordmydesktop-0.3.8.tar.gz 185528 SHA256 84e43332ea1974edd8da3edb67456e57a40d3083a23c8d19d8f76b098a226f61
diff --git a/media-video/qt-recordmydesktop/files/qt-recordmydesktop-0.3.8-check-for-jack.patch b/media-video/qt-recordmydesktop/files/qt-recordmydesktop-0.3.8-check-for-jack.patch
new file mode 100644
index 000000000000..08c1b7484916
--- /dev/null
+++ b/media-video/qt-recordmydesktop/files/qt-recordmydesktop-0.3.8-check-for-jack.patch
@@ -0,0 +1,32 @@
+--- src/rmdPrefsWidget.py.orig 2008-11-23 16:09:14.000000000 +0100
++++ src/rmdPrefsWidget.py 2010-05-24 16:23:30.255865721 +0200
+@@ -302,9 +302,29 @@
+ def remPort(self,lwi):
+ self.jack_lsp_listSave.takeItem(self.jack_lsp_listSave.row(lwi))
+
++ def which(self,program):
++ import os
++ def is_exe(fpath):
++ return os.path.exists(fpath) and os.access(fpath, os.X_OK)
++
++ fpath, fname = os.path.split(program)
++ if fpath:
++ if is_exe(program):
++ return program
++ else:
++ for path in os.environ["PATH"].split(os.pathsep):
++ exe_file = os.path.join(path, program)
++ if is_exe(exe_file):
++ return exe_file
++
++ return None
++
+ def __runJackLSP__(self,button=None):
+ self.ports=[]
+ failed=0
++ if self.which('jack_lsp') == None:
++ self.jack_button.setEnabled(False)
++ return
+ (stdin,stdout,stderr)=os.popen3(['jack_lsp'],'t')
+ ports=stdout.readlines()
+ stdin.close()
diff --git a/media-video/qt-recordmydesktop/files/qt-recordmydesktop-0.3.8-desktopfile.patch b/media-video/qt-recordmydesktop/files/qt-recordmydesktop-0.3.8-desktopfile.patch
new file mode 100644
index 000000000000..77d5618a765d
--- /dev/null
+++ b/media-video/qt-recordmydesktop/files/qt-recordmydesktop-0.3.8-desktopfile.patch
@@ -0,0 +1,18 @@
+Fixes errors reported by desktop-file-validate.
+
+--- src/qt-recordmydesktop.desktop
++++ src/qt-recordmydesktop.desktop
+@@ -1,12 +1,11 @@
+ [Desktop Entry]
+ Version=1.0
+-Encoding=UTF-8
+ Name=qt-recordMyDesktop
+ Comment=Frontend for recordMyDesktop
+ Comment[fr]=Interface pour recordmydesktop
+ Exec=qt-recordMyDesktop
+ Terminal=false
+ Type=Application
+-Icon=qt-recordmydesktop.png
++Icon=qt-recordmydesktop
+ Categories=AudioVideo;Recorder;
+ StartupNotify=false
diff --git a/media-video/qt-recordmydesktop/files/qt-recordmydesktop-0.3.8-pyqt4.patch b/media-video/qt-recordmydesktop/files/qt-recordmydesktop-0.3.8-pyqt4.patch
new file mode 100644
index 000000000000..9b2368cfd660
--- /dev/null
+++ b/media-video/qt-recordmydesktop/files/qt-recordmydesktop-0.3.8-pyqt4.patch
@@ -0,0 +1,14 @@
+Index: qt-recordmydesktop-0.3.8/configure.ac
+===================================================================
+--- qt-recordmydesktop-0.3.8.orig/configure.ac
++++ qt-recordmydesktop-0.3.8/configure.ac
+@@ -50,8 +50,7 @@ fi
+ b=$(echo "$PYQT4_VERSION" | awk 'BEGIN{ FS="." } { print $1 "\n" $2 "\n" $3 }')
+ c=($b)
+
+-
+-export PYQT4_MAJOR=${c[[0]]}
++export PYQT4_MAJOR=${c[[0]]/snapshot-/}
+ export PYQT4_MINOR=${c[[1]]}
+
+ if test $PYQT4_MAJOR != 4; then
diff --git a/media-video/qt-recordmydesktop/metadata.xml b/media-video/qt-recordmydesktop/metadata.xml
new file mode 100644
index 000000000000..2f0746fb146b
--- /dev/null
+++ b/media-video/qt-recordmydesktop/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>video</herd>
+ <herd>qt</herd>
+ <upstream>
+ <remote-id type="sourceforge">recordmydesktop</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/qt-recordmydesktop/qt-recordmydesktop-0.3.8-r2.ebuild b/media-video/qt-recordmydesktop/qt-recordmydesktop-0.3.8-r2.ebuild
new file mode 100644
index 000000000000..ac6dc491d57d
--- /dev/null
+++ b/media-video/qt-recordmydesktop/qt-recordmydesktop-0.3.8-r2.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+PYTHON_DEPEND="2:2.6"
+RESTRICT_PYTHON_ABIS="3.*"
+inherit autotools base eutils python
+
+DESCRIPTION="Qt4 interface for RecordMyDesktop"
+HOMEPAGE="http://recordmydesktop.sourceforge.net/"
+SRC_URI="mirror://sourceforge/recordmydesktop/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+# Test is buggy : bug #186752
+# Tries to run intl-toolupdate without it being substituted from
+# configure, make test tries run make check in flumotion/test what
+# makes me think that this file has been copied from flumotion without
+# much care...
+RESTRICT="test"
+
+RDEPEND=">=media-video/recordmydesktop-0.3.8
+ x11-apps/xwininfo"
+DEPEND="${RDEPEND}
+ >=dev-python/PyQt4-4.1[X]"
+
+DOCS=( AUTHORS ChangeLog NEWS README )
+
+PATCHES=(
+ "${FILESDIR}/${P}-check-for-jack.patch"
+ "${FILESDIR}/${P}-desktopfile.patch"
+ "${FILESDIR}/${P}-pyqt4.patch"
+)
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_prepare() {
+ base_src_prepare
+ eautoreconf
+
+ # these deps are required by PyQt4, not this package
+ sed -e '/^PKG_CHECK_MODULES/d' -i configure.ac || die "sed failed"
+ eautoreconf
+
+ python_convert_shebangs 2 src/qt-recordMyDesktop.in
+
+ sed -e 's/@ALL_LINGUAS@//' -i po/Makefile.in.in \
+ || die "respect linguas sed failed"
+ strip-linguas -i po
+ echo ${LINGUAS} | tr ' ' '\n' > po/LINGUAS
+}
diff --git a/media-video/qx11grab/Manifest b/media-video/qx11grab/Manifest
new file mode 100644
index 000000000000..c0e2a527696c
--- /dev/null
+++ b/media-video/qx11grab/Manifest
@@ -0,0 +1,2 @@
+DIST qx11grab-0.4.10.tar.xz 389404 SHA256 055919c0461b9cf04fbde6aa672526f561831049fa5db1464ed1e5e3e219416e SHA512 357df667e7d3fcf57169b97d6a9d00d85f89ad25ac31090c9e1a05c3b2fa384231ac45df59541813e0b691e6360150d2fcc5683e1a52d8bb7d387f31e2b8243d WHIRLPOOL 5c451ad592756a9d2a2d061a9452f512522d484c1fa7e77acea8a62e94aace92d229d7298275f1987ebcf22dbcbdd8e3a049b5caedace2e82f63a226dfb22f4f
+DIST qx11grab-0.4.12.tar.xz 392304 SHA256 0f3d7ecb2e9d6fed3fd0c48cbc527c15f46a0f1befa666d0f6941f49df3ed7ca SHA512 6731d2bfc4fa889cf14da597408d86ddb68a33c5ed1ede3f4c49ed2746cebb71c2dd23cab17c2c03e52a60cfbbce928519a21d86fb5572fd88934e8bdf29cdb9 WHIRLPOOL 32663033215268f2bbe556332e95166539aaf95a740e634c6c6238aa322907dd0d4896c36eb0eea7a1b2378e54ef7a105e3d6327df06978ba8e15cdb1023e789
diff --git a/media-video/qx11grab/metadata.xml b/media-video/qx11grab/metadata.xml
new file mode 100644
index 000000000000..dc439f7e84f5
--- /dev/null
+++ b/media-video/qx11grab/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>qt</herd>
+</pkgmetadata>
diff --git a/media-video/qx11grab/qx11grab-0.4.10-r1.ebuild b/media-video/qx11grab/qx11grab-0.4.10-r1.ebuild
new file mode 100644
index 000000000000..4ffb496881d4
--- /dev/null
+++ b/media-video/qx11grab/qx11grab-0.4.10-r1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils
+
+DESCRIPTION="X11 desktop video grabber tray"
+HOMEPAGE="http://qx11grab.hjcms.de/"
+SRC_URI="http://qx11grab.hjcms.de/downloads/${PV}/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="libav kde opengl pulseaudio"
+
+RDEPEND="
+ >=dev-qt/qtcore-4.7.4:4
+ >=dev-qt/qtdbus-4.7.4:4
+ >=dev-qt/qtgui-4.7.4:4[accessibility]
+ >=media-libs/alsa-lib-1.0.26
+ >=media-libs/fontconfig-2.4
+ >=media-libs/freetype-2.4:2
+ >=sys-apps/dbus-1.6.4
+ >=x11-libs/libX11-1.3.4
+ >=x11-libs/libXrandr-1.3
+ libav? ( >=media-video/libav-9:0=[X,encode,truetype] )
+ !libav? ( >=media-video/ffmpeg-1.1:0=[X,encode,truetype] )
+ kde? ( kde-base/kdelibs:4 )
+ opengl? ( >=dev-qt/qtopengl-4.7.4:4 )
+ pulseaudio? ( media-sound/pulseaudio )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ kde? ( dev-util/automoc )
+"
+PDEPEND="virtual/freedesktop-icon-theme"
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ # install docs into standard Gentoo location
+ sed -i -e "/DESTINATION share/ s:\${CMAKE_PROJECT_NAME}:doc/${PF}:" \
+ CMakeLists.txt || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_enable kde KDE_SUPPORT)
+ $(cmake-utils_use_enable opengl)
+ $(cmake-utils_use_enable pulseaudio PULSE)
+ )
+ cmake-utils_src_configure
+}
diff --git a/media-video/qx11grab/qx11grab-0.4.12.ebuild b/media-video/qx11grab/qx11grab-0.4.12.ebuild
new file mode 100644
index 000000000000..a553c043b2f0
--- /dev/null
+++ b/media-video/qx11grab/qx11grab-0.4.12.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils
+
+DESCRIPTION="X11 desktop video grabber tray"
+HOMEPAGE="http://qx11grab.hjcms.de/"
+SRC_URI="http://qx11grab.hjcms.de/downloads/${PV}/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="libav kde opengl pulseaudio"
+
+RDEPEND="
+ >=dev-qt/qtcore-4.7.4:4
+ >=dev-qt/qtdbus-4.7.4:4
+ >=dev-qt/qtgui-4.7.4:4[accessibility]
+ >=media-libs/alsa-lib-1.0.26
+ >=media-libs/fontconfig-2.4
+ >=media-libs/freetype-2.4:2
+ >=sys-apps/dbus-1.6.4
+ >=x11-libs/libX11-1.3.4
+ >=x11-libs/libXrandr-1.3
+ libav? ( >=media-video/libav-9:0=[X,encode,truetype] )
+ !libav? ( >=media-video/ffmpeg-1.1:0=[X,encode,truetype] )
+ kde? ( kde-base/kdelibs:4 )
+ opengl? ( >=dev-qt/qtopengl-4.7.4:4 )
+ pulseaudio? ( media-sound/pulseaudio )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ kde? ( dev-util/automoc )
+"
+PDEPEND="virtual/freedesktop-icon-theme"
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ # install docs into standard Gentoo location
+ sed -i -e "/DESTINATION share/ s:\${CMAKE_PROJECT_NAME}:doc/${PF}:" \
+ CMakeLists.txt || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_enable kde KDE_SUPPORT)
+ $(cmake-utils_use_enable opengl)
+ $(cmake-utils_use_enable pulseaudio PULSE)
+ )
+ cmake-utils_src_configure
+}
diff --git a/media-video/recmpeg/Manifest b/media-video/recmpeg/Manifest
new file mode 100644
index 000000000000..18cd6f8b1b5a
--- /dev/null
+++ b/media-video/recmpeg/Manifest
@@ -0,0 +1 @@
+DIST recmpeg-1.0.5.tar.gz 56561 SHA256 907a8a27a3cb36925828fa156e7e5a2b3340400cdda20cb383a0923e3c87bcbb
diff --git a/media-video/recmpeg/metadata.xml b/media-video/recmpeg/metadata.xml
new file mode 100644
index 000000000000..2fbced3903fb
--- /dev/null
+++ b/media-video/recmpeg/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">fame</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/recmpeg/recmpeg-1.0.5.ebuild b/media-video/recmpeg/recmpeg-1.0.5.ebuild
new file mode 100644
index 000000000000..8bf95f441bc6
--- /dev/null
+++ b/media-video/recmpeg/recmpeg-1.0.5.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Simple libfame-based video encoder which compresses raw video sequences to MPEG video"
+HOMEPAGE="http://fame.sourceforge.net/"
+SRC_URI="mirror://sourceforge/fame/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~ppc x86"
+IUSE="cpu_flags_x86_mmx cpu_flags_x86_sse"
+
+DEPEND=">=media-libs/libfame-0.9.0"
+
+src_compile() {
+ local myconf
+
+ use cpu_flags_x86_mmx && myconf="${myconf} --enable-mmx"
+ use cpu_flags_x86_sse && myconf="${myconf} --enable-sse"
+
+ econf ${myconf} || die "econf failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ einstall install || die "einstall died"
+ dodoc CHANGES README NEWS
+}
diff --git a/media-video/recordmydesktop/Manifest b/media-video/recordmydesktop/Manifest
new file mode 100644
index 000000000000..fe0530386b5d
--- /dev/null
+++ b/media-video/recordmydesktop/Manifest
@@ -0,0 +1 @@
+DIST recordmydesktop-0.3.8.1.tar.gz 198732 SHA256 33a2e208186ae78e2db2a27b0f5047b50fb7819c47fe15483b0765200b9d738c
diff --git a/media-video/recordmydesktop/files/0.3.8.1-fix-libjack-check.patch b/media-video/recordmydesktop/files/0.3.8.1-fix-libjack-check.patch
new file mode 100644
index 000000000000..cb8a3b473484
--- /dev/null
+++ b/media-video/recordmydesktop/files/0.3.8.1-fix-libjack-check.patch
@@ -0,0 +1,14 @@
+--- trunk/recordmydesktop/configure.ac 2008/12/13 17:46:41 584
++++ trunk/recordmydesktop/configure.ac 2009/01/10 11:35:06 587
+@@ -95,7 +95,10 @@
+ AC_MSG_ERROR([Can't find libpthread]))
+
+ if test x$jack = xtrue ; then
+-AC_CHECK_LIB([jack],[jack_activate],jack_lib_found=true,)
++AC_CHECK_LIB([jack],[jack_activate],
++ [LIBS="$LIBS -ljack"
++ AC_DEFINE([HAVE_LIBJACK], [1], [Define to 1 if you have libjack.])
++ jack_lib_found=true])
+ fi
+
+ if test x$oss = xfalse; then
diff --git a/media-video/recordmydesktop/files/0.3.8.1-fix_new_theora.patch b/media-video/recordmydesktop/files/0.3.8.1-fix_new_theora.patch
new file mode 100644
index 000000000000..dfa829778963
--- /dev/null
+++ b/media-video/recordmydesktop/files/0.3.8.1-fix_new_theora.patch
@@ -0,0 +1,48 @@
+--- recordmydesktop-0.3.8.1.old/src/rmd_initialize_data.c 2009-11-25 10:05:58.708779029 -0500
++++ recordmydesktop-0.3.8.1.old/src/rmd_initialize_data.c 2009-11-25 09:28:07.629507987 -0500
+@@ -224,7 +224,7 @@
+ args->channels = 1;
+ args->frequency = 22050;
+ args->buffsize = 4096;
+- args->v_bitrate = 45000;
++ args->v_bitrate = 0;
+ args->v_quality = 63;
+ args->s_quality = 10;
+
+--- recordmydesktop-0.3.8.1.old/src/rmd_parseargs.c 2009-11-25 10:06:07.409777969 -0500
++++ recordmydesktop-0.3.8.1.old/src/rmd_parseargs.c 2009-11-25 09:39:32.786757292 -0500
+@@ -104,10 +104,10 @@
+ "Encoding Options\n"
+ "\t--on-the-fly-encoding\tEncode the audio-video data, while recording.\n"
+ "\t--v_quality n\t\tA number from 0 to 63 for"
+- " desired encoded video quality(default 63).\n"
++ " desired encoded video quality(default 63).\n\t (set quality to zero for bitrate controlled usage)\n"
+
+- "\t--v_bitrate n\t\tA number from 45000 to 2000000"
+- " for desired encoded video bitrate(default 45000).\n"
++ "\t--v_bitrate n\t\tA number from 0 to 200000000"
++ " for desired encoded video bitrate(default 0 = not rate controlled).\n"
+
+ "\t--s_quality n\t\tDesired audio quality(-1 to 10).\n\n"
+
+@@ -327,17 +327,17 @@
+ strcmp(argv[i], "-v_bitrate") == 0) {
+ if(i+1<argc){
+ int num=atoi(argv[i+1]);
+- if((num>=45000)&&(num<=2000000))
++ if((num>=0)&&(num<=200000000))
+ arg_return->v_bitrate=num;
+ else{
+ fprintf(stderr,"Argument Usage:"
+- " --v_bitrate n(number 45000-2000000)\n");
++ " --v_bitrate n(number 0-200000000)\n");
+ return FALSE;
+ }
+ }
+ else{
+ fprintf(stderr,"Argument Usage:"
+- " --v_bitrate n(number 45000-2000000)\n");
++ " --v_bitrate n(number 0-200000000)\n");
+ return FALSE;
+ }
+ i++;
diff --git a/media-video/recordmydesktop/metadata.xml b/media-video/recordmydesktop/metadata.xml
new file mode 100644
index 000000000000..7856fb20cfe0
--- /dev/null
+++ b/media-video/recordmydesktop/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">recordmydesktop</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/recordmydesktop/recordmydesktop-0.3.8.1-r4.ebuild b/media-video/recordmydesktop/recordmydesktop-0.3.8.1-r4.ebuild
new file mode 100644
index 000000000000..54c31b7da8f5
--- /dev/null
+++ b/media-video/recordmydesktop/recordmydesktop-0.3.8.1-r4.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit eutils autotools
+
+DESCRIPTION="A desktop session recorder producing Ogg video/audio files"
+HOMEPAGE="http://recordmydesktop.sourceforge.net/"
+SRC_URI="mirror://sourceforge/recordmydesktop/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86"
+IUSE="alsa jack"
+
+RDEPEND="sys-libs/zlib
+ x11-libs/libXext
+ x11-libs/libXfixes
+ x11-libs/libXdamage
+ media-libs/libvorbis
+ media-libs/libogg
+ media-libs/libtheora[encode]
+ x11-libs/libICE
+ x11-libs/libSM
+ alsa? ( media-libs/alsa-lib )
+ jack? ( media-sound/jack-audio-connection-kit )"
+DEPEND="${RDEPEND}
+ x11-proto/xextproto"
+
+src_prepare() {
+ if has_version ">=x11-proto/xextproto-7.1.1"; then
+ sed -i \
+ -e 's:shmstr.h:shmproto.h:g' \
+ src/rmd_{getzpixmap.c,update_image.c} || die
+ fi
+
+ # fix weird Framerates with new libtheora
+ epatch "${FILESDIR}/${PV}-fix_new_theora.patch"
+
+ # fix check for jack support
+ epatch "${FILESDIR}/${PV}-fix-libjack-check.patch"
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --enable-dependency-tracking \
+ $(use_enable !alsa oss) \
+ $(use_enable jack)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS ChangeLog README || die
+}
diff --git a/media-video/replex/Manifest b/media-video/replex/Manifest
new file mode 100644
index 000000000000..574f35ddcfc2
--- /dev/null
+++ b/media-video/replex/Manifest
@@ -0,0 +1,2 @@
+DIST replex-0.1.4.tar.gz 43292 RMD160 4fc8b1e19ca9dd0b362eeac57a797d76b556b250 SHA1 9d381da25aac0406791e290bff3f27b78ec034ed SHA256 7539079ec824a0795d845918bf61c2465803a6c3da870ca745e3406333eec08c
+DIST replex-0.1.6.8.tar.gz 49587 RMD160 9b29af523b82e008981169497956e5a590d5c268 SHA1 594a5195d65059f26203ac25ad2f332d3c34c1ae SHA256 68718d6671570815e8576b6e0b595195f5cea435194209ee5528721cb8737b63
diff --git a/media-video/replex/metadata.xml b/media-video/replex/metadata.xml
new file mode 100644
index 000000000000..edccfe5754d2
--- /dev/null
+++ b/media-video/replex/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>video</herd>
+<maintainer>
+<email>media-video@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/media-video/replex/replex-0.1.4.ebuild b/media-video/replex/replex-0.1.4.ebuild
new file mode 100644
index 000000000000..830269ad6d40
--- /dev/null
+++ b/media-video/replex/replex-0.1.4.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+DESCRIPTION="REPLEX remuxes MPEG-2 transport streams into program streams"
+HOMEPAGE="http://www.metzlerbros.org/dvb/"
+SRC_URI="http://www.metzlerbros.org/dvb/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~x86"
+IUSE=""
+
+src_compile() {
+ emake CFLAGS="${CFLAGS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE" || die "emake failed"
+}
+
+src_install() {
+ dobin replex
+ dodoc README CHANGES TODO
+}
diff --git a/media-video/replex/replex-0.1.6.8.ebuild b/media-video/replex/replex-0.1.6.8.ebuild
new file mode 100644
index 000000000000..8faadd90999a
--- /dev/null
+++ b/media-video/replex/replex-0.1.6.8.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="REPLEX remuxes MPEG-2 transport streams into program streams"
+HOMEPAGE="http://www.metzlerbros.org/dvb/"
+SRC_URI="http://www.metzlerbros.org/dvb/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+src_compile() {
+ tc-export CC
+ emake CFLAGS="${CFLAGS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DVERSION=\\\"${PV}\\\"" LDFLAGS="${LDFLAGS}"|| die "emake failed"
+}
+
+src_install() {
+ dobin replex
+ dodoc README CHANGES TODO
+}
diff --git a/media-video/rovclock/Manifest b/media-video/rovclock/Manifest
new file mode 100644
index 000000000000..6f5ba3402d61
--- /dev/null
+++ b/media-video/rovclock/Manifest
@@ -0,0 +1 @@
+DIST rovclock-0.6e.tar.bz2 29648 SHA256 f2601b3a823752d51cf27b25c8b57efb66e1295848877c962f0c680430e200f7
diff --git a/media-video/rovclock/files/rovclock-0.6e-ldflags.patch b/media-video/rovclock/files/rovclock-0.6e-ldflags.patch
new file mode 100644
index 000000000000..ad7e809b0fcd
--- /dev/null
+++ b/media-video/rovclock/files/rovclock-0.6e-ldflags.patch
@@ -0,0 +1,13 @@
+diff --git a/Makefile b/Makefile
+index 7d2a21e..5912f71 100644
+--- a/Makefile
++++ b/Makefile
+@@ -13,7 +13,7 @@ CFLAGS = -O2 -Wall -Wstrict-prototypes $(DEFS)
+ all: $(PROG)
+
+ $(PROG): $(SRCS)
+- $(CC) $(CFLAGS) -o $@ $^
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
+
+ $(SRCS): $(HDRS)
+
diff --git a/media-video/rovclock/metadata.xml b/media-video/rovclock/metadata.xml
new file mode 100644
index 000000000000..e2f79fad9901
--- /dev/null
+++ b/media-video/rovclock/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>proxy-maintainers</herd>
+<maintainer>
+ <email>se.witt@gmx.net</email>
+ <name>Sebastian Witt</name>
+</maintainer>
+<maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/media-video/rovclock/rovclock-0.6e.ebuild b/media-video/rovclock/rovclock-0.6e.ebuild
new file mode 100644
index 000000000000..e2f212758d26
--- /dev/null
+++ b/media-video/rovclock/rovclock-0.6e.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+inherit toolchain-funcs eutils
+
+DESCRIPTION="Overclocking utility for ATI Radeon cards"
+HOMEPAGE="http://www.hasw.net/linux/"
+SRC_URI="http://www.hasw.net/linux/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-ldflags.patch
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" || die "emake failed"
+}
+
+src_install() {
+ dosbin rovclock || die "dosbin failed"
+ dodoc ChangeLog README
+}
diff --git a/media-video/rtmpdump/Manifest b/media-video/rtmpdump/Manifest
new file mode 100644
index 000000000000..b4b21a60f340
--- /dev/null
+++ b/media-video/rtmpdump/Manifest
@@ -0,0 +1 @@
+DIST rtmpdump-2.4_p20131018.tar.gz 142707 SHA256 57164e0c12f7cbff8e40b1e66cf6b889086387324851a115b427b8d2b3fff267 SHA512 78c2da880ece43af1d4257a14a22d95e9f1b9f474d85f97e879d9cfd2232c5a7f1c1a41fbb1af7e047700214a993eb33965dba41573389d5eebefd3f01a780fc WHIRLPOOL 80a8e9ed9eeca4ddab8c44ae6e937f0d271311e8f5ce74bb0b49fff69edc4bd302f257366f33cceb8ae089fabdd7ff2533937a833e79fcb575e3cf43c592327a
diff --git a/media-video/rtmpdump/metadata.xml b/media-video/rtmpdump/metadata.xml
new file mode 100644
index 000000000000..8d4ecfc68e33
--- /dev/null
+++ b/media-video/rtmpdump/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>hwoarang@gentoo.org</email>
+<name>Markos Chandras</name>
+</maintainer>
+<use>
+ <flag name='gnutls'>Use GnuTLS library instead of the default OpenSSL</flag>
+ <flag name='polarssl'>Use PolarSSL library instead of the default OpenSSL</flag>
+</use>
+<longdescription lang="en">
+</longdescription>
+</pkgmetadata>
+
diff --git a/media-video/rtmpdump/rtmpdump-2.4_p20131018.ebuild b/media-video/rtmpdump/rtmpdump-2.4_p20131018.ebuild
new file mode 100644
index 000000000000..71f1da1fa48b
--- /dev/null
+++ b/media-video/rtmpdump/rtmpdump-2.4_p20131018.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit multilib toolchain-funcs multilib-minimal
+
+DESCRIPTION="Open source command-line RTMP client intended to stream audio or video flash content"
+HOMEPAGE="http://rtmpdump.mplayerhq.hu/"
+SRC_URI="http://dev.gentoo.org/~hwoarang/distfiles/${P}.tar.gz"
+
+# the library is LGPL-2.1, the command is GPL-2
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ~arm hppa ~mips ppc ppc64 x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="gnutls polarssl ssl"
+
+DEPEND="ssl? (
+ gnutls? ( >=net-libs/gnutls-2.12.23-r6[${MULTILIB_USEDEP}] )
+ polarssl? ( !gnutls? ( >=net-libs/polarssl-1.3.4[${MULTILIB_USEDEP}] ) )
+ !gnutls? ( !polarssl? ( >=dev-libs/openssl-1.0.1h-r2[${MULTILIB_USEDEP}] ) )
+ >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+ )"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ if ! use ssl && { use gnutls || use polarssl; }; then
+ ewarn "USE='gnutls polarssl' are ignored without USE='ssl'."
+ ewarn "Please review the local USE flags for this package."
+ fi
+}
+
+src_unpack() {
+ mkdir -p "${S}" || die "Can't create source directory"
+ cd "${S}" || die
+ unpack ${A}
+}
+
+src_prepare() {
+ # fix Makefile ( bug #298535 , bug #318353 and bug #324513 )
+ sed -i 's/\$(MAKEFLAGS)//g' Makefile \
+ || die "failed to fix Makefile"
+ sed -i -e 's:OPT=:&-fPIC :' \
+ -e 's:OPT:OPTS:' \
+ -e 's:CFLAGS=.*:& $(OPT):' librtmp/Makefile \
+ || die "failed to fix Makefile"
+ multilib_copy_sources
+}
+
+multilib_src_compile() {
+ if use ssl ; then
+ if use gnutls ; then
+ crypto="GNUTLS"
+ elif use polarssl ; then
+ crypto="POLARSSL"
+ else
+ crypto="OPENSSL"
+ fi
+ fi
+ #fix multilib-script support. Bug #327449
+ sed -i "/^libdir/s:lib$:$(get_libdir)$:" librtmp/Makefile || die
+ if ! multilib_is_native_abi; then
+ cd librtmp || die
+ fi
+ emake CC="$(tc-getCC)" LD="$(tc-getLD)" \
+ OPT="${CFLAGS}" XLDFLAGS="${LDFLAGS}" CRYPTO="${crypto}" SYS=posix
+}
+
+multilib_src_install() {
+ mkdir -p "${ED}"/${DESTTREE}/$(get_libdir) || die
+ if multilib_is_native_abi; then
+ dodoc README ChangeLog rtmpdump.1.html rtmpgw.8.html
+ else
+ cd librtmp || die
+ fi
+ emake DESTDIR="${ED}" prefix="${DESTTREE}" mandir="${DESTTREE}/share/man" \
+ CRYPTO="${crypto}" install
+}
diff --git a/media-video/rtmpdump/rtmpdump-9999.ebuild b/media-video/rtmpdump/rtmpdump-9999.ebuild
new file mode 100644
index 000000000000..ccc1198afaf7
--- /dev/null
+++ b/media-video/rtmpdump/rtmpdump-9999.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit git-2 multilib toolchain-funcs multilib-minimal
+
+DESCRIPTION="Open source command-line RTMP client intended to stream audio or video flash content"
+HOMEPAGE="http://rtmpdump.mplayerhq.hu/"
+EGIT_REPO_URI="git://git.ffmpeg.org/rtmpdump"
+
+# the library is LGPL-2.1, the command is GPL-2
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS=""
+IUSE="gnutls polarssl ssl"
+
+DEPEND="ssl? (
+ gnutls? ( >=net-libs/gnutls-2.12.23-r6[${MULTILIB_USEDEP}] )
+ polarssl? ( !gnutls? ( >=net-libs/polarssl-1.3.4[${MULTILIB_USEDEP}] ) )
+ !gnutls? ( !polarssl? ( >=dev-libs/openssl-1.0.1h-r2[${MULTILIB_USEDEP}] ) )
+ >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+ )"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ if ! use ssl && { use gnutls || use polarssl; }; then
+ ewarn "USE='gnutls polarssl' are ignored without USE='ssl'."
+ ewarn "Please review the local USE flags for this package."
+ fi
+}
+
+src_prepare() {
+ # fix Makefile ( bug #298535 , bug #318353 and bug #324513 )
+ sed -i 's/\$(MAKEFLAGS)//g' Makefile \
+ || die "failed to fix Makefile"
+ sed -i -e 's:OPT=:&-fPIC :' \
+ -e 's:OPT:OPTS:' \
+ -e 's:CFLAGS=.*:& $(OPT):' librtmp/Makefile \
+ || die "failed to fix Makefile"
+ multilib_copy_sources
+}
+
+multilib_src_compile() {
+ if use ssl ; then
+ if use gnutls ; then
+ crypto="GNUTLS"
+ elif use polarssl ; then
+ crypto="POLARSSL"
+ else
+ crypto="OPENSSL"
+ fi
+ fi
+ #fix multilib-script support. Bug #327449
+ sed -i "/^libdir/s:lib$:$(get_libdir)$:" librtmp/Makefile || die
+ if ! multilib_is_native_abi; then
+ cd librtmp || die
+ fi
+ emake CC="$(tc-getCC)" LD="$(tc-getLD)" \
+ OPT="${CFLAGS}" XLDFLAGS="${LDFLAGS}" CRYPTO="${crypto}" SYS=posix
+}
+
+multilib_src_install() {
+ mkdir -p "${ED}"/${DESTTREE}/$(get_libdir) || die
+ if multilib_is_native_abi; then
+ dodoc README ChangeLog rtmpdump.1.html rtmpgw.8.html
+ else
+ cd librtmp || die
+ fi
+ emake DESTDIR="${ED}" prefix="${DESTTREE}" mandir="${DESTTREE}/share/man" \
+ CRYPTO="${crypto}" install
+}
diff --git a/media-video/setpwc/Manifest b/media-video/setpwc/Manifest
new file mode 100644
index 000000000000..60877e539935
--- /dev/null
+++ b/media-video/setpwc/Manifest
@@ -0,0 +1 @@
+DIST setpwc-1.3.tgz 9681 SHA256 4d32d4d54d584cd42aaf52dfa1ba874122e825ad39e4493d45f89b85de4e95cf
diff --git a/media-video/setpwc/metadata.xml b/media-video/setpwc/metadata.xml
new file mode 100644
index 000000000000..d9df1878d8e2
--- /dev/null
+++ b/media-video/setpwc/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>video</herd>
+</pkgmetadata>
diff --git a/media-video/setpwc/setpwc-1.3.ebuild b/media-video/setpwc/setpwc-1.3.ebuild
new file mode 100644
index 000000000000..2587b090068f
--- /dev/null
+++ b/media-video/setpwc/setpwc-1.3.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit toolchain-funcs
+
+DESCRIPTION="Control various aspects of Philips (and compatible) webcams"
+HOMEPAGE="http://www.vanheusden.com/setpwc/"
+SRC_URI="http://www.vanheusden.com/setpwc/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ppc x86"
+IUSE=""
+
+RDEPEND=""
+DEPEND="sys-kernel/linux-headers"
+
+src_prepare() {
+ sed -i -e '/CFLAGS/s: -O2::' Makefile || die
+}
+
+src_compile() {
+ tc-export CC
+ emake LDFLAGS="${LDFLAGS}"
+}
+
+src_install() {
+ dobin setpwc
+ dodoc readme.txt
+ doman setpwc.1
+}
diff --git a/media-video/shrip/Manifest b/media-video/shrip/Manifest
new file mode 100644
index 000000000000..4dbbf54c943c
--- /dev/null
+++ b/media-video/shrip/Manifest
@@ -0,0 +1 @@
+DIST shrip-0.6.0.tar.gz 337393 SHA256 883a8a64af61edbb8de71e4207d47d1e04c227d2a6c713de1ee5db7740e3d05f
diff --git a/media-video/shrip/metadata.xml b/media-video/shrip/metadata.xml
new file mode 100644
index 000000000000..cfdc18af1791
--- /dev/null
+++ b/media-video/shrip/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>billl@users.sf.net</email>
+ <name>Olivier Rolland</name>
+ </maintainer>
+ <longdescription lang="en">
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">ogmrip</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/shrip/shrip-0.6.0.ebuild b/media-video/shrip/shrip-0.6.0.ebuild
new file mode 100644
index 000000000000..2860224a911f
--- /dev/null
+++ b/media-video/shrip/shrip-0.6.0.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+DESCRIPTION="Command line tool for ripping DVDs and encoding to AVI/OGM/MKV/MP4"
+HOMEPAGE="http://ogmrip.sourceforge.net/"
+SRC_URI="mirror://sourceforge/ogmrip/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="nls"
+
+RDEPEND=">=dev-libs/glib-2.14:2
+ >=media-video/ogmrip-0.13.4"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ nls? ( dev-util/intltool
+ sys-devel/gettext )"
+
+src_prepare() {
+ sed -i \
+ -e '/CFLAGS/s:-Werror::' \
+ configure || die
+}
+
+src_configure() {
+ econf \
+ --disable-dependency-tracking \
+ $(use_enable nls)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS ChangeLog README TODO
+
+ insinto /etc
+ doins shrip.conf || die
+}
diff --git a/media-video/smplayer/Manifest b/media-video/smplayer/Manifest
new file mode 100644
index 000000000000..4792cbd1f4f1
--- /dev/null
+++ b/media-video/smplayer/Manifest
@@ -0,0 +1,5 @@
+DIST smplayer-14.3.0.tar.bz2 3675657 SHA256 9b8db20043d1528ee5c6054526779e88a172d2c757429bd7095c794d65ecbc18 SHA512 11ccb390b220a8cf978f9059ed04871c68d91db2a234b7d42a695e17d2bc1ff108d0696439fc148637a5af6d9189fc19cf51dad581c6f59fe84361aa49db4faa WHIRLPOOL 6702e140527c95f5dc284c29fe6e49ac16b01af8162393f20d53ca7124abc9420d20ad3e704f7da79dc5e4341f282ab0ab48389f45dc3e481d2a76f19ea32180
+DIST smplayer-14.9.0.6690.tar.bz2 3813209 SHA256 5ec8a1d2912828e9b19f800e338029e6757fc30e3974cf62a21b67f46632bc5a SHA512 68f5a1ab162e5e722a6058b7e4724201dd37212591174d7045b1cd1a9a32a4a224006a5df3bbade47d6bca951725b5b2ae7c8630cd9baa3cecc57aecb550d882 WHIRLPOOL 67504ff5c475dffdd71267cc533e21afbf27c0c8746f295aed41a276d1747025164d1d6953042b8b0eed3161fd54f668306714a4591b20b4f3946fdd6004fc84
+DIST smplayer-14.9.0.6966.tar.bz2 3848779 SHA256 b24fb478e637151215bf050d3e84f99d802de2d9e3d10588aba33626fa24a34e SHA512 a398b90cca449efaa06d4e6ad0d508b452ab23e1f9117e919eece93fb637123211ea92002969c43fe6d20673bc26eccfd4008b37adc9e726382f5eb4de5c59ec WHIRLPOOL 2c543c19af6bad68d05fa083876b6d963e83965f09e712e2962482733f0050c634437fc95cf1061f7b72a3a0c774298d3e8d16f2c45d89b078b7b7f55327ff15
+DIST smplayer-14.9.0.6994.tar.bz2 3872223 SHA256 4993f4d753f2982667e088d0f06fccd36535d8e65eff5acbef82d4cde132b301 SHA512 9e902979d1d58096424596c691e9885f10b50d1c3a0cda90387f9d59247036a66c570bb430a1441fd40e4f397757d7b3b3f089a93deabd5b6d8a02cbaf3b583c WHIRLPOOL a500aff18f93b72f4595869d9b9c57640599a3c9a8bcc31249ca502568e52f93fb059829196de1c7b5c3407cf987f199ffd568d93d23b1c11d6718f7aa4fb8ad
+DIST smplayer-14.9.0.tar.bz2 3716434 SHA256 429ad4edd6df1fcedd5ea4fa2b024eb5a61c9412f52762e9d9a9c2245b7ddf13 SHA512 78cecdad7e5f18c221a2f08a0472da01eb14db6230733616b805b6fccf2929c3f5b4dd92fd037362890a308967fa6602b89318c5376c3ce3a38d0dd9a1a17e43 WHIRLPOOL d7e621cd9ebcee450ce7aa9beaf1240c3d2f91271d2a6f043688c8688d77e8ad4761777a05ae77230966d050d647e700aa5bc8d3b566adc3fb724eaf9e315399
diff --git a/media-video/smplayer/files/smplayer-14.9.0-zero-bidi.patch b/media-video/smplayer/files/smplayer-14.9.0-zero-bidi.patch
new file mode 100644
index 000000000000..a484432f14a2
--- /dev/null
+++ b/media-video/smplayer/files/smplayer-14.9.0-zero-bidi.patch
@@ -0,0 +1,27 @@
+From 79a41ed3f12749df4a3a82f73e33aabeafa1a32f Mon Sep 17 00:00:00 2001
+From: Sebastian Pipping <sebastian@pipping.org>
+Date: Tue, 7 Oct 2014 21:15:43 +0200
+Subject: [PATCH] Support mplayer 1.x without FriBiDi support
+
+---
+ src/core.cpp | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/src/core.cpp b/src/core.cpp
+index ef6f806..f5dfceb 100644
+--- a/src/core.cpp
++++ b/src/core.cpp
+@@ -1819,10 +1819,6 @@ void Core::startMplayer( QString file, double seek ) {
+ proc->addArgument( "-ass-font-scale");
+ proc->addArgument( QString::number(mset.sub_scale_ass) );
+
+- if (!pref->mplayer_is_mplayer2) {
+- proc->addArgument( "-noflip-hebrew" ); // It seems to be necessary to display arabic subtitles correctly when using -ass
+- }
+-
+ if (!pref->force_ass_styles) {
+ // Load the styles.ass file
+ if (!QFile::exists(Paths::subtitleStyleFile())) {
+--
+2.1.1
+
diff --git a/media-video/smplayer/files/smplayer-14.9.0.6690-zero-bidi.patch b/media-video/smplayer/files/smplayer-14.9.0.6690-zero-bidi.patch
new file mode 100644
index 000000000000..650dcd79c4b4
--- /dev/null
+++ b/media-video/smplayer/files/smplayer-14.9.0.6690-zero-bidi.patch
@@ -0,0 +1,13 @@
+--- a/src/core.cpp
++++ b/src/core.cpp
+@@ -1811,10 +1811,6 @@
+
+ proc->setOption("ass-font-scale", QString::number(mset.sub_scale_ass));
+
+- if (!pref->mplayer_is_mplayer2) {
+- proc->setOption("flip-hebrew",false); // It seems to be necessary to display arabic subtitles correctly when using -ass
+- }
+-
+ if (pref->enable_ass_styles) {
+ if (!pref->force_ass_styles) {
+ // Load the styles.ass file
diff --git a/media-video/smplayer/files/smplayer-14.9.0.6966-unbundle-qtsingleapplication.patch b/media-video/smplayer/files/smplayer-14.9.0.6966-unbundle-qtsingleapplication.patch
new file mode 100644
index 000000000000..e7fca64e450e
--- /dev/null
+++ b/media-video/smplayer/files/smplayer-14.9.0.6966-unbundle-qtsingleapplication.patch
@@ -0,0 +1,15 @@
+--- smplayer-14.9.0.6966.orig/src/smplayer.pro 2015-04-18 10:11:32.000000000 +0800
++++ smplayer-14.9.0.6966/src/smplayer.pro 2015-07-01 13:18:39.283850646 +0800
+@@ -285,11 +285,7 @@
+
+ # qtsingleapplication
+ contains( DEFINES, SINGLE_INSTANCE ) {
+- INCLUDEPATH += qtsingleapplication
+- DEPENDPATH += qtsingleapplication
+-
+- SOURCES += qtsingleapplication/qtsingleapplication.cpp qtsingleapplication/qtlocalpeer.cpp
+- HEADERS += qtsingleapplication/qtsingleapplication.h qtsingleapplication/qtlocalpeer.h
++ CONFIG += qtsingleapplication
+ }
+
+ # Find subtitles dialog
diff --git a/media-video/smplayer/metadata.xml b/media-video/smplayer/metadata.xml
new file mode 100644
index 000000000000..567479d306a7
--- /dev/null
+++ b/media-video/smplayer/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>qt</herd>
+ <herd>video</herd>
+ <use>
+ <flag name="autoshutdown">
+ Enable the option to shutdown your computer after finishing the playlist.
+ This requires <pkg>dev-qt/qtdbus</pkg> as dependency.
+ </flag>
+ <flag name="mpris">Enable support for MPRIS2 (Media Player Remote
+ Interfacing Specification, version 2), a DBus interface for remote
+ control, which requires <pkg>dev-qt/qtdbus</pkg> as dependency.
+ </flag>
+ <flag name="streaming">Support for streaming video sites through
+ <pkg>net-misc/youtube-dl</pkg> (MPV only).
+ </flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">smplayer</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/smplayer/smplayer-14.3.0.ebuild b/media-video/smplayer/smplayer-14.3.0.ebuild
new file mode 100644
index 000000000000..99aeff6647d7
--- /dev/null
+++ b/media-video/smplayer/smplayer-14.3.0.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PLOCALES="ar_SY bg ca cs da de el_GR en_US es et eu fi fr gl he_IL hr hu it ja
+ka ko ku lt mk ms_MY nl pl pt pt_BR ro_RO ru_RU sk sl_SI sr sv th tr uk_UA vi_VN
+zh_CN zh_TW"
+PLOCALE_BACKUP="en_US"
+
+inherit eutils l10n qt4-r2
+
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+DESCRIPTION="Great Qt4 GUI front-end for mplayer"
+HOMEPAGE="http://smplayer.sourceforge.net/"
+LICENSE="GPL-2 BSD"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm hppa ~ppc ~ppc64 x86 ~x86-fbsd ~amd64-linux"
+IUSE="debug"
+
+DEPEND="dev-qt/qtcore:4
+ dev-qt/qtgui:4"
+COMMON_USE="libass,png,X"
+RDEPEND="${DEPEND}
+ media-video/mplayer[bidi,${COMMON_USE}]
+"
+
+src_prepare() {
+ # Upstream Makefile sucks
+ sed -i -e "/^PREFIX=/s:${EPREFIX}/usr/local:${EPREFIX}/usr:" \
+ -e "/^DOC_PATH=/s:packages/smplayer:${PF}:" \
+ -e '/\.\/get_svn_revision\.sh/,+2c\
+ cd src && $(DEFS) $(MAKE)' \
+ "${S}"/Makefile || die "sed failed"
+
+ # Turn debug message flooding off
+ if ! use debug ; then
+ sed -i 's:#\(DEFINES += NO_DEBUG_ON_CONSOLE\):\1:' \
+ "${S}"/src/smplayer.pro || die "sed failed"
+ fi
+
+ # Turn off online update checker, bug #479902
+ sed -e 's:DEFINES += UPDATE_CHECKER:#DEFINES += UPDATE_CHECKER:' \
+ -e 's:DEFINES += CHECK_UPGRADED:#DEFINES += CHECK_UPGRADED:' \
+ -i "${S}"/src/smplayer.pro || die "sed failed"
+
+ # l10n_find_plocales_changes "${S}/src/translations" "${PN}_" '.ts'
+}
+
+src_configure() {
+ cd "${S}"/src
+ echo "#define SVN_REVISION \"SVN-${MY_PV} (Gentoo)\"" > svn_revision.h
+ eqmake4
+}
+
+gen_translation() {
+ ebegin "Generating $1 translation"
+ lrelease ${PN}_${1}.ts
+ eend $? || die "failed to generate $1 translation"
+}
+
+src_compile() {
+ emake
+
+ cd "${S}"/src/translations
+ l10n_for_each_locale_do gen_translation
+}
+
+src_install() {
+ # remove unneeded copies of licenses
+ rm Copying* docs/{cs,en,hu,it,ja,pt,ru,zh_CN}/gpl.html || die
+ rm -r docs/{de,es,fr,nl,ro} || die
+
+ emake DESTDIR="${D}" install
+}
diff --git a/media-video/smplayer/smplayer-14.9.0-r1.ebuild b/media-video/smplayer/smplayer-14.9.0-r1.ebuild
new file mode 100644
index 000000000000..ce59601153aa
--- /dev/null
+++ b/media-video/smplayer/smplayer-14.9.0-r1.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PLOCALES="ar_SY bg ca cs da de el_GR en_US es et eu fi fr gl he_IL hr hu it ja
+ka ko ku lt mk ms_MY nl pl pt pt_BR ro_RO ru_RU sk sl_SI sr sv th tr uk_UA vi_VN
+zh_CN zh_TW"
+PLOCALE_BACKUP="en_US"
+
+inherit eutils l10n qt4-r2
+
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+DESCRIPTION="Great Qt4 GUI front-end for mplayer"
+HOMEPAGE="http://smplayer.sourceforge.net/"
+LICENSE="GPL-2 BSD"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm hppa ~ppc ~ppc64 x86 ~x86-fbsd ~amd64-linux"
+IUSE="autoshutdown bidi debug"
+
+DEPEND="dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ autoshutdown? ( dev-qt/qtdbus:4 )"
+COMMON_USE="libass,png,X"
+RDEPEND="${DEPEND}
+ media-video/mplayer[bidi?,${COMMON_USE}]
+"
+
+src_prepare() {
+ use bidi || epatch "${FILESDIR}"/${P}-zero-bidi.patch
+
+ # Upstream Makefile sucks
+ sed -i -e "/^PREFIX=/s:${EPREFIX}/usr/local:${EPREFIX}/usr:" \
+ -e "/^DOC_PATH=/s:packages/smplayer:${PF}:" \
+ -e '/\.\/get_svn_revision\.sh/,+2c\
+ cd src && $(DEFS) $(MAKE)' \
+ "${S}"/Makefile || die "sed failed"
+
+ # Toggle autoshutdown option which pulls in dbus, bug #524392
+ if ! use autoshutdown ; then
+ sed -e 's:DEFINES += AUTO_SHUTDOWN_PC:#DEFINES += AUTO_SHUTDOWN_PC:' \
+ -i "${S}"/src/smplayer.pro || die "sed failed"
+ fi
+
+ # Turn debug message flooding off
+ if ! use debug ; then
+ sed -i 's:#\(DEFINES += NO_DEBUG_ON_CONSOLE\):\1:' \
+ "${S}"/src/smplayer.pro || die "sed failed"
+ fi
+
+ # Turn off online update checker, bug #479902
+ sed -e 's:DEFINES += UPDATE_CHECKER:#DEFINES += UPDATE_CHECKER:' \
+ -e 's:DEFINES += CHECK_UPGRADED:#DEFINES += CHECK_UPGRADED:' \
+ -i "${S}"/src/smplayer.pro || die "sed failed"
+
+ # l10n_find_plocales_changes "${S}/src/translations" "${PN}_" '.ts'
+}
+
+src_configure() {
+ cd "${S}"/src
+ echo "#define SVN_REVISION \"SVN-${MY_PV} (Gentoo)\"" > svn_revision.h
+ eqmake4
+}
+
+gen_translation() {
+ ebegin "Generating $1 translation"
+ lrelease ${PN}_${1}.ts
+ eend $? || die "failed to generate $1 translation"
+}
+
+src_compile() {
+ emake
+
+ cd "${S}"/src/translations
+ l10n_for_each_locale_do gen_translation
+}
+
+src_install() {
+ # remove unneeded copies of licenses
+ rm Copying* docs/{cs,en,hu,it,ja,pt,ru,zh_CN}/gpl.html || die
+ rm -r docs/{de,es,fr,nl,ro} || die
+
+ emake DESTDIR="${D}" install
+}
diff --git a/media-video/smplayer/smplayer-14.9.0.6690-r3.ebuild b/media-video/smplayer/smplayer-14.9.0.6690-r3.ebuild
new file mode 100644
index 000000000000..f878290386f2
--- /dev/null
+++ b/media-video/smplayer/smplayer-14.9.0.6690-r3.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PLOCALES="ar ar_SY bg ca cs da de el_GR en_GB en_US es et eu fi fr gl he_IL hr
+hu it ja ka ko ku lt mk ms_MY nl pl pt pt_BR ro_RO ru_RU sk sl_SI sq_AL sr sv
+th tr uk_UA vi_VN zh_CN zh_TW"
+PLOCALE_BACKUP="en_US"
+inherit eutils l10n qmake-utils
+
+DESCRIPTION="Great Qt GUI front-end for mplayer/mpv"
+HOMEPAGE="http://smplayer.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2 BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ppc64 ~x86 ~x86-fbsd ~amd64-linux"
+IUSE="autoshutdown bidi debug qt4 qt5 streaming"
+REQUIRED_USE="^^ ( qt4 qt5 )"
+
+DEPEND="
+ qt4? ( dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ autoshutdown? ( dev-qt/qtdbus:4 )
+ streaming? ( dev-qt/qtcore:4[ssl] ) )
+ qt5? ( dev-qt/linguist-tools:5
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtwidgets:5
+ dev-qt/qtxml:5
+ autoshutdown? ( dev-qt/qtdbus:5 )
+ streaming? ( dev-qt/qtnetwork:5[ssl]
+ dev-qt/qtscript:5 ) )"
+RDEPEND="${DEPEND}
+ || ( media-video/mplayer[bidi?,libass,png,X]
+ ( >=media-video/mpv-0.6.2[libass,X]
+ streaming? ( >=net-misc/youtube-dl-2014.11.26 ) ) )"
+
+src_prepare() {
+ use bidi || epatch "${FILESDIR}"/${P}-zero-bidi.patch
+
+ # Upstream Makefile sucks
+ sed -i -e "/^PREFIX=/s:${EPREFIX}/usr/local:${EPREFIX}/usr:" \
+ -e "/^DOC_PATH=/s:packages/smplayer:${PF}:" \
+ -e '/\.\/get_svn_revision\.sh/,+2c\
+ cd src && $(DEFS) $(MAKE)' \
+ "${S}"/Makefile || die "sed failed"
+
+ # Toggle autoshutdown option which pulls in dbus, bug #524392
+ if ! use autoshutdown ; then
+ sed -e 's:DEFINES += AUTO_SHUTDOWN_PC:#DEFINES += AUTO_SHUTDOWN_PC:' \
+ -i "${S}"/src/smplayer.pro || die "sed failed"
+ fi
+
+ # Turn debug message flooding off
+ if ! use debug ; then
+ sed -i 's:#\(DEFINES += NO_DEBUG_ON_CONSOLE\):\1:' \
+ "${S}"/src/smplayer.pro || die "sed failed"
+ fi
+
+ # Turn off online update checker, bug #479902
+ sed -e 's:DEFINES += UPDATE_CHECKER:#DEFINES += UPDATE_CHECKER:' \
+ -e 's:DEFINES += CHECK_UPGRADED:#DEFINES += CHECK_UPGRADED:' \
+ -i "${S}"/src/smplayer.pro || die "sed failed"
+
+ # Turn off youtube support (which pulls in extra dependencies) if unwanted
+ if ! use streaming ; then
+ sed -e 's:DEFINES += YOUTUBE_SUPPORT:#DEFINES += YOUTUBE_SUPPORT:' \
+ -i "${S}"/src/smplayer.pro || die "sed failed"
+ fi
+
+ # l10n_find_plocales_changes "${S}/src/translations" "${PN}_" '.ts'
+}
+
+src_configure() {
+ cd "${S}"/src
+ echo "#define SVN_REVISION \"${PV} (Gentoo)\"" > svn_revision.h
+ use qt4 && eqmake4
+ use qt5 && eqmake5
+}
+
+gen_translation() {
+ local mydir
+ if use qt4; then
+ mydir="$(qt4_get_bindir)"
+ elif use qt5; then
+ mydir="$(qt5_get_bindir)"
+ fi
+ ebegin "Generating $1 translation"
+ "${mydir}"/lrelease ${PN}_${1}.ts
+ eend $? || die "failed to generate $1 translation"
+}
+
+src_compile() {
+ emake
+
+ cd "${S}"/src/translations
+ l10n_for_each_locale_do gen_translation
+}
+
+src_install() {
+ # remove unneeded copies of licenses
+ rm Copying* docs/{cs,en,hu,it,ja,pt,ru,zh_CN}/gpl.html || die
+ rm -r docs/{de,es,fr,nl,ro} || die
+
+ emake DESTDIR="${D}" install
+}
diff --git a/media-video/smplayer/smplayer-14.9.0.6966-r2.ebuild b/media-video/smplayer/smplayer-14.9.0.6966-r2.ebuild
new file mode 100644
index 000000000000..d548b685f41c
--- /dev/null
+++ b/media-video/smplayer/smplayer-14.9.0.6966-r2.ebuild
@@ -0,0 +1,120 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PLOCALES="ar ar_SY bg ca cs da de el_GR en_GB en_US es et eu fi fr gl he_IL hr
+hu id it ja ka ko ku lt mk ms_MY nl nn_NO pl pt pt_BR ro_RO ru_RU sk sl_SI sq_AL
+sr sv th tr uk_UA vi_VN zh_CN zh_TW"
+PLOCALE_BACKUP="en_US"
+inherit eutils l10n qmake-utils
+
+DESCRIPTION="Great Qt GUI front-end for mplayer/mpv"
+HOMEPAGE="http://smplayer.info/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2 BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ppc64 ~x86 ~x86-fbsd ~amd64-linux"
+IUSE="autoshutdown bidi debug mpris +qt4 qt5 streaming"
+REQUIRED_USE="^^ ( qt4 qt5 )"
+
+DEPEND="
+ qt4? ( dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ dev-qt/qtsingleapplication[X,qt4]
+ autoshutdown? ( dev-qt/qtdbus:4 )
+ mpris? ( dev-qt/qtdbus:4 )
+ streaming? ( dev-qt/qtcore:4[ssl] ) )
+ qt5? ( dev-qt/linguist-tools:5
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtnetwork:5
+ >=dev-qt/qtsingleapplication-2.6.1_p20150629[X,qt5]
+ dev-qt/qtwidgets:5
+ dev-qt/qtxml:5
+ autoshutdown? ( dev-qt/qtdbus:5 )
+ mpris? ( dev-qt/qtdbus:5 )
+ streaming? ( dev-qt/qtnetwork:5[ssl]
+ dev-qt/qtscript:5 ) )"
+RDEPEND="${DEPEND}
+ || ( media-video/mplayer[bidi?,libass,png,X]
+ ( >=media-video/mpv-0.6.2[libass,X]
+ streaming? ( >=net-misc/youtube-dl-2014.11.26 ) ) )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-unbundle-qtsingleapplication.patch # bug 487544
+ use bidi || epatch "${FILESDIR}"/${PN}-14.9.0.6690-zero-bidi.patch
+
+ # Upstream Makefile sucks
+ sed -i -e "/^PREFIX=/s:${EPREFIX}/usr/local:${EPREFIX}/usr:" \
+ -e "/^DOC_PATH=/s:packages/smplayer:${PF}:" \
+ -e '/\.\/get_svn_revision\.sh/,+2c\
+ cd src && $(DEFS) $(MAKE)' \
+ "${S}"/Makefile || die "sed failed"
+
+ # Toggle autoshutdown option which pulls in dbus, bug #524392
+ if ! use autoshutdown ; then
+ sed -e 's:DEFINES += AUTO_SHUTDOWN_PC:#DEFINES += AUTO_SHUTDOWN_PC:' \
+ -i "${S}"/src/smplayer.pro || die "sed failed"
+ fi
+
+ # Turn debug message flooding off
+ if ! use debug ; then
+ sed -i 's:#\(DEFINES += NO_DEBUG_ON_CONSOLE\):\1:' \
+ "${S}"/src/smplayer.pro || die "sed failed"
+ fi
+
+ # MPRIS2 pulls in dbus, bug #553710
+ if ! use mpris ; then
+ sed -e 's:DEFINES += MPRIS2:#DEFINES += MPRIS2:' \
+ -i "${S}"/src/smplayer.pro || die "sed failed"
+ fi
+
+ # Turn off online update checker, bug #479902
+ sed -e 's:DEFINES += UPDATE_CHECKER:#DEFINES += UPDATE_CHECKER:' \
+ -e 's:DEFINES += CHECK_UPGRADED:#DEFINES += CHECK_UPGRADED:' \
+ -i "${S}"/src/smplayer.pro || die "sed failed"
+
+ # Turn off youtube support (which pulls in extra dependencies) if unwanted
+ if ! use streaming ; then
+ sed -e 's:DEFINES += YOUTUBE_SUPPORT:#DEFINES += YOUTUBE_SUPPORT:' \
+ -i "${S}"/src/smplayer.pro || die "sed failed"
+ fi
+
+ l10n_find_plocales_changes "${S}/src/translations" "${PN}_" '.ts'
+}
+
+src_configure() {
+ cd "${S}"/src
+ echo "#define SVN_REVISION \"${PV} (Gentoo)\"" > svn_revision.h
+ use qt4 && eqmake4
+ use qt5 && eqmake5
+}
+
+gen_translation() {
+ local mydir
+ if use qt4; then
+ mydir="$(qt4_get_bindir)"
+ elif use qt5; then
+ mydir="$(qt5_get_bindir)"
+ fi
+ ebegin "Generating $1 translation"
+ "${mydir}"/lrelease ${PN}_${1}.ts
+ eend $? || die "failed to generate $1 translation"
+}
+
+src_compile() {
+ emake
+
+ cd "${S}"/src/translations
+ l10n_for_each_locale_do gen_translation
+}
+
+src_install() {
+ # remove unneeded copies of licenses
+ rm Copying* docs/{cs,en,hu,it,ja,pt,ru,zh_CN}/gpl.html || die
+ rm -r docs/{de,es,fr,nl,ro} || die
+
+ emake DESTDIR="${D}" install
+}
diff --git a/media-video/smplayer/smplayer-14.9.0.6994.ebuild b/media-video/smplayer/smplayer-14.9.0.6994.ebuild
new file mode 100644
index 000000000000..966f0c70e2f1
--- /dev/null
+++ b/media-video/smplayer/smplayer-14.9.0.6994.ebuild
@@ -0,0 +1,120 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PLOCALES="ar ar_SY bg ca cs da de el_GR en_GB en_US es et eu fi fr gl he_IL hr
+hu id it ja ka ko ku lt mk ms_MY nl nn_NO pl pt pt_BR ro_RO ru_RU sk sl_SI sq_AL
+sr sv th tr uk_UA vi_VN zh_CN zh_TW"
+PLOCALE_BACKUP="en_US"
+inherit eutils l10n qmake-utils
+
+DESCRIPTION="Great Qt GUI front-end for mplayer/mpv"
+HOMEPAGE="http://smplayer.info/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2 BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ppc64 ~x86 ~x86-fbsd ~amd64-linux"
+IUSE="autoshutdown bidi debug mpris +qt4 qt5 streaming"
+REQUIRED_USE="^^ ( qt4 qt5 )"
+
+DEPEND="
+ qt4? ( dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ dev-qt/qtsingleapplication[X,qt4]
+ autoshutdown? ( dev-qt/qtdbus:4 )
+ mpris? ( dev-qt/qtdbus:4 )
+ streaming? ( dev-qt/qtcore:4[ssl] ) )
+ qt5? ( dev-qt/linguist-tools:5
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtnetwork:5
+ >=dev-qt/qtsingleapplication-2.6.1_p20150629[X,qt5]
+ dev-qt/qtwidgets:5
+ dev-qt/qtxml:5
+ autoshutdown? ( dev-qt/qtdbus:5 )
+ mpris? ( dev-qt/qtdbus:5 )
+ streaming? ( dev-qt/qtnetwork:5[ssl]
+ dev-qt/qtscript:5 ) )"
+RDEPEND="${DEPEND}
+ || ( media-video/mplayer[bidi?,libass,png,X]
+ ( >=media-video/mpv-0.6.2[libass,X]
+ streaming? ( >=net-misc/youtube-dl-2014.11.26 ) ) )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-14.9.0.6966-unbundle-qtsingleapplication.patch # bug 487544
+ use bidi || epatch "${FILESDIR}"/${PN}-14.9.0.6690-zero-bidi.patch
+
+ # Upstream Makefile sucks
+ sed -i -e "/^PREFIX=/s:${EPREFIX}/usr/local:${EPREFIX}/usr:" \
+ -e "/^DOC_PATH=/s:packages/smplayer:${PF}:" \
+ -e '/\.\/get_svn_revision\.sh/,+2c\
+ cd src && $(DEFS) $(MAKE)' \
+ "${S}"/Makefile || die "sed failed"
+
+ # Toggle autoshutdown option which pulls in dbus, bug #524392
+ if ! use autoshutdown ; then
+ sed -e 's:DEFINES += AUTO_SHUTDOWN_PC:#DEFINES += AUTO_SHUTDOWN_PC:' \
+ -i "${S}"/src/smplayer.pro || die "sed failed"
+ fi
+
+ # Turn debug message flooding off
+ if ! use debug ; then
+ sed -i 's:#\(DEFINES += NO_DEBUG_ON_CONSOLE\):\1:' \
+ "${S}"/src/smplayer.pro || die "sed failed"
+ fi
+
+ # MPRIS2 pulls in dbus, bug #553710
+ if ! use mpris ; then
+ sed -e 's:DEFINES += MPRIS2:#DEFINES += MPRIS2:' \
+ -i "${S}"/src/smplayer.pro || die "sed failed"
+ fi
+
+ # Turn off online update checker, bug #479902
+ sed -e 's:DEFINES += UPDATE_CHECKER:#DEFINES += UPDATE_CHECKER:' \
+ -e 's:DEFINES += CHECK_UPGRADED:#DEFINES += CHECK_UPGRADED:' \
+ -i "${S}"/src/smplayer.pro || die "sed failed"
+
+ # Turn off youtube support (which pulls in extra dependencies) if unwanted
+ if ! use streaming ; then
+ sed -e 's:DEFINES += YOUTUBE_SUPPORT:#DEFINES += YOUTUBE_SUPPORT:' \
+ -i "${S}"/src/smplayer.pro || die "sed failed"
+ fi
+
+ l10n_find_plocales_changes "${S}/src/translations" "${PN}_" '.ts'
+}
+
+src_configure() {
+ cd "${S}"/src
+ echo "#define SVN_REVISION \"${PV} (Gentoo)\"" > svn_revision.h
+ use qt4 && eqmake4
+ use qt5 && eqmake5
+}
+
+gen_translation() {
+ local mydir
+ if use qt4; then
+ mydir="$(qt4_get_bindir)"
+ elif use qt5; then
+ mydir="$(qt5_get_bindir)"
+ fi
+ ebegin "Generating $1 translation"
+ "${mydir}"/lrelease ${PN}_${1}.ts
+ eend $? || die "failed to generate $1 translation"
+}
+
+src_compile() {
+ emake
+
+ cd "${S}"/src/translations
+ l10n_for_each_locale_do gen_translation
+}
+
+src_install() {
+ # remove unneeded copies of licenses
+ rm Copying* docs/{cs,en,hu,it,ja,pt,ru,zh_CN}/gpl.html || die
+ rm -r docs/{de,es,fr,nl,ro} || die
+
+ emake DESTDIR="${D}" install
+}
diff --git a/media-video/snappy/Manifest b/media-video/snappy/Manifest
new file mode 100644
index 000000000000..864debe9d105
--- /dev/null
+++ b/media-video/snappy/Manifest
@@ -0,0 +1 @@
+DIST snappy-1.0.tar.xz 282964 SHA256 0d33a05c1ad3cc075b8b9bf38d45634ea5204159454597b0882dd6a8d9763f58 SHA512 d8a3fd3a598efde4d699cc8fa13bee1239917a877627b26d5d278af5fd1824f02acf5ce685f8bf994087b3374de9917a5aa4f6f6ebe94f385c8d3bf91887eca9 WHIRLPOOL 0dd3b30e6208b37af4e8476604c80718a1939481bb105f54338559f952f1cf78d5110b0dde8ba389a8bfe065a268ef6595b308a5c38289ae0f4b76c684969340
diff --git a/media-video/snappy/metadata.xml b/media-video/snappy/metadata.xml
new file mode 100644
index 000000000000..8343b79cd5dc
--- /dev/null
+++ b/media-video/snappy/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>gstreamer</herd>
+ <longdescription lang="en">
+ Snappy is a gstreamer + clutter media player with powerful features in mind
+ </longdescription>
+</pkgmetadata>
diff --git a/media-video/snappy/snappy-1.0.ebuild b/media-video/snappy/snappy-1.0.ebuild
new file mode 100644
index 000000000000..718e80519469
--- /dev/null
+++ b/media-video/snappy/snappy-1.0.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+GCONF_DEBUG="no"
+
+inherit gnome2
+
+DESCRIPTION="A simple media player written using GStreamer and Clutter"
+HOMEPAGE="https://wiki.gnome.org/Apps/Snappy"
+
+KEYWORDS="amd64 x86"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+IUSE=""
+
+RDEPEND="
+ >=dev-libs/glib-2.32:2
+ >=media-libs/clutter-1.12.0:1.0
+ >=media-libs/clutter-gst-2.0.0:2.0
+ >=media-libs/clutter-gtk-1.0.2:1.0
+ >=x11-libs/gtk+-3.5.0:3
+ x11-libs/libXtst
+
+ >=media-libs/gstreamer-1.0.0:1.0
+ >=media-libs/gst-plugins-base-1.0.0:1.0
+
+ media-plugins/gst-plugins-meta:1.0
+
+ !!net-misc/spice-gtk
+" # FIXME: File collision -- /usr/bin/snappy
+
+DEPEND="${RDEPEND}"
+
+src_configure() {
+ DOCS="AUTHORS README THANKS ToDo docs/*"
+ gnome2_src_configure --enable-dbus
+}
diff --git a/media-video/sonic-snap/Manifest b/media-video/sonic-snap/Manifest
new file mode 100644
index 000000000000..ec18956bb007
--- /dev/null
+++ b/media-video/sonic-snap/Manifest
@@ -0,0 +1 @@
+DIST sonic-snap-1.7.tar.gz 16760 SHA256 013a1f480d2f205caa2d2ceb8fe82e2af9ed6c86ecca4124760322e4b3dd9e9c
diff --git a/media-video/sonic-snap/metadata.xml b/media-video/sonic-snap/metadata.xml
new file mode 100644
index 000000000000..7747d838bc0b
--- /dev/null
+++ b/media-video/sonic-snap/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>video</herd>
+<longdescription>Minimal webcam app for sn9c10x based camera controllers (mostly USB), with optional MPEG4 support.</longdescription>
+</pkgmetadata>
diff --git a/media-video/sonic-snap/sonic-snap-1.7.ebuild b/media-video/sonic-snap/sonic-snap-1.7.ebuild
new file mode 100644
index 000000000000..d74317962bec
--- /dev/null
+++ b/media-video/sonic-snap/sonic-snap-1.7.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+inherit eutils linux-info multilib toolchain-funcs
+
+DESCRIPTION="Webcam app for sn9c10x based camera controllers (with optional MPEG4 support)"
+HOMEPAGE="http://www.stolk.org/sonic-snap/"
+SRC_URI="http://www.stolk.org/${PN}/downloads/${P}.tar.gz"
+
+LICENSE="GPL-1"
+SLOT="0"
+KEYWORDS="~amd64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="mpeg"
+
+DEPEND="x11-libs/fltk:1
+ mpeg? ( >=media-libs/libfame-0.9.1 )
+ sys-libs/zlib
+ x11-libs/libXdmcp
+ x11-libs/libXau
+ x11-libs/libXrender
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXft"
+
+CONFIG_CHECK="~USB_SN9C102"
+ERROR_USB_SN9C102="Please make sure the SN9C1xx PC Camera Controller driver is \
+enabled, under V4L USB devices, as a module in your kernel."
+
+src_prepare() {
+ # fix bad assumptions
+ sed -i \
+ -e "s|\$(HOME)/include|/usr/include|" \
+ -e "s|\$(HOME)/lib|/usr/$(get_libdir)|" \
+ -e "s|CFLAGS=|CFLAGS= ${CXXFLAGS} |" \
+ -e "s|LFLAGS=|LFLAGS= ${LDFLAGS} |" \
+ -e "s/g++-4.0 -O3/$(tc-getCXX)/" \
+ Makefile
+
+ use mpeg || sed -i -e "s?USE_FAME=1?USE_FAME=0?g" Makefile
+}
+
+src_compile() {
+ make || die '"make" failed.'
+}
+
+src_install() {
+ dodir /usr/bin
+ make DESTDIR="${D}" install || die '"make install" failed.'
+
+ dodoc ChangeLog README
+ doman debian/sonic-snap.1
+}
+
+pkg_postinst() {
+
+ elog
+ elog "This driver is V4L v2 only, so V4L v1 apps will not work."
+ elog "Finally, only a few image sensors are supported, eg, PAS106B"
+ elog "so (check dmesg or /var/log/messages for USB device info when"
+ elog "you plug the cam in)."
+ elog
+ elog "Now try sonic-snap-gui /dev/videoX (where X is 0, 1 , etc)."
+ elog
+}
diff --git a/media-video/sswf/Manifest b/media-video/sswf/Manifest
new file mode 100644
index 000000000000..b1fb2a4fab3f
--- /dev/null
+++ b/media-video/sswf/Manifest
@@ -0,0 +1,4 @@
+DIST sswf-1.8.2-doc.tar.bz2 4330593 SHA256 ecad0f67f5de945ca62e6974986b124d33c43fc60262817f2f5d502b36490e84 SHA512 b59664e6a4dd4066b722c951d2f9d74e0cf743d99f9afb8e619dc08d46168c84385802193b9b3d218780b09fac6a9607c40e2af544c00b5e459f2bd42477e211 WHIRLPOOL e22e8ee8809b4403bfb230dcbcb36b94c797c147ac54784a12979a4f7b3360f61301cb7e69c8681b5d155f34121e1496867143b5fc35ebf25007974a0c5b2748
+DIST sswf-1.8.2-src.tar.bz2 3064805 SHA256 5f6927996d243d62955a512725b9a184098fadae9d0eba8437f398d17e86e8fd SHA512 fe955742dfc8146cc398acc7bb46a3b0626a2ded64fe4061abf654ec6ef26b6c1cbafb8d418daef9a2ea789b171a7b410cee1fb58ef8b9faf660122f307ab622 WHIRLPOOL d8eca1babd1552646a92e3b56a0866985c2d575a17c7a8f160ed426989b2761ba4080c4dbb43c59ae90f6db587876c0cd65c02ae13a6f62fc4bb0a2ae35558bf
+DIST sswf-1.8.4-doc.tar.bz2 10242097 SHA256 30a3676b035eb2da8258657082747519466ce40f430861269e4645f04df9f312 SHA512 1b756931e8b0f5af4a77d920f77db467822642edf9f03d66130f0d6b88c95162cfc75278531f1e35132e213b03c755126ec646aa2b181231d6bc82e63ac25650 WHIRLPOOL 32dafc3dac658f641a0fa55cbb13267aac9a06589d28625e525ef619919aad7124108489b3c69a4c7406ed102860449995dd26358aeb7b1a7756f30bbbc34897
+DIST sswf-1.8.4-src.tar.bz2 3087054 SHA256 bf901ecb43a5dba2947394f9b16a40f6d81a055ace85d411c7e8369cb8a5fe68 SHA512 5d82e805c69fb86873d088be017df3e3157f0c230d7635329cd1a088b74932870e51772801d3feb4cae3f31a4b646fa773c0a3154ea78b16fae7a253887f2077 WHIRLPOOL f7e5b83135a33da09bc83fa58b667062aea3589d70463e28be869420fac333235dea0a47aa3337db832873b70189c2414b27d78d1945f86c77be9a2b41d95f69
diff --git a/media-video/sswf/metadata.xml b/media-video/sswf/metadata.xml
new file mode 100644
index 000000000000..0c1c744d9343
--- /dev/null
+++ b/media-video/sswf/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">sswf</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/sswf/sswf-1.8.2-r1.ebuild b/media-video/sswf/sswf-1.8.2-r1.ebuild
new file mode 100644
index 000000000000..3fc76f882ec4
--- /dev/null
+++ b/media-video/sswf/sswf-1.8.2-r1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="A C++ Library and a script language tool to create Flash (SWF) movies up to version 8"
+HOMEPAGE="http://www.m2osw.com/sswf.html"
+SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.bz2
+ mirror://sourceforge/${PN}/${P}-doc.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="debug doc examples"
+
+RDEPEND="virtual/jpeg
+ media-libs/freetype"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_configure() {
+ econf --disable-dependency-tracking --disable-docs \
+ $(use_enable debug) $(use_enable debug yydebug)
+}
+
+src_install () {
+ emake DESTDIR="${D}" install || die "emake install failed."
+
+ dodoc README.txt doc/{ASC-TODO,AUTHORS,CHANGES,LINKS,NOTES,TODO}.txt
+ rm -f "${D}"/usr/share/${PN}/*.txt
+
+ use examples || rm -rf "${D}"/usr/share/${PN}/samples
+
+ doman doc/man/man1/*.1
+
+ if use doc; then
+ doman doc/man/man3/action_script_v3.3
+ doman doc/man/man3/libsswf*.3
+ doman doc/man/man3/sswf*.3
+ dohtml -r doc/html/*
+ fi
+}
diff --git a/media-video/sswf/sswf-1.8.4-r1.ebuild b/media-video/sswf/sswf-1.8.4-r1.ebuild
new file mode 100644
index 000000000000..3fc76f882ec4
--- /dev/null
+++ b/media-video/sswf/sswf-1.8.4-r1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="A C++ Library and a script language tool to create Flash (SWF) movies up to version 8"
+HOMEPAGE="http://www.m2osw.com/sswf.html"
+SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.bz2
+ mirror://sourceforge/${PN}/${P}-doc.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="debug doc examples"
+
+RDEPEND="virtual/jpeg
+ media-libs/freetype"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_configure() {
+ econf --disable-dependency-tracking --disable-docs \
+ $(use_enable debug) $(use_enable debug yydebug)
+}
+
+src_install () {
+ emake DESTDIR="${D}" install || die "emake install failed."
+
+ dodoc README.txt doc/{ASC-TODO,AUTHORS,CHANGES,LINKS,NOTES,TODO}.txt
+ rm -f "${D}"/usr/share/${PN}/*.txt
+
+ use examples || rm -rf "${D}"/usr/share/${PN}/samples
+
+ doman doc/man/man1/*.1
+
+ if use doc; then
+ doman doc/man/man3/action_script_v3.3
+ doman doc/man/man3/libsswf*.3
+ doman doc/man/man3/sswf*.3
+ dohtml -r doc/html/*
+ fi
+}
diff --git a/media-video/stk11xx/Manifest b/media-video/stk11xx/Manifest
new file mode 100644
index 000000000000..499b8e0f0fdb
--- /dev/null
+++ b/media-video/stk11xx/Manifest
@@ -0,0 +1 @@
+DIST stk11xx-2.1.0_p104.tar.xz 52104 SHA256 e4c88e5a135d68b38b87c65f4f2dc43b7d6e2e32e593c4076c9c9dad43cb8249 SHA512 66afb473f080b72f25f88bc9d605ebcbd575ad5bd1e1464b57bed9e8e9d5404b66d78e4f64a194690d4d3ef80d368586f5c4ace88d54e830ee8f76bb7d31e445 WHIRLPOOL 3080a569b52e10c6fa2f09b842010053b427de8f133831cd364bfffce47e19ef68d5787dbe1bc7a1984854954207c4592118adafd5210f4ca52b05ccda0805e4
diff --git a/media-video/stk11xx/files/stk11xx-2.6.37.patch b/media-video/stk11xx/files/stk11xx-2.6.37.patch
new file mode 100644
index 000000000000..d7a8bac31b22
--- /dev/null
+++ b/media-video/stk11xx/files/stk11xx-2.6.37.patch
@@ -0,0 +1,16 @@
+diff -ruN driver.org//stk11xx-usb.c driver/stk11xx-usb.c
+--- driver.org//stk11xx-usb.c 2011-01-06 21:51:53.674999852 +0200
++++ driver/stk11xx-usb.c 2011-01-06 21:56:44.418999851 +0200
+@@ -844,7 +844,12 @@
+ }
+
+ // Init mutexes, spinlock, etc.
++
++#ifndef init_MUTEX
++ sema_init(&dev->mutex,1);
++#else
+ init_MUTEX(&dev->mutex);
++#endif
+ mutex_init(&dev->modlock);
+ spin_lock_init(&dev->spinlock);
+ init_waitqueue_head(&dev->wait_frame);
diff --git a/media-video/stk11xx/files/stk11xx-v4l_compat_ioctl32.diff b/media-video/stk11xx/files/stk11xx-v4l_compat_ioctl32.diff
new file mode 100644
index 000000000000..1f9e77b14a58
--- /dev/null
+++ b/media-video/stk11xx/files/stk11xx-v4l_compat_ioctl32.diff
@@ -0,0 +1,15 @@
+Patch fixing compilation on amd64, thanks to Krzysztof Magusiak.
+Upstream accepted and applied into r95:
+ http://syntekdriver.svn.sourceforge.net/viewvc/syntekdriver?view=rev&revision=95
+
+--- stk11xx-2.1.0/stk11xx-v4l.c.old 2009-07-03 19:27:15.882898391 +0200
++++ stk11xx-2.1.0/stk11xx-v4l.c 2009-07-03 19:27:40.246883049 +0200
+@@ -1733,7 +1733,7 @@
+ .poll = v4l_stk11xx_poll,
+ .mmap = v4l_stk11xx_mmap,
+ .ioctl = v4l_stk11xx_ioctl,
+-#ifdef CONFIG_COMPAT
++#if defined(CONFIG_COMPAT) && defined(v4l_compat_ioctl32)
+ .compat_ioctl = v4l_compat_ioctl32,
+ #endif
+ };
diff --git a/media-video/stk11xx/metadata.xml b/media-video/stk11xx/metadata.xml
new file mode 100644
index 000000000000..91f4e72fb544
--- /dev/null
+++ b/media-video/stk11xx/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/media-video/stk11xx/stk11xx-2.1.0_p104.ebuild b/media-video/stk11xx/stk11xx-2.1.0_p104.ebuild
new file mode 100644
index 000000000000..483653f1d6b3
--- /dev/null
+++ b/media-video/stk11xx/stk11xx-2.1.0_p104.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit base linux-mod
+
+DESCRIPTION="A driver for Syntek webcams often found in Asus notebooks"
+HOMEPAGE="http://syntekdriver.sourceforge.net/"
+SRC_URI="mirror://gentoo/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="app-arch/xz-utils"
+
+MODULE_NAMES="${PN}(media/video:)"
+CONFIG_CHECK="VIDEO_V4L2"
+
+pkg_setup() {
+ linux-mod_pkg_setup
+
+ BUILD_TARGETS="${PN}.ko"
+ BUILD_PARAMS="-C ${KV_DIR} SUBDIRS=${S}"
+
+ MODULESD_STK11XX_DOCS=( README )
+}
diff --git a/media-video/stk11xx/stk11xx-9999.ebuild b/media-video/stk11xx/stk11xx-9999.ebuild
new file mode 100644
index 000000000000..e6ec7fbaed82
--- /dev/null
+++ b/media-video/stk11xx/stk11xx-9999.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit base linux-mod
+
+#if LIVE
+ESVN_REPO_URI="https://syntekdriver.svn.sourceforge.net/svnroot/syntekdriver/trunk/driver"
+inherit subversion
+#endif
+
+DESCRIPTION="A driver for Syntek webcams often found in Asus notebooks"
+HOMEPAGE="http://syntekdriver.sourceforge.net/"
+SRC_URI="mirror://sourceforge/syntekdriver/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+MODULE_NAMES="${PN}(media/video:)"
+CONFIG_CHECK="VIDEO_V4L2"
+
+#if LIVE
+KEYWORDS=
+SRC_URI=
+#endif
+
+pkg_setup() {
+ linux-mod_pkg_setup
+
+ BUILD_TARGETS="${PN}.ko"
+ BUILD_PARAMS="-C ${KV_DIR} SUBDIRS=${S}"
+
+ MODULESD_STK11XX_DOCS=( README )
+}
+#if LIVE
+
+src_prepare() {
+ base_src_prepare
+}
+#endif
diff --git a/media-video/streamdvd/Manifest b/media-video/streamdvd/Manifest
new file mode 100644
index 000000000000..c0e5f2400fd9
--- /dev/null
+++ b/media-video/streamdvd/Manifest
@@ -0,0 +1 @@
+DIST streamdvd-0.4.tar.gz 152669 RMD160 9688026223cd8d0760a67030cb1eeec103c26d2c SHA1 384c8ec3cc9325e0a876b8b6a7e394dd1d2d5f56 SHA256 0eac9d0d5a901076ee8e832403f3cf7e0ce3a011d7930787a3aebea8acbaf2ec
diff --git a/media-video/streamdvd/files/streamdvd-0.4-gcc41.patch b/media-video/streamdvd/files/streamdvd-0.4-gcc41.patch
new file mode 100644
index 000000000000..2dbbd7117f3d
--- /dev/null
+++ b/media-video/streamdvd/files/streamdvd-0.4-gcc41.patch
@@ -0,0 +1,13 @@
+Index: StreamDVD-0.4/mplex/zalphastrm.hpp
+===================================================================
+--- StreamDVD-0.4.orig/mplex/zalphastrm.hpp
++++ StreamDVD-0.4/mplex/zalphastrm.hpp
+@@ -45,7 +45,7 @@ protected:
+ virtual bool AUBufferNeedsRefill();
+ virtual void NextDTSPTS( clockticks &DTS, clockticks &PTS);
+ virtual void ScanFirstSeqHeader();
+- bool ZAlphaStream::RunOutComplete();
++ bool RunOutComplete();
+
+ private:
+ float z_min;
diff --git a/media-video/streamdvd/files/streamdvd-0.4-gcc43.patch b/media-video/streamdvd/files/streamdvd-0.4-gcc43.patch
new file mode 100644
index 000000000000..89e33f58db4b
--- /dev/null
+++ b/media-video/streamdvd/files/streamdvd-0.4-gcc43.patch
@@ -0,0 +1,44 @@
+diff -aur mplex.old/inputstrm.cpp mplex/inputstrm.cpp
+--- mplex.old/inputstrm.cpp 2004-03-08 23:10:53.000000000 +0100
++++ mplex/inputstrm.cpp 2008-07-07 23:28:19.000000000 +0200
+@@ -23,6 +23,7 @@
+
+ #include "config.h"
+ #include <assert.h>
++#include <climits>
+
+ #include "mjpeg_types.h"
+ #include "fastintfns.h"
+diff -aur mplex.old/multiplexor.cpp mplex/multiplexor.cpp
+--- mplex.old/multiplexor.cpp 2004-03-08 23:10:53.000000000 +0100
++++ mplex/multiplexor.cpp 2008-07-07 23:28:19.000000000 +0200
+@@ -22,6 +22,7 @@
+ #include "config.h"
+ #include <math.h>
+ #include <stdlib.h>
++#include <cstring>
+
+ #include "mjpeg_types.h"
+ #include "mjpeg_logging.h"
+diff -aur mplex.old/padstrm.cpp mplex/padstrm.cpp
+--- mplex.old/padstrm.cpp 2004-03-08 23:10:53.000000000 +0100
++++ mplex/padstrm.cpp 2008-07-07 23:28:19.000000000 +0200
+@@ -25,6 +25,7 @@
+ #endif
+
+ #include "padstrm.hpp"
++#include <cstring>
+
+
+
+diff -aur mplex.old/zalphastrm_in.cpp mplex/zalphastrm_in.cpp
+--- mplex.old/zalphastrm_in.cpp 2004-03-08 23:10:53.000000000 +0100
++++ mplex/zalphastrm_in.cpp 2008-07-07 23:28:19.000000000 +0200
+@@ -23,6 +23,7 @@
+ #include "config.h"
+ #include <math.h>
+ #include <stdlib.h>
++#include <cstring>
+
+ #include "zalphastrm.hpp"
+ #include "interact.hpp"
diff --git a/media-video/streamdvd/files/streamdvd-0.4-gcc44.patch b/media-video/streamdvd/files/streamdvd-0.4-gcc44.patch
new file mode 100644
index 000000000000..2ca12ff29f69
--- /dev/null
+++ b/media-video/streamdvd/files/streamdvd-0.4-gcc44.patch
@@ -0,0 +1,24 @@
+diff -ur StreamDVD-0.4.orig/mplex/lpcmstrm_in.cpp StreamDVD-0.4/mplex/lpcmstrm_in.cpp
+--- StreamDVD-0.4.orig/mplex/lpcmstrm_in.cpp 2004-03-09 00:10:53.000000000 +0200
++++ StreamDVD-0.4/mplex/lpcmstrm_in.cpp 2009-08-05 22:05:48.000000000 +0300
+@@ -52,7 +52,7 @@
+
+ bool LPCMStream::Probe(IBitStream &bs )
+ {
+- char *last_dot = strrchr( bs.StreamName(), '.' );
++ const char *last_dot = strrchr( bs.StreamName(), '.' );
+ return
+ last_dot != NULL
+ && strcmp( last_dot+1, "lpcm") == 0;
+diff -ur StreamDVD-0.4.orig/mplex/yuv4mpeg_ratio.c StreamDVD-0.4/mplex/yuv4mpeg_ratio.c
+--- StreamDVD-0.4.orig/mplex/yuv4mpeg_ratio.c 2004-03-09 00:10:53.000000000 +0200
++++ StreamDVD-0.4/mplex/yuv4mpeg_ratio.c 2009-08-05 22:07:49.000000000 +0300
+@@ -104,7 +104,7 @@
+
+ int y4m_parse_ratio(y4m_ratio_t *r, const char *s)
+ {
+- char *t = strchr(s, ':');
++ const char *t = strchr(s, ':');
+ if (t == NULL) return Y4M_ERR_RANGE;
+ r->n = atoi(s);
+ r->d = atoi(t+1);
diff --git a/media-video/streamdvd/files/streamdvd-0.4-libdvdread.patch b/media-video/streamdvd/files/streamdvd-0.4-libdvdread.patch
new file mode 100644
index 000000000000..b8f59ee54dba
--- /dev/null
+++ b/media-video/streamdvd/files/streamdvd-0.4-libdvdread.patch
@@ -0,0 +1,36 @@
+diff -N -r -u StreamDVD-0.4/contrib/lsdvd/lsdvd.c new/contrib/lsdvd/lsdvd.c
+--- StreamDVD-0.4/contrib/lsdvd/lsdvd.c 2004-03-08 23:10:53.000000000 +0100
++++ new/contrib/lsdvd/lsdvd.c 2006-03-31 12:57:43.000000000 +0200
+@@ -14,6 +14,8 @@
+ * output info structures in form of a Perl module, by Henk Vergonet.
+ * 2004-02-25 now prints the stream-id's for audio and subpicture streams, by Reinhardt Wolf
+ */
++#define __STDC_LIMIT_MACROS
++#include <stdint.h>
+ #include <dvdread/ifo_read.h>
+ #include <string.h>
+ #include <sys/stat.h>
+diff -N -r -u StreamDVD-0.4/contrib/StreamAnalyze/streamanalyze.c new/contrib/StreamAnalyze/streamanalyze.c
+--- StreamDVD-0.4/contrib/StreamAnalyze/streamanalyze.c 2004-03-08 23:10:53.000000000 +0100
++++ new/contrib/StreamAnalyze/streamanalyze.c 2006-03-31 12:57:27.000000000 +0200
+@@ -19,6 +19,8 @@
+ #include <string.h>
+ #include <stdlib.h>
+ #include <getopt.h>
++#define __STDC_LIMIT_MACROS
++#include <stdint.h>
+ #include <dvdread/ifo_read.h>
+ #include <dvdread/ifo_types.h>
+ #include <dvdread/dvd_reader.h>
+diff -N -r -u StreamDVD-0.4/streamdvd.c new/streamdvd.c
+--- StreamDVD-0.4/streamdvd.c 2004-03-08 23:10:53.000000000 +0100
++++ new/streamdvd.c 2006-03-31 12:50:45.000000000 +0200
+@@ -19,6 +19,8 @@
+ #include <string.h>
+ #include <stdlib.h>
+ #include <getopt.h>
++#define __STDC_LIMIT_MACROS
++#include <stdint.h>
+ #include <dvdread/ifo_read.h>
+ #include <dvdread/ifo_types.h>
+ #include <dvdread/dvd_reader.h>
diff --git a/media-video/streamdvd/files/streamdvd-0.4-makefile.patch b/media-video/streamdvd/files/streamdvd-0.4-makefile.patch
new file mode 100644
index 000000000000..84608d80a689
--- /dev/null
+++ b/media-video/streamdvd/files/streamdvd-0.4-makefile.patch
@@ -0,0 +1,27 @@
+Index: StreamDVD-0.4/Makefile
+===================================================================
+--- StreamDVD-0.4.orig/Makefile
++++ StreamDVD-0.4/Makefile
+@@ -1,16 +1,16 @@
+ INSTALLDIR = /usr/local/bin/
+
+ all:
+- g++ -g -Wall -ldvdread -lm -o streamdvd -I. -Implex streamdvd.c requant.c mplex/*.c mplex/*.cpp
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o streamdvd -I. -Implex streamdvd.c requant.c mplex/*.c mplex/*.cpp -ldvdread -lm
+
+ addon:
+- gcc -g -Wall -ldvdread -o streamanalyze contrib/StreamAnalyze/streamanalyze.c
+- gcc -g -Wall -ldvdread -DVERSION=\"0.9\" -o lsdvd contrib/lsdvd/lsdvd.c
++ $(CC) $(CFLAGS) $(LDFLAGS) -o streamanalyze contrib/StreamAnalyze/streamanalyze.c -ldvdread
++ $(CC) $(CFLAGS) $(LDFLAGS) -DVERSION=\"0.9\" -o lsdvd contrib/lsdvd/lsdvd.c -ldvdread
+
+ gui:
+- g++ -g -Wall -ldvdread -lm -o streamdvd -I. -Implex streamdvd.c requant.c mplex/*.c mplex/*.cpp
+- gcc -g -Wall -ldvdread -o streamanalyze contrib/StreamAnalyze/streamanalyze.c
+- gcc -g -Wall -ldvdread -DVERSION=\"0.9\" -o lsdvd contrib/lsdvd/lsdvd.c
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o streamdvd -I. -Implex streamdvd.c requant.c mplex/*.c mplex/*.cpp -ldvdread -lm
++ $(CC) $(CFLAGS) $(LDFLAGS) -o streamanalyze contrib/StreamAnalyze/streamanalyze.c -ldvdread
++ $(CC) $(CFLAGS) $(LDFLAGS) -DVERSION=\"0.9\" -o lsdvd contrib/lsdvd/lsdvd.c -ldvdread
+
+ clean:
+ rm -f streamdvd streamanalyze lsdvd
diff --git a/media-video/streamdvd/files/streamdvd-0.4.patch b/media-video/streamdvd/files/streamdvd-0.4.patch
new file mode 100644
index 000000000000..d078aa7059a3
--- /dev/null
+++ b/media-video/streamdvd/files/streamdvd-0.4.patch
@@ -0,0 +1,22 @@
+--- Gui/StreamDVD/Gui.pm.orig 2004-03-08 23:10:53.000000000 +0100
++++ Gui/StreamDVD/Gui.pm 2004-05-30 13:24:38.342490078 +0200
+@@ -18,7 +18,7 @@
+ use Tk::BrowseEntry;
+ use Tk::LabFrame;
+ use Tk::Photo;
+-use Tk::JPEG::Lite;
++use Tk::JPEG;
+ use StreamDVD::Defs;
+ use StreamDVD::Calc;
+ use strict;
+--- Gui/StreamDVD/Config.pm.orig 2004-03-08 23:10:53.000000000 +0100
++++ Gui/StreamDVD/Config.pm 2004-05-30 13:24:28.314195864 +0200
+@@ -284,7 +284,7 @@
+ $self->{MOUNT} = "/dvd";
+ $self->{TEMPDIR} = "/tmp";
+ $self->{DATADIR} = $ENV{HOME};
+- $self->{LSDVD} = "lsdvd";
++ $self->{LSDVD} = "lsdvd-streamdvd";
+ $self->{STREAMANALYZE} = "streamanalyze";
+ $self->{STREAMDVD} = "streamdvd";
+ $self->{DVDAUTHOR} = "dvdauthor";
diff --git a/media-video/streamdvd/metadata.xml b/media-video/streamdvd/metadata.xml
new file mode 100644
index 000000000000..338a4e316169
--- /dev/null
+++ b/media-video/streamdvd/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>video</herd>
+<maintainer>
+ <email>media-video@gentoo.org</email>
+</maintainer>
+<longdescription>
+StreamDVD is a fast tool to backup Video DVDs 'on the fly', there will
+be no ripping, demultiplexing, recoding, remultiplexing .... You can
+select the wanted title, chapters, video, audio and subpicture streams
+and also a resize factor and StreamDVD will write a 'ready to author'
+vob file to stdout.
+</longdescription>
+</pkgmetadata>
diff --git a/media-video/streamdvd/streamdvd-0.4-r1.ebuild b/media-video/streamdvd/streamdvd-0.4-r1.ebuild
new file mode 100644
index 000000000000..fc21a72d908c
--- /dev/null
+++ b/media-video/streamdvd/streamdvd-0.4-r1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="fast tool to backup Video DVDs 'on the fly'"
+HOMEPAGE="http://www.badabum.de/streamdvd.html"
+SRC_URI="http://www.badabum.de/down/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~ppc ~amd64"
+
+IUSE="X"
+
+DEPEND="media-libs/libdvdread
+ media-video/lsdvd
+ X? ( dev-perl/perl-tk
+ dev-perl/Tk-JPEG-Lite
+ virtual/cdrtools
+ >=media-video/dvdauthor-0.6.5
+ >=app-cdr/dvd+rw-tools-5.13.4.7.4 )"
+
+S=${WORKDIR}/StreamDVD-${PV}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ use X && epatch "${FILESDIR}"/${P}.patch
+
+ epatch "${FILESDIR}"/${P}-makefile.patch
+ epatch "${FILESDIR}"/${P}-gcc41.patch
+ epatch "${FILESDIR}"/${P}-libdvdread.patch
+ epatch "${FILESDIR}"/${P}-gcc43.patch
+ epatch "${FILESDIR}"/${P}-gcc44.patch
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" all addon || die # compile also optional packages
+}
+
+src_install() {
+ dobin streamdvd streamanalyze
+ newbin lsdvd lsdvd-streamdvd # patched lsdvd, rename to avoid conflict with media-video/lsdvd
+ dodoc README
+ newdoc contrib/lsdvd/AUTHORS AUTHORS.lsdvd
+ newdoc contrib/lsdvd/README README.lsdvd
+ newdoc contrib/StreamAnalyze/README README.streamanalyze
+ if use X
+ then
+ eval `perl '-V:installvendorlib'`
+ insinto "$installvendorlib/StreamDVD"
+ doins Gui/StreamDVD/*.pm
+ dobin Gui/StreamDVD.pl
+ dosym StreamDVD.pl /usr/bin/streamdvd_gui # convinience symlink
+ newdoc Gui/README README.gui
+ fi
+}
diff --git a/media-video/sub2srt/Manifest b/media-video/sub2srt/Manifest
new file mode 100644
index 000000000000..5356e73fc7f1
--- /dev/null
+++ b/media-video/sub2srt/Manifest
@@ -0,0 +1 @@
+DIST sub2srt-0.5.3.tar.gz 10737 RMD160 301f9383ad5604bbc003e87b13ef8f924eaa25b9 SHA1 eaecadc4caaaacddcd0e13202be722f13706acd4 SHA256 777fbd9d78cc8a47b926ad03a9b05bf3b1ec09055b9694edeac8b5b4475dc63e
diff --git a/media-video/sub2srt/metadata.xml b/media-video/sub2srt/metadata.xml
new file mode 100644
index 000000000000..edccfe5754d2
--- /dev/null
+++ b/media-video/sub2srt/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>video</herd>
+<maintainer>
+<email>media-video@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/media-video/sub2srt/sub2srt-0.5.3.ebuild b/media-video/sub2srt/sub2srt-0.5.3.ebuild
new file mode 100644
index 000000000000..dc60e2841571
--- /dev/null
+++ b/media-video/sub2srt/sub2srt-0.5.3.ebuild
@@ -0,0 +1,19 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Tool to convert several subtitle formats into subviewer srt"
+HOMEPAGE="http://www.robelix.com/sub2srt/"
+SRC_URI="http://www.robelix.com/sub2srt/download/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+
+IUSE=""
+RDEPEND="dev-lang/perl"
+
+src_install() {
+ dobin sub2srt
+ dodoc README
+}
diff --git a/media-video/subcheck/Manifest b/media-video/subcheck/Manifest
new file mode 100644
index 000000000000..168f471f9ff6
--- /dev/null
+++ b/media-video/subcheck/Manifest
@@ -0,0 +1 @@
+DIST subcheck-0.78.2.tar.gz 9542 SHA256 267e8925e0f474252116425b9bddbabc8fed8e7adebb27737f725d1af3359c57
diff --git a/media-video/subcheck/metadata.xml b/media-video/subcheck/metadata.xml
new file mode 100644
index 000000000000..da7d01380bc1
--- /dev/null
+++ b/media-video/subcheck/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <longdescription lang="en">
+ Subcheck is a perl script which checks srt (SubRip) subtitle files for
+ errors. Such as overlapping, negative duration, to short displaytime,
+ rewrite subtitle lines with another character length (useful for Yamada,
+ KISS and other hardware divxplayers), etc. It is highly configurable.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">subcheck</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/subcheck/subcheck-0.78.2.ebuild b/media-video/subcheck/subcheck-0.78.2.ebuild
new file mode 100644
index 000000000000..1c090d95a3b4
--- /dev/null
+++ b/media-video/subcheck/subcheck-0.78.2.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit eutils
+
+DESCRIPTION="Subcheck checks srt subtitle files for errors"
+HOMEPAGE="http://subcheck.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="!sci-biology/ncbi-tools++" # bug 377093
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ sed -i -e "s:${PN}.pl:${PN}:g" all-checksub
+}
+
+src_compile() {
+ : # nothing to do
+}
+
+src_install() {
+ doman man/subcheck.8.gz
+ newbin subcheck.pl subcheck
+ dobin all-checksub
+ dodoc Changes
+}
diff --git a/media-video/subdl/Manifest b/media-video/subdl/Manifest
new file mode 100644
index 000000000000..ad02fb5a257e
--- /dev/null
+++ b/media-video/subdl/Manifest
@@ -0,0 +1 @@
+DIST subdl-1.0.3.zip 17212 SHA256 ba56d0f65ccce575295a65d1374f164d4f1cc69c874ae8593f5daa688562c154 SHA512 d3c0e036bece8c6cad7b37543f8e2f00906ce83738aa3d751e463d316ee97292d696c0eae01d71f28fd67b942b9d28c00c8e580036d19933dbd4143e9865078c WHIRLPOOL 84418baa515a707b7e41d1823708ddfdad7e66d6f431872862de4c4de7c44d2cff18f1d75a3ae45977fa49271c7184fe8fe225d5e6b44c3d64bde25a58033603
diff --git a/media-video/subdl/metadata.xml b/media-video/subdl/metadata.xml
new file mode 100644
index 000000000000..564e8cdd2612
--- /dev/null
+++ b/media-video/subdl/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="google-code">subdl</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/subdl/subdl-1.0.3.ebuild b/media-video/subdl/subdl-1.0.3.ebuild
new file mode 100644
index 000000000000..9781470c4277
--- /dev/null
+++ b/media-video/subdl/subdl-1.0.3.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+inherit python-single-r1
+
+DESCRIPTION="A command-line tool for downloading subs from opensubtitles.org"
+HOMEPAGE="http://code.google.com/p/subdl/"
+SRC_URI="http://${PN}.googlecode.com/files/${P}.zip"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="${PYTHON_DEPS}"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+REQUIRED_USE=${PYTHON_REQUIRED_USE}
+
+S=${WORKDIR}
+
+src_prepare() {
+ python_fix_shebang ${PN}
+}
+
+src_install() {
+ dobin ${PN}
+ dodoc README.txt
+}
diff --git a/media-video/subdownloader/Manifest b/media-video/subdownloader/Manifest
new file mode 100644
index 000000000000..a21e67ef2c28
--- /dev/null
+++ b/media-video/subdownloader/Manifest
@@ -0,0 +1 @@
+DIST subdownloader-2.0.18.tar.gz 1259520 SHA256 2f9ec46d1537cb5677b717dcaf5668cdc61a84456bc52178b40595759ba35655 SHA512 ecddf606ce374af43fff39c225ee896af4d8bd2384a2f300dcbb4b443377807edd5233a0531e95d338b0f9c84a274b3afd4109d9216510a5a4bc8fa17485b999 WHIRLPOOL 2b735f0c25a19a49444011a81b28b855d3ce4b2ba01f1efbc65d9f4fe3f541081db13805d99d9a8e52cbb3ef3b95dae3fa80c3f9a06023c629285f4dd9dca5ac
diff --git a/media-video/subdownloader/metadata.xml b/media-video/subdownloader/metadata.xml
new file mode 100644
index 000000000000..23b382ba9296
--- /dev/null
+++ b/media-video/subdownloader/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>proxy-maintainers</herd>
+ <maintainer>
+ <email>ThyArmageddon+Gentoo@Gmail.com</email>
+ <name>Elijah El Lazkani</name>
+ </maintainer>
+ <maintainer>
+ <email>tampakrap@gentoo.org</email>
+ <name>Theo Chatzimichos</name>
+ </maintainer>
+ <longdescription lang="en">
+ SubDownloader is a program for automatic download/upload subtitles for
+ videofiles (DIVX,MPEG,AVI,VOB,etc) and DVD's using fast hashing
+ </longdescription>
+ <upstream>
+ <remote-id type="launchpad">subdownloader</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/subdownloader/subdownloader-2.0.18-r1.ebuild b/media-video/subdownloader/subdownloader-2.0.18-r1.ebuild
new file mode 100644
index 000000000000..f37c4ac7d421
--- /dev/null
+++ b/media-video/subdownloader/subdownloader-2.0.18-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-single-r1 eutils
+
+DESCRIPTION="GUI application for automatic downloading/uploading of subtitles for videofiles"
+HOMEPAGE="http://www.subdownloader.net/"
+SRC_URI="http://launchpad.net/${PN}/trunk/${PV}/+download/${PN}_2.0.18.orig.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 ~x86"
+IUSE=""
+
+DEPEND="${PYTHON_DEPS}
+ dev-python/PyQt4[${PYTHON_USEDEP}]
+ dev-python/kaa-metadata[${PYTHON_USEDEP}]"
+RDEPEND="${DEPEND}"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+src_install() {
+ python_fix_shebang "${S}"/run.py
+ insinto /usr/share/"${PN}"
+ doins -r cli FileManagement gui languages locale modules run.py
+ fperms 755 /usr/share/"${PN}"/run.py
+ dosym /usr/share/"${PN}"/run.py /usr/bin/"${PN}"
+ doman subdownloader.1
+ dodoc README ChangeLog
+ doicon gui/images/subdownloader.png
+ domenu subdownloader.desktop
+}
diff --git a/media-video/subdownloader/subdownloader-2.0.18.ebuild b/media-video/subdownloader/subdownloader-2.0.18.ebuild
new file mode 100644
index 000000000000..7ae6d7d3c489
--- /dev/null
+++ b/media-video/subdownloader/subdownloader-2.0.18.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_DEPEND="2"
+
+inherit python eutils
+
+DESCRIPTION="GUI application for automatic downloading/uploading of subtitles for videofiles"
+HOMEPAGE="http://www.subdownloader.net/"
+SRC_URI="http://launchpad.net/${PN}/trunk/${PV}/+download/${PN}_2.0.18.orig.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+#S="${WORKDIR}/subdownloader-${PV}"
+
+DEPEND="
+ dev-python/PyQt4
+ dev-python/kaa-metadata"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_prepare() {
+ python_convert_shebangs 2 "${S}"/run.py
+}
+
+src_install() {
+ insinto /usr/share/"${PN}"
+ doins -r cli FileManagement gui languages locale modules run.py
+ fperms 755 /usr/share/"${PN}"/run.py
+ dosym /usr/share/"${PN}"/run.py /usr/bin/"${PN}"
+ doman subdownloader.1
+ dodoc README ChangeLog
+ doicon gui/images/subdownloader.png
+ domenu subdownloader.desktop
+}
diff --git a/media-video/subliminal/Manifest b/media-video/subliminal/Manifest
new file mode 100644
index 000000000000..3d85d36bb377
--- /dev/null
+++ b/media-video/subliminal/Manifest
@@ -0,0 +1 @@
+DIST subliminal-0.7.4.tar.gz 27913 SHA256 b3ac61e8a915dc089356771637a38e4a155cf45ddd1f96a24adce8cbebc8e522 SHA512 1a7cbade7d895a6decf9abd30dc7c51f4104a91e3e01d3d600a97113dc5c8589c5957fad49e5ff537ea0cdb11d982e77c68a7566bf62455d842ab3afa64d2d47 WHIRLPOOL 72a68e58285e27580c3f19dab1c608de5aa1f3d11e90974602a589d33cd96d90da61ab35c8aa3ea32d418320d7707fb11c2aee3c8d885e4c6f4032918ef6f3e7
diff --git a/media-video/subliminal/metadata.xml b/media-video/subliminal/metadata.xml
new file mode 100644
index 000000000000..edcbae0dde7c
--- /dev/null
+++ b/media-video/subliminal/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>proxy-maintainers</herd>
+ <maintainer>
+ <email>nikoli@gmx.us</email>
+ <name>Nikoli</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="pypi">subliminal</remote-id>
+ <remote-id type="github">Diaoul/subliminal</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/subliminal/subliminal-0.7.4.ebuild b/media-video/subliminal/subliminal-0.7.4.ebuild
new file mode 100644
index 000000000000..7b7d69dcd4ef
--- /dev/null
+++ b/media-video/subliminal/subliminal-0.7.4.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+# setup.py declares support for python3.3, but it does not work
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1
+
+DESCRIPTION="Python library to search and download subtitles"
+HOMEPAGE="http://subliminal.readthedocs.org https://github.com/Diaoul/subliminal https://pypi.python.org/pypi/subliminal"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+ >=dev-python/beautifulsoup-4.3.2:4[${PYTHON_USEDEP}]
+ >=dev-python/guessit-0.6.2[${PYTHON_USEDEP}]
+ <dev-python/guessit-0.7[${PYTHON_USEDEP}]
+ >=dev-python/requests-2.0.1[${PYTHON_USEDEP}]
+ >=dev-python/enzyme-0.4[${PYTHON_USEDEP}]
+ >=dev-python/html5lib-0.99[${PYTHON_USEDEP}]
+ >=dev-python/dogpile-cache-0.5.2[${PYTHON_USEDEP}]
+ >=dev-python/babelfish-0.4.0[${PYTHON_USEDEP}]
+ <dev-python/babelfish-0.5[${PYTHON_USEDEP}]
+ >=dev-python/charade-1.0.3[${PYTHON_USEDEP}]
+ >=dev-python/pysrt-0.5.0[${PYTHON_USEDEP}]
+"
+DEPEND="${RDEPEND}
+ dev-python/setuptools[${PYTHON_USEDEP}]
+"
+# tests need network
+RESTRICT="test"
+
+python_test() {
+ esetup.py test
+}
diff --git a/media-video/subliminal/subliminal-9999.ebuild b/media-video/subliminal/subliminal-9999.ebuild
new file mode 100644
index 000000000000..1d4be1b3549f
--- /dev/null
+++ b/media-video/subliminal/subliminal-9999.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+inherit distutils-r1 git-r3
+
+DESCRIPTION="Python library to search and download subtitles"
+HOMEPAGE="http://subliminal.readthedocs.org https://github.com/Diaoul/subliminal https://pypi.python.org/pypi/subliminal"
+EGIT_REPO_URI="https://github.com/Diaoul/subliminal.git"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS=""
+IUSE=""
+
+RDEPEND="
+ >=dev-python/beautifulsoup-4.3.2:4[${PYTHON_USEDEP}]
+ >=dev-python/guessit-0.7[${PYTHON_USEDEP}]
+ >=dev-python/requests-2.0.1[${PYTHON_USEDEP}]
+ >=dev-python/enzyme-0.4[${PYTHON_USEDEP}]
+ >=dev-python/html5lib-0.99[${PYTHON_USEDEP}]
+ >=dev-python/dogpile-cache-0.5.2[${PYTHON_USEDEP}]
+ >=dev-python/babelfish-0.5.1[${PYTHON_USEDEP}]
+ >=dev-python/chardet-2.2.1[${PYTHON_USEDEP}]
+ >=dev-python/pysrt-1.0.1[${PYTHON_USEDEP}]
+ >=dev-python/pyxdg-0.25[${PYTHON_USEDEP}]
+"
+DEPEND="${RDEPEND}
+ dev-python/setuptools[${PYTHON_USEDEP}]
+"
+# tests need network
+RESTRICT="test"
+
+python_test() {
+ esetup.py test
+}
diff --git a/media-video/submux-dvd/Manifest b/media-video/submux-dvd/Manifest
new file mode 100644
index 000000000000..490f45130015
--- /dev/null
+++ b/media-video/submux-dvd/Manifest
@@ -0,0 +1 @@
+DIST submux-dvd-0.5.2.tgz 42223 SHA256 394dd464f1f39313110bccf2acf0decba8e606df8f499f0792a8496c918c4fa6
diff --git a/media-video/submux-dvd/files/submux-dvd-0.5.patch b/media-video/submux-dvd/files/submux-dvd-0.5.patch
new file mode 100644
index 000000000000..b492a778df57
--- /dev/null
+++ b/media-video/submux-dvd/files/submux-dvd-0.5.patch
@@ -0,0 +1,11 @@
+--- submux-dvd_orig.c 2004-05-27 13:54:20.980889376 +0100
++++ submux-dvd.c 2004-05-27 13:55:06.090031744 +0100
+@@ -1967,7 +1967,7 @@
+ fprintf(stdout,\
+ "sub_size=%d\n\
+ bytes_send=%d\n\
+- available_space=%d
++ available_space=%d\
+ bytes_left=%d\n\
+ bytes_free=%d\n\
+ header_mode=%d\n\
diff --git a/media-video/submux-dvd/metadata.xml b/media-video/submux-dvd/metadata.xml
new file mode 100644
index 000000000000..8b5ccd61088e
--- /dev/null
+++ b/media-video/submux-dvd/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>video</herd>
+<maintainer>
+ <email>lordvan@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/media-video/submux-dvd/submux-dvd-0.5.2.ebuild b/media-video/submux-dvd/submux-dvd-0.5.2.ebuild
new file mode 100644
index 000000000000..2e7af6533193
--- /dev/null
+++ b/media-video/submux-dvd/submux-dvd-0.5.2.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="A subtitle multiplexer, muxes subtitles into .vob"
+HOMEPAGE="http://panteltje.com/panteltje/dvd/"
+SRC_URI="http://panteltje.com/panteltje/dvd/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+src_compile() {
+ emake CC="$(tc-getCC)" || die
+}
+
+src_install() {
+ # just 2 files not worth a makefile patch
+ dobin submux-dvd vob2sub || die
+ dodoc CHANGES FORMAT INSTALL README ${P}.lsm || die
+ dohtml spu.html || die
+}
diff --git a/media-video/subotage/Manifest b/media-video/subotage/Manifest
new file mode 100644
index 000000000000..80d7121869d9
--- /dev/null
+++ b/media-video/subotage/Manifest
@@ -0,0 +1 @@
+DIST subotage_0.15.tgz 20516 SHA256 d122d45be385546f5bd7fd3ddc1d2b372d2603fa3c30283e873af7ce49e1ca0b SHA512 5d7075bf1535ffeab9deabb070147fb1e9e7d31004f5e47de15b436330725d872afff0dff7ef0ebb150c3e6570752d7fed1336f97c29bbed7d81f1fe3d52ec91 WHIRLPOOL b3c6178f030d23f7a849b41eb445f169138a551bf84363a61e116bed71e0e131aa63b6f33b3dfb50825a0d03913e38c428e2b83f4a6f1daa171e3325bc431109
diff --git a/media-video/subotage/metadata.xml b/media-video/subotage/metadata.xml
new file mode 100644
index 000000000000..102dfa57bac4
--- /dev/null
+++ b/media-video/subotage/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>mgorny@gentoo.org</email>
+ <name>Michał Górny</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">subotage</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/subotage/subotage-0.15.ebuild b/media-video/subotage/subotage-0.15.ebuild
new file mode 100644
index 000000000000..83a3c08a4177
--- /dev/null
+++ b/media-video/subotage/subotage-0.15.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Universal subtitle converter in bash"
+HOMEPAGE="http://sourceforge.net/projects/subotage/"
+SRC_URI="mirror://sourceforge/${PN}/${P/-/_}.tgz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+S=${WORKDIR}
+
+src_install() {
+ default # for docs
+
+ dobin subotage.sh
+}
diff --git a/media-video/subsync/Manifest b/media-video/subsync/Manifest
new file mode 100644
index 000000000000..9491fd314484
--- /dev/null
+++ b/media-video/subsync/Manifest
@@ -0,0 +1 @@
+DIST subsync-0.0.1.tar.bz2 60335 SHA256 c6c9c9e506232528b0b1fa3b7929fc3517d5eeafcbd06cf40e18a7fb27a0bfba
diff --git a/media-video/subsync/metadata.xml b/media-video/subsync/metadata.xml
new file mode 100644
index 000000000000..bdf23f1b60aa
--- /dev/null
+++ b/media-video/subsync/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>video</herd>
+ <longdescription lang="en">
+ Subtitle Synchronizer is a easy command-line utility that synchronizes
+ subrip(srt) subtitles that use time format to given timings.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">subsync</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/subsync/subsync-0.0.1.ebuild b/media-video/subsync/subsync-0.0.1.ebuild
new file mode 100644
index 000000000000..ceadb7be16fa
--- /dev/null
+++ b/media-video/subsync/subsync-0.0.1.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils
+
+DESCRIPTION="subsync is an program that synchronizes srt subtitle files"
+HOMEPAGE="http://sourceforge.net/projects/subsync/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ dodoc AUTHORS ChangeLog
+}
diff --git a/media-video/subtitlecomposer/Manifest b/media-video/subtitlecomposer/Manifest
new file mode 100644
index 000000000000..abb90606fdbf
--- /dev/null
+++ b/media-video/subtitlecomposer/Manifest
@@ -0,0 +1 @@
+DIST subtitlecomposer-0.5.6.tar.gz 1489710 SHA256 f55f3330e72a9a9f19f00674651d7d4c6cd7e19993a14d1deedfa6d34737cf0f SHA512 f06f25d746870886669a66875d4d772e10d18136b9107c2f7d23f177ff3979785b7f73a7e723139fe1757298ef7b0a791a95f40fe585ab3239c82d71d2ab4db0 WHIRLPOOL 0aa86a1a58d7a4f2551774725655223ae2847337ea877db11aff01da55af3be31e941d09fa68468924b47db359b584ee0d9c3d1939e350b7b023a264f9a27010
diff --git a/media-video/subtitlecomposer/metadata.xml b/media-video/subtitlecomposer/metadata.xml
new file mode 100644
index 000000000000..d76e08856ffd
--- /dev/null
+++ b/media-video/subtitlecomposer/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>video</herd>
+ <herd>kde</herd>
+ <upstream>
+ <remote-id type="github">maxrd2/subtitlecomposer</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/subtitlecomposer/subtitlecomposer-0.5.6.ebuild b/media-video/subtitlecomposer/subtitlecomposer-0.5.6.ebuild
new file mode 100644
index 000000000000..1fcf238199f4
--- /dev/null
+++ b/media-video/subtitlecomposer/subtitlecomposer-0.5.6.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+KDE_LINGUAS="bg cs de el es fr hu pl pt_BR ru sr sr@latin uk"
+KDE_LINGUAS_LIVE_OVERRIDE="true"
+inherit kde4-base
+
+DESCRIPTION="Text-based subtitles editor"
+HOMEPAGE="https://github.com/maxrd2/subtitlecomposer"
+SRC_URI="https://github.com/maxrd2/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="amd64 x86"
+SLOT="4"
+IUSE="debug gstreamer unicode xine"
+
+RDEPEND="
+ media-libs/phonon[qt4]
+ gstreamer? ( media-libs/gstreamer:0.10 )
+ unicode? ( dev-libs/icu:= )
+ xine? ( media-libs/xine-lib )
+"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+"
+
+src_configure() {
+ mycmakeargs=(
+ $(cmake-utils_use_with gstreamer GStreamer)
+ $(cmake-utils_use_with unicode ICU)
+ $(cmake-utils_use_with xine)
+ )
+ kde4-base_src_configure
+}
+
+pkg_postinst() {
+ kde4-base_pkg_postinst
+
+ echo
+ elog "Some example scripts provided by ${PV} require dev-lang/ruby"
+ elog "or dev-lang/python to be installed."
+ echo
+}
diff --git a/media-video/subtitleeditor/Manifest b/media-video/subtitleeditor/Manifest
new file mode 100644
index 000000000000..75a4bb2b8e58
--- /dev/null
+++ b/media-video/subtitleeditor/Manifest
@@ -0,0 +1 @@
+DIST subtitleeditor-0.41.1.tar.gz 1637940 SHA256 3183f2f9831359f2200194fcc2d360198094c494892ccacd08a28717bffac0d0 SHA512 6e87df6bf1b97fc085387f331fa415be48086b9dabf445e6050ff3ab3c812c8fff72e613959308f07c2e849bf95064c5d288f44dbc266997e7143bbb46615c9d WHIRLPOOL 111163dde1cf17df34e0dfb0aeeb874a98095d6d338ca22138ff13747697d78a2d1be127f344c36286b79f828918ab1c615bccc7e04cc8586b12efe407c76f52
diff --git a/media-video/subtitleeditor/files/subtitleeditor-0.41.0-keyframe-generation.patch b/media-video/subtitleeditor/files/subtitleeditor-0.41.0-keyframe-generation.patch
new file mode 100644
index 000000000000..b347d4ce4261
--- /dev/null
+++ b/media-video/subtitleeditor/files/subtitleeditor-0.41.0-keyframe-generation.patch
@@ -0,0 +1,30 @@
+Author: Philip Rinn <rinni@inventati.org>
+Description: Prevent crash when generating keyframes with gstreamermm 0.10.11
+--- a/plugins/actions/keyframesmanagement/keyframesgenerator.cc
++++ b/plugins/actions/keyframesmanagement/keyframesgenerator.cc
+@@ -87,12 +87,20 @@
+ if(structure_name.find("video") == Glib::ustring::npos)
+ return Glib::RefPtr<Gst::Element>(NULL);
+
+- Glib::RefPtr<Gst::Bin> videobin = Glib::RefPtr<Gst::Bin>::cast_dynamic(
+- Gst::Parse::create_bin(
+- "ffmpegcolorspace ! fakesink name=vsink", true));
++ // ffmpegcolorspace
++ Glib::RefPtr<Gst::Element> conv = Gst::ElementFactory::create_element("ffmpegcolorspace", "conv");
++ // fakesink
++ Glib::RefPtr<Gst::FakeSink> vsink = Gst::FakeSink::create("vsink");
++ // videobin
++ Glib::RefPtr<Gst::Bin> videobin = Gst::Bin::create("videobin");
+
+- Glib::RefPtr<Gst::FakeSink> vsink = Glib::RefPtr<Gst::FakeSink>::cast_dynamic(
+- videobin->get_element("vsink"));
++ // Add and link
++ videobin->add(conv)->add(vsink);
++ conv->link_pads("src", vsink, "sink");
++
++ // Add sink pad to bin element
++ Glib::RefPtr<Gst::Pad> pad = conv->get_static_pad("sink");
++ videobin->add_pad(Gst::GhostPad::create(pad, "sink"));
+
+ vsink->set_sync(false);
+ vsink->property_silent() = true;
diff --git a/media-video/subtitleeditor/files/subtitleeditor-0.41.0-subtitle-edition.patch b/media-video/subtitleeditor/files/subtitleeditor-0.41.0-subtitle-edition.patch
new file mode 100644
index 000000000000..eff958fd66cc
--- /dev/null
+++ b/media-video/subtitleeditor/files/subtitleeditor-0.41.0-subtitle-edition.patch
@@ -0,0 +1,27 @@
+Author: Philip Rinn <rinni@inventati.org>
+Description: With glib >= 2.42.0 you need to add interfaces before class_init
+--- a/src/gui/textviewcell.cc
++++ b/src/gui/textviewcell.cc
+@@ -30,8 +30,8 @@
+ * Initialize the widget with the AutomaticSpellChecker.
+ */
+ TextViewCell::TextViewCell()
++: Gtk::CellEditable(),
++ Glib::ObjectBase(typeid(TextViewCell)),
+-: Glib::ObjectBase(typeid(TextViewCell)),
+- Gtk::CellEditable(),
+ m_editing_canceled(false),
+ m_used_ctrl_enter_to_confirm_change(false)
+ {
+
+--- a/src/gui/textviewcell.h
++++ b/src/gui/textviewcell.h
+@@ -29,7 +29,7 @@
+ /*
+ * Cell text editable with multiline support.
+ */
+-class TextViewCell : public Gtk::TextView, public Gtk::CellEditable
++class TextViewCell : public Gtk::CellEditable, public Gtk::TextView
+ {
+ public:
+
diff --git a/media-video/subtitleeditor/files/subtitleeditor-0.41.0-textoverlay.patch b/media-video/subtitleeditor/files/subtitleeditor-0.41.0-textoverlay.patch
new file mode 100644
index 000000000000..7a8552c7a71f
--- /dev/null
+++ b/media-video/subtitleeditor/files/subtitleeditor-0.41.0-textoverlay.patch
@@ -0,0 +1,16 @@
+Author: Philip Rinn <rinni@inventati.org>
+Description: Get textoverlay working with gstreamermm 0.10.11
+--- a/src/vp/gstplayer.cc
++++ b/src/vp/gstplayer.cc
+@@ -656,7 +656,10 @@
+ "Please check your GStreamer installation."), "ffmpegcolorspace"));
+ }
+ // textoverlay
+- textoverlay = Gst::ElementFactory::create_element("textoverlay", "overlay");
++ // Workaround to prevent getting a NULL pointer from the
++ // cast_dynamic(textoverlay) call under gstreamermm 0.10.11
++ textoverlay = Gst::TextOverlay::create("overlay");
++
+ if(!textoverlay)
+ {
+ throw std::runtime_error(
diff --git a/media-video/subtitleeditor/metadata.xml b/media-video/subtitleeditor/metadata.xml
new file mode 100644
index 000000000000..58bbb44bf7bc
--- /dev/null
+++ b/media-video/subtitleeditor/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>gnome</herd>
+<maintainer>
+ <email>eva@gentoo.org</email>
+ <name>Gilles Dartiguelongue</name>
+</maintainer>
+<longdescription lang="en">
+Subtitle Editor is a GTK+2 tool to edit subtitles for GNU/Linux/*BSD. It can be used for new subtitles or as a tool to transform, edit, correct and refine existing subtitle. This program also shows sound waves, which makes it easier to synchronise subtitles to voices.
+</longdescription>
+</pkgmetadata>
+
diff --git a/media-video/subtitleeditor/subtitleeditor-0.41.1-r1.ebuild b/media-video/subtitleeditor/subtitleeditor-0.41.1-r1.ebuild
new file mode 100644
index 000000000000..7b161619fbde
--- /dev/null
+++ b/media-video/subtitleeditor/subtitleeditor-0.41.1-r1.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+GCONF_DEBUG="no"
+GNOME2_LA_PUNT="yes"
+
+inherit gnome2 versionator flag-o-matic
+
+DESCRIPTION="GTK+2 subtitle editing tool"
+HOMEPAGE="http://home.gna.org/subtitleeditor/"
+SRC_URI="http://download.gna.org/${PN}/$(get_version_component_range 1-2)/${P}.tar.gz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug nls opengl"
+
+RDEPEND="
+ app-text/iso-codes
+ dev-cpp/cairomm
+ >=dev-cpp/gtkmm-2.14:2.4
+ >=dev-cpp/glibmm-2.16.3:2
+ dev-libs/glib:2
+ dev-libs/libsigc++:2
+ >=dev-cpp/libxmlpp-2.20:2.6
+ >=app-text/enchant-1.4
+ >=dev-cpp/gstreamermm-0.10.6:0.10
+ media-libs/gstreamer:0.10
+ media-libs/gst-plugins-base:0.10
+ >=media-libs/gst-plugins-good-0.10:0.10
+ >=media-plugins/gst-plugins-meta-0.10-r2:0.10
+ >=media-plugins/gst-plugins-pango-0.10:0.10
+ >=media-plugins/gst-plugins-xvideo-0.10:0.10
+ x11-libs/gtk+:2
+ virtual/libintl
+ opengl? (
+ >=dev-cpp/gtkglextmm-1.2:1.0
+ virtual/opengl )
+"
+# gst-plugins-pango needed for text overlay
+# gst-plugins-xvideo needed for video output
+DEPEND="${RDEPEND}
+ >=dev-util/intltool-0.40
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ # Get textoverlay working with gstreamermm 0.10.11
+ epatch "${FILESDIR}"/${PN}-0.41.0-textoverlay.patch
+
+ # Prevent crash when generating keyframes with gstreamermm 0.10.11
+ epatch "${FILESDIR}"/${PN}-0.41.0-keyframe-generation.patch
+
+ # Fix typing/editing subtitle, bug #536246
+ epatch "${FILESDIR}"/${PN}-0.41.0-subtitle-edition.patch
+
+ gnome2_src_prepare
+}
+
+src_configure() {
+ export GST_REGISTRY="${T}/home/registry.cache.xml"
+
+ # Avoid using --enable-debug as it mocks with CXXFLAGS and LDFLAGS
+ use debug && append-flags -DDEBUG
+
+ gnome2_src_configure \
+ --disable-debug \
+ $(use_enable nls) \
+ $(use_enable opengl gl)
+}
diff --git a/media-video/subtitler-yuv/Manifest b/media-video/subtitler-yuv/Manifest
new file mode 100644
index 000000000000..f068e8f6cf80
--- /dev/null
+++ b/media-video/subtitler-yuv/Manifest
@@ -0,0 +1 @@
+DIST subtitler-yuv-0.6.5.tgz 568408 SHA256 0e76f76b3cb001c0ed2d1ec51472fde594002c640960c489b6876dda549cbcc9 SHA512 2dabb720896ef0c1bd54a7b8fdf4ab7097d95ba9e81608b713f4dd62c0f8a156d41bb7fe74cb5113f70f5390186fdea3e7d2e9add5d5748b677657ef356117dc WHIRLPOOL 86e6d959750551f08e69391d0d96efcd4f2321cbb4ed96af31ee4628c5fb1e15d3761b96df936ea0ebba6cbac4258ebe9dcf285e74d9661cbadb21faf00ff77a
diff --git a/media-video/subtitler-yuv/metadata.xml b/media-video/subtitler-yuv/metadata.xml
new file mode 100644
index 000000000000..8b5ccd61088e
--- /dev/null
+++ b/media-video/subtitler-yuv/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>video</herd>
+<maintainer>
+ <email>lordvan@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/media-video/subtitler-yuv/subtitler-yuv-0.6.5.ebuild b/media-video/subtitler-yuv/subtitler-yuv-0.6.5.ebuild
new file mode 100644
index 000000000000..6fc3eda65c5a
--- /dev/null
+++ b/media-video/subtitler-yuv/subtitler-yuv-0.6.5.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit toolchain-funcs
+
+DESCRIPTION="for mjpegtools for adding subtitles, pictures, and effects embedded in the picture"
+HOMEPAGE="http://panteltje.com/panteltje/subtitles/"
+SRC_URI="mirror://gentoo/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+RDEPEND="x11-libs/libX11
+ x11-libs/libXaw
+ x11-libs/libXt"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ sed -i \
+ -e '/^CFLAGS/s:= -O2:+=:' \
+ -e '/CFLAGS/s:gcc:$(CC):' \
+ -e 's:gcc -o:$(CC) $(LDFLAGS) -o:' \
+ -e 's:-L/usr/X11R6/lib/::' \
+ -e 's:-lXpm:-lX11:' \
+ Makefile || die
+}
+
+src_compile() {
+ tc-export CC
+ emake
+}
+
+src_install() {
+ dobin ${PN}
+ dodoc CHANGES HOWTO_USE_THIS README*
+ insinto /usr/share/${PN}
+ doins *.{ppm,ppml,zip}
+}
diff --git a/media-video/subtitleripper/Manifest b/media-video/subtitleripper/Manifest
new file mode 100644
index 000000000000..2c58f74027eb
--- /dev/null
+++ b/media-video/subtitleripper/Manifest
@@ -0,0 +1 @@
+DIST subtitleripper-0.3-4.tgz 47299 SHA256 8af6c2ebe55361900871c731ea1098b1a03efa723cd29ee1d471435bd21f3ac4 SHA512 6d25a43b5b1bf8a6c69200c8bab995265356d1235a872bb641d30dbf27b765be9280325b4dd8aa625c25a865563bd7525dd277682d5baeff3c54951da7b9a86a WHIRLPOOL fd5f2703cb509cd6cad4158b2883ddcd974996591c9367d18a811ee5f9bf79139e77362067e97b9c691c14af7e94be2093d15fb6248a847be26eee95176347d8
diff --git a/media-video/subtitleripper/files/subtitleripper-0.3.4-glibc210.patch b/media-video/subtitleripper/files/subtitleripper-0.3.4-glibc210.patch
new file mode 100644
index 000000000000..8dc2b24f9f6a
--- /dev/null
+++ b/media-video/subtitleripper/files/subtitleripper-0.3.4-glibc210.patch
@@ -0,0 +1,21 @@
+diff -Naurp subtitleripper-orig/vobsub.c subtitleripper/vobsub.c
+--- subtitleripper-orig/vobsub.c 2003-12-08 03:28:02.000000000 -0600
++++ subtitleripper/vobsub.c 2009-05-30 19:09:13.266973499 -0600
+@@ -56,7 +56,7 @@ extern ssize_t getline(char **, size_t *
+ /* FIXME This should go into a general purpose library or even a
+ separate file. */
+ static ssize_t
+-getline (char **lineptr, size_t *n, FILE *stream)
++get_line (char **lineptr, size_t *n, FILE *stream)
+ {
+ size_t res = 0;
+ int c;
+@@ -753,7 +753,7 @@ vobsub_parse_one_line(vobsub_t *vob, FIL
+ do {
+ size_t line_reserve = 0;
+ char *line = NULL;
+- line_size = getline(&line, &line_reserve, fd);
++ line_size = get_line(&line, &line_reserve, fd);
+ if (line_size < 0) {
+ if (line)
+ free(line);
diff --git a/media-video/subtitleripper/files/subtitleripper-0.3.4-libpng.patch b/media-video/subtitleripper/files/subtitleripper-0.3.4-libpng.patch
new file mode 100644
index 000000000000..e9869b3bd5dd
--- /dev/null
+++ b/media-video/subtitleripper/files/subtitleripper-0.3.4-libpng.patch
@@ -0,0 +1,25 @@
+diff -NrU5 subtitleripper.orig/spudec.c subtitleripper/spudec.c
+--- subtitleripper.orig/spudec.c 2009-05-20 03:06:23.000000000 -0600
++++ subtitleripper/spudec.c 2009-05-20 03:07:47.000000000 -0600
+@@ -34,17 +34,18 @@
+
+ #ifdef _HAVE_ZLIB_
+ #include <zlib.h>
+ #endif
+
++#ifdef _HAVE_PNG_
++#include <png.h>
++#endif
++
+ #ifdef _HAVE_LIB_PPM_
+ #include <netpbm/ppm.h>
+ #endif
+
+-#ifdef _HAVE_PNG_
+-#include "png.h"
+-#endif
+
+ static void spudec_handle_rest(spudec_handle_t *this);
+
+ // read a big endian 16 bit value
+ static inline unsigned int get_be16(const unsigned char *p)
diff --git a/media-video/subtitleripper/files/subtitleripper-0.3.4-linkingorder.patch b/media-video/subtitleripper/files/subtitleripper-0.3.4-linkingorder.patch
new file mode 100644
index 000000000000..7efe223460fc
--- /dev/null
+++ b/media-video/subtitleripper/files/subtitleripper-0.3.4-linkingorder.patch
@@ -0,0 +1,28 @@
+Index: subtitleripper/Makefile
+===================================================================
+--- subtitleripper.orig/Makefile
++++ subtitleripper/Makefile
+@@ -70,19 +70,19 @@ vobsub2pgm.o: vobsub2pgm.c vobsub.h spud
+ # Target
+ subtitle2pgm: subtitle2pgm.o spudec.o
+ @echo "Linking $@"
+- @$(CC) $(LIBS) $^ -o $@
++ @$(CC) $^ -o $@ $(LIBS)
+
+ subtitle2vobsub: subtitle2vobsub.o vobsub.o
+ @echo "Linking $@"
+- @$(CC) $(LIBS) $^ -o $@
++ @$(CC) $^ -o $@ $(LIBS)
+
+ srttool: srttool.o
+ @echo "Linking $@"
+- @$(CC) $(LIBS) -g $^ -o $@
++ @$(CC) -g $^ -o $@ $(LIBS)
+
+ vobsub2pgm: vobsub2pgm.o vobsub.o spudec.o
+ @echo "Linking $@"
+- @$(CC) $(LIBS) -g $^ -o $@
++ @$(CC) -g $^ -o $@ $(LIBS)
+
+ .PHONY: clean dist rpm
+ clean:
diff --git a/media-video/subtitleripper/files/subtitleripper-0.3.4-respect-ldflags.patch b/media-video/subtitleripper/files/subtitleripper-0.3.4-respect-ldflags.patch
new file mode 100644
index 000000000000..2af11d257929
--- /dev/null
+++ b/media-video/subtitleripper/files/subtitleripper-0.3.4-respect-ldflags.patch
@@ -0,0 +1,28 @@
+Index: subtitleripper/Makefile
+===================================================================
+--- subtitleripper.orig/Makefile
++++ subtitleripper/Makefile
+@@ -70,19 +70,19 @@ vobsub2pgm.o: vobsub2pgm.c vobsub.h spud
+ # Target
+ subtitle2pgm: subtitle2pgm.o spudec.o
+ @echo "Linking $@"
+- @$(CC) $^ -o $@ $(LIBS)
++ @$(CC) $(LDFLAGS) $^ -o $@ $(LIBS)
+
+ subtitle2vobsub: subtitle2vobsub.o vobsub.o
+ @echo "Linking $@"
+- @$(CC) $^ -o $@ $(LIBS)
++ @$(CC) $(LDFLAGS) $^ -o $@ $(LIBS)
+
+ srttool: srttool.o
+ @echo "Linking $@"
+- @$(CC) -g $^ -o $@ $(LIBS)
++ @$(CC) $(LDFLAGS) $^ -o $@ $(LIBS)
+
+ vobsub2pgm: vobsub2pgm.o vobsub.o spudec.o
+ @echo "Linking $@"
+- @$(CC) -g $^ -o $@ $(LIBS)
++ @$(CC) $(LDFLAGS) $^ -o $@ $(LIBS)
+
+ .PHONY: clean dist rpm
+ clean:
diff --git a/media-video/subtitleripper/metadata.xml b/media-video/subtitleripper/metadata.xml
new file mode 100644
index 000000000000..8eeb88921a30
--- /dev/null
+++ b/media-video/subtitleripper/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>video</herd>
+ <upstream>
+ <remote-id type="sourceforge">subtitleripper</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/subtitleripper/subtitleripper-0.3.4-r4.ebuild b/media-video/subtitleripper/subtitleripper-0.3.4-r4.ebuild
new file mode 100644
index 000000000000..616bb73638db
--- /dev/null
+++ b/media-video/subtitleripper/subtitleripper-0.3.4-r4.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit versionator eutils toolchain-funcs
+
+MY_PV="$(replace_version_separator 2 "-")"
+
+DESCRIPTION="DVD Subtitle Ripper for Linux"
+HOMEPAGE="http://subtitleripper.sourceforge.net/"
+LICENSE="GPL-2"
+KEYWORDS="amd64 ppc ppc64 x86"
+SRC_URI="mirror://sourceforge/${PN}/${PN}-${MY_PV}.tgz"
+SLOT="0"
+IUSE=""
+RDEPEND=">=media-libs/netpbm-10.41.0
+ media-libs/libpng
+ sys-libs/zlib
+ >=app-text/gocr-0.39"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${PN}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ # PPM library is libnetppm
+ sed -i -e "s:ppm:netpbm:g" Makefile
+ # fix for bug 210435
+ sed -i -e "s:#include <ppm.h>:#include <netpbm/ppm.h>:g" spudec.c subtitle2pgm.c
+ # we will install the gocrfilters into /usr/share/subtitleripper
+ sed -i -e 's:~/sourceforge/subtitleripper/src/:/usr/share/subtitleripper:' pgm2txt
+
+ epatch "${FILESDIR}/${P}-linkingorder.patch"
+ epatch "${FILESDIR}"/${P}-libpng.patch
+ epatch "${FILESDIR}"/${P}-glibc210.patch
+ # respect CC and LDFLAGS
+ sed -i -e "s:CC =.*:CC = $(tc-getCC):" \
+ -e "/^CFLAGS/s: = :& ${CFLAGS} :" "${S}"/Makefile
+ epatch "${FILESDIR}"/${P}-respect-ldflags.patch
+}
+
+src_install () {
+ dobin pgm2txt srttool subtitle2pgm subtitle2vobsub vobsub2pgm
+
+ insinto /usr/share/subtitleripper
+ doins gocrfilter_*.sed
+
+ dodoc ChangeLog README*
+}
diff --git a/media-video/super_demux/Manifest b/media-video/super_demux/Manifest
new file mode 100644
index 000000000000..d3166e2d6a8c
--- /dev/null
+++ b/media-video/super_demux/Manifest
@@ -0,0 +1 @@
+DIST super_demux-0.3.tgz 10884 RMD160 5a1f46cd9d51057cfb3909934b59d87e9b5c79de SHA1 e32cfed9507889ff369f0687f048d62613c29329 SHA256 189a4a2415afcaa2cdd0b188d537c1d2cc32e29e6d95da10dac4f1f339c1db76
diff --git a/media-video/super_demux/files/super_demux-0.3.diff b/media-video/super_demux/files/super_demux-0.3.diff
new file mode 100644
index 000000000000..80555cecdc71
--- /dev/null
+++ b/media-video/super_demux/files/super_demux-0.3.diff
@@ -0,0 +1,12 @@
+diff -Naur super_demux-0.3.orig/Makefile super_demux-0.3/Makefile
+--- super_demux-0.3.orig/Makefile 2004-12-15 22:01:31.000000000 +0100
++++ super_demux-0.3/Makefile 2007-10-06 16:58:19.000000000 +0200
+@@ -13,7 +13,7 @@
+ all:
+ $(CC) $(CFLAGS) -c $(SRC1)
+
+- $(CC) -o super_demux $(OBJECT1) $(LIBRARY)
++ $(CC) $(LDFLAGS) -o super_demux $(OBJECT1) $(LIBRARY)
+
+ # DEPENDENCIES
+ super_demux.o : super_demux.c
diff --git a/media-video/super_demux/metadata.xml b/media-video/super_demux/metadata.xml
new file mode 100644
index 000000000000..edccfe5754d2
--- /dev/null
+++ b/media-video/super_demux/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>video</herd>
+<maintainer>
+<email>media-video@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/media-video/super_demux/super_demux-0.3.ebuild b/media-video/super_demux/super_demux-0.3.ebuild
new file mode 100644
index 000000000000..e3746bf6f8c9
--- /dev/null
+++ b/media-video/super_demux/super_demux-0.3.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils toolchain-funcs flag-o-matic
+
+IUSE=""
+
+DESCRIPTION="DVB transport stream TS to ES demultiplexer"
+HOMEPAGE="http://panteltje.com/panteltje/dvd/"
+SRC_URI="http://panteltje.com/panteltje/dvd/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}.diff"
+}
+
+src_compile() {
+ append-flags -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" || die "emake failed"
+}
+
+src_install() {
+ dobin super_demux
+ dodoc CHANGES README
+}
diff --git a/media-video/tcmplex-panteltje/Manifest b/media-video/tcmplex-panteltje/Manifest
new file mode 100644
index 000000000000..fdf992d6e296
--- /dev/null
+++ b/media-video/tcmplex-panteltje/Manifest
@@ -0,0 +1 @@
+DIST tcmplex-panteltje-0.4.7.tgz 81185 RMD160 4d6378a4a7201f1f4a91974502d93d47cdf56286 SHA1 0cbfe1a8e126ac04d9e494df93265ffc38d36325 SHA256 29c1ea339551fa0acdf078e7a3dcaae857ba6b35bc3381f0741730d07f34380d
diff --git a/media-video/tcmplex-panteltje/metadata.xml b/media-video/tcmplex-panteltje/metadata.xml
new file mode 100644
index 000000000000..9f6437db2546
--- /dev/null
+++ b/media-video/tcmplex-panteltje/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>video</herd>
+<maintainer>
+ <email>lordvan@gentoo.org</email>
+</maintainer>
+<maintainer>
+ <email>hd_brummy@gentoo.org</email>
+ <name>Joerg Bornkessel</name>
+</maintainer>
+</pkgmetadata>
diff --git a/media-video/tcmplex-panteltje/tcmplex-panteltje-0.4.7.ebuild b/media-video/tcmplex-panteltje/tcmplex-panteltje-0.4.7.ebuild
new file mode 100644
index 000000000000..0ccfa0fe65c0
--- /dev/null
+++ b/media-video/tcmplex-panteltje/tcmplex-panteltje-0.4.7.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit eutils
+
+DESCRIPTION="audio video multiplexer for 8 audio channels"
+HOMEPAGE="http://panteltje.com/panteltje/dvd/"
+SRC_URI="http://panteltje.com/panteltje/dvd/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+src_prepare() {
+ sed -e "s:CFLAGS = -O2:CFLAGS +=:" \
+ -e "s:\$(LIBRARY):\$(LIBRARY) \$(LDFLAGS):" \
+ -i Makefile
+}
+
+src_install() {
+ dobin tcmplex-panteltje
+ dodoc CHANGES COPYRIGHT README
+}
diff --git a/media-video/tivodecode/Manifest b/media-video/tivodecode/Manifest
new file mode 100644
index 000000000000..93e98f0594ce
--- /dev/null
+++ b/media-video/tivodecode/Manifest
@@ -0,0 +1 @@
+DIST tivodecode-0.2pre4.tar.gz 124685 SHA256 788839cc4ad66f5b20792e166514411705e8564f9f050584c54c3f1f452e9cdf
diff --git a/media-video/tivodecode/metadata.xml b/media-video/tivodecode/metadata.xml
new file mode 100644
index 000000000000..a31d9764569d
--- /dev/null
+++ b/media-video/tivodecode/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>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">This software converts a .TiVo file (produced by the TiVoToGo functionality on recent TiVo software releases, or from files downloaded through the web interface) to a normal MPEG file.</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">tivodecode</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/tivodecode/tivodecode-0.2_pre4.ebuild b/media-video/tivodecode/tivodecode-0.2_pre4.ebuild
new file mode 100644
index 000000000000..2a9ba00b3671
--- /dev/null
+++ b/media-video/tivodecode/tivodecode-0.2_pre4.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils versionator
+
+MY_PV="$(delete_version_separator '_')"
+
+DESCRIPTION="TiVo File Decoder"
+HOMEPAGE="http://tivodecode.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}-${MY_PV}.tar.gz"
+LICENSE="BSD"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ dodoc README ChangeLog
+}
diff --git a/media-video/totem/Manifest b/media-video/totem/Manifest
new file mode 100644
index 000000000000..df6140552972
--- /dev/null
+++ b/media-video/totem/Manifest
@@ -0,0 +1,3 @@
+DIST totem-3.14.3.tar.xz 3171820 SHA256 a8eff72a83fe351e4421e37f920fc2869d6d1d76329a60045db43a12d0747400 SHA512 8e26742c370356882f14f8f17368ae80cc280bfc62d02f89128190c37a3085f44ba35d4cec102674341eb09a1ee6e8cc0f749ff52f2f722f5ea99cc22cd99c2f WHIRLPOOL 3f68866272b69c3868fc0fd1abbbb6b593ec05241f7cc7d2cb3373deb93fc1ffffe4ccc8bfbdcb3c8f0a88c820457ac5d04c94ef0c771cfb44471b11987955ae
+DIST totem-3.16.1.tar.xz 3165560 SHA256 c98d0006ece80f48f8e6bb6ed269857bad9746bf86669f212078c770441475da SHA512 1ccd62938aee2c13865c95188ccdb54771f0fb41f6d70856dbdd0bddf4c23945dff458452def18f1b7556ea159d3f0f40abaa56c9b1a833ca47968ee665c6a6d WHIRLPOOL f5e40a169e95e58d5dabf9842bce636640ab400dac8c1e60f1aac78d0be7a87e00ef2bb14c609a10df8e80aed85ba3c22ae28f64c98bd82c25760cd0dec448f0
+DIST totem-3.16.2.tar.xz 3172656 SHA256 8e9150d104499500939499e29d56b1593ca49777f35ad5a7a02192e23d811f32 SHA512 a7c85316252f657774000abbea8326214ccc275e15791d6b789993f295941d0d0c06889730207941d0df94c7a9178b663d4097cdcd18b80030421257936fc67a WHIRLPOOL b9b2ab49a2240765fc8cd7a5299eca97575f436af91d5da0b930c151788b17cc00cea358bdd171da32411f01f3ac77767b886adb3c188777f36f68b35f4147b7
diff --git a/media-video/totem/metadata.xml b/media-video/totem/metadata.xml
new file mode 100644
index 000000000000..c12849eff439
--- /dev/null
+++ b/media-video/totem/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>gnome</herd>
+ <herd>video</herd>
+ <herd>gstreamer</herd>
+ <longdescription>
+Totem is movie player for the GNOME desktop. It features a playlist, fullscreen mode, seek and volume controls, as well as a pretty complete keyboard navigation. It comes with added functionality such as a video thumbnailer for Nautilus, Nautilus properties tab and a webcam utility.
+ </longdescription>
+ <use>
+ <flag name="lirc">Enable support for controlling Totem with a remote control
+ using <pkg>app-misc/lirc</pkg></flag>
+ <flag name="nautilus">Enable the nautilus extension</flag>
+ <flag name="python">Build support for <pkg>dev-lang/python</pkg> plugins</flag>
+ <flag name="zeitgeist">Build the plugin to inject events to <pkg>gnome-extra/zeitgeist</pkg></flag>
+ </use>
+</pkgmetadata>
diff --git a/media-video/totem/totem-3.14.3.ebuild b/media-video/totem/totem-3.14.3.ebuild
new file mode 100644
index 000000000000..dd4b51c9291a
--- /dev/null
+++ b/media-video/totem/totem-3.14.3.ebuild
@@ -0,0 +1,141 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="yes"
+GNOME2_LA_PUNT="yes" # plugins are dlopened
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="threads"
+
+inherit autotools eutils gnome2 multilib python-single-r1
+
+DESCRIPTION="Media player for GNOME"
+HOMEPAGE="https://wiki.gnome.org/Apps/Videos"
+
+LICENSE="GPL-2+ LGPL-2+"
+SLOT="0"
+IUSE="+introspection lirc nautilus +python test zeitgeist"
+# see bug #359379
+REQUIRED_USE="
+ python? ( introspection ${PYTHON_REQUIRED_USE} )
+ zeitgeist? ( introspection )
+"
+
+KEYWORDS="amd64 ~arm ~ia64 ~ppc ~ppc64 x86 ~x86-fbsd"
+
+# TODO:
+# Cone (VLC) plugin needs someone with the right setup to test it
+#
+# FIXME:
+# Automagic tracker-0.9.0
+# Runtime dependency on gnome-session-2.91
+RDEPEND="
+ >=dev-libs/glib-2.35:2
+ >=x11-libs/gdk-pixbuf-2.23.0:2
+ >=x11-libs/gtk+-3.11.5:3[introspection?]
+ >=dev-libs/totem-pl-parser-3.10.1:0=[introspection?]
+ >=dev-libs/libpeas-1.1.0[gtk]
+ x11-libs/cairo
+ >=dev-libs/libxml2-2.6:2
+ >=media-libs/clutter-1.17.3:1.0[gtk]
+ >=media-libs/clutter-gst-1.5.5:2.0
+ >=media-libs/clutter-gtk-1.5.5:1.0
+ x11-libs/mx:1.0
+
+ >=media-libs/grilo-0.2.11:0.2[playlist]
+ media-plugins/grilo-plugins:0.2
+ >=media-libs/gstreamer-1.3.1:1.0
+ >=media-libs/gst-plugins-base-1.4.2:1.0[X,introspection?,pango]
+ media-libs/gst-plugins-good:1.0
+ media-plugins/gst-plugins-taglib:1.0
+ media-plugins/gst-plugins-meta:1.0
+
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libX11
+ >=x11-libs/libXxf86vm-1.0.1
+
+ gnome-base/gnome-desktop:3
+ gnome-base/gsettings-desktop-schemas
+ x11-themes/gnome-icon-theme-symbolic
+
+ introspection? ( >=dev-libs/gobject-introspection-0.6.7 )
+ lirc? ( app-misc/lirc )
+ nautilus? ( >=gnome-base/nautilus-2.91.3 )
+ python? (
+ ${PYTHON_DEPS}
+ >=dev-libs/libpeas-1.1.0[${PYTHON_USEDEP}]
+ >=dev-python/pygobject-2.90.3:3[${PYTHON_USEDEP}]
+ dev-python/pyxdg[${PYTHON_USEDEP}]
+ dev-python/dbus-python[${PYTHON_USEDEP}]
+ >=x11-libs/gtk+-3.5.2:3[introspection] )
+ zeitgeist? ( >=gnome-extra/zeitgeist-0.9.12 )
+"
+DEPEND="${RDEPEND}
+ app-text/docbook-xml-dtd:4.5
+ app-text/scrollkeeper
+ app-text/yelp-tools
+ dev-libs/appstream-glib
+ >=dev-util/gtk-doc-am-1.14
+ >=dev-util/intltool-0.40
+ sys-devel/gettext
+ x11-proto/xextproto
+ x11-proto/xproto
+ virtual/pkgconfig
+
+ dev-libs/gobject-introspection-common
+ gnome-base/gnome-common
+"
+# eautoreconf needs:
+# app-text/yelp-tools
+# dev-libs/gobject-introspection-common
+# gnome-base/gnome-common
+# docbook-xml-dtd is needed for user doc
+# Prevent dev-python/pylint dep, bug #482538
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # Prevent pylint usage by tests, bug #482538
+ sed -i -e 's/ check-pylint//' src/plugins/Makefile.plugins || die
+
+ eautoreconf
+ gnome2_src_prepare
+
+ # FIXME: upstream should provide a way to set GST_INSPECT, bug #358755 & co.
+ # gst-inspect causes sandbox violations when a plugin needs write access to
+ # /dev/dri/card* in its init phase.
+ sed -e "s|\(gst10_inspect=\).*|\1$(type -P true)|" \
+ -i configure || die
+}
+
+src_configure() {
+ # Disabled: sample-python, sample-vala
+ local plugins="apple-trailers,autoload-subtitles,brasero-disc-recorder"
+ plugins+=",chapters,im-status,gromit,media-player-keys,ontop"
+ plugins+=",properties,recent,rotation,screensaver,screenshot"
+ plugins+=",skipto,vimeo"
+ use lirc && plugins+=",lirc"
+ use nautilus && plugins+=",save-file"
+ use python && plugins+=",dbusservice,pythonconsole,opensubtitles"
+ use zeitgeist && plugins+=",zeitgeist-dp"
+
+ # pylint is checked unconditionally, but is only used for make check
+ # appstream-util overriding necessary until upstream fixes their macro
+ # to respect configure switch
+ gnome2_src_configure \
+ --disable-run-in-source-tree \
+ --disable-static \
+ --enable-easy-codec-installation \
+ --enable-vala \
+ $(use_enable introspection) \
+ $(use_enable nautilus) \
+ $(use_enable python) \
+ PYLINT=$(type -P true) \
+ VALAC=$(type -P true) \
+ APPSTREAM_UTIL=$(type -P true) \
+ --with-plugins=${plugins}
+}
diff --git a/media-video/totem/totem-3.16.1.ebuild b/media-video/totem/totem-3.16.1.ebuild
new file mode 100644
index 000000000000..b1df0c5079dc
--- /dev/null
+++ b/media-video/totem/totem-3.16.1.ebuild
@@ -0,0 +1,133 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="yes"
+GNOME2_LA_PUNT="yes" # plugins are dlopened
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="threads"
+
+inherit autotools eutils gnome2 multilib python-single-r1
+
+DESCRIPTION="Media player for GNOME"
+HOMEPAGE="https://wiki.gnome.org/Apps/Videos"
+
+LICENSE="GPL-2+ LGPL-2+"
+SLOT="0"
+IUSE="+introspection lirc nautilus +python test zeitgeist"
+# see bug #359379
+REQUIRED_USE="
+ python? ( introspection ${PYTHON_REQUIRED_USE} )
+ zeitgeist? ( introspection )
+"
+
+KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~ppc64 ~x86 ~x86-fbsd"
+
+# FIXME:
+# Runtime dependency on gnome-session-2.91
+RDEPEND="
+ >=dev-libs/glib-2.35:2
+ >=dev-libs/libpeas-1.1[gtk]
+ >=dev-libs/libxml2-2.6:2
+ >=dev-libs/totem-pl-parser-3.10.1:0=[introspection?]
+ >=media-libs/clutter-1.17.3:1.0[gtk]
+ >=media-libs/clutter-gst-2.99.2:3.0
+ >=media-libs/clutter-gtk-1.5.5:1.0
+ >=x11-libs/cairo-1.14
+ >=x11-libs/gdk-pixbuf-2.23.0:2
+ >=x11-libs/gtk+-3.16:3[introspection?]
+
+ >=media-libs/grilo-0.2.12:0.2[playlist]
+ media-plugins/grilo-plugins:0.2
+ >=media-libs/gstreamer-1.3.1:1.0
+ >=media-libs/gst-plugins-base-1.4.2:1.0[X,introspection?,pango]
+ media-libs/gst-plugins-good:1.0
+ media-plugins/gst-plugins-meta:1.0
+ media-plugins/gst-plugins-taglib:1.0
+
+ x11-libs/libX11
+
+ gnome-base/gnome-desktop:3
+ gnome-base/gsettings-desktop-schemas
+ x11-themes/gnome-icon-theme-symbolic
+
+ introspection? ( >=dev-libs/gobject-introspection-0.6.7 )
+ lirc? ( app-misc/lirc )
+ nautilus? ( >=gnome-base/nautilus-2.91.3 )
+ python? (
+ ${PYTHON_DEPS}
+ >=dev-libs/libpeas-1.1.0[${PYTHON_USEDEP}]
+ >=dev-python/pygobject-2.90.3:3[${PYTHON_USEDEP}]
+ dev-python/pyxdg[${PYTHON_USEDEP}]
+ dev-python/dbus-python[${PYTHON_USEDEP}]
+ >=x11-libs/gtk+-3.5.2:3[introspection] )
+ zeitgeist? ( >=gnome-extra/zeitgeist-0.9.12 )
+"
+DEPEND="${RDEPEND}
+ app-text/docbook-xml-dtd:4.5
+ app-text/scrollkeeper
+ app-text/yelp-tools
+ dev-libs/appstream-glib
+ >=dev-util/gtk-doc-am-1.14
+ >=dev-util/intltool-0.50.1
+ sys-devel/gettext
+ virtual/pkgconfig
+ x11-proto/xextproto
+ x11-proto/xproto
+
+ dev-libs/gobject-introspection-common
+ gnome-base/gnome-common
+"
+# eautoreconf needs:
+# app-text/yelp-tools
+# dev-libs/gobject-introspection-common
+# gnome-base/gnome-common
+# docbook-xml-dtd is needed for user doc
+# Prevent dev-python/pylint dep, bug #482538
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # Prevent pylint usage by tests, bug #482538
+ sed -i -e 's/ check-pylint//' src/plugins/Makefile.plugins || die
+
+ eautoreconf
+ gnome2_src_prepare
+
+ # FIXME: upstream should provide a way to set GST_INSPECT, bug #358755 & co.
+ # gst-inspect causes sandbox violations when a plugin needs write access to
+ # /dev/dri/card* in its init phase.
+ sed -e "s|\(gst10_inspect=\).*|\1$(type -P true)|" \
+ -i configure || die
+}
+
+src_configure() {
+ # Disabled: sample-python, sample-vala
+ local plugins="apple-trailers,autoload-subtitles,brasero-disc-recorder"
+ plugins+=",im-status,gromit,media-player-keys,ontop"
+ plugins+=",properties,recent,rotation,screensaver,screenshot"
+ plugins+=",skipto,vimeo"
+ use lirc && plugins+=",lirc"
+ use nautilus && plugins+=",save-file"
+ use python && plugins+=",dbusservice,pythonconsole,opensubtitles"
+ use zeitgeist && plugins+=",zeitgeist-dp"
+
+ # pylint is checked unconditionally, but is only used for make check
+ # appstream-util overriding necessary until upstream fixes their macro
+ # to respect configure switch
+ gnome2_src_configure \
+ --disable-run-in-source-tree \
+ --disable-static \
+ --enable-easy-codec-installation \
+ --enable-vala \
+ $(use_enable introspection) \
+ $(use_enable nautilus) \
+ $(use_enable python) \
+ PYLINT=$(type -P true) \
+ VALAC=$(type -P true) \
+ APPSTREAM_UTIL=$(type -P true) \
+ --with-plugins=${plugins}
+}
diff --git a/media-video/totem/totem-3.16.2.ebuild b/media-video/totem/totem-3.16.2.ebuild
new file mode 100644
index 000000000000..462e6c3bd351
--- /dev/null
+++ b/media-video/totem/totem-3.16.2.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="yes"
+GNOME2_LA_PUNT="yes" # plugins are dlopened
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="threads"
+
+inherit autotools eutils gnome2 multilib python-single-r1
+
+DESCRIPTION="Media player for GNOME"
+HOMEPAGE="https://wiki.gnome.org/Apps/Videos"
+
+LICENSE="GPL-2+ LGPL-2+"
+SLOT="0"
+IUSE="+introspection lirc nautilus +python test zeitgeist"
+# see bug #359379
+REQUIRED_USE="
+ python? ( introspection ${PYTHON_REQUIRED_USE} )
+ zeitgeist? ( introspection )
+"
+
+KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~ppc64 ~x86 ~x86-fbsd"
+
+# FIXME:
+# Runtime dependency on gnome-session-2.91
+RDEPEND="
+ >=dev-libs/glib-2.35:2[dbus]
+ >=dev-libs/libpeas-1.1[gtk]
+ >=dev-libs/libxml2-2.6:2
+ >=dev-libs/totem-pl-parser-3.10.1:0=[introspection?]
+ >=media-libs/clutter-1.17.3:1.0[gtk]
+ >=media-libs/clutter-gst-2.99.2:3.0
+ >=media-libs/clutter-gtk-1.5.5:1.0
+ >=x11-libs/cairo-1.14
+ >=x11-libs/gdk-pixbuf-2.23.0:2
+ >=x11-libs/gtk+-3.16:3[introspection?]
+
+ >=media-libs/grilo-0.2.12:0.2[playlist]
+ media-plugins/grilo-plugins:0.2
+ >=media-libs/gstreamer-1.3.1:1.0
+ >=media-libs/gst-plugins-base-1.4.2:1.0[X,introspection?,pango]
+ media-libs/gst-plugins-good:1.0
+ media-plugins/gst-plugins-meta:1.0
+ media-plugins/gst-plugins-taglib:1.0
+
+ x11-libs/libX11
+
+ gnome-base/gnome-desktop:3
+ gnome-base/gsettings-desktop-schemas
+ x11-themes/gnome-icon-theme-symbolic
+
+ introspection? ( >=dev-libs/gobject-introspection-0.6.7:= )
+ lirc? ( app-misc/lirc )
+ nautilus? ( >=gnome-base/nautilus-2.91.3 )
+ python? (
+ ${PYTHON_DEPS}
+ >=dev-libs/libpeas-1.1.0[${PYTHON_USEDEP}]
+ >=dev-python/pygobject-2.90.3:3[${PYTHON_USEDEP}]
+ dev-python/pyxdg[${PYTHON_USEDEP}]
+ dev-python/dbus-python[${PYTHON_USEDEP}]
+ >=x11-libs/gtk+-3.5.2:3[introspection] )
+ zeitgeist? ( >=gnome-extra/zeitgeist-0.9.12 )
+"
+DEPEND="${RDEPEND}
+ app-text/docbook-xml-dtd:4.5
+ app-text/yelp-tools
+ dev-libs/appstream-glib
+ >=dev-util/gtk-doc-am-1.14
+ >=dev-util/intltool-0.50.1
+ sys-devel/gettext
+ virtual/pkgconfig
+ x11-proto/xextproto
+ x11-proto/xproto
+
+ dev-libs/gobject-introspection-common
+ gnome-base/gnome-common
+"
+# eautoreconf needs:
+# app-text/yelp-tools
+# dev-libs/gobject-introspection-common
+# gnome-base/gnome-common
+# docbook-xml-dtd is needed for user doc
+# Prevent dev-python/pylint dep, bug #482538
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # Prevent pylint usage by tests, bug #482538
+ sed -i -e 's/ check-pylint//' src/plugins/Makefile.plugins || die
+
+ eautoreconf
+ gnome2_src_prepare
+
+ # FIXME: upstream should provide a way to set GST_INSPECT, bug #358755 & co.
+ # gst-inspect causes sandbox violations when a plugin needs write access to
+ # /dev/dri/card* in its init phase.
+ sed -e "s|\(gst10_inspect=\).*|\1$(type -P true)|" \
+ -i configure || die
+}
+
+src_configure() {
+ # Disabled: sample-python, sample-vala
+ local plugins="apple-trailers,autoload-subtitles,brasero-disc-recorder"
+ plugins+=",im-status,gromit,media-player-keys,ontop"
+ plugins+=",properties,recent,rotation,screensaver,screenshot"
+ plugins+=",skipto,vimeo"
+ use lirc && plugins+=",lirc"
+ use nautilus && plugins+=",save-file"
+ use python && plugins+=",dbusservice,pythonconsole,opensubtitles"
+ use zeitgeist && plugins+=",zeitgeist-dp"
+
+ # pylint is checked unconditionally, but is only used for make check
+ # appstream-util overriding necessary until upstream fixes their macro
+ # to respect configure switch
+ gnome2_src_configure \
+ --disable-run-in-source-tree \
+ --disable-static \
+ --enable-easy-codec-installation \
+ --enable-vala \
+ $(use_enable introspection) \
+ $(use_enable nautilus) \
+ $(use_enable python) \
+ PYLINT=$(type -P true) \
+ VALAC=$(type -P true) \
+ APPSTREAM_UTIL=$(type -P true) \
+ --with-plugins=${plugins}
+}
diff --git a/media-video/tovid/Manifest b/media-video/tovid/Manifest
new file mode 100644
index 000000000000..f315752bb944
--- /dev/null
+++ b/media-video/tovid/Manifest
@@ -0,0 +1,3 @@
+DIST tovid-0.34.tar.gz 512950 SHA256 f95d14ffbd2bd491751b529b09fb27ae45e24af1ad44c87b25bac9c1a184f4ee SHA512 4a8e25d6c579dc1b2fd34c467d7421faaf4fcaebdb25282856e25a05a00ad200385fea3c2bc0393ca85761cf12d70e760165f653911cf93ff7a22e85398e0593 WHIRLPOOL 282b20e94843428c2644190448f8e3a28ccdb914805914d5b6a8b33199285b60d7887afe32bf45eda879858f2f720d8c3555b689d5f8d16d34348c23e7acb9a0
+DIST tovid-0.34_p20120123.tar.gz 1008271 SHA256 941d3ca7aeb68fe306fb41aa1e97d4524f3ce8e340e83a249257f11755084186 SHA512 5ea57e4e87d86a48da1be5c5e82a3878ad358e431a14cfc79c2483f2df5469588d9d75e478eafa5a134e724f4737987007ae59e8afa66a215dfe954bbf5651b3 WHIRLPOOL 0480fe7855cd7bf0c54189db009a5f229f92bc838035f66f4acb7b577ddc3be4a023308336fdf365cbcba0d000f8f4eb45c79211fb1bb030c98c9b882e235007
+DIST tovid-0.35.2.tar.gz 527332 SHA256 c1be87b78832093dad31ef3613bbe31575ff60299850abb8bfd449b8b6ef0e89 SHA512 35e1d2a9584127498ee7d4b772fff0643860270dd38018a7fd9c20ef2875bf037235c341b0a001b0fe9a020fb74f9d348729dec0ccb7d97ccdeec508e6fa674e WHIRLPOOL 7c61a51b879bde0724973d2e166f7e1140544bf819c17dea962ca0f409420ccafe5589f7e5ad5f5b1306822cb26df10aa2573317778eed6292b37ed8e8602cc1
diff --git a/media-video/tovid/metadata.xml b/media-video/tovid/metadata.xml
new file mode 100644
index 000000000000..9955bf09d26e
--- /dev/null
+++ b/media-video/tovid/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>video</herd>
+ <upstream>
+ <remote-id type="google-code">tovid</remote-id>
+ <remote-id type="github">tovid-suite/tovid</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/tovid/tovid-0.34.ebuild b/media-video/tovid/tovid-0.34.ebuild
new file mode 100644
index 000000000000..a41044d1f9db
--- /dev/null
+++ b/media-video/tovid/tovid-0.34.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+PYTHON_DEPEND="2:2.6"
+PYTHON_USE_WITH="tk"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="3.*"
+
+inherit distutils gnome2-utils
+
+DESCRIPTION="A collection of DVD authoring tools"
+HOMEPAGE="http://tovid.wikia.com/wiki/Tovid_Wiki"
+SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="app-cdr/cdrdao
+ app-cdr/dvd+rw-tools
+ dev-python/pycairo
+ dev-tcltk/tix
+ || ( media-gfx/imagemagick[png] media-gfx/graphicsmagick[imagemagick,png] )
+ media-sound/normalize
+ >=media-sound/sox-14.3.2
+ media-video/dvdauthor
+ >=media-video/mjpegtools-2.0.0
+ >=media-video/mplayer-1.0_rc4_p20110101
+ >=media-video/transcode-1.1.5
+ media-video/vcdimager
+ sys-devel/bc
+ virtual/ffmpeg"
+DEPEND="app-text/txt2tags"
+
+DOCS="AUTHORS ChangeLog README"
+
+src_install() {
+ distutils_src_install
+
+ # punt at least .install.log
+ find "${ED}" -name '*.log' -exec rm -f {} +
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ distutils_pkg_postinst
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ distutils_pkg_postrm
+ gnome2_icon_cache_update
+}
diff --git a/media-video/tovid/tovid-0.34_p20120123.ebuild b/media-video/tovid/tovid-0.34_p20120123.ebuild
new file mode 100644
index 000000000000..200034c157bf
--- /dev/null
+++ b/media-video/tovid/tovid-0.34_p20120123.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# svn checkout http://tovid.googlecode.com/svn/trunk/tovid tovid-${PV}
+# note: see quickrelease file in the top source directory
+
+EAPI=3
+
+PYTHON_DEPEND="2:2.7"
+PYTHON_USE_WITH="tk"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="3.*"
+
+inherit distutils gnome2-utils
+
+DESCRIPTION="A collection of DVD authoring tools"
+HOMEPAGE="http://tovid.wikia.com/wiki/Tovid_Wiki"
+SRC_URI="http://dev.gentoo.org/~ssuominen/${P}.tar.gz"
+#SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="app-cdr/cdrdao
+ app-cdr/dvd+rw-tools
+ dev-python/pycairo
+ dev-tcltk/tix
+ || ( media-gfx/imagemagick[png] media-gfx/graphicsmagick[imagemagick,png] )
+ media-sound/normalize
+ >=media-sound/sox-14.3.2
+ media-video/dvdauthor
+ >=media-video/mjpegtools-2.0.0
+ >=media-video/mplayer-1.0_rc4_p20110101
+ >=media-video/transcode-1.1.5
+ media-video/vcdimager
+ sys-devel/bc
+ virtual/ffmpeg"
+DEPEND="app-text/txt2tags"
+
+DOCS="AUTHORS ChangeLog README"
+
+src_install() {
+ distutils_src_install
+
+ # punt at least .install.log
+ find "${ED}" -name '*.log' -exec rm -f {} +
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ distutils_pkg_postinst
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ distutils_pkg_postrm
+ gnome2_icon_cache_update
+}
diff --git a/media-video/tovid/tovid-0.35.2.ebuild b/media-video/tovid/tovid-0.35.2.ebuild
new file mode 100644
index 000000000000..77e7fd510d3d
--- /dev/null
+++ b/media-video/tovid/tovid-0.35.2.ebuild
@@ -0,0 +1,67 @@
+# 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="tk"
+DISTUTILS_SINGLE_IMPL=1
+
+inherit distutils-r1 gnome2-utils
+
+DESCRIPTION="A collection of DVD authoring tools"
+HOMEPAGE="http://tovid.wikia.com/wiki/Tovid_Wiki"
+SRC_URI="https://github.com/tovid-suite/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="app-cdr/dvd+rw-tools
+ dev-tcltk/tix
+ || ( media-gfx/imagemagick[png] media-gfx/graphicsmagick[imagemagick,png] )
+ media-sound/normalize
+ >=media-sound/sox-14.3.2
+ media-video/dvdauthor
+ >=media-video/mjpegtools-2.0.0
+ || ( >=media-video/mplayer-1.0_rc4_p20110101[dvdnav] media-video/mpv[libmpv,dvdnav] )
+ sys-devel/bc
+ virtual/ffmpeg"
+DEPEND="app-text/txt2tags"
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+}
+
+src_install() {
+ distutils-r1_src_install
+ python_optimize
+
+ # punt at least .install.log
+ find "${D}" -name '*.log' -exec rm -f {} +
+}
+
+pkg_preinst() {
+# REPLACING_VERSIONS="media-video/tovid-0.34"
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ elog "######################################################################"
+ elog "You can install media-video/transcode for additional functionality. It"
+ elog "will speed up the creation of animated submenus with faster seeking."
+ elog "Otherwise FFmpeg/Libav will be used."
+ elog "######################################################################"
+ elog""
+ gnome2_icon_cache_update
+}
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/media-video/transcode/Manifest b/media-video/transcode/Manifest
new file mode 100644
index 000000000000..e373218fea78
--- /dev/null
+++ b/media-video/transcode/Manifest
@@ -0,0 +1 @@
+DIST transcode-1.1.7.tar.bz2 2183627 SHA256 1e4e72d8e0dd62a80b8dd90699f5ca64c9b0cb37a5c9325c184166a9654f0a92 SHA512 d6f9674f3f5c3346194120585741ca660eb9ee133085cfce9460a14eaa0cf16fdf291761bd1db78e1c784e4d69a9481c7470cf8357dc7638ee3017620500f45f WHIRLPOOL ccd085b3a2638de92c2d589ff93038fed3d1a760d3513fde2946a805f7efed87813850f5e9eee306ed8efd3608ad9492d16f4c41bd6278379995deb22f92354e
diff --git a/media-video/transcode/files/transcode-1.1.7-ffmpeg-0.10.patch b/media-video/transcode/files/transcode-1.1.7-ffmpeg-0.10.patch
new file mode 100644
index 000000000000..ea737c8b0984
--- /dev/null
+++ b/media-video/transcode/files/transcode-1.1.7-ffmpeg-0.10.patch
@@ -0,0 +1,15 @@
+http://bugs.gentoo.org/401287
+
+--- filter/filter_pp.c
++++ filter/filter_pp.c
+@@ -38,8 +38,8 @@
+
+ /* FIXME: these use the filter ID as an index--the ID can grow
+ * arbitrarily large, so this needs to be fixed */
+-static pp_mode_t *mode[100];
+-static pp_context_t *context[100];
++static pp_mode *mode[100];
++static pp_context *context[100];
+ static int width[100], height[100];
+ static int pre[100];
+
diff --git a/media-video/transcode/files/transcode-1.1.7-ffmpeg-0.11.patch b/media-video/transcode/files/transcode-1.1.7-ffmpeg-0.11.patch
new file mode 100644
index 000000000000..871d073feade
--- /dev/null
+++ b/media-video/transcode/files/transcode-1.1.7-ffmpeg-0.11.patch
@@ -0,0 +1,303 @@
+Fix build with ffmpeg 0.11.
+https://bugs.gentoo.org/show_bug.cgi?id=419551
+Author: Brennan Shacklett
+
+diff -urN transcode-1.1.7-orig/encode/encode_lavc.c transcode-1.1.7/encode/encode_lavc.c
+--- transcode-1.1.7-orig/encode/encode_lavc.c 2011-11-19 08:50:27.000000000 -0800
++++ transcode-1.1.7/encode/encode_lavc.c 2012-07-03 10:47:03.528009149 -0700
+@@ -114,6 +114,7 @@
+
+ AVFrame ff_venc_frame;
+ AVCodecContext ff_vcontext;
++ AVDictionary ** ff_opts;
+
+ AVCodec *ff_vcodec;
+
+@@ -1036,14 +1037,10 @@
+ SET_FLAG(pd, mv0);
+ SET_FLAG(pd, cbp);
+ SET_FLAG(pd, qpel);
+- SET_FLAG(pd, alt);
+- SET_FLAG(pd, vdpart);
+ SET_FLAG(pd, naq);
+ SET_FLAG(pd, ilme);
+ SET_FLAG(pd, ildct);
+ SET_FLAG(pd, aic);
+- SET_FLAG(pd, aiv);
+- SET_FLAG(pd, umv);
+ SET_FLAG(pd, psnr);
+ SET_FLAG(pd, trell);
+ SET_FLAG(pd, gray);
+@@ -1064,6 +1061,18 @@
+ pd->ff_vcontext.flags |= CODEC_FLAG_INTERLACED_DCT;
+ pd->ff_vcontext.flags |= CODEC_FLAG_INTERLACED_ME;
+ }
++ if (pd->confdata.flags.alt) {
++ av_dict_set(pd->ff_opts, "alternate_scan", "1", 0);
++ }
++ if (pd->confdata.flags.vdpart) {
++ av_dict_set(pd->ff_opts, "data_partitioning", "1", 0);
++ }
++ if (pd->confdata.flags.umv) {
++ av_dict_set(pd->ff_opts, "umv", "1", 0);
++ }
++ if (pd->confdata.flags.aiv) {
++ av_dict_set(pd->ff_opts, "aiv", "1", 0);
++ }
+ }
+
+ #undef SET_FLAG
+@@ -1184,18 +1193,18 @@
+ { "mv0", PAUX(flags.mv0), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_MV0 },
+ { "cbp", PAUX(flags.cbp), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_CBP_RD },
+ { "qpel", PAUX(flags.qpel), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_QPEL },
+- { "alt", PAUX(flags.alt), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_ALT_SCAN },
++ { "alt", PAUX(flags.alt), TCCONF_TYPE_FLAG, 0, 0, 1 },
+ { "ilme", PAUX(flags.ilme), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_INTERLACED_ME },
+ { "ildct", PAUX(flags.ildct), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_INTERLACED_DCT },
+ { "naq", PAUX(flags.naq), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_NORMALIZE_AQP },
+- { "vdpart", PAUX(flags.vdpart), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_PART },
++ { "vdpart", PAUX(flags.vdpart), TCCONF_TYPE_FLAG, 0, 0, 1 },
+ #if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
+ { "aic", PAUX(flags.aic), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_H263P_AIC },
+ #else
+ { "aic", PAUX(flags.aic), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_AC_PRED },
+ #endif
+- { "aiv", PAUX(flags.aiv), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_H263P_AIV },
+- { "umv", PAUX(flags.umv), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_H263P_UMV },
++ { "aiv", PAUX(flags.aiv), TCCONF_TYPE_FLAG, 0, 0, 1 },
++ { "umv", PAUX(flags.umv), TCCONF_TYPE_FLAG, 0, 0, 1 },
+ { "psnr", PAUX(flags.psnr), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_PSNR },
+ #if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
+ { "trell", PAUX(flags.trell), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_TRELLIS_QUANT },
+@@ -1387,7 +1396,7 @@
+ pd->confdata.thread_count,
+ (pd->confdata.thread_count > 1) ?"s" :"");
+ }
+- avcodec_thread_init(&pd->ff_vcontext, pd->confdata.thread_count);
++ pd->ff_vcontext.thread_count = pd->confdata.thread_count;
+
+ pd->ff_vcodec = avcodec_find_encoder(FF_VCODEC_ID(pd));
+ if (pd->ff_vcodec == NULL) {
+@@ -1397,11 +1406,11 @@
+ }
+
+ TC_LOCK_LIBAVCODEC;
+- ret = avcodec_open(&pd->ff_vcontext, pd->ff_vcodec);
++ ret = avcodec_open2(&pd->ff_vcontext, pd->ff_vcodec, pd->ff_opts);
+ TC_UNLOCK_LIBAVCODEC;
+
+ if (ret < 0) {
+- tc_log_error(MOD_NAME, "avcodec_open() failed");
++ tc_log_error(MOD_NAME, "avcodec_open2() failed");
+ goto failed;
+ }
+ /* finally, pass up the extradata, if any */
+diff -urN transcode-1.1.7-orig/export/export_ffmpeg.c transcode-1.1.7/export/export_ffmpeg.c
+--- transcode-1.1.7-orig/export/export_ffmpeg.c 2011-11-19 08:50:27.000000000 -0800
++++ transcode-1.1.7/export/export_ffmpeg.c 2012-07-03 13:15:23.918019415 -0700
+@@ -122,6 +122,7 @@
+ static AVFrame *lavc_convert_frame = NULL;
+
+ static AVCodec *lavc_venc_codec = NULL;
++static AVDictionary **lavc_venc_opts = NULL;
+ static AVFrame *lavc_venc_frame = NULL;
+ static AVCodecContext *lavc_venc_context;
+ static avi_t *avifile = NULL;
+@@ -180,7 +181,7 @@
+
+
+ /* START: COPIED FROM ffmpeg-0.5_p22846(ffmpeg.c, cmdutils.c) */
+-#include <libavcodec/opt.h>
++#include <libavutil/opt.h>
+ #include <libavutil/avstring.h>
+ #include <libswscale/swscale.h>
+
+@@ -470,7 +471,6 @@
+ }
+
+ TC_LOCK_LIBAVCODEC;
+- avcodec_init();
+ avcodec_register_all();
+ TC_UNLOCK_LIBAVCODEC;
+
+@@ -634,7 +634,7 @@
+ lavc_param_rc_max_rate = 2516;
+ lavc_param_rc_buffer_size = 224 * 8;
+ lavc_param_rc_buffer_aggressivity = 99;
+- lavc_param_scan_offset = CODEC_FLAG_SVCD_SCAN_OFFSET;
++ lavc_param_scan_offset = 1;
+
+ break;
+
+@@ -674,7 +674,7 @@
+
+ lavc_param_rc_buffer_size = 224 * 8;
+ lavc_param_rc_buffer_aggressivity = 99;
+- lavc_param_scan_offset = CODEC_FLAG_SVCD_SCAN_OFFSET;
++ lavc_param_scan_offset = 1;
+
+ break;
+
+@@ -887,7 +887,7 @@
+ lavc_venc_context->thread_count);
+ }
+
+- avcodec_thread_init(lavc_venc_context, lavc_param_threads);
++ lavc_venc_context->thread_count = lavc_param_threads;
+
+ if (lavc_param_intra_matrix) {
+ char *tmp;
+@@ -1065,15 +1065,10 @@
+ lavc_venc_context->flags |= lavc_param_closedgop;
+ lavc_venc_context->flags |= lavc_param_trunc;
+ lavc_venc_context->flags |= lavc_param_aic;
+- lavc_venc_context->flags |= lavc_param_umv;
+ lavc_venc_context->flags |= lavc_param_v4mv;
+- lavc_venc_context->flags |= lavc_param_data_partitioning;
+ lavc_venc_context->flags |= lavc_param_cbp;
+ lavc_venc_context->flags |= lavc_param_mv0;
+ lavc_venc_context->flags |= lavc_param_qp_rd;
+- lavc_venc_context->flags |= lavc_param_scan_offset;
+- lavc_venc_context->flags |= lavc_param_ss;
+- lavc_venc_context->flags |= lavc_param_alt;
+ lavc_venc_context->flags |= lavc_param_ilme;
+ #if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
+ lavc_venc_context->flags |= lavc_param_trell;
+@@ -1203,7 +1198,6 @@
+
+ lavc_venc_context->me_method = ME_ZERO + lavc_param_vme;
+
+-
+ /* FIXME: transcode itself contains "broken ffmpeg default settings", thus we need to override them! */
+ if (lavc_param_video_preset) {
+ avcodec_opts[AVMEDIA_TYPE_VIDEO] = lavc_venc_context;
+@@ -1241,20 +1235,39 @@
+ }
+ }
+
++ if (lavc_param_scan_offset) {
++ av_dict_set(lavc_venc_opts, "scan_offset", "1", 0);
++ }
++
++ if (lavc_param_ss) {
++ av_dict_set(lavc_venc_opts, "structured_slices", "1", 0);
++ }
++
++ if (lavc_param_alt) {
++ av_dict_set(lavc_venc_opts, "alternate_scan", "1", 0);
++ }
++
++ if (lavc_param_umv) {
++ av_dict_set(lavc_venc_opts, "umv", "1", 0);
++ }
++
++ if (lavc_param_data_partitioning) {
++ av_dict_set(lavc_venc_opts, "vdpart", "1", 0);
++ }
+
+ //-- open codec --
+ //----------------
+ TC_LOCK_LIBAVCODEC;
+- ret = avcodec_open(lavc_venc_context, lavc_venc_codec);
++ ret = avcodec_open2(lavc_venc_context, lavc_venc_codec, lavc_venc_opts);
+ TC_UNLOCK_LIBAVCODEC;
+ if (ret < 0) {
+ tc_log_warn(MOD_NAME, "could not open FFMPEG codec");
+ return TC_EXPORT_ERROR;
+ }
+
+- if (lavc_venc_context->codec->encode == NULL) {
++ if (av_codec_is_encoder(lavc_venc_context->codec) == 0) {
+ tc_log_warn(MOD_NAME, "could not open FFMPEG codec "
+- "(lavc_venc_context->codec->encode == NULL)");
++ "(av_codec_is_encoder(lavc_venc_context->codec) == 0)");
+ return TC_EXPORT_ERROR;
+ }
+
+diff -urN transcode-1.1.7-orig/export/ffmpeg_cfg.c transcode-1.1.7/export/ffmpeg_cfg.c
+--- transcode-1.1.7-orig/export/ffmpeg_cfg.c 2011-11-19 08:50:27.000000000 -0800
++++ transcode-1.1.7/export/ffmpeg_cfg.c 2012-07-03 10:09:25.011003254 -0700
+@@ -160,9 +160,9 @@
+ {"vcelim", &lavc_param_chroma_elim_threshold, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -99, 99},
+ {"vpsize", &lavc_param_packet_size, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 0, 100000000},
+ {"vstrict", &lavc_param_strict, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -99, 99},
+- {"vdpart", &lavc_param_data_partitioning, TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_PART},
++ {"vdpart", &lavc_param_data_partitioning, TCCONF_TYPE_FLAG, 0, 0, 1},
+ // {"keyint", &lavc_param_keyint, TCCONF_TYPE_INT, 0, 0, 0},
+- {"gray", &lavc_param_gray, TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_PART},
++ {"gray", &lavc_param_gray, TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_GRAY},
+ {"mpeg_quant", &lavc_param_mpeg_quant, TCCONF_TYPE_FLAG, 0, 0, 1},
+ {"vi_qfactor", &lavc_param_vi_qfactor, TCCONF_TYPE_FLOAT, TCCONF_FLAG_RANGE, -31.0, 31.0},
+ {"vi_qoffset", &lavc_param_vi_qoffset, TCCONF_TYPE_FLOAT, TCCONF_FLAG_RANGE, 0.0, 31.0},
+@@ -211,7 +211,7 @@
+ #else
+ {"aic", &lavc_param_aic, TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_AC_PRED},
+ #endif
+- {"umv", &lavc_param_umv, TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_H263P_UMV},
++ {"umv", &lavc_param_umv, TCCONF_TYPE_FLAG, 0, 0, 1},
+ {"ibias", &lavc_param_ibias, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -512, 512},
+ {"pbias", &lavc_param_pbias, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -512, 512},
+ {"coder", &lavc_param_coder, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 0, 10},
+@@ -223,9 +223,9 @@
+ {"nr", &lavc_param_noise_reduction, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 0, 1000000},
+ {"qprd", &lavc_param_qp_rd, TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_QP_RD},
+ {"threads", &lavc_param_threads, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 16},
+- {"ss", &lavc_param_ss, TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_H263P_SLICE_STRUCT},
+- {"svcd_sof", &lavc_param_scan_offset, TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_SVCD_SCAN_OFFSET},
+- {"alt", &lavc_param_alt, TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_ALT_SCAN},
++ {"ss", &lavc_param_ss, TCCONF_TYPE_FLAG, 0, 0, 1},
++ {"svcd_sof", &lavc_param_scan_offset, TCCONF_TYPE_FLAG, 0, 0, 1},
++ {"alt", &lavc_param_alt, TCCONF_TYPE_FLAG, 0, 0, 1},
+ {"ilme", &lavc_param_ilme, TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_INTERLACED_ME},
+ {"inter_threshold", &lavc_param_inter_threshold, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -1000000, 1000000},
+ {"sc_threshold", &lavc_param_sc_threshold, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -1000000, 1000000},
+diff -urN transcode-1.1.7-orig/import/decode_lavc.c transcode-1.1.7/import/decode_lavc.c
+--- transcode-1.1.7-orig/import/decode_lavc.c 2011-11-19 08:50:27.000000000 -0800
++++ transcode-1.1.7/import/decode_lavc.c 2012-07-03 10:21:46.085005182 -0700
+@@ -181,7 +181,7 @@
+ #if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
+ lavc_dec_context->error_resilience = 2;
+ #else
+- lavc_dec_context->error_recognition = 2;
++ lavc_dec_context->err_recognition = 2;
+ #endif
+ lavc_dec_context->error_concealment = 3;
+ lavc_dec_context->workaround_bugs = FF_BUG_AUTODETECT;
+diff -urN transcode-1.1.7-orig/import/import_ffmpeg.c transcode-1.1.7/import/import_ffmpeg.c
+--- transcode-1.1.7-orig/import/import_ffmpeg.c 2011-11-19 08:50:27.000000000 -0800
++++ transcode-1.1.7/import/import_ffmpeg.c 2012-07-03 10:19:36.936004841 -0700
+@@ -314,7 +314,7 @@
+ #if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
+ lavc_dec_context->error_resilience = 2;
+ #else
+- lavc_dec_context->error_recognition = 2;
++ lavc_dec_context->err_recognition = 2;
+ #endif
+ lavc_dec_context->error_concealment = 3;
+ lavc_dec_context->workaround_bugs = FF_BUG_AUTODETECT;
+diff -urN transcode-1.1.7-orig/import/probe_ffmpeg.c transcode-1.1.7/import/probe_ffmpeg.c
+--- transcode-1.1.7-orig/import/probe_ffmpeg.c 2011-11-19 08:50:27.000000000 -0800
++++ transcode-1.1.7/import/probe_ffmpeg.c 2012-07-03 10:41:42.782008306 -0700
+@@ -99,8 +99,8 @@
+
+ TC_INIT_LIBAVCODEC;
+
+- ret = av_open_input_file(&lavf_dmx_context, ipipe->name,
+- NULL, 0, NULL);
++ ret = avformat_open_input(&lavf_dmx_context, ipipe->name,
++ NULL, NULL);
+ if (ret != 0) {
+ tc_log_error(__FILE__, "unable to open '%s'"
+ " (libavformat failure)",
+diff -urN transcode-1.1.7-orig/libtc/tcavcodec.h transcode-1.1.7/libtc/tcavcodec.h
+--- transcode-1.1.7-orig/libtc/tcavcodec.h 2011-11-19 08:50:27.000000000 -0800
++++ transcode-1.1.7/libtc/tcavcodec.h 2012-07-03 10:34:43.648007213 -0700
+@@ -53,7 +53,6 @@
+
+ #define TC_INIT_LIBAVCODEC do { \
+ TC_LOCK_LIBAVCODEC; \
+- avcodec_init(); \
+ avcodec_register_all(); \
+ TC_UNLOCK_LIBAVCODEC; \
+ } while (0)
diff --git a/media-video/transcode/files/transcode-1.1.7-ffmpeg.patch b/media-video/transcode/files/transcode-1.1.7-ffmpeg.patch
new file mode 100644
index 000000000000..be7a6cbaeb33
--- /dev/null
+++ b/media-video/transcode/files/transcode-1.1.7-ffmpeg.patch
@@ -0,0 +1,51 @@
+--- encode/encode_lavc.c
++++ encode/encode_lavc.c
+@@ -955,8 +955,6 @@
+ /*
+ * context *transcode* (not libavcodec) defaults
+ */
+- pd->ff_vcontext.mb_qmin = 2;
+- pd->ff_vcontext.mb_qmax = 31;
+ pd->ff_vcontext.max_qdiff = 3;
+ pd->ff_vcontext.max_b_frames = 0;
+ pd->ff_vcontext.me_range = 0;
+@@ -1116,8 +1114,6 @@
+ // handled by transcode core
+ // { "vqmax", PCTX(qmax), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 60 },
+ // handled by transcode core
+- { "mbqmin", PCTX(mb_qmin), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 60 },
+- { "mbqmax", PCTX(mb_qmax), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 60 },
+ { "lmin", PAUX(lmin), TCCONF_TYPE_FLOAT, TCCONF_FLAG_RANGE, 0.01, 255.0 },
+ { "lmax", PAUX(lmax), TCCONF_TYPE_FLOAT, TCCONF_FLAG_RANGE, 0.01, 255.0 },
+ { "vqdiff", PCTX(max_qdiff), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 31 },
+--- export/ffmpeg_cfg.c
++++ export/ffmpeg_cfg.c
+@@ -34,8 +34,6 @@
+ //int lavc_param_vqscale = 0;
+ //int lavc_param_vqmin = 2;
+ //int lavc_param_vqmax = 31;
+-int lavc_param_mb_qmin = 2;
+-int lavc_param_mb_qmax = 31;
+ int lavc_param_lmin = 2;
+ int lavc_param_lmax = 31;
+ int lavc_param_vqdiff = 3;
+@@ -143,8 +141,6 @@
+ // {"vqscale", &lavc_param_vqscale, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 31},
+ // {"vqmin", &lavc_param_vqmin, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 31},
+ // {"vqmax", &lavc_param_vqmax, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 31},
+- {"mbqmin", &lavc_param_mb_qmin, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 31},
+- {"mbqmax", &lavc_param_mb_qmax, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 31},
+ {"lmin", &lavc_param_lmin, TCCONF_TYPE_FLOAT, TCCONF_FLAG_RANGE, 0.01, 255.0},
+ {"lmax", &lavc_param_lmax, TCCONF_TYPE_FLOAT, TCCONF_FLAG_RANGE, 0.01, 255.0},
+ {"vqdiff", &lavc_param_vqdiff, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 31},
+--- export/ffmpeg_cfg.h
++++ export/ffmpeg_cfg.h
+@@ -13,8 +13,6 @@
+ //extern int lavc_param_vqscale;
+ //extern int lavc_param_vqmin;
+ //extern int lavc_param_vqmax;
+-extern int lavc_param_mb_qmin;
+-extern int lavc_param_mb_qmax;
+ extern int lavc_param_lmin;
+ extern int lavc_param_lmax;
+ extern int lavc_param_vqdiff;
diff --git a/media-video/transcode/files/transcode-1.1.7-ffmpeg2.patch b/media-video/transcode/files/transcode-1.1.7-ffmpeg2.patch
new file mode 100644
index 000000000000..9a770a6a0def
--- /dev/null
+++ b/media-video/transcode/files/transcode-1.1.7-ffmpeg2.patch
@@ -0,0 +1,557 @@
+Fix build with ffmpeg-2.0.
+Fix segfaults introduced by wrong usage of the av_dict API.
+Fix forgotten parts in the libav9 patch.
+
+Index: transcode-1.1.7/encode/encode_lavc.c
+===================================================================
+--- transcode-1.1.7.orig/encode/encode_lavc.c
++++ transcode-1.1.7/encode/encode_lavc.c
+@@ -74,6 +74,9 @@ struct tclavcconfigdata_ {
+ int lmin;
+ int lmax;
+ int me_method;
++ int luma_elim_threshold;
++ int chroma_elim_threshold;
++ int quantizer_noise_shaping;
+
+ /* same as above for flags */
+ struct {
+@@ -114,7 +117,7 @@ struct tclavcprivatedata_ {
+
+ AVFrame ff_venc_frame;
+ AVCodecContext ff_vcontext;
+- AVDictionary ** ff_opts;
++ AVDictionary * ff_opts;
+
+ AVCodec *ff_vcodec;
+
+@@ -165,6 +168,7 @@ static const TCCodecID tc_lavc_codecs_ou
+ TC_CODEC_ERROR
+ };
+
++#if LIBAVCODEC_VERSION_MAJOR < 55
+ static const enum CodecID tc_lavc_internal_codecs[] = {
+ CODEC_ID_MPEG1VIDEO, CODEC_ID_MPEG2VIDEO, CODEC_ID_MPEG4,
+ CODEC_ID_H263I, CODEC_ID_H263P,
+@@ -177,6 +181,20 @@ static const enum CodecID tc_lavc_intern
+ CODEC_ID_MSMPEG4V2, CODEC_ID_MSMPEG4V3,
+ CODEC_ID_NONE
+ };
++#else
++static const enum AVCodecID tc_lavc_internal_codecs[] = {
++ AV_CODEC_ID_MPEG1VIDEO, AV_CODEC_ID_MPEG2VIDEO, AV_CODEC_ID_MPEG4,
++ AV_CODEC_ID_H263I, AV_CODEC_ID_H263P,
++ AV_CODEC_ID_H264,
++ AV_CODEC_ID_WMV1, AV_CODEC_ID_WMV2,
++ AV_CODEC_ID_RV10,
++ AV_CODEC_ID_HUFFYUV, AV_CODEC_ID_FFV1,
++ AV_CODEC_ID_DVVIDEO,
++ AV_CODEC_ID_MJPEG, AV_CODEC_ID_LJPEG,
++ AV_CODEC_ID_MSMPEG4V2, AV_CODEC_ID_MSMPEG4V3,
++ AV_CODEC_ID_NONE
++};
++#endif
+
+ static const TCFormatID tc_lavc_formats[] = { TC_FORMAT_ERROR };
+
+@@ -938,7 +956,11 @@ static int tc_lavc_settings_from_vob(TCL
+ static void tc_lavc_config_defaults(TCLavcPrivateData *pd)
+ {
+ /* first of all reinitialize lavc data */
++#if LIBAVCODEC_VERSION_MAJOR < 55
+ avcodec_get_context_defaults(&pd->ff_vcontext);
++#else
++ avcodec_get_context_defaults3(&pd->ff_vcontext, NULL);
++#endif
+
+ pd->confdata.thread_count = 1;
+
+@@ -976,8 +998,8 @@ static void tc_lavc_config_defaults(TCLa
+ pd->ff_vcontext.mpeg_quant = 0;
+ pd->ff_vcontext.rc_initial_cplx = 0.0;
+ pd->ff_vcontext.rc_qsquish = 1.0;
+- pd->ff_vcontext.luma_elim_threshold = 0;
+- pd->ff_vcontext.chroma_elim_threshold = 0;
++ pd->confdata.luma_elim_threshold = 0;
++ pd->confdata.chroma_elim_threshold = 0;
+ pd->ff_vcontext.strict_std_compliance = 0;
+ pd->ff_vcontext.dct_algo = FF_DCT_AUTO;
+ pd->ff_vcontext.idct_algo = FF_IDCT_AUTO;
+@@ -1001,7 +1023,7 @@ static void tc_lavc_config_defaults(TCLa
+ pd->ff_vcontext.intra_quant_bias = FF_DEFAULT_QUANT_BIAS;
+ pd->ff_vcontext.inter_quant_bias = FF_DEFAULT_QUANT_BIAS;
+ pd->ff_vcontext.noise_reduction = 0;
+- pd->ff_vcontext.quantizer_noise_shaping = 0;
++ pd->confdata.quantizer_noise_shaping = 0;
+ pd->ff_vcontext.flags = 0;
+ }
+
+@@ -1033,7 +1055,6 @@ static void tc_lavc_dispatch_settings(TC
+
+ pd->ff_vcontext.flags = 0;
+ SET_FLAG(pd, mv0);
+- SET_FLAG(pd, cbp);
+ SET_FLAG(pd, qpel);
+ SET_FLAG(pd, naq);
+ SET_FLAG(pd, ilme);
+@@ -1060,17 +1081,29 @@ static void tc_lavc_dispatch_settings(TC
+ pd->ff_vcontext.flags |= CODEC_FLAG_INTERLACED_ME;
+ }
+ if (pd->confdata.flags.alt) {
+- av_dict_set(pd->ff_opts, "alternate_scan", "1", 0);
++ av_dict_set(&(pd->ff_opts), "alternate_scan", "1", 0);
+ }
+ if (pd->confdata.flags.vdpart) {
+- av_dict_set(pd->ff_opts, "data_partitioning", "1", 0);
++ av_dict_set(&(pd->ff_opts), "data_partitioning", "1", 0);
+ }
+ if (pd->confdata.flags.umv) {
+- av_dict_set(pd->ff_opts, "umv", "1", 0);
++ av_dict_set(&(pd->ff_opts), "umv", "1", 0);
+ }
+ if (pd->confdata.flags.aiv) {
+- av_dict_set(pd->ff_opts, "aiv", "1", 0);
++ av_dict_set(&(pd->ff_opts), "aiv", "1", 0);
+ }
++ if (pd->confdata.flags.cbp) {
++ av_dict_set(&(pd->ff_opts), "mpv_flags", "+cbp_rd", 0);
++ }
++
++ char buf[1024];
++#define set_dict_opt(val, opt) \
++ snprintf(buf, sizeof(buf), "%i", pd->confdata.val);\
++ av_dict_set(&(pd->ff_opts), opt, buf, 0)
++
++ set_dict_opt(luma_elim_threshold, "luma_elim_threshold");
++ set_dict_opt(chroma_elim_threshold, "chroma_elim_threshold");
++ set_dict_opt(quantizer_noise_shaping, "quantizer_noise_shaping");
+ }
+
+ #undef SET_FLAG
+@@ -1155,8 +1188,8 @@ static int tc_lavc_read_config(TCLavcPri
+ { "vrc_init_cplx", PCTX(rc_initial_cplx), TCCONF_TYPE_FLOAT, TCCONF_FLAG_RANGE, 0.0, 9999999.0 },
+ // { "vrc_init_occupancy", }, // not yet supported
+ { "vqsquish", PCTX(rc_qsquish), TCCONF_TYPE_FLOAT, TCCONF_FLAG_RANGE, 0.0, 99.0 },
+- { "vlelim", PCTX(luma_elim_threshold), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -99, 99 },
+- { "vcelim", PCTX(chroma_elim_threshold), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -99, 99 },
++ { "vlelim", PAUX(luma_elim_threshold), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -99, 99 },
++ { "vcelim", PAUX(chroma_elim_threshold), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -99, 99 },
+ { "vstrict", PCTX(strict_std_compliance), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -99, 99 },
+ { "vpsize", PCTX(rtp_payload_size), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 0, 100000000 },
+ { "dct", PCTX(dct_algo), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 0, 10 },
+@@ -1182,12 +1215,12 @@ static int tc_lavc_read_config(TCLavcPri
+ { "ibias", PCTX(intra_quant_bias), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -512, 512 },
+ { "pbias", PCTX(inter_quant_bias), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -512, 512 },
+ { "nr", PCTX(noise_reduction), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 0, 1000000},
+- { "qns", PCTX(quantizer_noise_shaping), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 0, 3 },
++ { "qns", PAUX(quantizer_noise_shaping), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 0, 3 },
+ { "inter_matrix_file", inter_matrix_file, TCCONF_TYPE_STRING, 0, 0, 0 },
+ { "intra_matrix_file", intra_matrix_file, TCCONF_TYPE_STRING, 0, 0, 0 },
+
+ { "mv0", PAUX(flags.mv0), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_MV0 },
+- { "cbp", PAUX(flags.cbp), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_CBP_RD },
++ { "cbp", PAUX(flags.cbp), TCCONF_TYPE_FLAG, 0, 0, 1 },
+ { "qpel", PAUX(flags.qpel), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_QPEL },
+ { "alt", PAUX(flags.alt), TCCONF_TYPE_FLAG, 0, 0, 1 },
+ { "ilme", PAUX(flags.ilme), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_INTERLACED_ME },
+@@ -1350,6 +1383,8 @@ static int tc_lavc_configure(TCModuleIns
+
+ pd = self->userdata;
+
++ pd->ff_opts = NULL;
++
+ pd->flush_flag = vob->encoder_flush;
+
+ /* FIXME: move into core? */
+@@ -1402,7 +1437,7 @@ static int tc_lavc_configure(TCModuleIns
+ }
+
+ TC_LOCK_LIBAVCODEC;
+- ret = avcodec_open2(&pd->ff_vcontext, pd->ff_vcodec, pd->ff_opts);
++ ret = avcodec_open2(&pd->ff_vcontext, pd->ff_vcodec, &(pd->ff_opts));
+ TC_UNLOCK_LIBAVCODEC;
+
+ if (ret < 0) {
+Index: transcode-1.1.7/export/export_ffmpeg.c
+===================================================================
+--- transcode-1.1.7.orig/export/export_ffmpeg.c
++++ transcode-1.1.7/export/export_ffmpeg.c
+@@ -122,7 +122,7 @@ static uint8_t *img_buffer =
+ static AVFrame *lavc_convert_frame = NULL;
+
+ static AVCodec *lavc_venc_codec = NULL;
+-static AVDictionary **lavc_venc_opts = NULL;
++static AVDictionary *lavc_venc_opts = NULL;
+ static AVFrame *lavc_venc_frame = NULL;
+ static AVCodecContext *lavc_venc_context;
+ static avi_t *avifile = NULL;
+@@ -486,7 +486,7 @@ MOD_init
+ codec->name, codec->fourCC, codec->comments);
+ }
+
+- lavc_venc_context = avcodec_alloc_context();
++ lavc_venc_context = avcodec_alloc_context3(lavc_venc_codec);
+ lavc_venc_frame = avcodec_alloc_frame();
+
+ lavc_convert_frame= avcodec_alloc_frame();
+@@ -838,8 +838,13 @@ MOD_init
+ lavc_venc_context->rc_strategy = lavc_param_vrc_strategy;
+ lavc_venc_context->b_frame_strategy = lavc_param_vb_strategy;
+ lavc_venc_context->b_quant_offset = lavc_param_vb_qoffset;
+- lavc_venc_context->luma_elim_threshold= lavc_param_luma_elim_threshold;
+- lavc_venc_context->chroma_elim_threshold= lavc_param_chroma_elim_threshold;
++
++ char buf[1024];
++#define set_dict_opt(val, opt) \
++ snprintf(buf, sizeof(buf), "%i", val); \
++ av_dict_set(&lavc_venc_opts, opt, buf, 0)
++ set_dict_opt(lavc_param_luma_elim_threshold, "luma_elim_threshold");
++ set_dict_opt(lavc_param_chroma_elim_threshold, "chroma_elim_threshold");
+ lavc_venc_context->rtp_payload_size = lavc_param_packet_size;
+ #if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
+ if (lavc_param_packet_size)
+@@ -870,7 +875,7 @@ MOD_init
+ lavc_venc_context->context_model = lavc_param_context;
+ lavc_venc_context->scenechange_threshold= lavc_param_sc_threshold;
+ lavc_venc_context->noise_reduction = lavc_param_noise_reduction;
+- lavc_venc_context->inter_threshold = lavc_param_inter_threshold;
++ set_dict_opt(lavc_param_inter_threshold, "inter_threshold");
+ lavc_venc_context->intra_dc_precision = lavc_param_intra_dc_precision;
+ lavc_venc_context->skip_top = lavc_param_skip_top;
+ lavc_venc_context->skip_bottom = lavc_param_skip_bottom;
+@@ -1066,9 +1071,11 @@ MOD_init
+ lavc_venc_context->flags |= lavc_param_trunc;
+ lavc_venc_context->flags |= lavc_param_aic;
+ lavc_venc_context->flags |= lavc_param_v4mv;
+- lavc_venc_context->flags |= lavc_param_cbp;
++ if(lavc_param_cbp)
++ av_dict_set(&lavc_venc_opts, "mpv_flags", "+cbp_rd", 0);
+ lavc_venc_context->flags |= lavc_param_mv0;
+- lavc_venc_context->flags |= lavc_param_qp_rd;
++ if(lavc_param_qp_rd)
++ av_dict_set(&lavc_venc_opts, "mpv_flags", "+qp_rd", 0);
+ lavc_venc_context->flags |= lavc_param_ilme;
+ #if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
+ lavc_venc_context->flags |= lavc_param_trell;
+@@ -1238,29 +1245,29 @@ MOD_init
+ }
+
+ if (lavc_param_scan_offset) {
+- av_dict_set(lavc_venc_opts, "scan_offset", "1", 0);
++ av_dict_set(&lavc_venc_opts, "scan_offset", "1", 0);
+ }
+
+ if (lavc_param_ss) {
+- av_dict_set(lavc_venc_opts, "structured_slices", "1", 0);
++ av_dict_set(&lavc_venc_opts, "structured_slices", "1", 0);
+ }
+
+ if (lavc_param_alt) {
+- av_dict_set(lavc_venc_opts, "alternate_scan", "1", 0);
++ av_dict_set(&lavc_venc_opts, "alternate_scan", "1", 0);
+ }
+
+ if (lavc_param_umv) {
+- av_dict_set(lavc_venc_opts, "umv", "1", 0);
++ av_dict_set(&lavc_venc_opts, "umv", "1", 0);
+ }
+
+ if (lavc_param_data_partitioning) {
+- av_dict_set(lavc_venc_opts, "vdpart", "1", 0);
++ av_dict_set(&lavc_venc_opts, "vdpart", "1", 0);
+ }
+
+ //-- open codec --
+ //----------------
+ TC_LOCK_LIBAVCODEC;
+- ret = avcodec_open2(lavc_venc_context, lavc_venc_codec, lavc_venc_opts);
++ ret = avcodec_open2(lavc_venc_context, lavc_venc_codec, &lavc_venc_opts);
+ TC_UNLOCK_LIBAVCODEC;
+ if (ret < 0) {
+ tc_log_warn(MOD_NAME, "could not open FFMPEG codec");
+Index: transcode-1.1.7/export/ffmpeg_cfg.c
+===================================================================
+--- transcode-1.1.7.orig/export/ffmpeg_cfg.c
++++ transcode-1.1.7/export/ffmpeg_cfg.c
+@@ -214,10 +214,10 @@ TCConfigEntry lavcopts_conf[]={
+ {"context", &lavc_param_context, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 0, 10},
+ {"intra_matrix", &lavc_param_intra_matrix, TCCONF_TYPE_STRING, 0, 0, 0},
+ {"inter_matrix", &lavc_param_inter_matrix, TCCONF_TYPE_STRING, 0, 0, 0},
+- {"cbp", &lavc_param_cbp, TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_CBP_RD},
++ {"cbp", &lavc_param_cbp, TCCONF_TYPE_FLAG, 0, 0, 1},
+ {"mv0", &lavc_param_mv0, TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_MV0},
+ {"nr", &lavc_param_noise_reduction, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 0, 1000000},
+- {"qprd", &lavc_param_qp_rd, TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_QP_RD},
++ {"qprd", &lavc_param_qp_rd, TCCONF_TYPE_FLAG, 0, 0, 1},
+ {"threads", &lavc_param_threads, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 16},
+ {"ss", &lavc_param_ss, TCCONF_TYPE_FLAG, 0, 0, 1},
+ {"svcd_sof", &lavc_param_scan_offset, TCCONF_TYPE_FLAG, 0, 0, 1},
+Index: transcode-1.1.7/export/aud_aux.c
+===================================================================
+--- transcode-1.1.7.orig/export/aud_aux.c
++++ transcode-1.1.7/export/aud_aux.c
+@@ -326,10 +326,18 @@ static int tc_audio_init_ffmpeg(vob_t *vob, int o_codec)
+
+ switch (o_codec) {
+ case 0x50:
++#if LIBAVCODEC_VERSION_MAJOR < 55
+ codeid = CODEC_ID_MP2;
++#else
++ codeid = AV_CODEC_ID_MP2;
++#endif
+ break;
+ case 0x2000:
++#if LIBAVCODEC_VERSION_MAJOR < 55
+ codeid = CODEC_ID_AC3;
++#else
++ codeid = AV_CODEC_ID_AC3;
++#endif
+ break;
+ default:
+ tc_warn("cannot init ffmpeg with %x", o_codec);
+@@ -346,7 +346,7 @@ static int tc_audio_init_ffmpeg(vob_t *v
+
+ //-- set parameters (bitrate, channels and sample-rate) --
+ //--------------------------------------------------------
+- avcodec_get_context_defaults(&mpa_ctx);
++ avcodec_get_context_defaults3(&mpa_ctx, mpa_codec);
+ #if LIBAVCODEC_VERSION_MAJOR < 53
+ mpa_ctx.codec_type = CODEC_TYPE_AUDIO;
+ #else
+@@ -359,7 +359,7 @@ static int tc_audio_init_ffmpeg(vob_t *v
+ //-- open codec --
+ //----------------
+ TC_LOCK_LIBAVCODEC;
+- ret = avcodec_open(&mpa_ctx, mpa_codec);
++ ret = avcodec_open2(&mpa_ctx, mpa_codec, NULL);
+ TC_UNLOCK_LIBAVCODEC;
+ if (ret < 0) {
+ tc_warn("tc_audio_init_ffmpeg: could not open %s codec !",
+@@ -371,7 +371,12 @@ static int tc_audio_init_ffmpeg(vob_t *vob, int o_codec)
+ TC_UNLOCK_LIBAVCODEC;
+ if (ret < 0) {
+ tc_warn("tc_audio_init_ffmpeg: could not open %s codec !",
+- (codeid == CODEC_ID_MP2) ?"mpa" :"ac3");
++#if LIBAVCODEC_VERSION_MAJOR < 55
++ (codeid == CODEC_ID_MP2)
++#else
++ (codeid == AV_CODEC_ID_MP2)
++#endif
++ ?"mpa" :"ac3");
+ return(TC_EXPORT_ERROR);
+ }
+
+Index: transcode-1.1.7/import/import_ffmpeg.c
+===================================================================
+--- transcode-1.1.7.orig/import/import_ffmpeg.c
++++ transcode-1.1.7/import/import_ffmpeg.c
+@@ -58,6 +58,7 @@ struct ffmpeg_codec {
+ };
+
+ // fourCC to ID mapping taken from MPlayer's codecs.conf
++#if LIBAVCODEC_VERSION_MAJOR < 55
+ static struct ffmpeg_codec ffmpeg_codecs[] = {
+ {CODEC_ID_MSMPEG4V1, TC_CODEC_ERROR, "mp41",
+ {"MP41", "DIV1", ""}},
+@@ -106,6 +107,56 @@ static struct ffmpeg_codec ffmpeg_codecs[] = {
+ {CODEC_ID_RAWVIDEO, TC_CODEC_YUV422P, "raw",
+ {"Y42B", ""}},
+ {0, TC_CODEC_UNKNOWN, NULL, {""}}};
++#else
++static struct ffmpeg_codec ffmpeg_codecs[] = {
++ {AV_CODEC_ID_MSMPEG4V1, TC_CODEC_ERROR, "mp41",
++ {"MP41", "DIV1", ""}},
++ {AV_CODEC_ID_MSMPEG4V2, TC_CODEC_MP42, "mp42",
++ {"MP42", "DIV2", ""}},
++ {AV_CODEC_ID_MSMPEG4V3, TC_CODEC_DIVX3, "msmpeg4",
++ {"DIV3", "DIV5", "AP41", "MPG3", "MP43", ""}},
++ {AV_CODEC_ID_MPEG4, TC_CODEC_DIVX4, "mpeg4",
++ {"DIVX", "XVID", "MP4S", "M4S2", "MP4V", "UMP4", "DX50", ""}},
++ {AV_CODEC_ID_MJPEG, TC_CODEC_MJPEG, "mjpeg",
++ {"MJPG", "AVRN", "AVDJ", "JPEG", "MJPA", "JFIF", ""}},
++ {AV_CODEC_ID_MPEG1VIDEO, TC_CODEC_MPG1, "mpeg1video",
++ {"MPG1", ""}},
++ {AV_CODEC_ID_DVVIDEO, TC_CODEC_DV, "dvvideo",
++ {"DVSD", ""}},
++ {AV_CODEC_ID_WMV1, TC_CODEC_WMV1, "wmv1",
++ {"WMV1", ""}},
++ {AV_CODEC_ID_WMV2, TC_CODEC_WMV2, "wmv2",
++ {"WMV2", ""}},
++ {AV_CODEC_ID_HUFFYUV, TC_CODEC_HUFFYUV, "hfyu",
++ {"HFYU", ""}},
++ {AV_CODEC_ID_H263I, TC_CODEC_H263I, "h263i",
++ {"I263", ""}},
++ {AV_CODEC_ID_H263P, TC_CODEC_H263P, "h263p",
++ {"H263", "U263", "VIV1", ""}},
++ {AV_CODEC_ID_H264, TC_CODEC_H264, "h264",
++ {"H264", "h264", "X264", "x264", "avc1", ""}},
++ {AV_CODEC_ID_RV10, TC_CODEC_RV10, "rv10",
++ {"RV10", "RV13", ""}},
++ {AV_CODEC_ID_SVQ1, TC_CODEC_SVQ1, "svq1",
++ {"SVQ1", ""}},
++ {AV_CODEC_ID_SVQ3, TC_CODEC_SVQ3, "svq3",
++ {"SVQ3", ""}},
++ {AV_CODEC_ID_MPEG2VIDEO, TC_CODEC_MPEG2, "mpeg2video",
++ {"MPG2", ""}},
++ {AV_CODEC_ID_MPEG2VIDEO, TC_CODEC_MPEG, "mpeg2video",
++ {"MPG2", ""}},
++ {AV_CODEC_ID_ASV1, TC_CODEC_ASV1, "asv1",
++ {"ASV1", ""}},
++ {AV_CODEC_ID_ASV2, TC_CODEC_ASV2, "asv2",
++ {"ASV2", ""}},
++ {AV_CODEC_ID_FFV1, TC_CODEC_FFV1, "ffv1",
++ {"FFV1", ""}},
++ {AV_CODEC_ID_RAWVIDEO, TC_CODEC_YUV420P, "raw",
++ {"I420", "IYUV", ""}},
++ {AV_CODEC_ID_RAWVIDEO, TC_CODEC_YUV422P, "raw",
++ {"Y42B", ""}},
++ {0, TC_CODEC_UNKNOWN, NULL, {""}}};
++#endif
+
+ #define BUFFER_SIZE SIZE_RGB_FRAME
+
+@@ -302,7 +302,7 @@ do_avi:
+
+ // Set these to the expected values so that ffmpeg's decoder can
+ // properly detect interlaced input.
+- lavc_dec_context = avcodec_alloc_context();
++ lavc_dec_context = avcodec_alloc_context3(lavc_dec_codec);
+ if (lavc_dec_context == NULL) {
+ tc_log_error(MOD_NAME, "Could not allocate enough memory.");
+ return TC_IMPORT_ERROR;
+@@ -324,6 +375,7 @@ do_avi:
+ // XXX: some codecs need extra data
+ switch (codec->id)
+ {
++#if LIBAVCODEC_VERSION_MAJOR < 55
+ case CODEC_ID_MJPEG: extra_data_size = 28; break;
+ case CODEC_ID_LJPEG: extra_data_size = 28; break;
+ case CODEC_ID_HUFFYUV: extra_data_size = 1000; break;
+@@ -331,6 +383,15 @@ do_avi:
+ case CODEC_ID_ASV2: extra_data_size = 8; break;
+ case CODEC_ID_WMV1: extra_data_size = 4; break;
+ case CODEC_ID_WMV2: extra_data_size = 4; break;
++#else
++ case AV_CODEC_ID_MJPEG: extra_data_size = 28; break;
++ case AV_CODEC_ID_LJPEG: extra_data_size = 28; break;
++ case AV_CODEC_ID_HUFFYUV: extra_data_size = 1000; break;
++ case AV_CODEC_ID_ASV1: extra_data_size = 8; break;
++ case AV_CODEC_ID_ASV2: extra_data_size = 8; break;
++ case AV_CODEC_ID_WMV1: extra_data_size = 4; break;
++ case AV_CODEC_ID_WMV2: extra_data_size = 4; break;
++#endif
+ default: extra_data_size = 0; break;
+ }
+
+@@ -344,7 +344,7 @@ do_avi:
+ }
+
+ TC_LOCK_LIBAVCODEC;
+- ret = avcodec_open(lavc_dec_context, lavc_dec_codec);
++ ret = avcodec_open2(lavc_dec_context, lavc_dec_codec, NULL);
+ TC_UNLOCK_LIBAVCODEC;
+ if (ret < 0) {
+ tc_log_warn(MOD_NAME, "Could not initialize the '%s' codec.",
+@@ -360,7 +421,11 @@ do_avi:
+ frame_size = x_dim*y_dim + 2*UV_PLANE_SIZE(IMG_YUV_DEFAULT,x_dim,y_dim);
+
+ // we adapt the color space
++#if LIBAVCODEC_VERSION_MAJOR < 55
+ if(codec->id == CODEC_ID_MJPEG) {
++#else
++ if(codec->id == AV_CODEC_ID_MJPEG) {
++#endif
+ enable_levels_filter();
+ }
+ break;
+@@ -434,7 +499,11 @@ do_dv:
+ }
+
+ // we adapt the color space
++#if LIBAVCODEC_VERSION_MAJOR < 55
+ if(codec->id == CODEC_ID_MJPEG) {
++#else
++ if(codec->id == AV_CODEC_ID_MJPEG) {
++#endif
+ enable_levels_filter();
+ }
+
+@@ -504,13 +573,25 @@ MOD_decode {
+ int bkey = 0;
+
+ // check for keyframes
++#if LIBAVCODEC_VERSION_MAJOR < 55
+ if (codec->id == CODEC_ID_MSMPEG4V3) {
++#else
++ if (codec->id == AV_CODEC_ID_MSMPEG4V3) {
++#endif
+ if (divx3_is_key(buffer)) bkey = 1;
+ }
++#if LIBAVCODEC_VERSION_MAJOR < 55
+ else if (codec->id == CODEC_ID_MPEG4) {
++#else
++ else if (codec->id == AV_CODEC_ID_MPEG4) {
++#endif
+ if (mpeg4_is_key(buffer, bytes_read)) bkey = 1;
+ }
++#if LIBAVCODEC_VERSION_MAJOR < 55
+ else if (codec->id == CODEC_ID_MJPEG) {
++#else
++ else if (codec->id == AV_CODEC_ID_MJPEG) {
++#endif
+ bkey = 1;
+ }
+
+--- a/import/decode_lavc.c
++++ b/import/decode_lavc.c
+@@ -57,6 +57,7 @@ struct ffmpeg_codec {
+ };
+
+ // fourCC to ID mapping taken from MPlayer's codecs.conf
++#if LIBAVCODEC_VERSION_MAJOR < 55
+ static struct ffmpeg_codec ffmpeg_codecs[] = {
+ {CODEC_ID_MSMPEG4V1, TC_CODEC_ERROR, "mp41",
+ {"MP41", "DIV1", ""}},
+@@ -91,6 +92,42 @@ static struct ffmpeg_codec ffmpeg_codecs[] = {
+ {CODEC_ID_MPEG2VIDEO, TC_CODEC_MPEG2, "mpeg2video",
+ {"MPG2", ""}},
+ {0, TC_CODEC_UNKNOWN, NULL, {""}}};
++#else
++static struct ffmpeg_codec ffmpeg_codecs[] = {
++ {AV_CODEC_ID_MSMPEG4V1, TC_CODEC_ERROR, "mp41",
++ {"MP41", "DIV1", ""}},
++ {AV_CODEC_ID_MSMPEG4V2, TC_CODEC_MP42, "mp42",
++ {"MP42", "DIV2", ""}},
++ {AV_CODEC_ID_MSMPEG4V3, TC_CODEC_DIVX3, "msmpeg4",
++ {"DIV3", "DIV5", "AP41", "MPG3", "MP43", ""}},
++ {AV_CODEC_ID_MPEG4, TC_CODEC_DIVX4, "mpeg4",
++ {"DIVX", "XVID", "MP4S", "M4S2", "MP4V", "UMP4", "DX50", ""}},
++ {AV_CODEC_ID_MJPEG, TC_CODEC_MJPEG, "mjpeg",
++ {"MJPG", "AVRN", "AVDJ", "JPEG", "MJPA", "JFIF", ""}},
++ {AV_CODEC_ID_MPEG1VIDEO, TC_CODEC_MPEG1VIDEO, "mpeg1video",
++ {"MPG1", ""}},
++ {AV_CODEC_ID_DVVIDEO, TC_CODEC_DV, "dvvideo",
++ {"DVSD", ""}},
++ {AV_CODEC_ID_WMV1, TC_CODEC_WMV1, "wmv1",
++ {"WMV1", ""}},
++ {AV_CODEC_ID_WMV2, TC_CODEC_WMV2, "wmv2",
++ {"WMV2", ""}},
++ {AV_CODEC_ID_HUFFYUV, TC_CODEC_HUFFYUV, "hfyu",
++ {"HFYU", ""}},
++ {AV_CODEC_ID_H263I, TC_CODEC_H263I, "h263i",
++ {"I263", ""}},
++ {AV_CODEC_ID_H263P, TC_CODEC_H263P, "h263p",
++ {"H263", "U263", "VIV1", ""}},
++ {AV_CODEC_ID_RV10, TC_CODEC_RV10, "rv10",
++ {"RV10", "RV13", ""}},
++ {AV_CODEC_ID_SVQ1, TC_CODEC_SVQ1, "svq1",
++ {"SVQ1", ""}},
++ {AV_CODEC_ID_SVQ3, TC_CODEC_SVQ3, "svq3",
++ {"SVQ3", ""}},
++ {AV_CODEC_ID_MPEG2VIDEO, TC_CODEC_MPEG2, "mpeg2video",
++ {"MPG2", ""}},
++ {0, TC_CODEC_UNKNOWN, NULL, {""}}};
++#endif
+
+
+ static struct ffmpeg_codec *find_ffmpeg_codec_id(unsigned int transcode_id)
diff --git a/media-video/transcode/files/transcode-1.1.7-ffmpeg24.patch b/media-video/transcode/files/transcode-1.1.7-ffmpeg24.patch
new file mode 100644
index 000000000000..57a91774abc5
--- /dev/null
+++ b/media-video/transcode/files/transcode-1.1.7-ffmpeg24.patch
@@ -0,0 +1,18 @@
+https://bugs.gentoo.org/show_bug.cgi?id=520190
+
+Index: transcode-1.1.7/import/probe_ffmpeg.c
+===================================================================
+--- transcode-1.1.7.orig/import/probe_ffmpeg.c
++++ transcode-1.1.7/import/probe_ffmpeg.c
+@@ -120,7 +120,11 @@ void probe_ffmpeg(info_t *ipipe)
+
+ translate_info(lavf_dmx_context, ipipe->probe_info);
+
++#if LIBAVFORMAT_VERSION_INT > AV_VERSION_INT(53,25,0)
++ avformat_close_input(&lavf_dmx_context);
++#else
+ av_close_input_file(lavf_dmx_context);
++#endif
+ return;
+ }
+
diff --git a/media-video/transcode/files/transcode-1.1.7-freetype251.patch b/media-video/transcode/files/transcode-1.1.7-freetype251.patch
new file mode 100644
index 000000000000..59c6ab35a514
--- /dev/null
+++ b/media-video/transcode/files/transcode-1.1.7-freetype251.patch
@@ -0,0 +1,12 @@
+--- transcode-1.1.7/filter/subtitler/load_font.c
++++ transcode-1.1.7/filter/subtitler/load_font.c
+@@ -47,8 +47,8 @@
+ // FreeType specific includes
+ #include <ft2build.h>
+ #include FT_FREETYPE_H
++#include FT_GLYPH_H
+
+-#include <freetype/ftglyph.h>
+
+ /**
+ * @file bswap.h
diff --git a/media-video/transcode/files/transcode-1.1.7-libav-10.patch b/media-video/transcode/files/transcode-1.1.7-libav-10.patch
new file mode 100644
index 000000000000..1f4a24039d79
--- /dev/null
+++ b/media-video/transcode/files/transcode-1.1.7-libav-10.patch
@@ -0,0 +1,36 @@
+fix building w/libav-10
+
+https://wiki.libav.org/Migration/10
+
+--- a/filter/filter_resample.c
++++ b/filter/filter_resample.c
+@@ -37,6 +37,7 @@
+ #include "libtc/optstr.h"
+ #include "libtc/tcavcodec.h"
+ #include "libtc/tcmodule-plugin.h"
++#include <libavresample/avresample.h>
+
+
+ typedef struct {
+@@ -45,7 +46,7 @@ typedef struct {
+
+ int bytes_per_sample;
+
+- ReSampleContext *resample_ctx;
++ AVAudioResampleContext *resample_ctx;
+ } ResamplePrivateData;
+
+ static const char resample_help[] = ""
+--- a/import/probe_ffmpeg.c
++++ b/import/probe_ffmpeg.c
+@@ -51,8 +51,8 @@ static void translate_info(const AVFormatContext *ctx, ProbeInfo *info)
+ info->bitrate = st->codec->bit_rate / 1000;
+ info->width = st->codec->width;
+ info->height = st->codec->height;
+- if (st->r_frame_rate.num > 0 && st->r_frame_rate.den > 0) {
+- info->fps = av_q2d(st->r_frame_rate);
++ if (st->avg_frame_rate.num > 0 && st->avg_frame_rate.den > 0) {
++ info->fps = av_q2d(st->avg_frame_rate);
+ } else {
+ /* watch out here */
+ info->fps = 1.0/av_q2d(st->codec->time_base);
diff --git a/media-video/transcode/files/transcode-1.1.7-libav-9.patch b/media-video/transcode/files/transcode-1.1.7-libav-9.patch
new file mode 100644
index 000000000000..9f2d2351f4f0
--- /dev/null
+++ b/media-video/transcode/files/transcode-1.1.7-libav-9.patch
@@ -0,0 +1,31 @@
+--- ./import/probe_ffmpeg.c.original 2013-04-22 20:04:51.058081388 +0200
++++ ./import/probe_ffmpeg.c 2013-04-22 20:05:25.744081897 +0200
+@@ -109,7 +109,7 @@ void probe_ffmpeg(info_t *ipipe)
+ return;
+ }
+
+- ret = av_find_stream_info(lavf_dmx_context);
++ ret = avformat_find_stream_info(lavf_dmx_context, NULL);
+ if (ret < 0) {
+ tc_log_error(__FILE__, "unable to fetch informations from '%s'"
+ " (libavformat failure)",
+--- ./import/decode_lavc.c.original 2013-04-22 20:06:17.260082652 +0200
++++ ./import/decode_lavc.c 2013-04-22 20:07:47.564083975 +0200
+@@ -170,7 +170,7 @@ void decode_lavc(decode_t *decode)
+
+ // Set these to the expected values so that ffmpeg's decoder can
+ // properly detect interlaced input.
+- lavc_dec_context = avcodec_alloc_context();
++ lavc_dec_context = avcodec_alloc_context3(NULL);
+ if (lavc_dec_context == NULL) {
+ tc_log_error(__FILE__, "Could not allocate enough memory.");
+ goto decoder_error;
+@@ -186,7 +186,7 @@ void decode_lavc(decode_t *decode)
+ lavc_dec_context->error_concealment = 3;
+ lavc_dec_context->workaround_bugs = FF_BUG_AUTODETECT;
+
+- if (avcodec_open(lavc_dec_context, lavc_dec_codec) < 0) {
++ if (avcodec_open2(lavc_dec_context, lavc_dec_codec, NULL) < 0) {
+ tc_log_error(__FILE__, "Could not initialize the '%s' codec.",
+ codec->name);
+ goto decoder_error;
diff --git a/media-video/transcode/files/transcode-1.1.7-preset-force.patch b/media-video/transcode/files/transcode-1.1.7-preset-force.patch
new file mode 100644
index 000000000000..0d1da8b4f666
--- /dev/null
+++ b/media-video/transcode/files/transcode-1.1.7-preset-force.patch
@@ -0,0 +1,28 @@
+Do not force using a preset. Do not try to open non-existant preset by default.
+
+Index: transcode-1.1.7/export/export_ffmpeg.c
+===================================================================
+--- transcode-1.1.7.orig/export/export_ffmpeg.c
++++ transcode-1.1.7/export/export_ffmpeg.c
+@@ -1206,7 +1206,7 @@ MOD_init
+ lavc_venc_context->me_method = ME_ZERO + lavc_param_vme;
+
+ /* FIXME: transcode itself contains "broken ffmpeg default settings", thus we need to override them! */
+- if (lavc_param_video_preset) {
++ if (lavc_param_video_preset && strcmp(lavc_param_video_preset, "none")) {
+ avcodec_opts[AVMEDIA_TYPE_VIDEO] = lavc_venc_context;
+ video_codec_name = av_strdup(ffmpeg_codec_name(codec->name));
+
+Index: transcode-1.1.7/export/ffmpeg_cfg.c
+===================================================================
+--- transcode-1.1.7.orig/export/ffmpeg_cfg.c
++++ transcode-1.1.7/export/ffmpeg_cfg.c
+@@ -124,7 +124,7 @@ int lavc_param_gmc = 0;
+ //int lavc_param_atag = 0;
+ //int lavc_param_abitrate = 224;
+
+-char *lavc_param_video_preset = "medium";
++char *lavc_param_video_preset = "none";
+ char *lavc_param_ffmpeg_datadir = "/usr/share/ffmpeg";
+
+ TCConfigEntry lavcopts_conf[]={
diff --git a/media-video/transcode/files/transcode-1.1.7-preset-free.patch b/media-video/transcode/files/transcode-1.1.7-preset-free.patch
new file mode 100644
index 000000000000..00494b94ba9f
--- /dev/null
+++ b/media-video/transcode/files/transcode-1.1.7-preset-free.patch
@@ -0,0 +1,34 @@
+Fix invalid free when preset file not found
+https://bugs.gentoo.org/show_bug.cgi?id=322945
+Author: Brennan Shacklett
+
+diff -urN transcode-1.1.7-orig/export/export_ffmpeg.c transcode-1.1.7/export/export_ffmpeg.c
+--- transcode-1.1.7-orig/export/export_ffmpeg.c 2011-11-19 08:50:27.000000000 -0800
++++ transcode-1.1.7/export/export_ffmpeg.c 2012-07-03 20:07:05.669083945 -0700
+@@ -321,7 +321,7 @@
+ }
+
+ if(!f){
+- fprintf(stderr, "File for preset '%s' not found\n", arg);
++ tc_log_error(MOD_NAME, "File for preset '%s' not found", arg);
+ av_exit(1);
+ }
+
+@@ -1207,7 +1207,7 @@
+ /* FIXME: transcode itself contains "broken ffmpeg default settings", thus we need to override them! */
+ if (lavc_param_video_preset) {
+ avcodec_opts[AVMEDIA_TYPE_VIDEO] = lavc_venc_context;
+- video_codec_name = ffmpeg_codec_name(codec->name);
++ video_codec_name = av_strdup(ffmpeg_codec_name(codec->name));
+
+ const char *preset_start = lavc_param_video_preset;
+ while (preset_start) {
+@@ -1225,6 +1225,8 @@
+ if (opt_preset("vpre", preset_name) != 0) {
+ tc_log_warn(MOD_NAME, "Parsing ffmpeg preset '%s' failed", preset_name);
+ }
++ av_free(video_codec_name);
++ video_codec_name = NULL;
+ if (verbose) {
+ int i;
+ tc_log_info(MOD_NAME, "After parsing preset '%s', %i options are overridden:", preset_name, opt_name_count);
diff --git a/media-video/transcode/metadata.xml b/media-video/transcode/metadata.xml
new file mode 100644
index 000000000000..3f38fbefc8f7
--- /dev/null
+++ b/media-video/transcode/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="mjpeg">Enables mjpegtools support</flag>
+ <flag name="nuv">NuppelVideo container format demuxing</flag>
+ <flag name="pic">disable optimized assembly code that is not PIC friendly</flag>
+ <flag name="postproc">Build with ffmpeg libpostproc support</flag>
+ </use>
+ <upstream>
+ <remote-id type="bitbucket">france/transcode-tcforge</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/transcode/transcode-1.1.7-r1.ebuild b/media-video/transcode/transcode-1.1.7-r1.ebuild
new file mode 100644
index 000000000000..ba60e46ae2f4
--- /dev/null
+++ b/media-video/transcode/transcode-1.1.7-r1.ebuild
@@ -0,0 +1,117 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils libtool multilib
+
+DESCRIPTION="A suite of utilities for transcoding video and audio codecs in different containers"
+HOMEPAGE="http://www.transcoding.org/ https://bitbucket.org/france/transcode-tcforge"
+SRC_URI="https://www.bitbucket.org/france/${PN}-tcforge/downloads/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ppc ppc64 sparc x86"
+IUSE="cpu_flags_x86_3dnow a52 aac alsa altivec dv dvd +iconv imagemagick jpeg lzo mjpeg cpu_flags_x86_mmx mp3 mpeg nuv ogg oss pic postproc quicktime sdl cpu_flags_x86_sse cpu_flags_x86_sse2 theora truetype v4l vorbis X x264 xml xvid"
+
+RDEPEND="
+ >=virtual/ffmpeg-0.10
+ a52? ( media-libs/a52dec )
+ aac? ( media-libs/faac )
+ alsa? ( media-libs/alsa-lib )
+ dv? ( media-libs/libdv )
+ dvd? ( media-libs/libdvdread )
+ iconv? ( virtual/libiconv )
+ imagemagick? ( media-gfx/imagemagick )
+ jpeg? ( virtual/jpeg )
+ lzo? ( >=dev-libs/lzo-2 )
+ mjpeg? ( media-video/mjpegtools )
+ mp3? ( media-sound/lame )
+ mpeg? ( media-libs/libmpeg2 )
+ ogg? ( media-libs/libogg )
+ postproc? ( >=virtual/ffmpeg-0.10 )
+ quicktime? ( >=media-libs/libquicktime-1 )
+ sdl? ( >=media-libs/libsdl-1.2.5[X?] )
+ theora? ( media-libs/libtheora )
+ truetype? ( >=media-libs/freetype-2 )
+ v4l? ( media-libs/libv4l )
+ vorbis? ( media-libs/libvorbis )
+ X? ( x11-libs/libXpm x11-libs/libXaw x11-libs/libXv )
+ x264? ( media-libs/x264 )
+ xml? ( dev-libs/libxml2 )
+ xvid? ( media-libs/xvid )
+ "
+
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+ v4l? ( >=sys-kernel/linux-headers-2.6.11 )
+ "
+
+REQUIRED_USE="
+ cpu_flags_x86_sse? ( cpu_flags_x86_mmx )
+ cpu_flags_x86_sse2? ( cpu_flags_x86_mmx cpu_flags_x86_sse )
+ cpu_flags_x86_3dnow? ( cpu_flags_x86_mmx )
+ nuv? ( lzo )
+ "
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-ffmpeg.patch \
+ "${FILESDIR}"/${P}-ffmpeg-0.10.patch \
+ "${FILESDIR}"/${P}-ffmpeg-0.11.patch \
+ "${FILESDIR}"/${P}-preset-free.patch
+
+ elibtoolize
+}
+
+src_configure() {
+ local myconf
+ use x86 && myconf="$(use_enable !pic x86-textrels)" #271476
+
+ econf \
+ $(use_enable cpu_flags_x86_mmx mmx) \
+ $(use_enable cpu_flags_x86_3dnow 3dnow) \
+ $(use_enable cpu_flags_x86_sse sse) \
+ $(use_enable cpu_flags_x86_sse2 sse2) \
+ $(use_enable altivec) \
+ $(use_enable v4l libv4l2) \
+ $(use_enable v4l libv4lconvert) \
+ $(use_enable mpeg libmpeg2) \
+ $(use_enable mpeg libmpeg2convert) \
+ --enable-experimental \
+ --enable-deprecated \
+ $(use_enable v4l) \
+ $(use_enable oss) \
+ $(use_enable alsa) \
+ $(use_enable postproc libpostproc) \
+ $(use_enable truetype freetype2) \
+ $(use_enable mp3 lame) \
+ $(use_enable xvid) \
+ $(use_enable x264) \
+ $(use_enable ogg) \
+ $(use_enable vorbis) \
+ $(use_enable theora) \
+ $(use_enable dvd libdvdread) \
+ $(use_enable dv libdv) \
+ $(use_enable quicktime libquicktime) \
+ $(use_enable lzo) \
+ $(use_enable a52) \
+ $(use_enable aac faac) \
+ $(use_enable xml libxml2) \
+ $(use_enable mjpeg mjpegtools) \
+ $(use_enable sdl) \
+ $(use_enable imagemagick) \
+ $(use_enable jpeg libjpeg) \
+ $(use_enable iconv) \
+ $(use_enable nuv) \
+ $(use_with X x) \
+ --with-mod-path=/usr/$(get_libdir)/transcode \
+ ${myconf}
+}
+
+src_install() {
+ emake DESTDIR="${D}" docsdir=/usr/share/doc/${PF} install
+ dodoc AUTHORS ChangeLog README STYLE TODO
+ find "${ED}"usr -name '*.la' -exec rm -f {} +
+}
diff --git a/media-video/transcode/transcode-1.1.7-r2.ebuild b/media-video/transcode/transcode-1.1.7-r2.ebuild
new file mode 100644
index 000000000000..84cf4d746940
--- /dev/null
+++ b/media-video/transcode/transcode-1.1.7-r2.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils libtool multilib
+
+DESCRIPTION="A suite of utilities for transcoding video and audio codecs in different containers"
+HOMEPAGE="http://www.transcoding.org/ https://bitbucket.org/france/transcode-tcforge"
+SRC_URI="https://www.bitbucket.org/france/${PN}-tcforge/downloads/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="cpu_flags_x86_3dnow a52 aac alsa altivec dv dvd +iconv imagemagick jpeg lzo mjpeg cpu_flags_x86_mmx mp3 mpeg nuv ogg oss pic postproc quicktime sdl cpu_flags_x86_sse cpu_flags_x86_sse2 theora truetype v4l vorbis X x264 xml xvid"
+
+RDEPEND="
+ >=virtual/ffmpeg-0.10
+ a52? ( media-libs/a52dec )
+ aac? ( media-libs/faac )
+ alsa? ( media-libs/alsa-lib )
+ dv? ( media-libs/libdv )
+ dvd? ( media-libs/libdvdread )
+ iconv? ( virtual/libiconv )
+ imagemagick? ( media-gfx/imagemagick )
+ jpeg? ( virtual/jpeg )
+ lzo? ( >=dev-libs/lzo-2 )
+ mjpeg? ( media-video/mjpegtools )
+ mp3? ( media-sound/lame )
+ mpeg? ( media-libs/libmpeg2 )
+ ogg? ( media-libs/libogg )
+ postproc? ( >=virtual/ffmpeg-0.10 )
+ quicktime? ( >=media-libs/libquicktime-1 )
+ sdl? ( >=media-libs/libsdl-1.2.5[X?] )
+ theora? ( media-libs/libtheora )
+ truetype? ( >=media-libs/freetype-2 )
+ v4l? ( media-libs/libv4l )
+ vorbis? ( media-libs/libvorbis )
+ X? ( x11-libs/libXpm x11-libs/libXaw x11-libs/libXv )
+ x264? ( media-libs/x264 )
+ xml? ( dev-libs/libxml2 )
+ xvid? ( media-libs/xvid )
+ "
+
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+ v4l? ( >=sys-kernel/linux-headers-2.6.11 )
+ "
+
+REQUIRED_USE="
+ cpu_flags_x86_sse? ( cpu_flags_x86_mmx )
+ cpu_flags_x86_sse2? ( cpu_flags_x86_mmx cpu_flags_x86_sse )
+ cpu_flags_x86_3dnow? ( cpu_flags_x86_mmx )
+ nuv? ( lzo )
+ "
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-ffmpeg.patch \
+ "${FILESDIR}"/${P}-ffmpeg-0.10.patch \
+ "${FILESDIR}"/${P}-ffmpeg-0.11.patch \
+ "${FILESDIR}"/${P}-preset-free.patch \
+ "${FILESDIR}"/${P}-libav-9.patch
+
+ elibtoolize
+}
+
+src_configure() {
+ local myconf
+ use x86 && myconf="$(use_enable !pic x86-textrels)" #271476
+
+ econf \
+ $(use_enable cpu_flags_x86_mmx mmx) \
+ $(use_enable cpu_flags_x86_3dnow 3dnow) \
+ $(use_enable cpu_flags_x86_sse sse) \
+ $(use_enable cpu_flags_x86_sse2 sse2) \
+ $(use_enable altivec) \
+ $(use_enable v4l libv4l2) \
+ $(use_enable v4l libv4lconvert) \
+ $(use_enable mpeg libmpeg2) \
+ $(use_enable mpeg libmpeg2convert) \
+ --enable-experimental \
+ --enable-deprecated \
+ $(use_enable v4l) \
+ $(use_enable oss) \
+ $(use_enable alsa) \
+ $(use_enable postproc libpostproc) \
+ $(use_enable truetype freetype2) \
+ $(use_enable mp3 lame) \
+ $(use_enable xvid) \
+ $(use_enable x264) \
+ $(use_enable ogg) \
+ $(use_enable vorbis) \
+ $(use_enable theora) \
+ $(use_enable dvd libdvdread) \
+ $(use_enable dv libdv) \
+ $(use_enable quicktime libquicktime) \
+ $(use_enable lzo) \
+ $(use_enable a52) \
+ $(use_enable aac faac) \
+ $(use_enable xml libxml2) \
+ $(use_enable mjpeg mjpegtools) \
+ $(use_enable sdl) \
+ $(use_enable imagemagick) \
+ $(use_enable jpeg libjpeg) \
+ $(use_enable iconv) \
+ $(use_enable nuv) \
+ $(use_with X x) \
+ --with-mod-path=/usr/$(get_libdir)/transcode \
+ ${myconf}
+}
+
+src_install() {
+ emake DESTDIR="${D}" docsdir=/usr/share/doc/${PF} install
+ dodoc AUTHORS ChangeLog README STYLE TODO
+ find "${ED}"usr -name '*.la' -exec rm -f {} +
+}
diff --git a/media-video/transcode/transcode-1.1.7-r3.ebuild b/media-video/transcode/transcode-1.1.7-r3.ebuild
new file mode 100644
index 000000000000..1ed0ed925828
--- /dev/null
+++ b/media-video/transcode/transcode-1.1.7-r3.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils libtool multilib
+
+DESCRIPTION="A suite of utilities for transcoding video and audio codecs in different containers"
+HOMEPAGE="http://www.transcoding.org/ https://bitbucket.org/france/transcode-tcforge"
+SRC_URI="https://www.bitbucket.org/france/${PN}-tcforge/downloads/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ppc ppc64 sparc x86"
+IUSE="cpu_flags_x86_3dnow a52 aac alsa altivec dv dvd +iconv imagemagick jpeg lzo mjpeg cpu_flags_x86_mmx mp3 mpeg nuv ogg oss pic postproc quicktime sdl cpu_flags_x86_sse cpu_flags_x86_sse2 theora truetype v4l vorbis X x264 xml xvid"
+
+RDEPEND="
+ >=virtual/ffmpeg-0.10
+ a52? ( media-libs/a52dec )
+ aac? ( media-libs/faac )
+ alsa? ( media-libs/alsa-lib )
+ dv? ( media-libs/libdv )
+ dvd? ( media-libs/libdvdread )
+ iconv? ( virtual/libiconv )
+ imagemagick? ( media-gfx/imagemagick )
+ jpeg? ( virtual/jpeg )
+ lzo? ( >=dev-libs/lzo-2 )
+ mjpeg? ( media-video/mjpegtools )
+ mp3? ( media-sound/lame )
+ mpeg? ( media-libs/libmpeg2 )
+ ogg? ( media-libs/libogg )
+ postproc? ( >=virtual/ffmpeg-0.10 )
+ quicktime? ( >=media-libs/libquicktime-1 )
+ sdl? ( >=media-libs/libsdl-1.2.5[X?] )
+ theora? ( media-libs/libtheora )
+ truetype? ( >=media-libs/freetype-2 )
+ v4l? ( media-libs/libv4l )
+ vorbis? ( media-libs/libvorbis )
+ X? ( x11-libs/libXpm x11-libs/libXaw x11-libs/libXv )
+ x264? ( media-libs/x264 )
+ xml? ( dev-libs/libxml2 )
+ xvid? ( media-libs/xvid )
+ "
+
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+ v4l? ( >=sys-kernel/linux-headers-2.6.11 )
+ "
+
+REQUIRED_USE="
+ cpu_flags_x86_sse? ( cpu_flags_x86_mmx )
+ cpu_flags_x86_sse2? ( cpu_flags_x86_mmx cpu_flags_x86_sse )
+ cpu_flags_x86_3dnow? ( cpu_flags_x86_mmx )
+ nuv? ( lzo )
+ "
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-ffmpeg.patch \
+ "${FILESDIR}"/${P}-ffmpeg-0.10.patch \
+ "${FILESDIR}"/${P}-ffmpeg-0.11.patch \
+ "${FILESDIR}"/${P}-preset-free.patch \
+ "${FILESDIR}"/${P}-libav-9.patch \
+ "${FILESDIR}"/${P}-libav-10.patch \
+ "${FILESDIR}"/${P}-preset-force.patch \
+ "${FILESDIR}"/${P}-ffmpeg2.patch \
+ "${FILESDIR}"/${P}-freetype251.patch \
+ "${FILESDIR}"/${P}-ffmpeg24.patch
+
+ elibtoolize
+}
+
+src_configure() {
+ local myconf
+ use x86 && myconf="$(use_enable !pic x86-textrels)" #271476
+
+ econf \
+ $(use_enable cpu_flags_x86_mmx mmx) \
+ $(use_enable cpu_flags_x86_3dnow 3dnow) \
+ $(use_enable cpu_flags_x86_sse sse) \
+ $(use_enable cpu_flags_x86_sse2 sse2) \
+ $(use_enable altivec) \
+ $(use_enable v4l libv4l2) \
+ $(use_enable v4l libv4lconvert) \
+ $(use_enable mpeg libmpeg2) \
+ $(use_enable mpeg libmpeg2convert) \
+ --enable-experimental \
+ --enable-deprecated \
+ $(use_enable v4l) \
+ $(use_enable oss) \
+ $(use_enable alsa) \
+ $(use_enable postproc libpostproc) \
+ $(use_enable truetype freetype2) \
+ $(use_enable mp3 lame) \
+ $(use_enable xvid) \
+ $(use_enable x264) \
+ $(use_enable ogg) \
+ $(use_enable vorbis) \
+ $(use_enable theora) \
+ $(use_enable dvd libdvdread) \
+ $(use_enable dv libdv) \
+ $(use_enable quicktime libquicktime) \
+ $(use_enable lzo) \
+ $(use_enable a52) \
+ $(use_enable aac faac) \
+ $(use_enable xml libxml2) \
+ $(use_enable mjpeg mjpegtools) \
+ $(use_enable sdl) \
+ $(use_enable imagemagick) \
+ $(use_enable jpeg libjpeg) \
+ $(use_enable iconv) \
+ $(use_enable nuv) \
+ $(use_with X x) \
+ --with-mod-path=/usr/$(get_libdir)/transcode \
+ ${myconf}
+}
+
+src_install() {
+ emake DESTDIR="${D}" docsdir=/usr/share/doc/${PF} install
+ dodoc AUTHORS ChangeLog README STYLE TODO
+ find "${ED}"usr -name '*.la' -exec rm -f {} +
+}
diff --git a/media-video/tsmuxer/Manifest b/media-video/tsmuxer/Manifest
new file mode 100644
index 000000000000..0d242200f6f9
--- /dev/null
+++ b/media-video/tsmuxer/Manifest
@@ -0,0 +1,2 @@
+DIST tsMuxeR_shared_1.10.6.tar.gz 640010 SHA256 40871629da0968488c90600a0870b6f9e3ed09d30522c56a97d7397365af0910 SHA512 64d5214a84ae1d2fdbaad214ff9586007ed1d88e7d0e18d866dfe4e75cf371de52e4c05eb1d67d0b9c7c2f9cd5ca87b4dbb2b113e81361ba658aa1fecca115d6 WHIRLPOOL ca4993cf04a22051f9a5c8b7cbe8537156263d2b3e0c9f27a889a519eb7b171df7dbca5841a7345237b1623ce46c547ace886ce07bba3e92717513f87fd1cd15
+DIST tsmuxer-icon.png 1634 SHA256 ff166c09d7e5218ee566d876c20873e26ccf6242a3f37a7f01e6514c4396a753 SHA512 4af3b1bd0e1a2c8379773e16121aa1c0ae749a3a9b9fdef0622991ea4ea632f51fbd91af0f6b5a415c28b375bd71adde2e9aacfb8b495242168cc97e1c8bf4ff WHIRLPOOL 265eed8149ce9de8e8695bdc8a4e726cdb4cf4514f30263384d60edcfb896b37fc8cfdb707b16d11672cb302f8300f8790415db3f6b4ced11dd4d5bcd4859b96
diff --git a/media-video/tsmuxer/metadata.xml b/media-video/tsmuxer/metadata.xml
new file mode 100644
index 000000000000..bdb0715913b9
--- /dev/null
+++ b/media-video/tsmuxer/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <longdescription lang="en">
+ SmartLabs tsMuxeR - the software utility to create TS and M2TS files for
+ IP broadcasting as well as for viewing at hardware video players (i.e.,
+ Dune HD Ultra, Sony Playstation3 and others). tsMuxeR is a part of
+ SmartCONTENT, content preparation solution.
+ </longdescription>
+ <use>
+ <flag name='qt4'>Installs tsMuxerGUI (needs Qt4)</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-video/tsmuxer/tsmuxer-1.10.6-r1.ebuild b/media-video/tsmuxer/tsmuxer-1.10.6-r1.ebuild
new file mode 100644
index 000000000000..a26173b63670
--- /dev/null
+++ b/media-video/tsmuxer/tsmuxer-1.10.6-r1.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils base qt4-r2
+
+DESCRIPTION="Utility to create and demux TS and M2TS files"
+HOMEPAGE="http://www.smlabs.net/en/products/tsmuxer/"
+SRC_URI="http://www.smlabs.net/tsMuxer/tsMuxeR_shared_${PV}.tar.gz
+ http://gentoo.sbriesen.de/distfiles/tsmuxer-icon.png"
+LICENSE="SmartLabs"
+SLOT="0"
+
+KEYWORDS="~amd64 ~x86"
+IUSE="qt4 linguas_ru"
+
+QA_FLAGS_IGNORED="opt/${PN}/bin/tsMuxeR opt/${PN}/bin/tsMuxerGUI"
+
+DEPEND="|| (
+ >=app-arch/upx-ucl-3.01
+ >=app-arch/upx-bin-3.01
+)"
+RDEPEND="
+ x86? (
+ media-libs/freetype:2
+ qt4? (
+ dev-libs/glib:2
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ media-libs/fontconfig
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXrender
+ )
+ )
+ amd64? (
+ >=media-libs/freetype-2.5.0.1:2[abi_x86_32(-)]
+ qt4? (
+ >=dev-libs/glib-2.34.3:2[abi_x86_32(-)]
+ >=dev-qt/qtcore-4.8.5-r1:4[abi_x86_32(-)]
+ >=dev-qt/qtgui-4.8.5-r2:4[abi_x86_32(-)]
+ >=media-libs/fontconfig-2.10.92[abi_x86_32(-)]
+ >=media-libs/libpng-1.2.51:1.2[abi_x86_32(-)]
+ >=sys-libs/zlib-1.2.8-r1[abi_x86_32(-)]
+ >=x11-libs/libICE-1.0.8-r1[abi_x86_32(-)]
+ >=x11-libs/libSM-1.2.1-r1[abi_x86_32(-)]
+ >=x11-libs/libX11-1.6.2[abi_x86_32(-)]
+ >=x11-libs/libXext-1.3.2[abi_x86_32(-)]
+ >=x11-libs/libXrender-0.9.8[abi_x86_32(-)]
+ )
+ )"
+
+S="${WORKDIR}"
+
+src_prepare() {
+ upx -d tsMuxeR tsMuxerGUI || die
+}
+
+src_install() {
+ dodir /opt/bin
+ exeinto /opt/${PN}/bin
+
+ doexe tsMuxeR
+ dosym ../${PN}/bin/tsMuxeR /opt/bin/tsMuxeR
+
+ if use qt4; then
+ doexe tsMuxerGUI
+ dosym ../${PN}/bin/tsMuxerGUI /opt/bin/tsMuxerGUI
+ newicon "${DISTDIR}/${PN}-icon.png" "${PN}.png"
+ make_desktop_entry tsMuxerGUI "tsMuxeR GUI" "${PN}" "Qt;AudioVideo;Video"
+ fi
+
+ use linguas_ru && dodoc readme.rus.txt
+}
diff --git a/media-video/ttcut/Manifest b/media-video/ttcut/Manifest
new file mode 100644
index 000000000000..d452df524cbc
--- /dev/null
+++ b/media-video/ttcut/Manifest
@@ -0,0 +1 @@
+DIST ttcut-0.19.6.tar.gz 283977 SHA256 e0f3f55fdcd67096de5588ddfb4a455cff731a9723923b34c283546c42c2ae11 SHA512 796dfb6759f7e9c96f8a8481cb280044c1744a43935f226f352b9e867ebdbaeaed90c3d96acf00b5ae8afb7b2350cbd6a384eb2d38136fef38c2983467d25cf6 WHIRLPOOL e660404f1bf2eb9a5936d53f3e0e9478d743c1e3af28f8d9d4d2c66d494e07df03226a1ca3fb008c90bb8ea05bba13a95ddd4ed2137e4e71a5e5ab29bbdb2365
diff --git a/media-video/ttcut/files/ttcut-0.19.6-deprecated.patch b/media-video/ttcut/files/ttcut-0.19.6-deprecated.patch
new file mode 100644
index 000000000000..95c466372f29
--- /dev/null
+++ b/media-video/ttcut/files/ttcut-0.19.6-deprecated.patch
@@ -0,0 +1,376 @@
+diff -Naur ttcut-old/avstream/ttac3audioheader.h ttcut/avstream/ttac3audioheader.h
+--- ttcut-old/avstream/ttac3audioheader.h 2006-02-03 21:32:50.000000000 +0100
++++ ttcut/avstream/ttac3audioheader.h 2009-09-20 02:13:04.000000000 +0200
+@@ -116,7 +116,7 @@
+ 2,1,2,3,3,4,4,5
+ };
+
+-__attribute__ ((unused))static char* AC3Mode[8] =
++__attribute__ ((unused))static const char* AC3Mode[8] =
+ {
+ "1+1", "1/0", "2/0", "3/0",
+ "2/1", "3/1", "2/2", "3/2"
+diff -Naur ttcut-old/avstream/ttac3audiostream.cpp ttcut/avstream/ttac3audiostream.cpp
+--- ttcut-old/avstream/ttac3audiostream.cpp 2007-04-30 11:06:19.000000000 +0200
++++ ttcut/avstream/ttac3audiostream.cpp 2009-09-20 02:13:04.000000000 +0200
+@@ -108,7 +108,7 @@
+
+ audio_header->setHeaderOffset( stream_buffer->currentOffset() - 8 ); // +Syncwort
+
+- audio_header->crc1 = daten[0]<<8+daten[1];
++ audio_header->crc1 = daten[0]<<(8+daten[1]);
+ audio_header->fscod = (uint8_t)((daten[2]&0xc0)>>6);
+ audio_header->frmsizecod = (uint8_t)(daten[2]&0x3f);
+ audio_header->syncframe_words = AC3FrameLength[audio_header->fscod][audio_header->frmsizecod];
+diff -Naur ttcut-old/avstream/ttaviwriter.cpp ttcut/avstream/ttaviwriter.cpp
+--- ttcut-old/avstream/ttaviwriter.cpp 2007-04-27 10:32:20.000000000 +0200
++++ ttcut/avstream/ttaviwriter.cpp 2009-09-20 02:13:04.000000000 +0200
+@@ -126,7 +126,7 @@
+ //qDebug( "%sAVI frame info: width: %d x height: %d",c_name,frameInfo->width,frameInfo->height );
+
+ //TODO: avoid setting hard coded frame rate!
+- AVI_set_video(avi_file, frameInfo->width, frameInfo->height, 25.0, "YV12");
++ AVI_set_video(avi_file, frameInfo->width, frameInfo->height, 25.0, (char*)"YV12");
+
+ ref_data = new uint8_t [frameInfo->size+2*frameInfo->chroma_size];
+
+diff -Naur ttcut-old/avstream/ttdtsaudioheader.h ttcut/avstream/ttdtsaudioheader.h
+--- ttcut-old/avstream/ttdtsaudioheader.h 2006-02-02 20:43:48.000000000 +0100
++++ ttcut/avstream/ttdtsaudioheader.h 2009-09-20 02:13:04.000000000 +0200
+@@ -78,7 +78,7 @@
+ 2048000, 3072000, 3840000, 4096000, 0, 0
+ };
+
+-__attribute__ ((unused))static char* dts_acmod[64] =
++__attribute__ ((unused))static const char* dts_acmod[64] =
+ {
+ "1","DM","2/0","2/0",
+ "2/0","3/0","2.1/0","3.1/0",
+diff -Naur ttcut-old/avstream/ttfilebuffer.cpp ttcut/avstream/ttfilebuffer.cpp
+--- ttcut-old/avstream/ttfilebuffer.cpp 2007-09-02 13:15:09.000000000 +0200
++++ ttcut/avstream/ttfilebuffer.cpp 2009-09-20 02:13:04.000000000 +0200
+@@ -773,8 +773,8 @@
+ /* new position outside buffer*/
+ else
+ {
+- if ( new_pos > -1 &&
+- (file_mode == fm_open_read && new_pos < stream_length) ||
++ if ( (new_pos > -1 &&
++ (file_mode == fm_open_read && new_pos < stream_length)) ||
+ ((file_mode == fm_open_write || file_mode == fm_create) &&
+ new_pos < stream_length + 1) )
+ {
+diff -Naur ttcut-old/gui/ttcutmainwindow.cpp ttcut/gui/ttcutmainwindow.cpp
+--- ttcut-old/gui/ttcutmainwindow.cpp 2007-09-02 13:15:09.000000000 +0200
++++ ttcut/gui/ttcutmainwindow.cpp 2009-09-20 02:13:04.000000000 +0200
+@@ -1030,8 +1030,8 @@
+ int num_header = current_audio_stream->createHeaderList();
+
+ // error reading audio stream or user abort during operation
+- if ( num_header == 0 && audio_type->avStreamType() != TTAVTypes::pcm_audio ||
+- num_header == 1 && audio_type->avStreamType() == TTAVTypes::pcm_audio ) {
++ if ( (num_header == 0 && audio_type->avStreamType() != TTAVTypes::pcm_audio) ||
++ (num_header == 1 && audio_type->avStreamType() == TTAVTypes::pcm_audio) ) {
+
+ log->errorMsg( oName, "error reading audio stream; no header list (!)" );
+ delete current_audio_stream;
+diff -Naur ttcut-old/ui/pixmaps/addtolist_18.xpm ttcut/ui/pixmaps/addtolist_18.xpm
+--- ttcut-old/ui/pixmaps/addtolist_18.xpm 2006-02-27 18:05:47.000000000 +0100
++++ ttcut/ui/pixmaps/addtolist_18.xpm 2009-09-20 02:13:04.000000000 +0200
+@@ -1,5 +1,5 @@
+ /* XPM */
+-static char * addtolist_18_xpm[] = {
++static const char * addtolist_18_xpm[] = {
+ "18 18 163 2",
+ " c None",
+ ". c #3E98E5",
+diff -Naur ttcut-old/ui/pixmaps/apply_18.xpm ttcut/ui/pixmaps/apply_18.xpm
+--- ttcut-old/ui/pixmaps/apply_18.xpm 2006-02-27 18:05:47.000000000 +0100
++++ ttcut/ui/pixmaps/apply_18.xpm 2009-09-20 02:13:04.000000000 +0200
+@@ -1,5 +1,5 @@
+ /* XPM */
+-static char * apply_18_xpm[] = {
++static const char * apply_18_xpm[] = {
+ "18 18 46 1",
+ " c None",
+ ". c #707070",
+diff -Naur ttcut-old/ui/pixmaps/bframe_18.xpm ttcut/ui/pixmaps/bframe_18.xpm
+--- ttcut-old/ui/pixmaps/bframe_18.xpm 2006-02-27 18:05:47.000000000 +0100
++++ ttcut/ui/pixmaps/bframe_18.xpm 2009-09-20 02:13:04.000000000 +0200
+@@ -1,5 +1,5 @@
+ /* XPM */
+-static char* const b_frame_18_xpm[] = {
++static const char * b_frame_18_xpm[] = {
+ "18 18 16 1",
+ ". c None",
+ "d c #faf515",
+diff -Naur ttcut-old/ui/pixmaps/button_ok.xpm ttcut/ui/pixmaps/button_ok.xpm
+--- ttcut-old/ui/pixmaps/button_ok.xpm 2007-04-27 10:32:20.000000000 +0200
++++ ttcut/ui/pixmaps/button_ok.xpm 2009-09-20 02:13:04.000000000 +0200
+@@ -1,5 +1,5 @@
+ /* XPM */
+-static char * button_ok_xpm[] = {
++static const char * button_ok_xpm[] = {
+ "32 32 132 2",
+ " c None",
+ ". c #18AD00",
+diff -Naur ttcut-old/ui/pixmaps/chapter_18.xpm ttcut/ui/pixmaps/chapter_18.xpm
+--- ttcut-old/ui/pixmaps/chapter_18.xpm 2006-02-27 18:05:47.000000000 +0100
++++ ttcut/ui/pixmaps/chapter_18.xpm 2009-09-20 02:13:04.000000000 +0200
+@@ -1,5 +1,5 @@
+ /* XPM */
+-static char * chapter_18_xpm[] = {
++static const char * chapter_18_xpm[] = {
+ "18 18 157 2",
+ " c None",
+ ". c #9EAAD6",
+diff -Naur ttcut-old/ui/pixmaps/clock_16.xpm ttcut/ui/pixmaps/clock_16.xpm
+--- ttcut-old/ui/pixmaps/clock_16.xpm 2006-02-27 18:05:47.000000000 +0100
++++ ttcut/ui/pixmaps/clock_16.xpm 2009-09-20 02:13:04.000000000 +0200
+@@ -1,5 +1,5 @@
+ /* XPM */
+-static char * clock_16_xpm[] = {
++static const char * clock_16_xpm[] = {
+ "16 16 168 2",
+ " c None",
+ ". c #2A6AC0",
+diff -Naur ttcut-old/ui/pixmaps/clock_18.xpm ttcut/ui/pixmaps/clock_18.xpm
+--- ttcut-old/ui/pixmaps/clock_18.xpm 2006-02-27 18:05:47.000000000 +0100
++++ ttcut/ui/pixmaps/clock_18.xpm 2009-09-20 02:13:04.000000000 +0200
+@@ -1,5 +1,5 @@
+ /* XPM */
+-static char * clock_18_xpm[] = {
++static const char * clock_18_xpm[] = {
+ "18 18 202 2",
+ " c None",
+ ". c #2360BB",
+diff -Naur ttcut-old/ui/pixmaps/cutaudio_18.xpm ttcut/ui/pixmaps/cutaudio_18.xpm
+--- ttcut-old/ui/pixmaps/cutaudio_18.xpm 2006-02-27 18:05:47.000000000 +0100
++++ ttcut/ui/pixmaps/cutaudio_18.xpm 2009-09-20 02:13:04.000000000 +0200
+@@ -1,5 +1,5 @@
+ /* XPM */
+-static char * cutaudio_18_xpm[] = {
++static const char * cutaudio_18_xpm[] = {
+ "11 18 2 1",
+ " c None",
+ ". c #000000",
+diff -Naur ttcut-old/ui/pixmaps/cutav_18.xpm ttcut/ui/pixmaps/cutav_18.xpm
+--- ttcut-old/ui/pixmaps/cutav_18.xpm 2006-02-27 18:05:47.000000000 +0100
++++ ttcut/ui/pixmaps/cutav_18.xpm 2009-09-20 02:13:04.000000000 +0200
+@@ -1,5 +1,5 @@
+ /* XPM */
+-static char * cutav_18_xpm[] = {
++static const char * cutav_18_xpm[] = {
+ "18 18 105 2",
+ " c None",
+ ". c #CDCDD9",
+diff -Naur ttcut-old/ui/pixmaps/exit_16.xpm ttcut/ui/pixmaps/exit_16.xpm
+--- ttcut-old/ui/pixmaps/exit_16.xpm 2006-02-27 18:05:47.000000000 +0100
++++ ttcut/ui/pixmaps/exit_16.xpm 2009-09-20 02:13:04.000000000 +0200
+@@ -1,5 +1,5 @@
+ /* XPM */
+-static char * exit_16_xpm[] = {
++static const char * exit_16_xpm[] = {
+ "16 16 174 2",
+ " c None",
+ ". c #AE3725",
+diff -Naur ttcut-old/ui/pixmaps/fileclose_18.xpm ttcut/ui/pixmaps/fileclose_18.xpm
+--- ttcut-old/ui/pixmaps/fileclose_18.xpm 2006-02-27 18:05:47.000000000 +0100
++++ ttcut/ui/pixmaps/fileclose_18.xpm 2009-09-20 02:13:04.000000000 +0200
+@@ -1,5 +1,5 @@
+ /* XPM */
+-static char * fileclose_18_xpm[] = {
++static const char * fileclose_18_xpm[] = {
+ "18 18 138 2",
+ " c None",
+ ". c #3D3D5D",
+diff -Naur ttcut-old/ui/pixmaps/filenew_16.xpm ttcut/ui/pixmaps/filenew_16.xpm
+--- ttcut-old/ui/pixmaps/filenew_16.xpm 2006-02-27 18:05:47.000000000 +0100
++++ ttcut/ui/pixmaps/filenew_16.xpm 2009-09-20 02:13:04.000000000 +0200
+@@ -1,5 +1,5 @@
+ /* XPM */
+-static char * filenew_16_xpm[] = {
++static const char * filenew_16_xpm[] = {
+ "16 16 121 2",
+ " c None",
+ ". c #C5CAD6",
+diff -Naur ttcut-old/ui/pixmaps/fileopen_16.xpm ttcut/ui/pixmaps/fileopen_16.xpm
+--- ttcut-old/ui/pixmaps/fileopen_16.xpm 2006-02-27 18:05:47.000000000 +0100
++++ ttcut/ui/pixmaps/fileopen_16.xpm 2009-09-20 02:13:04.000000000 +0200
+@@ -1,5 +1,5 @@
+ /* XPM */
+-static char * fileopen_16_xpm[] = {
++static const char * fileopen_16_xpm[] = {
+ "16 16 183 2",
+ " c None",
+ ". c #9BA1D9",
+diff -Naur ttcut-old/ui/pixmaps/filesave_16.xpm ttcut/ui/pixmaps/filesave_16.xpm
+--- ttcut-old/ui/pixmaps/filesave_16.xpm 2006-02-27 18:05:47.000000000 +0100
++++ ttcut/ui/pixmaps/filesave_16.xpm 2009-09-20 02:13:04.000000000 +0200
+@@ -1,5 +1,5 @@
+ /* XPM */
+-static char * filesave_16_xpm[] = {
++static const char * filesave_16_xpm[] = {
+ "16 16 174 2",
+ " c None",
+ ". c #B8B8CC",
+diff -Naur ttcut-old/ui/pixmaps/filesaveas_16.xpm ttcut/ui/pixmaps/filesaveas_16.xpm
+--- ttcut-old/ui/pixmaps/filesaveas_16.xpm 2006-02-27 18:05:47.000000000 +0100
++++ ttcut/ui/pixmaps/filesaveas_16.xpm 2009-09-20 02:13:04.000000000 +0200
+@@ -1,5 +1,5 @@
+ /* XPM */
+-static char * filesaveas_16_xpm[] = {
++static const char * filesaveas_16_xpm[] = {
+ "16 16 180 2",
+ " c None",
+ ". c #F2C14C",
+diff -Naur ttcut-old/ui/pixmaps/goto_18.xpm ttcut/ui/pixmaps/goto_18.xpm
+--- ttcut-old/ui/pixmaps/goto_18.xpm 2006-02-27 18:05:47.000000000 +0100
++++ ttcut/ui/pixmaps/goto_18.xpm 2009-09-20 02:13:04.000000000 +0200
+@@ -1,5 +1,5 @@
+ /* XPM */
+-static char * goto_18_xpm[] = {
++static const char * goto_18_xpm[] = {
+ "18 18 82 1",
+ " c None",
+ ". c #127DFF",
+diff -Naur ttcut-old/ui/pixmaps/iframe_18.xpm ttcut/ui/pixmaps/iframe_18.xpm
+--- ttcut-old/ui/pixmaps/iframe_18.xpm 2006-02-27 18:05:47.000000000 +0100
++++ ttcut/ui/pixmaps/iframe_18.xpm 2009-09-20 02:13:04.000000000 +0200
+@@ -1,5 +1,5 @@
+ /* XPM */
+-static char* const i_frame_18_xpm[] = {
++static const char * i_frame_18_xpm[] = {
+ "18 18 9 1",
+ ". c None",
+ "d c #000096",
+diff -Naur ttcut-old/ui/pixmaps/next_18.xpm ttcut/ui/pixmaps/next_18.xpm
+--- ttcut-old/ui/pixmaps/next_18.xpm 2006-02-27 18:05:47.000000000 +0100
++++ ttcut/ui/pixmaps/next_18.xpm 2009-09-20 02:13:04.000000000 +0200
+@@ -1,5 +1,5 @@
+ /* XPM */
+-static char * next_18_xpm[] = {
++static const char * next_18_xpm[] = {
+ "18 18 59 1",
+ " c None",
+ ". c #000000",
+diff -Naur ttcut-old/ui/pixmaps/note_18.xpm ttcut/ui/pixmaps/note_18.xpm
+--- ttcut-old/ui/pixmaps/note_18.xpm 2006-02-27 18:05:47.000000000 +0100
++++ ttcut/ui/pixmaps/note_18.xpm 2009-09-20 02:13:04.000000000 +0200
+@@ -1,5 +1,5 @@
+ /* XPM */
+-static char * note_18_xpm[] = {
++static const char * note_18_xpm[] = {
+ "18 18 93 2",
+ " c None",
+ ". c #C5AD09",
+diff -Naur ttcut-old/ui/pixmaps/pause_18.xpm ttcut/ui/pixmaps/pause_18.xpm
+--- ttcut-old/ui/pixmaps/pause_18.xpm 2006-02-27 18:05:47.000000000 +0100
++++ ttcut/ui/pixmaps/pause_18.xpm 2009-09-20 02:13:04.000000000 +0200
+@@ -1,5 +1,5 @@
+ /* XPM */
+-static char * pause_18_xpm[] = {
++static const char * pause_18_xpm[] = {
+ "18 18 67 1",
+ " c None",
+ ". c #000000",
+diff -Naur ttcut-old/ui/pixmaps/pframe_18.xpm ttcut/ui/pixmaps/pframe_18.xpm
+--- ttcut-old/ui/pixmaps/pframe_18.xpm 2006-02-27 18:05:47.000000000 +0100
++++ ttcut/ui/pixmaps/pframe_18.xpm 2009-09-20 02:13:04.000000000 +0200
+@@ -1,5 +1,5 @@
+ /* XPM */
+-static char* const p_frame_18_xpm[] = {
++static const char * const p_frame_18_xpm[] = {
+ "18 18 15 1",
+ ". c None",
+ "e c #fa0150",
+diff -Naur ttcut-old/ui/pixmaps/play_18.xpm ttcut/ui/pixmaps/play_18.xpm
+--- ttcut-old/ui/pixmaps/play_18.xpm 2006-02-27 18:05:47.000000000 +0100
++++ ttcut/ui/pixmaps/play_18.xpm 2009-09-20 02:13:04.000000000 +0200
+@@ -1,5 +1,5 @@
+ /* XPM */
+-static char * play_18_xpm[] = {
++static const char * play_18_xpm[] = {
+ "18 18 38 1",
+ " c None",
+ ". c #000000",
+diff -Naur ttcut-old/ui/pixmaps/prev_18.xpm ttcut/ui/pixmaps/prev_18.xpm
+--- ttcut-old/ui/pixmaps/prev_18.xpm 2006-02-27 18:05:47.000000000 +0100
++++ ttcut/ui/pixmaps/prev_18.xpm 2009-09-20 02:13:04.000000000 +0200
+@@ -1,5 +1,5 @@
+ /* XPM */
+-static char * prev_18_xpm[] = {
++static const char * prev_18_xpm[] = {
+ "18 18 64 1",
+ " c None",
+ ". c #0E0E0E",
+diff -Naur ttcut-old/ui/pixmaps/preview_18.xpm ttcut/ui/pixmaps/preview_18.xpm
+--- ttcut-old/ui/pixmaps/preview_18.xpm 2006-02-27 18:05:47.000000000 +0100
++++ ttcut/ui/pixmaps/preview_18.xpm 2009-09-20 02:13:04.000000000 +0200
+@@ -1,5 +1,5 @@
+ /* XPM */
+-static char * preview_18_xpm[] = {
++static const char * preview_18_xpm[] = {
+ "18 18 134 2",
+ " c None",
+ ". c #A9ACB6",
+diff -Naur ttcut-old/ui/pixmaps/saveimage_16.xpm ttcut/ui/pixmaps/saveimage_16.xpm
+--- ttcut-old/ui/pixmaps/saveimage_16.xpm 2006-02-27 18:05:47.000000000 +0100
++++ ttcut/ui/pixmaps/saveimage_16.xpm 2009-09-20 02:13:04.000000000 +0200
+@@ -1,5 +1,5 @@
+ /* XPM */
+-static char * saveimage_16_xpm[] = {
++static const char * saveimage_16_xpm[] = {
+ "17 18 80 1",
+ " c None",
+ ". c #000000",
+diff -Naur ttcut-old/ui/pixmaps/search_18.xpm ttcut/ui/pixmaps/search_18.xpm
+--- ttcut-old/ui/pixmaps/search_18.xpm 2006-02-27 18:05:47.000000000 +0100
++++ ttcut/ui/pixmaps/search_18.xpm 2009-09-20 02:13:04.000000000 +0200
+@@ -1,5 +1,5 @@
+ /* XPM */
+-static char * search_18_xpm[] = {
++static const char * search_18_xpm[] = {
+ "18 18 126 2",
+ " c None",
+ ". c #000000",
+diff -Naur ttcut-old/ui/pixmaps/settings_16.xpm ttcut/ui/pixmaps/settings_16.xpm
+--- ttcut-old/ui/pixmaps/settings_16.xpm 2006-02-27 18:05:47.000000000 +0100
++++ ttcut/ui/pixmaps/settings_16.xpm 2009-09-20 02:13:04.000000000 +0200
+@@ -1,5 +1,5 @@
+ /* XPM */
+-static char * settings_16_xpm[] = {
++static const char * settings_16_xpm[] = {
+ "16 16 102 2",
+ " c None",
+ ". c #C1C1CE",
+diff -Naur ttcut-old/ui/pixmaps/_settings_18.xpm ttcut/ui/pixmaps/_settings_18.xpm
+--- ttcut-old/ui/pixmaps/_settings_18.xpm 2006-02-27 18:05:47.000000000 +0100
++++ ttcut/ui/pixmaps/_settings_18.xpm 2009-09-20 02:13:04.000000000 +0200
+@@ -1,5 +1,5 @@
+ /* XPM */
+-static char * settings_18_xpm[] = {
++static const char * settings_18_xpm[] = {
+ "16 16 102 2",
+ " c None",
+ ". c #C1C1CE",
+diff -Naur ttcut-old/ui/pixmaps/settings_18.xpm ttcut/ui/pixmaps/settings_18.xpm
+--- ttcut-old/ui/pixmaps/settings_18.xpm 2006-02-27 18:05:47.000000000 +0100
++++ ttcut/ui/pixmaps/settings_18.xpm 2009-09-20 02:13:04.000000000 +0200
+@@ -1,5 +1,5 @@
+ /* XPM */
+-static char * settings_18_xpm[] = {
++static const char * settings_18_xpm[] = {
+ "16 16 102 2",
+ " c None",
+ ". c #C1C1CE",
+diff -Naur ttcut-old/ui/pixmaps/stop_18.xpm ttcut/ui/pixmaps/stop_18.xpm
+--- ttcut-old/ui/pixmaps/stop_18.xpm 2006-02-27 18:05:47.000000000 +0100
++++ ttcut/ui/pixmaps/stop_18.xpm 2009-09-20 02:13:04.000000000 +0200
+@@ -1,5 +1,5 @@
+ /* XPM */
+-static char * stop_18_xpm[] = {
++static const char * stop_18_xpm[] = {
+ "18 18 39 1",
+ " c None",
+ ". c #1D1D1C",
diff --git a/media-video/ttcut/files/ttcut-0.19.6-ffmpeg-vf-setdar.patch b/media-video/ttcut/files/ttcut-0.19.6-ffmpeg-vf-setdar.patch
new file mode 100644
index 000000000000..6f5b05b228a0
--- /dev/null
+++ b/media-video/ttcut/files/ttcut-0.19.6-ffmpeg-vf-setdar.patch
@@ -0,0 +1,184 @@
+diff -Naur ttcut-old/avstream/ttcommon.cpp ttcut/avstream/ttcommon.cpp
+--- ttcut-old/avstream/ttcommon.cpp 2011-05-05 00:00:33.936254667 +0200
++++ ttcut/avstream/ttcommon.cpp 2011-05-05 00:03:27.396254667 +0200
+@@ -51,6 +51,18 @@
+ return sNewFileName;
+ }
+
++// return the aspect ratio as string value
++QString ttAspectRatioText(int aspect_ratio_information)
++{
++ QString szTemp;
++
++ if ( aspect_ratio_information == 1 ) szTemp = "1:1";
++ if ( aspect_ratio_information == 2 ) szTemp = "4:3";
++ if ( aspect_ratio_information == 3 ) szTemp = "16:9";
++ if ( aspect_ratio_information == 4 ) szTemp = "2.21:1";
++
++ return szTemp;
++}
+
+ // check if file fName exists
+ bool ttFileExists( QString fName )
+diff -Naur ttcut-old/avstream/ttcommon.h ttcut/avstream/ttcommon.h
+--- ttcut-old/avstream/ttcommon.h 2011-05-05 00:00:33.936254667 +0200
++++ ttcut/avstream/ttcommon.h 2011-05-05 00:03:58.412921334 +0200
+@@ -11,6 +11,7 @@
+ extern "C" bool ttDeleteFile( QString fName );
+ extern "C" QString ttAddFileExt( QString fName, const char* cExt );
+ extern "C" QString ttChangeFileExt( QString fName, const char* cExt );
++extern "C" QString ttAspectRatioText(int aspect_ratio_information);
+ extern "C" QTime ttMsecToTime( int msec );
+ extern "C" QTime ttMsecToTimeD( double msec );
+ extern "C" QTime ttFramesToTime(long lFrames, float fps);
+diff -Naur ttcut-old/avstream/ttmpeg2videoheader.cpp ttcut/avstream/ttmpeg2videoheader.cpp
+--- ttcut-old/avstream/ttmpeg2videoheader.cpp 2011-05-05 00:00:33.936254667 +0200
++++ ttcut/avstream/ttmpeg2videoheader.cpp 2011-05-05 00:05:42.999588000 +0200
+@@ -170,18 +170,11 @@
+ }
+
+ /* /////////////////////////////////////////////////////////////////////////////
+- * Returns the aspect ration as string value
++ * Returns the aspect ratio as string value
+ */
+ QString TTSequenceHeader::aspectRatioText()
+ {
+- QString szTemp;
+-
+- if ( aspect_ratio_information == 1 ) szTemp = "1:1";
+- if ( aspect_ratio_information == 2 ) szTemp = "4:3";
+- if ( aspect_ratio_information == 3 ) szTemp = "16:9";
+- if ( aspect_ratio_information == 4 ) szTemp = "2.21:1";
+-
+- return szTemp;
++ return ttAspectRatioText(aspect_ratio_information);
+ }
+
+ /* /////////////////////////////////////////////////////////////////////////////
+diff -Naur ttcut-old/avstream/ttmpeg2videostream.cpp ttcut/avstream/ttmpeg2videostream.cpp
+--- ttcut-old/avstream/ttmpeg2videostream.cpp 2011-05-05 00:00:33.936254667 +0200
++++ ttcut/avstream/ttmpeg2videostream.cpp 2011-05-05 00:00:43.579588002 +0200
+@@ -1505,7 +1505,7 @@
+
+ QDir temp_dir( TTCut::tempDirPath );
+ QString avi_out_file = "encode.avi";
+- QString mpeg2_out_file = "encode"; // extension is added by transcode (!)
++ QString mpeg2_out_file = "encode.m2v";
+ new_file_info.setFile( temp_dir, avi_out_file );
+
+ TTPicturesHeader* start_pic = header_list->pictureHeaderAt( start );
+@@ -1538,7 +1538,7 @@
+ TTTranscodeProvider* transcode_prov = new TTTranscodeProvider( );
+ transcode_prov->setParameter( enc_par );
+
+- // encode the part with transcode
++ // encode the part with ffmpeg
+ if ( transcode_prov->encodePart() )
+ {
+ new_file_info.setFile( temp_dir, "encode.m2v" );
+@@ -1565,7 +1565,7 @@
+ }
+ else
+ {
+- log->errorMsg(c_name, "Error in transcode part (!)");
++ log->errorMsg(c_name, "Error in ffmpeg part (!)");
+ }
+
+ // remove temporary files
+diff -Naur ttcut-old/extern/tttranscode.cpp ttcut/extern/tttranscode.cpp
+--- ttcut-old/extern/tttranscode.cpp 2011-05-05 00:00:33.939588000 +0200
++++ ttcut/extern/tttranscode.cpp 2011-05-05 00:02:27.062921334 +0200
+@@ -49,9 +49,9 @@
+ // message logger instance
+ log = TTMessageLogger::getInstance();
+
+- QString str_head = "starting encoder >>>transcode -y ffmpeg<<<";
++ QString str_head = "starting encoder >>>ffmpeg<<<";
+
+- str_command = "transcode";
++ str_command = "ffmpeg";
+ transcode_success = false;
+
+ setModal( true );
+@@ -76,7 +76,7 @@
+ {
+ #if defined (TTTRANSCODE_DEBUG)
+ log->debugMsg( c_name, "----------------------------------------------------" );
+- log->debugMsg( c_name, "transcode parameter:" );
++ log->debugMsg( c_name, "ffmpeg parameter:" );
+ log->debugMsg( c_name, "----------------------------------------------------" );
+ log->debugMsg( c_name, "avi-file : %s", qPrintable(enc_par.avi_input_finfo.absoluteFilePath()) );
+ log->debugMsg( c_name, "mpeg-file : %s", qPrintable(enc_par.mpeg2_output_finfo.absoluteFilePath()) );
+@@ -86,32 +86,32 @@
+ log->debugMsg( c_name, "----------------------------------------------------" );
+ #endif
+
+- //transcode -i encode.avi --pre_clip 0 -y ffmpeg --export_prof dvd-pal --export_asr 2 -o encode
+ QString str_aspect;
+- str_aspect.sprintf("%d",enc_par.video_aspect_code );
++ str_aspect = ttAspectRatioText(enc_par.video_aspect_code);
+
+ QString str_format;
+ str_format.sprintf("%dx%d", enc_par.video_width, enc_par.video_height);
+
+ QString str_bitrate;
+- str_bitrate.sprintf("%f", enc_par.video_bitrate);
++ str_bitrate.sprintf("%.0f", enc_par.video_bitrate);
++
++ QString str_aspect_opt;
++ str_aspect_opt = "setdar=";
++
++ str_aspect_opt += str_aspect;
+
+ strl_command_line.clear();
+
+ strl_command_line << "-i"
+- << enc_par.avi_input_finfo.absoluteFilePath()
+- << "--pre_clip"
+- << "0"
+- //<< "-y" // isn't neccessary unless --export_prof is specified!
+- //<< "mpeg2enc,mp2enc" // mpeg2enc->video, mp2enc->audio!
+- //<< "-F"
+- //<< "8,\"-v 1 -q 3\""
+- << "--export_prof"
+- << "dvd" // dvd-pal
+- << "--export_asr"
+- << str_aspect
+- << "-o"
+- << enc_par.mpeg2_output_finfo.absoluteFilePath();
++ << enc_par.avi_input_finfo.absoluteFilePath()
++ << "-y"
++ << "-target"
++ << "dvd" //autodetects pal/ntsc
++ << "-f"
++ << "mpeg2video" //else ffmpeg creates an mpegps stream that mplex can not handle
++ << "-vf"
++ << str_aspect_opt //workaround for mpeg2video not preserving aspect ratio in combination with --enable-avfilter
++ << enc_par.mpeg2_output_finfo.absoluteFilePath();
+
+ log->infoMsg(c_name, strl_command_line.join(" "));
+ }
+@@ -124,7 +124,7 @@
+ int update = EVENT_LOOP_INTERVALL; //update intervall for local event loop
+ transcode_success = false;
+
+- // create the process object for transcode
++ // create the process object for ffmpeg
+ proc = new QProcess();
+
+ // read both channels: stderr and stdout
+@@ -197,12 +197,12 @@
+ switch (e_status) {
+ case QProcess::NormalExit:
+ //log->debugMsg(c_name, "The process ecxited normally: %d", e_code);
+- procMsg = tr("Transcode exit normally ... done(0)");
++ procMsg = tr("ffmpeg exit normally ... done(0)");
+ transcode_success = true;
+ break;
+ case QProcess::CrashExit:
+ //log->debugMsg(c_name, "The process crashed: %d", e_code);
+- procMsg = tr("Transcode crashed");
++ procMsg = tr("ffmpeg crashed");
+ transcode_success = false;
+ break;
+ default:
diff --git a/media-video/ttcut/files/ttcut-0.19.6-no_implicit_GLU.patch b/media-video/ttcut/files/ttcut-0.19.6-no_implicit_GLU.patch
new file mode 100644
index 000000000000..afb83aa296db
--- /dev/null
+++ b/media-video/ttcut/files/ttcut-0.19.6-no_implicit_GLU.patch
@@ -0,0 +1,24 @@
+Stop relying on implicit usage of GLU for compability with >=x11-libs/qt-opengl-4.8
+See, http://bugs.gentoo.org/407391
+
+--- mpeg2window/ttmpeg2window.cpp
++++ mpeg2window/ttmpeg2window.cpp
+@@ -33,6 +33,7 @@
+ // qApplication for the qApp pointer
+ #include <QApplication>
+ #include <QPixmap>
++#include <GL/glu.h>
+
+ // -----------------------------------------------------------------------------
+ // class declaration
+--- ttcut.pro
++++ ttcut.pro
+@@ -15,7 +15,7 @@
+ DEFINES += _FILE_OFFSET_BITS=64
+ DIST = TTCut
+ TARGET = ttcut
+-LIBS = -lmpeg2 -lmpeg2convert
++LIBS = -lmpeg2 -lmpeg2convert -lGLU
+ OBJECTS_DIR = obj
+ MOC_DIR = moc
+ UI_DIR = ui_h
diff --git a/media-video/ttcut/files/ttcut-0.19.6-ntsc-fps.patch b/media-video/ttcut/files/ttcut-0.19.6-ntsc-fps.patch
new file mode 100644
index 000000000000..0af76de1d095
--- /dev/null
+++ b/media-video/ttcut/files/ttcut-0.19.6-ntsc-fps.patch
@@ -0,0 +1,99 @@
+diff -upr ttcut-old/avstream/ttac3audiostream.cpp ttcut/avstream/ttac3audiostream.cpp
+--- ttcut-old/avstream/ttac3audiostream.cpp 2011-05-01 21:51:10.865817426 -0400
++++ ttcut/avstream/ttac3audiostream.cpp 2011-05-01 21:45:34.213440925 -0400
+@@ -256,6 +256,7 @@ void TTAC3AudioStream::cut( TTFileBuffer
+ float audio_start_time;
+ float audio_end_time;
+ float local_audio_offset = 0.0;
++ float fps = cut_list->videoStream()->frameRate();
+
+ #if defined(AC3STREAM_DEBUG)
+ log->debugMsg(c_name, "-----------------------------------------------");
+@@ -286,7 +287,7 @@ void TTAC3AudioStream::cut( TTFileBuffer
+
+ //qDebug( "%sstart / end : %d / %d",c_name,start_pos,end_pos );
+ //search
+- video_frame_length = 1000.0 / 25.0; //TODO: replace with fps
++ video_frame_length = 1000.0 / fps;
+
+ //qDebug( "%slocal audio offset: %f",c_name,local_audio_offset );
+
+diff -upr ttcut-old/avstream/ttmpeg2videoheader.cpp ttcut/avstream/ttmpeg2videoheader.cpp
+--- ttcut-old/avstream/ttmpeg2videoheader.cpp 2011-05-01 21:20:42.675440912 -0400
++++ ttcut/avstream/ttmpeg2videoheader.cpp 2011-04-29 23:06:29.684768509 -0400
+@@ -193,6 +193,7 @@ QString TTSequenceHeader::frameRateText(
+
+ if ( frame_rate_code == 2 ) szTemp = "24 fps";
+ if ( frame_rate_code == 3 ) szTemp = "25 fps";
++ if ( frame_rate_code == 4 ) szTemp = "29.970 fps";
+ if ( frame_rate_code == 5 ) szTemp = "30 fps";
+
+ return szTemp;
+@@ -207,6 +208,7 @@ float TTSequenceHeader::frameRateValue()
+
+ if ( frame_rate_code == 2 ) value = 24.0;
+ if ( frame_rate_code == 3 ) value = 25.0;
++ if ( frame_rate_code == 4 ) value = 29.970;
+ if ( frame_rate_code == 5 ) value = 30.0;
+
+ if ( frame_rate_code < 2 || frame_rate_code > 5 )
+diff -upr ttcut-old/avstream/ttmpegaudiostream.cpp ttcut/avstream/ttmpegaudiostream.cpp
+--- ttcut-old/avstream/ttmpegaudiostream.cpp 2011-05-01 21:20:42.679440927 -0400
++++ ttcut/avstream/ttmpegaudiostream.cpp 2011-05-01 21:45:55.036441412 -0400
+@@ -308,6 +308,7 @@ void TTMPEGAudioStream::cut( TTFileBuffe
+ float audio_start_time;
+ float audio_end_time;
+ float local_audio_offset = 0.0;
++ float fps = cut_list->videoStream()->frameRate();
+
+ #if defined MPEGAUDIO_DEBUG
+ log->infoMsg(c_name, "-----------------------------------------------");
+@@ -338,7 +339,7 @@ void TTMPEGAudioStream::cut( TTFileBuffe
+
+ //qDebug( "%sstart / end : %d / %d",c_name,start_pos,end_pos );
+ //search
+- video_frame_length = 1000.0 / 25.0; //TODO: replace with fps
++ video_frame_length = 1000.0 / fps;
+
+ //qDebug( "%slocal audio offset: %f",c_name,local_audio_offset );
+
+diff -upr ttcut-old/avstream/ttaviwriter.cpp ttcut/avstream/ttaviwriter.cpp
+--- ttcut-old/avstream/ttaviwriter.cpp 2011-05-01 22:05:47.307819446 -0400
++++ ttcut/avstream/ttaviwriter.cpp 2011-05-01 22:08:27.427839373 -0400
+@@ -49,6 +49,7 @@ TTAVIWriter::TTAVIWriter( TTProgressBar*
+
+ file_size = 0;
+ file_offset = 0;
++ fps = 0.0;
+ }
+
+
+@@ -78,6 +79,7 @@ bool TTAVIWriter::initAVIWriter( TTVideo
+ index_list = v_stream->indexList();
+ header_list = v_stream->headerList();
+ file_size = v_stream->streamLengthByte();
++ fps = v_stream->frameRate();
+
+ //create the decoder object
+ decoder = new TTMpeg2Decoder( qPrintable(video_file_name), index_list, header_list );
+@@ -125,8 +127,7 @@ int TTAVIWriter::writeAVI( int start_fra
+
+ //qDebug( "%sAVI frame info: width: %d x height: %d",c_name,frameInfo->width,frameInfo->height );
+
+- //TODO: avoid setting hard coded frame rate!
+- AVI_set_video(avi_file, frameInfo->width, frameInfo->height, 25.0, (char*)"YV12");
++ AVI_set_video(avi_file, frameInfo->width, frameInfo->height, fps, (char*)"YV12");
+
+ ref_data = new uint8_t [frameInfo->size+2*frameInfo->chroma_size];
+
+diff -upr ttcut-old/avstream/ttaviwriter.h ttcut/avstream/ttaviwriter.h
+--- ttcut-old/avstream/ttaviwriter.h 2011-05-01 22:05:47.308819943 -0400
++++ ttcut/avstream/ttaviwriter.h 2011-05-01 22:06:17.162739403 -0400
+@@ -72,6 +72,7 @@ class TTAVIWriter
+ off64_t file_offset;
+ uint8_t* ref_data;
+ avi_t* avi_file;
++ float fps;
+ };
+
+ #endif //TTAVIWRITER_H
diff --git a/media-video/ttcut/files/ttcut.desktop b/media-video/ttcut/files/ttcut.desktop
new file mode 100644
index 000000000000..b2f1325a2f73
--- /dev/null
+++ b/media-video/ttcut/files/ttcut.desktop
@@ -0,0 +1,13 @@
+[Desktop Entry]
+Version=1.0
+Type=Application
+Name=TTCut
+Comment=Removes commercials from DVB recordings
+Comment[de]=Entfernt Werbeeinblendungen aus DVB-Mitschnitten
+TryExec=ttcut
+Exec=ttcut
+Icon=ttcut
+Terminal=false
+StartupNotify=false
+MimeType=video/mpeg;
+Categories=AudioVideo;Video;AudioVideoEditing;
diff --git a/media-video/ttcut/metadata.xml b/media-video/ttcut/metadata.xml
new file mode 100644
index 000000000000..c050f53a91d0
--- /dev/null
+++ b/media-video/ttcut/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>billie@gentoo.org</email>
+ <name>Daniel Pielmeier</name>
+ </maintainer>
+ <longdescription><pkg>media-video/ttcut</pkg> is a tool designed to remove commercials from
+ DVB (European standard for digital radio and television broadcast)
+ recordings. It only accepts the elementary video and audio streams. This is
+ because the MPEG transport stream is slightly different to the MPEG Program
+ stream used on DVD media. Also it may contain errors that tools like
+ <pkg>media-video/projectx</pkg> can correct while demuxing the stream.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">ttcut.berlios</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/ttcut/ttcut-0.19.6-r3.ebuild b/media-video/ttcut/ttcut-0.19.6-r3.ebuild
new file mode 100644
index 000000000000..0eaa6ec22c62
--- /dev/null
+++ b/media-video/ttcut/ttcut-0.19.6-r3.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils fdo-mime qt4-r2
+
+DESCRIPTION="Tool for cutting MPEG files especially for removing commercials"
+HOMEPAGE="http://www.tritime.de/ttcut/"
+SRC_URI="mirror://sourceforge/${PN}.berlios/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND=">=media-libs/libmpeg2-0.4.0
+ dev-qt/qtgui:4
+ dev-qt/qtopengl:4
+ virtual/glu
+ virtual/opengl"
+RDEPEND="${DEPEND}
+ media-video/mplayer
+ >=media-video/ffmpeg-1.0.8[encode]"
+
+S=${WORKDIR}/${PN}
+
+PATCHES=(
+ "${FILESDIR}"/${P}-deprecated.patch
+ "${FILESDIR}"/${P}-ntsc-fps.patch
+ "${FILESDIR}"/${P}-ffmpeg-vf-setdar.patch
+ "${FILESDIR}"/${P}-no_implicit_GLU.patch
+ )
+
+src_install() {
+ dobin ttcut
+
+ domenu "${FILESDIR}"/${PN}.desktop
+
+ dodoc AUTHORS BUGS CHANGELOG README.* TODO
+}
diff --git a/media-video/ushare/Manifest b/media-video/ushare/Manifest
new file mode 100644
index 000000000000..e4f0aa839476
--- /dev/null
+++ b/media-video/ushare/Manifest
@@ -0,0 +1 @@
+DIST ushare-1.1a.tar.bz2 65864 SHA256 7b9b85c79968d4f4560f02a99e33c6a33ff58f9d41d8faea79e31cce2ee78665 SHA512 2144ef96e58960d4d11bcefcd857c7eb7adab8df4ff815772d3b9d668f9f9daa1312707eb00a770c461b2a316e094e6697a004723ea02e86ee872fbe60b4797c WHIRLPOOL de9043c34edfd9ff3a1220968496e2ce42fae43cf1b190c40a14f11a6e4297689d2d800878e698a9f57edbe35dbb5c7ca82d81a67029df648a0d6e6c75966471
diff --git a/media-video/ushare/files/01_all_ushare_build_system.patch b/media-video/ushare/files/01_all_ushare_build_system.patch
new file mode 100644
index 000000000000..c635bd7d52f4
--- /dev/null
+++ b/media-video/ushare/files/01_all_ushare_build_system.patch
@@ -0,0 +1,170 @@
+diff -uNr ushare-1.1a/configure ushare-1.1b/configure
+--- ushare-1.1a/configure 2007-12-09 08:03:36.000000000 -0500
++++ ushare-1.1b/configure 2012-03-25 17:35:07.000000000 -0400
+@@ -42,6 +42,9 @@
+ echo " --with-libdlna-dir=DIR check for libdlna installed in DIR"
+ echo ""
+ echo "Advanced options (experts only):"
++ echo " --disable-sysconf disable installation of init files"
++ echo " --enable-developer enable developer options"
++ echo " --disable-developer disable developer options"
+ echo " --enable-debug enable debugging symbols"
+ echo " --disable-debug disable debugging symbols"
+ echo " --disable-strip disable stripping of executables at installation"
+@@ -164,6 +167,11 @@
+ echo "#define $1 \"$2\"" >> $CONFIG_H
+ }
+
++check_cmd_exists(){
++ log check_cmd_exists "$@"
++ which "$@" >>$logfile 2>&1
++}
++
+ check_cmd(){
+ log "$@"
+ "$@" >>$logfile 2>&1
+@@ -300,13 +308,15 @@
+ strip="strip"
+ cpu=`uname -m`
+ optimize="yes"
++sysconf="yes"
++developer="no"
+ debug="no"
+ dostrip="yes"
+ extralibs=""
+ installstrip="-s"
+ cross_compile="no"
+ INSTALL="/usr/bin/install -c"
+-VERSION="1.1a"
++VERSION="1.2.0"
+ system_name=`uname -s 2>&1`
+
+ #################################################
+@@ -420,6 +430,12 @@
+ ;;
+ --disable-dlna) dlna="no"
+ ;;
++ --disable-sysconf) sysconf="no"
++ ;;
++ --enable-developer) developer="yes"
++ ;;
++ --disable-developer) developer="no"
++ ;;
+ --enable-debug) debug="yes"
+ ;;
+ --disable-debug) debug="no"
+@@ -584,6 +600,25 @@
+ linux && add_cflags -D_GNU_SOURCE
+
+ #################################################
++# check for developer options
++#################################################
++if enabled developer; then
++ add_cflags -Werror
++ add_cflags -DHAVE_DEVELOPER
++
++ have_ctags='no'
++ if check_cmd_exists 'ctags'; then
++ have_ctags='yes'
++ fi
++
++ have_etags='no'
++ if check_cmd_exists 'etags'; then
++ have_etags='yes'
++ fi
++
++fi
++
++#################################################
+ # check for debug symbols
+ #################################################
+ if enabled debug; then
+@@ -684,6 +719,8 @@
+ echolog " STRIP $strip"
+ echolog " make $make"
+ echolog " CPU $cpu ($tune)"
++echolog " install sysconf $sysconf"
++echolog " developer options $developer"
+ echolog " debug symbols $debug"
+ echolog " strip symbols $dostrip"
+ echolog " optimize $optimize"
+@@ -724,6 +761,10 @@
+ append_config "LDFLAGS=$LDFLAGS"
+ append_config "INSTALL=$INSTALL"
+
++append_config "INSTALL_SYSCONF=$sysconf"
++append_config "DEVELOPER=$developer"
++append_config "HAVE_CTAGS=$have_ctags"
++append_config "HAVE_ETAGS=$have_etags"
+ append_config "DEBUG=$debug"
+
+
+diff -uNr ushare-1.1a/scripts/Makefile ushare-1.1b/scripts/Makefile
+--- ushare-1.1a/scripts/Makefile 2007-12-09 08:03:36.000000000 -0500
++++ ushare-1.1b/scripts/Makefile 2012-03-25 17:35:07.000000000 -0400
+@@ -3,6 +3,11 @@
+ endif
+ include ../config.mak
+
++INSTALL_RULES =
++ifeq ($(INSTALL_SYSCONF),yes)
++ INSTALL_RULES += install-sysconf
++endif
++
+ CONF_FILE = "ushare.conf"
+ INITD_FILE = "ushare"
+
+@@ -14,7 +19,9 @@
+
+ distclean:
+
+-install:
++install: $(INSTALL_RULES)
++
++install-sysconf:
+ $(INSTALL) -d $(sysconfdir)
+ $(INSTALL) -m 644 $(CONF_FILE) $(sysconfdir)
+ $(INSTALL) -d $(sysconfdir)/init.d
+diff -uNr ushare-1.1a/src/Makefile ushare-1.1b/src/Makefile
+--- ushare-1.1a/src/Makefile 2007-12-09 08:03:36.000000000 -0500
++++ ushare-1.1b/src/Makefile 2012-03-25 17:35:07.000000000 -0400
+@@ -3,6 +3,15 @@
+ endif
+ include ../config.mak
+
++ifeq ($(DEVELOPER),yes)
++ ifeq ($(HAVE_ETAGS),yes)
++ BUILD_RULES += TAGS
++ endif
++ ifeq ($(HAVE_CTAGS),yes)
++ BUILD_RULES += tags
++ endif
++endif
++
+ PROG = ushare
+
+ EXTRADIST = ushare.1 \
+@@ -50,7 +59,7 @@
+
+ .SUFFIXES: .c .o
+
+-all: depend $(PROG)
++all: depend $(BUILD_RULES) $(PROG)
+
+ .c.o:
+ $(CC) -c $(CFLAGS) $(OPTFLAGS) -o $@ $<
+@@ -58,6 +67,14 @@
+ $(PROG): $(OBJS)
+ $(CC) $(OBJS) $(LDFLAGS) $(EXTRALIBS) -o $@
+
++TAGS:
++ @rm -f $@; \
++ ( find -name '*.[chS]' -print ) | xargs etags -a
++
++tags:
++ @rm -f $@; \
++ ( find -name '*.[chS]' -print ) | xargs ctags -a;
++
+ clean:
+ -$(RM) -f *.o $(PROG)
+ -$(RM) -f .depend
diff --git a/media-video/ushare/files/02_all_ushare_build_warnings.patch b/media-video/ushare/files/02_all_ushare_build_warnings.patch
new file mode 100644
index 000000000000..f79e7890f8c0
--- /dev/null
+++ b/media-video/ushare/files/02_all_ushare_build_warnings.patch
@@ -0,0 +1,35 @@
+diff --git a/src/ctrl_telnet.c b/src/ctrl_telnet.c
+index 0849d80..b3e9e8d 100644
+--- a/src/ctrl_telnet.c
++++ b/src/ctrl_telnet.c
+@@ -202,6 +202,7 @@ ctrl_telnet_start (int port)
+ void
+ ctrl_telnet_stop (void)
+ {
++ ssize_t tmp;
+ pthread_mutex_lock (&startstop_lock);
+
+ if (!started)
+@@ -211,7 +212,7 @@ ctrl_telnet_stop (void)
+ }
+
+ /* yes is int, which is bigger then char, so this should be safe */
+- write (ttd.killer[1], &yes, sizeof (char));
++ tmp = write (ttd.killer[1], &yes, sizeof (char));
+
+ pthread_mutex_unlock (&startstop_lock);
+ pthread_join (ttd.thread, NULL);
+diff --git a/src/mime.c b/src/mime.c
+index 66c48ab..bf0121b 100644
+--- a/src/mime.c
++++ b/src/mime.c
+@@ -144,7 +144,8 @@ char *mime_get_protocol (struct mime_type_t *mime)
+ if (!mime)
+ return NULL;
+
+- sprintf (protocol, mime->mime_protocol);
++ //sprintf (protocol, mime->mime_protocol);
++ strcpy (protocol, mime->mime_protocol);
+ strcat (protocol, "*");
+ return strdup (protocol);
+ }
diff --git a/media-video/ushare/files/03_all_ushare_mp4_video_mime.patch b/media-video/ushare/files/03_all_ushare_mp4_video_mime.patch
new file mode 100644
index 000000000000..0edba22cba94
--- /dev/null
+++ b/media-video/ushare/files/03_all_ushare_mp4_video_mime.patch
@@ -0,0 +1,20 @@
+diff --git a/src/mime.c b/src/mime.c
+index bf0121b..f38deca 100644
+--- a/src/mime.c
++++ b/src/mime.c
+@@ -53,6 +53,7 @@ const struct mime_type_t MIME_Type_List[] = {
+ { "mpeg2", UPNP_VIDEO, "http-get:*:video/mpeg2:"},
+ { "m4v", UPNP_VIDEO, "http-get:*:video/mp4:"},
+ { "m4p", UPNP_VIDEO, "http-get:*:video/mp4:"},
++ { "mp4", UPNP_VIDEO, "http-get:*:video/mp4:"},
+ { "mp4ps", UPNP_VIDEO, "http-get:*:video/x-nerodigital-ps:"},
+ { "ts", UPNP_VIDEO, "http-get:*:video/mpeg2:"},
+ { "ogm", UPNP_VIDEO, "http-get:*:video/mpeg:"},
+@@ -79,7 +80,6 @@ const struct mime_type_t MIME_Type_List[] = {
+ { "mp1", UPNP_AUDIO, "http-get:*:audio/mp1:"},
+ { "mp2", UPNP_AUDIO, "http-get:*:audio/mp2:"},
+ { "mp3", UPNP_AUDIO, "http-get:*:audio/mpeg:"},
+- { "mp4", UPNP_AUDIO, "http-get:*:audio/mp4:"},
+ { "m4a", UPNP_AUDIO, "http-get:*:audio/mp4:"},
+ { "ogg", UPNP_AUDIO, "http-get:*:audio/x-ogg:"},
+ { "wav", UPNP_AUDIO, "http-get:*:audio/wav:"},
diff --git a/media-video/ushare/files/04_all_ushare_upnp_build_fix.patch b/media-video/ushare/files/04_all_ushare_upnp_build_fix.patch
new file mode 100644
index 000000000000..c3ec37a324c5
--- /dev/null
+++ b/media-video/ushare/files/04_all_ushare_upnp_build_fix.patch
@@ -0,0 +1,156 @@
+diff -wbBur ushare-1.1a/src/http.c ushare-1.1a.my/src/http.c
+--- ushare-1.1a/src/http.c 2007-12-09 13:03:36.000000000 +0000
++++ ushare-1.1a.my/src/http.c 2010-10-29 11:13:07.000000000 +0000
+@@ -77,8 +77,7 @@
+ info->content_type = ixmlCloneDOMString (content_type);
+ }
+
+-static int
+-http_get_info (const char *filename, struct File_Info *info)
++int http_get_info (const char *filename, struct File_Info *info)
+ {
+ extern struct ushare_t *ut;
+ struct upnp_entry_t *entry = NULL;
+@@ -197,8 +196,7 @@
+ return ((UpnpWebFileHandle) file);
+ }
+
+-static UpnpWebFileHandle
+-http_open (const char *filename, enum UpnpOpenFileMode mode)
++UpnpWebFileHandle http_open (const char *filename, enum UpnpOpenFileMode mode)
+ {
+ extern struct ushare_t *ut;
+ struct upnp_entry_t *entry = NULL;
+@@ -251,8 +249,7 @@
+ return ((UpnpWebFileHandle) file);
+ }
+
+-static int
+-http_read (UpnpWebFileHandle fh, char *buf, size_t buflen)
++int http_read (UpnpWebFileHandle fh, char *buf, size_t buflen)
+ {
+ struct web_file_t *file = (struct web_file_t *) fh;
+ ssize_t len = -1;
+@@ -286,8 +283,7 @@
+ return len;
+ }
+
+-static int
+-http_write (UpnpWebFileHandle fh __attribute__((unused)),
++int http_write (UpnpWebFileHandle fh __attribute__((unused)),
+ char *buf __attribute__((unused)),
+ size_t buflen __attribute__((unused)))
+ {
+@@ -296,8 +292,7 @@
+ return 0;
+ }
+
+-static int
+-http_seek (UpnpWebFileHandle fh, off_t offset, int origin)
++int http_seek (UpnpWebFileHandle fh, off_t offset, int origin)
+ {
+ struct web_file_t *file = (struct web_file_t *) fh;
+ off_t newpos = -1;
+@@ -371,8 +366,7 @@
+ return 0;
+ }
+
+-static int
+-http_close (UpnpWebFileHandle fh)
++int http_close (UpnpWebFileHandle fh)
+ {
+ struct web_file_t *file = (struct web_file_t *) fh;
+
+@@ -402,13 +396,3 @@
+
+ return 0;
+ }
+-
+-struct UpnpVirtualDirCallbacks virtual_dir_callbacks =
+- {
+- http_get_info,
+- http_open,
+- http_read,
+- http_write,
+- http_seek,
+- http_close
+- };
+diff -wbBur ushare-1.1a/src/http.h ushare-1.1a.my/src/http.h
+--- ushare-1.1a/src/http.h 2007-12-09 13:03:36.000000000 +0000
++++ ushare-1.1a.my/src/http.h 2010-10-29 11:13:11.000000000 +0000
+@@ -25,6 +25,13 @@
+ #include <upnp/upnp.h>
+ #include <upnp/upnptools.h>
+
+-struct UpnpVirtualDirCallbacks virtual_dir_callbacks;
++int http_close (UpnpWebFileHandle fh);
++int http_write (UpnpWebFileHandle fh __attribute__((unused)),
++ char *buf __attribute__((unused)),
++ size_t buflen __attribute__((unused)));
++int http_seek (UpnpWebFileHandle fh, off_t offset, int origin);
++UpnpWebFileHandle http_open (const char *filename, enum UpnpOpenFileMode mode);
++int http_read (UpnpWebFileHandle fh, char *buf, size_t buflen);
++int http_get_info (const char *filename, struct File_Info *info);
+
+ #endif /* _HTTP_H_ */
+diff -wbBur ushare-1.1a/src/ushare.c ushare-1.1a.my/src/ushare.c
+--- ushare-1.1a/src/ushare.c 2007-12-09 13:03:36.000000000 +0000
++++ ushare-1.1a.my/src/ushare.c 2010-10-29 11:17:45.000000000 +0000
+@@ -188,7 +188,7 @@
+ if (strcmp (request->DevUDN + 5, ut->udn))
+ return;
+
+- ip = request->CtrlPtIPAddr.s_addr;
++ ip = (*(struct sockaddr_in*)&request->CtrlPtIPAddr).sin_addr.s_addr;
+ ip = ntohl (ip);
+ sprintf (val, "%d.%d.%d.%d",
+ (ip >> 24) & 0xFF, (ip >> 16) & 0xFF, (ip >> 8) & 0xFF, ip & 0xFF);
+@@ -348,7 +348,47 @@
+
+ UpnpEnableWebserver (TRUE);
+
+- res = UpnpSetVirtualDirCallbacks (&virtual_dir_callbacks);
++ res = UpnpVirtualDir_set_WriteCallback(http_write);
++ if (res != UPNP_E_SUCCESS)
++ {
++ log_error (_("Cannot set virtual directory callbacks\n"));
++ free (description);
++ return -1;
++ }
++
++ res = UpnpVirtualDir_set_GetInfoCallback(http_get_info);
++ if (res != UPNP_E_SUCCESS)
++ {
++ log_error (_("Cannot set virtual directory callbacks\n"));
++ free (description);
++ return -1;
++ }
++
++ res = UpnpVirtualDir_set_ReadCallback(http_read);
++ if (res != UPNP_E_SUCCESS)
++ {
++ log_error (_("Cannot set virtual directory callbacks\n"));
++ free (description);
++ return -1;
++ }
++
++ res = UpnpVirtualDir_set_OpenCallback(http_open);
++ if (res != UPNP_E_SUCCESS)
++ {
++ log_error (_("Cannot set virtual directory callbacks\n"));
++ free (description);
++ return -1;
++ }
++
++ res = UpnpVirtualDir_set_SeekCallback(http_seek);
++ if (res != UPNP_E_SUCCESS)
++ {
++ log_error (_("Cannot set virtual directory callbacks\n"));
++ free (description);
++ return -1;
++ }
++
++ res = UpnpVirtualDir_set_CloseCallback(http_close);
+ if (res != UPNP_E_SUCCESS)
+ {
+ log_error (_("Cannot set virtual directory callbacks\n"));
diff --git a/media-video/ushare/files/05_all_missing_headers.patch b/media-video/ushare/files/05_all_missing_headers.patch
new file mode 100644
index 000000000000..0d2f0e8faff9
--- /dev/null
+++ b/media-video/ushare/files/05_all_missing_headers.patch
@@ -0,0 +1,59 @@
+diff -uNr ushare-1.1a.a/src/cds.c ushare-1.1a.b/src/cds.c
+--- ushare-1.1a.a/src/cds.c 2007-12-09 08:03:36.000000000 -0500
++++ ushare-1.1a.b/src/cds.c 2012-05-27 11:28:42.000000000 -0400
+@@ -19,7 +19,9 @@
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
++#include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <upnp/upnp.h>
+ #include <upnp/upnptools.h>
+
+diff -uNr ushare-1.1a.a/src/cms.c ushare-1.1a.b/src/cms.c
+--- ushare-1.1a.a/src/cms.c 2007-12-09 08:03:36.000000000 -0500
++++ ushare-1.1a.b/src/cms.c 2012-05-27 11:25:03.000000000 -0400
+@@ -20,6 +20,7 @@
+ */
+
+ #include <stdlib.h>
++#include <string.h>
+ #include <upnp/upnp.h>
+ #include <upnp/upnptools.h>
+
+diff -uNr ushare-1.1a.a/src/http.c ushare-1.1a.b/src/http.c
+--- ushare-1.1a.a/src/http.c 2012-05-27 11:23:32.000000000 -0400
++++ ushare-1.1a.b/src/http.c 2012-05-27 11:25:13.000000000 -0400
+@@ -25,6 +25,7 @@
+ #include <errno.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <unistd.h>
+ #include <errno.h>
+
+diff -uNr ushare-1.1a.a/src/presentation.c ushare-1.1a.b/src/presentation.c
+--- ushare-1.1a.a/src/presentation.c 2007-12-09 08:03:36.000000000 -0500
++++ ushare-1.1a.b/src/presentation.c 2012-05-27 11:30:08.000000000 -0400
+@@ -18,7 +18,9 @@
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
++#include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+
+ #if HAVE_LANGINFO_CODESET
+ # include <langinfo.h>
+diff -uNr ushare-1.1a.a/src/services.c ushare-1.1a.b/src/services.c
+--- ushare-1.1a.a/src/services.c 2007-12-09 08:03:36.000000000 -0500
++++ ushare-1.1a.b/src/services.c 2012-05-27 11:25:26.000000000 -0400
+@@ -20,6 +20,7 @@
+ */
+
+ #include <stdlib.h>
++#include <string.h>
+ #include <upnp/upnp.h>
+ #include <upnp/upnptools.h>
+
diff --git a/media-video/ushare/files/06_all_ushare_disable_sysconf.patch b/media-video/ushare/files/06_all_ushare_disable_sysconf.patch
new file mode 100644
index 000000000000..c3adf8e54287
--- /dev/null
+++ b/media-video/ushare/files/06_all_ushare_disable_sysconf.patch
@@ -0,0 +1,20 @@
+Do not try to parse the default configuration file as everyting
+should be handled by the /etc/conf.d/ushare file in Gentoo
+Index: ushare-1.1a/src/ushare.c
+===================================================================
+--- ushare-1.1a.orig/src/ushare.c
++++ ushare-1.1a/src/ushare.c
+@@ -813,13 +813,6 @@ main (int argc, char **argv)
+ return EXIT_SUCCESS;
+ }
+
+- if (parse_config_file (ut) < 0)
+- {
+- /* fprintf here, because syslog not yet ready */
+- fprintf (stderr, _("Warning: can't parse file \"%s\".\n"),
+- ut->cfg_file ? ut->cfg_file : SYSCONFDIR "/" USHARE_CONFIG_FILE);
+- }
+-
+ if (ut->xbox360)
+ {
+ char *name;
diff --git a/media-video/ushare/files/07_all_drop_optimizations.patch b/media-video/ushare/files/07_all_drop_optimizations.patch
new file mode 100644
index 000000000000..7a5029f79519
--- /dev/null
+++ b/media-video/ushare/files/07_all_drop_optimizations.patch
@@ -0,0 +1,20 @@
+Index: ushare-1.1a/configure
+===================================================================
+--- ushare-1.1a.orig/configure
++++ ushare-1.1a/configure
+@@ -627,15 +627,6 @@ if enabled debug; then
+ dostrip=no
+ fi
+
+-if enabled optimize; then
+- if test -n "`$cc -v 2>&1 | grep xlc`"; then
+- add_cflags "-O5"
+- add_ldflags "-O5"
+- else
+- add_cflags "-O3"
+- fi
+-fi
+-
+ #################################################
+ # check for locales (optional)
+ #################################################
diff --git a/media-video/ushare/files/ushare.conf.d b/media-video/ushare/files/ushare.conf.d
new file mode 100644
index 000000000000..4779c0f2e2f7
--- /dev/null
+++ b/media-video/ushare/files/ushare.conf.d
@@ -0,0 +1,38 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# User to run ushare daemon (if none, root will be used)
+USHARE_USER="ushare"
+
+# UPNP Friendly Name:
+USHARE_NAME="uShare"
+
+# The interface to bind to:
+USHARE_IFACE="eth0"
+
+# Static ushare port:
+USHARE_PORT=""
+
+# Enable/Disable telnet:
+USHARE_TELNET="yes"
+
+# Choose different telnet port:
+USHARE_TELNET_PORT=""
+
+# Enable/Disable web component:
+USHARE_WEB="yes"
+
+# A List of directories to share, each precieded by '-c':
+USHARE_DIRS=""
+
+# Enable/Disable XboX 360 compliant profile:
+USHARE_XBOX="no"
+
+# Enable/Disable DLNA compliant profile (Playstation3 requires this):
+USHARE_DLNA="no"
+
+# Misc. options:
+USHARE_OPTS=""
+
+# Check ushare --help or man ushare for more options.
diff --git a/media-video/ushare/files/ushare.init.d b/media-video/ushare/files/ushare.init.d
new file mode 100644
index 000000000000..157a1e358842
--- /dev/null
+++ b/media-video/ushare/files/ushare.init.d
@@ -0,0 +1,79 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ use net
+}
+
+start() {
+ ebegin "Starting uShare"
+
+ # Sanity check to avoid ushare failling on booting with no
+ # shared dirs
+ if [[ -z "${USHARE_DIRS}" ]] ; then
+ eerror "Please set shared dirs in /etc/conf.d/ushare"
+ return 1
+ fi
+
+ if [[ -z "${USHARE_PORT}" ]] ; then
+ einfo "${USHARE_NAME} runs on a dynamic port"
+ local ushare_port=
+ else
+ local ushare_port="--port ${USHARE_PORT}"
+ einfo "${USHARE_NAME} using port ${USHARE_PORT}"
+ fi
+
+ if [[ "${USHARE_TELNET}" == "yes" ]] ; then
+ local ushare_telnet=
+ else
+ local ushare_telnet="--no-telnet"
+ fi
+
+ if [[ -z "${ushare_telnet}" ]] ; then
+ if [[ -z "${USHARE_TELNET_PORT}" ]] ; then
+ local ushare_telnet_port=
+ einfo "${USHARE_NAME} runs telnet on the default port"
+ else
+ local ushare_telnet_port="--telnet-port ${USHARE_TELNET_PORT}"
+ einfo "${USHARE_NAME} runs telnet on port ${USHARE_TELNET_PORT}"
+ fi
+ else
+ local ushare_telnet_port=
+ fi
+
+ if [[ "${USHARE_WEB}" == "yes" ]] ; then
+ local ushare_web=
+ else
+ local ushare_web="--no-web"
+ fi
+
+ if [[ "${USHARE_XBOX}" == "yes" ]] ; then
+ local ushare_xbox="--xbox"
+ else
+ local ushare_xbox=
+ fi
+
+ if [[ "${USHARE_DLNA}" == "yes" ]] ; then
+ local ushare_dlna="--dlna"
+ else
+ local ushare_dlna=
+ fi
+
+ start-stop-daemon --start --quiet -u ${USHARE_USER:-root} \
+ --exec /usr/bin/ushare -- -D -i ${USHARE_IFACE} \
+ -n ${USHARE_NAME} ${USHARE_OPTS} ${USHARE_DIRS} \
+ ${ushare_port} \
+ ${ushare_telnet} ${ushare_telnet_port} \
+ ${ushare_web} \
+ ${ushare_xbox} \
+ ${ushare_dlna}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping uShare"
+ start-stop-daemon --stop --quiet --exec /usr/bin/ushare
+ eend $?
+}
diff --git a/media-video/ushare/files/ushare.init.d.ng b/media-video/ushare/files/ushare.init.d.ng
new file mode 100644
index 000000000000..5349c4bb353f
--- /dev/null
+++ b/media-video/ushare/files/ushare.init.d.ng
@@ -0,0 +1,36 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ use net
+}
+
+start() {
+ ebegin "Starting uShare"
+
+ if [ ! -f /etc/ushare.conf -a -f /etc/conf.d/ushare ]; then
+ ewarn "Please migrate your settings from"
+ ewarn "/etc/conf.d/ushare to the new /etc/ushare.conf file"
+ ewarn "and then delete the /etc/conf.d/ushare file."
+ eerror "User migration steps are needed!"
+ fi
+
+ if [ -f /etc/ushare.conf -a -f /etc/conf.d/ushare ]; then
+ ewarn "Old configuration file /etc/conf.d/ushare detected!"
+ ewarn "Please migrate your settings to the new /etc/ushare.conf file"
+ ewarn "and then delete the old one."
+ eerror "User migration steps are needed!"
+ fi
+
+ start-stop-daemon --start --quiet -u ushare \
+ --exec /usr/bin/ushare -- -D --cfg=/etc/ushare.conf
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping uShare"
+ start-stop-daemon --stop --quiet --exec /usr/bin/ushare
+ eend $?
+}
diff --git a/media-video/ushare/files/ushare.service b/media-video/ushare/files/ushare.service
new file mode 100644
index 000000000000..a1ea1080fce6
--- /dev/null
+++ b/media-video/ushare/files/ushare.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Ushare Media Server
+Requires=network.target
+
+[Service]
+Type=forking
+User=ushare
+ExecStart=/usr/bin/ushare -D --cfg=/etc/ushare.conf
+
+[Install]
+WantedBy=multi-user.target
diff --git a/media-video/ushare/metadata.xml b/media-video/ushare/metadata.xml
new file mode 100644
index 000000000000..b5ccf28b8d54
--- /dev/null
+++ b/media-video/ushare/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>hwoarang@gentoo.org</email>
+ <name>Markos Chandras</name>
+</maintainer>
+<use>
+ <flag name='dlna'>Add DLNA (<pkg>media-libs/libdlna</pkg>) support</flag>
+</use>
+</pkgmetadata>
diff --git a/media-video/ushare/ushare-1.1a-r5.ebuild b/media-video/ushare/ushare-1.1a-r5.ebuild
new file mode 100644
index 000000000000..3c9ec8e55652
--- /dev/null
+++ b/media-video/ushare/ushare-1.1a-r5.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils multilib readme.gentoo toolchain-funcs user
+
+DESCRIPTION="uShare is a UPnP (TM) A/V & DLNA Media Server"
+HOMEPAGE="http://ushare.geexbox.org/"
+SRC_URI="http://ushare.geexbox.org/releases/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="dlna nls"
+
+RDEPEND=">=net-libs/libupnp-1.6.14
+ dlna? ( >=media-libs/libdlna-0.2.4 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ EPATCH_SOURCE="${FILESDIR}" EPATCH_SUFFIX="patch" \
+ EPATCH_OPTS="-p1" epatch
+
+ DOC_CONTENTS="Please edit /etc/conf.d/ushare to set the shared directories
+ and other important settings. Check system log if ushare is
+ not booting."
+}
+
+src_configure() {
+ local myconf
+ myconf="--prefix=/usr --disable-sysconf --disable-strip $(use_enable dlna)"
+ # nls can only be disabled, on by default.
+ use nls || myconf="${myconf} --disable-nls"
+
+ # I can't use econf
+ # --host is not implemented in ./configure file
+ tc-export CC CXX
+
+ ./configure ${myconf} || die "./configure failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ doman src/ushare.1
+ newconfd "${FILESDIR}"/ushare.conf.d ushare
+ newinitd "${FILESDIR}"/ushare.init.d ushare
+ dodoc NEWS README TODO THANKS AUTHORS
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ enewuser ushare
+ readme.gentoo_print_elog
+}
diff --git a/media-video/ushare/ushare-1.1a-r6.ebuild b/media-video/ushare/ushare-1.1a-r6.ebuild
new file mode 100644
index 000000000000..52f57dbc0231
--- /dev/null
+++ b/media-video/ushare/ushare-1.1a-r6.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils multilib readme.gentoo toolchain-funcs user systemd
+
+DESCRIPTION="uShare is a UPnP (TM) A/V & DLNA Media Server"
+HOMEPAGE="http://ushare.geexbox.org/"
+SRC_URI="http://ushare.geexbox.org/releases/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="dlna nls"
+
+RDEPEND=">=net-libs/libupnp-1.6.14
+ dlna? ( >=media-libs/libdlna-0.2.4 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ EPATCH_EXCLUDE="06_all_ushare_disable_sysconf.patch"
+ EPATCH_SOURCE="${FILESDIR}" EPATCH_SUFFIX="patch" \
+ EPATCH_OPTS="-p1" epatch
+
+ DOC_CONTENTS="Please edit /etc/ushare.conf to set the shared directories
+ and other important settings. Check system log if ushare is
+ not booting."
+}
+
+src_configure() {
+ local myconf
+ myconf="--prefix=/usr --sysconfdir=/etc --disable-strip $(use_enable dlna)"
+ # nls can only be disabled, on by default.
+ use nls || myconf="${myconf} --disable-nls"
+
+ # I can't use econf
+ # --host is not implemented in ./configure file
+ tc-export CC CXX
+
+ ./configure ${myconf} || die "./configure failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ doman src/ushare.1
+ newconfd "${FILESDIR}"/${PN}.conf.d ${PN}
+ newinitd "${FILESDIR}"/${PN}.init.d.ng ${PN}
+ dodoc NEWS README TODO THANKS AUTHORS
+ systemd_dounit "${FILESDIR}"/${PN}.service
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ enewuser ushare
+ readme.gentoo_print_elog
+ elog
+ elog "The config file has been moved to /etc/ushare.conf"
+ elog "Please migrate your settings from /etc/conf.d/ushare"
+ elog "to /etc/ushare.conf in order to use the ushare init script"
+ elog "and systemd unit service."
+ elog
+}
diff --git a/media-video/v4l2loopback/Manifest b/media-video/v4l2loopback/Manifest
new file mode 100644
index 000000000000..71d7c38ea916
--- /dev/null
+++ b/media-video/v4l2loopback/Manifest
@@ -0,0 +1,5 @@
+DIST v4l2loopback-0.4.0.tar.gz 195762 SHA256 cb2c2255f9cee4eab04e34f0ff90de83643088e6d6fccbf72d4dca2de7664b0f
+DIST v4l2loopback-0.4.1.tar.gz 197435 SHA256 9225e0f8020e516c0a8cf00f353c3f2aba63570f67ce3d06207f2570701841ed
+DIST v4l2loopback-0.6.1.tar.gz 207187 SHA256 50c707d967599fb2555b5427e89174afc993a7ab82b82fb542b6e41f0e2fdd5c SHA512 1c11aa73393023bfe1f06a0ed749aa165ab83c643eb57f8a545e776902eb6647df8b0ed9f4244a038de59d5f51e297e3ef09e8f4e5b5407a2b97c951f9245604 WHIRLPOOL 2a944f9bfac099d85324486c1f3a1d00eb788f67fe8d5040dbbe3b080cf19ca9f6428b34eaa9668cc056387719b3d5bac965ab557eb40df703f701506a322152
+DIST v4l2loopback-0.6.3.tar.gz 208243 SHA256 92e63637a4722bb75c666ffb295b53becb304ccf3818d995a93c9db44395ac43 SHA512 a633b49e7f16a167f36821e083155fe91c1924bbd1b9ded73e895d4ce43c2e175cbd4e0646129b73c27fede8a1ae4451c62e3b182b936c8d60b36b146a57487e WHIRLPOOL e70b0508e75f6367a799cc1d874e8864d4db8fa85666fc040977e60023632696860673d0d02c0fe7e211e1d05a8a9405915db6fa7015c380b0516e666a0212fc
+DIST v4l2loopback-0.8.0.tar.gz 209905 SHA256 e9db5af88175aac753648d3f2ddb359962feb7e17e7ef81deaa52f1f7d89f08d SHA512 79c63149bc851ee84ce2f656740e954c22a9590e930972a107c828e0cd031c521c2c461b567e43b5c24ff6774c1d2838656196344c37ec72689e26680cd4c743 WHIRLPOOL a540503de5618b17b98be4ae45828a924ab2b95f315609f0947d15a1225d1104fc39fd27b266e5f21a6ee3c290b11bacb20a3956246d888bf07a871b319f3588
diff --git a/media-video/v4l2loopback/metadata.xml b/media-video/v4l2loopback/metadata.xml
new file mode 100644
index 000000000000..9db3da416cd8
--- /dev/null
+++ b/media-video/v4l2loopback/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>naota@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">umlaeute/v4l2loopback</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/v4l2loopback/v4l2loopback-0.4.0.ebuild b/media-video/v4l2loopback/v4l2loopback-0.4.0.ebuild
new file mode 100644
index 000000000000..e769208ce4c0
--- /dev/null
+++ b/media-video/v4l2loopback/v4l2loopback-0.4.0.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit linux-mod
+
+DESCRIPTION="v4l2 loopback device which output is it's own input"
+HOMEPAGE="https://github.com/umlaeute/v4l2loopback"
+SRC_URI="https://github.com/umlaeute/v4l2loopback/tarball/v${PV} -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+CONFIG_CHECK="VIDEO_DEV"
+MODULE_NAMES="v4l2loopback(video:)"
+BUILD_TARGETS="all"
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"/umlaeute-v4l2loopback-26fbb08
diff --git a/media-video/v4l2loopback/v4l2loopback-0.4.1.ebuild b/media-video/v4l2loopback/v4l2loopback-0.4.1.ebuild
new file mode 100644
index 000000000000..db60ff0e4b1c
--- /dev/null
+++ b/media-video/v4l2loopback/v4l2loopback-0.4.1.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit linux-mod
+
+DESCRIPTION="v4l2 loopback device which output is it's own input"
+HOMEPAGE="https://github.com/umlaeute/v4l2loopback"
+SRC_URI="https://github.com/umlaeute/v4l2loopback/tarball/v${PV} -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+CONFIG_CHECK="VIDEO_DEV"
+MODULE_NAMES="v4l2loopback(video:)"
+BUILD_TARGETS="all"
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"/umlaeute-v4l2loopback-18f560f
diff --git a/media-video/v4l2loopback/v4l2loopback-0.6.1.ebuild b/media-video/v4l2loopback/v4l2loopback-0.6.1.ebuild
new file mode 100644
index 000000000000..636b48fa4ffb
--- /dev/null
+++ b/media-video/v4l2loopback/v4l2loopback-0.6.1.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit linux-mod vcs-snapshot
+
+DESCRIPTION="v4l2 loopback device which output is it's own input"
+HOMEPAGE="https://github.com/umlaeute/v4l2loopback"
+SRC_URI="https://github.com/umlaeute/v4l2loopback/tarball/v${PV} -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+CONFIG_CHECK="VIDEO_DEV"
+MODULE_NAMES="v4l2loopback(video:)"
+BUILD_TARGETS="all"
+
+DEPEND=""
+RDEPEND="${DEPEND}"
diff --git a/media-video/v4l2loopback/v4l2loopback-0.6.3-r1.ebuild b/media-video/v4l2loopback/v4l2loopback-0.6.3-r1.ebuild
new file mode 100644
index 000000000000..5239cb6cdc4b
--- /dev/null
+++ b/media-video/v4l2loopback/v4l2loopback-0.6.3-r1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit linux-mod vcs-snapshot
+
+DESCRIPTION="v4l2 loopback device which output is it's own input"
+HOMEPAGE="https://github.com/umlaeute/v4l2loopback"
+SRC_URI="https://github.com/umlaeute/v4l2loopback/tarball/v${PV} -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="examples"
+
+CONFIG_CHECK="VIDEO_DEV"
+MODULE_NAMES="v4l2loopback(video:)"
+BUILD_TARGETS="all"
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+src_compile() {
+ linux-mod_src_compile
+ if use examples; then
+ cd "${S}"/examples
+ emake
+ fi
+}
+
+src_install() {
+ linux-mod_src_install
+ dosbin utils/v4l2loopback-ctl
+ dodoc doc/kernel_debugging.txt
+ dohtml doc/v4l2.html
+ if use examples; then
+ dosbin examples/yuv4mpeg_to_v4l2
+ docinto examples
+ dodoc examples/{*.sh,*.c,Makefile}
+ fi
+}
diff --git a/media-video/v4l2loopback/v4l2loopback-0.6.3.ebuild b/media-video/v4l2loopback/v4l2loopback-0.6.3.ebuild
new file mode 100644
index 000000000000..18c1a2569b19
--- /dev/null
+++ b/media-video/v4l2loopback/v4l2loopback-0.6.3.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit linux-mod vcs-snapshot
+
+DESCRIPTION="v4l2 loopback device which output is it's own input"
+HOMEPAGE="https://github.com/umlaeute/v4l2loopback"
+SRC_URI="https://github.com/umlaeute/v4l2loopback/tarball/v${PV} -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+CONFIG_CHECK="VIDEO_DEV"
+MODULE_NAMES="v4l2loopback(video:)"
+BUILD_TARGETS="all"
+
+DEPEND=""
+RDEPEND="${DEPEND}"
diff --git a/media-video/v4l2loopback/v4l2loopback-0.8.0.ebuild b/media-video/v4l2loopback/v4l2loopback-0.8.0.ebuild
new file mode 100644
index 000000000000..960e5d0e5311
--- /dev/null
+++ b/media-video/v4l2loopback/v4l2loopback-0.8.0.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit linux-mod vcs-snapshot
+
+DESCRIPTION="v4l2 loopback device which output is it's own input"
+HOMEPAGE="https://github.com/umlaeute/v4l2loopback"
+SRC_URI="https://github.com/umlaeute/v4l2loopback/tarball/v${PV} -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="examples"
+
+CONFIG_CHECK="VIDEO_DEV"
+MODULE_NAMES="v4l2loopback(video:)"
+BUILD_TARGETS="all"
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+src_compile() {
+ linux-mod_src_compile
+ if use examples; then
+ cd "${S}"/examples
+ emake
+ fi
+}
+
+src_install() {
+ linux-mod_src_install
+ dosbin utils/v4l2loopback-ctl
+ dodoc doc/kernel_debugging.txt
+ dohtml doc/v4l2.html
+ if use examples; then
+ dosbin examples/yuv4mpeg_to_v4l2
+ docinto examples
+ dodoc examples/{*.sh,*.c,Makefile}
+ fi
+}
diff --git a/media-video/vamps/Manifest b/media-video/vamps/Manifest
new file mode 100644
index 000000000000..9038dbaf133b
--- /dev/null
+++ b/media-video/vamps/Manifest
@@ -0,0 +1 @@
+DIST vamps-0.99.2.tar.gz 47062 SHA256 9bac71441db55c04a642c786d6427efdb65aa27f4b1719ffa34ebc3869572694
diff --git a/media-video/vamps/files/vamps-0.99.2-premature-eof.patch b/media-video/vamps/files/vamps-0.99.2-premature-eof.patch
new file mode 100644
index 000000000000..48340498d9bc
--- /dev/null
+++ b/media-video/vamps/files/vamps-0.99.2-premature-eof.patch
@@ -0,0 +1,46 @@
+--- vamps-0.99.2/vamps/vamps.c.orig 2006-04-15 08:00:07.000000000 -0400
++++ vamps-0.99.2/vamps/vamps.c 2007-01-26 06:54:27.000000000 -0500
+@@ -18,6 +18,9 @@
+ //
+ // Revision history (latest first):
+ //
++// 2007/01/26: V0.99.3: Fixed assumptions in lock() which do not hold for pipes.
++// This cures the "Premature EOF" problem.
++//
+ // 2006/04/15: V0.99.2: Fixed some signed/unsigned issues which caused compiler
+ // warnings on some platforms. No funtional changes.
+ //
+@@ -396,13 +399,24 @@
+ rhwp = rptr + avail;
+ }
+
+- n = read (0, rhwp, RBUF_SIZE - avail);
+-
+- if (n % SECT_SIZE)
+- fatal ("Premature EOF");
+-
+- rhwp += n;
+- bytes_read += n;
++ while (avail < size)
++ {
++ // read; reads from an open pipe will return any non-zero amount of data
++ // (not necessarily the amount we wanted!)
++ n = read (0, rhwp, RBUF_SIZE - avail);
++ if (!n)
++ {
++ if (avail % SECT_SIZE)
++ // we got an EOF and only a partial sector
++ fatal ("Premature EOF");
++ break;
++ }
++ else if (n == -1)
++ fatal ("Read from stdin: %s", strerror (errno));
++ rhwp += n;
++ bytes_read += n;
++ avail += n;
++ }
+
+ return !n;
+ }
+
+
diff --git a/media-video/vamps/metadata.xml b/media-video/vamps/metadata.xml
new file mode 100644
index 000000000000..d769aab5e32c
--- /dev/null
+++ b/media-video/vamps/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">vamps</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/vamps/vamps-0.99.2-r1.ebuild b/media-video/vamps/vamps-0.99.2-r1.ebuild
new file mode 100644
index 000000000000..2152bed8bc6f
--- /dev/null
+++ b/media-video/vamps/vamps-0.99.2-r1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Very fast requantisizing tool for backup DVDs"
+HOMEPAGE="http://vamps.sourceforge.net/"
+SRC_URI="mirror://sourceforge/vamps/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+DEPEND=">=media-libs/libdvdread-0.9.4"
+
+RDEPEND="${DEPEND}
+ >=media-video/dvdauthor-0.6.10"
+
+src_unpack() {
+ unpack ${A}
+ epatch "${FILESDIR}/${P}-premature-eof.patch"
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" || die "emake failed"
+}
+
+src_install() {
+ dobin vamps/vamps play_cell/play_cell || die "install failed"
+}
diff --git a/media-video/vamps/vamps-0.99.2.ebuild b/media-video/vamps/vamps-0.99.2.ebuild
new file mode 100644
index 000000000000..785b4b6573f7
--- /dev/null
+++ b/media-video/vamps/vamps-0.99.2.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Very fast requantisizing tool for backup DVDs"
+HOMEPAGE="http://vamps.sourceforge.net/"
+SRC_URI="mirror://sourceforge/vamps/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE=""
+DEPEND=">=media-libs/libdvdread-0.9.4"
+
+RDEPEND="${DEPEND}
+ >=media-video/dvdauthor-0.6.10"
+
+src_compile() {
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" || die "emake failed"
+}
+
+src_install() {
+ dobin vamps/vamps play_cell/play_cell || die "install failed"
+}
diff --git a/media-video/vcdgear/Manifest b/media-video/vcdgear/Manifest
new file mode 100644
index 000000000000..1df26e51ac7c
--- /dev/null
+++ b/media-video/vcdgear/Manifest
@@ -0,0 +1 @@
+DIST vcdgear176-040415_linux.tar.gz 442937 SHA256 d6fc156b5c4960cf5e7cf047ae1101da772e13255ec02f71cbc07b2a8ca567a7 SHA512 c6fbefc2a5f96a629f70611da61245f7b23b03a524e67f75db5a873952abcb1db226f4b9bdee18298a8a21d0ae14ffee816ffcd7a732605c0a445015b7507b19 WHIRLPOOL 0aa2b1a1fcfc1a74ed62a0546cf465deb97dfd584086c081198310615feb6242e8450b22641e1848f3bc5384e3d2f2fe9fdfcac618e25d1258070f28283fe604
diff --git a/media-video/vcdgear/metadata.xml b/media-video/vcdgear/metadata.xml
new file mode 100644
index 000000000000..1cadc2e4ec21
--- /dev/null
+++ b/media-video/vcdgear/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>video</herd>
+<maintainer>
+ <email>media-video@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/media-video/vcdgear/vcdgear-1.76-r2.ebuild b/media-video/vcdgear/vcdgear-1.76-r2.ebuild
new file mode 100644
index 000000000000..5947c52aefac
--- /dev/null
+++ b/media-video/vcdgear/vcdgear-1.76-r2.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+QA_PRESTRIPPED=/opt/vcdgear/vcdgear
+QA_FLAGS_IGNORED=/opt/vcdgear/vcdgear
+
+STAMP=040415
+DESCRIPTION="extract MPEG streams from CD images, convert VCD files to MPEG, correct MPEG errors, and more"
+HOMEPAGE="http://www.vcdgear.com/"
+SRC_URI="http://www.vcdgear.com/files/vcdgear${PV//.}-${STAMP}_linux.tar.gz"
+
+LICENSE="all-rights-reserved"
+SLOT="0"
+KEYWORDS="-* amd64 x86"
+IUSE=""
+RESTRICT="mirror bindist"
+
+RDEPEND="virtual/libstdc++:3.3"
+DEPEND=""
+
+S=${WORKDIR}/${PN}
+
+src_install() {
+ insinto /opt/vcdgear
+ doins -r * || die "doins"
+ fperms a+rx /opt/vcdgear/vcdgear
+ dodir /opt/bin
+ dosym /opt/vcdgear/vcdgear /opt/bin/vcdgear
+}
diff --git a/media-video/vcdimager/Manifest b/media-video/vcdimager/Manifest
new file mode 100644
index 000000000000..a253ba0b6a35
--- /dev/null
+++ b/media-video/vcdimager/Manifest
@@ -0,0 +1 @@
+DIST vcdimager-0.7.24.tar.gz 1066815 SHA256 075d7a67353ff3004745da781435698b6bc4a053838d0d4a3ce0516d7d974694 SHA512 162f361d3c871c85887f0b25e70c207c511dcf597f337633be3ce925e8c589a8ba26275b8378d1002b8c5eb56995eda017f5f1cf52e52a38e9ff900acba7a214 WHIRLPOOL b94f3937415ec1b178484adfc653b1846e9f52ed95fd0677fa5f7b077b345f4cbd3b11526bb9b9011b76f74a916644e9d60dec3ce37571ed97523db04cb5ec42
diff --git a/media-video/vcdimager/metadata.xml b/media-video/vcdimager/metadata.xml
new file mode 100644
index 000000000000..0d9b0dcb7f33
--- /dev/null
+++ b/media-video/vcdimager/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>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/media-video/vcdimager/vcdimager-0.7.24.ebuild b/media-video/vcdimager/vcdimager-0.7.24.ebuild
new file mode 100644
index 000000000000..6049afa7ccf7
--- /dev/null
+++ b/media-video/vcdimager/vcdimager-0.7.24.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils multilib-minimal
+
+DESCRIPTION="GNU VCDimager"
+HOMEPAGE="http://www.vcdimager.org/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="+xml static-libs"
+
+RDEPEND=">=dev-libs/libcdio-0.90-r1[-minimal,${MULTILIB_USEDEP}]
+ dev-libs/popt
+ xml? ( dev-libs/libxml2 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS="AUTHORS BUGS ChangeLog FAQ HACKING NEWS README THANKS TODO"
+
+src_prepare() {
+ # Avoid building useless programs. Bug #226249
+ sed -i \
+ -e 's/check_PROGRAMS =/check_PROGRAMS +=/' \
+ -e 's/noinst_PROGRAMS =/check_PROGRAMS =/' \
+ test/Makefile.in || die
+ sed -i \
+ -e 's/noinst_PROGRAMS =/check_PROGRAMS =/' \
+ example/Makefile.in || die
+}
+
+multilib_src_configure() {
+ # We disable the xmltest because the configure script includes differently
+ # than the actual XML-frontend C files.
+ local myconf
+ if use xml && multilib_is_native_abi ; then
+ myconf="--with-xml-prefix=${EPREFIX}/usr --disable-xmltest"
+ else
+ myconf="--without-xml-frontend"
+ fi
+ multilib_is_native_abi || myconf="${myconf} --without-cli-frontend"
+ ECONF_SOURCE="${S}" \
+ econf $(use_enable static-libs static) ${myconf}
+}
+
+multilib_src_install_all() {
+ prune_libtool_files
+ einstalldocs
+}
diff --git a/media-video/vdr/Manifest b/media-video/vdr/Manifest
new file mode 100644
index 000000000000..64c29beddc9b
--- /dev/null
+++ b/media-video/vdr/Manifest
@@ -0,0 +1,5 @@
+DIST extpng-vdr-2.0.6-gentoo-edition-v6.patch.bz2 69472 SHA256 f2ea1371b88898acfde5fa390f5b13a5c23065a877bbba5658a194e64d6553e5 SHA512 f4ecb786ec5a026fa75fcf539518e80273bf43fc325c13a380c70eb85351910efa991b3ee71ca477e597bc2b4598a18620b6cf00fc02714acfcc4e6112d84b6c WHIRLPOOL 13bb3697afa4b2665d9de3de8892a0baf877991642a94d3305e15d98cbcba73aa743f80bdd76f9a3297653c92e99ec6ae629ed7919c26c730cef2fa2fd608ef1
+DIST extpng-vdr-2.2.0-gentoo-edition-v1.patch.bz2 34664 SHA256 eebc812b160f5f44d665efa7bacd5abc57b27815deb28eb3d83ea3129d43b2b5 SHA512 16d6fbb8201f003dfe653b6a49424b794d7e697e27ad6f2383dbe17b76712ea5a3da88a676900b84d75ff7425bf3eb9084d60a89a4598758f482dc1f013f7b3e WHIRLPOOL 702ec541dcdb075ba9e9df450312c7a5ca3b34e9520edaf85a89426734d184b3cc8138a2ed8ad0c34fb7599d99d48c7538842c7f8126751f3b3ebeb6702cac4d
+DIST vdr-2.0.6.tar.bz2 839575 SHA256 c33c6431726378d5af575d8cfcacd34a50d17334e091dc4a095b6b75bc99b972 SHA512 070ebbfb85478887088567872a71744305dbf9c75de8b095a8fe46d883b0b4fe140539caeb2243715f42793a45790a127542655f549f7ea3cb71c4f9912fa07d WHIRLPOOL c9d1cf47473299617d1eeca7b5445450448c558b17a20193260bf3a01030eb81e29f210dc349e9b3a51137acd6d866201d07860a79954ae2da2b87159db3e511
+DIST vdr-2.0.7.tar.bz2 841511 SHA256 5c81418dc97d70ae965af5bdf641057cb64a7e76ecf9c94f72e417cc6c73fb13 SHA512 cba35f62162cd681179872915023890f492e95cc94d65aadd3cb4d03d7e3c7e2f197e7f35149cdf872169af35c2b841e1042e054f28164860b7cea8367793ce0 WHIRLPOOL 262e8e96d399c34ae492d92491720346c29c3d84bfb1c8b4a1e992f3586514f698d9f33f5a3b8e8204a054ee41767547ad4510a6a7637c1b27e917655481ab5a
+DIST vdr-2.2.0.tar.bz2 922708 SHA256 7c259e1ed1f39d93d23df1d5d0f85dd2a1fa9ec1dadff79e5833e2ff3ebf6c4e SHA512 183f58133915c6c0fe8ec2b88becbcb2a36418210e6dcf7931053d3771d727c3581593f9eb5c9693abf39e22e728f7b41c42079cd704610c3636ec05134ea93d WHIRLPOOL 2ce98f242e7ae3e7969005fde7214a2707749ab06622e78d56764c50c9a3f1e6e06a693091f19d45dc537b1702d365d3f9cfa4af24fb61aa8a0c64c5385fa19e
diff --git a/media-video/vdr/files/channel_alternative.conf b/media-video/vdr/files/channel_alternative.conf
new file mode 100644
index 000000000000..fb9088f0c439
--- /dev/null
+++ b/media-video/vdr/files/channel_alternative.conf
@@ -0,0 +1,11 @@
+# Alternative channel configuration file
+#
+# Syntax: original channel id;alternative channel id
+# Example: C-62499-10007-12003;C-0-196-14
+# this means, if channel C-62499-10007-12003 is
+# not available for a recording, vdr will try to
+# use channel C-0-196-14
+#
+# lines beginning with '#' are ignored
+#
+
diff --git a/media-video/vdr/files/vdr-2.0.6-r2_gentoo.patch b/media-video/vdr/files/vdr-2.0.6-r2_gentoo.patch
new file mode 100644
index 000000000000..516bb7b7254f
--- /dev/null
+++ b/media-video/vdr/files/vdr-2.0.6-r2_gentoo.patch
@@ -0,0 +1,73 @@
+disabled plugin install from vdr source, we dont support this way
+patch to support LINGUAS variable
+fixed install on multicore cpu, creating CONFDIR on later time
+install libsi includes in own dir
+Signed-of-by: Joerg Bornkessel <hd_brummy@gentoo.org> 20/Jan/2015
+diff -Naur vdr-2.0.6.orig/Makefile vdr-2.0.6/Makefile
+--- vdr-2.0.6.orig/Makefile 2014-09-22 22:17:23.000000000 +0200
++++ vdr-2.0.6/Makefile 2014-09-24 15:22:43.000000000 +0200
+@@ -109,7 +109,7 @@
+ VDRVERSION = $(shell sed -ne '/define VDRVERSION/s/^.*"\(.*\)".*$$/\1/p' config.h)
+ APIVERSION = $(shell sed -ne '/define APIVERSION/s/^.*"\(.*\)".*$$/\1/p' config.h)
+
+-all: vdr i18n plugins
++all: vdr i18n
+
+ # Implicit rules:
+
+@@ -162,7 +162,7 @@
+
+ PODIR = po
+ LOCALEDIR = locale
+-I18Npo = $(wildcard $(PODIR)/*.po)
++I18Npo = $(foreach dir,$(LINGUAS),$(wildcard $(PODIR)/$(dir)*.po))
+ I18Nmo = $(addsuffix .mo, $(foreach file, $(I18Npo), $(basename $(file))))
+ I18Nmsgs = $(addprefix $(LOCALEDIR)/, $(addsuffix /LC_MESSAGES/vdr.mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file))))))
+ I18Npot = $(PODIR)/vdr.pot
+@@ -185,7 +185,7 @@
+
+ install-i18n: i18n
+ @mkdir -p $(DESTDIR)$(LOCDIR)
+- cp -r $(LOCALEDIR)/* $(DESTDIR)$(LOCDIR)
++ @(cd $(LOCALEDIR); for linguas in $(LINGUAS); do [ "$$linguas" = "en" ] && continue; cp -r --parents $$linguas* $(DESTDIR)$(LOCDIR); done)
+
+ # The 'include' directory (for plugins):
+
+@@ -247,7 +247,7 @@
+
+ # Install the files (note that 'install-pc' must be first!):
+
+-install: install-pc install-bin install-dirs install-conf install-doc install-plugins install-i18n install-includes
++install: install-pc install-bin install-dirs install-conf install-doc install-i18n install-includes
+
+ # VDR binary:
+
+@@ -259,11 +259,12 @@
+
+ install-dirs:
+ @mkdir -p $(DESTDIR)$(VIDEODIR)
+- @mkdir -p $(DESTDIR)$(CONFDIR)
+- @mkdir -p $(DESTDIR)$(CACHEDIR)
++# @mkdir -p $(DESTDIR)$(CONFDIR)
++# @mkdir -p $(DESTDIR)$(CACHEDIR)
+ @mkdir -p $(DESTDIR)$(RESDIR)
+
+ install-conf:
++ @mkdir -p $(DESTDIR)$(CONFDIR)
+ @cp -pn *.conf $(DESTDIR)$(CONFDIR)
+
+ # Documentation:
+@@ -290,8 +291,11 @@
+ # Includes:
+
+ install-includes: include-dir
+- @mkdir -p $(DESTDIR)$(INCDIR)
+- @cp -pLR include/vdr include/libsi $(DESTDIR)$(INCDIR)
++# @mkdir -p $(DESTDIR)$(INCDIR)
++# @cp -pLR include/vdr include/libsi $(DESTDIR)$(INCDIR)
++ @mkdir -p $(DESTDIR)$(INCDIR)/vdr $(DESTDIR)$(INCDIR)/vdr/libsi
++ @cp -pLR include/vdr $(DESTDIR)$(INCDIR)
++ @cp -pLR include/libsi Make.config $(DESTDIR)$(INCDIR)/vdr
+
+ # pkg-config file:
+
diff --git a/media-video/vdr/files/vdr-2.0.6_gentoo.patch b/media-video/vdr/files/vdr-2.0.6_gentoo.patch
new file mode 100644
index 000000000000..1641fc8e2ee6
--- /dev/null
+++ b/media-video/vdr/files/vdr-2.0.6_gentoo.patch
@@ -0,0 +1,68 @@
+diff -Naur vdr-2.0.6.orig/Makefile vdr-2.0.6/Makefile
+--- vdr-2.0.6.orig/Makefile 2014-09-22 22:17:23.000000000 +0200
++++ vdr-2.0.6/Makefile 2014-09-24 15:22:43.000000000 +0200
+@@ -109,7 +109,7 @@
+ VDRVERSION = $(shell sed -ne '/define VDRVERSION/s/^.*"\(.*\)".*$$/\1/p' config.h)
+ APIVERSION = $(shell sed -ne '/define APIVERSION/s/^.*"\(.*\)".*$$/\1/p' config.h)
+
+-all: vdr i18n plugins
++all: vdr i18n
+
+ # Implicit rules:
+
+@@ -162,7 +162,7 @@
+
+ PODIR = po
+ LOCALEDIR = locale
+-I18Npo = $(wildcard $(PODIR)/*.po)
++I18Npo = $(foreach dir,$(LINGUAS),$(wildcard $(PODIR)/$(dir)*.po))
+ I18Nmo = $(addsuffix .mo, $(foreach file, $(I18Npo), $(basename $(file))))
+ I18Nmsgs = $(addprefix $(LOCALEDIR)/, $(addsuffix /LC_MESSAGES/vdr.mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file))))))
+ I18Npot = $(PODIR)/vdr.pot
+@@ -185,7 +185,7 @@
+
+ install-i18n: i18n
+ @mkdir -p $(DESTDIR)$(LOCDIR)
+- cp -r $(LOCALEDIR)/* $(DESTDIR)$(LOCDIR)
++ @(cd $(LOCALEDIR); for linguas in $(LINGUAS); do [ "$$linguas" = "en" ] && continue; cp -r --parents $$linguas* $(DESTDIR)$(LOCDIR); done)
+
+ # The 'include' directory (for plugins):
+
+@@ -247,7 +247,7 @@
+
+ # Install the files (note that 'install-pc' must be first!):
+
+-install: install-pc install-bin install-dirs install-conf install-doc install-plugins install-i18n install-includes
++install: install-pc install-bin install-dirs install-conf install-doc install-i18n install-includes
+
+ # VDR binary:
+
+@@ -259,11 +259,12 @@
+
+ install-dirs:
+ @mkdir -p $(DESTDIR)$(VIDEODIR)
+- @mkdir -p $(DESTDIR)$(CONFDIR)
+- @mkdir -p $(DESTDIR)$(CACHEDIR)
++# @mkdir -p $(DESTDIR)$(CONFDIR)
++# @mkdir -p $(DESTDIR)$(CACHEDIR)
+ @mkdir -p $(DESTDIR)$(RESDIR)
+
+ install-conf:
++ @mkdir -p $(DESTDIR)$(CONFDIR)
+ @cp -pn *.conf $(DESTDIR)$(CONFDIR)
+
+ # Documentation:
+@@ -290,8 +291,11 @@
+ # Includes:
+
+ install-includes: include-dir
+- @mkdir -p $(DESTDIR)$(INCDIR)
+- @cp -pLR include/vdr include/libsi $(DESTDIR)$(INCDIR)
++# @mkdir -p $(DESTDIR)$(INCDIR)
++# @cp -pLR include/vdr include/libsi $(DESTDIR)$(INCDIR)
++ @mkdir -p $(DESTDIR)$(INCDIR)/vdr $(DESTDIR)$(INCDIR)/vdr/libsi
++ @cp -pLR include/vdr $(DESTDIR)$(INCDIR)
++ @cp -pLR include/libsi Make.config $(DESTDIR)$(INCDIR)/vdr
+
+ # pkg-config file:
+
diff --git a/media-video/vdr/files/vdr-2.0.7_systemd_argsdir.patch b/media-video/vdr/files/vdr-2.0.7_systemd_argsdir.patch
new file mode 100644
index 000000000000..de9f4b90163f
--- /dev/null
+++ b/media-video/vdr/files/vdr-2.0.7_systemd_argsdir.patch
@@ -0,0 +1,438 @@
+diff -Naur vdr-2.0.7.orig/HISTORY vdr-2.0.7/HISTORY
+--- vdr-2.0.7.orig/HISTORY 2015-01-23 09:16:13.735620000 +0100
++++ vdr-2.0.7/HISTORY 2015-01-23 09:17:29.038614491 +0100
+@@ -7916,6 +7916,16 @@
+ - The APIVERSION has been increased to 2.0.6 due to the changes to pat.h, sdt.h and
+ the functional modification to cFont::CreateFont().
+
++2015-01-18: Version 2.0.6 + backport of systemd support from versions 2.1.6 and 2.1.7
++
++- Added support for systemd (thanks to Christopher Reimer). To activate this you
++ need to add "SDNOTIFY=1" to the 'make' call.
++
++2015-01-18: Version 2.0.6 + backport of reading command line arguments from files, from version 2.1$
++
++- VDR now reads command line options from *.conf files in /etc/vdr/conf.d (thanks
++ to Lars Hanisch). See vdr.1 and vdr.5 for details.
++
+ 2015-01-20: Version 2.0.7
+
+ - Fixed a possible division by zero in frame rate detection.
+diff -Naur vdr-2.0.7.orig/Make.config.template vdr-2.0.7/Make.config.template
+--- vdr-2.0.7.orig/Make.config.template 2015-01-23 09:16:13.736620000 +0100
++++ vdr-2.0.7/Make.config.template 2015-01-23 09:16:34.199618503 +0100
+@@ -38,6 +38,7 @@
+
+ #VIDEODIR = /srv/vdr/video
+ #CONFDIR = /var/lib/vdr
++#ARGSDIR = /etc/vdr/conf.d
+ #CACHEDIR = /var/cache/vdr
+
+ # Overrides for preset/legacy configurations:
+diff -Naur vdr-2.0.7.orig/Makefile vdr-2.0.7/Makefile
+--- vdr-2.0.7.orig/Makefile 2015-01-23 09:16:13.724620001 +0100
++++ vdr-2.0.7/Makefile 2015-01-23 09:17:58.588612330 +0100
+@@ -31,6 +31,7 @@
+ DESTDIR ?=
+ VIDEODIR ?= /srv/vdr/video
+ CONFDIR ?= /var/lib/vdr
++ARGSDIR ?= /etc/vdr/conf.d
+ CACHEDIR ?= /var/cache/vdr
+
+ PREFIX ?= /usr/local
+@@ -66,7 +67,7 @@
+
+ SILIB = $(LSIDIR)/libsi.a
+
+-OBJS = audio.o channels.o ci.o config.o cutter.o device.o diseqc.o dvbdevice.o dvbci.o\
++OBJS = args.o audio.o channels.o ci.o config.o cutter.o device.o diseqc.o dvbdevice.o dvbci.o\
+ dvbplayer.o dvbspu.o dvbsubtitle.o eit.o eitscan.o epg.o filter.o font.o i18n.o interface.o keys.o\
+ lirc.o menu.o menuitems.o nit.o osdbase.o osd.o pat.o player.o plugin.o\
+ receiver.o recorder.o recording.o remote.o remux.o ringbuffer.o sdt.o sections.o shutdown.o\
+@@ -111,12 +112,18 @@
+ DEFINES += -DBIDI
+ LIBS += $(shell pkg-config --libs fribidi)
+ endif
++ifdef SDNOTIFY
++INCLUDES += $(shell pkg-config --cflags libsystemd-daemon)
++DEFINES += -DSDNOTIFY
++LIBS += $(shell pkg-config --libs libsystemd-daemon)
++endif
+
+ LIRC_DEVICE ?= /var/run/lirc/lircd
+
+ DEFINES += -DLIRC_DEVICE=\"$(LIRC_DEVICE)\"
+ DEFINES += -DVIDEODIR=\"$(VIDEODIR)\"
+ DEFINES += -DCONFDIR=\"$(CONFDIR)\"
++DEFINES += -DARGSDIR=\"$(ARGSDIR)\"
+ DEFINES += -DCACHEDIR=\"$(CACHEDIR)\"
+ DEFINES += -DRESDIR=\"$(RESDIR)\"
+ DEFINES += -DPLUGINDIR=\"$(LIBDIR)\"
+@@ -161,6 +168,7 @@
+ @echo "mandir=$(MANDIR)" >> $@
+ @echo "configdir=$(CONFDIR)" >> $@
+ @echo "videodir=$(VIDEODIR)" >> $@
++ @echo "argsdir=$(ARGSDIR)" >> $@
+ @echo "cachedir=$(CACHEDIR)" >> $@
+ @echo "resdir=$(RESDIR)" >> $@
+ @echo "libdir=$(LIBDIR)" >> $@
+@@ -278,6 +286,7 @@
+ install-dirs:
+ @mkdir -p $(DESTDIR)$(VIDEODIR)
+ # @mkdir -p $(DESTDIR)$(CONFDIR)
++ @mkdir -p $(DESTDIR)$(ARGSDIR)
+ # @mkdir -p $(DESTDIR)$(CACHEDIR)
+ @mkdir -p $(DESTDIR)$(RESDIR)
+
+diff -Naur vdr-2.0.7.orig/args.c vdr-2.0.7/args.c
+--- vdr-2.0.7.orig/args.c 1970-01-01 01:00:00.000000000 +0100
++++ vdr-2.0.7/args.c 2015-01-23 09:16:34.199618503 +0100
+@@ -0,0 +1,129 @@
++/*
++ * args.c: Read arguments from files
++ *
++ * See the main source file 'vdr.c' for copyright information and
++ * how to reach the author.
++ *
++ * Original version written by Lars Hanisch <dvb@flensrocker.de>.
++ *
++ * $Id$
++ */
++
++#include "args.h"
++#include <unistd.h>
++
++cArgs::cArgs(const char *Argv0)
++{
++ argv0 = Argv0;
++ argc = 0;
++ argv = NULL;
++}
++
++cArgs::~cArgs(void)
++{
++ if (argv != NULL)
++ delete [] argv;
++}
++
++bool cArgs::AddArg(const char *s)
++{
++ if (inVdrSection)
++ args.Append(strdup(s));
++ else if (*lastArg == NULL)
++ return false;
++ else
++ lastArg = cString::sprintf("%s %s", *lastArg, s);
++ return true;
++}
++
++bool cArgs::ReadDirectory(const char *Directory)
++{
++ if (argv != NULL)
++ delete [] argv;
++ argc = 0;
++ argv = NULL;
++ args.Clear();
++ lastArg = NULL;
++ inVdrSection = false;
++ cFileNameList files(Directory, false);
++ if (files.Size() == 0)
++ return false;
++ for (int i = 0; i < files.Size(); i++) {
++ const char *fileName = files.At(i);
++ if (startswith(fileName, ".") || !endswith(fileName, ".conf"))
++ continue;
++ cString fullFileName = AddDirectory(Directory, fileName);
++ struct stat fs;
++ if ((access(*fullFileName, F_OK) != 0) || (stat(*fullFileName, &fs) != 0) || S_ISDIR(fs.st_mode))
++ continue;
++ bool ok = true;
++ int line = 0;
++ FILE *f = fopen(*fullFileName, "r");
++ if (f) {
++ char *s;
++ cReadLine ReadLine;
++ while ((s = ReadLine.Read(f)) != NULL) {
++ line++;
++ s = stripspace(skipspace(s));
++ if (!isempty(s) && (s[0] != '#')) {
++ if (startswith(s, "[") && endswith(s, "]")) {
++ s[strlen(s) - 1] = 0;
++ s++;
++ if (*lastArg) {
++ args.Append(strdup(*lastArg));
++ lastArg = NULL;
++ }
++ if (strcmp(s, "vdr") == 0)
++ inVdrSection = true;
++ else {
++ inVdrSection = false;
++ lastArg = cString::sprintf("--plugin=%s", s);
++ }
++ }
++ else {
++ if ((strlen(s) > 2) && (s[0] == '-') && (s[1] != '-')) { // short option, split at first space
++ char *p = strchr(s, ' ');
++ if (p == NULL) {
++ ok = AddArg(s);
++ if (!ok)
++ break;
++ }
++ else {
++ *p = 0;
++ p++;
++ ok = AddArg(s);
++ if (!ok)
++ break;
++ ok = AddArg(p);
++ if (!ok)
++ break;
++ }
++ }
++ else {
++ ok = AddArg(s);
++ if (!ok)
++ break;
++ }
++ }
++ }
++ }
++ fclose(f);
++ }
++ if (!ok) {
++ esyslog("ERROR: args file %s, line %d", *fullFileName, line);
++ return false;
++ }
++ }
++ if (*lastArg) {
++ args.Append(strdup(*lastArg));
++ lastArg = NULL;
++ }
++ argv = new char*[args.Size() + 1];
++ argv[0] = strdup(*argv0);
++ argc = 1;
++ for (int i = 0; i < args.Size(); i++) {
++ argv[argc] = args.At(i);
++ argc++;
++ }
++ return true;
++}
+diff -Naur vdr-2.0.7.orig/args.h vdr-2.0.7/args.h
+--- vdr-2.0.7.orig/args.h 1970-01-01 01:00:00.000000000 +0100
++++ vdr-2.0.7/args.h 2015-01-23 09:16:34.199618503 +0100
+@@ -0,0 +1,34 @@
++/*
++ * args.h: Read arguments from files
++ *
++ * See the main source file 'vdr.c' for copyright information and
++ * how to reach the author.
++ *
++ * Original version written by Lars Hanisch <dvb@flensrocker.de>.
++ *
++ * $Id$
++ */
++
++#ifndef __ARGS_H
++#define __ARGS_H
++
++#include "tools.h"
++
++class cArgs {
++private:
++ cString argv0;
++ cStringList args;
++ cString lastArg;
++ bool inVdrSection;
++ int argc;
++ char **argv;
++ bool AddArg(const char *s);
++public:
++ cArgs(const char *Argv0);
++ ~cArgs(void);
++ bool ReadDirectory(const char *Directory);
++ int GetArgc(void) const { return argc; };
++ char **GetArgv(void) const { return argv; };
++ };
++
++#endif //__ARGS_H
+diff -Naur vdr-2.0.7.orig/interface.c vdr-2.0.7/interface.c
+--- vdr-2.0.7.orig/interface.c 2015-01-23 09:16:13.725620001 +0100
++++ vdr-2.0.7/interface.c 2015-01-23 09:16:34.199618503 +0100
+@@ -10,6 +10,9 @@
+ #include "interface.h"
+ #include <ctype.h>
+ #include <stdlib.h>
++#ifdef SDNOTIFY
++#include <systemd/sd-daemon.h>
++#endif
+ #include <unistd.h>
+ #include "i18n.h"
+ #include "status.h"
+@@ -159,6 +162,9 @@
+ bool known = Keys.KnowsRemote(Remote->Name());
+ dsyslog("remote control %s - %s", Remote->Name(), known ? "keys known" : "learning keys");
+ if (!known) {
++#ifdef SDNOTIFY
++ sd_notify(0, "READY=1\nSTATUS=Learning keys...");
++#endif
+ cSkinDisplayMenu *DisplayMenu = Skins.Current()->DisplayMenu();
+ DisplayMenu->SetMenuCategory(mcUnknown);
+ char Headline[256];
+diff -Naur vdr-2.0.7.orig/vdr.1 vdr-2.0.7/vdr.1
+--- vdr-2.0.7.orig/vdr.1 2015-01-23 09:16:13.730620000 +0100
++++ vdr-2.0.7/vdr.1 2015-01-23 09:16:34.200618503 +0100
+@@ -178,6 +178,10 @@
+ Read resource files from \fIdir\fR
+ (default is to read them from the config directory).
+ .TP
++.BI \-\-showargs[= dir ]
++Read command line arguments from \fIdir\fR (default is \fI/etc/vdr/conf.d\fR),
++display them to the console and exit.
++.TP
+ .BI \-s\ cmd ,\ \-\-shutdown= cmd
+ Call \fIcmd\fR to shutdown the computer. See the file \fIINSTALL\fR for more
+ information.
+@@ -213,6 +217,10 @@
+ .BI \-w\ sec ,\ \-\-watchdog= sec
+ Activate the watchdog timer with a timeout of \fIsec\fR seconds.
+ A value of \fB0\fR (default) disables the watchdog.
++.P
++If started without any options, vdr tries to read command line options
++from files named '*.conf' in the directory /etc/vdr/conf.d. Files are
++read in alphabetical order. See vdr(5) for details.
+ .SH SIGNALS
+ .TP
+ .B SIGINT, SIGTERM
+diff -Naur vdr-2.0.7.orig/vdr.5 vdr-2.0.7/vdr.5
+--- vdr-2.0.7.orig/vdr.5 2015-01-23 09:16:13.732620000 +0100
++++ vdr-2.0.7/vdr.5 2015-01-23 09:16:34.200618503 +0100
+@@ -895,6 +895,33 @@
+ just 16 bit wide. The internal representation in VDR allows for 32 bit to
+ be used, so that external tools can generate EPG data that is guaranteed
+ not to collide with the ids of existing data.
++.SS COMMANDLINE OPTIONS
++If started without any options, vdr tries to read any files in the directory
++/etc/vdr/conf.d with names that do not begin with a '.' and that end with '.conf'.
++These files are read in alphabetical order. The format of these files is
++
++# comment
++.br
++[name]
++.br
++-a
++.br
++-b 123
++.br
++--long
++.br
++--longarg=123
++.br
++
++Any lines that begin with '#' as the first non-whitespace character are considered
++comments and are ignored.
++A command line option file consists of one or more sections, indicated by '[name]',
++where 'name' is either the fixed word 'vdr' (if this section contains options for
++the main VDR program) or the name of the plugin this section applies to.
++Each option must be written on a separate line, including the leading '-' (for
++a short option) or '--' (for a long option). If the option has additional arguments,
++they have to be written on the same line as the option itself, separated from the
++option with a blank (short option) or equal sign (long option).
+ .SH SEE ALSO
+ .BR vdr (1)
+ .SH AUTHOR
+diff -Naur vdr-2.0.7.orig/vdr.c vdr-2.0.7/vdr.c
+--- vdr-2.0.7.orig/vdr.c 2015-01-23 09:16:13.732620000 +0100
++++ vdr-2.0.7/vdr.c 2015-01-23 09:16:34.200618503 +0100
+@@ -34,8 +34,12 @@
+ #include <stdlib.h>
+ #include <sys/capability.h>
+ #include <sys/prctl.h>
++#ifdef SDNOTIFY
++#include <systemd/sd-daemon.h>
++#endif
+ #include <termios.h>
+ #include <unistd.h>
++#include "args.h"
+ #include "audio.h"
+ #include "channels.h"
+ #include "config.h"
+@@ -192,6 +196,7 @@
+ #define DEFAULTWATCHDOG 0 // seconds
+ #define DEFAULTVIDEODIR VIDEODIR
+ #define DEFAULTCONFDIR dd(CONFDIR, VideoDirectory)
++#define DEFAULTARGSDIR dd(ARGSDIR, "/etc/vdr/conf.d")
+ #define DEFAULTCACHEDIR dd(CACHEDIR, VideoDirectory)
+ #define DEFAULTRESDIR dd(RESDIR, ConfigDirectory)
+ #define DEFAULTPLUGINDIR PLUGINDIR
+@@ -229,6 +234,15 @@
+ VdrUser = VDR_USER;
+ #endif
+
++ cArgs *Args = NULL;
++ if (argc == 1) {
++ Args = new cArgs(argv[0]);
++ if (Args->ReadDirectory(DEFAULTARGSDIR)) {
++ argc = Args->GetArgc();
++ argv = Args->GetArgv();
++ }
++ }
++
+ SetVideoDirectory(VideoDirectory);
+ cPluginManager PluginManager(DEFAULTPLUGINDIR);
+
+@@ -256,6 +270,7 @@
+ { "port", required_argument, NULL, 'p' },
+ { "record", required_argument, NULL, 'r' },
+ { "resdir", required_argument, NULL, 'r' | 0x100 },
++ { "showargs", optional_argument, NULL, 's' | 0x200 },
+ { "shutdown", required_argument, NULL, 's' },
+ { "split", no_argument, NULL, 's' | 0x100 },
+ { "terminal", required_argument, NULL, 't' },
+@@ -428,6 +443,19 @@
+ case 's' | 0x100:
+ Setup.SplitEditedFiles = 1;
+ break;
++ case 's' | 0x200: {
++ const char *ArgsDir = optarg ? optarg : DEFAULTARGSDIR;
++ cArgs Args(argv[0]);
++ if (!Args.ReadDirectory(ArgsDir)) {
++ fprintf(stderr, "vdr: can't read arguments from directory: %s\n", ArgsDir);
++ return 2;
++ }
++ int c = Args.GetArgc();
++ char **v = Args.GetArgv();
++ for (int i = 1; i < c; i++)
++ printf("%s\n", v[i]);
++ return 0;
++ }
+ case 't': Terminal = optarg;
+ if (access(Terminal, R_OK | W_OK) < 0) {
+ fprintf(stderr, "vdr: can't access terminal: %s\n", Terminal);
+@@ -541,6 +569,8 @@
+ " -s CMD, --shutdown=CMD call CMD to shutdown the computer\n"
+ " --split split edited files at the editing marks (only\n"
+ " useful in conjunction with --edit)\n"
++ " --showargs[=DIR] print the arguments read from DIR and exit\n"
++ " (default: %s)\n"
+ " -t TTY, --terminal=TTY controlling tty\n"
+ " -u USER, --user=USER run as user USER; only applicable if started as\n"
+ " root\n"
+@@ -563,6 +593,7 @@
+ DEFAULTLOCDIR,
+ DEFAULTSVDRPPORT,
+ DEFAULTRESDIR,
++ DEFAULTARGSDIR,
+ DEFAULTVIDEODIR,
+ DEFAULTWATCHDOG
+ );
+@@ -848,6 +879,10 @@
+ alarm(WatchdogTimeout); // Initial watchdog timer start
+ }
+
++#ifdef SDNOTIFY
++ sd_notify(0, "READY=1\nSTATUS=Ready");
++#endif
++
+ // Main program loop:
+
+ #define DELETE_MENU ((IsInfoMenu &= (Menu == NULL)), delete Menu, Menu = NULL)
diff --git a/media-video/vdr/files/vdr-2.0.7_systemd_argsdir_vanilla.patch b/media-video/vdr/files/vdr-2.0.7_systemd_argsdir_vanilla.patch
new file mode 100644
index 000000000000..f7bae16fdd40
--- /dev/null
+++ b/media-video/vdr/files/vdr-2.0.7_systemd_argsdir_vanilla.patch
@@ -0,0 +1,438 @@
+diff -Naur vdr-2.0.7.orig/HISTORY vdr-2.0.7/HISTORY
+--- vdr-2.0.7.orig/HISTORY 2015-01-23 09:07:52.777656645 +0100
++++ vdr-2.0.7/HISTORY 2015-01-23 09:09:57.798647500 +0100
+@@ -7916,6 +7916,16 @@
+ - The APIVERSION has been increased to 2.0.6 due to the changes to pat.h, sdt.h and
+ the functional modification to cFont::CreateFont().
+
++2015-01-18: Version 2.0.6 + backport of systemd support from versions 2.1.6 and 2.1.7
++
++- Added support for systemd (thanks to Christopher Reimer). To activate this you
++ need to add "SDNOTIFY=1" to the 'make' call.
++
++2015-01-18: Version 2.0.6 + backport of reading command line arguments from files, from version 2.1$
++
++- VDR now reads command line options from *.conf files in /etc/vdr/conf.d (thanks
++ to Lars Hanisch). See vdr.1 and vdr.5 for details.
++
+ 2015-01-20: Version 2.0.7
+
+ - Fixed a possible division by zero in frame rate detection.
+diff -Naur vdr-2.0.7.orig/Make.config.template vdr-2.0.7/Make.config.template
+--- vdr-2.0.7.orig/Make.config.template 2015-01-23 09:07:52.765656646 +0100
++++ vdr-2.0.7/Make.config.template 2015-01-23 09:08:15.775654963 +0100
+@@ -38,6 +38,7 @@
+
+ #VIDEODIR = /srv/vdr/video
+ #CONFDIR = /var/lib/vdr
++#ARGSDIR = /etc/vdr/conf.d
+ #CACHEDIR = /var/cache/vdr
+
+ # Overrides for preset/legacy configurations:
+diff -Naur vdr-2.0.7.orig/Makefile vdr-2.0.7/Makefile
+--- vdr-2.0.7.orig/Makefile 2015-01-23 09:07:52.778656645 +0100
++++ vdr-2.0.7/Makefile 2015-01-23 09:11:11.158642134 +0100
+@@ -31,6 +31,7 @@
+ DESTDIR ?=
+ VIDEODIR ?= /srv/vdr/video
+ CONFDIR ?= /var/lib/vdr
++ARGSDIR ?= /etc/vdr/conf.d
+ CACHEDIR ?= /var/cache/vdr
+
+ PREFIX ?= /usr/local
+@@ -66,7 +67,7 @@
+
+ SILIB = $(LSIDIR)/libsi.a
+
+-OBJS = audio.o channels.o ci.o config.o cutter.o device.o diseqc.o dvbdevice.o dvbci.o\
++OBJS = args.o audio.o channels.o ci.o config.o cutter.o device.o diseqc.o dvbdevice.o dvbci.o\
+ dvbplayer.o dvbspu.o dvbsubtitle.o eit.o eitscan.o epg.o filter.o font.o i18n.o interface.o keys.o\
+ lirc.o menu.o menuitems.o nit.o osdbase.o osd.o pat.o player.o plugin.o\
+ receiver.o recorder.o recording.o remote.o remux.o ringbuffer.o sdt.o sections.o shutdown.o\
+@@ -93,12 +94,18 @@
+ DEFINES += -DBIDI
+ LIBS += $(shell pkg-config --libs fribidi)
+ endif
++ifdef SDNOTIFY
++INCLUDES += $(shell pkg-config --cflags libsystemd-daemon)
++DEFINES += -DSDNOTIFY
++LIBS += $(shell pkg-config --libs libsystemd-daemon)
++endif
+
+ LIRC_DEVICE ?= /var/run/lirc/lircd
+
+ DEFINES += -DLIRC_DEVICE=\"$(LIRC_DEVICE)\"
+ DEFINES += -DVIDEODIR=\"$(VIDEODIR)\"
+ DEFINES += -DCONFDIR=\"$(CONFDIR)\"
++DEFINES += -DARGSDIR=\"$(ARGSDIR)\"
+ DEFINES += -DCACHEDIR=\"$(CACHEDIR)\"
+ DEFINES += -DRESDIR=\"$(RESDIR)\"
+ DEFINES += -DPLUGINDIR=\"$(LIBDIR)\"
+@@ -143,6 +150,7 @@
+ @echo "mandir=$(MANDIR)" >> $@
+ @echo "configdir=$(CONFDIR)" >> $@
+ @echo "videodir=$(VIDEODIR)" >> $@
++ @echo "argsdir=$(ARGSDIR)" >> $@
+ @echo "cachedir=$(CACHEDIR)" >> $@
+ @echo "resdir=$(RESDIR)" >> $@
+ @echo "libdir=$(LIBDIR)" >> $@
+@@ -260,6 +268,7 @@
+ install-dirs:
+ @mkdir -p $(DESTDIR)$(VIDEODIR)
+ # @mkdir -p $(DESTDIR)$(CONFDIR)
++ @mkdir -p $(DESTDIR)$(ARGSDIR)
+ # @mkdir -p $(DESTDIR)$(CACHEDIR)
+ @mkdir -p $(DESTDIR)$(RESDIR)
+
+diff -Naur vdr-2.0.7.orig/args.c vdr-2.0.7/args.c
+--- vdr-2.0.7.orig/args.c 1970-01-01 01:00:00.000000000 +0100
++++ vdr-2.0.7/args.c 2015-01-23 09:08:15.775654963 +0100
+@@ -0,0 +1,129 @@
++/*
++ * args.c: Read arguments from files
++ *
++ * See the main source file 'vdr.c' for copyright information and
++ * how to reach the author.
++ *
++ * Original version written by Lars Hanisch <dvb@flensrocker.de>.
++ *
++ * $Id$
++ */
++
++#include "args.h"
++#include <unistd.h>
++
++cArgs::cArgs(const char *Argv0)
++{
++ argv0 = Argv0;
++ argc = 0;
++ argv = NULL;
++}
++
++cArgs::~cArgs(void)
++{
++ if (argv != NULL)
++ delete [] argv;
++}
++
++bool cArgs::AddArg(const char *s)
++{
++ if (inVdrSection)
++ args.Append(strdup(s));
++ else if (*lastArg == NULL)
++ return false;
++ else
++ lastArg = cString::sprintf("%s %s", *lastArg, s);
++ return true;
++}
++
++bool cArgs::ReadDirectory(const char *Directory)
++{
++ if (argv != NULL)
++ delete [] argv;
++ argc = 0;
++ argv = NULL;
++ args.Clear();
++ lastArg = NULL;
++ inVdrSection = false;
++ cFileNameList files(Directory, false);
++ if (files.Size() == 0)
++ return false;
++ for (int i = 0; i < files.Size(); i++) {
++ const char *fileName = files.At(i);
++ if (startswith(fileName, ".") || !endswith(fileName, ".conf"))
++ continue;
++ cString fullFileName = AddDirectory(Directory, fileName);
++ struct stat fs;
++ if ((access(*fullFileName, F_OK) != 0) || (stat(*fullFileName, &fs) != 0) || S_ISDIR(fs.st_mode))
++ continue;
++ bool ok = true;
++ int line = 0;
++ FILE *f = fopen(*fullFileName, "r");
++ if (f) {
++ char *s;
++ cReadLine ReadLine;
++ while ((s = ReadLine.Read(f)) != NULL) {
++ line++;
++ s = stripspace(skipspace(s));
++ if (!isempty(s) && (s[0] != '#')) {
++ if (startswith(s, "[") && endswith(s, "]")) {
++ s[strlen(s) - 1] = 0;
++ s++;
++ if (*lastArg) {
++ args.Append(strdup(*lastArg));
++ lastArg = NULL;
++ }
++ if (strcmp(s, "vdr") == 0)
++ inVdrSection = true;
++ else {
++ inVdrSection = false;
++ lastArg = cString::sprintf("--plugin=%s", s);
++ }
++ }
++ else {
++ if ((strlen(s) > 2) && (s[0] == '-') && (s[1] != '-')) { // short option, split at first space
++ char *p = strchr(s, ' ');
++ if (p == NULL) {
++ ok = AddArg(s);
++ if (!ok)
++ break;
++ }
++ else {
++ *p = 0;
++ p++;
++ ok = AddArg(s);
++ if (!ok)
++ break;
++ ok = AddArg(p);
++ if (!ok)
++ break;
++ }
++ }
++ else {
++ ok = AddArg(s);
++ if (!ok)
++ break;
++ }
++ }
++ }
++ }
++ fclose(f);
++ }
++ if (!ok) {
++ esyslog("ERROR: args file %s, line %d", *fullFileName, line);
++ return false;
++ }
++ }
++ if (*lastArg) {
++ args.Append(strdup(*lastArg));
++ lastArg = NULL;
++ }
++ argv = new char*[args.Size() + 1];
++ argv[0] = strdup(*argv0);
++ argc = 1;
++ for (int i = 0; i < args.Size(); i++) {
++ argv[argc] = args.At(i);
++ argc++;
++ }
++ return true;
++}
+diff -Naur vdr-2.0.7.orig/args.h vdr-2.0.7/args.h
+--- vdr-2.0.7.orig/args.h 1970-01-01 01:00:00.000000000 +0100
++++ vdr-2.0.7/args.h 2015-01-23 09:08:15.775654963 +0100
+@@ -0,0 +1,34 @@
++/*
++ * args.h: Read arguments from files
++ *
++ * See the main source file 'vdr.c' for copyright information and
++ * how to reach the author.
++ *
++ * Original version written by Lars Hanisch <dvb@flensrocker.de>.
++ *
++ * $Id$
++ */
++
++#ifndef __ARGS_H
++#define __ARGS_H
++
++#include "tools.h"
++
++class cArgs {
++private:
++ cString argv0;
++ cStringList args;
++ cString lastArg;
++ bool inVdrSection;
++ int argc;
++ char **argv;
++ bool AddArg(const char *s);
++public:
++ cArgs(const char *Argv0);
++ ~cArgs(void);
++ bool ReadDirectory(const char *Directory);
++ int GetArgc(void) const { return argc; };
++ char **GetArgv(void) const { return argv; };
++ };
++
++#endif //__ARGS_H
+diff -Naur vdr-2.0.7.orig/interface.c vdr-2.0.7/interface.c
+--- vdr-2.0.7.orig/interface.c 2015-01-23 09:07:52.765656646 +0100
++++ vdr-2.0.7/interface.c 2015-01-23 09:08:15.775654963 +0100
+@@ -10,6 +10,9 @@
+ #include "interface.h"
+ #include <ctype.h>
+ #include <stdlib.h>
++#ifdef SDNOTIFY
++#include <systemd/sd-daemon.h>
++#endif
+ #include <unistd.h>
+ #include "i18n.h"
+ #include "status.h"
+@@ -159,6 +162,9 @@
+ bool known = Keys.KnowsRemote(Remote->Name());
+ dsyslog("remote control %s - %s", Remote->Name(), known ? "keys known" : "learning keys");
+ if (!known) {
++#ifdef SDNOTIFY
++ sd_notify(0, "READY=1\nSTATUS=Learning keys...");
++#endif
+ cSkinDisplayMenu *DisplayMenu = Skins.Current()->DisplayMenu();
+ DisplayMenu->SetMenuCategory(mcUnknown);
+ char Headline[256];
+diff -Naur vdr-2.0.7.orig/vdr.1 vdr-2.0.7/vdr.1
+--- vdr-2.0.7.orig/vdr.1 2015-01-23 09:07:52.770656646 +0100
++++ vdr-2.0.7/vdr.1 2015-01-23 09:08:15.776654963 +0100
+@@ -178,6 +178,10 @@
+ Read resource files from \fIdir\fR
+ (default is to read them from the config directory).
+ .TP
++.BI \-\-showargs[= dir ]
++Read command line arguments from \fIdir\fR (default is \fI/etc/vdr/conf.d\fR),
++display them to the console and exit.
++.TP
+ .BI \-s\ cmd ,\ \-\-shutdown= cmd
+ Call \fIcmd\fR to shutdown the computer. See the file \fIINSTALL\fR for more
+ information.
+@@ -213,6 +217,10 @@
+ .BI \-w\ sec ,\ \-\-watchdog= sec
+ Activate the watchdog timer with a timeout of \fIsec\fR seconds.
+ A value of \fB0\fR (default) disables the watchdog.
++.P
++If started without any options, vdr tries to read command line options
++from files named '*.conf' in the directory /etc/vdr/conf.d. Files are
++read in alphabetical order. See vdr(5) for details.
+ .SH SIGNALS
+ .TP
+ .B SIGINT, SIGTERM
+diff -Naur vdr-2.0.7.orig/vdr.5 vdr-2.0.7/vdr.5
+--- vdr-2.0.7.orig/vdr.5 2015-01-23 09:07:52.772656646 +0100
++++ vdr-2.0.7/vdr.5 2015-01-23 09:08:15.776654963 +0100
+@@ -889,6 +889,33 @@
+ just 16 bit wide. The internal representation in VDR allows for 32 bit to
+ be used, so that external tools can generate EPG data that is guaranteed
+ not to collide with the ids of existing data.
++.SS COMMANDLINE OPTIONS
++If started without any options, vdr tries to read any files in the directory
++/etc/vdr/conf.d with names that do not begin with a '.' and that end with '.conf'.
++These files are read in alphabetical order. The format of these files is
++
++# comment
++.br
++[name]
++.br
++-a
++.br
++-b 123
++.br
++--long
++.br
++--longarg=123
++.br
++
++Any lines that begin with '#' as the first non-whitespace character are considered
++comments and are ignored.
++A command line option file consists of one or more sections, indicated by '[name]',
++where 'name' is either the fixed word 'vdr' (if this section contains options for
++the main VDR program) or the name of the plugin this section applies to.
++Each option must be written on a separate line, including the leading '-' (for
++a short option) or '--' (for a long option). If the option has additional arguments,
++they have to be written on the same line as the option itself, separated from the
++option with a blank (short option) or equal sign (long option).
+ .SH SEE ALSO
+ .BR vdr (1)
+ .SH AUTHOR
+diff -Naur vdr-2.0.7.orig/vdr.c vdr-2.0.7/vdr.c
+--- vdr-2.0.7.orig/vdr.c 2015-01-23 09:07:52.772656646 +0100
++++ vdr-2.0.7/vdr.c 2015-01-23 09:08:15.776654963 +0100
+@@ -34,8 +34,12 @@
+ #include <stdlib.h>
+ #include <sys/capability.h>
+ #include <sys/prctl.h>
++#ifdef SDNOTIFY
++#include <systemd/sd-daemon.h>
++#endif
+ #include <termios.h>
+ #include <unistd.h>
++#include "args.h"
+ #include "audio.h"
+ #include "channels.h"
+ #include "config.h"
+@@ -186,6 +190,7 @@
+ #define DEFAULTWATCHDOG 0 // seconds
+ #define DEFAULTVIDEODIR VIDEODIR
+ #define DEFAULTCONFDIR dd(CONFDIR, VideoDirectory)
++#define DEFAULTARGSDIR dd(ARGSDIR, "/etc/vdr/conf.d")
+ #define DEFAULTCACHEDIR dd(CACHEDIR, VideoDirectory)
+ #define DEFAULTRESDIR dd(RESDIR, ConfigDirectory)
+ #define DEFAULTPLUGINDIR PLUGINDIR
+@@ -223,6 +228,15 @@
+ VdrUser = VDR_USER;
+ #endif
+
++ cArgs *Args = NULL;
++ if (argc == 1) {
++ Args = new cArgs(argv[0]);
++ if (Args->ReadDirectory(DEFAULTARGSDIR)) {
++ argc = Args->GetArgc();
++ argv = Args->GetArgv();
++ }
++ }
++
+ SetVideoDirectory(VideoDirectory);
+ cPluginManager PluginManager(DEFAULTPLUGINDIR);
+
+@@ -250,6 +264,7 @@
+ { "port", required_argument, NULL, 'p' },
+ { "record", required_argument, NULL, 'r' },
+ { "resdir", required_argument, NULL, 'r' | 0x100 },
++ { "showargs", optional_argument, NULL, 's' | 0x200 },
+ { "shutdown", required_argument, NULL, 's' },
+ { "split", no_argument, NULL, 's' | 0x100 },
+ { "terminal", required_argument, NULL, 't' },
+@@ -422,6 +437,19 @@
+ case 's' | 0x100:
+ Setup.SplitEditedFiles = 1;
+ break;
++ case 's' | 0x200: {
++ const char *ArgsDir = optarg ? optarg : DEFAULTARGSDIR;
++ cArgs Args(argv[0]);
++ if (!Args.ReadDirectory(ArgsDir)) {
++ fprintf(stderr, "vdr: can't read arguments from directory: %s\n", ArgsDir);
++ return 2;
++ }
++ int c = Args.GetArgc();
++ char **v = Args.GetArgv();
++ for (int i = 1; i < c; i++)
++ printf("%s\n", v[i]);
++ return 0;
++ }
+ case 't': Terminal = optarg;
+ if (access(Terminal, R_OK | W_OK) < 0) {
+ fprintf(stderr, "vdr: can't access terminal: %s\n", Terminal);
+@@ -535,6 +563,8 @@
+ " -s CMD, --shutdown=CMD call CMD to shutdown the computer\n"
+ " --split split edited files at the editing marks (only\n"
+ " useful in conjunction with --edit)\n"
++ " --showargs[=DIR] print the arguments read from DIR and exit\n"
++ " (default: %s)\n"
+ " -t TTY, --terminal=TTY controlling tty\n"
+ " -u USER, --user=USER run as user USER; only applicable if started as\n"
+ " root\n"
+@@ -557,6 +587,7 @@
+ DEFAULTLOCDIR,
+ DEFAULTSVDRPPORT,
+ DEFAULTRESDIR,
++ DEFAULTARGSDIR,
+ DEFAULTVIDEODIR,
+ DEFAULTWATCHDOG
+ );
+@@ -837,6 +868,10 @@
+ alarm(WatchdogTimeout); // Initial watchdog timer start
+ }
+
++#ifdef SDNOTIFY
++ sd_notify(0, "READY=1\nSTATUS=Ready");
++#endif
++
+ // Main program loop:
+
+ #define DELETE_MENU ((IsInfoMenu &= (Menu == NULL)), delete Menu, Menu = NULL)
diff --git a/media-video/vdr/files/vdr-2.2.0_gentoo.patch b/media-video/vdr/files/vdr-2.2.0_gentoo.patch
new file mode 100644
index 000000000000..37ffd3c7b2ca
--- /dev/null
+++ b/media-video/vdr/files/vdr-2.2.0_gentoo.patch
@@ -0,0 +1,70 @@
+diff -Naur vdr-2.1.7.orig/Makefile vdr-2.1.7/Makefile
+--- vdr-2.1.7.orig/Makefile 2015-01-18 12:37:45.506034673 +0100
++++ vdr-2.1.7/Makefile 2015-01-18 12:38:34.086037162 +0100
+@@ -116,7 +116,7 @@
+ VDRVERSION = $(shell sed -ne '/define VDRVERSION/s/^.*"\(.*\)".*$$/\1/p' config.h)
+ APIVERSION = $(shell sed -ne '/define APIVERSION/s/^.*"\(.*\)".*$$/\1/p' config.h)
+
+-all: vdr i18n plugins
++all: vdr i18n
+
+ # Implicit rules:
+
+@@ -170,7 +170,7 @@
+
+ PODIR = po
+ LOCALEDIR = locale
+-I18Npo = $(wildcard $(PODIR)/*.po)
++I18Npo = $(foreach dir,$(LINGUAS),$(wildcard $(PODIR)/$(dir)*.po))
+ I18Nmo = $(addsuffix .mo, $(foreach file, $(I18Npo), $(basename $(file))))
+ I18Nmsgs = $(addprefix $(LOCALEDIR)/, $(addsuffix /LC_MESSAGES/vdr.mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file))))))
+ I18Npot = $(PODIR)/vdr.pot
+@@ -193,7 +193,7 @@
+
+ install-i18n: i18n
+ @mkdir -p $(DESTDIR)$(LOCDIR)
+- cp -r $(LOCALEDIR)/* $(DESTDIR)$(LOCDIR)
++ @(cd $(LOCALEDIR); for linguas in $(LINGUAS); do [ "$$linguas" = "en" ] && continue; cp -r --parents $$linguas* $(DESTDIR)$(LOCDIR); done)
+
+ # The 'include' directory (for plugins):
+
+@@ -255,7 +255,7 @@
+
+ # Install the files (note that 'install-pc' must be first!):
+
+-install: install-pc install-bin install-dirs install-conf install-doc install-plugins install-i18n install-includes
++install: install-pc install-bin install-dirs install-conf install-doc install-i18n install-includes
+
+ # VDR binary:
+
+@@ -267,12 +267,13 @@
+
+ install-dirs:
+ @mkdir -p $(DESTDIR)$(VIDEODIR)
+- @mkdir -p $(DESTDIR)$(CONFDIR)
+- @mkdir -p $(DESTDIR)$(ARGSDIR)
+- @mkdir -p $(DESTDIR)$(CACHEDIR)
++# @mkdir -p $(DESTDIR)$(CONFDIR)
++# @mkdir -p $(DESTDIR)$(ARGSDIR)
++# @mkdir -p $(DESTDIR)$(CACHEDIR)
+ @mkdir -p $(DESTDIR)$(RESDIR)
+
+ install-conf:
++ @mkdir -p $(DESTDIR)$(CONFDIR)
+ @cp -pn *.conf $(DESTDIR)$(CONFDIR)
+
+ # Documentation:
+@@ -299,8 +300,11 @@
+ # Includes:
+
+ install-includes: include-dir
+- @mkdir -p $(DESTDIR)$(INCDIR)
+- @cp -pLR include/vdr include/libsi $(DESTDIR)$(INCDIR)
++# @mkdir -p $(DESTDIR)$(INCDIR)
++# @cp -pLR include/vdr include/libsi $(DESTDIR)$(INCDIR)
++ @mkdir -p $(DESTDIR)$(INCDIR)/vdr $(DESTDIR)$(INCDIR)/vdr/libsi
++ @cp -pLR include/vdr $(DESTDIR)$(INCDIR)
++ @cp -pLR include/libsi Make.config $(DESTDIR)$(INCDIR)/vdr
+
+ # pkg-config file:
+
diff --git a/media-video/vdr/metadata.xml b/media-video/vdr/metadata.xml
new file mode 100644
index 000000000000..9929be8a1284
--- /dev/null
+++ b/media-video/vdr/metadata.xml
@@ -0,0 +1,33 @@
+<?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="alternatechannel">Use alternate channel on record</flag>
+ <flag name="bidi">fribid support, for languages, written from right to left</flag>
+ <flag name="ddepgentry">remove duplicate EPG entries</flag>
+ <flag name="dvlvidprefer">controls video-dir choice on recording</flag>
+ <flag name="graphtft">support for <pkg>media-plugins/vdr-grapftft</pkg>plugin up from vdr-graphtft-0.1.7</flag>
+ <flag name="html">Install HTML documentation</flag>
+ <flag name="jumpplay">Enables automatic jumping over cut marks while watching a recording</flag>
+ <flag name="jumpingseconds">skip seconds in played records</flag>
+ <flag name="kbd">enable keyboard support as remote device</flag>
+ <flag name="mainmenuhooks">Allows to replace main menu entries by some special plugins (like epgsearch, extrecmenu, ...)</flag>
+ <flag name="menuorg">Enables support for the <pkg>media-plugins/vdr-menuorg</pkg></flag>
+ <flag name="menuselection">adds support for menu hotkeys of double digits</flag>
+ <flag name="naludump">Removes NALU fill data from h.264-Streams of TS files</flag>
+ <flag name="permashift">permanent timeshift by recording live TV on hard disk, need plugin <pkg>media-plugins/vdr-vdr-permashift</pkg></flag>
+ <flag name="permashift_v1">permanent timeshift by recording live TV on RAM, need plugin >=mediaplugins/vdr-permashift-1</flag>
+ <flag name="pinplugin">Support for <pkg>media-plugins/vdr-pin</pkg></flag>
+ <flag name="resumereset">rreset resume of EOF</flag>
+ <flag name="rotor">Enable support for plugin <pkg>media-plugins/vdr-rotor</pkg> for dish-positioner.</flag>
+ <flag name="ttxtsubs">support for <pkg>media-pugins/vdr-ttxtsubs</pkg></flag>
+ <flag name="vasarajanauloja">replacement for the liemikuutio patch, adds some nice must haves features</flag>
+ <flag name="wareagleicon">Replace original icon set in menu</flag>
+ <flag name="yaepg">Enables support for the <pkg>media-plugins/vdr-yaepg</pkg></flag>
+ </use>
+</pkgmetadata>
diff --git a/media-video/vdr/vdr-2.0.6-r1.ebuild b/media-video/vdr/vdr-2.0.6-r1.ebuild
new file mode 100644
index 000000000000..e480e17d36c5
--- /dev/null
+++ b/media-video/vdr/vdr-2.0.6-r1.ebuild
@@ -0,0 +1,278 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic multilib toolchain-funcs
+
+# Switches supported by extensions-patch
+EXT_PATCH_FLAGS="alternatechannel ddepgentry dvlvidprefer graphtft
+ jumpplay jumpingseconds mainmenuhooks menuorg naludump permashift permashift_v1
+ pinplugin rotor ttxtsubs vasarajanauloja wareagleicon yaepg"
+
+# names of the use-flags
+EXT_PATCH_FLAGS_RENAMED=""
+
+# names ext-patch uses internally, here only used for maintainer checks
+EXT_PATCH_FLAGS_RENAMED_EXT_NAME=""
+
+IUSE="bidi debug html vanilla ${EXT_PATCH_FLAGS} ${EXT_PATCH_FLAGS_RENAMED}"
+
+MY_PV="${PV%_p*}"
+MY_P="${PN}-${MY_PV}"
+S="${WORKDIR}/${MY_P}"
+
+EXT_P="extpng-${P}-gentoo-edition-v6"
+
+DESCRIPTION="Video Disk Recorder - turns a pc into a powerful set top box for DVB"
+HOMEPAGE="http://www.tvdr.de/"
+SRC_URI="ftp://ftp.tvdr.de/vdr/${MY_P}.tar.bz2
+ http://dev.gentoo.org/~hd_brummy/distfiles/${EXT_P}.patch.bz2"
+
+KEYWORDS="amd64 ~arm ~ppc x86"
+SLOT="0"
+LICENSE="GPL-2"
+
+REQUIRED_USE="
+ permashift? ( !permashift_v1 )
+ permashift_v1? ( !permashift )"
+
+COMMON_DEPEND="virtual/jpeg:*
+ sys-libs/libcap
+ >=media-libs/fontconfig-2.4.2
+ >=media-libs/freetype-2"
+
+DEPEND="${COMMON_DEPEND}
+ >=virtual/linuxtv-dvb-headers-5.3
+ sys-devel/gettext"
+
+RDEPEND="${COMMON_DEPEND}
+ dev-lang/perl
+ >=media-tv/gentoo-vdr-scripts-2.5_rc1
+ media-fonts/corefonts
+ bidi? ( dev-libs/fribidi )"
+
+CONF_DIR=/etc/vdr
+CAP_FILE=${S}/capabilities.sh
+CAPS="# Capabilities of the vdr-executable for use by startscript etc."
+
+pkg_setup() {
+ use debug && append-flags -g
+
+ PLUGIN_LIBDIR="/usr/$(get_libdir)/vdr/plugins"
+
+ tc-export CC CXX AR
+}
+
+add_cap() {
+ local arg
+ for arg; do
+ CAPS="${CAPS}\n${arg}=1"
+ done
+}
+
+enable_patch() {
+ local arg ARG_UPPER
+ for arg; do
+ ARG_UPPER=$(echo $arg|tr '[:lower:]' '[:upper:]')
+ echo "${ARG_UPPER} = 1" >> Make.config
+
+ # codesnippet to bring the extpng defines into the vdr.pc CXXFLAGS CFLAGS
+ echo "-DUSE_${ARG_UPPER}" >> "${T}"/defines.tmp
+ cat "${T}"/defines.tmp | tr \\\012 ' ' > "${T}"/defines.IUSE
+ export DEFINES_IUSE=$( cat ${T}/defines.IUSE )
+ done
+}
+
+extensions_add_make_conf()
+{
+ # copy all ifdef for extensions-patch to Make.config
+ sed -e '1,/need to touch the following:/d' \
+ -e '/need to touch the following/,/^$/d' \
+ Make.config.template >> Make.config
+}
+
+extensions_all_defines() {
+ # extract all possible settings for extensions-patch
+ sed -e '/^#\?[A-Z].*= 1/!d' -e 's/^#\?//' -e 's/ .*//' \
+ Make.config.template \
+ | sort \
+ | tr '[:upper:]' '[:lower:]'
+}
+
+lang_po() {
+ LING_PO=$( ls ${S}/po | sed -e "s:.po::g" | cut -d_ -f1 | tr \\\012 ' ' )
+}
+
+src_prepare() {
+ # apply maintainace-patches
+ ebegin "Changing paths for gentoo"
+
+ local DVBDIR=/usr/include
+ local i
+ for i in ${DVB_HEADER_PATH} /usr/include/v4l-dvb-hg /usr/include; do
+ [[ -d ${i} ]] || continue
+ if [[ -f ${i}/linux/dvb/dmx.h ]]; then
+ einfo "Found DVB header files in ${i}"
+ DVBDIR=${i}
+ break
+ fi
+ done
+
+ # checking for s2api headers
+ local api_version
+ api_version=$(awk -F' ' '/define DVB_API_VERSION / {print $3}' "${DVBDIR}"/linux/dvb/version.h)
+ api_version=${api_version}*$(awk -F' ' '/define DVB_API_VERSION_MINOR / {print $3}' "${DVBDIR}"/linux/dvb/version.h)
+
+ if [[ ${api_version:-0} -lt 5*3 ]]; then
+ eerror "DVB header files do not contain s2api support or too old for ${P}"
+ eerror "You cannot compile VDR against old dvb-header"
+ die "DVB headers too old"
+ fi
+
+ cat > Make.config <<-EOT
+ #
+ # Generated by ebuild ${PF}
+ #
+ PREFIX = /usr
+ DVBDIR = ${DVBDIR}
+ PLUGINLIBDIR = ${PLUGIN_LIBDIR}
+ CONFDIR = ${CONF_DIR}
+ VIDEODIR = /var/vdr/video
+ LOCDIR = \$(PREFIX)/share/locale
+ INCDIR = \$(PREFIX)/include
+
+ DEFINES += -DCONFDIR=\"\$(CONFDIR)\"
+ INCLUDES += -I\$(DVBDIR)
+
+ # >=vdr-1.7.36-r1; parameter only used for compiletime on vdr
+ # PLUGINLIBDIR (plugin Makefile old) = LIBDIR (plugin Makefile new)
+ LIBDIR = ${PLUGIN_LIBDIR}
+ PCDIR = /usr/$(get_libdir)/pkgconfig
+ EOT
+ eend 0
+
+ # support languages, written from right to left
+ BUILD_PARAMS+=" BIDI=$(usex bidi 1 0)"
+
+ epatch "${FILESDIR}/${PN}-2.0.6_gentoo.patch"
+
+ if ! use vanilla; then
+
+ # Now apply extensions patch
+ epatch "${WORKDIR}/${EXT_P}.patch"
+
+ # This allows us to start even if some plugin does not exist
+ # or is not loadable.
+ enable_patch PLUGINMISSING
+ enable_patch CHANNELBIND
+
+ if [[ -n ${VDR_MAINTAINER_MODE} ]]; then
+ einfo "Doing maintainer checks:"
+
+ # we do not support these patches
+ # (or have them already hard enabled)
+ local IGNORE_PATCHES="pluginmissing channelbind"
+
+ extensions_all_defines > "${T}"/new.IUSE
+ echo $EXT_PATCH_FLAGS $EXT_PATCH_FLAGS_RENAMED_EXT_NAME \
+ $IGNORE_PATCHES | \
+ tr ' ' '\n' |sort > "${T}"/old.IUSE
+ local DIFFS=$(diff -u "${T}"/old.IUSE "${T}"/new.IUSE|grep '^[+-][^+-]')
+ if [[ -z ${DIFFS} ]]; then
+ einfo "EXT_PATCH_FLAGS is up to date."
+ else
+ ewarn "IUSE differences!"
+ local diff
+ for diff in $DIFFS; do
+ ewarn "$diff"
+ done
+ fi
+ fi
+
+ ebegin "Enabling selected patches"
+ local flag
+ for flag in $EXT_PATCH_FLAGS; do
+ use $flag && enable_patch ${flag}
+ done
+
+ eend 0
+
+ extensions_add_make_conf
+
+ # add defined use-flags compile options to vdr.pc
+ sed -e "s:\$(CDEFINES) \$(CINCLUDES) \$(HDRDIR):\$(CDEFINES) \$(CINCLUDES) \$(HDRDIR) \$(DEFINES_IUSE):" \
+ -i Makefile
+
+ ebegin "Make depend"
+ emake .dependencies >/dev/null
+ eend $? "make depend failed"
+ fi
+
+ epatch_user
+
+ add_cap CAP_UTF8
+
+ add_cap CAP_IRCTRL_RUNTIME_PARAM \
+ CAP_VFAT_RUNTIME_PARAM \
+ CAP_CHUID \
+ CAP_SHUTDOWN_AUTO_RETRY
+
+ echo -e ${CAPS} > "${CAP_FILE}"
+
+ # LINGUAS support
+ einfo "\n \t VDR supports the LINGUAS values"
+
+ lang_po
+
+ einfo "\t Please set one of this values in your sytem make.conf"
+ einfo "\t LINGUAS=\"${LING_PO}\"\n"
+
+ if [[ -z ${LINGUAS} ]]; then
+ einfo "\n \t No values in LINGUAS="
+ einfo "\t You will get only english text on OSD \n"
+ fi
+
+ strip-linguas ${LING_PO} en
+}
+
+src_install() {
+# # trick makefile not to create a videodir by supplying it with an existing
+# # directory
+ emake \
+ VIDEODIR="/" \
+ DESTDIR="${D}" install || die "emake install failed"
+
+ keepdir "${PLUGIN_LIBDIR}"
+
+ keepdir "${CONF_DIR}"/plugins
+ keepdir "${CONF_DIR}"/themes
+
+ if use html; then
+ dohtml *.html
+ fi
+
+ dodoc MANUAL INSTALL README* HISTORY CONTRIBUTORS
+
+ insinto /usr/share/vdr
+ doins "${CAP_FILE}"
+
+ if use alternatechannel; then
+ insinto /etc/vdr
+ doins "${FILESDIR}"/channel_alternative.conf
+ fi
+
+ chown -R vdr:vdr "${D}/${CONF_DIR}"
+}
+
+pkg_postinst() {
+ elog "It is a good idea to run vdrplugin-rebuild now."
+
+ elog "To get nice symbols in OSD we recommend to install"
+ elog "\t1. emerge media-fonts/vdrsymbols-ttf"
+ elog "\t2. select font VDRSymbolsSans in Setup"
+ elog ""
+ elog "To get an idea how to proceed now, have a look at our vdr-guide:"
+ elog "\thttps://wiki.gentoo.org/wiki/VDR"
+}
diff --git a/media-video/vdr/vdr-2.0.7.ebuild b/media-video/vdr/vdr-2.0.7.ebuild
new file mode 100644
index 000000000000..4eefd47a7073
--- /dev/null
+++ b/media-video/vdr/vdr-2.0.7.ebuild
@@ -0,0 +1,289 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic multilib toolchain-funcs
+
+# Switches supported by extensions-patch
+EXT_PATCH_FLAGS="alternatechannel ddepgentry dvlvidprefer graphtft
+ jumpplay jumpingseconds mainmenuhooks menuorg naludump permashift permashift_v1
+ pinplugin rotor ttxtsubs vasarajanauloja wareagleicon yaepg"
+
+# names of the use-flags
+EXT_PATCH_FLAGS_RENAMED=""
+
+# names ext-patch uses internally, here only used for maintainer checks
+EXT_PATCH_FLAGS_RENAMED_EXT_NAME=""
+
+IUSE="bidi debug html systemd vanilla ${EXT_PATCH_FLAGS} ${EXT_PATCH_FLAGS_RENAMED}"
+
+MY_PV="${PV%_p*}"
+MY_P="${PN}-${MY_PV}"
+S="${WORKDIR}/${MY_P}"
+
+EXT_P="extpng-${PN}-2.0.6-gentoo-edition-v6"
+
+DESCRIPTION="Video Disk Recorder - turns a pc into a powerful set top box for DVB"
+HOMEPAGE="http://www.tvdr.de/"
+SRC_URI="ftp://ftp.tvdr.de/vdr/${MY_P}.tar.bz2
+ http://dev.gentoo.org/~hd_brummy/distfiles/${EXT_P}.patch.bz2"
+
+KEYWORDS="~arm ~amd64 ~ppc ~x86"
+SLOT="0"
+LICENSE="GPL-2"
+
+REQUIRED_USE="
+ permashift? ( !permashift_v1 )
+ permashift_v1? ( !permashift )"
+
+COMMON_DEPEND="virtual/jpeg:*
+ sys-libs/libcap
+ >=media-libs/fontconfig-2.4.2
+ >=media-libs/freetype-2"
+
+DEPEND="${COMMON_DEPEND}
+ >=virtual/linuxtv-dvb-headers-5.3
+ sys-devel/gettext"
+
+RDEPEND="${COMMON_DEPEND}
+ dev-lang/perl
+ >=media-tv/gentoo-vdr-scripts-2.5
+ media-fonts/corefonts
+ bidi? ( dev-libs/fribidi )
+ systemd? ( sys-apps/systemd )"
+
+CONF_DIR=/etc/vdr
+CAP_FILE=${S}/capabilities.sh
+CAPS="# Capabilities of the vdr-executable for use by startscript etc."
+
+pkg_setup() {
+ use debug && append-flags -g
+
+ PLUGIN_LIBDIR="/usr/$(get_libdir)/vdr/plugins"
+
+ tc-export CC CXX AR
+}
+
+add_cap() {
+ local arg
+ for arg; do
+ CAPS="${CAPS}\n${arg}=1"
+ done
+}
+
+enable_patch() {
+ local arg ARG_UPPER
+ for arg; do
+ ARG_UPPER=$(echo $arg|tr '[:lower:]' '[:upper:]')
+ echo "${ARG_UPPER} = 1" >> Make.config
+
+ # codesnippet to bring the extpng defines into the vdr.pc CXXFLAGS CFLAGS
+ echo "-DUSE_${ARG_UPPER}" >> "${T}"/defines.tmp
+ cat "${T}"/defines.tmp | tr \\\012 ' ' > "${T}"/defines.IUSE
+ export DEFINES_IUSE=$( cat ${T}/defines.IUSE )
+ done
+}
+
+extensions_add_make_conf()
+{
+ # copy all ifdef for extensions-patch to Make.config
+ sed -e '1,/need to touch the following:/d' \
+ -e '/need to touch the following/,/^$/d' \
+ Make.config.template >> Make.config
+}
+
+extensions_all_defines() {
+ # extract all possible settings for extensions-patch
+ sed -e '/^#\?[A-Z].*= 1/!d' -e 's/^#\?//' -e 's/ .*//' \
+ Make.config.template \
+ | sort \
+ | tr '[:upper:]' '[:lower:]'
+}
+
+lang_po() {
+ LING_PO=$( ls ${S}/po | sed -e "s:.po::g" | cut -d_ -f1 | tr \\\012 ' ' )
+}
+
+src_prepare() {
+ # apply maintainace-patches
+ ebegin "Changing paths for gentoo"
+
+ local DVBDIR=/usr/include
+ local i
+ for i in ${DVB_HEADER_PATH} /usr/include/v4l-dvb-hg /usr/include; do
+ [[ -d ${i} ]] || continue
+ if [[ -f ${i}/linux/dvb/dmx.h ]]; then
+ einfo "Found DVB header files in ${i}"
+ DVBDIR=${i}
+ break
+ fi
+ done
+
+ # checking for s2api headers
+ local api_version
+ api_version=$(awk -F' ' '/define DVB_API_VERSION / {print $3}' "${DVBDIR}"/linux/dvb/version.h)
+ api_version=${api_version}*$(awk -F' ' '/define DVB_API_VERSION_MINOR / {print $3}' "${DVBDIR}"/linux/dvb/version.h)
+
+ if [[ ${api_version:-0} -lt 5*3 ]]; then
+ eerror "DVB header files do not contain s2api support or too old for ${P}"
+ eerror "You cannot compile VDR against old dvb-header"
+ die "DVB headers too old"
+ fi
+
+ cat > Make.config <<-EOT
+ #
+ # Generated by ebuild ${PF}
+ #
+ PREFIX = /usr
+ DVBDIR = ${DVBDIR}
+ PLUGINLIBDIR = ${PLUGIN_LIBDIR}
+ CONFDIR = ${CONF_DIR}
+ VIDEODIR = /var/vdr/video
+ LOCDIR = \$(PREFIX)/share/locale
+ INCDIR = \$(PREFIX)/include
+
+ DEFINES += -DCONFDIR=\"\$(CONFDIR)\"
+ INCLUDES += -I\$(DVBDIR)
+
+ # >=vdr-1.7.36-r1; parameter only used for compiletime on vdr
+ # PLUGINLIBDIR (plugin Makefile old) = LIBDIR (plugin Makefile new)
+ LIBDIR = ${PLUGIN_LIBDIR}
+ PCDIR = /usr/$(get_libdir)/pkgconfig
+ EOT
+ eend 0
+
+ # support languages, written from right to left
+ BUILD_PARAMS+=" BIDI=$(usex bidi 1 0)"
+
+ # systemd support
+ use systemd && BUILD_PARAMS+=" SDNOTIFY=$(usex systemd 1 0)"
+
+ if ! use vanilla; then
+
+ # Now apply extensions patch
+ epatch "${WORKDIR}/${EXT_P}.patch"
+
+ # This allows us to start even if some plugin does not exist
+ # or is not loadable.
+ enable_patch PLUGINMISSING
+ enable_patch CHANNELBIND
+
+ if [[ -n ${VDR_MAINTAINER_MODE} ]]; then
+ einfo "Doing maintainer checks:"
+
+ # we do not support these patches
+ # (or have them already hard enabled)
+ local IGNORE_PATCHES="pluginmissing channelbind"
+
+ extensions_all_defines > "${T}"/new.IUSE
+ echo $EXT_PATCH_FLAGS $EXT_PATCH_FLAGS_RENAMED_EXT_NAME \
+ $IGNORE_PATCHES | \
+ tr ' ' '\n' |sort > "${T}"/old.IUSE
+ local DIFFS=$(diff -u "${T}"/old.IUSE "${T}"/new.IUSE|grep '^[+-][^+-]')
+ if [[ -z ${DIFFS} ]]; then
+ einfo "EXT_PATCH_FLAGS is up to date."
+ else
+ ewarn "IUSE differences!"
+ local diff
+ for diff in $DIFFS; do
+ ewarn "$diff"
+ done
+ fi
+ fi
+
+ ebegin "Enabling selected patches"
+ local flag
+ for flag in $EXT_PATCH_FLAGS; do
+ use $flag && enable_patch ${flag}
+ done
+
+ eend 0
+
+ extensions_add_make_conf
+
+ # add defined use-flags compile options to vdr.pc
+ sed -e "s:\$(CDEFINES) \$(CINCLUDES) \$(HDRDIR):\$(CDEFINES) \$(CINCLUDES) \$(HDRDIR) \$(DEFINES_IUSE):" \
+ -i Makefile
+
+ ebegin "Make depend"
+ emake .dependencies >/dev/null
+ eend $? "make depend failed"
+ fi
+
+ epatch "${FILESDIR}/${PN}-2.0.6-r2_gentoo.patch"
+
+ # backport from vdr-2.1.7 for better systemd support
+ if use vanilla; then
+ epatch "${FILESDIR}/${P}_systemd_argsdir_vanilla.patch"
+ else
+ epatch "${FILESDIR}/${P}_systemd_argsdir.patch"
+ fi
+
+ epatch_user
+
+ add_cap CAP_UTF8
+
+ add_cap CAP_IRCTRL_RUNTIME_PARAM \
+ CAP_VFAT_RUNTIME_PARAM \
+ CAP_CHUID \
+ CAP_SHUTDOWN_AUTO_RETRY
+
+ echo -e ${CAPS} > "${CAP_FILE}"
+
+ # LINGUAS support
+ einfo "\n \t VDR supports the LINGUAS values"
+
+ lang_po
+
+ einfo "\t Please set one of this values in your sytem make.conf"
+ einfo "\t LINGUAS=\"${LING_PO}\"\n"
+
+ if [[ -z ${LINGUAS} ]]; then
+ einfo "\n \t No values in LINGUAS="
+ einfo "\t You will get only english text on OSD \n"
+ fi
+
+ strip-linguas ${LING_PO} en
+}
+
+src_install() {
+# # trick makefile not to create a videodir by supplying it with an existing
+# # directory
+ emake \
+ VIDEODIR="/" \
+ DESTDIR="${D}" install || die "emake install failed"
+
+ keepdir "${PLUGIN_LIBDIR}"
+
+ # backup for plugins they don't be able to create this dir
+ keepdir "${CONF_DIR}"/plugins
+
+ if use html; then
+ dohtml *.html
+ fi
+
+ dodoc MANUAL INSTALL README* HISTORY CONTRIBUTORS
+
+ insinto /usr/share/vdr
+ doins "${CAP_FILE}"
+
+ if use alternatechannel; then
+ insinto /etc/vdr
+ doins "${FILESDIR}"/channel_alternative.conf
+ fi
+
+ chown -R vdr:vdr "${D}/${CONF_DIR}"
+}
+
+pkg_postinst() {
+ elog "It is a good idea to run vdrplugin-rebuild now."
+
+ elog "To get nice symbols in OSD we recommend to install"
+ elog "\t1. emerge media-fonts/vdrsymbols-ttf"
+ elog "\t2. select font VDRSymbolsSans in Setup"
+ elog ""
+ elog "To get an idea how to proceed now, have a look at our vdr-guide:"
+ elog "\thttps://wiki.gentoo.org/wiki/VDR"
+}
diff --git a/media-video/vdr/vdr-2.2.0.ebuild b/media-video/vdr/vdr-2.2.0.ebuild
new file mode 100644
index 000000000000..e5d3828e94de
--- /dev/null
+++ b/media-video/vdr/vdr-2.2.0.ebuild
@@ -0,0 +1,292 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic multilib toolchain-funcs
+
+# Switches supported by extensions-patch
+EXT_PATCH_FLAGS="alternatechannel graphtft naludump permashift_v1 pinplugin
+ mainmenuhooks menuorg menuselection resumereset ttxtsubs"
+
+# names of the use-flags
+EXT_PATCH_FLAGS_RENAMED=""
+
+# names ext-patch uses internally, here only used for maintainer checks
+EXT_PATCH_FLAGS_RENAMED_EXT_NAME="bidi no_kbd sdnotify"
+
+IUSE="bidi debug +kbd html systemd vanilla ${EXT_PATCH_FLAGS} ${EXT_PATCH_FLAGS_RENAMED}"
+
+MY_PV="${PV%_p*}"
+MY_P="${PN}-${MY_PV}"
+S="${WORKDIR}/${MY_P}"
+
+EXT_P="extpng-${P}-gentoo-edition-v1"
+
+DESCRIPTION="Video Disk Recorder - turns a pc into a powerful set top box for DVB"
+HOMEPAGE="http://www.tvdr.de/"
+SRC_URI="ftp://ftp.tvdr.de/vdr/${MY_P}.tar.bz2
+ http://dev.gentoo.org/~hd_brummy/distfiles/${EXT_P}.patch.bz2"
+
+KEYWORDS="~arm amd64 ~ppc x86"
+SLOT="0"
+LICENSE="GPL-2"
+
+COMMON_DEPEND="virtual/jpeg:*
+ sys-libs/libcap
+ >=media-libs/fontconfig-2.4.2
+ >=media-libs/freetype-2"
+
+DEPEND="${COMMON_DEPEND}
+ >=virtual/linuxtv-dvb-headers-5.3
+ sys-devel/gettext"
+
+RDEPEND="${COMMON_DEPEND}
+ dev-lang/perl
+ >=media-tv/gentoo-vdr-scripts-2.7
+ media-fonts/corefonts
+ bidi? ( dev-libs/fribidi )
+ systemd? ( sys-apps/systemd )"
+
+CONF_DIR=/etc/vdr
+CAP_FILE=${S}/capabilities.sh
+CAPS="# Capabilities of the vdr-executable for use by startscript etc."
+
+pkg_setup() {
+
+ use debug && append-flags -g
+
+ PLUGIN_LIBDIR="/usr/$(get_libdir)/vdr/plugins"
+
+ tc-export CC CXX AR
+}
+
+add_cap() {
+ local arg
+ for arg; do
+ CAPS="${CAPS}\n${arg}=1"
+ done
+}
+
+enable_patch() {
+ local arg ARG_UPPER
+ for arg; do
+ ARG_UPPER=$(echo $arg|tr '[:lower:]' '[:upper:]')
+ echo "${ARG_UPPER} = 1" >> Make.config
+
+ # codesnippet to bring the extpng defines into the vdr.pc CXXFLAGS CFLAGS
+ echo "-DUSE_${ARG_UPPER}" >> "${T}"/defines.tmp
+ cat "${T}"/defines.tmp | tr \\\012 ' ' > "${T}"/defines.IUSE
+ export DEFINES_IUSE=$( cat ${T}/defines.IUSE )
+ done
+}
+
+extensions_add_make_conf()
+{
+ # copy all ifdef for extensions-patch to Make.config
+ sed -e '1,/need to touch the following:/d' \
+ -e '/need to touch the following/,/^$/d' \
+ Make.config.template >> Make.config
+}
+
+extensions_all_defines() {
+ # extract all possible settings for extensions-patch
+ sed -e '/^#\?[A-Z].*= 1/!d' -e 's/^#\?//' -e 's/ .*//' \
+ Make.config.template \
+ | sort \
+ | tr '[:upper:]' '[:lower:]'
+}
+
+lang_po() {
+ LING_PO=$( ls ${S}/po | sed -e "s:.po::g" | cut -d_ -f1 | tr \\\012 ' ' )
+}
+
+src_configure() {
+ # support languages, written from right to left
+ export "BIDI=$(usex bidi 1 0)"
+ # systemd notification support
+ export "SDNOTIFY=$(usex systemd 1 0)"
+ # with/without keyboard
+ export "USE_KBD=$(usex kbd 1 0)"
+}
+
+src_prepare() {
+ # apply maintainace-patches
+ ebegin "Changing paths for gentoo"
+
+ local DVBDIR=/usr/include
+ local i
+ for i in ${DVB_HEADER_PATH} /usr/include/v4l-dvb-hg /usr/include; do
+ [[ -d ${i} ]] || continue
+ if [[ -f ${i}/linux/dvb/dmx.h ]]; then
+ einfo "Found DVB header files in ${i}"
+ DVBDIR=${i}
+ break
+ fi
+ done
+
+ # checking for s2api headers
+ local api_version
+ api_version=$(awk -F' ' '/define DVB_API_VERSION / {print $3}' "${DVBDIR}"/linux/dvb/version.h)
+ api_version=${api_version}*$(awk -F' ' '/define DVB_API_VERSION_MINOR / {print $3}' "${DVBDIR}"/linux/dvb/version.h)
+
+ if [[ ${api_version:-0} -lt 5*3 ]]; then
+ eerror "DVB header files do not contain s2api support or too old for ${P}"
+ eerror "You cannot compile VDR against old dvb-header"
+ die "DVB headers too old"
+ fi
+
+ cat > Make.config <<-EOT
+ #
+ # Generated by ebuild ${PF}
+ #
+ PREFIX = /usr
+ DVBDIR = ${DVBDIR}
+ PLUGINLIBDIR = ${PLUGIN_LIBDIR}
+ CONFDIR = ${CONF_DIR}
+ VIDEODIR = /var/vdr/video
+ LOCDIR = \$(PREFIX)/share/locale
+ INCDIR = \$(PREFIX)/include
+
+ DEFINES += -DCONFDIR=\"\$(CONFDIR)\"
+ INCLUDES += -I\$(DVBDIR)
+
+ # >=vdr-1.7.36-r1; parameter only used for compiletime on vdr
+ # PLUGINLIBDIR (plugin Makefile old) = LIBDIR (plugin Makefile new)
+ LIBDIR = ${PLUGIN_LIBDIR}
+ PCDIR = /usr/$(get_libdir)/pkgconfig
+
+ EOT
+ eend 0
+
+ if ! use vanilla; then
+
+ # Now apply extensions patch
+ epatch "${WORKDIR}/${EXT_P}.patch"
+
+ # This allows us to start even if some plugin does not exist
+ # or is not loadable.
+ enable_patch PLUGINMISSING
+
+ if [[ -n ${VDR_MAINTAINER_MODE} ]]; then
+ einfo "Doing maintainer checks:"
+
+ # we do not support these patches
+ # (or have them already hard enabled)
+ local IGNORE_PATCHES="pluginmissing"
+
+ extensions_all_defines > "${T}"/new.IUSE
+ echo $EXT_PATCH_FLAGS $EXT_PATCH_FLAGS_RENAMED_EXT_NAME \
+ $IGNORE_PATCHES | \
+ tr ' ' '\n' |sort > "${T}"/old.IUSE
+ local DIFFS=$(diff -u "${T}"/old.IUSE "${T}"/new.IUSE|grep '^[+-][^+-]')
+ if [[ -z ${DIFFS} ]]; then
+ einfo "EXT_PATCH_FLAGS is up to date."
+ else
+ ewarn "IUSE differences!"
+ local diff
+ for diff in $DIFFS; do
+ ewarn "$diff"
+ done
+ fi
+ fi
+
+ ebegin "Enabling selected patches"
+ local flag
+ for flag in $EXT_PATCH_FLAGS; do
+ use $flag && enable_patch ${flag}
+ done
+
+ eend 0
+
+ extensions_add_make_conf
+
+ # add defined use-flags compile options to vdr.pc
+ sed -e "s:\$(CDEFINES) \$(CINCLUDES) \$(HDRDIR):\$(CDEFINES) \$(CINCLUDES) \$(HDRDIR) \$(DEFINES_IUSE):" \
+ -i Makefile
+
+ ebegin "Make depend"
+ emake .dependencies >/dev/null
+ eend $? "make depend failed"
+ fi
+
+ epatch "${FILESDIR}/${P}_gentoo.patch"
+
+ # fix some makefile issues
+ sed -e "s:ifndef NO_KBD:ifeq (\$(USE_KBD),1):" \
+ -e "s:ifdef BIDI:ifeq (\$(BIDI),1):" \
+ -e "s:ifdef SDNOTIFY:ifeq (\$(SDNOTIFY),1):" \
+ -i "${S}"/Makefile
+
+ epatch_user
+
+ add_cap CAP_UTF8
+
+ add_cap CAP_IRCTRL_RUNTIME_PARAM \
+ CAP_VFAT_RUNTIME_PARAM \
+ CAP_CHUID \
+ CAP_SHUTDOWN_AUTO_RETRY
+
+ echo -e ${CAPS} > "${CAP_FILE}"
+
+ # LINGUAS support
+ einfo "\n \t VDR supports the LINGUAS values"
+
+ lang_po
+
+ einfo "\t Please set one of this values in your sytem make.conf"
+ einfo "\t LINGUAS=\"${LING_PO}\"\n"
+
+ if [[ -z ${LINGUAS} ]]; then
+ einfo "\n \t No values in LINGUAS="
+ einfo "\t You will get only english text on OSD \n"
+ fi
+
+ strip-linguas ${LING_PO} en
+}
+
+src_install() {
+ # trick makefile not to create a videodir by supplying it with an existing
+ # directory
+ einstall \
+ VIDEODIR="/" \
+ DESTDIR="${D}" install || die "emake install failed"
+
+ keepdir "${PLUGIN_LIBDIR}"
+
+ # backup for plugins they don't be able to create this dir
+ keepdir "${CONF_DIR}"/plugins
+
+ if use html; then
+ dohtml *.html
+ fi
+
+ nonfatal dodoc MANUAL INSTALL README* HISTORY CONTRIBUTORS
+
+ insinto /usr/share/vdr
+ doins "${CAP_FILE}"
+
+ if use alternatechannel; then
+ insinto /etc/vdr
+ doins "${FILESDIR}"/channel_alternative.conf
+ fi
+
+ chown -R vdr:vdr "${D}/${CONF_DIR}"
+}
+
+pkg_postinst() {
+
+ elog "\n\t---- 15 YEARS ANNIVERSARY EDITON ----\n"
+ elog "\tA lot of thanks to Klaus Schmidinger"
+ elog "\tfor this nice piece of Software...\n"
+
+ elog "It is a good idea to run vdrplugin-rebuild now."
+
+ elog "To get nice symbols in OSD we recommend to install"
+ elog "\t1. emerge media-fonts/vdrsymbols-ttf"
+ elog "\t2. select font VDRSymbolsSans in Setup"
+ elog ""
+ elog "To get an idea how to proceed now, have a look at our vdr-guide:"
+ elog "\thttps://wiki.gentoo.org/wiki/VDR"
+}
diff --git a/media-video/vdr2jpeg/Manifest b/media-video/vdr2jpeg/Manifest
new file mode 100644
index 000000000000..c98933b3c6ce
--- /dev/null
+++ b/media-video/vdr2jpeg/Manifest
@@ -0,0 +1,2 @@
+DIST vdr2jpeg-0.1.9.tgz 31160 SHA256 869250e411def669aa89170ceff6bfbfd08c522bee9a8967799b4af60010ea79 SHA512 e2309fd08591d5efa08246c2ecde70811036ea293e21f7e5ae989af5acef5e795216cbc31455d2f0b65de575a876863efe55ddf4397ab4eadf3d67a627579d99 WHIRLPOOL 1009060f15563d1b0c4d75f2e965f188efcc021cb28a12a7750096b2aa32e5d83fc8601b6246f29c35f87df39b1cf64f34be180b13275442a80d38301a3e03b1
+DIST vdr2jpeg-0.2.0.tgz 20027 SHA256 988f19c5d84e345ad5cc2beab55570d340495c54b507d83ff0b9c5d3e01e7356 SHA512 65f3e0acb2ecd3a5341e527c45fafd454266841f1369c89b10750fce86f2326fba76329abd17a05d67aea3b43a7b1299a49cfa9eee9a784bb99c940253ca5952 WHIRLPOOL 614ddabbbac0306aaa2c0d16e06b2407b646ab08f4fae22913c875954ccad48c4c237d0a04391bb003561c28a7b95175548ebd45cb25d41dfce611985dc1bd93
diff --git a/media-video/vdr2jpeg/files/vdr2jpeg-0.1.0-gcc43.patch b/media-video/vdr2jpeg/files/vdr2jpeg-0.1.0-gcc43.patch
new file mode 100644
index 000000000000..975587610692
--- /dev/null
+++ b/media-video/vdr2jpeg/files/vdr2jpeg-0.1.0-gcc43.patch
@@ -0,0 +1,38 @@
+add missing inludes for gcc-4.3.x
+http://bugs.gentoo.org/show_bug.cgi?id=229377
+diff -uBbwNr vdr2jpeg-0.1.0_orig/gop.cpp vdr2jpeg-0.1.0/gop.cpp
+--- vdr2jpeg-0.1.0_orig/gop.cpp 2008-02-17 07:14:46.000000000 +0100
++++ vdr2jpeg-0.1.0/gop.cpp 2008-06-25 13:48:19.000000000 +0200
+@@ -29,6 +29,7 @@
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <time.h>
++#include <string.h>
+ #include <iostream>
+ #include <fstream>
+ #include <sstream>
+diff -uBbwNr vdr2jpeg-0.1.0_orig/tools.cpp vdr2jpeg-0.1.0/tools.cpp
+--- vdr2jpeg-0.1.0_orig/tools.cpp 2008-02-17 07:15:22.000000000 +0100
++++ vdr2jpeg-0.1.0/tools.cpp 2008-06-25 13:47:40.000000000 +0200
+@@ -19,6 +19,8 @@
+ * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
+ */
+
++#include <string.h>
++
+ #include "tools.h"
+
+ int option(int argc, char *argv[], const char opt, bool bParam,
+diff -uBbwNr vdr2jpeg-0.1.0_orig/vdr2jpeg.cpp vdr2jpeg-0.1.0/vdr2jpeg.cpp
+--- vdr2jpeg-0.1.0_orig/vdr2jpeg.cpp 2008-02-17 07:15:48.000000000 +0100
++++ vdr2jpeg-0.1.0/vdr2jpeg.cpp 2008-06-25 13:47:12.000000000 +0200
+@@ -22,6 +22,8 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>
++#include <stdlib.h>
++#include <algorithm>
+ #include <iostream>
+ #include <fstream>
+ #include <sstream>
+
diff --git a/media-video/vdr2jpeg/files/vdr2jpeg-0.1.9-ffmpeg.patch b/media-video/vdr2jpeg/files/vdr2jpeg-0.1.9-ffmpeg.patch
new file mode 100644
index 000000000000..549a6c8f60ee
--- /dev/null
+++ b/media-video/vdr2jpeg/files/vdr2jpeg-0.1.9-ffmpeg.patch
@@ -0,0 +1,326 @@
+diff -urN vdr2jpeg-0.1.9.old/ffm.cpp vdr2jpeg-0.1.9/ffm.cpp
+--- vdr2jpeg-0.1.9.old/ffm.cpp 2012-04-21 09:53:26.727892390 +0200
++++ vdr2jpeg-0.1.9/ffm.cpp 2012-04-21 09:57:25.555890271 +0200
+@@ -21,6 +21,7 @@
+
+ extern "C" {
+ #include <libavutil/avutil.h>
++#include <libavutil/mathematics.h>
+ #include <libavcodec/avcodec.h>
+ #include <libavformat/avformat.h>
+ #include <libswscale/swscale.h>
+@@ -185,7 +186,7 @@
+ }else
+ ost->sync_opts= lrintf(get_sync_ipts(ost) / av_q2d(enc->time_base));
+
+- nb_frames= FFMIN(nb_frames, max_frames[CODEC_TYPE_VIDEO] - ost->frame_number);
++ nb_frames= FFMIN(nb_frames, max_frames[AVMEDIA_TYPE_VIDEO] - ost->frame_number);
+ if (nb_frames <= 0)
+ return true;
+
+@@ -221,7 +222,7 @@
+ if(dec->coded_frame && enc->coded_frame->pts != AV_NOPTS_VALUE)
+ pkt.pts= av_rescale_q(enc->coded_frame->pts, enc->time_base, ost->st->time_base);
+ if(dec->coded_frame && dec->coded_frame->key_frame)
+- pkt.flags |= PKT_FLAG_KEY;
++ pkt.flags |= AV_PKT_FLAG_KEY;
+
+ av_interleaved_write_frame(s, &pkt);
+ enc->coded_frame = old_frame;
+@@ -245,7 +246,7 @@
+ big_picture.quality = (int)ist->st->quality;
+ }else
+ big_picture.quality = (int)ost->st->quality;
+- big_picture.pict_type = 0;
++ big_picture.pict_type = (AVPictureType) 0;
+ // big_picture.pts = AV_NOPTS_VALUE;
+ big_picture.pts= ost->sync_opts;
+ // big_picture.pts= av_rescale(ost->sync_opts, AV_TIME_BASE*(int64_t)enc->time_base.num, enc->time_base.den);
+@@ -268,7 +269,7 @@
+ pkt.dts != AV_NOPTS_VALUE ? av_rescale(pkt.dts, enc->time_base.den, AV_TIME_BASE*(int64_t)enc->time_base.num) : -1);*/
+
+ if(enc->coded_frame && enc->coded_frame->key_frame)
+- pkt.flags |= PKT_FLAG_KEY;
++ pkt.flags |= AV_PKT_FLAG_KEY;
+ av_interleaved_write_frame(s, &pkt);
+ *frame_size = ret;
+ }
+@@ -316,13 +317,17 @@
+ data_size = 0;
+ if (ist->decoding_needed) {
+ switch(ist->st->codec->codec_type) {
+- case CODEC_TYPE_VIDEO:
++ case AVMEDIA_TYPE_VIDEO:
+ data_size = (ist->st->codec->width * ist->st->codec->height * 3) / 2;
+ /* XXX: allocate picture correctly */
+ avcodec_get_frame_defaults(&picture);
++ AVPacket pkt;
++ av_init_packet( &pkt );
++ pkt.data = ptr;
++ pkt.size = len;
+
+- ret = avcodec_decode_video(ist->st->codec,
+- &picture, &got_picture, ptr, len);
++ ret = avcodec_decode_video2(ist->st->codec,
++ &picture, &got_picture, &pkt);
+ ist->st->quality= picture.quality;
+ if (ret < 0)
+ goto fail_decode;
+@@ -341,7 +346,7 @@
+ goto fail_decode;
+ }
+ } else {
+- if(ist->st->codec->codec_type == CODEC_TYPE_VIDEO) {
++ if(ist->st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
+ if (ist->st->codec->time_base.num != 0) {
+ ist->next_pts += ((int64_t)AV_TIME_BASE *
+ ist->st->codec->time_base.num) /
+@@ -354,16 +359,6 @@
+ len = 0;
+ }
+
+- /* frame rate emulation */
+- if (ist->st->codec->rate_emu) {
+- int64_t pts = av_rescale((int64_t) ist->frame * ist->st->codec->time_base.num, 1000000, ist->st->codec->time_base.den);
+- int64_t now = av_gettime() - ist->start;
+- if (pts > now)
+- usleep(pts - now);
+-
+- ist->frame++;
+- }
+-
+ #if 0
+ /* mpeg PTS deordering : if it is a P or I frame, the PTS
+ is the one of the next displayed one */
+@@ -398,7 +393,7 @@
+
+ if (ost->encoding_needed) {
+ switch(ost->st->codec->codec_type) {
+- case CODEC_TYPE_VIDEO:
++ case AVMEDIA_TYPE_VIDEO:
+ if(!do_video_out(os, ost, ist, &picture, &frame_size))
+ return -1;
+ break;
+@@ -415,9 +410,9 @@
+
+ avcodec_get_frame_defaults(&avframe);
+ ost->st->codec->coded_frame= &avframe;
+- avframe.key_frame = pkt->flags & PKT_FLAG_KEY;
++ avframe.key_frame = pkt->flags & AV_PKT_FLAG_KEY;
+
+- if (ost->st->codec->codec_type == CODEC_TYPE_VIDEO) {
++ if (ost->st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
+ ost->sync_opts++;
+ }
+
+@@ -438,7 +433,7 @@
+ opkt.flags= pkt->flags;
+
+ //FIXME remove the following 2 lines they shall be replaced by the bitstream filters
+- if(av_parser_change(ist->st->parser, ost->st->codec, &opkt.data, &opkt.size, data_buf, data_size, pkt->flags & PKT_FLAG_KEY))
++ if(av_parser_change(ist->st->parser, ost->st->codec, &opkt.data, &opkt.size, data_buf, data_size, pkt->flags & AV_PKT_FLAG_KEY))
+ opkt.destruct= av_destruct_packet;
+
+ av_interleaved_write_frame(os, &opkt);
+@@ -459,7 +454,7 @@
+ AVCodecContext *enc= ost->st->codec;
+ os = output_files[ost->file_index];
+
+- if(ost->st->codec->codec_type == CODEC_TYPE_VIDEO && (os->oformat->flags & AVFMT_RAWPICTURE))
++ if(ost->st->codec->codec_type == AVMEDIA_TYPE_VIDEO && (os->oformat->flags & AVFMT_RAWPICTURE))
+ continue;
+
+ if (ost->encoding_needed) {
+@@ -469,10 +464,10 @@
+ pkt.stream_index= ost->index;
+
+ switch(ost->st->codec->codec_type) {
+- case CODEC_TYPE_VIDEO:
++ case AVMEDIA_TYPE_VIDEO:
+ ret = avcodec_encode_video(enc, bit_buffer, bit_buffer_size, NULL);
+ if(enc->coded_frame && enc->coded_frame->key_frame)
+- pkt.flags |= PKT_FLAG_KEY;
++ pkt.flags |= AV_PKT_FLAG_KEY;
+ break;
+ default:
+ ret=-1;
+@@ -547,11 +542,6 @@
+ ist->index = k;
+ ist->discard = 1; /* the stream is discarded by default
+ (changed later) */
+-
+- if (ist->st->codec->rate_emu) {
+- ist->start = av_gettime();
+- ist->frame = 0;
+- }
+ }
+ }
+
+@@ -641,20 +631,20 @@
+ else
+ codec->time_base = ist->st->time_base;
+ switch(codec->codec_type) {
+- case CODEC_TYPE_VIDEO:
++ case AVMEDIA_TYPE_VIDEO:
+ codec->pix_fmt = icodec->pix_fmt;
+ codec->width = icodec->width;
+ codec->height = icodec->height;
+ codec->has_b_frames = icodec->has_b_frames;
+ break;
+- case CODEC_TYPE_SUBTITLE:
++ case AVMEDIA_TYPE_SUBTITLE:
+ break;
+ default:
+ return false;
+ }
+ } else {
+ switch(codec->codec_type) {
+- case CODEC_TYPE_VIDEO:
++ case AVMEDIA_TYPE_VIDEO:
+ ost->video_resample = ((codec->width != icodec->width) ||
+ (codec->height != icodec->height) ||
+ (codec->pix_fmt != icodec->pix_fmt));
+@@ -686,7 +676,7 @@
+ return false;
+ }
+ }
+- if(codec->codec_type == CODEC_TYPE_VIDEO){
++ if(codec->codec_type == AVMEDIA_TYPE_VIDEO){
+ int size= codec->width * codec->height;
+ bit_buffer_size= FFMAX(bit_buffer_size, 4*size);
+ }
+@@ -738,7 +728,7 @@
+ ist->file_index, ist->index);
+ return false;
+ }
+- //if (ist->st->codec->codec_type == CODEC_TYPE_VIDEO)
++ //if (ist->st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
+ // ist->st->codec->flags |= CODEC_FLAG_REPEAT_FIELD;
+ }
+ }
+@@ -786,7 +776,7 @@
+ ost = ost_table[i];
+ os = output_files[ost->file_index];
+ ist = ist_table[ost->source_index];
+- if(ost->st->codec->codec_type == CODEC_TYPE_VIDEO)
++ if(ost->st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
+ opts = ost->sync_opts * av_q2d(ost->st->codec->time_base);
+ else
+ opts = ost->st->pts.val * av_q2d(ost->st->time_base);
+@@ -924,22 +914,22 @@
+ void print_error(const char *filename, int err)
+ {
+ switch(err) {
+- case AVERROR_NUMEXPECTED:
++ case AVERROR(EINVAL):
+ fprintf(stderr, "%s: Incorrect image filename syntax.\n",
+ filename);
+ break;
+ case AVERROR_INVALIDDATA:
+ fprintf(stderr, "%s: Error while parsing header\n", filename);
+ break;
+- case AVERROR_NOFMT:
++ case AVERROR(EILSEQ):
+ fprintf(stderr, "%s: Unknown format\n", filename);
+ break;
+- case AVERROR_IO:
++ case AVERROR(EIO):
+ fprintf(stderr, "%s: I/O error occured\n"
+ "Usually that means that input file is truncated and/or corrupted.\n",
+ filename);
+ break;
+- case AVERROR_NOMEM:
++ case AVERROR(ENOMEM):
+ fprintf(stderr, "%s: memory allocation error occured\n", filename);
+ break;
+ default:
+@@ -968,9 +958,9 @@
+ ap->pix_fmt = frame_pix_fmt;
+ ap->channel = 0;
+ ap->standard = 0;
+- ap->video_codec_id = CODEC_ID_NONE;
++ ic->video_codec_id = CODEC_ID_NONE;
+ if(pgmyuv_compatibility_hack)
+- ap->video_codec_id= CODEC_ID_PGMYUV;
++ ic->video_codec_id= CODEC_ID_PGMYUV;
+
+ /* open the input file with generic libav function */
+ err = av_open_input_file(&ic, filename, file_iformat, 0, ap);
+@@ -999,7 +989,7 @@
+ AVCodecContext *enc = ic->streams[i]->codec;
+ enc->thread_count= 1;
+ switch(enc->codec_type) {
+- case CODEC_TYPE_VIDEO:
++ case AVMEDIA_TYPE_VIDEO:
+ frame_height = enc->height;
+ frame_width = enc->width;
+ frame_aspect_ratio = av_q2d(enc->sample_aspect_ratio) * enc->width / enc->height;
+@@ -1020,13 +1010,12 @@
+ frame_rate = rfps;
+ frame_rate_base = rfps_base;
+
+- enc->rate_emu = 0;
+ break;
+- case CODEC_TYPE_DATA:
++ case AVMEDIA_TYPE_DATA:
+ break;
+- case CODEC_TYPE_SUBTITLE:
++ case AVMEDIA_TYPE_SUBTITLE:
+ break;
+- case CODEC_TYPE_UNKNOWN:
++ case AVMEDIA_TYPE_UNKNOWN:
+ break;
+ default:
+ //av_abort();
+@@ -1058,12 +1047,12 @@
+ for(i=0;i<ic->nb_streams;i++) {
+ AVCodecContext *enc = ic->streams[i]->codec;
+ switch(enc->codec_type) {
+- case CODEC_TYPE_VIDEO:
++ case AVMEDIA_TYPE_VIDEO:
+ has_video = 1;
+ break;
+- case CODEC_TYPE_DATA:
+- case CODEC_TYPE_UNKNOWN:
+- case CODEC_TYPE_SUBTITLE:
++ case AVMEDIA_TYPE_DATA:
++ case AVMEDIA_TYPE_UNKNOWN:
++ case AVMEDIA_TYPE_SUBTITLE:
+ break;
+ default:
+ //av_abort();
+@@ -1086,14 +1075,14 @@
+ fprintf(stderr, "Could not alloc stream\n");
+ return false;
+ }
+- avcodec_get_context_defaults2(st->codec, CODEC_TYPE_VIDEO);
++ avcodec_get_context_defaults2(st->codec, AVMEDIA_TYPE_VIDEO);
+
+ video_enc = st->codec;
+
+ {
+ AVCodec *codec;
+
+- codec_id = av_guess_codec(oc->oformat, NULL, oc->filename, NULL, CODEC_TYPE_VIDEO);
++ codec_id = av_guess_codec(oc->oformat, NULL, oc->filename, NULL, AVMEDIA_TYPE_VIDEO);
+
+ video_enc->codec_id = codec_id;
+ codec = avcodec_find_encoder(codec_id);
+@@ -1203,7 +1192,7 @@
+ oc = avformat_alloc_context();
+
+ if (!file_oformat) {
+- file_oformat = guess_format(NULL, filename, NULL);
++ file_oformat = av_guess_format(NULL, filename, NULL);
+ if (!file_oformat) {
+ fprintf(stderr, "Unable for find a suitable output format for '%s'\n",
+ filename);
+@@ -1239,7 +1228,7 @@
+ /* check filename in case of an image number is expected */
+ if (oc->oformat->flags & AVFMT_NEEDNUMBER) {
+ if (!av_filename_number_test(oc->filename)) {
+- print_error(oc->filename, AVERROR_NUMEXPECTED);
++ print_error(oc->filename, AVERROR(EINVAL));
+ return false;
+ }
+ }
diff --git a/media-video/vdr2jpeg/files/vdr2jpeg-0.1.9-ffmpeg1.patch b/media-video/vdr2jpeg/files/vdr2jpeg-0.1.9-ffmpeg1.patch
new file mode 100644
index 000000000000..4d032d89235e
--- /dev/null
+++ b/media-video/vdr2jpeg/files/vdr2jpeg-0.1.9-ffmpeg1.patch
@@ -0,0 +1,238 @@
+Index: vdr2jpeg-0.1.9/ffm.cpp
+===================================================================
+--- vdr2jpeg-0.1.9.orig/ffm.cpp
++++ vdr2jpeg-0.1.9/ffm.cpp
+@@ -22,6 +22,7 @@
+ extern "C" {
+ #include <libavutil/avutil.h>
+ #include <libavutil/mathematics.h>
++#include <libavutil/pixdesc.h>
+ #include <libavcodec/avcodec.h>
+ #include <libavformat/avformat.h>
+ #include <libswscale/swscale.h>
+@@ -55,14 +56,12 @@ static int video_qdiff = 3;
+ static const char *video_rc_eq="tex^qComp";
+ static int me_method = ME_EPZS;
+
+-static int same_quality = 1;
+
+ static int top_field_first = -1;
+
+
+
+
+-static float mux_preload= 0.5;
+ static float mux_max_delay= 0.7;
+
+ static int64_t input_ts_offset = 0;
+@@ -150,7 +149,7 @@ static bool do_video_out(AVFormatContext
+ int *frame_size)
+ {
+ int nb_frames, i, ret;
+- AVFrame *final_picture, *formatted_picture, *resampling_dst, *padding_src;
++ AVFrame *final_picture, *formatted_picture, *resampling_dst;
+ AVFrame picture_crop_temp, picture_pad_temp;
+ AVCodecContext *enc, *dec;
+
+@@ -195,11 +194,9 @@ static bool do_video_out(AVFormatContext
+ }
+
+ final_picture = formatted_picture;
+- padding_src = formatted_picture;
+ resampling_dst = &ost->pict_tmp;
+
+ if (ost->video_resample) {
+- padding_src = NULL;
+ final_picture = &ost->pict_tmp;
+ sws_scale(ost->img_resample_ctx, formatted_picture->data, formatted_picture->linesize,
+ 0, ost->resample_height, resampling_dst->data, resampling_dst->linesize);
+@@ -242,10 +239,7 @@ static bool do_video_out(AVFormatContext
+
+ /* handles sameq here. This is not correct because it may
+ not be a global option */
+- if (same_quality) {
+- big_picture.quality = (int)ist->st->quality;
+- }else
+- big_picture.quality = (int)ost->st->quality;
++ big_picture.quality = ist->st->codec->global_quality;
+ big_picture.pict_type = (AVPictureType) 0;
+ // big_picture.pts = AV_NOPTS_VALUE;
+ big_picture.pts= ost->sync_opts;
+@@ -328,7 +322,7 @@ static int output_packet(AVInputStream *
+
+ ret = avcodec_decode_video2(ist->st->codec,
+ &picture, &got_picture, &pkt);
+- ist->st->quality= picture.quality;
++ ist->st->codec->global_quality= picture.quality;
+ if (ret < 0)
+ goto fail_decode;
+ if (!got_picture) {
+@@ -618,31 +612,6 @@ static bool av_encode(AVFormatContext **
+ codec = ost->st->codec;
+ icodec = ist->st->codec;
+
+- if (ost->st->stream_copy) {
+- /* if stream_copy is selected, no need to decode or encode */
+- codec->codec_id = icodec->codec_id;
+- codec->codec_type = icodec->codec_type;
+- if(!codec->codec_tag) codec->codec_tag = icodec->codec_tag;
+- codec->bit_rate = icodec->bit_rate;
+- codec->extradata= icodec->extradata;
+- codec->extradata_size= icodec->extradata_size;
+- if(av_q2d(icodec->time_base) > av_q2d(ist->st->time_base) && av_q2d(ist->st->time_base) < 1.0/1000)
+- codec->time_base = icodec->time_base;
+- else
+- codec->time_base = ist->st->time_base;
+- switch(codec->codec_type) {
+- case AVMEDIA_TYPE_VIDEO:
+- codec->pix_fmt = icodec->pix_fmt;
+- codec->width = icodec->width;
+- codec->height = icodec->height;
+- codec->has_b_frames = icodec->has_b_frames;
+- break;
+- case AVMEDIA_TYPE_SUBTITLE:
+- break;
+- default:
+- return false;
+- }
+- } else {
+ switch(codec->codec_type) {
+ case AVMEDIA_TYPE_VIDEO:
+ ost->video_resample = ((codec->width != icodec->width) ||
+@@ -675,7 +644,6 @@ static bool av_encode(AVFormatContext **
+ default:
+ return false;
+ }
+- }
+ if(codec->codec_type == AVMEDIA_TYPE_VIDEO){
+ int size= codec->width * codec->height;
+ bit_buffer_size= FFMAX(bit_buffer_size, 4*size);
+@@ -690,7 +658,7 @@ static bool av_encode(AVFormatContext **
+ /* dump the file output parameters - cannot be done before in case
+ of stream copy */
+ for(i=0;i<nb_output_files;i++) {
+- dump_format(output_files[i], i, output_files[i]->filename, 1);
++ av_dump_format(output_files[i], i, output_files[i]->filename, 1);
+ }
+
+ /* open each encoder */
+@@ -749,7 +717,7 @@ static bool av_encode(AVFormatContext **
+ /* open files and write file headers */
+ for(i=0;i<nb_output_files;i++) {
+ os = output_files[i];
+- if (av_write_header(os) < 0) {
++ if (avformat_write_header(os,NULL) < 0) {
+ fprintf(stderr, "Could not write header for output file #%d (incorrect codec parameters ?)\n", i);
+ ret = false; //AVERROR(EINVAL);
+ goto fail;
+@@ -941,36 +909,32 @@ void print_error(const char *filename, i
+ static bool opt_input_file(const char *filename)
+ {
+ AVFormatContext *ic;
+- AVFormatParameters params, *ap = &params;
+ int err, ret, rfps, rfps_base;
+ unsigned int i;
+ int64_t timestamp;
++ AVDictionary *opts = NULL;
++ char buf[1024];
+
+ /* get default parameters from command line */
+ ic = avformat_alloc_context();
+
+- memset(ap, 0, sizeof(*ap));
+- ap->prealloced_context = 1;
+- ap->time_base.den = frame_rate;
+- ap->time_base.num = frame_rate_base;
+- ap->width = frame_width + 0 + 0;
+- ap->height = frame_height + 0 + 0;
+- ap->pix_fmt = frame_pix_fmt;
+- ap->channel = 0;
+- ap->standard = 0;
++ snprintf(buf, sizeof(buf), "%d/%d", frame_rate, frame_rate_base);
++ av_dict_set(&opts, "framerate", buf, 0);
++ snprintf(buf, sizeof(buf), "%dx%d", frame_width, frame_height);
++ av_dict_set(&opts, "video_size", buf, 0);
++ av_dict_set(&opts, "pixel_format", av_get_pix_fmt_name(frame_pix_fmt), 0);
++
+ ic->video_codec_id = CODEC_ID_NONE;
+ if(pgmyuv_compatibility_hack)
+ ic->video_codec_id= CODEC_ID_PGMYUV;
+
+ /* open the input file with generic libav function */
+- err = av_open_input_file(&ic, filename, file_iformat, 0, ap);
++ err = avformat_open_input(&ic, filename, file_iformat, &opts);
+ if (err < 0) {
+ print_error(filename, err);
+ return 0;
+ }
+
+- ic->loop_input = 0;
+-
+ /* If not enough info to get the stream parameters, we decode the
+ first frames to get it. (used in mpeg case for example) */
+ ret = av_find_stream_info(ic);
+@@ -1027,7 +991,7 @@ static bool opt_input_file(const char *f
+ input_files_ts_offset[nb_input_files] = input_ts_offset - timestamp;
+ /* dump the file content */
+ if (verbose >= 0)
+- dump_format(ic, nb_input_files, filename, 0);
++ av_dump_format(ic, nb_input_files, filename, 0);
+
+ nb_input_files++;
+ file_iformat = NULL;
+@@ -1133,11 +1097,8 @@ static bool new_video_stream(AVFormatCon
+
+ /* if (intra_only)
+ video_enc->gop_size = 0;*/
+- if (same_quality) {
+ video_enc->flags |= CODEC_FLAG_QSCALE;
+- st->quality = FF_QP2LAMBDA;
+- video_enc->global_quality= (int)st->quality;
+- }
++ video_enc->global_quality= FF_QP2LAMBDA;
+
+ video_enc->max_qdiff = video_qdiff;
+ video_enc->rc_eq = video_rc_eq;
+@@ -1187,7 +1148,6 @@ static bool opt_output_file(const char *
+ {
+ AVFormatContext *oc;
+ int use_video, input_has_video = 0;
+- AVFormatParameters params, *ap = &params;
+
+ oc = avformat_alloc_context();
+
+@@ -1219,8 +1179,6 @@ static bool opt_output_file(const char *
+ return false;
+ }
+
+- oc->timestamp = 0;
+-
+ }
+
+ output_files[nb_output_files++] = oc;
+@@ -1233,16 +1191,7 @@ static bool opt_output_file(const char *
+ }
+ }
+
+- memset(ap, 0, sizeof(*ap));
+- if (av_set_parameters(oc, ap) < 0) {
+- fprintf(stderr, "%s: Invalid encoding parameters\n",
+- oc->filename);
+- return false;
+- }
+-
+- oc->preload= (int)(mux_preload*AV_TIME_BASE);
+ oc->max_delay= (int)(mux_max_delay*AV_TIME_BASE);
+- oc->loop_output = AVFMT_NOOUTPUTLOOP;
+
+ /* reset some options */
+ file_oformat = NULL;
+@@ -1323,7 +1272,7 @@ bool decode (const char* szMPVfile, /* c
+ AVFormatContext *s = output_files[i];
+
+ if (!(s->oformat->flags & AVFMT_NOFILE))
+- url_fclose(s->pb);
++ avio_close(s->pb);
+ for(j=0;j<s->nb_streams;j++)
+ av_free(s->streams[j]);
+ av_free(s);
diff --git a/media-video/vdr2jpeg/files/vdr2jpeg-0.1.9-libav9.patch b/media-video/vdr2jpeg/files/vdr2jpeg-0.1.9-libav9.patch
new file mode 100644
index 000000000000..c984cfc4cff5
--- /dev/null
+++ b/media-video/vdr2jpeg/files/vdr2jpeg-0.1.9-libav9.patch
@@ -0,0 +1,54 @@
+--- ffm.cpp.old 2013-06-22 20:12:27.972712290 +0200
++++ ffm.cpp 2013-06-22 20:13:33.586709956 +0200
+@@ -672,7 +672,7 @@
+ ost->file_index, ost->index);
+ return false;
+ }
+- if (avcodec_open(ost->st->codec, codec) < 0) {
++ if (avcodec_open2(ost->st->codec, codec, NULL) < 0) {
+ fprintf(stderr, "Error while opening codec for output stream #%d.%d - maybe incorrect parameters such as bit_rate, rate, width or height\n",
+ ost->file_index, ost->index);
+ return false;
+@@ -691,7 +691,7 @@
+ ist->st->codec->codec_id, ist->file_index, ist->index);
+ return false;
+ }
+- if (avcodec_open(ist->st->codec, codec) < 0) {
++ if (avcodec_open2(ist->st->codec, codec, NULL) < 0) {
+ fprintf(stderr, "Error while opening codec for input stream #%d.%d\n",
+ ist->file_index, ist->index);
+ return false;
+@@ -937,7 +937,7 @@
+
+ /* If not enough info to get the stream parameters, we decode the
+ first frames to get it. (used in mpeg case for example) */
+- ret = av_find_stream_info(ic);
++ ret = avformat_find_stream_info(ic, NULL);
+ if (ret < 0 && verbose >= 0) {
+ fprintf(stderr, "%s: could not find codec parameters\n", filename);
+ return false;
+@@ -1034,12 +1034,13 @@
+ AVCodecContext *video_enc;
+ CodecID codec_id;
+
+- st = av_new_stream(oc, oc->nb_streams);
++ st = avformat_new_stream(oc, NULL);
+ if (!st) {
+ fprintf(stderr, "Could not alloc stream\n");
+ return false;
+ }
+- avcodec_get_context_defaults2(st->codec, AVMEDIA_TYPE_VIDEO);
++ st->id = oc->nb_streams;
++ avcodec_get_context_defaults3(st->codec, NULL);
+
+ video_enc = st->codec;
+
+@@ -1204,7 +1205,7 @@
+ {
+ av_log_set_level(verbose);
+ av_register_all();
+- avctx_opts= avcodec_alloc_context();
++ avctx_opts= avcodec_alloc_context3(NULL);
+ }
+
+ void ffm_deinitalize(void)
diff --git a/media-video/vdr2jpeg/metadata.xml b/media-video/vdr2jpeg/metadata.xml
new file mode 100644
index 000000000000..b3e2a5f7a5f0
--- /dev/null
+++ b/media-video/vdr2jpeg/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>video</herd>
+ <maintainer>
+ <email>hd_brummy@gentoo.org</email>
+ <name>Joerg Bornkessel</name>
+ </maintainer>
+ <longdescription lang="en">
+ Addon needed for XXV - WWW Admin for the Video Disk Recorder
+ Creating jpeg pics from *.vdr files
+ </longdescription>
+</pkgmetadata>
diff --git a/media-video/vdr2jpeg/vdr2jpeg-0.1.9-r1.ebuild b/media-video/vdr2jpeg/vdr2jpeg-0.1.9-r1.ebuild
new file mode 100644
index 000000000000..39cef9de1847
--- /dev/null
+++ b/media-video/vdr2jpeg/vdr2jpeg-0.1.9-r1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+VERSION="717" # every bump, new version
+
+RESTRICT="strip"
+
+DESCRIPTION="Addon needed for XXV - WWW Admin for the Video Disk Recorder"
+HOMEPAGE="http://projects.vdr-developer.org/projects/xxv"
+SRC_URI="mirror://vdr-developerorg/${VERSION}/${P}.tgz
+ mirror://gentoo/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="virtual/ffmpeg"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ sed -i \
+ -e "s:usr/local:usr:" \
+ -e "s:-o vdr2jpeg:\$(LDFLAGS) -o vdr2jpeg:" \
+ Makefile || die
+ epatch "${FILESDIR}/${P}-ffmpeg.patch" \
+ "${FILESDIR}/${P}-ffmpeg1.patch" \
+ "${FILESDIR}/${P}-libav9.patch"
+
+ if has_version ">=media-video/ffmpeg-2"; then
+ sed -e "s:CodecID:AVCodecID:" -i ffm.cpp
+ fi
+}
+
+src_install() {
+ dobin vdr2jpeg
+ dodoc README LIESMICH
+}
diff --git a/media-video/vdr2jpeg/vdr2jpeg-0.2.0.ebuild b/media-video/vdr2jpeg/vdr2jpeg-0.2.0.ebuild
new file mode 100644
index 000000000000..72ef90919dea
--- /dev/null
+++ b/media-video/vdr2jpeg/vdr2jpeg-0.2.0.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+VERSION="1911" # every bump, new version
+
+RESTRICT="strip"
+
+DESCRIPTION="Addon needed for XXV - WWW Admin for the Video Disk Recorder"
+HOMEPAGE="http://projects.vdr-developer.org/projects/xxv"
+SRC_URI="mirror://vdr-developerorg/${VERSION}/${P}.tgz
+ mirror://gentoo/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="libav"
+
+RDEPEND="
+ libav? ( media-video/libav )
+ !libav? ( media-video/ffmpeg:0 )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ sed -i \
+ -e "s:usr/local:usr:" \
+ -e "s:-o vdr2jpeg:\$(LDFLAGS) -o vdr2jpeg:" \
+ Makefile || die
+}
+
+src_install() {
+ if use libav; then
+ emake DESTDIR="${D}" install FFMPEG_BIN=/usr/bin/avconv
+ else
+ emake DESTDIR="${D}" install FFMPEG_BIN=/usr/bin/ffmpeg
+ fi
+
+ dodoc README LIESMICH
+}
diff --git a/media-video/vdrsync/Manifest b/media-video/vdrsync/Manifest
new file mode 100644
index 000000000000..a59ce57dfd69
--- /dev/null
+++ b/media-video/vdrsync/Manifest
@@ -0,0 +1 @@
+DIST vdrsync-050322.tgz 295498 RMD160 d1e206eff53e5e4879faf99715319000ba4f9971 SHA1 3999aeab9c56405e2b5c2644251dbd2a2b68a22d SHA256 7b6209c547323474187bc9706084012601e5bf3eb39fad1a374a8ed8799c0384
diff --git a/media-video/vdrsync/files/vdrsync-0.1.3_pre050322-path.diff b/media-video/vdrsync/files/vdrsync-0.1.3_pre050322-path.diff
new file mode 100644
index 000000000000..768665be62a8
--- /dev/null
+++ b/media-video/vdrsync/files/vdrsync-0.1.3_pre050322-path.diff
@@ -0,0 +1,39 @@
+fix not founded path to some progs
+
+Joerg Bornkessel <hd_brummy@gentoo.org> ( 29 May 2005 )
+
+--- vdrsync.pl.orig 2006-05-29 19:10:25.146198500 +0200
++++ vdrsync.pl 2006-05-29 19:09:06.937310750 +0200
+@@ -37,19 +37,19 @@
+ # Hash that lists potential helper Programs
+ #########################################################################
+ my %progs = (
+- tcmplex => "",
+- mplex => "",
+- tcmplex_panteltje => "",
+- dvdauthor => "",
+- mkisofs => "",
+- transcode => "",
+- tcrequant => "",
+- requant => "",
+- mpg123 => "",
+- mp2enc => "",
+- "dvd-menu.pl" => "",
+- "vdrsync-buffer.pl"=>"",
+- "vdrsync.pl" =>"",
++ tcmplex => "/usr/bin/tcmplex",
++ mplex => "/usr/bin/mplex",
++ tcmplex_panteltje => "/usr/bin/tcmplex-panteltje",
++ dvdauthor => "/usr/bin/dvdauthor",
++ mkisofs => "/usr/bin/mkisofs",
++ transcode => "/usr/bin/transcode",
++ tcrequant => "/usr/bin/tcrequant",
++ requant => "/usr/bin/requant",
++ mpg123 => "/usr/bin/mp123",
++ mp2enc => "/usr/bin/mp2enc",
++ "dvd-menu.pl" => "/usr/bin/dvd-menu.pl",
++ "vdrsync-buffer.pl"=>"/usr/bin/vdrsync-buffer.pl",
++ "vdrsync.pl" => "/usr/bin/vdrsync.pl",
+ );
+
+
diff --git a/media-video/vdrsync/metadata.xml b/media-video/vdrsync/metadata.xml
new file mode 100644
index 000000000000..ba74a544d517
--- /dev/null
+++ b/media-video/vdrsync/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>video</herd>
+<maintainer>
+<email>vdr@gentoo.org</email>
+<name>Gentoo VDR Project</name>
+</maintainer>
+</pkgmetadata>
+
diff --git a/media-video/vdrsync/vdrsync-0.1.3_pre050322-r1.ebuild b/media-video/vdrsync/vdrsync-0.1.3_pre050322-r1.ebuild
new file mode 100644
index 000000000000..82e2c57e141d
--- /dev/null
+++ b/media-video/vdrsync/vdrsync-0.1.3_pre050322-r1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+MY_P="${PN}-${PV#*_pre}"
+
+S=${WORKDIR}/vdrsync-${MY_SNAPSHOT}
+
+DESCRIPTION="converting vdr-recordings to mpeg2, dvd or other similar formats"
+HOMEPAGE="http://vdrsync.vdr-portal.de/"
+SRC_URI="http://vdrsync.vdr-portal.de/releases/${MY_P}.tgz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="x86 ~amd64"
+IUSE="dvdr"
+
+DEPEND=""
+RDEPEND=">=dev-lang/perl-5.8.0
+ media-fonts/corefonts
+ dvdr? (
+ >=media-libs/gd-2.0.15
+ >=dev-perl/GD-2.0.7
+ >=dev-perl/GDTextUtil-0.86
+ >=media-video/dvdauthor-0.6.8
+ )"
+
+S=${WORKDIR}/${MY_P}
+
+src_unpack() {
+ unpack ${A}
+
+ cd "${S}"
+ sed -e "s:/usr/X11R6/lib/X11/fonts/truetype/arial.ttf:/usr/share/fonts/corefonts/arial.ttf:g" \
+ -i dvd-menu.pl
+
+ epatch "${FILESDIR}/${P}-path.diff"
+}
+# vdrsync/dvd-menu use hardcoded tmp-directory for large (up to and
+# greater than 1G). Uncomment and change the next two lines to your
+# needs if you need another tmp-Dir
+#sed -e 's:"/tmp/":"/temp/":g' /usr/bin/dvd-menu.pl
+#sed -e 's:"/tmp/":"/temp/":g' /usr/bin/vdrsync.pl
+
+src_install() {
+ dobin check-vdrsync.pl vdrsync.pl vdrsync_buffer.pl
+ use dvdr && dobin dvd-menu.pl
+ dodoc CHANGES
+}
diff --git a/media-video/vdrtools-genindex/Manifest b/media-video/vdrtools-genindex/Manifest
new file mode 100644
index 000000000000..811773e137d6
--- /dev/null
+++ b/media-video/vdrtools-genindex/Manifest
@@ -0,0 +1 @@
+DIST genindex-0.1.3.tar.gz 20958 SHA256 1bc98ba54b9c4cb03b1ed1cfcf78a5d07c818228252155e664b2afbf1abdc1bd
diff --git a/media-video/vdrtools-genindex/files/ldflags.diff b/media-video/vdrtools-genindex/files/ldflags.diff
new file mode 100644
index 000000000000..7ec062e3ddcb
--- /dev/null
+++ b/media-video/vdrtools-genindex/files/ldflags.diff
@@ -0,0 +1,12 @@
+diff -Naur genindex-0.1.3.orig/Makefile genindex-0.1.3/Makefile
+--- genindex-0.1.3.orig/Makefile 2010-09-24 14:55:48.000000000 +0200
++++ genindex-0.1.3/Makefile 2010-09-24 14:56:06.000000000 +0200
+@@ -52,7 +52,7 @@
+ # The main program:
+
+ genindex: $(OBJS)
+- $(CXX) $(CXXFLAGS) $^ -o $@
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) $^ -o $@
+
+ rmstream: rmstream.o thread.o ringbuffer.o pes.o
+ $(CXX) $(CXXFLAGS) $^ -o $@
diff --git a/media-video/vdrtools-genindex/metadata.xml b/media-video/vdrtools-genindex/metadata.xml
new file mode 100644
index 000000000000..3c9ab19af68c
--- /dev/null
+++ b/media-video/vdrtools-genindex/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>video</herd>
+<maintainer>
+ <email>vdr@gentoo.org</email>
+ <name>Gentoo VDR Project</name>
+</maintainer>
+<longdescription>
+</longdescription>
+</pkgmetadata>
diff --git a/media-video/vdrtools-genindex/vdrtools-genindex-0.1.3-r1.ebuild b/media-video/vdrtools-genindex/vdrtools-genindex-0.1.3-r1.ebuild
new file mode 100644
index 000000000000..f2777d012574
--- /dev/null
+++ b/media-video/vdrtools-genindex/vdrtools-genindex-0.1.3-r1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils
+
+SCRIPT="genindex"
+
+DESCRIPTION="VDR: genindex Script"
+HOMEPAGE="http://www.cadsoft.de/vdr/"
+SRC_URI="http://www.muempf.de/down/${SCRIPT}-${PV}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND=""
+
+S=${WORKDIR}/${SCRIPT}-${PV}
+
+src_prepare() {
+ epatch "${FILESDIR}"/ldflags.diff
+}
+
+src_install() {
+ dodoc README
+ dobin genindex
+}
diff --git a/media-video/videocut/Manifest b/media-video/videocut/Manifest
new file mode 100644
index 000000000000..c7b8c9c9d4c0
--- /dev/null
+++ b/media-video/videocut/Manifest
@@ -0,0 +1 @@
+DIST videocut_0.2.0.tar.gz 146915 SHA256 234abbf01848150a1a74cb3b886a6021ec77c7f936991db26c082778c93ce1e1
diff --git a/media-video/videocut/files/01-fix-hardened-ftbfs.diff b/media-video/videocut/files/01-fix-hardened-ftbfs.diff
new file mode 100644
index 000000000000..47fe7f97842c
--- /dev/null
+++ b/media-video/videocut/files/01-fix-hardened-ftbfs.diff
@@ -0,0 +1,16 @@
+# Fix FTBFS with enabled hardened flags and gcc-4.6 failure
+# https://bugs.gentoo.org/show_bug.cgi?id=380439
+
+--- a/src/TPreviewPanel/TPreviewPanel.cpp
++++ b/src/TPreviewPanel/TPreviewPanel.cpp
+@@ -167,7 +167,9 @@
+
+ void TPreviewPanel::adjustItems()
+ {
+- backgroundRect->setSize(&QRectF(0, 0, 1, 1));
++ QRectF myRect(0, 0, 1, 1);
++ backgroundRect->setSize(&myRect);
++
+ logo->setSize(QRect(0, 0, 1, 1));
+
+ // adjust meta text
diff --git a/media-video/videocut/files/videocut b/media-video/videocut/files/videocut
new file mode 100644
index 000000000000..5a33c7232fcb
--- /dev/null
+++ b/media-video/videocut/files/videocut
@@ -0,0 +1,3 @@
+#!/bin/sh
+cd /usr/share/videocut
+exec /usr/libexec/videocut
diff --git a/media-video/videocut/metadata.xml b/media-video/videocut/metadata.xml
new file mode 100644
index 000000000000..3ab9197e8603
--- /dev/null
+++ b/media-video/videocut/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>qt</herd>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="google-code">videocut</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/videocut/videocut-0.2.0.ebuild b/media-video/videocut/videocut-0.2.0.ebuild
new file mode 100644
index 000000000000..cf372a08b4d7
--- /dev/null
+++ b/media-video/videocut/videocut-0.2.0.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit eutils qt4-r2
+
+DESCRIPTION="A program to create compositions from video files"
+HOMEPAGE="http://code.google.com/p/videocut/"
+SRC_URI="http://${PN}.googlecode.com/files/${PN}_${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-qt/qtgui:4
+ dev-qt/qtsvg:4
+ media-libs/xine-lib"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${P}.orig
+
+PATCHES=( "${FILESDIR}"/01-fix-hardened-ftbfs.diff )
+
+src_compile() {
+ emake || die
+ lrelease i18n/*.ts
+}
+
+src_install() {
+ exeinto /usr/libexec
+ doexe build/result/${PN} || die
+ dobin "${FILESDIR}"/${PN} || die
+ insinto /usr/share/${PN}/i18n
+ doins -r i18n/*.qm || die
+ domenu ${PN}.desktop
+ doicon videocut.svg
+ dodoc ABOUT AUTHORS THANKSTO
+}
diff --git a/media-video/videotrans/Manifest b/media-video/videotrans/Manifest
new file mode 100644
index 000000000000..f21777e2889b
--- /dev/null
+++ b/media-video/videotrans/Manifest
@@ -0,0 +1 @@
+DIST videotrans-1.6.1.tar.bz2 98091 SHA256 a6509efdf6cd22353217207b7004ec2b8d8c32feb248e06ff93f55e01af00c99
diff --git a/media-video/videotrans/metadata.xml b/media-video/videotrans/metadata.xml
new file mode 100644
index 000000000000..7460eda6954f
--- /dev/null
+++ b/media-video/videotrans/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <longdescription lang="en">
+ Videotrans is a set of scripts that convert a movie file in any format
+ that mplayer understands to a DVD-compatible VOB file, doing all the
+ necessary conversions automatically. Videotrans provides an automatic
+ DVD menu generator.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">videotrans</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/videotrans/videotrans-1.6.1.ebuild b/media-video/videotrans/videotrans-1.6.1.ebuild
new file mode 100644
index 000000000000..d1899a77b9fb
--- /dev/null
+++ b/media-video/videotrans/videotrans-1.6.1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit base eutils
+
+DESCRIPTION="A package to convert movies to DVD format and to build DVDs with"
+HOMEPAGE="http://videotrans.sourceforge.net/"
+SRC_URI="mirror://sourceforge/videotrans/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+
+KEYWORDS="~amd64 ~ppc ~x86"
+
+IUSE=""
+
+DEPEND="virtual/ffmpeg
+ media-video/mplayer
+ media-video/mjpegtools[png]
+ media-video/dvdauthor
+ || ( media-gfx/imagemagick media-gfx/graphicsmagick[imagemagick] )"
+
+RDEPEND="${DEPEND}
+ www-client/lynx
+ app-shells/bash
+ sys-devel/bc"
+
+DOCS="aspects.txt CHANGES THANKS TODO"
+
+src_prepare() {
+ # fixing LDFLAGS usage
+ sed -i -e 's|^\(LDFLAGS.*=\).*\( @LIBS@.*\)|\1\2 @LDFLAGS@|' src/Makefile.in
+}
diff --git a/media-video/vlc/Manifest b/media-video/vlc/Manifest
new file mode 100644
index 000000000000..e8674edf718c
--- /dev/null
+++ b/media-video/vlc/Manifest
@@ -0,0 +1,3 @@
+DIST vlc-2.1.5.tar.xz 19574208 SHA256 6f6566ab6cd90d381395b7f0e401060b044cd3843e50ceb252b558a88e5d1f72 SHA512 37c6b82b4e89f4a14ed391cc677d9325a032e04bcc51a3e0d7d2ccf9e17a7a0deb90d9129e9dc3baf05a1ea9dae9c05e3177ab17a31098aafa6a2cb23388fa32 WHIRLPOOL c13098f922c7b24f3c718e88807a7dcb656af21bcf2be63d2ec7401583680658bd371e3935ba22537857861e0b1b0c4f0e693c87ed20999c679b4a04cddf7008
+DIST vlc-2.2.0.tar.xz 20861760 SHA256 5e0a27e248c47da723a696420aca3a4dd15cc3ed8cc81618d3f1dc8661b25517 SHA512 41162ff2dcc35edb47721c5a0f5d1346a0bcf3099c641e317ca1ce50baadeec3eef38f10355396a82e029474f6decd1e4355bbf218cadb795ccad3ff81a585bb WHIRLPOOL 83777143ef84177fffb1e034e47012bfe4ac2355883f64d3932dcf0c3edf237d858016523a886d00934da441ae2e7b635dc4111b0fb368083d4b71c43d00f695
+DIST vlc-2.2.1.tar.xz 20940288 SHA256 543d9d7e378ec0fa1ee2e7f7f5acf8c456c7d0ecc32037171523197ef3cf1fcb SHA512 91cd33ac61ebe376c24b3cc0d1dc52d7765fdccbd17e75abbbbf38f52b400e0269dc48f34ed558bff7ec1dd52c4f27098012709a3eb9fe7e8aad1069516de5de WHIRLPOOL 5c889fc5c0137f022b0b3408a5252668a1a946ed45677bb97bbbf0ec14c9411c24e8d1587e987391596774aaf7f1e4592c55b0c0f76742e84296bbfffb08e885
diff --git a/media-video/vlc/files/opencv-3.0.0.patch b/media-video/vlc/files/opencv-3.0.0.patch
new file mode 100644
index 000000000000..b09b65154373
--- /dev/null
+++ b/media-video/vlc/files/opencv-3.0.0.patch
@@ -0,0 +1,12 @@
+http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b82416d7000a993b33e903095a590fe32212a85e
+diff --git a/modules/video_filter/opencv_example.cpp b/modules/video_filter/opencv_example.cpp
+index ae3af05..998f286 100644 (file)
+--- a/modules/video_filter/opencv_example.cpp
++++ b/modules/video_filter/opencv_example.cpp
+@@ -41,6 +41,8 @@
+
+ #include <opencv2/core/core_c.h>
+ #include <opencv2/core/core.hpp>
++#include <opencv2/imgproc/imgproc_c.h>
++#include <opencv2/imgproc/imgproc.hpp>
+ #include <opencv2/objdetect/objdetect.hpp>
diff --git a/media-video/vlc/files/qt4-select.patch b/media-video/vlc/files/qt4-select.patch
new file mode 100644
index 000000000000..5fcabae79e4d
--- /dev/null
+++ b/media-video/vlc/files/qt4-select.patch
@@ -0,0 +1,51 @@
+https://gist.github.com/karolherbst/fb9e3d8f6ba05f1f5d54
+For use until upstream ever accepts this patch or fixes it themsleves
+--- configure.ac.orig 2015-03-01 02:28:48.983932684 +0100
++++ configure.ac 2015-03-01 02:41:29.641927072 +0100
+@@ -3709,7 +3709,8 @@
+ ])
+ ])
+ AS_IF([test "${enable_qt}" != "no"], [
+- PKG_CHECK_MODULES([QT], [Qt5Core >= 5.1.0 Qt5Widgets Qt5Gui], [
++ AS_IF([test "${enable_qt}" != "4"], [
++ PKG_CHECK_MODULES([QT], [Qt5Core >= 5.1.0 Qt5Widgets Qt5Gui], [
+ PKG_CHECK_MODULES([QTX11], [Qt5X11Extras], [
+ VLC_ADD_LIBS([qt4],[${QTX11_LIBS}])
+ VLC_ADD_CXXFLAGS([qt4],[${QTX11_CFLAGS} -DQT5_HAS_X11])
+@@ -3721,20 +3722,23 @@
+ AC_PATH_PROGS(MOC, [moc-qt5 moc], moc, ["${QT_HOST_PATH}" "${QT_PATH}/bin" "${CONTRIB_DIR}/bin"])
+ AC_PATH_PROGS(RCC, [rcc-qt5 rcc], rcc, ["${QT_HOST_PATH}" "${QT_PATH}/bin" "${CONTRIB_DIR}/bin"])
+ AC_PATH_PROGS(UIC, [uic-qt5 uic], uic, ["${QT_HOST_PATH}" "${QT_PATH}/bin" "${CONTRIB_DIR}/bin"])
++ enable_qt="5"
+- ], [
+- PKG_CHECK_MODULES([QT], [QtCore QtGui >= 4.6.0],, [
+- AS_IF([test -n "${enable_qt}"],[
+- AC_MSG_ERROR([${QT_PKG_ERRORS}.])
+- ],[
+- AC_MSG_WARN([${QT_PKG_ERRORS}.])
+- ])
+- enable_qt="no"
++ ])
++ ])
++ AS_IF([test "${enable_qt}" != "5"], [
++ PKG_CHECK_MODULES([QT], [QtCore QtGui >= 4.6.0],, [
++ AS_IF([test -n "${enable_qt}"],[
++ AC_MSG_ERROR([${QT_PKG_ERRORS}.])
++ ],[
++ AC_MSG_WARN([${QT_PKG_ERRORS}.])
+ ])
+- QT_PATH="$(eval $PKG_CONFIG --variable=exec_prefix QtCore)"
+- AC_PATH_PROGS(MOC, [moc-qt4 moc], moc, ["${QT_PATH}/bin" "${CONTRIB_DIR}/bin"])
+- AC_PATH_PROG(RCC, rcc, rcc, [${QT_PATH}/bin ${CONTRIB_DIR}/bin])
+- AC_PATH_PROGS(UIC, [uic-qt4 uic], uic, ["${QT_PATH}/bin" "${CONTRIB_DIR}/bin"])
++ enable_qt="no"
+ ])
++ QT_PATH="$(eval $PKG_CONFIG --variable=exec_prefix QtCore)"
++ AC_PATH_PROGS(MOC, [moc-qt4 moc], moc, ["${QT_PATH}/bin" "${CONTRIB_DIR}/bin"])
++ AC_PATH_PROG(RCC, rcc, rcc, [${QT_PATH}/bin ${CONTRIB_DIR}/bin])
++ AC_PATH_PROGS(UIC, [uic-qt4 uic], uic, ["${QT_PATH}/bin" "${CONTRIB_DIR}/bin"])
++ ])
+ ])
+ AS_IF([test "${enable_qt}" != "no"], [
+ VLC_ADD_PLUGIN([qt4])
+
diff --git a/media-video/vlc/files/vlc-2.1-mem_undefined_functions.patch b/media-video/vlc/files/vlc-2.1-mem_undefined_functions.patch
new file mode 100644
index 000000000000..7289c073641b
--- /dev/null
+++ b/media-video/vlc/files/vlc-2.1-mem_undefined_functions.patch
@@ -0,0 +1,14 @@
+# Fixes gentoo bug 541654
+# https://bugs.gentoo.org/show_bug.cgi?id=541654
+# Committed on behalf of Luca Barbato <lu_zero@gentoo.org>
+
+--- modules/codec/avcodec/avcommon.h.orig 2015-02-28 15:19:33.449761287 +0000
++++ modules/codec/avcodec/avcommon.h 2015-02-28 15:20:10.469537179 +0000
+@@ -81,6 +81,7 @@
+ #ifdef HAVE_LIBAVUTIL_AVUTIL_H
+ # include <libavutil/avutil.h>
+ # include <libavutil/dict.h>
++# include <libavutil/mem.h>
+
+ #define AV_OPTIONS_TEXT "Advanced options."
+ #define AV_OPTIONS_LONGTEXT "Advanced options, in the form {opt=val,opt2=val2} ."
diff --git a/media-video/vlc/files/vlc-2.1.0-TomWij-bisected-PA-broken-underflow.patch b/media-video/vlc/files/vlc-2.1.0-TomWij-bisected-PA-broken-underflow.patch
new file mode 100644
index 000000000000..3163410353a2
--- /dev/null
+++ b/media-video/vlc/files/vlc-2.1.0-TomWij-bisected-PA-broken-underflow.patch
@@ -0,0 +1,23 @@
+index 2debbcd..72e7fcf 100644
+--- a/modules/audio_output/pulse.c
++++ b/modules/audio_output/pulse.c
+@@ -472,8 +472,17 @@ static void stream_underflow_cb(pa_stream *s, void *userdata)
+ {
++ uint32_t rate = pa_stream_get_sample_spec(s)->rate;
+ audio_output_t *aout = userdata;
+
+- msg_Dbg(aout, "underflow");
+- (void) s;
++ msg_Warn(aout, "underflow");
++ stream_stop(s, aout);
++
++ aout_sys_t *sys = aout->sys;
++ sys->first_pts = VLC_TS_INVALID;
++
++ pa_operation *op = pa_stream_update_sample_rate(s, rate, NULL, NULL);
++ if (unlikely(op == NULL))
++ return;
++ pa_operation_unref(op);
+ }
+
+ static int stream_wait(pa_stream *stream, pa_threaded_mainloop *mainloop)
diff --git a/media-video/vlc/files/vlc-2.1.0-fix-libtremor-libs.patch b/media-video/vlc/files/vlc-2.1.0-fix-libtremor-libs.patch
new file mode 100644
index 000000000000..8a58969d0d8e
--- /dev/null
+++ b/media-video/vlc/files/vlc-2.1.0-fix-libtremor-libs.patch
@@ -0,0 +1,11 @@
+--- a/modules/codec/Makefile.am
++++ b/modules/codec/Makefile.am
+@@ -215,7 +215,7 @@
+ libtremor_plugin_la_SOURCES = codec/vorbis.c
+ libtremor_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) -DMODULE_NAME_IS_tremor
+ libtremor_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(codecdir)'
+-libtremor_plugin_la_LIBADD = -lvorbisdec -logg
++libtremor_plugin_la_LIBADD = $(VORBIS_LIBS) $(OGG_LIBS)
+ EXTRA_LTLIBRARIES += libtremor_plugin.la
+ codec_LTLIBRARIES += $(LTLIBtremor)
+
diff --git a/media-video/vlc/files/vlc-2.1.0-libva-1.2.1-compat.patch b/media-video/vlc/files/vlc-2.1.0-libva-1.2.1-compat.patch
new file mode 100644
index 000000000000..db73a4ee42f5
--- /dev/null
+++ b/media-video/vlc/files/vlc-2.1.0-libva-1.2.1-compat.patch
@@ -0,0 +1,12 @@
+--- a/modules/codec/avcodec/vaapi.c
++++ b/modules/codec/avcodec/vaapi.c
+@@ -36,6 +36,9 @@
+ #include <libavcodec/vaapi.h>
+ #include <X11/Xlib.h>
+ #include <va/va_x11.h>
++#if VA_MINOR_VERSION >= 34
++# include <va/va_compat.h>
++#endif
+
+ #include "avcodec.h"
+ #include "va.h" \ No newline at end of file
diff --git a/media-video/vlc/files/vlc-2.1.0-newer-rdp.patch b/media-video/vlc/files/vlc-2.1.0-newer-rdp.patch
new file mode 100644
index 000000000000..aa1957a7150a
--- /dev/null
+++ b/media-video/vlc/files/vlc-2.1.0-newer-rdp.patch
@@ -0,0 +1,47 @@
+--- a/modules/access/rdp.c
++++ b/modules/access/rdp.c
+@@ -198,15 +198,15 @@
+ demux_sys_t *p_sys = p_vlccontext->p_demux->p_sys;
+
+ /* Configure connexion */
+- p_instance->settings->sw_gdi = true; /* render in buffer */
+- p_instance->settings->fullscreen = true;
+- p_instance->settings->hostname = strdup( p_sys->psz_hostname );
+- p_instance->settings->username =
++ p_instance->settings->SoftwareGdi = true; /* render in buffer */
++ p_instance->settings->Fullscreen = true;
++ p_instance->settings->ServerHostname = strdup( p_sys->psz_hostname );
++ p_instance->settings->Username =
+ var_InheritString( p_vlccontext->p_demux, CFG_PREFIX "user" );
+- p_instance->settings->password =
++ p_instance->settings->Password =
+ var_InheritString( p_vlccontext->p_demux, CFG_PREFIX "password" );
+- p_instance->settings->port = p_sys->i_port;
+- p_instance->settings->encryption =
++ p_instance->settings->ServerPort = p_sys->i_port;
++ p_instance->settings->EncryptionMethods =
+ var_InheritBool( p_vlccontext->p_demux, CFG_PREFIX "encrypt" );
+
+ return true;
+@@ -217,9 +217,9 @@
+ vlcrdp_context_t * p_vlccontext = (vlcrdp_context_t *) p_instance->context;
+
+ msg_Dbg( p_vlccontext->p_demux, "connected to desktop %dx%d (%d bpp)",
+- p_instance->settings->width,
+- p_instance->settings->height,
+- p_instance->settings->color_depth );
++ p_instance->settings->DesktopWidth,
++ p_instance->settings->DesktopHeight,
++ p_instance->settings->ColorDepth );
+
+ p_instance->update->DesktopResize = desktopResizeHandler;
+ p_instance->update->BeginPaint = beginPaintHandler;
+@@ -415,7 +415,7 @@
+ p_sys->p_instance->Authenticate = authenticateHandler;
+
+ /* Set up context handlers and let it be allocated */
+- p_sys->p_instance->context_size = sizeof( vlcrdp_context_t );
++ p_sys->p_instance->ContextSize = sizeof( vlcrdp_context_t );
+ freerdp_context_new( p_sys->p_instance );
+
+ vlcrdp_context_t * p_vlccontext = (vlcrdp_context_t *) p_sys->p_instance->context;
diff --git a/media-video/vlc/files/vlc-2.2.0-fix-xcb.patch b/media-video/vlc/files/vlc-2.2.0-fix-xcb.patch
new file mode 100644
index 000000000000..c6a1b94658d2
--- /dev/null
+++ b/media-video/vlc/files/vlc-2.2.0-fix-xcb.patch
@@ -0,0 +1,16 @@
+https://github.com/videolan/vlc/commit/c354efa3a2843d479c8fa9e929ff1064e5526bfa
+--- modules/hw/vdpau/Makefile.am.orig 2015-04-16 22:29:26.299342749 -0700
++++ modules/hw/vdpau/Makefile.am 2015-04-16 22:31:40.886340950 -0700
+@@ -45,6 +45,7 @@
+ libvdpau_chroma_plugin_la_LIBADD = libvlc_vdpau.la
+ vdpau_LTLIBRARIES += libvdpau_chroma_plugin.la
+
++if HAVE_XCB
+ libvdpau_display_plugin_la_SOURCES = display.c
+ libvdpau_display_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/../../video_output/xcb
+ libvdpau_display_plugin_la_CFLAGS = $(AM_CFLAGS) $(XCB_CFLAGS)
+@@ -52,3 +53,4 @@
+ ../../video_output/libvlc_xcb_events.la \
+ $(AM_LIBADD) $(X_LIBS) $(X_PRE_LIBS) -lX11 $(XCB_LIBS)
+ vdpau_LTLIBRARIES += libvdpau_display_plugin.la
++endif
diff --git a/media-video/vlc/files/vlc-2.2.0-rdp-1.2.0.patch b/media-video/vlc/files/vlc-2.2.0-rdp-1.2.0.patch
new file mode 100644
index 000000000000..19fc70fcc346
--- /dev/null
+++ b/media-video/vlc/files/vlc-2.2.0-rdp-1.2.0.patch
@@ -0,0 +1,23 @@
+--- a/modules/access/rdp.c 2014-11-22 01:40:52.044973648 -0800
++++ b/modules/access/rdp.c 2014-11-22 01:36:44.291975380 -0800
+@@ -399,7 +404,9 @@
+ if ( p_sys->f_fps <= 0 ) p_sys->f_fps = 1.0;
+ p_sys->i_frame_interval = 1000000 / p_sys->f_fps;
+
++#if defined(FREERDP_VERSION_MAJOR) && defined(FREERDP_VERSION_MINOR) && !(FREERDP_VERSION_MAJOR > 1 || (FREERDP_VERSION_MAJOR == 1 && FREERDP_VERSION_MINOR >= 2))
+ freerdp_channels_global_init();
++#endif
+
+ p_sys->p_instance = freerdp_new();
+ if ( !p_sys->p_instance )
+@@ -475,7 +482,10 @@
+
+ freerdp_disconnect( p_sys->p_instance );
+ freerdp_free( p_sys->p_instance );
++
++#if defined(FREERDP_VERSION_MAJOR) && defined(FREERDP_VERSION_MINOR) && !(FREERDP_VERSION_MAJOR > 1 || (FREERDP_VERSION_MAJOR == 1 && FREERDP_VERSION_MINOR >= 2))
+ freerdp_channels_global_uninit();
++#endif
+
+ if ( p_sys->p_block )
+ block_Release( p_sys->p_block );
diff --git a/media-video/vlc/files/vlc-2.2.0-xcb_vdpau.patch b/media-video/vlc/files/vlc-2.2.0-xcb_vdpau.patch
new file mode 100644
index 000000000000..dec6c125af17
--- /dev/null
+++ b/media-video/vlc/files/vlc-2.2.0-xcb_vdpau.patch
@@ -0,0 +1,15 @@
+--- modules/hw/vdpau/Makefile.am.orig 2015-04-16 22:29:26.299342749 -0700
++++ modules/hw/vdpau/Makefile.am 2015-04-16 22:31:40.886340950 -0700
+@@ -45,6 +45,7 @@
+ libvdpau_chroma_plugin_la_LIBADD = libvlc_vdpau.la
+ vdpau_LTLIBRARIES += libvdpau_chroma_plugin.la
+
++if HAVE_XCB
+ libvdpau_display_plugin_la_SOURCES = display.c
+ libvdpau_display_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/../../video_output/xcb
+ libvdpau_display_plugin_la_CFLAGS = $(AM_CFLAGS) $(XCB_CFLAGS)
+@@ -52,3 +53,4 @@
+ ../../video_output/libvlc_xcb_events.la \
+ $(AM_LIBADD) $(X_LIBS) $(X_PRE_LIBS) -lX11 $(XCB_LIBS)
+ vdpau_LTLIBRARIES += libvdpau_display_plugin.la
++endif
diff --git a/media-video/vlc/files/vlc-9999-libva-1.2.1-compat.patch b/media-video/vlc/files/vlc-9999-libva-1.2.1-compat.patch
new file mode 100644
index 000000000000..adfdefec56af
--- /dev/null
+++ b/media-video/vlc/files/vlc-9999-libva-1.2.1-compat.patch
@@ -0,0 +1,12 @@
+--- a/modules/codec/avcodec/vaapi.c
++++ b/modules/codec/avcodec/vaapi.c
+@@ -34,6 +34,9 @@
+ #ifdef VLC_VA_BACKEND_XLIB
+ # include <vlc_xlib.h>
+ # include <va/va_x11.h>
++#if VA_MINOR_VERSION >= 34
++# include <va/va_compat.h>
++#endif
+ #endif
+ #ifdef VLC_VA_BACKEND_DRM
+ # include <sys/types.h>
diff --git a/media-video/vlc/metadata.xml b/media-video/vlc/metadata.xml
new file mode 100644
index 000000000000..e0c31998c33a
--- /dev/null
+++ b/media-video/vlc/metadata.xml
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>sdnick484@gmail.com</email>
+ <name>Nick Andrade</name>
+ <description>Active Maintainer, Assign bugs</description>
+ </maintainer>
+ <use>
+ <flag name="atmo">Enables support for AtmoLight (homebrew Ambient Lighting Technology)</flag>
+ <flag name="audioqueue">Enables AudioQueue audio module for Mac OS X.</flag>
+ <flag name="avcodec">Enables libavcodec support for video/audio encoding/decoding. libavcodec is part of FFmpeg.</flag>
+ <flag name="avformat">Enables libformat support for reading and writing various media containers. libavformat is part of FFmpeg.</flag>
+ <flag name="bluray">Enables libbluray for Blu-ray disc support.</flag>
+ <flag name="chromaprint">Enables libchromaprint for Chromaprint based audio fingerprinter support.</flag>
+ <flag name="dc1394">Enables IIDC cameras support.</flag>
+ <flag name="dirac">Enable Dirac video support (an advanced royalty-free video compression format) via the reference library: dirac.</flag>
+ <flag name="directx">Enable Win32 DirectX support.</flag>
+ <flag name="dvbpsi">Enables support for Mpeg-TS files (.ts, .m2ts, .mts) via <pkg>media-libs/libdvbpsi</pkg>.</flag>
+ <flag name="dxva2">Enables Win32 DxVA2 support.</flag>
+ <flag name="egl">Enables EGL video output module.</flag>
+ <flag name="faad">Enable AAC audio decoding library support via media-libs/faad2.</flag>
+ <flag name="fdk">Enables the Fraunhofer AAC codec library.</flag>
+ <flag name="fluidsynth">Enables Fluidsynth MIDI software synthesis (with external sound fonts).</flag>
+ <flag name="gcrypt">Enables cryptography support via libgcrypt.</flag>
+ <flag name="gme">Enables support for <pkg>media-libs/game-music-emu</pkg> for playing various video game music formats.</flag>
+ <flag name="gnome">Adds support for GNOME's filesystem abstraction layer, <pkg>gnome-base/gnome-vfs</pkg>. This flag is not GUI-related.</flag>
+ <flag name="growl">Enables growl notification support (over UDP for remote access and native on OSX)</flag>
+ <flag name="httpd">Enables a web based interface for vlc.</flag>
+ <flag name="ios-vout">Enables iPhone OS video output.</flag>
+ <flag name="kate">Adds support for Ogg Kate subtitles via libkate.</flag>
+ <flag name="libtar">Uses libtar instead of the built-in tar reader for reading custom skins.</flag>
+ <flag name="libtiger">Enables Ogg Kate subtitles rendering using libtiger.</flag>
+ <flag name="linsys">Enables support for Linux Linear Systems Ltd. SDI and HD-SDI input cards.</flag>
+ <flag name="live">Enables live555 streaming media support (client support for rtsp).</flag>
+ <flag name="lua">Enable Lua scripting support, needed for including support for Jamendo (online music platform) and similar things.</flag>
+ <flag name="macosx">Enables Mac OS X gui support.</flag>
+ <flag name="macosx-audio">Enables Mac OS X audio module.</flag>
+ <flag name="macosx-dialog-provider">Enables Mac OS X dialog module.</flag>
+ <flag name="macosx-eyetv">Enables Mac OS X EyeTV (TNT Tuner) module.</flag>
+ <flag name="macosx-quartztext">Enables Mac OS X quartz text module.</flag>
+ <flag name="macosx-qtkit">Enables Mac OS X qtkit module: qtcapture (video) and qtsound (audio) module.</flag>
+ <flag name="macosx-vout">Enables Mac OS X video output module.</flag>
+ <flag name="matroska">Enables matroska support using reference libraries (fallback on other existing matroska support if disabled, i.e., matroska enabled FFmpeg)</flag>
+ <flag name="media-library">Build the (sqlite based) media library.</flag>
+ <flag name="omxil">Enables OpenMAX Integration Layer codec module.</flag>
+ <flag name="optimisememory">Enable optimisation for memory rather than performance.</flag>
+ <flag name="opencv">Enabled OpenCV (computer vision) filter module.</flag>
+ <flag name="opus">Support opus decoding via libopus.</flag>
+ <flag name="postproc">Enables image post-processing via libpostproc (part of FFmpeg).</flag>
+ <flag name="projectm">Enables the projectM visualization plugin.</flag>
+ <flag name="qt4" restrict="&gt;=media-video/vlc-0.9">Builds a Qt4 based frontend, a graphical interface.</flag>
+ <flag name="qt5" restrict="&gt;=media-video/vlc-2.2">Builds a Qt5 based frontend, a graphical interface.</flag>
+ <flag name="rdp">Enables freerdp for RDP/Remote Desktop client support</flag>
+ <flag name="rtsp">Enables real audio and RTSP modules.</flag>
+ <flag name="run-as-root">Allows vlc to start for root. Don't enable this unless you have a very specific (e.g. embedded) need for it!</flag>
+ <flag name="schroedinger">Enable Dirac video support (an advanced royalty-free video compression format) via libschroedinger (high-speed implementation in C of the Dirac codec).</flag>
+ <flag name="sid">Adds support for playing C64 SID files through <pkg>media-libs/libsidplay-2</pkg>.</flag>
+ <flag name="sdl-image">Enables sdl image video decoder (depends on sdl)</flag>
+ <flag name="sftp">Enables libssh2 to support SFTP file transfer.</flag>
+ <flag name="shout">Enables libshout output.</flag>
+ <flag name="skins">Enables support for the skins2 interface.</flag>
+ <flag name="swscale">Enables image scaling and conversion via libswscale (part of FFmpeg).</flag>
+ <flag name="tremor">Enables tremor, a fixed-point version of the Ogg Vorbis decoder.</flag>
+ <flag name="twolame">Enables twolame support (MPEG Audio Layer 2 encoder).</flag>
+ <flag name="upnp">Enables support for the Intel SDK stack based UPnP discovery module instead of CyberLink.</flag>
+ <flag name="vcdx">Enables VCD with navigation via libvcdinfo (depends on cdio)</flag>
+ <flag name="vlm">New videolan (media) manager (vlm), a little manager designed to launch and manage multiple streams from within one instance of VLC.</flag>
+ <flag name="vpx">Enables the decoder(s) from the WebM VP8 / VP9 Codec SDK.</flag>
+ <flag name="wma-fixed">Enables fixed point WMA decoder.</flag>
+ <flag name="X">Enables support for, e.g., fullscreen mode via the X Window System. By itself, this flag does not build a graphical interface.</flag>
+ <flag name="xcb">Support the X C-language Binding, a replacement for Xlib; !!! you will need this option to be able to integrate video in the Qt interface, see bug #500678.</flag>
+ <flag name="x265">Support X265 Encoder.</flag>
+ <flag name="zvbi">Enables support for teletext subtitles via the zvbi library.</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-video/vlc/vlc-2.1.5-r1.ebuild b/media-video/vlc/vlc-2.1.5-r1.ebuild
new file mode 100644
index 000000000000..e2edee1c65ea
--- /dev/null
+++ b/media-video/vlc/vlc-2.1.5-r1.ebuild
@@ -0,0 +1,480 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+SCM=""
+if [ "${PV%9999}" != "${PV}" ] ; then
+ SCM="git-r3"
+
+ if [ "${PV%.9999}" != "${PV}" ] ; then
+ EGIT_REPO_URI="git://git.videolan.org/vlc/vlc-${PV%.9999}.git"
+ else
+ EGIT_REPO_URI="git://git.videolan.org/vlc.git"
+ fi
+fi
+
+inherit eutils multilib autotools toolchain-funcs flag-o-matic virtualx ${SCM}
+
+MY_PV="${PV/_/-}"
+MY_PV="${MY_PV/-beta/-test}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="VLC media player - Video player and streamer"
+HOMEPAGE="http://www.videolan.org/vlc/"
+if [ "${PV%9999}" != "${PV}" ] ; then # Live ebuild
+ SRC_URI=""
+elif [[ "${MY_P}" == "${P}" ]]; then
+ SRC_URI="http://download.videolan.org/pub/videolan/${PN}/${PV}/${P}.tar.xz"
+else
+ SRC_URI="http://download.videolan.org/pub/videolan/testing/${MY_P}/${MY_P}.tar.xz"
+fi
+
+LICENSE="LGPL-2.1 GPL-2"
+SLOT="0/5-7" # vlc - vlccore
+
+if [ "${PV%9999}" = "${PV}" ] ; then
+ KEYWORDS="amd64 ~arm ppc ppc64 -sparc x86 ~x86-fbsd"
+else
+ KEYWORDS=""
+fi
+
+IUSE="a52 aalib alsa altivec atmo +audioqueue avahi +avcodec
+ +avformat bidi bluray cdda cddb chromaprint dbus dc1394 debug dirac
+ directfb directx dts dvb +dvbpsi dvd dxva2 elibc_glibc egl +encode faad fdk
+ fluidsynth +ffmpeg flac fontconfig +gcrypt gme gnome gnutls
+ growl httpd ieee1394 ios-vout jack kate kde libass libav libcaca libnotify
+ libsamplerate libtiger linsys libtar lirc live lua +macosx
+ +macosx-audio +macosx-dialog-provider +macosx-eyetv +macosx-quartztext
+ +macosx-qtkit +macosx-vout matroska media-library cpu_flags_x86_mmx modplug mp3 mpeg
+ mtp musepack ncurses neon ogg omxil opencv opengl optimisememory opus
+ png +postproc projectm pulseaudio +qt4 rdp rtsp run-as-root samba
+ schroedinger sdl sdl-image sftp shout sid skins speex cpu_flags_x86_sse svg +swscale
+ taglib theora tremor truetype twolame udev upnp vaapi v4l vcdx vdpau
+ vlm vnc vorbis wma-fixed +X x264 +xcb xml xv zvbi"
+
+RDEPEND="
+ !<media-video/ffmpeg-1.2:0
+ dev-libs/libgpg-error:0
+ net-dns/libidn:0
+ >=sys-libs/zlib-1.2.5.1-r2:0[minizip]
+ virtual/libintl:0
+ a52? ( >=media-libs/a52dec-0.7.4-r3:0 )
+ aalib? ( media-libs/aalib:0 )
+ alsa? ( >=media-libs/alsa-lib-1.0.24:0 )
+ avahi? ( >=net-dns/avahi-0.6:0[dbus] )
+ avcodec? (
+ !libav? ( media-video/ffmpeg:0= )
+ libav? ( media-video/libav:0= )
+ )
+ avformat? (
+ !libav? ( media-video/ffmpeg:0= )
+ libav? ( media-video/libav:0= )
+ )
+ bidi? ( >=dev-libs/fribidi-0.10.4:0 )
+ bluray? ( >=media-libs/libbluray-0.2.1:0 )
+ cddb? ( >=media-libs/libcddb-1.2.0:0 )
+ chromaprint? ( >=media-libs/chromaprint-0.6:0 )
+ dbus? ( >=sys-apps/dbus-1.0.2:0 )
+ dc1394? ( >=sys-libs/libraw1394-2.0.1:0 >=media-libs/libdc1394-2.1.0:2 )
+ dirac? ( >=media-video/dirac-0.10.0:0 )
+ directfb? ( dev-libs/DirectFB:0 sys-libs/zlib:0 )
+ dts? ( media-libs/libdca:0 )
+ dvbpsi? ( >=media-libs/libdvbpsi-0.2.1:0 )
+ dvd? ( media-libs/libdvdread:0 >=media-libs/libdvdnav-0.1.9:0 )
+ egl? ( virtual/opengl:0 )
+ elibc_glibc? ( >=sys-libs/glibc-2.8:2.2 )
+ faad? ( >=media-libs/faad2-2.6.1:0 )
+ fdk? ( media-libs/fdk-aac:0 )
+ flac? ( media-libs/libogg:0 >=media-libs/flac-1.1.2:0 )
+ fluidsynth? ( >=media-sound/fluidsynth-1.1.2:0 )
+ fontconfig? ( media-libs/fontconfig:1.0 )
+ gcrypt? ( >=dev-libs/libgcrypt-1.2.0:0= )
+ gme? ( media-libs/game-music-emu:0 )
+ gnome? ( gnome-base/gnome-vfs:2 dev-libs/glib:2 )
+ gnutls? ( >=net-libs/gnutls-3.0.20:0 )
+ ieee1394? ( >=sys-libs/libraw1394-2.0.1:0 >=sys-libs/libavc1394-0.5.3:0 )
+ ios-vout? ( virtual/opengl:0 )
+ jack? ( >=media-sound/jack-audio-connection-kit-0.99.0-r1:0 )
+ kate? ( >=media-libs/libkate-0.3.0:0 )
+ libass? ( >=media-libs/libass-0.9.8:0 media-libs/fontconfig:1.0 )
+ libcaca? ( >=media-libs/libcaca-0.99_beta14:0 )
+ libnotify? ( x11-libs/libnotify:0 x11-libs/gtk+:2 x11-libs/gdk-pixbuf:2 dev-libs/glib:2 )
+ libsamplerate? ( media-libs/libsamplerate:0 )
+ libtar? ( >=dev-libs/libtar-1.2.11-r3:0 )
+ libtiger? ( >=media-libs/libtiger-0.3.1:0 )
+ linsys? ( >=media-libs/zvbi-0.2.28:0 )
+ lirc? ( app-misc/lirc:0 )
+ live? ( >=media-plugins/live-2011.12.23:0 )
+ lua? ( >=dev-lang/lua-5.1:0 )
+ macosx-vout? ( virtual/opengl:0 )
+ matroska? ( >=dev-libs/libebml-1.0.0:0= >=media-libs/libmatroska-1.0.0:0= )
+ modplug? ( >=media-libs/libmodplug-0.8.8.1:0 )
+ mp3? ( media-libs/libmad:0 )
+ mpeg? ( >=media-libs/libmpeg2-0.3.2:0 )
+ mtp? ( >=media-libs/libmtp-1.0.0:0 )
+ musepack? ( >=media-sound/musepack-tools-444:0 )
+ ncurses? ( sys-libs/ncurses:5[unicode] )
+ ogg? ( media-libs/libogg:0 )
+ opencv? ( >media-libs/opencv-2.0:0 )
+ opengl? ( virtual/opengl:0 >=x11-libs/libX11-1.3.99.901:0 )
+ opus? ( >=media-libs/opus-1.0.3:0 )
+ png? ( media-libs/libpng:0= sys-libs/zlib:0 )
+ postproc? (
+ !libav? ( >=media-video/ffmpeg-1.2:0= )
+ libav? ( media-libs/libpostproc:0= )
+ )
+ projectm? ( media-libs/libprojectm:0 media-fonts/dejavu:0 )
+ pulseaudio? ( >=media-sound/pulseaudio-0.9.22:0 )
+ qt4? ( >=dev-qt/qtgui-4.6.0:4 >=dev-qt/qtcore-4.6.0:4 )
+ rdp? ( <net-misc/freerdp-1.2:0= )
+ samba? ( || ( >=net-fs/samba-3.4.6:0[smbclient] >=net-fs/samba-4.0.0:0[client] ) )
+ schroedinger? ( >=media-libs/schroedinger-1.0.10:0 )
+ sdl? ( >=media-libs/libsdl-1.2.10:0
+ sdl-image? ( >=media-libs/sdl-image-1.2.10:0 sys-libs/zlib:0 ) )
+ sftp? ( net-libs/libssh2:0 )
+ shout? ( media-libs/libshout:0 )
+ sid? ( media-libs/libsidplay:2 )
+ skins? ( x11-libs/libXext:0 x11-libs/libXpm:0 x11-libs/libXinerama:0 )
+ speex? ( media-libs/speex:0 )
+ svg? ( >=gnome-base/librsvg-2.9.0:2 )
+ swscale? (
+ !libav? ( media-video/ffmpeg:0= )
+ libav? ( media-video/libav:0= )
+ )
+ taglib? ( >=media-libs/taglib-1.6.1:0 sys-libs/zlib:0 )
+ theora? ( >=media-libs/libtheora-1.0_beta3:0 )
+ tremor? ( media-libs/tremor:0 )
+ truetype? ( media-libs/freetype:2 virtual/ttf-fonts:0
+ !fontconfig? ( media-fonts/dejavu:0 ) )
+ twolame? ( media-sound/twolame:0 )
+ udev? ( >=virtual/udev-142:0 )
+ upnp? ( net-libs/libupnp:0 )
+ v4l? ( media-libs/libv4l:0 )
+ vaapi? (
+ x11-libs/libva:0[X]
+ !libav? ( media-video/ffmpeg:0=[vaapi] )
+ libav? ( media-video/libav:0=[vaapi] )
+ )
+ vcdx? ( >=dev-libs/libcdio-0.78.2:0 >=media-video/vcdimager-0.7.22:0 )
+ vdpau? ( >=x11-libs/libvdpau-0.6:0 !<media-video/libav-10_beta1 )
+ vnc? ( >=net-libs/libvncserver-0.9.9:0 )
+ vorbis? ( media-libs/libvorbis:0 )
+ X? ( x11-libs/libX11:0 )
+ x264? ( >=media-libs/x264-0.0.20090923:0= )
+ xcb? ( >=x11-libs/libxcb-1.6:0 >=x11-libs/xcb-util-0.3.4:0 >=x11-libs/xcb-util-keysyms-0.3.4:0 )
+ xml? ( dev-libs/libxml2:2 )
+ zvbi? ( >=media-libs/zvbi-0.2.25:0 )
+"
+
+DEPEND="${RDEPEND}
+ kde? ( >=kde-base/kdelibs-4:4 )
+ xcb? ( x11-proto/xproto:0 )
+ app-arch/xz-utils:0
+ >=sys-devel/gettext-0.18.3:*
+ virtual/pkgconfig:*
+"
+
+REQUIRED_USE="
+ aalib? ( X )
+ bidi? ( truetype )
+ cddb? ( cdda )
+ dvb? ( dvbpsi )
+ dxva2? ( avcodec )
+ egl? ( X )
+ ffmpeg? ( avcodec avformat swscale postproc )
+ fontconfig? ( truetype )
+ gnutls? ( gcrypt )
+ httpd? ( lua )
+ libcaca? ( X )
+ libtar? ( skins )
+ libtiger? ( kate )
+ qt4? ( X )
+ sdl? ( X )
+ skins? ( truetype X qt4 )
+ vaapi? ( avcodec X )
+ vlm? ( encode )
+ xv? ( xcb )
+"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ if [[ "${MERGE_TYPE}" != "binary" && "$(tc-getCC)" == *"gcc"* ]] ; then
+ if [[ $(gcc-major-version) < 4 || ( $(gcc-major-version) == 4 && $(gcc-minor-version) < 5 ) ]] ; then
+ die "You need to have at least >=sys-devel/gcc-4.5 to build and/or have a working vlc, see bug #426754."
+ fi
+ fi
+}
+
+src_unpack() {
+ if [ "${PV%9999}" != "${PV}" ] ; then
+ git-r3_src_unpack
+ else
+ unpack ${A}
+ fi
+}
+
+src_prepare() {
+ # Remove unnecessary warnings about unimplemented pragmas on gcc for now.
+ # Need to recheck this with gcc 4.9 and every subsequent minor bump of gcc.
+ #
+ # config.h:792: warning: ignoring #pragma STDC FENV_ACCESS [-Wunknown-pragmas]
+ # config.h:793: warning: ignoring #pragma STDC FP_CONTRACT [-Wunknown-pragmas]
+ #
+ # http://gcc.gnu.org/c99status.html
+ if [[ "$(tc-getCC)" == *"gcc"* ]] ; then
+ sed -i 's/ifndef __FAST_MATH__/if 0/g' configure.ac || die
+ fi
+
+ # Bootstrap when we are on a git checkout.
+ if [[ "${PV%9999}" != "${PV}" ]] ; then
+ ./bootstrap
+ fi
+
+ # Make it build with libtool 1.5
+ rm -f m4/lt* m4/libtool.m4 || die
+
+ # We are not in a real git checkout due to the absence of a .git directory.
+ touch src/revision.txt || die
+
+ # Patch up incompatibilities and reconfigure autotools.
+ epatch "${FILESDIR}"/${PN}-2.1.0-newer-rdp.patch
+ epatch "${FILESDIR}"/${PN}-2.1.0-libva-1.2.1-compat.patch
+
+ # Fix up broken audio when skipping using a fixed reversed bisected commit.
+ epatch "${FILESDIR}"/${PN}-2.1.0-TomWij-bisected-PA-broken-underflow.patch
+
+ # Fix bug #541654
+ epatch "${FILESDIR}"/${PN}-2.1-mem_undefined_functions.patch
+
+ # Add missed header imgproc_c.h, imgproc.hpp, bug #554562
+ epatch "${FILESDIR}"/opencv-3.0.0.patch
+
+ # Disable avcodec checks when avcodec is not used.
+ if ! use avcodec; then
+ sed -i 's/^#if LIBAVCODEC_VERSION_CHECK(.*)$/#if 0/' modules/codec/avcodec/fourcc.c || die
+ fi
+
+ # Don't use --started-from-file when not using dbus.
+ if ! use dbus ; then
+ sed -i 's/ --started-from-file//' share/vlc.desktop.in || die
+ fi
+
+ # Disable a bogus check
+ sed -i "s:libavcodec < 56:libavcodec < 57:g" configure.ac || die
+
+ epatch_user
+
+ eautoreconf
+
+ # Disable automatic running of tests.
+ find . -name 'Makefile.in' -exec sed -i 's/\(..*\)check-TESTS/\1/' {} \; || die
+
+ # If qtchooser is installed, it may break the build, because moc,rcc and uic binaries for wrong qt version may be used.
+ # Setting QT_SELECT environment variable will enforce correct binaries.
+ if use qt4; then
+ export QT_SELECT=qt4
+ fi
+}
+
+src_configure() {
+ # Compatibility fix for Samba 4.
+ use samba && append-cppflags "-I/usr/include/samba-4.0"
+
+ # We need to disable -fstack-check if use >=gcc 4.8.0.
+ # See bug #499996
+ use x86 && append-cflags $(test-flags-CC -fno-stack-check)
+
+ # Needs libresid-builder from libsidplay:2 which is in another directory...
+ # FIXME!
+ append-ldflags "-L/usr/$(get_libdir)/sidplay/builders/"
+
+ if use truetype || use projectm ; then
+ local dejavu="/usr/share/fonts/dejavu/"
+ myconf="--with-default-font=${dejavu}/DejaVuSans.ttf \
+ --with-default-font-family=Sans \
+ --with-default-monospace-font=${dejavu}/DejaVuSansMono.ttf
+ --with-default-monospace-font-family=Monospace"
+ fi
+
+ econf \
+ ${myconf} \
+ --enable-vlc \
+ --docdir=/usr/share/doc/${PF} \
+ --disable-dependency-tracking \
+ --disable-optimizations \
+ --disable-update-check \
+ --enable-fast-install \
+ --enable-screen \
+ $(use_enable a52) \
+ $(use_enable aalib aa) \
+ $(use_enable alsa) \
+ $(use_enable altivec) \
+ $(use_enable atmo) \
+ $(use_enable audioqueue) \
+ $(use_enable avahi bonjour) \
+ $(use_enable avcodec) \
+ $(use_enable avformat) \
+ $(use_enable bidi fribidi) \
+ $(use_enable bluray) \
+ $(use_enable cdda vcd) \
+ $(use_enable cddb libcddb) \
+ $(use_enable chromaprint) \
+ $(use_enable dbus) \
+ $(use_enable dirac) \
+ $(use_enable directfb) \
+ $(use_enable directx) \
+ $(use_enable dc1394) \
+ $(use_enable debug) \
+ $(use_enable dts dca) \
+ $(use_enable dvbpsi) \
+ $(use_enable dvd dvdread) $(use_enable dvd dvdnav) \
+ $(use_enable dxva2) \
+ $(use_enable egl) \
+ $(use_enable encode sout) \
+ $(use_enable faad) \
+ $(use_enable fdk fdkaac) \
+ $(use_enable flac) \
+ $(use_enable fluidsynth) \
+ $(use_enable fontconfig) \
+ $(use_enable gcrypt libgcrypt) \
+ $(use_enable gme) \
+ $(use_enable gnome gnomevfs) \
+ $(use_enable gnutls) \
+ $(use_enable growl) \
+ $(use_enable httpd) \
+ $(use_enable ieee1394 dv1394) \
+ $(use_enable ios-vout) \
+ $(use_enable ios-vout ios-vout2) \
+ $(use_enable jack) \
+ $(use_enable kate) \
+ $(use_with kde kde-solid) \
+ $(use_enable libass) \
+ $(use_enable libcaca caca) \
+ $(use_enable libnotify notify) \
+ $(use_enable libsamplerate samplerate) \
+ $(use_enable libtar) \
+ $(use_enable libtiger tiger) \
+ $(use_enable linsys) \
+ $(use_enable lirc) \
+ $(use_enable live live555) \
+ $(use_enable lua) \
+ $(use_enable macosx-audio) \
+ $(use_enable macosx-dialog-provider) \
+ $(use_enable macosx-eyetv) \
+ $(use_enable macosx-qtkit) \
+ $(use_enable macosx-quartztext) \
+ $(use_enable macosx-vout) \
+ $(use_enable matroska mkv) \
+ $(use_enable cpu_flags_x86_mmx mmx) \
+ $(use_enable modplug mod) \
+ $(use_enable mp3 mad) \
+ $(use_enable mpeg libmpeg2) \
+ $(use_enable mtp) \
+ $(use_enable musepack mpc) \
+ $(use_enable ncurses) \
+ $(use_enable neon) \
+ $(use_enable ogg) $(use_enable ogg mux_ogg) \
+ $(use_enable omxil) \
+ $(use_enable omxil omxil-vout) \
+ $(use_enable opencv) \
+ $(use_enable opengl glx) \
+ $(use_enable opus) \
+ $(use_enable optimisememory optimize-memory) \
+ $(use_enable png) \
+ $(use_enable postproc) \
+ $(use_enable projectm) \
+ $(use_enable pulseaudio pulse) \
+ $(use_enable qt4 qt) \
+ $(use_enable rdp libfreerdp) \
+ $(use_enable rtsp realrtsp) \
+ $(use_enable run-as-root) \
+ $(use_enable samba smbclient) \
+ $(use_enable schroedinger) \
+ $(use_enable sdl) \
+ $(use_enable sdl-image) \
+ $(use_enable sid) \
+ $(use_enable sftp) \
+ $(use_enable shout) \
+ $(use_enable skins skins2) \
+ $(use_enable speex) \
+ $(use_enable cpu_flags_x86_sse sse) \
+ $(use_enable svg) \
+ $(use_enable swscale) \
+ $(use_enable taglib) \
+ $(use_enable theora) \
+ $(use_enable tremor) \
+ $(use_enable truetype freetype) \
+ $(use_enable twolame) \
+ $(use_enable udev) \
+ $(use_enable upnp) \
+ $(use_enable v4l v4l2) \
+ $(use_enable vaapi libva) \
+ $(use_enable vcdx) \
+ $(use_enable vdpau) \
+ $(use_enable vlm) \
+ $(use_enable vnc libvnc) \
+ $(use_enable vorbis) \
+ $(use_enable wma-fixed) \
+ $(use_with X x) \
+ $(use_enable x264) \
+ $(use_enable xcb) \
+ $(use_enable xml libxml2) \
+ $(use_enable xv xvideo) \
+ $(use_enable zvbi) $(use_enable !zvbi telx) \
+ --disable-coverage \
+ --disable-cprof \
+ --disable-crystalhd \
+ --disable-decklink \
+ --disable-gles1 \
+ --disable-gles2 \
+ --disable-goom \
+ --disable-ios-audio \
+ --disable-kai \
+ --disable-kva \
+ --disable-maintainer-mode \
+ --disable-merge-ffmpeg \
+ --disable-opensles \
+ --disable-oss \
+ --disable-quicksync \
+ --disable-quicktime \
+ --disable-rpi-omxil \
+ --disable-shine \
+ --disable-sndio \
+ --disable-vda \
+ --disable-vsxu \
+ --disable-wasapi
+
+ # ^ We don't have these disabled libraries in the Portage tree yet.
+
+ # _FORTIFY_SOURCE is set to 2 in config.h, which is also the default value on Gentoo.
+ # Other values of _FORTIFY_SOURCE may break the build (bug 523144), so definition should not be removed from config.h.
+ # To prevent redefinition warnings, we undefine _FORTIFY_SOURCE at the very start of config.h file
+ sed -i '1i#undef _FORTIFY_SOURCE' "${S}"/config.h || die
+}
+
+src_test() {
+ Xemake check-TESTS
+}
+
+DOCS="AUTHORS THANKS NEWS README doc/fortunes.txt doc/intf-vcd.txt"
+
+src_install() {
+ default
+
+ # Punt useless libtool's .la files
+ find "${D}" -name '*.la' -delete
+}
+
+pkg_postinst() {
+ if [ "$ROOT" = "/" ] && [ -x "/usr/$(get_libdir)/vlc/vlc-cache-gen" ] ; then
+ einfo "Running /usr/$(get_libdir)/vlc/vlc-cache-gen on /usr/$(get_libdir)/vlc/plugins/"
+ "/usr/$(get_libdir)/vlc/vlc-cache-gen" -f "/usr/$(get_libdir)/vlc/plugins/"
+ else
+ ewarn "We cannot run vlc-cache-gen (most likely ROOT!=/)"
+ ewarn "Please run /usr/$(get_libdir)/vlc/vlc-cache-gen manually"
+ ewarn "If you do not do it, vlc will take a long time to load."
+ fi
+}
diff --git a/media-video/vlc/vlc-2.1.9999.ebuild b/media-video/vlc/vlc-2.1.9999.ebuild
new file mode 100644
index 000000000000..e80ec35c5691
--- /dev/null
+++ b/media-video/vlc/vlc-2.1.9999.ebuild
@@ -0,0 +1,474 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+SCM=""
+if [ "${PV%9999}" != "${PV}" ] ; then
+ SCM="git-r3"
+
+ if [ "${PV%.9999}" != "${PV}" ] ; then
+ EGIT_REPO_URI="git://git.videolan.org/vlc/vlc-${PV%.9999}.git"
+ else
+ EGIT_REPO_URI="git://git.videolan.org/vlc.git"
+ fi
+fi
+
+inherit eutils multilib autotools toolchain-funcs flag-o-matic virtualx ${SCM}
+
+MY_PV="${PV/_/-}"
+MY_PV="${MY_PV/-beta/-test}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="VLC media player - Video player and streamer"
+HOMEPAGE="http://www.videolan.org/vlc/"
+if [ "${PV%9999}" != "${PV}" ] ; then # Live ebuild
+ SRC_URI=""
+elif [[ "${MY_P}" == "${P}" ]]; then
+ SRC_URI="http://download.videolan.org/pub/videolan/${PN}/${PV}/${P}.tar.xz"
+else
+ SRC_URI="http://download.videolan.org/pub/videolan/testing/${MY_P}/${MY_P}.tar.xz"
+fi
+
+LICENSE="LGPL-2.1 GPL-2"
+SLOT="0/5-7" # vlc - vlccore
+
+if [ "${PV%9999}" = "${PV}" ] ; then
+ KEYWORDS="~amd64 ~arm ~ppc -sparc ~x86 ~x86-fbsd"
+else
+ KEYWORDS=""
+fi
+
+IUSE="a52 aalib alsa altivec atmo +audioqueue avahi +avcodec
+ +avformat bidi bluray cdda cddb chromaprint dbus dc1394 debug dirac
+ directfb directx dts dvb +dvbpsi dvd dxva2 elibc_glibc egl +encode faad fdk
+ fluidsynth +ffmpeg flac fontconfig +gcrypt gme gnome gnutls
+ growl httpd ieee1394 ios-vout jack kate kde libass libav libcaca libnotify
+ +libsamplerate libtiger linsys libtar lirc live lua +macosx
+ +macosx-audio +macosx-dialog-provider +macosx-eyetv +macosx-quartztext
+ +macosx-qtkit +macosx-vout matroska media-library cpu_flags_x86_mmx modplug mp3 mpeg
+ mtp musepack ncurses neon ogg omxil opencv opengl optimisememory opus
+ png +postproc projectm pulseaudio +qt4 rdp rtsp run-as-root samba
+ schroedinger sdl sdl-image sftp shout sid skins speex cpu_flags_x86_sse svg +swscale
+ taglib theora tremor truetype twolame udev upnp vaapi v4l vcdx vdpau
+ vlm vnc vorbis wma-fixed +X x264 +xcb xml xv zvbi"
+
+RDEPEND="
+ !<media-video/ffmpeg-1.2:0
+ dev-libs/libgpg-error:0
+ net-dns/libidn:0
+ >=sys-libs/zlib-1.2.5.1-r2:0[minizip]
+ virtual/libintl:0
+ a52? ( >=media-libs/a52dec-0.7.4-r3:0 )
+ aalib? ( media-libs/aalib:0 )
+ alsa? ( >=media-libs/alsa-lib-1.0.24:0 )
+ avahi? ( >=net-dns/avahi-0.6:0[dbus] )
+ avcodec? (
+ !libav? ( media-video/ffmpeg:0= )
+ libav? ( media-video/libav:0= )
+ )
+ avformat? (
+ !libav? ( media-video/ffmpeg:0= )
+ libav? ( media-video/libav:0= )
+ )
+ bidi? ( >=dev-libs/fribidi-0.10.4:0 )
+ bluray? ( >=media-libs/libbluray-0.2.1:0 )
+ cddb? ( >=media-libs/libcddb-1.2.0:0 )
+ chromaprint? ( >=media-libs/chromaprint-0.6:0 )
+ dbus? ( >=sys-apps/dbus-1.0.2:0 )
+ dc1394? ( >=sys-libs/libraw1394-2.0.1:0 >=media-libs/libdc1394-2.1.0:2 )
+ dirac? ( >=media-video/dirac-0.10.0:0 )
+ directfb? ( dev-libs/DirectFB:0 sys-libs/zlib:0 )
+ dts? ( media-libs/libdca:0 )
+ dvbpsi? ( >=media-libs/libdvbpsi-0.2.1:0 )
+ dvd? ( media-libs/libdvdread:0 >=media-libs/libdvdnav-0.1.9:0 )
+ egl? ( virtual/opengl:0 )
+ elibc_glibc? ( >=sys-libs/glibc-2.8:2.2 )
+ faad? ( >=media-libs/faad2-2.6.1:0 )
+ fdk? ( media-libs/fdk-aac:0 )
+ flac? ( media-libs/libogg:0 >=media-libs/flac-1.1.2:0 )
+ fluidsynth? ( >=media-sound/fluidsynth-1.1.2:0 )
+ fontconfig? ( media-libs/fontconfig:1.0 )
+ gcrypt? ( >=dev-libs/libgcrypt-1.2.0:0= )
+ gme? ( media-libs/game-music-emu:0 )
+ gnome? ( gnome-base/gnome-vfs:2 dev-libs/glib:2 )
+ gnutls? ( >=net-libs/gnutls-3.0.20:0 )
+ ieee1394? ( >=sys-libs/libraw1394-2.0.1:0 >=sys-libs/libavc1394-0.5.3:0 )
+ ios-vout? ( virtual/opengl:0 )
+ jack? ( >=media-sound/jack-audio-connection-kit-0.99.0-r1:0 )
+ kate? ( >=media-libs/libkate-0.3.0:0 )
+ libass? ( >=media-libs/libass-0.9.8:0 media-libs/fontconfig:1.0 )
+ libcaca? ( >=media-libs/libcaca-0.99_beta14:0 )
+ libnotify? ( x11-libs/libnotify:0 x11-libs/gtk+:2 x11-libs/gdk-pixbuf:2 dev-libs/glib:2 )
+ libsamplerate? ( media-libs/libsamplerate:0 )
+ libtar? ( >=dev-libs/libtar-1.2.11-r3:0 )
+ libtiger? ( >=media-libs/libtiger-0.3.1:0 )
+ linsys? ( >=media-libs/zvbi-0.2.28:0 )
+ lirc? ( app-misc/lirc:0 )
+ live? ( >=media-plugins/live-2011.12.23:0 )
+ lua? ( >=dev-lang/lua-5.1:0 )
+ macosx-vout? ( virtual/opengl:0 )
+ matroska? ( >=dev-libs/libebml-1.0.0:0= >=media-libs/libmatroska-1.0.0:0= )
+ modplug? ( >=media-libs/libmodplug-0.8.8.1:0 )
+ mp3? ( media-libs/libmad:0 )
+ mpeg? ( >=media-libs/libmpeg2-0.3.2:0 )
+ mtp? ( >=media-libs/libmtp-1.0.0:0 )
+ musepack? ( >=media-sound/musepack-tools-444:0 )
+ ncurses? ( sys-libs/ncurses:5[unicode] )
+ ogg? ( media-libs/libogg:0 )
+ opencv? ( >media-libs/opencv-2.0:0 )
+ opengl? ( virtual/opengl:0 >=x11-libs/libX11-1.3.99.901:0 )
+ opus? ( >=media-libs/opus-1.0.3:0 )
+ png? ( media-libs/libpng:0= sys-libs/zlib:0 )
+ postproc? (
+ !libav? ( >=media-video/ffmpeg-1.2:0= )
+ libav? ( media-libs/libpostproc:0= )
+ )
+ projectm? ( media-libs/libprojectm:0 media-fonts/dejavu:0 )
+ pulseaudio? ( >=media-sound/pulseaudio-0.9.22:0 )
+ qt4? ( >=dev-qt/qtgui-4.6.0:4 >=dev-qt/qtcore-4.6.0:4 )
+ rdp? ( <net-misc/freerdp-1.2:0= )
+ samba? ( || ( >=net-fs/samba-3.4.6:0[smbclient] >=net-fs/samba-4.0.0:0[client] ) )
+ schroedinger? ( >=media-libs/schroedinger-1.0.10:0 )
+ sdl? ( >=media-libs/libsdl-1.2.10:0
+ sdl-image? ( >=media-libs/sdl-image-1.2.10:0 sys-libs/zlib:0 ) )
+ sftp? ( net-libs/libssh2:0 )
+ shout? ( media-libs/libshout:0 )
+ sid? ( media-libs/libsidplay:2 )
+ skins? ( x11-libs/libXext:0 x11-libs/libXpm:0 x11-libs/libXinerama:0 )
+ speex? ( media-libs/speex:0 )
+ svg? ( >=gnome-base/librsvg-2.9.0:2 )
+ swscale? (
+ !libav? ( media-video/ffmpeg:0= )
+ libav? ( media-video/libav:0= )
+ )
+ taglib? ( >=media-libs/taglib-1.6.1:0 sys-libs/zlib:0 )
+ theora? ( >=media-libs/libtheora-1.0_beta3:0 )
+ tremor? ( media-libs/tremor:0 )
+ truetype? ( media-libs/freetype:2 virtual/ttf-fonts:0
+ !fontconfig? ( media-fonts/dejavu:0 ) )
+ twolame? ( media-sound/twolame:0 )
+ udev? ( >=virtual/udev-142:0 )
+ upnp? ( net-libs/libupnp:0 )
+ v4l? ( media-libs/libv4l:0 )
+ vaapi? (
+ x11-libs/libva:0[X]
+ !libav? ( media-video/ffmpeg:0=[vaapi] )
+ libav? ( media-video/libav:0=[vaapi] )
+ )
+ vcdx? ( >=dev-libs/libcdio-0.78.2:0 >=media-video/vcdimager-0.7.22:0 )
+ vdpau? ( >=x11-libs/libvdpau-0.6:0 !<media-video/libav-10_beta1 )
+ vnc? ( >=net-libs/libvncserver-0.9.9:0 )
+ vorbis? ( media-libs/libvorbis:0 )
+ X? ( x11-libs/libX11:0 )
+ x264? ( >=media-libs/x264-0.0.20090923:0= )
+ xcb? ( >=x11-libs/libxcb-1.6:0 >=x11-libs/xcb-util-0.3.4:0 >=x11-libs/xcb-util-keysyms-0.3.4:0 )
+ xml? ( dev-libs/libxml2:2 )
+ zvbi? ( >=media-libs/zvbi-0.2.25:0 )
+"
+
+DEPEND="${RDEPEND}
+ kde? ( >=kde-base/kdelibs-4:4 )
+ xcb? ( x11-proto/xproto:0 )
+ app-arch/xz-utils:0
+ >=sys-devel/gettext-0.18.3:*
+ virtual/pkgconfig:*
+"
+
+REQUIRED_USE="
+ aalib? ( X )
+ bidi? ( truetype )
+ cddb? ( cdda )
+ dvb? ( dvbpsi )
+ dxva2? ( avcodec )
+ egl? ( X )
+ ffmpeg? ( avcodec avformat swscale postproc )
+ fontconfig? ( truetype )
+ gnutls? ( gcrypt )
+ httpd? ( lua )
+ libcaca? ( X )
+ libtar? ( skins )
+ libtiger? ( kate )
+ qt4? ( X )
+ sdl? ( X )
+ skins? ( truetype X qt4 )
+ vaapi? ( avcodec X )
+ vlm? ( encode )
+ xv? ( xcb )
+"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ if [[ "${MERGE_TYPE}" != "binary" && "$(tc-getCC)" == *"gcc"* ]] ; then
+ if [[ $(gcc-major-version) < 4 || ( $(gcc-major-version) == 4 && $(gcc-minor-version) < 5 ) ]] ; then
+ die "You need to have at least >=sys-devel/gcc-4.5 to build and/or have a working vlc, see bug #426754."
+ fi
+ fi
+}
+
+src_unpack() {
+ if [ "${PV%9999}" != "${PV}" ] ; then
+ git-r3_src_unpack
+ else
+ unpack ${A}
+ fi
+}
+
+src_prepare() {
+ # Remove unnecessary warnings about unimplemented pragmas on gcc for now.
+ # Need to recheck this with gcc 4.9 and every subsequent minor bump of gcc.
+ #
+ # config.h:792: warning: ignoring #pragma STDC FENV_ACCESS [-Wunknown-pragmas]
+ # config.h:793: warning: ignoring #pragma STDC FP_CONTRACT [-Wunknown-pragmas]
+ #
+ # http://gcc.gnu.org/c99status.html
+ if [[ "$(tc-getCC)" == *"gcc"* ]] ; then
+ sed -i 's/ifndef __FAST_MATH__/if 0/g' configure.ac || die
+ fi
+
+ # Bootstrap when we are on a git checkout.
+ if [[ "${PV%9999}" != "${PV}" ]] ; then
+ ./bootstrap
+ fi
+
+ # Make it build with libtool 1.5
+ rm -f m4/lt* m4/libtool.m4 || die
+
+ # We are not in a real git checkout due to the absence of a .git directory.
+ touch src/revision.txt || die
+
+ # Patch up incompatibilities and reconfigure autotools.
+ epatch "${FILESDIR}"/${PN}-2.1.0-newer-rdp.patch
+ epatch "${FILESDIR}"/${PN}-2.1.0-libva-1.2.1-compat.patch
+
+ # Fix up broken audio when skipping using a fixed reversed bisected commit.
+ epatch "${FILESDIR}"/${PN}-2.1.0-TomWij-bisected-PA-broken-underflow.patch
+
+ # Disable avcodec checks when avcodec is not used.
+ if ! use avcodec; then
+ sed -i 's/^#if LIBAVCODEC_VERSION_CHECK(.*)$/#if 0/' modules/codec/avcodec/fourcc.c || die
+ fi
+
+ # Don't use --started-from-file when not using dbus.
+ if ! use dbus ; then
+ sed -i 's/ --started-from-file//' share/vlc.desktop.in || die
+ fi
+
+ # Disable a bogus check
+ sed -i "s:libavcodec < 56:libavcodec < 57:g" configure.ac || die
+
+ epatch_user
+
+ eautoreconf
+
+ # Disable automatic running of tests.
+ find . -name 'Makefile.in' -exec sed -i 's/\(..*\)check-TESTS/\1/' {} \; || die
+
+ # If qtchooser is installed, it may break the build, because moc,rcc and uic binaries for wrong qt version may be used.
+ # Setting QT_SELECT environment variable will enforce correct binaries.
+ if use qt4; then
+ export QT_SELECT=qt4
+ fi
+}
+
+src_configure() {
+ # Compatibility fix for Samba 4.
+ use samba && append-cppflags "-I/usr/include/samba-4.0"
+
+ # We need to disable -fstack-check if use >=gcc 4.8.0.
+ # See bug #499996
+ use x86 && append-cflags $(test-flags-CC -fno-stack-check)
+
+ # Needs libresid-builder from libsidplay:2 which is in another directory...
+ # FIXME!
+ append-ldflags "-L/usr/$(get_libdir)/sidplay/builders/"
+
+ if use truetype || use projectm ; then
+ local dejavu="/usr/share/fonts/dejavu/"
+ myconf="--with-default-font=${dejavu}/DejaVuSans.ttf \
+ --with-default-font-family=Sans \
+ --with-default-monospace-font=${dejavu}/DejaVuSansMono.ttf
+ --with-default-monospace-font-family=Monospace"
+ fi
+
+ econf \
+ ${myconf} \
+ --enable-vlc \
+ --docdir=/usr/share/doc/${PF} \
+ --disable-dependency-tracking \
+ --disable-optimizations \
+ --disable-update-check \
+ --enable-fast-install \
+ --enable-screen \
+ $(use_enable a52) \
+ $(use_enable aalib aa) \
+ $(use_enable alsa) \
+ $(use_enable altivec) \
+ $(use_enable atmo) \
+ $(use_enable audioqueue) \
+ $(use_enable avahi bonjour) \
+ $(use_enable avcodec) \
+ $(use_enable avformat) \
+ $(use_enable bidi fribidi) \
+ $(use_enable bluray) \
+ $(use_enable cdda vcd) \
+ $(use_enable cddb libcddb) \
+ $(use_enable chromaprint) \
+ $(use_enable dbus) \
+ $(use_enable dirac) \
+ $(use_enable directfb) \
+ $(use_enable directx) \
+ $(use_enable dc1394) \
+ $(use_enable debug) \
+ $(use_enable dts dca) \
+ $(use_enable dvbpsi) \
+ $(use_enable dvd dvdread) $(use_enable dvd dvdnav) \
+ $(use_enable dxva2) \
+ $(use_enable egl) \
+ $(use_enable encode sout) \
+ $(use_enable faad) \
+ $(use_enable fdk fdkaac) \
+ $(use_enable flac) \
+ $(use_enable fluidsynth) \
+ $(use_enable fontconfig) \
+ $(use_enable gcrypt libgcrypt) \
+ $(use_enable gme) \
+ $(use_enable gnome gnomevfs) \
+ $(use_enable gnutls) \
+ $(use_enable growl) \
+ $(use_enable httpd) \
+ $(use_enable ieee1394 dv1394) \
+ $(use_enable ios-vout) \
+ $(use_enable ios-vout ios-vout2) \
+ $(use_enable jack) \
+ $(use_enable kate) \
+ $(use_with kde kde-solid) \
+ $(use_enable libass) \
+ $(use_enable libcaca caca) \
+ $(use_enable libnotify notify) \
+ $(use_enable libsamplerate samplerate) \
+ $(use_enable libtar) \
+ $(use_enable libtiger tiger) \
+ $(use_enable linsys) \
+ $(use_enable lirc) \
+ $(use_enable live live555) \
+ $(use_enable lua) \
+ $(use_enable macosx-audio) \
+ $(use_enable macosx-dialog-provider) \
+ $(use_enable macosx-eyetv) \
+ $(use_enable macosx-qtkit) \
+ $(use_enable macosx-quartztext) \
+ $(use_enable macosx-vout) \
+ $(use_enable matroska mkv) \
+ $(use_enable cpu_flags_x86_mmx mmx) \
+ $(use_enable modplug mod) \
+ $(use_enable mp3 mad) \
+ $(use_enable mpeg libmpeg2) \
+ $(use_enable mtp) \
+ $(use_enable musepack mpc) \
+ $(use_enable ncurses) \
+ $(use_enable neon) \
+ $(use_enable ogg) $(use_enable ogg mux_ogg) \
+ $(use_enable omxil) \
+ $(use_enable omxil omxil-vout) \
+ $(use_enable opencv) \
+ $(use_enable opengl glx) \
+ $(use_enable opus) \
+ $(use_enable optimisememory optimize-memory) \
+ $(use_enable png) \
+ $(use_enable postproc) \
+ $(use_enable projectm) \
+ $(use_enable pulseaudio pulse) \
+ $(use_enable qt4 qt) \
+ $(use_enable rdp libfreerdp) \
+ $(use_enable rtsp realrtsp) \
+ $(use_enable run-as-root) \
+ $(use_enable samba smbclient) \
+ $(use_enable schroedinger) \
+ $(use_enable sdl) \
+ $(use_enable sdl-image) \
+ $(use_enable sid) \
+ $(use_enable sftp) \
+ $(use_enable shout) \
+ $(use_enable skins skins2) \
+ $(use_enable speex) \
+ $(use_enable cpu_flags_x86_sse sse) \
+ $(use_enable svg) \
+ $(use_enable swscale) \
+ $(use_enable taglib) \
+ $(use_enable theora) \
+ $(use_enable tremor) \
+ $(use_enable truetype freetype) \
+ $(use_enable twolame) \
+ $(use_enable udev) \
+ $(use_enable upnp) \
+ $(use_enable v4l v4l2) \
+ $(use_enable vaapi libva) \
+ $(use_enable vcdx) \
+ $(use_enable vdpau) \
+ $(use_enable vlm) \
+ $(use_enable vnc libvnc) \
+ $(use_enable vorbis) \
+ $(use_enable wma-fixed) \
+ $(use_with X x) \
+ $(use_enable x264) \
+ $(use_enable xcb) \
+ $(use_enable xml libxml2) \
+ $(use_enable xv xvideo) \
+ $(use_enable zvbi) $(use_enable !zvbi telx) \
+ --disable-coverage \
+ --disable-cprof \
+ --disable-crystalhd \
+ --disable-decklink \
+ --disable-gles1 \
+ --disable-gles2 \
+ --disable-goom \
+ --disable-ios-audio \
+ --disable-kai \
+ --disable-kva \
+ --disable-maintainer-mode \
+ --disable-merge-ffmpeg \
+ --disable-opensles \
+ --disable-oss \
+ --disable-quicksync \
+ --disable-quicktime \
+ --disable-rpi-omxil \
+ --disable-shine \
+ --disable-sndio \
+ --disable-vda \
+ --disable-vsxu \
+ --disable-wasapi
+
+ # ^ We don't have these disabled libraries in the Portage tree yet.
+
+ # _FORTIFY_SOURCE is set to 2 in config.h, which is also the default value on Gentoo.
+ # Other values of _FORTIFY_SOURCE may break the build (bug 523144), so definition should not be removed from config.h.
+ # To prevent redefinition warnings, we undefine _FORTIFY_SOURCE at the very start of config.h file
+ sed -i '1i#undef _FORTIFY_SOURCE' "${S}"/config.h || die
+}
+
+src_test() {
+ Xemake check-TESTS
+}
+
+DOCS="AUTHORS THANKS NEWS README doc/fortunes.txt doc/intf-vcd.txt"
+
+src_install() {
+ default
+
+ # Punt useless libtool's .la files
+ find "${D}" -name '*.la' -delete
+}
+
+pkg_postinst() {
+ if [ "$ROOT" = "/" ] && [ -x "/usr/$(get_libdir)/vlc/vlc-cache-gen" ] ; then
+ einfo "Running /usr/$(get_libdir)/vlc/vlc-cache-gen on /usr/$(get_libdir)/vlc/plugins/"
+ "/usr/$(get_libdir)/vlc/vlc-cache-gen" -f "/usr/$(get_libdir)/vlc/plugins/"
+ else
+ ewarn "We cannot run vlc-cache-gen (most likely ROOT!=/)"
+ ewarn "Please run /usr/$(get_libdir)/vlc/vlc-cache-gen manually"
+ ewarn "If you do not do it, vlc will take a long time to load."
+ fi
+}
diff --git a/media-video/vlc/vlc-2.2.0.ebuild b/media-video/vlc/vlc-2.2.0.ebuild
new file mode 100644
index 000000000000..a1473a478b3c
--- /dev/null
+++ b/media-video/vlc/vlc-2.2.0.ebuild
@@ -0,0 +1,495 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+SCM=""
+if [ "${PV%9999}" != "${PV}" ] ; then
+ SCM="git-r3"
+
+ if [ "${PV%.9999}" != "${PV}" ] ; then
+ EGIT_REPO_URI="git://git.videolan.org/vlc/vlc-${PV%.9999}.git"
+ else
+ EGIT_REPO_URI="git://git.videolan.org/vlc.git"
+ fi
+fi
+
+inherit eutils multilib autotools toolchain-funcs flag-o-matic virtualx ${SCM}
+
+MY_PV="${PV/_/-}"
+MY_PV="${MY_PV/-beta/-test}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="VLC media player - Video player and streamer"
+HOMEPAGE="http://www.videolan.org/vlc/"
+if [ "${PV%9999}" != "${PV}" ] ; then # Live ebuild
+ SRC_URI=""
+elif [[ "${MY_P}" == "${P}" ]]; then
+ SRC_URI="http://download.videolan.org/pub/videolan/${PN}/${PV}/${P}.tar.xz"
+else
+ SRC_URI="http://download.videolan.org/pub/videolan/testing/${MY_P}/${MY_P}.tar.xz"
+fi
+
+LICENSE="LGPL-2.1 GPL-2"
+SLOT="0/5-8" # vlc - vlccore
+
+if [ "${PV%9999}" = "${PV}" ] ; then
+ KEYWORDS="~amd64 ~arm -sparc ~x86 ~x86-fbsd"
+else
+ KEYWORDS=""
+fi
+
+IUSE="a52 aalib alsa altivec atmo +audioqueue avahi +avcodec
+ +avformat bidi bluray cdda cddb chromaprint dbus dc1394 debug
+ directfb directx dts dvb +dvbpsi dvd dxva2 elibc_glibc +encode faad fdk
+ fluidsynth +ffmpeg flac fontconfig +gcrypt gme gnome gnutls
+ growl httpd ieee1394 jack jpeg kate kde libass libav libcaca libnotify
+ +libsamplerate libtiger linsys libtar lirc live lua
+ macosx-dialog-provider macosx-eyetv macosx-quartztext macosx-qtkit
+ matroska media-library cpu_flags_x86_mmx modplug mp3 mpeg
+ mtp musepack ncurses neon ogg omxil opencv opengl optimisememory opus
+ png postproc projectm pulseaudio +qt4 qt5 rdp rtsp run-as-root samba
+ schroedinger sdl sdl-image sftp shout sid skins speex cpu_flags_x86_sse svg +swscale
+ taglib theora tremor truetype twolame udev upnp vaapi v4l vcdx vdpau
+ vlm vnc vorbis vpx wma-fixed +X x264 x265 +xcb xml xv zvbi"
+
+RDEPEND="
+ !<media-video/ffmpeg-1.2:0
+ dev-libs/libgpg-error:0
+ net-dns/libidn:0
+ >=sys-libs/zlib-1.2.5.1-r2:0[minizip]
+ virtual/libintl:0
+ a52? ( >=media-libs/a52dec-0.7.4-r3:0 )
+ aalib? ( media-libs/aalib:0 )
+ alsa? ( >=media-libs/alsa-lib-1.0.24:0 )
+ avahi? ( >=net-dns/avahi-0.6:0[dbus] )
+ avcodec? (
+ !libav? ( media-video/ffmpeg:0= )
+ libav? ( >=media-video/libav-11:0= )
+ )
+ avformat? (
+ !libav? ( media-video/ffmpeg:0= )
+ libav? ( media-video/libav:0= )
+ )
+ bidi? ( >=dev-libs/fribidi-0.10.4:0 )
+ bluray? ( >=media-libs/libbluray-0.3:0 )
+ cddb? ( >=media-libs/libcddb-1.2:0 )
+ chromaprint? ( >=media-libs/chromaprint-0.6:0 )
+ dbus? ( >=sys-apps/dbus-1.6:0 )
+ dc1394? ( >=sys-libs/libraw1394-2.0.1:0 >=media-libs/libdc1394-2.1:2 )
+ directfb? ( dev-libs/DirectFB:0 sys-libs/zlib:0 )
+ dts? ( >=media-libs/libdca-0.0.5:0 )
+ dvbpsi? ( >=media-libs/libdvbpsi-0.2.1:0 )
+ dvd? ( >=media-libs/libdvdread-4.9:0 >=media-libs/libdvdnav-4.9:0 )
+ elibc_glibc? ( >=sys-libs/glibc-2.8:2.2 )
+ faad? ( >=media-libs/faad2-2.6.1:0 )
+ fdk? ( media-libs/fdk-aac:0 )
+ flac? ( >=media-libs/libogg-1:0 >=media-libs/flac-1.1.2:0 )
+ fluidsynth? ( >=media-sound/fluidsynth-1.1.2:0 )
+ fontconfig? ( media-libs/fontconfig:1.0 )
+ gcrypt? ( >=dev-libs/libgcrypt-1.2.0:0= )
+ gme? ( media-libs/game-music-emu:0 )
+ gnome? ( gnome-base/gnome-vfs:2 dev-libs/glib:2 )
+ gnutls? ( >=net-libs/gnutls-3.0.20:0 )
+ ieee1394? ( >=sys-libs/libraw1394-2.0.1:0 >=sys-libs/libavc1394-0.5.3:0 )
+ jack? ( >=media-sound/jack-audio-connection-kit-0.99.0-r1:0 )
+ jpeg? ( virtual/jpeg:0 )
+ kate? ( >=media-libs/libkate-0.3:0 )
+ libass? ( >=media-libs/libass-0.9.8:0 media-libs/fontconfig:1.0 )
+ libcaca? ( >=media-libs/libcaca-0.99_beta14:0 )
+ libnotify? ( x11-libs/libnotify:0 x11-libs/gtk+:2 x11-libs/gdk-pixbuf:2 dev-libs/glib:2 )
+ libsamplerate? ( media-libs/libsamplerate:0 )
+ libtar? ( >=dev-libs/libtar-1.2.11-r3:0 )
+ libtiger? ( >=media-libs/libtiger-0.3.1:0 )
+ linsys? ( >=media-libs/zvbi-0.2.28:0 )
+ lirc? ( app-misc/lirc:0 )
+ live? ( >=media-plugins/live-2011.12.23:0 )
+ lua? ( >=dev-lang/lua-5.1:0 )
+ matroska? ( >=dev-libs/libebml-1:0= >=media-libs/libmatroska-1:0= )
+ modplug? ( >=media-libs/libmodplug-0.8.4:0 !~media-libs/libmodplug-0.8.8 )
+ mp3? ( media-libs/libmad:0 )
+ mpeg? ( >=media-libs/libmpeg2-0.3.2:0 )
+ mtp? ( >=media-libs/libmtp-1:0 )
+ musepack? ( >=media-sound/musepack-tools-444:0 )
+ ncurses? ( sys-libs/ncurses:5[unicode] )
+ ogg? ( >=media-libs/libogg-1:0 )
+ opencv? ( >media-libs/opencv-2:0 )
+ opengl? ( virtual/opengl:0 >=x11-libs/libX11-1.3.99.901:0 )
+ opus? ( >=media-libs/opus-1.0.3:0 )
+ png? ( media-libs/libpng:0= sys-libs/zlib:0 )
+ postproc? (
+ !libav? ( >=media-video/ffmpeg-2.2:0= )
+ libav? ( media-libs/libpostproc:0= )
+ )
+ projectm? ( media-libs/libprojectm:0 media-fonts/dejavu:0 )
+ pulseaudio? ( >=media-sound/pulseaudio-1:0 )
+ qt4? ( >=dev-qt/qtgui-4.6:4 >=dev-qt/qtcore-4.6:4 )
+ qt5? ( >=dev-qt/qtgui-5.1:5 >=dev-qt/qtcore-5.1:5 >=dev-qt/qtwidgets-5.1:5 >=dev-qt/qtx11extras-5.1:5 )
+ rdp? ( >=net-misc/freerdp-1.0.1:0= )
+ samba? ( || ( >=net-fs/samba-3.4.6:0[smbclient] >=net-fs/samba-4:0[client] ) )
+ schroedinger? ( >=media-libs/schroedinger-1.0.10:0 )
+ sdl? ( >=media-libs/libsdl-1.2.10:0
+ sdl-image? ( >=media-libs/sdl-image-1.2.10:0 sys-libs/zlib:0 ) )
+ sftp? ( net-libs/libssh2:0 )
+ shout? ( >=media-libs/libshout-2.1:0 )
+ sid? ( media-libs/libsidplay:2 )
+ skins? ( x11-libs/libXext:0 x11-libs/libXpm:0 x11-libs/libXinerama:0 )
+ speex? ( media-libs/speex:0 )
+ svg? ( >=gnome-base/librsvg-2.9:2 >=x11-libs/cairo-1.13.1:0 )
+ swscale? (
+ !libav? ( media-video/ffmpeg:0= )
+ libav? ( media-video/libav:0= )
+ )
+ taglib? ( >=media-libs/taglib-1.9:0 sys-libs/zlib:0 )
+ theora? ( >=media-libs/libtheora-1.0_beta3:0 )
+ tremor? ( media-libs/tremor:0 )
+ truetype? ( media-libs/freetype:2 virtual/ttf-fonts:0
+ !fontconfig? ( media-fonts/dejavu:0 ) )
+ twolame? ( media-sound/twolame:0 )
+ udev? ( >=virtual/udev-142:0 )
+ upnp? ( net-libs/libupnp:0 )
+ v4l? ( media-libs/libv4l:0 )
+ vaapi? (
+ x11-libs/libva:0[X,drm]
+ !libav? ( media-video/ffmpeg:0=[vaapi] )
+ libav? ( media-video/libav:0=[vaapi] )
+ )
+ vcdx? ( >=dev-libs/libcdio-0.78.2:0 >=media-video/vcdimager-0.7.22:0 )"
+
+# Temporarily block non-live FFMPEG versions as they break vdpau, 9999 works;
+# thus we'll have to wait for a new release there.
+RDEPEND="${RDEPEND}
+ vdpau? (
+ >=x11-libs/libvdpau-0.6:0
+ !libav? ( >=media-video/ffmpeg-2.2:0= )
+ libav? ( >=media-video/libav-10:0= )
+ )
+ vnc? ( >=net-libs/libvncserver-0.9.9:0 )
+ vorbis? ( >=media-libs/libvorbis-1.1:0 )
+ vpx? ( media-libs/libvpx:0 )
+ X? ( x11-libs/libX11:0 )
+ x264? ( >=media-libs/x264-0.0.20090923:0= )
+ x265? ( media-libs/x265:0= )
+ xcb? ( >=x11-libs/libxcb-1.6:0 >=x11-libs/xcb-util-0.3.4:0 >=x11-libs/xcb-util-keysyms-0.3.4:0 )
+ xml? ( >=dev-libs/libxml2-2.5:2 )
+ zvbi? ( >=media-libs/zvbi-0.2.25:0 )
+"
+
+DEPEND="${RDEPEND}
+ kde? ( >=kde-base/kdelibs-4:4 )
+ xcb? ( x11-proto/xproto:0 )
+ app-arch/xz-utils:0
+ x86? ( dev-lang/yasm:* )
+ amd64? ( dev-lang/yasm:* )
+ >=sys-devel/gettext-0.18.3:*
+ virtual/pkgconfig:*
+"
+
+REQUIRED_USE="
+ aalib? ( X )
+ bidi? ( truetype )
+ cddb? ( cdda )
+ dvb? ( dvbpsi )
+ dxva2? ( avcodec )
+ ffmpeg? ( avcodec avformat swscale )
+ fontconfig? ( truetype )
+ gnutls? ( gcrypt )
+ httpd? ( lua )
+ libcaca? ( X )
+ libtar? ( skins )
+ libtiger? ( kate )
+ qt4? ( X !qt5 )
+ qt5? ( X !qt4 )
+ sdl? ( X )
+ skins? ( truetype X ^^ ( qt4 qt5 ) )
+ vaapi? ( avcodec X )
+ vlm? ( encode )
+ xv? ( xcb )
+"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ if [[ "${MERGE_TYPE}" != "binary" && "$(tc-getCC)" == *"gcc"* ]] ; then
+ if [[ $(gcc-major-version) < 4 || ( $(gcc-major-version) == 4 && $(gcc-minor-version) < 5 ) ]] ; then
+ die "You need to have at least >=sys-devel/gcc-4.5 to build and/or have a working vlc, see bug #426754."
+ fi
+ fi
+}
+
+src_unpack() {
+ if [ "${PV%9999}" != "${PV}" ] ; then
+ git-r3_src_unpack
+ else
+ unpack ${A}
+ fi
+}
+
+src_prepare() {
+ # Remove unnecessary warnings about unimplemented pragmas on gcc for now.
+ # Need to recheck this with gcc 4.9 and every subsequent minor bump of gcc.
+ #
+ # config.h:792: warning: ignoring #pragma STDC FENV_ACCESS [-Wunknown-pragmas]
+ # config.h:793: warning: ignoring #pragma STDC FP_CONTRACT [-Wunknown-pragmas]
+ #
+ # http://gcc.gnu.org/c99status.html
+ if [[ "$(tc-getCC)" == *"gcc"* ]] ; then
+ sed -i 's/ifndef __FAST_MATH__/if 0/g' configure.ac || die
+ fi
+
+ # Bootstrap when we are on a git checkout.
+ if [[ "${PV%9999}" != "${PV}" ]] ; then
+ ./bootstrap
+ fi
+
+ # Make it build with libtool 1.5
+ rm -f m4/lt* m4/libtool.m4 || die
+
+ # We are not in a real git checkout due to the absence of a .git directory.
+ touch src/revision.txt || die
+
+ # Fix build system mistake.
+ epatch "${FILESDIR}"/${PN}-2.1.0-fix-libtremor-libs.patch
+
+ # Patch up incompatibilities and reconfigure autotools.
+ epatch "${FILESDIR}"/${PN}-9999-libva-1.2.1-compat.patch
+
+ # Fix up broken audio when skipping using a fixed reversed bisected commit.
+ epatch "${FILESDIR}"/${PN}-2.1.0-TomWij-bisected-PA-broken-underflow.patch
+
+ # Bug #541928
+ epatch "${FILESDIR}"/${P}-fix-xcb.patch
+
+ # Bug #541678
+ epatch "${FILESDIR}"/qt4-select.patch
+
+ # Don't use --started-from-file when not using dbus.
+ if ! use dbus ; then
+ sed -i 's/ --started-from-file//' share/vlc.desktop.in || die
+ fi
+
+ epatch_user
+
+ eautoreconf
+
+ # Disable automatic running of tests.
+ find . -name 'Makefile.in' -exec sed -i 's/\(..*\)check-TESTS/\1/' {} \; || die
+
+ # If qtchooser is installed, it may break the build, because moc,rcc and uic binaries for wrong qt version may be used.
+ # Setting QT_SELECT environment variable will enforce correct binaries.
+ if use qt4; then
+ export QT_SELECT=qt4
+ elif use qt5; then
+ export QT_SELECT=qt5
+ fi
+}
+
+src_configure() {
+ # Compatibility fix for Samba 4.
+ use samba && append-cppflags "-I/usr/include/samba-4.0"
+
+ # We need to disable -fstack-check if use >=gcc 4.8.0.
+ # See bug #499996
+ use x86 && append-cflags $(test-flags-CC -fno-stack-check)
+
+ # Needs libresid-builder from libsidplay:2 which is in another directory...
+ # FIXME!
+ append-ldflags "-L/usr/$(get_libdir)/sidplay/builders/"
+
+ if use truetype || use projectm ; then
+ local dejavu="/usr/share/fonts/dejavu/"
+ myconf="--with-default-font=${dejavu}/DejaVuSans.ttf \
+ --with-default-font-family=Sans \
+ --with-default-monospace-font=${dejavu}/DejaVuSansMono.ttf
+ --with-default-monospace-font-family=Monospace"
+ fi
+
+ local qt_flag=""
+ if use qt4 ; then
+ qt_flag="--enable-qt=4"
+ elif use qt5 ; then
+ qt_flag="--enable-qt=5"
+ else
+ qt_flag="--disable-qt"
+ fi
+
+ econf \
+ ${myconf} \
+ --enable-vlc \
+ --docdir=/usr/share/doc/${PF} \
+ --disable-dependency-tracking \
+ --disable-optimizations \
+ --disable-update-check \
+ --enable-fast-install \
+ --enable-screen \
+ $(use_enable a52) \
+ $(use_enable aalib aa) \
+ $(use_enable alsa) \
+ $(use_enable altivec) \
+ $(use_enable atmo) \
+ $(use_enable audioqueue) \
+ $(use_enable avahi bonjour) \
+ $(use_enable avcodec) \
+ $(use_enable avformat) \
+ $(use_enable bidi fribidi) \
+ $(use_enable bluray) \
+ $(use_enable cdda vcd) \
+ $(use_enable cddb libcddb) \
+ $(use_enable chromaprint) \
+ $(use_enable dbus) \
+ $(use_enable directfb) \
+ $(use_enable directx) \
+ $(use_enable dc1394) \
+ $(use_enable debug) \
+ $(use_enable dts dca) \
+ $(use_enable dvbpsi) \
+ $(use_enable dvd dvdread) $(use_enable dvd dvdnav) \
+ $(use_enable dxva2) \
+ $(use_enable encode sout) \
+ $(use_enable faad) \
+ $(use_enable fdk fdkaac) \
+ $(use_enable flac) \
+ $(use_enable fluidsynth) \
+ $(use_enable fontconfig) \
+ $(use_enable gcrypt libgcrypt) \
+ $(use_enable gme) \
+ $(use_enable gnome gnomevfs) \
+ $(use_enable gnutls) \
+ $(use_enable growl) \
+ $(use_enable httpd) \
+ $(use_enable ieee1394 dv1394) \
+ $(use_enable jack) \
+ $(use_enable jpeg) \
+ $(use_enable kate) \
+ $(use_with kde kde-solid) \
+ $(use_enable libass) \
+ $(use_enable libcaca caca) \
+ $(use_enable libnotify notify) \
+ $(use_enable libsamplerate samplerate) \
+ $(use_enable libtar) \
+ $(use_enable libtiger tiger) \
+ $(use_enable linsys) \
+ $(use_enable lirc) \
+ $(use_enable live live555) \
+ $(use_enable lua) \
+ $(use_enable macosx-dialog-provider) \
+ $(use_enable macosx-eyetv) \
+ $(use_enable macosx-qtkit) \
+ $(use_enable macosx-quartztext) \
+ $(use_enable matroska mkv) \
+ $(use_enable cpu_flags_x86_mmx mmx) \
+ $(use_enable modplug mod) \
+ $(use_enable mp3 mad) \
+ $(use_enable mpeg libmpeg2) \
+ $(use_enable mtp) \
+ $(use_enable musepack mpc) \
+ $(use_enable ncurses) \
+ $(use_enable neon) \
+ $(use_enable ogg) $(use_enable ogg mux_ogg) \
+ $(use_enable omxil) \
+ $(use_enable omxil omxil-vout) \
+ $(use_enable opencv) \
+ $(use_enable opengl glspectrum) \
+ $(use_enable opus) \
+ $(use_enable optimisememory optimize-memory) \
+ $(use_enable png) \
+ $(use_enable postproc) \
+ $(use_enable projectm) \
+ $(use_enable pulseaudio pulse) \
+ ${qt_flag} \
+ $(use_enable rdp freerdp) \
+ $(use_enable rtsp realrtsp) \
+ $(use_enable run-as-root) \
+ $(use_enable samba smbclient) \
+ $(use_enable schroedinger) \
+ $(use_enable sdl) \
+ $(use_enable sdl-image) \
+ $(use_enable sid) \
+ $(use_enable sftp) \
+ $(use_enable shout) \
+ $(use_enable skins skins2) \
+ $(use_enable speex) \
+ $(use_enable cpu_flags_x86_sse sse) \
+ $(use_enable svg) \
+ $(use_enable svg svgdec) \
+ $(use_enable swscale) \
+ $(use_enable taglib) \
+ $(use_enable theora) \
+ $(use_enable tremor) \
+ $(use_enable truetype freetype) \
+ $(use_enable twolame) \
+ $(use_enable udev) \
+ $(use_enable upnp) \
+ $(use_enable v4l v4l2) \
+ $(use_enable vaapi libva) \
+ $(use_enable vcdx) \
+ $(use_enable vdpau) \
+ $(use_enable vlm) \
+ $(use_enable vnc) \
+ $(use_enable vorbis) \
+ $(use_enable vpx) \
+ $(use_enable wma-fixed) \
+ $(use_with X x) \
+ $(use_enable x264) \
+ $(use_enable x265) \
+ $(use_enable xcb) \
+ $(use_enable xml libxml2) \
+ $(use_enable xv xvideo) \
+ $(use_enable zvbi) $(use_enable !zvbi telx) \
+ --disable-asdcp \
+ --disable-coverage \
+ --disable-cprof \
+ --disable-crystalhd \
+ --disable-decklink \
+ --disable-gles1 \
+ --disable-gles2 \
+ --disable-goom \
+ --disable-kai \
+ --disable-kva \
+ --disable-maintainer-mode \
+ --disable-merge-ffmpeg \
+ --disable-mfx \
+ --disable-mmal-codec \
+ --disable-mmal-vout \
+ --disable-opensles \
+ --disable-oss \
+ --disable-quicktime \
+ --disable-rpi-omxil \
+ --disable-shine \
+ --disable-sndio \
+ --disable-vda \
+ --disable-vsxu \
+ --disable-wasapi
+
+ # ^ We don't have these disabled libraries in the Portage tree yet.
+
+ # _FORTIFY_SOURCE is set to 2 in config.h, which is also the default value on Gentoo.
+ # Other values of _FORTIFY_SOURCE may break the build (bug 523144), so definition should not be removed from config.h.
+ # To prevent redefinition warnings, we undefine _FORTIFY_SOURCE at the very start of config.h file
+ sed -i '1i#undef _FORTIFY_SOURCE' "${S}"/config.h || die
+}
+
+src_test() {
+ Xemake check-TESTS
+}
+
+DOCS="AUTHORS THANKS NEWS README doc/fortunes.txt doc/intf-vcd.txt"
+
+src_install() {
+ default
+
+ # Punt useless libtool's .la files
+ find "${D}" -name '*.la' -delete
+}
+
+pkg_postinst() {
+ if [ "$ROOT" = "/" ] && [ -x "/usr/$(get_libdir)/vlc/vlc-cache-gen" ] ; then
+ einfo "Running /usr/$(get_libdir)/vlc/vlc-cache-gen on /usr/$(get_libdir)/vlc/plugins/"
+ "/usr/$(get_libdir)/vlc/vlc-cache-gen" -f "/usr/$(get_libdir)/vlc/plugins/"
+ else
+ ewarn "We cannot run vlc-cache-gen (most likely ROOT!=/)"
+ ewarn "Please run /usr/$(get_libdir)/vlc/vlc-cache-gen manually"
+ ewarn "If you do not do it, vlc will take a long time to load."
+ fi
+}
diff --git a/media-video/vlc/vlc-2.2.1.ebuild b/media-video/vlc/vlc-2.2.1.ebuild
new file mode 100644
index 000000000000..9f74073b9179
--- /dev/null
+++ b/media-video/vlc/vlc-2.2.1.ebuild
@@ -0,0 +1,502 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+SCM=""
+if [ "${PV%9999}" != "${PV}" ] ; then
+ SCM="git-r3"
+
+ if [ "${PV%.9999}" != "${PV}" ] ; then
+ EGIT_REPO_URI="git://git.videolan.org/vlc/vlc-${PV%.9999}.git"
+ else
+ EGIT_REPO_URI="git://git.videolan.org/vlc.git"
+ fi
+fi
+
+inherit eutils multilib autotools toolchain-funcs flag-o-matic virtualx ${SCM}
+
+MY_PV="${PV/_/-}"
+MY_PV="${MY_PV/-beta/-test}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="VLC media player - Video player and streamer"
+HOMEPAGE="http://www.videolan.org/vlc/"
+if [ "${PV%9999}" != "${PV}" ] ; then # Live ebuild
+ SRC_URI=""
+elif [[ "${MY_P}" == "${P}" ]]; then
+ SRC_URI="http://download.videolan.org/pub/videolan/${PN}/${PV}/${P}.tar.xz"
+else
+ SRC_URI="http://download.videolan.org/pub/videolan/testing/${MY_P}/${MY_P}.tar.xz"
+fi
+
+LICENSE="LGPL-2.1 GPL-2"
+SLOT="0/5-8" # vlc - vlccore
+
+if [ "${PV%9999}" = "${PV}" ] ; then
+ KEYWORDS="~amd64 ~arm ~ppc ~ppc64 -sparc ~x86 ~x86-fbsd"
+else
+ KEYWORDS=""
+fi
+
+IUSE="a52 aalib alsa altivec atmo +audioqueue +avcodec
+ +avformat bidi bluray cdda cddb chromaprint dbus dc1394 debug
+ directfb directx dts dvb +dvbpsi dvd dxva2 elibc_glibc +encode faad fdk
+ fluidsynth +ffmpeg flac fontconfig +gcrypt gme gnome gnutls
+ growl httpd ieee1394 jack jpeg kate kde libass libav libcaca libnotify
+ +libsamplerate libtiger linsys libtar lirc live lua
+ macosx-dialog-provider macosx-eyetv macosx-quartztext macosx-qtkit
+ matroska media-library cpu_flags_x86_mmx modplug mp3 mpeg
+ mtp musepack ncurses neon ogg omxil opencv opengl optimisememory opus
+ png postproc projectm pulseaudio +qt4 qt5 rdp rtsp run-as-root samba
+ schroedinger sdl sdl-image sftp shout sid skins speex cpu_flags_x86_sse svg +swscale
+ taglib theora tremor truetype twolame udev upnp vaapi v4l vcdx vdpau
+ vlm vnc vorbis vpx wma-fixed +X x264 x265 +xcb xml xv zeroconf zvbi"
+
+RDEPEND="
+ !<media-video/ffmpeg-1.2:0
+ dev-libs/libgpg-error:0
+ net-dns/libidn:0
+ >=sys-libs/zlib-1.2.5.1-r2:0[minizip]
+ virtual/libintl:0
+ a52? ( >=media-libs/a52dec-0.7.4-r3:0 )
+ aalib? ( media-libs/aalib:0 )
+ alsa? ( >=media-libs/alsa-lib-1.0.24:0 )
+ avcodec? (
+ !libav? ( media-video/ffmpeg:0= )
+ libav? ( >=media-video/libav-11:0= )
+ )
+ avformat? (
+ !libav? ( media-video/ffmpeg:0= )
+ libav? ( media-video/libav:0= )
+ )
+ bidi? ( >=dev-libs/fribidi-0.10.4:0 )
+ bluray? ( >=media-libs/libbluray-0.3:0 )
+ cddb? ( >=media-libs/libcddb-1.2:0 )
+ chromaprint? ( >=media-libs/chromaprint-0.6:0 )
+ dbus? ( >=sys-apps/dbus-1.6:0 )
+ dc1394? ( >=sys-libs/libraw1394-2.0.1:0 >=media-libs/libdc1394-2.1:2 )
+ directfb? ( dev-libs/DirectFB:0 sys-libs/zlib:0 )
+ dts? ( >=media-libs/libdca-0.0.5:0 )
+ dvbpsi? ( >=media-libs/libdvbpsi-0.2.1:0= )
+ dvd? ( >=media-libs/libdvdread-4.9:0 >=media-libs/libdvdnav-4.9:0 )
+ elibc_glibc? ( >=sys-libs/glibc-2.8:2.2 )
+ faad? ( >=media-libs/faad2-2.6.1:0 )
+ fdk? ( media-libs/fdk-aac:0 )
+ flac? ( >=media-libs/libogg-1:0 >=media-libs/flac-1.1.2:0 )
+ fluidsynth? ( >=media-sound/fluidsynth-1.1.2:0 )
+ fontconfig? ( media-libs/fontconfig:1.0 )
+ gcrypt? ( >=dev-libs/libgcrypt-1.2.0:0= )
+ gme? ( media-libs/game-music-emu:0 )
+ gnome? ( gnome-base/gnome-vfs:2 dev-libs/glib:2 )
+ gnutls? ( >=net-libs/gnutls-3.0.20:0 )
+ ieee1394? ( >=sys-libs/libraw1394-2.0.1:0 >=sys-libs/libavc1394-0.5.3:0 )
+ jack? ( >=media-sound/jack-audio-connection-kit-0.99.0-r1:0 )
+ jpeg? ( virtual/jpeg:0 )
+ kate? ( >=media-libs/libkate-0.3:0 )
+ libass? ( >=media-libs/libass-0.9.8:0 media-libs/fontconfig:1.0 )
+ libcaca? ( >=media-libs/libcaca-0.99_beta14:0 )
+ libnotify? ( x11-libs/libnotify:0 x11-libs/gtk+:2 x11-libs/gdk-pixbuf:2 dev-libs/glib:2 )
+ libsamplerate? ( media-libs/libsamplerate:0 )
+ libtar? ( >=dev-libs/libtar-1.2.11-r3:0 )
+ libtiger? ( >=media-libs/libtiger-0.3.1:0 )
+ linsys? ( >=media-libs/zvbi-0.2.28:0 )
+ lirc? ( app-misc/lirc:0 )
+ live? ( >=media-plugins/live-2011.12.23:0 )
+ lua? ( >=dev-lang/lua-5.1:0 )
+ matroska? ( >=dev-libs/libebml-1:0= >=media-libs/libmatroska-1:0= )
+ modplug? ( >=media-libs/libmodplug-0.8.4:0 !~media-libs/libmodplug-0.8.8 )
+ mp3? ( media-libs/libmad:0 )
+ mpeg? ( >=media-libs/libmpeg2-0.3.2:0 )
+ mtp? ( >=media-libs/libmtp-1:0 )
+ musepack? ( >=media-sound/musepack-tools-444:0 )
+ ncurses? ( sys-libs/ncurses:5[unicode] )
+ ogg? ( >=media-libs/libogg-1:0 )
+ opencv? ( >media-libs/opencv-2:0 )
+ opengl? ( virtual/opengl:0 >=x11-libs/libX11-1.3.99.901:0 )
+ opus? ( >=media-libs/opus-1.0.3:0 )
+ png? ( media-libs/libpng:0= sys-libs/zlib:0 )
+ postproc? (
+ !libav? ( >=media-video/ffmpeg-2.2:0= )
+ libav? ( media-libs/libpostproc:0= )
+ )
+ projectm? ( media-libs/libprojectm:0 media-fonts/dejavu:0 )
+ pulseaudio? ( >=media-sound/pulseaudio-1:0 )
+ qt4? ( >=dev-qt/qtgui-4.6:4 >=dev-qt/qtcore-4.6:4 )
+ qt5? ( >=dev-qt/qtgui-5.1:5 >=dev-qt/qtcore-5.1:5 >=dev-qt/qtwidgets-5.1:5 >=dev-qt/qtx11extras-5.1:5 )
+ rdp? ( >=net-misc/freerdp-1.0.1:0= )
+ samba? ( || ( >=net-fs/samba-3.4.6:0[smbclient] >=net-fs/samba-4:0[client] ) )
+ schroedinger? ( >=media-libs/schroedinger-1.0.10:0 )
+ sdl? ( >=media-libs/libsdl-1.2.10:0
+ sdl-image? ( >=media-libs/sdl-image-1.2.10:0 sys-libs/zlib:0 ) )
+ sftp? ( net-libs/libssh2:0 )
+ shout? ( >=media-libs/libshout-2.1:0 )
+ sid? ( media-libs/libsidplay:2 )
+ skins? ( x11-libs/libXext:0 x11-libs/libXpm:0 x11-libs/libXinerama:0 )
+ speex? ( media-libs/speex:0 )
+ svg? ( >=gnome-base/librsvg-2.9:2 >=x11-libs/cairo-1.13.1:0 )
+ swscale? (
+ !libav? ( media-video/ffmpeg:0= )
+ libav? ( media-video/libav:0= )
+ )
+ taglib? ( >=media-libs/taglib-1.9:0 sys-libs/zlib:0 )
+ theora? ( >=media-libs/libtheora-1.0_beta3:0 )
+ tremor? ( media-libs/tremor:0 )
+ truetype? ( media-libs/freetype:2 virtual/ttf-fonts:0
+ !fontconfig? ( media-fonts/dejavu:0 ) )
+ twolame? ( media-sound/twolame:0 )
+ udev? ( >=virtual/udev-142:0 )
+ upnp? ( net-libs/libupnp:0 )
+ v4l? ( media-libs/libv4l:0 )
+ vaapi? (
+ x11-libs/libva:0[X,drm]
+ !libav? ( media-video/ffmpeg:0=[vaapi] )
+ libav? ( media-video/libav:0=[vaapi] )
+ )
+ vcdx? ( >=dev-libs/libcdio-0.78.2:0 >=media-video/vcdimager-0.7.22:0 )
+ zeroconf? ( >=net-dns/avahi-0.6:0[dbus] )
+"
+
+# Temporarily block non-live FFMPEG versions as they break vdpau, 9999 works;
+# thus we'll have to wait for a new release there.
+RDEPEND="${RDEPEND}
+ vdpau? (
+ >=x11-libs/libvdpau-0.6:0
+ !libav? ( >=media-video/ffmpeg-2.2:0= )
+ libav? ( >=media-video/libav-10:0= )
+ )
+ vnc? ( >=net-libs/libvncserver-0.9.9:0 )
+ vorbis? ( >=media-libs/libvorbis-1.1:0 )
+ vpx? ( media-libs/libvpx:0 )
+ X? ( x11-libs/libX11:0 )
+ x264? ( >=media-libs/x264-0.0.20090923:0= )
+ x265? ( media-libs/x265:0= )
+ xcb? ( >=x11-libs/libxcb-1.6:0 >=x11-libs/xcb-util-0.3.4:0 >=x11-libs/xcb-util-keysyms-0.3.4:0 )
+ xml? ( >=dev-libs/libxml2-2.5:2 )
+ zvbi? ( >=media-libs/zvbi-0.2.25:0 )
+"
+
+DEPEND="${RDEPEND}
+ kde? ( >=kde-base/kdelibs-4:4 )
+ xcb? ( x11-proto/xproto:0 )
+ app-arch/xz-utils:0
+ x86? ( dev-lang/yasm:* )
+ amd64? ( dev-lang/yasm:* )
+ >=sys-devel/gettext-0.18.3:*
+ virtual/pkgconfig:*
+"
+
+REQUIRED_USE="
+ aalib? ( X )
+ bidi? ( truetype )
+ cddb? ( cdda )
+ dvb? ( dvbpsi )
+ dxva2? ( avcodec )
+ ffmpeg? ( avcodec avformat swscale )
+ fontconfig? ( truetype )
+ gnutls? ( gcrypt )
+ httpd? ( lua )
+ libcaca? ( X )
+ libtar? ( skins )
+ libtiger? ( kate )
+ qt4? ( X !qt5 )
+ qt5? ( X !qt4 )
+ sdl? ( X )
+ skins? ( truetype X ^^ ( qt4 qt5 ) )
+ vaapi? ( avcodec X )
+ vlm? ( encode )
+ xv? ( xcb )
+"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ if [[ "${MERGE_TYPE}" != "binary" && "$(tc-getCC)" == *"gcc"* ]] ; then
+ if [[ $(gcc-major-version) < 4 || ( $(gcc-major-version) == 4 && $(gcc-minor-version) < 5 ) ]] ; then
+ die "You need to have at least >=sys-devel/gcc-4.5 to build and/or have a working vlc, see bug #426754."
+ fi
+ fi
+}
+
+src_unpack() {
+ if [ "${PV%9999}" != "${PV}" ] ; then
+ git-r3_src_unpack
+ else
+ unpack ${A}
+ fi
+}
+
+src_prepare() {
+ # Remove unnecessary warnings about unimplemented pragmas on gcc for now.
+ # Need to recheck this with gcc 4.9 and every subsequent minor bump of gcc.
+ #
+ # config.h:792: warning: ignoring #pragma STDC FENV_ACCESS [-Wunknown-pragmas]
+ # config.h:793: warning: ignoring #pragma STDC FP_CONTRACT [-Wunknown-pragmas]
+ #
+ # http://gcc.gnu.org/c99status.html
+ if [[ "$(tc-getCC)" == *"gcc"* ]] ; then
+ sed -i 's/ifndef __FAST_MATH__/if 0/g' configure.ac || die
+ fi
+
+ # Bootstrap when we are on a git checkout.
+ if [[ "${PV%9999}" != "${PV}" ]] ; then
+ ./bootstrap
+ fi
+
+ # Make it build with libtool 1.5
+ rm -f m4/lt* m4/libtool.m4 || die
+
+ # We are not in a real git checkout due to the absence of a .git directory.
+ touch src/revision.txt || die
+
+ # Fix build system mistake.
+ epatch "${FILESDIR}"/${PN}-2.1.0-fix-libtremor-libs.patch
+
+ # Patch up incompatibilities and reconfigure autotools.
+ epatch "${FILESDIR}"/${PN}-9999-libva-1.2.1-compat.patch
+
+ # Patch for bug 542414
+ epatch "${FILESDIR}"/${PN}-2.2.0-rdp-1.2.0.patch
+
+ # Patch for bug 541928
+ epatch "${FILESDIR}"/${PN}-2.2.0-xcb_vdpau.patch
+
+ # Fix up broken audio when skipping using a fixed reversed bisected commit.
+ epatch "${FILESDIR}"/${PN}-2.1.0-TomWij-bisected-PA-broken-underflow.patch
+
+ # Bug #541678
+ epatch "${FILESDIR}"/qt4-select.patch
+
+ # Add missed header imgproc_c.h, imgproc.hpp, bug #554562
+ epatch "${FILESDIR}"/opencv-3.0.0.patch
+
+ # Don't use --started-from-file when not using dbus.
+ if ! use dbus ; then
+ sed -i 's/ --started-from-file//' share/vlc.desktop.in || die
+ fi
+
+ epatch_user
+
+ eautoreconf
+
+ # Disable automatic running of tests.
+ find . -name 'Makefile.in' -exec sed -i 's/\(..*\)check-TESTS/\1/' {} \; || die
+
+ # If qtchooser is installed, it may break the build, because moc,rcc and uic binaries for wrong qt version may be used.
+ # Setting QT_SELECT environment variable will enforce correct binaries.
+ if use qt4; then
+ export QT_SELECT=qt4
+ elif use qt5; then
+ export QT_SELECT=qt5
+ fi
+}
+
+src_configure() {
+ # Compatibility fix for Samba 4.
+ use samba && append-cppflags "-I/usr/include/samba-4.0"
+
+ # We need to disable -fstack-check if use >=gcc 4.8.0.
+ # See bug #499996
+ use x86 && append-cflags $(test-flags-CC -fno-stack-check)
+
+ # Needs libresid-builder from libsidplay:2 which is in another directory...
+ # FIXME!
+ append-ldflags "-L/usr/$(get_libdir)/sidplay/builders/"
+
+ if use truetype || use projectm ; then
+ local dejavu="/usr/share/fonts/dejavu/"
+ myconf="--with-default-font=${dejavu}/DejaVuSans.ttf \
+ --with-default-font-family=Sans \
+ --with-default-monospace-font=${dejavu}/DejaVuSansMono.ttf
+ --with-default-monospace-font-family=Monospace"
+ fi
+
+ local qt_flag=""
+ if use qt4 ; then
+ qt_flag="--enable-qt=4"
+ elif use qt5 ; then
+ qt_flag="--enable-qt=5"
+ else
+ qt_flag="--disable-qt"
+ fi
+
+ econf \
+ ${myconf} \
+ --enable-vlc \
+ --docdir=/usr/share/doc/${PF} \
+ --disable-dependency-tracking \
+ --disable-optimizations \
+ --disable-update-check \
+ --enable-fast-install \
+ --enable-screen \
+ $(use_enable a52) \
+ $(use_enable aalib aa) \
+ $(use_enable alsa) \
+ $(use_enable altivec) \
+ $(use_enable atmo) \
+ $(use_enable audioqueue) \
+ $(use_enable avcodec) \
+ $(use_enable avformat) \
+ $(use_enable bidi fribidi) \
+ $(use_enable bluray) \
+ $(use_enable cdda vcd) \
+ $(use_enable cddb libcddb) \
+ $(use_enable chromaprint) \
+ $(use_enable dbus) \
+ $(use_enable directfb) \
+ $(use_enable directx) \
+ $(use_enable dc1394) \
+ $(use_enable debug) \
+ $(use_enable dts dca) \
+ $(use_enable dvbpsi) \
+ $(use_enable dvd dvdread) $(use_enable dvd dvdnav) \
+ $(use_enable dxva2) \
+ $(use_enable encode sout) \
+ $(use_enable faad) \
+ $(use_enable fdk fdkaac) \
+ $(use_enable flac) \
+ $(use_enable fluidsynth) \
+ $(use_enable fontconfig) \
+ $(use_enable gcrypt libgcrypt) \
+ $(use_enable gme) \
+ $(use_enable gnome gnomevfs) \
+ $(use_enable gnutls) \
+ $(use_enable growl) \
+ $(use_enable httpd) \
+ $(use_enable ieee1394 dv1394) \
+ $(use_enable jack) \
+ $(use_enable jpeg) \
+ $(use_enable kate) \
+ $(use_with kde kde-solid) \
+ $(use_enable libass) \
+ $(use_enable libcaca caca) \
+ $(use_enable libnotify notify) \
+ $(use_enable libsamplerate samplerate) \
+ $(use_enable libtar) \
+ $(use_enable libtiger tiger) \
+ $(use_enable linsys) \
+ $(use_enable lirc) \
+ $(use_enable live live555) \
+ $(use_enable lua) \
+ $(use_enable macosx-dialog-provider) \
+ $(use_enable macosx-eyetv) \
+ $(use_enable macosx-qtkit) \
+ $(use_enable macosx-quartztext) \
+ $(use_enable matroska mkv) \
+ $(use_enable cpu_flags_x86_mmx mmx) \
+ $(use_enable modplug mod) \
+ $(use_enable mp3 mad) \
+ $(use_enable mpeg libmpeg2) \
+ $(use_enable mtp) \
+ $(use_enable musepack mpc) \
+ $(use_enable ncurses) \
+ $(use_enable neon) \
+ $(use_enable ogg) $(use_enable ogg mux_ogg) \
+ $(use_enable omxil) \
+ $(use_enable omxil omxil-vout) \
+ $(use_enable opencv) \
+ $(use_enable opengl glspectrum) \
+ $(use_enable opus) \
+ $(use_enable optimisememory optimize-memory) \
+ $(use_enable png) \
+ $(use_enable postproc) \
+ $(use_enable projectm) \
+ $(use_enable pulseaudio pulse) \
+ ${qt_flag} \
+ $(use_enable rdp freerdp) \
+ $(use_enable rtsp realrtsp) \
+ $(use_enable run-as-root) \
+ $(use_enable samba smbclient) \
+ $(use_enable schroedinger) \
+ $(use_enable sdl) \
+ $(use_enable sdl-image) \
+ $(use_enable sid) \
+ $(use_enable sftp) \
+ $(use_enable shout) \
+ $(use_enable skins skins2) \
+ $(use_enable speex) \
+ $(use_enable cpu_flags_x86_sse sse) \
+ $(use_enable svg) \
+ $(use_enable svg svgdec) \
+ $(use_enable swscale) \
+ $(use_enable taglib) \
+ $(use_enable theora) \
+ $(use_enable tremor) \
+ $(use_enable truetype freetype) \
+ $(use_enable twolame) \
+ $(use_enable udev) \
+ $(use_enable upnp) \
+ $(use_enable v4l v4l2) \
+ $(use_enable vaapi libva) \
+ $(use_enable vcdx) \
+ $(use_enable vdpau) \
+ $(use_enable vlm) \
+ $(use_enable vnc) \
+ $(use_enable vorbis) \
+ $(use_enable vpx) \
+ $(use_enable wma-fixed) \
+ $(use_with X x) \
+ $(use_enable x264) \
+ $(use_enable x265) \
+ $(use_enable xcb) \
+ $(use_enable xml libxml2) \
+ $(use_enable xv xvideo) \
+ $(use_enable zeroconf bonjour) \
+ $(use_enable zvbi) $(use_enable !zvbi telx) \
+ --disable-asdcp \
+ --disable-coverage \
+ --disable-cprof \
+ --disable-crystalhd \
+ --disable-decklink \
+ --disable-gles1 \
+ --disable-gles2 \
+ --disable-goom \
+ --disable-kai \
+ --disable-kva \
+ --disable-maintainer-mode \
+ --disable-merge-ffmpeg \
+ --disable-mfx \
+ --disable-mmal-codec \
+ --disable-mmal-vout \
+ --disable-opensles \
+ --disable-oss \
+ --disable-quicktime \
+ --disable-rpi-omxil \
+ --disable-shine \
+ --disable-sndio \
+ --disable-vda \
+ --disable-vsxu \
+ --disable-wasapi
+
+ # ^ We don't have these disabled libraries in the Portage tree yet.
+
+ # _FORTIFY_SOURCE is set to 2 in config.h, which is also the default value on Gentoo.
+ # Other values of _FORTIFY_SOURCE may break the build (bug 523144), so definition should not be removed from config.h.
+ # To prevent redefinition warnings, we undefine _FORTIFY_SOURCE at the very start of config.h file
+ sed -i '1i#undef _FORTIFY_SOURCE' "${S}"/config.h || die
+}
+
+src_test() {
+ Xemake check-TESTS
+}
+
+DOCS="AUTHORS THANKS NEWS README doc/fortunes.txt doc/intf-vcd.txt"
+
+src_install() {
+ default
+
+ # Punt useless libtool's .la files
+ find "${D}" -name '*.la' -delete
+}
+
+pkg_postinst() {
+ if [ "$ROOT" = "/" ] && [ -x "/usr/$(get_libdir)/vlc/vlc-cache-gen" ] ; then
+ einfo "Running /usr/$(get_libdir)/vlc/vlc-cache-gen on /usr/$(get_libdir)/vlc/plugins/"
+ "/usr/$(get_libdir)/vlc/vlc-cache-gen" -f "/usr/$(get_libdir)/vlc/plugins/"
+ else
+ ewarn "We cannot run vlc-cache-gen (most likely ROOT!=/)"
+ ewarn "Please run /usr/$(get_libdir)/vlc/vlc-cache-gen manually"
+ ewarn "If you do not do it, vlc will take a long time to load."
+ fi
+}
diff --git a/media-video/vlc/vlc-2.2.9999.ebuild b/media-video/vlc/vlc-2.2.9999.ebuild
new file mode 100644
index 000000000000..929e3d8c0221
--- /dev/null
+++ b/media-video/vlc/vlc-2.2.9999.ebuild
@@ -0,0 +1,484 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+SCM=""
+if [ "${PV%9999}" != "${PV}" ] ; then
+ SCM="git-r3"
+
+ if [ "${PV%.9999}" != "${PV}" ] ; then
+ EGIT_REPO_URI="git://git.videolan.org/vlc/vlc-${PV%.9999}.git"
+ else
+ EGIT_REPO_URI="git://git.videolan.org/vlc.git"
+ fi
+fi
+
+inherit eutils multilib autotools toolchain-funcs flag-o-matic virtualx ${SCM}
+
+MY_PV="${PV/_/-}"
+MY_PV="${MY_PV/-beta/-test}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="VLC media player - Video player and streamer"
+HOMEPAGE="http://www.videolan.org/vlc/"
+if [ "${PV%9999}" != "${PV}" ] ; then # Live ebuild
+ SRC_URI=""
+elif [[ "${MY_P}" == "${P}" ]]; then
+ SRC_URI="http://download.videolan.org/pub/videolan/${PN}/${PV}/${P}.tar.xz"
+else
+ SRC_URI="http://download.videolan.org/pub/videolan/testing/${MY_P}/${MY_P}.tar.xz"
+fi
+
+LICENSE="LGPL-2.1 GPL-2"
+SLOT="0/5-8" # vlc - vlccore
+
+if [ "${PV%9999}" = "${PV}" ] ; then
+ KEYWORDS="~amd64 ~arm ~ppc -sparc ~x86 ~x86-fbsd"
+else
+ KEYWORDS=""
+fi
+
+IUSE="a52 aalib alsa altivec atmo +audioqueue avahi +avcodec
+ +avformat bidi bluray cdda cddb chromaprint dbus dc1394 debug
+ directfb directx dts dvb +dvbpsi dvd dxva2 elibc_glibc +encode faad fdk
+ fluidsynth +ffmpeg flac fontconfig +gcrypt gme gnome gnutls
+ growl httpd ieee1394 jack jpeg kate kde libass libav libcaca libnotify
+ +libsamplerate libtiger linsys libtar lirc live lua
+ macosx-dialog-provider macosx-eyetv macosx-quartztext macosx-qtkit
+ matroska media-library cpu_flags_x86_mmx modplug mp3 mpeg
+ mtp musepack ncurses neon ogg omxil opencv opengl optimisememory opus
+ png +postproc projectm pulseaudio +qt4 qt5 rdp rtsp run-as-root samba
+ schroedinger sdl sdl-image sftp shout sid skins speex cpu_flags_x86_sse svg +swscale
+ taglib theora tremor truetype twolame udev upnp vaapi v4l vcdx vdpau
+ vlm vnc vorbis vpx wma-fixed +X x264 x265 +xcb xml xv zvbi"
+
+RDEPEND="
+ !<media-video/ffmpeg-1.2:0
+ dev-libs/libgpg-error:0
+ net-dns/libidn:0
+ >=sys-libs/zlib-1.2.5.1-r2:0[minizip]
+ virtual/libintl:0
+ a52? ( >=media-libs/a52dec-0.7.4-r3:0 )
+ aalib? ( media-libs/aalib:0 )
+ alsa? ( >=media-libs/alsa-lib-1.0.24:0 )
+ avahi? ( >=net-dns/avahi-0.6:0[dbus] )
+ avcodec? (
+ !libav? ( media-video/ffmpeg:0= )
+ libav? ( media-video/libav:0= )
+ )
+ avformat? (
+ !libav? ( media-video/ffmpeg:0= )
+ libav? ( media-video/libav:0= )
+ )
+ bidi? ( >=dev-libs/fribidi-0.10.4:0 )
+ bluray? ( >=media-libs/libbluray-0.3:0 )
+ cddb? ( >=media-libs/libcddb-1.2:0 )
+ chromaprint? ( >=media-libs/chromaprint-0.6:0 )
+ dbus? ( >=sys-apps/dbus-1.6:0 )
+ dc1394? ( >=sys-libs/libraw1394-2.0.1:0 >=media-libs/libdc1394-2.1:2 )
+ directfb? ( dev-libs/DirectFB:0 sys-libs/zlib:0 )
+ dts? ( >=media-libs/libdca-0.0.5:0 )
+ dvbpsi? ( >=media-libs/libdvbpsi-1.0.0:0= )
+ dvd? ( >=media-libs/libdvdread-4.9:0 >=media-libs/libdvdnav-4.9:0 )
+ elibc_glibc? ( >=sys-libs/glibc-2.8:2.2 )
+ faad? ( >=media-libs/faad2-2.6.1:0 )
+ fdk? ( media-libs/fdk-aac:0 )
+ flac? ( >=media-libs/libogg-1:0 >=media-libs/flac-1.1.2:0 )
+ fluidsynth? ( >=media-sound/fluidsynth-1.1.2:0 )
+ fontconfig? ( media-libs/fontconfig:1.0 )
+ gcrypt? ( >=dev-libs/libgcrypt-1.2.0:0= )
+ gme? ( media-libs/game-music-emu:0 )
+ gnome? ( gnome-base/gnome-vfs:2 dev-libs/glib:2 )
+ gnutls? ( >=net-libs/gnutls-3.0.20:0 )
+ ieee1394? ( >=sys-libs/libraw1394-2.0.1:0 >=sys-libs/libavc1394-0.5.3:0 )
+ jack? ( >=media-sound/jack-audio-connection-kit-0.99.0-r1:0 )
+ jpeg? ( virtual/jpeg:0 )
+ kate? ( >=media-libs/libkate-0.3:0 )
+ libass? ( >=media-libs/libass-0.9.8:0 media-libs/fontconfig:1.0 )
+ libcaca? ( >=media-libs/libcaca-0.99_beta14:0 )
+ libnotify? ( x11-libs/libnotify:0 x11-libs/gtk+:2 x11-libs/gdk-pixbuf:2 dev-libs/glib:2 )
+ libsamplerate? ( media-libs/libsamplerate:0 )
+ libtar? ( >=dev-libs/libtar-1.2.11-r3:0 )
+ libtiger? ( >=media-libs/libtiger-0.3.1:0 )
+ linsys? ( >=media-libs/zvbi-0.2.28:0 )
+ lirc? ( app-misc/lirc:0 )
+ live? ( >=media-plugins/live-2011.12.23:0 )
+ lua? ( >=dev-lang/lua-5.1:0 )
+ matroska? ( >=dev-libs/libebml-1:0= >=media-libs/libmatroska-1:0= )
+ modplug? ( >=media-libs/libmodplug-0.8.4:0 !~media-libs/libmodplug-0.8.8 )
+ mp3? ( media-libs/libmad:0 )
+ mpeg? ( >=media-libs/libmpeg2-0.3.2:0 )
+ mtp? ( >=media-libs/libmtp-1:0 )
+ musepack? ( >=media-sound/musepack-tools-444:0 )
+ ncurses? ( sys-libs/ncurses:5[unicode] )
+ ogg? ( >=media-libs/libogg-1:0 )
+ opencv? ( >media-libs/opencv-2:0 )
+ opengl? ( virtual/opengl:0 >=x11-libs/libX11-1.3.99.901:0 )
+ opus? ( >=media-libs/opus-1.0.3:0 )
+ png? ( media-libs/libpng:0= sys-libs/zlib:0 )
+ postproc? (
+ !libav? ( >=media-video/ffmpeg-2.2:0= )
+ libav? ( media-libs/libpostproc:0= )
+ )
+ projectm? ( media-libs/libprojectm:0 media-fonts/dejavu:0 )
+ pulseaudio? ( >=media-sound/pulseaudio-1:0 )
+ qt4? ( >=dev-qt/qtgui-4.6:4 >=dev-qt/qtcore-4.6:4 )
+ qt5? ( >=dev-qt/qtgui-5.1:5 >=dev-qt/qtcore-5.1:5 >=dev-qt/qtwidgets-5.1:5 >=dev-qt/qtx11extras-5.1:5 )
+ rdp? ( >=net-misc/freerdp-1.0.1:0= )
+ samba? ( || ( >=net-fs/samba-3.4.6:0[smbclient] >=net-fs/samba-4:0[client] ) )
+ schroedinger? ( >=media-libs/schroedinger-1.0.10:0 )
+ sdl? ( >=media-libs/libsdl-1.2.10:0
+ sdl-image? ( >=media-libs/sdl-image-1.2.10:0 sys-libs/zlib:0 ) )
+ sftp? ( net-libs/libssh2:0 )
+ shout? ( >=media-libs/libshout-2.1:0 )
+ sid? ( media-libs/libsidplay:2 )
+ skins? ( x11-libs/libXext:0 x11-libs/libXpm:0 x11-libs/libXinerama:0 )
+ speex? ( media-libs/speex:0 )
+ svg? ( >=gnome-base/librsvg-2.9:2 >=x11-libs/cairo-1.13.1:0 )
+ swscale? (
+ !libav? ( media-video/ffmpeg:0= )
+ libav? ( media-video/libav:0= )
+ )
+ taglib? ( >=media-libs/taglib-1.9:0 sys-libs/zlib:0 )
+ theora? ( >=media-libs/libtheora-1.0_beta3:0 )
+ tremor? ( media-libs/tremor:0 )
+ truetype? ( media-libs/freetype:2 virtual/ttf-fonts:0
+ !fontconfig? ( media-fonts/dejavu:0 ) )
+ twolame? ( media-sound/twolame:0 )
+ udev? ( >=virtual/udev-142:0 )
+ upnp? ( net-libs/libupnp:0 )
+ v4l? ( media-libs/libv4l:0 )
+ vaapi? (
+ x11-libs/libva:0[X,drm]
+ !libav? ( media-video/ffmpeg:0=[vaapi] )
+ libav? ( media-video/libav:0=[vaapi] )
+ )
+ vcdx? ( >=dev-libs/libcdio-0.78.2:0 >=media-video/vcdimager-0.7.22:0 )"
+
+# Temporarily block non-live FFMPEG versions as they break vdpau, 9999 works;
+# thus we'll have to wait for a new release there.
+RDEPEND="${RDEPEND}
+ vdpau? (
+ >=x11-libs/libvdpau-0.6:0
+ !libav? ( >=media-video/ffmpeg-2.2:0= )
+ libav? ( >=media-video/libav-10:0= )
+ )
+ vnc? ( >=net-libs/libvncserver-0.9.9:0 )
+ vorbis? ( >=media-libs/libvorbis-1.1:0 )
+ vpx? ( media-libs/libvpx:0 )
+ X? ( x11-libs/libX11:0 )
+ x264? ( >=media-libs/x264-0.0.20090923:0= )
+ x265? ( media-libs/x265:0= )
+ xcb? ( >=x11-libs/libxcb-1.6:0 >=x11-libs/xcb-util-0.3.4:0 >=x11-libs/xcb-util-keysyms-0.3.4:0 )
+ xml? ( >=dev-libs/libxml2-2.5:2 )
+ zvbi? ( >=media-libs/zvbi-0.2.25:0 )
+"
+
+DEPEND="${RDEPEND}
+ kde? ( >=kde-base/kdelibs-4:4 )
+ xcb? ( x11-proto/xproto:0 )
+ app-arch/xz-utils:0
+ dev-lang/yasm:*
+ >=sys-devel/gettext-0.18.3:*
+ virtual/pkgconfig:*
+"
+
+REQUIRED_USE="
+ aalib? ( X )
+ bidi? ( truetype )
+ cddb? ( cdda )
+ dvb? ( dvbpsi )
+ dxva2? ( avcodec )
+ ffmpeg? ( avcodec avformat swscale postproc )
+ fontconfig? ( truetype )
+ gnutls? ( gcrypt )
+ httpd? ( lua )
+ libcaca? ( X )
+ libtar? ( skins )
+ libtiger? ( kate )
+ qt4? ( X !qt5 )
+ qt5? ( X !qt4 )
+ sdl? ( X )
+ skins? ( truetype X ^^ ( qt4 qt5 ) )
+ vaapi? ( avcodec X )
+ vlm? ( encode )
+ xv? ( xcb )
+"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ if [[ "${MERGE_TYPE}" != "binary" && "$(tc-getCC)" == *"gcc"* ]] ; then
+ if [[ $(gcc-major-version) < 4 || ( $(gcc-major-version) == 4 && $(gcc-minor-version) < 5 ) ]] ; then
+ die "You need to have at least >=sys-devel/gcc-4.5 to build and/or have a working vlc, see bug #426754."
+ fi
+ fi
+}
+
+src_unpack() {
+ if [ "${PV%9999}" != "${PV}" ] ; then
+ git-r3_src_unpack
+ else
+ unpack ${A}
+ fi
+}
+
+src_prepare() {
+ # Remove unnecessary warnings about unimplemented pragmas on gcc for now.
+ # Need to recheck this with gcc 4.9 and every subsequent minor bump of gcc.
+ #
+ # config.h:792: warning: ignoring #pragma STDC FENV_ACCESS [-Wunknown-pragmas]
+ # config.h:793: warning: ignoring #pragma STDC FP_CONTRACT [-Wunknown-pragmas]
+ #
+ # http://gcc.gnu.org/c99status.html
+ if [[ "$(tc-getCC)" == *"gcc"* ]] ; then
+ sed -i 's/ifndef __FAST_MATH__/if 0/g' configure.ac || die
+ fi
+
+ # Bootstrap when we are on a git checkout.
+ if [[ "${PV%9999}" != "${PV}" ]] ; then
+ ./bootstrap
+ fi
+
+ # Make it build with libtool 1.5
+ rm -f m4/lt* m4/libtool.m4 || die
+
+ # We are not in a real git checkout due to the absence of a .git directory.
+ touch src/revision.txt || die
+
+ # Fix build system mistake.
+ epatch "${FILESDIR}"/${PN}-2.1.0-fix-libtremor-libs.patch
+
+ # Patch up incompatibilities and reconfigure autotools.
+ epatch "${FILESDIR}"/${PN}-9999-libva-1.2.1-compat.patch
+
+ # Fix up broken audio when skipping using a fixed reversed bisected commit.
+ epatch "${FILESDIR}"/${PN}-2.1.0-TomWij-bisected-PA-broken-underflow.patch
+
+ # Don't use --started-from-file when not using dbus.
+ if ! use dbus ; then
+ sed -i 's/ --started-from-file//' share/vlc.desktop.in || die
+ fi
+
+ epatch_user
+
+ eautoreconf
+
+ # Disable automatic running of tests.
+ find . -name 'Makefile.in' -exec sed -i 's/\(..*\)check-TESTS/\1/' {} \; || die
+
+ # If qtchooser is installed, it may break the build, because moc,rcc and uic binaries for wrong qt version may be used.
+ # Setting QT_SELECT environment variable will enforce correct binaries.
+ if use qt4; then
+ export QT_SELECT=qt4
+ elif use qt5; then
+ export QT_SELECT=qt5
+ fi
+}
+
+src_configure() {
+ # Compatibility fix for Samba 4.
+ use samba && append-cppflags "-I/usr/include/samba-4.0"
+
+ # We need to disable -fstack-check if use >=gcc 4.8.0.
+ # See bug #499996
+ use x86 && append-cflags $(test-flags-CC -fno-stack-check)
+
+ # Needs libresid-builder from libsidplay:2 which is in another directory...
+ # FIXME!
+ append-ldflags "-L/usr/$(get_libdir)/sidplay/builders/"
+
+ if use truetype || use projectm ; then
+ local dejavu="/usr/share/fonts/dejavu/"
+ myconf="--with-default-font=${dejavu}/DejaVuSans.ttf \
+ --with-default-font-family=Sans \
+ --with-default-monospace-font=${dejavu}/DejaVuSansMono.ttf
+ --with-default-monospace-font-family=Monospace"
+ fi
+
+ local qt_flag=""
+ if use qt4 || use qt5 ; then
+ qt_flag="--enable-qt"
+ fi
+
+ econf \
+ ${myconf} \
+ --enable-vlc \
+ --docdir=/usr/share/doc/${PF} \
+ --disable-dependency-tracking \
+ --disable-optimizations \
+ --disable-update-check \
+ --enable-fast-install \
+ --enable-screen \
+ $(use_enable a52) \
+ $(use_enable aalib aa) \
+ $(use_enable alsa) \
+ $(use_enable altivec) \
+ $(use_enable atmo) \
+ $(use_enable audioqueue) \
+ $(use_enable avahi bonjour) \
+ $(use_enable avcodec) \
+ $(use_enable avformat) \
+ $(use_enable bidi fribidi) \
+ $(use_enable bluray) \
+ $(use_enable cdda vcd) \
+ $(use_enable cddb libcddb) \
+ $(use_enable chromaprint) \
+ $(use_enable dbus) \
+ $(use_enable directfb) \
+ $(use_enable directx) \
+ $(use_enable dc1394) \
+ $(use_enable debug) \
+ $(use_enable dts dca) \
+ $(use_enable dvbpsi) \
+ $(use_enable dvd dvdread) $(use_enable dvd dvdnav) \
+ $(use_enable dxva2) \
+ $(use_enable encode sout) \
+ $(use_enable faad) \
+ $(use_enable fdk fdkaac) \
+ $(use_enable flac) \
+ $(use_enable fluidsynth) \
+ $(use_enable fontconfig) \
+ $(use_enable gcrypt libgcrypt) \
+ $(use_enable gme) \
+ $(use_enable gnome gnomevfs) \
+ $(use_enable gnutls) \
+ $(use_enable growl) \
+ $(use_enable httpd) \
+ $(use_enable ieee1394 dv1394) \
+ $(use_enable jack) \
+ $(use_enable jpeg) \
+ $(use_enable kate) \
+ $(use_with kde kde-solid) \
+ $(use_enable libass) \
+ $(use_enable libcaca caca) \
+ $(use_enable libnotify notify) \
+ $(use_enable libsamplerate samplerate) \
+ $(use_enable libtar) \
+ $(use_enable libtiger tiger) \
+ $(use_enable linsys) \
+ $(use_enable lirc) \
+ $(use_enable live live555) \
+ $(use_enable lua) \
+ $(use_enable macosx-dialog-provider) \
+ $(use_enable macosx-eyetv) \
+ $(use_enable macosx-qtkit) \
+ $(use_enable macosx-quartztext) \
+ $(use_enable matroska mkv) \
+ $(use_enable cpu_flags_x86_mmx mmx) \
+ $(use_enable modplug mod) \
+ $(use_enable mp3 mad) \
+ $(use_enable mpeg libmpeg2) \
+ $(use_enable mtp) \
+ $(use_enable musepack mpc) \
+ $(use_enable ncurses) \
+ $(use_enable neon) \
+ $(use_enable ogg) $(use_enable ogg mux_ogg) \
+ $(use_enable omxil) \
+ $(use_enable omxil omxil-vout) \
+ $(use_enable opencv) \
+ $(use_enable opengl glspectrum) \
+ $(use_enable opus) \
+ $(use_enable optimisememory optimize-memory) \
+ $(use_enable png) \
+ $(use_enable postproc) \
+ $(use_enable projectm) \
+ $(use_enable pulseaudio pulse) \
+ ${qt_flag} \
+ $(use_enable rdp freerdp) \
+ $(use_enable rtsp realrtsp) \
+ $(use_enable run-as-root) \
+ $(use_enable samba smbclient) \
+ $(use_enable schroedinger) \
+ $(use_enable sdl) \
+ $(use_enable sdl-image) \
+ $(use_enable sid) \
+ $(use_enable sftp) \
+ $(use_enable shout) \
+ $(use_enable skins skins2) \
+ $(use_enable speex) \
+ $(use_enable cpu_flags_x86_sse sse) \
+ $(use_enable svg) \
+ $(use_enable svg svgdec) \
+ $(use_enable swscale) \
+ $(use_enable taglib) \
+ $(use_enable theora) \
+ $(use_enable tremor) \
+ $(use_enable truetype freetype) \
+ $(use_enable twolame) \
+ $(use_enable udev) \
+ $(use_enable upnp) \
+ $(use_enable v4l v4l2) \
+ $(use_enable vaapi libva) \
+ $(use_enable vcdx) \
+ $(use_enable vdpau) \
+ $(use_enable vlm) \
+ $(use_enable vnc) \
+ $(use_enable vorbis) \
+ $(use_enable vpx) \
+ $(use_enable wma-fixed) \
+ $(use_with X x) \
+ $(use_enable x264) \
+ $(use_enable x265) \
+ $(use_enable xcb) \
+ $(use_enable xml libxml2) \
+ $(use_enable xv xvideo) \
+ $(use_enable zvbi) $(use_enable !zvbi telx) \
+ --disable-asdcp \
+ --disable-coverage \
+ --disable-cprof \
+ --disable-crystalhd \
+ --disable-decklink \
+ --disable-gles1 \
+ --disable-gles2 \
+ --disable-goom \
+ --disable-kai \
+ --disable-kva \
+ --disable-maintainer-mode \
+ --disable-merge-ffmpeg \
+ --disable-mfx \
+ --disable-mmal-codec \
+ --disable-mmal-vout \
+ --disable-opensles \
+ --disable-oss \
+ --disable-quicktime \
+ --disable-rpi-omxil \
+ --disable-shine \
+ --disable-sndio \
+ --disable-vda \
+ --disable-vsxu \
+ --disable-wasapi
+
+ # ^ We don't have these disabled libraries in the Portage tree yet.
+
+ # _FORTIFY_SOURCE is set to 2 in config.h, which is also the default value on Gentoo.
+ # Other values of _FORTIFY_SOURCE may break the build (bug 523144), so definition should not be removed from config.h.
+ # To prevent redefinition warnings, we undefine _FORTIFY_SOURCE at the very start of config.h file
+ sed -i '1i#undef _FORTIFY_SOURCE' "${S}"/config.h || die
+}
+
+src_test() {
+ Xemake check-TESTS
+}
+
+DOCS="AUTHORS THANKS NEWS README doc/fortunes.txt doc/intf-vcd.txt"
+
+src_install() {
+ default
+
+ # Punt useless libtool's .la files
+ find "${D}" -name '*.la' -delete
+}
+
+pkg_postinst() {
+ if [ "$ROOT" = "/" ] && [ -x "/usr/$(get_libdir)/vlc/vlc-cache-gen" ] ; then
+ einfo "Running /usr/$(get_libdir)/vlc/vlc-cache-gen on /usr/$(get_libdir)/vlc/plugins/"
+ "/usr/$(get_libdir)/vlc/vlc-cache-gen" -f "/usr/$(get_libdir)/vlc/plugins/"
+ else
+ ewarn "We cannot run vlc-cache-gen (most likely ROOT!=/)"
+ ewarn "Please run /usr/$(get_libdir)/vlc/vlc-cache-gen manually"
+ ewarn "If you do not do it, vlc will take a long time to load."
+ fi
+}
diff --git a/media-video/vlc/vlc-9999.ebuild b/media-video/vlc/vlc-9999.ebuild
new file mode 100644
index 000000000000..289589ef067c
--- /dev/null
+++ b/media-video/vlc/vlc-9999.ebuild
@@ -0,0 +1,485 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+SCM=""
+if [ "${PV%9999}" != "${PV}" ] ; then
+ SCM="git-r3"
+
+ if [ "${PV%.9999}" != "${PV}" ] ; then
+ EGIT_REPO_URI="git://git.videolan.org/vlc/vlc-${PV%.9999}.git"
+ else
+ EGIT_REPO_URI="git://git.videolan.org/vlc.git"
+ fi
+fi
+
+inherit eutils multilib autotools toolchain-funcs flag-o-matic virtualx ${SCM}
+
+MY_PV="${PV/_/-}"
+MY_PV="${MY_PV/-beta/-test}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="VLC media player - Video player and streamer"
+HOMEPAGE="http://www.videolan.org/vlc/"
+if [ "${PV%9999}" != "${PV}" ] ; then # Live ebuild
+ SRC_URI=""
+elif [[ "${MY_P}" == "${P}" ]]; then
+ SRC_URI="http://download.videolan.org/pub/videolan/${PN}/${PV}/${P}.tar.xz"
+else
+ SRC_URI="http://download.videolan.org/pub/videolan/testing/${MY_P}/${MY_P}.tar.xz"
+fi
+
+LICENSE="LGPL-2.1 GPL-2"
+SLOT="0/5-8" # vlc - vlccore
+
+if [ "${PV%9999}" = "${PV}" ] ; then
+ KEYWORDS="~amd64 ~arm ~ppc -sparc ~x86 ~x86-fbsd"
+else
+ KEYWORDS=""
+fi
+
+IUSE="a52 aalib alsa altivec atmo +audioqueue +avcodec
+ +avformat bidi bluray cdda cddb chromaprint dbus dc1394 debug
+ directfb directx dts dvb +dvbpsi dvd dxva2 elibc_glibc +encode faad fdk
+ fluidsynth +ffmpeg flac fontconfig +gcrypt gme gnome gnutls
+ growl httpd ieee1394 jack jpeg kate kde libass libav libcaca libnotify
+ +libsamplerate libtiger linsys libtar lirc live lua
+ macosx-dialog-provider macosx-eyetv macosx-quartztext macosx-qtkit
+ matroska media-library cpu_flags_x86_mmx modplug mp3 mpeg
+ mtp musepack ncurses neon ogg omxil opencv opengl optimisememory opus
+ png +postproc projectm pulseaudio +qt4 qt5 rdp rtsp run-as-root samba
+ schroedinger sdl sdl-image sftp shout sid skins speex cpu_flags_x86_sse svg +swscale
+ taglib theora tremor truetype twolame udev upnp vaapi v4l vcdx vdpau
+ vlm vnc vorbis vpx wma-fixed +X x264 x265 +xcb xml xv zvbi zeroconf"
+
+RDEPEND="
+ !<media-video/ffmpeg-1.2:0
+ dev-libs/libgpg-error:0
+ net-dns/libidn:0
+ >=sys-libs/zlib-1.2.5.1-r2:0[minizip]
+ virtual/libintl:0
+ a52? ( >=media-libs/a52dec-0.7.4-r3:0 )
+ aalib? ( media-libs/aalib:0 )
+ alsa? ( >=media-libs/alsa-lib-1.0.24:0 )
+ avcodec? (
+ !libav? ( media-video/ffmpeg:0= )
+ libav? ( media-video/libav:0= )
+ )
+ avformat? (
+ !libav? ( media-video/ffmpeg:0= )
+ libav? ( media-video/libav:0= )
+ )
+ bidi? ( >=dev-libs/fribidi-0.10.4:0 )
+ bluray? ( >=media-libs/libbluray-0.3:0 )
+ cddb? ( >=media-libs/libcddb-1.2:0 )
+ chromaprint? ( >=media-libs/chromaprint-0.6:0 )
+ dbus? ( >=sys-apps/dbus-1.6:0 )
+ dc1394? ( >=sys-libs/libraw1394-2.0.1:0 >=media-libs/libdc1394-2.1:2 )
+ directfb? ( dev-libs/DirectFB:0 sys-libs/zlib:0 )
+ dts? ( >=media-libs/libdca-0.0.5:0 )
+ dvbpsi? ( >=media-libs/libdvbpsi-1.0.0:0= )
+ dvd? ( >=media-libs/libdvdread-4.9:0 >=media-libs/libdvdnav-4.9:0 )
+ elibc_glibc? ( >=sys-libs/glibc-2.8:2.2 )
+ faad? ( >=media-libs/faad2-2.6.1:0 )
+ fdk? ( media-libs/fdk-aac:0 )
+ flac? ( >=media-libs/libogg-1:0 >=media-libs/flac-1.1.2:0 )
+ fluidsynth? ( >=media-sound/fluidsynth-1.1.2:0 )
+ fontconfig? ( media-libs/fontconfig:1.0 )
+ gcrypt? ( >=dev-libs/libgcrypt-1.2.0:0= )
+ gme? ( media-libs/game-music-emu:0 )
+ gnome? ( gnome-base/gnome-vfs:2 dev-libs/glib:2 )
+ gnutls? ( >=net-libs/gnutls-3.0.20:0 )
+ ieee1394? ( >=sys-libs/libraw1394-2.0.1:0 >=sys-libs/libavc1394-0.5.3:0 )
+ jack? ( >=media-sound/jack-audio-connection-kit-0.99.0-r1:0 )
+ jpeg? ( virtual/jpeg:0 )
+ kate? ( >=media-libs/libkate-0.3:0 )
+ libass? ( >=media-libs/libass-0.9.8:0 media-libs/fontconfig:1.0 )
+ libcaca? ( >=media-libs/libcaca-0.99_beta14:0 )
+ libnotify? ( x11-libs/libnotify:0 x11-libs/gtk+:2 x11-libs/gdk-pixbuf:2 dev-libs/glib:2 )
+ libsamplerate? ( media-libs/libsamplerate:0 )
+ libtar? ( >=dev-libs/libtar-1.2.11-r3:0 )
+ libtiger? ( >=media-libs/libtiger-0.3.1:0 )
+ linsys? ( >=media-libs/zvbi-0.2.28:0 )
+ lirc? ( app-misc/lirc:0 )
+ live? ( >=media-plugins/live-2011.12.23:0 )
+ lua? ( >=dev-lang/lua-5.1:0 )
+ matroska? ( >=dev-libs/libebml-1:0= >=media-libs/libmatroska-1:0= )
+ modplug? ( >=media-libs/libmodplug-0.8.4:0 !~media-libs/libmodplug-0.8.8 )
+ mp3? ( media-libs/libmad:0 )
+ mpeg? ( >=media-libs/libmpeg2-0.3.2:0 )
+ mtp? ( >=media-libs/libmtp-1:0 )
+ musepack? ( >=media-sound/musepack-tools-444:0 )
+ ncurses? ( sys-libs/ncurses:5[unicode] )
+ ogg? ( >=media-libs/libogg-1:0 )
+ opencv? ( >media-libs/opencv-2:0 )
+ opengl? ( virtual/opengl:0 >=x11-libs/libX11-1.3.99.901:0 )
+ opus? ( >=media-libs/opus-1.0.3:0 )
+ png? ( media-libs/libpng:0= sys-libs/zlib:0 )
+ postproc? (
+ !libav? ( >=media-video/ffmpeg-2.2:0= )
+ libav? ( media-libs/libpostproc:0= )
+ )
+ projectm? ( media-libs/libprojectm:0 media-fonts/dejavu:0 )
+ pulseaudio? ( >=media-sound/pulseaudio-1:0 )
+ qt4? ( >=dev-qt/qtgui-4.6:4 >=dev-qt/qtcore-4.6:4 )
+ qt5? ( >=dev-qt/qtgui-5.1:5 >=dev-qt/qtcore-5.1:5 >=dev-qt/qtwidgets-5.1:5 >=dev-qt/qtx11extras-5.1:5 )
+ rdp? ( >=net-misc/freerdp-1.0.1:0= )
+ samba? ( || ( >=net-fs/samba-3.4.6:0[smbclient] >=net-fs/samba-4:0[client] ) )
+ schroedinger? ( >=media-libs/schroedinger-1.0.10:0 )
+ sdl? ( >=media-libs/libsdl-1.2.10:0
+ sdl-image? ( >=media-libs/sdl-image-1.2.10:0 sys-libs/zlib:0 ) )
+ sftp? ( net-libs/libssh2:0 )
+ shout? ( >=media-libs/libshout-2.1:0 )
+ sid? ( media-libs/libsidplay:2 )
+ skins? ( x11-libs/libXext:0 x11-libs/libXpm:0 x11-libs/libXinerama:0 )
+ speex? ( media-libs/speex:0 )
+ svg? ( >=gnome-base/librsvg-2.9:2 >=x11-libs/cairo-1.13.1:0 )
+ swscale? (
+ !libav? ( media-video/ffmpeg:0= )
+ libav? ( media-video/libav:0= )
+ )
+ taglib? ( >=media-libs/taglib-1.9:0 sys-libs/zlib:0 )
+ theora? ( >=media-libs/libtheora-1.0_beta3:0 )
+ tremor? ( media-libs/tremor:0 )
+ truetype? ( media-libs/freetype:2 virtual/ttf-fonts:0
+ !fontconfig? ( media-fonts/dejavu:0 ) )
+ twolame? ( media-sound/twolame:0 )
+ udev? ( >=virtual/udev-142:0 )
+ upnp? ( net-libs/libupnp:0 )
+ v4l? ( media-libs/libv4l:0 )
+ vaapi? (
+ x11-libs/libva:0[X,drm]
+ !libav? ( media-video/ffmpeg:0=[vaapi] )
+ libav? ( media-video/libav:0=[vaapi] )
+ )
+ vcdx? ( >=dev-libs/libcdio-0.78.2:0 >=media-video/vcdimager-0.7.22:0 )
+ zeroconf? ( >=net-dns/avahi-0.6:0[dbus] )
+"
+
+# Temporarily block non-live FFMPEG versions as they break vdpau, 9999 works;
+# thus we'll have to wait for a new release there.
+RDEPEND="${RDEPEND}
+ vdpau? (
+ >=x11-libs/libvdpau-0.6:0
+ !libav? ( >=media-video/ffmpeg-2.2:0= )
+ libav? ( >=media-video/libav-10:0= )
+ )
+ vnc? ( >=net-libs/libvncserver-0.9.9:0 )
+ vorbis? ( >=media-libs/libvorbis-1.1:0 )
+ vpx? ( media-libs/libvpx:0 )
+ X? ( x11-libs/libX11:0 )
+ x264? ( >=media-libs/x264-0.0.20090923:0= )
+ x265? ( media-libs/x265:0= )
+ xcb? ( >=x11-libs/libxcb-1.6:0 >=x11-libs/xcb-util-0.3.4:0 >=x11-libs/xcb-util-keysyms-0.3.4:0 )
+ xml? ( >=dev-libs/libxml2-2.5:2 )
+ zvbi? ( >=media-libs/zvbi-0.2.25:0 )
+"
+
+DEPEND="${RDEPEND}
+ kde? ( >=kde-base/kdelibs-4:4 )
+ xcb? ( x11-proto/xproto:0 )
+ app-arch/xz-utils:0
+ dev-lang/yasm:*
+ >=sys-devel/gettext-0.19.2:*
+ virtual/pkgconfig:*
+"
+
+REQUIRED_USE="
+ aalib? ( X )
+ bidi? ( truetype )
+ cddb? ( cdda )
+ dvb? ( dvbpsi )
+ dxva2? ( avcodec )
+ ffmpeg? ( avcodec avformat swscale postproc )
+ fontconfig? ( truetype )
+ gnutls? ( gcrypt )
+ httpd? ( lua )
+ libcaca? ( X )
+ libtar? ( skins )
+ libtiger? ( kate )
+ qt4? ( X !qt5 )
+ qt5? ( X !qt4 )
+ sdl? ( X )
+ skins? ( truetype X ^^ ( qt4 qt5 ) )
+ vaapi? ( avcodec X )
+ vlm? ( encode )
+ xv? ( xcb )
+"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ if [[ "${MERGE_TYPE}" != "binary" && "$(tc-getCC)" == *"gcc"* ]] ; then
+ if [[ $(gcc-major-version) < 4 || ( $(gcc-major-version) == 4 && $(gcc-minor-version) < 5 ) ]] ; then
+ die "You need to have at least >=sys-devel/gcc-4.5 to build and/or have a working vlc, see bug #426754."
+ fi
+ fi
+}
+
+src_unpack() {
+ if [ "${PV%9999}" != "${PV}" ] ; then
+ git-r3_src_unpack
+ else
+ unpack ${A}
+ fi
+}
+
+src_prepare() {
+ # Remove unnecessary warnings about unimplemented pragmas on gcc for now.
+ # Need to recheck this with gcc 4.9 and every subsequent minor bump of gcc.
+ #
+ # config.h:792: warning: ignoring #pragma STDC FENV_ACCESS [-Wunknown-pragmas]
+ # config.h:793: warning: ignoring #pragma STDC FP_CONTRACT [-Wunknown-pragmas]
+ #
+ # http://gcc.gnu.org/c99status.html
+ if [[ "$(tc-getCC)" == *"gcc"* ]] ; then
+ sed -i 's/ifndef __FAST_MATH__/if 0/g' configure.ac || die
+ fi
+
+ # Bootstrap when we are on a git checkout.
+ if [[ "${PV%9999}" != "${PV}" ]] ; then
+ ./bootstrap
+ fi
+
+ # Make it build with libtool 1.5
+ rm -f m4/lt* m4/libtool.m4 || die
+
+ # We are not in a real git checkout due to the absence of a .git directory.
+ touch src/revision.txt || die
+
+ # Fix build system mistake.
+ epatch "${FILESDIR}"/${PN}-2.1.0-fix-libtremor-libs.patch
+
+ # Patch up incompatibilities and reconfigure autotools.
+ epatch "${FILESDIR}"/${P}-libva-1.2.1-compat.patch
+
+ # Fix up broken audio when skipping using a fixed reversed bisected commit.
+ epatch "${FILESDIR}"/${PN}-2.1.0-TomWij-bisected-PA-broken-underflow.patch
+
+ # Don't use --started-from-file when not using dbus.
+ if ! use dbus ; then
+ sed -i 's/ --started-from-file//' share/vlc.desktop.in || die
+ fi
+
+ epatch_user
+
+ eautoreconf
+
+ # Disable automatic running of tests.
+ find . -name 'Makefile.in' -exec sed -i 's/\(..*\)check-TESTS/\1/' {} \; || die
+
+ # If qtchooser is installed, it may break the build, because moc,rcc and uic binaries for wrong qt version may be used.
+ # Setting QT_SELECT environment variable will enforce correct binaries.
+ if use qt4; then
+ export QT_SELECT=qt4
+ elif use qt5; then
+ export QT_SELECT=qt5
+ fi
+}
+
+src_configure() {
+ # Compatibility fix for Samba 4.
+ use samba && append-cppflags "-I/usr/include/samba-4.0"
+
+ # We need to disable -fstack-check if use >=gcc 4.8.0.
+ # See bug #499996
+ use x86 && append-cflags $(test-flags-CC -fno-stack-check)
+
+ # Needs libresid-builder from libsidplay:2 which is in another directory...
+ # FIXME!
+ append-ldflags "-L/usr/$(get_libdir)/sidplay/builders/"
+
+ if use truetype || use projectm ; then
+ local dejavu="/usr/share/fonts/dejavu/"
+ myconf="--with-default-font=${dejavu}/DejaVuSans.ttf \
+ --with-default-font-family=Sans \
+ --with-default-monospace-font=${dejavu}/DejaVuSansMono.ttf
+ --with-default-monospace-font-family=Monospace"
+ fi
+
+ local qt_flag=""
+ if use qt4 || use qt5 ; then
+ qt_flag="--enable-qt"
+ fi
+
+ econf \
+ ${myconf} \
+ --enable-vlc \
+ --docdir=/usr/share/doc/${PF} \
+ --disable-dependency-tracking \
+ --disable-optimizations \
+ --disable-update-check \
+ --enable-fast-install \
+ --enable-screen \
+ $(use_enable a52) \
+ $(use_enable aalib aa) \
+ $(use_enable alsa) \
+ $(use_enable altivec) \
+ $(use_enable atmo) \
+ $(use_enable audioqueue) \
+ $(use_enable avcodec) \
+ $(use_enable avformat) \
+ $(use_enable bidi fribidi) \
+ $(use_enable bluray) \
+ $(use_enable cdda vcd) \
+ $(use_enable cddb libcddb) \
+ $(use_enable chromaprint) \
+ $(use_enable dbus) \
+ $(use_enable directfb) \
+ $(use_enable directx) \
+ $(use_enable dc1394) \
+ $(use_enable debug) \
+ $(use_enable dts dca) \
+ $(use_enable dvbpsi) \
+ $(use_enable dvd dvdread) $(use_enable dvd dvdnav) \
+ $(use_enable dxva2) \
+ $(use_enable encode sout) \
+ $(use_enable faad) \
+ $(use_enable fdk fdkaac) \
+ $(use_enable flac) \
+ $(use_enable fluidsynth) \
+ $(use_enable fontconfig) \
+ $(use_enable gcrypt libgcrypt) \
+ $(use_enable gme) \
+ $(use_enable gnome gnomevfs) \
+ $(use_enable gnutls) \
+ $(use_enable growl) \
+ $(use_enable httpd) \
+ $(use_enable ieee1394 dv1394) \
+ $(use_enable jack) \
+ $(use_enable jpeg) \
+ $(use_enable kate) \
+ $(use_with kde kde-solid) \
+ $(use_enable libass) \
+ $(use_enable libcaca caca) \
+ $(use_enable libnotify notify) \
+ $(use_enable libsamplerate samplerate) \
+ $(use_enable libtar) \
+ $(use_enable libtiger tiger) \
+ $(use_enable linsys) \
+ $(use_enable lirc) \
+ $(use_enable live live555) \
+ $(use_enable lua) \
+ $(use_enable macosx-dialog-provider) \
+ $(use_enable macosx-eyetv) \
+ $(use_enable macosx-qtkit) \
+ $(use_enable macosx-quartztext) \
+ $(use_enable matroska mkv) \
+ $(use_enable cpu_flags_x86_mmx mmx) \
+ $(use_enable modplug mod) \
+ $(use_enable mp3 mad) \
+ $(use_enable mpeg libmpeg2) \
+ $(use_enable mtp) \
+ $(use_enable musepack mpc) \
+ $(use_enable ncurses) \
+ $(use_enable neon) \
+ $(use_enable ogg) $(use_enable ogg mux_ogg) \
+ $(use_enable omxil) \
+ $(use_enable omxil omxil-vout) \
+ $(use_enable opencv) \
+ $(use_enable opengl glspectrum) \
+ $(use_enable opus) \
+ $(use_enable optimisememory optimize-memory) \
+ $(use_enable png) \
+ $(use_enable postproc) \
+ $(use_enable projectm) \
+ $(use_enable pulseaudio pulse) \
+ ${qt_flag} \
+ $(use_enable rdp freerdp) \
+ $(use_enable rtsp realrtsp) \
+ $(use_enable run-as-root) \
+ $(use_enable samba smbclient) \
+ $(use_enable schroedinger) \
+ $(use_enable sdl) \
+ $(use_enable sdl-image) \
+ $(use_enable sid) \
+ $(use_enable sftp) \
+ $(use_enable shout) \
+ $(use_enable skins skins2) \
+ $(use_enable speex) \
+ $(use_enable cpu_flags_x86_sse sse) \
+ $(use_enable svg) \
+ $(use_enable svg svgdec) \
+ $(use_enable swscale) \
+ $(use_enable taglib) \
+ $(use_enable theora) \
+ $(use_enable tremor) \
+ $(use_enable truetype freetype) \
+ $(use_enable twolame) \
+ $(use_enable udev) \
+ $(use_enable upnp) \
+ $(use_enable v4l v4l2) \
+ $(use_enable vaapi libva) \
+ $(use_enable vcdx) \
+ $(use_enable vdpau) \
+ $(use_enable vlm) \
+ $(use_enable vnc) \
+ $(use_enable vorbis) \
+ $(use_enable vpx) \
+ $(use_enable wma-fixed) \
+ $(use_with X x) \
+ $(use_enable x264) \
+ $(use_enable xcb) \
+ $(use_enable xml libxml2) \
+ $(use_enable xv xvideo) \
+ $(use_enable x265) \
+ $(use_enable zeroconf bonjour) \
+ $(use_enable zvbi) $(use_enable !zvbi telx) \
+ --disable-asdcp \
+ --disable-coverage \
+ --disable-cprof \
+ --disable-crystalhd \
+ --disable-decklink \
+ --disable-gles1 \
+ --disable-gles2 \
+ --disable-goom \
+ --disable-kai \
+ --disable-kva \
+ --disable-maintainer-mode \
+ --disable-merge-ffmpeg \
+ --disable-mfx \
+ --disable-mmal-codec \
+ --disable-mmal-vout \
+ --disable-opensles \
+ --disable-oss \
+ --disable-quicktime \
+ --disable-rpi-omxil \
+ --disable-shine \
+ --disable-sndio \
+ --disable-vda \
+ --disable-vsxu \
+ --disable-wasapi
+
+ # ^ We don't have these disabled libraries in the Portage tree yet.
+
+ # _FORTIFY_SOURCE is set to 2 in config.h, which is also the default value on Gentoo.
+ # Other values of _FORTIFY_SOURCE may break the build (bug 523144), so definition should not be removed from config.h.
+ # To prevent redefinition warnings, we undefine _FORTIFY_SOURCE at the very start of config.h file
+ sed -i '1i#undef _FORTIFY_SOURCE' "${S}"/config.h || die
+}
+
+src_test() {
+ Xemake check-TESTS
+}
+
+DOCS="AUTHORS THANKS NEWS README doc/fortunes.txt doc/intf-vcd.txt"
+
+src_install() {
+ default
+
+ # Punt useless libtool's .la files
+ find "${D}" -name '*.la' -delete
+}
+
+pkg_postinst() {
+ if [ "$ROOT" = "/" ] && [ -x "/usr/$(get_libdir)/vlc/vlc-cache-gen" ] ; then
+ einfo "Running /usr/$(get_libdir)/vlc/vlc-cache-gen on /usr/$(get_libdir)/vlc/plugins/"
+ "/usr/$(get_libdir)/vlc/vlc-cache-gen" -f "/usr/$(get_libdir)/vlc/plugins/"
+ else
+ ewarn "We cannot run vlc-cache-gen (most likely ROOT!=/)"
+ ewarn "Please run /usr/$(get_libdir)/vlc/vlc-cache-gen manually"
+ ewarn "If you do not do it, vlc will take a long time to load."
+ fi
+}
diff --git a/media-video/vmaid/Manifest b/media-video/vmaid/Manifest
new file mode 100644
index 000000000000..82c1afa32d71
--- /dev/null
+++ b/media-video/vmaid/Manifest
@@ -0,0 +1 @@
+DIST vmaid-2.2.4.tar.gz 1249758 SHA256 675b653c223fc7f09b6ff91632e16340138737b1261081e45ae4f26a0943e5fa SHA512 16a92a2b35b91428a2f59f3c7c0223225107e2cfdc9c082edf7a730181ea79a60cc5bc8ed4d18d126513b43d06eda6be56a650fa165d1c5a9bc4675836f49adc WHIRLPOOL 4b8f9ded96b8907531b9b1b640b86041a55478f851727b77cf3cc45bcd1ab2c76d3174d3254e565a5d0d8f45d51e85a9bb352d9b4431c091ba35a6ce4cb8ba84
diff --git a/media-video/vmaid/metadata.xml b/media-video/vmaid/metadata.xml
new file mode 100644
index 000000000000..dec2925e35de
--- /dev/null
+++ b/media-video/vmaid/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <longdescription>Video maid is the AVI file editor which operates by GNU/Linux system or other UNIX compatible OS. AVI file IO is provided the edit environment with the original function which specialized in edit. Moreover, it has the intuitive user interface which can edit an image.</longdescription>
+ <upstream>
+ <remote-id type="sourceforge-jp">vmaid</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/vmaid/vmaid-2.2.4.ebuild b/media-video/vmaid/vmaid-2.2.4.ebuild
new file mode 100644
index 000000000000..dcf05f718b97
--- /dev/null
+++ b/media-video/vmaid/vmaid-2.2.4.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Video maid is the AVI file editor"
+HOMEPAGE="http://vmaid.sourceforge.jp/"
+SRC_URI="mirror://sourceforge.jp/vmaid/48081/${P}.tar.gz"
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="alsa ao mime"
+
+RDEPEND="x11-libs/gtk+:2
+ ao? ( media-libs/libao )
+ !ao? ( alsa? ( >=media-libs/alsa-lib-0.9 ) )
+ mime? ( x11-misc/shared-mime-info )"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ virtual/pkgconfig
+ app-text/scrollkeeper"
+
+src_configure() {
+ econf \
+ $(use_enable mime) \
+ --with-ao=$(usex ao) \
+ --with-alsa=$(usex alsa) \
+ --without-w32
+}
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dodoc AUTHORS CONTRIBUTORS ChangeLog NEWS README
+ dohtml -r doc/{en,ja}
+}
diff --git a/media-video/vobcopy/Manifest b/media-video/vobcopy/Manifest
new file mode 100644
index 000000000000..fe7f363aa45b
--- /dev/null
+++ b/media-video/vobcopy/Manifest
@@ -0,0 +1 @@
+DIST vobcopy-1.2.0.tar.bz2 60102 SHA256 892504d195d06a80ab283db642eb2ccbf9f1dc6ba5ff0fdfcf7a9cb660f48106
diff --git a/media-video/vobcopy/metadata.xml b/media-video/vobcopy/metadata.xml
new file mode 100644
index 000000000000..d9df1878d8e2
--- /dev/null
+++ b/media-video/vobcopy/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>video</herd>
+</pkgmetadata>
diff --git a/media-video/vobcopy/vobcopy-1.2.0.ebuild b/media-video/vobcopy/vobcopy-1.2.0.ebuild
new file mode 100644
index 000000000000..624593f885c1
--- /dev/null
+++ b/media-video/vobcopy/vobcopy-1.2.0.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit toolchain-funcs
+
+IUSE=""
+
+DESCRIPTION="copies DVD .vob files to harddisk, decrypting them on the way"
+HOMEPAGE="http://lpn.rnbhq.org/"
+SRC_URI="http://lpn.rnbhq.org/download/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 sparc x86"
+
+DEPEND=">=media-libs/libdvdread-0.9.4"
+
+src_configure() {
+ tc-export CC
+ ./configure.sh --with-lfs
+}
+
+src_install() {
+ dobin vobcopy || die "dobin failed"
+ doman vobcopy.1 || die "doman failed"
+ dodoc Changelog README Release-Notes TODO alternative_programs.txt \
+ || die "dodoc failed"
+}
diff --git a/media-video/vstrip/Manifest b/media-video/vstrip/Manifest
new file mode 100644
index 000000000000..36f10f24eae4
--- /dev/null
+++ b/media-video/vstrip/Manifest
@@ -0,0 +1 @@
+DIST vStrip_08f.zip 409157 RMD160 ad98ce87a97da98878711d5e14e9e33d270fce8f SHA1 5d8176b1c649188ab428513d0f30d837c8ae25ac SHA256 0813be0b20ab7eeacd7213df7fe1704ef6070471c953a705391d82bba78e8fff
diff --git a/media-video/vstrip/files/vstrip-0.8f-gentoo.patch b/media-video/vstrip/files/vstrip-0.8f-gentoo.patch
new file mode 100644
index 000000000000..77328b091247
--- /dev/null
+++ b/media-video/vstrip/files/vstrip-0.8f-gentoo.patch
@@ -0,0 +1,63 @@
+--- Makefile
++++ Makefile 2003-10-12 02:25:31.000000000 +0000
+@@ -4,7 +4,7 @@
+
+ ### Sources
+
+-SOURCE_FILES=file_io.h file_io.c in_buffer.h in_buffer.c parse_ifo.h parse_ifo.c s_types.h main.c vstrip.h vstrip.c
++SOURCE_FILES=file_io.h file_io.c in_buffer.h in_buffer.c parse_ifo.h parse_ifo.c s_types.h main.c vstrip.h vstrip.c dvd2avi_plugin.c
+
+ ### Objects and executables
+
+@@ -27,8 +27,8 @@
+
+ ### Details
+
+-vstrip : file_io.o in_buffer.o main.o parse_ifo.o vstrip.o
+- $(CC) -g file_io.o in_buffer.o main.o parse_ifo.o vstrip.o -o vstrip
++vstrip : file_io.o in_buffer.o main.o parse_ifo.o vstrip.o dvd2avi_plugin.o
++ $(CC) $(LDFLAGS) file_io.o in_buffer.o main.o parse_ifo.o vstrip.o dvd2avi_plugin.o -o vstrip -lm
+ file_io.o : s_types.h file_io.h file_io.c
+ in_buffer.o : s_types.h file_io.h in_buffer.h in_buffer.c
+ main.o : s_types.h file_io.h vstrip.h main.c
+--- dvd2avi_plugin.c
++++ dvd2avi_plugin.c 2003-10-12 02:29:23.000000000 +0000
+@@ -6,13 +6,17 @@
+
+ *************************************************************************/
+
++#include <string.h>
++#include <stdlib.h>
+ #include <stdio.h>
+-#include <io.h>
++#include <sys/io.h>
+ #include <fcntl.h>
+ #include "s_types.h"
+ #include "vstrip.h"
+ #include "dvd2avi_plugin.h"
+
++#define max(a,b) a < b ? b : a
++
+ bool dvd2avi_process(byte *data, tp_vs_streaminfo const si, void *user_data)
+ {
+ t_dvd2avi* d2v = (t_dvd2avi *)user_data;
+@@ -206,7 +210,7 @@
+ fp = _open(fname, _O_BINARY | _O_RDONLY); // check size
+ if (fp != -1)
+ {
+- __int64 fposition = _filelengthi64(fp);
++ __int64_t fposition = lseek64(fp, 0, SEEK_END);
+
+ lba = (dword)(fposition / fio_SECTOR_SIZE);
+ _close(fp);
+--- file_io.c
++++ file_io.c 2003-10-12 02:24:46.000000000 +0000
+@@ -32,7 +32,7 @@
+ fp = _open(name, _O_BINARY | _O_RDONLY); // check size
+ if (fp != -1)
+ {
+- __int64 fposition = _filelengthi64(fp);
++ __int64_t fposition = lseek64(fp, 0, SEEK_END);
+
+ f->written_to = fposition > 0;
+ if (fposition > 0)
diff --git a/media-video/vstrip/metadata.xml b/media-video/vstrip/metadata.xml
new file mode 100644
index 000000000000..58cae4f48bf3
--- /dev/null
+++ b/media-video/vstrip/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>video</herd>
+<maintainer>
+ <email>media-video@gentoo.org</email>
+</maintainer>
+<longdescription lang="en">
+A program to divide a non encrypted vob by individiual chapters
+</longdescription>
+</pkgmetadata>
+
diff --git a/media-video/vstrip/vstrip-0.8f.ebuild b/media-video/vstrip/vstrip-0.8f.ebuild
new file mode 100644
index 000000000000..ecea22d429b2
--- /dev/null
+++ b/media-video/vstrip/vstrip-0.8f.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="A program to split non-css dvd vobs into individual chapters"
+HOMEPAGE="http://www.maven.de/code"
+SRC_URI="http://files.digital-digest.com/downloads/files/encode/vStrip_${PV/./}.zip"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+DEPEND="app-arch/unzip"
+RDEPEND=""
+
+S="${WORKDIR}/${PN}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+ edos2unix *.c *.h
+
+ for file in *.c *.h ; do
+ echo >>$file
+ done
+}
+
+src_compile() {
+ emake CFLAGS="${CFLAGS} -D__UNIX__" CC="$(tc-getCC)" || die "emake failed."
+}
+
+src_install() {
+ dobin vstrip
+}
diff --git a/media-video/winki/Manifest b/media-video/winki/Manifest
new file mode 100644
index 000000000000..ca593bb08528
--- /dev/null
+++ b/media-video/winki/Manifest
@@ -0,0 +1 @@
+DIST winki-0.4.5.tar.gz 585135 SHA256 e27dc51dc698645a6d609df89da4cdc4815443741c819f4e9e68c93ff4e26666 SHA512 bc5dbc76e28470b1198c590ee49b56afdaa7840ea35ecd3a890d3d591731e3805c2024c51783ff8234d450265dbbf81004799173317030d4efde4b1640cbfa0b WHIRLPOOL cd8ceeaaa69acc367da206bcc9f3dc379fc59a38540e12e5248d3f392341e9fa29a3e2c67a97485c09eceb3af04db8cd529d22bf1e1d97d6166e7fd713b9be0a
diff --git a/media-video/winki/metadata.xml b/media-video/winki/metadata.xml
new file mode 100644
index 000000000000..8de312f6db3f
--- /dev/null
+++ b/media-video/winki/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="mjpeg">Enables mjpegtools support</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-video/winki/winki-0.4.5-r1.ebuild b/media-video/winki/winki-0.4.5-r1.ebuild
new file mode 100644
index 000000000000..3ad128315cf7
--- /dev/null
+++ b/media-video/winki/winki-0.4.5-r1.ebuild
@@ -0,0 +1,34 @@
+# 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="A Python frontend to many popular encoding programs"
+HOMEPAGE="http://www.winki-the-ripper.de/"
+SRC_URI="http://www.winki-the-ripper.de/share/dist/${P}.tar.gz"
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="css dvd matroska mjpeg mp3 ogg vcd"
+DEPEND=">=dev-python/pygtk-2:2[${PYTHON_USEDEP}]
+ >=dev-python/pyorbit-2[${PYTHON_USEDEP}]"
+RDEPEND="${DEPEND}
+ media-video/mplayer[encode]
+ media-video/lsdvd
+ virtual/ffmpeg
+ dvd? ( media-video/dvdauthor )
+ mp3? ( media-sound/lame )
+ ogg? ( media-sound/ogmtools
+ media-sound/vorbis-tools )
+ vcd? ( media-video/vcdimager
+ media-libs/libdvb )
+ mjpeg? ( media-video/mjpegtools )
+ matroska? ( media-video/mkvtoolnix )
+ css? ( media-libs/libdvdcss )"
+
+DOCS="winkirip/README winkirip/CHANGELOG winkirip/TODO winkirip/AUTHORS"
diff --git a/media-video/winki/winki-0.4.5.ebuild b/media-video/winki/winki-0.4.5.ebuild
new file mode 100644
index 000000000000..add1bc2caadc
--- /dev/null
+++ b/media-video/winki/winki-0.4.5.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit distutils
+
+DESCRIPTION="A Python frontend to many popular encoding programs"
+HOMEPAGE="http://www.winki-the-ripper.de/"
+SRC_URI="http://www.winki-the-ripper.de/share/dist/${P}.tar.gz"
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="css dvd matroska mjpeg mp3 ogg vcd"
+DEPEND=">=dev-lang/python-2.3
+ >=dev-python/pygtk-2:2
+ >=dev-python/pyorbit-2"
+RDEPEND="${DEPEND}
+ media-video/mplayer[encode]
+ media-video/lsdvd
+ virtual/ffmpeg
+ dvd? ( media-video/dvdauthor )
+ mp3? ( media-sound/lame )
+ ogg? ( media-sound/ogmtools
+ media-sound/vorbis-tools )
+ vcd? ( media-video/vcdimager
+ media-libs/libdvb )
+ mjpeg? ( media-video/mjpegtools )
+ matroska? ( media-video/mkvtoolnix )
+ css? ( media-libs/libdvdcss )"
+
+DOCS="winkirip/README winkirip/CHANGELOG winkirip/TODO winkirip/AUTHORS"
diff --git a/media-video/x264-encoder/Manifest b/media-video/x264-encoder/Manifest
new file mode 100644
index 000000000000..3d911886ec69
--- /dev/null
+++ b/media-video/x264-encoder/Manifest
@@ -0,0 +1 @@
+DIST x264-snapshot-20140308-2245.tar.bz2 624712 SHA256 b179cb1e1d4f51418d292011a7494d5b62145571c05c22007f28d8fd89d2ebbe SHA512 42dc8183aa7af2bd4c360edc0349193cf69a119450880af0c1586e8f27490d7c6784c464b29c9f07ae972aaf661672ab4f2094a46a3d19b6df35be1f9d9a1629 WHIRLPOOL b1ac3341647d9d8d8ff6177f179ee8b5d6a49a38a48791748c24d5cd3c53858758785a0d21d42fbe373ec74465d947b69526a487da15fbca1a1f9aa50064288c
diff --git a/media-video/x264-encoder/metadata.xml b/media-video/x264-encoder/metadata.xml
new file mode 100644
index 000000000000..83ba4ce14f4d
--- /dev/null
+++ b/media-video/x264-encoder/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="10bit">Set output bit depth to 10</flag>
+ <flag name="avs">enable AvxSynth support in the AviSynth input module</flag>
+ <flag name="ffmpegsource">Enable ffmpegsource aka ffms support, disables lavf</flag>
+ <flag name="interlaced">Enable interlaced encoding support, this can decrease encoding speed by up to 2%</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-video/x264-encoder/x264-encoder-0.0.20140308.ebuild b/media-video/x264-encoder/x264-encoder-0.0.20140308.ebuild
new file mode 100644
index 000000000000..1f30d4e37d9c
--- /dev/null
+++ b/media-video/x264-encoder/x264-encoder-0.0.20140308.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit flag-o-matic multilib toolchain-funcs
+
+DESCRIPTION="A free commandline encoder for X264/AVC streams"
+HOMEPAGE="http://www.videolan.org/developers/x264.html"
+if [[ ${PV} == 9999 ]]; then
+ inherit git-2
+ EGIT_REPO_URI="git://git.videolan.org/x264.git"
+ SRC_URI=""
+else
+ inherit versionator
+ MY_P="x264-snapshot-$(get_version_component_range 3)-2245"
+ SRC_URI="http://download.videolan.org/pub/videolan/x264/snapshots/${MY_P}.tar.bz2"
+ KEYWORDS="~alpha amd64 ~ppc ~ppc64 ~sparc x86 ~x86-fbsd"
+ S="${WORKDIR}/${MY_P}"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="10bit avs custom-cflags ffmpeg ffmpegsource +interlaced mp4 +threads"
+
+REQUIRED_USE="ffmpegsource? ( ffmpeg )"
+
+RDEPEND="ffmpeg? ( virtual/ffmpeg )
+ ~media-libs/x264-${PV}[10bit=,interlaced=,threads=]
+ ffmpegsource? ( media-libs/ffmpegsource )
+ mp4? ( >=media-video/gpac-0.4.1_pre20060122 )"
+
+ASM_DEP=">=dev-lang/yasm-1.2.0"
+DEPEND="${RDEPEND}
+ amd64? ( ${ASM_DEP} )
+ x86? ( ${ASM_DEP} )
+ x86-fbsd? ( ${ASM_DEP} )
+ virtual/pkgconfig"
+
+src_configure() {
+ tc-export CC
+
+ # let upstream pick the optimization level by default
+ use custom-cflags || filter-flags -O?
+
+ ./configure \
+ --prefix="${EPREFIX}"/usr \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --system-libx264 \
+ --host="${CHOST}" \
+ --disable-lsmash \
+ $(usex 10bit "--bit-depth=10" "") \
+ $(usex avs "" "--disable-avs") \
+ $(usex ffmpeg "" "--disable-lavf --disable-swscale") \
+ $(usex ffmpegsource "" "--disable-ffms") \
+ $(usex interlaced "" "--disable-interlaced") \
+ $(usex mp4 "" "--disable-gpac") \
+ $(usex threads "" "--disable-thread") || die
+
+ # this is a nasty workaround for bug #376925 for x264 that also applies
+ # here, needed because as upstream doesn't like us fiddling with their CFLAGS
+ if use custom-cflags; then
+ local cflags
+ cflags="$(grep "^CFLAGS=" config.mak | sed 's/CFLAGS=//')"
+ cflags="${cflags//$(get-flag O)/}"
+ cflags="${cflags//-O? /$(get-flag O) }"
+ cflags="${cflags//-g /}"
+ sed -i "s:^CFLAGS=.*:CFLAGS=${cflags//:/\\:}:" config.mak
+ fi
+}
diff --git a/media-video/x264-encoder/x264-encoder-9999.ebuild b/media-video/x264-encoder/x264-encoder-9999.ebuild
new file mode 100644
index 000000000000..64e7ddc531fc
--- /dev/null
+++ b/media-video/x264-encoder/x264-encoder-9999.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit flag-o-matic multilib toolchain-funcs
+
+DESCRIPTION="A free commandline encoder for X264/AVC streams"
+HOMEPAGE="http://www.videolan.org/developers/x264.html"
+if [[ ${PV} == 9999 ]]; then
+ inherit git-2
+ EGIT_REPO_URI="git://git.videolan.org/x264.git"
+ SRC_URI=""
+else
+ inherit versionator
+ MY_P="x264-snapshot-$(get_version_component_range 3)-2245"
+ SRC_URI="http://download.videolan.org/pub/videolan/x264/snapshots/${MY_P}.tar.bz2"
+ KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+ S="${WORKDIR}/${MY_P}"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="10bit avs custom-cflags ffmpeg ffmpegsource +interlaced mp4 +threads"
+
+REQUIRED_USE="ffmpegsource? ( ffmpeg )"
+
+RDEPEND="ffmpeg? ( virtual/ffmpeg )
+ ~media-libs/x264-${PV}[10bit=,interlaced=,threads=]
+ ffmpegsource? ( media-libs/ffmpegsource )
+ mp4? ( >=media-video/gpac-0.4.1_pre20060122 )"
+
+ASM_DEP=">=dev-lang/yasm-1.2.0"
+DEPEND="${RDEPEND}
+ amd64? ( ${ASM_DEP} )
+ x86? ( ${ASM_DEP} )
+ x86-fbsd? ( ${ASM_DEP} )
+ virtual/pkgconfig"
+
+src_configure() {
+ tc-export CC
+
+ # let upstream pick the optimization level by default
+ use custom-cflags || filter-flags -O?
+
+ ./configure \
+ --prefix="${EPREFIX}"/usr \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --system-libx264 \
+ --host="${CHOST}" \
+ --disable-lsmash \
+ $(usex 10bit "--bit-depth=10" "") \
+ $(usex avs "" "--disable-avs") \
+ $(usex ffmpeg "" "--disable-lavf --disable-swscale") \
+ $(usex ffmpegsource "" "--disable-ffms") \
+ $(usex interlaced "" "--disable-interlaced") \
+ $(usex mp4 "" "--disable-gpac") \
+ $(usex threads "" "--disable-thread") || die
+
+ # this is a nasty workaround for bug #376925 for x264 that also applies
+ # here, needed because as upstream doesn't like us fiddling with their CFLAGS
+ if use custom-cflags; then
+ local cflags
+ cflags="$(grep "^CFLAGS=" config.mak | sed 's/CFLAGS=//')"
+ cflags="${cflags//$(get-flag O)/}"
+ cflags="${cflags//-O? /$(get-flag O) }"
+ cflags="${cflags//-g /}"
+ sed -i "s:^CFLAGS=.*:CFLAGS=${cflags//:/\\:}:" config.mak
+ fi
+}
diff --git a/media-video/xanim-export/Manifest b/media-video/xanim-export/Manifest
new file mode 100644
index 000000000000..9dd160cfd55c
--- /dev/null
+++ b/media-video/xanim-export/Manifest
@@ -0,0 +1,10 @@
+DIST xa1.0_cyuv_linuxELFg21.o.gz 1141 SHA256 9fa40166a40a20734ba1d00990d142a3961c2416e66dac3fe0767e8304aadb1a SHA512 bc60f1a657c48a5aa2dbfd8808f76d9b904c9d745e1e5bd02d9b7a3c701378f5359b2c99e3eb48ca74708477c296b461ec78ce78f1895ca6279a3e750f6bb84f WHIRLPOOL da98f5e12ec449d95ccf6fc858d176844442613bc59d1973e88b9b4bdbe0b27ab8d69c80da60ea9db12013814b4f23391b74a8766f39291670731d8fa796df19
+DIST xa1.0_cyuv_linuxPPC.o.Z 1513 SHA256 35318deacea099d0c05be985c01672f7f306e748965d5bbc8dd454fe8a28c46e SHA512 8659bb119793291e7ce087795cddcdfc6b918e1c169132a6f1ebb1bd36270d57e0dfc84503ec61f90c461496cab688aaac1cb4dbb2a2483f846bea038305733f WHIRLPOOL 0b952b76acf9e12da988f1679f6fa1c7d002008ed4b762e54cdfbb1ae935273e85bde6b5cd338b7d2d89b77f3d01de7a7a31bc7e61396ab1af77cc92877a409a
+DIST xa1.0_cyuv_sparcELF.o.Z 1277 SHA256 f77cc763c9358e86bd5b77675cabf2150b2085d00d54eada0ec86239959a4a08
+DIST xa2.0_cvid_linuxELFg21.o.gz 3689 SHA256 59d7f06388f6461ce69aec7b815b5b76281bad14c7ef13f8fadaa5b848072eb5 SHA512 2375d44713af0fe5c6f3873cefd4e82ad2cdb5c3f2be936966a3d1747f73f15ad37945f2185da116f733eff7bdff989961e2cfc5d715ea9b5045d860aa32f0b4 WHIRLPOOL a115d5fd7ceac5bae8b06538cb1dc92f4e32bea0106780cf523e824b01db6e280239e6bf6def16f50acf59bb41222a640101c779da0414f2c71aa0ba2b83e080
+DIST xa2.0_cvid_linuxPPC.o.Z 5192 SHA256 aa7ea8f934780fa3ea887867811c18023cf7a9740cdfa942648f4fd7d6d996f5 SHA512 12ced02b89c2d8d8981104fe7fe93a95a2fb20607635194852e5ff6044c2def9df18ba1db8f639426fb9015f25e17d3b945170f4e1669a1281e0c8494363fe83 WHIRLPOOL 513b7b93e98f8207197476ade0282cf35cc8667c10a24f7cf73f46d39e465e869ab6563591fd3303d31553869b2a40c1ce7cf3260fb3f5023ab1918effab625e
+DIST xa2.0_cvid_sparcELF.o.Z 4730 SHA256 705511a4eb9a639b7c95a3bb7d6f4f7b1d0ce4a59db2a9cb567bfb3c4a513d02
+DIST xa2.0_iv32_linuxPPC.o.Z 56163 SHA256 d332753ffc6a47c9853a26443e562d3d5aa1cc7a8ac9fad471d3bd2ca0207d3e SHA512 73837266ff178568dd384207443b1236bad7c9867c03c8b45e3894b091780b7f4c2564a993ea4dbeeadc151dfcf87c3a5ecaa3efdc41fa2ab8461151c6aca72f WHIRLPOOL 72430e68df1e825ec48924a6d9845c282d1ded992d95f4487ec248fdd0522e27f90ab1d94077080a3f7ed53b9e1f0decc75f5a2200e732e58efd10743bb6e0b5
+DIST xa2.0_iv32_sparcELF.o.Z 48813 SHA256 86b4613490ac3cadc73524cc433deafebedacbda692ad5f88bcb7c029113ad24
+DIST xa2.1_iv32_linuxELFg21.o.gz 29291 SHA256 41420dca15e5e546c455553b6434435d53de17a08a6307a79de75e753a85b3a1 SHA512 df2a9c534239061da3dab413b6e4e9c127ec4b0a3fd6a8665169bc69e3577b10b7c26c21124e083ece891ac28605ec6f4e407dc2a35ffe54f16101d8cc9be179 WHIRLPOOL ec1c0074006a0b0229b8c1fc1bd777225ea96fdc4b77272ec3b6ffe3569e31c677fa8b175b6263b42904bbb5dd1d2d5c7fcbda262333c2394c993d8a03c379b9
+DIST xanim_exporting_edition.tar.gz 985946 SHA256 8e99b7ee3842fe6e4da43dc27f8c0584a66e6ef7168d30cd37cec64560207c33 SHA512 49d1aa8853f1688097788e2082e209b769f12996dce0fc613453decf22cd48553e2a7a1b08162a49803de1213864f3b42b1d2ab46d3b7242cfb018e8a543a871 WHIRLPOOL 648c6557c35cb3ab55845e86f6abfc6953dba87f14727efc47c36734b0287f0418d265476dccb04fc626a54da635693e241fe5751d9973f49b5b1374dfe1ec49
diff --git a/media-video/xanim-export/files/2.80.1-gentoo.patch b/media-video/xanim-export/files/2.80.1-gentoo.patch
new file mode 100644
index 000000000000..ffd0149a937e
--- /dev/null
+++ b/media-video/xanim-export/files/2.80.1-gentoo.patch
@@ -0,0 +1,88 @@
+Fixing as-needed issues, debundling libquicktime, respect FLAGS
+
+http://bugs.gentoo.org/show_bug.cgi?id=247919
+
+--- Makefile
++++ Makefile
+@@ -72,9 +72,6 @@
+ # a setup problem on my SunOS machine. Under Solaris, gcc worked
+ # fine.
+ #
+-# CC = cc
+- CC = gcc
+-#CC = egcs
+ #
+ ######### OPTIMIZATION FLAGS
+ # -- Specifiy Any compiler Optimization flags that you wish to use. This
+@@ -116,7 +113,7 @@
+ # to link against symbols inside xanim.
+ #
+ ### Linux
+-LD_FLAGS = -rdynamic
++LD_FLAGS = $(LDFLAGS) -rdynamic
+ ### SunOS/Solaris use:
+ # LD_FLAGS =
+
+@@ -133,7 +130,7 @@
+ #
+ XA_DLL_DEF = -DXA_DLL -DXA_PRINT
+ #### Use this only if the above doesn't work.
+-XA_DLL_DEF = -DXA_DLL
++#XA_DLL_DEF = -DXA_DLL
+ #
+ #### You may need this library.
+ XA_DLL_LIB = -ldl
+@@ -141,7 +138,7 @@
+ # If you'd like to change the default directory that XAnim searches while
+ # looking for dlls, then change the directory below.
+ #
+-XA_DLL_PATH = /usr/local/xanim/mods
++XA_DLL_PATH = /usr/lib/xanim/mods-export
+
+
+ ##########################################################################
+@@ -208,9 +205,9 @@
+ # XA_CVID_DEF = -DXA_CVID
+ # XA_CYUV_DEF = -DXA_CYUV
+ #
+-#XA_IV32_LIB = mods/xa2.0_iv32_linuxELF.o
+-#XA_CVID_LIB = mods/xa2.0_cvid_linuxELF.o
+-#XA_CYUV_LIB = mods/xa1.0_cyuv_linuxELF.o
++XA_IV32_LIB = mods/xa2.1_iv32_linuxELFg21.o
++XA_CVID_LIB = mods/xa2.0_cvid_linuxELFg21.o
++XA_CYUV_LIB = mods/xa1.0_cyuv_linuxELFg21.o
+ #
+ ###########################
+ # NOTE: SGI Machines Only:
+@@ -297,16 +294,16 @@
+ # XLIBDIR = -L/usr/openwin/lib
+ #
+ ###-- Linux using X11R6
+-INCLUDE = -I/usr/X11R6/include -I/usr/X11R6/include/X11
+-XLIBDIR = -L/usr/X11R6/lib
++INCLUDE = -I/usr/include -I/usr/include/X11
++XLIBDIR = -L/usr/lib
+ #
+ ###-- My SunOS machine running X11R5
+ # INCLUDE = -I/usr/X11R5/include -I/usr/X11R5/include/X11
+ # XLIBDIR = -L/usr/X11R5/lib -lnsl
+ #
+ ###-- My SunOS machine running X11R6
+-# INCLUDE = -I/usr/X11R6/include -I/usr/X11R6/include/X11
+-# XLIBDIR = -L/usr/X11R6/lib -lnsl
++# INCLUDE = -I/usr/include -I/usr/include/X11
++# XLIBDIR = -L/usr/lib -lnsl
+ #
+ ###-- Win32
+ #-- This depends on where you installed the Cygnus X11 includes and libs.
+@@ -534,8 +531,8 @@
+ #
+
+ XA_DEFS = $(XA_MISC_DEFS) $(XA_MOD_DEFS) $(XA_AUDIO_DEFS) -DXA_PETUNIA -DXA_KPCD -DXA_EXPORT -DXA_EXPORT_QT
+-XA_LIBS = $(XA_X11R6_LIBS) $(XA_MACH_LIBS) $(XA_MOD_LIBS) $(XA_AUDIO_LIBS) -lpthread quicktime/quicktime/libquicktime.a -ljpeg -lpng -lz
+-XA_INCS = $(INCLUDE) $(XA_VIDEO_INCS) $(XA_AUDIO_INCS) -Iquicktime/quicktime
++XA_LIBS = $(XA_X11R6_LIBS) $(XA_MACH_LIBS) $(XA_MOD_LIBS) $(XA_AUDIO_LIBS) -ljpeg -lpng $(shell pkg-config --libs libquicktime)
++XA_INCS = $(INCLUDE) $(XA_VIDEO_INCS) $(XA_AUDIO_INCS) $(shell pkg-config --cflags libquicktime)
+ CFLAGS = $(DEBUG) $(OPTIMIZE)
+
+ #####################################
diff --git a/media-video/xanim-export/files/2.80.1-implicit_funcs.patch b/media-video/xanim-export/files/2.80.1-implicit_funcs.patch
new file mode 100644
index 000000000000..f8fba207b4b2
--- /dev/null
+++ b/media-video/xanim-export/files/2.80.1-implicit_funcs.patch
@@ -0,0 +1,33 @@
+--- xa_g72x.c
++++ xa_g72x.c
+@@ -30,6 +30,7 @@
+ * Common routines for G.721 and G.723 conversions.
+ */
+
++#include <stdlib.h>
+ #include "xa_g72x.h"
+
+ static short power2[15] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80,
+--- xa_export.c
++++ xa_export.c
+@@ -7,7 +7,8 @@
+
+
+
+-
++#include <stdlib.h>
++#include <string.h>
+ #include <stdio.h>
+ #include <signal.h>
+ #include <jpeglib.h>
+--- xa_audio.c
++++ xa_audio.c
+@@ -227,7 +227,7 @@
+ */
+
+ /* TOP */
+-
++#include <sys/ioctl.h>
+ #include "xa_audio.h"
+
+ /* POD note: For opening audio device non-blocking. Should probably set it
diff --git a/media-video/xanim-export/files/2.80.1-makefile.patch b/media-video/xanim-export/files/2.80.1-makefile.patch
new file mode 100644
index 000000000000..d8f6c9721380
--- /dev/null
+++ b/media-video/xanim-export/files/2.80.1-makefile.patch
@@ -0,0 +1,33 @@
+--- a/Makefile 1999-10-28 00:18:23.000000000 -0400
++++ b/Makefile 2001-06-03 05:54:22.000000000 -0400
+@@ -133,7 +135,7 @@
+ #
+ XA_DLL_DEF = -DXA_DLL -DXA_PRINT
+ #### Use this only if the above doesn't work.
+-XA_DLL_DEF = -DXA_DLL
++#XA_DLL_DEF = -DXA_DLL
+ #
+ #### You may need this library.
+ XA_DLL_LIB = -ldl
+@@ -141,7 +143,7 @@
+ # If you'd like to change the default directory that XAnim searches while
+ # looking for dlls, then change the directory below.
+ #
+-XA_DLL_PATH = /usr/local/xanim/mods
++XA_DLL_PATH = /usr/X11R6/lib/xanim/mods-export
+
+
+ ##########################################################################
+@@ -208,9 +210,9 @@
+ # XA_CVID_DEF = -DXA_CVID
+ # XA_CYUV_DEF = -DXA_CYUV
+ #
+-#XA_IV32_LIB = mods/xa2.0_iv32_linuxELF.o
+-#XA_CVID_LIB = mods/xa2.0_cvid_linuxELF.o
+-#XA_CYUV_LIB = mods/xa1.0_cyuv_linuxELF.o
++XA_IV32_LIB = mods/xa2.1_iv32_linuxELFg21.o
++XA_CVID_LIB = mods/xa2.0_cvid_linuxELFg21.o
++XA_CYUV_LIB = mods/xa1.0_cyuv_linuxELFg21.o
+ #
+ ###########################
+ # NOTE: SGI Machines Only:
diff --git a/media-video/xanim-export/metadata.xml b/media-video/xanim-export/metadata.xml
new file mode 100644
index 000000000000..1cadc2e4ec21
--- /dev/null
+++ b/media-video/xanim-export/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>video</herd>
+<maintainer>
+ <email>media-video@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/media-video/xanim-export/xanim-export-2.80.1-r5.ebuild b/media-video/xanim-export/xanim-export-2.80.1-r5.ebuild
new file mode 100644
index 000000000000..a5ef7ef5fa54
--- /dev/null
+++ b/media-video/xanim-export/xanim-export-2.80.1-r5.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit flag-o-matic eutils toolchain-funcs
+
+_XA_CYUV_sparc=xa1.0_cyuv_sparcELF.o
+_XA_CVID_sparc=xa2.0_cvid_sparcELF.o
+_XA_IV32_sparc=xa2.0_iv32_sparcELF.o
+_XA_EXT_sparc=.Z
+
+_XA_CYUV_x86=xa1.0_cyuv_linuxELFg21.o
+_XA_CVID_x86=xa2.0_cvid_linuxELFg21.o
+_XA_IV32_x86=xa2.1_iv32_linuxELFg21.o
+_XA_EXT_x86=.gz
+
+_XA_CYUV_ppc=xa1.0_cyuv_linuxPPC.o
+_XA_CVID_ppc=xa2.0_cvid_linuxPPC.o
+_XA_IV32_ppc=xa2.0_iv32_linuxPPC.o
+_XA_EXT_ppc=.Z
+
+MY_P="xanim_exporting_edition"
+
+# This might leave _XA_EXT empty and that's fine, just indicates no
+# particular support for a given arch
+eval _XA_EXT=\${_XA_EXT_${ARCH}}
+eval _XA_CVID=\${_XA_CVID_${ARCH}}
+eval _XA_CYUV=\${_XA_CYUV_${ARCH}}
+eval _XA_IV32=\${_XA_IV32_${ARCH}}
+
+# Not much we could do here, the modules are predownloaded and
+# xanim-export compiles against them
+QA_EXECSTACK_x86="usr/bin/xanim-export
+ usr/lib/xanim/mods-export/${_XA_CVID}
+ usr/lib/xanim/mods-export/${_XA_CYUV}
+ usr/lib/xanim/mods-export/${_XA_IV32}
+ usr/lib/xanim/mods-export/${_XA_CVID/g21/}
+ usr/lib/xanim/mods-export/${_XA_CYUV/g21/}
+ usr/lib/xanim/mods-export/xa2.0_iv32_linuxELF.o"
+
+DESCRIPTION="XAnim with Quicktime and RAW Audio export functions"
+HOMEPAGE="http://heroin.linuxave.net/toys.html"
+SRC_URI="http://heroine.linuxave.net/${MY_P}.tar.gz
+ sparc? (
+ ftp://xanim.va.pubnix.com/modules/${_XA_CYUV_sparc}${_XA_EXT_sparc}
+ ftp://xanim.va.pubnix.com/modules/${_XA_CVID_sparc}${_XA_EXT_sparc}
+ ftp://xanim.va.pubnix.com/modules/${_XA_IV32_sparc}${_XA_EXT_sparc}
+ )
+ ppc? (
+ ftp://xanim.va.pubnix.com/modules/${_XA_CYUV_ppc}${_XA_EXT_ppc}
+ ftp://xanim.va.pubnix.com/modules/${_XA_CVID_ppc}${_XA_EXT_ppc}
+ ftp://xanim.va.pubnix.com/modules/${_XA_IV32_ppc}${_XA_EXT_ppc}
+ )
+ x86? (
+ ftp://xanim.va.pubnix.com/modules/${_XA_CYUV_x86}${_XA_EXT_x86}
+ ftp://xanim.va.pubnix.com/modules/${_XA_CVID_x86}${_XA_EXT_x86}
+ ftp://xanim.va.pubnix.com/modules/${_XA_IV32_x86}${_XA_EXT_x86}
+ )"
+
+LICENSE="XAnim"
+SLOT="0"
+KEYWORDS="ppc sparc x86"
+IUSE=""
+
+RDEPEND="virtual/jpeg
+ media-libs/libpng
+ x11-libs/libXext
+ x11-libs/libXt
+ media-libs/libquicktime"
+DEPEND="${RDEPEND}
+ app-arch/ncompress
+ x11-proto/xextproto
+ x11-proto/xproto
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+src_unpack() {
+ unpack ${MY_P}.tar.gz
+
+ if [[ -n ${_XA_EXT} ]]; then
+ cd "${S}"/mods || die
+ unpack ${_XA_CVID}${_XA_EXT}
+ unpack ${_XA_CYUV}${_XA_EXT}
+ unpack ${_XA_IV32}${_XA_EXT}
+ fi
+
+ cd "${S}"
+ rm -f xanim
+ epatch "${FILESDIR}"/${PV}-gentoo.patch \
+ "${FILESDIR}"/${PV}-implicit_funcs.patch
+}
+
+src_compile() {
+ tc-export CC
+ make \
+ XA_IV32_LIB=mods/${_XA_CYUV} \
+ XA_CVID_LIB=mods/${_XA_CVID} \
+ XA_CYUV_LIB=mods/${_XA_IV32} \
+ OPTIMIZE="${CFLAGS}" \
+ || die "main make failed"
+}
+
+src_install() {
+ newbin xanim xanim-export
+ insinto /usr/lib/xanim/mods-export
+ doins mods/*
+ dodoc README*
+ dodoc docs/README.* docs/*.readme docs/*.doc
+}
diff --git a/media-video/xanim/Manifest b/media-video/xanim/Manifest
new file mode 100644
index 000000000000..6b412a8ca203
--- /dev/null
+++ b/media-video/xanim/Manifest
@@ -0,0 +1,13 @@
+DIST xa1.0_cyuv_linuxAlpha.o.gz 2053 SHA256 3b0a75581e9e10d7f60a699514ee7bd9dd0271c1ba731d15e90b4bb0c12b7187
+DIST xa1.0_cyuv_linuxELFg21.o.gz 1141 SHA256 9fa40166a40a20734ba1d00990d142a3961c2416e66dac3fe0767e8304aadb1a
+DIST xa1.0_cyuv_linuxPPC.o.Z 1513 SHA256 35318deacea099d0c05be985c01672f7f306e748965d5bbc8dd454fe8a28c46e
+DIST xa1.0_cyuv_sparcELF.o.Z 1277 SHA256 f77cc763c9358e86bd5b77675cabf2150b2085d00d54eada0ec86239959a4a08
+DIST xa2.0_cvid_linuxAlpha.o.gz 5096 SHA256 83efeb14842cd6ee23565e1b8aa7dd637d5de5d7e7cfc25139f4a6b65588ef08
+DIST xa2.0_cvid_linuxELFg21.o.gz 3689 SHA256 59d7f06388f6461ce69aec7b815b5b76281bad14c7ef13f8fadaa5b848072eb5
+DIST xa2.0_cvid_linuxPPC.o.Z 5192 SHA256 aa7ea8f934780fa3ea887867811c18023cf7a9740cdfa942648f4fd7d6d996f5
+DIST xa2.0_cvid_sparcELF.o.Z 4730 SHA256 705511a4eb9a639b7c95a3bb7d6f4f7b1d0ce4a59db2a9cb567bfb3c4a513d02
+DIST xa2.0_iv32_linuxAlpha.o.gz 33172 SHA256 5439471b0f78da3538ef366311c5ad732e415c95095a452b46694b5b68deac15
+DIST xa2.0_iv32_linuxPPC.o.Z 56163 SHA256 d332753ffc6a47c9853a26443e562d3d5aa1cc7a8ac9fad471d3bd2ca0207d3e
+DIST xa2.0_iv32_sparcELF.o.Z 48813 SHA256 86b4613490ac3cadc73524cc433deafebedacbda692ad5f88bcb7c029113ad24
+DIST xa2.1_iv32_linuxELFg21.o.gz 29291 SHA256 41420dca15e5e546c455553b6434435d53de17a08a6307a79de75e753a85b3a1
+DIST xanim2801.tar.gz 441250 SHA256 72031927a70ab782e2b0a69daaef7894b0ec1c2c6c2d65d495aff5f50bbed0a9
diff --git a/media-video/xanim/files/xanim-2.80.1-freebsd.patch b/media-video/xanim/files/xanim-2.80.1-freebsd.patch
new file mode 100644
index 000000000000..c31651a74fbe
--- /dev/null
+++ b/media-video/xanim/files/xanim-2.80.1-freebsd.patch
@@ -0,0 +1,14 @@
+--- xa_audio.h.old Thu Apr 11 08:48:39 2002
++++ xa_audio.h Thu Apr 11 08:49:25 2002
+@@ -139,7 +139,11 @@
+ #define _FILE_DSP "/dev/dsp"
+ #define _FILE_MIXER "/dev/mixer"
+ #ifdef __FreeBSD__
++#if __FreeBSD__ > 3
++#include <sys/soundcard.h>
++#else
+ #include <machine/soundcard.h>
++#endif
+ #else
+ #include <sys/soundcard.h>
+ #endif
diff --git a/media-video/xanim/files/xanim-2.80.1-gcc41.patch b/media-video/xanim/files/xanim-2.80.1-gcc41.patch
new file mode 100644
index 000000000000..3652989c32da
--- /dev/null
+++ b/media-video/xanim/files/xanim-2.80.1-gcc41.patch
@@ -0,0 +1,71 @@
+--- xanim2801/xa_input.c.orig 2006-02-24 23:01:28.000000000 +0900
++++ xanim2801/xa_input.c 2006-02-24 23:07:28.000000000 +0900
+@@ -952,13 +952,6 @@
+ else return(xaFALSE);
+ }
+
+-xaULONG xa_ftp_abort(xin)
+-XA_INPUT xin;
+-{
+- return(xaFALSE);
+-}
+-
+-
+ /************************
+ *
+ *********/
+@@ -1025,28 +1018,28 @@
+ memset(&data,0,sizeof(data));
+ memset(&from,0,sizeof(from));
+ if (gethostname(hostname, sizeof(hostname)) < 0)
+- return(xa_ftp_abort(xin));
++ return(xaFALSE);
+ if ((host= (struct hostent *)gethostbyname(hostname)) == 0)
+- return(xa_ftp_abort(xin));
++ return(xaFALSE);
+ data.sin_family = host->h_addrtype;
+ memcpy( (char *)&data.sin_addr, (char *)host->h_addr_list[0], host->h_length);
+ if ((tmp_sock = socket ( AF_INET , SOCK_STREAM , 0 )) < 0)
+- return(xa_ftp_abort(xin));
++ return(xaFALSE);
+ len = 1;
+ if (setsockopt(tmp_sock, SOL_SOCKET, SO_REUSEADDR,
+ (char *)(&len), sizeof(len)) < 0)
+- { close(tmp_sock); return(xa_ftp_abort(xin)); }
++ { close(tmp_sock); return(xaFALSE); }
+
+ data.sin_port = 0;
+ if ( bind(tmp_sock, (struct sockaddr *)&data, sizeof(data)) < 0 )
+- { close(tmp_sock); return(xa_ftp_abort(xin)); }
++ { close(tmp_sock); return(xaFALSE); }
+
+ len = sizeof(data);
+ if (getsockname(tmp_sock, (struct sockaddr *)&data, &len) < 0 )
+- { close(tmp_sock); return(xa_ftp_abort(xin)); }
++ { close(tmp_sock); return(xaFALSE); }
+
+ if (listen(tmp_sock, 4) < 0 )
+- { close(tmp_sock); return(xa_ftp_abort(xin)); }
++ { close(tmp_sock); return(xaFALSE); }
+
+ /* POD add support for PORT command? */
+ addr = (xaUBYTE *) (&data.sin_addr);
+@@ -1059,15 +1052,15 @@
+
+ if (xa_ftp_send_cmd(xin, port_cmd, &retcode) == xaFALSE)
+ { fprintf(stderr,"FTP: send cmd err\n");
+- close(tmp_sock); return(xa_ftp_abort(xin)); }
++ close(tmp_sock); return(xaFALSE); }
+
+ if (xa_ftp_send_cmd(xin, file_cmd, &retcode) == xaFALSE)
+ { fprintf(stderr,"FTP: send cmd err\n");
+- close(tmp_sock); return(xa_ftp_abort(xin)); }
++ close(tmp_sock); return(xaFALSE); }
+
+ len = sizeof(from);
+ xin->dsock = accept((int)tmp_sock, (struct sockaddr *) &from, (int *)&len);
+- if (xin->dsock < 0) { close(tmp_sock); return(xa_ftp_abort(xin)); }
++ if (xin->dsock < 0) { close(tmp_sock); return(xaFALSE); }
+ close(tmp_sock);
+ return(xaTRUE);
+ }
diff --git a/media-video/xanim/metadata.xml b/media-video/xanim/metadata.xml
new file mode 100644
index 000000000000..1cadc2e4ec21
--- /dev/null
+++ b/media-video/xanim/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>video</herd>
+<maintainer>
+ <email>media-video@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/media-video/xanim/xanim-2.80.1-r4.ebuild b/media-video/xanim/xanim-2.80.1-r4.ebuild
new file mode 100644
index 000000000000..f49e589999be
--- /dev/null
+++ b/media-video/xanim/xanim-2.80.1-r4.ebuild
@@ -0,0 +1,129 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="program for playing a wide variety of animation, audio and video formats"
+HOMEPAGE="http://xanim.polter.net/"
+
+LICENSE="XAnim"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE=""
+
+RDEPEND="x11-libs/libXext
+ x11-libs/libXt
+ >=sys-libs/zlib-1.1.3"
+DEPEND="${RDEPEND}
+ >=sys-apps/sed-4.0.5
+ x11-proto/xextproto"
+
+MY_P=${PN}${PV//.}
+S=${WORKDIR}/${MY_P}
+
+_XA_CYUV_alpha=xa1.0_cyuv_linuxAlpha.o
+_XA_CVID_alpha=xa2.0_cvid_linuxAlpha.o
+_XA_IV32_alpha=xa2.0_iv32_linuxAlpha.o
+_XA_EXT_alpha=.gz
+
+_XA_CYUV_ppc=xa1.0_cyuv_linuxPPC.o
+_XA_CVID_ppc=xa2.0_cvid_linuxPPC.o
+_XA_IV32_ppc=xa2.0_iv32_linuxPPC.o
+_XA_EXT_ppc=.Z
+
+_XA_CYUV_sparc=xa1.0_cyuv_sparcELF.o
+_XA_CVID_sparc=xa2.0_cvid_sparcELF.o
+_XA_IV32_sparc=xa2.0_iv32_sparcELF.o
+_XA_EXT_sparc=.Z
+
+_XA_CYUV_x86=xa1.0_cyuv_linuxELFg21.o
+_XA_CVID_x86=xa2.0_cvid_linuxELFg21.o
+_XA_IV32_x86=xa2.1_iv32_linuxELFg21.o
+_XA_EXT_x86=.gz
+
+_XA_CYUV_x86_fbsd=xa1.0_cyuv_linuxELFg21.o
+_XA_CVID_x86_fbsd=xa2.0_cvid_linuxELFg21.o
+_XA_IV32_x86_fbsd=xa2.1_iv32_linuxELFg21.o
+_XA_EXT_x86_fbsd=.gz
+
+# This might leave _XA_EXT empty and that's fine, just indicates no
+# particular support for a given arch
+MY_ARCH=${ARCH/-/_}
+eval _XA_EXT=\${_XA_EXT_${MY_ARCH}}
+eval _XA_CVID=\${_XA_CVID_${MY_ARCH}}
+eval _XA_CYUV=\${_XA_CYUV_${MY_ARCH}}
+eval _XA_IV32=\${_XA_IV32_${MY_ARCH}}
+
+SRC_URI="mirror://gentoo/${MY_P}.tar.gz
+ sparc? (
+ mirror://gentoo/${_XA_CVID_sparc}${_XA_EXT_sparc}
+ mirror://gentoo/${_XA_CYUV_sparc}${_XA_EXT_sparc}
+ mirror://gentoo/${_XA_IV32_sparc}${_XA_EXT_sparc}
+ )
+ alpha? (
+ mirror://gentoo/${_XA_CVID_alpha}${_XA_EXT_alpha}
+ mirror://gentoo/${_XA_CYUV_alpha}${_XA_EXT_alpha}
+ mirror://gentoo/${_XA_IV32_alpha}${_XA_EXT_alpha}
+ )
+ ppc? (
+ mirror://gentoo/${_XA_CVID_ppc}${_XA_EXT_ppc}
+ mirror://gentoo/${_XA_CYUV_ppc}${_XA_EXT_ppc}
+ mirror://gentoo/${_XA_IV32_ppc}${_XA_EXT_ppc}
+ )
+ x86? (
+ mirror://gentoo/${_XA_CVID_x86}${_XA_EXT_x86}
+ mirror://gentoo/${_XA_CYUV_x86}${_XA_EXT_x86}
+ mirror://gentoo/${_XA_IV32_x86}${_XA_EXT_x86}
+ )
+ x86-fbsd? (
+ mirror://gentoo/${_XA_CVID_x86}${_XA_EXT_x86}
+ mirror://gentoo/${_XA_CYUV_x86}${_XA_EXT_x86}
+ mirror://gentoo/${_XA_IV32_x86}${_XA_EXT_x86}
+ )"
+
+src_unpack() {
+ unpack ${MY_P}.tar.gz
+ if [[ -n ${_XA_EXT} ]]; then
+ mkdir "${S}"/mods || die
+ cd "${S}"/mods || die
+ unpack ${_XA_CVID}${_XA_EXT}
+ unpack ${_XA_CYUV}${_XA_EXT}
+ unpack ${_XA_IV32}${_XA_EXT}
+ fi
+ cd "${S}"
+ sed -i -e 's:/usr/X11R6:/usr:g' Makefile*
+
+ epatch "${FILESDIR}/${P}-gcc41.patch"
+ epatch "${FILESDIR}/${P}-freebsd.patch"
+
+ use elibc_glibc || sed -i -e 's/-ldl//' Makefile*
+}
+
+src_compile() {
+ # Set XA_DLL_PATH even though we statically link the mods, I guess
+ # this provides extensibility
+ emake CC="$(tc-getCC)" OPTIMIZE="${CFLAGS}" LD_FLAGS="${LDFLAGS}" \
+ XA_DLL_DEF="-DXA_DLL -DXA_PRINT" XA_DLL_PATH=/usr/lib/xanim/mods \
+ ${_XA_EXT:+ \
+ XA_IV32_LIB="mods/${_XA_CVID}" \
+ XA_CYUV_LIB="mods/${_XA_CYUV}" \
+ XA_CVID_LIB="mods/${_XA_IV32}" } \
+ || die
+}
+
+src_install() {
+ dobin xanim || die
+ newman docs/xanim.man xanim.1
+ dodoc README
+ dodoc docs/README.* docs/*.readme docs/*.doc
+
+ # I don't know why we're installing these modules when they're
+ # statically linked, but whatever...
+ if [[ -n ${_XA_EXT} ]]; then
+ insinto /usr/lib/xanim/mods
+ doins mods/${_XA_CVID}
+ doins mods/${_XA_CYUV}
+ doins mods/${_XA_IV32}
+ fi
+}
diff --git a/media-video/xine-ui/Manifest b/media-video/xine-ui/Manifest
new file mode 100644
index 000000000000..958bc8bff6b9
--- /dev/null
+++ b/media-video/xine-ui/Manifest
@@ -0,0 +1,3 @@
+DIST xine-ui-0.99.7.tar.xz 1752328 SHA256 9d8cdfd1c5c84251d6978765b059adf57099ff6c447f3e4b59066c8563f66bc4 SHA512 6070d28cb3f5bb816b1f218d07c5e0001e71069dfc6b6c761b95960f095736923a6e83a97dfab88d93688c1029a7c1d30dc4a2327e2c8481b3b06cb7cc837c1f WHIRLPOOL 7b7b87b56029c11d3ea1036420dca09e730370294659cadc0e5937cd36383e84a941f89bd69535566ffc8cd639aa21ea439ba1e82b1f46fa6211ecf7cc4a09f1
+DIST xine-ui-0.99.8.tar.xz 1758372 SHA256 1ac5a9fc8dbf81f12a8677108bf2b623e70d7adbb83b83912b9cdf00bc78b2a7 SHA512 a2d11b0c512b9d485e0bbe418b36fb5fd52fe1a9c68cdb865771fc580b30bff513825f3e24ef85a902669c2c1ea8947512dd9abe4c12fdef94b8852cc8588da3 WHIRLPOOL c7d67f94422dfdbd609b3e2d880134a2e2d414981d229870157c10f5c54928101336f83f70d6c56c8da238fd25933b4490958e379d2d0a64721553f3fd7d6638
+DIST xine-ui-0.99.9.tar.xz 1759568 SHA256 8dd180219f546a7be0a5651370996b95b3a38ec97bf01b57d2bd1cb966e591a2 SHA512 575b20a19c5740ba0336af9dea0a1bc15d23b7471379b9d72aeb585e23f95b336368b96a28d4804726507f059dc431cc3f9adfd8b615b08c0e67b65287c2b6c7 WHIRLPOOL 7bce787c8718e057a33af2ad33efc2ab1ed4358181f2b626e871f79c396b6b900ccf3631a302463f93951199eeae19887fb2c7d4a5eddf137c85664b99424b8a
diff --git a/media-video/xine-ui/files/xine-ui-0.99.8-readline-6.3.patch b/media-video/xine-ui/files/xine-ui-0.99.8-readline-6.3.patch
new file mode 100644
index 000000000000..3799975d0afb
--- /dev/null
+++ b/media-video/xine-ui/files/xine-ui-0.99.8-readline-6.3.patch
@@ -0,0 +1,33 @@
+http://bugs.gentoo.org/show_bug.cgi?id=504208
+
+Fix building with readline >= 6.3 API (see network.c change)
+Fix another crash on exit (see main.c change)
+
+patches/debian-changes from xine-ui_0.99.8-2.debian.tar.xz at http://packages.debian.org/xine-ui
+
+--- src/xitk/main.c
++++ src/xitk/main.c
+@@ -1255,8 +1255,10 @@ static void event_listener(void *user_da
+ gGui->mixer.volume_level = (aevent->left + aevent->right) / 2;
+ if(gGui->mixer.method == SOUND_CARD_MIXER) {
+ gGui->mixer.mute = aevent->mute;
+- xitk_slider_set_pos(panel->mixer.slider, gGui->mixer.volume_level);
+- xitk_checkbox_set_state(panel->mixer.mute, gGui->mixer.mute);
++ if (panel) {
++ xitk_slider_set_pos(panel->mixer.slider, gGui->mixer.volume_level);
++ xitk_checkbox_set_state(panel->mixer.mute, gGui->mixer.mute);
++ }
+ }
+ }
+ break;
+--- src/xitk/network.c
++++ src/xitk/network.c
+@@ -1255,7 +1255,7 @@ int main(int argc, char **argv) {
+ rl_readline_name = PROGNAME;
+ rl_set_prompt(session.prompt);
+ rl_initialize();
+- rl_attempted_completion_function = (CPPFunction *)completion_function;
++ rl_attempted_completion_function = completion_function;
+
+ signal(SIGPIPE, SIG_IGN);
+
diff --git a/media-video/xine-ui/metadata.xml b/media-video/xine-ui/metadata.xml
new file mode 100644
index 000000000000..4f92b9f020b8
--- /dev/null
+++ b/media-video/xine-ui/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="vdr">Enables Video Disk Recorder support</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">xine</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/xine-ui/xine-ui-0.99.7.ebuild b/media-video/xine-ui/xine-ui-0.99.7.ebuild
new file mode 100644
index 000000000000..d411c47b1dff
--- /dev/null
+++ b/media-video/xine-ui/xine-ui-0.99.7.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit fdo-mime gnome2-utils
+
+DESCRIPTION="Xine movie player"
+HOMEPAGE="http://xine.sourceforge.net/"
+SRC_URI="mirror://sourceforge/xine/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 hppa ppc ppc64 x86 ~x86-fbsd"
+IUSE="aalib curl debug libcaca lirc nls readline vdr X xinerama"
+
+RDEPEND="|| ( app-arch/tar app-arch/libarchive )
+ media-libs/libpng:0
+ >=media-libs/xine-lib-1.2[aalib?,libcaca?]
+ virtual/jpeg
+ aalib? ( media-libs/aalib )
+ curl? ( >=net-misc/curl-7.10.2 )
+ libcaca? ( media-libs/libcaca )
+ lirc? ( app-misc/lirc )
+ nls? ( virtual/libintl )
+ readline? ( =sys-libs/readline-6.2* )
+ X? (
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXft
+ x11-libs/libXrender
+ x11-libs/libXScrnSaver
+ x11-libs/libXtst
+ x11-libs/libXv
+ x11-libs/libXxf86vm
+ xinerama? ( x11-libs/libXinerama )
+ )"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )
+ X? (
+ x11-libs/libXt
+ x11-proto/inputproto
+ x11-proto/xf86vidmodeproto
+ xinerama? ( x11-proto/xineramaproto )
+ )
+ virtual/pkgconfig"
+
+src_prepare() {
+ rm -f misc/xine-bugreport
+}
+
+src_configure() {
+ econf \
+ $(use_enable nls) \
+ $(use_enable xinerama) \
+ $(use_enable lirc) \
+ $(use_enable vdr vdr-keys) \
+ --disable-nvtvsimple \
+ $(use_enable debug) \
+ $(use_with X x) \
+ $(use_with readline) \
+ $(use_with curl) \
+ $(use_with aalib) \
+ $(use_with libcaca caca) \
+ --without-fb
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ docdir="/usr/share/doc/${PF}" \
+ docsdir="/usr/share/doc/${PF}" \
+ install
+
+ dodoc AUTHORS ChangeLog NEWS README
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+}
diff --git a/media-video/xine-ui/xine-ui-0.99.8.ebuild b/media-video/xine-ui/xine-ui-0.99.8.ebuild
new file mode 100644
index 000000000000..88071fa01363
--- /dev/null
+++ b/media-video/xine-ui/xine-ui-0.99.8.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils fdo-mime gnome2-utils
+
+DESCRIPTION="Xine movie player"
+HOMEPAGE="http://xine.sourceforge.net/"
+SRC_URI="mirror://sourceforge/xine/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~hppa ~ppc ~ppc64 ~x86 ~x86-fbsd"
+IUSE="aalib curl debug libcaca lirc nls readline vdr X xinerama"
+
+RDEPEND="|| ( app-arch/tar app-arch/libarchive )
+ media-libs/libpng:0=
+ >=media-libs/xine-lib-1.2:=[aalib?,libcaca?]
+ virtual/jpeg:0
+ aalib? ( media-libs/aalib:= )
+ curl? ( >=net-misc/curl-7.10.2:= )
+ libcaca? ( media-libs/libcaca:= )
+ lirc? ( app-misc/lirc:= )
+ nls? ( virtual/libintl )
+ readline? ( >=sys-libs/readline-6.2:= )
+ X? (
+ x11-libs/libICE:=
+ x11-libs/libSM:=
+ x11-libs/libX11:=
+ x11-libs/libXext:=
+ x11-libs/libXft:=
+ x11-libs/libXrender:=
+ x11-libs/libXScrnSaver:=
+ x11-libs/libXtst:=
+ x11-libs/libXv:=
+ x11-libs/libXxf86vm:=
+ xinerama? ( x11-libs/libXinerama:= )
+ )"
+DEPEND="${RDEPEND}
+ nls? ( >=sys-devel/gettext-0.18.3 )
+ X? (
+ x11-libs/libXt
+ x11-proto/inputproto
+ x11-proto/xf86vidmodeproto
+ xinerama? ( x11-proto/xineramaproto )
+ )
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-readline-6.3.patch
+ rm -f misc/xine-bugreport
+}
+
+src_configure() {
+ econf \
+ $(use_enable nls) \
+ $(use_enable xinerama) \
+ $(use_enable lirc) \
+ $(use_enable vdr vdr-keys) \
+ --disable-nvtvsimple \
+ $(use_enable debug) \
+ $(use_with X x) \
+ $(use_with readline) \
+ $(use_with curl) \
+ $(use_with aalib) \
+ $(use_with libcaca caca) \
+ --without-fb
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ docdir="/usr/share/doc/${PF}" \
+ docsdir="/usr/share/doc/${PF}" \
+ install
+ dodoc AUTHORS ChangeLog NEWS README
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+}
diff --git a/media-video/xine-ui/xine-ui-0.99.9.ebuild b/media-video/xine-ui/xine-ui-0.99.9.ebuild
new file mode 100644
index 000000000000..8440263e45b7
--- /dev/null
+++ b/media-video/xine-ui/xine-ui-0.99.9.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit fdo-mime gnome2-utils
+
+DESCRIPTION="Xine movie player"
+HOMEPAGE="http://xine.sourceforge.net/"
+SRC_URI="mirror://sourceforge/xine/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 hppa ppc ppc64 x86 ~x86-fbsd"
+IUSE="aalib curl debug libcaca lirc nls readline vdr X xinerama"
+
+RDEPEND="|| ( app-arch/tar app-arch/libarchive )
+ media-libs/libpng:0=
+ >=media-libs/xine-lib-1.2:=[aalib?,libcaca?]
+ virtual/jpeg:0
+ aalib? ( media-libs/aalib:= )
+ curl? ( >=net-misc/curl-7.10.2:= )
+ libcaca? ( media-libs/libcaca:= )
+ lirc? ( app-misc/lirc:= )
+ nls? ( virtual/libintl )
+ readline? ( >=sys-libs/readline-6.2:= )
+ X? (
+ x11-libs/libICE:=
+ x11-libs/libSM:=
+ x11-libs/libX11:=
+ x11-libs/libXext:=
+ x11-libs/libXft:=
+ x11-libs/libXrender:=
+ x11-libs/libXScrnSaver:=
+ x11-libs/libXtst:=
+ x11-libs/libXv:=
+ x11-libs/libXxf86vm:=
+ xinerama? ( x11-libs/libXinerama:= )
+ )"
+DEPEND="${RDEPEND}
+ nls? ( >=sys-devel/gettext-0.18.3 )
+ X? (
+ x11-libs/libXt
+ x11-proto/inputproto
+ x11-proto/xf86vidmodeproto
+ xinerama? ( x11-proto/xineramaproto )
+ )
+ virtual/pkgconfig"
+
+src_prepare() {
+ rm -f misc/xine-bugreport
+}
+
+src_configure() {
+ econf \
+ $(use_enable nls) \
+ $(use_enable xinerama) \
+ $(use_enable lirc) \
+ $(use_enable vdr vdr-keys) \
+ --disable-nvtvsimple \
+ $(use_enable debug) \
+ $(use_with X x) \
+ $(use_with readline) \
+ $(use_with curl) \
+ $(use_with aalib) \
+ $(use_with libcaca caca) \
+ --without-fb
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ docdir="/usr/share/doc/${PF}" \
+ docsdir="/usr/share/doc/${PF}" \
+ install
+ dodoc AUTHORS ChangeLog NEWS README
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+}
diff --git a/media-video/xvattr/Manifest b/media-video/xvattr/Manifest
new file mode 100644
index 000000000000..1ffa44ab864d
--- /dev/null
+++ b/media-video/xvattr/Manifest
@@ -0,0 +1 @@
+DIST xvattr-1.3.tar.gz 82263 SHA256 1cedc0b4795e6f4234b1d52172f74d7163ecb8142fbb35dc86c905df5478d8fa SHA512 f7b9f9f46961458be6aebfa5c40b28ab0757220ee5a20bcc3b635eaf6912afd7ca2ee9e9d0cfa1894e8ce6c97433e23f78f307fa216d16b5628b8b37202120a0 WHIRLPOOL 91e3f0ce13d7a33bcc909862493165ce74e1b2eba7e9038046f8152166aefbf8e0a1b29883b80d85e599f242a8833317787091a391633fdec7ce9fc7cd427b6e
diff --git a/media-video/xvattr/files/xvattr-1.3-gtk.patch b/media-video/xvattr/files/xvattr-1.3-gtk.patch
new file mode 100644
index 000000000000..579233e38c41
--- /dev/null
+++ b/media-video/xvattr/files/xvattr-1.3-gtk.patch
@@ -0,0 +1,44 @@
+diff -ur xvattr-1.3.orig/configure.in xvattr-1.3/configure.in
+--- xvattr-1.3.orig/configure.in 2002-06-13 22:40:33.000000000 +0300
++++ xvattr-1.3/configure.in 2007-09-04 14:02:56.000000000 +0300
+@@ -17,7 +17,14 @@
+ AC_PATH_XTRA
+
+ dnl check for gtk
+-AM_PATH_GTK
++AC_ARG_WITH(gtk,
++ [--without-gtk Disable GTK support (default: enabled)])
++if test "x$with_gtk" != "xno"; then
++ PKG_CHECK_MODULES(GTK, gtk+-2.0)
++else
++ no_gtk="yes"
++fi
++AM_CONDITIONAL(WITH_GTK, [test "x$no_gtk" != "xyes"])
+
+ dnl Checks for libraries.
+ AC_ARG_WITH(xv-path,[ --with-xv-path=path Where libXv is installed],
+diff -ur xvattr-1.3.orig/Makefile.am xvattr-1.3/Makefile.am
+--- xvattr-1.3.orig/Makefile.am 2002-06-13 22:22:00.000000000 +0300
++++ xvattr-1.3/Makefile.am 2007-09-04 13:58:14.000000000 +0300
+@@ -1,12 +1,19 @@
+ #
+
+-bin_PROGRAMS = xvattr gxvattr
++if WITH_GTK
++gtk_programs = gxvattr
++endif
++
++bin_PROGRAMS = xvattr $(gtk_programs)
++
+ xvattr_SOURCES = xvattr.c
+
+ xvattr_LDADD = $(X_LIBS) $(X_PRE_LIBS) $(X_EXTRA_LIBS) -lX11 -lXext @LIBOBJS@
+
+ gxvattr_SOURCES = gxvattr.c
+-CFLAGS = @GTK_CFLAGS@
++
++gxvattr_CFLAGS = @GTK_CFLAGS@
++
+ gxvattr_LDADD = @GTK_LIBS@ $(X_LIBS) $(X_PRE_LIBS) $(X_EXTRA_LIBS) -lX11 -lXext
+ noinst_HEADERS = getopt.h
+
diff --git a/media-video/xvattr/files/xvattr-1.3-pod-encoding.patch b/media-video/xvattr/files/xvattr-1.3-pod-encoding.patch
new file mode 100644
index 000000000000..29343a240613
--- /dev/null
+++ b/media-video/xvattr/files/xvattr-1.3-pod-encoding.patch
@@ -0,0 +1,11 @@
+diff -ur xvattr-1.3.orig/xvattr.pod.in xvattr-1.3/xvattr.pod.in
+--- xvattr-1.3.orig/xvattr.pod.in 2014-05-18 13:22:59.321022155 +0200
++++ xvattr-1.3/xvattr.pod.in 2014-05-18 13:44:38.286711743 +0200
+@@ -1,5 +1,7 @@
+ =pod
+
++=encoding latin1
++
+ =head1 NAME
+
+ @PACKAGE@ - Query/Set X11 XVideo Setting(s)
diff --git a/media-video/xvattr/metadata.xml b/media-video/xvattr/metadata.xml
new file mode 100644
index 000000000000..edccfe5754d2
--- /dev/null
+++ b/media-video/xvattr/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>video</herd>
+<maintainer>
+<email>media-video@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/media-video/xvattr/xvattr-1.3-r3.ebuild b/media-video/xvattr/xvattr-1.3-r3.ebuild
new file mode 100644
index 000000000000..0f26f9bc0582
--- /dev/null
+++ b/media-video/xvattr/xvattr-1.3-r3.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils autotools
+
+DESCRIPTION="X11 XVideo Querying/Setting Tool from Ogle project"
+HOMEPAGE="http://www.dtek.chalmers.se/groups/dvd"
+SRC_URI="http://www.dtek.chalmers.se/groups/dvd/dist/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT=0
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="gtk"
+
+RDEPEND="x11-libs/libX11
+ x11-libs/libXv
+ x11-libs/libXext
+ gtk? ( x11-libs/gtk+:2 )"
+DEPEND="${RDEPEND}
+ x11-libs/libXt
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gtk.patch
+ epatch "${FILESDIR}"/${P}-pod-encoding.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_with gtk)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed."
+ dodoc AUTHORS ChangeLog NEWS README
+}
diff --git a/media-video/xvid4conf/Manifest b/media-video/xvid4conf/Manifest
new file mode 100644
index 000000000000..0b39835d0b55
--- /dev/null
+++ b/media-video/xvid4conf/Manifest
@@ -0,0 +1 @@
+DIST xvid4conf-1.12.tar.gz 133494 RMD160 76be4da25e92c022834edd4d0a905bf2b811a396 SHA1 b44e9b19bc4190c26992bc7c6a89a0a7960b3bd1 SHA256 0bf08a6c0933c0e41588e2f1367f675d9be92562023d29ecf80956c03f7772b9
diff --git a/media-video/xvid4conf/metadata.xml b/media-video/xvid4conf/metadata.xml
new file mode 100644
index 000000000000..1cadc2e4ec21
--- /dev/null
+++ b/media-video/xvid4conf/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>video</herd>
+<maintainer>
+ <email>media-video@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/media-video/xvid4conf/xvid4conf-1.12.ebuild b/media-video/xvid4conf/xvid4conf-1.12.ebuild
new file mode 100644
index 000000000000..426f5abe5198
--- /dev/null
+++ b/media-video/xvid4conf/xvid4conf-1.12.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+DESCRIPTION="GTK2-configuration dialog for xvid4"
+HOMEPAGE="http://cvs.exit1.org/cgi-bin/viewcvs.cgi/xvid4conf/"
+SRC_URI="mirror://gentoo/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~hppa ia64 ppc ppc64 sparc x86"
+IUSE=""
+
+RDEPEND=">=x11-libs/gtk+-2.2.4:2"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_install() {
+ dodir /usr/{include,lib}
+ einstall || die
+
+ dodoc AUTHORS ChangeLog README
+}
diff --git a/media-video/xvideoservicethief/Manifest b/media-video/xvideoservicethief/Manifest
new file mode 100644
index 000000000000..bb52fd840a1e
--- /dev/null
+++ b/media-video/xvideoservicethief/Manifest
@@ -0,0 +1 @@
+DIST xVST_2_4_1_src.zip 3817619 SHA256 cbd1f24156bdb6e3527b5b4d6823441881462442b9aeeb36098abcf16fbe7a29 SHA512 d0f23c3ac652326d3dd53ef66ba7db0c09ba28f8f7ad0bee864cab057b87d4b171f6076675abe443f738d7c715ec79d507e8d08fd595db3208fc4f9c5548eb2c WHIRLPOOL c19d6fac3a781435de6d4615a02ec00d21069387051ac0bdfda09d668ab70141a115ea1633d7290c3789f2353ddcf308f4372391a20a7689f94dc11df26561d8
diff --git a/media-video/xvideoservicethief/files/xvideoservicethief-2.4.1-gcc47.patch b/media-video/xvideoservicethief/files/xvideoservicethief-2.4.1-gcc47.patch
new file mode 100644
index 000000000000..90ea8a88ba82
--- /dev/null
+++ b/media-video/xvideoservicethief/files/xvideoservicethief-2.4.1-gcc47.patch
@@ -0,0 +1,16 @@
+Index: work/src/qtsingleapplication/src/qtlocalpeer.cpp
+===================================================================
+--- work.orig/src/qtsingleapplication/src/qtlocalpeer.cpp
++++ work/src/qtsingleapplication/src/qtlocalpeer.cpp
+@@ -100,7 +100,11 @@ QtLocalPeer::QtLocalPeer(QObject* parent
+ socketName += QLatin1Char('-') + QString::number(sessionId, 16);
+ }
+ #else
++#if __GNUC__ >= 4 && __GNUC_MINOR__ <=6
+ socketName += QLatin1Char('-') + QString::number(::getuid(), 16);
++#else
++ socketName += QLatin1Char('-') + QString::number(QtLP_Private::getuid(), 16);
++#endif
+ #endif
+
+ server = new QLocalServer(this);
diff --git a/media-video/xvideoservicethief/files/xvideoservicethief-2.4.1-youtube-api.patch b/media-video/xvideoservicethief/files/xvideoservicethief-2.4.1-youtube-api.patch
new file mode 100644
index 000000000000..7bffe12f0d0d
--- /dev/null
+++ b/media-video/xvideoservicethief/files/xvideoservicethief-2.4.1-youtube-api.patch
@@ -0,0 +1,205 @@
+--- trunk/resources/services/youtube/youtube.js 2010/09/02 11:52:07 911
++++ trunk/resources/services/youtube/youtube.js 2012/05/08 17:34:53 975
+@@ -3,7 +3,7 @@
+ * This file is part of xVideoServiceThief,
+ * an open-source cross-platform Video service download
+ *
+-* Copyright (C) 2007 - 2010 Xesc & Technology
++* Copyright (C) 2007 - 2012 Xesc & Technology
+ *
+ * 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
+@@ -25,9 +25,9 @@
+
+ function RegistVideoService()
+ {
+- this.version = "2.1.5";
++ this.version = "3.0.6";
+ this.minVersion = "2.0.0a";
+- this.author = "Xesc & Technology 2009";
++ this.author = "Xesc & Technology 2012";
+ this.website = "http://www.youtube.com/";
+ this.ID = "youtube.com";
+ this.caption = "YouTube";
+@@ -38,7 +38,6 @@
+ function getVideoInformation(url)
+ {
+ const URL_YOUTBE = "http://www.youtube.com/watch?v=%1";
+- const HD_VIDEO_RES = "22";
+ // init result
+ var result = new VideoDefinition();
+ // default URL
+@@ -52,35 +51,112 @@
+ embededID = strRemove(embededID, 0, embededID.lastIndexOf("/v/") + 3);
+ youTubeURL = strFormat(URL_YOUTBE, embededID);
+ }
++ // cehck if is an embeded video (v2)
++ else if (youTubeURL.toString().indexOf("/embed/") != -1)
++ {
++ var embededID = copyBetween(youTubeURL + "?", "/embed/", "?");
++ youTubeURL = strFormat(URL_YOUTBE, embededID);
++ }
+ // download webpage
+ var http = new Http();
+ var html = http.downloadWebpage(youTubeURL);
++ // get cookies
++ result.cookies = http.getCookies("|");
+ // get the video title
+ result.title = copyBetween(html, "<title>", "</title>");
+ result.title = normalizeSpaces(result.title);
++ result.title = strReplace(result.title, "\n", "");
++ result.title = strReplace(result.title, " - YouTube", "");
+ // check if this video need a login
+- result.needLogin = result.title == "Broadcast Yourself.";
++ result.needLogin = strIndexOf(html, 'id="verify-details"') != -1;
+ // if we can continue (no loggin needed)
+ if (result.needLogin) return result;
+- // get the video info block
+- var dirtyUrl = copyBetween(html, "fmt_stream_map=", "34%7Chttp");
+- // we have an empty "dirtyUrl"?? if yes then we give it a second try
+- if (dirtyUrl == "") dirtyUrl = copyBetween(html, "fmt_url_map=", "&") + "&";
+- // get the video resolution
+- var vidRes = getToken(dirtyUrl, "%7C", 0);
+- // check if is a HD_VIDEO_RES (for HD videos the extension is mp4)
+- if (vidRes == HD_VIDEO_RES) result.extension = ".mp4";
+- // get the video url
+- result.URL = getToken(dirtyUrl, "%7C", 1);
+- // convert the hex codes to ascii
+- result.URL = cleanUrl(result.URL);
+- // remove the last "," and replace it with an "&" (if is needed)
+- if (strLastIndexOf(result.URL, "&") < strLastIndexOf(result.URL, ","))
+- result.URL = strRemove(result.URL, strLastIndexOf(result.URL, ","), result.URL.toString().length) + "&";
++ // get the video URL and extension
++ var videoInfo = getVideoUrlAndExtension(html);
++ result.URL = videoInfo.url;
++ result.extension = videoInfo.extension;
+ // return the video information
+ return result;
+ }
+
++function getVideoUrlAndExtension(html)
++{
++ // init result
++ var result = { url:null, extension:null };
++ // get the flashVars value
++ var flashVars = "?" + copyBetween(html, 'flashvars=\\"', '\\"');
++ // convert each "&amp;" into "&"
++ flashVars = strReplace(flashVars, "\\u0026amp;", "&");
++ // get an array with all fmt_stream_map values
++ var fmt_stream_map_arr = splitString(getUrlParam(flashVars, "url_encoded_fmt_stream_map"), "url%3D", false);
++ // default selected video quality
++ var selectedFormat = -1;
++ // detect the better quality
++ for (var n = 0; n < fmt_stream_map_arr.length && selectedFormat == -1; n++)
++ {
++ fmt_stream_map_arr[n] = "?url=" + cleanUrl(fmt_stream_map_arr[n]).toString();
++ // remove the last "," (if exists)
++ if (strLastIndexOf(fmt_stream_map_arr[n], ",") == fmt_stream_map_arr[n].toString().length - 1)
++ fmt_stream_map_arr[n] = strRemove(fmt_stream_map_arr[n], fmt_stream_map_arr[n].toString().length - 1, 1);
++ // check video type
++ var vtype = getToken(getUrlParam(fmt_stream_map_arr[n], "type"), ";", 0);
++ // is known format?
++ if (vtype == "video/x-flv" || vtype == "video/mp4")
++ {
++ selectedFormat = n;
++ // configure video extension
++ result.extension = extensionFromVideoType(vtype);
++ }
++ }
++ // no format selected?
++ if (selectedFormat == -1) selectedFormat = 0;
++ // get the host url
++ var urlHost = getToken(fmt_stream_map_arr[selectedFormat], "?", 1);
++ urlHost = strReplace(urlHost, "url=", "");
++ // leave only the parameters
++ fmt_stream_map_arr[selectedFormat] = getToken(fmt_stream_map_arr[selectedFormat], "?", 2);
++ // get url parts
++ var urlParts = splitString(fmt_stream_map_arr[selectedFormat], "&", false);
++ // set the url host
++ result.url = urlHost + "?";
++ // build the initial url
++ for (var n = 0; n < urlParts.length; n++)
++ {
++ var pname = getToken(urlParts[n], "=", 0).toString();
++ var pvalue = getToken(urlParts[n], "=", 1).toString();
++ var duplicatedPname = strIndexOf(result.url, pname + "=") != -1;
++ // is an excluded param?
++ if (!duplicatedPname && pname != "fexp" && pname != "quality" && pname != "fallback_host" && pname != "type")
++ result.url += pname + "=" + pvalue + "&";
++ }
++ // remove the last &
++ if (strLastIndexOf(result.url, "&") == result.url.length - 1)
++ urlInitial = strRemove(result.url, result.url.length - 1, 1);
++ // get extra (optional) params
++ var ptchn = getUrlParam(flashVars, "ptchn");
++ if (ptchn != "") result.url += "ptchn=" + ptchn + "&";
++ var ptk = getUrlParam(flashVars, "ptk");
++ if (ptk != "") result.url += "ptk=" + ptk;
++ // configure the video extension (if is not yet configured)
++ if (!result.extension)
++ {
++ var vtype = getToken(getUrlParam(fmt_stream_map_arr[selectedFormat], "type"), ";", 0);
++ // configure video extension
++ result.extension = extensionFromVideoType(vtype);
++ }
++ // return
++ return result;
++}
++
++function extensionFromVideoType(vtype)
++{
++ if (vtype == "video/x-flv") return ".flv";
++ if (vtype == "video/mp4") return ".mp4";
++ if (vtype == "video/webm") return ".webm";
++ // default extension
++ return ".flv";
++}
++
+ /*
+ This function "normalizeSpaces(str)" will be deprecated on next xVST version
+ and replaced with the new "simplifyString(str)" function (added in xVST 2.3.1)
+@@ -99,9 +175,11 @@
+ function searchVideos(keyWord, pageIndex)
+ {
+ const URL_SEARCH = "http://www.youtube.com/results?search_query=%1&page=%2&hl=%3";
+- const HTML_SEARCH_START = "<!-- start search results -->";
+- const HTML_SEARCH_FINISH = "<!-- end search results -->";
+- const HTML_SEARCH_SEPARATOR = '<div class="video-entry">';
++ const HTML_SEARCH_START = '<div id="search-results">';
++ const HTML_SEARCH_FINISH = '<div id="search-pva-content">';
++ const HTML_SEARCH_SEPARATOR = '<div class="thumb-container">';
++ const HTML_SEARCH_SUMMARY_START = '<p class="num-results">';
++ const HTML_SEARCH_SUMMARY_END = '</p>';
+ // replace all spaces for "+"
+ keyWord = strReplace(keyWord, " ", "+");
+ // init search results object
+@@ -110,7 +188,7 @@
+ var http = new Http();
+ var html = http.downloadWebpage(strFormat(URL_SEARCH, keyWord, pageIndex, searchResults.getUserLanguage()));
+ // get the search summary
+- var summary = copyBetween(html, '<div id="search-num-results" class="name">', '</div>');
++ var summary = copyBetween(html, HTML_SEARCH_SUMMARY_START, HTML_SEARCH_SUMMARY_END);
+ searchResults.setSummary(cleanSummary(summary));
+ // get results html block
+ var htmlResults = copyBetween(html, HTML_SEARCH_START, HTML_SEARCH_FINISH);
+@@ -148,14 +226,17 @@
+ var tmp, videoUrl, imageUrl, title, description, duration, rating;
+ // get video url
+ videoUrl = VIDEO_URL + copyBetween(html, 'href="', '"');
+- // get title and image url
++ // get image url
+ tmp = copyBetween(html, '<img', '>') ;
+- title = copyBetween(tmp, 'title="', '"');
+ imageUrl = copyBetween(tmp, 'src="', '"');
+ if (strIndexOf(imageUrl, "default.jpg") == -1) // if is not a "default.jpg"...
+ imageUrl = copyBetween(tmp, 'thumb="', '"');
++ imageUrl = "http:" + imageUrl;
++ // get video title
++ title = copyBetween(html, 'dir="ltr" title="', '"');
+ // get video description
+- description = copyBetween(html, 'class="video-description">', '</div>');
++ description = copyBetween(html, '<p id="video-description-', '</p>');
++ description = copyBetween(description + '|', '>', '|');
+ // get video duration
+ duration = convertToSeconds(copyBetween(html, '<span class="video-time">', '</span>'));
+ // get rating
diff --git a/media-video/xvideoservicethief/metadata.xml b/media-video/xvideoservicethief/metadata.xml
new file mode 100644
index 000000000000..ab398e0b55c2
--- /dev/null
+++ b/media-video/xvideoservicethief/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>video</herd>
+ <herd>qt</herd>
+ <maintainer>
+ <email>hwoarang@gentoo.org</email>
+ <name>Markos Chandras</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">xviservicethief</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/xvideoservicethief/xvideoservicethief-2.4.1-r2.ebuild b/media-video/xvideoservicethief/xvideoservicethief-2.4.1-r2.ebuild
new file mode 100644
index 000000000000..c153bc9c62d1
--- /dev/null
+++ b/media-video/xvideoservicethief/xvideoservicethief-2.4.1-r2.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+LANGS="br ca cs da de es fr gl hu it ja ko nl pl ro ru sv"
+
+inherit eutils qt4-r2 versionator
+
+MY_PV=$(replace_all_version_separators '_')
+MY_P="xVST_${MY_PV}_src"
+
+DESCRIPTION="Download (and convert) videos from various Web Video Services"
+HOMEPAGE="http://xviservicethief.sourceforge.net/"
+SRC_URI="mirror://sourceforge/xviservicethief/${MY_P}.zip"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug doc"
+
+DEPEND="app-arch/unzip
+ >=dev-qt/qtgui-4.5.3:4
+ >=dev-qt/qtwebkit-4.5.3:4
+ doc? ( app-doc/doxygen )"
+RDEPEND=">=dev-qt/qtgui-4.5.3:4
+ virtual/ffmpeg
+ media-video/flvstreamer"
+
+RES_NAME="xVST"
+
+S="${WORKDIR}"
+
+src_prepare() {
+ # fix translations
+ mv "${S}"/resources/translations/${RES_NAME}_cz.ts \
+ "${S}"/resources/translations/${RES_NAME}_cs.ts ||die
+ mv "${S}"/resources/translations/${RES_NAME}_jp.ts \
+ "${S}"/resources/translations/${RES_NAME}_ja.ts || die
+ mv "${S}"/resources/translations/${RES_NAME}_du.ts \
+ "${S}"/resources/translations/${RES_NAME}_nl.ts || die
+ mv "${S}"/resources/translations/${RES_NAME}_kr.ts \
+ "${S}"/resources/translations/${RES_NAME}_ko.ts || die
+ # fix plugins, language path
+ sed -i -e "s/getApplicationPath()\ +\ \"/\"\/usr\/share\/${PN}/g" \
+ "${S}"/src/options.cpp || die "failed to fix paths"
+ epatch "${FILESDIR}"/${P}-youtube-api.patch
+ # bug 427066
+ epatch "${FILESDIR}"/${P}-gcc47.patch
+}
+
+src_compile() {
+ local lang=
+ emake || die "emake failed"
+ for lang in "${S}"/resources/translations/*.ts; do
+ lrelease ${lang}
+ done
+}
+
+src_install() {
+ dobin bin/xvst || die "dobin failed"
+ local dest=/usr/share/${PN}/plugins
+ dodir ${dest}
+ find resources/services -name '*.js' -exec cp -dpR {} "${D}"${dest} \;
+ newicon resources/images/InformationLogo.png xvst.png
+ make_desktop_entry /usr/bin/xvst xVideoServiceThief xvst 'Qt;AudioVideo;Video'
+ if use doc; then
+ cd "${S}/documentation/source"
+ sed -i "/OUTPUT_DIRECTORY/s:G\:.*:docs:" Doxyfile
+ doxygen Doxyfile
+ dohtml -r docs/html/* || die "dohtml failed"
+ fi
+
+ #install translations
+ insinto /usr/share/${PN}/languages/
+ local lang= tlang=
+ for lang in ${LINGUAS}; do
+ for tlang in ${LANGS}; do
+ [[ ${lang} == ${tlang} ]] && doins "${S}"/resources/translations/xVST_${tlang}.qm
+ done
+ done
+}