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-libs
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-libs')
-rw-r--r--media-libs/FusionSound/FusionSound-1.1.1-r1.ebuild73
-rw-r--r--media-libs/FusionSound/Manifest1
-rw-r--r--media-libs/FusionSound/files/FusionSound-1.1.1-ffmpeg-0.10.patch126
-rw-r--r--media-libs/FusionSound/files/FusionSound-1.1.1-ffmpeg-0.6.90.patch11
-rw-r--r--media-libs/FusionSound/files/FusionSound-1.1.1-ffmpeg.patch43
-rw-r--r--media-libs/FusionSound/files/FusionSound-1.1.1-ffmpeg2.patch31
-rw-r--r--media-libs/FusionSound/files/FusionSound-1.1.1-gcc43.patch40
-rw-r--r--media-libs/FusionSound/files/FusionSound-1.1.1-libav-0.8.1.patch11
-rw-r--r--media-libs/FusionSound/files/FusionSound-1.1.1-libav-9.patch21
-rw-r--r--media-libs/FusionSound/files/FusionSound-1.1.1-libavformat54.patch31
-rw-r--r--media-libs/FusionSound/files/FusionSound-1.1.1-segfault.patch24
-rw-r--r--media-libs/FusionSound/metadata.xml9
-rw-r--r--media-libs/SoQt/Manifest1
-rw-r--r--media-libs/SoQt/SoQt-1.5.0-r1.ebuild58
-rw-r--r--media-libs/SoQt/files/SoQt-1.4.1-gcc44.patch22
-rw-r--r--media-libs/SoQt/files/SoQt-1.5.0-pkgconfig-partial.patch13
-rw-r--r--media-libs/SoQt/metadata.xml7
-rw-r--r--media-libs/SoXt/Manifest1
-rw-r--r--media-libs/SoXt/SoXt-1.3.0.ebuild52
-rw-r--r--media-libs/SoXt/files/SoXt-1.3.0-pkgconfig-partial.patch12
-rw-r--r--media-libs/SoXt/metadata.xml15
-rw-r--r--media-libs/a52dec/Manifest1
-rw-r--r--media-libs/a52dec/a52dec-0.7.4-r6.ebuild60
-rw-r--r--media-libs/a52dec/a52dec-0.7.4-r7.ebuild63
-rw-r--r--media-libs/a52dec/files/a52dec-0.7.4-build.patch27
-rw-r--r--media-libs/a52dec/files/a52dec-0.7.4-freebsd.patch11
-rw-r--r--media-libs/a52dec/files/a52dec-0.7.4-test-hidden-symbols.patch19
-rw-r--r--media-libs/a52dec/files/a52dec-0.7.4-tests-optional.patch10
-rw-r--r--media-libs/a52dec/metadata.xml8
-rw-r--r--media-libs/aalib/Manifest1
-rw-r--r--media-libs/aalib/aalib-1.4_rc5-r6.ebuild67
-rw-r--r--media-libs/aalib/files/aalib-1.4_rc4-gentoo.patch35
-rw-r--r--media-libs/aalib/files/aalib-1.4_rc4-m4.patch9
-rw-r--r--media-libs/aalib/files/aalib-1.4_rc5-fix-aarender.patch34
-rw-r--r--media-libs/aalib/files/aalib-1.4_rc5-fix-protos.patch56
-rw-r--r--media-libs/aalib/files/aalib-1.4_rc5-tinfo.patch19
-rw-r--r--media-libs/aalib/metadata.xml15
-rw-r--r--media-libs/adplug/Manifest1
-rw-r--r--media-libs/adplug/adplug-2.2.1.ebuild31
-rw-r--r--media-libs/adplug/metadata.xml8
-rw-r--r--media-libs/aften/Manifest1
-rw-r--r--media-libs/aften/aften-0.0.8.ebuild34
-rw-r--r--media-libs/aften/files/aften-0.0.8-multilib.patch13
-rw-r--r--media-libs/aften/files/aften-0.0.8-ppc.patch97
-rw-r--r--media-libs/aften/metadata.xml13
-rw-r--r--media-libs/aldumb/Manifest1
-rw-r--r--media-libs/aldumb/aldumb-0.9.3.ebuild48
-rw-r--r--media-libs/aldumb/files/aldumb-0.9.3-PIC-as-needed.patch72
-rw-r--r--media-libs/aldumb/files/aldumb-0.9.3_CVE-2006-3668.patch16
-rw-r--r--media-libs/aldumb/metadata.xml8
-rw-r--r--media-libs/allegro/Manifest3
-rw-r--r--media-libs/allegro/allegro-4.4.2-r1.ebuild114
-rw-r--r--media-libs/allegro/allegro-5.0.11.ebuild76
-rw-r--r--media-libs/allegro/allegro-5.0.8-r1.ebuild76
-rw-r--r--media-libs/allegro/files/allegro-4.4.2-gentoo.patch16
-rw-r--r--media-libs/allegro/files/allegro-4.4.2-rpath.patch8
-rw-r--r--media-libs/allegro/files/allegro-4.4.2-shared.patch11
-rw-r--r--media-libs/allegro/files/allegro-4.4.2-underlink.patch11
-rw-r--r--media-libs/allegro/files/allegro-5.0.4-underlink.patch11
-rw-r--r--media-libs/allegro/metadata.xml22
-rw-r--r--media-libs/alsa-lib/Manifest3
-rw-r--r--media-libs/alsa-lib/alsa-lib-1.0.27.2.ebuild85
-rw-r--r--media-libs/alsa-lib/alsa-lib-1.0.28.ebuild87
-rw-r--r--media-libs/alsa-lib/alsa-lib-1.0.29.ebuild87
-rw-r--r--media-libs/alsa-lib/metadata.xml14
-rw-r--r--media-libs/alsa-oss/Manifest2
-rw-r--r--media-libs/alsa-oss/alsa-oss-1.0.25-r1.ebuild43
-rw-r--r--media-libs/alsa-oss/alsa-oss-1.0.25.ebuild38
-rw-r--r--media-libs/alsa-oss/alsa-oss-1.0.28.ebuild42
-rw-r--r--media-libs/alsa-oss/files/alsa-oss-1.0.12-hardened.patch13
-rw-r--r--media-libs/alsa-oss/metadata.xml8
-rw-r--r--media-libs/alure/Manifest1
-rw-r--r--media-libs/alure/alure-1.2.ebuild45
-rw-r--r--media-libs/alure/metadata.xml9
-rw-r--r--media-libs/assimp/Manifest2
-rw-r--r--media-libs/assimp/assimp-3.0.1270.ebuild36
-rw-r--r--media-libs/assimp/assimp-3.1.1.ebuild39
-rw-r--r--media-libs/assimp/metadata.xml15
-rw-r--r--media-libs/atlas-c++/Manifest1
-rw-r--r--media-libs/atlas-c++/atlas-c++-0.6.3.ebuild42
-rw-r--r--media-libs/atlas-c++/files/atlas-c++-0.6.1-as-needed.patch63
-rw-r--r--media-libs/atlas-c++/files/atlas-c++-0.6.1-gcc-4.3.patch30
-rw-r--r--media-libs/atlas-c++/files/atlas-c++-0.6.1-gcc-4.4.patch10
-rw-r--r--media-libs/atlas-c++/files/atlas-c++-0.6.1-strict-aliasing.patch16
-rw-r--r--media-libs/atlas-c++/files/atlas-c++-0.6.2-Werror.patch15
-rw-r--r--media-libs/atlas-c++/files/atlas-c++-0.6.3-Werror.patch15
-rw-r--r--media-libs/atlas-c++/metadata.xml15
-rw-r--r--media-libs/aubio/Manifest3
-rw-r--r--media-libs/aubio/aubio-0.3.2-r2.ebuild96
-rw-r--r--media-libs/aubio/aubio-0.4.0-r1.ebuild104
-rw-r--r--media-libs/aubio/aubio-0.4.1.ebuild104
-rw-r--r--media-libs/aubio/files/aubio-0.3.2-multilib.patch11
-rw-r--r--media-libs/aubio/files/aubio-0.3.2-numarray-gnuplot.patch332
-rw-r--r--media-libs/aubio/metadata.xml8
-rw-r--r--media-libs/audiofile/Manifest2
-rw-r--r--media-libs/audiofile/audiofile-0.3.5.ebuild45
-rw-r--r--media-libs/audiofile/audiofile-0.3.6-r1.ebuild41
-rw-r--r--media-libs/audiofile/files/audiofile-0.3.5-system-gtest.patch94
-rw-r--r--media-libs/audiofile/files/audiofile-0.3.6-system-gtest.patch106
-rw-r--r--media-libs/audiofile/metadata.xml6
-rw-r--r--media-libs/avidemux-core/Manifest6
-rw-r--r--media-libs/avidemux-core/avidemux-core-2.6.2-r1.ebuild117
-rw-r--r--media-libs/avidemux-core/avidemux-core-2.6.3.ebuild100
-rw-r--r--media-libs/avidemux-core/avidemux-core-2.6.4.ebuild99
-rw-r--r--media-libs/avidemux-core/avidemux-core-2.6.5.ebuild111
-rw-r--r--media-libs/avidemux-core/avidemux-core-2.6.7.ebuild111
-rw-r--r--media-libs/avidemux-core/avidemux-core-2.6.8.ebuild111
-rw-r--r--media-libs/avidemux-core/avidemux-core-9999.ebuild112
-rw-r--r--media-libs/avidemux-core/metadata.xml13
-rw-r--r--media-libs/avidemux-plugins/Manifest6
-rw-r--r--media-libs/avidemux-plugins/avidemux-plugins-2.6.2-r2.ebuild93
-rw-r--r--media-libs/avidemux-plugins/avidemux-plugins-2.6.3.ebuild126
-rw-r--r--media-libs/avidemux-plugins/avidemux-plugins-2.6.4-r1.ebuild141
-rw-r--r--media-libs/avidemux-plugins/avidemux-plugins-2.6.4.ebuild126
-rw-r--r--media-libs/avidemux-plugins/avidemux-plugins-2.6.5-r1.ebuild143
-rw-r--r--media-libs/avidemux-plugins/avidemux-plugins-2.6.5.ebuild143
-rw-r--r--media-libs/avidemux-plugins/avidemux-plugins-2.6.7.ebuild145
-rw-r--r--media-libs/avidemux-plugins/avidemux-plugins-2.6.8.ebuild145
-rw-r--r--media-libs/avidemux-plugins/avidemux-plugins-9999.ebuild145
-rw-r--r--media-libs/avidemux-plugins/files/avidemux-plugins-2.6.4-optional-pulse.patch21
-rw-r--r--media-libs/avidemux-plugins/metadata.xml17
-rw-r--r--media-libs/babl/Manifest2
-rw-r--r--media-libs/babl/babl-0.1.10-r1.ebuild65
-rw-r--r--media-libs/babl/babl-0.1.12.ebuild54
-rw-r--r--media-libs/babl/babl-9999.ebuild54
-rw-r--r--media-libs/babl/files/babl-0.1.10-clang.patch50
-rw-r--r--media-libs/babl/files/babl-0.1.10-g-ir-compiler-crash.patch12
-rw-r--r--media-libs/babl/files/babl-0.1.10-introspection.patch25
-rw-r--r--media-libs/babl/metadata.xml7
-rw-r--r--media-libs/bio2jack/Manifest1
-rw-r--r--media-libs/bio2jack/bio2jack-0.9-r1.ebuild44
-rw-r--r--media-libs/bio2jack/metadata.xml8
-rw-r--r--media-libs/blib/Manifest1
-rw-r--r--media-libs/blib/blib-1.1.7-r1.ebuild42
-rw-r--r--media-libs/blib/metadata.xml8
-rw-r--r--media-libs/cal3d/Manifest1
-rw-r--r--media-libs/cal3d/cal3d-0.11.0-r1.ebuild57
-rw-r--r--media-libs/cal3d/files/cal3d-0.11.0-gcc43.patch10
-rw-r--r--media-libs/cal3d/files/cal3d-0.11.0-tests.patch11
-rw-r--r--media-libs/cal3d/files/cal3d-0.11.0-verbose.patch11
-rw-r--r--media-libs/cal3d/metadata.xml11
-rw-r--r--media-libs/ccaudio2/Manifest1
-rw-r--r--media-libs/ccaudio2/ccaudio2-2.1.3.ebuild40
-rw-r--r--media-libs/ccaudio2/files/disable_gsm_automagic.patch25
-rw-r--r--media-libs/ccaudio2/metadata.xml13
-rw-r--r--media-libs/celt/Manifest2
-rw-r--r--media-libs/celt/celt-0.11.1-r1.ebuild35
-rw-r--r--media-libs/celt/celt-0.5.1.3.ebuild30
-rw-r--r--media-libs/celt/metadata.xml12
-rw-r--r--media-libs/chromaprint/Manifest4
-rw-r--r--media-libs/chromaprint/chromaprint-0.6.ebuild45
-rw-r--r--media-libs/chromaprint/chromaprint-0.7.ebuild52
-rw-r--r--media-libs/chromaprint/chromaprint-1.1.ebuild56
-rw-r--r--media-libs/chromaprint/chromaprint-1.2.ebuild48
-rw-r--r--media-libs/chromaprint/files/chromaprint-0.7-boost.patch8
-rw-r--r--media-libs/chromaprint/files/chromaprint-0.7-ffmpeg.patch43
-rw-r--r--media-libs/chromaprint/files/chromaprint-0.7-libav9.patch44
-rw-r--r--media-libs/chromaprint/files/chromaprint-1.0-libav9.patch11
-rw-r--r--media-libs/chromaprint/files/chromaprint-1.1-ffmpeg2.patch13
-rw-r--r--media-libs/chromaprint/files/chromaprint-1.1-gtest.patch104
-rw-r--r--media-libs/chromaprint/files/chromaprint-1.1-libav_build_fix_for_tools.patch59
-rw-r--r--media-libs/chromaprint/metadata.xml8
-rw-r--r--media-libs/cimg/Manifest1
-rw-r--r--media-libs/cimg/cimg-1.5.2.ebuild25
-rw-r--r--media-libs/cimg/metadata.xml9
-rw-r--r--media-libs/clutter-gst/Manifest3
-rw-r--r--media-libs/clutter-gst/clutter-gst-2.0.16.ebuild78
-rw-r--r--media-libs/clutter-gst/clutter-gst-3.0.6.ebuild64
-rw-r--r--media-libs/clutter-gst/clutter-gst-3.0.8.ebuild64
-rw-r--r--media-libs/clutter-gst/metadata.xml5
-rw-r--r--media-libs/clutter-gtk/Manifest2
-rw-r--r--media-libs/clutter-gtk/clutter-gtk-1.6.0-r1.ebuild52
-rw-r--r--media-libs/clutter-gtk/clutter-gtk-1.6.0.ebuild45
-rw-r--r--media-libs/clutter-gtk/clutter-gtk-1.6.2.ebuild45
-rw-r--r--media-libs/clutter-gtk/files/clutter-gtk-1.6.0-clutter_gdk_get_visual.patch34
-rw-r--r--media-libs/clutter-gtk/metadata.xml5
-rw-r--r--media-libs/clutter/Manifest3
-rw-r--r--media-libs/clutter/clutter-1.20.2.ebuild112
-rw-r--r--media-libs/clutter/clutter-1.22.2-r1.ebuild116
-rw-r--r--media-libs/clutter/clutter-1.22.4.ebuild109
-rw-r--r--media-libs/clutter/files/clutter-1.22.2-clutter_gdk_get_visual-2.patch32
-rw-r--r--media-libs/clutter/files/clutter-1.22.2-clutter_gdk_get_visual.patch109
-rw-r--r--media-libs/clutter/files/clutter-1.22.2-cogl-visual-xlib.patch130
-rw-r--r--media-libs/clutter/files/clutter-1.22.2-touchpad-detection.patch36
-rw-r--r--media-libs/clutter/metadata.xml9
-rw-r--r--media-libs/cogl/Manifest2
-rw-r--r--media-libs/cogl/cogl-1.18.2-r1.ebuild129
-rw-r--r--media-libs/cogl/cogl-1.20.0.ebuild132
-rw-r--r--media-libs/cogl/metadata.xml10
-rw-r--r--media-libs/coin/Manifest1
-rw-r--r--media-libs/coin/coin-3.1.3-r2.ebuild99
-rw-r--r--media-libs/coin/files/coin-3.1.0-javascript.patch38
-rw-r--r--media-libs/coin/files/coin-3.1.3-freetype251.patch28
-rw-r--r--media-libs/coin/files/coin-3.1.3-gcc-4.7.patch10
-rw-r--r--media-libs/coin/files/coin-3.1.3-pkgconfig-partial.patch13
-rw-r--r--media-libs/coin/metadata.xml10
-rw-r--r--media-libs/compface/Manifest1
-rw-r--r--media-libs/compface/compface-1.5.2.ebuild27
-rw-r--r--media-libs/compface/files/compface-1.5.2-destdir.diff17
-rw-r--r--media-libs/compface/metadata.xml8
-rw-r--r--media-libs/csfml/Manifest1
-rw-r--r--media-libs/csfml/csfml-1.6.ebuild34
-rw-r--r--media-libs/csfml/files/csfml-1.6-destdir.patch76
-rw-r--r--media-libs/csfml/metadata.xml10
-rw-r--r--media-libs/ctl/Manifest1
-rw-r--r--media-libs/ctl/ctl-1.4.1.ebuild35
-rw-r--r--media-libs/ctl/files/ctl-1.4.1-gcc43.patch106
-rw-r--r--media-libs/ctl/files/ctl-1.4.1-gcc47.patch15
-rw-r--r--media-libs/ctl/metadata.xml11
-rw-r--r--media-libs/devil/Manifest1
-rw-r--r--media-libs/devil/devil-1.7.8-r2.ebuild78
-rw-r--r--media-libs/devil/files/devil-1.7.8-CVE-2009-3994.patch17
-rw-r--r--media-libs/devil/files/devil-1.7.8-ILUT.patch17
-rw-r--r--media-libs/devil/files/devil-1.7.8-libpng14.patch33
-rw-r--r--media-libs/devil/files/devil-1.7.8-nvtt-glut.patch83
-rw-r--r--media-libs/devil/metadata.xml12
-rw-r--r--media-libs/dssi/Manifest1
-rw-r--r--media-libs/dssi/dssi-1.1.1.ebuild49
-rw-r--r--media-libs/dssi/metadata.xml8
-rw-r--r--media-libs/dumb/Manifest1
-rw-r--r--media-libs/dumb/dumb-0.9.3-r3.ebuild64
-rw-r--r--media-libs/dumb/files/dumb-0.9.3-PIC-as-needed.patch72
-rw-r--r--media-libs/dumb/files/dumb-0.9.3_CVE-2006-3668.patch16
-rw-r--r--media-libs/dumb/metadata.xml12
-rw-r--r--media-libs/edje/Manifest3
-rw-r--r--media-libs/edje/edje-1.7.10.ebuild50
-rw-r--r--media-libs/edje/edje-1.7.8.ebuild48
-rw-r--r--media-libs/edje/edje-1.7.9.ebuild43
-rw-r--r--media-libs/edje/edje-9999.ebuild50
-rw-r--r--media-libs/edje/metadata.xml46
-rw-r--r--media-libs/elementary/Manifest3
-rw-r--r--media-libs/elementary/elementary-1.12.2.ebuild54
-rw-r--r--media-libs/elementary/elementary-1.13.1.ebuild52
-rw-r--r--media-libs/elementary/elementary-1.15.0.ebuild51
-rw-r--r--media-libs/elementary/elementary-9999.ebuild51
-rw-r--r--media-libs/elementary/metadata.xml19
-rw-r--r--media-libs/emfengine/Manifest1
-rw-r--r--media-libs/emfengine/emfengine-0.8.ebuild53
-rw-r--r--media-libs/emfengine/files/0.7-config.patch13
-rw-r--r--media-libs/emfengine/files/0.7-header.patch13
-rw-r--r--media-libs/emfengine/files/0.8-example.patch12
-rw-r--r--media-libs/emfengine/metadata.xml8
-rw-r--r--media-libs/emotion/Manifest3
-rw-r--r--media-libs/emotion/emotion-1.7.10.ebuild65
-rw-r--r--media-libs/emotion/emotion-1.7.8.ebuild56
-rw-r--r--media-libs/emotion/emotion-1.7.9.ebuild56
-rw-r--r--media-libs/emotion/emotion-9999.ebuild63
-rw-r--r--media-libs/emotion/files/respect-ldflags-with-gstreamer-backend.patch22
-rw-r--r--media-libs/emotion/metadata.xml8
-rw-r--r--media-libs/esdl/Manifest2
-rw-r--r--media-libs/esdl/esdl-1.0.1.ebuild42
-rw-r--r--media-libs/esdl/esdl-1.2.ebuild42
-rw-r--r--media-libs/esdl/metadata.xml22
-rw-r--r--media-libs/ethumb/Manifest2
-rw-r--r--media-libs/ethumb/ethumb-1.7.8.ebuild33
-rw-r--r--media-libs/ethumb/ethumb-1.7.9.ebuild33
-rw-r--r--media-libs/ethumb/metadata.xml8
-rw-r--r--media-libs/evas/Manifest4
-rw-r--r--media-libs/evas/evas-1.7.10.ebuild162
-rw-r--r--media-libs/evas/evas-1.7.8.ebuild162
-rw-r--r--media-libs/evas/evas-1.7.9.ebuild170
-rw-r--r--media-libs/evas/evas-9999.ebuild162
-rw-r--r--media-libs/evas/metadata.xml32
-rw-r--r--media-libs/exempi/Manifest2
-rw-r--r--media-libs/exempi/exempi-2.2.0.ebuild50
-rw-r--r--media-libs/exempi/exempi-2.2.1.ebuild49
-rw-r--r--media-libs/exempi/files/exempi-2.1.1-iconv.patch22
-rw-r--r--media-libs/exempi/metadata.xml8
-rw-r--r--media-libs/exiftool/Manifest10
-rw-r--r--media-libs/exiftool/exiftool-9.78.ebuild23
-rw-r--r--media-libs/exiftool/exiftool-9.82.ebuild23
-rw-r--r--media-libs/exiftool/exiftool-9.85.ebuild23
-rw-r--r--media-libs/exiftool/exiftool-9.86.ebuild23
-rw-r--r--media-libs/exiftool/exiftool-9.87.ebuild23
-rw-r--r--media-libs/exiftool/exiftool-9.88.ebuild23
-rw-r--r--media-libs/exiftool/exiftool-9.90.ebuild23
-rw-r--r--media-libs/exiftool/exiftool-9.95.ebuild23
-rw-r--r--media-libs/exiftool/exiftool-9.97.ebuild23
-rw-r--r--media-libs/exiftool/exiftool-9.98.ebuild24
-rw-r--r--media-libs/exiftool/metadata.xml152
-rw-r--r--media-libs/faac/Manifest1
-rw-r--r--media-libs/faac/faac-1.28-r3.ebuild44
-rw-r--r--media-libs/faac/faac-1.28-r4.ebuild61
-rw-r--r--media-libs/faac/files/faac-1.28-altivec.patch40
-rw-r--r--media-libs/faac/files/faac-1.28-external-libmp4v2.patch47
-rw-r--r--media-libs/faac/files/faac-1.28-inttypes.patch41
-rw-r--r--media-libs/faac/files/faac-1.28-libmp4v2_r479_compat.patch138
-rw-r--r--media-libs/faac/metadata.xml8
-rw-r--r--media-libs/faad2/Manifest1
-rw-r--r--media-libs/faad2/faad2-2.7-r3.ebuild50
-rw-r--r--media-libs/faad2/files/faad2-2.7-libmp4ff-install-mp4ff_int_types_h.patch13
-rw-r--r--media-libs/faad2/files/faad2-2.7-libmp4ff-shared-lib.patch29
-rw-r--r--media-libs/faad2/files/faad2-2.7-man1_MANS.patch10
-rw-r--r--media-libs/faad2/metadata.xml12
-rw-r--r--media-libs/fdk-aac/Manifest4
-rw-r--r--media-libs/fdk-aac/fdk-aac-0.1.1.ebuild48
-rw-r--r--media-libs/fdk-aac/fdk-aac-0.1.2.ebuild41
-rw-r--r--media-libs/fdk-aac/fdk-aac-0.1.3.ebuild41
-rw-r--r--media-libs/fdk-aac/fdk-aac-0.1.4.ebuild42
-rw-r--r--media-libs/fdk-aac/metadata.xml9
-rw-r--r--media-libs/ffmpegsource/Manifest3
-rw-r--r--media-libs/ffmpegsource/ffmpegsource-2.17.ebuild39
-rw-r--r--media-libs/ffmpegsource/ffmpegsource-2.19.1.ebuild28
-rw-r--r--media-libs/ffmpegsource/ffmpegsource-2.20.ebuild28
-rw-r--r--media-libs/ffmpegsource/ffmpegsource-9999.ebuild27
-rw-r--r--media-libs/ffmpegsource/files/ffmpegsource-2.17-ffmpeg.patch102
-rw-r--r--media-libs/ffmpegsource/metadata.xml16
-rw-r--r--media-libs/fidlib/Manifest1
-rw-r--r--media-libs/fidlib/fidlib-0.9.10-r1.ebuild49
-rw-r--r--media-libs/fidlib/fidlib-0.9.10.ebuild50
-rw-r--r--media-libs/fidlib/files/fidlib-0.9.10-cpp-extern.patch21
-rw-r--r--media-libs/fidlib/files/fidlib-0.9.10-extern.patch26
-rw-r--r--media-libs/fidlib/metadata.xml5
-rw-r--r--media-libs/flac/Manifest1
-rw-r--r--media-libs/flac/files/flac-1.3.0-asneeded.patch21
-rw-r--r--media-libs/flac/files/flac-1.3.0-dontbuild-examples.patch30
-rw-r--r--media-libs/flac/files/flac-1.3.0-dontbuild-tests.patch66
-rw-r--r--media-libs/flac/files/flac-1.3.1-cflags.patch23
-rw-r--r--media-libs/flac/flac-1.3.1-r1.ebuild72
-rw-r--r--media-libs/flac/metadata.xml5
-rw-r--r--media-libs/flickcurl/Manifest3
-rw-r--r--media-libs/flickcurl/flickcurl-1.24.ebuild45
-rw-r--r--media-libs/flickcurl/flickcurl-1.25.ebuild45
-rw-r--r--media-libs/flickcurl/flickcurl-1.26.ebuild45
-rw-r--r--media-libs/flickcurl/metadata.xml8
-rw-r--r--media-libs/fluidsynth-dssi/Manifest1
-rw-r--r--media-libs/fluidsynth-dssi/fluidsynth-dssi-1.0.0.ebuild27
-rw-r--r--media-libs/fluidsynth-dssi/metadata.xml8
-rw-r--r--media-libs/fmod/Manifest5
-rw-r--r--media-libs/fmod/fmod-3.75.ebuild34
-rw-r--r--media-libs/fmod/fmod-4.38.00.ebuild58
-rw-r--r--media-libs/fmod/fmod-4.38.02.ebuild58
-rw-r--r--media-libs/fmod/metadata.xml5
-rw-r--r--media-libs/fnlib/Manifest1
-rw-r--r--media-libs/fnlib/fnlib-0.5-r2.ebuild33
-rw-r--r--media-libs/fnlib/metadata.xml10
-rw-r--r--media-libs/fontconfig-infinality/Manifest4
-rw-r--r--media-libs/fontconfig-infinality/files/Xresources9
-rw-r--r--media-libs/fontconfig-infinality/fontconfig-infinality-20120619.ebuild56
-rw-r--r--media-libs/fontconfig-infinality/fontconfig-infinality-20130404.ebuild57
-rw-r--r--media-libs/fontconfig-infinality/metadata.xml11
-rw-r--r--media-libs/fontconfig-ultimate/Manifest2
-rw-r--r--media-libs/fontconfig-ultimate/fontconfig-ultimate-2015.04.ebuild111
-rw-r--r--media-libs/fontconfig-ultimate/fontconfig-ultimate-2015.08.01.ebuild111
-rw-r--r--media-libs/fontconfig-ultimate/metadata.xml12
-rw-r--r--media-libs/fontconfig/Manifest3
-rw-r--r--media-libs/fontconfig/files/fontconfig-2.10.2-docbook.patch16
-rw-r--r--media-libs/fontconfig/files/fontconfig-2.10.92-automake-1.13.patch152
-rw-r--r--media-libs/fontconfig/files/fontconfig-2.10.92-closing-fp.patch21
-rw-r--r--media-libs/fontconfig/files/fontconfig-2.10.92-fix-check.patch143
-rw-r--r--media-libs/fontconfig/files/fontconfig-2.10.92-fix-woff.patch157
-rw-r--r--media-libs/fontconfig/files/fontconfig-2.10.92-ft-face.patch144
-rw-r--r--media-libs/fontconfig/files/fontconfig-2.10.92-ft-face2.patch177
-rw-r--r--media-libs/fontconfig/files/fontconfig-2.10.92-native-fonts.patch73
-rw-r--r--media-libs/fontconfig/files/fontconfig-2.10.92-use-glob.patch164
-rw-r--r--media-libs/fontconfig/files/fontconfig-2.11.0-baseconfigdir_fix.patch21
-rw-r--r--media-libs/fontconfig/files/fontconfig-2.11.0-solaris.patch57
-rw-r--r--media-libs/fontconfig/files/fontconfig-2.11.0-solaris10.patch63
-rw-r--r--media-libs/fontconfig/files/fontconfig-2.11.1-fc-cache-r.patch26
-rw-r--r--media-libs/fontconfig/files/fontconfig-2.11.93-addfile.patch109
-rw-r--r--media-libs/fontconfig/files/fontconfig-2.11.93-fix-sigfpe.patch22
-rw-r--r--media-libs/fontconfig/files/fontconfig-2.11.93-latin-update.patch67
-rw-r--r--media-libs/fontconfig/files/fontconfig-2.11.93-rmdead.patch22
-rw-r--r--media-libs/fontconfig/files/fontconfig-2.3.2-docbook.patch15
-rw-r--r--media-libs/fontconfig/files/fontconfig-2.7.1-latin-reorder.patch50
-rw-r--r--media-libs/fontconfig/files/fontconfig-2.8.0-urw-aliases.patch18
-rw-r--r--media-libs/fontconfig/fontconfig-2.11.1-r2.ebuild160
-rw-r--r--media-libs/fontconfig/fontconfig-2.11.93.ebuild155
-rw-r--r--media-libs/fontconfig/fontconfig-2.11.94.ebuild152
-rw-r--r--media-libs/fontconfig/metadata.xml15
-rw-r--r--media-libs/freealut/Manifest1
-rw-r--r--media-libs/freealut/freealut-1.1.0-r3.ebuild39
-rw-r--r--media-libs/freealut/metadata.xml5
-rw-r--r--media-libs/freeglut/Manifest2
-rw-r--r--media-libs/freeglut/files/freeglut-2.4.0-bsd-usb-joystick.patch16
-rw-r--r--media-libs/freeglut/freeglut-2.8.1-r1.ebuild36
-rw-r--r--media-libs/freeglut/freeglut-3.0.0.ebuild40
-rw-r--r--media-libs/freeglut/metadata.xml13
-rw-r--r--media-libs/freeimage/Manifest3
-rw-r--r--media-libs/freeimage/files/freeimage-3.15.4-raw.patch16
-rw-r--r--media-libs/freeimage/files/freeimage-3.15.4-unbundling.patch639
-rw-r--r--media-libs/freeimage/freeimage-3.15.4.ebuild105
-rw-r--r--media-libs/freeimage/metadata.xml8
-rw-r--r--media-libs/freetype/Manifest8
-rw-r--r--media-libs/freetype/files/freetype-2.3.2-enable-valid.patch22
-rw-r--r--media-libs/freetype/files/freetype-2.4.11-sizeof-types.patch31
-rw-r--r--media-libs/freetype/freetype-2.5.5.ebuild176
-rw-r--r--media-libs/freetype/freetype-2.6.ebuild161
-rw-r--r--media-libs/freetype/metadata.xml37
-rw-r--r--media-libs/freeverb3/Manifest3
-rw-r--r--media-libs/freeverb3/files/freeverb3-2.3.0-fix-implicit.patch90
-rw-r--r--media-libs/freeverb3/files/freeverb3-2.3.1-plugin-api-v8-v10.patch125
-rw-r--r--media-libs/freeverb3/files/freeverb3-2.5.0-pow-ambiguity.patch12
-rw-r--r--media-libs/freeverb3/files/freeverb3-2.5.13-fix-sse1v2-assembly.patch13
-rw-r--r--media-libs/freeverb3/files/freeverb3-2.5.13-respect-disable-sse.patch24
-rw-r--r--media-libs/freeverb3/files/freeverb3-3.0.0-audacious-3.3.x.patch40
-rw-r--r--media-libs/freeverb3/files/freeverb3-3.1.1-jack-compilation.patch67
-rw-r--r--media-libs/freeverb3/files/freeverb3-3.1.1-jack-linking.patch27
-rw-r--r--media-libs/freeverb3/freeverb3-2.5.13-r2.ebuild58
-rw-r--r--media-libs/freeverb3/freeverb3-2.6.6.ebuild58
-rw-r--r--media-libs/freeverb3/freeverb3-3.1.1-r1.ebuild76
-rw-r--r--media-libs/freeverb3/freeverb3-3.1.1.ebuild71
-rw-r--r--media-libs/freeverb3/metadata.xml15
-rw-r--r--media-libs/ftgl/Manifest1
-rw-r--r--media-libs/ftgl/files/ftgl-2.1.3_rc5-gentoo.patch42
-rw-r--r--media-libs/ftgl/files/ftgl-2.1.3_rc5-underlink.patch11
-rw-r--r--media-libs/ftgl/ftgl-2.1.3_rc5.ebuild52
-rw-r--r--media-libs/ftgl/metadata.xml8
-rw-r--r--media-libs/game-music-emu/Manifest1
-rw-r--r--media-libs/game-music-emu/game-music-emu-0.6.0-r1.ebuild17
-rw-r--r--media-libs/game-music-emu/metadata.xml8
-rw-r--r--media-libs/ganv/Manifest1
-rw-r--r--media-libs/ganv/ganv-1.4.2.ebuild36
-rw-r--r--media-libs/ganv/metadata.xml8
-rw-r--r--media-libs/gavl/Manifest2
-rw-r--r--media-libs/gavl/gavl-1.2.0.ebuild45
-rw-r--r--media-libs/gavl/gavl-1.4.0-r1.ebuild49
-rw-r--r--media-libs/gavl/gavl-1.4.0.ebuild49
-rw-r--r--media-libs/gavl/metadata.xml11
-rw-r--r--media-libs/gd/Manifest2
-rw-r--r--media-libs/gd/files/gd-2.0.35-fontconfig.patch25
-rw-r--r--media-libs/gd/files/gd-2.0.35-libpng-pkg-config.patch113
-rw-r--r--media-libs/gd/files/gd-2.0.35-libpng14.patch16
-rw-r--r--media-libs/gd/files/gd-2.0.35-maxcolors.patch17
-rw-r--r--media-libs/gd/files/gd-2.1.1-headers.patch30
-rw-r--r--media-libs/gd/files/gd-2.1.1-webp-pre.patch28
-rw-r--r--media-libs/gd/files/gd-2.1.1-webp.patch409
-rw-r--r--media-libs/gd/gd-2.0.35-r3.ebuild69
-rw-r--r--media-libs/gd/gd-2.0.35-r4.ebuild101
-rw-r--r--media-libs/gd/gd-2.1.1-r1.ebuild62
-rw-r--r--media-libs/gd/gd-2.1.1.ebuild59
-rw-r--r--media-libs/gd/metadata.xml33
-rw-r--r--media-libs/gegl/Manifest2
-rw-r--r--media-libs/gegl/files/0.1.6-ffmpeg.patch33
-rw-r--r--media-libs/gegl/files/gegl-0.0.22-locale_h.diff10
-rw-r--r--media-libs/gegl/files/gegl-0.1.8-cve-2012-4433-4757cdf7.patch74
-rw-r--r--media-libs/gegl/files/gegl-0.2.0-cve-2012-4433-1e92e523.patch68
-rw-r--r--media-libs/gegl/files/gegl-0.2.0-cve-2012-4433-4757cdf7.patch70
-rw-r--r--media-libs/gegl/files/gegl-0.2.0-ffmpeg-0.11.diff57
-rw-r--r--media-libs/gegl/files/gegl-0.2.0-g_log_domain.patch25
-rw-r--r--media-libs/gegl/files/gegl-0.2.0-introspection-version.patch31
-rw-r--r--media-libs/gegl/files/gegl-doubledestdir.diff12
-rw-r--r--media-libs/gegl/files/replace-imgconvert-by-swsscale.patch58
-rw-r--r--media-libs/gegl/gegl-0.2.0-r2.ebuild154
-rw-r--r--media-libs/gegl/gegl-0.3.0.ebuild182
-rw-r--r--media-libs/gegl/gegl-9999.ebuild182
-rw-r--r--media-libs/gegl/metadata.xml14
-rw-r--r--media-libs/gexiv2/Manifest3
-rw-r--r--media-libs/gexiv2/gexiv2-0.10.2.ebuild51
-rw-r--r--media-libs/gexiv2/gexiv2-0.10.3.ebuild51
-rw-r--r--media-libs/gexiv2/gexiv2-0.6.1.ebuild52
-rw-r--r--media-libs/gexiv2/metadata.xml5
-rw-r--r--media-libs/giblib/Manifest1
-rw-r--r--media-libs/giblib/giblib-1.2.4-r1.ebuild32
-rw-r--r--media-libs/giblib/giblib-1.2.4.ebuild33
-rw-r--r--media-libs/giblib/metadata.xml16
-rw-r--r--media-libs/giflib/Manifest5
-rw-r--r--media-libs/giflib/files/giflib-4.1.6-gif2rle.patch18
-rw-r--r--media-libs/giflib/files/giflib-4.1.6-giffix-null-Extension-fix.patch15
-rw-r--r--media-libs/giflib/giflib-4.1.6-r2.ebuild57
-rw-r--r--media-libs/giflib/giflib-4.1.6-r3.ebuild59
-rw-r--r--media-libs/giflib/giflib-4.2.3-r1.ebuild59
-rw-r--r--media-libs/giflib/giflib-4.2.3.ebuild54
-rw-r--r--media-libs/giflib/giflib-5.0.6.ebuild50
-rw-r--r--media-libs/giflib/giflib-5.1.0.ebuild50
-rw-r--r--media-libs/giflib/giflib-5.1.1.ebuild50
-rw-r--r--media-libs/giflib/metadata.xml11
-rw-r--r--media-libs/glew/Manifest4
-rw-r--r--media-libs/glew/glew-1.10.0-r1.ebuild71
-rw-r--r--media-libs/glew/glew-1.10.0-r2.ebuild76
-rw-r--r--media-libs/glew/glew-1.11.0.ebuild79
-rw-r--r--media-libs/glew/glew-1.12.0.ebuild79
-rw-r--r--media-libs/glew/glew-1.9.0.ebuild70
-rw-r--r--media-libs/glew/metadata.xml11
-rw-r--r--media-libs/glfw/Manifest2
-rw-r--r--media-libs/glfw/files/glfw-2.7.7-dyn.patch31
-rw-r--r--media-libs/glfw/files/glfw-2.7.7-pkgconfig.patch37
-rw-r--r--media-libs/glfw/glfw-2.7.7.ebuild95
-rw-r--r--media-libs/glfw/glfw-3.1.1.ebuild33
-rw-r--r--media-libs/glfw/metadata.xml11
-rw-r--r--media-libs/glm/Manifest4
-rw-r--r--media-libs/glm/glm-0.9.2.4.ebuild25
-rw-r--r--media-libs/glm/glm-0.9.3.2.ebuild25
-rw-r--r--media-libs/glm/glm-0.9.5.1.ebuild27
-rw-r--r--media-libs/glm/glm-0.9.6.1.ebuild27
-rw-r--r--media-libs/glm/metadata.xml14
-rw-r--r--media-libs/glpng/Manifest2
-rw-r--r--media-libs/glpng/files/glpng-1.45-libpng15.patch40
-rw-r--r--media-libs/glpng/glpng-1.45-r1.ebuild30
-rw-r--r--media-libs/glpng/glpng-1.46-r1.ebuild28
-rw-r--r--media-libs/glpng/metadata.xml9
-rw-r--r--media-libs/glu/Manifest1
-rw-r--r--media-libs/glu/glu-9.0.0-r1.ebuild43
-rw-r--r--media-libs/glu/glu-9.0.0.ebuild82
-rw-r--r--media-libs/glu/metadata.xml5
-rw-r--r--media-libs/gluon/Manifest1
-rw-r--r--media-libs/gluon/files/gluon-0.71.0-gcc-4.7.patch30
-rw-r--r--media-libs/gluon/gluon-0.71.0.ebuild37
-rw-r--r--media-libs/gluon/metadata.xml5
-rw-r--r--media-libs/glyr/Manifest1
-rw-r--r--media-libs/glyr/glyr-1.0.5.ebuild31
-rw-r--r--media-libs/glyr/metadata.xml8
-rw-r--r--media-libs/gmtk/Manifest2
-rw-r--r--media-libs/gmtk/gmtk-1.0.8.ebuild48
-rw-r--r--media-libs/gmtk/gmtk-1.0.9.ebuild48
-rw-r--r--media-libs/gmtk/metadata.xml11
-rw-r--r--media-libs/gnonlin/Manifest4
-rw-r--r--media-libs/gnonlin/gnonlin-0.10.17.ebuild44
-rw-r--r--media-libs/gnonlin/gnonlin-0.10.9.ebuild24
-rw-r--r--media-libs/gnonlin/gnonlin-1.2.1.ebuild40
-rw-r--r--media-libs/gnonlin/gnonlin-1.4.0.ebuild40
-rw-r--r--media-libs/gnonlin/metadata.xml5
-rw-r--r--media-libs/grilo/Manifest2
-rw-r--r--media-libs/grilo/files/grilo-0.1.16-constants.py50
-rw-r--r--media-libs/grilo/grilo-0.2.11.ebuild87
-rw-r--r--media-libs/grilo/grilo-0.2.12.ebuild87
-rw-r--r--media-libs/grilo/metadata.xml12
-rw-r--r--media-libs/gsound/Manifest1
-rw-r--r--media-libs/gsound/gsound-1.0.1.ebuild41
-rw-r--r--media-libs/gsound/metadata.xml5
-rw-r--r--media-libs/gst-plugins-bad/Manifest4
-rw-r--r--media-libs/gst-plugins-bad/gst-plugins-bad-0.10.23-r2.ebuild53
-rw-r--r--media-libs/gst-plugins-bad/gst-plugins-bad-1.2.4-r1.ebuild56
-rw-r--r--media-libs/gst-plugins-bad/gst-plugins-bad-1.4.5.ebuild77
-rw-r--r--media-libs/gst-plugins-bad/metadata.xml9
-rw-r--r--media-libs/gst-plugins-base/Manifest3
-rw-r--r--media-libs/gst-plugins-base/files/gst-plugins-base-0.10.36-gcc-4.9.patch18
-rw-r--r--media-libs/gst-plugins-base/files/gst-plugins-base-0.10.36-resync-ringbuffer.patch15
-rw-r--r--media-libs/gst-plugins-base/gst-plugins-base-0.10.36-r1.ebuild74
-rw-r--r--media-libs/gst-plugins-base/gst-plugins-base-0.10.36-r2.ebuild77
-rw-r--r--media-libs/gst-plugins-base/gst-plugins-base-1.2.4-r1.ebuild97
-rw-r--r--media-libs/gst-plugins-base/gst-plugins-base-1.4.5.ebuild94
-rw-r--r--media-libs/gst-plugins-base/metadata.xml9
-rw-r--r--media-libs/gst-plugins-good/Manifest4
-rw-r--r--media-libs/gst-plugins-good/files/gst-plugins-good-1.4.5-rtp-test-fixes.patch98
-rw-r--r--media-libs/gst-plugins-good/gst-plugins-good-0.10.31-r1.ebuild57
-rw-r--r--media-libs/gst-plugins-good/gst-plugins-good-0.10.31.ebuild57
-rw-r--r--media-libs/gst-plugins-good/gst-plugins-good-1.2.3.ebuild58
-rw-r--r--media-libs/gst-plugins-good/gst-plugins-good-1.2.4-r1.ebuild58
-rw-r--r--media-libs/gst-plugins-good/gst-plugins-good-1.4.5.ebuild66
-rw-r--r--media-libs/gst-plugins-good/metadata.xml5
-rw-r--r--media-libs/gst-plugins-ugly/Manifest3
-rw-r--r--media-libs/gst-plugins-ugly/gst-plugins-ugly-0.10.19-r1.ebuild42
-rw-r--r--media-libs/gst-plugins-ugly/gst-plugins-ugly-1.2.4-r1.ebuild40
-rw-r--r--media-libs/gst-plugins-ugly/gst-plugins-ugly-1.4.5.ebuild40
-rw-r--r--media-libs/gst-plugins-ugly/metadata.xml5
-rw-r--r--media-libs/gst-rtsp-server/Manifest2
-rw-r--r--media-libs/gst-rtsp-server/gst-rtsp-server-0.10.8-r1.ebuild101
-rw-r--r--media-libs/gst-rtsp-server/gst-rtsp-server-1.4.5.ebuild79
-rw-r--r--media-libs/gst-rtsp-server/metadata.xml5
-rw-r--r--media-libs/gstreamer-editing-services/Manifest2
-rw-r--r--media-libs/gstreamer-editing-services/gstreamer-editing-services-1.2.1.ebuild57
-rw-r--r--media-libs/gstreamer-editing-services/gstreamer-editing-services-1.4.0.ebuild59
-rw-r--r--media-libs/gstreamer-editing-services/metadata.xml5
-rw-r--r--media-libs/gstreamer/Manifest3
-rw-r--r--media-libs/gstreamer/files/gstreamer-0.10.36-disable-test_fail_abstract_new.patch35
-rw-r--r--media-libs/gstreamer/files/gstreamer-make-grammar.y-work-with-bison-3.patch33
-rw-r--r--media-libs/gstreamer/gstreamer-0.10.36-r2.ebuild120
-rw-r--r--media-libs/gstreamer/gstreamer-1.2.4-r2.ebuild90
-rw-r--r--media-libs/gstreamer/gstreamer-1.4.5.ebuild90
-rw-r--r--media-libs/gstreamer/metadata.xml10
-rw-r--r--media-libs/guilib/Manifest1
-rw-r--r--media-libs/guilib/files/guilib-1.1.0-gcc-4.1.x-fix.diff20
-rw-r--r--media-libs/guilib/files/guilib-1.1.0.makefile.patch36
-rw-r--r--media-libs/guilib/guilib-1.2.1.ebuild40
-rw-r--r--media-libs/guilib/metadata.xml8
-rw-r--r--media-libs/gupnp-dlna/Manifest2
-rw-r--r--media-libs/gupnp-dlna/gupnp-dlna-0.10.2.ebuild63
-rw-r--r--media-libs/gupnp-dlna/gupnp-dlna-0.10.3.ebuild62
-rw-r--r--media-libs/gupnp-dlna/metadata.xml5
-rw-r--r--media-libs/hal-flash/Manifest1
-rw-r--r--media-libs/hal-flash/hal-flash-0.2.0_rc1.ebuild35
-rw-r--r--media-libs/hal-flash/metadata.xml11
-rw-r--r--media-libs/hamlib/Manifest1
-rw-r--r--media-libs/hamlib/files/hamlib-1.2.11-bindings.diff28
-rw-r--r--media-libs/hamlib/files/hamlib-1.2.15.3-configure.diff12
-rw-r--r--media-libs/hamlib/hamlib-1.2.15.3-r1.ebuild87
-rw-r--r--media-libs/hamlib/metadata.xml11
-rw-r--r--media-libs/harfbuzz/Manifest3
-rw-r--r--media-libs/harfbuzz/harfbuzz-0.9.38.ebuild95
-rw-r--r--media-libs/harfbuzz/harfbuzz-0.9.40.ebuild95
-rw-r--r--media-libs/harfbuzz/harfbuzz-0.9.41.ebuild98
-rw-r--r--media-libs/harfbuzz/harfbuzz-9999.ebuild95
-rw-r--r--media-libs/harfbuzz/metadata.xml10
-rw-r--r--media-libs/herqq/Manifest1
-rw-r--r--media-libs/herqq/herqq-1.0.0-r2.ebuild45
-rw-r--r--media-libs/herqq/metadata.xml8
-rw-r--r--media-libs/hupnp-ng/hupnp-ng-9999.ebuild44
-rw-r--r--media-libs/hupnp-ng/metadata.xml8
-rw-r--r--media-libs/icc-profiles-basiccolor-printing2009/Manifest1
-rw-r--r--media-libs/icc-profiles-basiccolor-printing2009/icc-profiles-basiccolor-printing2009-1.2.0.ebuild14
-rw-r--r--media-libs/icc-profiles-basiccolor-printing2009/metadata.xml11
-rw-r--r--media-libs/icc-profiles-openicc/Manifest2
-rw-r--r--media-libs/icc-profiles-openicc/icc-profiles-openicc-1.3.0.ebuild14
-rw-r--r--media-libs/icc-profiles-openicc/icc-profiles-openicc-1.3.1.ebuild14
-rw-r--r--media-libs/icc-profiles-openicc/metadata.xml11
-rw-r--r--media-libs/icclib/Manifest1
-rw-r--r--media-libs/icclib/files/icclib-2.14-make.patch114
-rw-r--r--media-libs/icclib/icclib-2.14.ebuild42
-rw-r--r--media-libs/icclib/metadata.xml9
-rw-r--r--media-libs/id3lib/Manifest1
-rw-r--r--media-libs/id3lib/files/id3lib-3.8.3-autoconf259.patch31
-rw-r--r--media-libs/id3lib/files/id3lib-3.8.3-doxyinput.patch23
-rw-r--r--media-libs/id3lib/files/id3lib-3.8.3-gcc-4.3.patch82
-rw-r--r--media-libs/id3lib/files/id3lib-3.8.3-missing_nullpointer_check.patch11
-rw-r--r--media-libs/id3lib/files/id3lib-3.8.3-security.patch51
-rw-r--r--media-libs/id3lib/files/id3lib-3.8.3-test_io.patch10
-rw-r--r--media-libs/id3lib/files/id3lib-3.8.3-unicode16.patch39
-rw-r--r--media-libs/id3lib/files/id3lib-3.8.3-zlib.patch23
-rw-r--r--media-libs/id3lib/id3lib-3.8.3-r8.ebuild60
-rw-r--r--media-libs/id3lib/metadata.xml8
-rw-r--r--media-libs/ilmbase/Manifest4
-rw-r--r--media-libs/ilmbase/files/ilmbase-1.0.0-asneeded.patch11
-rw-r--r--media-libs/ilmbase/files/ilmbase-1.0.2-gcc43.patch11
-rw-r--r--media-libs/ilmbase/ilmbase-1.0.2.ebuild36
-rw-r--r--media-libs/ilmbase/ilmbase-2.0.1-r1.ebuild18
-rw-r--r--media-libs/ilmbase/ilmbase-2.1.0.ebuild27
-rw-r--r--media-libs/ilmbase/ilmbase-2.2.0.ebuild27
-rw-r--r--media-libs/ilmbase/metadata.xml8
-rw-r--r--media-libs/imlib/Manifest2
-rw-r--r--media-libs/imlib/files/imlib-1.9.15-asneeded.patch38
-rw-r--r--media-libs/imlib/files/imlib-1.9.15-bpp16-CVE-2007-3568.patch11
-rw-r--r--media-libs/imlib/files/imlib-1.9.15-fix-rendering.patch105
-rw-r--r--media-libs/imlib/files/imlib-1.9.15-libpng15.patch142
-rw-r--r--media-libs/imlib/files/imlib-1.9.15.patch70
-rw-r--r--media-libs/imlib/files/imlib-security.patch510
-rw-r--r--media-libs/imlib/imlib-1.9.15-r4.ebuild67
-rw-r--r--media-libs/imlib/metadata.xml5
-rw-r--r--media-libs/imlib2/Manifest3
-rw-r--r--media-libs/imlib2/files/imlib2-1.4.5-giflib-5.patch31
-rw-r--r--media-libs/imlib2/files/imlib2-1.4.5-no-my-libs.patch28
-rw-r--r--media-libs/imlib2/files/imlib2-1.4.6-no-x.patch33
-rw-r--r--media-libs/imlib2/files/imlib2-1.4.6-out-of-source-build.patch28
-rw-r--r--media-libs/imlib2/imlib2-1.4.5-r1.ebuild75
-rw-r--r--media-libs/imlib2/imlib2-1.4.6-r1.ebuild75
-rw-r--r--media-libs/imlib2/imlib2-1.4.6-r2.ebuild82
-rw-r--r--media-libs/imlib2/imlib2-1.4.7.ebuild68
-rw-r--r--media-libs/imlib2/imlib2-9999.ebuild68
-rw-r--r--media-libs/imlib2/metadata.xml48
-rw-r--r--media-libs/iulib/Manifest2
-rw-r--r--media-libs/iulib/files/iulib-0.3-install.patch40
-rw-r--r--media-libs/iulib/files/iulib-0.4-scons-build-env.patch39
-rw-r--r--media-libs/iulib/iulib-0.3.ebuild38
-rw-r--r--media-libs/iulib/iulib-0.4.ebuild53
-rw-r--r--media-libs/iulib/metadata.xml8
-rw-r--r--media-libs/jasper/Manifest2
-rw-r--r--media-libs/jasper/files/CVE-2011-4516+7.patch24
-rw-r--r--media-libs/jasper/files/jasper-1.701.0-GL-ac.patch11
-rw-r--r--media-libs/jasper/files/jasper-1.701.0-GL.patch11
-rw-r--r--media-libs/jasper/files/jasper-CVE-2014-8137.patch57
-rw-r--r--media-libs/jasper/files/jasper-CVE-2014-8138.patch14
-rw-r--r--media-libs/jasper/files/jasper-CVE-2014-8157.patch12
-rw-r--r--media-libs/jasper/files/jasper-CVE-2014-8158.patch329
-rw-r--r--media-libs/jasper/files/jasper-CVE-2014-9029.patch29
-rw-r--r--media-libs/jasper/files/jasper-pkgconfig.patch48
-rw-r--r--media-libs/jasper/jasper-1.900.1-r9.ebuild54
-rw-r--r--media-libs/jasper/metadata.xml5
-rw-r--r--media-libs/jbig2dec/Manifest2
-rw-r--r--media-libs/jbig2dec/files/jbig2dec-0.11-libpng15.patch31
-rw-r--r--media-libs/jbig2dec/jbig2dec-0.11-r1.ebuild48
-rw-r--r--media-libs/jbig2dec/metadata.xml6
-rw-r--r--media-libs/jbig2enc/Manifest1
-rw-r--r--media-libs/jbig2enc/files/jbig2enc-0.28-leptonica-1.70.patch52
-rw-r--r--media-libs/jbig2enc/jbig2enc-0.28-r1.ebuild32
-rw-r--r--media-libs/jbig2enc/metadata.xml14
-rw-r--r--media-libs/jbigkit/Manifest1
-rw-r--r--media-libs/jbigkit/files/jbigkit-2.1-build.patch239
-rw-r--r--media-libs/jbigkit/jbigkit-2.1.ebuild50
-rw-r--r--media-libs/jbigkit/metadata.xml10
-rw-r--r--media-libs/jpeg/Manifest5
-rw-r--r--media-libs/jpeg/files/jpeg-7-maxmem_sysconf.patch49
-rw-r--r--media-libs/jpeg/files/jpeg-8d-CVE-2013-6629.patch17
-rw-r--r--media-libs/jpeg/jpeg-6b-r12.ebuild50
-rw-r--r--media-libs/jpeg/jpeg-8d-r1.ebuild69
-rw-r--r--media-libs/jpeg/jpeg-8d-r2.ebuild54
-rw-r--r--media-libs/jpeg/jpeg-9a.ebuild67
-rw-r--r--media-libs/jpeg/metadata.xml5
-rw-r--r--media-libs/ladspa-cmt/Manifest1
-rw-r--r--media-libs/ladspa-cmt/files/cmt.rdf91
-rw-r--r--media-libs/ladspa-cmt/files/ladspa-cmt-1.16-darwin.patch12
-rw-r--r--media-libs/ladspa-cmt/files/ladspa-cmt-1.16-mallocstdlib.patch75
-rw-r--r--media-libs/ladspa-cmt/files/ladspa-cmt-1.16-respect-ldflags.patch14
-rw-r--r--media-libs/ladspa-cmt/files/ladspa-cmt-1.16-sa.patch18
-rw-r--r--media-libs/ladspa-cmt/ladspa-cmt-1.16-r4.ebuild58
-rw-r--r--media-libs/ladspa-cmt/metadata.xml5
-rw-r--r--media-libs/ladspa-sdk/Manifest1
-rw-r--r--media-libs/ladspa-sdk/files/ladspa-sdk-1.13-asneeded.patch15
-rw-r--r--media-libs/ladspa-sdk/files/ladspa-sdk-1.13-fbsd.patch16
-rw-r--r--media-libs/ladspa-sdk/files/ladspa-sdk-1.13-no-LD.patch16
-rw-r--r--media-libs/ladspa-sdk/files/ladspa-sdk-1.13-properbuild.patch92
-rw-r--r--media-libs/ladspa-sdk/ladspa-sdk-1.13-r1.ebuild54
-rw-r--r--media-libs/ladspa-sdk/ladspa-sdk-1.13-r2.ebuild71
-rw-r--r--media-libs/ladspa-sdk/metadata.xml5
-rw-r--r--media-libs/lasi/Manifest1
-rw-r--r--media-libs/lasi/files/lasi-1.1.0-cmake.patch11
-rw-r--r--media-libs/lasi/files/lasi-1.1.0-pkgconfig.patch22
-rw-r--r--media-libs/lasi/files/lasi-1.1.1-freetype251.patch63
-rw-r--r--media-libs/lasi/lasi-1.1.1.ebuild57
-rw-r--r--media-libs/lasi/metadata.xml24
-rw-r--r--media-libs/lastfmlib/Manifest1
-rw-r--r--media-libs/lastfmlib/lastfmlib-0.4.0.ebuild33
-rw-r--r--media-libs/lastfmlib/metadata.xml16
-rw-r--r--media-libs/lcms/Manifest2
-rw-r--r--media-libs/lcms/files/lcms-2.6-cve-2014-0459.patch92
-rw-r--r--media-libs/lcms/lcms-2.6-r1.ebuild48
-rw-r--r--media-libs/lcms/lcms-2.7.ebuild46
-rw-r--r--media-libs/lcms/metadata.xml8
-rw-r--r--media-libs/lensfun/Manifest2
-rw-r--r--media-libs/lensfun/files/lensfun-0.3.0-rst2man.patch12
-rw-r--r--media-libs/lensfun/lensfun-0.3.0.ebuild48
-rw-r--r--media-libs/lensfun/lensfun-0.3.1.ebuild46
-rw-r--r--media-libs/lensfun/metadata.xml11
-rw-r--r--media-libs/leptonica/Manifest2
-rw-r--r--media-libs/leptonica/files/leptonica-1.71-fix-openjpeg-test.patch15
-rw-r--r--media-libs/leptonica/files/leptonica-1.71-openjpeg-2.0.patch26
-rw-r--r--media-libs/leptonica/leptonica-1.71-r1.ebuild72
-rw-r--r--media-libs/leptonica/leptonica-1.71.ebuild62
-rw-r--r--media-libs/leptonica/leptonica-1.72-r2.ebuild58
-rw-r--r--media-libs/leptonica/metadata.xml17
-rw-r--r--media-libs/lib3ds/Manifest2
-rw-r--r--media-libs/lib3ds/files/lib3ds-1.3.0-r1-mesh.c.patch17
-rw-r--r--media-libs/lib3ds/files/lib3ds-1.3.0-r1-pkgconfig.patch94
-rw-r--r--media-libs/lib3ds/files/lib3ds-2.0.0_rc1-underlinking-no-autoreconf.patch45
-rw-r--r--media-libs/lib3ds/files/lib3ds-2.0.0_rc1-underlinking.patch56
-rw-r--r--media-libs/lib3ds/lib3ds-1.3.0-r1.ebuild25
-rw-r--r--media-libs/lib3ds/lib3ds-2.0.0_rc1.ebuild30
-rw-r--r--media-libs/lib3ds/metadata.xml12
-rw-r--r--media-libs/libXcm/Manifest2
-rw-r--r--media-libs/libXcm/libXcm-0.5.2-r1.ebuild31
-rw-r--r--media-libs/libXcm/libXcm-0.5.3.ebuild31
-rw-r--r--media-libs/libXcm/libXcm-9999.ebuild31
-rw-r--r--media-libs/libXcm/metadata.xml9
-rw-r--r--media-libs/libaacplus/Manifest2
-rw-r--r--media-libs/libaacplus/libaacplus-2.0.2-r2.ebuild61
-rw-r--r--media-libs/libaacplus/metadata.xml5
-rw-r--r--media-libs/libaacs/Manifest3
-rw-r--r--media-libs/libaacs/libaacs-0.7.1.ebuild33
-rw-r--r--media-libs/libaacs/libaacs-0.8.0.ebuild33
-rw-r--r--media-libs/libaacs/libaacs-0.8.1.ebuild33
-rw-r--r--media-libs/libaacs/metadata.xml5
-rw-r--r--media-libs/libafterimage/Manifest1
-rw-r--r--media-libs/libafterimage/files/libafterimage-config.patch15
-rw-r--r--media-libs/libafterimage/files/libafterimage-gif.patch18
-rw-r--r--media-libs/libafterimage/files/libafterimage-giflib42.patch19
-rw-r--r--media-libs/libafterimage/files/libafterimage-libpng15.patch31
-rw-r--r--media-libs/libafterimage/files/libafterimage-makefile.in.patch62
-rw-r--r--media-libs/libafterimage/libafterimage-1.20.ebuild95
-rw-r--r--media-libs/libafterimage/metadata.xml16
-rw-r--r--media-libs/libao/Manifest2
-rw-r--r--media-libs/libao/libao-1.1.0-r1.ebuild45
-rw-r--r--media-libs/libao/libao-1.1.0-r2.ebuild51
-rw-r--r--media-libs/libao/libao-1.2.0.ebuild51
-rw-r--r--media-libs/libao/metadata.xml5
-rw-r--r--media-libs/libart_lgpl/Manifest1
-rw-r--r--media-libs/libart_lgpl/files/libart_lgpl-2.3.21-crosscompile.patch79
-rw-r--r--media-libs/libart_lgpl/files/libart_lgpl-2.3.21-no-test-build.patch22
-rw-r--r--media-libs/libart_lgpl/libart_lgpl-2.3.21-r2.ebuild53
-rw-r--r--media-libs/libart_lgpl/metadata.xml5
-rw-r--r--media-libs/libass/Manifest9
-rw-r--r--media-libs/libass/libass-0.10.1.ebuild40
-rw-r--r--media-libs/libass/libass-0.10.2.ebuild40
-rw-r--r--media-libs/libass/libass-0.11.1.ebuild46
-rw-r--r--media-libs/libass/libass-0.11.2.ebuild46
-rw-r--r--media-libs/libass/libass-0.12.0.ebuild46
-rw-r--r--media-libs/libass/libass-0.12.1.ebuild46
-rw-r--r--media-libs/libass/libass-0.12.2.ebuild46
-rw-r--r--media-libs/libass/libass-0.12.3.ebuild46
-rw-r--r--media-libs/libass/libass-0.9.13.ebuild37
-rw-r--r--media-libs/libass/metadata.xml12
-rw-r--r--media-libs/libbdplus/Manifest1
-rw-r--r--media-libs/libbdplus/libbdplus-0.1.2.ebuild36
-rw-r--r--media-libs/libbdplus/libbdplus-9999.ebuild36
-rw-r--r--media-libs/libbdplus/metadata.xml8
-rw-r--r--media-libs/libbluray/Manifest6
-rw-r--r--media-libs/libbluray/files/90libbluray1
-rw-r--r--media-libs/libbluray/libbluray-0.5.0-r1.ebuild92
-rw-r--r--media-libs/libbluray/libbluray-0.5.0.ebuild90
-rw-r--r--media-libs/libbluray/libbluray-0.6.1.ebuild92
-rw-r--r--media-libs/libbluray/libbluray-0.6.2.ebuild92
-rw-r--r--media-libs/libbluray/libbluray-0.7.0.ebuild95
-rw-r--r--media-libs/libbluray/libbluray-0.8.0.ebuild94
-rw-r--r--media-libs/libbluray/libbluray-0.8.1.ebuild94
-rw-r--r--media-libs/libbluray/libbluray-9999.ebuild93
-rw-r--r--media-libs/libbluray/metadata.xml11
-rw-r--r--media-libs/libbmp/Manifest1
-rw-r--r--media-libs/libbmp/libbmp-0.1.3.ebuild28
-rw-r--r--media-libs/libbmp/metadata.xml11
-rw-r--r--media-libs/libbs2b/Manifest1
-rw-r--r--media-libs/libbs2b/files/3.1.0-format-security.patch11
-rw-r--r--media-libs/libbs2b/libbs2b-3.1.0-r1.ebuild23
-rw-r--r--media-libs/libbs2b/libbs2b-3.1.0-r2.ebuild27
-rw-r--r--media-libs/libbs2b/metadata.xml12
-rw-r--r--media-libs/libbsb/Manifest1
-rw-r--r--media-libs/libbsb/libbsb-0.0.7.ebuild27
-rw-r--r--media-libs/libbsb/metadata.xml10
-rw-r--r--media-libs/libcaca/Manifest2
-rw-r--r--media-libs/libcaca/files/libcaca-0.99_beta18-fix-tests.patch61
-rw-r--r--media-libs/libcaca/files/libcaca-0.99_beta18-latex_hacks.patch14
-rw-r--r--media-libs/libcaca/libcaca-0.99_beta18-r2.ebuild138
-rw-r--r--media-libs/libcaca/libcaca-0.99_beta19.ebuild151
-rw-r--r--media-libs/libcaca/metadata.xml8
-rw-r--r--media-libs/libcanberra/Manifest1
-rw-r--r--media-libs/libcanberra/files/libcanberra-0.30-wayland.patch64
-rw-r--r--media-libs/libcanberra/files/libcanberra-gtk-module.sh16
-rw-r--r--media-libs/libcanberra/libcanberra-0.30-r4.ebuild76
-rw-r--r--media-libs/libcanberra/libcanberra-0.30-r5.ebuild84
-rw-r--r--media-libs/libcanberra/metadata.xml32
-rw-r--r--media-libs/libcdaudio/Manifest1
-rw-r--r--media-libs/libcdaudio/files/libcdaudio-0.99-CAN-2005-0706.patch12
-rw-r--r--media-libs/libcdaudio/files/libcdaudio-0.99.12-bug245649.patch13
-rw-r--r--media-libs/libcdaudio/libcdaudio-0.99.12-r1.ebuild31
-rw-r--r--media-libs/libcdaudio/metadata.xml8
-rw-r--r--media-libs/libcddb/Manifest1
-rw-r--r--media-libs/libcddb/libcddb-1.3.2-r1.ebuild47
-rw-r--r--media-libs/libcddb/libcddb-1.3.2.ebuild49
-rw-r--r--media-libs/libcddb/metadata.xml8
-rw-r--r--media-libs/libcdr/Manifest4
-rw-r--r--media-libs/libcdr/libcdr-0.0.14.ebuild53
-rw-r--r--media-libs/libcdr/libcdr-0.0.16.ebuild52
-rw-r--r--media-libs/libcdr/libcdr-0.1.0.ebuild51
-rw-r--r--media-libs/libcdr/libcdr-0.1.1.ebuild51
-rw-r--r--media-libs/libcdr/libcdr-9999.ebuild51
-rw-r--r--media-libs/libcdr/metadata.xml5
-rw-r--r--media-libs/libchamplain/Manifest2
-rw-r--r--media-libs/libchamplain/libchamplain-0.12.10-r1.ebuild67
-rw-r--r--media-libs/libchamplain/libchamplain-0.12.10.ebuild68
-rw-r--r--media-libs/libchamplain/libchamplain-0.12.9.ebuild68
-rw-r--r--media-libs/libchamplain/metadata.xml8
-rw-r--r--media-libs/libclalsadrv/Manifest2
-rw-r--r--media-libs/libclalsadrv/files/libclalsadrv-1.2.2-makefile.patch30
-rw-r--r--media-libs/libclalsadrv/files/libclalsadrv-2.0.0-makefile.patch28
-rw-r--r--media-libs/libclalsadrv/libclalsadrv-1.2.2.ebuild36
-rw-r--r--media-libs/libclalsadrv/libclalsadrv-2.0.0.ebuild36
-rw-r--r--media-libs/libclalsadrv/metadata.xml5
-rw-r--r--media-libs/libclastfm/Manifest1
-rw-r--r--media-libs/libclastfm/libclastfm-0.5.ebuild29
-rw-r--r--media-libs/libclastfm/metadata.xml8
-rw-r--r--media-libs/libclthreads/Manifest3
-rw-r--r--media-libs/libclthreads/files/libclthreads-1.0.2-makefile.patch23
-rw-r--r--media-libs/libclthreads/files/libclthreads-2.2.1-Makefile.patch39
-rw-r--r--media-libs/libclthreads/files/libclthreads-2.4.0-Makefile.patch42
-rw-r--r--media-libs/libclthreads/libclthreads-1.0.2.ebuild32
-rw-r--r--media-libs/libclthreads/libclthreads-2.2.1.ebuild34
-rw-r--r--media-libs/libclthreads/libclthreads-2.4.0-r1.ebuild34
-rw-r--r--media-libs/libclthreads/libclthreads-2.4.0.ebuild34
-rw-r--r--media-libs/libclthreads/metadata.xml5
-rw-r--r--media-libs/libclxclient/Manifest4
-rw-r--r--media-libs/libclxclient/files/libclxclient-1.0.1-gcc41.patch31
-rw-r--r--media-libs/libclxclient/files/libclxclient-1.0.1-makefile.patch30
-rw-r--r--media-libs/libclxclient/files/libclxclient-3.3.2-Makefile.patch32
-rw-r--r--media-libs/libclxclient/files/libclxclient-3.6.1-Makefile.patch37
-rw-r--r--media-libs/libclxclient/files/libclxclient-3.9.0-Makefile.patch46
-rw-r--r--media-libs/libclxclient/libclxclient-1.0.1.ebuild36
-rw-r--r--media-libs/libclxclient/libclxclient-3.3.2.ebuild38
-rw-r--r--media-libs/libclxclient/libclxclient-3.6.1.ebuild40
-rw-r--r--media-libs/libclxclient/libclxclient-3.9.0.ebuild40
-rw-r--r--media-libs/libclxclient/metadata.xml5
-rw-r--r--media-libs/libcue/Manifest1
-rw-r--r--media-libs/libcue/libcue-1.4.0.ebuild29
-rw-r--r--media-libs/libcue/metadata.xml8
-rw-r--r--media-libs/libcuefile/Manifest1
-rw-r--r--media-libs/libcuefile/libcuefile-477-r1.ebuild26
-rw-r--r--media-libs/libcuefile/libcuefile-477.ebuild24
-rw-r--r--media-libs/libcuefile/metadata.xml5
-rw-r--r--media-libs/libdc1394/Manifest5
-rw-r--r--media-libs/libdc1394/files/libdc1394-2.2.1-includes.patch29
-rw-r--r--media-libs/libdc1394/files/libdc1394-2.2.1-pthread.patch13
-rw-r--r--media-libs/libdc1394/files/libdc1394-usbinit.patch39
-rw-r--r--media-libs/libdc1394/files/libdc1394-videodev.h.patch53
-rw-r--r--media-libs/libdc1394/libdc1394-2.1.3-r1.ebuild49
-rw-r--r--media-libs/libdc1394/libdc1394-2.1.4.ebuild40
-rw-r--r--media-libs/libdc1394/libdc1394-2.2.1.ebuild54
-rw-r--r--media-libs/libdc1394/libdc1394-2.2.3.ebuild53
-rw-r--r--media-libs/libdc1394/metadata.xml11
-rw-r--r--media-libs/libdca/Manifest2
-rw-r--r--media-libs/libdca/files/libdca-0.0.5-cflags.patch12
-rw-r--r--media-libs/libdca/files/libdca-0.0.5-tests-optional.patch15
-rw-r--r--media-libs/libdca/libdca-0.0.5-r3.ebuild57
-rw-r--r--media-libs/libdca/metadata.xml5
-rw-r--r--media-libs/libde265/Manifest1
-rw-r--r--media-libs/libde265/libde265-0.9.ebuild43
-rw-r--r--media-libs/libde265/libde265-9999.ebuild43
-rw-r--r--media-libs/libde265/metadata.xml20
-rw-r--r--media-libs/libdiscid/Manifest4
-rw-r--r--media-libs/libdiscid/libdiscid-0.2.2.ebuild25
-rw-r--r--media-libs/libdiscid/libdiscid-0.3.0.ebuild18
-rw-r--r--media-libs/libdiscid/libdiscid-0.5.0.ebuild18
-rw-r--r--media-libs/libdiscid/libdiscid-0.6.1.ebuild18
-rw-r--r--media-libs/libdiscid/metadata.xml10
-rw-r--r--media-libs/libdlna/Manifest1
-rw-r--r--media-libs/libdlna/files/libdlna-0.2.4-ffmpeg.patch22
-rw-r--r--media-libs/libdlna/files/libdlna-0.2.4-libav9.patch11
-rw-r--r--media-libs/libdlna/libdlna-0.2.4.ebuild40
-rw-r--r--media-libs/libdlna/metadata.xml7
-rw-r--r--media-libs/libdmtx/Manifest1
-rw-r--r--media-libs/libdmtx/libdmtx-0.7.4.ebuild27
-rw-r--r--media-libs/libdmtx/metadata.xml8
-rw-r--r--media-libs/libdv/Manifest2
-rw-r--r--media-libs/libdv/files/libdv-0.99-2.6.patch17
-rw-r--r--media-libs/libdv/libdv-1.0.0-r2.ebuild48
-rw-r--r--media-libs/libdv/libdv-1.0.0-r3.ebuild52
-rw-r--r--media-libs/libdv/metadata.xml11
-rw-r--r--media-libs/libdvb/Manifest1
-rw-r--r--media-libs/libdvb/files/libdvb-0.5.5.1-autotools.patch617
-rw-r--r--media-libs/libdvb/files/libdvb-0.5.5.1-gcc43.patch20
-rw-r--r--media-libs/libdvb/files/libdvb-0.5.5.1-gentoo-file-collisions.patch129
-rw-r--r--media-libs/libdvb/files/libdvb-0.5.5.1-gentoo.patch33
-rw-r--r--media-libs/libdvb/files/libdvb-0.5.5.1-rename-analyze.patch129
-rw-r--r--media-libs/libdvb/libdvb-0.5.5.1-r3.ebuild50
-rw-r--r--media-libs/libdvb/metadata.xml5
-rw-r--r--media-libs/libdvbpsi/Manifest6
-rw-r--r--media-libs/libdvbpsi/libdvbpsi-0.2.1.ebuild44
-rw-r--r--media-libs/libdvbpsi/libdvbpsi-0.2.2.ebuild44
-rw-r--r--media-libs/libdvbpsi/libdvbpsi-1.1.0.ebuild44
-rw-r--r--media-libs/libdvbpsi/libdvbpsi-1.1.2.ebuild44
-rw-r--r--media-libs/libdvbpsi/libdvbpsi-1.2.0.ebuild44
-rw-r--r--media-libs/libdvbpsi/libdvbpsi-1.3.0-r1.ebuild45
-rw-r--r--media-libs/libdvbpsi/libdvbpsi-1.3.0.ebuild44
-rw-r--r--media-libs/libdvbpsi/metadata.xml6
-rw-r--r--media-libs/libdvdcss/Manifest3
-rw-r--r--media-libs/libdvdcss/libdvdcss-1.2.13-r1.ebuild31
-rw-r--r--media-libs/libdvdcss/libdvdcss-1.2.13.ebuild31
-rw-r--r--media-libs/libdvdcss/libdvdcss-1.3.0.ebuild31
-rw-r--r--media-libs/libdvdcss/libdvdcss-1.3.99.ebuild31
-rw-r--r--media-libs/libdvdcss/metadata.xml8
-rw-r--r--media-libs/libdvdnav/Manifest3
-rw-r--r--media-libs/libdvdnav/files/libdvdnav-4.2.0-pkgconfig.patch54
-rw-r--r--media-libs/libdvdnav/libdvdnav-4.2.1.ebuild46
-rw-r--r--media-libs/libdvdnav/libdvdnav-5.0.1.ebuild39
-rw-r--r--media-libs/libdvdnav/libdvdnav-5.0.3.ebuild31
-rw-r--r--media-libs/libdvdnav/libdvdnav-9999.ebuild33
-rw-r--r--media-libs/libdvdnav/metadata.xml8
-rw-r--r--media-libs/libdvdplay/Manifest1
-rw-r--r--media-libs/libdvdplay/libdvdplay-1.0.1.ebuild35
-rw-r--r--media-libs/libdvdplay/metadata.xml8
-rw-r--r--media-libs/libdvdread/Manifest4
-rw-r--r--media-libs/libdvdread/libdvdread-4.2.1.ebuild48
-rw-r--r--media-libs/libdvdread/libdvdread-5.0.0-r2.ebuild40
-rw-r--r--media-libs/libdvdread/libdvdread-5.0.2.ebuild30
-rw-r--r--media-libs/libdvdread/libdvdread-5.0.3.ebuild30
-rw-r--r--media-libs/libdvdread/libdvdread-9999.ebuild30
-rw-r--r--media-libs/libdvdread/metadata.xml8
-rw-r--r--media-libs/libechonest/Manifest4
-rw-r--r--media-libs/libechonest/files/libechonest-2.0.1-Werror.patch43
-rw-r--r--media-libs/libechonest/files/libechonest-2.2.0-always_use_QJSON_LIBRARIES.patch23
-rw-r--r--media-libs/libechonest/libechonest-2.0.2.ebuild28
-rw-r--r--media-libs/libechonest/libechonest-2.2.0-r1.ebuild38
-rw-r--r--media-libs/libechonest/libechonest-2.3.0.ebuild68
-rw-r--r--media-libs/libechonest/libechonest-2.3.1.ebuild70
-rw-r--r--media-libs/libechonest/metadata.xml14
-rw-r--r--media-libs/libemf/Manifest2
-rw-r--r--media-libs/libemf/files/libemf-1.0.4-amd64-alpha.patch95
-rw-r--r--media-libs/libemf/libemf-1.0.4-r1.ebuild38
-rw-r--r--media-libs/libemf/libemf-1.0.7.ebuild36
-rw-r--r--media-libs/libemf/metadata.xml10
-rw-r--r--media-libs/libepoxy/Manifest1
-rw-r--r--media-libs/libepoxy/libepoxy-1.2.ebuild43
-rw-r--r--media-libs/libepoxy/libepoxy-9999.ebuild43
-rw-r--r--media-libs/libepoxy/metadata.xml8
-rw-r--r--media-libs/libexif-gtk/Manifest1
-rw-r--r--media-libs/libexif-gtk/files/libexif-gtk-0.3.5-confcheck.patch20
-rw-r--r--media-libs/libexif-gtk/files/libexif-gtk-0.3.5-gtk212.patch24
-rw-r--r--media-libs/libexif-gtk/libexif-gtk-0.3.5-r2.ebuild41
-rw-r--r--media-libs/libexif-gtk/metadata.xml8
-rw-r--r--media-libs/libexif/Manifest1
-rw-r--r--media-libs/libexif/files/libexif-0.6.13-pkgconfig.patch11
-rw-r--r--media-libs/libexif/libexif-0.6.21-r1.ebuild46
-rw-r--r--media-libs/libexif/libexif-0.6.21.ebuild41
-rw-r--r--media-libs/libexif/metadata.xml8
-rw-r--r--media-libs/libextractor/Manifest2
-rw-r--r--media-libs/libextractor/libextractor-1.0.1.ebuild129
-rw-r--r--media-libs/libextractor/libextractor-1.3.ebuild114
-rw-r--r--media-libs/libextractor/metadata.xml15
-rw-r--r--media-libs/libfame/Manifest2
-rw-r--r--media-libs/libfame/files/libfame-0.9.1-gcc43.patch33
-rw-r--r--media-libs/libfame/files/libfame-0.9.1-mmx-configure.ac.patch20
-rw-r--r--media-libs/libfame/libfame-0.9.1-r1.ebuild37
-rw-r--r--media-libs/libfame/libfame-0.9.1-r2.ebuild44
-rw-r--r--media-libs/libfame/metadata.xml11
-rw-r--r--media-libs/libfishsound/Manifest1
-rw-r--r--media-libs/libfishsound/files/libfishsound-1.0.0-pc.patch13
-rw-r--r--media-libs/libfishsound/libfishsound-1.0.0.ebuild48
-rw-r--r--media-libs/libfishsound/metadata.xml5
-rw-r--r--media-libs/libfpx/Manifest1
-rw-r--r--media-libs/libfpx/files/libfpx-1.2.0.13-export-symbols.patch14
-rw-r--r--media-libs/libfpx/libfpx-1.3.0-r1.ebuild36
-rw-r--r--media-libs/libfpx/metadata.xml5
-rw-r--r--media-libs/libfreehand/Manifest3
-rw-r--r--media-libs/libfreehand/libfreehand-0.0.0.ebuild50
-rw-r--r--media-libs/libfreehand/libfreehand-0.1.0.ebuild49
-rw-r--r--media-libs/libfreehand/libfreehand-0.1.1.ebuild51
-rw-r--r--media-libs/libfreehand/libfreehand-9999.ebuild51
-rw-r--r--media-libs/libfreehand/metadata.xml5
-rw-r--r--media-libs/libggi/Manifest1
-rw-r--r--media-libs/libggi/libggi-2.2.2.ebuild62
-rw-r--r--media-libs/libggi/metadata.xml14
-rw-r--r--media-libs/libggigcp/Manifest1
-rw-r--r--media-libs/libggigcp/libggigcp-1.0.2.ebuild20
-rw-r--r--media-libs/libggigcp/metadata.xml11
-rw-r--r--media-libs/libggimisc/Manifest1
-rw-r--r--media-libs/libggimisc/libggimisc-2.2.2.ebuild32
-rw-r--r--media-libs/libggimisc/metadata.xml11
-rw-r--r--media-libs/libggiwmh/Manifest1
-rw-r--r--media-libs/libggiwmh/libggiwmh-0.3.2.ebuild29
-rw-r--r--media-libs/libggiwmh/metadata.xml11
-rw-r--r--media-libs/libgig/Manifest2
-rw-r--r--media-libs/libgig/libgig-3.3.0.ebuild38
-rw-r--r--media-libs/libgig/libgig-4.0.0.ebuild39
-rw-r--r--media-libs/libgig/metadata.xml5
-rw-r--r--media-libs/libgii/Manifest1
-rw-r--r--media-libs/libgii/files/libgii-0.9.0-linux26-headers.patch12
-rw-r--r--media-libs/libgii/files/libgii-1.0.2-configure-cpuid-pic.patch13
-rw-r--r--media-libs/libgii/files/libgii-1.0.2-libtool_1.5_compat.patch19
-rw-r--r--media-libs/libgii/libgii-1.0.2-r1.ebuild45
-rw-r--r--media-libs/libgii/metadata.xml11
-rw-r--r--media-libs/libgltf/Manifest2
-rw-r--r--media-libs/libgltf/libgltf-0.0.1.ebuild51
-rw-r--r--media-libs/libgltf/libgltf-0.0.2.ebuild51
-rw-r--r--media-libs/libgltf/libgltf-9999.ebuild51
-rw-r--r--media-libs/libgltf/metadata.xml5
-rw-r--r--media-libs/libgphoto2/Manifest2
-rw-r--r--media-libs/libgphoto2/libgphoto2-2.5.5.1-r1.ebuild233
-rw-r--r--media-libs/libgphoto2/libgphoto2-2.5.7.ebuild216
-rw-r--r--media-libs/libgphoto2/metadata.xml12
-rw-r--r--media-libs/libgpod/Manifest1
-rw-r--r--media-libs/libgpod/libgpod-0.8.3.ebuild73
-rw-r--r--media-libs/libgpod/metadata.xml15
-rw-r--r--media-libs/libharu/Manifest1
-rw-r--r--media-libs/libharu/files/libharu-2.2.1-libpng-1.5.patch344
-rw-r--r--media-libs/libharu/files/libharu-2.3.0-dont-force-strip.patch22
-rw-r--r--media-libs/libharu/libharu-2.3.0-r1.ebuild37
-rw-r--r--media-libs/libharu/metadata.xml21
-rw-r--r--media-libs/libhdhomerun/Manifest3
-rw-r--r--media-libs/libhdhomerun/files/dont-strip.patch13
-rw-r--r--media-libs/libhdhomerun/libhdhomerun-20130117.ebuild37
-rw-r--r--media-libs/libhdhomerun/libhdhomerun-20130328.ebuild37
-rw-r--r--media-libs/libhdhomerun/libhdhomerun-20140121.ebuild37
-rw-r--r--media-libs/libhdhomerun/metadata.xml9
-rw-r--r--media-libs/libicns/Manifest3
-rw-r--r--media-libs/libicns/libicns-0.7.1.ebuild33
-rw-r--r--media-libs/libicns/libicns-0.8.0.ebuild29
-rw-r--r--media-libs/libicns/libicns-0.8.1.ebuild29
-rw-r--r--media-libs/libicns/metadata.xml8
-rw-r--r--media-libs/libid3tag/Manifest1
-rw-r--r--media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-64bit-long.patch24
-rw-r--r--media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-a_capella.patch35
-rw-r--r--media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-compat.patch13
-rw-r--r--media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-file-write.patch52
-rw-r--r--media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-fix_overflow.patch11
-rw-r--r--media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-tag.patch17
-rw-r--r--media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-unknown-encoding.patch27
-rw-r--r--media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-utf16.patchlibid3tag-0.15.1b-utf16.patch21
-rw-r--r--media-libs/libid3tag/files/id3tag.pc11
-rw-r--r--media-libs/libid3tag/libid3tag-0.15.1b-r4.ebuild51
-rw-r--r--media-libs/libid3tag/metadata.xml8
-rw-r--r--media-libs/libiec61883/Manifest1
-rw-r--r--media-libs/libiec61883/libiec61883-1.2.0-r1.ebuild32
-rw-r--r--media-libs/libiec61883/metadata.xml17
-rw-r--r--media-libs/libifp/Manifest1
-rw-r--r--media-libs/libifp/libifp-1.0.0.2.ebuild57
-rw-r--r--media-libs/libifp/metadata.xml8
-rw-r--r--media-libs/libilbc/Manifest1
-rw-r--r--media-libs/libilbc/libilbc-1.1.1.ebuild33
-rw-r--r--media-libs/libilbc/libilbc-9999.ebuild33
-rw-r--r--media-libs/libilbc/metadata.xml9
-rw-r--r--media-libs/libipod/Manifest1
-rw-r--r--media-libs/libipod/files/libipod-0.1-prototypes.patch101
-rw-r--r--media-libs/libipod/libipod-0.1.ebuild27
-rw-r--r--media-libs/libipod/metadata.xml11
-rw-r--r--media-libs/libiptcdata/Manifest1
-rw-r--r--media-libs/libiptcdata/libiptcdata-1.0.4-r1.ebuild51
-rw-r--r--media-libs/libiptcdata/libiptcdata-1.0.4.ebuild78
-rw-r--r--media-libs/libiptcdata/metadata.xml22
-rw-r--r--media-libs/libirman/Manifest1
-rw-r--r--media-libs/libirman/libirman-0.4.5.ebuild31
-rw-r--r--media-libs/libirman/metadata.xml7
-rw-r--r--media-libs/libjackasyn/Manifest1
-rw-r--r--media-libs/libjackasyn/files/libjackasyn-0.10-destdir.patch32
-rw-r--r--media-libs/libjackasyn/files/libjackasyn-0.13-execprefix.patch23
-rw-r--r--media-libs/libjackasyn/files/libjackasyn-0.13-libdir.patch27
-rw-r--r--media-libs/libjackasyn/files/libjackasyn-0.13-pic.patch47
-rw-r--r--media-libs/libjackasyn/files/libjackasyn-0.13-qa.patch48
-rw-r--r--media-libs/libjackasyn/files/libjackasyn-0.13-tests.patch13
-rw-r--r--media-libs/libjackasyn/libjackasyn-0.13.ebuild41
-rw-r--r--media-libs/libjackasyn/metadata.xml5
-rw-r--r--media-libs/libjpeg-turbo/Manifest6
-rw-r--r--media-libs/libjpeg-turbo/files/libjpeg-turbo-1.2.0-x32.patch38
-rw-r--r--media-libs/libjpeg-turbo/files/libjpeg-turbo-1.3.0-CVE-2013-6629-and-6630.patch38
-rw-r--r--media-libs/libjpeg-turbo/files/libjpeg-turbo-1.3.1-jstdhuff.patch301
-rw-r--r--media-libs/libjpeg-turbo/files/libjpeg-turbo-1.3.1-overrun.patch21
-rw-r--r--media-libs/libjpeg-turbo/libjpeg-turbo-1.3.0-r3.ebuild122
-rw-r--r--media-libs/libjpeg-turbo/libjpeg-turbo-1.3.1-r1.ebuild118
-rw-r--r--media-libs/libjpeg-turbo/libjpeg-turbo-1.3.1.ebuild121
-rw-r--r--media-libs/libjpeg-turbo/libjpeg-turbo-1.4.0.ebuild116
-rw-r--r--media-libs/libjpeg-turbo/libjpeg-turbo-1.4.1.ebuild117
-rw-r--r--media-libs/libjpeg-turbo/metadata.xml16
-rw-r--r--media-libs/libjsw/Manifest1
-rw-r--r--media-libs/libjsw/files/libjsw-1.5.8-build.patch110
-rw-r--r--media-libs/libjsw/libjsw-1.5.8.ebuild45
-rw-r--r--media-libs/libjsw/metadata.xml8
-rw-r--r--media-libs/libkarma/Manifest1
-rw-r--r--media-libs/libkarma/files/libkarma-0.1.0-ldflags.patch11
-rw-r--r--media-libs/libkarma/libkarma-0.1.2.ebuild39
-rw-r--r--media-libs/libkarma/metadata.xml6
-rw-r--r--media-libs/libkate/Manifest3
-rw-r--r--media-libs/libkate/files/libkate-0.3.7-libpng14.patch38
-rw-r--r--media-libs/libkate/libkate-0.3.7.ebuild58
-rw-r--r--media-libs/libkate/libkate-0.3.8.ebuild56
-rw-r--r--media-libs/libkate/libkate-0.4.1.ebuild56
-rw-r--r--media-libs/libkate/metadata.xml18
-rw-r--r--media-libs/libkface/Manifest4
-rw-r--r--media-libs/libkface/files/libkface-4.7.0-histogram.patch30
-rw-r--r--media-libs/libkface/libkface-4.10.0.ebuild26
-rw-r--r--media-libs/libkface/libkface-4.12.0.ebuild24
-rw-r--r--media-libs/libkface/libkface-4.4.0.ebuild38
-rw-r--r--media-libs/libkface/libkface-4.7.0-r1.ebuild28
-rw-r--r--media-libs/libkface/metadata.xml5
-rw-r--r--media-libs/libkgeomap/Manifest4
-rw-r--r--media-libs/libkgeomap/libkgeomap-4.10.0.ebuild29
-rw-r--r--media-libs/libkgeomap/libkgeomap-4.12.0.ebuild27
-rw-r--r--media-libs/libkgeomap/libkgeomap-4.4.0.ebuild29
-rw-r--r--media-libs/libkgeomap/libkgeomap-4.7.0.ebuild29
-rw-r--r--media-libs/libkgeomap/metadata.xml5
-rw-r--r--media-libs/liblastfm/Manifest2
-rw-r--r--media-libs/liblastfm/liblastfm-1.0.8.ebuild50
-rw-r--r--media-libs/liblastfm/liblastfm-1.0.9.ebuild85
-rw-r--r--media-libs/liblastfm/metadata.xml11
-rw-r--r--media-libs/liblingoteach/Manifest1
-rw-r--r--media-libs/liblingoteach/liblingoteach-0.2.3.ebuild31
-rw-r--r--media-libs/liblingoteach/metadata.xml8
-rw-r--r--media-libs/liblo/Manifest3
-rw-r--r--media-libs/liblo/files/liblo-0.27-no-threads.patch15
-rw-r--r--media-libs/liblo/liblo-0.26.ebuild35
-rw-r--r--media-libs/liblo/liblo-0.27.ebuild43
-rw-r--r--media-libs/liblo/liblo-0.28.ebuild41
-rw-r--r--media-libs/liblo/metadata.xml9
-rw-r--r--media-libs/liblqr/Manifest1
-rw-r--r--media-libs/liblqr/liblqr-0.4.2-r1.ebuild30
-rw-r--r--media-libs/liblqr/metadata.xml8
-rw-r--r--media-libs/liblrdf/Manifest1
-rw-r--r--media-libs/liblrdf/liblrdf-0.5.0.ebuild46
-rw-r--r--media-libs/liblrdf/metadata.xml8
-rw-r--r--media-libs/liblscp/Manifest2
-rw-r--r--media-libs/liblscp/liblscp-0.5.5.ebuild24
-rw-r--r--media-libs/liblscp/liblscp-0.5.6.ebuild24
-rw-r--r--media-libs/liblscp/metadata.xml5
-rw-r--r--media-libs/libmad/Manifest1
-rw-r--r--media-libs/libmad/files/libmad-0.15.1b-cflags-O2.patch12
-rw-r--r--media-libs/libmad/files/libmad-0.15.1b-cflags.patch146
-rw-r--r--media-libs/libmad/files/libmad-0.15.1b-gcc44-mips-h-constraint-removal.patch77
-rw-r--r--media-libs/libmad/files/mad.pc11
-rw-r--r--media-libs/libmad/libmad-0.15.1b-r8.ebuild78
-rw-r--r--media-libs/libmad/metadata.xml8
-rw-r--r--media-libs/libmatroska/Manifest5
-rw-r--r--media-libs/libmatroska/files/libmatroska-1.0.0-respectflags.patch11
-rw-r--r--media-libs/libmatroska/files/libmatroska-1.4.1-flags.patch11
-rw-r--r--media-libs/libmatroska/libmatroska-1.2.0.ebuild41
-rw-r--r--media-libs/libmatroska/libmatroska-1.3.0.ebuild49
-rw-r--r--media-libs/libmatroska/libmatroska-1.4.0.ebuild49
-rw-r--r--media-libs/libmatroska/libmatroska-1.4.1.ebuild49
-rw-r--r--media-libs/libmatroska/libmatroska-1.4.2.ebuild20
-rw-r--r--media-libs/libmatroska/metadata.xml11
-rw-r--r--media-libs/libmediaart/Manifest3
-rw-r--r--media-libs/libmediaart/files/libmediaart-0.7.0-qt5.patch47
-rw-r--r--media-libs/libmediaart/libmediaart-0.4.0.ebuild60
-rw-r--r--media-libs/libmediaart/libmediaart-0.7.0.ebuild64
-rw-r--r--media-libs/libmediaart/libmediaart-1.9.0.ebuild80
-rw-r--r--media-libs/libmediaart/metadata.xml8
-rw-r--r--media-libs/libmediainfo/Manifest3
-rw-r--r--media-libs/libmediainfo/files/libmediainfo-0.7.63-pkgconfig.patch10
-rw-r--r--media-libs/libmediainfo/libmediainfo-0.7.65.ebuild79
-rw-r--r--media-libs/libmediainfo/libmediainfo-0.7.72.ebuild79
-rw-r--r--media-libs/libmediainfo/libmediainfo-0.7.73.ebuild79
-rw-r--r--media-libs/libmediainfo/metadata.xml8
-rw-r--r--media-libs/libmetalink/Manifest2
-rw-r--r--media-libs/libmetalink/libmetalink-0.1.0-r1.ebuild30
-rw-r--r--media-libs/libmetalink/libmetalink-0.1.1-r1.ebuild31
-rw-r--r--media-libs/libmetalink/libmetalink-0.1.1.ebuild28
-rw-r--r--media-libs/libmetalink/metadata.xml11
-rw-r--r--media-libs/libmikmod/Manifest4
-rw-r--r--media-libs/libmikmod/files/3.2.0/001_all_64bit.patch26
-rw-r--r--media-libs/libmikmod/files/3.2.0/002_all_strip-lib.patch13
-rw-r--r--media-libs/libmikmod/files/3.2.0/003_all_multilib.patch35
-rw-r--r--media-libs/libmikmod/files/3.2.0/004_all_malloc-fail.patch22
-rw-r--r--media-libs/libmikmod/files/3.2.0/005_all_CVE-2007-6720.patch109
-rw-r--r--media-libs/libmikmod/files/3.2.0/006_all_CVE-2009-0179.patch12
-rw-r--r--media-libs/libmikmod/files/3.2.0/007_all_loopingvolume-fix.patch21
-rw-r--r--media-libs/libmikmod/files/3.2.0/008_all_ldflags.patch15
-rw-r--r--media-libs/libmikmod/files/3.2.0/009_all_shell.patch17
-rw-r--r--media-libs/libmikmod/files/3.2.0/010_all_altivec.patch13
-rw-r--r--media-libs/libmikmod/libmikmod-3.2.0.ebuild63
-rw-r--r--media-libs/libmikmod/libmikmod-3.3.5.ebuild65
-rw-r--r--media-libs/libmikmod/libmikmod-3.3.6-r1.ebuild69
-rw-r--r--media-libs/libmikmod/libmikmod-3.3.7.ebuild70
-rw-r--r--media-libs/libmikmod/metadata.xml8
-rw-r--r--media-libs/libmimic/Manifest1
-rw-r--r--media-libs/libmimic/libmimic-1.0.4-r2.ebuild42
-rw-r--r--media-libs/libmimic/metadata.xml10
-rw-r--r--media-libs/libmkv/Manifest1
-rw-r--r--media-libs/libmkv/libmkv-0.6.5.1.ebuild20
-rw-r--r--media-libs/libmkv/metadata.xml13
-rw-r--r--media-libs/libmms/Manifest2
-rw-r--r--media-libs/libmms/libmms-0.6.2-r1.ebuild26
-rw-r--r--media-libs/libmms/libmms-0.6.2.ebuild30
-rw-r--r--media-libs/libmms/libmms-0.6.4.ebuild27
-rw-r--r--media-libs/libmms/metadata.xml12
-rw-r--r--media-libs/libmng/Manifest2
-rw-r--r--media-libs/libmng/files/libmng-2.0.2-jpeg-9a.patch39
-rw-r--r--media-libs/libmng/files/libmng-2.0.2-stdio.patch14
-rw-r--r--media-libs/libmng/libmng-2.0.2-r1.ebuild48
-rw-r--r--media-libs/libmng/libmng-2.0.3.ebuild45
-rw-r--r--media-libs/libmng/metadata.xml8
-rw-r--r--media-libs/libmnote/Manifest1
-rw-r--r--media-libs/libmnote/libmnote-0.5.6.ebuild31
-rw-r--r--media-libs/libmnote/metadata.xml10
-rw-r--r--media-libs/libmodplug/Manifest1
-rw-r--r--media-libs/libmodplug/files/libmodplug-0.8.4-timidity-patches.patch15
-rw-r--r--media-libs/libmodplug/files/libmodplug-0.8.8.4-no-fast-math.patch12
-rw-r--r--media-libs/libmodplug/files/libmodplug-0.8.8.5-no-fast-math.patch12
-rw-r--r--media-libs/libmodplug/files/libmodplug-0.8.8.5-psm-omf2097-fixes.patch134
-rw-r--r--media-libs/libmodplug/libmodplug-0.8.8.5.ebuild28
-rw-r--r--media-libs/libmodplug/metadata.xml12
-rw-r--r--media-libs/libmp3splt/Manifest4
-rw-r--r--media-libs/libmp3splt/files/libmp3splt-0.7-disable-docs.patch40
-rw-r--r--media-libs/libmp3splt/files/libmp3splt-0.7-flags.patch25
-rw-r--r--media-libs/libmp3splt/files/libmp3splt-0.7-libltdl.patch21
-rw-r--r--media-libs/libmp3splt/files/libmp3splt-0.8.2-automake-1.13.patch44
-rw-r--r--media-libs/libmp3splt/libmp3splt-0.7.3.ebuild45
-rw-r--r--media-libs/libmp3splt/libmp3splt-0.9.0.ebuild51
-rw-r--r--media-libs/libmp3splt/libmp3splt-0.9.1.ebuild51
-rw-r--r--media-libs/libmp3splt/libmp3splt-0.9.1a.ebuild51
-rw-r--r--media-libs/libmp3splt/metadata.xml12
-rw-r--r--media-libs/libmp4v2/Manifest2
-rw-r--r--media-libs/libmp4v2/libmp4v2-1.9.1-r1.ebuild41
-rw-r--r--media-libs/libmp4v2/libmp4v2-2.0.0.ebuild42
-rw-r--r--media-libs/libmp4v2/metadata.xml11
-rw-r--r--media-libs/libmpd/Manifest1
-rw-r--r--media-libs/libmpd/files/libmpd-11.8.17-remove-strndup.patch15
-rw-r--r--media-libs/libmpd/libmpd-11.8.17-r1.ebuild43
-rw-r--r--media-libs/libmpd/libmpd-11.8.17.ebuild37
-rw-r--r--media-libs/libmpd/metadata.xml10
-rw-r--r--media-libs/libmpdclient/Manifest2
-rw-r--r--media-libs/libmpdclient/libmpdclient-2.10.ebuild35
-rw-r--r--media-libs/libmpdclient/libmpdclient-2.9.ebuild35
-rw-r--r--media-libs/libmpdclient/metadata.xml9
-rw-r--r--media-libs/libmpeg2/Manifest1
-rw-r--r--media-libs/libmpeg2/files/libmpeg2-0.5.1-altivec.patch16
-rw-r--r--media-libs/libmpeg2/files/libmpeg2-0.5.1-arm-private-symbols.patch44
-rw-r--r--media-libs/libmpeg2/files/libmpeg2-0.5.1-armv4l.patch20
-rw-r--r--media-libs/libmpeg2/files/libmpeg2-0.5.1-global-symbol-test.patch60
-rw-r--r--media-libs/libmpeg2/libmpeg2-0.5.1-r2.ebuild66
-rw-r--r--media-libs/libmpeg2/metadata.xml8
-rw-r--r--media-libs/libmpeg3/Manifest2
-rw-r--r--media-libs/libmpeg3/files/libmpeg3-1.8-impldecl.patch24
-rw-r--r--media-libs/libmpeg3/libmpeg3-1.8-r1.ebuild61
-rw-r--r--media-libs/libmpeg3/libmpeg3-1.8.ebuild60
-rw-r--r--media-libs/libmpeg3/metadata.xml11
-rw-r--r--media-libs/libmpris2client/Manifest1
-rw-r--r--media-libs/libmpris2client/libmpris2client-0.1.0.ebuild31
-rw-r--r--media-libs/libmpris2client/metadata.xml11
-rw-r--r--media-libs/libmtp/Manifest3
-rw-r--r--media-libs/libmtp/files/libmtp-1.1.6-fbsdlibusb.patch19
-rw-r--r--media-libs/libmtp/libmtp-1.1.6-r1.ebuild66
-rw-r--r--media-libs/libmtp/libmtp-1.1.8.ebuild74
-rw-r--r--media-libs/libmtp/libmtp-1.1.9.ebuild68
-rw-r--r--media-libs/libmtp/libmtp-9999.ebuild68
-rw-r--r--media-libs/libmtp/metadata.xml8
-rw-r--r--media-libs/libmygpo-qt/Manifest1
-rw-r--r--media-libs/libmygpo-qt/libmygpo-qt-1.0.7-r1.ebuild46
-rw-r--r--media-libs/libmygpo-qt/libmygpo-qt-1.0.7.ebuild31
-rw-r--r--media-libs/libmygpo-qt/libmygpo-qt-9999.ebuild46
-rw-r--r--media-libs/libmygpo-qt/metadata.xml12
-rw-r--r--media-libs/libnjb/Manifest2
-rw-r--r--media-libs/libnjb/files/libnjb.rules35
-rw-r--r--media-libs/libnjb/libnjb-2.2.6.ebuild42
-rw-r--r--media-libs/libnjb/libnjb-2.2.7.ebuild44
-rw-r--r--media-libs/libnjb/metadata.xml8
-rw-r--r--media-libs/libnsbmp/Manifest4
-rw-r--r--media-libs/libnsbmp/files/libnsbmp-0.1.1-glibc2.20.patch15
-rw-r--r--media-libs/libnsbmp/files/libnsbmp-0.1.2-glibc2.20.patch14
-rw-r--r--media-libs/libnsbmp/libnsbmp-0.1.1.ebuild21
-rw-r--r--media-libs/libnsbmp/libnsbmp-0.1.2-r1.ebuild21
-rw-r--r--media-libs/libnsbmp/metadata.xml9
-rw-r--r--media-libs/libnsgif/Manifest4
-rw-r--r--media-libs/libnsgif/files/libnsgif-0.1.1-glibc2.20.patch15
-rw-r--r--media-libs/libnsgif/files/libnsgif-0.1.2-glibc2.20.patch15
-rw-r--r--media-libs/libnsgif/libnsgif-0.1.1.ebuild21
-rw-r--r--media-libs/libnsgif/libnsgif-0.1.2-r1.ebuild21
-rw-r--r--media-libs/libnsgif/metadata.xml9
-rw-r--r--media-libs/libnut/Manifest1
-rw-r--r--media-libs/libnut/libnut-661.ebuild25
-rw-r--r--media-libs/libnut/metadata.xml12
-rw-r--r--media-libs/libofa/Manifest1
-rw-r--r--media-libs/libofa/files/libofa-0.9.3-curl-7.21.patch11
-rw-r--r--media-libs/libofa/files/libofa-0.9.3-gcc-4.3.patch35
-rw-r--r--media-libs/libofa/files/libofa-0.9.3-gcc-4.4.patch10
-rw-r--r--media-libs/libofa/files/libofa-0.9.3-gcc-4.7.patch22
-rw-r--r--media-libs/libofa/files/libofa-0.9.3-gcc-4.patch39
-rw-r--r--media-libs/libofa/libofa-0.9.3-r1.ebuild55
-rw-r--r--media-libs/libofa/metadata.xml8
-rw-r--r--media-libs/libogg/Manifest3
-rw-r--r--media-libs/libogg/libogg-1.3.0.ebuild26
-rw-r--r--media-libs/libogg/libogg-1.3.1.ebuild32
-rw-r--r--media-libs/libogg/libogg-1.3.2.ebuild32
-rw-r--r--media-libs/libogg/metadata.xml5
-rw-r--r--media-libs/liboggz/Manifest1
-rw-r--r--media-libs/liboggz/files/liboggz-1.1.1-destdir.patch14
-rw-r--r--media-libs/liboggz/liboggz-1.1.1.ebuild44
-rw-r--r--media-libs/liboggz/metadata.xml5
-rw-r--r--media-libs/libomxil-bellagio/Manifest2
-rw-r--r--media-libs/libomxil-bellagio/files/libomxil-bellagio-0.9.3-dynamicloader-linking.patch14
-rw-r--r--media-libs/libomxil-bellagio/files/libomxil-bellagio-0.9.3-parallel-build.patch16
-rw-r--r--media-libs/libomxil-bellagio/files/libomxil-bellagio-0.9.3-version.patch21
-rw-r--r--media-libs/libomxil-bellagio/libomxil-bellagio-0.9.3.ebuild44
-rw-r--r--media-libs/libomxil-bellagio/metadata.xml13
-rw-r--r--media-libs/libopendaap/Manifest1
-rw-r--r--media-libs/libopendaap/files/libopendaap-0.2.3-types.h14
-rw-r--r--media-libs/libopendaap/files/libopendaap-0.3.0-types.h13
-rw-r--r--media-libs/libopendaap/files/libopendaap-0.4.0-freebsd.patch10
-rw-r--r--media-libs/libopendaap/libopendaap-0.4.0.ebuild26
-rw-r--r--media-libs/libopendaap/metadata.xml5
-rw-r--r--media-libs/libopenraw/Manifest1
-rw-r--r--media-libs/libopenraw/files/libopenraw-0.0.9-jpeg-9a.patch23
-rw-r--r--media-libs/libopenraw/libopenraw-0.0.9.ebuild56
-rw-r--r--media-libs/libopenraw/metadata.xml8
-rw-r--r--media-libs/libpagemaker/Manifest1
-rw-r--r--media-libs/libpagemaker/libpagemaker-0.0.2.ebuild47
-rw-r--r--media-libs/libpagemaker/libpagemaker-9999.ebuild38
-rw-r--r--media-libs/libpagemaker/metadata.xml11
-rw-r--r--media-libs/libpano13/Manifest2
-rw-r--r--media-libs/libpano13/libpano13-2.9.18.ebuild45
-rw-r--r--media-libs/libpano13/libpano13-2.9.19.ebuild40
-rw-r--r--media-libs/libpano13/metadata.xml8
-rw-r--r--media-libs/libpgf/Manifest2
-rw-r--r--media-libs/libpgf/libpgf-6.11.32.ebuild39
-rw-r--r--media-libs/libpgf/libpgf-6.12.27.ebuild37
-rw-r--r--media-libs/libpgf/metadata.xml5
-rw-r--r--media-libs/libpng/Manifest13
-rw-r--r--media-libs/libpng/libpng-1.2.51.ebuild41
-rw-r--r--media-libs/libpng/libpng-1.2.52.ebuild43
-rw-r--r--media-libs/libpng/libpng-1.2.53.ebuild43
-rw-r--r--media-libs/libpng/libpng-1.5.21.ebuild57
-rw-r--r--media-libs/libpng/libpng-1.5.23.ebuild60
-rw-r--r--media-libs/libpng/libpng-1.6.16.ebuild43
-rw-r--r--media-libs/libpng/libpng-1.6.17.ebuild43
-rw-r--r--media-libs/libpng/libpng-1.6.18.ebuild43
-rw-r--r--media-libs/libpng/metadata.xml12
-rw-r--r--media-libs/libpostproc/Manifest2
-rw-r--r--media-libs/libpostproc/libpostproc-0.8.0.20121125.ebuild88
-rw-r--r--media-libs/libpostproc/libpostproc-10.20140517-r1.ebuild89
-rw-r--r--media-libs/libpostproc/libpostproc-10.20140517.ebuild88
-rw-r--r--media-libs/libpostproc/libpostproc-9999.ebuild89
-rw-r--r--media-libs/libpostproc/metadata.xml14
-rw-r--r--media-libs/libpqstego/Manifest1
-rw-r--r--media-libs/libpqstego/libpqstego-0.0.1.ebuild28
-rw-r--r--media-libs/libpqstego/metadata.xml8
-rw-r--r--media-libs/libprojectm-qt/Manifest1
-rw-r--r--media-libs/libprojectm-qt/files/libprojectm-qt-2.1.0-multilib.patch14
-rw-r--r--media-libs/libprojectm-qt/libprojectm-qt-2.1.0-r1.ebuild29
-rw-r--r--media-libs/libprojectm-qt/metadata.xml8
-rw-r--r--media-libs/libprojectm/Manifest2
-rw-r--r--media-libs/libprojectm/files/libprojectm-1.2.0-gcc44.patch9
-rw-r--r--media-libs/libprojectm/files/libprojectm-2.0.1-pcfix.patch12
-rw-r--r--media-libs/libprojectm/files/libprojectm-2.1.0-multilib.patch22
-rw-r--r--media-libs/libprojectm/files/libprojectm-2.1.0-path.patch13
-rw-r--r--media-libs/libprojectm/libprojectm-2.0.1-r1.ebuild55
-rw-r--r--media-libs/libprojectm/libprojectm-2.1.0-r1.ebuild58
-rw-r--r--media-libs/libprojectm/metadata.xml8
-rw-r--r--media-libs/libptp2/Manifest1
-rw-r--r--media-libs/libptp2/files/libptp2-1.1.0-gcc41.patch35
-rw-r--r--media-libs/libptp2/files/libptp2-1.1.0-libusbversion.patch11
-rw-r--r--media-libs/libptp2/files/libptp2-1.1.0-parallel.patch64
-rw-r--r--media-libs/libptp2/files/libptp2-1.1.10-configure.patch46
-rw-r--r--media-libs/libptp2/files/libptp2-1.1.10-makefile.patch11
-rw-r--r--media-libs/libptp2/libptp2-1.1.10.ebuild34
-rw-r--r--media-libs/libptp2/metadata.xml11
-rw-r--r--media-libs/libquicktime/Manifest1
-rw-r--r--media-libs/libquicktime/files/libquicktime-1.2.4+libav-9.patch12
-rw-r--r--media-libs/libquicktime/files/libquicktime-1.2.4-ffmpeg2.patch98
-rw-r--r--media-libs/libquicktime/libquicktime-1.2.4-r1.ebuild115
-rw-r--r--media-libs/libquicktime/libquicktime-1.2.4.ebuild102
-rw-r--r--media-libs/libquicktime/metadata.xml14
-rw-r--r--media-libs/libquvi-scripts/Manifest7
-rw-r--r--media-libs/libquvi-scripts/libquvi-scripts-0.4.14.ebuild26
-rw-r--r--media-libs/libquvi-scripts/libquvi-scripts-0.4.19.ebuild26
-rw-r--r--media-libs/libquvi-scripts/libquvi-scripts-0.4.20.ebuild26
-rw-r--r--media-libs/libquvi-scripts/libquvi-scripts-0.4.21-r1.ebuild27
-rw-r--r--media-libs/libquvi-scripts/libquvi-scripts-0.4.21-r2.ebuild30
-rw-r--r--media-libs/libquvi-scripts/libquvi-scripts-0.4.21.ebuild26
-rw-r--r--media-libs/libquvi-scripts/libquvi-scripts-0.9.20130903.ebuild30
-rw-r--r--media-libs/libquvi-scripts/libquvi-scripts-0.9.20131104.ebuild30
-rw-r--r--media-libs/libquvi-scripts/libquvi-scripts-0.9.20131130-r1.ebuild35
-rw-r--r--media-libs/libquvi-scripts/libquvi-scripts-0.9.20131130.ebuild30
-rw-r--r--media-libs/libquvi-scripts/metadata.xml8
-rw-r--r--media-libs/libquvi/Manifest3
-rw-r--r--media-libs/libquvi/files/libquvi-0.9.1-headers-reinstall.patch15
-rw-r--r--media-libs/libquvi/libquvi-0.4.1-r1.ebuild43
-rw-r--r--media-libs/libquvi/libquvi-0.4.1-r2.ebuild44
-rw-r--r--media-libs/libquvi/libquvi-0.4.1.ebuild42
-rw-r--r--media-libs/libquvi/libquvi-0.9.3.ebuild45
-rw-r--r--media-libs/libquvi/libquvi-0.9.4-r1.ebuild47
-rw-r--r--media-libs/libquvi/libquvi-0.9.4.ebuild45
-rw-r--r--media-libs/libquvi/metadata.xml8
-rw-r--r--media-libs/libraw/Manifest9
-rw-r--r--media-libs/libraw/files/libraw-0.16.0-pc.patch36
-rw-r--r--media-libs/libraw/files/libraw-0.16.0_alpha2-automagic-jasper.patch32
-rw-r--r--media-libs/libraw/files/libraw-0.16.0_alpha2-custom-demosaic-paths.patch23
-rw-r--r--media-libs/libraw/files/libraw-0.16.0_alpha2-docs.patch21
-rw-r--r--media-libs/libraw/files/libraw-0.16.0_alpha2-lcms2-first.patch47
-rw-r--r--media-libs/libraw/files/libraw-0.16.0_alpha2-libdir.patch32
-rw-r--r--media-libs/libraw/files/libraw-0.16.0_beta1-include.patch20
-rw-r--r--media-libs/libraw/files/libraw-0.16.0_beta1-libsuffix.patch64
-rw-r--r--media-libs/libraw/files/libraw-0.16.0_beta1-libsuffixpc.patch24
-rw-r--r--media-libs/libraw/libraw-0.16.0-r1.ebuild66
-rw-r--r--media-libs/libraw/libraw-0.16.2.ebuild66
-rw-r--r--media-libs/libraw/libraw-0.17.0_beta2.ebuild56
-rw-r--r--media-libs/libraw/metadata.xml8
-rw-r--r--media-libs/libreplaygain/Manifest1
-rw-r--r--media-libs/libreplaygain/libreplaygain-477-r1.ebuild30
-rw-r--r--media-libs/libreplaygain/libreplaygain-477.ebuild28
-rw-r--r--media-libs/libreplaygain/metadata.xml5
-rw-r--r--media-libs/librosprite/Manifest4
-rw-r--r--media-libs/librosprite/files/librosprite-0.1.1-Werror.patch14
-rw-r--r--media-libs/librosprite/files/librosprite-0.1.2-Werror.patch14
-rw-r--r--media-libs/librosprite/librosprite-0.1.1.ebuild18
-rw-r--r--media-libs/librosprite/librosprite-0.1.2-r1.ebuild18
-rw-r--r--media-libs/librosprite/metadata.xml9
-rw-r--r--media-libs/libsamplerate/Manifest1
-rw-r--r--media-libs/libsamplerate/files/libsamplerate-0.1.3-dontbuild-tests-examples.patch32
-rw-r--r--media-libs/libsamplerate/files/libsamplerate-0.1.8-lm.patch8
-rw-r--r--media-libs/libsamplerate/libsamplerate-0.1.8-r1.ebuild62
-rw-r--r--media-libs/libsamplerate/metadata.xml5
-rw-r--r--media-libs/libsbsms/Manifest3
-rw-r--r--media-libs/libsbsms/files/libsbsms-2.0.0-cflags.patch24
-rw-r--r--media-libs/libsbsms/files/libsbsms-2.0.1-includes.patch11
-rw-r--r--media-libs/libsbsms/files/libsbsms-2.0.2-cflags.patch24
-rw-r--r--media-libs/libsbsms/libsbsms-2.0.0.ebuild35
-rw-r--r--media-libs/libsbsms/libsbsms-2.0.1.ebuild37
-rw-r--r--media-libs/libsbsms/libsbsms-2.0.2.ebuild35
-rw-r--r--media-libs/libsbsms/metadata.xml8
-rw-r--r--media-libs/libsdl/Manifest1
-rw-r--r--media-libs/libsdl/files/libsdl-1.2.15-SDL_EnableUNICODE.patch47
-rw-r--r--media-libs/libsdl/files/libsdl-1.2.15-bsd-joystick.patch28
-rw-r--r--media-libs/libsdl/files/libsdl-1.2.15-caca.patch26
-rw-r--r--media-libs/libsdl/files/libsdl-1.2.15-const-xdata32.patch58
-rw-r--r--media-libs/libsdl/files/libsdl-1.2.15-gamma.patch42
-rw-r--r--media-libs/libsdl/files/libsdl-1.2.15-joystick.patch13
-rw-r--r--media-libs/libsdl/files/libsdl-1.2.15-resizing.patch60
-rw-r--r--media-libs/libsdl/files/libsdl-1.2.15-sdl-config.patch20
-rw-r--r--media-libs/libsdl/libsdl-1.2.15-r8.ebuild142
-rw-r--r--media-libs/libsdl/libsdl-1.2.15-r9.ebuild143
-rw-r--r--media-libs/libsdl/metadata.xml27
-rw-r--r--media-libs/libsdl2/Manifest1
-rw-r--r--media-libs/libsdl2/files/libsdl2-2.0.3-gles-wayland.patch59
-rw-r--r--media-libs/libsdl2/files/libsdl2-2.0.3-static-libs.patch89
-rw-r--r--media-libs/libsdl2/libsdl2-2.0.3-r200.ebuild148
-rw-r--r--media-libs/libsdl2/metadata.xml37
-rw-r--r--media-libs/libsfml/Manifest2
-rw-r--r--media-libs/libsfml/files/libsfml-1.6-deps-and-flags.patch111
-rw-r--r--media-libs/libsfml/files/libsfml-1.6-destdir.patch112
-rw-r--r--media-libs/libsfml/files/libsfml-1.6-gcc46.patch11
-rw-r--r--media-libs/libsfml/files/libsfml-1.6-gcc47.patch11
-rw-r--r--media-libs/libsfml/files/libsfml-1.6-libpng15.patch20
-rw-r--r--media-libs/libsfml/files/libsfml-2.2-no-docs.patch15
-rw-r--r--media-libs/libsfml/files/libsfml-2.2-shared-glew.patch12
-rw-r--r--media-libs/libsfml/libsfml-1.6-r1.ebuild64
-rw-r--r--media-libs/libsfml/libsfml-2.2.ebuild65
-rw-r--r--media-libs/libsfml/metadata.xml19
-rw-r--r--media-libs/libshout/Manifest1
-rw-r--r--media-libs/libshout/files/libshout-2.3.1-underlinking.patch13
-rw-r--r--media-libs/libshout/libshout-2.3.1-r1.ebuild42
-rw-r--r--media-libs/libshout/libshout-2.3.1.ebuild36
-rw-r--r--media-libs/libshout/metadata.xml5
-rw-r--r--media-libs/libsidplay/Manifest2
-rw-r--r--media-libs/libsidplay/files/65resid1
-rw-r--r--media-libs/libsidplay/files/libsidplay-1.36.59-gcc43.patch38
-rw-r--r--media-libs/libsidplay/files/libsidplay-2.1.1-fbsd.patch11
-rw-r--r--media-libs/libsidplay/files/libsidplay-2.1.1-gcc43.patch69
-rw-r--r--media-libs/libsidplay/files/libsidplay-2.1.1-no_libtool_reference.patch18
-rw-r--r--media-libs/libsidplay/files/libsidplay-gcc34.patch26
-rw-r--r--media-libs/libsidplay/files/libsidplay2-gcc41.patch37
-rw-r--r--media-libs/libsidplay/libsidplay-1.36.59-r1.ebuild34
-rw-r--r--media-libs/libsidplay/libsidplay-1.36.59.ebuild31
-rw-r--r--media-libs/libsidplay/libsidplay-2.1.1-r2.ebuild53
-rw-r--r--media-libs/libsidplay/libsidplay-2.1.1-r3.ebuild53
-rw-r--r--media-libs/libsidplay/libsidplay-2.1.1-r4.ebuild58
-rw-r--r--media-libs/libsidplay/metadata.xml10
-rw-r--r--media-libs/libsidplayfp/Manifest3
-rw-r--r--media-libs/libsidplayfp/libsidplayfp-0.3.8.ebuild31
-rw-r--r--media-libs/libsidplayfp/libsidplayfp-1.1.0.ebuild33
-rw-r--r--media-libs/libsidplayfp/libsidplayfp-1.8.0.ebuild33
-rw-r--r--media-libs/libsidplayfp/metadata.xml8
-rw-r--r--media-libs/libsixel/Manifest2
-rw-r--r--media-libs/libsixel/libsixel-1.4.12.ebuild45
-rw-r--r--media-libs/libsixel/libsixel-1.4.13.ebuild45
-rw-r--r--media-libs/libsixel/metadata.xml10
-rw-r--r--media-libs/libsmf/Manifest1
-rw-r--r--media-libs/libsmf/libsmf-1.3.ebuild44
-rw-r--r--media-libs/libsmf/metadata.xml8
-rw-r--r--media-libs/libsndfile/Manifest1
-rw-r--r--media-libs/libsndfile/files/libsndfile-1.0.17-regtests-need-sqlite.patch25
-rw-r--r--media-libs/libsndfile/files/libsndfile-1.0.25-make.patch14
-rw-r--r--media-libs/libsndfile/libsndfile-1.0.25-r1.ebuild98
-rw-r--r--media-libs/libsndfile/libsndfile-1.0.25.ebuild64
-rw-r--r--media-libs/libsndfile/metadata.xml5
-rw-r--r--media-libs/libsoundtouch/Manifest3
-rw-r--r--media-libs/libsoundtouch/files/libsoundtouch-1.7.0-flags.patch22
-rw-r--r--media-libs/libsoundtouch/libsoundtouch-1.7.1.ebuild45
-rw-r--r--media-libs/libsoundtouch/libsoundtouch-1.8.0-r1.ebuild49
-rw-r--r--media-libs/libsoundtouch/libsoundtouch-1.8.0.ebuild45
-rw-r--r--media-libs/libsoundtouch/libsoundtouch-1.9.0.ebuild50
-rw-r--r--media-libs/libsoundtouch/metadata.xml5
-rw-r--r--media-libs/libsvg/Manifest1
-rw-r--r--media-libs/libsvg/files/libsvg-0.1.4-asneeded.patch10
-rw-r--r--media-libs/libsvg/libsvg-0.1.4-r1.ebuild36
-rw-r--r--media-libs/libsvg/metadata.xml5
-rw-r--r--media-libs/libsvgtiny/Manifest4
-rw-r--r--media-libs/libsvgtiny/files/libsvgtiny-0.1.2-glibc2.20.patch18
-rw-r--r--media-libs/libsvgtiny/files/libsvgtiny-0.1.3-glibc2.20.patch18
-rw-r--r--media-libs/libsvgtiny/files/libsvgtiny-0.1.3-parallel-build.patch10
-rw-r--r--media-libs/libsvgtiny/libsvgtiny-0.1.2.ebuild24
-rw-r--r--media-libs/libsvgtiny/libsvgtiny-0.1.3-r1.ebuild25
-rw-r--r--media-libs/libsvgtiny/metadata.xml9
-rw-r--r--media-libs/libtaginfo/Manifest3
-rw-r--r--media-libs/libtaginfo/libtaginfo-0.1.6.ebuild21
-rw-r--r--media-libs/libtaginfo/libtaginfo-0.2.0.ebuild21
-rw-r--r--media-libs/libtaginfo/libtaginfo-0.2.1.ebuild24
-rw-r--r--media-libs/libtaginfo/metadata.xml12
-rw-r--r--media-libs/libtheora/Manifest1
-rw-r--r--media-libs/libtheora/files/libtheora-1.0_beta2-flags.patch14
-rw-r--r--media-libs/libtheora/files/libtheora-1.1.1-libpng16.patch17
-rw-r--r--media-libs/libtheora/files/libtheora-1.1.1-underlinking.patch14
-rw-r--r--media-libs/libtheora/libtheora-1.1.1-r1.ebuild93
-rw-r--r--media-libs/libtheora/libtheora-1.1.1.ebuild77
-rw-r--r--media-libs/libtheora/metadata.xml8
-rw-r--r--media-libs/libtiger/Manifest1
-rw-r--r--media-libs/libtiger/files/libtiger-0.3.3-check.patch17
-rw-r--r--media-libs/libtiger/libtiger-0.3.4.ebuild36
-rw-r--r--media-libs/libtiger/metadata.xml11
-rw-r--r--media-libs/libtimidity/Manifest1
-rw-r--r--media-libs/libtimidity/files/libtimidity-0.1.0-automagic.patch30
-rw-r--r--media-libs/libtimidity/files/libtimidity-0.1.0-newlen-overflow.patch22
-rw-r--r--media-libs/libtimidity/libtimidity-0.1.0-r2.ebuild35
-rw-r--r--media-libs/libtimidity/metadata.xml8
-rw-r--r--media-libs/libtxc_dxtn/Manifest1
-rw-r--r--media-libs/libtxc_dxtn/libtxc_dxtn-1.0.1-r1.ebuild36
-rw-r--r--media-libs/libtxc_dxtn/libtxc_dxtn-1.0.1.ebuild58
-rw-r--r--media-libs/libtxc_dxtn/metadata.xml5
-rw-r--r--media-libs/libuninameslist/Manifest1
-rw-r--r--media-libs/libuninameslist/libuninameslist-20091231.ebuild26
-rw-r--r--media-libs/libuninameslist/metadata.xml9
-rw-r--r--media-libs/libv4l/Manifest6
-rw-r--r--media-libs/libv4l/files/libv4l-0.8.8-drop-Wp-flags.patch22
-rw-r--r--media-libs/libv4l/libv4l-0.8.9.ebuild44
-rw-r--r--media-libs/libv4l/libv4l-0.9.5-r1.ebuild60
-rw-r--r--media-libs/libv4l/libv4l-0.9.5.ebuild53
-rw-r--r--media-libs/libv4l/libv4l-1.0.0.ebuild60
-rw-r--r--media-libs/libv4l/libv4l-1.2.1.ebuild60
-rw-r--r--media-libs/libv4l/libv4l-1.6.0-r1.ebuild61
-rw-r--r--media-libs/libv4l/libv4l-1.6.0.ebuild62
-rw-r--r--media-libs/libv4l/libv4l-1.6.2.ebuild61
-rw-r--r--media-libs/libv4l/metadata.xml28
-rw-r--r--media-libs/libvisio/Manifest3
-rw-r--r--media-libs/libvisio/libvisio-0.0.30.ebuild53
-rw-r--r--media-libs/libvisio/libvisio-0.1.1.ebuild54
-rw-r--r--media-libs/libvisio/libvisio-0.1.3.ebuild55
-rw-r--r--media-libs/libvisio/libvisio-9999.ebuild55
-rw-r--r--media-libs/libvisio/metadata.xml8
-rw-r--r--media-libs/libvisual/Manifest1
-rw-r--r--media-libs/libvisual/files/libvisual-0.4.0-better-altivec-detection.patch71
-rw-r--r--media-libs/libvisual/files/libvisual-0.4.0-cond.patch15
-rw-r--r--media-libs/libvisual/files/libvisual-0.4.0-conditions.patch24
-rw-r--r--media-libs/libvisual/files/libvisual-0.4.0-detect_amd64.patch14
-rw-r--r--media-libs/libvisual/files/libvisual-0.4.0-inlinedefineconflict.patch60
-rw-r--r--media-libs/libvisual/libvisual-0.4.0-r3.ebuild55
-rw-r--r--media-libs/libvisual/metadata.xml8
-rw-r--r--media-libs/libvorbis/Manifest3
-rw-r--r--media-libs/libvorbis/libvorbis-1.3.3-r1.ebuild41
-rw-r--r--media-libs/libvorbis/libvorbis-1.3.3.ebuild39
-rw-r--r--media-libs/libvorbis/libvorbis-1.3.4.ebuild40
-rw-r--r--media-libs/libvorbis/libvorbis-1.3.5.ebuild40
-rw-r--r--media-libs/libvorbis/metadata.xml5
-rw-r--r--media-libs/libvpx/Manifest7
-rw-r--r--media-libs/libvpx/files/libvpx-1.1.0-arm.patch38
-rw-r--r--media-libs/libvpx/files/libvpx-1.1.0-chost.patch36
-rw-r--r--media-libs/libvpx/files/libvpx-1.1.0-generic-gnu-shared.patch39
-rw-r--r--media-libs/libvpx/files/libvpx-1.1.0-x32.patch64
-rw-r--r--media-libs/libvpx/files/libvpx-1.2.0_pre20130625-armv7.patch41
-rw-r--r--media-libs/libvpx/files/libvpx-1.3.0-dash.patch16
-rw-r--r--media-libs/libvpx/files/libvpx-1.3.0-sparc-configure.patch10
-rw-r--r--media-libs/libvpx/libvpx-1.1.0.ebuild105
-rw-r--r--media-libs/libvpx/libvpx-1.2.0_pre20130625.ebuild120
-rw-r--r--media-libs/libvpx/libvpx-1.3.0.ebuild124
-rw-r--r--media-libs/libvpx/libvpx-1.4.0.ebuild122
-rw-r--r--media-libs/libvpx/metadata.xml15
-rw-r--r--media-libs/libwebp/Manifest5
-rw-r--r--media-libs/libwebp/libwebp-0.2.1.ebuild35
-rw-r--r--media-libs/libwebp/libwebp-0.3.0.ebuild46
-rw-r--r--media-libs/libwebp/libwebp-0.3.1.ebuild62
-rw-r--r--media-libs/libwebp/libwebp-0.4.0.ebuild65
-rw-r--r--media-libs/libwebp/libwebp-0.4.2.ebuild65
-rw-r--r--media-libs/libwebp/metadata.xml13
-rw-r--r--media-libs/libwmf/Manifest1
-rw-r--r--media-libs/libwmf/files/libwmf-0.2.8.4-build.patch54
-rw-r--r--media-libs/libwmf/files/libwmf-0.2.8.4-gdk-pixbuf.patch25
-rw-r--r--media-libs/libwmf/files/libwmf-0.2.8.4-intoverflow.patch27
-rw-r--r--media-libs/libwmf/files/libwmf-0.2.8.4-libpng-1.5.patch12
-rw-r--r--media-libs/libwmf/files/libwmf-0.2.8.4-pngfix.patch20
-rw-r--r--media-libs/libwmf/files/libwmf-0.2.8.4-use-system-fonts.patch39
-rw-r--r--media-libs/libwmf/libwmf-0.2.8.4-r5.ebuild110
-rw-r--r--media-libs/libwmf/metadata.xml10
-rw-r--r--media-libs/libxmi/Manifest2
-rw-r--r--media-libs/libxmi/libxmi-1.2.ebuild28
-rw-r--r--media-libs/libxmi/libxmi-1.3.ebuild23
-rw-r--r--media-libs/libxmi/metadata.xml23
-rw-r--r--media-libs/libxspf/Manifest1
-rw-r--r--media-libs/libxspf/files/libxspf-1.2.0-gcc44.patch22
-rw-r--r--media-libs/libxspf/files/libxspf-1.2.0-gcc47.patch12
-rw-r--r--media-libs/libxspf/libxspf-1.2.0.ebuild49
-rw-r--r--media-libs/libxspf/metadata.xml12
-rw-r--r--media-libs/libxtract/Manifest1
-rw-r--r--media-libs/libxtract/libxtract-0.6.6.ebuild33
-rw-r--r--media-libs/libxtract/metadata.xml8
-rw-r--r--media-libs/libzen/Manifest4
-rw-r--r--media-libs/libzen/libzen-0.4.28.ebuild65
-rw-r--r--media-libs/libzen/libzen-0.4.29.ebuild65
-rw-r--r--media-libs/libzen/libzen-0.4.30.ebuild65
-rw-r--r--media-libs/libzen/libzen-0.4.31.ebuild65
-rw-r--r--media-libs/libzen/metadata.xml8
-rw-r--r--media-libs/lilv/Manifest2
-rw-r--r--media-libs/lilv/lilv-0.18.0.ebuild53
-rw-r--r--media-libs/lilv/lilv-0.20.0.ebuild53
-rw-r--r--media-libs/lilv/metadata.xml11
-rw-r--r--media-libs/lv2-ui/Manifest1
-rw-r--r--media-libs/lv2-ui/lv2-ui-2.4-r1.ebuild24
-rw-r--r--media-libs/lv2-ui/metadata.xml8
-rw-r--r--media-libs/lv2/Manifest3
-rw-r--r--media-libs/lv2/lv2-1.10.0-r1.ebuild44
-rw-r--r--media-libs/lv2/lv2-1.10.0.ebuild44
-rw-r--r--media-libs/lv2/lv2-1.12.0.ebuild44
-rw-r--r--media-libs/lv2/lv2-1.8.0.ebuild44
-rw-r--r--media-libs/lv2/metadata.xml8
-rw-r--r--media-libs/lv2core/Manifest3
-rw-r--r--media-libs/lv2core/lv2core-3.0.ebuild33
-rw-r--r--media-libs/lv2core/lv2core-4.0.ebuild33
-rw-r--r--media-libs/lv2core/lv2core-6.0.ebuild23
-rw-r--r--media-libs/lv2core/metadata.xml5
-rw-r--r--media-libs/lvtk/Manifest1
-rw-r--r--media-libs/lvtk/lvtk-1.2.0.ebuild51
-rw-r--r--media-libs/lvtk/metadata.xml12
-rw-r--r--media-libs/mash/Manifest1
-rw-r--r--media-libs/mash/mash-0.2.0-r1.ebuild48
-rw-r--r--media-libs/mash/metadata.xml9
-rw-r--r--media-libs/mediastreamer/Manifest3
-rw-r--r--media-libs/mediastreamer/files/mediastreamer-2.7.3-ffmpeg-0.11.patch94
-rw-r--r--media-libs/mediastreamer/files/mediastreamer-2.7.3-sdl-build.patch220
-rw-r--r--media-libs/mediastreamer/files/mediastreamer-2.7.3-v4l-automagic.patch40
-rw-r--r--media-libs/mediastreamer/files/mediastreamer-2.7.3-videoenc_282.patch130
-rw-r--r--media-libs/mediastreamer/files/mediastreamer-2.8.2-autopoint.patch17
-rw-r--r--media-libs/mediastreamer/files/mediastreamer-2.8.2-ffmpeg-1.0.patch59
-rw-r--r--media-libs/mediastreamer/files/mediastreamer-2.8.2-libav9.patch115
-rw-r--r--media-libs/mediastreamer/files/mediastreamer-2.8.2-v4l-automagic.patch54
-rw-r--r--media-libs/mediastreamer/files/mediastreamer-2.9.0-libav9.patch120
-rw-r--r--media-libs/mediastreamer/files/mediastreamer-2.9.0-tests.patch26
-rw-r--r--media-libs/mediastreamer/files/mediastreamer-2.9.0-underlinking.patch57
-rw-r--r--media-libs/mediastreamer/files/mediastreamer-2.9.0-v4l-automagic.patch55
-rw-r--r--media-libs/mediastreamer/files/mediastreamer-2.9.0-xxd.patch18
-rw-r--r--media-libs/mediastreamer/mediastreamer-2.7.3-r3.ebuild130
-rw-r--r--media-libs/mediastreamer/mediastreamer-2.8.2.ebuild138
-rw-r--r--media-libs/mediastreamer/mediastreamer-2.9.0-r1.ebuild174
-rw-r--r--media-libs/mediastreamer/mediastreamer-2.9.0.ebuild172
-rw-r--r--media-libs/mediastreamer/metadata.xml22
-rw-r--r--media-libs/memphis/Manifest1
-rw-r--r--media-libs/memphis/files/memphis-0.2.3-demos.patch13
-rw-r--r--media-libs/memphis/files/memphis-0.2.3-link_gobject.patch11
-rw-r--r--media-libs/memphis/memphis-0.2.3.ebuild53
-rw-r--r--media-libs/memphis/metadata.xml11
-rw-r--r--media-libs/mesa/Manifest9
-rw-r--r--media-libs/mesa/files/eselect-mesa.conf.7.1039
-rw-r--r--media-libs/mesa/files/eselect-mesa.conf.9.239
-rw-r--r--media-libs/mesa/files/glx_ro_text_segm.patch28
-rw-r--r--media-libs/mesa/files/mesa-10.2-dont-require-llvm-for-r300.patch11
-rw-r--r--media-libs/mesa/files/mesa-10.2-sysfs-instead-of-libudev.patch378
-rw-r--r--media-libs/mesa/files/mesa-10.3.7-dont-use-clrsb.patch36
-rw-r--r--media-libs/mesa/files/mesa-10.3.7-format_utils.c.patch1089
-rw-r--r--media-libs/mesa/files/mesa-10.5.1-fstat-include.patch37
-rw-r--r--media-libs/mesa/mesa-10.2.8.ebuild530
-rw-r--r--media-libs/mesa/mesa-10.3.7-r1.ebuild532
-rw-r--r--media-libs/mesa/mesa-10.3.7-r2.ebuild498
-rw-r--r--media-libs/mesa/mesa-10.4.6.ebuild499
-rw-r--r--media-libs/mesa/mesa-10.5.8.ebuild455
-rw-r--r--media-libs/mesa/mesa-10.6.1.ebuild456
-rw-r--r--media-libs/mesa/mesa-10.6.2.ebuild455
-rw-r--r--media-libs/mesa/mesa-10.6.3.ebuild455
-rw-r--r--media-libs/mesa/mesa-7.10.3.ebuild353
-rw-r--r--media-libs/mesa/metadata.xml28
-rw-r--r--media-libs/metadata.xml32
-rw-r--r--media-libs/ming/Manifest2
-rw-r--r--media-libs/ming/files/ming-0.4.3-perl-5.14.patch43
-rw-r--r--media-libs/ming/files/ming-0.4.4-vasprintf.patch266
-rw-r--r--media-libs/ming/files/ming-0.4.5-gif-error.patch20
-rw-r--r--media-libs/ming/metadata.xml8
-rw-r--r--media-libs/ming/ming-0.4.4-r1.ebuild117
-rw-r--r--media-libs/ming/ming-0.4.5.ebuild104
-rw-r--r--media-libs/mlt/Manifest3
-rw-r--r--media-libs/mlt/files/mlt-0.7.2-ruby-link.patch18
-rw-r--r--media-libs/mlt/files/mlt-0.8.2-av_codec_is_encoder.patch32
-rw-r--r--media-libs/mlt/files/mlt-0.8.6-ruby-link.patch19
-rw-r--r--media-libs/mlt/files/mlt-0.9.0-freetype251.patch12
-rw-r--r--media-libs/mlt/metadata.xml28
-rw-r--r--media-libs/mlt/mlt-0.8.2.ebuild176
-rw-r--r--media-libs/mlt/mlt-0.8.8.ebuild181
-rw-r--r--media-libs/mlt/mlt-0.9.0.ebuild189
-rw-r--r--media-libs/musicbrainz/Manifest5
-rw-r--r--media-libs/musicbrainz/files/musicbrainz-2.1.5-gcc43-includes.patch57
-rw-r--r--media-libs/musicbrainz/files/musicbrainz-3.0.2-gcc44.patch10
-rw-r--r--media-libs/musicbrainz/metadata.xml5
-rw-r--r--media-libs/musicbrainz/musicbrainz-2.1.5.ebuild37
-rw-r--r--media-libs/musicbrainz/musicbrainz-3.0.2.ebuild29
-rw-r--r--media-libs/musicbrainz/musicbrainz-3.0.3.ebuild29
-rw-r--r--media-libs/musicbrainz/musicbrainz-4.0.3.ebuild24
-rw-r--r--media-libs/musicbrainz/musicbrainz-5.0.1.ebuild33
-rw-r--r--media-libs/mutagen/Manifest3
-rw-r--r--media-libs/mutagen/metadata.xml8
-rw-r--r--media-libs/mutagen/mutagen-1.22.ebuild43
-rw-r--r--media-libs/mutagen/mutagen-1.27.ebuild43
-rw-r--r--media-libs/mutagen/mutagen-1.29.ebuild43
-rw-r--r--media-libs/nas/Manifest1
-rw-r--r--media-libs/nas/files/nas-1.9.2-asneeded.patch13
-rw-r--r--media-libs/nas/files/nas-1.9.4-remove-abs-fabs.patch36
-rw-r--r--media-libs/nas/files/nas.conf.d11
-rw-r--r--media-libs/nas/files/nas.init.d19
-rw-r--r--media-libs/nas/metadata.xml8
-rw-r--r--media-libs/nas/nas-1.9.4-r1.ebuild100
-rw-r--r--media-libs/nas/nas-1.9.4.ebuild99
-rw-r--r--media-libs/netpbm/Manifest2
-rwxr-xr-xmedia-libs/netpbm/files/make-tarball.sh67
-rw-r--r--media-libs/netpbm/files/netpbm-10.31-build.patch50
-rw-r--r--media-libs/netpbm/files/netpbm-10.51.00-pnmconvol-nooffset.patch83
-rw-r--r--media-libs/netpbm/files/netpbm-10.51.00-ppmtompeg-free.patch35
-rw-r--r--media-libs/netpbm/files/netpbm-10.51.00-underlinking.patch16
-rw-r--r--media-libs/netpbm/files/netpbm-10.66-failing-tests.patch28
-rw-r--r--media-libs/netpbm/files/netpbm-10.66-jasper-hack.patch41
-rw-r--r--media-libs/netpbm/files/netpbm-10.66-jbig-2.patch19
-rw-r--r--media-libs/netpbm/files/netpbm-10.66-jpeg-dirs.patch28
-rw-r--r--media-libs/netpbm/files/netpbm-10.66-options-case.patch105
-rw-r--r--media-libs/netpbm/files/netpbm-10.66-test.patch17
-rw-r--r--media-libs/netpbm/files/netpbm-10.66-wordaccess_be_aligned.patch23
-rw-r--r--media-libs/netpbm/files/netpbm-10.70-system-libs.patch40
-rw-r--r--media-libs/netpbm/metadata.xml8
-rw-r--r--media-libs/netpbm/netpbm-10.66.00.ebuild197
-rw-r--r--media-libs/netpbm/netpbm-10.70.00.ebuild189
-rw-r--r--media-libs/openal/Manifest2
-rw-r--r--media-libs/openal/metadata.xml8
-rw-r--r--media-libs/openal/openal-1.15.1-r1.ebuild56
-rw-r--r--media-libs/openal/openal-1.15.1-r2.ebuild51
-rw-r--r--media-libs/openal/openal-1.15.1.ebuild43
-rw-r--r--media-libs/openal/openal-1.16.0.ebuild60
-rw-r--r--media-libs/opencollada/Manifest1
-rw-r--r--media-libs/opencollada/files/opencollada-0_p864-expat.patch12
-rw-r--r--media-libs/opencollada/files/opencollada-0_p864-gcc-4.7.patch26
-rw-r--r--media-libs/opencollada/files/opencollada-0_p864-parallel.patch18
-rw-r--r--media-libs/opencollada/files/opencollada-1.2.2-libdir.patch27
-rw-r--r--media-libs/opencollada/files/opencollada-1.2.2-no-undefined.patch35
-rw-r--r--media-libs/opencollada/files/opencollada-1.2.2-soversion.patch15
-rw-r--r--media-libs/opencollada/metadata.xml12
-rw-r--r--media-libs/opencollada/opencollada-1.2.2_p20150207.ebuild92
-rw-r--r--media-libs/opencollada/opencollada-9999.ebuild92
-rw-r--r--media-libs/opencolorio/Manifest3
-rw-r--r--media-libs/opencolorio/files/opencolorio-1.0.8-documentation-gen.patch54
-rw-r--r--media-libs/opencolorio/files/opencolorio-1.0.8-remove-external-doc-utilities.patch65
-rw-r--r--media-libs/opencolorio/files/opencolorio-1.0.9-remove-external-doc-utilities.patch65
-rw-r--r--media-libs/opencolorio/metadata.xml16
-rw-r--r--media-libs/opencolorio/opencolorio-1.0.8.ebuild85
-rw-r--r--media-libs/opencolorio/opencolorio-1.0.9-r1.ebuild88
-rw-r--r--media-libs/opencolorio/opencolorio-1.0.9.ebuild86
-rw-r--r--media-libs/opencore-amr/Manifest1
-rw-r--r--media-libs/opencore-amr/metadata.xml8
-rw-r--r--media-libs/opencore-amr/opencore-amr-0.1.3-r1.ebuild17
-rw-r--r--media-libs/openctm/Manifest1
-rw-r--r--media-libs/openctm/files/openctm-fix-makefiles.patch191
-rw-r--r--media-libs/openctm/files/openctm-no-strip.patch34
-rw-r--r--media-libs/openctm/metadata.xml11
-rw-r--r--media-libs/openctm/openctm-1.0.3.ebuild42
-rw-r--r--media-libs/opencv/Manifest3
-rw-r--r--media-libs/opencv/files/opencv-2.3.1a-libav-0.7.patch10
-rw-r--r--media-libs/opencv/files/opencv-2.4.10-pic-x86.patch49
-rw-r--r--media-libs/opencv/files/opencv-2.4.2-cflags.patch21
-rw-r--r--media-libs/opencv/files/opencv-2.4.3-gcc47.patch22
-rw-r--r--media-libs/opencv/files/opencv-2.4.8-javamagic.patch32
-rw-r--r--media-libs/opencv/files/opencv-2.4.9-cuda-pkg-config.patch12
-rw-r--r--media-libs/opencv/files/opencv-2.4.9-cuda.patch89
-rw-r--r--media-libs/opencv/files/opencv-2.4.9-libav10.patch748
-rw-r--r--media-libs/opencv/files/opencv-3.0.0-gles.patch14
-rw-r--r--media-libs/opencv/metadata.xml30
-rw-r--r--media-libs/opencv/opencv-2.4.10.ebuild222
-rw-r--r--media-libs/opencv/opencv-2.4.9.ebuild222
-rw-r--r--media-libs/opencv/opencv-3.0.0.ebuild222
-rw-r--r--media-libs/openexr/Manifest4
-rw-r--r--media-libs/openexr/files/openexr-1.7.0-gcc43.patch11
-rw-r--r--media-libs/openexr/metadata.xml8
-rw-r--r--media-libs/openexr/openexr-1.7.0.ebuild55
-rw-r--r--media-libs/openexr/openexr-2.0.1-r1.ebuild47
-rw-r--r--media-libs/openexr/openexr-2.1.0.ebuild47
-rw-r--r--media-libs/openexr/openexr-2.2.0.ebuild44
-rw-r--r--media-libs/openexr_ctl/Manifest1
-rw-r--r--media-libs/openexr_ctl/files/openexr_ctl-1.0.1-configure_gcc43.patch22
-rw-r--r--media-libs/openexr_ctl/files/openexr_ctl-1.0.1-gcc43.patch34
-rw-r--r--media-libs/openexr_ctl/files/openexr_ctl-1.0.1-gcc44.patch11
-rw-r--r--media-libs/openexr_ctl/files/openexr_ctl-1.0.1-namespace.patch18
-rw-r--r--media-libs/openexr_ctl/files/openexr_ctl-1.0.1-pkgconfig.patch12
-rw-r--r--media-libs/openexr_ctl/metadata.xml11
-rw-r--r--media-libs/openexr_ctl/openexr_ctl-1.0.1-r1.ebuild40
-rw-r--r--media-libs/openexr_ctl/openexr_ctl-1.0.1-r2.ebuild41
-rw-r--r--media-libs/opengl-apple/files/gl.pc11
-rw-r--r--media-libs/opengl-apple/metadata.xml5
-rw-r--r--media-libs/opengl-apple/opengl-apple-3.ebuild54
-rw-r--r--media-libs/opengl-apple/opengl-apple-4.ebuild65
-rw-r--r--media-libs/opengl-apple/opengl-apple-5.ebuild59
-rw-r--r--media-libs/opengtl/Manifest2
-rw-r--r--media-libs/opengtl/files/opengtl-0.9.18-memcpy.patch11
-rw-r--r--media-libs/opengtl/files/opengtl-0.9.18-underlinking.patch30
-rw-r--r--media-libs/opengtl/metadata.xml5
-rw-r--r--media-libs/opengtl/opengtl-0.9.18.ebuild60
-rw-r--r--media-libs/openh264/Manifest5
-rw-r--r--media-libs/openh264/files/pkgconfig-pathfix.patch40
-rw-r--r--media-libs/openh264/metadata.xml15
-rw-r--r--media-libs/openh264/openh264-1.2_p20141104.ebuild74
-rw-r--r--media-libs/openh264/openh264-1.3.1.ebuild78
-rw-r--r--media-libs/openh264/openh264-1.4.0.ebuild92
-rw-r--r--media-libs/openimageio/Manifest3
-rw-r--r--media-libs/openimageio/files/openimageio-1.1.1-x86-build.patch15
-rw-r--r--media-libs/openimageio/files/openimageio-1.3.5-openexr-2.x.patch36
-rw-r--r--media-libs/openimageio/metadata.xml13
-rw-r--r--media-libs/openimageio/openimageio-1.1.1.ebuild101
-rw-r--r--media-libs/openimageio/openimageio-1.1.7.ebuild99
-rw-r--r--media-libs/openimageio/openimageio-1.3.5.ebuild107
-rw-r--r--media-libs/openjpeg/Manifest3
-rw-r--r--media-libs/openjpeg/files/openjpeg-2.0.0-build.patch14
-rw-r--r--media-libs/openjpeg/files/openjpeg-2.0.0-pkgconfig-static.patch10
-rw-r--r--media-libs/openjpeg/files/openjpeg-2.0.0-pkgconfig.patch37
-rw-r--r--media-libs/openjpeg/metadata.xml9
-rw-r--r--media-libs/openjpeg/openjpeg-1.5.2-r1.ebuild75
-rw-r--r--media-libs/openjpeg/openjpeg-1.5.2.ebuild76
-rw-r--r--media-libs/openjpeg/openjpeg-2.0.0-r1.ebuild73
-rw-r--r--media-libs/openjpeg/openjpeg-2.0.0.ebuild66
-rw-r--r--media-libs/openjpeg/openjpeg-2.1.0-r1.ebuild71
-rw-r--r--media-libs/openjpeg/openjpeg-2.1.0.ebuild67
-rw-r--r--media-libs/opus/Manifest2
-rw-r--r--media-libs/opus/files/1.1-fix-configure.ac-shell-bug.patch14
-rw-r--r--media-libs/opus/metadata.xml8
-rw-r--r--media-libs/opus/opus-1.0.2-r2.ebuild42
-rw-r--r--media-libs/opus/opus-1.1.ebuild35
-rw-r--r--media-libs/opusfile/Manifest3
-rw-r--r--media-libs/opusfile/metadata.xml13
-rw-r--r--media-libs/opusfile/opusfile-0.4.ebuild33
-rw-r--r--media-libs/opusfile/opusfile-0.5.ebuild33
-rw-r--r--media-libs/opusfile/opusfile-0.6.ebuild33
-rw-r--r--media-libs/oyranos/Manifest3
-rw-r--r--media-libs/oyranos/files/oyranos-0.3.2-test.patch11
-rw-r--r--media-libs/oyranos/files/oyranos-0.4.0-buildsystem.patch70
-rw-r--r--media-libs/oyranos/files/oyranos-0.9.0-array.patch37
-rw-r--r--media-libs/oyranos/files/oyranos-0.9.0-buildsystem.patch114
-rw-r--r--media-libs/oyranos/files/oyranos-0.9.0-png.patch31
-rw-r--r--media-libs/oyranos/files/oyranos-0.9.1-buildsystem-2.patch22
-rw-r--r--media-libs/oyranos/files/oyranos-0.9.1-fix-array-access.patch29
-rw-r--r--media-libs/oyranos/files/oyranos-0.9.1-fix-crash-over-missed-output-image.patch50
-rw-r--r--media-libs/oyranos/files/oyranos-0.9.1-fix-double-object-release.patch27
-rw-r--r--media-libs/oyranos/files/oyranos-0.9.1-fix-more-compiler-warnings.patch496
-rw-r--r--media-libs/oyranos/files/oyranos-0.9.1-fix-oyRankMap-helper-functions-crashes.patch54
-rw-r--r--media-libs/oyranos/files/oyranos-0.9.1-fix-oyStringSegment-crash.patch26
-rw-r--r--media-libs/oyranos/files/oyranos-0.9.1-fix-pseq-crash.patch26
-rw-r--r--media-libs/oyranos/files/oyranos-0.9.1-fix-real-compiler-warnings.patch75
-rw-r--r--media-libs/oyranos/files/oyranos-0.9.1-initialise-memory-for-strtod.patch62
-rw-r--r--media-libs/oyranos/files/oyranos-0.9.1-omit-profile-with-error.patch40
-rw-r--r--media-libs/oyranos/files/oyranos-0.9.1-support-pur-xrandr-without-xinerama.patch44
-rw-r--r--media-libs/oyranos/files/oyranos-0.9.4-be-more-verbose.patch51
-rw-r--r--media-libs/oyranos/files/oyranos-0.9.4-buildsystem-r1.patch162
-rw-r--r--media-libs/oyranos/files/oyranos-0.9.4-fix-array-access.patch27
-rw-r--r--media-libs/oyranos/files/oyranos-0.9.4-fix-double-object-release.patch35
-rw-r--r--media-libs/oyranos/files/oyranos-0.9.4-fix-oyRankMap-helper-functions-crashes.patch53
-rw-r--r--media-libs/oyranos/files/oyranos-0.9.4-fix-oyStringSegment-crash.patch25
-rw-r--r--media-libs/oyranos/files/oyranos-0.9.4-fix-runpaths.patch121
-rw-r--r--media-libs/oyranos/files/oyranos-0.9.4-fix-typos-and-grammar.patch968
-rw-r--r--media-libs/oyranos/files/oyranos-0.9.4-omit-profile-with-error.patch54
-rw-r--r--media-libs/oyranos/files/oyranos-0.9.4-set-xcalib-to-screen-if-ge-xrandr-12.patch131
-rw-r--r--media-libs/oyranos/files/oyranos-0.9.4-use-more-internal-xrandr-info.patch35
-rw-r--r--media-libs/oyranos/files/oyranos-0.9.5-buildsystem-r1.patch182
-rw-r--r--media-libs/oyranos/metadata.xml11
-rw-r--r--media-libs/oyranos/oyranos-0.9.4-r2.ebuild112
-rw-r--r--media-libs/oyranos/oyranos-0.9.5-r1.ebuild102
-rw-r--r--media-libs/oyranos/oyranos-0.9.5.ebuild91
-rw-r--r--media-libs/oyranos/oyranos-9999.ebuild102
-rw-r--r--media-libs/phat/Manifest1
-rw-r--r--media-libs/phat/metadata.xml5
-rw-r--r--media-libs/phat/phat-0.4.1.ebuild34
-rw-r--r--media-libs/phonon-gstreamer/Manifest2
-rw-r--r--media-libs/phonon-gstreamer/metadata.xml8
-rw-r--r--media-libs/phonon-gstreamer/phonon-gstreamer-4.7.2.ebuild91
-rw-r--r--media-libs/phonon-gstreamer/phonon-gstreamer-4.8.2.ebuild86
-rw-r--r--media-libs/phonon-gstreamer/phonon-gstreamer-9999.ebuild86
-rw-r--r--media-libs/phonon-qt7/Manifest1
-rw-r--r--media-libs/phonon-qt7/files/phonon-qt7-0_pre20110424-QWidget-cast-dynamic.patch28
-rw-r--r--media-libs/phonon-qt7/files/phonon-qt7-0_pre20110424-darwin11.patch29
-rw-r--r--media-libs/phonon-qt7/files/phonon-qt7-noshow.patch17
-rw-r--r--media-libs/phonon-qt7/metadata.xml6
-rw-r--r--media-libs/phonon-qt7/phonon-qt7-0_pre20110424.ebuild41
-rw-r--r--media-libs/phonon-vlc/Manifest2
-rw-r--r--media-libs/phonon-vlc/metadata.xml5
-rw-r--r--media-libs/phonon-vlc/phonon-vlc-0.7.2.ebuild94
-rw-r--r--media-libs/phonon-vlc/phonon-vlc-0.8.2.ebuild88
-rw-r--r--media-libs/phonon-vlc/phonon-vlc-9999.ebuild88
-rw-r--r--media-libs/phonon/Manifest2
-rw-r--r--media-libs/phonon/files/phonon-4.7.0-plugin-install.patch13
-rw-r--r--media-libs/phonon/metadata.xml10
-rw-r--r--media-libs/phonon/phonon-4.7.2.ebuild104
-rw-r--r--media-libs/phonon/phonon-4.8.3-r1.ebuild129
-rw-r--r--media-libs/phonon/phonon-4.8.3.ebuild98
-rw-r--r--media-libs/phonon/phonon-9999.ebuild129
-rw-r--r--media-libs/plib/Manifest1
-rw-r--r--media-libs/plib/files/plib-1.8.5-X11.patch11
-rw-r--r--media-libs/plib/metadata.xml5
-rw-r--r--media-libs/plib/plib-1.8.5.ebuild30
-rw-r--r--media-libs/plotutils/Manifest1
-rw-r--r--media-libs/plotutils/files/plotutils-2.5.1-rangecheck.patch14
-rw-r--r--media-libs/plotutils/files/plotutils-2.6-libpng-1.5.patch31
-rw-r--r--media-libs/plotutils/files/plotutils-2.6-libxmi.patch114
-rw-r--r--media-libs/plotutils/files/plotutils-2.6-makefile.patch73
-rw-r--r--media-libs/plotutils/metadata.xml5
-rw-r--r--media-libs/plotutils/plotutils-2.6-r1.ebuild75
-rw-r--r--media-libs/plotutils/plotutils-2.6.ebuild71
-rw-r--r--media-libs/pnglite/Manifest1
-rw-r--r--media-libs/pnglite/files/pnglite-0.1.17-include-stdio.patch16
-rw-r--r--media-libs/pnglite/metadata.xml8
-rw-r--r--media-libs/pnglite/pnglite-0.1.17.ebuild52
-rw-r--r--media-libs/portaudio/Manifest1
-rw-r--r--media-libs/portaudio/metadata.xml5
-rw-r--r--media-libs/portaudio/portaudio-19_pre20140130.ebuild46
-rw-r--r--media-libs/portmidi/Manifest1
-rw-r--r--media-libs/portmidi/files/portmidi-217-cmake.patch318
-rw-r--r--media-libs/portmidi/files/portmidi-217-python.patch25
-rw-r--r--media-libs/portmidi/metadata.xml11
-rw-r--r--media-libs/portmidi/portmidi-217-r1.ebuild128
-rw-r--r--media-libs/portmidi/portmidi-217.ebuild137
-rw-r--r--media-libs/prison/Manifest1
-rw-r--r--media-libs/prison/metadata.xml5
-rw-r--r--media-libs/prison/prison-1.1.1.ebuild22
-rw-r--r--media-libs/pymemphis/Manifest1
-rw-r--r--media-libs/pymemphis/metadata.xml7
-rw-r--r--media-libs/pymemphis/pymemphis-0.2.1.ebuild44
-rw-r--r--media-libs/qhull/Manifest1
-rw-r--r--media-libs/qhull/files/qhull-2010.1-cmake-install.patch98
-rw-r--r--media-libs/qhull/files/qhull-2010.1-overflows.patch50
-rw-r--r--media-libs/qhull/files/qhull-2012.1-64bit.patch32
-rw-r--r--media-libs/qhull/files/qhull-2012.1-format-security.patch16
-rw-r--r--media-libs/qhull/files/qhull-3.1-makefile.patch74
-rw-r--r--media-libs/qhull/metadata.xml17
-rw-r--r--media-libs/qhull/qhull-2012.1-r1.ebuild43
-rw-r--r--media-libs/qhull/qhull-2012.1-r3.ebuild50
-rw-r--r--media-libs/qhull/qhull-2012.1-r4.ebuild53
-rw-r--r--media-libs/qimageblitz/Manifest1
-rw-r--r--media-libs/qimageblitz/files/qimageblitz-0.0.6-gcc.patch16
-rw-r--r--media-libs/qimageblitz/files/qimageblitz-9999-exec-stack.patch11
-rw-r--r--media-libs/qimageblitz/metadata.xml5
-rw-r--r--media-libs/qimageblitz/qimageblitz-0.0.6-r1.ebuild38
-rw-r--r--media-libs/qt-gstreamer/Manifest1
-rw-r--r--media-libs/qt-gstreamer/files/qt-gstreamer-1.2.0-boost157.patch34
-rw-r--r--media-libs/qt-gstreamer/metadata.xml5
-rw-r--r--media-libs/qt-gstreamer/qt-gstreamer-1.2.0-r1.ebuild84
-rw-r--r--media-libs/qt-gstreamer/qt-gstreamer-1.2.0.ebuild52
-rw-r--r--media-libs/quarter/Manifest1
-rw-r--r--media-libs/quarter/files/quarter-1.0.0-gcc44.patch11
-rw-r--r--media-libs/quarter/metadata.xml8
-rw-r--r--media-libs/quarter/quarter-1.0.0-r1.ebuild49
-rw-r--r--media-libs/quesoglc/Manifest1
-rw-r--r--media-libs/quesoglc/metadata.xml8
-rw-r--r--media-libs/quesoglc/quesoglc-0.7.2.ebuild57
-rw-r--r--media-libs/quvi/Manifest4
-rw-r--r--media-libs/quvi/files/quvi-0.9.1-automagic.patch47
-rw-r--r--media-libs/quvi/metadata.xml11
-rw-r--r--media-libs/quvi/quvi-0.2.19.ebuild40
-rw-r--r--media-libs/quvi/quvi-0.4.2.ebuild25
-rw-r--r--media-libs/quvi/quvi-0.9.4.ebuild39
-rw-r--r--media-libs/quvi/quvi-0.9.5.ebuild39
-rw-r--r--media-libs/raptor/Manifest2
-rw-r--r--media-libs/raptor/metadata.xml8
-rw-r--r--media-libs/raptor/raptor-2.0.14.ebuild66
-rw-r--r--media-libs/raptor/raptor-2.0.9.ebuild64
-rw-r--r--media-libs/raspberrypi-userland/Manifest3
-rw-r--r--media-libs/raspberrypi-userland/files/04raspberrypi-userland3
-rw-r--r--media-libs/raspberrypi-userland/files/raspberrypi-userland-9999-gentoo.patch81
-rw-r--r--media-libs/raspberrypi-userland/metadata.xml15
-rw-r--r--media-libs/raspberrypi-userland/raspberrypi-userland-0_pre20130705-r1.ebuild61
-rw-r--r--media-libs/raspberrypi-userland/raspberrypi-userland-0_pre20140117.ebuild61
-rw-r--r--media-libs/raspberrypi-userland/raspberrypi-userland-0_pre20140830.ebuild61
-rw-r--r--media-libs/raspberrypi-userland/raspberrypi-userland-9999.ebuild47
-rw-r--r--media-libs/raul/Manifest1
-rw-r--r--media-libs/raul/files/ldconfig2.patch12
-rw-r--r--media-libs/raul/files/raul-0.8.0-gcc47.patch45
-rw-r--r--media-libs/raul/metadata.xml9
-rw-r--r--media-libs/raul/raul-0.8.0-r1.ebuild50
-rw-r--r--media-libs/raul/raul-0.8.0.ebuild51
-rw-r--r--media-libs/resid/Manifest1
-rw-r--r--media-libs/resid/metadata.xml8
-rw-r--r--media-libs/resid/resid-0.16_p2.ebuild41
-rw-r--r--media-libs/rply/Manifest1
-rw-r--r--media-libs/rply/files/rply-1.01-lc_numeric.patch86
-rw-r--r--media-libs/rply/files/rply-1.01-stdint.h.patch185
-rw-r--r--media-libs/rply/files/rply_CMakeLists.txt39
-rw-r--r--media-libs/rply/metadata.xml8
-rw-r--r--media-libs/rply/rply-1.01-r1.ebuild38
-rw-r--r--media-libs/rtaudio/Manifest1
-rw-r--r--media-libs/rtaudio/files/rtaudio-4.0.11-cflags.patch24
-rw-r--r--media-libs/rtaudio/files/rtaudio-4.0.12-configure.patch73
-rw-r--r--media-libs/rtaudio/files/rtaudio-4.0.12-makefile.patch16
-rw-r--r--media-libs/rtaudio/metadata.xml5
-rw-r--r--media-libs/rtaudio/rtaudio-4.0.12-r1.ebuild64
-rw-r--r--media-libs/rubberband/Manifest2
-rw-r--r--media-libs/rubberband/metadata.xml5
-rw-r--r--media-libs/rubberband/rubberband-1.7.0.ebuild44
-rw-r--r--media-libs/rubberband/rubberband-1.8.1.ebuild44
-rw-r--r--media-libs/sampleicc/Manifest2
-rw-r--r--media-libs/sampleicc/metadata.xml10
-rw-r--r--media-libs/sampleicc/sampleicc-1.6.6.ebuild32
-rw-r--r--media-libs/sampleicc/sampleicc-1.6.8.ebuild21
-rw-r--r--media-libs/sbc/Manifest2
-rw-r--r--media-libs/sbc/metadata.xml9
-rw-r--r--media-libs/sbc/sbc-1.2.ebuild34
-rw-r--r--media-libs/sbc/sbc-1.3.ebuild34
-rw-r--r--media-libs/schroedinger/Manifest1
-rw-r--r--media-libs/schroedinger/files/schroedinger-1.0.10-orc-symbols.patch43
-rw-r--r--media-libs/schroedinger/files/schroedinger-1.0.11-darwin-compile.patch32
-rw-r--r--media-libs/schroedinger/files/schroedinger-1.0.9-asneeded.patch11
-rw-r--r--media-libs/schroedinger/metadata.xml8
-rw-r--r--media-libs/schroedinger/schroedinger-1.0.11-r1.ebuild45
-rw-r--r--media-libs/sdif/Manifest2
-rw-r--r--media-libs/sdif/files/sdif-3.8.6-cflags.patch39
-rw-r--r--media-libs/sdif/metadata.xml14
-rw-r--r--media-libs/sdif/sdif-3.8.6.ebuild49
-rw-r--r--media-libs/sdl-gfx/Manifest1
-rw-r--r--media-libs/sdl-gfx/metadata.xml21
-rw-r--r--media-libs/sdl-gfx/sdl-gfx-2.0.25.ebuild44
-rw-r--r--media-libs/sdl-image/Manifest1
-rw-r--r--media-libs/sdl-image/metadata.xml8
-rw-r--r--media-libs/sdl-image/sdl-image-1.2.12-r1.ebuild63
-rw-r--r--media-libs/sdl-mixer/Manifest1
-rw-r--r--media-libs/sdl-mixer/files/sdl-mixer-1.2.12-Fix-compiling-against-libmodplug-0.8.8.5.patch24
-rw-r--r--media-libs/sdl-mixer/files/sdl-mixer-1.2.12-clang.patch11
-rw-r--r--media-libs/sdl-mixer/files/sdl-mixer-1.2.12-mikmod-r587.patch55
-rw-r--r--media-libs/sdl-mixer/files/sdl-mixer-1.2.12-mikmod-r588.patch36
-rw-r--r--media-libs/sdl-mixer/files/sdl-mixer-1.2.12-wav.patch35
-rw-r--r--media-libs/sdl-mixer/metadata.xml13
-rw-r--r--media-libs/sdl-mixer/sdl-mixer-1.2.12-r3.ebuild107
-rw-r--r--media-libs/sdl-mixer/sdl-mixer-1.2.12-r4.ebuild115
-rw-r--r--media-libs/sdl-net/Manifest1
-rw-r--r--media-libs/sdl-net/metadata.xml5
-rw-r--r--media-libs/sdl-net/sdl-net-1.2.8-r1.ebuild45
-rw-r--r--media-libs/sdl-pango/Manifest2
-rw-r--r--media-libs/sdl-pango/metadata.xml9
-rw-r--r--media-libs/sdl-pango/sdl-pango-0.1.2.ebuild43
-rw-r--r--media-libs/sdl-sound/Manifest1
-rw-r--r--media-libs/sdl-sound/files/sdl-sound-1.0.3-automake-1.13.patch11
-rw-r--r--media-libs/sdl-sound/files/sdl-sound-1.0.3-underlinking.patch18
-rw-r--r--media-libs/sdl-sound/metadata.xml8
-rw-r--r--media-libs/sdl-sound/sdl-sound-1.0.3-r1.ebuild67
-rw-r--r--media-libs/sdl-terminal/Manifest1
-rw-r--r--media-libs/sdl-terminal/files/sdl-terminal-1.1.3-nopython.patch24
-rw-r--r--media-libs/sdl-terminal/metadata.xml5
-rw-r--r--media-libs/sdl-terminal/sdl-terminal-1.1.3-r1.ebuild39
-rw-r--r--media-libs/sdl-ttf/Manifest1
-rw-r--r--media-libs/sdl-ttf/files/sdl-ttf-2.0.11-underlink.patch10
-rw-r--r--media-libs/sdl-ttf/metadata.xml10
-rw-r--r--media-libs/sdl-ttf/sdl-ttf-2.0.11-r1.ebuild49
-rw-r--r--media-libs/sdl2-gfx/Manifest1
-rw-r--r--media-libs/sdl2-gfx/metadata.xml18
-rw-r--r--media-libs/sdl2-gfx/sdl2-gfx-1.0.1.ebuild40
-rw-r--r--media-libs/sdl2-image/Manifest1
-rw-r--r--media-libs/sdl2-image/metadata.xml8
-rw-r--r--media-libs/sdl2-image/sdl2-image-2.0.0-r1.ebuild60
-rw-r--r--media-libs/sdl2-mixer/Manifest1
-rw-r--r--media-libs/sdl2-mixer/files/sdl2-mixer-2.0.0-Fix-compiling-against-libmodplug-0.8.8.5.patch25
-rw-r--r--media-libs/sdl2-mixer/metadata.xml17
-rw-r--r--media-libs/sdl2-mixer/sdl2-mixer-2.0.0-r1.ebuild115
-rw-r--r--media-libs/sdl2-net/Manifest1
-rw-r--r--media-libs/sdl2-net/metadata.xml5
-rw-r--r--media-libs/sdl2-net/sdl2-net-2.0.0-r1.ebuild36
-rw-r--r--media-libs/sdl2-ttf/Manifest1
-rw-r--r--media-libs/sdl2-ttf/files/sdl2-ttf-2.0.12-linking.patch16
-rw-r--r--media-libs/sdl2-ttf/metadata.xml12
-rw-r--r--media-libs/sdl2-ttf/sdl2-ttf-2.0.12-r1.ebuild45
-rw-r--r--media-libs/sdlmm/Manifest1
-rw-r--r--media-libs/sdlmm/metadata.xml10
-rw-r--r--media-libs/sdlmm/sdlmm-0.1.8-r1.ebuild24
-rw-r--r--media-libs/sg/Manifest1
-rw-r--r--media-libs/sg/files/1.4-doc.patch20
-rw-r--r--media-libs/sg/files/1.4-opengl.patch98
-rw-r--r--media-libs/sg/metadata.xml8
-rw-r--r--media-libs/sg/sg-1.5.ebuild76
-rw-r--r--media-libs/sge/Manifest1
-rw-r--r--media-libs/sge/files/sge-030809-build.patch123
-rw-r--r--media-libs/sge/files/sge-030809-cmap.patch28
-rw-r--r--media-libs/sge/files/sge-030809-freetype.patch25
-rw-r--r--media-libs/sge/metadata.xml8
-rw-r--r--media-libs/sge/sge-030809.ebuild56
-rw-r--r--media-libs/shivavg/Manifest1
-rw-r--r--media-libs/shivavg/metadata.xml16
-rw-r--r--media-libs/shivavg/shivavg-0.2.1.ebuild33
-rw-r--r--media-libs/silgraphite/Manifest1
-rw-r--r--media-libs/silgraphite/files/silgraphite-2.3.1-aligned_access.patch63
-rw-r--r--media-libs/silgraphite/metadata.xml11
-rw-r--r--media-libs/silgraphite/silgraphite-2.3.1.ebuild45
-rw-r--r--media-libs/simage/Manifest1
-rw-r--r--media-libs/simage/files/simage-1.7.0-libpng15.patch12
-rw-r--r--media-libs/simage/files/simage-1.7.0-pkgconfig-partial.patch13
-rw-r--r--media-libs/simage/metadata.xml7
-rw-r--r--media-libs/simage/simage-1.7.0.ebuild77
-rw-r--r--media-libs/skstream/Manifest1
-rw-r--r--media-libs/skstream/files/skstream-0.3.9-test.patch20
-rw-r--r--media-libs/skstream/metadata.xml10
-rw-r--r--media-libs/skstream/skstream-0.3.9.ebuild21
-rw-r--r--media-libs/slv2/Manifest1
-rw-r--r--media-libs/slv2/files/ldconfig.patch14
-rw-r--r--media-libs/slv2/metadata.xml5
-rw-r--r--media-libs/slv2/slv2-0.6.6-r1.ebuild39
-rw-r--r--media-libs/slv2/slv2-0.6.6.ebuild53
-rw-r--r--media-libs/smpeg/Manifest2
-rw-r--r--media-libs/smpeg/files/smpeg-0.4.4-PIC.patch308
-rw-r--r--media-libs/smpeg/files/smpeg-0.4.4-automake.patch13
-rw-r--r--media-libs/smpeg/files/smpeg-0.4.4-config.patch18
-rw-r--r--media-libs/smpeg/files/smpeg-0.4.4-flags.patch129
-rw-r--r--media-libs/smpeg/files/smpeg-0.4.4-format.patch11
-rw-r--r--media-libs/smpeg/files/smpeg-0.4.4-gcc41.patch41
-rw-r--r--media-libs/smpeg/files/smpeg-0.4.4-gnu-stack.patch32
-rw-r--r--media-libs/smpeg/files/smpeg-0.4.4-m4.patch9
-rw-r--r--media-libs/smpeg/files/smpeg-0.4.4-malloc.patch25
-rw-r--r--media-libs/smpeg/files/smpeg-0.4.4-missing-init.patch10
-rw-r--r--media-libs/smpeg/files/smpeg-0.4.4-mmx.patch12
-rw-r--r--media-libs/smpeg/metadata.xml5
-rw-r--r--media-libs/smpeg/smpeg-0.4.4-r10.ebuild75
-rw-r--r--media-libs/smpeg2/Manifest1
-rw-r--r--media-libs/smpeg2/files/smpeg2-2.0.0-smpeg2-config.patch33
-rw-r--r--media-libs/smpeg2/metadata.xml5
-rw-r--r--media-libs/smpeg2/smpeg2-2.0.0-r3.ebuild51
-rw-r--r--media-libs/soxr/Manifest2
-rw-r--r--media-libs/soxr/files/libsuffix.patch13
-rw-r--r--media-libs/soxr/files/nodoc.patch19
-rw-r--r--media-libs/soxr/files/noexamples.patch9
-rw-r--r--media-libs/soxr/metadata.xml8
-rw-r--r--media-libs/soxr/soxr-0.1.0.ebuild36
-rw-r--r--media-libs/soxr/soxr-0.1.1.ebuild35
-rw-r--r--media-libs/spandsp/Manifest3
-rw-r--r--media-libs/spandsp/metadata.xml8
-rw-r--r--media-libs/spandsp/spandsp-0.0.6.ebuild68
-rw-r--r--media-libs/spandsp/spandsp-0.0.6_pre12-r1.ebuild50
-rw-r--r--media-libs/spandsp/spandsp-0.0.6_pre21.ebuild53
-rw-r--r--media-libs/speex/Manifest1
-rw-r--r--media-libs/speex/files/speex-1.2_rc1-configure.patch31
-rw-r--r--media-libs/speex/files/speex-1.2_rc1-r1-configure.patch40
-rw-r--r--media-libs/speex/metadata.xml8
-rw-r--r--media-libs/speex/speex-1.2_rc1-r2.ebuild55
-rw-r--r--media-libs/sratom/Manifest2
-rw-r--r--media-libs/sratom/metadata.xml5
-rw-r--r--media-libs/sratom/sratom-0.4.4.ebuild41
-rw-r--r--media-libs/sratom/sratom-0.4.6.ebuild44
-rw-r--r--media-libs/stimg/Manifest1
-rw-r--r--media-libs/stimg/files/stimg-0.1.0-libpng15.patch37
-rw-r--r--media-libs/stimg/metadata.xml5
-rw-r--r--media-libs/stimg/stimg-0.1.0.ebuild37
-rw-r--r--media-libs/stk/Manifest2
-rw-r--r--media-libs/stk/files/stk-4.4.4/010_all_removeForcedFlags.patch13
-rw-r--r--media-libs/stk/files/stk-4.4.4/020_all_noExamplesOrDemo.patch32
-rw-r--r--media-libs/stk/files/stk-4.4.4/030_all_sharedlib.patch13
-rw-r--r--media-libs/stk/files/stk-4.4.4/040_all_sharedliblink.patch13
-rw-r--r--media-libs/stk/files/stk-4.4.4/050_all_cxxflags.patch15
-rw-r--r--media-libs/stk/files/stk-4.5.0/010_all_removeForcedFlags.patch13
-rw-r--r--media-libs/stk/files/stk-4.5.0/020_all_noExamplesOrDemo.patch40
-rw-r--r--media-libs/stk/files/stk-4.5.0/040_all_sharedliblink.patch13
-rw-r--r--media-libs/stk/files/stk-4.5.0/050_all_cxxflags.patch13
-rw-r--r--media-libs/stk/metadata.xml14
-rw-r--r--media-libs/stk/stk-4.4.4-r1.ebuild63
-rw-r--r--media-libs/stk/stk-4.5.0.ebuild69
-rw-r--r--media-libs/stops/Manifest1
-rw-r--r--media-libs/stops/metadata.xml5
-rw-r--r--media-libs/stops/stops-0.3.0.ebuild20
-rw-r--r--media-libs/sublib/Manifest1
-rw-r--r--media-libs/sublib/metadata.xml13
-rw-r--r--media-libs/sublib/sublib-0.9.ebuild22
-rw-r--r--media-libs/suil/Manifest2
-rw-r--r--media-libs/suil/metadata.xml8
-rw-r--r--media-libs/suil/suil-0.8.0.ebuild39
-rw-r--r--media-libs/suil/suil-0.8.2.ebuild41
-rw-r--r--media-libs/svgalib/Manifest1
-rw-r--r--media-libs/svgalib/files/svgalib-1.9.19-pic.patch17
-rw-r--r--media-libs/svgalib/files/svgalib-1.9.25-build.patch73
-rw-r--r--media-libs/svgalib/files/svgalib-1.9.25-build2.patch14
-rw-r--r--media-libs/svgalib/files/svgalib-1.9.25-glibc210.patch109
-rw-r--r--media-libs/svgalib/files/svgalib-1.9.25-kernel3.4.patch29
-rwxr-xr-xmedia-libs/svgalib/files/svgalib-1.9.25-linux2.6.28.patch30
-rw-r--r--media-libs/svgalib/files/svgalib-1.9.25-linux2.6.36-r1.patch32
-rw-r--r--media-libs/svgalib/files/svgalib-1.9.25-linux2.6.patch289
-rw-r--r--media-libs/svgalib/files/svgalib-1.9.25-qa.patch33
-rw-r--r--media-libs/svgalib/files/svgalib-1.9.25-segfault.patch11
-rw-r--r--media-libs/svgalib/files/svgalib.udev.rules.d.21
-rw-r--r--media-libs/svgalib/metadata.xml11
-rw-r--r--media-libs/svgalib/svgalib-1.9.25-r4.ebuild129
-rw-r--r--media-libs/t1lib/Manifest1
-rw-r--r--media-libs/t1lib/files/t1lib-5.1.1-parallel.patch12
-rw-r--r--media-libs/t1lib/files/t1lib-do-not-install-t1lib_doc.patch19
-rw-r--r--media-libs/t1lib/metadata.xml5
-rw-r--r--media-libs/t1lib/t1lib-5.1.2.ebuild73
-rw-r--r--media-libs/taglib-extras/Manifest1
-rw-r--r--media-libs/taglib-extras/metadata.xml5
-rw-r--r--media-libs/taglib-extras/taglib-extras-1.0.1-r1.ebuild23
-rw-r--r--media-libs/taglib/Manifest1
-rw-r--r--media-libs/taglib/files/taglib-1.6.1-install-examples.patch16
-rw-r--r--media-libs/taglib/files/taglib-1.9.1-abi-breakage.patch107
-rw-r--r--media-libs/taglib/files/taglib-1.9.1-bytevector-simpler.patch131
-rw-r--r--media-libs/taglib/files/taglib-1.9.1-missing-deletes.patch48
-rw-r--r--media-libs/taglib/files/taglib-1.9.1-order-big-endian.patch33
-rw-r--r--media-libs/taglib/metadata.xml11
-rw-r--r--media-libs/taglib/taglib-1.9.1-r2.ebuild66
-rw-r--r--media-libs/tiff/Manifest2
-rw-r--r--media-libs/tiff/files/tiff-3.9.7-CVE-2012-4447.patch191
-rw-r--r--media-libs/tiff/files/tiff-3.9.7-CVE-2012-4564.patch77
-rw-r--r--media-libs/tiff/files/tiff-3.9.7-CVE-2012-5581.patch245
-rw-r--r--media-libs/tiff/files/tiff-3.9.7-printdir-width.patch36
-rw-r--r--media-libs/tiff/files/tiff-3.9.7-tiffinfo-exif.patch59
-rw-r--r--media-libs/tiff/files/tiff-4.0.3-CVE-2012-4447.patch40
-rw-r--r--media-libs/tiff/files/tiff-4.0.3-CVE-2012-4564.patch86
-rw-r--r--media-libs/tiff/files/tiff-4.0.3-CVE-2013-1960.patch145
-rw-r--r--media-libs/tiff/files/tiff-4.0.3-CVE-2013-1961.patch759
-rw-r--r--media-libs/tiff/files/tiff-4.0.3-CVE-2013-4231.patch16
-rw-r--r--media-libs/tiff/files/tiff-4.0.3-CVE-2013-4232.patch13
-rw-r--r--media-libs/tiff/files/tiff-4.0.3-CVE-2013-4244.patch15
-rw-r--r--media-libs/tiff/files/tiff-4.0.3-libjpeg-turbo.patch122
-rw-r--r--media-libs/tiff/files/tiff-4.0.3-tiff2pdf-colors.patch15
-rw-r--r--media-libs/tiff/metadata.xml7
-rw-r--r--media-libs/tiff/tiff-3.9.7-r1.ebuild72
-rw-r--r--media-libs/tiff/tiff-4.0.3-r6.ebuild79
-rw-r--r--media-libs/tremor/Manifest2
-rw-r--r--media-libs/tremor/metadata.xml8
-rw-r--r--media-libs/tremor/tremor-0_pre20120120.ebuild38
-rw-r--r--media-libs/tremor/tremor-0_pre20130223-r1.ebuild45
-rw-r--r--media-libs/tremor/tremor-0_pre20130223.ebuild45
-rw-r--r--media-libs/tse3/Manifest2
-rw-r--r--media-libs/tse3/files/tse3-0.2.7-gcc4.patch10
-rw-r--r--media-libs/tse3/files/tse3-0.2.7-size_t-64bit.patch25
-rw-r--r--media-libs/tse3/files/tse3-0.3.1+gcc-4.3.patch80
-rw-r--r--media-libs/tse3/files/tse3-0.3.1-parallelmake.patch11
-rw-r--r--media-libs/tse3/metadata.xml8
-rw-r--r--media-libs/tse3/tse3-0.3.1-r1.ebuild51
-rw-r--r--media-libs/urt/Manifest1
-rw-r--r--media-libs/urt/files/gentoo-config53
-rw-r--r--media-libs/urt/files/urt-3.1b-build-fixes.patch151
-rw-r--r--media-libs/urt/files/urt-3.1b-compile-updates.patch141
-rw-r--r--media-libs/urt/files/urt-3.1b-make.patch75
-rw-r--r--media-libs/urt/files/urt-3.1b-rle-fixes.patch203
-rw-r--r--media-libs/urt/files/urt-3.1b-solaris.patch14
-rw-r--r--media-libs/urt/files/urt-3.1b-tempfile.patch19
-rw-r--r--media-libs/urt/metadata.xml5
-rw-r--r--media-libs/urt/urt-3.1b-r1.ebuild75
-rw-r--r--media-libs/vamp-plugin-sdk/Manifest2
-rw-r--r--media-libs/vamp-plugin-sdk/metadata.xml5
-rw-r--r--media-libs/vamp-plugin-sdk/vamp-plugin-sdk-2.5.ebuild46
-rw-r--r--media-libs/vamp-plugin-sdk/vamp-plugin-sdk-2.6.ebuild46
-rw-r--r--media-libs/varconf/Manifest2
-rw-r--r--media-libs/varconf/metadata.xml16
-rw-r--r--media-libs/varconf/varconf-0.6.6.ebuild22
-rw-r--r--media-libs/varconf/varconf-0.6.7.ebuild22
-rw-r--r--media-libs/vigra/Manifest2
-rw-r--r--media-libs/vigra/files/vigra-1.10.0-automagicness.patch64
-rw-r--r--media-libs/vigra/files/vigra-1.10.0-cmake-scripts.patch53
-rw-r--r--media-libs/vigra/files/vigra-1.10.0-mpi-fixes.patch230
-rw-r--r--media-libs/vigra/files/vigra-1.8.0-automagicness.patch54
-rw-r--r--media-libs/vigra/files/vigra-1.8.0-doxygen.patch57
-rw-r--r--media-libs/vigra/files/vigra-1.8.0-gcc47.patch25
-rw-r--r--media-libs/vigra/files/vigra-1.8.0-numpy_doc.patch28
-rw-r--r--media-libs/vigra/files/vigra-1.9.0-automagicness.patch74
-rw-r--r--media-libs/vigra/metadata.xml5
-rw-r--r--media-libs/vigra/vigra-1.10.0.ebuild141
-rw-r--r--media-libs/vigra/vigra-1.9.0.ebuild99
-rw-r--r--media-libs/vips/Manifest2
-rw-r--r--media-libs/vips/files/vips-7.20.7-build.patch57
-rw-r--r--media-libs/vips/metadata.xml8
-rw-r--r--media-libs/vips/vips-7.26.3.ebuild75
-rw-r--r--media-libs/vips/vips-7.26.7.ebuild75
-rw-r--r--media-libs/vo-aacenc/Manifest2
-rw-r--r--media-libs/vo-aacenc/metadata.xml12
-rw-r--r--media-libs/vo-aacenc/vo-aacenc-0.1.2.ebuild50
-rw-r--r--media-libs/vo-aacenc/vo-aacenc-0.1.3.ebuild42
-rw-r--r--media-libs/vo-aacenc/vo-aacenc-9999.ebuild42
-rw-r--r--media-libs/vo-amrwbenc/Manifest2
-rw-r--r--media-libs/vo-amrwbenc/metadata.xml15
-rw-r--r--media-libs/vo-amrwbenc/vo-amrwbenc-0.1.2-r1.ebuild41
-rw-r--r--media-libs/vo-amrwbenc/vo-amrwbenc-0.1.3.ebuild41
-rw-r--r--media-libs/vo-amrwbenc/vo-amrwbenc-9999.ebuild41
-rw-r--r--media-libs/volpack/Manifest1
-rw-r--r--media-libs/volpack/metadata.xml13
-rw-r--r--media-libs/volpack/volpack-1.0_p7.ebuild40
-rw-r--r--media-libs/waffle/Manifest1
-rw-r--r--media-libs/waffle/metadata.xml11
-rw-r--r--media-libs/waffle/waffle-1.5.1.ebuild64
-rw-r--r--media-libs/waffle/waffle-9999.ebuild64
-rw-r--r--media-libs/webrtc-audio-processing/Manifest1
-rw-r--r--media-libs/webrtc-audio-processing/metadata.xml7
-rw-r--r--media-libs/webrtc-audio-processing/webrtc-audio-processing-0.1-r1.ebuild22
-rw-r--r--media-libs/wxsvg/Manifest3
-rw-r--r--media-libs/wxsvg/metadata.xml8
-rw-r--r--media-libs/wxsvg/wxsvg-1.1.13.ebuild42
-rw-r--r--media-libs/wxsvg/wxsvg-1.4.2.ebuild41
-rw-r--r--media-libs/wxsvg/wxsvg-1.5.4.ebuild41
-rw-r--r--media-libs/x264/Manifest7
-rw-r--r--media-libs/x264/files/x264-0.0.20120707-gcc48.patch138
-rw-r--r--media-libs/x264/files/x264-0.0.20130731-cflags.patch62
-rw-r--r--media-libs/x264/files/x264-0.0.20130912-cflags.patch54
-rw-r--r--media-libs/x264/files/x264-cflags.patch55
-rw-r--r--media-libs/x264/files/x264-nostrip.patch16
-rw-r--r--media-libs/x264/files/x264-onlylib-20110425.patch30
-rw-r--r--media-libs/x264/files/x264-x32.patch34
-rw-r--r--media-libs/x264/metadata.xml14
-rw-r--r--media-libs/x264/x264-0.0.20111220.ebuild88
-rw-r--r--media-libs/x264/x264-0.0.20120327.ebuild88
-rw-r--r--media-libs/x264/x264-0.0.20120707.ebuild104
-rw-r--r--media-libs/x264/x264-0.0.20130506.ebuild82
-rw-r--r--media-libs/x264/x264-0.0.20130731.ebuild71
-rw-r--r--media-libs/x264/x264-0.0.20130912.ebuild71
-rw-r--r--media-libs/x264/x264-0.0.20140308.ebuild73
-rw-r--r--media-libs/x264/x264-9999.ebuild73
-rw-r--r--media-libs/x265/Manifest2
-rw-r--r--media-libs/x265/metadata.xml11
-rw-r--r--media-libs/x265/x265-1.5.ebuild74
-rw-r--r--media-libs/x265/x265-1.7.ebuild82
-rw-r--r--media-libs/x265/x265-9999.ebuild82
-rw-r--r--media-libs/xine-lib/Manifest2
-rw-r--r--media-libs/xine-lib/files/accel_vaapi.h135
-rw-r--r--media-libs/xine-lib/metadata.xml70
-rw-r--r--media-libs/xine-lib/xine-lib-1.2.3.ebuild214
-rw-r--r--media-libs/xine-lib/xine-lib-1.2.6-r1.ebuild226
-rw-r--r--media-libs/xine-lib/xine-lib-1.2.6.ebuild223
-rw-r--r--media-libs/xine-lib/xine-lib-1.2.9999.ebuild226
-rw-r--r--media-libs/xvid/Manifest2
-rw-r--r--media-libs/xvid/metadata.xml11
-rw-r--r--media-libs/xvid/xvid-1.3.3.ebuild73
-rw-r--r--media-libs/xvid/xvid-1.3.4.ebuild73
-rw-r--r--media-libs/zita-alsa-pcmi/Manifest1
-rw-r--r--media-libs/zita-alsa-pcmi/files/makefile.patch65
-rw-r--r--media-libs/zita-alsa-pcmi/metadata.xml5
-rw-r--r--media-libs/zita-alsa-pcmi/zita-alsa-pcmi-0.2.0.ebuild41
-rw-r--r--media-libs/zita-convolver/Manifest1
-rw-r--r--media-libs/zita-convolver/files/zita-convolver-2.0.0-makefile.patch32
-rw-r--r--media-libs/zita-convolver/metadata.xml5
-rw-r--r--media-libs/zita-convolver/zita-convolver-2.0.0.ebuild33
-rw-r--r--media-libs/zvbi/Manifest1
-rw-r--r--media-libs/zvbi/metadata.xml12
-rw-r--r--media-libs/zvbi/zvbi-0.2.35-r1.ebuild51
-rw-r--r--media-libs/zvbi/zvbi-0.2.35.ebuild48
2356 files changed, 96257 insertions, 0 deletions
diff --git a/media-libs/FusionSound/FusionSound-1.1.1-r1.ebuild b/media-libs/FusionSound/FusionSound-1.1.1-r1.ebuild
new file mode 100644
index 000000000000..1d803eb3fe7e
--- /dev/null
+++ b/media-libs/FusionSound/FusionSound-1.1.1-r1.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 autotools eutils
+
+DESCRIPTION="Audio sub system for multiple applications"
+HOMEPAGE="http://www.directfb.org/"
+SRC_URI="http://www.directfb.org/downloads/Core/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ppc x86"
+IUSE="alsa cddb ffmpeg mad oss timidity vorbis"
+
+RDEPEND=">=dev-libs/DirectFB-${PV}
+ <dev-libs/DirectFB-1.6.3
+ alsa? ( media-libs/alsa-lib )
+ timidity? (
+ media-libs/libtimidity
+ media-sound/timidity++
+ )
+ vorbis? ( media-libs/libvorbis )
+ mad? ( media-libs/libmad )
+ cddb? ( media-libs/libcddb )
+ ffmpeg? ( >=virtual/ffmpeg-9 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ sys-apps/sed"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-gcc43.patch \
+ "${FILESDIR}"/${P}-ffmpeg.patch \
+ "${FILESDIR}"/${P}-ffmpeg-0.6.90.patch \
+ "${FILESDIR}"/${P}-ffmpeg-0.10.patch \
+ "${FILESDIR}"/${P}-libavformat54.patch \
+ "${FILESDIR}"/${P}-libav-0.8.1.patch \
+ "${FILESDIR}"/${P}-libav-9.patch \
+ "${FILESDIR}"/${P}-ffmpeg2.patch \
+ "${FILESDIR}"/${P}-segfault.patch
+
+ sed -i -e 's:-O3 -ffast-math -pipe::' configure.in || die
+
+ AT_M4DIR="m4" eautoreconf
+}
+
+src_configure() {
+ local myaudio="wave"
+ use alsa && myaudio+=" alsa"
+ use oss && myaudio+=" oss"
+
+ # Lite is used only for tests or examples.
+ # Tremor isn't there with latest libvorbis.
+ econf \
+ --without-lite \
+ --with-drivers="${myaudio}" \
+ --without-examples \
+ $(use_with timidity) \
+ --with-wave \
+ $(use_with vorbis) \
+ --without-tremor \
+ $(use_with mad) \
+ $(use_with cddb cdda) \
+ $(use_with ffmpeg) \
+ --with-playlist
+}
+
+src_install() {
+ emake DESTDIR="${D}" htmldir=/usr/share/doc/${PF}/html install
+ dodoc AUTHORS ChangeLog NEWS README TODO
+}
diff --git a/media-libs/FusionSound/Manifest b/media-libs/FusionSound/Manifest
new file mode 100644
index 000000000000..93e7dbebca9c
--- /dev/null
+++ b/media-libs/FusionSound/Manifest
@@ -0,0 +1 @@
+DIST FusionSound-1.1.1.tar.gz 1103465 SHA256 573505cb6d8e39174f188ef8f749fc4c0f3476397f379d2b65ff8d07b8aa6f6d SHA512 58ede71d78165491a24f28ee7658f4ca7ea6292e3bc5dad3e54f42f785338a6ae02020a03af38e92f3a4e9b2fd5a70cc2d643dc338ffb62eeeed1a0e9d11d853 WHIRLPOOL f0905d60ca3b72daa1744e8608fc7797b335fa4978440fbfb6397ebae689a8e20a2df1509ae7f76a65b92200b975a052df4d38e9608410393863e44fc7973200
diff --git a/media-libs/FusionSound/files/FusionSound-1.1.1-ffmpeg-0.10.patch b/media-libs/FusionSound/files/FusionSound-1.1.1-ffmpeg-0.10.patch
new file mode 100644
index 000000000000..f6fc333ff796
--- /dev/null
+++ b/media-libs/FusionSound/files/FusionSound-1.1.1-ffmpeg-0.10.patch
@@ -0,0 +1,126 @@
+Parts of:
+http://cvs.pld-linux.org/cgi-bin/viewvc.cgi/cvs/packages/FusionSound/FusionSound-ffmpeg.patch?view=markup
+
+and remove a write only variable.
+https://bugs.gentoo.org/show_bug.cgi?id=405721
+
+Index: FusionSound-1.1.1/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_ffmpeg.c
+===================================================================
+--- FusionSound-1.1.1.orig/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_ffmpeg.c
++++ FusionSound-1.1.1/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_ffmpeg.c
+@@ -41,6 +41,7 @@
+
+ #include <misc/sound_util.h>
+
++#define FF_API_OLD_METADATA2 0
+ #include <libavcodec/avcodec.h>
+ #include <libavformat/avformat.h>
+
+@@ -476,17 +477,26 @@ static DFBResult
+ IFusionSoundMusicProvider_FFmpeg_GetTrackDescription( IFusionSoundMusicProvider *thiz,
+ FSTrackDescription *desc )
+ {
++ AVDictionaryEntry *tag = NULL;
++
+ DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_FFmpeg )
+
+ if (!desc)
+ return DFB_INVARG;
+
+- direct_snputs( desc->artist, data->ctx->author, FS_TRACK_DESC_ARTIST_LENGTH );
+- direct_snputs( desc->title, data->ctx->title, FS_TRACK_DESC_TITLE_LENGTH );
+- direct_snputs( desc->album, data->ctx->album, FS_TRACK_DESC_ALBUM_LENGTH );
+- direct_snputs( desc->genre, data->ctx->genre, FS_TRACK_DESC_GENRE_LENGTH );
+- direct_snputs( desc->encoding, data->codec->codec->name, FS_TRACK_DESC_ENCODING_LENGTH );
+- desc->year = data->ctx->year;
++ tag = av_dict_get(data->ctx->metadata, "artist", NULL, 0);
++ if (tag) direct_snputs( desc->artist, tag->value, FS_TRACK_DESC_ARTIST_LENGTH );
++ tag = av_dict_get(data->ctx->metadata, "title", NULL, 0);
++ if (tag) direct_snputs( desc->title, tag->value, FS_TRACK_DESC_TITLE_LENGTH );
++ tag = av_dict_get(data->ctx->metadata, "album", NULL, 0);
++ if (tag) direct_snputs( desc->album, tag->value, FS_TRACK_DESC_ALBUM_LENGTH );
++ tag = av_dict_get(data->ctx->metadata, "genre", NULL, 0);
++ if (tag) direct_snputs( desc->genre, tag->value, FS_TRACK_DESC_GENRE_LENGTH );
++ tag = av_dict_get(data->ctx->metadata, "encoding", NULL, 0);
++ if (tag) direct_snputs( desc->encoding, tag->value, FS_TRACK_DESC_ENCODING_LENGTH );
++ tag = av_dict_get(data->ctx->metadata, "year", NULL, 0);
++ if (tag) desc->year = atoi(tag->value);
++
+ desc->bitrate = data->codec->bit_rate;
+ desc->replaygain = desc->replaygain_album = 0;
+
+@@ -540,7 +550,6 @@ FFmpegStreamThread( DirectThread *thread
+ IFusionSoundMusicProvider_FFmpeg_data *data = ctx;
+
+ AVPacket pkt;
+- u8 *pkt_data = NULL;
+ int pkt_size = 0;
+ s64 pkt_pts = AV_NOPTS_VALUE;
+
+@@ -584,7 +593,6 @@ FFmpegStreamThread( DirectThread *thread
+ continue;
+ }
+
+- pkt_data = pkt.data;
+ pkt_size = pkt.size;
+ pkt_pts = pkt.pts;
+ if (pkt_pts != AV_NOPTS_VALUE) {
+@@ -595,14 +603,13 @@ FFmpegStreamThread( DirectThread *thread
+ }
+
+ len = AVCODEC_MAX_AUDIO_FRAME_SIZE;
+- decoded = avcodec_decode_audio2( data->codec,
+- (s16*)data->buf, &len, pkt_data, pkt_size );
++ decoded = avcodec_decode_audio3( data->codec,
++ (s16*)data->buf, &len, &pkt );
+ if (decoded < 0) {
+ av_free_packet( &pkt );
+ pkt_size = 0;
+ }
+ else {
+- pkt_data += decoded;
+ pkt_size -= decoded;
+ if (pkt_size <= 0)
+ av_free_packet( &pkt );
+@@ -739,7 +746,6 @@ FFmpegBufferThread( DirectThread *thread
+ IFusionSoundMusicProvider_FFmpeg_data *data = ctx;
+
+ AVPacket pkt;
+- u8 *pkt_data = NULL;
+ int pkt_size = 0;
+ s64 pkt_pts = AV_NOPTS_VALUE;
+ int pos = 0;
+@@ -789,7 +795,6 @@ FFmpegBufferThread( DirectThread *thread
+ continue;
+ }
+
+- pkt_data = pkt.data;
+ pkt_size = pkt.size;
+ pkt_pts = pkt.pts;
+ if (pkt_pts != AV_NOPTS_VALUE) {
+@@ -800,14 +805,13 @@ FFmpegBufferThread( DirectThread *thread
+ }
+
+ len = AVCODEC_MAX_AUDIO_FRAME_SIZE;
+- decoded = avcodec_decode_audio2( data->codec,
+- (s16*)data->buf, &len, pkt_data, pkt_size );
++ decoded = avcodec_decode_audio3( data->codec,
++ (s16*)data->buf, &len, &pkt );
+ if (decoded < 0) {
+ av_free_packet( &pkt );
+ pkt_size = 0;
+ }
+ else {
+- pkt_data += decoded;
+ pkt_size -= decoded;
+ if (pkt_size <= 0)
+ av_free_packet( &pkt );
+@@ -1208,7 +1212,7 @@ Construct( IFusionSoundMusicProvider *th
+ }
+
+ for (i = 0; i < data->ctx->nb_streams; i++) {
+- if (data->ctx->streams[i]->codec->codec_type == CODEC_TYPE_AUDIO) {
++ if (data->ctx->streams[i]->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
+ if (!data->st || data->st->codec->bit_rate < data->ctx->streams[i]->codec->bit_rate)
+ data->st = data->ctx->streams[i];
+ }
diff --git a/media-libs/FusionSound/files/FusionSound-1.1.1-ffmpeg-0.6.90.patch b/media-libs/FusionSound/files/FusionSound-1.1.1-ffmpeg-0.6.90.patch
new file mode 100644
index 000000000000..b25b85bef621
--- /dev/null
+++ b/media-libs/FusionSound/files/FusionSound-1.1.1-ffmpeg-0.6.90.patch
@@ -0,0 +1,11 @@
+--- interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_ffmpeg.c.orig 2011-06-15 20:01:31.000000000 +0200
++++ interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_ffmpeg.c 2011-06-15 20:01:45.000000000 +0200
+@@ -64,7 +64,7 @@
+
+ DirectStream *stream;
+
+- ByteIOContext pb;
++ AVIOContext pb;
+ AVFormatContext *ctx;
+ AVStream *st;
+ void *iobuf;
diff --git a/media-libs/FusionSound/files/FusionSound-1.1.1-ffmpeg.patch b/media-libs/FusionSound/files/FusionSound-1.1.1-ffmpeg.patch
new file mode 100644
index 000000000000..8135157b3f31
--- /dev/null
+++ b/media-libs/FusionSound/files/FusionSound-1.1.1-ffmpeg.patch
@@ -0,0 +1,43 @@
+diff -Naurp FusionSound-1.1.1-original/configure.in FusionSound-1.1.1/configure.in
+--- FusionSound-1.1.1-original/configure.in 2008-02-11 05:31:45.000000000 -0600
++++ FusionSound-1.1.1/configure.in 2009-04-10 15:18:02.000000000 -0600
+@@ -513,11 +513,11 @@ AC_ARG_WITH(ffmpeg,
+
+ if test "x$with_ffmpeg" = "xyes"; then
+ AC_MSG_CHECKING([for libavcodec/libavformat])
+- if $PKG_CONFIG libavcodec libavformat; then
++ if $PKG_CONFIG libavcodec libavformat libavutil; then
+ AC_MSG_RESULT(yes)
+ ffmpeg="yes"
+- FFMPEG_CFLAGS=`$PKG_CONFIG --cflags libavcodec libavformat`
+- FFMPEG_LIBS=`$PKG_CONFIG --libs libavcodec libavformat`
++ FFMPEG_CFLAGS=`$PKG_CONFIG --cflags libavcodec libavformat libavutil`
++ FFMPEG_LIBS=`$PKG_CONFIG --libs libavcodec libavformat libavutil`
+ else
+ AC_MSG_RESULT(no)
+ AC_MSG_WARN([
+diff -Naurp FusionSound-1.1.1-original/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_ffmpeg.c FusionSound-1.1.1/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_ffmpeg.c
+--- FusionSound-1.1.1-original/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_ffmpeg.c 2008-02-11 05:31:45.000000000 -0600
++++ FusionSound-1.1.1/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_ffmpeg.c 2009-04-10 15:18:21.000000000 -0600
+@@ -41,8 +41,8 @@
+
+ #include <misc/sound_util.h>
+
+-#include <avcodec.h>
+-#include <avformat.h>
++#include <libavcodec/avcodec.h>
++#include <libavformat/avformat.h>
+
+ static DFBResult
+ Probe( IFusionSoundMusicProvider_ProbeContext *ctx );
+@@ -123,8 +123,8 @@ av_read_callback( void *opaque, uint8_t
+ return len;
+ }
+
+-static offset_t
+-av_seek_callback( void *opaque, offset_t offset, int whence )
++static int64_t
++av_seek_callback( void *opaque, int64_t offset, int whence )
+ {
+ IFusionSoundMusicProvider_FFmpeg_data *data = opaque;
+ unsigned int pos = 0;
diff --git a/media-libs/FusionSound/files/FusionSound-1.1.1-ffmpeg2.patch b/media-libs/FusionSound/files/FusionSound-1.1.1-ffmpeg2.patch
new file mode 100644
index 000000000000..adde2a541450
--- /dev/null
+++ b/media-libs/FusionSound/files/FusionSound-1.1.1-ffmpeg2.patch
@@ -0,0 +1,31 @@
+Minimal change fix to build with ffmpeg2.
+
+Index: FusionSound-1.1.1/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_ffmpeg.c
+===================================================================
+--- FusionSound-1.1.1.orig/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_ffmpeg.c
++++ FusionSound-1.1.1/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_ffmpeg.c
+@@ -46,6 +46,10 @@
+ #include <libavformat/avformat.h>
+ #include <libavutil/mathematics.h>
+
++#ifndef MAX_AUDIO_FRAME_SIZE
++#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio
++#endif
++
+ static DFBResult
+ Probe( IFusionSoundMusicProvider_ProbeContext *ctx );
+
+@@ -416,11 +420,11 @@ IFusionSoundMusicProvider_FFmpeg_Destruc
+ /* Ugly hack to fix a bug (segfault) in url_fclose() */
+ if (!(iformat->flags & AVFMT_NOFILE)) {
+ iformat->flags |= AVFMT_NOFILE;
+- av_close_input_file( data->ctx );
++ avformat_close_input( &data->ctx );
+ iformat->flags ^= AVFMT_NOFILE;
+ }
+ else {
+- av_close_input_file( data->ctx );
++ avformat_close_input( &data->ctx );
+ }
+ }
+
diff --git a/media-libs/FusionSound/files/FusionSound-1.1.1-gcc43.patch b/media-libs/FusionSound/files/FusionSound-1.1.1-gcc43.patch
new file mode 100644
index 000000000000..5ebdfbcf1eeb
--- /dev/null
+++ b/media-libs/FusionSound/files/FusionSound-1.1.1-gcc43.patch
@@ -0,0 +1,40 @@
+--- src/fusionsound.c.old 2009-01-16 14:28:27.000000000 +0100
++++ src/fusionsound.c 2009-01-16 14:33:34.000000000 +0100
+@@ -116,7 +116,7 @@
+ return fs_config_set( name, value );
+ }
+
+-DirectResult
++DFBResult
+ FusionSoundCreate( IFusionSound **ret_interface )
+ {
+ DFBResult ret;
+@@ -160,8 +160,8 @@
+ return ret;
+ }
+
+-DirectResult
+-FusionSoundError( const char *msg, DirectResult error )
++DFBResult
++FusionSoundError( const char *msg, DFBResult error )
+ {
+ if (msg)
+ fprintf( stderr, "(#) FusionSound Error [%s]: %s\n", msg, DirectResultString( error ) );
+@@ -172,7 +172,7 @@
+ }
+
+ DFBResult
+-FusionSoundErrorFatal( const char *msg, DirectResult error )
++FusionSoundErrorFatal( const char *msg, DFBResult error )
+ {
+ FusionSoundError( msg, error );
+
+@@ -180,7 +180,7 @@
+ }
+
+ const char *
+-FusionSoundErrorString( DirectResult error )
++FusionSoundErrorString( DFBResult error )
+ {
+ return DirectResultString( error );
+ }
diff --git a/media-libs/FusionSound/files/FusionSound-1.1.1-libav-0.8.1.patch b/media-libs/FusionSound/files/FusionSound-1.1.1-libav-0.8.1.patch
new file mode 100644
index 000000000000..d16fdd17c971
--- /dev/null
+++ b/media-libs/FusionSound/files/FusionSound-1.1.1-libav-0.8.1.patch
@@ -0,0 +1,11 @@
+diff -Naur FusionSound-1.1.1.orig/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_ffmpeg.c FusionSound-1.1.1/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_ffmpeg.c
+--- FusionSound-1.1.1.orig/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_ffmpeg.c 2012-04-17 15:13:57.864935809 +0200
++++ FusionSound-1.1.1/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_ffmpeg.c 2012-04-17 15:15:07.299067761 +0200
+@@ -44,6 +44,7 @@
+ #define FF_API_OLD_METADATA2 0
+ #include <libavcodec/avcodec.h>
+ #include <libavformat/avformat.h>
++#include <libavutil/mathematics.h>
+
+ static DFBResult
+ Probe( IFusionSoundMusicProvider_ProbeContext *ctx );
diff --git a/media-libs/FusionSound/files/FusionSound-1.1.1-libav-9.patch b/media-libs/FusionSound/files/FusionSound-1.1.1-libav-9.patch
new file mode 100644
index 000000000000..35295d37cf89
--- /dev/null
+++ b/media-libs/FusionSound/files/FusionSound-1.1.1-libav-9.patch
@@ -0,0 +1,21 @@
+diff -burN FusionSound-1.1.1.old//interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_ffmpeg.c FusionSound-1.1.1/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_ffmpeg.c
+--- FusionSound-1.1.1.old//interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_ffmpeg.c 2012-11-25 14:41:46.306782213 +0100
++++ FusionSound-1.1.1/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_ffmpeg.c 2012-11-25 14:46:14.151772465 +0100
+@@ -1197,7 +1197,7 @@
+ return DFB_FAILURE;
+ }
+
+- if (av_find_stream_info( data->ctx ) < 0) {
++ if (avformat_find_stream_info( data->ctx, NULL ) < 0) {
+ D_ERROR( "IFusionSoundMusicProvider_FFmpeg: couldn't find stream info!\n" );
+ IFusionSoundMusicProvider_FFmpeg_Destruct( thiz );
+ return DFB_FAILURE;
+@@ -1218,7 +1218,7 @@
+
+ data->codec = data->st->codec;
+ c = avcodec_find_decoder( data->codec->codec_id );
+- if (!c || avcodec_open( data->codec, c ) < 0) {
++ if (!c || avcodec_open2( data->codec, c, NULL ) < 0) {
+ D_ERROR( "IFusionSoundMusicProvider_FFmpeg: couldn't find audio decoder!\n" );
+ IFusionSoundMusicProvider_FFmpeg_Destruct( thiz );
+ return DFB_FAILURE;
diff --git a/media-libs/FusionSound/files/FusionSound-1.1.1-libavformat54.patch b/media-libs/FusionSound/files/FusionSound-1.1.1-libavformat54.patch
new file mode 100644
index 000000000000..41f513ae9eff
--- /dev/null
+++ b/media-libs/FusionSound/files/FusionSound-1.1.1-libavformat54.patch
@@ -0,0 +1,31 @@
+Index: FusionSound-1.1.1/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_ffmpeg.c
+===================================================================
+--- FusionSound-1.1.1.orig/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_ffmpeg.c
++++ FusionSound-1.1.1/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_ffmpeg.c
+@@ -65,7 +65,6 @@ typedef struct {
+
+ DirectStream *stream;
+
+- AVIOContext pb;
+ AVFormatContext *ctx;
+ AVStream *st;
+ void *iobuf;
+@@ -1191,16 +1190,8 @@ Construct( IFusionSoundMusicProvider *th
+ return D_OOM();
+ }
+
+- if (init_put_byte( &data->pb, data->iobuf, 4096, 0,
+- (void*)data, av_read_callback, NULL,
+- direct_stream_seekable( stream ) ? av_seek_callback : NULL ) < 0) {
+- D_ERROR( "IFusionSoundMusicProvider_FFmpeg: init_put_byte() failed!\n" );
+- IFusionSoundMusicProvider_FFmpeg_Destruct( thiz );
+- return DFB_INIT;
+- }
+-
+- if (av_open_input_stream( &data->ctx, &data->pb, filename, fmt, NULL ) < 0) {
+- D_ERROR( "IFusionSoundMusicProvider_FFmpeg: av_open_input_stream() failed!\n" );
++ if (avformat_open_input( &data->ctx, filename, fmt, NULL ) < 0) {
++ D_ERROR( "IFusionSoundMusicProvider_FFmpeg: avformat_open_input() failed!\n" );
+ IFusionSoundMusicProvider_FFmpeg_Destruct( thiz );
+ return DFB_FAILURE;
+ }
diff --git a/media-libs/FusionSound/files/FusionSound-1.1.1-segfault.patch b/media-libs/FusionSound/files/FusionSound-1.1.1-segfault.patch
new file mode 100644
index 000000000000..52b96b0bfc37
--- /dev/null
+++ b/media-libs/FusionSound/files/FusionSound-1.1.1-segfault.patch
@@ -0,0 +1,24 @@
+Fixes a segfault on probe.
+
+Index: FusionSound-1.1.1/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_ffmpeg.c
+===================================================================
+--- FusionSound-1.1.1.orig/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_ffmpeg.c
++++ FusionSound-1.1.1/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_ffmpeg.c
+@@ -1138,7 +1138,7 @@ IFusionSoundMusicProvider_FFmpeg_WaitSta
+ static DFBResult
+ Probe( IFusionSoundMusicProvider_ProbeContext *ctx )
+ {
+- AVProbeData pd;
++ AVProbeData pd = { 0 };
+ AVInputFormat *format;
+
+ av_register_all();
+@@ -1165,7 +1165,7 @@ Construct( IFusionSoundMusicProvider *th
+ const char *filename,
+ DirectStream *stream )
+ {
+- AVProbeData pd;
++ AVProbeData pd = { 0 };
+ AVInputFormat *fmt;
+ AVCodec *c;
+ unsigned char buf[64];
diff --git a/media-libs/FusionSound/metadata.xml b/media-libs/FusionSound/metadata.xml
new file mode 100644
index 000000000000..5e71b4c24efb
--- /dev/null
+++ b/media-libs/FusionSound/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>sound</herd>
+ <maintainer>
+ <email>hd_brummy@gentoo.org</email>
+ <name>Joerg Bornkessel</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/media-libs/SoQt/Manifest b/media-libs/SoQt/Manifest
new file mode 100644
index 000000000000..d3653c1ae2c0
--- /dev/null
+++ b/media-libs/SoQt/Manifest
@@ -0,0 +1 @@
+DIST SoQt-1.5.0.tar.gz 1515230 SHA256 f6a34b4c19e536c00f21aead298cdd274a7a0b03a31826fbe38fc96f3d82ab91 SHA512 e65596bf466b56aa0d7c4f367b250ba3a77094cf1a529c1e2a199b8b91106ab8954873ddfc9f9cd7ff359c0f82e6bbf32d30e78e3fb92733490937e477890a0b WHIRLPOOL 17d2701963f18fae04eb110d39e6ecff6ab0a8cc8d0a07c7d083fb8995d86ded74f32450ba5940131c2379a4d6adc33e13ebef54f98dfe455fee6ee08ca40aab
diff --git a/media-libs/SoQt/SoQt-1.5.0-r1.ebuild b/media-libs/SoQt/SoQt-1.5.0-r1.ebuild
new file mode 100644
index 000000000000..f3dfa7afb47b
--- /dev/null
+++ b/media-libs/SoQt/SoQt-1.5.0-r1.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools-utils
+
+DESCRIPTION="The glue between Coin3D and Qt"
+SRC_URI="http://ftp.coin3d.org/coin/src/all/${P}.tar.gz"
+HOMEPAGE="http://www.coin3d.org/"
+
+LICENSE="|| ( GPL-2 PEL )"
+KEYWORDS="~amd64 ~x86"
+SLOT="0"
+IUSE="debug doc static-libs"
+
+RDEPEND="
+ >=media-libs/coin-3.1.3
+ virtual/opengl
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ dev-qt/qtopengl:4
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.5.0-pkgconfig-partial.patch"
+)
+
+DOCS=(AUTHORS ChangeLog FAQ HACKING NEWS README)
+
+src_configure() {
+ local myeconfargs=(
+ htmldir="/usr/share/doc/${PF}/html"
+ --disable-compact
+ --disable-html-help
+ --disable-loadlibrary
+ --disable-man
+ --enable-pkgconfig
+ --includedir="/usr/include/coin"
+ --with-coin
+ $(use_enable debug)
+ $(use_enable debug symbols)
+ $(use_enable doc html)
+ )
+ autotools-utils_src_configure
+}
+
+src_install() {
+ # Remove SoQt from Libs.private
+ sed -e '/Libs.private/s/ -lSoQt//' -i "${BUILD_DIR}"/SoQt.pc || die
+
+ autotools-utils_src_install
+}
diff --git a/media-libs/SoQt/files/SoQt-1.4.1-gcc44.patch b/media-libs/SoQt/files/SoQt-1.4.1-gcc44.patch
new file mode 100644
index 000000000000..f8777b037c54
--- /dev/null
+++ b/media-libs/SoQt/files/SoQt-1.4.1-gcc44.patch
@@ -0,0 +1,22 @@
+diff -ru soqt-1.4.1~/src/Inventor/Qt/SoQtComponent.cpp soqt-1.4.1/src/Inventor/Qt/SoQtComponent.cpp
+--- soqt-1.4.1~/src/Inventor/Qt/SoQtComponent.cpp 2009-02-25 07:55:02.000000000 -0800
++++ soqt-1.4.1/src/Inventor/Qt/SoQtComponent.cpp 2009-02-25 07:56:36.000000000 -0800
+@@ -100,10 +100,17 @@
+ this->parent->removeEventFilter(this);
+ }
+
++#if COIN_MAJOR_VERSION >= 3
++static void delete_dict_value(SbDict::Key key, void * value)
++{
++ delete (QCursor *)value;
++}
++#else // COIN_MAJOR_VERSION >= 3
+ static void delete_dict_value(unsigned long key, void * value)
+ {
+ delete (QCursor *)value;
+ }
++#endif // COIN_MAJOR_VERSION < 3
+
+ void
+ SoQtComponentP::atexit_cleanup()
+
diff --git a/media-libs/SoQt/files/SoQt-1.5.0-pkgconfig-partial.patch b/media-libs/SoQt/files/SoQt-1.5.0-pkgconfig-partial.patch
new file mode 100644
index 000000000000..ff55a03aed4b
--- /dev/null
+++ b/media-libs/SoQt/files/SoQt-1.5.0-pkgconfig-partial.patch
@@ -0,0 +1,13 @@
+diff -ruN SoQt-1.5.0/SoQt.pc.in my/SoQt.pc.in
+--- SoQt-1.5.0/SoQt.pc.in 2010-03-02 23:57:41.000000000 +0100
++++ my/SoQt.pc.in 2013-05-28 01:14:13.083619183 +0200
+@@ -10,7 +10,8 @@
+ Version: @SOQT_VERSION@
+ Requires: Coin
+ Conflicts:
+-Libs: -L${libdir} @SOGUI_EXTRA_LDFLAGS@ @SOGUI_EXTRA_LIBS@
++Libs: -L${libdir} -lSoQt
++Libs.private: -L${libdir} @SOGUI_EXTRA_LIBS@
+ Cflags: -I${includedir} @SOGUI_EXTRA_CFLAGS@ @SOGUI_EXTRA_CPPFLAGS@
+
+ soqt_host=@host@
diff --git a/media-libs/SoQt/metadata.xml b/media-libs/SoQt/metadata.xml
new file mode 100644
index 000000000000..e6b9e2af1395
--- /dev/null
+++ b/media-libs/SoQt/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>reavertm@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/media-libs/SoXt/Manifest b/media-libs/SoXt/Manifest
new file mode 100644
index 000000000000..275c2d43e860
--- /dev/null
+++ b/media-libs/SoXt/Manifest
@@ -0,0 +1 @@
+DIST SoXt-1.3.0.tar.gz 1203903 SHA256 f5443aadafe8e2222b9b5a23d1f228bb0f3e7d98949b8ea8676171b7ea5bf013 SHA512 1aae8c6d0b5e8de52734dac0326f9bcbae343a1819d18bb915f8f6fa223782e3512286819af62f494ce5238b8e1d981af5322186b2c07a94be20b7c9d32db208 WHIRLPOOL 3f89ffe061844da1fc5f6ce26beb9f69480791a6dfbc8d13869e7a0a07d4b7933180a8f0d35f0ceb3b1a6674d98901db6d3803c5f6991b9de4a1395f846019fa
diff --git a/media-libs/SoXt/SoXt-1.3.0.ebuild b/media-libs/SoXt/SoXt-1.3.0.ebuild
new file mode 100644
index 000000000000..0618ea5e1976
--- /dev/null
+++ b/media-libs/SoXt/SoXt-1.3.0.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools-utils
+
+HOMEPAGE="http://www.coin3d.org/"
+DESCRIPTION="GUI binding for using Coin/Open Inventor with Xt/Motif"
+SRC_URI="https://bitbucket.org/Coin3D/coin/downloads/${P}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+SLOT="0"
+IUSE="debug doc static-libs"
+
+RDEPEND="
+ >=media-libs/coin-3.1.3
+ x11-libs/motif:0
+ virtual/opengl"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.3.0-pkgconfig-partial.patch"
+)
+
+DOCS=(AUTHORS ChangeLog HACKING NEWS README TODO BUGS.txt)
+
+src_configure() {
+ local myeconfargs=(
+ htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
+ --disable-compact
+ --disable-html-help
+ --includedir="$(coin-config --includedir)"
+ --with-coin
+ --with-motif
+ $(use_enable debug)
+ $(use_enable debug profile)
+ $(use_enable doc html)
+ $(use_enable doc man)
+ )
+ autotools-utils_src_configure
+ # Remove SoXt from Libs.private (patch installs it in Libs)
+ sed -i -e '/Libs.private/s/ -lSoXt//' "${BUILD_DIR}"/SoXt.pc || die
+ # Strip the default libdir
+ sed -i -e "s,-L%{_libdir} ,," soxt-default.cfg
+ # soxt-config is arch dependent
+ sed -i -e "s,/share/Coin/conf/,/%{_lib}/Coin2/conf/,g" soxt-config
+}
diff --git a/media-libs/SoXt/files/SoXt-1.3.0-pkgconfig-partial.patch b/media-libs/SoXt/files/SoXt-1.3.0-pkgconfig-partial.patch
new file mode 100644
index 000000000000..397d223b6157
--- /dev/null
+++ b/media-libs/SoXt/files/SoXt-1.3.0-pkgconfig-partial.patch
@@ -0,0 +1,12 @@
+--- SoXt.pc.in.orig 2013-06-17 11:26:59.998321839 -0700
++++ SoXt.pc.in 2013-06-17 11:28:01.603654611 -0700
+@@ -10,7 +10,8 @@
+ Version: @SOXT_VERSION@
+ Requires: Coin
+ Conflicts:
+-Libs: -L${libdir} @SOGUI_EXTRA_LDFLAGS@ @SOGUI_EXTRA_LIBS@
++Libs: -L${libdir} -lSoXt
++Libs.private: -L${libdir} @SOGUI_EXTRA_LIBS@
+ Cflags: -I${includedir} @SOGUI_EXTRA_CFLAGS@ @SOGUI_EXTRA_CPPFLAGS@
+
+ soxt_host=@host@
diff --git a/media-libs/SoXt/metadata.xml b/media-libs/SoXt/metadata.xml
new file mode 100644
index 000000000000..9aaf70cc4605
--- /dev/null
+++ b/media-libs/SoXt/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>sci-physics</herd>
+<maintainer>
+ <email>sci-physics@gentoo.org</email>
+ <description>Feel free to maintain/fix</description>
+</maintainer>
+<longdescription lang='en'>
+ SoXt is an alternative to SGIs InventorXt library, which is a GUI
+ binding for using Open Inventor with Xt/Motif. While SoXt has been developed
+ for use with Coin, it is also possible to compile it against Open Inventor
+ from SGI or TGS.
+</longdescription>
+</pkgmetadata>
diff --git a/media-libs/a52dec/Manifest b/media-libs/a52dec/Manifest
new file mode 100644
index 000000000000..d2093b3adebb
--- /dev/null
+++ b/media-libs/a52dec/Manifest
@@ -0,0 +1 @@
+DIST a52dec-0.7.4.tar.gz 241507 SHA256 a21d724ab3b3933330194353687df82c475b5dfb997513eef4c25de6c865ec33 SHA512 4b26fe9492f218b775fb190b76ecf06edaeb656adfe6dcbd24d0a0f86871c3ba917edb88a398eb12dccedaa1605b6f0a0be06b09f9fddd9a46e457b7dd244848 WHIRLPOOL 6dd6454f88ab9c4d80374ac2019d4392765fb3fffc54e0f0367f5c1a7ec31bb38b8b817e05fa195bf4ff83c59adf51872a93e4d61ffcb1e723e13e4a6288bf32
diff --git a/media-libs/a52dec/a52dec-0.7.4-r6.ebuild b/media-libs/a52dec/a52dec-0.7.4-r6.ebuild
new file mode 100644
index 000000000000..f95df3f40017
--- /dev/null
+++ b/media-libs/a52dec/a52dec-0.7.4-r6.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils flag-o-matic
+
+DESCRIPTION="library for decoding ATSC A/52 streams used in DVD"
+HOMEPAGE="http://liba52.sourceforge.net/"
+SRC_URI="http://liba52.sourceforge.net/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="djbfft oss static-libs"
+
+RDEPEND="djbfft? ( sci-libs/djbfft )"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-build.patch \
+ "${FILESDIR}"/${P}-freebsd.patch \
+ "${FILESDIR}"/${P}-tests-optional.patch \
+ "${FILESDIR}"/${P}-test-hidden-symbols.patch
+
+ sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' configure.in || die #466978
+
+ eautoreconf
+# epunt_cxx is not required with eautoreconf wrt #458298
+# epunt_cxx
+}
+
+src_configure() {
+ filter-flags -fprefetch-loop-arrays
+
+ local myconf
+ use oss || myconf="${myconf} --disable-oss"
+
+ econf \
+ --enable-shared \
+ $(use_enable static-libs static) \
+ $(use_enable djbfft) \
+ ${myconf}
+}
+
+src_compile() {
+ emake CFLAGS="${CFLAGS}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ insinto /usr/include/a52dec
+ doins liba52/a52_internal.h
+
+ dodoc AUTHORS ChangeLog HISTORY NEWS README TODO doc/liba52.txt
+
+ prune_libtool_files --all
+}
diff --git a/media-libs/a52dec/a52dec-0.7.4-r7.ebuild b/media-libs/a52dec/a52dec-0.7.4-r7.ebuild
new file mode 100644
index 000000000000..71d655b0b709
--- /dev/null
+++ b/media-libs/a52dec/a52dec-0.7.4-r7.ebuild
@@ -0,0 +1,63 @@
+# 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
+
+DESCRIPTION="library for decoding ATSC A/52 streams used in DVD"
+HOMEPAGE="http://liba52.sourceforge.net/"
+SRC_URI="http://liba52.sourceforge.net/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="djbfft oss static-libs"
+
+RDEPEND="djbfft? ( >=sci-libs/djbfft-0.76-r2[${MULTILIB_USEDEP}] )
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20130224-r8
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}"
+DOCS=( AUTHORS ChangeLog HISTORY NEWS README TODO doc/liba52.txt )
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-build.patch \
+ "${FILESDIR}"/${P}-freebsd.patch \
+ "${FILESDIR}"/${P}-tests-optional.patch \
+ "${FILESDIR}"/${P}-test-hidden-symbols.patch
+
+ sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' configure.in || die #466978
+
+ eautoreconf
+
+ filter-flags -fprefetch-loop-arrays
+}
+
+multilib_src_configure() {
+ local myconf
+ use oss || myconf="${myconf} --disable-oss"
+
+ ECONF_SOURCE="${S}" econf \
+ --enable-shared \
+ $(use_enable static-libs static) \
+ $(use_enable djbfft) \
+ ${myconf}
+
+ # remove useless subdirs
+ if ! multilib_is_native_abi ; then
+ sed -i \
+ -e 's/ src//' \
+ -e 's/ libao//' \
+ Makefile || die
+ fi
+}
+
+multilib_src_compile() {
+ emake CFLAGS="${CFLAGS}"
+}
+
+multilib_src_install_all() {
+ prune_libtool_files --all
+ einstalldocs
+}
diff --git a/media-libs/a52dec/files/a52dec-0.7.4-build.patch b/media-libs/a52dec/files/a52dec-0.7.4-build.patch
new file mode 100644
index 000000000000..f3a29f303ceb
--- /dev/null
+++ b/media-libs/a52dec/files/a52dec-0.7.4-build.patch
@@ -0,0 +1,27 @@
+diff -Naur a52dec-0.7.4.orig/liba52/Makefile.am a52dec-0.7.4/liba52/Makefile.am
+--- a52dec-0.7.4.orig/liba52/Makefile.am 2002-01-27 20:36:48.000000000 -0800
++++ a52dec-0.7.4/liba52/Makefile.am 2004-11-05 01:10:21.317401872 -0800
+@@ -1,4 +1,3 @@
+-CFLAGS = @CFLAGS@ @LIBA52_CFLAGS@
+
+ lib_LTLIBRARIES = liba52.la
+
+diff -Naur a52dec-0.7.4.orig/liba52/configure.incl a52dec-0.7.4/liba52/configure.incl
+--- a52dec-0.7.4.orig/liba52/configure.incl 2002-01-27 20:36:48.000000000 -0800
++++ a52dec-0.7.4/liba52/configure.incl 2004-11-05 01:11:38.172672216 -0800
+@@ -2,7 +2,6 @@
+ AC_SUBST([LIBA52_LIBS])
+
+ dnl avoid -fPIC when possible
+-LIBA52_CFLAGS="$LIBA52_CFLAGS -prefer-non-pic"
+
+ AC_ARG_ENABLE([double],
+ [ --enable-double use double-precision samples])
+diff -Naur a52dec-0.7.4.orig/src/Makefile.am a52dec-0.7.4/src/Makefile.am
+--- a52dec-0.7.4.orig/src/Makefile.am 2002-06-22 18:51:57.000000000 -0700
++++ a52dec-0.7.4/src/Makefile.am 2004-11-05 01:10:21.320401375 -0800
+@@ -1,4 +1,3 @@
+-CFLAGS = @A52DEC_CFLAGS@
+
+ bin_PROGRAMS = a52dec extract_a52
+ a52dec_SOURCES = a52dec.c getopt.c gettimeofday.c
diff --git a/media-libs/a52dec/files/a52dec-0.7.4-freebsd.patch b/media-libs/a52dec/files/a52dec-0.7.4-freebsd.patch
new file mode 100644
index 000000000000..6e33f18911b3
--- /dev/null
+++ b/media-libs/a52dec/files/a52dec-0.7.4-freebsd.patch
@@ -0,0 +1,11 @@
+--- libao/audio_out_oss.c 2002-04-28 12:23:02 +0200
++++ libao/audio_out_oss.c 2005-07-23 15:42:50 +0200
+@@ -35,7 +35,7 @@
+ #if defined(__OpenBSD__)
+ #include <soundcard.h>
+ #elif defined(__FreeBSD__)
+-#include <machine/soundcard.h>
++#include <sys/soundcard.h>
+ #ifndef AFMT_S16_NE
+ #include <machine/endian.h>
+ #if BYTE_ORDER == LITTLE_ENDIAN
diff --git a/media-libs/a52dec/files/a52dec-0.7.4-test-hidden-symbols.patch b/media-libs/a52dec/files/a52dec-0.7.4-test-hidden-symbols.patch
new file mode 100644
index 000000000000..9ff949dd9c08
--- /dev/null
+++ b/media-libs/a52dec/files/a52dec-0.7.4-test-hidden-symbols.patch
@@ -0,0 +1,19 @@
+2010-07-26 Martin Rejman <martin.rejman@centrum.cz>
+
+ #327369
+ * test/globals: bad_globals: Use readelf and ignore hidden symbols
+
+--- a/test/globals 2010-07-07 20:37:49.000000000 +0200
++++ b/test/globals 2010-07-07 20:37:57.000000000 +0200
+@@ -12,8 +12,9 @@
+ srcdir=`cd $srcdir;pwd`
+ builddir=`cd $builddir;pwd`
+
+-bad_globals=`nm -g --defined-only $builddir/../liba52/*.o|\
+- awk '{if ($3) print $3}'|grep -v '^_\?a52_'`
++bad_globals=`readelf -s $builddir/../liba52/*.o |\
++ awk '$5=="GLOBAL" && $6!="HIDDEN" && $7!="UND" {print $8}' |\
++ grep -v '^_\?a52_'`
+
+ if test x"$bad_globals" != x""; then
+ echo BAD GLOBAL SYMBOLS:
diff --git a/media-libs/a52dec/files/a52dec-0.7.4-tests-optional.patch b/media-libs/a52dec/files/a52dec-0.7.4-tests-optional.patch
new file mode 100644
index 000000000000..6958ef7b4904
--- /dev/null
+++ b/media-libs/a52dec/files/a52dec-0.7.4-tests-optional.patch
@@ -0,0 +1,10 @@
+Index: a52dec-0.7.4/test/Makefile.am
+===================================================================
+--- a52dec-0.7.4.orig/test/Makefile.am
++++ a52dec-0.7.4/test/Makefile.am
+@@ -1,4 +1,4 @@
+-noinst_PROGRAMS = compare
++check_PROGRAMS = compare
+ compare_SOURCES = compare.c
+ compare_LDADD = -lm
+
diff --git a/media-libs/a52dec/metadata.xml b/media-libs/a52dec/metadata.xml
new file mode 100644
index 000000000000..68068cea75e4
--- /dev/null
+++ b/media-libs/a52dec/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>sound</herd>
+ <use>
+ <flag name="djbfft">Prefer D.J. Bernstein's library for fourier transforms</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/aalib/Manifest b/media-libs/aalib/Manifest
new file mode 100644
index 000000000000..02f94b7f5eda
--- /dev/null
+++ b/media-libs/aalib/Manifest
@@ -0,0 +1 @@
+DIST aalib-1.4rc5.tar.gz 391028 SHA256 fbddda9230cf6ee2a4f5706b4b11e2190ae45f5eda1f0409dc4f99b35e0a70ee SHA512 3e4506eccce3b81ccbbb79a4a1b90abd39e2259e6043fde90f70b9ca279bd4c37758a047167267b97c4ec92f64fb17c7c8f548114f0d0c6e78ddb9463b5f1299 WHIRLPOOL ec98116736b64eb6e855777a5ec13894446b76beb4f874a490144919031d6ddd341b49cc429b2c918acde5cebc22a3e2dc97b949379200f441d2c544a02f2736
diff --git a/media-libs/aalib/aalib-1.4_rc5-r6.ebuild b/media-libs/aalib/aalib-1.4_rc5-r6.ebuild
new file mode 100644
index 000000000000..43e8502f0a0f
--- /dev/null
+++ b/media-libs/aalib/aalib-1.4_rc5-r6.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools-multilib eutils toolchain-funcs
+
+MY_P="${P/_/}"
+S="${WORKDIR}/${PN}-1.4.0"
+
+DESCRIPTION="A ASCII-Graphics Library"
+HOMEPAGE="http://aa-project.sourceforge.net/aalib/"
+SRC_URI="mirror://sourceforge/aa-project/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="X slang gpm static-libs"
+
+RDEPEND="X? ( >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] )
+ gpm? ( >=sys-libs/gpm-1.20.7-r2[${MULTILIB_USEDEP}] )
+ slang? ( >=sys-libs/slang-2.2.4-r1[${MULTILIB_USEDEP}] )
+ >=sys-libs/ncurses-5.9-r3[${MULTILIB_USEDEP}]
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ X? ( x11-proto/xproto )
+"
+
+DOCS="ANNOUNCE AUTHORS ChangeLog NEWS README*"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.4_rc4-gentoo.patch
+ epatch "${FILESDIR}"/${PN}-1.4_rc4-m4.patch
+ epatch "${FILESDIR}"/${PN}-1.4_rc5-fix-protos.patch #224267
+ epatch "${FILESDIR}"/${PN}-1.4_rc5-fix-aarender.patch #214142
+ epatch "${FILESDIR}"/${PN}-1.4_rc5-tinfo.patch #468566
+
+ sed -i -e 's:#include <malloc.h>:#include <stdlib.h>:g' "${S}"/src/*.c
+
+ # Fix bug #165617.
+ use gpm || sed -i \
+ 's/gpm_mousedriver_test=yes/gpm_mousedriver_test=no/' "${S}/configure.in"
+
+ #467988 automake-1.13
+ mv configure.{in,ac} || die
+ sed -i 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/g' configure.ac || die
+
+ eautoreconf
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_with slang slang-driver)
+ $(use_with X x11-driver)
+ $(use_enable static-libs static)
+ )
+
+ PKG_CONFIG=$(tc-getPKG_CONFIG) \
+ autotools-multilib_src_configure
+}
+
+src_install() {
+ autotools-multilib_src_install
+ use static-libs || prune_libtool_files --all
+}
diff --git a/media-libs/aalib/files/aalib-1.4_rc4-gentoo.patch b/media-libs/aalib/files/aalib-1.4_rc4-gentoo.patch
new file mode 100644
index 000000000000..4eb4a391a5be
--- /dev/null
+++ b/media-libs/aalib/files/aalib-1.4_rc4-gentoo.patch
@@ -0,0 +1,35 @@
+Fix --with-gpm-mouse usage to not be so freaky. Don't patch
+configure.in that way we avoid having to run autotools.
+
+ AC_ARG_WITH(gpm-mouse,
+ - [ --with-gpm-mouse=base-dir Specifies the base gpm directory],
+ - if test x$withval = xyes
+ + [ --with-gpm-mouse=base-dir/no Specifies the base gpm directory],
+ + if test x$withval = xno
+ then
+ - AC_MSG_WARN(Usage is: --with-gpm-mouse=base-dir)
+ + gpm_mousedriver_test=no
+ else
+--- aalib-1.4.0/configure
++++ aalib-1.4.0/configure
+@@ -28,7 +28,7 @@
+ ac_help="$ac_help
+ --with-curses-driver=no/yes Used to disable/force curses driver"
+ ac_help="$ac_help
+- --with-gpm-mouse=base-dir Specifies the base gpm directory"
++ --with-gpm-mouse=base-dir/no Specifies the base gpm directory"
+ ac_help="$ac_help
+ --with-x use the X Window System"
+ ac_help="$ac_help
+@@ -1960,9 +1960,9 @@
+ # Check whether --with-gpm-mouse or --without-gpm-mouse was given.
+ if test "${with_gpm_mouse+set}" = set; then
+ withval="$with_gpm_mouse"
+- if test x$withval = xyes
++ if test x$withval = xno
+ then
+- echo "configure: warning: Usage is: --with-gpm-mouse=base-dir" 1>&2
++ gpm_mousedriver_test=no
+ else
+ LIBS="$LIBS -L$withval/lib -lgpm"
+ cat >> confdefs.h <<\EOF
diff --git a/media-libs/aalib/files/aalib-1.4_rc4-m4.patch b/media-libs/aalib/files/aalib-1.4_rc4-m4.patch
new file mode 100644
index 000000000000..3670f19125fc
--- /dev/null
+++ b/media-libs/aalib/files/aalib-1.4_rc4-m4.patch
@@ -0,0 +1,9 @@
+Get rid of aclocal warning:
+/usr/share/aclocal/aalib.m4:12: warning: underquoted definition of AM_PATH_AALIB
+--- aalib-1.4.0/aalib.m4
++++ aalib-1.4.0/aalib.m4
+@@ -11,3 +11,3 @@
+ dnl
+-AC_DEFUN(AM_PATH_AALIB,
++AC_DEFUN([AM_PATH_AALIB],
+ [dnl
diff --git a/media-libs/aalib/files/aalib-1.4_rc5-fix-aarender.patch b/media-libs/aalib/files/aalib-1.4_rc5-fix-aarender.patch
new file mode 100644
index 000000000000..97c59836b5c9
--- /dev/null
+++ b/media-libs/aalib/files/aalib-1.4_rc5-fix-aarender.patch
@@ -0,0 +1,34 @@
+This bug can be seen very clearly with e.g. mplayer -vo aa -monitoraspect 3
+in which case a big part of the picture is missing or there is even completely
+black output.
+
+The reason for this is, when drawing only a part of the picture via aarender()
+the first X coordinate is used for the loop count, but it is not applied to the
+destination and source image index, thus instead of (re)drawing the middle part
+of the image, it draws always the left part.
+
+Actual Results:
+only the left part of the image is draw (depending on the video, only the left
+black bar might be draw, so you will see nothing at all - if so use a slightly
+smaller value for -monitoraspect).
+
+Expected Results:
+All of the image should be drawn, and -monitoraspect should only squeeze the
+image, not cause part of it to miss.
+
+Gentoo-bug: http://bugs.gentoo.org/id=214142
+Reported-by: Reimar Döffinger
+Fixed-by: Reimar Döffinger
+--- src/aarender.c.orig 2008-03-18 23:55:32.000000000 +0100
++++ src/aarender.c 2008-03-18 23:55:50.000000000 +0100
+@@ -94,8 +94,8 @@
+ gamma = randomval / 2;
+ mval = (c->parameters[c->filltable[255]].p[4]);
+ for (y = y1; y < y2; y++) {
+- pos = 2 * y * wi;
+- pos1 = y * aa_scrwidth(c);
++ pos = 2 * (y * wi + x1);
++ pos1 = y * aa_scrwidth(c) + x1;
+ esum = 0;
+ for (x = x1; x < x2; x++) {
+ i1 = table[((((int) c->imagebuffer[pos])))];
diff --git a/media-libs/aalib/files/aalib-1.4_rc5-fix-protos.patch b/media-libs/aalib/files/aalib-1.4_rc5-fix-protos.patch
new file mode 100644
index 000000000000..b22738a25c6c
--- /dev/null
+++ b/media-libs/aalib/files/aalib-1.4_rc5-fix-protos.patch
@@ -0,0 +1,56 @@
+fix missing protos
+
+ * QA Notice: Package triggers severe warnings which indicate that it
+ * may exhibit random runtime failures.
+ * aainfo.c:12:2: warning: incompatible implicit declaration of built-in function 'exit'
+ * aainfo.c:17:2: warning: incompatible implicit declaration of built-in function 'exit'
+ * aatest.c:8:5: warning: incompatible implicit declaration of built-in function 'strcpy'
+ * aatest.c:11:2: warning: incompatible implicit declaration of built-in function 'exit'
+ * aatest.c:16:2: warning: incompatible implicit declaration of built-in function 'exit'
+ * aatest.c:21:2: warning: incompatible implicit declaration of built-in function 'exit'
+ * aafire.c:55:7: warning: incompatible implicit declaration of built-in function 'exit'
+ * aafire.c:68:3: warning: incompatible implicit declaration of built-in function 'exit'
+ * aafire.c:154:7: warning: incompatible implicit declaration of built-in function 'exit'
+ * aasavefont.c:10:2: warning: incompatible implicit declaration of built-in function 'exit'
+
+Gentoo-bug: http://bugs.gentoo.org/224267
+Reported-by: Peter Hüwe
+diff --git a/src/aafire.c b/src/aafire.c
+index 4f36149..5e41237 100644
+--- a/src/aafire.c
++++ b/src/aafire.c
+@@ -1,4 +1,5 @@
+ #include <stdio.h>
++#include <stdlib.h> /* exit() */
+ #include "aalib.h"
+
+ #define XSIZ aa_imgwidth(context)
+diff --git a/src/aainfo.c b/src/aainfo.c
+index d3f6d50..e24082d 100644
+--- a/src/aainfo.c
++++ b/src/aainfo.c
+@@ -1,4 +1,4 @@
+-
++#include <stdlib.h> /* exit() */
+ #include "aalib.h"
+ #include "aaint.h"
+ int main(int argc, char **argv)
+diff --git a/src/aasavefont.c b/src/aasavefont.c
+index b00e1e6..16591e8 100644
+--- a/src/aasavefont.c
++++ b/src/aasavefont.c
+@@ -1,3 +1,4 @@
++#include <stdlib.h> /* exit() */
+ #include "aalib.h"
+ int main(int argc, char **argv)
+ {
+diff --git a/src/aatest.c b/src/aatest.c
+index 9816f5d..ed0c2da 100644
+--- a/src/aatest.c
++++ b/src/aatest.c
+@@ -1,3 +1,5 @@
++#include <string.h> /* strcpy() */
++#include <stdlib.h> /* exit() */
+ #include "aalib.h"
+ int main(int argc, char **argv)
+ {
diff --git a/media-libs/aalib/files/aalib-1.4_rc5-tinfo.patch b/media-libs/aalib/files/aalib-1.4_rc5-tinfo.patch
new file mode 100644
index 000000000000..daf9cde9f575
--- /dev/null
+++ b/media-libs/aalib/files/aalib-1.4_rc5-tinfo.patch
@@ -0,0 +1,19 @@
+diff --git a/configure.ac b/configure.ac
+index 66bcbc0..f15f06e 100644
+--- a/configure.in
++++ b/configure.in
+@@ -302,6 +302,14 @@ AC_DEFUN(AC_CURSES, [
+ if test "$curses_driver_test" = yes; then
+ if $search_ncurses
+ then
+ AC_CHECKING("location of curses")
++ PKG_CHECK_MODULES([CURSES], [ncurses], [
++ AC_MSG_RESULT([Found ncurses via pkg-config: CURSES_CFLAGS="$CURSES_CFLAGS" CURSES_LIBS="$CURSES_LIBS"])
++ CFLAGS="$CFLAGS $CURSES_CFLAGS"
++ LIBS="$LIBS $CURSES_LIBS"
++ AALIB_LIBS="$AALIB_LIBS $CURSES_LIBS"
++ search_ncurses=false
++ curses_driver=true
++ ], [])
+
+ AC_NCURSES(/usr/include, ncurses.h, , -I/usr/include/ncurses , "ncurses on /usr/include")
diff --git a/media-libs/aalib/metadata.xml b/media-libs/aalib/metadata.xml
new file mode 100644
index 000000000000..b89813c0f491
--- /dev/null
+++ b/media-libs/aalib/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>
+ <maintainer>
+ <email>slyfox@gentoo.org</email>
+ <name>Sergei Trofimovich</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">aa-project</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/adplug/Manifest b/media-libs/adplug/Manifest
new file mode 100644
index 000000000000..4c15b5cb9a84
--- /dev/null
+++ b/media-libs/adplug/Manifest
@@ -0,0 +1 @@
+DIST adplug-2.2.1.tar.bz2 810257 SHA256 f95a015268a0dfe9ff5782f3ea7b2a69e09b8d36ccd19ebf4d979d767b6e53ef SHA512 e9b434ad58114a6677907e8f7007a325fa908f9228fbe283d72d1e2394fa27850b929309e038c84ae94f64f8db003b871775502ee8b231219caa51f6ba5d787f WHIRLPOOL 3f337b914f1779f9702014108d4cb4dc816830d1cadc0623751d979bd81213286d431225aa7d28a7aeb35fb32bc614cf581915b6e27357f3f6dc51f30ae58d19
diff --git a/media-libs/adplug/adplug-2.2.1.ebuild b/media-libs/adplug/adplug-2.2.1.ebuild
new file mode 100644
index 000000000000..01188172bcd5
--- /dev/null
+++ b/media-libs/adplug/adplug-2.2.1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="A free, cross-platform, hardware independent AdLib sound player library"
+HOMEPAGE="http://adplug.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ppc ppc64 x86"
+IUSE="debug static-libs"
+
+RDEPEND=">=dev-cpp/libbinio-1.4"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS=( AUTHORS BUGS ChangeLog NEWS README TODO )
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable debug)
+}
+
+src_install() {
+ default
+ rm -f "${ED}"usr/lib*/lib${PN}.la
+}
diff --git a/media-libs/adplug/metadata.xml b/media-libs/adplug/metadata.xml
new file mode 100644
index 000000000000..88d380c3ac81
--- /dev/null
+++ b/media-libs/adplug/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>sound</herd>
+ <upstream>
+ <remote-id type="sourceforge">adplug</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/aften/Manifest b/media-libs/aften/Manifest
new file mode 100644
index 000000000000..f39996af57e2
--- /dev/null
+++ b/media-libs/aften/Manifest
@@ -0,0 +1 @@
+DIST aften-0.0.8.tar.bz2 80865 SHA256 87cc847233bb92fbd5bed49e2cdd6932bb58504aeaefbfd20ecfbeb9532f0c0a SHA512 1261297eac5065c6f028618d3e15e9b152ac35440c74cfb09d98cd99a90fb1c6a49585f70928834c3f6ddbcdd1d8721f7329d24f57cd30901dff09bbc0d419e3 WHIRLPOOL c47442eb3aa978972c5185b637de39a80bd3910934097d31dbcd3e24348c59c9ed99980fd276f0b9e1c0dc90c07e591d4d057ac9bcb4f460806984e1558c1350
diff --git a/media-libs/aften/aften-0.0.8.ebuild b/media-libs/aften/aften-0.0.8.ebuild
new file mode 100644
index 000000000000..55e48c2b31a7
--- /dev/null
+++ b/media-libs/aften/aften-0.0.8.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils
+
+DESCRIPTION="An A/52 (AC-3) audio encoder"
+HOMEPAGE="http://aften.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1 BSD"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="cxx"
+
+PATCHES=(
+ "${FILESDIR}/${P}-multilib.patch"
+ "${FILESDIR}/${P}-ppc.patch"
+)
+
+src_configure() {
+ local mycmakeargs="-DSHARED=1"
+ use cxx && mycmakeargs+=" -DBINDINGS_CXX=1"
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ dodoc README Changelog
+ # File collision with media-sound/wavbreaker, upstream informed
+ mv "${D}/usr/bin/wavinfo" "${D}/usr/bin/wavinfo-aften" || die
+}
diff --git a/media-libs/aften/files/aften-0.0.8-multilib.patch b/media-libs/aften/files/aften-0.0.8-multilib.patch
new file mode 100644
index 000000000000..f09b8dc5bb1c
--- /dev/null
+++ b/media-libs/aften/files/aften-0.0.8-multilib.patch
@@ -0,0 +1,13 @@
+Index: aften-0.0.8/CMakeLists.txt
+===================================================================
+--- aften-0.0.8.orig/CMakeLists.txt
++++ aften-0.0.8/CMakeLists.txt
+@@ -305,6 +305,6 @@ ENDIF(BINDINGS_CXX)
+
+ INSTALL(TARGETS ${INSTALL_TARGETS} aften_exe wavinfo wavrms wavfilter
+ RUNTIME DESTINATION bin
+- LIBRARY DESTINATION lib
+- ARCHIVE DESTINATION lib)
++ LIBRARY DESTINATION lib${LIB_SUFFIX}
++ ARCHIVE DESTINATION lib${LIB_SUFFIX})
+ INSTALL(FILES ${INSTALL_HEADERS} libaften/aften.h libaften/aften-types.h DESTINATION include/aften)
diff --git a/media-libs/aften/files/aften-0.0.8-ppc.patch b/media-libs/aften/files/aften-0.0.8-ppc.patch
new file mode 100644
index 000000000000..a841acf8f568
--- /dev/null
+++ b/media-libs/aften/files/aften-0.0.8-ppc.patch
@@ -0,0 +1,97 @@
+Index: libaften/ppc/ppc_cpu_caps.h
+===================================================================
+--- libaften/ppc/ppc_cpu_caps.h
++++ libaften/ppc/ppc_cpu_caps.h
+@@ -20,6 +20,7 @@
+ #ifndef PPC_CPU_CAPS_H
+ #define PPC_CPU_CAPS_H
+
++#include "aften-types.h"
+ #include "common.h"
+ #include "cpu_caps.h"
+
+Index: libaften/ppc/mdct_altivec.c
+===================================================================
+--- libaften/ppc/mdct_altivec.c (revision 659)
++++ libaften/ppc/mdct_altivec.c (revision 660)
+@@ -47,11 +47,11 @@
+ #include "mem.h"
+
+ // sign change constants
+-static const vec_u32_t vPNNP = (vec_u32_t)
++static const vec_u32_t vPNNP = VEC_U32
+ (0x00000000, 0x80000000, 0x80000000, 0x00000000);
+-static const vec_u32_t vPNPN = (vec_u32_t)
++static const vec_u32_t vPNPN = VEC_U32
+ (0x00000000, 0x80000000, 0x00000000, 0x80000000);
+-static const vec_u32_t vNNNN = (vec_u32_t)
++static const vec_u32_t vNNNN = VEC_U32
+ (0x80000000, 0x80000000, 0x80000000, 0x80000000);
+
+
+@@ -92,7 +92,7 @@
+ vec_u8_t perm1036 = VPERMUTE4(1, 0, 3, 6);
+ vec_u8_t perm5472 = VPERMUTE4(5, 4, 7, 2);
+ vector float zero = (vector float) vec_splat_u32(0);
+- vector float pi2_8 = (vector float)(AFT_PI2_8, AFT_PI2_8, AFT_PI2_8, AFT_PI2_8);
++ vector float pi2_8 = VEC_FLOAT(AFT_PI2_8, AFT_PI2_8, AFT_PI2_8, AFT_PI2_8);
+ vector float x0to3, x4to7, x8to11, x12to15;
+ vector float v1, v2, v3, v4, v5;
+
+@@ -143,7 +143,7 @@
+ vec_u8_t perm0022 = VPERMUTE4(0, 0, 2, 2);
+ vec_u8_t perm1405 = VPERMUTE4(1, 4, 0, 5);
+ vector float zero = (vector float) vec_splat_u32(0);
+- vector float cpi = (vector float) (AFT_PI2_8, AFT_PI2_8, AFT_PI1_8, AFT_PI3_8);
++ vector float cpi = VEC_FLOAT(AFT_PI2_8, AFT_PI2_8, AFT_PI1_8, AFT_PI3_8);
+ vec_u32_t vNPNP = vec_sld(vPNPN, vPNPN, 4);
+ vector float x0to3, x4to7, x8to11, x12to15, x16to19, x20to23, x24to27, x28to31;
+ vector float pi3122, pi1322, pi1313, pi3131;
+@@ -395,7 +395,7 @@
+ vec_u8_t perm3636 = vec_add(perm1414, vec_splat_u8(8));
+ vec_u8_t perm2266, perm3377;
+
+- vector float point5 = (vector float) (0.5f, 0.5f, 0.5f, 0.5f);
++ vector float point5 = VEC_FLOAT(0.5f, 0.5f, 0.5f, 0.5f);
+ vector float zero = (vector float) vec_splat_u32(0);
+ vec_u32_t vNPNP = vec_sld(vPNPN, vPNPN, 4);
+
+Index: libaften/ppc/altivec_common.h
+===================================================================
+--- libaften/ppc/altivec_common.h (revision 659)
++++ libaften/ppc/altivec_common.h (revision 660)
+@@ -28,11 +28,23 @@
+ typedef vector unsigned int vec_u32_t;
+ typedef vector signed int vec_s32_t;
+
++#if defined( __APPLE_CC__ ) && defined( __APPLE_ALTIVEC__ ) /* apple */
++#define VEC_U32(a,b,c,d) (vec_u32_t) (a, b, c, d)
++#define VEC_FLOAT(a,b,c,d) (vector float) (a, b, c, d)
+ #define VPERMUTE4(a,b,c,d) (vec_u8_t) \
+ ( (a*4)+0, (a*4)+1, (a*4)+2, (a*4)+3, \
+ (b*4)+0, (b*4)+1, (b*4)+2, (b*4)+3, \
+ (c*4)+0, (c*4)+1, (c*4)+2, (c*4)+3, \
+ (d*4)+0, (d*4)+1, (d*4)+2, (d*4)+3 )
++#else /* gnu */
++#define VEC_U32(a,b,c,d) {a, b, c, d}
++#define VEC_FLOAT(a,b,c,d) {a, b, c, d}
++#define VPERMUTE4(a,b,c,d) \
++ { (a*4)+0, (a*4)+1, (a*4)+2, (a*4)+3, \
++ (b*4)+0, (b*4)+1, (b*4)+2, (b*4)+3, \
++ (c*4)+0, (c*4)+1, (c*4)+2, (c*4)+3, \
++ (d*4)+0, (d*4)+1, (d*4)+2, (d*4)+3 }
++#endif
+
+ static inline vector float vec_ld_float(const float *a)
+ {
+--- ppc_cpu_caps.bak 2007-12-23 17:13:33.000000000 +0000
++++ libaften/ppc/ppc_cpu_caps.c 2007-12-23 17:13:43.000000000 +0000
+@@ -81,7 +81,7 @@
+ //Attempt to use AltiVec
+ if(!sigsetjmp(g_env, 0))
+ {
+- asm volatile ( "vor v0, v0, v0" );
++ asm volatile ( "vor 0, 0, 0" );
+ }
+
+ //Restore the old signal handler
diff --git a/media-libs/aften/metadata.xml b/media-libs/aften/metadata.xml
new file mode 100644
index 000000000000..27e3137c34a7
--- /dev/null
+++ b/media-libs/aften/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>sound</herd>
+ <longdescription lang="en">
+ Aften is an audio encoder which generates compressed audio streams based
+ on ATSC A/52 specification. This type of audio is also known as AC-3 or
+ Dolby® Digital and is one of the audio codecs used in DVD-Video content.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">aften</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/aldumb/Manifest b/media-libs/aldumb/Manifest
new file mode 100644
index 000000000000..72d09fec8d65
--- /dev/null
+++ b/media-libs/aldumb/Manifest
@@ -0,0 +1 @@
+DIST dumb-0.9.3.tar.gz 167379 SHA256 8d44fbc9e57f3bac9f761c3b12ce102d47d717f0dd846657fb988e0bb5d1ea33
diff --git a/media-libs/aldumb/aldumb-0.9.3.ebuild b/media-libs/aldumb/aldumb-0.9.3.ebuild
new file mode 100644
index 000000000000..c9de984ae80a
--- /dev/null
+++ b/media-libs/aldumb/aldumb-0.9.3.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit eutils
+
+DESCRIPTION="Allegro support for DUMB (an IT, XM, S3M, and MOD player library)"
+HOMEPAGE="http://dumb.sourceforge.net/"
+SRC_URI="mirror://sourceforge/dumb/dumb-${PV}.tar.gz"
+
+LICENSE="DUMB-0.9.2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="debug"
+
+DEPEND=">=media-libs/dumb-0.9.3
+ <media-libs/allegro-5"
+
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${P/aldumb/dumb}"
+
+src_prepare() {
+ cat << EOF > make/config.txt
+include make/unix.inc
+ALL_TARGETS := allegro allegro-examples allegro-headers
+PREFIX := /usr
+EOF
+ epatch "${FILESDIR}"/${P}-PIC-as-needed.patch
+ epatch "${FILESDIR}"/${P}_CVE-2006-3668.patch
+ sed -i '/= -s/d' Makefile || die "sed failed"
+ cp -f Makefile Makefile.rdy
+}
+
+src_compile() {
+ emake OFLAGS="${CFLAGS}" all || die "emake failed"
+}
+
+src_install() {
+ dobin examples/dumbplay
+ dolib.so lib/unix/libaldmb.so
+
+ use debug && lib/unix/libaldmd.so
+
+ insinto /usr/include
+ doins include/aldumb.h
+}
diff --git a/media-libs/aldumb/files/aldumb-0.9.3-PIC-as-needed.patch b/media-libs/aldumb/files/aldumb-0.9.3-PIC-as-needed.patch
new file mode 100644
index 000000000000..217caa406b3e
--- /dev/null
+++ b/media-libs/aldumb/files/aldumb-0.9.3-PIC-as-needed.patch
@@ -0,0 +1,72 @@
+diff -Naur dumb.orig/Makefile dumb/Makefile
+--- dumb.orig/Makefile 2003-04-03 16:34:18.000000000 -0800
++++ dumb/Makefile 2004-07-06 14:43:38.158063165 -0700
+@@ -199,11 +199,11 @@
+ ALLEGRO_EXAMPLES_EXE := $(addprefix examples/, $(notdir $(patsubst %.c, %$(EXE_SUFFIX), $(ALLEGRO_EXAMPLES))))
+
+
+-CORE_LIB_FILE_RELEASE := $(LIBDIR)/libdumb.a
+-ALLEGRO_LIB_FILE_RELEASE := $(LIBDIR)/libaldmb.a
++CORE_LIB_FILE_RELEASE := $(LIBDIR)/libdumb.so
++ALLEGRO_LIB_FILE_RELEASE := $(LIBDIR)/libaldmb.so
+
+-CORE_LIB_FILE_DEBUG := $(LIBDIR)/libdumbd.a
+-ALLEGRO_LIB_FILE_DEBUG := $(LIBDIR)/libaldmd.a
++CORE_LIB_FILE_DEBUG := $(LIBDIR)/libdumbd.so
++ALLEGRO_LIB_FILE_DEBUG := $(LIBDIR)/libaldmd.so
+
+
+ core: $(CORE_LIB_FILE_RELEASE) $(CORE_LIB_FILE_DEBUG)
+@@ -272,22 +272,22 @@
+
+ OBJDIR := $(OBJDIR_BASE)/release
+ CFLAGS := $(CFLAGS_RELEASE)
+-CORE_LIB_FILE := $(LIBDIR)/libdumb.a
+-ALLEGRO_LIB_FILE := $(LIBDIR)/libaldmb.a
++CORE_LIB_FILE := $(LIBDIR)/libdumb.so
++ALLEGRO_LIB_FILE := $(LIBDIR)/libaldmb.so
+ include make/Makefile.inc
+
+ OBJDIR := $(OBJDIR_BASE)/debug
+ CFLAGS := $(CFLAGS_DEBUG)
+-CORE_LIB_FILE := $(LIBDIR)/libdumbd.a
+-ALLEGRO_LIB_FILE := $(LIBDIR)/libaldmd.a
++CORE_LIB_FILE := $(LIBDIR)/libdumbd.so
++ALLEGRO_LIB_FILE := $(LIBDIR)/libaldmd.so
+ include make/Makefile.inc
+
+
+ $(CORE_EXAMPLES_EXE): examples/%$(EXE_SUFFIX): examples/%.o $(CORE_LIB_FILE_RELEASE)
+- $(CC) $^ -o $@ $(LDFLAGS) $(LINK_MATH)
++ $(CC) $^ -o $@ $(LDFLAGS) $(LINK_MATH)
+
+ $(ALLEGRO_EXAMPLES_EXE): examples/%$(EXE_SUFFIX): examples/%.o $(ALLEGRO_LIB_FILE_RELEASE) $(CORE_LIB_FILE_RELEASE)
+- $(CC) $^ -o $@ $(LDFLAGS) $(LINK_ALLEGRO)
++ $(CC) $^ -o $@ $(LDFLAGS) $(LINK_ALLEGRO)
+
+ $(CORE_EXAMPLES_OBJ): examples/%.o: examples/%.c include/dumb.h
+ $(CC) -c $< -o $@ $(CFLAGS_RELEASE)
+diff -Naur dumb.orig/make/Makefile.inc dumb/make/Makefile.inc
+--- dumb.orig/make/Makefile.inc 2003-04-03 16:34:18.000000000 -0800
++++ dumb/make/Makefile.inc 2004-07-06 14:37:13.082037585 -0700
+@@ -10,8 +10,8 @@
+ # accurately, create a local copy of the current CFLAGS variable. This is
+ # necessary because Make doesn't expand variables in commands until they are
+ # executed.
+-$(CORE_LIB_FILE): CFLAGS := $(CFLAGS)
+-$(ALLEGRO_LIB_FILE): CFLAGS := $(CFLAGS)
++$(CORE_LIB_FILE): CFLAGS := $(CFLAGS) -fPIC -DPIC
++$(ALLEGRO_LIB_FILE): CFLAGS := $(CFLAGS) -fPIC -DPIC
+
+
+ $(OBJDIR)/%.o: src/core/%.c include/dumb.h include/internal/dumb.h
+@@ -28,7 +28,7 @@
+ $(CC) -c -o $@ $< $(CFLAGS) $(WFLAGS_ALLEGRO)
+
+ $(CORE_LIB_FILE): $(CORE_OBJECTS)
+- $(AR) rs $@ $^
++ $(CC) -shared -o $@ $(LDFLAGS) -Wl,-shared,-soname,$(shell basename $@) $^ -lm
+
+ $(ALLEGRO_LIB_FILE): $(ALLEGRO_OBJECTS)
+- $(AR) rs $@ $^
++ $(CC) -shared -o $@ $(LDFLAGS) -Wl,-shared,-soname,$(shell basename $@) $^ -ldumb
diff --git a/media-libs/aldumb/files/aldumb-0.9.3_CVE-2006-3668.patch b/media-libs/aldumb/files/aldumb-0.9.3_CVE-2006-3668.patch
new file mode 100644
index 000000000000..09d2fb68f4cb
--- /dev/null
+++ b/media-libs/aldumb/files/aldumb-0.9.3_CVE-2006-3668.patch
@@ -0,0 +1,16 @@
+Index: libdumb-0.9.3/src/it/itread.c
+===================================================================
+--- libdumb-0.9.3.orig/src/it/itread.c 2006-07-21 11:05:48.000000000 +0200
++++ libdumb-0.9.3/src/it/itread.c 2006-07-21 11:07:22.000000000 +0200
+@@ -292,6 +292,11 @@
+
+ envelope->flags = dumbfile_getc(f);
+ envelope->n_nodes = dumbfile_getc(f);
++ if(envelope->n_nodes > 25) {
++ TRACE("IT error: wrong number of envelope nodes (%d)\n", envelope->n_nodes);
++ envelope->n_nodes = 0;
++ return -1;
++ }
+ envelope->loop_start = dumbfile_getc(f);
+ envelope->loop_end = dumbfile_getc(f);
+ envelope->sus_loop_start = dumbfile_getc(f);
diff --git a/media-libs/aldumb/metadata.xml b/media-libs/aldumb/metadata.xml
new file mode 100644
index 000000000000..ae7b4a0b0ad5
--- /dev/null
+++ b/media-libs/aldumb/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>sound</herd>
+ <upstream>
+ <remote-id type="sourceforge">dumb</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/allegro/Manifest b/media-libs/allegro/Manifest
new file mode 100644
index 000000000000..f23ea5fd4dd5
--- /dev/null
+++ b/media-libs/allegro/Manifest
@@ -0,0 +1,3 @@
+DIST allegro-4.4.2.tar.gz 4674902 SHA256 1b21e7577dbfada02d85ca4510bd22fedaa6ce76fde7f4838c7c1276eb840fdc SHA512 ad4bc1c15fc83bc8a019031fed82f37a793664bb6683cf023ec05fd9cd945f00f43764f3126892426036249c63afa5678fb4906407bb325ce5827b36aee0fa86 WHIRLPOOL 9571305ae91d3aa93daed37d0a853cfeea926e94d1c28c7f7d81ad5e54ff453ceb97921383abe1cf5307bc55a7dbbb716f1760cc57ad60b337c54206c717324e
+DIST allegro-5.0.11.tar.gz 3203777 SHA256 49fe14c9571463ba08db4ff778d1fbb15e49f9c33bdada3ac8599e04330ea531 SHA512 bcf3bec236d5dee11c789394144959d2a2f6028ae3d89a91a726f796d74f785c7f28749ac1cda94becaf18c31c76fcf75b8f2f6d1f2c32c52d556f967a406052 WHIRLPOOL a83cb5768c4da0989bb15424fc535da06913ea0325aa61b5e88d48ba8fda233f3603210d0a6705c1ad51256203ac50a7690969f7b9bc0c268535bb61a6bc6ee7
+DIST allegro-5.0.8.tar.gz 3139442 SHA256 272e77d0ca0cef7586d7207887f87bf271e1d0db5f8f208dc7dd9a5e3bb6140b SHA512 410addb05824050fead1d253c237be343a4cc7e707476aeb332341c91a6fb51eeaa9643a2d4e6e3916dbc9c25f40fd08d85c11ca39b14ceee947df2a8e5448b9 WHIRLPOOL 207562a313e3a7382bc6274a2314af5c473faaaf277f8d90691c8f3c7ad2e5b9707d9a577f6ca728801be937f091e83b3a4da499f680091a235b1a0462bb3049
diff --git a/media-libs/allegro/allegro-4.4.2-r1.ebuild b/media-libs/allegro/allegro-4.4.2-r1.ebuild
new file mode 100644
index 000000000000..49e57d2ad8fc
--- /dev/null
+++ b/media-libs/allegro/allegro-4.4.2-r1.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+CMAKE_IN_SOURCE_BUILD=1
+inherit cmake-utils eutils
+
+DESCRIPTION="cross-platform multimedia library"
+HOMEPAGE="http://alleg.sourceforge.net/"
+SRC_URI="mirror://sourceforge/alleg/${P}.tar.gz"
+
+LICENSE="Allegro MIT GPL-2+ ZLIB"
+SLOT="0"
+KEYWORDS="amd64 ~mips ppc ppc64 x86"
+IUSE="alsa fbcon jack jpeg opengl oss png svga test vga vorbis X"
+
+RDEPEND="alsa? ( media-libs/alsa-lib )
+ jack? ( media-sound/jack-audio-connection-kit )
+ jpeg? ( virtual/jpeg:0 )
+ png? ( media-libs/libpng:0= )
+ svga? ( media-libs/svgalib )
+ vorbis? ( media-libs/libvorbis )
+ X? (
+ x11-libs/libX11
+ x11-libs/libXcursor
+ x11-libs/libXext
+ x11-libs/libXpm
+ x11-libs/libXt
+ x11-libs/libXxf86dga
+ x11-libs/libXxf86vm
+ opengl? (
+ virtual/glu
+ virtual/opengl
+ )
+ )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ X? (
+ x11-proto/xextproto
+ x11-proto/xf86dgaproto
+ x11-proto/xf86vidmodeproto
+ x11-proto/xproto
+ )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-shared.patch \
+ "${FILESDIR}"/${P}-underlink.patch \
+ "${FILESDIR}"/${P}-gentoo.patch \
+ "${FILESDIR}"/${P}-rpath.patch
+
+ sed -i \
+ -e "s:allegro-\${ALLEGRO_VERSION}:${PF}:" \
+ docs/CMakeLists.txt || die
+}
+
+src_configure() {
+ # WANT_LINUX_CONSOLE is by default OFF
+ # WANT_EXAMPLES doesn't install anything
+
+ mycmakeargs=(
+ "-DDOCDIR=share/doc"
+ "-DINFODIR=share/info"
+ "-DMANDIR=share/man"
+ $(cmake-utils_use_want alsa)
+ "-DWANT_EXAMPLES=OFF"
+ $(cmake-utils_use_want jack)
+ $(cmake-utils_use_want jpeg JPGALLEG)
+ "-DWANT_LINUX_CONSOLE=OFF"
+ $(cmake-utils_use_want fbcon LINUX_FBCON)
+ $(cmake-utils_use_want svga LINUX_SVGALIB)
+ $(cmake-utils_use_want vga LINUX_VGA)
+ $(cmake-utils_use_want png LOADPNG)
+ $(cmake-utils_use_want vorbis LOGG)
+ $(cmake-utils_use_want oss)
+ $(cmake-utils_use_want test TESTS)
+ $(cmake-utils_use_want X TOOLS)
+ $(cmake-utils_use_want X X11)
+ )
+
+ if use X; then
+ mycmakeargs+=(
+ $(cmake-utils_use_want opengl ALLEGROGL)
+ )
+ else
+ mycmakeargs+=(
+ "-DWANT_ALLEGROGL=OFF"
+ )
+ fi
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ dohtml docs/html/*.html
+
+ #176020 (init_dialog.3), #409305 (key.3)
+ pushd docs/man >/dev/null
+ local manpage
+ for manpage in $(ls -d *.3); do
+ newman ${manpage} ${PN}-${manpage}
+ done
+ popd >/dev/null
+
+ if use X; then
+ newbin setup/setup ${PN}-setup
+ insinto /usr/share/${PN}
+ doins {keyboard,language,setup/setup}.dat
+ newicon misc/icon.png ${PN}.png
+ make_desktop_entry ${PN}-setup "Allegro Setup" ${PN} "Settings"
+ fi
+}
diff --git a/media-libs/allegro/allegro-5.0.11.ebuild b/media-libs/allegro/allegro-5.0.11.ebuild
new file mode 100644
index 000000000000..fba26f07528a
--- /dev/null
+++ b/media-libs/allegro/allegro-5.0.11.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit cmake-multilib
+
+DESCRIPTION="A game programming library"
+HOMEPAGE="http://alleg.sourceforge.net/"
+SRC_URI="mirror://sourceforge/alleg/${P}.tar.gz"
+
+LICENSE="BSD ZLIB"
+SLOT="5"
+KEYWORDS="amd64 ppc ~ppc64 x86"
+IUSE="alsa dumb flac gtk jpeg openal oss physfs png pulseaudio test truetype vorbis X xinerama"
+
+RDEPEND="alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
+ dumb? ( >=media-libs/dumb-0.9.3-r2[${MULTILIB_USEDEP}] )
+ flac? ( >=media-libs/flac-1.2.1-r5[${MULTILIB_USEDEP}] )
+ jpeg? ( >=virtual/jpeg-0-r2:0[${MULTILIB_USEDEP}] )
+ openal? ( >=media-libs/openal-1.15.1[${MULTILIB_USEDEP}] )
+ physfs? ( >=dev-games/physfs-2.0.3-r1[${MULTILIB_USEDEP}] )
+ png? ( >=media-libs/libpng-1.5.18:0[${MULTILIB_USEDEP}] )
+ pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] )
+ truetype? ( >=media-libs/freetype-2.5.0.1[${MULTILIB_USEDEP}] )
+ vorbis? ( >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}] )
+ >=x11-libs/libXcursor-1.1.14[${MULTILIB_USEDEP}]
+ >=x11-libs/libXxf86vm-1.1.3[${MULTILIB_USEDEP}]
+ >=x11-libs/libXrandr-1.4.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ gtk? ( >=x11-libs/gtk+-2.24.23:2[${MULTILIB_USEDEP}] )
+ >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}]
+ >=virtual/glu-9.0-r1[${MULTILIB_USEDEP}]
+ xinerama? ( >=x11-libs/libXinerama-1.1.3[${MULTILIB_USEDEP}] )"
+
+DEPEND="${RDEPEND}
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
+ >=x11-proto/xextproto-7.2.1-r1[${MULTILIB_USEDEP}]
+ >=x11-proto/xf86vidmodeproto-2.3.1-r1[${MULTILIB_USEDEP}]
+ >=x11-proto/xproto-7.0.24[${MULTILIB_USEDEP}]"
+
+PATCHES=( "${FILESDIR}"/${PN}-5.0.4-underlink.patch )
+
+MULTILIB_WRAPPED_HEADERS=( /usr/include/allegro5/allegro_native_dialog.h )
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_want alsa)
+ -DWANT_DEMO=OFF
+ -DWANT_EXAMPLES=OFF
+ $(cmake-utils_use_want flac)
+ $(cmake-utils_use_want jpeg IMAGE_JPG)
+ $(cmake-utils_use_want png IMAGE_PNG)
+ $(cmake-utils_use_want dumb MODAUDIO)
+ $(cmake-utils_use_want openal)
+ $(cmake-utils_use_want oss)
+ $(cmake-utils_use_want physfs)
+ $(cmake-utils_use_want pulseaudio)
+ $(cmake-utils_use_want test TESTS)
+ $(cmake-utils_use_want truetype TTF)
+ $(cmake-utils_use_want vorbis)
+ $(cmake-utils_use_want gtk NATIVE_DIALOG)
+ $(cmake-utils_use_want X opengl)
+ $(cmake-utils_use_want xinerama X11_XINERAMA)
+ )
+
+ cmake-multilib_src_configure
+}
+
+src_install() {
+ cmake-multilib_src_install
+
+ dodoc CHANGES-5.0.txt
+ dohtml -r docs/html/refman/*
+ doman docs/man/*.3
+}
diff --git a/media-libs/allegro/allegro-5.0.8-r1.ebuild b/media-libs/allegro/allegro-5.0.8-r1.ebuild
new file mode 100644
index 000000000000..6d0496dabaa6
--- /dev/null
+++ b/media-libs/allegro/allegro-5.0.8-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
+inherit cmake-multilib
+
+DESCRIPTION="A game programming library"
+HOMEPAGE="http://alleg.sourceforge.net/"
+SRC_URI="mirror://sourceforge/alleg/${P}.tar.gz"
+
+LICENSE="BSD ZLIB"
+SLOT="5"
+KEYWORDS="amd64 ppc ppc64 x86"
+IUSE="alsa dumb flac gtk jpeg openal oss physfs png pulseaudio test truetype vorbis X xinerama"
+
+RDEPEND="alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
+ dumb? ( >=media-libs/dumb-0.9.3-r2[${MULTILIB_USEDEP}] )
+ flac? ( >=media-libs/flac-1.2.1-r5[${MULTILIB_USEDEP}] )
+ jpeg? ( >=virtual/jpeg-0-r2:0[${MULTILIB_USEDEP}] )
+ openal? ( >=media-libs/openal-1.15.1[${MULTILIB_USEDEP}] )
+ physfs? ( >=dev-games/physfs-2.0.3-r1[${MULTILIB_USEDEP}] )
+ png? ( >=media-libs/libpng-1.5.18:0[${MULTILIB_USEDEP}] )
+ pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] )
+ truetype? ( >=media-libs/freetype-2.5.0.1[${MULTILIB_USEDEP}] )
+ vorbis? ( >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}] )
+ >=x11-libs/libXcursor-1.1.14[${MULTILIB_USEDEP}]
+ >=x11-libs/libXxf86vm-1.1.3[${MULTILIB_USEDEP}]
+ >=x11-libs/libXrandr-1.4.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ gtk? ( >=x11-libs/gtk+-2.24.23:2[${MULTILIB_USEDEP}] )
+ >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}]
+ >=virtual/glu-9.0-r1[${MULTILIB_USEDEP}]
+ xinerama? ( >=x11-libs/libXinerama-1.1.3[${MULTILIB_USEDEP}] )"
+
+DEPEND="${RDEPEND}
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
+ >=x11-proto/xextproto-7.2.1-r1[${MULTILIB_USEDEP}]
+ >=x11-proto/xf86vidmodeproto-2.3.1-r1[${MULTILIB_USEDEP}]
+ >=x11-proto/xproto-7.0.24[${MULTILIB_USEDEP}]"
+
+PATCHES=( "${FILESDIR}"/${PN}-5.0.4-underlink.patch )
+
+MULTILIB_WRAPPED_HEADERS=( /usr/include/allegro5/allegro_native_dialog.h )
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_want alsa)
+ -DWANT_DEMO=OFF
+ -DWANT_EXAMPLES=OFF
+ $(cmake-utils_use_want flac)
+ $(cmake-utils_use_want jpeg IMAGE_JPG)
+ $(cmake-utils_use_want png IMAGE_PNG)
+ $(cmake-utils_use_want dumb MODAUDIO)
+ $(cmake-utils_use_want openal)
+ $(cmake-utils_use_want oss)
+ $(cmake-utils_use_want physfs)
+ $(cmake-utils_use_want pulseaudio)
+ $(cmake-utils_use_want test TESTS)
+ $(cmake-utils_use_want truetype TTF)
+ $(cmake-utils_use_want vorbis)
+ $(cmake-utils_use_want gtk NATIVE_DIALOG)
+ $(cmake-utils_use_want X opengl)
+ $(cmake-utils_use_want xinerama X11_XINERAMA)
+ )
+
+ cmake-multilib_src_configure
+}
+
+src_install() {
+ cmake-multilib_src_install
+
+ dodoc CHANGES-5.0.txt
+ dohtml -r docs/html/refman/*
+ doman docs/man/*.3
+}
diff --git a/media-libs/allegro/files/allegro-4.4.2-gentoo.patch b/media-libs/allegro/files/allegro-4.4.2-gentoo.patch
new file mode 100644
index 000000000000..119d9c789508
--- /dev/null
+++ b/media-libs/allegro/files/allegro-4.4.2-gentoo.patch
@@ -0,0 +1,16 @@
+--- docs/CMakeLists.txt.old 2012-03-04 20:20:05.566881387 +0100
++++ docs/CMakeLists.txt 2012-03-04 20:20:50.659714153 +0100
+@@ -71,11 +71,12 @@
+ string(REGEX MATCH "[^/]*._tx" basename ${page})
+ string(REPLACE "._tx" "" basename ${basename})
+
+- set(page ${CMAKE_CURRENT_SOURCE_DIR}/${page})
+ if(${page} MATCHES "/build/")
++ set(page ${CMAKE_CURRENT_SOURCE_DIR}/${page})
+ set(txt_out ${CMAKE_CURRENT_BINARY_DIR}/build/${basename}.txt)
+ set(html_out ${CMAKE_CURRENT_BINARY_DIR}/build/${basename}.html)
+ else()
++ set(page ${CMAKE_CURRENT_SOURCE_DIR}/${page})
+ set(txt_out ${CMAKE_CURRENT_BINARY_DIR}/txt/${basename}.txt)
+ set(html_out ${CMAKE_CURRENT_BINARY_DIR}/html/${basename}.html)
+ endif()
diff --git a/media-libs/allegro/files/allegro-4.4.2-rpath.patch b/media-libs/allegro/files/allegro-4.4.2-rpath.patch
new file mode 100644
index 000000000000..57bdb6bf8d0e
--- /dev/null
+++ b/media-libs/allegro/files/allegro-4.4.2-rpath.patch
@@ -0,0 +1,8 @@
+--- setup/CMakeLists.txt
++++ setup/CMakeLists.txt
+@@ -1,3 +1,5 @@
++set(CMAKE_SKIP_BUILD_RPATH TRUE)
++
+ add_our_executable(setup setup.c)
+ copy_files(copy_setup_data setup.dat)
+
diff --git a/media-libs/allegro/files/allegro-4.4.2-shared.patch b/media-libs/allegro/files/allegro-4.4.2-shared.patch
new file mode 100644
index 000000000000..665c03e31204
--- /dev/null
+++ b/media-libs/allegro/files/allegro-4.4.2-shared.patch
@@ -0,0 +1,11 @@
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -830,7 +830,7 @@
+ option(WANT_LOGG "Enable logg" on)
+ option(WANT_JPGALLEG "Enable JPGAlleg" on)
+
+-if(WANT_FRAMEWORKS)
++if(SHARED)
+ set(ADDON_LINKAGE SHARED)
+ else()
+ set(ADDON_LINKAGE STATIC)
diff --git a/media-libs/allegro/files/allegro-4.4.2-underlink.patch b/media-libs/allegro/files/allegro-4.4.2-underlink.patch
new file mode 100644
index 000000000000..33dc9d260b2d
--- /dev/null
+++ b/media-libs/allegro/files/allegro-4.4.2-underlink.patch
@@ -0,0 +1,11 @@
+--- CMakeLists.txt.old 2011-06-06 23:46:06.057320691 +0200
++++ CMakeLists.txt 2011-06-06 23:46:21.900313261 +0200
+@@ -392,7 +392,7 @@
+ message(FATAL_ERROR "Unix port requires pthreads support.")
+ endif()
+ set(ALLEGRO_HAVE_LIBPTHREAD 1)
+- list(APPEND PLATFORM_LIBS m ${CMAKE_THREAD_LIBS_INIT})
++ list(APPEND PLATFORM_LIBS dl m ${CMAKE_THREAD_LIBS_INIT})
+ list(APPEND PLATFORM_SOURCES ${ALLEGRO_SRC_UNIX_FILES})
+
+ if(WANT_OSS)
diff --git a/media-libs/allegro/files/allegro-5.0.4-underlink.patch b/media-libs/allegro/files/allegro-5.0.4-underlink.patch
new file mode 100644
index 000000000000..7702c1d2c6db
--- /dev/null
+++ b/media-libs/allegro/files/allegro-5.0.4-underlink.patch
@@ -0,0 +1,11 @@
+--- CMakeLists.txt.old 2011-06-06 23:56:09.367125536 +0200
++++ CMakeLists.txt 2011-06-06 23:56:19.311748807 +0200
+@@ -703,7 +703,7 @@
+
+ if(ALLEGRO_UNIX) # not MACOSX
+ list(APPEND LIBRARY_SOURCES ${ALLEGRO_SRC_UNIX_FILES})
+- list(APPEND PLATFORM_LIBS m ${CMAKE_THREAD_LIBS_INIT})
++ list(APPEND PLATFORM_LIBS dl m ${CMAKE_THREAD_LIBS_INIT})
+ endif(ALLEGRO_UNIX)
+
+ if(SUPPORT_X11)
diff --git a/media-libs/allegro/metadata.xml b/media-libs/allegro/metadata.xml
new file mode 100644
index 000000000000..7d103d5f8d67
--- /dev/null
+++ b/media-libs/allegro/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>games</herd>
+ <longdescription>
+Allegro is a game programming library for C/C++ developers distributed
+freely, supporting the following platforms: DOS, Unix (Linux, FreeBSD,
+Irix, Solaris, Darwin), Windows, QNX, BeOS and MacOS X. It provides many
+functions for graphics, sounds, player input (keyboard, mouse and joystick)
+and timers. It also provides fixed and floating point mathematical
+functions, 3d functions, file management functions, compressed datafile
+and a GUI.
+</longdescription>
+ <use>
+ <flag name="dumb">Enable <pkg>media-libs/dumb</pkg> module library support</flag>
+ <flag name="physfs">Enable physfs support</flag>
+ <flag name="vga">Enables the VGA graphics driver</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">alleg</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/alsa-lib/Manifest b/media-libs/alsa-lib/Manifest
new file mode 100644
index 000000000000..36cb87402cac
--- /dev/null
+++ b/media-libs/alsa-lib/Manifest
@@ -0,0 +1,3 @@
+DIST alsa-lib-1.0.27.2.tar.bz2 906844 SHA256 690ed393e7efd4fc7e3a2d2cda5449298ca0c895197e5914e350882012430d19 SHA512 3fa9160e001cf21ddc6332c3748f8aa27bd1b514616fd1a9993c34128fe99d07e2dfc5f1a9177e1c17456d1361496f90bf3552f940fd85c6ea5ac9bbc30fe8ce WHIRLPOOL d5df07a99abe4fe7842ef9fe2718148f17db0a182ef0315ec5c32e2ea20ea2a2da007f880dbc2954efc5a2d61dd5e92038a45d8172bee29d8af13532dcdd4afd
+DIST alsa-lib-1.0.28.tar.bz2 903786 SHA256 3c074b85dde1b30e78ef4995579765833e5b693fbbd8f834c335e080cb734a6d SHA512 a08430d0beb4a751b1608d148f4fc3d1077a689f5f7197b830a2768d66238b69de2614448d56643fbcb3141faa06ab361b7a8579cce4303304bce8c10de01f08 WHIRLPOOL db51ab59cfce545a4790c423a141846996d2fa2db7134b3cf17562e7e1d70bc4c56052edda9e6bfcd6f38ca9750f266bcec845b66c43402340f187a945a1098b
+DIST alsa-lib-1.0.29.tar.bz2 905417 SHA256 73043c35eb9636be0f4af6a240235c213f12a25feb1f04aeeac8cb7e30fcbdd0 SHA512 c9c2dcd3105abadcfdff104770a1f7683d83f6b9df64eebe9f9efc1ecab3ca4cef43718b5b15526bdabf2862ce55ec665732bb0390fc8e6492e2c1cebec9294c WHIRLPOOL 330877960733e847c12f133f93acc58a2053303b4437c5aaf21e2c4df0c47389df28ed093ab6606ee3cb854389b359d981dc547fba08bab03cff1c99f93e72d8
diff --git a/media-libs/alsa-lib/alsa-lib-1.0.27.2.ebuild b/media-libs/alsa-lib/alsa-lib-1.0.27.2.ebuild
new file mode 100644
index 000000000000..a1533095ed3f
--- /dev/null
+++ b/media-libs/alsa-lib/alsa-lib-1.0.27.2.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# no support for python3_2 or above yet wrt #471326
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools eutils multilib multilib-minimal python-single-r1
+
+DESCRIPTION="Advanced Linux Sound Architecture Library"
+HOMEPAGE="http://www.alsa-project.org/"
+SRC_URI="mirror://alsaproject/lib/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-linux ~x86-linux"
+IUSE="doc debug alisp python"
+
+RDEPEND="python? ( ${PYTHON_DEPS} )
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-soundlibs-20130224-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
+ )"
+DEPEND="${RDEPEND}
+ doc? ( >=app-doc/doxygen-1.2.6 )"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ find . -name Makefile.am -exec sed -i -e '/CFLAGS/s:-g -O2::' {} + || die
+ epatch_user
+ eautoreconf
+}
+
+multilib_src_configure() {
+ local myconf
+ # enable Python only on final ABI
+ if multilib_is_native_abi; then
+ myconf="$(use_enable python)"
+ else
+ myconf="--disable-python"
+ fi
+ use elibc_uclibc && myconf+=" --without-versioned"
+
+ ECONF_SOURCE=${S} \
+ econf \
+ --disable-maintainer-mode \
+ --enable-shared \
+ --disable-resmgr \
+ --enable-rawmidi \
+ --enable-seq \
+ --enable-aload \
+ $(use_with debug) \
+ $(use_enable alisp) \
+ ${myconf}
+}
+
+multilib_src_compile() {
+ emake
+
+ if multilib_is_native_abi && use doc; then
+ emake doc
+ fgrep -Zrl "${S}" doc/doxygen/html | \
+ xargs -0 sed -i -e "s:${S}::"
+ fi
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+ if multilib_is_native_abi && use doc; then
+ dohtml -r doc/doxygen/html/.
+ fi
+}
+
+multilib_src_install_all() {
+ prune_libtool_files --all
+ find "${ED}"/usr/$(get_libdir)/alsa-lib -name '*.a' -exec rm -f {} +
+ dodoc ChangeLog doc/asoundrc.txt NOTES TODO
+}
diff --git a/media-libs/alsa-lib/alsa-lib-1.0.28.ebuild b/media-libs/alsa-lib/alsa-lib-1.0.28.ebuild
new file mode 100644
index 000000000000..3191f36b0123
--- /dev/null
+++ b/media-libs/alsa-lib/alsa-lib-1.0.28.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# no support for python3_2 or above yet wrt #471326
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools eutils multilib multilib-minimal python-single-r1
+
+DESCRIPTION="Advanced Linux Sound Architecture Library"
+HOMEPAGE="http://www.alsa-project.org/"
+SRC_URI="mirror://alsaproject/lib/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-linux ~x86-linux"
+IUSE="alisp debug doc elibc_uclibc python"
+
+RDEPEND="python? ( ${PYTHON_DEPS} )
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-soundlibs-20130224-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
+ )"
+DEPEND="${RDEPEND}
+ doc? ( >=app-doc/doxygen-1.2.6 )"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ find . -name Makefile.am -exec sed -i -e '/CFLAGS/s:-g -O2::' {} + || die
+ # http://bugs.gentoo.org/509886
+ use elibc_uclibc && { sed -i -e 's:oldapi queue_timer:queue_timer:' test/Makefile.am || die; }
+ epatch_user
+ eautoreconf
+}
+
+multilib_src_configure() {
+ local myconf
+ # enable Python only on final ABI
+ if multilib_is_native_abi; then
+ myconf="$(use_enable python)"
+ else
+ myconf="--disable-python"
+ fi
+ use elibc_uclibc && myconf+=" --without-versioned"
+
+ ECONF_SOURCE=${S} \
+ econf \
+ --disable-maintainer-mode \
+ --enable-shared \
+ --disable-resmgr \
+ --enable-rawmidi \
+ --enable-seq \
+ --enable-aload \
+ $(use_with debug) \
+ $(use_enable alisp) \
+ ${myconf}
+}
+
+multilib_src_compile() {
+ emake
+
+ if multilib_is_native_abi && use doc; then
+ emake doc
+ fgrep -Zrl "${S}" doc/doxygen/html | \
+ xargs -0 sed -i -e "s:${S}::"
+ fi
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+ if multilib_is_native_abi && use doc; then
+ dohtml -r doc/doxygen/html/.
+ fi
+}
+
+multilib_src_install_all() {
+ prune_libtool_files --all
+ find "${ED}"/usr/$(get_libdir)/alsa-lib -name '*.a' -exec rm -f {} +
+ dodoc ChangeLog doc/asoundrc.txt NOTES TODO
+}
diff --git a/media-libs/alsa-lib/alsa-lib-1.0.29.ebuild b/media-libs/alsa-lib/alsa-lib-1.0.29.ebuild
new file mode 100644
index 000000000000..3191f36b0123
--- /dev/null
+++ b/media-libs/alsa-lib/alsa-lib-1.0.29.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# no support for python3_2 or above yet wrt #471326
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools eutils multilib multilib-minimal python-single-r1
+
+DESCRIPTION="Advanced Linux Sound Architecture Library"
+HOMEPAGE="http://www.alsa-project.org/"
+SRC_URI="mirror://alsaproject/lib/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-linux ~x86-linux"
+IUSE="alisp debug doc elibc_uclibc python"
+
+RDEPEND="python? ( ${PYTHON_DEPS} )
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-soundlibs-20130224-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
+ )"
+DEPEND="${RDEPEND}
+ doc? ( >=app-doc/doxygen-1.2.6 )"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ find . -name Makefile.am -exec sed -i -e '/CFLAGS/s:-g -O2::' {} + || die
+ # http://bugs.gentoo.org/509886
+ use elibc_uclibc && { sed -i -e 's:oldapi queue_timer:queue_timer:' test/Makefile.am || die; }
+ epatch_user
+ eautoreconf
+}
+
+multilib_src_configure() {
+ local myconf
+ # enable Python only on final ABI
+ if multilib_is_native_abi; then
+ myconf="$(use_enable python)"
+ else
+ myconf="--disable-python"
+ fi
+ use elibc_uclibc && myconf+=" --without-versioned"
+
+ ECONF_SOURCE=${S} \
+ econf \
+ --disable-maintainer-mode \
+ --enable-shared \
+ --disable-resmgr \
+ --enable-rawmidi \
+ --enable-seq \
+ --enable-aload \
+ $(use_with debug) \
+ $(use_enable alisp) \
+ ${myconf}
+}
+
+multilib_src_compile() {
+ emake
+
+ if multilib_is_native_abi && use doc; then
+ emake doc
+ fgrep -Zrl "${S}" doc/doxygen/html | \
+ xargs -0 sed -i -e "s:${S}::"
+ fi
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+ if multilib_is_native_abi && use doc; then
+ dohtml -r doc/doxygen/html/.
+ fi
+}
+
+multilib_src_install_all() {
+ prune_libtool_files --all
+ find "${ED}"/usr/$(get_libdir)/alsa-lib -name '*.a' -exec rm -f {} +
+ dodoc ChangeLog doc/asoundrc.txt NOTES TODO
+}
diff --git a/media-libs/alsa-lib/metadata.xml b/media-libs/alsa-lib/metadata.xml
new file mode 100644
index 000000000000..0ea67aec405a
--- /dev/null
+++ b/media-libs/alsa-lib/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>alsa</herd>
+ <maintainer>
+ <email>alsa-bugs@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="alisp">Enable support for ALISP (ALSA LISP) interpreter for advanced features.</flag>
+ </use>
+ <upstream>
+ <remote-id type="cpe">cpe:/a:alsa-project:alsa-lib</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/alsa-oss/Manifest b/media-libs/alsa-oss/Manifest
new file mode 100644
index 000000000000..7c481712a7f2
--- /dev/null
+++ b/media-libs/alsa-oss/Manifest
@@ -0,0 +1,2 @@
+DIST alsa-oss-1.0.25.tar.bz2 253409 SHA256 ed823b8e42599951d896c1709615d4cf7cb1cb3a7c55c75ccee82e24ccaf28e3 SHA512 5380e5acf588dd56384f53afedc7704bfc5e3a7b886853061c53236f86312a8f0ca9b9adf6e69019569a3eb6fd3e89acfb715bb16101f50dcf961e84269c3cd2 WHIRLPOOL 27f19ae9b43d6941fdafb8e51ef0e7cd2667a6a6a8babf58303a0468bad02a33fd2562e91e5c92941083f7a0b2b4e17d4a001c41370bf6cddd29182b17ee4ca0
+DIST alsa-oss-1.0.28.tar.bz2 291500 SHA256 3ae62caa88a0bc7b30ed836dcb794dc6ef4d3650439e2260db54cace7d5c6ad5 SHA512 7069b7d4d4c0b840608dcca99a660aae1f81f6ef45dcf48fc66553b05de260d033105aa685c8ca05fd4d157d12d83860746a05afdab4f310919c34fa235ab03e WHIRLPOOL 02c7dfadbd30baaf86094a0ffff996eec5bf67aed7f49dc915d29b9a0318345415a1bd9c776967e1dc9da3c9dd180169f61950fd1454fa28837e35631cb83efe
diff --git a/media-libs/alsa-oss/alsa-oss-1.0.25-r1.ebuild b/media-libs/alsa-oss/alsa-oss-1.0.25-r1.ebuild
new file mode 100644
index 000000000000..3294547eb155
--- /dev/null
+++ b/media-libs/alsa-oss/alsa-oss-1.0.25-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
+
+inherit autotools eutils multilib multilib-minimal
+
+MY_P="${P/_rc/rc}"
+S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="Advanced Linux Sound Architecture OSS compatibility layer"
+HOMEPAGE="http://www.alsa-project.org/"
+SRC_URI="mirror://alsaproject/oss-lib/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="static-libs"
+
+RDEPEND=">=media-libs/alsa-lib-${PV}[${MULTILIB_USEDEP}]
+ abi_x86_32? (
+ !<app-emulation/emul-linux-x86-soundlibs-20140406-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32]
+ )"
+DEPEND="${RDEPEND}"
+PATCHES=( "${FILESDIR}/${PN}-1.0.12-hardened.patch" )
+
+multilib_src_configure() {
+ ECONF_SOURCE=${S} \
+ econf \
+ $(use_enable static-libs static)
+}
+
+src_prepare() {
+ eautoreconf
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ prune_libtool_files --all
+ sed -i -e 's:\${exec_prefix}/\\$LIB/::' "${D}/usr/bin/aoss" || die
+}
diff --git a/media-libs/alsa-oss/alsa-oss-1.0.25.ebuild b/media-libs/alsa-oss/alsa-oss-1.0.25.ebuild
new file mode 100644
index 000000000000..bd67706bc868
--- /dev/null
+++ b/media-libs/alsa-oss/alsa-oss-1.0.25.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit autotools base multilib
+
+MY_P="${P/_rc/rc}"
+S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="Advanced Linux Sound Architecture OSS compatibility layer"
+HOMEPAGE="http://www.alsa-project.org/"
+SRC_URI="mirror://alsaproject/oss-lib/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86"
+IUSE="static-libs"
+
+RDEPEND=">=media-libs/alsa-lib-${PV}"
+DEPEND="${RDEPEND}"
+PATCHES=( "${FILESDIR}/${PN}-1.0.12-hardened.patch" )
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static)
+}
+
+src_prepare() {
+ eautoreconf
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "make install failed"
+ sed -i -e 's:\${exec_prefix}/\\$LIB/::' "${D}/usr/bin/aoss"
+ find "${D}" -name "*.la" -delete
+}
diff --git a/media-libs/alsa-oss/alsa-oss-1.0.28.ebuild b/media-libs/alsa-oss/alsa-oss-1.0.28.ebuild
new file mode 100644
index 000000000000..0b95c44a4509
--- /dev/null
+++ b/media-libs/alsa-oss/alsa-oss-1.0.28.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 autotools eutils multilib multilib-minimal
+
+MY_P="${P/_rc/rc}"
+S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="Advanced Linux Sound Architecture OSS compatibility layer"
+HOMEPAGE="http://www.alsa-project.org/"
+SRC_URI="mirror://alsaproject/oss-lib/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm hppa ia64 ppc ppc64 sparc x86"
+IUSE="static-libs"
+
+RDEPEND=">=media-libs/alsa-lib-${PV}[${MULTILIB_USEDEP}]
+ abi_x86_32? (
+ !<app-emulation/emul-linux-x86-soundlibs-20140406-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32]
+ )"
+DEPEND="${RDEPEND}"
+PATCHES=( "${FILESDIR}/${PN}-1.0.12-hardened.patch" )
+
+multilib_src_configure() {
+ ECONF_SOURCE=${S} \
+ econf $(use_enable static-libs static)
+}
+
+src_prepare() {
+ eautoreconf
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ prune_libtool_files --all
+ sed -i -e 's:\${exec_prefix}/\\$LIB/::' "${D}/usr/bin/aoss" || die
+}
diff --git a/media-libs/alsa-oss/files/alsa-oss-1.0.12-hardened.patch b/media-libs/alsa-oss/files/alsa-oss-1.0.12-hardened.patch
new file mode 100644
index 000000000000..847a7da932f8
--- /dev/null
+++ b/media-libs/alsa-oss/files/alsa-oss-1.0.12-hardened.patch
@@ -0,0 +1,13 @@
+Index: alsa-oss-1.0.12/test/Makefile.am
+===================================================================
+--- alsa-oss-1.0.12.orig/test/Makefile.am
++++ alsa-oss-1.0.12/test/Makefile.am
+@@ -7,7 +7,7 @@ lmixer_SOURCES=lmixer.cc
+ noinst_HEADERS = mixctl.h
+
+ INCLUDES=-I$(top_srcdir)/oss-redir
+-AM_CFLAGS=-static -Wall -pipe -g
++AM_CFLAGS=-Wall -pipe -g
+
+ EXTRA_DIST=
+
diff --git a/media-libs/alsa-oss/metadata.xml b/media-libs/alsa-oss/metadata.xml
new file mode 100644
index 000000000000..8987e55f2c06
--- /dev/null
+++ b/media-libs/alsa-oss/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>alsa</herd>
+<maintainer>
+<email>alsa-bugs@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/media-libs/alure/Manifest b/media-libs/alure/Manifest
new file mode 100644
index 000000000000..6c1347114794
--- /dev/null
+++ b/media-libs/alure/Manifest
@@ -0,0 +1 @@
+DIST alure-1.2.tar.bz2 65210 RMD160 d529e50542e3553a7e6999af8da59658d28fa51e SHA1 f033f0820c449ebff7b4b0254a7b1f26c0ba485b SHA256 465e6adae68927be3a023903764662d64404e40c4c152d160e3a8838b1d70f71
diff --git a/media-libs/alure/alure-1.2.ebuild b/media-libs/alure/alure-1.2.ebuild
new file mode 100644
index 000000000000..3d694ae99770
--- /dev/null
+++ b/media-libs/alure/alure-1.2.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit cmake-utils
+
+DESCRIPTION="The OpenAL Utility Toolkit"
+HOMEPAGE="http://kcat.strangesoft.net/alure.html"
+SRC_URI="http://kcat.strangesoft.net/alure-releases/${P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~ppc64 x86"
+IUSE="dumb examples flac fluidsynth mp3 sndfile static-libs vorbis"
+
+RDEPEND=">=media-libs/openal-1.1
+ dumb? ( media-libs/dumb )
+ flac? ( media-libs/flac )
+ fluidsynth? ( >=media-sound/fluidsynth-1.1.1 )
+ mp3? ( media-sound/mpg123 )
+ sndfile? ( media-libs/libsndfile )
+ vorbis? ( media-libs/libvorbis )"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ sed -i -e "/DESTINATION/s:doc/alure:doc/${PF}:" CMakeLists.txt || die
+}
+
+src_configure() {
+ # FIXME: libmodplug/sndfile.h from libmodplug conflict with sndfile.h from libsndfile
+ local mycmakeargs=(
+ $(cmake-utils_use dumb)
+ $(cmake-utils_use_build examples)
+ $(cmake-utils_use flac)
+ $(cmake-utils_use fluidsynth)
+ -DMODPLUG=OFF
+ $(cmake-utils_use mp3 MPG123)
+ $(cmake-utils_use sndfile)
+ $(cmake-utils_use_build static-libs STATIC)
+ $(cmake-utils_use vorbis)
+ )
+
+ cmake-utils_src_configure
+}
diff --git a/media-libs/alure/metadata.xml b/media-libs/alure/metadata.xml
new file mode 100644
index 000000000000..d2599dbf709f
--- /dev/null
+++ b/media-libs/alure/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>sound</herd>
+ <use>
+ <flag name="dumb">Enable <pkg>media-libs/dumb</pkg> module library support</flag>
+ <flag name="fluidsynth">Enables Fluidsynth MIDI software synthesis</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/assimp/Manifest b/media-libs/assimp/Manifest
new file mode 100644
index 000000000000..521b94e8e4f9
--- /dev/null
+++ b/media-libs/assimp/Manifest
@@ -0,0 +1,2 @@
+DIST assimp--3.0.1270-source-only.zip 4042147 SHA256 ac29beb596db97df57451a5503afaf2d8b4366522842a6914da89644927a1423 SHA512 0c23e4eafbd2ff5eb6371b9a3b83ea2b0ef65110f6091a4e63e28b83a6dd1939f1f03607ad002cb5e9a632b821f65d1cc78b63d7792f45ed186071ef0a7ab820 WHIRLPOOL 9f32ea8b3c54ca7efd4a1c57300571bedb7f527bf630aa7203636c297acc53e6fbebf482069e76e833a1eb6317fa313c3d78ad4e6a68db4dd82a466b136f8d38
+DIST assimp-3.1.1.zip 32869052 SHA256 3b8d16eaf6c4b26479295f4f7436388bee1e42e8c0b11f6f695b7194985eb00e SHA512 c466d312c0db53fa31b5d1e9b0f65e547a82fb28b1df0a6a96f0dcd876b636a6883d9d705d325193acc58910272b5f158ba37d824ecad29eccf7cf5731697527 WHIRLPOOL 238a79a7e2c7ce799dc89394043962456af06eb8b6ed105893512cb751919287c70c88030b03832ba2f3e6ea54d82db4e8d6009629bb7ed3f3e5e6df78bbd6c6
diff --git a/media-libs/assimp/assimp-3.0.1270.ebuild b/media-libs/assimp/assimp-3.0.1270.ebuild
new file mode 100644
index 000000000000..e84b1c282373
--- /dev/null
+++ b/media-libs/assimp/assimp-3.0.1270.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils versionator
+
+DESCRIPTION="Importer library to import assets from 3D files"
+HOMEPAGE="http://assimp.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}--${PV}-source-only.zip"
+
+LICENSE="BSD"
+KEYWORDS="~amd64 ~x86"
+IUSE="+boost samples static tools"
+SLOT="0"
+
+DEPEND="
+ boost? ( dev-libs/boost )
+ samples? ( x11-libs/libX11 virtual/opengl media-libs/freeglut )
+ sys-libs/zlib
+"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${PN}--${PV}-source-only
+
+src_configure() {
+ mycmakeargs=(
+ $(cmake-utils_use_build samples ASSIMP_SAMPLES) \
+ $(cmake-utils_use_build tools ASSIMP_TOOLS) \
+ $(cmake-utils_use_build static STATIC_LIB) \
+ $(cmake-utils_use_enable !boost BOOST_WORKAROUND)
+ )
+
+ cmake-utils_src_configure
+}
diff --git a/media-libs/assimp/assimp-3.1.1.ebuild b/media-libs/assimp/assimp-3.1.1.ebuild
new file mode 100644
index 000000000000..f1b0c8792003
--- /dev/null
+++ b/media-libs/assimp/assimp-3.1.1.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 cmake-utils versionator
+
+DESCRIPTION="Importer library to import assets from 3D files"
+HOMEPAGE="http://assimp.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.zip"
+
+LICENSE="BSD"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="+boost samples static tools"
+SLOT="0"
+
+DEPEND="
+ boost? ( dev-libs/boost )
+ samples? ( x11-libs/libX11 virtual/opengl media-libs/freeglut )
+ sys-libs/zlib
+"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ sed -i -e 's/ASSIMP_LIB_INSTALL_DIR "lib"/ASSIMP_LIB_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/' CMakeLists.txt || die
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ mycmakeargs=(
+ $(cmake-utils_use_build samples ASSIMP_SAMPLES) \
+ $(cmake-utils_use_build tools ASSIMP_TOOLS) \
+ $(cmake-utils_use_build static STATIC_LIB) \
+ $(cmake-utils_use_enable !boost BOOST_WORKAROUND)
+ )
+
+ cmake-utils_src_configure
+}
diff --git a/media-libs/assimp/metadata.xml b/media-libs/assimp/metadata.xml
new file mode 100644
index 000000000000..82ecba06b262
--- /dev/null
+++ b/media-libs/assimp/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>slis@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="boost">Build assimp with boost support</flag>
+ <flag name="samples">Build viewer library</flag>
+ <flag name="tools">Build assimp tool binary</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">assimp</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/atlas-c++/Manifest b/media-libs/atlas-c++/Manifest
new file mode 100644
index 000000000000..8a08161e09a6
--- /dev/null
+++ b/media-libs/atlas-c++/Manifest
@@ -0,0 +1 @@
+DIST Atlas-C++-0.6.3.tar.bz2 527537 SHA256 5b8401a3b1182eb413b7fe4e6791c14343e7d7b7af6426d5279c6b9cf681f6a3 SHA512 3063a7fabbd5937cd4c9be72596a2fd1885a8ed8e8586f0014077a40477d124b3222280bb26f2034fa2e23aed14a1c6fa800cc40636af986a78a71d68ed40606 WHIRLPOOL 1549bb8726b711758359aee864d1c29b7724d06046fdb2a12af560a0220016727e7b8160eba2b1ac0894a764e4feb9fbaaf5008487350863360d3fe6a0b28bd2
diff --git a/media-libs/atlas-c++/atlas-c++-0.6.3.ebuild b/media-libs/atlas-c++/atlas-c++-0.6.3.ebuild
new file mode 100644
index 000000000000..60b826e92c04
--- /dev/null
+++ b/media-libs/atlas-c++/atlas-c++-0.6.3.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+EAPI=5
+
+inherit eutils autotools
+
+MY_PN="Atlas-C++"
+MY_P=${MY_PN}-${PV}
+DESCRIPTION="Atlas protocol, used in role playing games at worldforge"
+HOMEPAGE="http://www.worldforge.org/dev/eng/libraries/atlas_cpp"
+SRC_URI="mirror://sourceforge/worldforge/${MY_P}.tar.bz2"
+
+SLOT="0"
+LICENSE="LGPL-2.1"
+KEYWORDS="amd64 x86"
+IUSE="doc"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-Werror.patch
+ eautoreconf
+}
+
+src_compile() {
+ emake
+ if use doc; then
+ emake docs
+ fi
+}
+
+src_install() {
+ default
+ use doc && dohtml -r doc/html/*
+ use doc && doman doc/man/man3/[^i]*
+ dodoc HACKING ROADMAP
+}
diff --git a/media-libs/atlas-c++/files/atlas-c++-0.6.1-as-needed.patch b/media-libs/atlas-c++/files/atlas-c++-0.6.1-as-needed.patch
new file mode 100644
index 000000000000..c89827be08e9
--- /dev/null
+++ b/media-libs/atlas-c++/files/atlas-c++-0.6.1-as-needed.patch
@@ -0,0 +1,63 @@
+--- Atlas/Makefile.am.old 2008-11-20 08:45:41.000000000 +0100
++++ Atlas/Makefile.am 2008-11-20 08:45:52.000000000 +0100
+@@ -1,4 +1,4 @@
+-SUBDIRS = Message Codecs Filters Net Objects Funky
++SUBDIRS = . Message Codecs Filters Net Objects Funky
+
+ INCLUDES = -I$(top_srcdir)
+
+--- Atlas/Message/Makefile.am.old 2008-11-20 08:47:01.000000000 +0100
++++ Atlas/Message/Makefile.am 2008-11-20 08:47:29.000000000 +0100
+@@ -5,6 +5,8 @@
+
+ libAtlasMessage_0_6_la_LDFLAGS = $(INTERFACE_VERSION)
+
++libAtlasMessage_0_6_la_LIBADD = ../libAtlas-0.6.la
++
+ libAtlasMessage_0_6_la_SOURCES = \
+ Element.cpp MEncoder.cpp DecoderBase.cpp QueuedDecoder.cpp
+
+--- Atlas/Codecs/Makefile.am.old 2008-11-20 08:49:49.000000000 +0100
++++ Atlas/Codecs/Makefile.am 2008-11-20 08:52:45.000000000 +0100
+@@ -5,6 +5,8 @@
+
+ libAtlasCodecs_0_6_la_LDFLAGS = $(INTERFACE_VERSION)
+
++libAtlasCodecs_0_6_la_LIBADD = ../libAtlas-0.6.la
++
+ libAtlasCodecs_0_6_la_SOURCES = \
+ Utility.cpp XML.cpp Packed.cpp Bach.cpp
+
+--- Atlas/Filters/Makefile.am.old 2008-11-20 08:53:58.000000000 +0100
++++ Atlas/Filters/Makefile.am 2008-11-20 08:55:21.000000000 +0100
+@@ -5,6 +5,8 @@
+
+ libAtlasFilters_0_6_la_LDFLAGS = $(INTERFACE_VERSION)
+
++libAtlasFilters_0_6_la_LIBADD = ../libAtlas-0.6.la -lz -lbz2
++
+ libAtlasFilters_0_6_la_SOURCES = \
+ Bzip2.cpp Bzip2.h \
+ Gzip.cpp Gzip.h
+--- Atlas/Net/Makefile.am.old 2008-11-19 15:10:38.000000000 +0100
++++ Atlas/Net/Makefile.am 2008-11-19 15:11:13.000000000 +0100
+@@ -5,6 +5,8 @@
+
+ libAtlasNet_0_6_la_LDFLAGS = $(INTERFACE_VERSION)
+
++libAtlasNet_0_6_la_LIBADD = ../Codecs/libAtlasCodecs-0.6.la ../libAtlas-0.6.la
++
+ libAtlasNetincludedir = $(includedir)/Atlas-C++-0.6/Atlas/Net
+
+ libAtlasNet_0_6_la_SOURCES = \
+--- Atlas/Objects/Makefile.am.old 2008-11-20 08:57:39.000000000 +0100
++++ Atlas/Objects/Makefile.am 2008-11-20 08:58:56.000000000 +0100
+@@ -5,6 +5,8 @@
+
+ libAtlasObjects_0_6_la_LDFLAGS = $(INTERFACE_VERSION)
+
++libAtlasObjects_0_6_la_LIBADD = ../libAtlas-0.6.la ../Message/libAtlasMessage-0.6.la ../Codecs/libAtlasCodecs-0.6.la
++
+ REAL_GENERATED_CPP = Root.cpp Decoder.cpp Dispatcher.cpp objectFactory.cpp \
+ RootEntity.cpp RootEntityChildren.cpp \
+ RootOperation.cpp RootOperationChildren1.cpp \
diff --git a/media-libs/atlas-c++/files/atlas-c++-0.6.1-gcc-4.3.patch b/media-libs/atlas-c++/files/atlas-c++-0.6.1-gcc-4.3.patch
new file mode 100644
index 000000000000..6ac1bc6e6194
--- /dev/null
+++ b/media-libs/atlas-c++/files/atlas-c++-0.6.1-gcc-4.3.patch
@@ -0,0 +1,30 @@
+--- Atlas/Filter.cpp.old 2008-04-14 23:55:23.000000000 +0200
++++ Atlas/Filter.cpp 2008-04-14 23:57:04.000000000 +0200
+@@ -4,6 +4,8 @@
+
+ #include <Atlas/Filter.h>
+
++#include <string.h>
++
+ namespace Atlas {
+
+ Filter::Filter(Filter* next)
+@@ -41,7 +43,7 @@
+
+ if (numPutback > m_inPutback) numPutback = m_inPutback;
+
+- std::memcpy(m_outBuffer + (m_inPutback - numPutback),
++ ::memcpy(m_outBuffer + (m_inPutback - numPutback),
+ gptr() - numPutback,
+ (unsigned long) numPutback);
+
+--- tools/atlas_convert.cpp.old 2008-04-14 23:58:53.000000000 +0200
++++ tools/atlas_convert.cpp 2008-04-14 23:59:15.000000000 +0200
+@@ -14,6 +14,7 @@
+ #include <fstream>
+ #include <iostream>
+
++#include <stdlib.h>
+ #include <unistd.h>
+
+ int option_format = 0;
diff --git a/media-libs/atlas-c++/files/atlas-c++-0.6.1-gcc-4.4.patch b/media-libs/atlas-c++/files/atlas-c++-0.6.1-gcc-4.4.patch
new file mode 100644
index 000000000000..ed792935349a
--- /dev/null
+++ b/media-libs/atlas-c++/files/atlas-c++-0.6.1-gcc-4.4.patch
@@ -0,0 +1,10 @@
+--- Atlas/Filter.cpp.old 2009-07-06 09:58:04.000000000 +0200
++++ Atlas/Filter.cpp 2009-07-06 09:58:44.000000000 +0200
+@@ -5,6 +5,7 @@
+ #include <Atlas/Filter.h>
+
+ #include <string.h>
++#include <cstdio>
+
+ namespace Atlas {
+
diff --git a/media-libs/atlas-c++/files/atlas-c++-0.6.1-strict-aliasing.patch b/media-libs/atlas-c++/files/atlas-c++-0.6.1-strict-aliasing.patch
new file mode 100644
index 000000000000..edf1ac197755
--- /dev/null
+++ b/media-libs/atlas-c++/files/atlas-c++-0.6.1-strict-aliasing.patch
@@ -0,0 +1,16 @@
+--- tests/Objects/Makefile.am.old 2008-02-29 07:43:45.000000000 +0100
++++ tests/Objects/Makefile.am 2008-02-29 07:44:21.000000000 +0100
+@@ -28,3 +28,5 @@
+ attributes_SOURCES = attributes.cpp
+
+ flags_SOURCES = flags.cpp
++
++AM_CPPFLAGS = -fno-strict-aliasing
+--- benchmark/Makefile.am.old 2008-02-29 07:57:10.000000000 +0100
++++ benchmark/Makefile.am 2008-02-29 07:57:33.000000000 +0100
+@@ -31,3 +31,5 @@
+
+ Objects_asMessage_SOURCES = Objects_asMessage.cpp timer.h
+ Objects_iterator_SOURCES = Objects_iterator.cpp timer.h
++
++AM_CPPFLAGS = -fno-strict-aliasing
diff --git a/media-libs/atlas-c++/files/atlas-c++-0.6.2-Werror.patch b/media-libs/atlas-c++/files/atlas-c++-0.6.2-Werror.patch
new file mode 100644
index 000000000000..b13384ab5a12
--- /dev/null
+++ b/media-libs/atlas-c++/files/atlas-c++-0.6.2-Werror.patch
@@ -0,0 +1,15 @@
+--- configure.ac.old 2011-05-02 11:16:53.851733207 +0200
++++ configure.ac 2011-05-02 11:17:18.489283901 +0200
+@@ -35,10 +35,10 @@
+ if test "$enableval" = "yes"; then
+ CXXFLAGS="$CXXFLAGS -Wall -Werror -DDEBUG"
+ else
+- CXXFLAGS="$CXXFLAGS -Wall -Werror -DNDEBUG"
++ CXXFLAGS="$CXXFLAGS -Wall -DNDEBUG"
+ fi
+ ],[
+- CXXFLAGS="$CXXFLAGS -Wall -Werror -DNDEBUG"
++ CXXFLAGS="$CXXFLAGS -Wall -DNDEBUG"
+ ]
+ )
+
diff --git a/media-libs/atlas-c++/files/atlas-c++-0.6.3-Werror.patch b/media-libs/atlas-c++/files/atlas-c++-0.6.3-Werror.patch
new file mode 100644
index 000000000000..b13384ab5a12
--- /dev/null
+++ b/media-libs/atlas-c++/files/atlas-c++-0.6.3-Werror.patch
@@ -0,0 +1,15 @@
+--- configure.ac.old 2011-05-02 11:16:53.851733207 +0200
++++ configure.ac 2011-05-02 11:17:18.489283901 +0200
+@@ -35,10 +35,10 @@
+ if test "$enableval" = "yes"; then
+ CXXFLAGS="$CXXFLAGS -Wall -Werror -DDEBUG"
+ else
+- CXXFLAGS="$CXXFLAGS -Wall -Werror -DNDEBUG"
++ CXXFLAGS="$CXXFLAGS -Wall -DNDEBUG"
+ fi
+ ],[
+- CXXFLAGS="$CXXFLAGS -Wall -Werror -DNDEBUG"
++ CXXFLAGS="$CXXFLAGS -Wall -DNDEBUG"
+ ]
+ )
+
diff --git a/media-libs/atlas-c++/metadata.xml b/media-libs/atlas-c++/metadata.xml
new file mode 100644
index 000000000000..f276a0d5eb12
--- /dev/null
+++ b/media-libs/atlas-c++/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>tupone@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">
+Atlas-C++ is the current C++ implementation of the Atlas protocol, a
+communications layer designed to be used in the WorldForge MMORPG gaming
+system.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">worldforge</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/aubio/Manifest b/media-libs/aubio/Manifest
new file mode 100644
index 000000000000..158e49c223b4
--- /dev/null
+++ b/media-libs/aubio/Manifest
@@ -0,0 +1,3 @@
+DIST aubio-0.3.2.tar.gz 609006 SHA256 dc1387b048610a6141f523c27314b7a60bd299c3d6789c372445ddc6511512cd SHA512 b3d8445716c0cde02ee1e7b036864598ec7562d8a938a61f644c384d80e95601abcb6e713cdaab7b2613f6f4f27db1cfafa7c23824c61f504e83d11fefdee8fc WHIRLPOOL eeb732702bbb1682d32fde5cce4d17ae402292e1c19dac2e45600b268c955310683712952be8a1f72c08255c8c75c5beff9a127ab5b296883a64a4b5d9cb949a
+DIST aubio-0.4.0.tar.bz2 277613 SHA256 49de9a06c819d4c4e0a9198a95eac374a1650083aef16c397004258bac2d33a2 SHA512 4f04ca8a873e45b6cdf84e3fb6028d9ad0abc0300daf83b1f7b08021355b1449f9c8d3a9b617bd479668e6b2c0c63c3ce69d61baeb6b0f621a84e850dedce8b6 WHIRLPOOL 432c0f555d21190838b573b90a68f625b267a399380ac79cb8687e8d2de53db1dff8c9ab235db446b315a98d9df729d45db7360b825e0ad37d6924b09788b1b9
+DIST aubio-0.4.1.tar.bz2 288136 SHA256 25d7df0a9cd6366fda764a803424caddf5fb819fc75b42a7a03e1e6f8eb3c695 SHA512 f36800f1a0cbe72509e05d15d79759ed25975e92701804597ed4c9d93e27d5e7b908e0aa65819ce763882945123ea174a0825c7aacf9f9494f56d72de5b8308c WHIRLPOOL ea410de8ca5d81c8b6ff2f98a2353601a48435649e3c5931e41f9e7f4ccb8f9a8faf2156a3632de223638f1e91d608c5a77660fa00633a591488498c5e37fec6
diff --git a/media-libs/aubio/aubio-0.3.2-r2.ebuild b/media-libs/aubio/aubio-0.3.2-r2.ebuild
new file mode 100644
index 000000000000..539474be6c62
--- /dev/null
+++ b/media-libs/aubio/aubio-0.3.2-r2.ebuild
@@ -0,0 +1,96 @@
+# 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 autotools eutils python
+
+DESCRIPTION="Library for audio labelling"
+HOMEPAGE="http://aubio.piem.org"
+SRC_URI="http://aubio.piem.org/pub/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ppc64 sparc x86"
+IUSE="alsa doc examples jack lash static-libs"
+
+RDEPEND="sci-libs/fftw:3.0
+ media-libs/libsndfile
+ media-libs/libsamplerate
+ alsa? ( media-libs/alsa-lib )
+ jack? ( media-sound/jack-audio-connection-kit )
+ lash? ( media-sound/lash )"
+DEPEND="${RDEPEND}
+ >=dev-lang/swig-1.3.0
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen virtual/latex-base )"
+
+pkg_setup() {
+ DOCS=( AUTHORS ChangeLog README TODO )
+
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_prepare() {
+ # disable automagic puredata wrt #369835
+ sed -i -e '/AC_CHECK_HEADER/s:m_pd.h:dIsAbLe&:' configure.ac || die
+
+ epatch \
+ "${FILESDIR}"/${P}-multilib.patch \
+ "${FILESDIR}"/${P}-numarray-gnuplot.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable jack) \
+ $(use_enable alsa) \
+ $(use_enable lash)
+}
+
+src_compile() {
+ default
+
+ if use doc; then
+ export VARTEXFONTS="${T}/fonts"
+ cd "${S}"/doc
+ doxygen user.cfg
+ doxygen devel.cfg
+ doxygen examples.cfg
+ fi
+}
+
+src_install() {
+ # `default` would be enough here if python.eclass supported EAPI=4
+ emake DESTDIR="${D}" install || die
+ dodoc "${DOCS[@]}"
+
+ doman doc/*.1
+ if use doc; then
+ mv doc/user/html doc/user/user
+ dohtml -r doc/user/user
+ mv doc/devel/html doc/devel/devel
+ dohtml -r doc/devel/devel
+ mv doc/examples/html doc/examples/examples
+ dohtml -r doc/examples/examples
+ fi
+
+ if use examples; then
+ # install dist_noinst_SCRIPTS from Makefile.am
+ insinto /usr/share/doc/${PF}/examples
+ doins python/aubio{compare-onset,plot-notes,filter-notes,web.py} || die
+ docinto examples
+ newdoc python/README README.examples
+ fi
+
+ find "${ED}"usr -name '*.la' -exec rm -f {} +
+}
+
+pkg_postinst() { python_mod_optimize aubio; }
+pkg_postrm() { python_mod_cleanup aubio; }
diff --git a/media-libs/aubio/aubio-0.4.0-r1.ebuild b/media-libs/aubio/aubio-0.4.0-r1.ebuild
new file mode 100644
index 000000000000..669b939c24b3
--- /dev/null
+++ b/media-libs/aubio/aubio-0.4.0-r1.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DISTUTILS_OPTIONAL=1
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='threads(+)'
+
+inherit distutils-r1 waf-utils multilib
+
+DESCRIPTION="Library for audio labelling"
+HOMEPAGE="http://aubio.org/"
+SRC_URI="http://aubio.org//pub/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="doc double-precision examples ffmpeg fftw jack libsamplerate sndfile python"
+
+RDEPEND="
+ ffmpeg? ( virtual/ffmpeg )
+ fftw? ( sci-libs/fftw:3.0 )
+ jack? ( media-sound/jack-audio-connection-kit )
+ libsamplerate? ( media-libs/libsamplerate )
+ python? ( dev-python/numpy[${PYTHON_USEDEP}] ${PYTHON_DEPS} )
+ sndfile? ( media-libs/libsndfile )"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ virtual/pkgconfig
+ app-text/txt2man
+ doc? ( app-doc/doxygen )"
+REQUIRED_USE=${PYTHON_REQUIRED_USE}
+
+DOCS=( AUTHORS ChangeLog README.md )
+PYTHON_SRC_DIR="${S}/python"
+
+src_prepare() {
+ sed -i -e "s:\/lib:\/$(get_libdir):" src/wscript_build || die
+ sed -i -e "s:doxygen:doxygen_disabled:" wscript || die
+}
+
+src_configure() {
+ python_setup
+ waf-utils_src_configure \
+ --enable-complex \
+ --docdir="${EPREFIX}"/usr/share/doc/${PF} \
+ $(use_enable double-precision double) \
+ $(use_enable fftw fftw3f) \
+ $(use_enable fftw fftw3) \
+ $(use_enable ffmpeg avcodec) \
+ $(use_enable jack) \
+ $(use_enable libsamplerate samplerate) \
+ $(use_enable sndfile)
+
+ if use python ; then
+ cd "${PYTHON_SRC_DIR}" || die
+ distutils-r1_src_configure
+ fi
+}
+
+src_compile() {
+ waf-utils_src_compile --notests
+
+ if use doc; then
+ cd "${S}"/doc || die
+ doxygen full.cfg || die
+ fi
+
+ if use python ; then
+ cd "${PYTHON_SRC_DIR}" || die
+ distutils-r1_src_compile
+ fi
+}
+
+src_test() {
+ waf-utils_src_compile --alltests
+
+ if use python ; then
+ cd "${PYTHON_SRC_DIR}" || die
+ distutils-r1_src_test
+ fi
+}
+
+src_install() {
+ waf-utils_src_install
+
+ if use python ; then
+ cd "${PYTHON_SRC_DIR}" || die
+ DOCS="" distutils-r1_src_install
+ newdoc README README.python
+ fi
+
+ if use doc; then
+ dohtml -r doc/full/html/.
+ dodoc doc/*.txt
+ fi
+
+ if use examples; then
+ # install dist_noinst_SCRIPTS from Makefile.am
+ dodoc -r examples
+ fi
+}
diff --git a/media-libs/aubio/aubio-0.4.1.ebuild b/media-libs/aubio/aubio-0.4.1.ebuild
new file mode 100644
index 000000000000..dfddfdbff94a
--- /dev/null
+++ b/media-libs/aubio/aubio-0.4.1.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DISTUTILS_OPTIONAL=1
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='threads(+)'
+
+inherit distutils-r1 waf-utils multilib
+
+DESCRIPTION="Library for audio labelling"
+HOMEPAGE="http://aubio.org/"
+SRC_URI="http://aubio.org//pub/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ppc64 sparc x86"
+IUSE="doc double-precision examples ffmpeg fftw jack libsamplerate sndfile python"
+
+RDEPEND="
+ ffmpeg? ( virtual/ffmpeg )
+ fftw? ( sci-libs/fftw:3.0 )
+ jack? ( media-sound/jack-audio-connection-kit )
+ libsamplerate? ( media-libs/libsamplerate )
+ python? ( dev-python/numpy[${PYTHON_USEDEP}] ${PYTHON_DEPS} )
+ sndfile? ( media-libs/libsndfile )"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ virtual/pkgconfig
+ app-text/txt2man
+ doc? ( app-doc/doxygen )"
+REQUIRED_USE=${PYTHON_REQUIRED_USE}
+
+DOCS=( AUTHORS ChangeLog README.md )
+PYTHON_SRC_DIR="${S}/python"
+
+src_prepare() {
+ sed -i -e "s:\/lib:\/$(get_libdir):" src/wscript_build || die
+ sed -i -e "s:doxygen:doxygen_disabled:" wscript || die
+}
+
+src_configure() {
+ python_setup
+ waf-utils_src_configure \
+ --enable-complex \
+ --docdir="${EPREFIX}"/usr/share/doc/${PF} \
+ $(use_enable double-precision double) \
+ $(use_enable fftw fftw3f) \
+ $(use_enable fftw fftw3) \
+ $(use_enable ffmpeg avcodec) \
+ $(use_enable jack) \
+ $(use_enable libsamplerate samplerate) \
+ $(use_enable sndfile)
+
+ if use python ; then
+ cd "${PYTHON_SRC_DIR}" || die
+ distutils-r1_src_configure
+ fi
+}
+
+src_compile() {
+ waf-utils_src_compile --notests
+
+ if use doc; then
+ cd "${S}"/doc || die
+ doxygen full.cfg || die
+ fi
+
+ if use python ; then
+ cd "${PYTHON_SRC_DIR}" || die
+ distutils-r1_src_compile
+ fi
+}
+
+src_test() {
+ waf-utils_src_compile --alltests
+
+ if use python ; then
+ cd "${PYTHON_SRC_DIR}" || die
+ distutils-r1_src_test
+ fi
+}
+
+src_install() {
+ waf-utils_src_install
+
+ if use python ; then
+ cd "${PYTHON_SRC_DIR}" || die
+ DOCS="" distutils-r1_src_install
+ newdoc README README.python
+ fi
+
+ if use doc; then
+ dohtml -r doc/full/html/.
+ dodoc doc/*.txt
+ fi
+
+ if use examples; then
+ # install dist_noinst_SCRIPTS from Makefile.am
+ dodoc -r examples
+ fi
+}
diff --git a/media-libs/aubio/files/aubio-0.3.2-multilib.patch b/media-libs/aubio/files/aubio-0.3.2-multilib.patch
new file mode 100644
index 000000000000..7464fad6cacb
--- /dev/null
+++ b/media-libs/aubio/files/aubio-0.3.2-multilib.patch
@@ -0,0 +1,11 @@
+--- python/aubio/Makefile.am
++++ python/aubio/Makefile.am
+@@ -68,7 +68,7 @@
+ -L$(top_builddir)/ext -laubioext \
+ -L$(top_builddir)/src -laubio
+
+-pkgpython_LTLIBRARIES = _aubiowrapper.la
++pkgpyexec_LTLIBRARIES = _aubiowrapper.la
+
+ _aubiowrapper_la_LDFLAGS = -module -avoid-version $(AUBIO_LDFLAGS)
+ _aubiowrapper_la_SOURCES = aubio_wrap.c
diff --git a/media-libs/aubio/files/aubio-0.3.2-numarray-gnuplot.patch b/media-libs/aubio/files/aubio-0.3.2-numarray-gnuplot.patch
new file mode 100644
index 000000000000..48d1e76d3530
--- /dev/null
+++ b/media-libs/aubio/files/aubio-0.3.2-numarray-gnuplot.patch
@@ -0,0 +1,332 @@
+http://pkgs.fedoraproject.org/gitweb/?p=aubio.git;a=tree
+
+--- python/aubio/aubioclass.py
++++ python/aubio/aubioclass.py
+@@ -42,8 +42,10 @@
+ self.file = new_aubio_sndfile_wo(model.file,filename)
+ else:
+ self.file = new_aubio_sndfile_ro(filename)
++ if self.file == None:
++ raise(ValueError, "failed opening file %s" % filename)
+ def __del__(self):
+- del_aubio_sndfile(self.file)
++ if self.file != None: del_aubio_sndfile(self.file)
+ def info(self):
+ aubio_sndfile_info(self.file)
+ def samplerate(self):
+@@ -126,7 +128,7 @@
+ channels=1,samplerate=44100.,omode=aubio_pitchm_freq,yinthresh=0.1):
+ self.pitchp = new_aubio_pitchdetection(bufsize,hopsize,channels,
+ samplerate,mode,omode)
+- aubio_pitchdetection_set_yinthresh(self.pitchp,yinthresh)
++ aubio_pitchdetection_set_yinthresh(self.pitchp,yinthresh)
+ #self.filt = filter(srate,"adsgn")
+ def __del__(self):
+ del_aubio_pitchdetection(self.pitchp)
+--- python/aubio/bench/onset.py
++++ python/aubio/bench/onset.py
+@@ -111,7 +111,7 @@
+ for i in self.vlist:
+ gd.append(i['GD'])
+ fp.append(i['FP'])
+- d.append(Gnuplot.Data(fp, gd, with='linespoints',
++ d.append(Gnuplot.Data(fp, gd, with_='linespoints',
+ title="%s %s" % (plottitle,i['mode']) ))
+
+ def plotplotroc(self,d,outplot=0,extension='ps'):
+@@ -147,7 +147,7 @@
+ for i in self.vlist:
+ x.append(i['prec'])
+ y.append(i['recl'])
+- d.append(Gnuplot.Data(x, y, with='linespoints',
++ d.append(Gnuplot.Data(x, y, with_='linespoints',
+ title="%s %s" % (plottitle,i['mode']) ))
+
+ def plotplotpr(self,d,outplot=0,extension='ps'):
+@@ -172,7 +172,7 @@
+ for i in self.vlist:
+ x.append(i['thres'])
+ y.append(i['dist'])
+- d.append(Gnuplot.Data(x, y, with='linespoints',
++ d.append(Gnuplot.Data(x, y, with_='linespoints',
+ title="%s %s" % (plottitle,i['mode']) ))
+
+ def plotplotfmeas(self,d,outplot="",extension='ps', title="F-measure"):
+@@ -205,7 +205,7 @@
+ for i in self.vlist:
+ x.append(i[var])
+ y.append(i['dist'])
+- d.append(Gnuplot.Data(x, y, with='linespoints',
++ d.append(Gnuplot.Data(x, y, with_='linespoints',
+ title="%s %s" % (plottitle,i['mode']) ))
+
+ def plotplotfmeasvar(self,d,var,outplot="",extension='ps', title="F-measure"):
+@@ -244,7 +244,7 @@
+ total = v['Torig']
+ for i in range(len(per)): per[i] /= total/100.
+
+- d.append(Gnuplot.Data(val, per, with='fsteps',
++ d.append(Gnuplot.Data(val, per, with_='fsteps',
+ title="%s %s" % (plottitle,v['mode']) ))
+ #d.append('mean=%f,sigma=%f,eps(x) title \"\"'% (mean,smean))
+ #d.append('mean=%f,sigma=%f,eps(x) title \"\"'% (amean,samean))
+@@ -275,7 +275,7 @@
+ total = v['Torig']
+ for i in range(len(per)): per[i] /= total/100.
+
+- d.append(Gnuplot.Data(val, per, with='fsteps',
++ d.append(Gnuplot.Data(val, per, with_='fsteps',
+ title="%s %s" % (plottitle,v['mode']) ))
+ #d.append('mean=%f,sigma=%f,eps(x) title \"\"'% (mean,smean))
+ #d.append('mean=%f,sigma=%f,eps(x) title \"\"'% (amean,samean))
+--- python/aubio/gnuplot.py
++++ python/aubio/gnuplot.py
+@@ -23,7 +23,7 @@
+
+ def audio_to_array(filename):
+ import aubio.aubioclass
+- import numarray
++ from numpy import arange
+ hopsize = 2048
+ filei = aubio.aubioclass.sndfile(filename)
+ framestep = 1/(filei.samplerate()+0.)
+@@ -39,7 +39,7 @@
+ while (curpos < readsize):
+ data.append(myvec.get(curpos,i))
+ curpos+=1
+- time = numarray.arange(len(data))*framestep
++ time = arange(len(data))*framestep
+ return time,data
+
+ def plot_audio(filenames, g, options):
+@@ -143,29 +143,29 @@
+
+ def downsample_audio(time,data,maxpoints=10000):
+ """ resample audio data to last only maxpoints """
+- import numarray
++ from numpy import array, resize
+ length = len(time)
+ downsample = length/maxpoints
+ if downsample == 0: downsample = 1
+- x = numarray.array(time).resize(length)[0:-1:downsample]
+- y = numarray.array(data).resize(length)[0:-1:downsample]
++ x = resize(array(time),length)[0:-1:downsample]
++ y = resize(array(data),length)[0:-1:downsample]
+ return x,y
+
+ def make_audio_plot(time,data,maxpoints=10000):
+ """ create gnuplot plot from an audio file """
+ import Gnuplot, Gnuplot.funcutils
+ x,y = downsample_audio(time,data,maxpoints=maxpoints)
+- return Gnuplot.Data(x,y,with='lines')
++ return Gnuplot.Data(x,y,with_='lines')
+
+ def make_audio_envelope(time,data,maxpoints=10000):
+ """ create gnuplot plot from an audio file """
+- import numarray
++ from numpy import array
+ import Gnuplot, Gnuplot.funcutils
+ bufsize = 500
+- x = [i.mean() for i in numarray.array(time).resize(len(time)/bufsize,bufsize)]
+- y = [i.mean() for i in numarray.array(data).resize(len(time)/bufsize,bufsize)]
++ x = [i.mean() for i in resize(array(time), (len(time)/bufsize,bufsize))]
++ y = [i.mean() for i in resize(array(data), (len(time)/bufsize,bufsize))]
+ x,y = downsample_audio(x,y,maxpoints=maxpoints)
+- return Gnuplot.Data(x,y,with='lines')
++ return Gnuplot.Data(x,y,with_='lines')
+
+ def gnuplot_addargs(parser):
+ """ add common gnuplot argument to OptParser object """
+--- python/aubio/onsetcompare.py
++++ python/aubio/onsetcompare.py
+@@ -106,7 +106,7 @@
+ return orig, missed, merged, expc, bad, doubled, l, labs
+
+ def notes_roc (la, lb, eps):
+- from numarray import transpose, add, resize
++ from numpy import transpose, add, resize
+ """ creates a matrix of size len(la)*len(lb) then look for hit and miss
+ in it within eps tolerance windows """
+ gdn,fpw,fpg,fpa,fdo,fdp = 0,0,0,0,0,0
+--- python/aubio/task/beat.py
++++ python/aubio/task/beat.py
+@@ -247,7 +247,7 @@
+
+ def plot(self,oplots,results):
+ import Gnuplot
+- oplots.append(Gnuplot.Data(results,with='linespoints',title="auto"))
++ oplots.append(Gnuplot.Data(results,with_='linespoints',title="auto"))
+
+ def plotplot(self,wplot,oplots,outplot=None,extension=None,xsize=1.,ysize=1.,spectro=False):
+ import Gnuplot
+@@ -258,5 +258,5 @@
+ #f = make_audio_plot(time,data)
+
+ g = gnuplot_create(outplot=outplot, extension=extension)
+- oplots = [Gnuplot.Data(self.gettruth(),with='linespoints',title="orig")] + oplots
++ oplots = [Gnuplot.Data(self.gettruth(),with_='linespoints',title="orig")] + oplots
+ g.plot(*oplots)
+--- python/aubio/task/notes.py
++++ python/aubio/task/notes.py
+@@ -92,18 +92,17 @@
+ return now, onset, freq, ifreq
+
+ def plot(self,now,onset,freq,ifreq,oplots):
+- import numarray
+ import Gnuplot
+
+- oplots.append(Gnuplot.Data(now,freq,with='lines',
++ oplots.append(Gnuplot.Data(now,freq,with_='lines',
+ title=self.params.pitchmode))
+- oplots.append(Gnuplot.Data(now,ifreq,with='lines',
++ oplots.append(Gnuplot.Data(now,ifreq,with_='lines',
+ title=self.params.pitchmode))
+
+ temponsets = []
+ for i in onset:
+ temponsets.append(i*1000)
+- oplots.append(Gnuplot.Data(now,temponsets,with='impulses',
++ oplots.append(Gnuplot.Data(now,temponsets,with_='impulses',
+ title=self.params.pitchmode))
+
+ def plotplot(self,wplot,oplots,outplot=None,multiplot = 0):
+@@ -117,10 +116,10 @@
+ # check if ground truth exists
+ #timet,pitcht = self.gettruth()
+ #if timet and pitcht:
+- # oplots = [Gnuplot.Data(timet,pitcht,with='lines',
++ # oplots = [Gnuplot.Data(timet,pitcht,with_='lines',
+ # title='ground truth')] + oplots
+
+- t = Gnuplot.Data(0,0,with='impulses')
++ t = Gnuplot.Data(0,0,with_='impulses')
+
+ g = gnuplot_init(outplot)
+ g('set title \'%s\'' % (re.sub('.*/','',self.input)))
+--- python/aubio/task/onset.py
++++ python/aubio/task/onset.py
+@@ -92,7 +92,7 @@
+ import Gnuplot, Gnuplot.funcutils
+ import aubio.txtfile
+ import os.path
+- import numarray
++ from numpy import arange, array, ones
+ from aubio.onsetcompare import onset_roc
+
+ x1,y1,y1p = [],[],[]
+@@ -102,8 +102,8 @@
+ self.lenofunc = len(ofunc)
+ self.maxofunc = max(ofunc)
+ # onset detection function
+- downtime = numarray.arange(len(ofunc))*self.params.step
+- oplot.append(Gnuplot.Data(downtime,ofunc,with='lines',title=self.params.onsetmode))
++ downtime = arange(len(ofunc))*self.params.step
++ oplot.append(Gnuplot.Data(downtime,ofunc,with_='lines',title=self.params.onsetmode))
+
+ # detected onsets
+ if not nplot:
+@@ -111,11 +111,11 @@
+ x1.append(i[0]*self.params.step)
+ y1.append(self.maxofunc)
+ y1p.append(-self.maxofunc)
+- #x1 = numarray.array(onsets)*self.params.step
+- #y1 = self.maxofunc*numarray.ones(len(onsets))
++ #x1 = array(onsets)*self.params.step
++ #y1 = self.maxofunc*ones(len(onsets))
+ if x1:
+- oplot.append(Gnuplot.Data(x1,y1,with='impulses'))
+- wplot.append(Gnuplot.Data(x1,y1p,with='impulses'))
++ oplot.append(Gnuplot.Data(x1,y1,with_='impulses'))
++ wplot.append(Gnuplot.Data(x1,y1p,with_='impulses'))
+
+ oplots.append((oplot,self.params.onsetmode,self.maxofunc))
+
+@@ -126,9 +126,9 @@
+ self.title = "" #"(no ground truth)"
+ else:
+ t_onsets = aubio.txtfile.read_datafile(datafile)
+- x2 = numarray.array(t_onsets).resize(len(t_onsets))
+- y2 = self.maxofunc*numarray.ones(len(t_onsets))
+- wplot.append(Gnuplot.Data(x2,y2,with='impulses'))
++ x2 = array(t_onsets).resize(len(t_onsets))
++ y2 = self.maxofunc*ones(len(t_onsets))
++ wplot.append(Gnuplot.Data(x2,y2,with_='impulses'))
+
+ tol = 0.050
+
+--- python/aubio/task/pitch.py
++++ python/aubio/task/pitch.py
+@@ -156,7 +156,7 @@
+
+ time = [ (i+self.params.pitchdelay)*self.params.step for i in range(len(pitch)) ]
+ pitch = [aubio_freqtomidi(i) for i in pitch]
+- oplots.append(Gnuplot.Data(time,pitch,with='lines',
++ oplots.append(Gnuplot.Data(time,pitch,with_='lines',
+ title=self.params.pitchmode))
+ titles.append(self.params.pitchmode)
+
+@@ -170,7 +170,7 @@
+ if truth:
+ timet,pitcht = self.gettruth()
+ if timet and pitcht:
+- oplots = [Gnuplot.Data(timet,pitcht,with='lines',
++ oplots = [Gnuplot.Data(timet,pitcht,with_='lines',
+ title='ground truth')] + oplots
+
+ g = gnuplot_create(outplot=outplot, extension=extension)
+--- python/aubiofilter-notes
++++ python/aubiofilter-notes
+@@ -78,7 +78,7 @@
+
+ from aubio import notefilter,txtfile,gnuplot
+ """ load midi and raw data """
+- from numarray import array
++ from numpy import array
+ notelist = array(txtfile.read_datafile(input))
+ """ filter it out """
+ notelist_filtered = notefilter.segraw_onsets4(notelist,winlength,eps)
+--- python/aubionotes
++++ python/aubionotes
+@@ -4,7 +4,6 @@
+
+ import aubio.aubioclass
+ import aubio.median
+- #from numarray import around
+ from math import floor
+ hopsize = 512
+ bufsize = 4096
+--- python/aubioplot-notes
++++ python/aubioplot-notes
+@@ -18,7 +18,7 @@
+ def main (sysargs) :
+ from aubio.txtfile import read_datafile
+ from aubio.gnuplot import plotnote,plotnote_do
+- from numarray import array
++ from numpy import array
+ filein,fileout = parse_args(sysargs)
+ #print 'checking', fileerr, 'against', fileorg
+ """ load midi and raw data """
+--- python/aubioweb.py
++++ python/aubioweb.py
+@@ -11,7 +11,7 @@
+ sndfile-programs (sndfile-info)
+ vorbis-tools (oggenc)
+ python-gnuplot
+-python-numarray
++python-numpy
+
+ Try the command line tools in aubio/python to test your installation.
+
+--- python/aubio/plot/keyboard.py
++++ python/aubio/plot/keyboard.py
+@@ -30,8 +30,8 @@
+ yb = [y0+(y1-y0)*2/3. for i in range(len(xb))]
+ ybdelta = [(y1-y0)*1/3. for i in range(len(xb))]
+
+- whites = Gnuplot.Data(xw,yw,xwdelta,ywdelta,with = 'boxxyerrorbars')
+- blacks = Gnuplot.Data(xb,yb,xbdelta,ybdelta,with = 'boxxyerrorbars fill solid')
++ whites = Gnuplot.Data(xw,yw,xwdelta,ywdelta,with_ = 'boxxyerrorbars')
++ blacks = Gnuplot.Data(xb,yb,xbdelta,ybdelta,with_ = 'boxxyerrorbars fill solid')
+
+ return blacks,whites
+
diff --git a/media-libs/aubio/metadata.xml b/media-libs/aubio/metadata.xml
new file mode 100644
index 000000000000..89e25f6460e8
--- /dev/null
+++ b/media-libs/aubio/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>proaudio</herd>
+ <use>
+ <flag name="double-precision">Compile in double precision mode.</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/audiofile/Manifest b/media-libs/audiofile/Manifest
new file mode 100644
index 000000000000..ed6aae6123fb
--- /dev/null
+++ b/media-libs/audiofile/Manifest
@@ -0,0 +1,2 @@
+DIST audiofile-0.3.5.tar.xz 496648 SHA256 335502324b9bffb2528f34352a2c5abcc2c6108be36600b2e547708564eae19a SHA512 199c5879448efd8aa004f09c7a79bd0f4f24fc5391c18bec4d544383548c809b775a80eeb91cfcdb116756e08781d99e7554f5a7b451292bd681545b7c584548 WHIRLPOOL 898fc50c7e31f3abc4667e5959e25f7bf8f14a9778dd04bb10f98e5dd331beb28cef9a2427141539dc7e830a7f35c7d42145009ba41254e5e821c6287bc5079c
+DIST audiofile-0.3.6.tar.xz 530760 SHA256 ea2449ad3f201ec590d811db9da6d02ffc5e87a677d06b92ab15363d8cb59782 SHA512 f3b58210a4ef3ac8e08a368a78e0f4b8345456d084bdebfd20d1631fa75e562aa58d31863a502b6ff18178327aa5b87403566bd34566fa52bdfc8e01de400bcb WHIRLPOOL 4e750d9071e2ebfaef033647655fea7ecd2bad3751b74c4e16bd702099f01d731e57d0473379faac8ff1f66c4e5ffeadbf41551e829294fa09fe201354270221
diff --git a/media-libs/audiofile/audiofile-0.3.5.ebuild b/media-libs/audiofile/audiofile-0.3.5.ebuild
new file mode 100644
index 000000000000..fc03d5ad1ea4
--- /dev/null
+++ b/media-libs/audiofile/audiofile-0.3.5.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 autotools eutils gnome.org
+
+DESCRIPTION="An elegant API for accessing audio files"
+HOMEPAGE="http://www.68k.org/~michael/audiofile/"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0/1" # subslot = soname major version
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="static-libs test"
+
+RDEPEND=""
+DEPEND="test? ( dev-cpp/gtest )"
+
+DOCS=( ACKNOWLEDGEMENTS AUTHORS ChangeLog NEWS NOTES README TODO )
+
+src_prepare() {
+ # don't build examples wrt #455978
+ sed -i '/^SUBDIRS/s: examples::' Makefile.am || die
+
+ epatch "${FILESDIR}"/${P}-system-gtest.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ --disable-werror \
+ --enable-largefile
+}
+
+src_test() {
+ emake -C test check
+}
+
+src_install() {
+ default
+ prune_libtool_files
+}
diff --git a/media-libs/audiofile/audiofile-0.3.6-r1.ebuild b/media-libs/audiofile/audiofile-0.3.6-r1.ebuild
new file mode 100644
index 000000000000..6b93af870927
--- /dev/null
+++ b/media-libs/audiofile/audiofile-0.3.6-r1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+inherit autotools-multilib gnome.org
+
+DESCRIPTION="An elegant API for accessing audio files"
+HOMEPAGE="http://www.68k.org/~michael/audiofile/"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0/1" # subslot = soname major version
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="flac static-libs test"
+
+RDEPEND="flac? ( >=media-libs/flac-1.2.1[${MULTILIB_USEDEP}] )
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-soundlibs-20130224-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ test? ( dev-cpp/gtest[${MULTILIB_USEDEP}] )"
+
+DOCS=( ACKNOWLEDGEMENTS AUTHORS ChangeLog NEWS NOTES README TODO )
+
+PATCHES=( "${FILESDIR}"/${P}-system-gtest.patch )
+
+src_configure() {
+ local myeconfargs=(
+ --enable-largefile
+ --disable-werror
+ --disable-examples
+ $(use_enable flac)
+ )
+ autotools-multilib_src_configure
+}
+
+src_test() {
+ autotools-multilib_src_test -C test
+}
diff --git a/media-libs/audiofile/files/audiofile-0.3.5-system-gtest.patch b/media-libs/audiofile/files/audiofile-0.3.5-system-gtest.patch
new file mode 100644
index 000000000000..3093d1e09cd8
--- /dev/null
+++ b/media-libs/audiofile/files/audiofile-0.3.5-system-gtest.patch
@@ -0,0 +1,94 @@
+--- audiofile-0.3.5/test/Makefile.am
++++ audiofile-0.3.5/test/Makefile.am
+@@ -53,70 +53,68 @@
+
+ DEPENDENCIES = $(LIBAUDIOFILE)
+
+-LIBGTEST = ../gtest/libgtest.la
+-
+ ADPCM_SOURCES = ADPCM.cpp TestUtilities.cpp TestUtilities.h
+-ADPCM_LDADD = $(LIBGTEST) $(LIBAUDIOFILE)
++ADPCM_LDADD = -lgtest $(LIBAUDIOFILE)
+
+ AES_SOURCES = AES.cpp TestUtilities.cpp TestUtilities.h
+-AES_LDADD = $(LIBGTEST) $(LIBAUDIOFILE)
++AES_LDADD = -lgtest $(LIBAUDIOFILE)
+
+ ChannelMatrix_SOURCES = ChannelMatrix.cpp TestUtilities.cpp TestUtilities.h
+-ChannelMatrix_LDADD = $(LIBGTEST) $(LIBAUDIOFILE)
++ChannelMatrix_LDADD = -lgtest $(LIBAUDIOFILE)
+
+ Error_SOURCES = Error.cpp TestUtilities.cpp TestUtilities.h
+-Error_LDADD = $(LIBGTEST) $(LIBAUDIOFILE)
++Error_LDADD = -lgtest $(LIBAUDIOFILE)
+
+ FloatToInt_SOURCES = FloatToInt.cpp TestUtilities.cpp TestUtilities.h
+-FloatToInt_LDADD = $(LIBGTEST) $(LIBAUDIOFILE)
++FloatToInt_LDADD = -lgtest $(LIBAUDIOFILE)
+
+ IntToFloat_SOURCES = IntToFloat.cpp TestUtilities.cpp TestUtilities.h
+-IntToFloat_LDADD = $(LIBGTEST) $(LIBAUDIOFILE)
++IntToFloat_LDADD = -lgtest $(LIBAUDIOFILE)
+
+ InvalidCompressionFormat_SOURCES = InvalidCompressionFormat.cpp TestUtilities.cpp TestUtilities.h
+-InvalidCompressionFormat_LDADD = $(LIBGTEST) $(LIBAUDIOFILE)
++InvalidCompressionFormat_LDADD = -lgtest $(LIBAUDIOFILE)
+
+ InvalidSampleFormat_SOURCES = InvalidSampleFormat.cpp TestUtilities.cpp TestUtilities.h
+-InvalidSampleFormat_LDADD = $(LIBGTEST) $(LIBAUDIOFILE)
++InvalidSampleFormat_LDADD = -lgtest $(LIBAUDIOFILE)
+
+ Large_SOURCES = Large.cpp TestUtilities.cpp TestUtilities.h
+-Large_LDADD = $(LIBGTEST) $(LIBAUDIOFILE)
++Large_LDADD = -lgtest $(LIBAUDIOFILE)
+
+ Loop_SOURCES = Loop.cpp TestUtilities.cpp TestUtilities.h
+-Loop_LDADD = $(LIBGTEST) $(LIBAUDIOFILE)
++Loop_LDADD = -lgtest $(LIBAUDIOFILE)
+
+ Marker_SOURCES = Marker.cpp TestUtilities.cpp TestUtilities.h
+-Marker_LDADD = $(LIBGTEST) $(LIBAUDIOFILE)
++Marker_LDADD = -lgtest $(LIBAUDIOFILE)
+
+ Miscellaneous_SOURCES = Miscellaneous.cpp TestUtilities.cpp TestUtilities.h
+-Miscellaneous_LDADD = $(LIBGTEST) $(LIBAUDIOFILE)
++Miscellaneous_LDADD = -lgtest $(LIBAUDIOFILE)
+
+ NeXT_SOURCES = NeXT.cpp TestUtilities.cpp TestUtilities.h
+-NeXT_LDADD = $(LIBGTEST) $(LIBAUDIOFILE)
++NeXT_LDADD = -lgtest $(LIBAUDIOFILE)
+
+ PCMData_SOURCES = PCMData.cpp TestUtilities.cpp TestUtilities.h
+-PCMData_LDADD = $(LIBGTEST) $(LIBAUDIOFILE)
++PCMData_LDADD = -lgtest $(LIBAUDIOFILE)
+
+ PCMMapping_SOURCES = PCMMapping.cpp TestUtilities.cpp TestUtilities.h
+-PCMMapping_LDADD = $(LIBGTEST) $(LIBAUDIOFILE)
++PCMMapping_LDADD = -lgtest $(LIBAUDIOFILE)
+
+ Pipe_SOURCES = Pipe.cpp TestUtilities.cpp TestUtilities.h
+-Pipe_LDADD = $(LIBGTEST) $(LIBAUDIOFILE)
++Pipe_LDADD = -lgtest $(LIBAUDIOFILE)
+
+ Query_SOURCES = Query.cpp TestUtilities.cpp TestUtilities.h
+-Query_LDADD = $(LIBGTEST) $(LIBAUDIOFILE)
++Query_LDADD = -lgtest $(LIBAUDIOFILE)
+
+ SampleFormat_SOURCES = SampleFormat.cpp TestUtilities.cpp TestUtilities.h
+-SampleFormat_LDADD = $(LIBGTEST) $(LIBAUDIOFILE)
++SampleFormat_LDADD = -lgtest $(LIBAUDIOFILE)
+
+ Seek_SOURCES = Seek.cpp TestUtilities.cpp TestUtilities.h
+-Seek_LDADD = $(LIBGTEST) $(LIBAUDIOFILE)
++Seek_LDADD = -lgtest $(LIBAUDIOFILE)
+
+ Sign_SOURCES = Sign.cpp TestUtilities.cpp TestUtilities.h
+-Sign_LDADD = $(LIBGTEST) $(LIBAUDIOFILE)
++Sign_LDADD = -lgtest $(LIBAUDIOFILE)
+
+ VirtualFile_SOURCES = VirtualFile.cpp TestUtilities.cpp TestUtilities.h
+-VirtualFile_LDADD = $(LIBGTEST) $(LIBAUDIOFILE)
++VirtualFile_LDADD = -lgtest $(LIBAUDIOFILE)
+
+ floatto24_SOURCES = floatto24.c TestUtilities.cpp TestUtilities.h
+
diff --git a/media-libs/audiofile/files/audiofile-0.3.6-system-gtest.patch b/media-libs/audiofile/files/audiofile-0.3.6-system-gtest.patch
new file mode 100644
index 000000000000..31e77e11271d
--- /dev/null
+++ b/media-libs/audiofile/files/audiofile-0.3.6-system-gtest.patch
@@ -0,0 +1,106 @@
+--- audiofile-0.3.6/test/Makefile.am
++++ audiofile-0.3.6/test/Makefile.am
+@@ -59,79 +59,77 @@
+
+ DEPENDENCIES = $(LIBAUDIOFILE)
+
+-LIBGTEST = ../gtest/libgtest.la
+-
+ ADPCM_SOURCES = ADPCM.cpp TestUtilities.cpp TestUtilities.h
+-ADPCM_LDADD = $(LIBGTEST) $(LIBAUDIOFILE)
++ADPCM_LDADD = -lgtest $(LIBAUDIOFILE)
+
+ AES_SOURCES = AES.cpp TestUtilities.cpp TestUtilities.h
+-AES_LDADD = $(LIBGTEST) $(LIBAUDIOFILE)
++AES_LDADD = -lgtest $(LIBAUDIOFILE)
+
+ ALAC_SOURCES = ALAC.cpp Lossless.h TestUtilities.cpp TestUtilities.h
+-ALAC_LDADD = $(LIBGTEST) $(LIBAUDIOFILE)
++ALAC_LDADD = -lgtest $(LIBAUDIOFILE)
+
+ ChannelMatrix_SOURCES = ChannelMatrix.cpp TestUtilities.cpp TestUtilities.h
+-ChannelMatrix_LDADD = $(LIBGTEST) $(LIBAUDIOFILE)
++ChannelMatrix_LDADD = -lgtest $(LIBAUDIOFILE)
+
+ Error_SOURCES = Error.cpp TestUtilities.cpp TestUtilities.h
+-Error_LDADD = $(LIBGTEST) $(LIBAUDIOFILE)
++Error_LDADD = -lgtest $(LIBAUDIOFILE)
+
+ FLAC_SOURCES = FLAC.cpp Lossless.h TestUtilities.cpp TestUtilities.h
+-FLAC_LDADD = $(LIBGTEST) $(LIBAUDIOFILE)
++FLAC_LDADD = -lgtest $(LIBAUDIOFILE)
+
+ FloatToInt_SOURCES = FloatToInt.cpp TestUtilities.cpp TestUtilities.h
+-FloatToInt_LDADD = $(LIBGTEST) $(LIBAUDIOFILE)
++FloatToInt_LDADD = -lgtest $(LIBAUDIOFILE)
+
+ Instrument_SOURCES = Instrument.cpp TestUtilities.cpp TestUtilities.h
+-Instrument_LDADD = $(LIBGTEST) $(LIBAUDIOFILE)
++Instrument_LDADD = -lgtest $(LIBAUDIOFILE)
+
+ IntToFloat_SOURCES = IntToFloat.cpp TestUtilities.cpp TestUtilities.h
+-IntToFloat_LDADD = $(LIBGTEST) $(LIBAUDIOFILE)
++IntToFloat_LDADD = -lgtest $(LIBAUDIOFILE)
+
+ InvalidCompressionFormat_SOURCES = InvalidCompressionFormat.cpp TestUtilities.cpp TestUtilities.h
+-InvalidCompressionFormat_LDADD = $(LIBGTEST) $(LIBAUDIOFILE)
++InvalidCompressionFormat_LDADD = -lgtest $(LIBAUDIOFILE)
+
+ InvalidSampleFormat_SOURCES = InvalidSampleFormat.cpp TestUtilities.cpp TestUtilities.h
+-InvalidSampleFormat_LDADD = $(LIBGTEST) $(LIBAUDIOFILE)
++InvalidSampleFormat_LDADD = -lgtest $(LIBAUDIOFILE)
+
+ Large_SOURCES = Large.cpp TestUtilities.cpp TestUtilities.h
+-Large_LDADD = $(LIBGTEST) $(LIBAUDIOFILE)
++Large_LDADD = -lgtest $(LIBAUDIOFILE)
+
+ Loop_SOURCES = Loop.cpp TestUtilities.cpp TestUtilities.h
+-Loop_LDADD = $(LIBGTEST) $(LIBAUDIOFILE)
++Loop_LDADD = -lgtest $(LIBAUDIOFILE)
+
+ Marker_SOURCES = Marker.cpp TestUtilities.cpp TestUtilities.h
+-Marker_LDADD = $(LIBGTEST) $(LIBAUDIOFILE)
++Marker_LDADD = -lgtest $(LIBAUDIOFILE)
+
+ Miscellaneous_SOURCES = Miscellaneous.cpp TestUtilities.cpp TestUtilities.h
+-Miscellaneous_LDADD = $(LIBGTEST) $(LIBAUDIOFILE)
++Miscellaneous_LDADD = -lgtest $(LIBAUDIOFILE)
+
+ NeXT_SOURCES = NeXT.cpp TestUtilities.cpp TestUtilities.h
+-NeXT_LDADD = $(LIBGTEST) $(LIBAUDIOFILE)
++NeXT_LDADD = -lgtest $(LIBAUDIOFILE)
+
+ PCMData_SOURCES = PCMData.cpp TestUtilities.cpp TestUtilities.h
+-PCMData_LDADD = $(LIBGTEST) $(LIBAUDIOFILE)
++PCMData_LDADD = -lgtest $(LIBAUDIOFILE)
+
+ PCMMapping_SOURCES = PCMMapping.cpp TestUtilities.cpp TestUtilities.h
+-PCMMapping_LDADD = $(LIBGTEST) $(LIBAUDIOFILE)
++PCMMapping_LDADD = -lgtest $(LIBAUDIOFILE)
+
+ Pipe_SOURCES = Pipe.cpp TestUtilities.cpp TestUtilities.h
+-Pipe_LDADD = $(LIBGTEST) $(LIBAUDIOFILE)
++Pipe_LDADD = -lgtest $(LIBAUDIOFILE)
+
+ Query_SOURCES = Query.cpp TestUtilities.cpp TestUtilities.h
+-Query_LDADD = $(LIBGTEST) $(LIBAUDIOFILE)
++Query_LDADD = -lgtest $(LIBAUDIOFILE)
+
+ SampleFormat_SOURCES = SampleFormat.cpp TestUtilities.cpp TestUtilities.h
+-SampleFormat_LDADD = $(LIBGTEST) $(LIBAUDIOFILE)
++SampleFormat_LDADD = -lgtest $(LIBAUDIOFILE)
+
+ Seek_SOURCES = Seek.cpp TestUtilities.cpp TestUtilities.h
+-Seek_LDADD = $(LIBGTEST) $(LIBAUDIOFILE)
++Seek_LDADD = -lgtest $(LIBAUDIOFILE)
+
+ Sign_SOURCES = Sign.cpp TestUtilities.cpp TestUtilities.h
+-Sign_LDADD = $(LIBGTEST) $(LIBAUDIOFILE)
++Sign_LDADD = -lgtest $(LIBAUDIOFILE)
+
+ VirtualFile_SOURCES = VirtualFile.cpp TestUtilities.cpp TestUtilities.h
+-VirtualFile_LDADD = $(LIBGTEST) $(LIBAUDIOFILE)
++VirtualFile_LDADD = -lgtest $(LIBAUDIOFILE)
+
+ floatto24_SOURCES = floatto24.c TestUtilities.cpp TestUtilities.h
+
diff --git a/media-libs/audiofile/metadata.xml b/media-libs/audiofile/metadata.xml
new file mode 100644
index 000000000000..b016c18b5446
--- /dev/null
+++ b/media-libs/audiofile/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>sound</herd>
+</pkgmetadata>
diff --git a/media-libs/avidemux-core/Manifest b/media-libs/avidemux-core/Manifest
new file mode 100644
index 000000000000..2938f2088ab6
--- /dev/null
+++ b/media-libs/avidemux-core/Manifest
@@ -0,0 +1,6 @@
+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-libs/avidemux-core/avidemux-core-2.6.2-r1.ebuild b/media-libs/avidemux-core/avidemux-core-2.6.2-r1.ebuild
new file mode 100644
index 000000000000..789884baae77
--- /dev/null
+++ b/media-libs/avidemux-core/avidemux-core-2.6.2-r1.ebuild
@@ -0,0 +1,117 @@
+# 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_PN="${PN/-core/}"
+MY_P="${MY_PN}_${PV}"
+
+DESCRIPTION="Core libraries for a video editor designed for simple cutting, filtering and encoding tasks"
+HOMEPAGE="http://fixounet.free.fr/avidemux"
+SRC_URI="mirror://sourceforge/${MY_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 sdl -system-ffmpeg vorbis truetype xvid x264 xv"
+
+RDEPEND="
+ !<media-video/avidemux-2.6.2-r1:${SLOT}
+ >=dev-lang/spidermonkey-1.5-r2:0
+ dev-libs/libxml2
+ media-libs/libpng
+ virtual/libiconv
+ aften? ( media-libs/aften )
+ alsa? ( >=media-libs/alsa-lib-1.0.3b-r2 )
+ amr? ( media-libs/opencore-amr )
+ dts? ( media-libs/libdca )
+ fontconfig? ( media-libs/fontconfig )
+ jack? (
+ media-sound/jack-audio-connection-kit
+ libsamplerate? ( media-libs/libsamplerate )
+ )
+ lame? ( media-sound/lame )
+ sdl? ( media-libs/libsdl )
+ system-ffmpeg? ( >=media-video/ffmpeg-1.0:0[aac,cpudetection,mp3,theora] )
+ truetype? ( >=media-libs/freetype-2.1.5 )
+ x264? ( media-libs/x264:= )
+ xv? ( x11-libs/libXv )
+ xvid? ( media-libs/xvid )
+ vorbis? ( media-libs/libvorbis )
+"
+DEPEND="
+ $RDEPEND
+ oss? ( virtual/os-headers )
+ nls? ( sys-devel/gettext )
+ virtual/pkgconfig
+"
+RDEPEND="
+ nls? ( virtual/libintl:0 )
+ $RDEPEND
+"
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ default
+
+ # Preparations to support the system ffmpeg.
+ if use system-ffmpeg ; then
+ rm -rf cmake/admFFmpeg* cmake/ffmpeg* avidemux_core/ffmpeg_package buildCore/ffmpeg || die "Failed to remove ffmpeg."
+
+ sed -i -e 's/include(admFFmpegUtil)//g' avidemux/commonCmakeApplication.cmake || die "Failed to remove ffmpeg."
+ sed -i -e '/registerFFmpeg/d' avidemux/commonCmakeApplication.cmake || die "Failed to remove ffmpeg."
+ sed -i -e 's/include(admFFmpegBuild)//g' avidemux_core/CMakeLists.txt || die "Failed to remove ffmpeg."
+ fi
+
+ # Avoid existing avidemux installations from making the build process fail, bug #461496.
+ sed -i -e "s:getFfmpegLibNames(\"\${sourceDir}\"):getFfmpegLibNames(\"${S}/buildCore/ffmpeg/source/\"):g" cmake/admFFmpegUtil.cmake || die "Failed to avoid existing avidemux installation from making the build fail."
+}
+
+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"
+
+ mkdir "${S}"/buildCore || die "Can't creante build folder."
+ cd "${S}"/buildCore || die "Can't enter build folder."
+
+ cmake -DAVIDEMUX_SOURCE_DIR="${S}" \
+ -DCMAKE_INSTALL_PREFIX="/usr" \
+ ${mycmakeargs} -G "Unix Makefiles" ../"avidemux_core${POSTFIX}/" || die "cmake failed."
+}
+
+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
+
+ # TODO: Report -j1 problem upstream, seems to be within ffmpeg code.
+ cd "${S}"/buildCore || die "Can't enter build folder."
+ emake -j1 CC="$(tc-getCC)" CXX="$(tc-getCXX)"
+}
+
+src_install() {
+ # TODO: Report -j1 problem upstream, seems to be within ffmpeg code.
+ cd "${S}"/buildCore || die "Can't enter build folder."
+ emake DESTDIR="${ED}" -j1 install
+
+ dodoc "${S}"/{AUTHORS,README}
+}
diff --git a/media-libs/avidemux-core/avidemux-core-2.6.3.ebuild b/media-libs/avidemux-core/avidemux-core-2.6.3.ebuild
new file mode 100644
index 000000000000..a630a9f11721
--- /dev/null
+++ b/media-libs/avidemux-core/avidemux-core-2.6.3.ebuild
@@ -0,0 +1,100 @@
+# 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_PN="${PN/-core/}"
+MY_P="${MY_PN}_${PV}"
+
+DESCRIPTION="Core libraries for a video editor designed for simple cutting, filtering and encoding tasks"
+HOMEPAGE="http://fixounet.free.fr/avidemux"
+SRC_URI="mirror://sourceforge/${MY_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 nls sdl system-ffmpeg vdpau xv"
+
+DEPEND="
+ !<media-video/avidemux-${PV}:${SLOT}
+ dev-db/sqlite
+ sdl? ( media-libs/libsdl )
+ system-ffmpeg? ( >=media-video/ffmpeg-1.0:0[aac,cpudetection,mp3,theora] )
+ xv? ( x11-libs/libXv )
+ vdpau? ( x11-libs/libvdpau )
+"
+RDEPEND="
+ nls? ( virtual/libintl:0 )
+ $DEPEND
+"
+DEPEND="
+ $DEPEND
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ !system-ffmpeg? ( dev-lang/yasm[nls=] )
+"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ default
+
+ if use system-ffmpeg ; then
+ # Preparations to support the system ffmpeg. Currently fails because it depends on files the system ffmpeg doesn't install.
+ rm -rf cmake/admFFmpeg* cmake/ffmpeg* avidemux_core/ffmpeg_package buildCore/ffmpeg || die "Failed to remove ffmpeg."
+
+ sed -i -e 's/include(admFFmpegUtil)//g' avidemux/commonCmakeApplication.cmake || die "Failed to remove ffmpeg."
+ sed -i -e '/registerFFmpeg/d' avidemux/commonCmakeApplication.cmake || die "Failed to remove ffmpeg."
+ sed -i -e 's/include(admFFmpegBuild)//g' avidemux_core/CMakeLists.txt || die "Failed to remove ffmpeg."
+ else
+ # Avoid existing avidemux installations from making the build process fail, bug #461496.
+ sed -i -e "s:getFfmpegLibNames(\"\${sourceDir}\"):getFfmpegLibNames(\"${S}/buildCore/ffmpeg/source/\"):g" cmake/admFFmpegUtil.cmake || die "Failed to avoid existing avidemux installation from making the build fail."
+ fi
+
+}
+
+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"
+
+ mkdir "${S}"/buildCore || die "Can't create build folder."
+ cd "${S}"/buildCore || die "Can't enter build folder."
+
+ cmake -DAVIDEMUX_SOURCE_DIR="${S}" \
+ -DCMAKE_INSTALL_PREFIX="/usr" \
+ ${mycmakeargs} -G "Unix Makefiles" ../"avidemux_core${POSTFIX}/" || die "cmake failed."
+}
+
+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
+
+ # TODO: Report -j1 problem upstream, seems to be within ffmpeg code.
+ cd "${S}"/buildCore || die "Can't enter build folder."
+ emake -j1 CC="$(tc-getCC)" CXX="$(tc-getCXX)"
+}
+
+src_install() {
+ # TODO: Report -j1 problem upstream, seems to be within ffmpeg code.
+ cd "${S}"/buildCore || die "Can't enter build folder."
+ emake DESTDIR="${ED}" -j1 install
+
+ dodoc "${S}"/{AUTHORS,README}
+}
diff --git a/media-libs/avidemux-core/avidemux-core-2.6.4.ebuild b/media-libs/avidemux-core/avidemux-core-2.6.4.ebuild
new file mode 100644
index 000000000000..5afad85ed784
--- /dev/null
+++ b/media-libs/avidemux-core/avidemux-core-2.6.4.ebuild
@@ -0,0 +1,99 @@
+# 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_PN="${PN/-core/}"
+MY_P="${MY_PN}_${PV}"
+
+DESCRIPTION="Core libraries for a video editor designed for simple cutting, filtering and encoding tasks"
+HOMEPAGE="http://fixounet.free.fr/avidemux"
+SRC_URI="mirror://sourceforge/${MY_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 nls sdl system-ffmpeg vdpau xv"
+
+DEPEND="
+ !<media-video/avidemux-${PV}:${SLOT}
+ dev-db/sqlite
+ sdl? ( media-libs/libsdl )
+ system-ffmpeg? ( >=media-video/ffmpeg-1.0:0[aac,cpudetection,mp3,theora] )
+ xv? ( x11-libs/libXv )
+ vdpau? ( x11-libs/libvdpau )
+"
+RDEPEND="
+ nls? ( virtual/libintl:0 )
+ $DEPEND
+"
+DEPEND="
+ $DEPEND
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ !system-ffmpeg? ( dev-lang/yasm[nls=] )
+"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ default
+
+ if use system-ffmpeg ; then
+ # Preparations to support the system ffmpeg. Currently fails because it depends on files the system ffmpeg doesn't install.
+ rm -rf cmake/admFFmpeg* cmake/ffmpeg* avidemux_core/ffmpeg_package buildCore/ffmpeg || die "Failed to remove ffmpeg."
+
+ sed -i -e 's/include(admFFmpegUtil)//g' avidemux/commonCmakeApplication.cmake || die "Failed to remove ffmpeg."
+ sed -i -e '/registerFFmpeg/d' avidemux/commonCmakeApplication.cmake || die "Failed to remove ffmpeg."
+ sed -i -e 's/include(admFFmpegBuild)//g' avidemux_core/CMakeLists.txt || die "Failed to remove ffmpeg."
+ else
+ # Avoid existing avidemux installations from making the build process fail, bug #461496.
+ sed -i -e "s:getFfmpegLibNames(\"\${sourceDir}\"):getFfmpegLibNames(\"${S}/buildCore/ffmpeg/source/\"):g" cmake/admFFmpegUtil.cmake || die "Failed to avoid existing avidemux installation from making the build fail."
+ fi
+}
+
+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
+
+ local build="${S}"/buildCore
+ mkdir ${build} || die "Can't create build folder."
+ cd ${build} || die "Can't enter build folder."
+ CMAKE_USE_DIR="${S}"/avidemux_core BUILD_DIR=${build} cmake-utils_src_configure
+}
+
+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
+
+ # TODO: Report -j1 problem upstream, seems to be within ffmpeg code.
+ cd "${S}"/buildCore || die "Can't enter build folder."
+ emake -j1 CC="$(tc-getCC)" CXX="$(tc-getCXX)"
+}
+
+src_install() {
+ # TODO: Report -j1 problem upstream, seems to be within ffmpeg code.
+ cd "${S}"/buildCore || die "Can't enter build folder."
+ emake DESTDIR="${ED}" -j1 install
+
+ dodoc "${S}"/{AUTHORS,README}
+}
diff --git a/media-libs/avidemux-core/avidemux-core-2.6.5.ebuild b/media-libs/avidemux-core/avidemux-core-2.6.5.ebuild
new file mode 100644
index 000000000000..43228d533947
--- /dev/null
+++ b/media-libs/avidemux-core/avidemux-core-2.6.5.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit cmake-utils eutils flag-o-matic
+
+SLOT="2.6"
+
+DESCRIPTION="Core libraries for a video editor designed for simple cutting, filtering and encoding tasks"
+HOMEPAGE="http://fixounet.free.fr/avidemux"
+
+# Multiple licenses because of all the bundled stuff.
+LICENSE="GPL-1 GPL-2 MIT PSF-2 public-domain"
+IUSE="debug nls sdl system-ffmpeg vaapi vdpau video_cards_fglrx xv"
+KEYWORDS="~amd64 ~x86"
+
+MY_PN="${PN/-core/}"
+if [[ ${PV} == *9999* ]] ; then
+ KEYWORDS=""
+ EGIT_REPO_URI="git://gitorious.org/${MY_PN}2-6/${MY_PN}2-6.git https://git.gitorious.org/${MY_PN}2-6/${MY_PN}2-6.git"
+
+ inherit git-2
+else
+ MY_P="${MY_PN}_${PV}"
+ SRC_URI="mirror://sourceforge/${MY_PN}/${PV}/${MY_P}.tar.gz"
+fi
+
+# Trying to use virtual; ffmpeg misses aac,cpudetection USE flags now though, are they needed?
+DEPEND="
+ !<media-video/avidemux-${PV}:${SLOT}
+ dev-db/sqlite:3
+ sdl? ( media-libs/libsdl:0 )
+ system-ffmpeg? ( >=virtual/ffmpeg-9:0[mp3,theora] )
+ xv? ( x11-libs/libXv:0 )
+ vaapi? ( x11-libs/libva:0 )
+ vdpau? ( x11-libs/libvdpau:0 )
+ video_cards_fglrx? (
+ || ( >=x11-drivers/ati-drivers-14.12-r3
+ x11-libs/xvba-video:0 )
+ )"
+RDEPEND="
+ nls? ( virtual/libintl:0 )
+ $DEPEND
+"
+DEPEND="
+ $DEPEND
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ !system-ffmpeg? ( dev-lang/yasm[nls=] )
+"
+
+S="${WORKDIR}/${MY_P}"
+BUILD_DIR="${S}/buildCore"
+
+DOCS=( AUTHORS README )
+
+src_prepare() {
+ mkdir "${BUILD_DIR}" || die "Can't create build folder."
+
+ cmake-utils_src_prepare
+
+ if use system-ffmpeg ; then
+ # Preparations to support the system ffmpeg. Currently fails because it depends on files the system ffmpeg doesn't install.
+ local error="Failed to remove ffmpeg."
+
+ rm -rf cmake/admFFmpeg* cmake/ffmpeg* avidemux_core/ffmpeg_package buildCore/ffmpeg || die "${error}"
+ sed -i -e 's/include(admFFmpegUtil)//g' avidemux/commonCmakeApplication.cmake || die "${error}"
+ sed -i -e '/registerFFmpeg/d' avidemux/commonCmakeApplication.cmake || die "${error}"
+ sed -i -e 's/include(admFFmpegBuild)//g' avidemux_core/CMakeLists.txt || die "${error}"
+ else
+ # Avoid existing avidemux installations from making the build process fail, bug #461496.
+ sed -i -e "s:getFfmpegLibNames(\"\${sourceDir}\"):getFfmpegLibNames(\"${S}/buildCore/ffmpeg/source/\"):g" cmake/admFFmpegUtil.cmake \
+ || die "Failed to avoid existing avidemux installation from making the build fail."
+ fi
+
+ # 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_configure() {
+ local mycmakeargs="
+ -DAVIDEMUX_SOURCE_DIR='${S}'
+ $(cmake-utils_use nls GETTEXT)
+ $(cmake-utils_use sdl SDL)
+ $(cmake-utils_use vaapi LIBVA)
+ $(cmake-utils_use vdpau 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
+
+ CMAKE_USE_DIR="${S}"/avidemux_core cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile -j1
+}
+
+src_install() {
+ cmake-utils_src_install -j1
+}
diff --git a/media-libs/avidemux-core/avidemux-core-2.6.7.ebuild b/media-libs/avidemux-core/avidemux-core-2.6.7.ebuild
new file mode 100644
index 000000000000..29a9ee642920
--- /dev/null
+++ b/media-libs/avidemux-core/avidemux-core-2.6.7.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit cmake-utils eutils flag-o-matic
+
+SLOT="2.6"
+
+DESCRIPTION="Core libraries for a video editor designed for simple cutting, filtering and encoding tasks"
+HOMEPAGE="http://fixounet.free.fr/avidemux"
+
+# Multiple licenses because of all the bundled stuff.
+LICENSE="GPL-1 GPL-2 MIT PSF-2 public-domain"
+IUSE="debug nls sdl system-ffmpeg vaapi vdpau video_cards_fglrx xv"
+KEYWORDS="~amd64 ~x86"
+
+MY_PN="${PN/-core/}"
+if [[ ${PV} == *9999* ]] ; then
+ KEYWORDS=""
+ EGIT_REPO_URI="git://gitorious.org/${MY_PN}2-6/${MY_PN}2-6.git https://git.gitorious.org/${MY_PN}2-6/${MY_PN}2-6.git"
+
+ inherit git-2
+else
+ MY_P="${MY_PN}_${PV}"
+ SRC_URI="mirror://sourceforge/${MY_PN}/${MY_PN}/${PV}/${MY_P}.tar.gz"
+fi
+
+# Trying to use virtual; ffmpeg misses aac,cpudetection USE flags now though, are they needed?
+DEPEND="
+ !<media-video/avidemux-${PV}:${SLOT}
+ dev-db/sqlite:3
+ sdl? ( media-libs/libsdl:0 )
+ system-ffmpeg? ( >=virtual/ffmpeg-9:0[mp3,theora] )
+ xv? ( x11-libs/libXv:0 )
+ vaapi? ( x11-libs/libva:0 )
+ vdpau? ( x11-libs/libvdpau:0 )
+ video_cards_fglrx? (
+ || ( >=x11-drivers/ati-drivers-14.12-r3
+ x11-libs/xvba-video:0 )
+ )"
+RDEPEND="
+ nls? ( virtual/libintl:0 )
+ $DEPEND
+"
+DEPEND="
+ $DEPEND
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ !system-ffmpeg? ( dev-lang/yasm[nls=] )
+"
+
+S="${WORKDIR}/${MY_P}"
+BUILD_DIR="${S}/buildCore"
+
+DOCS=( AUTHORS README )
+
+src_prepare() {
+ mkdir "${BUILD_DIR}" || die "Can't create build folder."
+
+ cmake-utils_src_prepare
+
+ if use system-ffmpeg ; then
+ # Preparations to support the system ffmpeg. Currently fails because it depends on files the system ffmpeg doesn't install.
+ local error="Failed to remove ffmpeg."
+
+ rm -rf cmake/admFFmpeg* cmake/ffmpeg* avidemux_core/ffmpeg_package buildCore/ffmpeg || die "${error}"
+ sed -i -e 's/include(admFFmpegUtil)//g' avidemux/commonCmakeApplication.cmake || die "${error}"
+ sed -i -e '/registerFFmpeg/d' avidemux/commonCmakeApplication.cmake || die "${error}"
+ sed -i -e 's/include(admFFmpegBuild)//g' avidemux_core/CMakeLists.txt || die "${error}"
+ else
+ # Avoid existing avidemux installations from making the build process fail, bug #461496.
+ sed -i -e "s:getFfmpegLibNames(\"\${sourceDir}\"):getFfmpegLibNames(\"${S}/buildCore/ffmpeg/source/\"):g" cmake/admFFmpegUtil.cmake \
+ || die "Failed to avoid existing avidemux installation from making the build fail."
+ fi
+
+ # 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_configure() {
+ local mycmakeargs="
+ -DAVIDEMUX_SOURCE_DIR='${S}'
+ $(cmake-utils_use nls GETTEXT)
+ $(cmake-utils_use sdl SDL)
+ $(cmake-utils_use vaapi LIBVA)
+ $(cmake-utils_use vdpau 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
+
+ CMAKE_USE_DIR="${S}"/avidemux_core cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile -j1
+}
+
+src_install() {
+ cmake-utils_src_install -j1
+}
diff --git a/media-libs/avidemux-core/avidemux-core-2.6.8.ebuild b/media-libs/avidemux-core/avidemux-core-2.6.8.ebuild
new file mode 100644
index 000000000000..6bef74cc3bc2
--- /dev/null
+++ b/media-libs/avidemux-core/avidemux-core-2.6.8.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit cmake-utils eutils flag-o-matic
+
+SLOT="2.6"
+
+DESCRIPTION="Core libraries for a video editor designed for simple cutting, filtering and encoding tasks"
+HOMEPAGE="http://fixounet.free.fr/avidemux"
+
+# Multiple licenses because of all the bundled stuff.
+LICENSE="GPL-1 GPL-2 MIT PSF-2 public-domain"
+IUSE="debug nls sdl system-ffmpeg vaapi vdpau video_cards_fglrx xv"
+KEYWORDS="~amd64 ~x86"
+
+MY_PN="${PN/-core/}"
+if [[ ${PV} == *9999* ]] ; then
+ KEYWORDS=""
+ EGIT_REPO_URI="git://gitorious.org/${MY_PN}2-6/${MY_PN}2-6.git https://git.gitorious.org/${MY_PN}2-6/${MY_PN}2-6.git"
+
+ inherit git-2
+else
+ MY_P="${MY_PN}_${PV}"
+ SRC_URI="mirror://sourceforge/${MY_PN}/${MY_PN}/${PV}/${MY_P}.tar.gz"
+fi
+
+# Trying to use virtual; ffmpeg misses aac,cpudetection USE flags now though, are they needed?
+DEPEND="
+ !<media-video/avidemux-${PV}:${SLOT}
+ dev-db/sqlite:3
+ sdl? ( media-libs/libsdl:0 )
+ system-ffmpeg? ( >=virtual/ffmpeg-9:0[mp3,theora] )
+ xv? ( x11-libs/libXv:0 )
+ vaapi? ( x11-libs/libva:0 )
+ vdpau? ( x11-libs/libvdpau:0 )
+ video_cards_fglrx? (
+ || ( >=x11-drivers/ati-drivers-14.12-r3
+ x11-libs/xvba-video:0 )
+ )"
+RDEPEND="
+ $DEPEND
+ nls? ( virtual/libintl:0 )
+"
+DEPEND="
+ $DEPEND
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ !system-ffmpeg? ( dev-lang/yasm[nls=] )
+"
+
+S="${WORKDIR}/${MY_P}"
+BUILD_DIR="${S}/buildCore"
+
+DOCS=( AUTHORS README )
+
+src_prepare() {
+ mkdir "${BUILD_DIR}" || die "Can't create build folder."
+
+ cmake-utils_src_prepare
+
+ if use system-ffmpeg ; then
+ # Preparations to support the system ffmpeg. Currently fails because it depends on files the system ffmpeg doesn't install.
+ local error="Failed to remove ffmpeg."
+
+ rm -rf cmake/admFFmpeg* cmake/ffmpeg* avidemux_core/ffmpeg_package buildCore/ffmpeg || die "${error}"
+ sed -i -e 's/include(admFFmpegUtil)//g' avidemux/commonCmakeApplication.cmake || die "${error}"
+ sed -i -e '/registerFFmpeg/d' avidemux/commonCmakeApplication.cmake || die "${error}"
+ sed -i -e 's/include(admFFmpegBuild)//g' avidemux_core/CMakeLists.txt || die "${error}"
+ else
+ # Avoid existing avidemux installations from making the build process fail, bug #461496.
+ sed -i -e "s:getFfmpegLibNames(\"\${sourceDir}\"):getFfmpegLibNames(\"${S}/buildCore/ffmpeg/source/\"):g" cmake/admFFmpegUtil.cmake \
+ || die "Failed to avoid existing avidemux installation from making the build fail."
+ fi
+
+ # 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_configure() {
+ local mycmakeargs="
+ -DAVIDEMUX_SOURCE_DIR='${S}'
+ $(cmake-utils_use nls GETTEXT)
+ $(cmake-utils_use sdl SDL)
+ $(cmake-utils_use vaapi LIBVA)
+ $(cmake-utils_use vdpau 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
+
+ CMAKE_USE_DIR="${S}"/avidemux_core cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile -j1
+}
+
+src_install() {
+ cmake-utils_src_install -j1
+}
diff --git a/media-libs/avidemux-core/avidemux-core-9999.ebuild b/media-libs/avidemux-core/avidemux-core-9999.ebuild
new file mode 100644
index 000000000000..f3cbfa38fd3e
--- /dev/null
+++ b/media-libs/avidemux-core/avidemux-core-9999.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit cmake-utils eutils flag-o-matic
+
+SLOT="2.6"
+
+DESCRIPTION="Core libraries for a video editor designed for simple cutting, filtering and encoding tasks"
+HOMEPAGE="http://fixounet.free.fr/avidemux"
+
+# Multiple licenses because of all the bundled stuff.
+LICENSE="GPL-1 GPL-2 MIT PSF-2 public-domain"
+IUSE="debug nls sdl system-ffmpeg vaapi vdpau video_cards_fglrx xv"
+KEYWORDS="~amd64 ~x86"
+
+MY_PN="${PN/-core/}"
+if [[ ${PV} == *9999* ]] ; then
+ KEYWORDS=""
+ EGIT_REPO_URI="git://gitorious.org/${MY_PN}2-6/${MY_PN}2-6.git https://git.gitorious.org/${MY_PN}2-6/${MY_PN}2-6.git"
+
+ inherit git-2
+else
+ MY_P="${MY_PN}_${PV}"
+ SRC_URI="mirror://sourceforge/${MY_PN}/${MY_PN}/${PV}/${MY_P}.tar.gz"
+fi
+
+# Trying to use virtual; ffmpeg misses aac,cpudetection USE flags now though, are they needed?
+DEPEND="
+ !<media-video/avidemux-${PV}:${SLOT}
+ dev-db/sqlite:3
+ sdl? ( media-libs/libsdl:0 )
+ system-ffmpeg? ( >=virtual/ffmpeg-9:0[mp3,theora] )
+ xv? ( x11-libs/libXv:0 )
+ vaapi? ( x11-libs/libva:0 )
+ vdpau? ( x11-libs/libvdpau:0 )
+ video_cards_fglrx? (
+ || ( >=x11-drivers/ati-drivers-14.12-r3
+ x11-libs/xvba-video:0 )
+ )
+"
+RDEPEND="
+ $DEPEND
+ nls? ( virtual/libintl:0 )
+"
+DEPEND="
+ $DEPEND
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ !system-ffmpeg? ( dev-lang/yasm[nls=] )
+"
+
+S="${WORKDIR}/${MY_P}"
+BUILD_DIR="${S}/buildCore"
+
+DOCS=( AUTHORS README )
+
+src_prepare() {
+ mkdir "${BUILD_DIR}" || die "Can't create build folder."
+
+ cmake-utils_src_prepare
+
+ if use system-ffmpeg ; then
+ # Preparations to support the system ffmpeg. Currently fails because it depends on files the system ffmpeg doesn't install.
+ local error="Failed to remove ffmpeg."
+
+ rm -rf cmake/admFFmpeg* cmake/ffmpeg* avidemux_core/ffmpeg_package buildCore/ffmpeg || die "${error}"
+ sed -i -e 's/include(admFFmpegUtil)//g' avidemux/commonCmakeApplication.cmake || die "${error}"
+ sed -i -e '/registerFFmpeg/d' avidemux/commonCmakeApplication.cmake || die "${error}"
+ sed -i -e 's/include(admFFmpegBuild)//g' avidemux_core/CMakeLists.txt || die "${error}"
+ else
+ # Avoid existing avidemux installations from making the build process fail, bug #461496.
+ sed -i -e "s:getFfmpegLibNames(\"\${sourceDir}\"):getFfmpegLibNames(\"${S}/buildCore/ffmpeg/source/\"):g" cmake/admFFmpegUtil.cmake \
+ || die "Failed to avoid existing avidemux installation from making the build fail."
+ fi
+
+ # 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_configure() {
+ local mycmakeargs="
+ -DAVIDEMUX_SOURCE_DIR='${S}'
+ $(cmake-utils_use nls GETTEXT)
+ $(cmake-utils_use sdl SDL)
+ $(cmake-utils_use vaapi LIBVA)
+ $(cmake-utils_use vdpau 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
+
+ CMAKE_USE_DIR="${S}"/avidemux_core cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile -j1
+}
+
+src_install() {
+ cmake-utils_src_install -j1
+}
diff --git a/media-libs/avidemux-core/metadata.xml b/media-libs/avidemux-core/metadata.xml
new file mode 100644
index 000000000000..eca3d560ed57
--- /dev/null
+++ b/media-libs/avidemux-core/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="system-ffmpeg">Use the ffmpeg provided by the system.</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">avidemux</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/avidemux-plugins/Manifest b/media-libs/avidemux-plugins/Manifest
new file mode 100644
index 000000000000..2938f2088ab6
--- /dev/null
+++ b/media-libs/avidemux-plugins/Manifest
@@ -0,0 +1,6 @@
+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-libs/avidemux-plugins/avidemux-plugins-2.6.2-r2.ebuild b/media-libs/avidemux-plugins/avidemux-plugins-2.6.2-r2.ebuild
new file mode 100644
index 000000000000..826b43575a6f
--- /dev/null
+++ b/media-libs/avidemux-plugins/avidemux-plugins-2.6.2-r2.ebuild
@@ -0,0 +1,93 @@
+# 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_PN="${PN/-plugins/}"
+MY_P="${MY_PN}_${PV}"
+
+DESCRIPTION="Plugins for avidemux; a video editor designed for simple cutting, filtering and encoding tasks"
+HOMEPAGE="http://fixounet.free.fr/avidemux"
+SRC_URI="mirror://sourceforge/${MY_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 and avidemux into here.
+RDEPEND="=media-video/avidemux-${PV}-r1"
+DEPEND="$RDEPEND"
+
+S="${WORKDIR}/${MY_P}"
+
+PROCESSES="buildPluginsCommon:avidemux_plugins
+ buildPluginsCLI:avidemux_plugins"
+
+use qt4 && PROCESSES+=" buildPluginsQt4:avidemux_plugins"
+
+src_configure() {
+ local x mycmakeargs plugin_ui
+
+ 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."
+
+ if [[ "${SOURCE}" == "buildPluginsCommon" ]] ; then
+ plugin_ui="-DPLUGIN_UI=COMMON"
+ elif [[ "${SOURCE}" == "buildPluginsCLI" ]] ; then
+ plugin_ui="-DPLUGIN_UI=CLI"
+ elif [[ "${SOURCE}" == "buildPluginsQt4" ]] ; then
+ plugin_ui="-DPLUGIN_UI=QT4"
+ fi
+
+ cmake -DAVIDEMUX_SOURCE_DIR="${S}" \
+ -DCMAKE_INSTALL_PREFIX="/usr" \
+ ${mycmakeargs} ${plugin_ui} -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
+}
diff --git a/media-libs/avidemux-plugins/avidemux-plugins-2.6.3.ebuild b/media-libs/avidemux-plugins/avidemux-plugins-2.6.3.ebuild
new file mode 100644
index 000000000000..11ad3908e719
--- /dev/null
+++ b/media-libs/avidemux-plugins/avidemux-plugins-2.6.3.ebuild
@@ -0,0 +1,126 @@
+# 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_PN="${PN/-plugins/}"
+MY_P="${MY_PN}_${PV}"
+
+DESCRIPTION="Plugins for avidemux; a video editor designed for simple cutting, filtering and encoding tasks"
+HOMEPAGE="http://fixounet.free.fr/avidemux"
+SRC_URI="mirror://sourceforge/${MY_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 faac faad fontconfig fribidi jack lame libsamplerate cpu_flags_x86_mmx opengl oss qt4 vorbis truetype twolame xvid x264 vpx"
+
+DEPEND="
+ =media-video/avidemux-${PV}[opengl?,qt4?]
+ >=dev-lang/spidermonkey-1.5-r2:0
+ dev-libs/libxml2
+ media-libs/libpng
+ virtual/libiconv
+ aften? ( media-libs/aften )
+ alsa? ( >=media-libs/alsa-lib-1.0.3b-r2 )
+ amr? ( media-libs/opencore-amr )
+ dts? ( media-libs/libdca )
+ faac? ( media-libs/faac )
+ faad? ( media-libs/faad2 )
+ fontconfig? ( media-libs/fontconfig )
+ fribidi? ( dev-libs/fribidi )
+ jack? (
+ media-sound/jack-audio-connection-kit
+ libsamplerate? ( media-libs/libsamplerate )
+ )
+ lame? ( media-sound/lame )
+ oss? ( virtual/os-headers )
+ truetype? ( >=media-libs/freetype-2.1.5 )
+ twolame? ( media-sound/twolame )
+ x264? ( media-libs/x264:= )
+ xvid? ( media-libs/xvid )
+ vorbis? ( media-libs/libvorbis )
+ vpx? ( media-libs/libvpx )
+"
+RDEPEND="$DEPEND"
+
+S="${WORKDIR}/${MY_P}"
+
+PROCESSES="buildPluginsCommon:avidemux_plugins
+ buildPluginsCLI:avidemux_plugins"
+
+use qt4 && PROCESSES+=" buildPluginsQt4:avidemux_plugins"
+
+src_configure() {
+ local x mycmakeargs plugin_ui extra_mycmakeargs
+
+ mycmakeargs="
+ $(cmake-utils_use fontconfig FONTCONFIG)
+ $(cmake-utils_use truetype FREETYPE2)
+ $(cmake-utils_use x264 X264)
+ "
+
+ 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."
+
+ if [[ "${SOURCE}" == "buildPluginsCommon" ]] ; then
+ plugin_ui="-DPLUGIN_UI=COMMON"
+
+ extra_mycmakeargs="
+ $(cmake-utils_use amr OPENCORE_AMRWB)
+ $(cmake-utils_use amr OPENCORE_AMRNB)
+ $(cmake-utils_use dts LIBDCA)
+ $(cmake-utils_use faad FAAD)
+ $(cmake-utils_use jack JACK)
+ $(cmake-utils_use vorbis VORBIS)
+ "
+ elif [[ "${SOURCE}" == "buildPluginsCLI" ]] ; then
+ plugin_ui="-DPLUGIN_UI=CLI"
+ extra_mycmakeargs=""
+ elif [[ "${SOURCE}" == "buildPluginsQt4" ]] ; then
+ plugin_ui="-DPLUGIN_UI=QT4"
+ extra_mycmakeargs=""
+ fi
+
+ cmake -DAVIDEMUX_SOURCE_DIR="${S}" \
+ -DCMAKE_INSTALL_PREFIX="/usr" \
+ ${mycmakeargs} ${extra_mycmakeargs} ${plugin_ui} -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
+}
diff --git a/media-libs/avidemux-plugins/avidemux-plugins-2.6.4-r1.ebuild b/media-libs/avidemux-plugins/avidemux-plugins-2.6.4-r1.ebuild
new file mode 100644
index 000000000000..faebc53dfe5d
--- /dev/null
+++ b/media-libs/avidemux-plugins/avidemux-plugins-2.6.4-r1.ebuild
@@ -0,0 +1,141 @@
+# 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_PN="${PN/-plugins/}"
+MY_P="${MY_PN}_${PV}"
+
+DESCRIPTION="Plugins for avidemux; a video editor designed for simple cutting, filtering and encoding tasks"
+HOMEPAGE="http://fixounet.free.fr/avidemux"
+SRC_URI="mirror://sourceforge/${MY_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="aac aften a52 alsa amr debug dts fontconfig fribidi jack lame libsamplerate cpu_flags_x86_mmx opengl oss pulseaudio qt4 vorbis truetype twolame xv xvid x264 vpx"
+
+DEPEND="
+ ~media-video/avidemux-${PV}[opengl?,qt4?]
+ >=dev-lang/spidermonkey-1.5-r2:0
+ dev-libs/libxml2
+ media-libs/libpng
+ virtual/libiconv
+ aac? (
+ media-libs/faac
+ media-libs/faad2
+ )
+ aften? ( media-libs/aften )
+ alsa? ( >=media-libs/alsa-lib-1.0.3b-r2 )
+ amr? ( media-libs/opencore-amr )
+ dts? ( media-libs/libdca )
+ fontconfig? ( media-libs/fontconfig )
+ fribidi? ( dev-libs/fribidi )
+ jack? (
+ media-sound/jack-audio-connection-kit
+ libsamplerate? ( media-libs/libsamplerate )
+ )
+ lame? ( media-sound/lame )
+ oss? ( virtual/os-headers )
+ pulseaudio? ( media-sound/pulseaudio )
+ truetype? ( media-libs/freetype:2 )
+ twolame? ( media-sound/twolame )
+ x264? ( media-libs/x264:= )
+ xv? (
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXv
+ )
+ xvid? ( media-libs/xvid )
+ vorbis? ( media-libs/libvorbis )
+ vpx? ( media-libs/libvpx )
+"
+RDEPEND="$DEPEND"
+
+S="${WORKDIR}/${MY_P}"
+
+processes="buildPluginsCommon:avidemux_plugins
+ buildPluginsCLI:avidemux_plugins"
+
+use qt4 && processes+=" buildPluginsQt4:avidemux_plugins"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-optional-pulse.patch
+}
+
+src_configure() {
+ for process in ${processes} ; do
+ local mycmakeargs="
+ -DAVIDEMUX_SOURCE_DIR='${S}'
+ -DCMAKE_INSTALL_PREFIX='/usr'
+ $(cmake-utils_use aac FAAC)
+ $(cmake-utils_use aac FAAD)
+ $(cmake-utils_use alsa)
+ $(cmake-utils_use aften)
+ $(cmake-utils_use amr OPENCORE_AMRWB)
+ $(cmake-utils_use amr OPENCORE_AMRNB)
+ $(cmake-utils_use dts LIBDCA)
+ $(cmake-utils_use fontconfig)
+ $(cmake-utils_use jack)
+ $(cmake-utils_use lame)
+ $(cmake-utils_use oss)
+ $(cmake-utils_use pulseaudio PULSEAUDIOSIMPLE)
+ $(cmake-utils_use qt4)
+ $(cmake-utils_use truetype FREETYPE2)
+ $(cmake-utils_use twolame)
+ $(cmake-utils_use x264)
+ $(cmake-utils_use xv XVIDEO)
+ $(cmake-utils_use xvid)
+ $(cmake-utils_use vorbis)
+ $(cmake-utils_use vorbis LIBVORBIS)
+ $(cmake-utils_use vpx VPXDEC)
+ "
+
+ if use debug ; then
+ mycmakeargs+=" -DVERBOSE=1 -DCMAKE_BUILD_TYPE=Debug"
+ fi
+
+ local build="${process%%:*}"
+
+ if [[ "${build}" == "buildPluginsCommon" ]] ; then
+ mycmakeargs+=" -DPLUGIN_UI=COMMON"
+ elif [[ "${build}" == "buildPluginsCLI" ]] ; then
+ mycmakeargs+=" -DPLUGIN_UI=CLI"
+ elif [[ "${build}" == "buildPluginsQt4" ]] ; then
+ mycmakeargs+=" -DPLUGIN_UI=QT4"
+ fi
+
+ 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
+ cd "${S}"/${process%%:*} || die "Can't enter build folder."
+ emake CC="$(tc-getCC)" CXX="$(tc-getCXX)"
+ done
+}
+
+src_install() {
+ for process in ${processes} ; do
+ cd "${S}"/${process%%:*} || die "Can't enter build folder."
+ emake DESTDIR="${ED}" install
+ done
+}
diff --git a/media-libs/avidemux-plugins/avidemux-plugins-2.6.4.ebuild b/media-libs/avidemux-plugins/avidemux-plugins-2.6.4.ebuild
new file mode 100644
index 000000000000..11ad3908e719
--- /dev/null
+++ b/media-libs/avidemux-plugins/avidemux-plugins-2.6.4.ebuild
@@ -0,0 +1,126 @@
+# 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_PN="${PN/-plugins/}"
+MY_P="${MY_PN}_${PV}"
+
+DESCRIPTION="Plugins for avidemux; a video editor designed for simple cutting, filtering and encoding tasks"
+HOMEPAGE="http://fixounet.free.fr/avidemux"
+SRC_URI="mirror://sourceforge/${MY_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 faac faad fontconfig fribidi jack lame libsamplerate cpu_flags_x86_mmx opengl oss qt4 vorbis truetype twolame xvid x264 vpx"
+
+DEPEND="
+ =media-video/avidemux-${PV}[opengl?,qt4?]
+ >=dev-lang/spidermonkey-1.5-r2:0
+ dev-libs/libxml2
+ media-libs/libpng
+ virtual/libiconv
+ aften? ( media-libs/aften )
+ alsa? ( >=media-libs/alsa-lib-1.0.3b-r2 )
+ amr? ( media-libs/opencore-amr )
+ dts? ( media-libs/libdca )
+ faac? ( media-libs/faac )
+ faad? ( media-libs/faad2 )
+ fontconfig? ( media-libs/fontconfig )
+ fribidi? ( dev-libs/fribidi )
+ jack? (
+ media-sound/jack-audio-connection-kit
+ libsamplerate? ( media-libs/libsamplerate )
+ )
+ lame? ( media-sound/lame )
+ oss? ( virtual/os-headers )
+ truetype? ( >=media-libs/freetype-2.1.5 )
+ twolame? ( media-sound/twolame )
+ x264? ( media-libs/x264:= )
+ xvid? ( media-libs/xvid )
+ vorbis? ( media-libs/libvorbis )
+ vpx? ( media-libs/libvpx )
+"
+RDEPEND="$DEPEND"
+
+S="${WORKDIR}/${MY_P}"
+
+PROCESSES="buildPluginsCommon:avidemux_plugins
+ buildPluginsCLI:avidemux_plugins"
+
+use qt4 && PROCESSES+=" buildPluginsQt4:avidemux_plugins"
+
+src_configure() {
+ local x mycmakeargs plugin_ui extra_mycmakeargs
+
+ mycmakeargs="
+ $(cmake-utils_use fontconfig FONTCONFIG)
+ $(cmake-utils_use truetype FREETYPE2)
+ $(cmake-utils_use x264 X264)
+ "
+
+ 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."
+
+ if [[ "${SOURCE}" == "buildPluginsCommon" ]] ; then
+ plugin_ui="-DPLUGIN_UI=COMMON"
+
+ extra_mycmakeargs="
+ $(cmake-utils_use amr OPENCORE_AMRWB)
+ $(cmake-utils_use amr OPENCORE_AMRNB)
+ $(cmake-utils_use dts LIBDCA)
+ $(cmake-utils_use faad FAAD)
+ $(cmake-utils_use jack JACK)
+ $(cmake-utils_use vorbis VORBIS)
+ "
+ elif [[ "${SOURCE}" == "buildPluginsCLI" ]] ; then
+ plugin_ui="-DPLUGIN_UI=CLI"
+ extra_mycmakeargs=""
+ elif [[ "${SOURCE}" == "buildPluginsQt4" ]] ; then
+ plugin_ui="-DPLUGIN_UI=QT4"
+ extra_mycmakeargs=""
+ fi
+
+ cmake -DAVIDEMUX_SOURCE_DIR="${S}" \
+ -DCMAKE_INSTALL_PREFIX="/usr" \
+ ${mycmakeargs} ${extra_mycmakeargs} ${plugin_ui} -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
+}
diff --git a/media-libs/avidemux-plugins/avidemux-plugins-2.6.5-r1.ebuild b/media-libs/avidemux-plugins/avidemux-plugins-2.6.5-r1.ebuild
new file mode 100644
index 000000000000..34ed5cfd72dc
--- /dev/null
+++ b/media-libs/avidemux-plugins/avidemux-plugins-2.6.5-r1.ebuild
@@ -0,0 +1,143 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils eutils flag-o-matic python-single-r1
+
+SLOT="2.6"
+
+DESCRIPTION="Plugins for avidemux; a video editor designed for simple cutting, filtering and encoding tasks"
+HOMEPAGE="http://fixounet.free.fr/avidemux"
+
+# Multiple licenses because of all the bundled stuff.
+LICENSE="GPL-1 GPL-2 MIT PSF-2 public-domain"
+IUSE="aac aften a52 alsa amr debug dts fontconfig fribidi jack lame libsamplerate cpu_flags_x86_mmx opengl oss pulseaudio qt4 vorbis truetype twolame xv xvid x264 vpx"
+KEYWORDS="~amd64 ~x86"
+
+MY_PN="${PN/-plugins/}"
+if [[ ${PV} == *9999* ]] ; then
+ KEYWORDS=""
+ EGIT_REPO_URI="git://gitorious.org/${MY_PN}2-6/${MY_PN}2-6.git https://git.gitorious.org/${MY_PN}2-6/${MY_PN}2-6.git"
+
+ inherit git-2
+else
+ MY_P="${MY_PN}_${PV}"
+ SRC_URI="mirror://sourceforge/${MY_PN}/${PV}/${MY_P}.tar.gz"
+fi
+
+DEPEND="
+ ~media-video/avidemux-${PV}:${SLOT}[opengl?,qt4?]
+ >=dev-lang/spidermonkey-1.5-r2:0=
+ dev-libs/libxml2:2
+ media-libs/libpng:0=
+ virtual/libiconv:0
+ aac? (
+ media-libs/faac:0
+ media-libs/faad2:0
+ )
+ aften? ( media-libs/aften:0 )
+ alsa? ( >=media-libs/alsa-lib-1.0.3b-r2:0 )
+ amr? ( media-libs/opencore-amr:0 )
+ dts? ( media-libs/libdca:0 )
+ fontconfig? ( media-libs/fontconfig:1.0 )
+ fribidi? ( dev-libs/fribidi:0 )
+ jack? (
+ media-sound/jack-audio-connection-kit:0
+ libsamplerate? ( media-libs/libsamplerate:0 )
+ )
+ lame? ( media-sound/lame:0 )
+ oss? ( virtual/os-headers:0 )
+ pulseaudio? ( media-sound/pulseaudio:0 )
+ truetype? ( media-libs/freetype:2 )
+ twolame? ( media-sound/twolame:0 )
+ x264? ( media-libs/x264:0= )
+ xv? (
+ x11-libs/libX11:0
+ x11-libs/libXext:0
+ x11-libs/libXv:0
+ )
+ xvid? ( media-libs/xvid:0 )
+ vorbis? ( media-libs/libvorbis:0 )
+ vpx? ( media-libs/libvpx:0 )
+ ${PYTHON_DEPS}
+"
+RDEPEND="$DEPEND"
+
+S="${WORKDIR}/${MY_P}"
+
+processes="buildPluginsCommon:avidemux_plugins
+ buildPluginsCLI:avidemux_plugins"
+use qt4 && processes+=" buildPluginsQt4:avidemux_plugins"
+
+PATCHES=( "${FILESDIR}"/${PN}-2.6.4-optional-pulse.patch )
+
+src_configure() {
+ # 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 build="${process%%:*}"
+
+ local mycmakeargs="
+ -DAVIDEMUX_SOURCE_DIR='${S}'
+ -DPLUGIN_UI=$(echo ${build/buildPlugins/} | tr '[:lower:]' '[:upper:]')
+ $(cmake-utils_use aac FAAC)
+ $(cmake-utils_use aac FAAD)
+ $(cmake-utils_use alsa)
+ $(cmake-utils_use aften)
+ $(cmake-utils_use amr OPENCORE_AMRWB)
+ $(cmake-utils_use amr OPENCORE_AMRNB)
+ $(cmake-utils_use dts LIBDCA)
+ $(cmake-utils_use fontconfig)
+ $(cmake-utils_use jack)
+ $(cmake-utils_use lame)
+ $(cmake-utils_use oss)
+ $(cmake-utils_use pulseaudio PULSEAUDIOSIMPLE)
+ $(cmake-utils_use qt4)
+ $(cmake-utils_use truetype FREETYPE2)
+ $(cmake-utils_use twolame)
+ $(cmake-utils_use x264)
+ $(cmake-utils_use xv XVIDEO)
+ $(cmake-utils_use xvid)
+ $(cmake-utils_use vorbis)
+ $(cmake-utils_use vorbis LIBVORBIS)
+ $(cmake-utils_use vpx VPXDEC)
+ "
+
+ if use debug ; then
+ mycmakeargs+=" -DVERBOSE=1 -DCMAKE_BUILD_TYPE=Debug -DADM_DEBUG=1"
+ fi
+
+ mkdir "${S}"/${build} || die "Can't create build folder."
+
+ CMAKE_USE_DIR="${S}"/${process#*:} BUILD_DIR="${S}"/${build} cmake-utils_src_configure
+ done
+}
+
+src_compile() {
+ for process in ${processes} ; do
+ BUILD_DIR="${S}/${process%%:*}" cmake-utils_src_compile
+ done
+}
+
+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
+
+ python_fix_shebang "${D}"
+}
diff --git a/media-libs/avidemux-plugins/avidemux-plugins-2.6.5.ebuild b/media-libs/avidemux-plugins/avidemux-plugins-2.6.5.ebuild
new file mode 100644
index 000000000000..34ed5cfd72dc
--- /dev/null
+++ b/media-libs/avidemux-plugins/avidemux-plugins-2.6.5.ebuild
@@ -0,0 +1,143 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils eutils flag-o-matic python-single-r1
+
+SLOT="2.6"
+
+DESCRIPTION="Plugins for avidemux; a video editor designed for simple cutting, filtering and encoding tasks"
+HOMEPAGE="http://fixounet.free.fr/avidemux"
+
+# Multiple licenses because of all the bundled stuff.
+LICENSE="GPL-1 GPL-2 MIT PSF-2 public-domain"
+IUSE="aac aften a52 alsa amr debug dts fontconfig fribidi jack lame libsamplerate cpu_flags_x86_mmx opengl oss pulseaudio qt4 vorbis truetype twolame xv xvid x264 vpx"
+KEYWORDS="~amd64 ~x86"
+
+MY_PN="${PN/-plugins/}"
+if [[ ${PV} == *9999* ]] ; then
+ KEYWORDS=""
+ EGIT_REPO_URI="git://gitorious.org/${MY_PN}2-6/${MY_PN}2-6.git https://git.gitorious.org/${MY_PN}2-6/${MY_PN}2-6.git"
+
+ inherit git-2
+else
+ MY_P="${MY_PN}_${PV}"
+ SRC_URI="mirror://sourceforge/${MY_PN}/${PV}/${MY_P}.tar.gz"
+fi
+
+DEPEND="
+ ~media-video/avidemux-${PV}:${SLOT}[opengl?,qt4?]
+ >=dev-lang/spidermonkey-1.5-r2:0=
+ dev-libs/libxml2:2
+ media-libs/libpng:0=
+ virtual/libiconv:0
+ aac? (
+ media-libs/faac:0
+ media-libs/faad2:0
+ )
+ aften? ( media-libs/aften:0 )
+ alsa? ( >=media-libs/alsa-lib-1.0.3b-r2:0 )
+ amr? ( media-libs/opencore-amr:0 )
+ dts? ( media-libs/libdca:0 )
+ fontconfig? ( media-libs/fontconfig:1.0 )
+ fribidi? ( dev-libs/fribidi:0 )
+ jack? (
+ media-sound/jack-audio-connection-kit:0
+ libsamplerate? ( media-libs/libsamplerate:0 )
+ )
+ lame? ( media-sound/lame:0 )
+ oss? ( virtual/os-headers:0 )
+ pulseaudio? ( media-sound/pulseaudio:0 )
+ truetype? ( media-libs/freetype:2 )
+ twolame? ( media-sound/twolame:0 )
+ x264? ( media-libs/x264:0= )
+ xv? (
+ x11-libs/libX11:0
+ x11-libs/libXext:0
+ x11-libs/libXv:0
+ )
+ xvid? ( media-libs/xvid:0 )
+ vorbis? ( media-libs/libvorbis:0 )
+ vpx? ( media-libs/libvpx:0 )
+ ${PYTHON_DEPS}
+"
+RDEPEND="$DEPEND"
+
+S="${WORKDIR}/${MY_P}"
+
+processes="buildPluginsCommon:avidemux_plugins
+ buildPluginsCLI:avidemux_plugins"
+use qt4 && processes+=" buildPluginsQt4:avidemux_plugins"
+
+PATCHES=( "${FILESDIR}"/${PN}-2.6.4-optional-pulse.patch )
+
+src_configure() {
+ # 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 build="${process%%:*}"
+
+ local mycmakeargs="
+ -DAVIDEMUX_SOURCE_DIR='${S}'
+ -DPLUGIN_UI=$(echo ${build/buildPlugins/} | tr '[:lower:]' '[:upper:]')
+ $(cmake-utils_use aac FAAC)
+ $(cmake-utils_use aac FAAD)
+ $(cmake-utils_use alsa)
+ $(cmake-utils_use aften)
+ $(cmake-utils_use amr OPENCORE_AMRWB)
+ $(cmake-utils_use amr OPENCORE_AMRNB)
+ $(cmake-utils_use dts LIBDCA)
+ $(cmake-utils_use fontconfig)
+ $(cmake-utils_use jack)
+ $(cmake-utils_use lame)
+ $(cmake-utils_use oss)
+ $(cmake-utils_use pulseaudio PULSEAUDIOSIMPLE)
+ $(cmake-utils_use qt4)
+ $(cmake-utils_use truetype FREETYPE2)
+ $(cmake-utils_use twolame)
+ $(cmake-utils_use x264)
+ $(cmake-utils_use xv XVIDEO)
+ $(cmake-utils_use xvid)
+ $(cmake-utils_use vorbis)
+ $(cmake-utils_use vorbis LIBVORBIS)
+ $(cmake-utils_use vpx VPXDEC)
+ "
+
+ if use debug ; then
+ mycmakeargs+=" -DVERBOSE=1 -DCMAKE_BUILD_TYPE=Debug -DADM_DEBUG=1"
+ fi
+
+ mkdir "${S}"/${build} || die "Can't create build folder."
+
+ CMAKE_USE_DIR="${S}"/${process#*:} BUILD_DIR="${S}"/${build} cmake-utils_src_configure
+ done
+}
+
+src_compile() {
+ for process in ${processes} ; do
+ BUILD_DIR="${S}/${process%%:*}" cmake-utils_src_compile
+ done
+}
+
+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
+
+ python_fix_shebang "${D}"
+}
diff --git a/media-libs/avidemux-plugins/avidemux-plugins-2.6.7.ebuild b/media-libs/avidemux-plugins/avidemux-plugins-2.6.7.ebuild
new file mode 100644
index 000000000000..39ecfb56a45e
--- /dev/null
+++ b/media-libs/avidemux-plugins/avidemux-plugins-2.6.7.ebuild
@@ -0,0 +1,145 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils eutils flag-o-matic python-single-r1
+
+SLOT="2.6"
+
+DESCRIPTION="Plugins for avidemux; a video editor designed for simple cutting, filtering and encoding tasks"
+HOMEPAGE="http://fixounet.free.fr/avidemux"
+
+# Multiple licenses because of all the bundled stuff.
+LICENSE="GPL-1 GPL-2 MIT PSF-2 public-domain"
+IUSE="aac aften a52 alsa amr debug dts fontconfig fribidi jack lame libsamplerate cpu_flags_x86_mmx opengl oss pulseaudio qt4 vorbis truetype twolame xv xvid x264 vdpau vpx"
+KEYWORDS="~amd64 ~x86"
+
+MY_PN="${PN/-plugins/}"
+if [[ ${PV} == *9999* ]] ; then
+ KEYWORDS=""
+ EGIT_REPO_URI="git://gitorious.org/${MY_PN}2-6/${MY_PN}2-6.git https://git.gitorious.org/${MY_PN}2-6/${MY_PN}2-6.git"
+
+ inherit git-2
+else
+ MY_P="${MY_PN}_${PV}"
+ SRC_URI="mirror://sourceforge/${MY_PN}/${MY_PN}/${PV}/${MY_P}.tar.gz"
+fi
+
+DEPEND="
+ ~media-libs/avidemux-core-${PV}:${SLOT}[vdpau?]
+ ~media-video/avidemux-${PV}:${SLOT}[opengl?,qt4?]
+ >=dev-lang/spidermonkey-1.5-r2:0=
+ dev-libs/libxml2:2
+ media-libs/libpng:0=
+ virtual/libiconv:0
+ aac? (
+ media-libs/faac:0
+ media-libs/faad2:0
+ )
+ aften? ( media-libs/aften:0 )
+ alsa? ( >=media-libs/alsa-lib-1.0.3b-r2:0 )
+ amr? ( media-libs/opencore-amr:0 )
+ dts? ( media-libs/libdca:0 )
+ fontconfig? ( media-libs/fontconfig:1.0 )
+ fribidi? ( dev-libs/fribidi:0 )
+ jack? (
+ media-sound/jack-audio-connection-kit:0
+ libsamplerate? ( media-libs/libsamplerate:0 )
+ )
+ lame? ( media-sound/lame:0 )
+ oss? ( virtual/os-headers:0 )
+ pulseaudio? ( media-sound/pulseaudio:0 )
+ truetype? ( media-libs/freetype:2 )
+ twolame? ( media-sound/twolame:0 )
+ x264? ( media-libs/x264:0= )
+ xv? (
+ x11-libs/libX11:0
+ x11-libs/libXext:0
+ x11-libs/libXv:0
+ )
+ xvid? ( media-libs/xvid:0 )
+ vorbis? ( media-libs/libvorbis:0 )
+ vpx? ( media-libs/libvpx:0 )
+ ${PYTHON_DEPS}
+"
+RDEPEND="$DEPEND"
+
+S="${WORKDIR}/${MY_P}"
+
+processes="buildPluginsCommon:avidemux_plugins
+ buildPluginsCLI:avidemux_plugins"
+use qt4 && processes+=" buildPluginsQt4:avidemux_plugins"
+
+PATCHES=( "${FILESDIR}"/${PN}-2.6.4-optional-pulse.patch )
+
+src_configure() {
+ # 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 build="${process%%:*}"
+
+ local mycmakeargs="
+ -DAVIDEMUX_SOURCE_DIR='${S}'
+ -DPLUGIN_UI=$(echo ${build/buildPlugins/} | tr '[:lower:]' '[:upper:]')
+ $(cmake-utils_use aac FAAC)
+ $(cmake-utils_use aac FAAD)
+ $(cmake-utils_use alsa)
+ $(cmake-utils_use aften)
+ $(cmake-utils_use amr OPENCORE_AMRWB)
+ $(cmake-utils_use amr OPENCORE_AMRNB)
+ $(cmake-utils_use dts LIBDCA)
+ $(cmake-utils_use fontconfig)
+ $(cmake-utils_use jack)
+ $(cmake-utils_use lame)
+ $(cmake-utils_use oss)
+ $(cmake-utils_use pulseaudio PULSEAUDIOSIMPLE)
+ $(cmake-utils_use qt4)
+ $(cmake-utils_use truetype FREETYPE2)
+ $(cmake-utils_use twolame)
+ $(cmake-utils_use x264)
+ $(cmake-utils_use xv XVIDEO)
+ $(cmake-utils_use xvid)
+ $(cmake-utils_use vdpau)
+ $(cmake-utils_use vorbis)
+ $(cmake-utils_use vorbis LIBVORBIS)
+ $(cmake-utils_use vpx VPXDEC)
+ "
+
+ if use debug ; then
+ mycmakeargs+=" -DVERBOSE=1 -DCMAKE_BUILD_TYPE=Debug -DADM_DEBUG=1"
+ fi
+
+ mkdir "${S}"/${build} || die "Can't create build folder."
+
+ CMAKE_USE_DIR="${S}"/${process#*:} BUILD_DIR="${S}"/${build} cmake-utils_src_configure
+ done
+}
+
+src_compile() {
+ for process in ${processes} ; do
+ BUILD_DIR="${S}/${process%%:*}" cmake-utils_src_compile
+ done
+}
+
+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
+
+ python_fix_shebang "${D}"
+}
diff --git a/media-libs/avidemux-plugins/avidemux-plugins-2.6.8.ebuild b/media-libs/avidemux-plugins/avidemux-plugins-2.6.8.ebuild
new file mode 100644
index 000000000000..39ecfb56a45e
--- /dev/null
+++ b/media-libs/avidemux-plugins/avidemux-plugins-2.6.8.ebuild
@@ -0,0 +1,145 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils eutils flag-o-matic python-single-r1
+
+SLOT="2.6"
+
+DESCRIPTION="Plugins for avidemux; a video editor designed for simple cutting, filtering and encoding tasks"
+HOMEPAGE="http://fixounet.free.fr/avidemux"
+
+# Multiple licenses because of all the bundled stuff.
+LICENSE="GPL-1 GPL-2 MIT PSF-2 public-domain"
+IUSE="aac aften a52 alsa amr debug dts fontconfig fribidi jack lame libsamplerate cpu_flags_x86_mmx opengl oss pulseaudio qt4 vorbis truetype twolame xv xvid x264 vdpau vpx"
+KEYWORDS="~amd64 ~x86"
+
+MY_PN="${PN/-plugins/}"
+if [[ ${PV} == *9999* ]] ; then
+ KEYWORDS=""
+ EGIT_REPO_URI="git://gitorious.org/${MY_PN}2-6/${MY_PN}2-6.git https://git.gitorious.org/${MY_PN}2-6/${MY_PN}2-6.git"
+
+ inherit git-2
+else
+ MY_P="${MY_PN}_${PV}"
+ SRC_URI="mirror://sourceforge/${MY_PN}/${MY_PN}/${PV}/${MY_P}.tar.gz"
+fi
+
+DEPEND="
+ ~media-libs/avidemux-core-${PV}:${SLOT}[vdpau?]
+ ~media-video/avidemux-${PV}:${SLOT}[opengl?,qt4?]
+ >=dev-lang/spidermonkey-1.5-r2:0=
+ dev-libs/libxml2:2
+ media-libs/libpng:0=
+ virtual/libiconv:0
+ aac? (
+ media-libs/faac:0
+ media-libs/faad2:0
+ )
+ aften? ( media-libs/aften:0 )
+ alsa? ( >=media-libs/alsa-lib-1.0.3b-r2:0 )
+ amr? ( media-libs/opencore-amr:0 )
+ dts? ( media-libs/libdca:0 )
+ fontconfig? ( media-libs/fontconfig:1.0 )
+ fribidi? ( dev-libs/fribidi:0 )
+ jack? (
+ media-sound/jack-audio-connection-kit:0
+ libsamplerate? ( media-libs/libsamplerate:0 )
+ )
+ lame? ( media-sound/lame:0 )
+ oss? ( virtual/os-headers:0 )
+ pulseaudio? ( media-sound/pulseaudio:0 )
+ truetype? ( media-libs/freetype:2 )
+ twolame? ( media-sound/twolame:0 )
+ x264? ( media-libs/x264:0= )
+ xv? (
+ x11-libs/libX11:0
+ x11-libs/libXext:0
+ x11-libs/libXv:0
+ )
+ xvid? ( media-libs/xvid:0 )
+ vorbis? ( media-libs/libvorbis:0 )
+ vpx? ( media-libs/libvpx:0 )
+ ${PYTHON_DEPS}
+"
+RDEPEND="$DEPEND"
+
+S="${WORKDIR}/${MY_P}"
+
+processes="buildPluginsCommon:avidemux_plugins
+ buildPluginsCLI:avidemux_plugins"
+use qt4 && processes+=" buildPluginsQt4:avidemux_plugins"
+
+PATCHES=( "${FILESDIR}"/${PN}-2.6.4-optional-pulse.patch )
+
+src_configure() {
+ # 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 build="${process%%:*}"
+
+ local mycmakeargs="
+ -DAVIDEMUX_SOURCE_DIR='${S}'
+ -DPLUGIN_UI=$(echo ${build/buildPlugins/} | tr '[:lower:]' '[:upper:]')
+ $(cmake-utils_use aac FAAC)
+ $(cmake-utils_use aac FAAD)
+ $(cmake-utils_use alsa)
+ $(cmake-utils_use aften)
+ $(cmake-utils_use amr OPENCORE_AMRWB)
+ $(cmake-utils_use amr OPENCORE_AMRNB)
+ $(cmake-utils_use dts LIBDCA)
+ $(cmake-utils_use fontconfig)
+ $(cmake-utils_use jack)
+ $(cmake-utils_use lame)
+ $(cmake-utils_use oss)
+ $(cmake-utils_use pulseaudio PULSEAUDIOSIMPLE)
+ $(cmake-utils_use qt4)
+ $(cmake-utils_use truetype FREETYPE2)
+ $(cmake-utils_use twolame)
+ $(cmake-utils_use x264)
+ $(cmake-utils_use xv XVIDEO)
+ $(cmake-utils_use xvid)
+ $(cmake-utils_use vdpau)
+ $(cmake-utils_use vorbis)
+ $(cmake-utils_use vorbis LIBVORBIS)
+ $(cmake-utils_use vpx VPXDEC)
+ "
+
+ if use debug ; then
+ mycmakeargs+=" -DVERBOSE=1 -DCMAKE_BUILD_TYPE=Debug -DADM_DEBUG=1"
+ fi
+
+ mkdir "${S}"/${build} || die "Can't create build folder."
+
+ CMAKE_USE_DIR="${S}"/${process#*:} BUILD_DIR="${S}"/${build} cmake-utils_src_configure
+ done
+}
+
+src_compile() {
+ for process in ${processes} ; do
+ BUILD_DIR="${S}/${process%%:*}" cmake-utils_src_compile
+ done
+}
+
+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
+
+ python_fix_shebang "${D}"
+}
diff --git a/media-libs/avidemux-plugins/avidemux-plugins-9999.ebuild b/media-libs/avidemux-plugins/avidemux-plugins-9999.ebuild
new file mode 100644
index 000000000000..39ecfb56a45e
--- /dev/null
+++ b/media-libs/avidemux-plugins/avidemux-plugins-9999.ebuild
@@ -0,0 +1,145 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils eutils flag-o-matic python-single-r1
+
+SLOT="2.6"
+
+DESCRIPTION="Plugins for avidemux; a video editor designed for simple cutting, filtering and encoding tasks"
+HOMEPAGE="http://fixounet.free.fr/avidemux"
+
+# Multiple licenses because of all the bundled stuff.
+LICENSE="GPL-1 GPL-2 MIT PSF-2 public-domain"
+IUSE="aac aften a52 alsa amr debug dts fontconfig fribidi jack lame libsamplerate cpu_flags_x86_mmx opengl oss pulseaudio qt4 vorbis truetype twolame xv xvid x264 vdpau vpx"
+KEYWORDS="~amd64 ~x86"
+
+MY_PN="${PN/-plugins/}"
+if [[ ${PV} == *9999* ]] ; then
+ KEYWORDS=""
+ EGIT_REPO_URI="git://gitorious.org/${MY_PN}2-6/${MY_PN}2-6.git https://git.gitorious.org/${MY_PN}2-6/${MY_PN}2-6.git"
+
+ inherit git-2
+else
+ MY_P="${MY_PN}_${PV}"
+ SRC_URI="mirror://sourceforge/${MY_PN}/${MY_PN}/${PV}/${MY_P}.tar.gz"
+fi
+
+DEPEND="
+ ~media-libs/avidemux-core-${PV}:${SLOT}[vdpau?]
+ ~media-video/avidemux-${PV}:${SLOT}[opengl?,qt4?]
+ >=dev-lang/spidermonkey-1.5-r2:0=
+ dev-libs/libxml2:2
+ media-libs/libpng:0=
+ virtual/libiconv:0
+ aac? (
+ media-libs/faac:0
+ media-libs/faad2:0
+ )
+ aften? ( media-libs/aften:0 )
+ alsa? ( >=media-libs/alsa-lib-1.0.3b-r2:0 )
+ amr? ( media-libs/opencore-amr:0 )
+ dts? ( media-libs/libdca:0 )
+ fontconfig? ( media-libs/fontconfig:1.0 )
+ fribidi? ( dev-libs/fribidi:0 )
+ jack? (
+ media-sound/jack-audio-connection-kit:0
+ libsamplerate? ( media-libs/libsamplerate:0 )
+ )
+ lame? ( media-sound/lame:0 )
+ oss? ( virtual/os-headers:0 )
+ pulseaudio? ( media-sound/pulseaudio:0 )
+ truetype? ( media-libs/freetype:2 )
+ twolame? ( media-sound/twolame:0 )
+ x264? ( media-libs/x264:0= )
+ xv? (
+ x11-libs/libX11:0
+ x11-libs/libXext:0
+ x11-libs/libXv:0
+ )
+ xvid? ( media-libs/xvid:0 )
+ vorbis? ( media-libs/libvorbis:0 )
+ vpx? ( media-libs/libvpx:0 )
+ ${PYTHON_DEPS}
+"
+RDEPEND="$DEPEND"
+
+S="${WORKDIR}/${MY_P}"
+
+processes="buildPluginsCommon:avidemux_plugins
+ buildPluginsCLI:avidemux_plugins"
+use qt4 && processes+=" buildPluginsQt4:avidemux_plugins"
+
+PATCHES=( "${FILESDIR}"/${PN}-2.6.4-optional-pulse.patch )
+
+src_configure() {
+ # 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 build="${process%%:*}"
+
+ local mycmakeargs="
+ -DAVIDEMUX_SOURCE_DIR='${S}'
+ -DPLUGIN_UI=$(echo ${build/buildPlugins/} | tr '[:lower:]' '[:upper:]')
+ $(cmake-utils_use aac FAAC)
+ $(cmake-utils_use aac FAAD)
+ $(cmake-utils_use alsa)
+ $(cmake-utils_use aften)
+ $(cmake-utils_use amr OPENCORE_AMRWB)
+ $(cmake-utils_use amr OPENCORE_AMRNB)
+ $(cmake-utils_use dts LIBDCA)
+ $(cmake-utils_use fontconfig)
+ $(cmake-utils_use jack)
+ $(cmake-utils_use lame)
+ $(cmake-utils_use oss)
+ $(cmake-utils_use pulseaudio PULSEAUDIOSIMPLE)
+ $(cmake-utils_use qt4)
+ $(cmake-utils_use truetype FREETYPE2)
+ $(cmake-utils_use twolame)
+ $(cmake-utils_use x264)
+ $(cmake-utils_use xv XVIDEO)
+ $(cmake-utils_use xvid)
+ $(cmake-utils_use vdpau)
+ $(cmake-utils_use vorbis)
+ $(cmake-utils_use vorbis LIBVORBIS)
+ $(cmake-utils_use vpx VPXDEC)
+ "
+
+ if use debug ; then
+ mycmakeargs+=" -DVERBOSE=1 -DCMAKE_BUILD_TYPE=Debug -DADM_DEBUG=1"
+ fi
+
+ mkdir "${S}"/${build} || die "Can't create build folder."
+
+ CMAKE_USE_DIR="${S}"/${process#*:} BUILD_DIR="${S}"/${build} cmake-utils_src_configure
+ done
+}
+
+src_compile() {
+ for process in ${processes} ; do
+ BUILD_DIR="${S}/${process%%:*}" cmake-utils_src_compile
+ done
+}
+
+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
+
+ python_fix_shebang "${D}"
+}
diff --git a/media-libs/avidemux-plugins/files/avidemux-plugins-2.6.4-optional-pulse.patch b/media-libs/avidemux-plugins/files/avidemux-plugins-2.6.4-optional-pulse.patch
new file mode 100644
index 000000000000..78650aaa7c02
--- /dev/null
+++ b/media-libs/avidemux-plugins/files/avidemux-plugins-2.6.4-optional-pulse.patch
@@ -0,0 +1,21 @@
+--- a/cmake/admCheckAudioDeviceLibs.cmake
++++ b/cmake/admCheckAudioDeviceLibs.cmake
+@@ -158,6 +158,8 @@
+
+ MESSAGE(STATUS "Checking for PULSEAUDIOSIMPLE")
+ MESSAGE(STATUS "*****************************")
++
++ IF (PULSEAUDIOSIMPLE)
+ IF (PULSEAUDIOSIMPLE_INCLUDE_DIR AND PULSEAUDIOSIMPLE_LIBRARIES)
+ # in cache already
+ SET(PULSEAUDIOSIMPLE_FIND_QUIETLY TRUE)
+@@ -198,6 +200,9 @@
+ MARK_AS_ADVANCED(PULSEAUDIOSIMPLE_INCLUDE_DIR PULSEAUDIOSIMPLE_LIBRARIES)
+
+ APPEND_SUMMARY_LIST("Audio Device" "PulseAudio" "${USE_PULSE_SIMPLE}")
++ ELSE (PULSEAUDIOSIMPLE)
++ MESSAGE("${MSG_DISABLE_OPTION}")
++ ENDIF (PULSEAUDIOSIMPLE)
+ ELSE (UNIX AND NOT APPLE)
+ SET(PULSEAUDIOSIMPLE_CAPABLE FALSE)
+ ENDIF (UNIX AND NOT APPLE)
diff --git a/media-libs/avidemux-plugins/metadata.xml b/media-libs/avidemux-plugins/metadata.xml
new file mode 100644
index 000000000000..795f8bbed276
--- /dev/null
+++ b/media-libs/avidemux-plugins/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>
+ <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="faac">Enable free MPEG-4 audio codecs support via <pkg>media-libs/faac</pkg>.</flag>
+ <flag name="faad">Enable AAC audio decoding library support via <pkg>media-libs/faad2</pkg>.</flag>
+ <flag name="fribidi">Enable unicode bidirectional algorithm support via <pkg>dev-libs/fribidi</pkg>.</flag>
+ <flag name="twolame">Enable TwoLAME support via <pkg>media-sound/twolame</pkg>, an optimised MPEG Audio Layer 2 (MP2) encoder.</flag>
+ <flag name="vpx">Enable WebM VP8 Codec SDK support via <pkg>media-libs/libvpx</pkg>.</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">avidemux</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/babl/Manifest b/media-libs/babl/Manifest
new file mode 100644
index 000000000000..b8463b932da6
--- /dev/null
+++ b/media-libs/babl/Manifest
@@ -0,0 +1,2 @@
+DIST babl-0.1.10.tar.bz2 449537 SHA256 943fc36ceac7dd25bc928256bc7b535a42989c6b971578146869eee5fe5955f4 SHA512 2950d94c255ee05d405e003a46138da0f4e0cad65e2d2a882089b788c2deac0524014f7c5758c3097253bdbebaded433caf0447c7d218c9cc96798df9e6f0c92 WHIRLPOOL a71907a531bc71c7ac0c84a197a559c50321a5d96b5d846083935390890ef116780d49bd458577aef0e948395dc14897e6fbbc75478b2a59d57d4381cf7f8db8
+DIST babl-0.1.12.tar.bz2 642234 SHA256 2f802b7f1a17b72c10bf0fe1e69b7a888cf7ce62b7cf1537b030f7f88d55a407 SHA512 b69c8e3870f25372b2223aa4a716383af30342822461fc847039af964cdd194603dbc327a5c3547369d64b206b54280a5a9a227197ca6b7bcfbfa8e2e560df6a WHIRLPOOL b1a170492f1c1e6f030f418cc66c3be02cd2bd7e10896a416b5feaf2d7aa82de4fa15c9d2a65e6e1038ab6822e4dc3333f96102e18d757a6b1e07f4017b4beba
diff --git a/media-libs/babl/babl-0.1.10-r1.ebuild b/media-libs/babl/babl-0.1.10-r1.ebuild
new file mode 100644
index 000000000000..8b272d35c3ac
--- /dev/null
+++ b/media-libs/babl/babl-0.1.10-r1.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# vala and introspection support is broken, bug #468208
+#VALA_MIN_API_VERSION=0.14
+#VALA_USE_DEPEND=vapigen
+
+inherit autotools eutils #vala
+
+DESCRIPTION="A dynamic, any to any, pixel format conversion library"
+HOMEPAGE="http://www.gegl.org/babl/"
+SRC_URI="ftp://ftp.gimp.org/pub/${PN}/${PV:0:3}/${P}.tar.bz2"
+
+LICENSE="LGPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+IUSE="altivec cpu_flags_x86_sse cpu_flags_x86_mmx" # +introspection vala
+
+RDEPEND=""
+#introspection? ( >=dev-libs/gobject-introspection-0.10 )"
+
+DEPEND="${RDEPEND}
+ >=sys-devel/libtool-2.2
+ virtual/pkgconfig
+"
+#vala? ( $(vala_depend) )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-clang.patch
+
+ # fix compilation on OSX, can be dropped on next release:
+ # http://mail.gnome.org/archives/commits-list/2012-April/msg02589.html
+ sed -i -e 's/values\.h/limits.h/' babl/babl-palette.c || die
+ epatch "${FILESDIR}"/${P}-introspection.patch
+ epatch "${FILESDIR}"/${P}-g-ir-compiler-crash.patch
+ eautoreconf
+
+# use vala && vala_src_prepare
+}
+
+src_configure() {
+ # Automagic rsvg support is just for website generation we do not call,
+ # so we don't need to fix it
+ # w3m is used for dist target thus no issue for us that it is automagically
+ # detected
+ econf \
+ --disable-static \
+ --disable-maintainer-mode \
+ --disable-introspection \
+ --without-vala \
+ $(use_enable altivec) \
+ $(use_enable cpu_flags_x86_mmx mmx) \
+ $(use_enable cpu_flags_x86_sse sse)
+# $(use_enable introspection) \
+# $(use_with vala)
+}
+
+src_install() {
+ default
+ find "${ED}" -name '*.la' -delete
+ dodoc AUTHORS ChangeLog README NEWS
+}
diff --git a/media-libs/babl/babl-0.1.12.ebuild b/media-libs/babl/babl-0.1.12.ebuild
new file mode 100644
index 000000000000..407941b467c3
--- /dev/null
+++ b/media-libs/babl/babl-0.1.12.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+if [[ ${PV} == *9999* ]]; then
+ inherit autotools git-r3
+ EGIT_REPO_URI="git://git.gnome.org/babl"
+ SRC_URI=""
+else
+ SRC_URI="http://ftp.gimp.org/pub/${PN}/${PV:0:3}/${P}.tar.bz2"
+ KEYWORDS="alpha ~amd64 arm hppa ~ia64 ~mips ppc ppc64 sparc ~x86 ~amd64-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+
+DESCRIPTION="A dynamic, any to any, pixel format conversion library"
+HOMEPAGE="http://www.gegl.org/babl/"
+
+LICENSE="LGPL-3"
+SLOT="0"
+IUSE="altivec cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_mmx"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ >=sys-devel/libtool-2.2
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ epatch_user
+ [[ ${PV} == *9999* ]] && eautoreconf
+}
+
+src_configure() {
+ # Automagic rsvg support is just for website generation we do not call,
+ # so we don't need to fix it
+ # w3m is used for dist target thus no issue for us that it is automagically
+ # detected
+ econf \
+ --disable-docs \
+ --disable-static \
+ --disable-maintainer-mode \
+ $(use_enable altivec) \
+ $(use_enable cpu_flags_x86_mmx mmx) \
+ $(use_enable cpu_flags_x86_sse sse) \
+ $(use_enable cpu_flags_x86_sse sse2)
+}
+
+src_install() {
+ default
+ prune_libtool_files --all
+}
diff --git a/media-libs/babl/babl-9999.ebuild b/media-libs/babl/babl-9999.ebuild
new file mode 100644
index 000000000000..ce739efbe576
--- /dev/null
+++ b/media-libs/babl/babl-9999.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+if [[ ${PV} == *9999* ]]; then
+ inherit autotools git-r3
+ EGIT_REPO_URI="git://git.gnome.org/babl"
+ SRC_URI=""
+else
+ SRC_URI="http://ftp.gimp.org/pub/${PN}/${PV:0:3}/${P}.tar.bz2"
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+
+DESCRIPTION="A dynamic, any to any, pixel format conversion library"
+HOMEPAGE="http://www.gegl.org/babl/"
+
+LICENSE="LGPL-3"
+SLOT="0"
+IUSE="altivec cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_mmx"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ >=sys-devel/libtool-2.2
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ epatch_user
+ [[ ${PV} == *9999* ]] && eautoreconf
+}
+
+src_configure() {
+ # Automagic rsvg support is just for website generation we do not call,
+ # so we don't need to fix it
+ # w3m is used for dist target thus no issue for us that it is automagically
+ # detected
+ econf \
+ --disable-docs \
+ --disable-static \
+ --disable-maintainer-mode \
+ $(use_enable altivec) \
+ $(use_enable cpu_flags_x86_mmx mmx) \
+ $(use_enable cpu_flags_x86_sse sse) \
+ $(use_enable cpu_flags_x86_sse sse2)
+}
+
+src_install() {
+ default
+ prune_libtool_files --all
+}
diff --git a/media-libs/babl/files/babl-0.1.10-clang.patch b/media-libs/babl/files/babl-0.1.10-clang.patch
new file mode 100644
index 000000000000..68e89d30d71d
--- /dev/null
+++ b/media-libs/babl/files/babl-0.1.10-clang.patch
@@ -0,0 +1,50 @@
+From 16492300a39e75e1015a0ab33e22b1e3f605c5ce Mon Sep 17 00:00:00 2001
+From: Michael Muré <batolettre@gmail.com>
+Date: Tue, 22 May 2012 03:48:44 +0000
+Subject: sse-fixups: use more portable functions to help compile with clang
+
+Original patch found here
+http://www.freebsd.org/cgi/cvsweb.cgi/ports/x11/babl/files/patch-sse-fixups.c?rev=1.1;content-type=text%2Fplain
+
+CVS tags: RELEASE_8_3_0, HEAD
+
+Fix the build with clang.
+
+PR: ports/163518
+Submitted by: Jan Beich <jbeich@tormail.net>
+Feature safe: yes
+---
+(limited to 'extensions/sse-fixups.c')
+
+diff --git a/extensions/sse-fixups.c b/extensions/sse-fixups.c
+index fdcc06f..95f1cc8 100644
+--- a/extensions/sse-fixups.c
++++ b/extensions/sse-fixups.c
+@@ -23,6 +23,8 @@
+
+ #if defined(__GNUC__) && (__GNUC__ >= 4) && defined(USE_SSE) && defined(USE_MMX)
+
++#include <xmmintrin.h>
++
+ #include <stdint.h>
+ #include <stdlib.h>
+
+@@ -40,11 +42,11 @@ typedef int g2int __attribute__ ((vector_size (2*sizeof(int))));
+ #define g4float_zero g4float_all(0.0)
+ #define g4float_ff g4float_all(255.0)
+
+-#define g4float_max(a,b) __builtin_ia32_maxps(a, b)
+-#define g4float_min(a,b) __builtin_ia32_minps(a, b)
+-#define g4float_cvt2pi(a) __builtin_ia32_cvtps2pi(a)
+-#define g4float_movhl(a,b) __builtin_ia32_movhlps(a, b)
+-#define g4float_emms __builtin_ia32_emms
++#define g4float_max(a,b) _mm_max_ps(a, b)
++#define g4float_min(a,b) _mm_min_ps(a, b)
++#define g4float_cvt2pi(a) _mm_cvtps_pi32(a)
++#define g4float_movhl(a,b) _mm_movehl_ps(a, b)
++#define g4float_emms _mm_empty
+
+
+ static INLINE long
+--
+cgit v0.9.0.2
diff --git a/media-libs/babl/files/babl-0.1.10-g-ir-compiler-crash.patch b/media-libs/babl/files/babl-0.1.10-g-ir-compiler-crash.patch
new file mode 100644
index 000000000000..4b6cf919a849
--- /dev/null
+++ b/media-libs/babl/files/babl-0.1.10-g-ir-compiler-crash.patch
@@ -0,0 +1,12 @@
+Index: babl-0.1.10/babl/Makefile.am
+===================================================================
+--- babl-0.1.10.orig/babl/Makefile.am
++++ babl-0.1.10/babl/Makefile.am
+@@ -95,6 +95,7 @@ INTROSPECTION_COMPILER_ARGS = --included
+ if HAVE_INTROSPECTION
+ Babl-$(BABL_API_VERSION).gir: $(G_IR_SCANNER) $(library_include_HEADERS) $(c_sources) $(srcdir)/Makefile.am libbabl-@BABL_API_VERSION@.la
+ $(INTROSPECTION_SCANNER) -v --namespace Babl --nsversion=$(BABL_API_VERSION) \
++ --identifier-prefix= --symbol-prefix=babl \
+ --add-include-path=$(srcdir) --add-include-path=. \
+ --library=$(builddir)/libbabl-$(BABL_API_VERSION).la \
+ --libtool="$(LIBTOOL)" \
diff --git a/media-libs/babl/files/babl-0.1.10-introspection.patch b/media-libs/babl/files/babl-0.1.10-introspection.patch
new file mode 100644
index 000000000000..f9b92698689d
--- /dev/null
+++ b/media-libs/babl/files/babl-0.1.10-introspection.patch
@@ -0,0 +1,25 @@
+From c024c89f95de4a8fa95ba96790dac61768d11a17 Mon Sep 17 00:00:00 2001
+From: Dominique Leuenberger <dimstar@opensuse.org>
+Date: Tue, 10 Jan 2012 16:32:50 +0000
+Subject: gobject-introspection: fix build of the .gir and .typelib files.
+
+---
+diff --git a/babl/Makefile.am b/babl/Makefile.am
+index cefab57..03115a3 100644
+--- a/babl/Makefile.am
++++ b/babl/Makefile.am
+@@ -93,10 +93,10 @@ INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir)
+ INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
+
+ if HAVE_INTROSPECTION
+-Babl-$(BABL_API_VERSION).gir: $(G_IR_SCANNER) $(library_include_HEADERS) $(c_sources) $(srcdir)/Makefile.am
++Babl-$(BABL_API_VERSION).gir: $(G_IR_SCANNER) $(library_include_HEADERS) $(c_sources) $(srcdir)/Makefile.am libbabl-@BABL_API_VERSION@.la
+ $(INTROSPECTION_SCANNER) -v --namespace Babl --nsversion=$(BABL_API_VERSION) \
+ --add-include-path=$(srcdir) --add-include-path=. \
+- --library=babl-$(BABL_API_VERSION) \
++ --library=$(builddir)/libbabl-$(BABL_API_VERSION).la \
+ --libtool="$(LIBTOOL)" \
+ --output $@ \
+ -DBABL_IS_BEING_COMPILED \
+--
+cgit v0.9.1
diff --git a/media-libs/babl/metadata.xml b/media-libs/babl/metadata.xml
new file mode 100644
index 000000000000..392c18acea45
--- /dev/null
+++ b/media-libs/babl/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>sping@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/media-libs/bio2jack/Manifest b/media-libs/bio2jack/Manifest
new file mode 100644
index 000000000000..9b3a8d13d2c2
--- /dev/null
+++ b/media-libs/bio2jack/Manifest
@@ -0,0 +1 @@
+DIST bio2jack-0.9.tar.gz 527385 SHA256 1695b1713341279b80cb51c7d3d793102c19793546bfff5b73e882f2e5dec9e8
diff --git a/media-libs/bio2jack/bio2jack-0.9-r1.ebuild b/media-libs/bio2jack/bio2jack-0.9-r1.ebuild
new file mode 100644
index 000000000000..791264938bd4
--- /dev/null
+++ b/media-libs/bio2jack/bio2jack-0.9-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
+
+DESCRIPTION="A library for porting blocked I/O OSS/ALSA audio applications to JACK"
+HOMEPAGE="http://bio2jack.sourceforge.net/"
+SRC_URI="mirror://sourceforge/bio2jack/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm hppa ~ia64 ppc ppc64 ~sh sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="static-libs"
+
+RDEPEND="media-libs/libsamplerate
+ media-sound/jack-audio-connection-kit"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ # upstream does not provide a real release, it releases a tarball
+ # with a _prebuilt_ copy of bio2jack. Drop all of the built stuff
+ # and recreate autotools from scratch, then build.
+ rm -rf *.a *.o *.la *.lo .libs .deps Makefile config.{log,status} stamp-h1 stamp || die
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --enable-shared \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dobin bio2jack-config
+ dodoc AUTHORS ChangeLog NEWS README
+ rm -f "${ED}"usr/lib*/lib*.la
+}
diff --git a/media-libs/bio2jack/metadata.xml b/media-libs/bio2jack/metadata.xml
new file mode 100644
index 000000000000..43393326f925
--- /dev/null
+++ b/media-libs/bio2jack/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>sound</herd>
+ <upstream>
+ <remote-id type="sourceforge">bio2jack</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/blib/Manifest b/media-libs/blib/Manifest
new file mode 100644
index 000000000000..b14758894267
--- /dev/null
+++ b/media-libs/blib/Manifest
@@ -0,0 +1 @@
+DIST blib-1.1.7.tar.gz 570809 RMD160 7aec4f931c7e12ec8a2a1934c26d17d3185ed7a4 SHA1 3f5d8b0cbc420de0d4799082fbc9737099c2738c SHA256 b42d72762508e101a40ed4789dff2b2edbf996cde19fb92a581249f5a40d6007
diff --git a/media-libs/blib/blib-1.1.7-r1.ebuild b/media-libs/blib/blib-1.1.7-r1.ebuild
new file mode 100644
index 000000000000..8591e3b61dad
--- /dev/null
+++ b/media-libs/blib/blib-1.1.7-r1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+DESCRIPTION="blib is a library full of useful things to hack the Blinkenlights"
+HOMEPAGE="http://www.blinkenlights.de"
+SRC_URI="http://www.blinkenlights.de/dist/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="aalib gtk directfb"
+
+RDEPEND=">=dev-libs/glib-2
+ aalib? ( >=media-libs/aalib-1.4_rc4-r2 )
+ directfb? ( >=dev-libs/DirectFB-0.9.20-r1 )
+ gtk? ( >=x11-libs/gtk+-2.4.4:2 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ # Drop DEPRECATED flags, bug #391105
+ sed -i -e 's:-D[A-Z_]*DISABLE_DEPRECATED:$(NULL):g' \
+ blib/Makefile.am blib/Makefile.in \
+ gfx/Makefile.am gfx/Makefile.in \
+ modules/Makefile.am modules/Makefile.in \
+ test/modules/Makefile.am test/modules/Makefile.in || die
+}
+
+src_configure() {
+ econf \
+ $(use_enable aalib) \
+ $(use_enable directfb) \
+ $(use_enable gtk gtk2)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ dodoc AUTHORS ChangeLog NEWS README
+}
diff --git a/media-libs/blib/metadata.xml b/media-libs/blib/metadata.xml
new file mode 100644
index 000000000000..edccfe5754d2
--- /dev/null
+++ b/media-libs/blib/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-libs/cal3d/Manifest b/media-libs/cal3d/Manifest
new file mode 100644
index 000000000000..fd59d35f595d
--- /dev/null
+++ b/media-libs/cal3d/Manifest
@@ -0,0 +1 @@
+DIST cal3d-0.11.0.tar.gz 568532 SHA256 fc4a6fe311004987377ec80b804a04aab44c32085fd974d275aa9d0b14144b06 SHA512 4dc4b36b8f18760bfe6f8c80cbd941c14e2ebe596d0cd514fdb1ae4175bf2706e125665272d67ff21d33bb4b34e7be22bad9c00d488c1da21f442550bf3f204f WHIRLPOOL cf6f1343556a97fe743482d6f34d147c7a68e77daf5f1ca7b4958da4b3cdd3e1c807b4eaaff7c26428e5e999733fc20c82b25ddc7dc56ae6ca58a92b61645457
diff --git a/media-libs/cal3d/cal3d-0.11.0-r1.ebuild b/media-libs/cal3d/cal3d-0.11.0-r1.ebuild
new file mode 100644
index 000000000000..c8e8198cd264
--- /dev/null
+++ b/media-libs/cal3d/cal3d-0.11.0-r1.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils autotools
+
+DESCRIPTION="Cal3D is a skeletal based character animation library"
+HOMEPAGE="http://home.gna.org/cal3d"
+SRC_URI="http://download.gna.org/cal3d/sources/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ~ia64 ppc x86 ~x86-fbsd"
+IUSE="16bit-indices debug doc"
+
+DEPEND="doc? (
+ app-doc/doxygen
+ app-text/docbook-sgml-utils
+ )"
+RDEPEND=""
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-gcc43.patch \
+ "${FILESDIR}"/${P}-tests.patch \
+ "${FILESDIR}"/${P}-verbose.patch
+ sed -i \
+ -e "s:db2html:docbook2html:g" \
+ configure.in \
+ docs/Makefile.am \
+ || die "sed for doc failed"
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable debug) \
+ $(use_enable 16bit-indices)
+}
+
+src_compile() {
+ emake
+ if use doc; then
+ cd docs
+ emake doc-api
+ emake doc-guide
+ mkdir -p html/{guide,api}
+ mv *.{html,gif} html/guide/
+ mv api/html/* html/api/
+ fi
+}
+
+src_install() {
+ default
+ use doc && dohtml -r docs/html/api docs/html/guide
+}
diff --git a/media-libs/cal3d/files/cal3d-0.11.0-gcc43.patch b/media-libs/cal3d/files/cal3d-0.11.0-gcc43.patch
new file mode 100644
index 000000000000..80d73b274742
--- /dev/null
+++ b/media-libs/cal3d/files/cal3d-0.11.0-gcc43.patch
@@ -0,0 +1,10 @@
+--- src/cal3d/platform.h.old 2008-04-27 23:08:41.000000000 +0200
++++ src/cal3d/platform.h 2008-04-27 23:08:56.000000000 +0200
+@@ -77,6 +77,7 @@
+ // standard includes
+ #include <stdlib.h>
+ #include <math.h>
++#include <string.h>
+
+ // debug includes
+ #include <assert.h>
diff --git a/media-libs/cal3d/files/cal3d-0.11.0-tests.patch b/media-libs/cal3d/files/cal3d-0.11.0-tests.patch
new file mode 100644
index 000000000000..3a6754f40155
--- /dev/null
+++ b/media-libs/cal3d/files/cal3d-0.11.0-tests.patch
@@ -0,0 +1,11 @@
+--- tests/Makefile.am.old 2014-10-27 12:14:44.534607920 +0100
++++ tests/Makefile.am 2014-10-27 12:16:00.825891248 +0100
+@@ -14,7 +14,7 @@
+ EXTRA_DIST = \
+ $(wildcard cal3d_converter/base.??f)
+
+-TESTS_ENVIRONMENT = sh ./run
++LOG_COMPILER = sh ./run
+ TESTS = converter/skeleton converter/mesh converter/material converter/animation
+
+ .PHONY: ${TESTS}
diff --git a/media-libs/cal3d/files/cal3d-0.11.0-verbose.patch b/media-libs/cal3d/files/cal3d-0.11.0-verbose.patch
new file mode 100644
index 000000000000..a6dfbd677bff
--- /dev/null
+++ b/media-libs/cal3d/files/cal3d-0.11.0-verbose.patch
@@ -0,0 +1,11 @@
+--- tests/run.in.old 2012-06-29 13:27:55.413765822 +0200
++++ tests/run.in 2012-06-29 13:29:02.092084095 +0200
+@@ -43,7 +43,7 @@
+ exit 1
+ ;;
+ esac
+- $VERBOSE cal3d_converter ${srcdir}/cal3d_converter/base.x$ext
++ : cal3d_converter ${srcdir}/cal3d_converter/base.x$ext
+ ../src/cal3d_converter ${srcdir}/cal3d_converter/base.x$ext base.c$ext
+ ../src/cal3d_converter base.c$ext 01.x$ext
+ ../src/cal3d_converter 01.x$ext 01.c$ext
diff --git a/media-libs/cal3d/metadata.xml b/media-libs/cal3d/metadata.xml
new file mode 100644
index 000000000000..644e9bf3eafa
--- /dev/null
+++ b/media-libs/cal3d/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>tupone@gentoo.org</email>
+ <name>Alfredo Tupone</name>
+ </maintainer>
+ <use>
+ <flag name="16bit-indices">Enables use of 16bit indices</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/ccaudio2/Manifest b/media-libs/ccaudio2/Manifest
new file mode 100644
index 000000000000..f1fbe4890732
--- /dev/null
+++ b/media-libs/ccaudio2/Manifest
@@ -0,0 +1 @@
+DIST ccaudio2-2.1.3.tar.gz 443867 SHA256 b94a898c9a2ae55c812bde810fdf89f40bc44b94fb06c4dc3e40a5341eeec301 SHA512 3f6d80a503ddacb473b559450a6fac0cba7f1788a7c17a0326b1ef66918a1403a1c69c1578fbd2f382e75969d95a116c579dae810cdd3719da24a3e25027b9ae WHIRLPOOL 9028655b082b67d28734e78b2356a80fa1066ebaefaf15d9a9be44939034484dc822114029bf0685e54cea9a891c614d863e47df1b482f3aa3eacb46e083d803
diff --git a/media-libs/ccaudio2/ccaudio2-2.1.3.ebuild b/media-libs/ccaudio2/ccaudio2-2.1.3.ebuild
new file mode 100644
index 000000000000..ee2cafb45561
--- /dev/null
+++ b/media-libs/ccaudio2/ccaudio2-2.1.3.ebuild
@@ -0,0 +1,40 @@
+# 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
+
+DESCRIPTION="C++ class framework for manipulating audio data"
+HOMEPAGE="http://www.gnu.org/software/ccaudio"
+SRC_URI="mirror://gnu/ccaudio/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="debug static-libs +speex gsm"
+
+RDEPEND="dev-libs/ucommon
+ gsm? ( media-sound/gsm )
+ speex? ( media-libs/speex )
+ "
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ "
+
+PATCHES=("${FILESDIR}"/disable_gsm_automagic.patch)
+DOCS=(AUTHORS ChangeLog INSTALL NEWS README SUPPORT THANKS TODO)
+
+REQUIRED_USE="^^ ( gsm speex )"
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable speex)
+ $(use_enable gsm)
+ )
+ autotools-utils_src_configure
+}
diff --git a/media-libs/ccaudio2/files/disable_gsm_automagic.patch b/media-libs/ccaudio2/files/disable_gsm_automagic.patch
new file mode 100644
index 000000000000..1ae6a79239c7
--- /dev/null
+++ b/media-libs/ccaudio2/files/disable_gsm_automagic.patch
@@ -0,0 +1,25 @@
+--- configure.ac.orig 2011-05-15 21:40:14.000000000 +0300
++++ configure.ac 2011-05-15 21:46:11.000000000 +0300
+@@ -138,6 +138,9 @@
+ ac_gsm_codec=false
+ ac_spx_codec=false
+
++AC_ARG_ENABLE(gsm, [ --disable-gsm disable gsm support])
++if test "$enable_gsm" != "no" ; then
++
+ AC_CHECK_HEADER(gsm/gsm.h, [
+ ac_gsm_codec=true
+ AC_DEFINE(HAVE_GSM_GSM_H, [1], [gsm header found])
+@@ -145,9 +148,11 @@
+ ],[
+ AC_CHECK_HEADER(gsm.h, [
+ AUDIO_LIBS="$AUDIO_LIBS -lgsm"
+- AC_DEFINE(HAVE_GSM_H, [1], [gsm default header])
++ AC_DEFINE(HAVE_GSM_H, [1], [gsm default header])
++
+ ])
+ ])
++fi
+
+ AC_ARG_ENABLE(speex, [ --disable-speex disable speex support])
+ if test "$enable_speex" != "no" ; then
diff --git a/media-libs/ccaudio2/metadata.xml b/media-libs/ccaudio2/metadata.xml
new file mode 100644
index 000000000000..60c7f53239ef
--- /dev/null
+++ b/media-libs/ccaudio2/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>andreis.vinogradovs@gmail.com</email>
+ <name>Andreis Vinogradovs</name>
+</maintainer>
+<maintainer>
+ <email>maksbotan@gentoo.org</email>
+ <name>Maxim Koltsov</name>
+</maintainer>
+</pkgmetadata>
diff --git a/media-libs/celt/Manifest b/media-libs/celt/Manifest
new file mode 100644
index 000000000000..918a3c59f92e
--- /dev/null
+++ b/media-libs/celt/Manifest
@@ -0,0 +1,2 @@
+DIST celt-0.11.1.tar.gz 465853 SHA256 01c2579fba8b283c9068cb704a70a6e654aa74ced064c091cafffbe6fb1d4cbf SHA512 73d17486ae0ef544baf74f7cf7d4b82b7dcba5143f480ffefec2c16ae9aa240d207aac4aa28c6888ba26e925f6d6f5545f71ef157b95906b63d017ce7b7ce842 WHIRLPOOL 7232af7abb58ef1fccc111a3ef74d1426bb807d3039067d8af37252cac4ba95395900903bbeff93257c6a097463ec3126a2d2ec14528449a0424a7db6dc23d8a
+DIST celt-0.5.1.3.tar.gz 440772 SHA256 fc2e5b68382eb436a38c3104684a6c494df9bde133c139fbba3ddb5d7eaa6a2e SHA512 bf5621dc3ec1b0808bdd83f006fd7b88df1b6caffe07e18eb696c268b31c6c7127329ecb4c9582c44e0ecf9577bbe2f3dbe40f15b80f8681bb7f4115f1501921 WHIRLPOOL 86355696a7aaef2d1dfc51526c29c5e39cdb6ef8e19cd23f8f49fa5b8d962ced8f395684c869a77bc67e20320c28ecf5c9d8bf8eb690f84bfccad3013736c3fd
diff --git a/media-libs/celt/celt-0.11.1-r1.ebuild b/media-libs/celt/celt-0.11.1-r1.ebuild
new file mode 100644
index 000000000000..b7644e72dd9e
--- /dev/null
+++ b/media-libs/celt/celt-0.11.1-r1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib-minimal
+
+DESCRIPTION="CELT is a very low delay audio codec designed for high-quality communications"
+HOMEPAGE="http://www.celt-codec.org/"
+SRC_URI="http://downloads.us.xiph.org/releases/${PN}/${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ~ia64 ppc ~ppc64 ~sparc x86"
+IUSE="ogg static-libs"
+
+DEPEND="ogg? ( media-libs/libogg )"
+RDEPEND="${DEPEND}"
+DOCS=( README TODO )
+
+multilib_src_configure() {
+ # ogg is for the binaries
+ local myconf="--without-ogg"
+ multilib_is_native_abi && myconf="$(use_with ogg ogg /usr)"
+
+ ECONF_SOURCE="${S}" econf \
+ $(use_enable static-libs static) \
+ ${myconf}
+}
+
+multilib_src_install_all() {
+ prune_libtool_files
+ einstalldocs
+}
diff --git a/media-libs/celt/celt-0.5.1.3.ebuild b/media-libs/celt/celt-0.5.1.3.ebuild
new file mode 100644
index 000000000000..73c9cac86611
--- /dev/null
+++ b/media-libs/celt/celt-0.5.1.3.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+DESCRIPTION="CELT is a very low delay audio codec designed for high-quality communications"
+HOMEPAGE="http://www.celt-codec.org/"
+SRC_URI="http://downloads.us.xiph.org/releases/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0.5.1"
+KEYWORDS="alpha amd64 arm ia64 ppc ppc64 sparc x86"
+IUSE="ogg static-libs"
+
+DEPEND="ogg? ( media-libs/libogg )"
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ $(use_with ogg ogg /usr)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed."
+ dodoc README TODO || die "dodoc failed."
+
+ use static-libs || find "${D}" -name '*.la' -delete
+}
diff --git a/media-libs/celt/metadata.xml b/media-libs/celt/metadata.xml
new file mode 100644
index 000000000000..07e45eced00b
--- /dev/null
+++ b/media-libs/celt/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>sound</herd>
+ <maintainer>
+ <email>tgurr@gentoo.org</email>
+ </maintainer>
+ <longdescription>
+ CELT is a very low delay audio codec designed for high-quality
+ communications.
+ </longdescription>
+</pkgmetadata>
diff --git a/media-libs/chromaprint/Manifest b/media-libs/chromaprint/Manifest
new file mode 100644
index 000000000000..534579ef0538
--- /dev/null
+++ b/media-libs/chromaprint/Manifest
@@ -0,0 +1,4 @@
+DIST chromaprint-0.6.tar.gz 542366 SHA256 5d9b82da226450c14e43482371a1b2a178e2604ab5b2e9259f33b1b461ee9d63
+DIST chromaprint-0.7.tar.gz 543811 SHA256 4e52c3fd443c91a5c429557753d4ba3f9d31d183810412c0d8600892f3975501 SHA512 2ac03f80888d6c12dd05c20adc82e0f2c9e6bf5edc099d7c7b719b8cb353151fb04b78f5c7bca672d5fe8357a791e86fdea7b6952a0d64c346c079548ebfcd38 WHIRLPOOL 34c5cb7c38dc0e4924e068ff0a695e571fdd2233046ef6ea84e9e0e27e6bf9f5eaedceb79c2f8120e9ac6eb30ace3bc9e15ba59027cd498426e7f94536e2da84
+DIST chromaprint-1.1.tar.gz 542360 SHA256 6b14d7ea4964581b73bd3f8038c8857c01e446421c1ae99cbbf64de26b47cd12 SHA512 3d439dfca979e2babc8d2c171b5cb36fd0a5d3b7475e02a0f8bae436f7096e189674b640119f0dccf7cc2cd214bd8674d46b018952f1e3e93ddc0ba19b5155f9 WHIRLPOOL 726c7710f7bd1c138d7ebd1de263a0e214cbd79faf60e35034a60cfd68a9d3b4e52fc1cc93ce4dc7d39683e3a5ac1d7e9bd6c8046cdb5cece83b9c2fbf4971b5
+DIST chromaprint-1.2.tar.gz 529646 SHA256 822b8949a322ac04c6f8a3ed78f5e689bcc493c6ca0972bf627c913c8430031a SHA512 dc61db8894a20df3d7e7317cd7cd97148c19be5854dd66409341cb8e47c045e1c632b254e14a869279983a5af2cc6f9effea21b77a63dff729511e6144439cbb WHIRLPOOL b2efb45c23e950b6a4d95c078bed15b03ef35e423b106428a7607034276b343b8c223ffa71e021846ed48f535663e062ae8042d281d769a04effc9afd8a600dd
diff --git a/media-libs/chromaprint/chromaprint-0.6.ebuild b/media-libs/chromaprint/chromaprint-0.6.ebuild
new file mode 100644
index 000000000000..1399c0cc13ca
--- /dev/null
+++ b/media-libs/chromaprint/chromaprint-0.6.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit cmake-utils
+
+DESCRIPTION="A client-side library that implements a custom algorithm for extracting fingerprints"
+HOMEPAGE="http://acoustid.org/chromaprint"
+SRC_URI="mirror://github/lalinsky/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="test tools"
+
+# note: use ffmpeg instead of fftw because it's recommended and required for tools
+RDEPEND=">=virtual/ffmpeg-0.6
+ tools? ( >=media-libs/taglib-1.6 )"
+DEPEND="${RDEPEND}
+ test? ( dev-cpp/gtest )
+ tools? ( dev-libs/boost )"
+
+DOCS="NEWS.txt README.txt"
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_build tools EXAMPLES)
+ $(cmake-utils_use_build test TESTS)
+ $(cmake-utils_use_build tools)
+ -DWITH_AVFFT=ON
+ )
+
+ cmake-utils_src_configure
+}
+
+src_test() {
+ cd "${CMAKE_BUILD_DIR}" || die
+ emake check
+}
+
+src_install() {
+ cmake-utils_src_install
+ use tools && dobin "${CMAKE_BUILD_DIR}"/tools/fpcollect
+}
diff --git a/media-libs/chromaprint/chromaprint-0.7.ebuild b/media-libs/chromaprint/chromaprint-0.7.ebuild
new file mode 100644
index 000000000000..062c6e0a0f5b
--- /dev/null
+++ b/media-libs/chromaprint/chromaprint-0.7.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit cmake-utils
+
+DESCRIPTION="A client-side library that implements a custom algorithm for extracting fingerprints"
+HOMEPAGE="http://acoustid.org/chromaprint"
+SRC_URI="mirror://github/lalinsky/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="test tools"
+
+# note: use ffmpeg instead of fftw because it's recommended and required for tools
+RDEPEND=">=virtual/ffmpeg-0.10
+ tools? ( >=media-libs/taglib-1.6 )"
+DEPEND="${RDEPEND}
+ test? (
+ dev-cpp/gtest
+ dev-libs/boost
+ )
+ tools? ( dev-libs/boost )"
+
+DOCS="NEWS.txt README.txt"
+
+PATCHES=( "${FILESDIR}"/${P}-boost.patch
+ "${FILESDIR}"/${P}-ffmpeg.patch
+ "${FILESDIR}"/${P}-libav9.patch )
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_build tools EXAMPLES)
+ $(cmake-utils_use_build test TESTS)
+ $(cmake-utils_use_build tools)
+ -DWITH_AVFFT=ON
+ )
+
+ cmake-utils_src_configure
+}
+
+src_test() {
+ cd "${CMAKE_BUILD_DIR}" || die
+ emake check
+}
+
+src_install() {
+ cmake-utils_src_install
+ use tools && dobin "${CMAKE_BUILD_DIR}"/tools/fpcollect
+}
diff --git a/media-libs/chromaprint/chromaprint-1.1.ebuild b/media-libs/chromaprint/chromaprint-1.1.ebuild
new file mode 100644
index 000000000000..80080d956f53
--- /dev/null
+++ b/media-libs/chromaprint/chromaprint-1.1.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 cmake-utils
+
+DESCRIPTION="A client-side library that implements a custom algorithm for extracting fingerprints"
+HOMEPAGE="http://acoustid.org/chromaprint"
+SRC_URI="https://bitbucket.org/acoustid/${PN}/downloads/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86 ~amd64-fbsd"
+IUSE="test tools"
+
+# note: use ffmpeg instead of fftw because it's recommended and required for tools
+RDEPEND="
+ >=virtual/ffmpeg-0.10
+ tools? ( >=media-libs/taglib-1.6 )"
+DEPEND="${RDEPEND}
+ test? (
+ dev-cpp/gtest
+ dev-libs/boost
+ )
+ tools? ( dev-libs/boost )"
+
+DOCS="NEWS.txt README.txt"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.7-ffmpeg.patch
+ "${FILESDIR}"/${P}-gtest.patch
+ "${FILESDIR}"/${P}-ffmpeg2.patch
+ "${FILESDIR}"/${P}-libav_build_fix_for_tools.patch
+)
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_build tools EXAMPLES)
+ $(cmake-utils_use_build test TESTS)
+ $(cmake-utils_use_build tools)
+ -DWITH_AVFFT=ON
+ )
+ cmake-utils_src_configure
+}
+
+src_test() {
+ cd "${BUILD_DIR}" || die
+ emake check
+}
+
+src_install() {
+ cmake-utils_src_install
+ use tools && dobin "${BUILD_DIR}"/tools/fpcollect
+}
diff --git a/media-libs/chromaprint/chromaprint-1.2.ebuild b/media-libs/chromaprint/chromaprint-1.2.ebuild
new file mode 100644
index 000000000000..670ff3859c7b
--- /dev/null
+++ b/media-libs/chromaprint/chromaprint-1.2.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 cmake-utils
+
+DESCRIPTION="A client-side library that implements a custom algorithm for extracting fingerprints"
+HOMEPAGE="http://acoustid.org/chromaprint"
+SRC_URI="https://bitbucket.org/acoustid/${PN}/downloads/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~ppc ~ppc64 x86 ~amd64-fbsd"
+IUSE="libav test tools"
+
+# note: use ffmpeg or libav instead of fftw because it's recommended and required for tools
+RDEPEND="
+ libav? ( media-video/libav:0= )
+ !libav? ( media-video/ffmpeg:0= )
+"
+DEPEND="${RDEPEND}
+ test? (
+ dev-cpp/gtest
+ dev-libs/boost
+ )"
+
+DOCS="NEWS.txt README.md"
+
+PATCHES=( "${FILESDIR}"/${PN}-1.1-gtest.patch )
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_build tools EXAMPLES)
+ $(cmake-utils_use_build test TESTS)
+ -DWITH_AVFFT=ON
+ )
+ cmake-utils_src_configure
+}
+
+src_test() {
+ cd "${BUILD_DIR}" || die
+ emake check
+}
+
+src_install() {
+ cmake-utils_src_install
+}
diff --git a/media-libs/chromaprint/files/chromaprint-0.7-boost.patch b/media-libs/chromaprint/files/chromaprint-0.7-boost.patch
new file mode 100644
index 000000000000..46df857689de
--- /dev/null
+++ b/media-libs/chromaprint/files/chromaprint-0.7-boost.patch
@@ -0,0 +1,8 @@
+--- chromaprint-0.7/tests/CMakeLists.txt
++++ chromaprint-0.7/tests/CMakeLists.txt
+@@ -1,4 +1,5 @@
+ include_directories(
++ ${Boost_INCLUDE_DIRS}
+ ${GTEST_INCLUDE_DIRS}
+ ${CMAKE_CURRENT_SOURCE_DIR}/../src
+ )
diff --git a/media-libs/chromaprint/files/chromaprint-0.7-ffmpeg.patch b/media-libs/chromaprint/files/chromaprint-0.7-ffmpeg.patch
new file mode 100644
index 000000000000..f51e7794b6d8
--- /dev/null
+++ b/media-libs/chromaprint/files/chromaprint-0.7-ffmpeg.patch
@@ -0,0 +1,43 @@
+https://bugs.gentoo.org/show_bug.cgi?id=435856
+https://raw.github.com/pld-linux/chromaprint/master/chromaprint-ffmpeg.patch
+
+--- chromaprint-0.7/src/ext/ffmpeg_decoder.h.orig 2012-09-05 20:05:36.000000000 +0200
++++ chromaprint-0.7/src/ext/ffmpeg_decoder.h 2012-10-10 17:59:58.632685943 +0200
+@@ -80,7 +80,7 @@
+ avcodec_close(m_codec_ctx);
+ }
+ if (m_format_ctx) {
+- av_close_input_file(m_format_ctx);
++ avformat_close_input(&m_format_ctx);
+ }
+ //av_audio_convert_free(m_convert_ctx);
+ av_free(m_buffer2);
+@@ -89,12 +89,12 @@
+
+ inline bool Decoder::Open()
+ {
+- if (av_open_input_file(&m_format_ctx, m_file_name.c_str(), NULL, 0, NULL) != 0) {
++ if (avformat_open_input(&m_format_ctx, m_file_name.c_str(), NULL, NULL) != 0) {
+ m_error = "Couldn't open the file." + m_file_name;
+ return false;
+ }
+
+- if (av_find_stream_info(m_format_ctx) < 0) {
++ if (avformat_find_stream_info(m_format_ctx, NULL) < 0) {
+ m_error = "Couldn't find stream information in the file.";
+ return false;
+ }
+@@ -129,11 +129,11 @@
+ return false;
+ }
+
+- if (m_codec_ctx->sample_fmt != SAMPLE_FMT_S16) {
++ if (m_codec_ctx->sample_fmt != AV_SAMPLE_FMT_S16) {
+ m_error = "Unsupported sample format.\n";
+ return false;
+ }
+- /*m_convert_ctx = av_audio_convert_alloc(SAMPLE_FMT_S16, 1,
++ /*m_convert_ctx = av_audio_convert_alloc(AV_SAMPLE_FMT_S16, 1,
+ m_codec_ctx->sample_fmt, 1,
+ NULL, 0);
+ if (!m_convert_ctx) {
diff --git a/media-libs/chromaprint/files/chromaprint-0.7-libav9.patch b/media-libs/chromaprint/files/chromaprint-0.7-libav9.patch
new file mode 100644
index 000000000000..c52097056377
--- /dev/null
+++ b/media-libs/chromaprint/files/chromaprint-0.7-libav9.patch
@@ -0,0 +1,44 @@
+diff -burN chromaprint-0.7.orig//src/fft_lib_avfft.h chromaprint-0.7/src/fft_lib_avfft.h
+--- chromaprint-0.7.orig//src/fft_lib_avfft.h 2012-09-05 20:05:36.000000000 +0200
++++ chromaprint-0.7/src/fft_lib_avfft.h 2013-02-16 17:34:08.682624779 +0100
+@@ -25,6 +25,7 @@
+ extern "C" {
+ #include <libavcodec/avcodec.h>
+ #include <libavcodec/avfft.h>
++#include <libavutil/mem.h>
+ }
+ #include "combined_buffer.h"
+
+diff -burN chromaprint-0.7.orig/examples/fpcalc.c chromaprint-0.7/work/chromaprint-0.7/examples/fpcalc.c
+--- chromaprint-0.7.orig/examples/fpcalc.c 2012-09-05 20:05:36.000000000 +0200
++++ chromaprint-0.7/examples/fpcalc.c 2013-02-16 17:40:09.947611629 +0100
+@@ -42,7 +42,7 @@
+ goto done;
+ }
+
+- if (av_find_stream_info(format_ctx) < 0) {
++ if (avformat_find_stream_info(format_ctx, NULL) < 0) {
+ fprintf(stderr, "ERROR: couldn't find stream information in the file\n");
+ goto done;
+ }
+@@ -65,7 +65,7 @@
+ goto done;
+ }
+
+- if (avcodec_open(codec_ctx, codec) < 0) {
++ if (avcodec_open2(codec_ctx, codec, NULL) < 0) {
+ fprintf(stderr, "ERROR: couldn't open the codec\n");
+ goto done;
+ }
+diff -burN chromaprint-0.7.orig/src/ext/ffmpeg_decoder.h chromaprint-0.7/src/ext/ffmpeg_decoder.h
+--- chromaprint-0.7.orig/src/ext/ffmpeg_decoder.h 2013-02-16 17:49:06.799592088 +0100
++++ chromaprint-0.7/src/ext/ffmpeg_decoder.h 2013-02-16 17:49:54.037590369 +0100
+@@ -124,7 +124,7 @@
+ return false;
+ }
+
+- if (avcodec_open(m_codec_ctx, codec) < 0) {
++ if (avcodec_open2(m_codec_ctx, codec, NULL) < 0) {
+ m_error = "Couldn't open the codec.";
+ return false;
+ }
diff --git a/media-libs/chromaprint/files/chromaprint-1.0-libav9.patch b/media-libs/chromaprint/files/chromaprint-1.0-libav9.patch
new file mode 100644
index 000000000000..e8167903471f
--- /dev/null
+++ b/media-libs/chromaprint/files/chromaprint-1.0-libav9.patch
@@ -0,0 +1,11 @@
+--- chromaprint-1.0.orig/src/ext/ffmpeg_decoder.h 2013-11-03 17:32:04.347686878 +0800
++++ chromaprint-1.0/src/ext/ffmpeg_decoder.h 2013-11-03 17:32:41.082686494 +0800
+@@ -124,7 +124,7 @@
+ return false;
+ }
+
+- if (avcodec_open(m_codec_ctx, codec) < 0) {
++ if (avcodec_open2(m_codec_ctx, codec, NULL) < 0) {
+ m_error = "Couldn't open the codec.";
+ return false;
+ }
diff --git a/media-libs/chromaprint/files/chromaprint-1.1-ffmpeg2.patch b/media-libs/chromaprint/files/chromaprint-1.1-ffmpeg2.patch
new file mode 100644
index 000000000000..2a68de3105dc
--- /dev/null
+++ b/media-libs/chromaprint/files/chromaprint-1.1-ffmpeg2.patch
@@ -0,0 +1,13 @@
+--- chromaprint-1.1/src/ext/ffmpeg_decoder.h
++++ chromaprint-1.1/src/ext/ffmpeg_decoder.h
+@@ -28,6 +28,10 @@
+ }
+ #include "audio_consumer.h"
+
++#ifndef AVCODEC_MAX_AUDIO_FRAME_SIZE
++# define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000
++#endif
++
+ class Decoder
+ {
+ public:
diff --git a/media-libs/chromaprint/files/chromaprint-1.1-gtest.patch b/media-libs/chromaprint/files/chromaprint-1.1-gtest.patch
new file mode 100644
index 000000000000..8305ae7c1af0
--- /dev/null
+++ b/media-libs/chromaprint/files/chromaprint-1.1-gtest.patch
@@ -0,0 +1,104 @@
+ cmake/modules/FindGTest.cmake | 82 -------------------------------------------
+ tests/CMakeLists.txt | 1 -
+ 2 files changed, 83 deletions(-)
+
+diff --git a/cmake/modules/FindGTest.cmake b/cmake/modules/FindGTest.cmake
+deleted file mode 100644
+index 21dc2f5..0000000
+--- a/cmake/modules/FindGTest.cmake
++++ /dev/null
+@@ -1,82 +0,0 @@
+-# Locate the Google C++ Testing Framework source directory.
+-#
+-# Defines the following variables:
+-#
+-# GTEST_FOUND - Found the Google Testing framework sources
+-# GTEST_INCLUDE_DIRS - Include directories
+-# GTEST_SOURCE_DIR - Source code directory
+-# GTEST_LIBRARIES - libgtest
+-# GTEST_MAIN_LIBRARIES - libgtest-main
+-# GTEST_BOTH_LIBRARIES - libgtest & libgtest-main
+-#
+-# Accepts the following variables as input:
+-#
+-# GTEST_ROOT - (as CMake or environment variable)
+-# The root directory of the gtest install prefix
+-#
+-# Example usage:
+-#
+-# find_package(GTest REQUIRED)
+-# include_directories(${GTEST_INCLUDE_DIRS})
+-# add_subdirectory(${GTEST_SOURCE_DIR}
+-# ${CMAKE_CURRENT_BINARY_DIR}/gtest_build)
+-#
+-# add_executable(foo foo.cc)
+-# target_link_libraries(foo ${GTEST_BOTH_LIBRARIES})
+-#
+-# enable_testing(true)
+-# add_test(AllTestsInFoo foo)
+-#
+-# =========================================================
+-#
+-# Copyright (C) 2012 Lukas Lalinsky <lalinsky@gmail.com>
+-#
+-# Redistribution and use in source and binary forms, with or without
+-# modification, are permitted provided that the following conditions are
+-# met:
+-#
+-# * Redistributions of source code must retain the above copyright notice,
+-# this list of conditions and the following disclaimer.
+-#
+-# * Redistributions in binary form must reproduce the above copyright notice,
+-# this list of conditions and the following disclaimer in the documentation
+-# and/or other materials provided with the distribution.
+-#
+-# * The names of Kitware, Inc., the Insight Consortium, or the names of
+-# any consortium members, or of any contributors, may not be used to
+-# endorse or promote products derived from this software without
+-# specific prior written permission.
+-#
+-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS''
+-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+-# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
+-# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+-# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+-# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+-# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-
+-
+-find_path(GTEST_SOURCE_DIR
+- NAMES src/gtest-all.cc CMakeLists.txt
+- HINTS $ENV{GTEST_ROOT} ${GTEST_ROOT} /usr/src/gtest
+-)
+-mark_as_advanced(GTEST_SOURCE_DIR)
+-
+-find_path(GTEST_INCLUDE_DIR
+- NAMES gtest/gtest.h
+- HINTS $ENV{GTEST_ROOT}/include ${GTEST_ROOT}/include
+-)
+-mark_as_advanced(GTEST_INCLUDE_DIR)
+-
+-include(FindPackageHandleStandardArgs)
+-find_package_handle_standard_args(GTest DEFAULT_MSG GTEST_SOURCE_DIR GTEST_INCLUDE_DIR)
+-
+-if(GTEST_FOUND)
+- set(GTEST_INCLUDE_DIRS ${GTEST_INCLUDE_DIR})
+- set(GTEST_LIBRARIES gtest)
+- set(GTEST_MAIN_LIBRARIES gtest_main)
+- set(GTEST_BOTH_LIBRARIES ${GTEST_LIBRARIES} ${GTEST_MAIN_LIBRARIES})
+-endif()
+diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
+index 791cd96..9115391 100644
+--- a/tests/CMakeLists.txt
++++ b/tests/CMakeLists.txt
+@@ -3,7 +3,6 @@ include_directories(
+ ${Boost_INCLUDE_DIRS}
+ ${CMAKE_CURRENT_SOURCE_DIR}/../src
+ )
+-add_subdirectory(${GTEST_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/gtest_build)
+
+ set(tests_SOURCES
+ main.cpp
diff --git a/media-libs/chromaprint/files/chromaprint-1.1-libav_build_fix_for_tools.patch b/media-libs/chromaprint/files/chromaprint-1.1-libav_build_fix_for_tools.patch
new file mode 100644
index 000000000000..b53f79838091
--- /dev/null
+++ b/media-libs/chromaprint/files/chromaprint-1.1-libav_build_fix_for_tools.patch
@@ -0,0 +1,59 @@
+http://bugs.gentoo.org/498194
+http://bitbucket.org/acoustid/chromaprint/commits/90822f6eee64da2941c9cbd9cd41a9664fead1d4
+
+From 90822f6eee64da2941c9cbd9cd41a9664fead1d4 Mon Sep 17 00:00:00 2001
+From: Urs Fleisch <ufleisch@users.sourceforge.net>
+Date: Sat, 28 Dec 2013 09:47:31 +0100
+Subject: [PATCH] Build fpcalc if neither HAVE_SWRESAMPLE nor HAVE_AVRESAMPLE
+ defined, issue #11.
+
+---
+ examples/fpcalc.c | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/examples/fpcalc.c b/examples/fpcalc.c
+index a4b0ff9..e73e358 100644
+--- a/examples/fpcalc.c
++++ b/examples/fpcalc.c
+@@ -33,6 +33,8 @@ int decode_audio_file(ChromaprintContext *chromaprint_ctx, const char *file_name
+ SwrContext *convert_ctx = NULL;
+ #elif defined(HAVE_AVRESAMPLE)
+ AVAudioResampleContext *convert_ctx = NULL;
++#else
++ void *convert_ctx = NULL;
+ #endif
+ int max_dst_nb_samples = 0, dst_linsize = 0;
+ uint8_t *dst_data[1] = { NULL };
+@@ -75,6 +77,7 @@ int decode_audio_file(ChromaprintContext *chromaprint_ctx, const char *file_name
+ goto done;
+ }
+
++#if defined(HAVE_SWRESAMPLE) || defined(HAVE_AVRESAMPLE)
+ if (codec_ctx->sample_fmt != AV_SAMPLE_FMT_S16) {
+ int64_t channel_layout = codec_ctx->channel_layout;
+ if (!channel_layout) {
+@@ -111,6 +114,7 @@ int decode_audio_file(ChromaprintContext *chromaprint_ctx, const char *file_name
+ }
+ #endif
+ }
++#endif
+
+ if (stream->duration != AV_NOPTS_VALUE) {
+ *duration = stream->time_base.num * stream->duration / stream->time_base.den;
+@@ -155,10 +159,11 @@ int decode_audio_file(ChromaprintContext *chromaprint_ctx, const char *file_name
+ max_dst_nb_samples = frame->nb_samples;
+ }
+ #if defined(HAVE_SWRESAMPLE)
+- if (swr_convert(convert_ctx, dst_data, frame->nb_samples, (const uint8_t **)frame->data, frame->nb_samples) < 0) {
++ if (swr_convert(convert_ctx, dst_data, frame->nb_samples, (const uint8_t **)frame->data, frame->nb_samples) < 0)
+ #elif defined(HAVE_AVRESAMPLE)
+- if (avresample_convert(convert_ctx, dst_data, 0, frame->nb_samples, (uint8_t **)frame->data, 0, frame->nb_samples) < 0) {
++ if (avresample_convert(convert_ctx, dst_data, 0, frame->nb_samples, (uint8_t **)frame->data, 0, frame->nb_samples) < 0)
+ #endif
++ {
+ fprintf(stderr, "ERROR: couldn't convert the audio\n");
+ goto done;
+ }
+--
+1.9.rc2.211.gd198f5d
+
diff --git a/media-libs/chromaprint/metadata.xml b/media-libs/chromaprint/metadata.xml
new file mode 100644
index 000000000000..4cd6b6d902a3
--- /dev/null
+++ b/media-libs/chromaprint/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>sound</herd>
+ <use>
+ <flag name="tools">Build and install fpcalc and fpcollect tools</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/cimg/Manifest b/media-libs/cimg/Manifest
new file mode 100644
index 000000000000..1912343137df
--- /dev/null
+++ b/media-libs/cimg/Manifest
@@ -0,0 +1 @@
+DIST CImg-1.5.2.zip 12824193 SHA256 4c6939d7d3c57752bb347362eca26eafb497571246d0d4c5f22d49721f8bc63f SHA512 a6927cecb524da128a58de9d655c2bb948bb61f654d6f95c7fe2690d39a521fea5313326610c2b56b370f76139f753469b7e4366196dd83db18c5a0c3b307b52 WHIRLPOOL f5141eac762a2e6124fd6f88d0c54da4398321b043640d83665bd0e66af51067846d2d61be309b45efbddc111ffa79c61d4569268d504cb10ffa60b96acffb82
diff --git a/media-libs/cimg/cimg-1.5.2.ebuild b/media-libs/cimg/cimg-1.5.2.ebuild
new file mode 100644
index 000000000000..ded123250df9
--- /dev/null
+++ b/media-libs/cimg/cimg-1.5.2.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+MY_P="CImg-${PV}"
+
+DESCRIPTION="C++ template image processing toolkit"
+HOMEPAGE="http://cimg.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.zip"
+
+LICENSE="CeCILL-2 CeCILL-C"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+DEPEND="app-arch/unzip"
+
+S=${WORKDIR}/${MY_P}
+
+src_install() {
+ dodoc README.txt
+ doheader CImg.h
+ use doc && dohtml -r html/
+}
diff --git a/media-libs/cimg/metadata.xml b/media-libs/cimg/metadata.xml
new file mode 100644
index 000000000000..fe1493dba75c
--- /dev/null
+++ b/media-libs/cimg/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>qt</herd>
+ <upstream>
+ <remote-id type="sourceforge">cimg</remote-id>
+ <bugs-to>http://sourceforge.net/tracker/?group_id=96492</bugs-to>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/clutter-gst/Manifest b/media-libs/clutter-gst/Manifest
new file mode 100644
index 000000000000..3ea5f1cbc1d1
--- /dev/null
+++ b/media-libs/clutter-gst/Manifest
@@ -0,0 +1,3 @@
+DIST clutter-gst-2.0.16.tar.xz 357380 SHA256 a944f84186937021aba6329c23954f6015d33bf151ba8994e13c59cefd742039 SHA512 ace0eceb8f99ad78190f6ebb9caf45ccc5597fff2e4dfda4e3bf539e87f41d3d60f66637219244bd28fe32f374460e3456c8dc5d0c60ac057cc73f2f1d60c764 WHIRLPOOL dd60f5722381f8e7678cd9e47b191a1e80c313c138d3cd5cb0acb1131d13ca565dd4f9e8117eda7ed1c81ae0b0bb9cca44530403615f3545ba44c012c12b70eb
+DIST clutter-gst-3.0.6.tar.xz 391404 SHA256 d6d5493ae57cc175deee479304569c419d2bb90de3be124e6f3350ae7e73df76 SHA512 bf8a4b7ae1f7ae92a05230564cb6aac8dc3d17bd7d07067bdc9a2055ca976d5c74ae92f33d91aa2315234df77e7b779e1b9b755ca62145cda47c585693eb9448 WHIRLPOOL d96b2bb4d9e293aaf3a038fb06df9d8e320f4f9fc403f005a705371d5b316bf6a08bcec71869c4252daa4f6b0caa18c31dfbea38d4e0f62740116c02a0742208
+DIST clutter-gst-3.0.8.tar.xz 390628 SHA256 582e85b88482e16f7ec719363e38fadf84fab4d4baaa21e5227a454b824f135c SHA512 37960b676d440f879fbda8b14b0d3d6974527354abc1368fa2353793eff2ef4c6b4f50b6259b0016b22ae787d022c371aa512ad4441f6217e54ee35089be8b3a WHIRLPOOL 485d00ba7fcea8c7f92aaf7c56aaaa4e022c790b6941ec317314195b2f64766ded8a7acc1673951d871e1523ccccb4fe9761b50a432eeaaf25afffb2d7abf8a8
diff --git a/media-libs/clutter-gst/clutter-gst-2.0.16.ebuild b/media-libs/clutter-gst/clutter-gst-2.0.16.ebuild
new file mode 100644
index 000000000000..2fbe050ed181
--- /dev/null
+++ b/media-libs/clutter-gst/clutter-gst-2.0.16.ebuild
@@ -0,0 +1,78 @@
+# 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"
+PYTHON_COMPAT=( python2_7 )
+
+inherit gnome2 python-any-r1
+
+HOMEPAGE="http://www.clutter-project.org/"
+DESCRIPTION="GStreamer integration library for Clutter"
+
+LICENSE="LGPL-2.1+"
+SLOT="2.0"
+KEYWORDS="~alpha amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc x86"
+IUSE="examples +introspection"
+
+# FIXME: Support for gstreamer-basevideo-0.10 (HW decoder support) is automagic
+COMMON_DEPEND="
+ >=dev-libs/glib-2.20:2
+ >=media-libs/clutter-1.6.0:1.0=[introspection?]
+ >=media-libs/cogl-1.10:1.0=[introspection?]
+ >=media-libs/gstreamer-1.2.0:1.0[introspection?]
+ >=media-libs/gst-plugins-bad-1.2.0:1.0
+ >=media-libs/gst-plugins-base-1.2.0:1.0[introspection?]
+ introspection? ( >=dev-libs/gobject-introspection-0.6.8 )
+"
+# uses goom from gst-plugins-good
+RDEPEND="${COMMON_DEPEND}
+ >=media-libs/gst-plugins-good-1.2.0:1.0
+"
+DEPEND="${COMMON_DEPEND}
+ ${PYTHON_DEPS}
+ >=dev-util/gtk-doc-am-1.8
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ # Make doc parallel installable
+ cd "${S}"/doc/reference
+ sed -e "s/\(DOC_MODULE.*=\).*/\1${PN}-${SLOT}/" \
+ -e "s/\(DOC_MAIN_SGML_FILE.*=\).*/\1${PN}-docs-${SLOT}.sgml/" \
+ -i Makefile.am Makefile.in || die
+ sed -e "s/\(<book.*name=\"\)clutter-gst/\1${PN}-${SLOT}/" \
+ -i html/clutter-gst.devhelp2 || die
+ mv clutter-gst-docs{,-${SLOT}}.sgml || die
+ mv clutter-gst-overrides{,-${SLOT}}.txt || die
+ mv clutter-gst-sections{,-${SLOT}}.txt || die
+ mv clutter-gst{,-${SLOT}}.types || die
+ mv html/clutter-gst{,-${SLOT}}.devhelp2
+
+ cd "${S}"
+ gnome2_src_prepare
+}
+
+src_configure() {
+ gnome2_src_configure \
+ --disable-maintainer-flags \
+ $(use_enable introspection)
+}
+
+src_compile() {
+ # Clutter tries to access dri without userpriv, upstream bug #661873
+ # Massive failure of a hack, see bug 360219, bug 360073, bug 363917
+ unset DISPLAY
+ gnome2_src_compile
+}
+
+src_install() {
+ gnome2_src_install
+
+ if use examples; then
+ insinto /usr/share/doc/"${PF}"/examples
+ doins examples/{*.c,*.png,README}
+ fi
+}
diff --git a/media-libs/clutter-gst/clutter-gst-3.0.6.ebuild b/media-libs/clutter-gst/clutter-gst-3.0.6.ebuild
new file mode 100644
index 000000000000..9d67d6d4dc7d
--- /dev/null
+++ b/media-libs/clutter-gst/clutter-gst-3.0.6.ebuild
@@ -0,0 +1,64 @@
+# 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"
+PYTHON_COMPAT=( python2_7 )
+
+inherit gnome2 python-any-r1
+
+HOMEPAGE="http://www.clutter-project.org/"
+DESCRIPTION="GStreamer integration library for Clutter"
+
+LICENSE="LGPL-2.1+"
+SLOT="3.0"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="examples +introspection"
+
+# >=cogl-1.18 provides cogl-2.0-experimental
+# FIXME:
+# - udev is automagic
+# - provide a USE flag for HW decode support (--enable-gl-texture-upload)
+COMMON_DEPEND="
+ >=dev-libs/glib-2.20:2
+ >=media-libs/clutter-1.20:1.0=[introspection?]
+ >=media-libs/cogl-1.18:1.0=[introspection?]
+ >=media-libs/gstreamer-1.4:1.0[introspection?]
+ >=media-libs/gst-plugins-bad-1.4:1.0
+ >=media-libs/gst-plugins-base-1.4:1.0[introspection?]
+ virtual/libgudev
+ introspection? ( >=dev-libs/gobject-introspection-0.6.8 )
+"
+# uses goom from gst-plugins-good
+RDEPEND="${COMMON_DEPEND}
+ >=media-libs/gst-plugins-good-1.4:1.0
+"
+DEPEND="${COMMON_DEPEND}
+ ${PYTHON_DEPS}
+ >=dev-util/gtk-doc-am-1.11
+ virtual/pkgconfig
+"
+
+src_configure() {
+ gnome2_src_configure \
+ --disable-maintainer-flags \
+ $(use_enable introspection)
+}
+
+src_compile() {
+ # Clutter tries to access dri without userpriv, upstream bug #661873
+ # Massive failure of a hack, see bug 360219, bug 360073, bug 363917
+ unset DISPLAY
+ gnome2_src_compile
+}
+
+src_install() {
+ gnome2_src_install
+
+ if use examples; then
+ insinto /usr/share/doc/"${PF}"/examples
+ doins examples/{*.c,*.png,README}
+ fi
+}
diff --git a/media-libs/clutter-gst/clutter-gst-3.0.8.ebuild b/media-libs/clutter-gst/clutter-gst-3.0.8.ebuild
new file mode 100644
index 000000000000..22cc272fec0d
--- /dev/null
+++ b/media-libs/clutter-gst/clutter-gst-3.0.8.ebuild
@@ -0,0 +1,64 @@
+# 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"
+PYTHON_COMPAT=( python2_7 )
+
+inherit gnome2 python-any-r1
+
+HOMEPAGE="http://www.clutter-project.org/"
+DESCRIPTION="GStreamer integration library for Clutter"
+
+LICENSE="LGPL-2.1+"
+SLOT="3.0"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="examples +introspection"
+
+# >=cogl-1.18 provides cogl-2.0-experimental
+# FIXME:
+# - udev is automagic
+# - provide a USE flag for HW decode support (--enable-gl-texture-upload)
+COMMON_DEPEND="
+ >=dev-libs/glib-2.20:2
+ >=media-libs/clutter-1.20:1.0=[introspection?]
+ >=media-libs/cogl-1.18:1.0=[introspection?]
+ >=media-libs/gstreamer-1.4:1.0[introspection?]
+ >=media-libs/gst-plugins-bad-1.4:1.0
+ >=media-libs/gst-plugins-base-1.4:1.0[introspection?]
+ virtual/libgudev
+ introspection? ( >=dev-libs/gobject-introspection-0.6.8:= )
+"
+# uses goom from gst-plugins-good
+RDEPEND="${COMMON_DEPEND}
+ >=media-libs/gst-plugins-good-1.4:1.0
+"
+DEPEND="${COMMON_DEPEND}
+ ${PYTHON_DEPS}
+ >=dev-util/gtk-doc-am-1.11
+ virtual/pkgconfig
+"
+
+src_configure() {
+ gnome2_src_configure \
+ --disable-maintainer-flags \
+ $(use_enable introspection)
+}
+
+src_compile() {
+ # Clutter tries to access dri without userpriv, upstream bug #661873
+ # Massive failure of a hack, see bug 360219, bug 360073, bug 363917
+ unset DISPLAY
+ gnome2_src_compile
+}
+
+src_install() {
+ gnome2_src_install
+
+ if use examples; then
+ insinto /usr/share/doc/"${PF}"/examples
+ doins examples/{*.c,*.png,README}
+ fi
+}
diff --git a/media-libs/clutter-gst/metadata.xml b/media-libs/clutter-gst/metadata.xml
new file mode 100644
index 000000000000..da6fd63d0085
--- /dev/null
+++ b/media-libs/clutter-gst/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>gnome</herd>
+</pkgmetadata>
diff --git a/media-libs/clutter-gtk/Manifest b/media-libs/clutter-gtk/Manifest
new file mode 100644
index 000000000000..db7ba305891d
--- /dev/null
+++ b/media-libs/clutter-gtk/Manifest
@@ -0,0 +1,2 @@
+DIST clutter-gtk-1.6.0.tar.xz 313240 SHA256 883550b574a036363239442edceb61cf3f6bedc8adc97d3404278556dc82234d SHA512 390f6964722c2e973309464a00ed0f9b2d8af33e2ff35e214ce53009f1f6bec2c5f0810c724ea58ea1321370f2b66f1d392e7dfa0e44817c9dafe29b74981f00 WHIRLPOOL a5a048aa0483d4f8efe5ed9f164d1ab5c64e1244689ea894aed13b627604bb337735681429e3f00266d19b07435a2869c0bc46d4c88be8fd21b5831d908eeb69
+DIST clutter-gtk-1.6.2.tar.xz 314600 SHA256 bbd03dfa9a20102d5cdb440513b0a035933da557ad7e9da31546034de2daf069 SHA512 60e4131878b8db6aa87c3d1cde5f978e61074f5fa471f3a725cbd7e85ea71ddf319eb3a0210683d4403613458badf564e8418e31dce608b16729215ce5e6e068 WHIRLPOOL 2e95063c9463fe7d455a2f800996525c635c58bcf001a82fd25bff0f9779054e247cbe1a66aa8ab1304011061ca42f31234a3bed4badc3ff413ad92283db5916
diff --git a/media-libs/clutter-gtk/clutter-gtk-1.6.0-r1.ebuild b/media-libs/clutter-gtk/clutter-gtk-1.6.0-r1.ebuild
new file mode 100644
index 000000000000..687fcc9adbc1
--- /dev/null
+++ b/media-libs/clutter-gtk/clutter-gtk-1.6.0-r1.ebuild
@@ -0,0 +1,52 @@
+# 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"
+
+inherit eutils gnome2
+
+DESCRIPTION="Library for embedding a Clutter canvas (stage) in GTK+"
+HOMEPAGE="https://wiki.gnome.org/Projects/Clutter"
+LICENSE="LGPL-2.1+"
+
+SLOT="1.0"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="examples +introspection"
+
+RDEPEND="
+ >=x11-libs/gtk+-3.6.0:3[introspection?]
+ >=media-libs/clutter-1.22.2-r1:1.0[introspection?]
+ media-libs/cogl:1.0=[introspection?]
+ introspection? ( >=dev-libs/gobject-introspection-0.9.12 )
+"
+DEPEND="${RDEPEND}
+ dev-util/gtk-doc-am
+ >=sys-devel/gettext-0.18
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ # patches from upstream git master
+ epatch "${FILESDIR}"/${P}-clutter_gdk_get_visual.patch
+
+ gnome2_src_prepare
+}
+
+src_configure() {
+ gnome2_src_configure \
+ --disable-maintainer-flags \
+ --enable-deprecated \
+ $(use_enable introspection)
+}
+
+src_install() {
+ gnome2_src_install
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins examples/{*.c,redhand.png}
+ fi
+}
diff --git a/media-libs/clutter-gtk/clutter-gtk-1.6.0.ebuild b/media-libs/clutter-gtk/clutter-gtk-1.6.0.ebuild
new file mode 100644
index 000000000000..394b3ef07ebf
--- /dev/null
+++ b/media-libs/clutter-gtk/clutter-gtk-1.6.0.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="yes"
+GNOME2_LA_PUNT="yes"
+
+inherit gnome2
+
+DESCRIPTION="Library for embedding a Clutter canvas (stage) in GTK+"
+HOMEPAGE="https://wiki.gnome.org/Projects/Clutter"
+LICENSE="LGPL-2.1+"
+
+SLOT="1.0"
+KEYWORDS="~alpha amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc x86"
+IUSE="examples +introspection"
+
+RDEPEND="
+ >=x11-libs/gtk+-3.6.0:3[introspection?]
+ >=media-libs/clutter-1.18.0:1.0[introspection?]
+ media-libs/cogl:1.0=[introspection?]
+ introspection? ( >=dev-libs/gobject-introspection-0.9.12 )
+"
+DEPEND="${RDEPEND}
+ dev-util/gtk-doc-am
+ >=sys-devel/gettext-0.18
+ virtual/pkgconfig
+"
+
+src_configure() {
+ gnome2_src_configure \
+ --disable-maintainer-flags \
+ --enable-deprecated \
+ $(use_enable introspection)
+}
+
+src_install() {
+ gnome2_src_install
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins examples/{*.c,redhand.png}
+ fi
+}
diff --git a/media-libs/clutter-gtk/clutter-gtk-1.6.2.ebuild b/media-libs/clutter-gtk/clutter-gtk-1.6.2.ebuild
new file mode 100644
index 000000000000..e57ee1d5c1de
--- /dev/null
+++ b/media-libs/clutter-gtk/clutter-gtk-1.6.2.ebuild
@@ -0,0 +1,45 @@
+# 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"
+
+inherit gnome2
+
+DESCRIPTION="Library for embedding a Clutter canvas (stage) in GTK+"
+HOMEPAGE="https://wiki.gnome.org/Projects/Clutter"
+LICENSE="LGPL-2.1+"
+
+SLOT="1.0"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="examples +introspection"
+
+RDEPEND="
+ >=x11-libs/gtk+-3.6.0:3[introspection?]
+ >=media-libs/clutter-1.22.3:1.0[introspection?]
+ media-libs/cogl:1.0=[introspection?]
+ introspection? ( >=dev-libs/gobject-introspection-0.9.12:= )
+"
+DEPEND="${RDEPEND}
+ dev-util/gtk-doc-am
+ >=sys-devel/gettext-0.18
+ virtual/pkgconfig
+"
+
+src_configure() {
+ gnome2_src_configure \
+ --disable-maintainer-flags \
+ --enable-deprecated \
+ $(use_enable introspection)
+}
+
+src_install() {
+ gnome2_src_install
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins examples/{*.c,redhand.png}
+ fi
+}
diff --git a/media-libs/clutter-gtk/files/clutter-gtk-1.6.0-clutter_gdk_get_visual.patch b/media-libs/clutter-gtk/files/clutter-gtk-1.6.0-clutter_gdk_get_visual.patch
new file mode 100644
index 000000000000..921eb032e5d0
--- /dev/null
+++ b/media-libs/clutter-gtk/files/clutter-gtk-1.6.0-clutter_gdk_get_visual.patch
@@ -0,0 +1,34 @@
+From 60df86a6fbc0f5893fff182b4308c2ee4d679569 Mon Sep 17 00:00:00 2001
+From: Emmanuele Bassi <ebassi@gnome.org>
+Date: Wed, 10 Jun 2015 12:03:54 +0100
+Subject: [PATCH] embed: Use the GDK visual from Clutter
+
+Instead of relying on the widget one. This is similar to what we do when
+running with the X11 backend.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=747489
+---
+ clutter-gtk/gtk-clutter-embed.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/clutter-gtk/gtk-clutter-embed.c b/clutter-gtk/gtk-clutter-embed.c
+index 64cc8b6..80b5839 100644
+--- a/clutter-gtk/gtk-clutter-embed.c
++++ b/clutter-gtk/gtk-clutter-embed.c
+@@ -327,6 +327,13 @@ gtk_clutter_embed_realize (GtkWidget *widget)
+ gint attributes_mask;
+ gint border_width;
+
++#if defined(CLUTTER_WINDOWING_GDK)
++ if (clutter_check_windowing_backend (CLUTTER_WINDOWING_GDK))
++ {
++ GdkVisual *visual = clutter_gdk_get_visual ();
++ gtk_widget_set_visual (widget, visual);
++ }
++#endif
+ #if defined(GDK_WINDOWING_X11) && defined(CLUTTER_WINDOWING_X11)
+ if (clutter_check_windowing_backend (CLUTTER_WINDOWING_X11))
+ {
+--
+2.4.3
+
diff --git a/media-libs/clutter-gtk/metadata.xml b/media-libs/clutter-gtk/metadata.xml
new file mode 100644
index 000000000000..da6fd63d0085
--- /dev/null
+++ b/media-libs/clutter-gtk/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>gnome</herd>
+</pkgmetadata>
diff --git a/media-libs/clutter/Manifest b/media-libs/clutter/Manifest
new file mode 100644
index 000000000000..977f81b5cb06
--- /dev/null
+++ b/media-libs/clutter/Manifest
@@ -0,0 +1,3 @@
+DIST clutter-1.20.2.tar.xz 5255576 SHA256 8fa5287e964e1811c339d95252b434a2bc0c60f1f42f1c854f29c71c7efeca94 SHA512 c9d8283a9d562608f5af42b1a3d1199d83ab18262e7fde6d221e1440ed5cadd3a82f9cf3f41a67330178773b05e63d07f8c24d87efb55df52e1bf2dc9e668788 WHIRLPOOL 9743048c63030dbc83b00bb9380bcc50bd6fcf71b0a4d77f44510063a7e3f687d720b4e07537d7e215b0ce4423e0af78959bceb483fe7749703c32d9ffae8a67
+DIST clutter-1.22.2.tar.xz 5304752 SHA256 8e69d21d9f7e8e89eafc072e2615c289903260c470af39bcb578b081139c11ac SHA512 002ea924f97fca89cec96a9e5850f0351cd44b960eede898fa59ef3c0c1c08f9798b34747a9590b2c59108d0ae7cbcd5c67e96a61c4e9bab1f9f6075c863e21f WHIRLPOOL b75886894b64e0b4c87a9df76b717fa420a939ebda7088a1d7a57c36408e0a2084ff5187b74feeb6093b2879e51827f4d8677e9cbef8a3ee15bd7ab39b7b72c8
+DIST clutter-1.22.4.tar.xz 5311124 SHA256 1d77ce16025f87667a1d00dc4fa617a1935156f63fd17635fdadf138866c9e1e SHA512 a3b023bff06f99443442df42295eca03e0a56acbaf6e07002afc6ab9548995a9fd7c2eba8fb7516df32573235005b53283e9c443aed782378c9acb2dea574bd9 WHIRLPOOL 86f2065b38148d533e5c5efa8c709d1d1bce364140c671b345055bd9cbfeba06d512d15e00691cb1aeee0eee48ef2380dcda859fa29707292310e026df6a78dd
diff --git a/media-libs/clutter/clutter-1.20.2.ebuild b/media-libs/clutter/clutter-1.20.2.ebuild
new file mode 100644
index 000000000000..1d86f8ea70f9
--- /dev/null
+++ b/media-libs/clutter/clutter-1.20.2.ebuild
@@ -0,0 +1,112 @@
+# 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 virtualx
+
+HOMEPAGE="https://wiki.gnome.org/Projects/Clutter"
+DESCRIPTION="Clutter is a library for creating graphical user interfaces"
+
+LICENSE="LGPL-2.1+ FDL-1.1+"
+SLOT="1.0"
+IUSE="aqua debug doc egl gtk +introspection test wayland +X"
+REQUIRED_USE="
+ || ( aqua wayland X )
+ wayland? ( egl )
+"
+KEYWORDS="~alpha amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc x86"
+
+# NOTE: glx flavour uses libdrm + >=mesa-7.3
+# XXX: uprof needed for profiling
+# >=libX11-1.3.1 needed for X Generic Event support
+# do not depend on tslib, it does not build and is disable by default upstream
+# <dev-libs/libinput-0.8 due to Gnome bugzilla #742829
+RDEPEND="
+ >=dev-libs/glib-2.37.3:2
+ >=dev-libs/atk-2.5.3[introspection?]
+ >=dev-libs/json-glib-0.12[introspection?]
+ >=media-libs/cogl-1.17.5:1.0=[introspection?,pango,wayland?]
+ >=x11-libs/cairo-1.12:=[aqua?,glib]
+ >=x11-libs/pango-1.30[introspection?]
+
+ virtual/opengl
+ x11-libs/libdrm:=
+
+ egl? (
+ >=dev-libs/libinput-0.4
+ <dev-libs/libinput-0.8
+ media-libs/cogl[gles2,kms]
+ >=virtual/libgudev-136
+ x11-libs/libxkbcommon
+ )
+ gtk? ( >=x11-libs/gtk+-3.3.18:3[aqua?] )
+ introspection? ( >=dev-libs/gobject-introspection-0.9.6 )
+ X? (
+ media-libs/fontconfig
+ >=x11-libs/libX11-1.3.1
+ x11-libs/libXext
+ x11-libs/libXdamage
+ x11-proto/inputproto
+ >=x11-libs/libXi-1.3
+ >=x11-libs/libXcomposite-0.4 )
+ wayland? (
+ dev-libs/wayland
+ x11-libs/gdk-pixbuf:2 )
+"
+DEPEND="${RDEPEND}
+ >=dev-util/gtk-doc-am-1.20
+ >=sys-devel/gettext-0.17
+ virtual/pkgconfig
+ doc? (
+ >=dev-util/gtk-doc-1.20
+ >=app-text/docbook-sgml-utils-0.6.14[jadetex]
+ dev-libs/libxslt )
+ test? ( x11-libs/gdk-pixbuf )"
+
+# Tests fail with both swrast and llvmpipe
+# They pass under r600g or i965, so the bug is in mesa
+#RESTRICT="test"
+
+src_prepare() {
+ # We only need conformance tests, the rest are useless for us
+ sed -e 's/^\(SUBDIRS =\).*/\1 accessibility conform/g' \
+ -i tests/Makefile.am || die "am tests sed failed"
+ sed -e 's/^\(SUBDIRS =\)[^\]*/\1 accessibility conform/g' \
+ -i tests/Makefile.in || die "in tests sed failed"
+
+ gnome2_src_prepare
+}
+
+src_configure() {
+ # XXX: Conformance test suite (and clutter itself) does not work under Xvfb
+ # (GLX error blabla)
+ # XXX: Profiling, coverage disabled for now
+ # XXX: What about cex100/win32 backends?
+ gnome2_src_configure \
+ --disable-profile \
+ --disable-maintainer-flags \
+ --disable-gcov \
+ --disable-cex100-backend \
+ --disable-win32-backend \
+ --disable-tslib-input \
+ $(use_enable aqua quartz-backend) \
+ $(usex debug --enable-debug=yes --enable-debug=minimum) \
+ $(use_enable doc docs) \
+ $(use_enable egl egl-backend) \
+ $(use_enable egl evdev-input) \
+ $(use_enable gtk gdk-backend) \
+ $(use_enable introspection) \
+ $(use_enable test gdk-pixbuf) \
+ $(use_enable wayland wayland-backend) \
+ $(use_enable wayland wayland-compositor) \
+ $(use_enable X xinput) \
+ $(use_enable X x11-backend)
+}
+
+src_test() {
+ Xemake check -C tests/conform
+}
diff --git a/media-libs/clutter/clutter-1.22.2-r1.ebuild b/media-libs/clutter/clutter-1.22.2-r1.ebuild
new file mode 100644
index 000000000000..4f72e0803331
--- /dev/null
+++ b/media-libs/clutter/clutter-1.22.2-r1.ebuild
@@ -0,0 +1,116 @@
+# 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 autotools eutils gnome2 virtualx
+
+HOMEPAGE="https://wiki.gnome.org/Projects/Clutter"
+DESCRIPTION="Clutter is a library for creating graphical user interfaces"
+
+LICENSE="LGPL-2.1+ FDL-1.1+"
+SLOT="1.0"
+IUSE="aqua debug doc egl gtk +introspection test wayland +X"
+REQUIRED_USE="
+ || ( aqua wayland X )
+ wayland? ( egl )
+"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+
+# NOTE: glx flavour uses libdrm + >=mesa-7.3
+# >=libX11-1.3.1 needed for X Generic Event support
+# do not depend on tslib, it does not build and is disable by default upstream
+RDEPEND="
+ >=dev-libs/glib-2.39.0:2
+ >=dev-libs/atk-2.5.3[introspection?]
+ >=dev-libs/json-glib-0.12[introspection?]
+ >=media-libs/cogl-1.20.0:1.0=[introspection?,pango,wayland?]
+ >=x11-libs/cairo-1.14:=[aqua?,glib]
+ >=x11-libs/pango-1.30[introspection?]
+
+ virtual/opengl
+ x11-libs/libdrm:=
+
+ egl? (
+ >=dev-libs/libinput-0.8
+ media-libs/cogl[gles2,kms]
+ >=virtual/libgudev-136
+ x11-libs/libxkbcommon
+ )
+ gtk? ( >=x11-libs/gtk+-3.3.18:3[aqua?] )
+ introspection? ( >=dev-libs/gobject-introspection-1.39 )
+ X? (
+ media-libs/fontconfig
+ >=x11-libs/libX11-1.3.1
+ x11-libs/libXext
+ x11-libs/libXdamage
+ x11-proto/inputproto
+ >=x11-libs/libXi-1.3
+ >=x11-libs/libXcomposite-0.4 )
+ wayland? (
+ dev-libs/wayland
+ x11-libs/gdk-pixbuf:2 )
+"
+DEPEND="${RDEPEND}
+ >=dev-util/gtk-doc-am-1.20
+ >=sys-devel/gettext-0.17
+ virtual/pkgconfig
+ doc? (
+ >=dev-util/gtk-doc-1.20
+ >=app-text/docbook-sgml-utils-0.6.14[jadetex]
+ dev-libs/libxslt )
+ test? ( x11-libs/gdk-pixbuf )"
+
+# Tests fail with both swrast and llvmpipe
+# They pass under r600g or i965, so the bug is in mesa
+#RESTRICT="test"
+
+src_prepare() {
+ # From upstream git, 1.22 branch
+ epatch "${FILESDIR}"/${P}-touchpad-detection.patch
+ epatch "${FILESDIR}"/${P}-cogl-visual-xlib.patch
+ epatch "${FILESDIR}"/${P}-clutter_gdk_get_visual.patch
+ epatch "${FILESDIR}"/${P}-clutter_gdk_get_visual-2.patch
+
+ # We only need conformance tests, the rest are useless for us
+ sed -e 's/^\(SUBDIRS =\).*/\1 accessibility conform/g' \
+ -i tests/Makefile.am || die "am tests sed failed"
+ sed -e 's/^\(SUBDIRS =\)[^\]*/\1 accessibility conform/g' \
+ -i tests/Makefile.in || die "in tests sed failed"
+
+ eautoreconf
+ gnome2_src_prepare
+}
+
+src_configure() {
+ # XXX: Conformance test suite (and clutter itself) does not work under Xvfb
+ # (GLX error blabla)
+ # XXX: coverage disabled for now
+ # XXX: What about cex100/win32 backends?
+ gnome2_src_configure \
+ --disable-maintainer-flags \
+ --disable-mir-backend \
+ --disable-gcov \
+ --disable-cex100-backend \
+ --disable-win32-backend \
+ --disable-tslib-input \
+ $(use_enable aqua quartz-backend) \
+ $(usex debug --enable-debug=yes --enable-debug=minimum) \
+ $(use_enable doc docs) \
+ $(use_enable egl egl-backend) \
+ $(use_enable egl evdev-input) \
+ $(use_enable gtk gdk-backend) \
+ $(use_enable introspection) \
+ $(use_enable test gdk-pixbuf) \
+ $(use_enable wayland wayland-backend) \
+ $(use_enable wayland wayland-compositor) \
+ $(use_enable X xinput) \
+ $(use_enable X x11-backend)
+}
+
+src_test() {
+ Xemake check -C tests/conform
+}
diff --git a/media-libs/clutter/clutter-1.22.4.ebuild b/media-libs/clutter/clutter-1.22.4.ebuild
new file mode 100644
index 000000000000..1af52388cb3c
--- /dev/null
+++ b/media-libs/clutter/clutter-1.22.4.ebuild
@@ -0,0 +1,109 @@
+# 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 virtualx
+
+HOMEPAGE="https://wiki.gnome.org/Projects/Clutter"
+DESCRIPTION="Clutter is a library for creating graphical user interfaces"
+
+LICENSE="LGPL-2.1+ FDL-1.1+"
+SLOT="1.0"
+IUSE="aqua debug doc egl gtk +introspection test wayland +X"
+REQUIRED_USE="
+ || ( aqua wayland X )
+ wayland? ( egl )
+"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+
+# NOTE: glx flavour uses libdrm + >=mesa-7.3
+# >=libX11-1.3.1 needed for X Generic Event support
+# do not depend on tslib, it does not build and is disable by default upstream
+RDEPEND="
+ >=dev-libs/glib-2.39.0:2
+ >=dev-libs/atk-2.5.3[introspection?]
+ >=dev-libs/json-glib-0.12[introspection?]
+ >=media-libs/cogl-1.20.0:1.0=[introspection?,pango,wayland?]
+ >=x11-libs/cairo-1.14:=[aqua?,glib]
+ >=x11-libs/pango-1.30[introspection?]
+
+ virtual/opengl
+ x11-libs/libdrm:=
+
+ egl? (
+ >=dev-libs/libinput-0.8
+ media-libs/cogl[gles2,kms]
+ >=virtual/libgudev-136
+ x11-libs/libxkbcommon
+ )
+ gtk? ( >=x11-libs/gtk+-3.3.18:3[aqua?] )
+ introspection? ( >=dev-libs/gobject-introspection-1.39:= )
+ X? (
+ media-libs/fontconfig
+ >=x11-libs/libX11-1.3.1
+ x11-libs/libXext
+ x11-libs/libXdamage
+ x11-proto/inputproto
+ >=x11-libs/libXi-1.3
+ >=x11-libs/libXcomposite-0.4 )
+ wayland? (
+ dev-libs/wayland
+ x11-libs/gdk-pixbuf:2 )
+"
+DEPEND="${RDEPEND}
+ >=dev-util/gtk-doc-am-1.20
+ >=sys-devel/gettext-0.17
+ virtual/pkgconfig
+ doc? (
+ >=dev-util/gtk-doc-1.20
+ >=app-text/docbook-sgml-utils-0.6.14[jadetex]
+ dev-libs/libxslt )
+ test? ( x11-libs/gdk-pixbuf )
+"
+# Tests fail with both swrast and llvmpipe
+# They pass under r600g or i965, so the bug is in mesa
+#RESTRICT="test"
+
+src_prepare() {
+ # We only need conformance tests, the rest are useless for us
+ sed -e 's/^\(SUBDIRS =\).*/\1 accessibility conform/g' \
+ -i tests/Makefile.am || die "am tests sed failed"
+ sed -e 's/^\(SUBDIRS =\)[^\]*/\1 accessibility conform/g' \
+ -i tests/Makefile.in || die "in tests sed failed"
+
+ gnome2_src_prepare
+}
+
+src_configure() {
+ # XXX: Conformance test suite (and clutter itself) does not work under Xvfb
+ # (GLX error blabla)
+ # XXX: coverage disabled for now
+ # XXX: What about cex100/win32 backends?
+ gnome2_src_configure \
+ --disable-maintainer-flags \
+ --disable-mir-backend \
+ --disable-gcov \
+ --disable-cex100-backend \
+ --disable-win32-backend \
+ --disable-tslib-input \
+ $(use_enable aqua quartz-backend) \
+ $(usex debug --enable-debug=yes --enable-debug=minimum) \
+ $(use_enable doc docs) \
+ $(use_enable egl egl-backend) \
+ $(use_enable egl evdev-input) \
+ $(use_enable gtk gdk-backend) \
+ $(use_enable introspection) \
+ $(use_enable test gdk-pixbuf) \
+ $(use_enable wayland wayland-backend) \
+ $(use_enable wayland wayland-compositor) \
+ $(use_enable X xinput) \
+ $(use_enable X x11-backend)
+}
+
+src_test() {
+ Xemake check -C tests/conform
+}
diff --git a/media-libs/clutter/files/clutter-1.22.2-clutter_gdk_get_visual-2.patch b/media-libs/clutter/files/clutter-1.22.2-clutter_gdk_get_visual-2.patch
new file mode 100644
index 000000000000..c857d9dc7c87
--- /dev/null
+++ b/media-libs/clutter/files/clutter-1.22.2-clutter_gdk_get_visual-2.patch
@@ -0,0 +1,32 @@
+From 19064c4f444ed3fd596580cb98876619133c7f22 Mon Sep 17 00:00:00 2001
+From: Emmanuele Bassi <ebassi@gnome.org>
+Date: Wed, 10 Jun 2015 19:13:13 +0100
+Subject: [PATCH 3/3] build: Reset interface_age
+
+We don't usually add symbols inside a stable branch, but given that the
+newly added clutter_gdk_get_visual() function is necessary to make
+Clutter work when embedded inside GTK running on nVidia binary drivers,
+I decided to break the rule. This requires resetting the interface age,
+so that the soname version changes.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=747489
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index ed67ea1..5b590ed 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -31,7 +31,7 @@ m4_define([clutter_micro_version], [3])
+ # ...
+ #
+ # • for development releases: keep clutter_interface_age to 0
+-m4_define([clutter_interface_age], [2])
++m4_define([clutter_interface_age], [0])
+
+ m4_define([clutter_binary_age], [m4_eval(100 * clutter_minor_version + clutter_micro_version)])
+
+--
+2.4.3
+
diff --git a/media-libs/clutter/files/clutter-1.22.2-clutter_gdk_get_visual.patch b/media-libs/clutter/files/clutter-1.22.2-clutter_gdk_get_visual.patch
new file mode 100644
index 000000000000..d157ac1ee690
--- /dev/null
+++ b/media-libs/clutter/files/clutter-1.22.2-clutter_gdk_get_visual.patch
@@ -0,0 +1,109 @@
+From ab63b30a9b1812b0e53bcddcd55f00fd507347dc Mon Sep 17 00:00:00 2001
+From: Emmanuele Bassi <ebassi@gnome.org>
+Date: Wed, 10 Jun 2015 12:02:13 +0100
+Subject: [PATCH 2/3] gdk: Add function to retrieve the GdkVisual
+
+Straight from Cogl.
+
+This allows us to propagate the GdkVisual Cogl and Clutter use to
+embedding toolkits, like GTK+.
+
+The function is annotated as being added to the 1.22 development
+cycle because it will be backported to the stable branch, so that
+downstream developers can package up a version of Clutter that does
+not crash on nVidia.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=747489
+(cherry picked from commit 2d5b5aa82aacab7cc523e5877afbb864592b7651)
+Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
+---
+ clutter/gdk/clutter-backend-gdk.c | 48 ++++++++++++++++++++++++++++++
+ clutter/gdk/clutter-gdk.h | 3 ++
+ doc/reference/clutter/clutter-sections.txt | 1 +
+ 3 files changed, 52 insertions(+)
+
+diff --git a/clutter/gdk/clutter-backend-gdk.c b/clutter/gdk/clutter-backend-gdk.c
+index 47bd671..01ba8cb 100644
+--- a/clutter/gdk/clutter-backend-gdk.c
++++ b/clutter/gdk/clutter-backend-gdk.c
+@@ -498,3 +498,51 @@ clutter_gdk_disable_event_retrieval (void)
+
+ disable_event_retrieval = TRUE;
+ }
++
++/**
++ * clutter_gdk_get_visual:
++ *
++ * Retrieves the #GdkVisual used by Clutter.
++ *
++ * This function should be used when embedding Clutter inside GDK-based
++ * foreign toolkits, to ensure that the visual applied to the #GdkWindow
++ * used to render the #ClutterStage is the correct one.
++ *
++ * Returns: (transfer none): a #GdkVisual instance
++ *
++ * Since: 1.22
++ */
++GdkVisual *
++clutter_gdk_get_visual (void)
++{
++ ClutterBackend *backend = clutter_get_default_backend ();
++ GdkScreen *screen;
++
++ if (backend == NULL)
++ {
++ g_critical ("The Clutter backend has not been initialised");
++ return NULL;
++ }
++
++ if (!CLUTTER_IS_BACKEND_GDK (backend))
++ {
++ g_critical ("The Clutter backend is not a GDK backend");
++ return NULL;
++ }
++
++ screen = CLUTTER_BACKEND_GDK (backend)->screen;
++ g_assert (screen != NULL);
++
++#if defined(GDK_WINDOWING_X11) && defined(COGL_HAS_XLIB_SUPPORT)
++ {
++ XVisualInfo *xvisinfo = cogl_clutter_winsys_xlib_get_visual_info ();
++ if (xvisinfo != NULL)
++ return gdk_x11_screen_lookup_visual (screen, xvisinfo->visualid);
++ }
++#endif
++
++ if (gdk_screen_get_rgba_visual (screen) != NULL)
++ return gdk_screen_get_rgba_visual (screen);
++
++ return gdk_screen_get_system_visual (screen);
++}
+diff --git a/clutter/gdk/clutter-gdk.h b/clutter/gdk/clutter-gdk.h
+index a009378..c5b979b 100644
+--- a/clutter/gdk/clutter-gdk.h
++++ b/clutter/gdk/clutter-gdk.h
+@@ -61,6 +61,9 @@ ClutterStage * clutter_gdk_get_stage_from_window (GdkWindow *window);
+ CLUTTER_AVAILABLE_IN_1_10
+ void clutter_gdk_disable_event_retrieval (void);
+
++CLUTTER_AVAILABLE_IN_1_22
++GdkVisual * clutter_gdk_get_visual (void);
++
+ G_END_DECLS
+
+ #endif /* __CLUTTER_GDK_H__ */
+diff --git a/doc/reference/clutter/clutter-sections.txt b/doc/reference/clutter/clutter-sections.txt
+index 327f185..d521dc1 100644
+--- a/doc/reference/clutter/clutter-sections.txt
++++ b/doc/reference/clutter/clutter-sections.txt
+@@ -1516,6 +1516,7 @@ clutter_gdk_handle_event
+ clutter_gdk_set_display
+ clutter_gdk_get_default_display
+ clutter_gdk_set_stage_foreign
++clutter_gdk_get_visual
+ </SECTION>
+
+ <SECTION>
+--
+2.4.3
+
diff --git a/media-libs/clutter/files/clutter-1.22.2-cogl-visual-xlib.patch b/media-libs/clutter/files/clutter-1.22.2-cogl-visual-xlib.patch
new file mode 100644
index 000000000000..52cf929a006b
--- /dev/null
+++ b/media-libs/clutter/files/clutter-1.22.2-cogl-visual-xlib.patch
@@ -0,0 +1,130 @@
+From 44fc1c87489bb7bbe1d28eb0f551794db333e1fb Mon Sep 17 00:00:00 2001
+From: Emmanuele Bassi <ebassi@gnome.org>
+Date: Wed, 10 Jun 2015 11:55:50 +0100
+Subject: [PATCH 1/3] gdk: Use the Cogl visual on Xlib winsys
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+GDK 3.16 started selecting different visuals, to best comply with the
+requirements for OpenGL, and this has broken Clutter on GLX drivers that
+are fairly picky in how they select visuals and GLXFBConfig.
+
+GDK selects GLXFBConfig that do not include depth or stencil buffers;
+Cogl, on the other hand, needs both depth and stencil buffers, and keeps
+selecting the first available visual, assuming that the GLX driver will
+give us the best compliant one, as per specification. Sadly, some
+drivers will return incompatible configurations, and then bomb out when
+you try to embed Clutter inside GTK+, because of mismatched visuals.
+
+Cogl has an old, deprecated, Clutter-only API that allows us to retrieve
+the XVisualInfo mapping to the GLXFBConfig it uses; this means we should
+look up the GdkVisual for it when creating our own GdkWindows, instead
+of relying on the RGBA and system GdkVisuals exposed by GDK — at least
+on X11.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=747489
+(cherry picked from commit c91621e8c28bb190eaa9d59e08b180589a255cf3)
+Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
+---
+ clutter/gdk/clutter-stage-gdk.c | 50 ++++++++++++++++++++++++++++++-----------
+ 1 file changed, 37 insertions(+), 13 deletions(-)
+
+diff --git a/clutter/gdk/clutter-stage-gdk.c b/clutter/gdk/clutter-stage-gdk.c
+index e855a98..82f7679 100644
+--- a/clutter/gdk/clutter-stage-gdk.c
++++ b/clutter/gdk/clutter-stage-gdk.c
+@@ -29,6 +29,10 @@
+
+ #include <cogl/cogl.h>
+
++#ifdef COGL_HAS_XLIB_SUPPORT
++#include <cogl/cogl-xlib.h>
++#endif
++
+ #define GDK_DISABLE_DEPRECATION_WARNINGS
+
+ #include <gdk/gdk.h>
+@@ -183,7 +187,7 @@ clutter_stage_gdk_realize (ClutterStageWindow *stage_window)
+ GdkWindowAttr attributes;
+ gboolean cursor_visible;
+ gboolean use_alpha;
+- gfloat width, height;
++ gfloat width, height;
+
+ if (backend->cogl_context == NULL)
+ {
+@@ -191,12 +195,7 @@ clutter_stage_gdk_realize (ClutterStageWindow *stage_window)
+ return FALSE;
+ }
+
+- if (stage_gdk->foreign_window)
+- {
+- width = gdk_window_get_width (stage_gdk->window);
+- height = gdk_window_get_height (stage_gdk->window);
+- }
+- else
++ if (!stage_gdk->foreign_window)
+ {
+ if (stage_gdk->window != NULL)
+ {
+@@ -239,13 +238,34 @@ clutter_stage_gdk_realize (ClutterStageWindow *stage_window)
+ attributes.cursor = stage_gdk->blank_cursor;
+ }
+
+- attributes.visual = NULL;
++ /* If the ClutterStage:use-alpha is set, but GDK does not have an
++ * RGBA visual, then we unset the property on the Stage
++ */
+ if (use_alpha)
+ {
+- attributes.visual = gdk_screen_get_rgba_visual (backend_gdk->screen);
++ if (gdk_screen_get_rgba_visual (backend_gdk->screen) == NULL)
++ {
++ clutter_stage_set_use_alpha (stage_cogl->wrapper, FALSE);
++ use_alpha = FALSE;
++ }
++ }
+
+- if (attributes.visual == NULL)
+- clutter_stage_set_use_alpha (stage_cogl->wrapper, FALSE);
++#if defined(GDK_WINDOWING_X11) && defined(COGL_HAS_XLIB_SUPPORT)
++ if (GDK_IS_X11_DISPLAY (backend_gdk->display))
++ {
++ XVisualInfo *xvisinfo = cogl_clutter_winsys_xlib_get_visual_info ();
++ if (xvisinfo != NULL)
++ {
++ attributes.visual = gdk_x11_screen_lookup_visual (backend_gdk->screen,
++ xvisinfo->visualid);
++ }
++ }
++ else
++#endif
++ {
++ attributes.visual = use_alpha
++ ? gdk_screen_get_rgba_visual (backend_gdk->screen)
++ : gdk_screen_get_system_visual (backend_gdk->screen);
+ }
+
+ if (attributes.visual == NULL)
+@@ -263,11 +283,15 @@ clutter_stage_gdk_realize (ClutterStageWindow *stage_window)
+
+ clutter_stage_gdk_set_gdk_geometry (stage_gdk);
+ }
++ else
++ {
++ width = gdk_window_get_width (stage_gdk->window);
++ height = gdk_window_get_height (stage_gdk->window);
++ }
+
+ gdk_window_ensure_native (stage_gdk->window);
+
+- g_object_set_data (G_OBJECT (stage_gdk->window),
+- "clutter-stage-window", stage_gdk);
++ g_object_set_data (G_OBJECT (stage_gdk->window), "clutter-stage-window", stage_gdk);
+
+ stage_cogl->onscreen = cogl_onscreen_new (backend->cogl_context,
+ width, height);
+--
+2.4.3
+
diff --git a/media-libs/clutter/files/clutter-1.22.2-touchpad-detection.patch b/media-libs/clutter/files/clutter-1.22.2-touchpad-detection.patch
new file mode 100644
index 000000000000..ad65105b13c8
--- /dev/null
+++ b/media-libs/clutter/files/clutter-1.22.2-touchpad-detection.patch
@@ -0,0 +1,36 @@
+From a4aad807d5cc6842043e12897cfac3a516825c0f Mon Sep 17 00:00:00 2001
+From: Rui Matos <tiagomatos@gmail.com>
+Date: Sun, 17 May 2015 00:50:56 +0200
+Subject: [PATCH] x11: Fix touchpad detection
+
+Commit 79849ef1d5fff9acd310cd68d59df0c7cf2cb28f had a typo in the
+device property format check. This property is formated in 8-bit
+items, not 32-bit.
+
+This went unnoticed till now because some touchpads were still being
+detected as such due to a second check below:
+
+ else if (strstr (name, "touchpad") != NULL)
+ source = CLUTTER_TOUCHPAD_DEVICE;
+
+https://bugzilla.gnome.org/show_bug.cgi?id=749482
+---
+ clutter/x11/clutter-device-manager-xi2.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/clutter/x11/clutter-device-manager-xi2.c b/clutter/x11/clutter-device-manager-xi2.c
+index 17c491e..1b101c4 100644
+--- a/clutter/x11/clutter-device-manager-xi2.c
++++ b/clutter/x11/clutter-device-manager-xi2.c
+@@ -242,7 +242,7 @@ is_touchpad_device (ClutterBackendX11 *backend_x11,
+ /* We don't care about the data */
+ XFree (data);
+
+- if (rc != Success || type != XA_INTEGER || format != 32 || nitems != 1)
++ if (rc != Success || type != XA_INTEGER || format != 8 || nitems != 1)
+ return FALSE;
+
+ return TRUE;
+--
+2.4.3
+
diff --git a/media-libs/clutter/metadata.xml b/media-libs/clutter/metadata.xml
new file mode 100644
index 000000000000..e82af824d4b8
--- /dev/null
+++ b/media-libs/clutter/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>gnome</herd>
+<use>
+ <flag name="egl">Enable EGL backend.</flag>
+ <flag name="gtk">Use gdk-pixbuf from <pkg>x11-libs/gtk+</pkg> as image rendering backend</flag>
+</use>
+</pkgmetadata>
diff --git a/media-libs/cogl/Manifest b/media-libs/cogl/Manifest
new file mode 100644
index 000000000000..48f3076d9a9f
--- /dev/null
+++ b/media-libs/cogl/Manifest
@@ -0,0 +1,2 @@
+DIST cogl-1.18.2.tar.xz 1635384 SHA256 9278e519d5480eb0379efd48db024e8fdbf93f01dff48a7e756b85b508a863aa SHA512 c8903a10c476850c77f71eba584854bccf26adae6f62a9232adf8baf728fe2b69273bd5cd5418e7cd72801a2c0e4c85ef8afc08e28ebd5016b81693aef2ecab8 WHIRLPOOL e7538b92af2efe2f3845fde5c97ba9744d53ddb7a05eadb3cf310c43a3536a41001e4a0596a593ae3cfede4a02115a1d9be8aa423e9c814675059f0f777ec4a5
+DIST cogl-1.20.0.tar.xz 1669620 SHA256 729e35495829e7d31fafa3358e47b743ba21a2b08ff9b6cd28fb74c0de91192b SHA512 a7c50072ef5660a4fff8d3843ede86178e5c4bcc635eb24c1e16f73422f57596b91a2c78a73a5e01f6f4b9c96509c7c648729f748b2fec4b8ad0f332cd5e0bd1 WHIRLPOOL 9756e8b0c1503ff9e06b926d82620692d0e22ac7acf68f90461d4ae982d758733de47084fa4a80c531500f47b2ff109e07b3f0300aa9fcaf5b05f607a8252fa1
diff --git a/media-libs/cogl/cogl-1.18.2-r1.ebuild b/media-libs/cogl/cogl-1.18.2-r1.ebuild
new file mode 100644
index 000000000000..b309b9f08b95
--- /dev/null
+++ b/media-libs/cogl/cogl-1.18.2-r1.ebuild
@@ -0,0 +1,129 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+CLUTTER_LA_PUNT="yes"
+
+# Inherit gnome2 after clutter to download sources from gnome.org
+inherit clutter gnome2 multilib virtualx
+
+DESCRIPTION="A library for using 3D graphics hardware to draw pretty pictures"
+HOMEPAGE="http://www.cogl3d.org/"
+
+LICENSE="MIT BSD"
+SLOT="1.0/20" # subslot = .so version
+# doc and profile disable for now due bugs #484750 and #483332
+IUSE="examples gles2 gstreamer +introspection +kms +opengl +pango test wayland" # doc profile
+REQUIRED_USE="wayland? ( gles2 )
+ || ( gles2 opengl )"
+KEYWORDS="~alpha amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc x86"
+
+COMMON_DEPEND="
+ >=dev-libs/glib-2.32:2
+ x11-libs/cairo:=
+ >=x11-libs/gdk-pixbuf-2:2
+ x11-libs/libX11
+ >=x11-libs/libXcomposite-0.4
+ x11-libs/libXdamage
+ x11-libs/libXext
+ >=x11-libs/libXfixes-3
+ >=x11-libs/libXrandr-1.2
+ virtual/opengl
+ gles2? ( media-libs/mesa[gles2] )
+ gstreamer? (
+ media-libs/gstreamer:1.0
+ media-libs/gst-plugins-base:1.0 )
+
+ introspection? ( >=dev-libs/gobject-introspection-1.34.2 )
+ kms? (
+ media-libs/mesa[gbm]
+ x11-libs/libdrm:= )
+ pango? ( >=x11-libs/pango-1.20.0[introspection?] )
+ wayland? (
+ >=dev-libs/wayland-1.1.90
+ media-libs/mesa[egl,wayland] )
+"
+# before clutter-1.7, cogl was part of clutter
+RDEPEND="${COMMON_DEPEND}
+ !<media-libs/clutter-1.7"
+DEPEND="${COMMON_DEPEND}
+ >=dev-util/gtk-doc-am-1.13
+ sys-devel/gettext
+ virtual/pkgconfig
+ test? (
+ app-eselect/eselect-opengl
+ media-libs/mesa[classic] )
+"
+
+# Need classic mesa swrast for tests, llvmpipe causes a test failure
+# For some reason GL3 conformance test all fails again...
+RESTRICT="test"
+
+src_prepare() {
+ # Do not build examples
+ sed -e "s/^\(SUBDIRS +=.*\)examples\(.*\)$/\1\2/" \
+ -i Makefile.am Makefile.in || die
+
+ if ! use test ; then
+ # For some reason the configure switch will not completely disable
+ # tests being built
+ sed -e "s/^\(SUBDIRS =.*\)test-fixtures\(.*\)$/\1\2/" \
+ -e "s/^\(SUBDIRS +=.*\)tests\(.*\)$/\1\2/" \
+ -e "s/^\(.*am__append.* \)tests\(.*\)$/\1\2/" \
+ -i Makefile.am Makefile.in || die
+ fi
+
+ gnome2_src_prepare
+}
+
+src_configure() {
+ # TODO: think about quartz, sdl
+ # Prefer gl over gles2 if both are selected
+ # Profiling needs uprof, which is not available in portage yet, bug #484750
+ # FIXME: Doesn't provide prebuilt docs, but they can neither be rebuilt, bug #483332
+ gnome2_src_configure \
+ --disable-examples-install \
+ --disable-maintainer-flags \
+ --enable-cairo \
+ --enable-deprecated \
+ --enable-gdk-pixbuf \
+ --enable-glib \
+ $(use_enable opengl glx) \
+ $(use_enable opengl gl) \
+ $(use_enable gles2) \
+ $(use_enable gles2 cogl-gles2) \
+ $(use_enable gles2 xlib-egl-platform) \
+ $(usex gles2 --with-default-driver=$(usex opengl gl gles2)) \
+ $(use_enable gstreamer cogl-gst) \
+ $(use_enable introspection) \
+ $(use_enable kms kms-egl-platform) \
+ $(use_enable pango cogl-pango) \
+ $(use_enable test unit-tests) \
+ $(use_enable wayland wayland-egl-platform) \
+ $(use_enable wayland wayland-egl-server) \
+ --disable-profile
+# $(use_enable profile)
+}
+
+src_test() {
+ # Use swrast for tests, llvmpipe is incomplete and "test_sub_texture" fails
+ # NOTE: recheck if this is needed after every mesa bump
+ if [[ "$(eselect opengl show)" != "xorg-x11" ]]; then
+ ewarn "Skipping tests because a binary OpenGL library is enabled. To"
+ ewarn "run tests for ${PN}, you need to enable the Mesa library:"
+ ewarn "# eselect opengl set xorg-x11"
+ return
+ fi
+ LIBGL_DRIVERS_PATH="${EROOT}/usr/$(get_libdir)/mesa" Xemake check
+}
+
+src_install() {
+ DOCS="NEWS README"
+ EXAMPLES="examples/{*.c,*.jpg}"
+
+ clutter_src_install
+
+ # Remove silly examples-data directory
+ rm -rvf "${ED}/usr/share/cogl/examples-data/" || die
+}
diff --git a/media-libs/cogl/cogl-1.20.0.ebuild b/media-libs/cogl/cogl-1.20.0.ebuild
new file mode 100644
index 000000000000..984b93dd5a8e
--- /dev/null
+++ b/media-libs/cogl/cogl-1.20.0.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"
+
+inherit gnome2 multilib virtualx
+
+DESCRIPTION="A library for using 3D graphics hardware to draw pretty pictures"
+HOMEPAGE="http://www.cogl3d.org/"
+
+LICENSE="MIT BSD"
+SLOT="1.0/20" # subslot = .so version
+
+# doc and profile disable for now due bugs #484750 and #483332
+IUSE="examples gles2 gstreamer +introspection +kms +opengl +pango test wayland" # doc profile
+REQUIRED_USE="wayland? ( gles2 )
+ || ( gles2 opengl )"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+
+COMMON_DEPEND="
+ >=dev-libs/glib-2.32:2
+ x11-libs/cairo:=
+ >=x11-libs/gdk-pixbuf-2:2
+ x11-libs/libX11
+ >=x11-libs/libXcomposite-0.4
+ x11-libs/libXdamage
+ x11-libs/libXext
+ >=x11-libs/libXfixes-3
+ >=x11-libs/libXrandr-1.2
+ virtual/opengl
+ gles2? ( media-libs/mesa[gles2] )
+ gstreamer? (
+ media-libs/gstreamer:1.0
+ media-libs/gst-plugins-base:1.0 )
+
+ introspection? ( >=dev-libs/gobject-introspection-1.34.2:= )
+ kms? (
+ media-libs/mesa[gbm]
+ x11-libs/libdrm:= )
+ pango? ( >=x11-libs/pango-1.20.0[introspection?] )
+ wayland? (
+ >=dev-libs/wayland-1.1.90
+ media-libs/mesa[egl,wayland] )
+"
+# before clutter-1.7, cogl was part of clutter
+RDEPEND="${COMMON_DEPEND}
+ !<media-libs/clutter-1.7
+"
+DEPEND="${COMMON_DEPEND}
+ >=dev-util/gtk-doc-am-1.13
+ sys-devel/gettext
+ virtual/pkgconfig
+ test? (
+ app-eselect/eselect-opengl
+ media-libs/mesa[classic] )
+"
+
+# Need classic mesa swrast for tests, llvmpipe causes a test failure
+# For some reason GL3 conformance test all fails again...
+RESTRICT="test"
+
+src_prepare() {
+ # Do not build examples
+ sed -e "s/^\(SUBDIRS +=.*\)examples\(.*\)$/\1\2/" \
+ -i Makefile.am Makefile.in || die
+
+ if ! use test ; then
+ # For some reason the configure switch will not completely disable
+ # tests being built
+ sed -e "s/^\(SUBDIRS =.*\)test-fixtures\(.*\)$/\1\2/" \
+ -e "s/^\(SUBDIRS +=.*\)tests\(.*\)$/\1\2/" \
+ -e "s/^\(.*am__append.* \)tests\(.*\)$/\1\2/" \
+ -i Makefile.am Makefile.in || die
+ fi
+
+ gnome2_src_prepare
+}
+
+src_configure() {
+ # TODO: think about quartz, sdl
+ # Prefer gl over gles2 if both are selected
+ # Profiling needs uprof, which is not available in portage yet, bug #484750
+ # FIXME: Doesn't provide prebuilt docs, but they can neither be rebuilt, bug #483332
+ gnome2_src_configure \
+ --disable-examples-install \
+ --disable-maintainer-flags \
+ --enable-cairo \
+ --enable-deprecated \
+ --enable-gdk-pixbuf \
+ --enable-glib \
+ $(use_enable opengl glx) \
+ $(use_enable opengl gl) \
+ $(use_enable gles2) \
+ $(use_enable gles2 cogl-gles2) \
+ $(use_enable gles2 xlib-egl-platform) \
+ $(usex gles2 --with-default-driver=$(usex opengl gl gles2)) \
+ $(use_enable gstreamer cogl-gst) \
+ $(use_enable introspection) \
+ $(use_enable kms kms-egl-platform) \
+ $(use_enable pango cogl-pango) \
+ $(use_enable test unit-tests) \
+ $(use_enable wayland wayland-egl-platform) \
+ $(use_enable wayland wayland-egl-server) \
+ --disable-profile
+# $(use_enable profile)
+}
+
+src_test() {
+ # Use swrast for tests, llvmpipe is incomplete and "test_sub_texture" fails
+ # NOTE: recheck if this is needed after every mesa bump
+ if [[ "$(eselect opengl show)" != "xorg-x11" ]]; then
+ ewarn "Skipping tests because a binary OpenGL library is enabled. To"
+ ewarn "run tests for ${PN}, you need to enable the Mesa library:"
+ ewarn "# eselect opengl set xorg-x11"
+ return
+ fi
+ LIBGL_DRIVERS_PATH="${EROOT}/usr/$(get_libdir)/mesa" Xemake check
+}
+
+src_install() {
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins examples/{*.c,*.jpg}
+ fi
+
+ gnome2_src_install
+
+ # Remove silly examples-data directory
+ rm -rvf "${ED}/usr/share/cogl/examples-data/" || die
+}
diff --git a/media-libs/cogl/metadata.xml b/media-libs/cogl/metadata.xml
new file mode 100644
index 000000000000..465b183131a8
--- /dev/null
+++ b/media-libs/cogl/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>
+<use>
+ <flag name="gles2">Enable OpenGL ES 2.0 support</flag>
+ <flag name="kms">Enable KMS support.</flag>
+ <flag name="pango">Build cogl-pango library for <pkg>x11-libs/pango</pkg> integration</flag>
+</use>
+</pkgmetadata>
diff --git a/media-libs/coin/Manifest b/media-libs/coin/Manifest
new file mode 100644
index 000000000000..f99df3971e47
--- /dev/null
+++ b/media-libs/coin/Manifest
@@ -0,0 +1 @@
+DIST Coin-3.1.3.tar.gz 5981534 SHA256 583478c581317862aa03a19f14c527c3888478a06284b9a46a0155fa5886d417 SHA512 d6fd47ecc74e96fc4de46e3a683f038f1907b96db2bbe935fb49f2d59190bd18f3f439dc0e4cb435360e74e1d65994a32b21f670d5a76394692616625cb14394 WHIRLPOOL 2b02b2273acfe2f5d779d8adaca8f88c5119a3326e395cc039df6898d2c7c60888d7586de877a27fca3a4cb620662ffe9363d845836b2483c2f3108475ea696c
diff --git a/media-libs/coin/coin-3.1.3-r2.ebuild b/media-libs/coin/coin-3.1.3-r2.ebuild
new file mode 100644
index 000000000000..995882361bee
--- /dev/null
+++ b/media-libs/coin/coin-3.1.3-r2.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools-utils flag-o-matic
+
+MY_P=${P/c/C}
+
+DESCRIPTION="A high-level 3D graphics toolkit, fully compatible with SGI Open Inventor 2.1"
+HOMEPAGE="http://www.coin3d.org/"
+SRC_URI="ftp://ftp.coin3d.org/pub/coin/src/all/${MY_P}.tar.gz"
+
+LICENSE="|| ( GPL-2 PEL )"
+KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux"
+SLOT="0"
+IUSE="bzip2 debug doc javascript openal simage static-libs threads zlib"
+
+# NOTE: expat is not really needed as --enable-system-expat is broken
+RDEPEND="
+ dev-libs/expat
+ media-libs/fontconfig
+ media-libs/freetype:2
+ virtual/opengl
+ virtual/glu
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libX11
+ x11-libs/libXext
+ bzip2? ( app-arch/bzip2 )
+ javascript? ( dev-lang/spidermonkey:0 )
+ openal? ( media-libs/openal )
+ simage? ( media-libs/simage )
+ zlib? ( sys-libs/zlib )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ x11-proto/xextproto
+ doc? ( app-doc/doxygen )
+"
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.1.0-javascript.patch
+ "${FILESDIR}"/${P}-pkgconfig-partial.patch
+ "${FILESDIR}"/${P}-gcc-4.7.patch
+ "${FILESDIR}"/${P}-freetype251.patch
+)
+
+DOCS=(
+ AUTHORS FAQ FAQ.legal NEWS README RELNOTES THANKS
+ docs/{ChangeLog.v${PV},HACKING,oiki-launch.txt}
+)
+
+src_configure() {
+ append-cppflags -I"${EPREFIX}/usr/include/freetype2"
+ # Prefer link-time linking over dlopen
+ local myeconfargs=(
+ htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
+ --disable-dl-fontconfig
+ --disable-dl-freetype
+ --disable-dl-libbzip2
+ --disable-dl-openal
+ --disable-dl-simage
+ --disable-dl-zlib
+ --disable-dyld
+ --disable-loadlibrary
+ --disable-man
+ --disable-java-wrapper
+ --enable-3ds-import
+ --enable-compact
+ --enable-dl-glu
+ --enable-dl-spidermonkey
+ --enable-system-expat
+ --includedir="${EPREFIX}/usr/include/${PN}"
+ --with-fontconfig
+ --with-freetype
+ $(use_with bzip2)
+ $(use_enable debug)
+ $(use_enable debug symbols)
+ $(use_enable doc html)
+ $(use_enable javascript javascript-api)
+ $(use_with javascript spidermonkey)
+ $(use_enable openal sound)
+ $(use_with openal)
+ $(use_with simage)
+ $(use_enable threads threadsafe)
+ $(use_with zlib)
+ )
+ autotools-utils_src_configure
+}
+
+src_install() {
+ # Remove Coin from Libs.private
+ sed -e '/Libs.private/s/ -lCoin//' -i "${BUILD_DIR}"/Coin.pc || die
+
+ autotools-utils_src_install
+}
diff --git a/media-libs/coin/files/coin-3.1.0-javascript.patch b/media-libs/coin/files/coin-3.1.0-javascript.patch
new file mode 100644
index 000000000000..f45d9cd78cf6
--- /dev/null
+++ b/media-libs/coin/files/coin-3.1.0-javascript.patch
@@ -0,0 +1,38 @@
+Index: src/vrml97/JS_VRMLClasses.h
+===================================================================
+--- src/vrml97/JS_VRMLClasses.h (revision 13505)
++++ src/vrml97/JS_VRMLClasses.h (revision 13506)
+@@ -28,6 +28,7 @@
+ #error this is a private header file
+ #endif /* ! COIN_INTERNAL */
+
++#if defined(HAVE_VRML97) && defined(COIN_HAVE_JAVASCRIPT)
+ /* ********************************************************************** */
+
+ class SoJavaScriptEngine;
+@@ -37,5 +38,6 @@
+ void JS_addVRMLclasses(SoJavaScriptEngine * engine);
+
+ /* ********************************************************************** */
++#endif // HAVE_VRML97 && COIN_HAVE_JAVASCRIPT
+
+ #endif /* !COIN_JS_VRMLCLASSES_H */
+Index: src/vrml97/JS_VRMLClasses.cpp
+===================================================================
+--- src/vrml97/JS_VRMLClasses.cpp (revision 13505)
++++ src/vrml97/JS_VRMLClasses.cpp (revision 13506)
+@@ -2,7 +2,7 @@
+ #include "config.h"
+ #endif // HAVE_CONFIG_H
+
+-#ifdef HAVE_VRML97
++#if defined(HAVE_VRML97) && defined(COIN_HAVE_JAVASCRIPT)
+
+ /**************************************************************************\
+ *
+@@ -2097,4 +2097,4 @@
+ MFVec3dHandler::jsval2field);
+ }
+
+-#endif // HAVE_VRML97
++#endif // HAVE_VRML97 && COIN_HAVE_JAVASCRIPT
diff --git a/media-libs/coin/files/coin-3.1.3-freetype251.patch b/media-libs/coin/files/coin-3.1.3-freetype251.patch
new file mode 100644
index 000000000000..44e8eefb1f63
--- /dev/null
+++ b/media-libs/coin/files/coin-3.1.3-freetype251.patch
@@ -0,0 +1,28 @@
+--- Coin-3.1.3/src/glue/freetype.cpp
++++ Coin-3.1.3/src/glue/freetype.cpp
+@@ -52,9 +52,9 @@
+ #ifdef HAVE_FREETYPE /* In case we're _not_ doing runtime linking. */
+ #define FREETYPEGLUE_ASSUME_FREETYPE 1
+ #include <ft2build.h>
+-#include <freetype/freetype.h>
+-#include <freetype/ftglyph.h>
+-#include <freetype/ftoutln.h>
++#include FT_FREETYPE_H
++#include FT_GLYPH_H
++#include FT_OUTLINE_H
+ #endif /* FREETYPEGLUE_ASSUME_FREETYPE */
+
+ #include <Inventor/C/basic.h>
+--- Coin-3.1.3/src/glue/freetype.h
++++ Coin-3.1.3/src/glue/freetype.h
+@@ -87,8 +87,8 @@
+
+ #ifdef HAVE_FREETYPE
+ #include <ft2build.h>
+-#include <freetype/freetype.h>
+-#include <freetype/ftglyph.h>
++#include FT_FREETYPE_H
++#include FT_GLYPH_H
+ #else /* HAVE_FREETYPE */
+
+ #include <Inventor/C/basic.h>
diff --git a/media-libs/coin/files/coin-3.1.3-gcc-4.7.patch b/media-libs/coin/files/coin-3.1.3-gcc-4.7.patch
new file mode 100644
index 000000000000..fd2430903802
--- /dev/null
+++ b/media-libs/coin/files/coin-3.1.3-gcc-4.7.patch
@@ -0,0 +1,10 @@
+--- coin3-3.1.3.orig/include/Inventor/SbBasic.h
++++ coin3-3.1.3/include/Inventor/SbBasic.h
+@@ -24,6 +24,7 @@
+ *
+ \**************************************************************************/
+
++#include <Inventor/C/errors/debugerror.h>
+ #include <Inventor/C/basic.h>
+
+ /* ********************************************************************** */
diff --git a/media-libs/coin/files/coin-3.1.3-pkgconfig-partial.patch b/media-libs/coin/files/coin-3.1.3-pkgconfig-partial.patch
new file mode 100644
index 000000000000..3fd3bca726d4
--- /dev/null
+++ b/media-libs/coin/files/coin-3.1.3-pkgconfig-partial.patch
@@ -0,0 +1,13 @@
+diff -ru ../Coin-3.1.3/Coin.pc.in ./Coin.pc.in
+--- Coin.pc.in 2010-03-02 14:20:09.000000000 +0100
++++ Coin.pc.in 2010-06-28 19:27:59.634534460 +0200
+@@ -10,7 +10,8 @@
+ Version: @COIN_VERSION@
+ Requires:
+ Conflicts:
+-Libs: -L${libdir} @COIN_EXTRA_LDFLAGS@ @COIN_EXTRA_LIBS@
++Libs: -L${libdir} -lCoin
++Libs.private: -L${libdir} @COIN_EXTRA_LIBS@
+ Cflags: -I${includedir} @COIN_EXTRA_CFLAGS@ @COIN_EXTRA_CPPFLAGS@
+
+ coin_host=@host@
diff --git a/media-libs/coin/metadata.xml b/media-libs/coin/metadata.xml
new file mode 100644
index 000000000000..82c9c9c00eb8
--- /dev/null
+++ b/media-libs/coin/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>reavertm@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="simage">Texture loading via <pkg>media-libs/simage</pkg> library</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/compface/Manifest b/media-libs/compface/Manifest
new file mode 100644
index 000000000000..09745e55ce0a
--- /dev/null
+++ b/media-libs/compface/Manifest
@@ -0,0 +1 @@
+DIST compface-1.5.2.tar.gz 46970 SHA256 a6998245f530217b800f33e01656be8d1f0445632295afa100e5c1611e4f6825 SHA512 0da9ee4c5fb2b5c712466d9fa6170e5687b23c038e6304baa42d7ede6d9bd50a1b84da416eb853a420c01a6b9eccd5e7d92a4ebc26295714b85254c05c9e3360 WHIRLPOOL 4dce7203717a30f40d303935aaac301be78407ebd3b1b12532d031f24155a030556ce96773321f213c32affbcdd472081ac64a786d4b4f46b98ffa9faad3952c
diff --git a/media-libs/compface/compface-1.5.2.ebuild b/media-libs/compface/compface-1.5.2.ebuild
new file mode 100644
index 000000000000..de3043874fd8
--- /dev/null
+++ b/media-libs/compface/compface-1.5.2.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils
+
+DESCRIPTION="Utilities and library to convert to/from X-Face format"
+HOMEPAGE="http://www.xemacs.org/Download/optLibs.html"
+SRC_URI="http://ftp.xemacs.org/pub/xemacs/aux/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE=""
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-destdir.diff
+ sed -i "/strip/d" Makefile.in
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc ChangeLog README
+ newbin xbm2xface{.pl,}
+}
diff --git a/media-libs/compface/files/compface-1.5.2-destdir.diff b/media-libs/compface/files/compface-1.5.2-destdir.diff
new file mode 100644
index 000000000000..18ecfd1b4e5f
--- /dev/null
+++ b/media-libs/compface/files/compface-1.5.2-destdir.diff
@@ -0,0 +1,17 @@
+--- compface-1.5.2.orig/Makefile.in
++++ compface-1.5.2/Makefile.in
+@@ -1,10 +1,10 @@
+ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+ srcdir = @srcdir@
+-BINDIR = @bindir@
+-LIBDIR = @libdir@
+-MANDIR = @mandir@
+-INCLUDEDIR = @includedir@
++BINDIR = $(DESTDIR)/@bindir@
++LIBDIR = $(DESTDIR)/@libdir@
++MANDIR = $(DESTDIR)/@mandir@
++INCLUDEDIR = $(DESTDIR)/@includedir@
+
+ @SET_MAKE@
+
diff --git a/media-libs/compface/metadata.xml b/media-libs/compface/metadata.xml
new file mode 100644
index 000000000000..01f3621f3cda
--- /dev/null
+++ b/media-libs/compface/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>net-mail</herd>
+ <maintainer>
+ <email>hattya@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/media-libs/csfml/Manifest b/media-libs/csfml/Manifest
new file mode 100644
index 000000000000..f30b179808da
--- /dev/null
+++ b/media-libs/csfml/Manifest
@@ -0,0 +1 @@
+DIST SFML-1.6-c-sdk-linux-32.tar.gz 1070818 SHA256 c186cc5f0c9e4eee8864143d8e5757849bc84689af43223996e1b289958c076e
diff --git a/media-libs/csfml/csfml-1.6.ebuild b/media-libs/csfml/csfml-1.6.ebuild
new file mode 100644
index 000000000000..b892f59962c2
--- /dev/null
+++ b/media-libs/csfml/csfml-1.6.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="C library for the Simple and Fast Multimedia Library (SFML)"
+HOMEPAGE="http://sfml.sourceforge.net/"
+SRC_URI="mirror://sourceforge/sfml/SFML-${PV}-c-sdk-linux-32.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+DEPEND="~media-libs/libsfml-${PV}"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/SFML-${PV}/CSFML"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-destdir.patch
+}
+
+src_compile() {
+ emake CPP=$(tc-getCXX)
+}
+
+src_install() {
+ emake DESTDIR="${D}" prefix=/usr libdir=/usr/$(get_libdir) install
+ use doc && dohtml doc/html/*
+}
diff --git a/media-libs/csfml/files/csfml-1.6-destdir.patch b/media-libs/csfml/files/csfml-1.6-destdir.patch
new file mode 100644
index 000000000000..cdf0c46215ae
--- /dev/null
+++ b/media-libs/csfml/files/csfml-1.6-destdir.patch
@@ -0,0 +1,76 @@
+--- SFML-1.6.orig/CSFML/src/SFML/Audio/Makefile
++++ SFML-1.6/CSFML/src/SFML/Audio/Makefile
+@@ -20,4 +20,4 @@
+ @rm -rf $(LIBNAME)
+
+ install:
+- @($(CP) $(LIBNAME) $(DESTLIBDIR) && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB))
++ @($(CP) $(LIBNAME) $(DESTDIR)/$(libdir) && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTDIR)/$(libdir)/$(LIB))
+--- SFML-1.6.orig/CSFML/src/SFML/Graphics/Makefile
++++ SFML-1.6/CSFML/src/SFML/Graphics/Makefile
+@@ -20,4 +20,4 @@
+ @rm -rf $(LIBNAME)
+
+ install:
+- @($(CP) $(LIBNAME) $(DESTLIBDIR) && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB))
++ @($(CP) $(LIBNAME) $(DESTDIR)/$(libdir) && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTDIR)/$(libdir)/$(LIB))
+--- SFML-1.6.orig/CSFML/src/SFML/Makefile
++++ SFML-1.6/CSFML/src/SFML/Makefile
+@@ -1,15 +1,18 @@
+ export CC = gcc
+ export CPP = g++
+-export CFLAGS = -W -Wall -pedantic -fPIC -Wno-unused -I../.. -I../../../include -DNDEBUG -DCSFML_EXPORTS -O2
+-export LDFLAGS = -shared
++export CFLAGS += -W -Wall -pedantic -fPIC -Wno-unused -I../.. -I../../../include -DNDEBUG -DCSFML_EXPORTS
++export LDFLAGS += -shared
+ export LIBPATH = ../../../lib
+ export VERSION = 1.6
+ export CP = cp
+ export LN = ln
+ export LNFLAGS = -s -f
+-export DESTDIR = /usr/local
+-export DESTLIBDIR = $(DESTDIR)/lib
+-export DESTINCDIR = $(DESTDIR)/include
++export DESTDIR =
++ifeq ($(origin prefix), undefined)
++ export prefix = /usr/local
++endif
++export libdir = $(prefix)/lib
++export includedir = $(prefix)/include
+
+ all: csfml-system csfml-window csfml-network csfml-graphics csfml-audio
+
+@@ -42,6 +45,6 @@
+ @(cd ./System && $(MAKE) $@ && cd ../Window && $(MAKE) $@ && cd ../Network && $(MAKE) $@ && cd ../Graphics && $(MAKE) $@ && cd ../Audio && $(MAKE) $@)
+
+ install:
+- @(mkdir -p $(DESTLIBDIR))
+- @(mkdir -p $(DESTINCDIR))
+- @(cd ./System && $(MAKE) $@ && cd ../Window && $(MAKE) $@ && cd ../Network && $(MAKE) $@ && cd ../Graphics && $(MAKE) $@ && cd ../Audio && $(MAKE) $@ && $(CP) -r ../../../include/SFML/ $(DESTINCDIR))
++ @(mkdir -p $(DESTDIR)/$(libdir))
++ @(mkdir -p $(DESTDIR)/$(includedir))
++ @(cd ./System && $(MAKE) $@ && cd ../Window && $(MAKE) $@ && cd ../Network && $(MAKE) $@ && cd ../Graphics && $(MAKE) $@ && cd ../Audio && $(MAKE) $@ && $(CP) -r ../../../include/SFML/ $(DESTDIR)/$(includedir))
+--- SFML-1.6.orig/CSFML/src/SFML/Network/Makefile
++++ SFML-1.6/CSFML/src/SFML/Network/Makefile
+@@ -20,4 +20,4 @@
+ @rm -rf $(LIBNAME)
+
+ install:
+- @($(CP) $(LIBNAME) $(DESTLIBDIR) && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB))
++ @($(CP) $(LIBNAME) $(DESTDIR)/$(libdir) && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTDIR)/$(libdir)/$(LIB))
+--- SFML-1.6.orig/CSFML/src/SFML/System/Makefile
++++ SFML-1.6/CSFML/src/SFML/System/Makefile
+@@ -20,4 +20,4 @@
+ @rm -rf $(LIBNAME)
+
+ install:
+- @($(CP) $(LIBNAME) $(DESTLIBDIR) && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB))
++ @($(CP) $(LIBNAME) $(DESTDIR)/$(libdir) && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTDIR)/$(libdir)/$(LIB))
+--- SFML-1.6.orig/CSFML/src/SFML/Window/Makefile
++++ SFML-1.6/CSFML/src/SFML/Window/Makefile
+@@ -20,4 +20,4 @@
+ @rm -rf $(LIBNAME)
+
+ install:
+- @($(CP) $(LIBNAME) $(DESTLIBDIR) && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB))
++ @($(CP) $(LIBNAME) $(DESTDIR)/$(libdir) && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTDIR)/$(libdir)/$(LIB))
diff --git a/media-libs/csfml/metadata.xml b/media-libs/csfml/metadata.xml
new file mode 100644
index 000000000000..1e6037059c9c
--- /dev/null
+++ b/media-libs/csfml/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">sfml</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/ctl/Manifest b/media-libs/ctl/Manifest
new file mode 100644
index 000000000000..fe214663e075
--- /dev/null
+++ b/media-libs/ctl/Manifest
@@ -0,0 +1 @@
+DIST ctl-1.4.1.tar.gz 996923 SHA256 b202d9552eeb81f3ded66a6786719f6e1138fa4e31c866799b1efad6ef7a9f9a SHA512 671efbdef287c69b416462d479be58c6cfba331b5b6faa1a694ece162aa2ee966482423babb49c61de3d5046499a81110e4cd30824d9d36a3d6b69068b075063 WHIRLPOOL 2d5a928171cc842558b2c835419bf61da3293a1e6332bd53045ee65367ac67f69c82fea7285239419ed8e0b6256615c41a4f9a0dab52f120ca8504af3158814c
diff --git a/media-libs/ctl/ctl-1.4.1.ebuild b/media-libs/ctl/ctl-1.4.1.ebuild
new file mode 100644
index 000000000000..12fd88661702
--- /dev/null
+++ b/media-libs/ctl/ctl-1.4.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
+inherit eutils libtool
+
+DESCRIPTION="AMPAS' Color Transformation Language"
+HOMEPAGE="http://sourceforge.net/projects/ampasctl"
+SRC_URI="mirror://sourceforge/ampasctl/${P}.tar.gz"
+
+LICENSE="AMPAS"
+SLOT="0"
+KEYWORDS="amd64 hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd"
+IUSE="static-libs"
+
+RDEPEND="media-libs/ilmbase:="
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gcc4{3,7}.patch
+ elibtoolize
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ emake DESTDIR="${D}" docdir=/usr/share/doc/${PF} install
+ dodoc AUTHORS ChangeLog NEWS README
+
+ prune_libtool_files --all
+}
diff --git a/media-libs/ctl/files/ctl-1.4.1-gcc43.patch b/media-libs/ctl/files/ctl-1.4.1-gcc43.patch
new file mode 100644
index 000000000000..5f7e8fa8d560
--- /dev/null
+++ b/media-libs/ctl/files/ctl-1.4.1-gcc43.patch
@@ -0,0 +1,106 @@
+--- IlmCtl/CtlLex.h
++++ IlmCtl/CtlLex.h
+@@ -58,10 +58,11 @@
+ //-----------------------------------------------------------------------------
+
+ #include <CtlLContext.h>
+ #include <CtlTokens.h>
+ #include <string>
++#include <cstdlib>
+
+ namespace Ctl {
+
+
+ class Lex
+--- IlmCtlMathTest/testAffineRec.cpp
++++ IlmCtlMathTest/testAffineRec.cpp
+@@ -43,13 +43,14 @@
+ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ //
+ ///////////////////////////////////////////////////////////////////////////
+
+-#include <string>
++#include <cstring>
+ #include <fstream>
+ #include <iostream>
++#include <cstdlib>
+ #include <assert.h>
+ #include <CtlRbfInterpolator.h>
+ #include <ImathVec.h>
+
+ using namespace std;
+--- IlmCtlMathTest/testGaussRec.cpp
++++ IlmCtlMathTest/testGaussRec.cpp
+@@ -43,13 +43,14 @@
+ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ //
+ ///////////////////////////////////////////////////////////////////////////
+
+-#include <string>
++#include <cstring>
+ #include <fstream>
+ #include <iostream>
++#include <cstdlib>
+ #include <assert.h>
+ #include <CtlRbfInterpolator.h>
+ #include <ImathVec.h>
+
+ using namespace std;
+--- IlmCtlSimd/CtlSimdReg.h
++++ IlmCtlSimd/CtlSimdReg.h
+@@ -50,10 +50,11 @@
+ #define INCLUDED_CTL_SIMD_REG_H
+
+ #include <typeinfo>
+ #include <CtlExc.h>
+ #include <Iex.h>
++#include <cstring>
+
+ //-----------------------------------------------------------------------------
+ //
+ // Registers for the SIMD color transformation engine
+ //
+--- IlmCtlTest/testExamples.cpp
++++ IlmCtlTest/testExamples.cpp
+@@ -43,10 +43,11 @@
+ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ //
+ ///////////////////////////////////////////////////////////////////////////
+
++#include <cstring>
+ #include <CtlSimdInterpreter.h>
+ #include <CtlFunctionCall.h>
+ #include <CtlType.h>
+ #include <assert.h>
+
+--- IlmCtlTest/testVarying.cpp
++++ IlmCtlTest/testVarying.cpp
+@@ -49,10 +49,11 @@
+ #include <CtlSimdInterpreter.h>
+ #include <CtlFunctionCall.h>
+ #include <CtlType.h>
+ #include <ImathMath.h>
+ #include <iostream>
++#include <cstring>
+ #include <exception>
+ #include <assert.h>
+ #include <sstream>
+ #include <limits>
+ #include <half.h>
+--- IlmCtlTest/testVaryingReturn.cpp
++++ IlmCtlTest/testVaryingReturn.cpp
+@@ -49,10 +49,11 @@
+ #include <CtlSimdInterpreter.h>
+ #include <CtlFunctionCall.h>
+ #include <CtlType.h>
+ #include <ImathMath.h>
+ #include <iostream>
++#include <cstring>
+ #include <exception>
+ #include <assert.h>
+ #include <sstream>
+ #include <limits>
+ #include <half.h>
diff --git a/media-libs/ctl/files/ctl-1.4.1-gcc47.patch b/media-libs/ctl/files/ctl-1.4.1-gcc47.patch
new file mode 100644
index 000000000000..1aa4be4fe6d0
--- /dev/null
+++ b/media-libs/ctl/files/ctl-1.4.1-gcc47.patch
@@ -0,0 +1,15 @@
+ https://bugs.gentoo.org/426368
+
+ IlmCtl/CtlInterpreter.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/IlmCtl/CtlInterpreter.cpp
++++ b/IlmCtl/CtlInterpreter.cpp
+@@ -64,6 +64,7 @@
+ #include <fstream>
+ #include <algorithm>
+ #include <cassert>
++#include <unistd.h>
+
+ #ifdef WIN32
+ #include <io.h>
diff --git a/media-libs/ctl/metadata.xml b/media-libs/ctl/metadata.xml
new file mode 100644
index 000000000000..de95417e2be2
--- /dev/null
+++ b/media-libs/ctl/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">ampasctl</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/devil/Manifest b/media-libs/devil/Manifest
new file mode 100644
index 000000000000..8a251b76c864
--- /dev/null
+++ b/media-libs/devil/Manifest
@@ -0,0 +1 @@
+DIST DevIL-1.7.8.tar.gz 2051993 SHA256 682ffa3fc894686156337b8ce473c954bf3f4fb0f3ecac159c73db632d28a8fd SHA512 a67e1488d6cb366431d9fcb460b8fe5b8a1dd79426ac77f8abd0db4a5aad7512697f72ef0c49ddb0e806469cc37ba1319e10ccd2ebd73942332df2c3c507458e WHIRLPOOL 749bf0ce73786709414d6f2c3bf29b20c56397cb6f9f92b4158902a98a4f4d0ef66d78096ce8daea3d65b1718c5255421055cd223e9269f6c773ca310c2df146
diff --git a/media-libs/devil/devil-1.7.8-r2.ebuild b/media-libs/devil/devil-1.7.8-r2.ebuild
new file mode 100644
index 000000000000..1f03c571c27a
--- /dev/null
+++ b/media-libs/devil/devil-1.7.8-r2.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 autotools eutils
+
+MY_P=DevIL-${PV}
+
+DESCRIPTION="DevIL image library"
+HOMEPAGE="http://openil.sourceforge.net/"
+SRC_URI="mirror://sourceforge/openil/${MY_P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~mips ppc ~ppc64 x86"
+IUSE="allegro gif glut jpeg jpeg2k mng nvtt openexr opengl png sdl cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse3 static-libs tiff xpm X"
+
+RDEPEND="allegro? ( media-libs/allegro:0 )
+ gif? ( media-libs/giflib )
+ glut? ( media-libs/freeglut )
+ jpeg? ( virtual/jpeg:0 )
+ jpeg2k? ( media-libs/jasper )
+ mng? ( media-libs/libmng )
+ nvtt? ( media-gfx/nvidia-texture-tools )
+ openexr? ( media-libs/openexr )
+ opengl? ( virtual/opengl
+ virtual/glu )
+ png? ( media-libs/libpng:0 )
+ sdl? ( media-libs/libsdl )
+ tiff? ( media-libs/tiff:0 )
+ xpm? ( x11-libs/libXpm )
+ X? ( x11-libs/libXext
+ x11-libs/libX11
+ x11-libs/libXrender )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ X? ( x11-proto/xextproto )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-{CVE-2009-3994,libpng14,nvtt-glut,ILUT}.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ --disable-lcms \
+ --enable-ILU \
+ --enable-ILUT \
+ $(use_enable cpu_flags_x86_sse sse) \
+ $(use_enable cpu_flags_x86_sse2 sse2) \
+ $(use_enable cpu_flags_x86_sse3 sse3) \
+ $(use_enable openexr exr) \
+ $(use_enable gif) \
+ $(use_enable jpeg) \
+ $(use_enable jpeg2k jp2) \
+ $(use_enable mng) \
+ $(use_enable png) \
+ $(use_enable tiff) \
+ $(use_enable xpm) \
+ $(use_enable allegro) \
+ --disable-directx8 \
+ --disable-directx9 \
+ $(use_enable opengl) \
+ $(use_enable sdl) \
+ $(use_enable X x11) \
+ $(use_enable X shm) \
+ $(use_enable X render) \
+ $(use_enable glut) \
+ $(use_with X x) \
+ $(use_with nvtt)
+}
+
+src_install() {
+ default
+ use static-libs || prune_libtool_files
+}
diff --git a/media-libs/devil/files/devil-1.7.8-CVE-2009-3994.patch b/media-libs/devil/files/devil-1.7.8-CVE-2009-3994.patch
new file mode 100644
index 000000000000..6c9f2db1d270
--- /dev/null
+++ b/media-libs/devil/files/devil-1.7.8-CVE-2009-3994.patch
@@ -0,0 +1,17 @@
+http://bugs.gentoo.org/297760
+
+--- src-IL/src/il_dicom.c
++++ src-IL/src/il_dicom.c
+@@ -427,9 +427,11 @@ ILboolean GetUID(ILubyte *UID)
+ return IL_FALSE;
+
+ ValLen = GetLittleUShort();
++ if (ValLen > 64)
++ return IL_FALSE;
+ if (iread(UID, ValLen, 1) != 1)
+ return IL_FALSE;
+- UID[64] = 0; // Just to make sure that our string is terminated.
++ UID[ValLen] = 0; // Just to make sure that our string is terminated.
+
+ return IL_TRUE;
+ }
diff --git a/media-libs/devil/files/devil-1.7.8-ILUT.patch b/media-libs/devil/files/devil-1.7.8-ILUT.patch
new file mode 100644
index 000000000000..7807d0eac2e6
--- /dev/null
+++ b/media-libs/devil/files/devil-1.7.8-ILUT.patch
@@ -0,0 +1,17 @@
+From: hasufell <hasufell@gentoo.org>
+Date: Thu May 3 22:23:21 UTC 2012
+
+use_x11=no was not set when --disable-x11 was
+
+--- m4/devil-api_checks.m4
++++ m4/devil-api_checks.m4
+@@ -137,7 +137,8 @@
+ [main],
+ [dnl The use_x11 var is either "yes" already, or we don't want "no" to be overwritten
+ ILUT_LIBS="-lX11 $ILUT_LIBS"],
+- [use_x11="no"]) ])
++ [use_x11="no"]) ],
++ [use_x11="no"])
+ TEST_API([shm])
+ AS_IF([test "x$enable_shm" = "xyes"],
+ [AC_CHECK_HEADER([X11/extensions/XShm.h],
diff --git a/media-libs/devil/files/devil-1.7.8-libpng14.patch b/media-libs/devil/files/devil-1.7.8-libpng14.patch
new file mode 100644
index 000000000000..b8434692b8bd
--- /dev/null
+++ b/media-libs/devil/files/devil-1.7.8-libpng14.patch
@@ -0,0 +1,33 @@
+diff -Nur devil-1.7.8.orig/src-IL/src/il_icon.c devil-1.7.8/src-IL/src/il_icon.c
+--- devil-1.7.8.orig/src-IL/src/il_icon.c 2009-03-08 09:10:09.000000000 +0200
++++ devil-1.7.8/src-IL/src/il_icon.c 2010-01-17 00:54:09.000000000 +0200
+@@ -525,7 +525,7 @@
+
+ // Expand low-bit-depth grayscale images to 8 bits
+ if (ico_color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) {
+- png_set_gray_1_2_4_to_8(ico_png_ptr);
++ png_set_expand_gray_1_2_4_to_8(ico_png_ptr);
+ }
+
+ // Expand RGB images with transparency to full alpha channels
+diff -Nur devil-1.7.8.orig/src-IL/src/il_png.c devil-1.7.8/src-IL/src/il_png.c
+--- devil-1.7.8.orig/src-IL/src/il_png.c 2009-03-08 09:10:09.000000000 +0200
++++ devil-1.7.8/src-IL/src/il_png.c 2010-01-17 00:55:26.000000000 +0200
+@@ -105,7 +105,7 @@
+ Read = iread(Signature, 1, 8);
+ iseek(-Read, IL_SEEK_CUR);
+
+- return png_check_sig(Signature, 8);
++ return png_sig_cmp(Signature, 0, 8) == 0;
+ }
+
+
+@@ -278,7 +278,7 @@
+
+ // Expand low-bit-depth grayscale images to 8 bits
+ if (png_color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) {
+- png_set_gray_1_2_4_to_8(png_ptr);
++ png_set_expand_gray_1_2_4_to_8(png_ptr);
+ }
+
+ // Expand RGB images with transparency to full alpha channels
diff --git a/media-libs/devil/files/devil-1.7.8-nvtt-glut.patch b/media-libs/devil/files/devil-1.7.8-nvtt-glut.patch
new file mode 100644
index 000000000000..8e2ccd74e18e
--- /dev/null
+++ b/media-libs/devil/files/devil-1.7.8-nvtt-glut.patch
@@ -0,0 +1,83 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Tue May 1 20:00:44 UTC 2012
+Subject: build system
+
+remove automagic handling of glut and add configure option
+fix "header present but cannot be compiled" warning for nvtt
+
+--- m4/ax_check_glut.m4
++++ m4/ax_check_glut.m4
+@@ -114,4 +114,11 @@
+
+ AC_SUBST([GLUT_CFLAGS])
+ AC_SUBST([GLUT_LIBS])
++
++AC_ARG_ENABLE([glut],
++ [AS_HELP_STRING([--enable-glut],
++ [Enable support for glut (default=yes)]) ],
++ [enable_glut=$enableval],
++ [enable_glut="yes"])
++
+ ])dnl
+--- m4/devil-api_checks.m4
++++ m4/devil-api_checks.m4
+@@ -31,8 +31,8 @@
+ AS_IF([test "x$no_gl" != "xyes" -a "x$no_glu" != "xyes"],
+ [use_ogl="yes"
+ ILUT_LIBS="$GLU_LIBS $GL_LIBS $ILUT_LIBS"
+- AS_IF([test "x$no_glut" != "xyes"],
+- [have_glut="yes"
++ AS_IF([test "x$no_glut" != "xyes" -a "x$enable_glut" = "xyes"],
++ [use_glut="yes"
+ ILUT_LIBS="$GLUT_LIBS $ILUT_LIBS"])
+ AC_DEFINE([ILUT_USE_OPENGL],
+ [1],
+--- configure.ac
++++ configure.ac
+@@ -343,8 +343,10 @@
+ [Do you want to use the Nvidia texture tools if possible? (enables GPU accelerated image manipulation, default="yes")]) ],
+ [],
+ [with_nvtt="yes"])
++AC_LANG_PUSH([C++])
+ AS_IF([test "x$with_nvtt" = "xyes"],
+ [DEVIL_CHECK_NVIDIA_TEXTOOLS])
++AC_LANG_POP
+
+ dnl
+ dnl ILUT APIs library checking
+@@ -392,8 +394,8 @@
+ AM_CONDITIONAL([USE_OPENGL],
+ [test "x$use_ogl" = "xyes"])
+
+-AM_CONDITIONAL([HAVE_GLUT],
+- [test "x$have_glut" = "xyes"])
++AM_CONDITIONAL([USE_GLUT],
++ [test "x$use_glut" = "xyes"])
+
+ AM_CONDITIONAL([USE_SDL],
+ [test "x$use_sdl" = "xyes"])
+@@ -410,7 +412,7 @@
+ AM_CONDITIONAL([USE_X11],
+ [test "x$use_x11" = "xyes"])
+ #this is instedad AM_COND_IF([USE_OPENGL && USE_X11])
+-AS_IF([test "x$have_glut" = "xyes" -a "x$use_x11" = "xyes"],
++AS_IF([test "x$use_glut" = "xyes" -a "x$use_x11" = "xyes"],
+ [EXAMPLES_TO_BUILD="$EXAMPLES_TO_BUILD ILUT_gl ILUT_volume"])
+
+ dnl Win32
+--- bin/Makefile.am
++++ bin/Makefile.am
+@@ -45,11 +45,11 @@
+ examples_PROGRAMS += ILUT_animation
+ endif #USE_W32
+
+-if HAVE_GLUT
++if USE_GLUT
+ if USE_X11
+ examples_PROGRAMS += ILUT_gl ILUT_volume
+ endif #USE_X11
+-endif #HAVE_GLUT
++endif #USE_GLUT
+
+ endif #BUILD_ILUT
+
diff --git a/media-libs/devil/metadata.xml b/media-libs/devil/metadata.xml
new file mode 100644
index 000000000000..30db632a5379
--- /dev/null
+++ b/media-libs/devil/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>games</herd>
+ <use>
+ <flag name="allegro">Add support for Allegro</flag>
+ <flag name="nvtt">Add support for <pkg>dev-util/nvidia-texture-tools</pkg></flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">openil</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/dssi/Manifest b/media-libs/dssi/Manifest
new file mode 100644
index 000000000000..12d89a4d77a4
--- /dev/null
+++ b/media-libs/dssi/Manifest
@@ -0,0 +1 @@
+DIST dssi-1.1.1.tar.gz 712038 SHA256 f2c82b073a947c8255284249097667f9b14e660bf86186f3fcd3b3b3e087814e
diff --git a/media-libs/dssi/dssi-1.1.1.ebuild b/media-libs/dssi/dssi-1.1.1.ebuild
new file mode 100644
index 000000000000..b4c318a00ef9
--- /dev/null
+++ b/media-libs/dssi/dssi-1.1.1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit autotools
+
+DESCRIPTION="Plugin API for software instruments with user interfaces"
+HOMEPAGE="http://dssi.sourceforge.net/"
+SRC_URI="mirror://sourceforge/dssi/${P}.tar.gz"
+
+LICENSE="BSD LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86"
+IUSE="qt4"
+
+RDEPEND="media-libs/alsa-lib
+ >=media-libs/liblo-0.12
+ >=media-sound/jack-audio-connection-kit-0.99.14
+ >=media-libs/ladspa-sdk-1.12-r2
+ >=media-libs/libsndfile-1.0.11
+ >=media-libs/libsamplerate-0.1.1-r1
+ qt4? ( dev-qt/qtgui:4 )"
+DEPEND="${RDEPEND}
+ sys-apps/sed
+ virtual/pkgconfig"
+
+src_prepare() {
+ sed -i \
+ -e 's:libdir=.*:libdir=@libdir@:' \
+ dssi.pc.in || die
+
+ if ! use qt4; then
+ sed -i -e '/PKG_CHECK_MODULES(QT/s:QtGui:dIsAbLe&:' configure.ac || die
+ fi
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-dependency-tracking
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc README doc/TODO doc/*.txt
+ find "${D}" -name '*.la' -delete
+}
diff --git a/media-libs/dssi/metadata.xml b/media-libs/dssi/metadata.xml
new file mode 100644
index 000000000000..ecc06c7ce1db
--- /dev/null
+++ b/media-libs/dssi/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>proaudio</herd>
+ <upstream>
+ <remote-id type="sourceforge">dssi</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/dumb/Manifest b/media-libs/dumb/Manifest
new file mode 100644
index 000000000000..8bac61324da8
--- /dev/null
+++ b/media-libs/dumb/Manifest
@@ -0,0 +1 @@
+DIST dumb-0.9.3.tar.gz 167379 SHA256 8d44fbc9e57f3bac9f761c3b12ce102d47d717f0dd846657fb988e0bb5d1ea33 SHA512 9ecdea460858b7e6ad7ca2534ecb3581397e6c1fa904459affe19ce49f528e580e143b42b13413b292ae7b57901a8008e6a9ee3821824f6ff7914b136f75c658 WHIRLPOOL c5139d6d845245fc60a9984064b5bf9b0cb54e0499ddd55db56ca5faa31ebc6158b486b70409dc6068c8261330e9200c84c278e19c9fa16bf32b67c403f44e9b
diff --git a/media-libs/dumb/dumb-0.9.3-r3.ebuild b/media-libs/dumb/dumb-0.9.3-r3.ebuild
new file mode 100644
index 000000000000..8f0dafd9c315
--- /dev/null
+++ b/media-libs/dumb/dumb-0.9.3-r3.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs multilib-build multilib-minimal
+
+DESCRIPTION="IT/XM/S3M/MOD player library with click removal and IT filters"
+HOMEPAGE="http://dumb.sourceforge.net/"
+SRC_URI="mirror://sourceforge/dumb/${P}.tar.gz"
+
+LICENSE="DUMB-0.9.2"
+SLOT="0"
+KEYWORDS="alpha amd64 ia64 ppc ppc64 sparc x86"
+IUSE="debug"
+
+RDEPEND=""
+DEPEND=""
+
+src_prepare() {
+ cat << EOF > make/config.txt
+include make/unix.inc
+ALL_TARGETS := core core-examples core-headers
+PREFIX := /usr
+EOF
+
+ epatch "${FILESDIR}"/${P}-PIC-as-needed.patch
+ epatch "${FILESDIR}"/${P}_CVE-2006-3668.patch
+ sed -i '/= -s/d' Makefile || die "sed failed"
+ cp -f Makefile Makefile.rdy
+
+ multilib_copy_sources
+}
+
+multilib_src_compile() {
+ emake CC="$(tc-getCC)" OFLAGS="${CFLAGS}" all
+}
+
+multilib_src_install() {
+ dolib.so lib/unix/libdumb.so
+ use debug && dolib.so lib/unix/libdumbd.so
+
+ doheader include/dumb.h
+
+ dobin examples/{dumbout,dumb2wav}
+ dodoc readme.txt release.txt docs/*
+}
+
+pkg_postinst() {
+ elog "DUMB's core has been installed. This will enable you to convert module"
+ elog "files to PCM data (ready for sending to /dev/dsp, writing to a .wav"
+ elog "file, piping through oggenc, etc.)."
+ elog
+ elog "If you are using Allegro, you will also want to 'emerge aldumb'. This"
+ elog "provides you with a convenient API for playing module files through"
+ elog "Allegro's sound system, and also enables DUMB to integrate with"
+ elog "Allegro's datafile system so you can add modules to datafiles."
+ elog
+ elog "As a developer, when you distribute your game and write your docs, be"
+ elog "aware that 'dumb' and 'aldumb' actually come from the same download."
+ elog "People who don't use Gentoo will only have to download and install one"
+ elog "package. See readme.txt in /usr/share/doc/${PF} for details on"
+ elog "how DUMB would be compiled manually."
+}
diff --git a/media-libs/dumb/files/dumb-0.9.3-PIC-as-needed.patch b/media-libs/dumb/files/dumb-0.9.3-PIC-as-needed.patch
new file mode 100644
index 000000000000..217caa406b3e
--- /dev/null
+++ b/media-libs/dumb/files/dumb-0.9.3-PIC-as-needed.patch
@@ -0,0 +1,72 @@
+diff -Naur dumb.orig/Makefile dumb/Makefile
+--- dumb.orig/Makefile 2003-04-03 16:34:18.000000000 -0800
++++ dumb/Makefile 2004-07-06 14:43:38.158063165 -0700
+@@ -199,11 +199,11 @@
+ ALLEGRO_EXAMPLES_EXE := $(addprefix examples/, $(notdir $(patsubst %.c, %$(EXE_SUFFIX), $(ALLEGRO_EXAMPLES))))
+
+
+-CORE_LIB_FILE_RELEASE := $(LIBDIR)/libdumb.a
+-ALLEGRO_LIB_FILE_RELEASE := $(LIBDIR)/libaldmb.a
++CORE_LIB_FILE_RELEASE := $(LIBDIR)/libdumb.so
++ALLEGRO_LIB_FILE_RELEASE := $(LIBDIR)/libaldmb.so
+
+-CORE_LIB_FILE_DEBUG := $(LIBDIR)/libdumbd.a
+-ALLEGRO_LIB_FILE_DEBUG := $(LIBDIR)/libaldmd.a
++CORE_LIB_FILE_DEBUG := $(LIBDIR)/libdumbd.so
++ALLEGRO_LIB_FILE_DEBUG := $(LIBDIR)/libaldmd.so
+
+
+ core: $(CORE_LIB_FILE_RELEASE) $(CORE_LIB_FILE_DEBUG)
+@@ -272,22 +272,22 @@
+
+ OBJDIR := $(OBJDIR_BASE)/release
+ CFLAGS := $(CFLAGS_RELEASE)
+-CORE_LIB_FILE := $(LIBDIR)/libdumb.a
+-ALLEGRO_LIB_FILE := $(LIBDIR)/libaldmb.a
++CORE_LIB_FILE := $(LIBDIR)/libdumb.so
++ALLEGRO_LIB_FILE := $(LIBDIR)/libaldmb.so
+ include make/Makefile.inc
+
+ OBJDIR := $(OBJDIR_BASE)/debug
+ CFLAGS := $(CFLAGS_DEBUG)
+-CORE_LIB_FILE := $(LIBDIR)/libdumbd.a
+-ALLEGRO_LIB_FILE := $(LIBDIR)/libaldmd.a
++CORE_LIB_FILE := $(LIBDIR)/libdumbd.so
++ALLEGRO_LIB_FILE := $(LIBDIR)/libaldmd.so
+ include make/Makefile.inc
+
+
+ $(CORE_EXAMPLES_EXE): examples/%$(EXE_SUFFIX): examples/%.o $(CORE_LIB_FILE_RELEASE)
+- $(CC) $^ -o $@ $(LDFLAGS) $(LINK_MATH)
++ $(CC) $^ -o $@ $(LDFLAGS) $(LINK_MATH)
+
+ $(ALLEGRO_EXAMPLES_EXE): examples/%$(EXE_SUFFIX): examples/%.o $(ALLEGRO_LIB_FILE_RELEASE) $(CORE_LIB_FILE_RELEASE)
+- $(CC) $^ -o $@ $(LDFLAGS) $(LINK_ALLEGRO)
++ $(CC) $^ -o $@ $(LDFLAGS) $(LINK_ALLEGRO)
+
+ $(CORE_EXAMPLES_OBJ): examples/%.o: examples/%.c include/dumb.h
+ $(CC) -c $< -o $@ $(CFLAGS_RELEASE)
+diff -Naur dumb.orig/make/Makefile.inc dumb/make/Makefile.inc
+--- dumb.orig/make/Makefile.inc 2003-04-03 16:34:18.000000000 -0800
++++ dumb/make/Makefile.inc 2004-07-06 14:37:13.082037585 -0700
+@@ -10,8 +10,8 @@
+ # accurately, create a local copy of the current CFLAGS variable. This is
+ # necessary because Make doesn't expand variables in commands until they are
+ # executed.
+-$(CORE_LIB_FILE): CFLAGS := $(CFLAGS)
+-$(ALLEGRO_LIB_FILE): CFLAGS := $(CFLAGS)
++$(CORE_LIB_FILE): CFLAGS := $(CFLAGS) -fPIC -DPIC
++$(ALLEGRO_LIB_FILE): CFLAGS := $(CFLAGS) -fPIC -DPIC
+
+
+ $(OBJDIR)/%.o: src/core/%.c include/dumb.h include/internal/dumb.h
+@@ -28,7 +28,7 @@
+ $(CC) -c -o $@ $< $(CFLAGS) $(WFLAGS_ALLEGRO)
+
+ $(CORE_LIB_FILE): $(CORE_OBJECTS)
+- $(AR) rs $@ $^
++ $(CC) -shared -o $@ $(LDFLAGS) -Wl,-shared,-soname,$(shell basename $@) $^ -lm
+
+ $(ALLEGRO_LIB_FILE): $(ALLEGRO_OBJECTS)
+- $(AR) rs $@ $^
++ $(CC) -shared -o $@ $(LDFLAGS) -Wl,-shared,-soname,$(shell basename $@) $^ -ldumb
diff --git a/media-libs/dumb/files/dumb-0.9.3_CVE-2006-3668.patch b/media-libs/dumb/files/dumb-0.9.3_CVE-2006-3668.patch
new file mode 100644
index 000000000000..09d2fb68f4cb
--- /dev/null
+++ b/media-libs/dumb/files/dumb-0.9.3_CVE-2006-3668.patch
@@ -0,0 +1,16 @@
+Index: libdumb-0.9.3/src/it/itread.c
+===================================================================
+--- libdumb-0.9.3.orig/src/it/itread.c 2006-07-21 11:05:48.000000000 +0200
++++ libdumb-0.9.3/src/it/itread.c 2006-07-21 11:07:22.000000000 +0200
+@@ -292,6 +292,11 @@
+
+ envelope->flags = dumbfile_getc(f);
+ envelope->n_nodes = dumbfile_getc(f);
++ if(envelope->n_nodes > 25) {
++ TRACE("IT error: wrong number of envelope nodes (%d)\n", envelope->n_nodes);
++ envelope->n_nodes = 0;
++ return -1;
++ }
+ envelope->loop_start = dumbfile_getc(f);
+ envelope->loop_end = dumbfile_getc(f);
+ envelope->sus_loop_start = dumbfile_getc(f);
diff --git a/media-libs/dumb/metadata.xml b/media-libs/dumb/metadata.xml
new file mode 100644
index 000000000000..ef5cb01f98d2
--- /dev/null
+++ b/media-libs/dumb/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>joker@gentoo.org</email>
+ <name>Christian Birchinger</name>
+ </maintainer>
+ <herd>sound</herd>
+ <upstream>
+ <remote-id type="sourceforge">dumb</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/edje/Manifest b/media-libs/edje/Manifest
new file mode 100644
index 000000000000..d27d303d37e3
--- /dev/null
+++ b/media-libs/edje/Manifest
@@ -0,0 +1,3 @@
+DIST edje-1.7.10.tar.bz2 1120320 SHA256 1fd5bbf7a105e4cb455d59f82de136c0cbc74f8b0a16e0f6a845fc6471ab85fe SHA512 222b2e1265d9083edb927994ed0afdcdd10399fccd867835e180604abde8c0d43bd94b3727f121ba159e2ca4bf870c1078a0894522ccdebe75e91e9ca9d95bec WHIRLPOOL 81f74f34c90ad43fda7bb5aaa66aecde2e0a655ef3ad168893144110fdf4ab89996931e5c60d98cbab5cbdedcf13aad921e00477725a9915663ff142bee86f2e
+DIST edje-1.7.8.tar.bz2 1120710 SHA256 eb400f7bcda5ec6a67b35fabe65b333dc87c8c62a9a6082bd0180a49fc3309c2 SHA512 ccaae74936ba16e3403dc428bc42e8ea5361a89cb2527f21a6963c026e58527b8abd51d23fbebaf43bb5335f11d3a3f5cc65ed72eb7550f4e5aa696474035d24 WHIRLPOOL 2eaa6c13b12ecf6a52f0a857b6d0706f55679ac7b27175255c09668616866aafbcdf76df64bae5da03c79a1e3c9652bf919afc8bf0762862e5f8b89d79ccd70e
+DIST edje-1.7.9.tar.bz2 1120824 SHA256 846dcf4b56b48465e6b8373389984c2e06a06fd681a803cb341a985e1c5d5f3c SHA512 ccb9f9c78fe3ee372c8cf11d594a2053a3a8f60670454d5cd878dc78a7fade12852ca28b889944a1b1609486c27bc58e119ea10d7843f91530a99293db813b23 WHIRLPOOL 0f6de4c0d186af23f289ea35769f00e31482c8b0bd6fc242e0ff2344e518537e1c8623a870a61cf23f4c7904b0e5fa71c6b6b250eecb75fbcf043680b1282fe7
diff --git a/media-libs/edje/edje-1.7.10.ebuild b/media-libs/edje/edje-1.7.10.ebuild
new file mode 100644
index 000000000000..005a1c1591a3
--- /dev/null
+++ b/media-libs/edje/edje-1.7.10.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_SUB_PROJECT="legacy"
+ EGIT_URI_APPEND=${PN}
+ EGIT_BRANCH=${PN}-1.7
+else
+ SRC_URI="http://download.enlightenment.org/releases/${P}.tar.bz2"
+ EKEY_STATE="snap"
+fi
+
+inherit enlightenment
+
+DESCRIPTION="graphical layout and animation library"
+HOMEPAGE="http://www.enlightenment.org/pages/edje.html"
+
+LICENSE="BSD-2 GPL-2"
+IUSE="debug +cache static-libs vim-syntax"
+
+DEPEND="dev-lang/lua
+ >=dev-libs/eet-${PV}
+ >=dev-libs/eina-${PV}
+ >=dev-libs/embryo-${PV}
+ >=media-libs/evas-${PV}
+ >=dev-libs/ecore-${PV}"
+RDEPEND=${DEPEND}
+
+src_configure() {
+ E_ECONF=(
+ $(use_enable cache edje-program-cache)
+ $(use_enable cache edje-calc-cache)
+ $(use_enable !debug amalgamation)
+ $(use_enable doc)
+ $(use_with vim-syntax vim /usr/share/vim)
+ )
+ enlightenment_src_configure
+}
+
+src_install() {
+ if use vim-syntax ; then
+ insinto /usr/share/vim/vimfiles/syntax
+ doins data/edc.vim
+ fi
+ dodoc utils/{gimp-edje-export.py,inkscape2edc}
+ enlightenment_src_install
+}
diff --git a/media-libs/edje/edje-1.7.8.ebuild b/media-libs/edje/edje-1.7.8.ebuild
new file mode 100644
index 000000000000..78f0f44d2cfb
--- /dev/null
+++ b/media-libs/edje/edje-1.7.8.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit autotools enlightenment
+
+DESCRIPTION="graphical layout and animation library"
+HOMEPAGE="http://www.enlightenment.org/pages/edje.html"
+SRC_URI="http://download.enlightenment.org/releases/${P}.tar.bz2"
+
+LICENSE="BSD-2 GPL-2"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="debug +cache static-libs vim-syntax"
+
+DEPEND="dev-lang/lua
+ >=dev-libs/eet-1.7.8
+ >=dev-libs/eina-1.7.8
+ >=dev-libs/embryo-1.7.4
+ >=media-libs/evas-1.7.8
+ >=dev-libs/ecore-1.7.8"
+RDEPEND=${DEPEND}
+
+src_prepare() {
+ sed -i "s:1.7.8:1.7.4:g" configure.ac
+ eautoreconf
+}
+
+src_configure() {
+ MY_ECONF+="
+ $(use_enable cache edje-program-cache)
+ $(use_enable cache edje-calc-cache)
+ $(use_enable !debug amalgamation)
+ $(use_enable doc)
+ $(use_with vim-syntax vim /usr/share/vim)
+ "
+ enlightenment_src_configure
+}
+
+src_install() {
+ if use vim-syntax ; then
+ insinto /usr/share/vim/vimfiles/syntax/
+ doins data/edc.vim || die
+ fi
+ dodoc utils/{gimp-edje-export.py,inkscape2edc} || die
+ enlightenment_src_install
+}
diff --git a/media-libs/edje/edje-1.7.9.ebuild b/media-libs/edje/edje-1.7.9.ebuild
new file mode 100644
index 000000000000..a53d49da09cd
--- /dev/null
+++ b/media-libs/edje/edje-1.7.9.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+inherit enlightenment
+
+DESCRIPTION="graphical layout and animation library"
+HOMEPAGE="http://www.enlightenment.org/pages/edje.html"
+SRC_URI="http://download.enlightenment.org/releases/${P}.tar.bz2"
+
+LICENSE="BSD-2 GPL-2"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="debug +cache static-libs vim-syntax"
+
+DEPEND="dev-lang/lua
+ >=dev-libs/eet-1.7.9
+ >=dev-libs/eina-1.7.9
+ >=dev-libs/embryo-1.7.9
+ >=media-libs/evas-1.7.9
+ >=dev-libs/ecore-1.7.9"
+RDEPEND=${DEPEND}
+
+src_configure() {
+ MY_ECONF+="
+ $(use_enable cache edje-program-cache)
+ $(use_enable cache edje-calc-cache)
+ $(use_enable !debug amalgamation)
+ $(use_enable doc)
+ $(use_with vim-syntax vim /usr/share/vim)
+ "
+ enlightenment_src_configure
+}
+
+src_install() {
+ if use vim-syntax ; then
+ insinto /usr/share/vim/vimfiles/syntax/
+ doins data/edc.vim || die
+ fi
+ dodoc utils/{gimp-edje-export.py,inkscape2edc} || die
+ enlightenment_src_install
+}
diff --git a/media-libs/edje/edje-9999.ebuild b/media-libs/edje/edje-9999.ebuild
new file mode 100644
index 000000000000..005a1c1591a3
--- /dev/null
+++ b/media-libs/edje/edje-9999.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_SUB_PROJECT="legacy"
+ EGIT_URI_APPEND=${PN}
+ EGIT_BRANCH=${PN}-1.7
+else
+ SRC_URI="http://download.enlightenment.org/releases/${P}.tar.bz2"
+ EKEY_STATE="snap"
+fi
+
+inherit enlightenment
+
+DESCRIPTION="graphical layout and animation library"
+HOMEPAGE="http://www.enlightenment.org/pages/edje.html"
+
+LICENSE="BSD-2 GPL-2"
+IUSE="debug +cache static-libs vim-syntax"
+
+DEPEND="dev-lang/lua
+ >=dev-libs/eet-${PV}
+ >=dev-libs/eina-${PV}
+ >=dev-libs/embryo-${PV}
+ >=media-libs/evas-${PV}
+ >=dev-libs/ecore-${PV}"
+RDEPEND=${DEPEND}
+
+src_configure() {
+ E_ECONF=(
+ $(use_enable cache edje-program-cache)
+ $(use_enable cache edje-calc-cache)
+ $(use_enable !debug amalgamation)
+ $(use_enable doc)
+ $(use_with vim-syntax vim /usr/share/vim)
+ )
+ enlightenment_src_configure
+}
+
+src_install() {
+ if use vim-syntax ; then
+ insinto /usr/share/vim/vimfiles/syntax
+ doins data/edc.vim
+ fi
+ dodoc utils/{gimp-edje-export.py,inkscape2edc}
+ enlightenment_src_install
+}
diff --git a/media-libs/edje/metadata.xml b/media-libs/edje/metadata.xml
new file mode 100644
index 000000000000..c360c1c28536
--- /dev/null
+++ b/media-libs/edje/metadata.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>enlightenment</herd>
+<use>
+ <flag name='cache'>Enable caching</flag>
+</use>
+<longdescription>
+Edje is a complex graphical design and layout library.
+
+It's purpose is to be a sequel to "Ebits" which to date has serviced the needs of
+Enlightenment development for version 0.17. The original design paramteres under
+which Ebits came about were a lot more restricted than the resulting use of them,
+thus Edje was born.
+
+Edje is a more complex layout engine compared to Ebits. It doesn't pretend to do
+containering and regular layout like a widget set. It still inherits the more
+simplistic layout ideas behind Ebits, but it now does them a lot more cleanly,
+allowing for easy expansion, and the ability to cover much more ground than Ebits
+ever could. For the purposes of Enlightenment 0.17, Edje should serve all the
+purposes of creating visual elements (borders of windows, scrollbars, etc.) and
+allow the designer the ability to animate, layout and control the look and feel of
+any program using Edje as its basic GUI constructor. This library allows for
+multiple collections of Layouts in one file, sharing the same image database and
+thus allowing a whole theme to be conveneintly packaged into 1 file and shipped
+around.
+
+Edje, unlike Ebits, separates the layout and behavior logic. Edje files ship with an
+image database, used by all the parts in all the collections to source graphical
+data. It has a directory of logical part names pointing to the part collection entry
+ID in the file (thus allowing for multiple logical names to point to the same part
+collection, allowing for the sharing of data betwene display elements). Each part
+collection consists of a list of visual parts, as well as a list of programs. A
+program is a conditionally run program that if a particular event occurs (a button
+is pressed, a mouse enters or leaves a part) will trigger an action that may affect
+other parts. In this way a part collection can be "programmed" via its file as to
+hilight buttons when the mouse passes over them or show hidden parts when a button
+is clicked somewhere etc. The actions performed in changing from one state to
+another ar also allowed to transition over a period of time, allowing animation.
+
+This separation and simplistic event driven style of programming can produce almost
+any look and feel one could want for basic visual elements. Anything more complex is
+likely the domain of an application or widget set that may use Edje as a conveneient
+way of being able to configure parts of the display.
+</longdescription>
+</pkgmetadata>
diff --git a/media-libs/elementary/Manifest b/media-libs/elementary/Manifest
new file mode 100644
index 000000000000..fbeef5bc9ad8
--- /dev/null
+++ b/media-libs/elementary/Manifest
@@ -0,0 +1,3 @@
+DIST elementary-1.12.2.tar.bz2 16726431 SHA256 c6aa5e83224400babdd2a6ed848eeb09aa9bed2e1f573619d4d8c0dbf29fcd12 SHA512 05c9fb012bd933fe52978d0bdec7d80be06a54531d6c026de0cd32c7ba218c2c9960ed6c5f5aa94360c88a4465dbd3b8df7d92e73bc6bb754493b44825858232 WHIRLPOOL 97666a5072e280a613f21b3c32566b6a47a0d5a46fbe4983ec3e40c35bba6bd1f5d8f4d09557023494a9eaa89dc14711b8cc007d81e4c19881601955c1acf3df
+DIST elementary-1.13.1.tar.xz 16120080 SHA256 11595b6c5f511150a26e970bf8e590f96a6ce9e33e5dd8419407013844b2b74f SHA512 b8d4e3ff2447a80a98119753012e6ef0666ca569e4d401e66477a51667b6e940eb9c02d87f37b289b257db2855fc35486f0229e8861e74b6c48366aac30caa9f WHIRLPOOL 5400f9a11f2997fde9ee7b170ccf6b8833ad0fdecf229fc2dcbb9eea731e40958922672b47fa539df533006b29f7a197473cb3b24b8bac51a4159fc9f249ec46
+DIST elementary-1.15.0.tar.xz 18430880 SHA256 2be3180acbb9fa2fc0e9351b5508318925eb38733a6d54e1b3fc75e58368f1b0 SHA512 5441ebc012cf76aad074d25394cbb855decabcefa5a8b5feb2909a4fbc470fad32b1660fbc0bd47f6c11267d11cb21fe9df283718d4ccf68ffe44319de229781 WHIRLPOOL 29aa20103a56bd527754f14841216f0c6198e2663836455cc8b6391a88ca558c632f15868b948059616e659fd7c43f797526a472cba26ba38bc5195f562fbb3c
diff --git a/media-libs/elementary/elementary-1.12.2.ebuild b/media-libs/elementary/elementary-1.12.2.ebuild
new file mode 100644
index 000000000000..6255f332846e
--- /dev/null
+++ b/media-libs/elementary/elementary-1.12.2.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_P=${P/_/-}
+
+if [[ "${PV}" == "9999" ]] ; then
+ EGIT_SUB_PROJECT="core"
+ EGIT_URI_APPEND="${PN}"
+else
+ SRC_URI="http://download.enlightenment.org/rel/libs/${PN}/${MY_P}.tar.bz2"
+ EKEY_STATE="snap"
+fi
+
+inherit enlightenment
+
+DESCRIPTION="Basic widget set, based on EFL for mobile touch-screen devices"
+HOMEPAGE="http://trac.enlightenment.org/e/wiki/Elementary"
+
+LICENSE="LGPL-2.1"
+KEYWORDS="amd64 arm x86"
+IUSE="debug examples fbcon quicklaunch sdl wayland X static-libs"
+
+DEPEND="
+ =dev-libs/efl-${PV}[fbcon?,sdl?,png,wayland?,X?]
+ "
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_configure() {
+ MY_ECONF="
+ $(use_enable debug)
+ $(use_enable doc)
+ --disable-ecore-cocoa
+ --disable-ecore-psl1ght
+ --disable-ecore-win32
+ --disable-elocation
+ --disable-emap
+ --disable-eweather
+ $(use_enable examples install-examples)
+ $(use_enable fbcon ecore-fb)
+ $(use_enable sdl ecore-sdl)
+ $(use_enable wayland ecore-wayland)
+ $(use_enable X ecore-x)
+ $(use_enable quicklaunch quick-launch)
+ "
+#broken: make[4]: *** No rule to make target 'prefs_example_01.epb', needed by 'all-am'. Stop
+# $(use_enable examples build-examples)
+
+ enlightenment_src_configure
+}
diff --git a/media-libs/elementary/elementary-1.13.1.ebuild b/media-libs/elementary/elementary-1.13.1.ebuild
new file mode 100644
index 000000000000..6c6bf2ade8d3
--- /dev/null
+++ b/media-libs/elementary/elementary-1.13.1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+MY_P=${P/_/-}
+
+if [[ "${PV}" == "9999" ]] ; then
+ EGIT_SUB_PROJECT="core"
+ EGIT_URI_APPEND="${PN}"
+else
+ SRC_URI="http://download.enlightenment.org/rel/libs/${PN}/${MY_P}.tar.xz"
+ EKEY_STATE="snap"
+fi
+
+inherit enlightenment
+
+DESCRIPTION="Basic widget set, based on EFL for mobile touch-screen devices"
+HOMEPAGE="http://trac.enlightenment.org/e/wiki/Elementary"
+
+LICENSE="LGPL-2.1"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="debug examples fbcon quicklaunch sdl wayland X static-libs"
+
+DEPEND=">=dev-libs/efl-${PV}[fbcon?,sdl?,png,wayland?,X?]"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_configure() {
+ E_ECONF=(
+ $(use_enable debug)
+ $(use_enable doc)
+ --disable-ecore-cocoa
+ --disable-ecore-psl1ght
+ --disable-ecore-win32
+ --disable-elocation
+ --disable-emap
+ --disable-eweather
+ # broken: make[4]: *** No rule to make target 'prefs_example_01.epb', needed by 'all-am'. Stop
+ #$(use_enable examples build-examples)
+ $(use_enable examples install-examples)
+ $(use_enable fbcon ecore-fb)
+ $(use_enable sdl ecore-sdl)
+ $(use_enable wayland ecore-wayland)
+ $(use_enable X ecore-x)
+ $(use_enable quicklaunch quick-launch)
+ )
+
+ enlightenment_src_configure
+}
diff --git a/media-libs/elementary/elementary-1.15.0.ebuild b/media-libs/elementary/elementary-1.15.0.ebuild
new file mode 100644
index 000000000000..838660d10513
--- /dev/null
+++ b/media-libs/elementary/elementary-1.15.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"
+
+MY_P=${P/_/-}
+
+if [[ "${PV}" == "9999" ]] ; then
+ EGIT_SUB_PROJECT="core"
+ EGIT_URI_APPEND="${PN}"
+else
+ SRC_URI="http://download.enlightenment.org/rel/libs/${PN}/${MY_P}.tar.xz"
+ EKEY_STATE="snap"
+fi
+
+inherit enlightenment
+
+DESCRIPTION="Basic widget set, based on EFL for mobile touch-screen devices"
+HOMEPAGE="http://trac.enlightenment.org/e/wiki/Elementary"
+
+LICENSE="LGPL-2.1"
+IUSE="debug examples fbcon quicklaunch sdl wayland X static-libs"
+
+DEPEND=">=dev-libs/efl-${PV}[fbcon?,sdl?,png,wayland?,X?]"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_configure() {
+ E_ECONF=(
+ $(use_enable debug)
+ $(use_enable doc)
+ --disable-ecore-cocoa
+ --disable-ecore-psl1ght
+ --disable-ecore-win32
+ --disable-elocation
+ --disable-emap
+ --disable-eweather
+ # broken: make[4]: *** No rule to make target 'prefs_example_01.epb', needed by 'all-am'. Stop
+ #$(use_enable examples build-examples)
+ $(use_enable examples install-examples)
+ $(use_enable fbcon ecore-fb)
+ $(use_enable sdl ecore-sdl)
+ $(use_enable wayland ecore-wayland)
+ $(use_enable X ecore-x)
+ $(use_enable quicklaunch quick-launch)
+ )
+
+ enlightenment_src_configure
+}
diff --git a/media-libs/elementary/elementary-9999.ebuild b/media-libs/elementary/elementary-9999.ebuild
new file mode 100644
index 000000000000..838660d10513
--- /dev/null
+++ b/media-libs/elementary/elementary-9999.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+MY_P=${P/_/-}
+
+if [[ "${PV}" == "9999" ]] ; then
+ EGIT_SUB_PROJECT="core"
+ EGIT_URI_APPEND="${PN}"
+else
+ SRC_URI="http://download.enlightenment.org/rel/libs/${PN}/${MY_P}.tar.xz"
+ EKEY_STATE="snap"
+fi
+
+inherit enlightenment
+
+DESCRIPTION="Basic widget set, based on EFL for mobile touch-screen devices"
+HOMEPAGE="http://trac.enlightenment.org/e/wiki/Elementary"
+
+LICENSE="LGPL-2.1"
+IUSE="debug examples fbcon quicklaunch sdl wayland X static-libs"
+
+DEPEND=">=dev-libs/efl-${PV}[fbcon?,sdl?,png,wayland?,X?]"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_configure() {
+ E_ECONF=(
+ $(use_enable debug)
+ $(use_enable doc)
+ --disable-ecore-cocoa
+ --disable-ecore-psl1ght
+ --disable-ecore-win32
+ --disable-elocation
+ --disable-emap
+ --disable-eweather
+ # broken: make[4]: *** No rule to make target 'prefs_example_01.epb', needed by 'all-am'. Stop
+ #$(use_enable examples build-examples)
+ $(use_enable examples install-examples)
+ $(use_enable fbcon ecore-fb)
+ $(use_enable sdl ecore-sdl)
+ $(use_enable wayland ecore-wayland)
+ $(use_enable X ecore-x)
+ $(use_enable quicklaunch quick-launch)
+ )
+
+ enlightenment_src_configure
+}
diff --git a/media-libs/elementary/metadata.xml b/media-libs/elementary/metadata.xml
new file mode 100644
index 000000000000..d6388e484588
--- /dev/null
+++ b/media-libs/elementary/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>enlightenment</herd>
+<use>
+ <flag name="quicklaunch">Enable quick-launch support</flag>
+</use>
+<longdescription>
+Elementary is a widget set. It is a new-style of widget set much more
+canvas object based than anything else. Why not ETK? Why not EWL? Well
+they both tend to veer away from the core of Evas, Ecore and Edje a
+lot to build their own worlds. Also I wanted something focused on
+embedded devices - specifically small touchscreens. Unlike GTK+ and
+Qt, 75% of the "widget set" is already embodied in a common core -
+Ecore, Edje, Evas etc. So this fine-grained library splitting means
+all of this is shared, just a new widget "personality" is on top. And
+that is... Elementary, my dear watson. Elementary.
+</longdescription>
+</pkgmetadata>
diff --git a/media-libs/emfengine/Manifest b/media-libs/emfengine/Manifest
new file mode 100644
index 000000000000..b9d87ac27609
--- /dev/null
+++ b/media-libs/emfengine/Manifest
@@ -0,0 +1 @@
+DIST EmfEngine-0.8-opensource.zip 37494 SHA256 3d30b94a6a9529ece104d1d5e948acda69287e66580ed6a4be75e476827f16a8 SHA512 70f8c122520b3053032d9ca36a40cdb3ab647a8e51b6570e40c0855fe478e953fec3a66f99c7fd217cf91c963c031efb7cbaeb10f4a8ca7860752799950fc7ba WHIRLPOOL 9e372afdcfad4bda6399b90d91f82f71262554e0897d2ce165f764401415d169a79e0c57bc3efc1d47ed6589792d2b3ff9048671347a6e164a755a335c18c162
diff --git a/media-libs/emfengine/emfengine-0.8.ebuild b/media-libs/emfengine/emfengine-0.8.ebuild
new file mode 100644
index 000000000000..ba805363f0b8
--- /dev/null
+++ b/media-libs/emfengine/emfengine-0.8.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 eutils qmake-utils
+
+MY_PN="EmfEngine"
+
+DESCRIPTION="Native vector graphics file format on Windows"
+HOMEPAGE="http://soft.proindependent.com/emf/index.html"
+SRC_URI="http://dev.gentoo.org/~jelc/distfiles/${MY_PN}-${PV}-opensource.zip"
+
+SLOT="0"
+LICENSE="GPL-3"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND="
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ media-libs/libemf
+ media-libs/libpng:0
+ "
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S="${WORKDIR}"/${MY_PN}
+
+PATCHES=(
+ "${FILESDIR}/0.7-config.patch"
+ "${FILESDIR}/0.7-header.patch"
+ "${FILESDIR}"/${PV}-example.patch
+ )
+
+src_prepare() {
+ edos2unix EmfEngine.pro
+ epatch ${PATCHES[@]}
+ sed \
+ -e "s:/usr/local/lib/libEMF.a:-lEMF:g" \
+ -e "s:/usr/local/include:${EPREFIX}/usr/include/:g" \
+ -i src/src.pro example/example.pro || die
+}
+
+src_configure() {
+ eqmake4
+}
+
+src_install() {
+ dolib.so libEmfEngine.so*
+ doheader src/*.h*
+}
diff --git a/media-libs/emfengine/files/0.7-config.patch b/media-libs/emfengine/files/0.7-config.patch
new file mode 100644
index 000000000000..709663aa3c8a
--- /dev/null
+++ b/media-libs/emfengine/files/0.7-config.patch
@@ -0,0 +1,13 @@
+diff --git a/config.pri b/config.pri
+index 97854bc..db7e20f 100644
+--- a/config.pri
++++ b/config.pri
+@@ -8,7 +8,7 @@ win32:CONFIG += HAVE_GDI_PLUS
+ #DEFINES += HAVE_ANTIALIASED_TEXT
+
+ # Comment the following line if you want to build EmfEngine statically
+-#CONFIG += EmfEngineDll
++CONFIG += EmfEngineDll
+
+
+
diff --git a/media-libs/emfengine/files/0.7-header.patch b/media-libs/emfengine/files/0.7-header.patch
new file mode 100644
index 000000000000..4d5964fc6806
--- /dev/null
+++ b/media-libs/emfengine/files/0.7-header.patch
@@ -0,0 +1,13 @@
+diff --git a/src/EmfEngine.h b/src/EmfEngine.h
+index 12b1e5b..0573083 100644
+--- a/src/EmfEngine.h
++++ b/src/EmfEngine.h
+@@ -52,7 +52,7 @@
+ using namespace Gdiplus;
+ #else
+ #ifdef Q_WS_X11
+- #include <emf.h>
++ #include <libEMF/emf.h>
+ #endif
+
+ #ifdef Q_WS_MAC
diff --git a/media-libs/emfengine/files/0.8-example.patch b/media-libs/emfengine/files/0.8-example.patch
new file mode 100644
index 000000000000..251419663c0f
--- /dev/null
+++ b/media-libs/emfengine/files/0.8-example.patch
@@ -0,0 +1,12 @@
+diff --git a/EmfEngine.pro b/EmfEngine.pro
+index 4615ffa..032c8b9 100644
+--- a/EmfEngine.pro
++++ b/EmfEngine.pro
+@@ -3,5 +3,4 @@ include( config.pri )
+ TEMPLATE = subdirs
+
+ SUBDIRS = \
+- src \
+- example
+\ No newline at end of file
++ src
diff --git a/media-libs/emfengine/metadata.xml b/media-libs/emfengine/metadata.xml
new file mode 100644
index 000000000000..4bf6dbc6b1ea
--- /dev/null
+++ b/media-libs/emfengine/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>sci</herd>
+ <maintainer>
+ <email>sci@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/media-libs/emotion/Manifest b/media-libs/emotion/Manifest
new file mode 100644
index 000000000000..7cd3a9c04df9
--- /dev/null
+++ b/media-libs/emotion/Manifest
@@ -0,0 +1,3 @@
+DIST emotion-1.7.10.tar.bz2 497860 SHA256 642f408580952ec37574c214d1315a518e48d2667cc004988813a5590412714c SHA512 9ac38d6b785ce3d3cc0f8b3bf712dfa2816a9a5452df434f81fce1645c7eb2d4739600433e4fd29890b4c1b2a5adb515f7234e757634a1d10ea7ff9819311895 WHIRLPOOL 29762874aafba1ef722ec1b131d31a851bd6cb910d698c6f87e3b9b94bc72287ef32c6aadb7ac27758d0224081ffa78f1f43729a9202f38e8a6487703400bf14
+DIST emotion-1.7.8.tar.bz2 497727 SHA256 de5f3962c9dd5616c886decf6fa9fa9dbec16fa7a7f61b83b98f252cb28fb56c SHA512 650f15cb656cbd97011c4690f67260646871fa788924128f6fb2798ca9c7734b4488572009decf538300dce0b7fb10bd0aba51d54c1c29844bb30b07a9b6b909 WHIRLPOOL c8a9e39137862131683ee147f620e1af80e2db7778859b45e1420b877ae5703ff2c7bd3e3ddafa587bc82cc6801cb0e3eb38cd0c3cc9d559cb4f17d5a04ead8f
+DIST emotion-1.7.9.tar.bz2 497737 SHA256 deaeb3ed147c5f057ea05a3caf3c89ee247cdff433149c7e3a7141269008cec9 SHA512 099864b1bba47d0c45db5fbfdce3b3e5c2a8fd43b690e4d362b7dbc539ee4ce9a01e527dc44950eb282164f85c85b11091b7652c01d5bede89aa263e0eeaa20c WHIRLPOOL c1108f17e559815d8f921e56c1dbfe14bf5e5c97aaeaa0ae8edeb0d2603b3d27d01dff39336cc3d15af15386e2cfffde690aaa65112a74096e102df0db1702d6
diff --git a/media-libs/emotion/emotion-1.7.10.ebuild b/media-libs/emotion/emotion-1.7.10.ebuild
new file mode 100644
index 000000000000..c8fb80f2570e
--- /dev/null
+++ b/media-libs/emotion/emotion-1.7.10.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_SUB_PROJECT="legacy"
+ EGIT_URI_APPEND=${PN}
+ EGIT_BRANCH=${PN}-1.7
+else
+ SRC_URI="http://download.enlightenment.org/releases/${P}.tar.bz2"
+ EKEY_STATE="snap"
+fi
+
+inherit enlightenment
+
+DESCRIPTION="video libraries for e17"
+
+LICENSE="BSD-2"
+# The video deps (vlc/xine-lib/gstreamer) are a pain to keyword.
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE="gstreamer static-libs vlc xine"
+
+DEPEND=">=media-libs/evas-${PV}
+ >=media-libs/edje-${PV}
+ >=dev-libs/ecore-${PV}
+ >=dev-libs/eina-${PV}
+ >=dev-libs/eeze-${PV}
+ vlc? ( media-video/vlc )
+ xine? ( >=media-libs/xine-lib-1.1.1 )
+ !gstreamer? ( !vlc? ( !xine? ( >=media-libs/xine-lib-1.1.1 ) ) )
+ gstreamer? (
+ =media-libs/gstreamer-0.10*
+ =media-libs/gst-plugins-good-0.10*
+ =media-plugins/gst-plugins-ffmpeg-0.10*
+ )"
+RDEPEND=${DEPEND}
+
+src_configure() {
+ if ! use vlc && ! use xine && ! use gstreamer ; then
+ E_ECONF+=(
+ --enable-xine
+ --disable-gstreamer
+ --disable-generic-vlc
+ )
+ else
+ E_ECONF+=(
+ $(use_enable xine)
+ $(use_enable gstreamer)
+ $(use_enable vlc generic-vlc)
+ )
+ fi
+
+ E_ECONF+=(
+ $(use_enable doc)
+ )
+
+ if use gstreamer ; then
+ addpredict "/root/.gconfd"
+ addpredict "/root/.gconf"
+ fi
+
+ enlightenment_src_configure
+}
diff --git a/media-libs/emotion/emotion-1.7.8.ebuild b/media-libs/emotion/emotion-1.7.8.ebuild
new file mode 100644
index 000000000000..1d4ccee17479
--- /dev/null
+++ b/media-libs/emotion/emotion-1.7.8.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 enlightenment
+
+DESCRIPTION="video libraries for e17"
+SRC_URI="http://download.enlightenment.org/releases/${P}.tar.bz2"
+
+LICENSE="BSD-2"
+KEYWORDS="~amd64 ~x86"
+IUSE="gstreamer static-libs vlc xine"
+
+DEPEND=">=media-libs/evas-1.7.8
+ >=media-libs/edje-1.7.8
+ >=dev-libs/ecore-1.7.8
+ >=dev-libs/eina-1.7.8
+ >=dev-libs/eeze-1.7.4
+ vlc? ( media-video/vlc )
+ xine? ( >=media-libs/xine-lib-1.1.1 )
+ !gstreamer? ( !vlc? ( !xine? ( >=media-libs/xine-lib-1.1.1 ) ) )
+ gstreamer? (
+ =media-libs/gstreamer-0.10*
+ =media-libs/gst-plugins-good-0.10*
+ =media-plugins/gst-plugins-ffmpeg-0.10*
+ )"
+RDEPEND=${DEPEND}
+
+src_configure() {
+ if ! use vlc && ! use xine && ! use gstreamer ; then
+ E_ECONF+=(
+ --enable-xine
+ --disable-gstreamer
+ --disable-generic-vlc
+ )
+ else
+ E_ECONF+=(
+ $(use_enable xine)
+ $(use_enable gstreamer)
+ $(use_enable vlc generic-vlc)
+ )
+ fi
+
+ E_ECONF+=(
+ $(use_enable doc)
+ )
+
+ if use gstreamer ; then
+ addpredict "/root/.gconfd"
+ addpredict "/root/.gconf"
+ fi
+
+ enlightenment_src_configure
+}
diff --git a/media-libs/emotion/emotion-1.7.9.ebuild b/media-libs/emotion/emotion-1.7.9.ebuild
new file mode 100644
index 000000000000..ea184031382b
--- /dev/null
+++ b/media-libs/emotion/emotion-1.7.9.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 enlightenment
+
+DESCRIPTION="video libraries for e17"
+SRC_URI="http://download.enlightenment.org/releases/${P}.tar.bz2"
+
+LICENSE="BSD-2"
+KEYWORDS="~amd64 ~x86"
+IUSE="gstreamer static-libs vlc xine"
+
+DEPEND=">=media-libs/evas-1.7.9
+ >=media-libs/edje-1.7.9
+ >=dev-libs/ecore-1.7.9
+ >=dev-libs/eina-1.7.9
+ >=dev-libs/eeze-1.7.9
+ vlc? ( media-video/vlc )
+ xine? ( >=media-libs/xine-lib-1.1.1 )
+ !gstreamer? ( !vlc? ( !xine? ( >=media-libs/xine-lib-1.1.1 ) ) )
+ gstreamer? (
+ =media-libs/gstreamer-0.10*
+ =media-libs/gst-plugins-good-0.10*
+ =media-plugins/gst-plugins-ffmpeg-0.10*
+ )"
+RDEPEND=${DEPEND}
+
+src_configure() {
+ if ! use vlc && ! use xine && ! use gstreamer ; then
+ E_ECONF+=(
+ --enable-xine
+ --disable-gstreamer
+ --disable-generic-vlc
+ )
+ else
+ E_ECONF+=(
+ $(use_enable xine)
+ $(use_enable gstreamer)
+ $(use_enable vlc generic-vlc)
+ )
+ fi
+
+ E_ECONF+=(
+ $(use_enable doc)
+ )
+
+ if use gstreamer ; then
+ addpredict "/root/.gconfd"
+ addpredict "/root/.gconf"
+ fi
+
+ enlightenment_src_configure
+}
diff --git a/media-libs/emotion/emotion-9999.ebuild b/media-libs/emotion/emotion-9999.ebuild
new file mode 100644
index 000000000000..9685e0c5c96d
--- /dev/null
+++ b/media-libs/emotion/emotion-9999.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_SUB_PROJECT="legacy"
+ EGIT_URI_APPEND=${PN}
+ EGIT_BRANCH=${PN}-1.7
+else
+ SRC_URI="http://download.enlightenment.org/releases/${P}.tar.bz2"
+ EKEY_STATE="snap"
+fi
+
+inherit enlightenment
+
+DESCRIPTION="video libraries for e17"
+
+LICENSE="BSD-2"
+IUSE="gstreamer static-libs vlc xine"
+
+DEPEND=">=media-libs/evas-${PV}
+ >=media-libs/edje-${PV}
+ >=dev-libs/ecore-${PV}
+ >=dev-libs/eina-${PV}
+ >=dev-libs/eeze-${PV}
+ vlc? ( media-video/vlc )
+ xine? ( >=media-libs/xine-lib-1.1.1 )
+ !gstreamer? ( !vlc? ( !xine? ( >=media-libs/xine-lib-1.1.1 ) ) )
+ gstreamer? (
+ =media-libs/gstreamer-0.10*
+ =media-libs/gst-plugins-good-0.10*
+ =media-plugins/gst-plugins-ffmpeg-0.10*
+ )"
+RDEPEND=${DEPEND}
+
+src_configure() {
+ if ! use vlc && ! use xine && ! use gstreamer ; then
+ E_ECONF+=(
+ --enable-xine
+ --disable-gstreamer
+ --disable-generic-vlc
+ )
+ else
+ E_ECONF+=(
+ $(use_enable xine)
+ $(use_enable gstreamer)
+ $(use_enable vlc generic-vlc)
+ )
+ fi
+
+ E_ECONF+=(
+ $(use_enable doc)
+ )
+
+ if use gstreamer ; then
+ addpredict "/root/.gconfd"
+ addpredict "/root/.gconf"
+ fi
+
+ enlightenment_src_configure
+}
diff --git a/media-libs/emotion/files/respect-ldflags-with-gstreamer-backend.patch b/media-libs/emotion/files/respect-ldflags-with-gstreamer-backend.patch
new file mode 100644
index 000000000000..725b2788e259
--- /dev/null
+++ b/media-libs/emotion/files/respect-ldflags-with-gstreamer-backend.patch
@@ -0,0 +1,22 @@
+From 78870f848cc8c9440d35e84646a110a86404d3e9 Mon Sep 17 00:00:00 2001
+From: Tom Hacohen <tom@stosb.com>
+Date: Wed, 03 Apr 2013 16:44:57 +0000
+Subject: Fixed LDFLAGS usage when using the gstreamer backend.
+
+Reported by Tommy[D] on IRC.
+---
+diff --git a/configure.ac b/configure.ac
+index 0986b8a..324ea57 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -284,7 +284,7 @@ if test "x${enable_gstreamer}" = "xyes" ; then
+ AC_CHECK_LIB([gstinterfaces-0.10],
+ [gst_x_overlay_set_window_handle],
+ [AC_DEFINE([HAVE_X_OVERLAY_SET], [1], [Use gst_x_overlay_set_window_handle instead of old deprecated gst_x_overlay_set_xwindow_id])])
+- LDFLAGS=$sava_LDFLAGS
++ LDFLAGS=$save_LDFLAGS
+ fi
+ fi
+
+--
+cgit v0.9.1
diff --git a/media-libs/emotion/metadata.xml b/media-libs/emotion/metadata.xml
new file mode 100644
index 000000000000..282424f678d2
--- /dev/null
+++ b/media-libs/emotion/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>enlightenment</herd>
+<use>
+ <flag name='vlc'>Enable support for the <pkg>media-video/vlc</pkg> player backend</flag>
+</use>
+</pkgmetadata>
diff --git a/media-libs/esdl/Manifest b/media-libs/esdl/Manifest
new file mode 100644
index 000000000000..457cc7931a04
--- /dev/null
+++ b/media-libs/esdl/Manifest
@@ -0,0 +1,2 @@
+DIST esdl-1.0.1.src.tar.gz 428917 SHA256 16fcf29656e6a54c9e10d0a73faa3e5b305c6aab3ab691cad2206c427265877d SHA512 dedc3a4b995e1cdeccd8b389f9de4f8dcb4aa780e8e0ed01730972c94bae8a4897edf2183f24a15df19c0e1ae7bda5481bdbdc55f4e3de0da3efef13291f33ac WHIRLPOOL 1cd0273e132f2cec34d526363a6e44227f6fa1b40fea9838562f3ace3d25909d09b883931e41757a708698c90d9504cd08834882ca49d4210c7436b062ba2efb
+DIST esdl-1.2.src.tar.gz 270309 SHA256 492898262a283a5d0256b287f49fa6462febf4f026d95274ce3bc6263ce4767d SHA512 74fa747f03deb38aee993ffbb1633120517a1aa43ef339d269482e41e91b925507bb60f0c37a082c4fb5b9938f8e7b7a6e9de9541b061be19446ee61a14a17d6 WHIRLPOOL 0cf9599434f9e6052a7bcdbae46e601dd24b99cb549984c8646bbe93cbd1171e0f4680ef400e9c21c11bbb6dc999242b3ac3fcf383d9023aed64469b7d75d76f
diff --git a/media-libs/esdl/esdl-1.0.1.ebuild b/media-libs/esdl/esdl-1.0.1.ebuild
new file mode 100644
index 000000000000..b6cce217d529
--- /dev/null
+++ b/media-libs/esdl/esdl-1.0.1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit fixheadtails multilib eutils
+
+DESCRIPTION="Erlang bindings for the SDL library"
+HOMEPAGE="http://esdl.sourceforge.net/"
+SRC_URI="mirror://sourceforge/esdl/${P}.src.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha amd64 ppc ppc64 x86"
+IUSE="image truetype"
+
+RDEPEND=">=dev-lang/erlang-13
+ >=media-libs/libsdl-1.2.5[opengl]
+ image? ( media-libs/sdl-image )
+ truetype? ( media-libs/sdl-ttf )
+ virtual/opengl"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ sed -i "/CFLAGS.*=/s:-g -O2 -funroll-loops -Wall -ffast-math:${CFLAGS}:" c_src/Makefile
+ ht_fix_file Makefile c_src/Makefile
+ if use image ; then
+ sed -i "/ENABLE_SDL_IMAGE = /s:no:yes:" Makefile
+ fi
+ if use truetype ; then
+ sed -i "/ENABLE_SDL_TTF = /s:no:yes:" Makefile
+ fi
+}
+
+src_install() {
+ addpredict /usr/$(get_libdir)/erlang/lib
+ ERLANG_DIR="/usr/$(get_libdir)/erlang/lib"
+ ESDL_DIR="${ERLANG_DIR}/${P}"
+ dodir ${ESDL_DIR}
+ make install INSTALLDIR="${D}"/${ESDL_DIR} || die "make install"
+}
diff --git a/media-libs/esdl/esdl-1.2.ebuild b/media-libs/esdl/esdl-1.2.ebuild
new file mode 100644
index 000000000000..47be3aa9dbc3
--- /dev/null
+++ b/media-libs/esdl/esdl-1.2.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit fixheadtails multilib eutils
+
+DESCRIPTION="Erlang bindings for the SDL library"
+HOMEPAGE="http://esdl.sourceforge.net/"
+SRC_URI="mirror://sourceforge/esdl/${P}.src.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~x86"
+IUSE="image truetype"
+
+RDEPEND=">=dev-lang/erlang-14
+ media-libs/libsdl[opengl]
+ image? ( media-libs/sdl-image )
+ truetype? ( media-libs/sdl-ttf )
+ virtual/opengl"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ sed -i "/CFLAGS.*=/s:-g -O2 -funroll-loops -Wall -ffast-math:${CFLAGS}:" c_src/Makefile
+ ht_fix_file Makefile c_src/Makefile
+ if use image ; then
+ sed -i "/ENABLE_SDL_IMAGE = /s:no:yes:" Makefile
+ fi
+ if use truetype ; then
+ sed -i "/ENABLE_SDL_TTF = /s:no:yes:" Makefile
+ fi
+}
+
+src_install() {
+ addpredict /usr/$(get_libdir)/erlang/lib
+ ERLANG_DIR="/usr/$(get_libdir)/erlang/lib"
+ ESDL_DIR="${ERLANG_DIR}/${P}"
+ dodir ${ESDL_DIR}
+ make install INSTALLDIR="${D}"/${ESDL_DIR} || die "make install"
+}
diff --git a/media-libs/esdl/metadata.xml b/media-libs/esdl/metadata.xml
new file mode 100644
index 000000000000..969ea43fe180
--- /dev/null
+++ b/media-libs/esdl/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>graphics</herd>
+ <maintainer>
+ <email>george@gentoo.org</email>
+ </maintainer>
+ <longdescription>
+ESDL - What is that?
+
+It is library that gives you access to SDL and Opengl
+functionality in your erlang program.
+SDL handles 2d graphics, user events and audio while
+Opengl handles 3d graphics. More information.
+</longdescription>
+ <use>
+ <flag name="image">Enable image support</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">esdl</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/ethumb/Manifest b/media-libs/ethumb/Manifest
new file mode 100644
index 000000000000..af5016ffb70e
--- /dev/null
+++ b/media-libs/ethumb/Manifest
@@ -0,0 +1,2 @@
+DIST ethumb-1.7.8.tar.bz2 401664 SHA256 c1e6f2bf5117a1b6b9bac8c9ccd72b4b8ade6c03ca1cb77f2ff51538ec5f1ba7 SHA512 a04270852d49cf8f9127fcdc4bd5994374905f5514954d0d18ee731bfd5269a0a511f0741ff046a95d028e3b031f7ab5806262d29ee9acf50b957d2c7003822b WHIRLPOOL a2f7936c712d51ed35bc4ec0035bc3eda6f8c9acf05d3500a8a231f99604f7331200a9f17bc2fa45d640096b71d7dd8adb99769402cfc770ed2eb31438064580
+DIST ethumb-1.7.9.tar.bz2 401952 SHA256 9bbf89f82c5c74a70ffd03a4942d0c28a019c3763d1c0b8c14301036981312af SHA512 2ff6149104e1d1b55382cfa156b9fa6415be78f55b73e50c49211fb0714519611b04b6142e38a28ffe8209899d3fbd0981de12e983486511a61d9d66ef8186b5 WHIRLPOOL 72e7fad74a7c688fc4b8a76d5f0e4ab8987c62ea3c64ea45d68c2a165b44b6b443375907c7a856e97f6aa4c60164f78b9ce04b070032bf3f28fc89618c7cd7a7
diff --git a/media-libs/ethumb/ethumb-1.7.8.ebuild b/media-libs/ethumb/ethumb-1.7.8.ebuild
new file mode 100644
index 000000000000..a4ef6d93c6b4
--- /dev/null
+++ b/media-libs/ethumb/ethumb-1.7.8.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit enlightenment
+
+DESCRIPTION="Enlightenment thumbnailing library (meant to replace epsilon)"
+HOMEPAGE="http://trac.enlightenment.org/e/wiki/Ethumb"
+SRC_URI="http://download.enlightenment.org/releases/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+KEYWORDS="~amd64 ~x86"
+IUSE="+dbus emotion static-libs"
+
+DEPEND=">=dev-libs/eina-1.7.8
+ >=dev-libs/ecore-1.7.8
+ >=media-libs/edje-1.7.8
+ >=media-libs/evas-1.7.8
+ media-libs/libexif
+ dbus? ( >=dev-libs/e_dbus-1.7.8 )
+ emotion? ( >=media-libs/emotion-1.7.8 )"
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ E_ECONF+=(
+ $(use_enable dbus ethumbd)
+ $(use_enable emotion)
+ --disable-epdf
+ )
+ enlightenment_src_configure
+}
diff --git a/media-libs/ethumb/ethumb-1.7.9.ebuild b/media-libs/ethumb/ethumb-1.7.9.ebuild
new file mode 100644
index 000000000000..1b40964419c8
--- /dev/null
+++ b/media-libs/ethumb/ethumb-1.7.9.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit enlightenment
+
+DESCRIPTION="Enlightenment thumbnailing library (meant to replace epsilon)"
+HOMEPAGE="http://trac.enlightenment.org/e/wiki/Ethumb"
+SRC_URI="http://download.enlightenment.org/releases/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+KEYWORDS="~amd64 ~x86"
+IUSE="+dbus emotion static-libs"
+
+DEPEND=">=dev-libs/eina-1.7.9
+ >=dev-libs/ecore-1.7.9
+ >=media-libs/edje-1.7.9
+ >=media-libs/evas-1.7.9
+ media-libs/libexif
+ dbus? ( >=dev-libs/e_dbus-1.7.9 )
+ emotion? ( >=media-libs/emotion-1.7.9 )"
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ E_ECONF+=(
+ $(use_enable dbus ethumbd)
+ $(use_enable emotion)
+ --disable-epdf
+ )
+ enlightenment_src_configure
+}
diff --git a/media-libs/ethumb/metadata.xml b/media-libs/ethumb/metadata.xml
new file mode 100644
index 000000000000..031abb11daaf
--- /dev/null
+++ b/media-libs/ethumb/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>enlightenment</herd>
+ <use>
+ <flag name='emotion'>Add support for <pkg>media-libs/emotion</pkg></flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/evas/Manifest b/media-libs/evas/Manifest
new file mode 100644
index 000000000000..0a1ba23fa8d5
--- /dev/null
+++ b/media-libs/evas/Manifest
@@ -0,0 +1,4 @@
+DIST evas-1.7.10.tar.bz2 9463058 SHA256 0f2a30b4f2dcd0d39507aca51399fa5574723b0bd031d3cec66181810bb4e70d SHA512 6a2f877dbeed86fa36d4f21ccf2a4ff74d1f9922d17d394094e18d024f9e4b4fceb2f133b28ecc7f1dfe7ab551b3dc501a90878c311f979a84ea708e4a060e01 WHIRLPOOL 750f92f6b159b4b190e8e965a70bf0f4cc1ef78e8a83aa224a1dcc858a7e280c09ac056e3dd79a3e07b25f6190e0ac5744a4d039d5bdc102e51018d9e523eb12
+DIST evas-1.7.8.tar.bz2 9453923 SHA256 9ce94f5da82aeb6fe571d9a648d8c4749ee86a7fb02c4132e3a2c145316d531c SHA512 e915beb930d9906ba6b2b2d768643aeb45f7cbf23786e3f7972992380b6f3a4a2bc08b290094f352c494721db74db6aac3c547ed11a8878a976c8e4fad8158b0 WHIRLPOOL 41151ac770742c27cf785c5e30d0f526fae1331633ed310514e0506e7d090e19cea9ea41da65de6d7eca1ba6a86e72a539ba89f520ad2a490f9b67ec9510f0fd
+DIST evas-1.7.9-freetype251.patch 593 SHA256 6a4e17dd9c591b635acacd6886515a6d6978c0c67c5059853d598ef22c62d331 SHA512 ccf8d9a58c2921cc49b53ef62e70c709ca32d266cf41dd17d68fee5a7cf60228f4503a57ffe117ddceaa2042ebd778685aa3ca8e3d389ab146658bf797389ad1 WHIRLPOOL bc742e705f1c2fef5ae805378a5e27231e6e09988848fc3a3abf6c647c6a40f4403b84e2ec1f7d7f74031bc63935c54b168fff68d09298d583d00f788c848443
+DIST evas-1.7.9.tar.bz2 9459596 SHA256 ae3065ecc16158b45e83a62042ac7d577c72fb6427123a126ec7ed8abe8408f7 SHA512 ce526fbb7c897d27b0bdb7ebb4e5107e3705df0bc13cfd72b747982278858e7699d6df73bfcc17f48441e3c2fbe6b005a15b9ee2ba2631d322de08d61ffc854a WHIRLPOOL c1412cb4193339fa227459adaf426ea968de9895368ba501ca41b8fa558bf07ce9465359e60bc2aa004eca311d3b9bb1097e505f59a005afa25359939a1271ae
diff --git a/media-libs/evas/evas-1.7.10.ebuild b/media-libs/evas/evas-1.7.10.ebuild
new file mode 100644
index 000000000000..1a922dee35ce
--- /dev/null
+++ b/media-libs/evas/evas-1.7.10.ebuild
@@ -0,0 +1,162 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_SUB_PROJECT="legacy"
+ EGIT_URI_APPEND=${PN}
+ EGIT_BRANCH=${PN}-1.7
+else
+ SRC_URI="http://download.enlightenment.org/releases/${P}.tar.bz2"
+ EKEY_STATE="snap"
+fi
+
+inherit enlightenment
+
+DESCRIPTION="hardware-accelerated retained canvas API"
+HOMEPAGE="http://trac.enlightenment.org/e/wiki/Evas"
+
+LICENSE="BSD-2"
+IUSE="altivec bidi +bmp directfb +eet fbcon +fontconfig gles gif +ico +jpeg cpu_flags_x86_mmx opengl +png +ppm +psd cpu_flags_x86_sse cpu_flags_x86_sse3 static-libs tga tiff wayland X xcb xpm"
+
+RDEPEND=">=dev-libs/eina-${PV}
+ >=media-libs/freetype-2.3.9
+ fontconfig? ( media-libs/fontconfig )
+ gles? ( media-libs/mesa[gallium,gles2] )
+ gif? ( media-libs/giflib )
+ jpeg? ( virtual/jpeg )
+ png? ( media-libs/libpng:0= )
+ bidi? ( >=dev-libs/fribidi-0.19.1 )
+ directfb? ( >=dev-libs/DirectFB-0.9.16 )
+ tiff? ( media-libs/tiff )
+ wayland? ( dev-libs/wayland )
+ xpm? ( x11-libs/libXpm )
+ X? (
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXrender
+ opengl? ( virtual/opengl )
+ )
+ !X? (
+ xcb? (
+ x11-libs/xcb-util
+ ) )
+ eet? ( >=dev-libs/eet-${PV} )"
+DEPEND="${RDEPEND}"
+
+src_configure() {
+ if use X ; then
+ if use xcb ; then
+ ewarn "You have enabled both 'X' and 'xcb', so we will use"
+ ewarn "X as it's considered the most stable for evas"
+ fi
+ E_ECONF+=(
+ --disable-software-xcb
+ $(use_enable opengl gl-xlib)
+ )
+ elif use xcb ; then
+ E_ECONF+=(
+ --disable-gl-xlib
+ --enable-software-xcb
+ $(use_enable opengl gl-xcb)
+ )
+ else
+ E_ECONF+=(
+ --disable-gl-xlib
+ --disable-software-xcb
+ --disable-gl-xcb
+ )
+ fi
+ if use wayland ; then
+ E_ECONF+=(
+ --enable-wayland-shm
+ )
+ if use gles ; then
+ E_ECONF+=(
+ --enable-wayland-egl
+ )
+ else
+ E_ECONF+=(
+ --disable-wayland-egl
+ )
+ fi
+ else
+ E_ECONF+=(
+ --disable-wayland-egl
+ --disable-wayland-shm
+ )
+ fi
+
+ E_ECONF+=(
+ $(use_enable altivec cpu-altivec)
+ $(use_enable bidi fribidi)
+ $(use_enable bmp image-loader-bmp)
+ $(use_enable bmp image-loader-wbmp)
+ $(use_enable directfb)
+ $(use_enable doc)
+ $(use_enable eet font-loader-eet)
+ $(use_enable eet image-loader-eet)
+ $(use_enable fbcon fb)
+ $(use_enable fontconfig)
+ $(use_enable gles gl-flavor-gles)
+ $(use_enable gles gles-variety-sgx)
+ $(use_enable gif image-loader-gif)
+ $(use_enable ico image-loader-ico)
+ $(use_enable jpeg image-loader-jpeg)
+ $(use_enable cpu_flags_x86_mmx cpu-mmx)
+ $(use_enable png image-loader-png)
+ $(use_enable ppm image-loader-pmaps)
+ $(use_enable psd image-loader-psd)
+ $(use_enable cpu_flags_x86_sse cpu-sse)
+ $(use_enable cpu_flags_x86_sse3 cpu-sse3)
+ --disable-image-loader-svg
+ $(use_enable tga image-loader-tga)
+ $(use_enable tiff image-loader-tiff)
+ --enable-pthreads
+ --enable-async-events
+ --enable-async-preload
+ $(use_enable X software-xlib)
+ $(use_enable xpm image-loader-xpm)
+ --enable-evas-magic-debug
+ --enable-static-software-generic
+ --enable-buffer
+ --enable-cpu-c
+ --enable-scale-sample
+ --enable-scale-smooth
+ --enable-convert-8-rgb-332
+ --enable-convert-8-rgb-666
+ --enable-convert-8-rgb-232
+ --enable-convert-8-rgb-222
+ --enable-convert-8-rgb-221
+ --enable-convert-8-rgb-121
+ --enable-convert-8-rgb-111
+ --enable-convert-16-rgb-565
+ --enable-convert-16-rgb-555
+ --enable-convert-16-rgb-444
+ --enable-convert-16-rgb-rot-0
+ --enable-convert-16-rgb-rot-270
+ --enable-convert-16-rgb-rot-90
+ --enable-convert-24-rgb-888
+ --enable-convert-24-bgr-888
+ --enable-convert-32-rgb-8888
+ --enable-convert-32-rgbx-8888
+ --enable-convert-32-bgr-8888
+ --enable-convert-32-bgrx-8888
+ --enable-convert-32-rgb-rot-0
+ --enable-convert-32-rgb-rot-270
+ --enable-convert-32-rgb-rot-90
+ --enable-image-loader-generic
+ --disable-harfbuzz
+ --disable-image-loader-edb
+ --disable-static-software-16
+ --disable-software-16-x11
+ )
+
+ enlightenment_src_configure
+}
+
+pkg_postinst() {
+ elog "for svg support install media-plugins/evas_generic_loaders[svg]"
+}
diff --git a/media-libs/evas/evas-1.7.8.ebuild b/media-libs/evas/evas-1.7.8.ebuild
new file mode 100644
index 000000000000..1a922dee35ce
--- /dev/null
+++ b/media-libs/evas/evas-1.7.8.ebuild
@@ -0,0 +1,162 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_SUB_PROJECT="legacy"
+ EGIT_URI_APPEND=${PN}
+ EGIT_BRANCH=${PN}-1.7
+else
+ SRC_URI="http://download.enlightenment.org/releases/${P}.tar.bz2"
+ EKEY_STATE="snap"
+fi
+
+inherit enlightenment
+
+DESCRIPTION="hardware-accelerated retained canvas API"
+HOMEPAGE="http://trac.enlightenment.org/e/wiki/Evas"
+
+LICENSE="BSD-2"
+IUSE="altivec bidi +bmp directfb +eet fbcon +fontconfig gles gif +ico +jpeg cpu_flags_x86_mmx opengl +png +ppm +psd cpu_flags_x86_sse cpu_flags_x86_sse3 static-libs tga tiff wayland X xcb xpm"
+
+RDEPEND=">=dev-libs/eina-${PV}
+ >=media-libs/freetype-2.3.9
+ fontconfig? ( media-libs/fontconfig )
+ gles? ( media-libs/mesa[gallium,gles2] )
+ gif? ( media-libs/giflib )
+ jpeg? ( virtual/jpeg )
+ png? ( media-libs/libpng:0= )
+ bidi? ( >=dev-libs/fribidi-0.19.1 )
+ directfb? ( >=dev-libs/DirectFB-0.9.16 )
+ tiff? ( media-libs/tiff )
+ wayland? ( dev-libs/wayland )
+ xpm? ( x11-libs/libXpm )
+ X? (
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXrender
+ opengl? ( virtual/opengl )
+ )
+ !X? (
+ xcb? (
+ x11-libs/xcb-util
+ ) )
+ eet? ( >=dev-libs/eet-${PV} )"
+DEPEND="${RDEPEND}"
+
+src_configure() {
+ if use X ; then
+ if use xcb ; then
+ ewarn "You have enabled both 'X' and 'xcb', so we will use"
+ ewarn "X as it's considered the most stable for evas"
+ fi
+ E_ECONF+=(
+ --disable-software-xcb
+ $(use_enable opengl gl-xlib)
+ )
+ elif use xcb ; then
+ E_ECONF+=(
+ --disable-gl-xlib
+ --enable-software-xcb
+ $(use_enable opengl gl-xcb)
+ )
+ else
+ E_ECONF+=(
+ --disable-gl-xlib
+ --disable-software-xcb
+ --disable-gl-xcb
+ )
+ fi
+ if use wayland ; then
+ E_ECONF+=(
+ --enable-wayland-shm
+ )
+ if use gles ; then
+ E_ECONF+=(
+ --enable-wayland-egl
+ )
+ else
+ E_ECONF+=(
+ --disable-wayland-egl
+ )
+ fi
+ else
+ E_ECONF+=(
+ --disable-wayland-egl
+ --disable-wayland-shm
+ )
+ fi
+
+ E_ECONF+=(
+ $(use_enable altivec cpu-altivec)
+ $(use_enable bidi fribidi)
+ $(use_enable bmp image-loader-bmp)
+ $(use_enable bmp image-loader-wbmp)
+ $(use_enable directfb)
+ $(use_enable doc)
+ $(use_enable eet font-loader-eet)
+ $(use_enable eet image-loader-eet)
+ $(use_enable fbcon fb)
+ $(use_enable fontconfig)
+ $(use_enable gles gl-flavor-gles)
+ $(use_enable gles gles-variety-sgx)
+ $(use_enable gif image-loader-gif)
+ $(use_enable ico image-loader-ico)
+ $(use_enable jpeg image-loader-jpeg)
+ $(use_enable cpu_flags_x86_mmx cpu-mmx)
+ $(use_enable png image-loader-png)
+ $(use_enable ppm image-loader-pmaps)
+ $(use_enable psd image-loader-psd)
+ $(use_enable cpu_flags_x86_sse cpu-sse)
+ $(use_enable cpu_flags_x86_sse3 cpu-sse3)
+ --disable-image-loader-svg
+ $(use_enable tga image-loader-tga)
+ $(use_enable tiff image-loader-tiff)
+ --enable-pthreads
+ --enable-async-events
+ --enable-async-preload
+ $(use_enable X software-xlib)
+ $(use_enable xpm image-loader-xpm)
+ --enable-evas-magic-debug
+ --enable-static-software-generic
+ --enable-buffer
+ --enable-cpu-c
+ --enable-scale-sample
+ --enable-scale-smooth
+ --enable-convert-8-rgb-332
+ --enable-convert-8-rgb-666
+ --enable-convert-8-rgb-232
+ --enable-convert-8-rgb-222
+ --enable-convert-8-rgb-221
+ --enable-convert-8-rgb-121
+ --enable-convert-8-rgb-111
+ --enable-convert-16-rgb-565
+ --enable-convert-16-rgb-555
+ --enable-convert-16-rgb-444
+ --enable-convert-16-rgb-rot-0
+ --enable-convert-16-rgb-rot-270
+ --enable-convert-16-rgb-rot-90
+ --enable-convert-24-rgb-888
+ --enable-convert-24-bgr-888
+ --enable-convert-32-rgb-8888
+ --enable-convert-32-rgbx-8888
+ --enable-convert-32-bgr-8888
+ --enable-convert-32-bgrx-8888
+ --enable-convert-32-rgb-rot-0
+ --enable-convert-32-rgb-rot-270
+ --enable-convert-32-rgb-rot-90
+ --enable-image-loader-generic
+ --disable-harfbuzz
+ --disable-image-loader-edb
+ --disable-static-software-16
+ --disable-software-16-x11
+ )
+
+ enlightenment_src_configure
+}
+
+pkg_postinst() {
+ elog "for svg support install media-plugins/evas_generic_loaders[svg]"
+}
diff --git a/media-libs/evas/evas-1.7.9.ebuild b/media-libs/evas/evas-1.7.9.ebuild
new file mode 100644
index 000000000000..86f94954677b
--- /dev/null
+++ b/media-libs/evas/evas-1.7.9.ebuild
@@ -0,0 +1,170 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_SUB_PROJECT="legacy"
+ EGIT_URI_APPEND=${PN}
+ EGIT_BRANCH=${PN}-1.7
+else
+ SRC_URI="http://download.enlightenment.org/releases/${P}.tar.bz2
+ http://dev.gentoo.org/~polynomial-c/${PN}-1.7.9-freetype251.patch"
+ EKEY_STATE="snap"
+fi
+
+inherit autotools enlightenment
+
+DESCRIPTION="hardware-accelerated retained canvas API"
+HOMEPAGE="http://trac.enlightenment.org/e/wiki/Evas"
+
+LICENSE="BSD-2"
+IUSE="altivec bidi +bmp directfb +eet fbcon +fontconfig gles gif +ico +jpeg cpu_flags_x86_mmx opengl +png +ppm +psd cpu_flags_x86_sse cpu_flags_x86_sse3 static-libs tga tiff wayland X xcb xpm"
+
+RDEPEND=">=dev-libs/eina-1.7.9
+ >=media-libs/freetype-2.3.9
+ fontconfig? ( media-libs/fontconfig )
+ gles? ( media-libs/mesa[gallium,gles2] )
+ gif? ( media-libs/giflib )
+ jpeg? ( virtual/jpeg )
+ png? ( media-libs/libpng:0= )
+ bidi? ( >=dev-libs/fribidi-0.19.1 )
+ directfb? ( >=dev-libs/DirectFB-0.9.16 )
+ tiff? ( media-libs/tiff )
+ wayland? ( dev-libs/wayland )
+ xpm? ( x11-libs/libXpm )
+ X? (
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXrender
+ opengl? ( virtual/opengl )
+ )
+ !X? (
+ xcb? (
+ x11-libs/xcb-util
+ ) )
+ eet? ( >=dev-libs/eet-1.7.8 )"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${DISTDIR}"/${PN}-1.7.9-freetype251.patch
+ sed -i "s:1.7.9:1.7.8:g" configure.ac
+ eautoreconf
+ enlightenment_src_prepare
+}
+
+src_configure() {
+ if use X ; then
+ if use xcb ; then
+ ewarn "You have enabled both 'X' and 'xcb', so we will use"
+ ewarn "X as it's considered the most stable for evas"
+ fi
+ E_ECONF+=(
+ --disable-software-xcb
+ $(use_enable opengl gl-xlib)
+ )
+ elif use xcb ; then
+ E_ECONF+=(
+ --disable-gl-xlib
+ --enable-software-xcb
+ $(use_enable opengl gl-xcb)
+ )
+ else
+ E_ECONF+=(
+ --disable-gl-xlib
+ --disable-software-xcb
+ --disable-gl-xcb
+ )
+ fi
+ if use wayland ; then
+ E_ECONF+=(
+ --enable-wayland-shm
+ )
+ if use gles ; then
+ E_ECONF+=(
+ --enable-wayland-egl
+ )
+ else
+ E_ECONF+=(
+ --disable-wayland-egl
+ )
+ fi
+ else
+ E_ECONF+=(
+ --disable-wayland-egl
+ --disable-wayland-shm
+ )
+ fi
+
+ E_ECONF+=(
+ $(use_enable altivec cpu-altivec)
+ $(use_enable bidi fribidi)
+ $(use_enable bmp image-loader-bmp)
+ $(use_enable bmp image-loader-wbmp)
+ $(use_enable directfb)
+ $(use_enable doc)
+ $(use_enable eet font-loader-eet)
+ $(use_enable eet image-loader-eet)
+ $(use_enable fbcon fb)
+ $(use_enable fontconfig)
+ $(use_enable gles gl-flavor-gles)
+ $(use_enable gles gles-variety-sgx)
+ $(use_enable gif image-loader-gif)
+ $(use_enable ico image-loader-ico)
+ $(use_enable jpeg image-loader-jpeg)
+ $(use_enable cpu_flags_x86_mmx cpu-mmx)
+ $(use_enable png image-loader-png)
+ $(use_enable ppm image-loader-pmaps)
+ $(use_enable psd image-loader-psd)
+ $(use_enable cpu_flags_x86_sse cpu-sse)
+ $(use_enable cpu_flags_x86_sse3 cpu-sse3)
+ --disable-image-loader-svg
+ $(use_enable tga image-loader-tga)
+ $(use_enable tiff image-loader-tiff)
+ --enable-pthreads
+ --enable-async-events
+ --enable-async-preload
+ $(use_enable X software-xlib)
+ $(use_enable xpm image-loader-xpm)
+ --enable-evas-magic-debug
+ --enable-static-software-generic
+ --enable-buffer
+ --enable-cpu-c
+ --enable-scale-sample
+ --enable-scale-smooth
+ --enable-convert-8-rgb-332
+ --enable-convert-8-rgb-666
+ --enable-convert-8-rgb-232
+ --enable-convert-8-rgb-222
+ --enable-convert-8-rgb-221
+ --enable-convert-8-rgb-121
+ --enable-convert-8-rgb-111
+ --enable-convert-16-rgb-565
+ --enable-convert-16-rgb-555
+ --enable-convert-16-rgb-444
+ --enable-convert-16-rgb-rot-0
+ --enable-convert-16-rgb-rot-270
+ --enable-convert-16-rgb-rot-90
+ --enable-convert-24-rgb-888
+ --enable-convert-24-bgr-888
+ --enable-convert-32-rgb-8888
+ --enable-convert-32-rgbx-8888
+ --enable-convert-32-bgr-8888
+ --enable-convert-32-bgrx-8888
+ --enable-convert-32-rgb-rot-0
+ --enable-convert-32-rgb-rot-270
+ --enable-convert-32-rgb-rot-90
+ --enable-image-loader-generic
+ --disable-harfbuzz
+ --disable-image-loader-edb
+ --disable-static-software-16
+ --disable-software-16-x11
+ )
+
+ enlightenment_src_configure
+}
+
+pkg_postinst() {
+ elog "for svg support install media-plugins/evas_generic_loaders[svg]"
+}
diff --git a/media-libs/evas/evas-9999.ebuild b/media-libs/evas/evas-9999.ebuild
new file mode 100644
index 000000000000..1a922dee35ce
--- /dev/null
+++ b/media-libs/evas/evas-9999.ebuild
@@ -0,0 +1,162 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_SUB_PROJECT="legacy"
+ EGIT_URI_APPEND=${PN}
+ EGIT_BRANCH=${PN}-1.7
+else
+ SRC_URI="http://download.enlightenment.org/releases/${P}.tar.bz2"
+ EKEY_STATE="snap"
+fi
+
+inherit enlightenment
+
+DESCRIPTION="hardware-accelerated retained canvas API"
+HOMEPAGE="http://trac.enlightenment.org/e/wiki/Evas"
+
+LICENSE="BSD-2"
+IUSE="altivec bidi +bmp directfb +eet fbcon +fontconfig gles gif +ico +jpeg cpu_flags_x86_mmx opengl +png +ppm +psd cpu_flags_x86_sse cpu_flags_x86_sse3 static-libs tga tiff wayland X xcb xpm"
+
+RDEPEND=">=dev-libs/eina-${PV}
+ >=media-libs/freetype-2.3.9
+ fontconfig? ( media-libs/fontconfig )
+ gles? ( media-libs/mesa[gallium,gles2] )
+ gif? ( media-libs/giflib )
+ jpeg? ( virtual/jpeg )
+ png? ( media-libs/libpng:0= )
+ bidi? ( >=dev-libs/fribidi-0.19.1 )
+ directfb? ( >=dev-libs/DirectFB-0.9.16 )
+ tiff? ( media-libs/tiff )
+ wayland? ( dev-libs/wayland )
+ xpm? ( x11-libs/libXpm )
+ X? (
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXrender
+ opengl? ( virtual/opengl )
+ )
+ !X? (
+ xcb? (
+ x11-libs/xcb-util
+ ) )
+ eet? ( >=dev-libs/eet-${PV} )"
+DEPEND="${RDEPEND}"
+
+src_configure() {
+ if use X ; then
+ if use xcb ; then
+ ewarn "You have enabled both 'X' and 'xcb', so we will use"
+ ewarn "X as it's considered the most stable for evas"
+ fi
+ E_ECONF+=(
+ --disable-software-xcb
+ $(use_enable opengl gl-xlib)
+ )
+ elif use xcb ; then
+ E_ECONF+=(
+ --disable-gl-xlib
+ --enable-software-xcb
+ $(use_enable opengl gl-xcb)
+ )
+ else
+ E_ECONF+=(
+ --disable-gl-xlib
+ --disable-software-xcb
+ --disable-gl-xcb
+ )
+ fi
+ if use wayland ; then
+ E_ECONF+=(
+ --enable-wayland-shm
+ )
+ if use gles ; then
+ E_ECONF+=(
+ --enable-wayland-egl
+ )
+ else
+ E_ECONF+=(
+ --disable-wayland-egl
+ )
+ fi
+ else
+ E_ECONF+=(
+ --disable-wayland-egl
+ --disable-wayland-shm
+ )
+ fi
+
+ E_ECONF+=(
+ $(use_enable altivec cpu-altivec)
+ $(use_enable bidi fribidi)
+ $(use_enable bmp image-loader-bmp)
+ $(use_enable bmp image-loader-wbmp)
+ $(use_enable directfb)
+ $(use_enable doc)
+ $(use_enable eet font-loader-eet)
+ $(use_enable eet image-loader-eet)
+ $(use_enable fbcon fb)
+ $(use_enable fontconfig)
+ $(use_enable gles gl-flavor-gles)
+ $(use_enable gles gles-variety-sgx)
+ $(use_enable gif image-loader-gif)
+ $(use_enable ico image-loader-ico)
+ $(use_enable jpeg image-loader-jpeg)
+ $(use_enable cpu_flags_x86_mmx cpu-mmx)
+ $(use_enable png image-loader-png)
+ $(use_enable ppm image-loader-pmaps)
+ $(use_enable psd image-loader-psd)
+ $(use_enable cpu_flags_x86_sse cpu-sse)
+ $(use_enable cpu_flags_x86_sse3 cpu-sse3)
+ --disable-image-loader-svg
+ $(use_enable tga image-loader-tga)
+ $(use_enable tiff image-loader-tiff)
+ --enable-pthreads
+ --enable-async-events
+ --enable-async-preload
+ $(use_enable X software-xlib)
+ $(use_enable xpm image-loader-xpm)
+ --enable-evas-magic-debug
+ --enable-static-software-generic
+ --enable-buffer
+ --enable-cpu-c
+ --enable-scale-sample
+ --enable-scale-smooth
+ --enable-convert-8-rgb-332
+ --enable-convert-8-rgb-666
+ --enable-convert-8-rgb-232
+ --enable-convert-8-rgb-222
+ --enable-convert-8-rgb-221
+ --enable-convert-8-rgb-121
+ --enable-convert-8-rgb-111
+ --enable-convert-16-rgb-565
+ --enable-convert-16-rgb-555
+ --enable-convert-16-rgb-444
+ --enable-convert-16-rgb-rot-0
+ --enable-convert-16-rgb-rot-270
+ --enable-convert-16-rgb-rot-90
+ --enable-convert-24-rgb-888
+ --enable-convert-24-bgr-888
+ --enable-convert-32-rgb-8888
+ --enable-convert-32-rgbx-8888
+ --enable-convert-32-bgr-8888
+ --enable-convert-32-bgrx-8888
+ --enable-convert-32-rgb-rot-0
+ --enable-convert-32-rgb-rot-270
+ --enable-convert-32-rgb-rot-90
+ --enable-image-loader-generic
+ --disable-harfbuzz
+ --disable-image-loader-edb
+ --disable-static-software-16
+ --disable-software-16-x11
+ )
+
+ enlightenment_src_configure
+}
+
+pkg_postinst() {
+ elog "for svg support install media-plugins/evas_generic_loaders[svg]"
+}
diff --git a/media-libs/evas/metadata.xml b/media-libs/evas/metadata.xml
new file mode 100644
index 000000000000..c52a0f596372
--- /dev/null
+++ b/media-libs/evas/metadata.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>enlightenment</herd>
+<use>
+ <flag name='bmp'>Support windows bitmap (bmp) image loader</flag>
+ <flag name='eet'>Support dev-libs/eet</flag>
+ <flag name='ico'>Support windows icon (ico) image loader</flag>
+ <flag name='gles'>Enable gles flavor of gl instead of standard</flag>
+ <flag name='ppm'>Support PPM image loader</flag>
+ <flag name='psd'>Support PSD image loader</flag>
+ <flag name='tga'>Support tga image loader</flag>
+ <flag name='wayland'>Add support for <pkg>dev-libs/wayland</pkg></flag>
+</use>
+<longdescription>
+Evas is a hardware-accelerated canvas API for X-Windows that can draw
+anti-aliased text, smooth super and sub-sampled images, alpha-blend, as well as
+drop down to using normal X11 primitives such as pixmaps, lines and rectangles
+for speed if your CPU or graphics hardware are too slow.
+
+Evas abstracts any need to know much about what the characteristics of your
+XServer's display are, what depth or what magic visuals etc, it has. The most you
+need to tell Evas is how many colors (at a maximum) to use if the display is not
+a truecolor display. By default it is suggested to use 216 colors (as this
+equates to a 6x6x6 color cube - exactly the same color cube Netscape, Mozilla,
+gdkrgb etc. use so colors will be shared). If Evas can't allocate enough colors
+it keeps reducing the size of the color cube until it reaches plain black and
+white. This way, it can display on anything from a black and white only terminal
+to 16 color VGA to 256 color and all the way up through 15, 16, 24 and 32bit
+color.
+</longdescription>
+</pkgmetadata>
diff --git a/media-libs/exempi/Manifest b/media-libs/exempi/Manifest
new file mode 100644
index 000000000000..c4b2de4d53ef
--- /dev/null
+++ b/media-libs/exempi/Manifest
@@ -0,0 +1,2 @@
+DIST exempi-2.2.0.tar.gz 3555957 SHA256 710a01a4e879c3a58304021d8a9624cf8b65f79b2b949951a873c91f6d64d102 SHA512 bb477787204bdc2cc8e9949c8407beb5af2aeab8f3e769ce814ee7eaf7476336b68635d6301cfbd600da34b1003c371e624866ec6c3b426d06076ec90c663f82 WHIRLPOOL 4c4b9a69f24c0ea792062e27a25688cc70a58baa6853a7b2a078732e33281c5ee9d9e21488d90a86a1fe28b6f227cfeb64a7e1524a815fa7a30a955fde2e4983
+DIST exempi-2.2.1.tar.gz 3566843 SHA256 a99e1569047988200e4935cf4395667341a5bd8d6067847a08df4304546cc362 SHA512 f4b97ec7af89924755a0695464bad5081de6a5d6a6f28c06984c051d677f8771c39df12951761ecd28d6ff520ddec4e21179dcba8b58f0ef649bbdad1a53aa9c WHIRLPOOL 622d23cb519f2dda988b7d13dd26be55dd207bfe8ec2f2c0b8b568974571780b51b5284d871a310e461041f1054265efb199cf5c21fcf6eee6619cb85dc335e9
diff --git a/media-libs/exempi/exempi-2.2.0.ebuild b/media-libs/exempi/exempi-2.2.0.ebuild
new file mode 100644
index 000000000000..f038706bcfa5
--- /dev/null
+++ b/media-libs/exempi/exempi-2.2.0.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit autotools eutils
+
+DESCRIPTION="Exempi is a port of the Adobe XMP SDK to work on UNIX"
+HOMEPAGE="http://libopenraw.freedesktop.org/wiki/Exempi"
+SRC_URI="http://libopenraw.freedesktop.org/download/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="2"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 ~sh sparc x86 ~x86-fbsd"
+IUSE="examples static-libs"
+
+RDEPEND=">=dev-libs/expat-2
+ virtual/libiconv
+ sys-libs/zlib"
+DEPEND="${RDEPEND}
+ sys-devel/gettext"
+
+RESTRICT="test" #295875
+
+DOCS="AUTHORS ChangeLog NEWS README TODO"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.1.1-iconv.patch
+ cp /usr/share/gettext/config.rpath . || die
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ --disable-unittest
+}
+
+src_install() {
+ default
+
+ rm -f "${ED}"usr/lib*/lib*.la
+
+ if use examples; then
+ emake -C samples/source distclean
+ rm -f samples/{,source,testfiles}/Makefile*
+ insinto /usr/share/doc/${PF}/examples
+ doins -r samples/*
+ fi
+}
diff --git a/media-libs/exempi/exempi-2.2.1.ebuild b/media-libs/exempi/exempi-2.2.1.ebuild
new file mode 100644
index 000000000000..bf8258f87538
--- /dev/null
+++ b/media-libs/exempi/exempi-2.2.1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="Exempi is a port of the Adobe XMP SDK to work on UNIX"
+HOMEPAGE="http://libopenraw.freedesktop.org/wiki/Exempi"
+SRC_URI="http://libopenraw.freedesktop.org/download/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="2"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 ~sh sparc x86 ~x86-fbsd"
+IUSE="examples static-libs"
+
+RDEPEND=">=dev-libs/expat-2:=
+ virtual/libiconv
+ sys-libs/zlib:="
+DEPEND="${RDEPEND}
+ sys-devel/gettext"
+
+RESTRICT="test" #295875
+
+DOCS="AUTHORS ChangeLog NEWS README TODO"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.1.1-iconv.patch
+ cp /usr/share/gettext/config.rpath . || die
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ --disable-unittest
+}
+
+src_install() {
+ default
+ prune_libtool_files --all
+
+ if use examples; then
+ emake -C samples/source distclean
+ rm -f samples/{,source,testfiles}/Makefile*
+ insinto /usr/share/doc/${PF}/examples
+ doins -r samples/*
+ fi
+}
diff --git a/media-libs/exempi/files/exempi-2.1.1-iconv.patch b/media-libs/exempi/files/exempi-2.1.1-iconv.patch
new file mode 100644
index 000000000000..69c8196b6922
--- /dev/null
+++ b/media-libs/exempi/files/exempi-2.1.1-iconv.patch
@@ -0,0 +1,22 @@
+http://bugs.gentoo.org/show_bug.cgi?id=242812
+
+--- configure.ac
++++ configure.ac
+@@ -104,6 +104,8 @@
+ AC_CHECK_HEADER(zlib.h, ,
+ AC_MSG_ERROR([zlib headers missing]))
+
++AM_ICONV_LINK
++
+ dnl Blatently copied from iconv.m4 to remove the crack about libtool
+ dnl But check for constness of the iconv parameters.
+ AC_MSG_CHECKING([for iconv declaration])
+--- source/XMPFiles/Makefile.am
++++ source/XMPFiles/Makefile.am
+@@ -62,5 +62,5 @@
+
+
+ libXMPFiles_la_LIBADD = ./FileHandlers/libxmpfilehandlers.la \
+- ./FormatSupport/libformatsupport.la
++ ./FormatSupport/libformatsupport.la @LTLIBICONV@
+ #libXMPFiles_la_LDFLAGS = -version-info @LIBXMPCORE_VERSION_INFO@
diff --git a/media-libs/exempi/metadata.xml b/media-libs/exempi/metadata.xml
new file mode 100644
index 000000000000..9879e83b822e
--- /dev/null
+++ b/media-libs/exempi/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>freedesktop</herd>
+ <maintainer>
+ <email>freedesktop-bugs@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/media-libs/exiftool/Manifest b/media-libs/exiftool/Manifest
new file mode 100644
index 000000000000..b36090d58426
--- /dev/null
+++ b/media-libs/exiftool/Manifest
@@ -0,0 +1,10 @@
+DIST Image-ExifTool-9.78.tar.gz 3900065 SHA256 b85c66bc8f6a3b151b3258954969b8fa77c25f0f28be1ba45c6fc1877e12455f SHA512 928cad54c4395f4f3f9686c005d116fe53b3ee8ab36433a71c4dc5257363955e0b83ddeb5fed82124e45688766cc8512f1068de0328ef3ff38b05a929f913dc6 WHIRLPOOL dcd10d7611aceaf71d22b77726316cb2718f9c7b465c3c46264ec95a2b8dd8f261c26fae7b399d604eeba4150704f61921ea5c8cf5c40d710a3f319c057b17bb
+DIST Image-ExifTool-9.82.tar.gz 3909913 SHA256 b200673dc2e13898cbcbfd95e6285876d39a8d3beb85ccc1abfca009396e5f4b SHA512 e95e1d78edd2b14a34b422e23332e0185e2a884c16d96643b27f6661e4a08b4c2714b73f9dce2b2f4bb5d24e544da3f61245af91715aeffda65678c747252365 WHIRLPOOL 9c8963748981819c5edecabd4eb8690afa61bdfcc29ed0758df7adf9e5cc05bf05e759a03a6b5ab99c499f354a7a2b602b4e486043e22e4966c91dbc1c31b097
+DIST Image-ExifTool-9.85.tar.gz 3922393 SHA256 118fa9c3787bb9b7d99521cc0330a3d449d8866afb717ed6dbcbb34fd940e145 SHA512 5535d985bd73921006836e804e28cb692c15066a09c9a6475129f92bc071d9ecb83c91d0c1a123243b282a63d1e08879a330234ccd0fe9746ff02bf8adb62f74 WHIRLPOOL 7b8dfab23d492d5823113bdbdc6a8d466ef6a00d12d852c8733928b31a63349d89f9bd7a3da17ae3d5ab1af5f95f7783585969bca871686e2ab2ebe12fabf0cd
+DIST Image-ExifTool-9.86.tar.gz 3924748 SHA256 43ff9f27f32f9eefa431332525b71ee97dd5bd1fde39f64450d387f03bab475b SHA512 fa4efd55a3804c814eb195b26f0367b5bfadce32027bd740cfd826dfb817397268ea1b383cbaf75c38ac6f5370fdafb889c463c3c1fb0d616da4be0366cec56d WHIRLPOOL 22d3646ae7c35902107123e33cd8a7131e750a5b626f2937a272283153636c2841cb978a2969a586538c6ec8ebe427005e8155ba848fbe2db099b04d164aad30
+DIST Image-ExifTool-9.87.tar.gz 3926195 SHA256 9b866ae2de4d4b2d9d6684ec3d82391ffd07089cab9dbf27ba650bc9c14d151c SHA512 f3742f2c7739bdb518e0f15a5ea1d4a7776b3b4ee6dad4a3abc3afcb99500de12cfdb4235f5dc40cf2b6c3fa435feb711cdb11c3e34a3462a30958ddfbbb781d WHIRLPOOL 3d01887c1bfe02825551d199ffc7d5ba0ae8a2d2409653e93e89b3c61cd11bbc73b3b726a6e791c0faa11b94278d5cc5039fa18cb9b89cd014b964fbc9df278f
+DIST Image-ExifTool-9.88.tar.gz 3928998 SHA256 6af3306a742f9422704d0110c29debfa8427f16e209637bba1a330a63155fc58 SHA512 7948394412e043e812ebfe3fdbc405ef284e96d4285c3a9ebe144e8b0d2ca9d801a31d6ab7af3fd6ab6ad39599be41e711ab83ace8081ca307a0f0354ca7925d WHIRLPOOL 961d6aea31ca150b6e849b2f6a6657bf4a706c50ebc1c01665401a04f054bfab0d7e9a8979327ea183baee2e9b1e8a7e465d83addb37c61d86a95df69542eaae
+DIST Image-ExifTool-9.90.tar.gz 3940771 SHA256 64f602773cd2051fd3ab614464f4b39492383ba2742263cddbb4df27855b7089 SHA512 91a9de546c4db344e0f16407dbbe58045516134f997e5b4f38793a6d1f09710f1432ece4a6d4f7f6b861f4e95486e10613204bac90ea87211c02c50b434eb4f6 WHIRLPOOL 46bda5fb0f576c3d65e21044da66c6fe4cda27de2c8c92b28e2387ab93702ec89b728502da75e3b141446583ae873cb4dd63b2ca45a815e3306f2e6e9ee61d7a
+DIST Image-ExifTool-9.95.tar.gz 3978598 SHA256 4508c360167f2329a379e0f5a2bf29a55354716944d51e5550c6f68108ab86b6 SHA512 e00df630a37250e0ed9378a2d39b10df332204eff27116daf0499ef8f06e29415586768ffd4c010db31df538f603d5fd1071087e4344dd513a23b8b46a00ce24 WHIRLPOOL 91080ec8154a8801391ee67239cd105458c78234ae4bb08f79d91b77bbe9932270df2c402ac22e647378aa3df520a392d8535e6be7067f56275151154812e6a4
+DIST Image-ExifTool-9.97.tar.gz 4001422 SHA256 7cff22dd7e9d234c67dcaf8ad52f3af3482a6a5cd87b604397f20bbb3431745c SHA512 73285873ecfc57430bd75485a29ccc63f1f29bdf2a242665d54365713901a716158b27596ff7c9c5b0466586f14ef1d1119d388925283502ce9edac213dcb241 WHIRLPOOL b06f3315e0efa3ff25add6cc149705690feb2f8d2c298fc29cc82ee4c1f6e12fac765658baa5f260251109b2e47c80a3b0febf207dce90b546ac3fb8af47da3a
+DIST Image-ExifTool-9.98.tar.gz 4002089 SHA256 cf7e89b40e942ff582b06b958edfce2e2c7ba2986a650212a96fa74cf5bbc74b SHA512 138bcf0aeab6fe893df3f051ca9d5d2e7fabbfb19e6b68ee0529515c1e6f6d89d75ca8aacabfb7edc2e380caa04f8bb97536ef284b0bf140edfcf9c8363a482c WHIRLPOOL edb5c4799079b27a008ebb95e2ae13ec2c37cb123f3664582f6ddc8a0b3cb351410d12b2c1d5352a10a4213c8e7fcc591f64fb514c83bbecdf582780f27a0237
diff --git a/media-libs/exiftool/exiftool-9.78.ebuild b/media-libs/exiftool/exiftool-9.78.ebuild
new file mode 100644
index 000000000000..5cba21f9dd24
--- /dev/null
+++ b/media-libs/exiftool/exiftool-9.78.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_PN=Image-ExifTool
+MY_P=${MY_PN}-${PV}
+inherit perl-module
+
+DESCRIPTION="Read and write meta information in image, audio and video files"
+HOMEPAGE="http://www.sno.phy.queensu.ca/~phil/exiftool/ ${HOMEPAGE}"
+SRC_URI="http://www.sno.phy.queensu.ca/~phil/exiftool/${MY_P}.tar.gz"
+
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86 ~x64-macos"
+
+SRC_TEST="do"
+
+src_install() {
+ perl-module_src_install
+ dohtml -r html/
+}
diff --git a/media-libs/exiftool/exiftool-9.82.ebuild b/media-libs/exiftool/exiftool-9.82.ebuild
new file mode 100644
index 000000000000..1bd43829f15b
--- /dev/null
+++ b/media-libs/exiftool/exiftool-9.82.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_PN=Image-ExifTool
+MY_P=${MY_PN}-${PV}
+inherit perl-module
+
+DESCRIPTION="Read and write meta information in image, audio and video files"
+HOMEPAGE="http://www.sno.phy.queensu.ca/~phil/exiftool/ ${HOMEPAGE}"
+SRC_URI="http://www.sno.phy.queensu.ca/~phil/exiftool/${MY_P}.tar.gz"
+
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x64-macos"
+
+SRC_TEST="do"
+
+src_install() {
+ perl-module_src_install
+ dohtml -r html/
+}
diff --git a/media-libs/exiftool/exiftool-9.85.ebuild b/media-libs/exiftool/exiftool-9.85.ebuild
new file mode 100644
index 000000000000..1bd43829f15b
--- /dev/null
+++ b/media-libs/exiftool/exiftool-9.85.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_PN=Image-ExifTool
+MY_P=${MY_PN}-${PV}
+inherit perl-module
+
+DESCRIPTION="Read and write meta information in image, audio and video files"
+HOMEPAGE="http://www.sno.phy.queensu.ca/~phil/exiftool/ ${HOMEPAGE}"
+SRC_URI="http://www.sno.phy.queensu.ca/~phil/exiftool/${MY_P}.tar.gz"
+
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x64-macos"
+
+SRC_TEST="do"
+
+src_install() {
+ perl-module_src_install
+ dohtml -r html/
+}
diff --git a/media-libs/exiftool/exiftool-9.86.ebuild b/media-libs/exiftool/exiftool-9.86.ebuild
new file mode 100644
index 000000000000..1bd43829f15b
--- /dev/null
+++ b/media-libs/exiftool/exiftool-9.86.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_PN=Image-ExifTool
+MY_P=${MY_PN}-${PV}
+inherit perl-module
+
+DESCRIPTION="Read and write meta information in image, audio and video files"
+HOMEPAGE="http://www.sno.phy.queensu.ca/~phil/exiftool/ ${HOMEPAGE}"
+SRC_URI="http://www.sno.phy.queensu.ca/~phil/exiftool/${MY_P}.tar.gz"
+
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x64-macos"
+
+SRC_TEST="do"
+
+src_install() {
+ perl-module_src_install
+ dohtml -r html/
+}
diff --git a/media-libs/exiftool/exiftool-9.87.ebuild b/media-libs/exiftool/exiftool-9.87.ebuild
new file mode 100644
index 000000000000..1bd43829f15b
--- /dev/null
+++ b/media-libs/exiftool/exiftool-9.87.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_PN=Image-ExifTool
+MY_P=${MY_PN}-${PV}
+inherit perl-module
+
+DESCRIPTION="Read and write meta information in image, audio and video files"
+HOMEPAGE="http://www.sno.phy.queensu.ca/~phil/exiftool/ ${HOMEPAGE}"
+SRC_URI="http://www.sno.phy.queensu.ca/~phil/exiftool/${MY_P}.tar.gz"
+
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x64-macos"
+
+SRC_TEST="do"
+
+src_install() {
+ perl-module_src_install
+ dohtml -r html/
+}
diff --git a/media-libs/exiftool/exiftool-9.88.ebuild b/media-libs/exiftool/exiftool-9.88.ebuild
new file mode 100644
index 000000000000..1bd43829f15b
--- /dev/null
+++ b/media-libs/exiftool/exiftool-9.88.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_PN=Image-ExifTool
+MY_P=${MY_PN}-${PV}
+inherit perl-module
+
+DESCRIPTION="Read and write meta information in image, audio and video files"
+HOMEPAGE="http://www.sno.phy.queensu.ca/~phil/exiftool/ ${HOMEPAGE}"
+SRC_URI="http://www.sno.phy.queensu.ca/~phil/exiftool/${MY_P}.tar.gz"
+
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x64-macos"
+
+SRC_TEST="do"
+
+src_install() {
+ perl-module_src_install
+ dohtml -r html/
+}
diff --git a/media-libs/exiftool/exiftool-9.90.ebuild b/media-libs/exiftool/exiftool-9.90.ebuild
new file mode 100644
index 000000000000..1bd43829f15b
--- /dev/null
+++ b/media-libs/exiftool/exiftool-9.90.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_PN=Image-ExifTool
+MY_P=${MY_PN}-${PV}
+inherit perl-module
+
+DESCRIPTION="Read and write meta information in image, audio and video files"
+HOMEPAGE="http://www.sno.phy.queensu.ca/~phil/exiftool/ ${HOMEPAGE}"
+SRC_URI="http://www.sno.phy.queensu.ca/~phil/exiftool/${MY_P}.tar.gz"
+
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x64-macos"
+
+SRC_TEST="do"
+
+src_install() {
+ perl-module_src_install
+ dohtml -r html/
+}
diff --git a/media-libs/exiftool/exiftool-9.95.ebuild b/media-libs/exiftool/exiftool-9.95.ebuild
new file mode 100644
index 000000000000..1bd43829f15b
--- /dev/null
+++ b/media-libs/exiftool/exiftool-9.95.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_PN=Image-ExifTool
+MY_P=${MY_PN}-${PV}
+inherit perl-module
+
+DESCRIPTION="Read and write meta information in image, audio and video files"
+HOMEPAGE="http://www.sno.phy.queensu.ca/~phil/exiftool/ ${HOMEPAGE}"
+SRC_URI="http://www.sno.phy.queensu.ca/~phil/exiftool/${MY_P}.tar.gz"
+
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x64-macos"
+
+SRC_TEST="do"
+
+src_install() {
+ perl-module_src_install
+ dohtml -r html/
+}
diff --git a/media-libs/exiftool/exiftool-9.97.ebuild b/media-libs/exiftool/exiftool-9.97.ebuild
new file mode 100644
index 000000000000..1bd43829f15b
--- /dev/null
+++ b/media-libs/exiftool/exiftool-9.97.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_PN=Image-ExifTool
+MY_P=${MY_PN}-${PV}
+inherit perl-module
+
+DESCRIPTION="Read and write meta information in image, audio and video files"
+HOMEPAGE="http://www.sno.phy.queensu.ca/~phil/exiftool/ ${HOMEPAGE}"
+SRC_URI="http://www.sno.phy.queensu.ca/~phil/exiftool/${MY_P}.tar.gz"
+
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x64-macos"
+
+SRC_TEST="do"
+
+src_install() {
+ perl-module_src_install
+ dohtml -r html/
+}
diff --git a/media-libs/exiftool/exiftool-9.98.ebuild b/media-libs/exiftool/exiftool-9.98.ebuild
new file mode 100644
index 000000000000..d1bc315f11a3
--- /dev/null
+++ b/media-libs/exiftool/exiftool-9.98.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_PN=Image-ExifTool
+MY_P=${MY_PN}-${PV}
+inherit perl-module
+
+DESCRIPTION="Read and write meta information in image, audio and video files"
+HOMEPAGE="http://www.sno.phy.queensu.ca/~phil/exiftool/ ${HOMEPAGE}"
+SRC_URI="http://www.sno.phy.queensu.ca/~phil/exiftool/${MY_P}.tar.gz"
+
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x64-macos"
+IUSE="doc"
+
+SRC_TEST="do"
+
+src_install() {
+ perl-module_src_install
+ use doc && dohtml -r html/
+}
diff --git a/media-libs/exiftool/metadata.xml b/media-libs/exiftool/metadata.xml
new file mode 100644
index 000000000000..8ba0ae9d57de
--- /dev/null
+++ b/media-libs/exiftool/metadata.xml
@@ -0,0 +1,152 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <herd>perl</herd>
+ <longdescription>ExifTool is a platform-independent Perl library plus a
+ command-line application for reading, writing and editing meta
+ information in image, audio and video files. ExifTool supports
+ many different types of metadata including EXIF, GPS, IPTC, XMP,
+ JFIF, GeoTIFF, ICC Profile, Photoshop IRB, FlashPix, AFCP and
+ ID3, as well as the maker notes of many digital cameras by
+ Canon, Casio, FujiFilm, HP, JVC/Victor, Kodak, Leaf,
+ Minolta/Konica- Minolta, Nikon, Olympus/Epson, Panasonic/Leica,
+ Pentax/Asahi, Ricoh, Sanyo, Sigma/Foveon and Sony.</longdescription>
+ <upstream>
+ <remote-id type="cpan">Image-ExifTool</remote-id>
+ <remote-id type="cpan-module">File::RandomAccess</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::AES</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::AFCP</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::AIFF</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::APE</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::APP12</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::ASF</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::BMP</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::BZZ</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::BigTIFF</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::BuildTagLookup</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Canon</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::CanonCustom</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::CanonRaw</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::CanonVRD</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::CaptureOne</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Casio</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Charset</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::DICOM</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::DNG</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::DV</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::DjVu</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::EXE</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Exif</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::FLAC</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Fixup</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Flash</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::FlashPix</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Font</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::FotoStation</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::FujiFilm</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::GE</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::GIF</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::GIMP</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::GPS</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::GeoTiff</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Geotag</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::H264</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::HP</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::HTML</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::HtmlDump</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::ICC_Profile</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::ID3</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::IPTC</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::ITC</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Import</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::InDesign</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::JPEG</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::JPEGDigest</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::JVC</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Jpeg2000</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Kodak</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::KyoceraRaw</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::LNK</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Lang::cs</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Lang::de</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Lang::en_ca</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Lang::en_gb</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Lang::es</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Lang::fi</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Lang::fr</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Lang::it</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Lang::ja</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Lang::ko</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Lang::nl</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Lang::pl</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Lang::ru</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Lang::sv</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Lang::tr</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Lang::zh_cn</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Lang::zh_tw</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Leaf</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::M2TS</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::MIE</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::MIFF</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::MNG</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::MPC</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::MPEG</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::MPF</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::MWG</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::MXF</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::MakerNotes</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Matroska</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Microsoft</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Minolta</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::MinoltaRaw</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Nikon</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::NikonCapture</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::NikonCustom</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::OOXML</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Ogg</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Olympus</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::OpenEXR</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::PDF</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::PGF</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::PICT</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::PNG</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::PPM</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::PSP</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Panasonic</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::PanasonicRaw</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Pentax</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::PhotoCD</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::PhotoMechanic</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Photoshop</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::PostScript</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::PrintIM</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Qualcomm</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::QuickTime</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::RIFF</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::RSRC</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::RTF</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Radiance</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Rawzor</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Real</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Reconyx</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Ricoh</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Samsung</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Sanyo</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Shortcuts</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Sigma</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::SigmaRaw</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Sony</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::SonyIDC</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Stim</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::TagInfoXML</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::TagLookup</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Theora</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Unknown</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::Vorbis</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::XMP</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::ZIP</remote-id>
+ <remote-id type="cpan-module">Image::ExifTool::iWork</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/faac/Manifest b/media-libs/faac/Manifest
new file mode 100644
index 000000000000..4f07b5b8813d
--- /dev/null
+++ b/media-libs/faac/Manifest
@@ -0,0 +1 @@
+DIST faac-1.28.tar.gz 678891 SHA256 c5141199f4cfb17d749c36ba8cfe4b25f838da67c22f0fec40228b6b9c3d19df SHA512 0ef721ad28835e95cad41afc0cb6130e1ebb634cb6dd4b40f649bc2269b7bb5bf2887f6d8f023c74628d521f8bdf55b4dd070f972ecff162a5fe0384e026235b WHIRLPOOL fe56f3c2b40670f03e0c1880b253d7f0cc6e318c0b407f4e57fb7eaeac8692c6de9829402e670ddc0f397396935131ade0f8dadfc89b88fcdedecbf404e1b54e
diff --git a/media-libs/faac/faac-1.28-r3.ebuild b/media-libs/faac/faac-1.28-r3.ebuild
new file mode 100644
index 000000000000..50f879c47bb7
--- /dev/null
+++ b/media-libs/faac/faac-1.28-r3.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="Free MPEG-4 audio codecs by AudioCoding.com"
+HOMEPAGE="http://www.audiocoding.com"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1 MPEG-4"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="static-libs"
+
+RDEPEND="media-libs/libmp4v2:0="
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-external-libmp4v2.patch \
+ "${FILESDIR}"/${P}-altivec.patch \
+ "${FILESDIR}"/${P}-libmp4v2_r479_compat.patch \
+ "${FILESDIR}"/${P}-inttypes.patch
+
+ sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' configure.in || die #466984
+
+ eautoreconf
+ epunt_cxx
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc AUTHORS ChangeLog NEWS README TODO
+ dohtml docs/*.html
+ insinto /usr/share/doc/${PF}/pdf
+ doins docs/libfaac.pdf
+ prune_libtool_files
+}
diff --git a/media-libs/faac/faac-1.28-r4.ebuild b/media-libs/faac/faac-1.28-r4.ebuild
new file mode 100644
index 000000000000..45c2496f41c0
--- /dev/null
+++ b/media-libs/faac/faac-1.28-r4.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 autotools eutils multilib-minimal
+
+DESCRIPTION="Free MPEG-4 audio codecs by AudioCoding.com"
+HOMEPAGE="http://www.audiocoding.com"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1 MPEG-4"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="static-libs"
+
+RDEPEND="media-libs/libmp4v2:0=
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20130224-r1
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}"
+DOCS=( AUTHORS ChangeLog NEWS README TODO )
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-external-libmp4v2.patch \
+ "${FILESDIR}"/${P}-altivec.patch \
+ "${FILESDIR}"/${P}-libmp4v2_r479_compat.patch \
+ "${FILESDIR}"/${P}-inttypes.patch
+
+ sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' configure.in || die #466984
+
+ eautoreconf
+ epunt_cxx
+}
+
+multilib_src_configure() {
+ local myconf
+ # only used for the fronted we need only for the default ABI.
+ [ "${ABI}" != "${DEFAULT_ABI}" ] && myconf+=" --without-mp4v2"
+
+ ECONF_SOURCE="${S}" econf \
+ $(use_enable static-libs static) \
+ ${myconf}
+
+ # do not build the frontend for non default abis
+ if [ "${ABI}" != "${DEFAULT_ABI}" ] ; then
+ sed -i -e 's/frontend//' Makefile || die
+ fi
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+ prune_libtool_files
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ dohtml docs/*.html
+ insinto /usr/share/doc/${PF}/pdf
+ doins docs/libfaac.pdf
+}
diff --git a/media-libs/faac/files/faac-1.28-altivec.patch b/media-libs/faac/files/faac-1.28-altivec.patch
new file mode 100644
index 000000000000..ae461efc30d3
--- /dev/null
+++ b/media-libs/faac/files/faac-1.28-altivec.patch
@@ -0,0 +1,40 @@
+http://bugs.gentoo.org/306881
+
+--- configure.in
++++ configure.in
+@@ -33,7 +33,12 @@
+ AC_CHECK_DECLS([MP4Create, MP4MetadataDelete],
+ AC_CHECK_LIB(mp4v2, MP4MetadataDelete, external_mp4v2=yes,
+ external_mp4v2=no, -lstdc++),
+- external_mp4v2=no, [#include <mp4v2/mp4v2.h>])
++ external_mp4v2=no, [
++ #if defined(__ALTIVEC__)
++ #undef bool
++ #endif
++ #include <mp4v2/mp4v2.h>
++ ])
+
+ if test x$external_mp4v2 = xyes; then
+ AC_MSG_NOTICE([*** Building with external mp4v2 ***])
+--- frontend/main.c
++++ frontend/main.c
+@@ -30,6 +30,9 @@
+ #endif
+
+ #ifdef HAVE_LIBMP4V2
++#if defined(__ALTIVEC__)
++# undef bool
++#endif
+ # include <mp4v2/mp4v2.h>
+ #endif
+
+--- common/mp4v2/mpeg4ip.h
++++ common/mp4v2/mpeg4ip.h
+@@ -123,7 +123,6 @@
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+-char *strcasestr(const char *haystack, const char *needle);
+ #ifdef __cplusplus
+ }
+ #endif
diff --git a/media-libs/faac/files/faac-1.28-external-libmp4v2.patch b/media-libs/faac/files/faac-1.28-external-libmp4v2.patch
new file mode 100644
index 000000000000..54a63347b87a
--- /dev/null
+++ b/media-libs/faac/files/faac-1.28-external-libmp4v2.patch
@@ -0,0 +1,47 @@
+diff -ur faac-1.28.orig/configure.in faac-1.28/configure.in
+--- faac-1.28.orig/configure.in 2009-02-05 02:55:38.000000000 +0200
++++ faac-1.28/configure.in 2009-07-10 13:21:34.000000000 +0300
+@@ -28,14 +28,17 @@
+ AC_CHECK_LIB(gnugetopt, getopt_long)
+
+ AM_CONDITIONAL(WITH_MP4V2, false)
++AM_CONDITIONAL(WITH_EXTERNAL_MP4V2, false)
+
+ AC_CHECK_DECLS([MP4Create, MP4MetadataDelete],
+ AC_CHECK_LIB(mp4v2, MP4MetadataDelete, external_mp4v2=yes,
+ external_mp4v2=no, -lstdc++),
+- external_mp4v2=no, [#include <mp4.h>])
++ external_mp4v2=no, [#include <mp4v2/mp4v2.h>])
+
+ if test x$external_mp4v2 = xyes; then
+ AC_MSG_NOTICE([*** Building with external mp4v2 ***])
++ MY_DEFINE(HAVE_LIBMP4V2)
++ AM_CONDITIONAL(WITH_EXTERNAL_MP4V2, true)
+ else
+ if test x$WITHMP4V2 = xyes; then
+ AC_MSG_NOTICE([*** Building with internal mp4v2 ***])
+diff -ur faac-1.28.orig/frontend/main.c faac-1.28/frontend/main.c
+--- faac-1.28.orig/frontend/main.c 2009-01-24 03:10:20.000000000 +0200
++++ faac-1.28/frontend/main.c 2009-07-10 13:22:18.000000000 +0300
+@@ -30,7 +30,7 @@
+ #endif
+
+ #ifdef HAVE_LIBMP4V2
+-# include <mp4.h>
++# include <mp4v2/mp4v2.h>
+ #endif
+
+ #define DEFAULT_TNS 0
+diff -ur faac-1.28.orig/frontend/Makefile.am faac-1.28/frontend/Makefile.am
+--- faac-1.28.orig/frontend/Makefile.am 2008-12-16 02:56:00.000000000 +0200
++++ faac-1.28/frontend/Makefile.am 2009-07-10 13:21:55.000000000 +0300
+@@ -8,5 +8,9 @@
+ LDADD = $(top_builddir)/libfaac/libfaac.la $(top_srcdir)/common/mp4v2/libmp4v2.a -lm -lstdc++
+ else
+ INCLUDES = -I$(top_srcdir)/include
++if WITH_EXTERNAL_MP4V2
++LDADD = $(top_builddir)/libfaac/libfaac.la -lm -lmp4v2
++else
+ LDADD = $(top_builddir)/libfaac/libfaac.la -lm
+ endif
++endif
diff --git a/media-libs/faac/files/faac-1.28-inttypes.patch b/media-libs/faac/files/faac-1.28-inttypes.patch
new file mode 100644
index 000000000000..09304fb60172
--- /dev/null
+++ b/media-libs/faac/files/faac-1.28-inttypes.patch
@@ -0,0 +1,41 @@
+use standard integer types, not linux ones
+
+--- frontend/main.c
++++ frontend/main.c
+@@ -440,13 +440,13 @@
+ MP4TrackId MP4track = 0;
+ unsigned int ntracks = 0, trackno = 0;
+ unsigned int ndiscs = 0, discno = 0;
+- u_int8_t compilation = 0;
++ uint8_t compilation = 0;
+ const char *artist = NULL, *title = NULL, *album = NULL, *year = NULL,
+ *genre = NULL, *comment = NULL, *writer = NULL;
+- u_int8_t *art = NULL;
+- u_int64_t artSize = 0;
+- u_int64_t total_samples = 0;
+- u_int64_t encoded_samples = 0;
++ uint8_t *art = NULL;
++ uint64_t artSize = 0;
++ uint64_t total_samples = 0;
++ uint64_t encoded_samples = 0;
+ unsigned int delay_samples;
+ unsigned int frameSize;
+ #endif
+@@ -647,7 +647,7 @@
+ FILE *artFile = fopen(optarg, "rb");
+
+ if(artFile) {
+- u_int64_t r;
++ uint64_t r;
+
+ fseek(artFile, 0, SEEK_END);
+ artSize = ftell(artFile);
+@@ -1112,7 +1112,7 @@
+ if (bytesWritten > 0)
+ {
+ #ifdef HAVE_LIBMP4V2
+- u_int64_t samples_left = total_samples - encoded_samples + delay_samples;
++ uint64_t samples_left = total_samples - encoded_samples + delay_samples;
+ MP4Duration dur = samples_left > frameSize ? frameSize : samples_left;
+ MP4Duration ofs = encoded_samples > 0 ? 0 : delay_samples;
+
diff --git a/media-libs/faac/files/faac-1.28-libmp4v2_r479_compat.patch b/media-libs/faac/files/faac-1.28-libmp4v2_r479_compat.patch
new file mode 100644
index 000000000000..f4ac8e6d4c53
--- /dev/null
+++ b/media-libs/faac/files/faac-1.28-libmp4v2_r479_compat.patch
@@ -0,0 +1,138 @@
+http://bugs.gentoo.org/397575
+http://sourceforge.net/tracker/?func=detail&aid=3476707&group_id=704&atid=100704
+
+--- configure.in
++++ configure.in
+@@ -33,8 +33,8 @@ AC_CHECK_LIB(gnugetopt, getopt_long)
+ AM_CONDITIONAL(WITH_MP4V2, false)
+ AM_CONDITIONAL(WITH_EXTERNAL_MP4V2, false)
+
+-AC_CHECK_DECLS([MP4Create, MP4MetadataDelete],
+- AC_CHECK_LIB(mp4v2, MP4MetadataDelete, external_mp4v2=yes,
++AC_CHECK_DECLS([MP4Create],
++ AC_CHECK_LIB(mp4v2, MP4Create, external_mp4v2=yes,
+ external_mp4v2=no, -lstdc++),
+ external_mp4v2=no, [#include <mp4v2/mp4v2.h>])
+
+@@ -42,6 +42,7 @@ if test x$external_mp4v2 = xyes; then
+ AC_MSG_NOTICE([*** Building with external mp4v2 ***])
+ MY_DEFINE(HAVE_EXTERNAL_LIBMP4V2)
+ AM_CONDITIONAL(WITH_EXTERNAL_MP4V2, true)
++ AC_CHECK_DECLS([MP4TagsAlloc], [], [], [#include <mp4v2/mp4v2.h>])
+ else
+ if test x$WITHMP4V2 = xyes; then
+ AC_MSG_NOTICE([*** Building with internal mp4v2 ***])
+--- frontend/main.c
++++ frontend/main.c
+@@ -873,8 +873,12 @@ int main(int argc, char *argv[])
+ if (!faacEncSetConfiguration(hEncoder, myFormat)) {
+ fprintf(stderr, "Unsupported output format!\n");
+ #ifdef HAVE_LIBMP4V2
++#ifdef MP4_CLOSE_DO_NOT_COMPUTE_BITRATE /* r479 fix */
++ if (container == MP4_CONTAINER) MP4Close(MP4hFile, 0);
++#else
+ if (container == MP4_CONTAINER) MP4Close(MP4hFile);
+ #endif
++#endif
+ return 1;
+ }
+
+@@ -885,12 +889,10 @@ int main(int argc, char *argv[])
+ unsigned long ASCLength = 0;
+ char *version_string;
+
+-#ifdef MP4_CREATE_EXTENSIBLE_FORMAT
+- /* hack to compile against libmp4v2 >= 1.0RC3
+- * why is there no version identifier in mp4.h? */
++#ifdef MP4_DETAILS_ERROR /* r453 fix */
+ MP4hFile = MP4Create(aacFileName, MP4_DETAILS_ERROR, 0);
+ #else
+- MP4hFile = MP4Create(aacFileName, MP4_DETAILS_ERROR, 0, 0);
++ MP4hFile = MP4Create(aacFileName, 0);
+ #endif
+ if (!MP4_IS_VALID_FILE_HANDLE(MP4hFile)) {
+ fprintf(stderr, "Couldn't create output file %s\n", aacFileName);
+@@ -905,12 +907,22 @@ int main(int argc, char *argv[])
+ free(ASC);
+
+ /* set metadata */
++#if HAVE_DECL_MP4TAGSALLOC
++ const MP4Tags* tags;
++ tags = MP4TagsAlloc();
++ MP4TagsFetch( tags, MP4hFile );
++#endif
+ version_string = malloc(strlen(faac_id_string) + 6);
+ strcpy(version_string, "FAAC ");
+ strcpy(version_string + 5, faac_id_string);
++#if !HAVE_DECL_MP4TAGSALLOC
+ MP4SetMetadataTool(MP4hFile, version_string);
++#else
++ MP4TagsSetEncodingTool(tags, version_string);
++#endif
+ free(version_string);
+
++#if !HAVE_DECL_MP4TAGSALLOC
+ if (artist) MP4SetMetadataArtist(MP4hFile, artist);
+ if (writer) MP4SetMetadataWriter(MP4hFile, writer);
+ if (title) MP4SetMetadataName(MP4hFile, title);
+@@ -923,8 +935,40 @@ int main(int argc, char *argv[])
+ if (comment) MP4SetMetadataComment(MP4hFile, comment);
+ if (artSize) {
+ MP4SetMetadataCoverArt(MP4hFile, art, artSize);
++#else
++ if (artist) MP4TagsSetArtist(tags, artist);
++ if (writer) MP4TagsSetComposer(tags, writer);
++ if (title) MP4TagsSetName(tags, title);
++ if (album) MP4TagsSetAlbum(tags, album);
++ if (trackno > 0) {
++ MP4TagTrack tt;
++ tt.index = trackno;
++ tt.total = ntracks;
++ MP4TagsSetTrack(tags, &tt);
++ }
++ if (discno > 0) {
++ MP4TagDisk td;
++ td.index = discno;
++ td.total = ndiscs;
++ MP4TagsSetDisk(tags, &td);
++ }
++ if (compilation) MP4TagsSetCompilation(tags, compilation);
++ if (year) MP4TagsSetReleaseDate(tags, year);
++ if (genre) MP4TagsSetGenre(tags, genre);
++ if (comment) MP4TagsSetComments(tags, comment);
++ if (artSize) {
++ MP4TagArtwork mp4art;
++ mp4art.data = art;
++ mp4art.size = artSize;
++ mp4art.type = MP4_ART_UNDEFINED; // delegate typing to libmp4v2
++ MP4TagsAddArtwork( tags, &mp4art );
++#endif
+ free(art);
+ }
++#if HAVE_DECL_MP4TAGSALLOC
++ MP4TagsStore( tags, MP4hFile );
++ MP4TagsFree( tags );
++#endif
+ }
+ else
+ {
+@@ -1141,11 +1185,19 @@ int main(int argc, char *argv[])
+ /* clean up */
+ if (container == MP4_CONTAINER)
+ {
++#ifdef MP4_CLOSE_DO_NOT_COMPUTE_BITRATE /* r479 fix */
++ MP4Close(MP4hFile, 0);
++#else
+ MP4Close(MP4hFile);
++#endif
+ if (optimizeFlag == 1)
+ {
+ fprintf(stderr, "\n\nMP4 format optimization... ");
++#ifdef MP4_DETAILS_ERROR /* r453 fix */
+ MP4Optimize(aacFileName, NULL, 0);
++#else
++ MP4Optimize(aacFileName, NULL);
++#endif
+ fprintf(stderr, "Done!");
+ }
+ } else
diff --git a/media-libs/faac/metadata.xml b/media-libs/faac/metadata.xml
new file mode 100644
index 000000000000..da0ce7d9131e
--- /dev/null
+++ b/media-libs/faac/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>sound</herd>
+ <upstream>
+ <remote-id type="sourceforge">faac</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/faad2/Manifest b/media-libs/faad2/Manifest
new file mode 100644
index 000000000000..5333a9280f84
--- /dev/null
+++ b/media-libs/faad2/Manifest
@@ -0,0 +1 @@
+DIST faad2-2.7.tar.gz 1137407 SHA256 ee26ed1e177c0cd8fa8458a481b14a0b24ca0b51468c8b4c8b676fd3ceccd330 SHA512 8135370497dfcfee09094a03a4a9545ebc58b9e532b89c5d6e5037042549e12ddb75f8903aa05866afac9fa28df96320f1ed2eebffc0660578e54392a51c1161 WHIRLPOOL 6e30d466e47de0e06751718005573a632c5aa0cd209445c56c25d859f917265452676ce897ac5ad1cd308d411911aaf232bfc50904469f9434b2cc95b6ae928f
diff --git a/media-libs/faad2/faad2-2.7-r3.ebuild b/media-libs/faad2/faad2-2.7-r3.ebuild
new file mode 100644
index 000000000000..04739320b964
--- /dev/null
+++ b/media-libs/faad2/faad2-2.7-r3.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils multilib-minimal
+
+DESCRIPTION="AAC audio decoding library"
+HOMEPAGE="http://www.audiocoding.com/faad2.html"
+SRC_URI="mirror://sourceforge/faac/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="digitalradio static-libs"
+DOCS=( AUTHORS ChangeLog NEWS README README.linux TODO )
+RDEPEND="abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20130224-r1
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+DEPEND=""
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-libmp4ff-shared-lib.patch \
+ "${FILESDIR}"/${P}-libmp4ff-install-mp4ff_int_types_h.patch \
+ "${FILESDIR}"/${P}-man1_MANS.patch
+
+ sed -i -e 's:iquote :I:' libfaad/Makefile.am || die
+
+ # bug 466986
+ sed -i 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' configure.in || die
+
+ eautoreconf
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ $(use_enable static-libs static) \
+ --disable-dependency-tracking \
+ $(use_with digitalradio drm) \
+ --without-xmms
+
+ # do not build the frontend for non default abis
+ if [ "${ABI}" != "${DEFAULT_ABI}" ] ; then
+ sed -i -e 's/frontend//' Makefile || die
+ fi
+}
+
+multilib_src_install_all() {
+ prune_libtool_files --all
+ einstalldocs
+}
diff --git a/media-libs/faad2/files/faad2-2.7-libmp4ff-install-mp4ff_int_types_h.patch b/media-libs/faad2/files/faad2-2.7-libmp4ff-install-mp4ff_int_types_h.patch
new file mode 100644
index 000000000000..5d39cad95d7e
--- /dev/null
+++ b/media-libs/faad2/files/faad2-2.7-libmp4ff-install-mp4ff_int_types_h.patch
@@ -0,0 +1,13 @@
+Install mp4ff_int_types.h for mythmusic.
+
+http://bugs.gentoo.org/275008
+
+--- common/mp4ff/Makefile.am
++++ common/mp4ff/Makefile.am
+@@ -1,5 +1,5 @@
+ lib_LTLIBRARIES = libmp4ff.la
+-include_HEADERS = mp4ff.h mp4ffint.h
++include_HEADERS = mp4ff.h mp4ffint.h mp4ff_int_types.h
+
+ AM_CFLAGS = -DUSE_TAGGING=1
+
diff --git a/media-libs/faad2/files/faad2-2.7-libmp4ff-shared-lib.patch b/media-libs/faad2/files/faad2-2.7-libmp4ff-shared-lib.patch
new file mode 100644
index 000000000000..56a131192969
--- /dev/null
+++ b/media-libs/faad2/files/faad2-2.7-libmp4ff-shared-lib.patch
@@ -0,0 +1,29 @@
+Ripped from Debian
+
+Patch to create a shared lib for libmp4ff.
+
+--- a/common/mp4ff/Makefile.am
++++ b/common/mp4ff/Makefile.am
+@@ -1,7 +1,8 @@
+-lib_LIBRARIES = libmp4ff.a
++lib_LTLIBRARIES = libmp4ff.la
+ include_HEADERS = mp4ff.h mp4ffint.h
+
+-libmp4ff_a_CFLAGS = -DUSE_TAGGING=1
++AM_CFLAGS = -DUSE_TAGGING=1
+
+-libmp4ff_a_SOURCES = mp4ff.c mp4atom.c mp4meta.c mp4sample.c mp4util.c \
++libmp4ff_la_LDFLAGS = -version-info 0:0:0
++libmp4ff_la_SOURCES = mp4ff.c mp4atom.c mp4meta.c mp4sample.c mp4util.c \
+ mp4tagupdate.c mp4ff.h mp4ffint.h mp4ff_int_types.h
+--- a/frontend/Makefile.am
++++ b/frontend/Makefile.am
+@@ -5,7 +5,7 @@
+ -I$(top_srcdir)/common/mp4ff
+
+ faad_LDADD = $(top_builddir)/libfaad/libfaad.la \
+- $(top_builddir)/common/mp4ff/libmp4ff.a
++ $(top_builddir)/common/mp4ff/libmp4ff.la
+
+ faad_SOURCES = main.c \
+ audio.c audio.h \
diff --git a/media-libs/faad2/files/faad2-2.7-man1_MANS.patch b/media-libs/faad2/files/faad2-2.7-man1_MANS.patch
new file mode 100644
index 000000000000..9c1ddb01bc31
--- /dev/null
+++ b/media-libs/faad2/files/faad2-2.7-man1_MANS.patch
@@ -0,0 +1,10 @@
+diff -ur faad2-2.7.orig/frontend/Makefile.am faad2-2.7/frontend/Makefile.am
+--- faad2-2.7.orig/frontend/Makefile.am 2009-02-06 18:03:37.000000000 +0200
++++ faad2-2.7/frontend/Makefile.am 2009-07-20 20:27:29.000000000 +0300
+@@ -1,5 +1,5 @@
+ bin_PROGRAMS = faad
+-man_MANS = faad.man
++man1_MANS = faad.man
+
+ INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/common/faad \
+ -I$(top_srcdir)/common/mp4ff
diff --git a/media-libs/faad2/metadata.xml b/media-libs/faad2/metadata.xml
new file mode 100644
index 000000000000..3cd31fce10b9
--- /dev/null
+++ b/media-libs/faad2/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>sound</herd>
+ <longdescription>The fastest ISO AAC audio decoder available, correctly decodes all MPEG-4 and MPEG-2 MAIN, LOW, LTP, LD and ER object type AAC files</longdescription>
+ <use>
+ <flag name="digitalradio">Digital Radio Mondiale (warning: disables other decoders)</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">faac</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/fdk-aac/Manifest b/media-libs/fdk-aac/Manifest
new file mode 100644
index 000000000000..61f924d0484d
--- /dev/null
+++ b/media-libs/fdk-aac/Manifest
@@ -0,0 +1,4 @@
+DIST fdk-aac-0.1.1.tar.gz 1979748 SHA256 9fb9c22b7e80ee34a34639b6fe0d7411e8ec8553a45b761e8ff110ee84874a62 SHA512 1c372150fcf2a3b0b7affd370568f163097deb09df45164cd084dfa7601e6b56a5e84773ae5b2229053d0eab5ffbcfb1f404286ded6de3f10f8855deae649244 WHIRLPOOL b34c93bfe3d70afc8c562846b8d6fdfac9995b943cdb23f021853f8c6c949e0df41c1512563ca3b8ab638e770f93ac46daebe6a4b838dddcab59a0791c5613b2
+DIST fdk-aac-0.1.2.tar.gz 1976401 SHA256 e4eefa3e64a5110dd180decf21a255fe1c1e08548dbdc646e125835e7798cf4a SHA512 702a65b7b7010a38c8f25a025836aec3337cf17eaa2cffaab49e752f73ebc5bf96ceb782712f3c1d00470567f0c23058e60fece126217793f104387e993358cd WHIRLPOOL bba7428a2b187c0f6d33312b1ecd0354c21976ae1520813077162951e4d027196d27d52a0cec426dc20cf8e6a5c6c75e5a8a7ee2272d942ea0d16e9a3d3c92e5
+DIST fdk-aac-0.1.3.tar.gz 1982695 SHA256 a9cb872802cfb7a2aff7a549c114c547d1e518dd60c2f85942229cc20c0d0c8d SHA512 1cc78bdb31f0896b71de85afbebeb5f8ed97affccf74c20ad2c36e6baead0199f83bf987a28872a1229b116c17c161e4bbe197c5108fd749fd508ebfeeb7df56 WHIRLPOOL 115298bb9fea7317a991da87e6aea9c94575550c5d26678b5edcef62c02d16a143d9d8b3d84264c7437b0f3451cf3b504713d56198eedff317421d86918c8b34
+DIST fdk-aac-0.1.4.tar.gz 1986515 SHA256 5910fe788677ca13532e3f47b7afaa01d72334d46a2d5e1d1f080f1173ff15ab SHA512 edb8540aa29cc1b1c98aff67a273771e766b4a30a9292f1cdd9b2beba6659bc3db51b0342c0b0521ce4da29e63ce948dda37fdbb1cc57787f1ec9d8223b2aada WHIRLPOOL aa272566b38c47cf838a99bb8914c3eedd7d0a94a3e104e00376a4b6943bf73760a20a4fce7c57f4665c61188d4e795072a2df40fbcbd77565d24b4f21b05b49
diff --git a/media-libs/fdk-aac/fdk-aac-0.1.1.ebuild b/media-libs/fdk-aac/fdk-aac-0.1.1.ebuild
new file mode 100644
index 000000000000..c015886e564c
--- /dev/null
+++ b/media-libs/fdk-aac/fdk-aac-0.1.1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+if [[ ${PV} == *9999 ]] ; then
+ SCM="git"
+ EGIT_REPO_URI="git://github.com/mstorsjo/${PN}.git"
+ [[ ${PV%9999} != "" ]] && EGIT_BRANCH="release/${PV%.9999}"
+fi
+
+inherit eutils multilib autotools ${SCM}
+
+DESCRIPTION="Fraunhofer AAC codec library"
+HOMEPAGE="http://sourceforge.net/projects/opencore-amr/"
+
+if [[ ${PV} == *9999 ]] ; then
+ SRC_URI=""
+elif [[ ${PV%_p*} != ${PV} ]] ; then # Gentoo snapshot
+ SRC_URI="mirror://gentoo/${P}.tar.xz"
+else # Official release
+ SRC_URI="mirror://sourceforge/opencore-amr/${P}.tar.gz"
+fi
+
+LICENSE="FraunhoferFDK"
+SLOT="0"
+
+[[ ${PV} == *9999 ]] || \
+KEYWORDS="amd64 arm ppc ppc64 x86 ~x86-fbsd ~x64-macos"
+IUSE="static-libs examples"
+
+src_prepare() {
+ [[ ${PV} == *9999 ]] && eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-silent-rules \
+ --disable-dependency-tracking \
+ $(use_enable examples example) \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ find "${D}"usr/$(get_libdir) -name '*.la' -delete
+}
diff --git a/media-libs/fdk-aac/fdk-aac-0.1.2.ebuild b/media-libs/fdk-aac/fdk-aac-0.1.2.ebuild
new file mode 100644
index 000000000000..98c6e9318bc9
--- /dev/null
+++ b/media-libs/fdk-aac/fdk-aac-0.1.2.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+if [[ ${PV} == *9999 ]] ; then
+ SCM="git"
+ EGIT_REPO_URI="git://github.com/mstorsjo/${PN}.git"
+ [[ ${PV%9999} != "" ]] && EGIT_BRANCH="release/${PV%.9999}"
+ AUTOTOOLS_AUTORECONF=yes
+fi
+
+inherit autotools-multilib ${SCM}
+
+DESCRIPTION="Fraunhofer AAC codec library"
+HOMEPAGE="http://sourceforge.net/projects/opencore-amr/"
+
+if [[ ${PV} == *9999 ]] ; then
+ SRC_URI=""
+elif [[ ${PV%_p*} != ${PV} ]] ; then # Gentoo snapshot
+ SRC_URI="mirror://gentoo/${P}.tar.xz"
+else # Official release
+ SRC_URI="mirror://sourceforge/opencore-amr/${P}.tar.gz"
+fi
+
+LICENSE="FraunhoferFDK"
+SLOT="0"
+
+[[ ${PV} == *9999 ]] || \
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-fbsd ~x86-fbsd ~x64-macos"
+IUSE="static-libs examples"
+
+AUTOTOOLS_PRUNE_LIBTOOL_FILES=all
+
+src_configure() {
+ local myeconfargs=(
+ "$(use_enable examples example)"
+ )
+ autotools-multilib_src_configure
+}
diff --git a/media-libs/fdk-aac/fdk-aac-0.1.3.ebuild b/media-libs/fdk-aac/fdk-aac-0.1.3.ebuild
new file mode 100644
index 000000000000..b5f5006fd9be
--- /dev/null
+++ b/media-libs/fdk-aac/fdk-aac-0.1.3.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+if [[ ${PV} == *9999 ]] ; then
+ SCM="git"
+ EGIT_REPO_URI="git://github.com/mstorsjo/${PN}.git"
+ [[ ${PV%9999} != "" ]] && EGIT_BRANCH="release/${PV%.9999}"
+ AUTOTOOLS_AUTORECONF=yes
+fi
+
+inherit autotools-multilib ${SCM}
+
+DESCRIPTION="Fraunhofer AAC codec library"
+HOMEPAGE="http://sourceforge.net/projects/opencore-amr/"
+
+if [[ ${PV} == *9999 ]] ; then
+ SRC_URI=""
+elif [[ ${PV%_p*} != ${PV} ]] ; then # Gentoo snapshot
+ SRC_URI="mirror://gentoo/${P}.tar.xz"
+else # Official release
+ SRC_URI="mirror://sourceforge/opencore-amr/${P}.tar.gz"
+fi
+
+LICENSE="FraunhoferFDK"
+SLOT="0"
+
+[[ ${PV} == *9999 ]] || \
+KEYWORDS="amd64 arm ppc ppc64 x86 ~amd64-fbsd ~x86-fbsd ~x64-macos"
+IUSE="static-libs examples"
+
+AUTOTOOLS_PRUNE_LIBTOOL_FILES=all
+
+src_configure() {
+ local myeconfargs=(
+ "$(use_enable examples example)"
+ )
+ autotools-multilib_src_configure
+}
diff --git a/media-libs/fdk-aac/fdk-aac-0.1.4.ebuild b/media-libs/fdk-aac/fdk-aac-0.1.4.ebuild
new file mode 100644
index 000000000000..c4d7405872c3
--- /dev/null
+++ b/media-libs/fdk-aac/fdk-aac-0.1.4.ebuild
@@ -0,0 +1,42 @@
+# 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"
+ EGIT_REPO_URI="git://github.com/mstorsjo/${PN}.git"
+ [[ ${PV%9999} != "" ]] && EGIT_BRANCH="release/${PV%.9999}"
+ AUTOTOOLS_AUTORECONF=yes
+fi
+
+inherit autotools-multilib ${SCM}
+
+DESCRIPTION="Fraunhofer AAC codec library"
+HOMEPAGE="http://sourceforge.net/projects/opencore-amr/"
+
+if [[ ${PV} == *9999 ]] ; then
+ SRC_URI=""
+elif [[ ${PV%_p*} != ${PV} ]] ; then # Gentoo snapshot
+ SRC_URI="mirror://gentoo/${P}.tar.xz"
+else # Official release
+ SRC_URI="mirror://sourceforge/opencore-amr/${P}.tar.gz"
+fi
+
+LICENSE="FraunhoferFDK"
+# subslot == N where N is libfdk-aac.so.N
+SLOT="0/1"
+
+[[ ${PV} == *9999 ]] || \
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-fbsd ~x86-fbsd ~x64-macos"
+IUSE="static-libs examples"
+
+AUTOTOOLS_PRUNE_LIBTOOL_FILES=all
+
+src_configure() {
+ local myeconfargs=(
+ "$(use_enable examples example)"
+ )
+ autotools-multilib_src_configure
+}
diff --git a/media-libs/fdk-aac/metadata.xml b/media-libs/fdk-aac/metadata.xml
new file mode 100644
index 000000000000..8503e5e2cc11
--- /dev/null
+++ b/media-libs/fdk-aac/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>sound</herd>
+ <longdescription lang="en">Fraunhofer FDK AAC Codec Library for Android</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">opencore-amr</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/ffmpegsource/Manifest b/media-libs/ffmpegsource/Manifest
new file mode 100644
index 000000000000..c928826575e1
--- /dev/null
+++ b/media-libs/ffmpegsource/Manifest
@@ -0,0 +1,3 @@
+DIST ffmpegsource-2.19.1.tar.gz 512381 SHA256 39c8a5f6c6735d10b3b0a3830f71ef0182b42e747cbceb6bf9b8dcc0532c99db SHA512 e6e9a49af8eb9c1f5a54db8a74879cefbd4876329b71b09ebf79fc6f25808a12cc020ebe275607773127b908c67fc7c92f264b49e02ce08ec209a7d94e9d3a67 WHIRLPOOL 469519aee1a7364e21bb988481e6709af8ee53d18cd5be4d00c148a5e0f940491d6c777d387d3fcdbf74fde5c3c6da843205dd378e7fb301f65981daddf71760
+DIST ffmpegsource-2.20.tar.gz 539587 SHA256 c7d880172756c253f2c5673044dabf03c19890dcfe64da5104ee9f42a1a573a0 SHA512 77cfb027a6be21952700fadee66467d18bc0521569cf3d5eef3f7fd3ff9785ba1c6b7a251a5ccfb8b6e8dd965aef9928cf27459dca28591eeddd1fd5a2905295 WHIRLPOOL 321cc4a3ff37201def87bfb7596e84e76cb58fb05a43d99901eaca8f46f712fa4d86af9cdc65a24749c2715a4f52c9106ab2b24d7060cfe87f5401e520ac7fb1
+DIST ffms-2.17-src.tar.bz2 394862 SHA256 991f7a77982823afdcf0beb8961deddaf7dd0aea949249e51fbf51cb3314643d SHA512 18a7ccbc9a665c1293dc17dccf3253fc4cad4449fc774242b773360eacb4eceb3440cd0dedbf4dfca51b40c5b2759bdd8b524cfba38339aff2460967ef8f0aa3 WHIRLPOOL 4f7ab6b1897d78b4a67c1ae5a1fce1c0d657454d6174fd738dbf8f0ecf77a5e137b6d263be0a8feb6b65db7b7f6ba7d0f601d719e6edb0e68850bf9662b39cb9
diff --git a/media-libs/ffmpegsource/ffmpegsource-2.17.ebuild b/media-libs/ffmpegsource/ffmpegsource-2.17.ebuild
new file mode 100644
index 000000000000..c1613d6a7583
--- /dev/null
+++ b/media-libs/ffmpegsource/ffmpegsource-2.17.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+AUTOTOOLS_AUTORECONF=1
+
+inherit autotools-utils
+
+MY_P="ffms-${PV}-src"
+DESCRIPTION="An FFmpeg based source library for easy frame accurate access"
+HOMEPAGE="https://code.google.com/p/ffmpegsource/"
+SRC_URI="https://ffmpegsource.googlecode.com/files/${MY_P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="static-libs"
+
+RDEPEND="
+ sys-libs/zlib
+ >=virtual/ffmpeg-0.9
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=( "${FILESDIR}/${P}-ffmpeg.patch" )
+
+src_configure() {
+ local myeconfargs=(
+ --docdir="${EPREFIX}/usr/share/doc/${PF}/html"
+ )
+
+ autotools-utils_src_configure
+}
diff --git a/media-libs/ffmpegsource/ffmpegsource-2.19.1.ebuild b/media-libs/ffmpegsource/ffmpegsource-2.19.1.ebuild
new file mode 100644
index 000000000000..5ada34310bf6
--- /dev/null
+++ b/media-libs/ffmpegsource/ffmpegsource-2.19.1.ebuild
@@ -0,0 +1,28 @@
+# 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
+
+DESCRIPTION="A libav/ffmpeg based source library for easy frame accurate access"
+HOMEPAGE="https://github.com/FFMS/ffms2"
+SRC_URI="https://github.com/FFMS/ffms2/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0/3"
+KEYWORDS="amd64 x86"
+IUSE="libav static-libs"
+
+RDEPEND="
+ sys-libs/zlib
+ libav? ( >=media-video/libav-9.17:0= )
+ !libav? ( >=media-video/ffmpeg-1.2.6-r1:0= )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+"
+S="${WORKDIR}/ffms2-${PV}"
diff --git a/media-libs/ffmpegsource/ffmpegsource-2.20.ebuild b/media-libs/ffmpegsource/ffmpegsource-2.20.ebuild
new file mode 100644
index 000000000000..0f3d877e9a98
--- /dev/null
+++ b/media-libs/ffmpegsource/ffmpegsource-2.20.ebuild
@@ -0,0 +1,28 @@
+# 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
+
+DESCRIPTION="A libav/ffmpeg based source library for easy frame accurate access"
+HOMEPAGE="https://github.com/FFMS/ffms2"
+SRC_URI="https://github.com/FFMS/ffms2/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0/3"
+KEYWORDS="~amd64 x86"
+IUSE="libav static-libs"
+
+RDEPEND="
+ sys-libs/zlib
+ libav? ( >=media-video/libav-9.17:0= )
+ !libav? ( >=media-video/ffmpeg-1.2.6-r1:0= )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+"
+S="${WORKDIR}/ffms2-${PV}"
diff --git a/media-libs/ffmpegsource/ffmpegsource-9999.ebuild b/media-libs/ffmpegsource/ffmpegsource-9999.ebuild
new file mode 100644
index 000000000000..5dedcdf8902c
--- /dev/null
+++ b/media-libs/ffmpegsource/ffmpegsource-9999.ebuild
@@ -0,0 +1,27 @@
+# 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 git-r3
+
+DESCRIPTION="A libav/ffmpeg based source library for easy frame accurate access"
+HOMEPAGE="https://github.com/FFMS/ffms2"
+EGIT_REPO_URI="https://github.com/FFMS/ffms2.git"
+
+LICENSE="MIT"
+SLOT="0/3"
+KEYWORDS=""
+IUSE="libav static-libs"
+
+RDEPEND="
+ sys-libs/zlib
+ libav? ( >=media-video/libav-9.17:0= )
+ !libav? ( >=media-video/ffmpeg-1.2.6-r1:0= )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+"
diff --git a/media-libs/ffmpegsource/files/ffmpegsource-2.17-ffmpeg.patch b/media-libs/ffmpegsource/files/ffmpegsource-2.17-ffmpeg.patch
new file mode 100644
index 000000000000..41c4fb5106e4
--- /dev/null
+++ b/media-libs/ffmpegsource/files/ffmpegsource-2.17-ffmpeg.patch
@@ -0,0 +1,102 @@
+https://bugs.gentoo.org/show_bug.cgi?id=417983
+Backported from upstream.
+
+Index: ffms-2.17-src/configure.in
+===================================================================
+--- ffms-2.17-src.orig/configure.in
++++ ffms-2.17-src/configure.in
+@@ -135,7 +135,7 @@ AC_DEFUN([TEST_LIBAV],
+ #include <libavcodec/avcodec.h>
+ #include <libswscale/swscale.h>
+ ]],[[
+- avcodec_init();
++ av_register_all();
+ swscale_version();
+ #ifdef FFMS_USE_FFMPEG_COMPAT
+ int bogus = CODEC_ID_G2M;
+Index: ffms-2.17-src/include/ffmscompat.h
+===================================================================
+--- ffms-2.17-src.orig/include/ffmscompat.h
++++ ffms-2.17-src/include/ffmscompat.h
+@@ -84,6 +84,14 @@
+ # else
+ # define FFMS_CALCULATE_DELAY (CodecContext->has_b_frames + (CodecContext->thread_count - 1))
+ # endif
++# if VERSION_CHECK(LIBAVCODEC_VERSION_INT, <, 54, 25, 0, 54, 51, 100)
++# define FFMS_ID(x) (CODEC_ID_##x)
++# define FFMS_CodecID CodecID
++# else
++# define FFMS_ID(x) (AV_CODEC_ID_##x)
++# define FFMS_CodecID AVCodecID
++# undef CodecID
++# endif
+ #endif
+
+ #ifdef LIBAVUTIL_VERSION_INT
+Index: ffms-2.17-src/src/core/codectype.cpp
+===================================================================
+--- ffms-2.17-src.orig/src/core/codectype.cpp
++++ ffms-2.17-src/src/core/codectype.cpp
+@@ -25,7 +25,7 @@
+
+ typedef struct CodecTags {
+ char str[20];
+- CodecID id;
++ FFMS_CodecID id;
+ } CodecTags;
+
+ static const CodecTags mkv_codec_tags[] = {
+@@ -92,7 +92,7 @@ static const CodecTags mkv_codec_tags[]
+ };
+
+ typedef struct AVCodecTag {
+- enum CodecID id;
++ enum FFMS_CodecID id;
+ unsigned int tag;
+ } AVCodecTag;
+
+@@ -400,7 +400,7 @@ const char *GetLAVCSampleFormatName(AVSa
+ }
+ }
+
+-CodecID MatroskaToFFCodecID(char *Codec, void *CodecPrivate, unsigned int FourCC, unsigned int BitsPerSample) {
++FFMS_CodecID MatroskaToFFCodecID(char *Codec, void *CodecPrivate, unsigned int FourCC, unsigned int BitsPerSample) {
+ /* Look up native codecs */
+ for(int i = 0; mkv_codec_tags[i].id != CODEC_ID_NONE; i++){
+ if(!strncmp(mkv_codec_tags[i].str, Codec,
+@@ -408,7 +408,7 @@ CodecID MatroskaToFFCodecID(char *Codec,
+
+ // Uncompressed and exotic format fixup
+ // This list is incomplete
+- CodecID CID = mkv_codec_tags[i].id;
++ FFMS_CodecID CID = mkv_codec_tags[i].id;
+ switch (CID) {
+ case CODEC_ID_PCM_S16LE:
+ switch (BitsPerSample) {
+Index: ffms-2.17-src/src/core/codectype.h
+===================================================================
+--- ffms-2.17-src.orig/src/core/codectype.h
++++ ffms-2.17-src/src/core/codectype.h
+@@ -27,5 +27,5 @@ extern "C" {
+ #include "ffmscompat.h"
+
+ FFMS_TrackType HaaliTrackTypeToFFTrackType(int TT);
+-CodecID MatroskaToFFCodecID(char *Codec, void *CodecPrivate, unsigned int FourCC = 0, unsigned int BitsPerSample = 0);
++FFMS_CodecID MatroskaToFFCodecID(char *Codec, void *CodecPrivate, unsigned int FourCC = 0, unsigned int BitsPerSample = 0);
+ const char *GetLAVCSampleFormatName(AVSampleFormat s);
+Index: ffms-2.17-src/src/core/matroskaparser.h
+===================================================================
+--- ffms-2.17-src.orig/src/core/matroskaparser.h
++++ ffms-2.17-src/src/core/matroskaparser.h
+@@ -32,6 +32,11 @@
+ #ifndef MATROSKA_PARSER_H
+ #define MATROSKA_PARSER_H
+
++/* Make sure we undefine CodecID, since libavcodec defines it as AVCodec ID */
++#ifdef CodecID
++#undef CodecID
++#endif
++
+ /* Random notes:
+ *
+ * The parser does not process frame data in any way and does not read it into
diff --git a/media-libs/ffmpegsource/metadata.xml b/media-libs/ffmpegsource/metadata.xml
new file mode 100644
index 000000000000..663a7d64ce9d
--- /dev/null
+++ b/media-libs/ffmpegsource/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>nikoli@gmx.us</email>
+ <name>Nikoli</name>
+ </maintainer>
+ <maintainer>
+ <email>maksbotan@gentoo.org</email>
+ <name>Maxim Koltsov</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">FFMS/ffms2</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/fidlib/Manifest b/media-libs/fidlib/Manifest
new file mode 100644
index 000000000000..39f06eb3a043
--- /dev/null
+++ b/media-libs/fidlib/Manifest
@@ -0,0 +1 @@
+DIST fidlib-0.9.10.tgz 87082 SHA256 14ab5d50798d6b24f6421a21813de533f7b62b78c46978bbd0f499f33c21733e SHA512 77600acd665407b4d786b406a4f20b2f6c30c74775f5777d5054420b80c74e5bfa316bf7bd90df1669c09cef0ff9b552a0338cd138bf7d9bcf1df7cbff9fea4b WHIRLPOOL c8613f29e8b67b9da6b424759ede6141bb844f3e6b65abc7d9d2cc3b3cff7fac3c5110f7f092ba68b24b47e258789e18a1baeb5ef253033c276808605d9199e2
diff --git a/media-libs/fidlib/fidlib-0.9.10-r1.ebuild b/media-libs/fidlib/fidlib-0.9.10-r1.ebuild
new file mode 100644
index 000000000000..a76d0f732617
--- /dev/null
+++ b/media-libs/fidlib/fidlib-0.9.10-r1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs flag-o-matic eutils multilib
+
+DESCRIPTION="Run-time filter design and execution library"
+HOMEPAGE="http://uazu.net/fidlib/"
+SRC_URI="http://uazu.net/fidlib/${P}.tgz"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+doecho() {
+ echo "$@"
+ "$@" || die
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-extern.patch
+
+ # Avoid ICE under gcc-4.6, fixed in 4.6.3
+ if [[ $(gcc-version) == "4.6" && $(gcc-micro-version) -le 2 ]] ; then
+ replace-flags -O? -O0
+ fi
+}
+
+src_compile() {
+ # build library
+ doecho $(tc-getCC) ${CFLAGS} -DT_LINUX ${LDFLAGS} -Wl,-soname,libfidlib.so.${PV:0:1} \
+ -fPIC -shared fidlib.c -lm -o libfidlib.so.${PV:0:1}
+
+ # build command-line tool
+ doecho $(tc-getCC) ${CFLAGS} ${LDFLAGS} firun.c -lm ./libfidlib.so.${PV:0:1} -o firun
+}
+
+src_install() {
+ dobin firun
+ dolib.so libfidlib.so.${PV:0:1}
+ dosym libfidlib.so.${PV:0:1} /usr/$(get_libdir)/libfidlib.so
+
+ insinto /usr/include/fidlib
+ doins fidlib.h
+
+ dodoc NEWS README fidlib.txt firun.txt
+}
diff --git a/media-libs/fidlib/fidlib-0.9.10.ebuild b/media-libs/fidlib/fidlib-0.9.10.ebuild
new file mode 100644
index 000000000000..7fdca895fb1f
--- /dev/null
+++ b/media-libs/fidlib/fidlib-0.9.10.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit toolchain-funcs flag-o-matic eutils multilib
+
+DESCRIPTION="Run-time filter design and execution library"
+HOMEPAGE="http://uazu.net/fidlib/"
+SRC_URI="http://uazu.net/fidlib/${P}.tgz"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+doecho() {
+ echo "$@"
+ "$@" || die
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-cpp-extern.patch
+
+ # Avoid ICE under gcc-4.6, fixed in 4.6.3
+ if [[ $(gcc-version) == "4.6" && $(gcc-micro-version) -le 2 ]] ; then
+ replace-flags -O? -O0
+ fi
+}
+
+src_compile() {
+ # build library
+ doecho $(tc-getCC) ${CFLAGS} -DT_LINUX ${LDFLAGS} -Wl,-soname,libfidlib.so.${PV:0:1} \
+ -fPIC -shared fidlib.c -lm -o libfidlib.so.${PV:0:1}
+
+ # build command-line tool
+ doecho $(tc-getCC) ${CFLAGS} ${LDFLAGS} firun.c -lm ./libfidlib.so.${PV:0:1} -o firun
+}
+
+src_install() {
+ dobin firun
+ dolib.so libfidlib.so.${PV:0:1}
+ dosym libfidlib.so.${PV:0:1} /usr/$(get_libdir)/libfidlib.so
+
+ insinto /usr/include/fidlib
+ doins fidlib.h
+
+ dodoc NEWS README fidlib.txt firun.txt
+}
diff --git a/media-libs/fidlib/files/fidlib-0.9.10-cpp-extern.patch b/media-libs/fidlib/files/fidlib-0.9.10-cpp-extern.patch
new file mode 100644
index 000000000000..221ec825f174
--- /dev/null
+++ b/media-libs/fidlib/files/fidlib-0.9.10-cpp-extern.patch
@@ -0,0 +1,21 @@
+--- fidlib-0.9.10/fidlib.h
++++ fidlib-0.9.10/fidlib.h
+@@ -2,6 +2,10 @@
+ // fidlib include file
+ //
+
++#ifdef __cplusplus
++extern "C" {
++#endif
++
+ typedef struct FidFilter FidFilter;
+ struct FidFilter {
+ short typ; // Type of filter element 'I' IIR, 'F' FIR, or 0 for end of list
+@@ -66,3 +70,7 @@
+ extern void fid_run_zapbuf(void *buf);
+ extern void fid_run_freebuf(void *runbuf);
+ extern void fid_run_free(void *run);
++
++#ifdef __cplusplus
++}
++#endif
diff --git a/media-libs/fidlib/files/fidlib-0.9.10-extern.patch b/media-libs/fidlib/files/fidlib-0.9.10-extern.patch
new file mode 100644
index 000000000000..0e819942907e
--- /dev/null
+++ b/media-libs/fidlib/files/fidlib-0.9.10-extern.patch
@@ -0,0 +1,26 @@
+--- fidlib-0.9.10/fidlib.h
++++ fidlib-0.9.10/fidlib.h
+@@ -2,6 +2,13 @@
+ // fidlib include file
+ //
+
++#ifndef __FIDLIB_H
++#define __FIDLIB_H
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
+ typedef struct FidFilter FidFilter;
+ struct FidFilter {
+ short typ; // Type of filter element 'I' IIR, 'F' FIR, or 0 for end of list
+@@ -66,3 +73,9 @@
+ extern void fid_run_zapbuf(void *buf);
+ extern void fid_run_freebuf(void *runbuf);
+ extern void fid_run_free(void *run);
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif /* __FIDLIB_H */
diff --git a/media-libs/fidlib/metadata.xml b/media-libs/fidlib/metadata.xml
new file mode 100644
index 000000000000..af0275e2998a
--- /dev/null
+++ b/media-libs/fidlib/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>proaudio</herd>
+</pkgmetadata>
diff --git a/media-libs/flac/Manifest b/media-libs/flac/Manifest
new file mode 100644
index 000000000000..50c1c0a19d87
--- /dev/null
+++ b/media-libs/flac/Manifest
@@ -0,0 +1 @@
+DIST flac-1.3.1.tar.xz 941848 SHA256 4773c0099dba767d963fd92143263be338c48702172e8754b9bc5103efe1c56c SHA512 923cd0ffe2155636febf2b4633791bc83370d57080461b97ebb69ea21a4b1be7c0ff376c7fc8ca3979af4714e761112114a24b49ff6c80228b58b929db6e96d5 WHIRLPOOL abda096c0c1392499a613cc99c917cd519a20936bb98390a466c971ee981385a0e249e80f0bdac27b1eb6566a3392c1a4cb6ff9a6695952f16127a0b290fa5d4
diff --git a/media-libs/flac/files/flac-1.3.0-asneeded.patch b/media-libs/flac/files/flac-1.3.0-asneeded.patch
new file mode 100644
index 000000000000..a38b3202500a
--- /dev/null
+++ b/media-libs/flac/files/flac-1.3.0-asneeded.patch
@@ -0,0 +1,21 @@
+--- flac-1.3.0/src/flac/Makefile.am
++++ flac-1.3.0/src/flac/Makefile.am
+@@ -51,7 +51,7 @@
+ $(top_builddir)/src/share/replaygain_analysis/libreplaygain_analysis.la \
+ $(top_builddir)/src/share/replaygain_synthesis/libreplaygain_synthesis.la \
+ $(top_builddir)/src/libFLAC/libFLAC.la \
+- @LIBICONV@ \
++ @LTLIBICONV@ \
+ -lm
+
+ CLEANFILES = flac.exe
+--- flac-1.3.0/src/metaflac/Makefile.am
++++ flac-1.3.0/src/metaflac/Makefile.am
+@@ -48,6 +48,6 @@
+ $(top_builddir)/src/share/getopt/libgetopt.la \
+ $(top_builddir)/src/share/utf8/libutf8.la \
+ $(top_builddir)/src/libFLAC/libFLAC.la \
+- @LIBICONV@
++ @LTLIBICONV@
+
+ CLEANFILES = metaflac.exe
diff --git a/media-libs/flac/files/flac-1.3.0-dontbuild-examples.patch b/media-libs/flac/files/flac-1.3.0-dontbuild-examples.patch
new file mode 100644
index 000000000000..5c25dd588f2b
--- /dev/null
+++ b/media-libs/flac/files/flac-1.3.0-dontbuild-examples.patch
@@ -0,0 +1,30 @@
+--- flac-1.3.0/configure.ac
++++ flac-1.3.0/configure.ac
+@@ -319,6 +319,12 @@
+ fi
+ AC_SUBST(OGG_PACKAGE)
+
++dnl Build examples?
++AC_ARG_ENABLE(examples,
++ AS_HELP_STRING([--disable-examples], [Don't build examples during make]),,
++ enable_examples="yes")
++AM_CONDITIONAL(EXAMPLES, [test "$enable_examples" = "yes"])
++
+ dnl check for i18n(internationalization); these are from libiconv/gettext
+ AM_ICONV
+ AM_LANGINFO_CODESET
+--- flac-1.3.0/Makefile.am
++++ flac-1.3.0/Makefile.am
+@@ -31,7 +31,11 @@
+
+ ACLOCAL_AMFLAGS = -I m4
+
+-SUBDIRS = doc include m4 man src examples test build objs
++SUBDIRS = doc include m4 man src test build objs
++
++if EXAMPLES
++SUBDIRS += examples
++endif
+
+ EXTRA_DIST = \
+ COPYING.FDL \
diff --git a/media-libs/flac/files/flac-1.3.0-dontbuild-tests.patch b/media-libs/flac/files/flac-1.3.0-dontbuild-tests.patch
new file mode 100644
index 000000000000..0915a5976609
--- /dev/null
+++ b/media-libs/flac/files/flac-1.3.0-dontbuild-tests.patch
@@ -0,0 +1,66 @@
+--- flac-1.3.0/src/test_grabbag/cuesheet/Makefile.am
++++ flac-1.3.0/src/test_grabbag/cuesheet/Makefile.am
+@@ -21,7 +21,7 @@
+ test_cuesheet.vcproj
+
+ AM_CPPFLAGS = -I$(top_builddir) -I$(srcdir)/include -I$(top_srcdir)/include
+-noinst_PROGRAMS = test_cuesheet
++check_PROGRAMS = test_cuesheet
+ test_cuesheet_SOURCES = \
+ main.c
+ test_cuesheet_LDADD = \
+--- flac-1.3.0/src/test_grabbag/picture/Makefile.am
++++ flac-1.3.0/src/test_grabbag/picture/Makefile.am
+@@ -21,7 +21,7 @@
+ test_picture.vcproj
+
+ AM_CPPFLAGS = -I$(top_builddir) -I$(srcdir)/include -I$(top_srcdir)/include
+-noinst_PROGRAMS = test_picture
++check_PROGRAMS = test_picture
+ test_picture_SOURCES = \
+ main.c
+
+--- flac-1.3.0/src/test_libFLAC/Makefile.am
++++ flac-1.3.0/src/test_libFLAC/Makefile.am
+@@ -22,7 +22,7 @@
+
+ AM_CPPFLAGS = -I$(top_builddir) -I$(srcdir)/include -I$(top_srcdir)/include -I$(top_srcdir)/src/libFLAC/include
+
+-noinst_PROGRAMS = test_libFLAC
++check_PROGRAMS = test_libFLAC
+
+ if OS_IS_WINDOWS
+ win_utf8_lib = $(top_builddir)/src/share/win_utf8_io/libwin_utf8_io.la
+--- flac-1.3.0/src/test_libFLAC++/Makefile.am
++++ flac-1.3.0/src/test_libFLAC++/Makefile.am
+@@ -21,7 +21,7 @@
+ test_libFLAC++.vcproj
+
+ AM_CPPFLAGS = -I$(top_builddir) -I$(srcdir)/include -I$(top_srcdir)/include
+-noinst_PROGRAMS = test_libFLAC++
++check_PROGRAMS = test_libFLAC++
+ test_libFLAC___LDADD = \
+ $(top_builddir)/src/share/grabbag/libgrabbag.la \
+ $(top_builddir)/src/share/replaygain_analysis/libreplaygain_analysis.la \
+--- flac-1.3.0/src/test_seeking/Makefile.am
++++ flac-1.3.0/src/test_seeking/Makefile.am
+@@ -24,7 +24,7 @@
+
+ AM_CPPFLAGS = -I$(top_builddir) -I$(srcdir)/include -I$(top_srcdir)/include
+
+-noinst_PROGRAMS = test_seeking
++check_PROGRAMS = test_seeking
+ test_seeking_LDADD = \
+ $(top_builddir)/src/libFLAC/libFLAC.la
+
+--- flac-1.3.0/src/test_streams/Makefile.am
++++ flac-1.3.0/src/test_streams/Makefile.am
+@@ -21,7 +21,7 @@
+ test_streams.vcproj
+
+ AM_CPPFLAGS = -I$(top_builddir) -I$(srcdir)/include -I$(top_srcdir)/include
+-noinst_PROGRAMS = test_streams
++check_PROGRAMS = test_streams
+ test_streams_SOURCES = \
+ main.c
+
diff --git a/media-libs/flac/files/flac-1.3.1-cflags.patch b/media-libs/flac/files/flac-1.3.1-cflags.patch
new file mode 100644
index 000000000000..758e7b31c13a
--- /dev/null
+++ b/media-libs/flac/files/flac-1.3.1-cflags.patch
@@ -0,0 +1,23 @@
+--- flac-1.3.1/configure.ac
++++ flac-1.3.1/configure.ac
+@@ -348,12 +348,8 @@
+
+ if test "x$debug" = xtrue; then
+ CPPFLAGS="-DDEBUG $CPPFLAGS"
+- CFLAGS=$(echo "$CFLAGS" | sed 's/-g//')
+- CFLAGS="-g $CFLAGS"
+ else
+ CPPFLAGS="-DNDEBUG $CPPFLAGS"
+- CFLAGS=$(echo "$CFLAGS" | sed 's/-O2//;s/-g//')
+- CFLAGS="-O3 -funroll-loops $CFLAGS"
+ fi
+
+ XIPH_GCC_VERSION
+@@ -363,7 +359,6 @@
+ CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wcast-align -Wshadow -Wwrite-strings -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder -Wsign-promo -Wundef -Wunreachable-code " # -Wcast-qual -Wbad-function-cast -Wwrite-strings -Woverloaded-virtual -Wmissing-declarations
+
+ XIPH_ADD_CFLAGS([-Wdeclaration-after-statement])
+- XIPH_ADD_CFLAGS([-D_FORTIFY_SOURCE=2])
+
+ AC_LANG_PUSH([C++])
+ XIPH_ADD_CXXFLAGS([-Weffc++])
diff --git a/media-libs/flac/flac-1.3.1-r1.ebuild b/media-libs/flac/flac-1.3.1-r1.ebuild
new file mode 100644
index 000000000000..79112a386a24
--- /dev/null
+++ b/media-libs/flac/flac-1.3.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
+AUTOTOOLS_AUTORECONF=1
+AUTOTOOLS_PRUNE_LIBTOOL_FILES=all
+
+inherit autotools-multilib
+
+DESCRIPTION="free lossless audio encoder and decoder"
+HOMEPAGE="http://flac.sourceforge.net"
+SRC_URI="http://downloads.xiph.org/releases/${PN}/${P}.tar.xz"
+
+LICENSE="BSD FDL-1.2 GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="altivec +cxx debug ogg cpu_flags_x86_sse static-libs"
+
+RDEPEND="ogg? ( >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-soundlibs-20130224-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
+ )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ abi_x86_32? ( dev-lang/nasm )
+ !elibc_uclibc? ( sys-devel/gettext )
+ virtual/pkgconfig"
+
+src_prepare() {
+ local PATCHES=(
+ "${FILESDIR}"/${P}-cflags.patch
+ "${FILESDIR}"/${PN}-1.3.0-asneeded.patch
+ "${FILESDIR}"/${PN}-1.3.0-dontbuild-tests.patch
+ "${FILESDIR}"/${PN}-1.3.0-dontbuild-examples.patch
+ )
+
+ AT_M4DIR="m4" autotools-multilib_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable debug)
+ $(use_enable cpu_flags_x86_sse sse)
+ $(use_enable altivec)
+ --disable-doxygen-docs
+ --disable-xmms-plugin
+ $(use_enable cxx cpplibs)
+ $(use_enable ogg)
+ --disable-examples
+ $([[ ${CHOST} == *-darwin* ]] && echo "--disable-asm-optimizations")
+
+ # cross-compile fix (bug #521446)
+ # no effect if ogg support is disabled
+ --with-ogg
+ )
+ autotools-multilib_src_configure
+}
+
+src_test() {
+ if [[ ${UID} != 0 ]]; then
+ autotools-multilib_src_test -j1
+ else
+ ewarn "Tests will fail if ran as root, skipping."
+ fi
+}
+
+src_install() {
+ autotools-multilib_src_install \
+ docdir="${EPREFIX}"/usr/share/doc/${PF}/html
+}
diff --git a/media-libs/flac/metadata.xml b/media-libs/flac/metadata.xml
new file mode 100644
index 000000000000..e1774e3d9ad7
--- /dev/null
+++ b/media-libs/flac/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>sound</herd>
+</pkgmetadata>
diff --git a/media-libs/flickcurl/Manifest b/media-libs/flickcurl/Manifest
new file mode 100644
index 000000000000..ebf023235b2e
--- /dev/null
+++ b/media-libs/flickcurl/Manifest
@@ -0,0 +1,3 @@
+DIST flickcurl-1.24.tar.gz 1852406 SHA256 61f1a908ae2342490218dd9b435fc408bc5d22ce5f046c7cf9f742cab68502a8 SHA512 6749ca59b21f5919f817edee37a89e4996493f4ad4165d6131d267b0de282202a8e531f7350b19f54c83ca97c730baab94b9cf144f076ab19a04705062b229cd WHIRLPOOL 59d0d7076d9216aa92bacd5da0fda18e906f6f526060f578600e758f2c0cd417d3fa64a26dfdb2cbea0c37a9a5c0d8bbeabb236968c1df2c45f15a0e565f9244
+DIST flickcurl-1.25.tar.gz 1856658 SHA256 4ce95b659da2ea790b7244baa441d59eef1db794778491f6d709b784517d560b SHA512 51a449f52ba780cf6dd914e249012e338865af3a10a63c1c1efd611d0064acd117f9e8a8cc63edba93c3ce81b52c1c5586df52079644dc717be591542ad9dd7f WHIRLPOOL b8e8a4037a556fa8561618f2582ed35eae4d20a31603363d765c52bb4f08de6dff9dfef9c5845c290e29fd70a2aeacad5d1b858b31e037d632c2c9414bb3ed44
+DIST flickcurl-1.26.tar.gz 1870073 SHA256 ff42a36c7c1c7d368246f6bc9b7d792ed298348e5f0f5d432e49f6803562f5a3 SHA512 5ffdef58e67cbf99da2e8eefad57e845627703d5b22c85d5635557cd2df53e47e74d8e3387523495708c5cc8952c290da5c4d5f1e86bd482312fc7e46e9af6cd WHIRLPOOL 3bf5557eccdaca91077a13e01ea6cb3bbc068427b143a2eadfc0aa536e5945e2d0bd636ff4ae4d27ea23dbb8fd8614049dd48f2a7f9c7fa595125c1b0af4ca61
diff --git a/media-libs/flickcurl/flickcurl-1.24.ebuild b/media-libs/flickcurl/flickcurl-1.24.ebuild
new file mode 100644
index 000000000000..830b7a581c0a
--- /dev/null
+++ b/media-libs/flickcurl/flickcurl-1.24.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 autotools eutils
+
+DESCRIPTION="C library for the Flickr API"
+HOMEPAGE="http://librdf.org/flickcurl/"
+SRC_URI="http://download.dajobe.org/flickcurl/${P}.tar.gz"
+
+LICENSE="|| ( LGPL-2.1 GPL-2 Apache-2.0 )"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="doc raptor static-libs"
+
+RDEPEND=">=net-misc/curl-7.10.0
+ >=dev-libs/libxml2-2.6.8:2
+ raptor? ( media-libs/raptor:2 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ if ! use doc ; then
+ # Only install html documentation when the use flag is enabled
+ sed -e '/gtk-doc.make/d' \
+ -e 's:+=:=:' \
+ -i docs/Makefile.am || die
+ fi
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_with raptor) \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ emake DESTDIR="${D}" TARGET_DIR=/usr/share/doc/${PF}/html install
+ dodoc AUTHORS ChangeLog NEWS README
+ prune_libtool_files
+}
diff --git a/media-libs/flickcurl/flickcurl-1.25.ebuild b/media-libs/flickcurl/flickcurl-1.25.ebuild
new file mode 100644
index 000000000000..95c94f889882
--- /dev/null
+++ b/media-libs/flickcurl/flickcurl-1.25.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 autotools eutils
+
+DESCRIPTION="C library for the Flickr API"
+HOMEPAGE="http://librdf.org/flickcurl/"
+SRC_URI="http://download.dajobe.org/flickcurl/${P}.tar.gz"
+
+LICENSE="|| ( LGPL-2.1 GPL-2 Apache-2.0 )"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc raptor static-libs"
+
+RDEPEND=">=net-misc/curl-7.10.0
+ >=dev-libs/libxml2-2.6.8:2
+ raptor? ( media-libs/raptor:2 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ if ! use doc ; then
+ # Only install html documentation when the use flag is enabled
+ sed -e '/gtk-doc.make/d' \
+ -e 's:+=:=:' \
+ -i docs/Makefile.am || die
+ fi
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_with raptor) \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ emake DESTDIR="${D}" TARGET_DIR=/usr/share/doc/${PF}/html install
+ dodoc AUTHORS ChangeLog NEWS README
+ prune_libtool_files
+}
diff --git a/media-libs/flickcurl/flickcurl-1.26.ebuild b/media-libs/flickcurl/flickcurl-1.26.ebuild
new file mode 100644
index 000000000000..779af1c9578e
--- /dev/null
+++ b/media-libs/flickcurl/flickcurl-1.26.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit autotools eutils
+
+DESCRIPTION="C library for the Flickr API"
+HOMEPAGE="http://librdf.org/flickcurl/"
+SRC_URI="http://download.dajobe.org/flickcurl/${P}.tar.gz"
+
+LICENSE="|| ( LGPL-2.1 GPL-2 Apache-2.0 )"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="doc raptor static-libs"
+
+RDEPEND=">=net-misc/curl-7.10.0
+ >=dev-libs/libxml2-2.6.8:2
+ raptor? ( media-libs/raptor:2 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ if ! use doc ; then
+ # Only install html documentation when the use flag is enabled
+ sed -e '/gtk-doc.make/d' \
+ -e 's:+=:=:' \
+ -i docs/Makefile.am || die
+ fi
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_with raptor) \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ emake DESTDIR="${D}" TARGET_DIR=/usr/share/doc/${PF}/html install
+ dodoc AUTHORS ChangeLog NEWS README
+ prune_libtool_files
+}
diff --git a/media-libs/flickcurl/metadata.xml b/media-libs/flickcurl/metadata.xml
new file mode 100644
index 000000000000..bbe3ae036794
--- /dev/null
+++ b/media-libs/flickcurl/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>graphics</herd>
+ <use>
+ <flag name="raptor">Use <pkg>media-libs/raptor</pkg> for proper RDF serializing</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/fluidsynth-dssi/Manifest b/media-libs/fluidsynth-dssi/Manifest
new file mode 100644
index 000000000000..48cbe27612cd
--- /dev/null
+++ b/media-libs/fluidsynth-dssi/Manifest
@@ -0,0 +1 @@
+DIST fluidsynth-dssi-1.0.0.tar.gz 325047 SHA256 e734d06d7e6d056a58c611a62e80b7cc6306b810137d9a19e260612e942fe049
diff --git a/media-libs/fluidsynth-dssi/fluidsynth-dssi-1.0.0.ebuild b/media-libs/fluidsynth-dssi/fluidsynth-dssi-1.0.0.ebuild
new file mode 100644
index 000000000000..2122aaa5c66d
--- /dev/null
+++ b/media-libs/fluidsynth-dssi/fluidsynth-dssi-1.0.0.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+DESCRIPTION="DSSI Soft Synth Interface"
+HOMEPAGE="http://dssi.sourceforge.net/"
+SRC_URI="mirror://sourceforge/dssi/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE=""
+
+RDEPEND=">=media-libs/dssi-0.9.0
+ x11-libs/gtk+:2
+ >=media-libs/liblo-0.12
+ >=media-sound/fluidsynth-1.0.3"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc ChangeLog README TODO
+}
diff --git a/media-libs/fluidsynth-dssi/metadata.xml b/media-libs/fluidsynth-dssi/metadata.xml
new file mode 100644
index 000000000000..8fd4eb63c1fb
--- /dev/null
+++ b/media-libs/fluidsynth-dssi/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>proaudio</herd>
+ <upstream>
+ <remote-id type="sourceforge">dssi</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/fmod/Manifest b/media-libs/fmod/Manifest
new file mode 100644
index 000000000000..34f6cea7add8
--- /dev/null
+++ b/media-libs/fmod/Manifest
@@ -0,0 +1,5 @@
+DIST fmodapi375linux.tar.gz 929710 SHA256 7ad978a44368ea41fcfd257da18466cc7df7cab2c3fbc16514943a4bb6dc875a
+DIST fmodapi43800linux.tar.gz 21990250 SHA256 1edf6a4a7782e093cd509b340c7e05ac9b50b37a9d56b792990232a13aa0ec56
+DIST fmodapi43800linux64.tar.gz 22276575 SHA256 9981cb1e146e4dc93d469dce061e15ef82fa1c94c425bdab683232bfa6a2160e
+DIST fmodapi43802linux.tar.gz 21992247 SHA256 9ef7eb3e277a53a69ea31206223fd27f01e236869568f83bfac97dbd9982a4fd
+DIST fmodapi43802linux64.tar.gz 22282269 SHA256 55e52603d2d53cd43467e086ea292928d66c741956c98266fd312a7936f1ba42
diff --git a/media-libs/fmod/fmod-3.75.ebuild b/media-libs/fmod/fmod-3.75.ebuild
new file mode 100644
index 000000000000..72872cd313af
--- /dev/null
+++ b/media-libs/fmod/fmod-3.75.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+MY_P="fmodapi${PV/.}linux"
+S=${WORKDIR}/${MY_P}
+DESCRIPTION="music and sound effects library, and a sound processing system"
+HOMEPAGE="http://www.fmod.org/"
+SRC_URI="http://www.fmod.org/files/${MY_P}.tar.gz"
+
+LICENSE="BSD fmod-3.75" # BSD is for OggVorbis from README.txt
+SLOT="0"
+KEYWORDS="-* x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+RESTRICT="strip"
+
+src_install() {
+ dolib api/libfmod-${PV}.so
+ dosym /usr/lib/libfmod-${PV}.so /usr/lib/libfmod.so
+
+ insinto /usr/include
+ doins api/inc/*
+
+ insinto /usr/share/${PN}/media
+ doins media/* || die "doins failed"
+ cp -r samples "${D}/usr/share/${PN}/" || die "cp failed"
+
+ dohtml -r documentation/*
+ dodoc README.TXT documentation/Revision.txt
+}
diff --git a/media-libs/fmod/fmod-4.38.00.ebuild b/media-libs/fmod/fmod-4.38.00.ebuild
new file mode 100644
index 000000000000..d36dad7272f4
--- /dev/null
+++ b/media-libs/fmod/fmod-4.38.00.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit versionator
+
+MY_P=fmodapi$(delete_all_version_separators)linux
+
+DESCRIPTION="music and sound effects library, and a sound processing system"
+HOMEPAGE="http://www.fmod.org"
+SRC_URI="x86? ( http://www.fmod.org/index.php/release/version/${MY_P}.tar.gz )
+ amd64? ( http://www.fmod.org/index.php/release/version/${MY_P}64.tar.gz )"
+
+LICENSE="BSD BSD-2 fmod"
+SLOT="1"
+KEYWORDS="amd64 x86"
+IUSE="examples"
+
+RESTRICT="strip test"
+
+QA_FLAGS_IGNORED="opt/fmodex/tools/fsbanklib/.*"
+
+QA_TEXTRELS="opt/fmodex/fmoddesignerapi/api/lib/*
+opt/fmodex/api/lib/*"
+
+src_compile() { :; }
+src_install() {
+ dodir /opt/fmodex
+
+ local fbits=""
+ use amd64 && fbits="64"
+
+ local fsource="${WORKDIR}/${MY_P}${fbits}"
+
+ cd "${fsource}"/api/lib
+
+ cp -f libfmodex${fbits}-${PV}.so libfmodex.so.${PV} || die
+ ln -sf libfmodex.so.${PV} libfmodex.so || die
+ ln -sf libfmodex.so.${PV} libfmodex.so.4 || die
+
+ cp -f libfmodexL${fbits}-${PV}.so libfmodexL.so.${PV} || die
+ ln -sf libfmodexL.so.${PV} libfmodexL.so || die
+ ln -sf libfmodexL.so.${PV} libfmodexL.so.4 || die
+
+ cp -dpR "${fsource}"/* "${D}"/opt/fmodex || die
+
+ dosym /opt/fmodex/api/inc /usr/include/fmodex || die
+
+ use examples || rm -rf "${D}"/opt/fmodex/{,fmoddesignerapi}/examples
+
+ insinto /usr/share/doc/${PF}/pdf
+ doins "${fsource}"/documentation/*.pdf
+ dodoc "${fsource}"/{documentation/*.txt,fmoddesignerapi/*.TXT}
+ rm -rf "${D}"/opt/fmodex/{documentation,fmoddesignerapi/*.TXT}
+
+ echo LDPATH="/opt/fmodex/api/lib" > "${T}"/65fmodex
+ doenvd "${T}"/65fmodex
+}
diff --git a/media-libs/fmod/fmod-4.38.02.ebuild b/media-libs/fmod/fmod-4.38.02.ebuild
new file mode 100644
index 000000000000..1c84c8d6084d
--- /dev/null
+++ b/media-libs/fmod/fmod-4.38.02.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit versionator
+
+MY_P=fmodapi$(delete_all_version_separators)linux
+
+DESCRIPTION="music and sound effects library, and a sound processing system"
+HOMEPAGE="http://www.fmod.org"
+SRC_URI="x86? ( http://www.fmod.org/index.php/release/version/${MY_P}.tar.gz )
+ amd64? ( http://www.fmod.org/index.php/release/version/${MY_P}64.tar.gz )"
+
+LICENSE="BSD BSD-2 fmod"
+SLOT="1"
+KEYWORDS="~amd64 ~x86"
+IUSE="examples"
+
+RESTRICT="strip test"
+
+QA_FLAGS_IGNORED="opt/fmodex/tools/fsbanklib/.*"
+
+QA_TEXTRELS="opt/fmodex/fmoddesignerapi/api/lib/*
+opt/fmodex/api/lib/*"
+
+src_compile() { :; }
+src_install() {
+ dodir /opt/fmodex
+
+ local fbits=""
+ use amd64 && fbits="64"
+
+ local fsource="${WORKDIR}/${MY_P}${fbits}"
+
+ cd "${fsource}"/api/lib
+
+ cp -f libfmodex${fbits}-${PV}.so libfmodex.so.${PV} || die
+ ln -sf libfmodex.so.${PV} libfmodex.so || die
+ ln -sf libfmodex.so.${PV} libfmodex.so.4 || die
+
+ cp -f libfmodexL${fbits}-${PV}.so libfmodexL.so.${PV} || die
+ ln -sf libfmodexL.so.${PV} libfmodexL.so || die
+ ln -sf libfmodexL.so.${PV} libfmodexL.so.4 || die
+
+ cp -dpR "${fsource}"/* "${D}"/opt/fmodex || die
+
+ dosym /opt/fmodex/api/inc /usr/include/fmodex || die
+
+ use examples || rm -rf "${D}"/opt/fmodex/{,fmoddesignerapi}/examples
+
+ insinto /usr/share/doc/${PF}/pdf
+ doins "${fsource}"/documentation/*.pdf
+ dodoc "${fsource}"/{documentation/*.txt,fmoddesignerapi/*.TXT}
+ rm -rf "${D}"/opt/fmodex/{documentation,fmoddesignerapi/*.TXT}
+
+ echo LDPATH="/opt/fmodex/api/lib" > "${T}"/65fmodex
+ doenvd "${T}"/65fmodex
+}
diff --git a/media-libs/fmod/metadata.xml b/media-libs/fmod/metadata.xml
new file mode 100644
index 000000000000..e1774e3d9ad7
--- /dev/null
+++ b/media-libs/fmod/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>sound</herd>
+</pkgmetadata>
diff --git a/media-libs/fnlib/Manifest b/media-libs/fnlib/Manifest
new file mode 100644
index 000000000000..e9828b529ab6
--- /dev/null
+++ b/media-libs/fnlib/Manifest
@@ -0,0 +1 @@
+DIST fnlib-0.5.tar.gz 431588 SHA256 59285083a8f14a8dac249aa13381bcdcf24edd8b54b0b88983d10a3192a55a94
diff --git a/media-libs/fnlib/fnlib-0.5-r2.ebuild b/media-libs/fnlib/fnlib-0.5-r2.ebuild
new file mode 100644
index 000000000000..f1a162ea0eba
--- /dev/null
+++ b/media-libs/fnlib/fnlib-0.5-r2.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit autotools
+
+DESCRIPTION="Font Library for enlightenment"
+HOMEPAGE="http://www.enlightenment.org/"
+SRC_URI="mirror://sourceforge/enlightenment/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ia64 ppc sparc x86"
+IUSE=""
+
+DEPEND="media-libs/imlib"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ eautoreconf
+}
+
+src_configure() {
+ econf --sysconfdir=/etc/fnlib
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS ChangeLog HACKING NEWS README
+ dodoc doc/fontinfo.README
+}
diff --git a/media-libs/fnlib/metadata.xml b/media-libs/fnlib/metadata.xml
new file mode 100644
index 000000000000..1ca0b12c411e
--- /dev/null
+++ b/media-libs/fnlib/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">enlightenment</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/fontconfig-infinality/Manifest b/media-libs/fontconfig-infinality/Manifest
new file mode 100644
index 000000000000..ed261c19747a
--- /dev/null
+++ b/media-libs/fontconfig-infinality/Manifest
@@ -0,0 +1,4 @@
+DIST fontconfig-infinality-20120619.tar.xz 18956 SHA256 56563ea3200fa9c9b0a269260115e93bb4a635cef073655bef8dbe541031cac6 SHA512 2b20dd6c459572d8864459c32b9a50cfa3757df9fbdab75528772be81dbe7de31d2e997c4047083270769ee80d5e110ca43a9bddaf8c771f70e4181cab7cfb56 WHIRLPOOL 9fb51dbd24e118b276a0e7688a5d8d1f3db4952a399ef076db62531bb13f48c5b7484f3664c0d8de6fc809ad37b76275a95124bea366d3a6bd4e847b5f354d2e
+DIST fontconfig-infinality-20130404.tar.xz 23344 SHA256 0704f593f2645866a831d54e1d81830129543f4d2600d0f658ae4bfd1ee48230 SHA512 742206795523509a7d195f194394ef3f67a9022b46f194ea369f7388c0c59842d29573fd2719f616dcc2378a4b527b93cdd3cf787b7a1728c875c7e1aa5a5417 WHIRLPOOL f59e6e8704af380226fb9f352048aca6e99e7b299815054975d1568c3f272ee0a6d4efda8f0278b5a512ac045bfbc335854b7063873b7478ac0ba5206b74ef5c
+DIST fontconfig-nyx-1.tar.xz 1344 SHA256 17b51546e95c5062789d9359b38a41bab9a40ab48889247c7baf340bba2441d5 SHA512 d4959b0e81f9dc3529f5ee043dd5e0c45dc66848f4685daa1ef02aa8a40ed8e229f1da3f20a1ff9e315b15daddf9fb37c6ec1396eb9965fdbe3faf22c1cc70c8 WHIRLPOOL 7eeb7c1ad460cd08b682b1da167df842daefcbde0eb759ccbb774f3b9c6d9f6454af7046d4301f0afcb51ac8cc94d97d69b985c94628b94a626457658815b4d6
+DIST fontconfig-nyx-2.tar.xz 1376 SHA256 2381a784be2b6ca28aa74b1d67295c78a9b644fe0efa9eafd3d1f264f6b7b523 SHA512 7863c41f67b02a37d9d3b438bcd1d6ece2bf42310ea61090f4d6384e22893a4ffbb2f7bc349511f40ba4570784f14e5656506de6b7e60f6da9c9eaba252beb1d WHIRLPOOL 7f12f503f65c7b3e71b8ca12f4387bd3e28c7ff9da6169269ca30ee6921e169c3d22081adbdab3390d5e45c65c437f3aa57ad03b7a26a23c7f25e69322f5fb97
diff --git a/media-libs/fontconfig-infinality/files/Xresources b/media-libs/fontconfig-infinality/files/Xresources
new file mode 100644
index 000000000000..c65472e24001
--- /dev/null
+++ b/media-libs/fontconfig-infinality/files/Xresources
@@ -0,0 +1,9 @@
+! basic settings for infinality
+
+Xft.antialias: 1
+Xft.autohint: 0
+Xft.dpi: 96
+Xft.hinting: 1
+Xft.hintstyle: hintfull
+Xft.lcdfilter: lcddefault
+Xft.rgba: rgb
diff --git a/media-libs/fontconfig-infinality/fontconfig-infinality-20120619.ebuild b/media-libs/fontconfig-infinality/fontconfig-infinality-20120619.ebuild
new file mode 100644
index 000000000000..8b077192ee51
--- /dev/null
+++ b/media-libs/fontconfig-infinality/fontconfig-infinality-20120619.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+DESCRIPTION="Configuration to be used in conjunction with the freetype-infinality subpixel hinting"
+HOMEPAGE="http://www.infinality.net/blog/infinality-freetype-patches/"
+SRC_URI="http://dev.gentoo.org/~yngwin/distfiles/${P}.tar.xz
+ nyx? ( http://dev.gentoo.org/~yngwin/distfiles/fontconfig-nyx-1.tar.xz )"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="+nyx"
+
+DEPEND=""
+RDEPEND="app-eselect/eselect-fontconfig
+ app-eselect/eselect-infinality
+ app-eselect/eselect-lcdfilter
+ >=x11-libs/libXft-2.3.0
+ nyx? ( media-fonts/croscorefonts )"
+PDEPEND="media-libs/freetype:2[infinality]"
+
+src_configure() {
+ :
+}
+
+src_compile() {
+ :
+}
+
+src_install() {
+ dodoc infinality/{CHANGELOG,CHANGELOG.pre_git,README}
+
+ insinto /etc/fonts/conf.avail
+ doins conf.avail/52-infinality.conf
+
+ insinto /etc/fonts/infinality
+ doins -r infinality/{conf.src,styles.conf.avail,infinality.conf}
+
+ insinto /etc/X11/
+ doins "${FILESDIR}"/Xresources
+
+ if use nyx ; then
+ insinto /etc/fonts/infinality/styles.conf.avail
+ doins -r "${WORKDIR}"/nyx
+ fi
+}
+
+pkg_postinst() {
+ elog "Use eselect fontconfig enable 52-infinality.conf"
+ elog "to enable the configuration"
+ elog "Then use eselect infinality to set your fontconfig style"
+ elog "and eselect lcdfilter to set freetype variables"
+}
diff --git a/media-libs/fontconfig-infinality/fontconfig-infinality-20130404.ebuild b/media-libs/fontconfig-infinality/fontconfig-infinality-20130404.ebuild
new file mode 100644
index 000000000000..dd3bf9de7e32
--- /dev/null
+++ b/media-libs/fontconfig-infinality/fontconfig-infinality-20130404.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 readme.gentoo
+
+DESCRIPTION="Configuration to be used in conjunction with the freetype-infinality subpixel hinting"
+HOMEPAGE="http://www.infinality.net/blog/infinality-freetype-patches/"
+SRC_URI="http://dev.gentoo.org/~yngwin/distfiles/${P}.tar.xz
+ nyx? ( http://dev.gentoo.org/~yngwin/distfiles/fontconfig-nyx-2.tar.xz )"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="+nyx"
+
+DEPEND=""
+RDEPEND="app-eselect/eselect-fontconfig
+ app-eselect/eselect-infinality
+ app-eselect/eselect-lcdfilter"
+PDEPEND="media-libs/freetype:2[infinality]
+ >=x11-libs/libXft-2.3.0
+ nyx? ( media-fonts/croscorefonts )"
+
+src_configure() {
+ :
+}
+
+src_compile() {
+ :
+}
+
+src_install() {
+ DOC_CONTENTS="Use eselect fontconfig enable 52-infinality.conf to enable the
+ configuration. Then use eselect infinality to set your fontconfig style and
+ eselect lcdfilter to set freetype variables. If you run into trouble with
+ applications not being able to find Type-1 fonts, then comment out the
+ relevant lines in ${EPREFIX}/etc/fonts/infinality/infinality.conf"
+
+ dodoc infinality/{CHANGELOG,CHANGELOG.pre_git,README}
+ readme.gentoo_create_doc
+
+ insinto /etc/fonts/conf.avail
+ doins conf.avail/52-infinality.conf
+
+ insinto /etc/fonts/infinality
+ doins -r infinality/{conf.src,styles.conf.avail,infinality.conf}
+
+ insinto /etc/X11/
+ doins "${FILESDIR}"/Xresources
+
+ if use nyx ; then
+ insinto /etc/fonts/infinality/styles.conf.avail
+ doins -r "${WORKDIR}"/nyx
+ fi
+}
diff --git a/media-libs/fontconfig-infinality/metadata.xml b/media-libs/fontconfig-infinality/metadata.xml
new file mode 100644
index 000000000000..3d5889849e10
--- /dev/null
+++ b/media-libs/fontconfig-infinality/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>yngwin@gentoo.org</email>
+ </maintainer>
+ <herd>fonts</herd>
+ <use>
+ <flag name="nyx">Additional style using croscorefonts</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/fontconfig-ultimate/Manifest b/media-libs/fontconfig-ultimate/Manifest
new file mode 100644
index 000000000000..c3372961ed0d
--- /dev/null
+++ b/media-libs/fontconfig-ultimate/Manifest
@@ -0,0 +1,2 @@
+DIST fontconfig-ultimate-2015.04.tar.gz 455899 SHA256 e3bc9dd9c145156bd7bfa8e70c2328f47be6873da31c319bc594a5819afb8732 SHA512 cdf11c298c9746c720dd6a4e1d361aa16244fdd46630fa00fea03d6d57956b6cee41b3ea439c84d81756a11d63768e4672851c9692a87944b6688a9763a06096 WHIRLPOOL 6847f41cb76d9da8b3b00143a7277b7be516390780ae92ef942aaa11d5ce785c555f8fe79d58200e684dbeb1b17735c215ba886db429c56750251c58abce294a
+DIST fontconfig-ultimate-2015.08.01.tar.gz 1241997 SHA256 19b3eac37f589a651e90507680c80e19bcb2ed4e3e6c63da7ca3c6e22bb209e9 SHA512 2c1e8c522c94f6db45c63cde610bd2abf95ae913241ebda275d40cda0c0b62a489047749eaefa78fcf25d802ebad442f32f2bbf5629d4fa8ee0c6dbc9f105de9 WHIRLPOOL f26910fc2bebf15cb86376ee7b690a46c2d2f6f915f410307e9e9c20155a2bdbf5b8e2d63cafb371e44e63058f41ed93b5c8b09b36feb740970cb468644e18eb
diff --git a/media-libs/fontconfig-ultimate/fontconfig-ultimate-2015.04.ebuild b/media-libs/fontconfig-ultimate/fontconfig-ultimate-2015.04.ebuild
new file mode 100644
index 000000000000..0dcc2054e22a
--- /dev/null
+++ b/media-libs/fontconfig-ultimate/fontconfig-ultimate-2015.04.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit readme.gentoo versionator
+
+MY_PV=$(replace_all_version_separators "-")
+DESCRIPTION="A set of font rendering and replacement rules for fontconfig-infinality"
+HOMEPAGE="http://bohoomil.com/"
+SRC_URI="https://github.com/bohoomil/${PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="app-eselect/eselect-infinality
+ app-eselect/eselect-lcdfilter
+ media-libs/fontconfig-infinality
+ media-libs/freetype:2[infinality]"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${PN}-${MY_PV}
+
+DISABLE_AUTOFORMATTING="1"
+DOC_CONTENTS="1. Disable all rules but 52-infinality.conf using eselect fontconfig
+2. Enable one of the \"ultimate\" presets using eselect infinality
+3. Select ultimate lcdfilter settings using eselect lcdfilter"
+
+BLACKLIST="43-wqy-zenhei-sharp.conf"
+
+src_prepare() {
+ pushd fontconfig_patches/fonts-settings || die
+ rm ${BLACKLIST} || die
+ popd
+
+ # Generate lcdfilter config
+ echo -e "################# FONTCONFIG ULTIMATE STYLE #################\n" \
+ > "${T}"/ultimate || die
+
+ local infinality_style
+ infinality_style=$(sed --quiet \
+ -e 's/^USE_STYLE="*\([1-9]\)"*/\1/p' \
+ freetype/infinality-settings.sh) || die
+
+ if ! [ -n "$infinality_style" ]; then
+ ewarn "Missing USE_STYLE variable in package source."
+ infinality_style=1
+ fi
+
+ sed --quiet \
+ -e '/INFINALITY_FT_FILTER_PARAMS=/p' \
+ freetype/infinality-settings.sh \
+ | sed --quiet \
+ -e "${infinality_style} s/[ \t]*export[ \t]*//p" \
+ >> "${T}"/ultimate
+ assert
+
+ sed --quiet \
+ -e '/INFINALITY_FT_FILTER_PARAMS/ d' \
+ -e 's/^[ \t]*export[ \t]*INFINALITY_FT/INFINALITY_FT/p' \
+ freetype/infinality-settings.sh \
+ >> "${T}"/ultimate || die
+}
+
+src_install() {
+ insinto /etc/fonts/infinality/conf.src.ultimate
+ doins conf.d.infinality/*.conf
+ doins fontconfig_patches/{ms,free,combi}/*.conf
+
+ # Cut a list of default .conf files out of Makefile.am
+ local default_configs config fonts_settings
+ default_configs=$(sed --quiet \
+ -e ':again' \
+ -e '/\\$/ N' \
+ -e 's/\\\n/ /' \
+ -e 't again' \
+ -e 's/^CONF_LINKS =//p' \
+ conf.d.infinality/Makefile.am) || die
+
+ # Install per-font settings
+ pushd fontconfig_patches/fonts-settings || die
+ doins *.conf
+ fonts_settings=$(echo *.conf)
+ popd
+
+ # Install font presets
+ pushd fontconfig_patches/ms || die
+ for config in ${default_configs} ${fonts_settings} *.conf; do
+ dosym ../../conf.src.ultimate/"${config}" \
+ /etc/fonts/infinality/styles.conf.avail/ultimate-ms/"${config}"
+ done
+ popd
+ pushd fontconfig_patches/free || die
+ for config in ${default_configs} ${fonts_settings} *.conf; do
+ dosym ../../conf.src.ultimate/"${config}" \
+ /etc/fonts/infinality/styles.conf.avail/ultimate-free/"${config}"
+ done
+ popd
+ pushd fontconfig_patches/combi || die
+ for config in ${default_configs} ${fonts_settings} *.conf; do
+ dosym ../../conf.src.ultimate/"${config}" \
+ /etc/fonts/infinality/styles.conf.avail/ultimate-combi/"${config}"
+ done
+ popd
+
+ insinto /usr/share/eselect-lcdfilter/env.d
+ doins "${T}"/ultimate
+
+ readme.gentoo_create_doc
+}
diff --git a/media-libs/fontconfig-ultimate/fontconfig-ultimate-2015.08.01.ebuild b/media-libs/fontconfig-ultimate/fontconfig-ultimate-2015.08.01.ebuild
new file mode 100644
index 000000000000..0dcc2054e22a
--- /dev/null
+++ b/media-libs/fontconfig-ultimate/fontconfig-ultimate-2015.08.01.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit readme.gentoo versionator
+
+MY_PV=$(replace_all_version_separators "-")
+DESCRIPTION="A set of font rendering and replacement rules for fontconfig-infinality"
+HOMEPAGE="http://bohoomil.com/"
+SRC_URI="https://github.com/bohoomil/${PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="app-eselect/eselect-infinality
+ app-eselect/eselect-lcdfilter
+ media-libs/fontconfig-infinality
+ media-libs/freetype:2[infinality]"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${PN}-${MY_PV}
+
+DISABLE_AUTOFORMATTING="1"
+DOC_CONTENTS="1. Disable all rules but 52-infinality.conf using eselect fontconfig
+2. Enable one of the \"ultimate\" presets using eselect infinality
+3. Select ultimate lcdfilter settings using eselect lcdfilter"
+
+BLACKLIST="43-wqy-zenhei-sharp.conf"
+
+src_prepare() {
+ pushd fontconfig_patches/fonts-settings || die
+ rm ${BLACKLIST} || die
+ popd
+
+ # Generate lcdfilter config
+ echo -e "################# FONTCONFIG ULTIMATE STYLE #################\n" \
+ > "${T}"/ultimate || die
+
+ local infinality_style
+ infinality_style=$(sed --quiet \
+ -e 's/^USE_STYLE="*\([1-9]\)"*/\1/p' \
+ freetype/infinality-settings.sh) || die
+
+ if ! [ -n "$infinality_style" ]; then
+ ewarn "Missing USE_STYLE variable in package source."
+ infinality_style=1
+ fi
+
+ sed --quiet \
+ -e '/INFINALITY_FT_FILTER_PARAMS=/p' \
+ freetype/infinality-settings.sh \
+ | sed --quiet \
+ -e "${infinality_style} s/[ \t]*export[ \t]*//p" \
+ >> "${T}"/ultimate
+ assert
+
+ sed --quiet \
+ -e '/INFINALITY_FT_FILTER_PARAMS/ d' \
+ -e 's/^[ \t]*export[ \t]*INFINALITY_FT/INFINALITY_FT/p' \
+ freetype/infinality-settings.sh \
+ >> "${T}"/ultimate || die
+}
+
+src_install() {
+ insinto /etc/fonts/infinality/conf.src.ultimate
+ doins conf.d.infinality/*.conf
+ doins fontconfig_patches/{ms,free,combi}/*.conf
+
+ # Cut a list of default .conf files out of Makefile.am
+ local default_configs config fonts_settings
+ default_configs=$(sed --quiet \
+ -e ':again' \
+ -e '/\\$/ N' \
+ -e 's/\\\n/ /' \
+ -e 't again' \
+ -e 's/^CONF_LINKS =//p' \
+ conf.d.infinality/Makefile.am) || die
+
+ # Install per-font settings
+ pushd fontconfig_patches/fonts-settings || die
+ doins *.conf
+ fonts_settings=$(echo *.conf)
+ popd
+
+ # Install font presets
+ pushd fontconfig_patches/ms || die
+ for config in ${default_configs} ${fonts_settings} *.conf; do
+ dosym ../../conf.src.ultimate/"${config}" \
+ /etc/fonts/infinality/styles.conf.avail/ultimate-ms/"${config}"
+ done
+ popd
+ pushd fontconfig_patches/free || die
+ for config in ${default_configs} ${fonts_settings} *.conf; do
+ dosym ../../conf.src.ultimate/"${config}" \
+ /etc/fonts/infinality/styles.conf.avail/ultimate-free/"${config}"
+ done
+ popd
+ pushd fontconfig_patches/combi || die
+ for config in ${default_configs} ${fonts_settings} *.conf; do
+ dosym ../../conf.src.ultimate/"${config}" \
+ /etc/fonts/infinality/styles.conf.avail/ultimate-combi/"${config}"
+ done
+ popd
+
+ insinto /usr/share/eselect-lcdfilter/env.d
+ doins "${T}"/ultimate
+
+ readme.gentoo_create_doc
+}
diff --git a/media-libs/fontconfig-ultimate/metadata.xml b/media-libs/fontconfig-ultimate/metadata.xml
new file mode 100644
index 000000000000..33de2dc0257f
--- /dev/null
+++ b/media-libs/fontconfig-ultimate/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>fonts</herd>
+ <maintainer>
+ <email>witold.pilat@gmail.com</email>
+ <description>Proxied/co-maintainer. CC on bugs.</description>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">bohoomil/fontconfig-ultimate</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/fontconfig/Manifest b/media-libs/fontconfig/Manifest
new file mode 100644
index 000000000000..2bbccbaf3bb6
--- /dev/null
+++ b/media-libs/fontconfig/Manifest
@@ -0,0 +1,3 @@
+DIST fontconfig-2.11.1.tar.bz2 1516095 SHA256 dc62447533bca844463a3c3fd4083b57c90f18a70506e7a9f4936b5a1e516a99 SHA512 acf4e6293e0e5521e4b8f29f4b48860ecd1d39744d0eab21c7332e56bfc3ccc63548e459243c5e425b8e5ef265f2cf065eece02460725e794041219d41188149 WHIRLPOOL 45009a1e0fcbbe2f532c6f642a0d57af35af3f6abfb50098c89fe39c71da96597078eb4babdd80a713ef4456e07481d70def7c1c18b7314452136d5b30a4858b
+DIST fontconfig-2.11.93.tar.bz2 1565609 SHA256 381e7c14c7a8bc268a9c07589837f0ea24139abc15f46171b7f94751c969a0af SHA512 68e1728884e4c1bc236cd164fe0b8912c194e8b69bcbffdb3bc8a718737e640061d01a543d90d4198fb2a2d2df0d36b40fac40a27d9845579e1893428d3a22bd WHIRLPOOL b596c1e015e48945158d9d8ffe5e1bf91e6912ac9187fefa829960897fba5c9810ff73ec5ea255b6ca490adb768bd20a50ca0eda41763824cd59b180071600f2
+DIST fontconfig-2.11.94.tar.bz2 1567540 SHA256 d763c024df434146f3352448bc1f4554f390c8a48340cef7aa9cc44716a159df SHA512 ab0639afbe37c46197aa31178f928a000e0662edf794bcd421e396bae2298edc23851ff58deeb448cc14ac1206683494817a64a75ab9f7bb9bce6321ccf5c1f2 WHIRLPOOL cb4df2eafa2748ad51efde09225ccb5ec5e1154c0b2b1074aa6151c289d8f44dd14ed641ef092db5f8f2b986afed8d64167f6d2da9bd7afb3f2dab725a0434d4
diff --git a/media-libs/fontconfig/files/fontconfig-2.10.2-docbook.patch b/media-libs/fontconfig/files/fontconfig-2.10.2-docbook.patch
new file mode 100644
index 000000000000..33d6549c8147
--- /dev/null
+++ b/media-libs/fontconfig/files/fontconfig-2.10.2-docbook.patch
@@ -0,0 +1,16 @@
+diff --unified -uNrp fontconfig-2.10.2-orig/configure.ac fontconfig-2.10.2/configure.ac
+--- fontconfig-2.10.2-orig/configure.ac 2012-11-26 09:21:13.000000000 +0100
++++ fontconfig-2.10.2/configure.ac 2013-01-05 15:40:54.541682239 +0100
+@@ -570,7 +570,11 @@ AC_SUBST(XMLDIR)
+ # Let people not build/install docs if they don't have docbook
+ #
+
+-AC_CHECK_PROG(HASDOCBOOK, docbook2html, yes, no)
++AC_ARG_ENABLE(docbook, [ --disable-docbook Don't build documentation],,)
++
++if test x$enable_docbook != xno; then
++ AC_CHECK_PROG(HASDOCBOOK, docbook2html, yes, no)
++fi
+
+ AM_CONDITIONAL(USEDOCBOOK, test "x$HASDOCBOOK" = xyes)
+
diff --git a/media-libs/fontconfig/files/fontconfig-2.10.92-automake-1.13.patch b/media-libs/fontconfig/files/fontconfig-2.10.92-automake-1.13.patch
new file mode 100644
index 000000000000..02b89fa99e56
--- /dev/null
+++ b/media-libs/fontconfig/files/fontconfig-2.10.92-automake-1.13.patch
@@ -0,0 +1,152 @@
+From 18bf57c70aafcad031c0b43756b754dcaf6a756a Mon Sep 17 00:00:00 2001
+From: Sebastian Freundt <hroptatyr@fresse.org>
+Date: Sun, 07 Apr 2013 00:02:58 +0000
+Subject: build-chain, replace INCLUDES directive by AM_CPPFLAGS
+
+As of automake-13.1 the INCLUDES directive is no longer supported.
+An automake run will return with an error.
+
+This changeset simply follows automake's advice to replace INCLUDES
+by AM_CPPFLAGS.
+---
+diff --git a/Tools.mk b/Tools.mk
+index 56766da..f0fa0ec 100644
+--- a/Tools.mk
++++ b/Tools.mk
+@@ -32,7 +32,7 @@ TOOL=./$(DIR)$(EXEEXT_FOR_BUILD)
+
+ EXTRA_DIST = $(TARG) $(TMPL) $(TSRC) $(DIST)
+
+-INCLUDES = \
++AM_CPPFLAGS = \
+ -I$(builddir) \
+ -I$(srcdir) \
+ -I$(top_builddir)/src \
+@@ -43,7 +43,7 @@ INCLUDES = \
+ $(WARN_CFLAGS)
+
+ $(TOOL): $(TSRC) $(ALIAS_FILES)
+- $(AM_V_GEN) $(CC_FOR_BUILD) -o $(TOOL) $< $(INCLUDES)
++ $(AM_V_GEN) $(CC_FOR_BUILD) -o $(TOOL) $< $(AM_CPPFLAGS)
+
+ $(TARG): $(TMPL) $(TSRC) $(DEPS)
+ $(AM_V_GEN) $(MAKE) $(TOOL) && \
+diff --git a/fc-cache/Makefile.am b/fc-cache/Makefile.am
+index 7f7d1b1..0e10786 100644
+--- a/fc-cache/Makefile.am
++++ b/fc-cache/Makefile.am
+@@ -36,7 +36,7 @@ uninstall-local:
+ -$(RM) -rf "$(DESTDIR)$(fc_cachedir)"
+ endif
+
+-INCLUDES=-I${top_srcdir} -I${top_srcdir}/src $(WARN_CFLAGS)
++AM_CPPFLAGS=-I${top_srcdir} -I${top_srcdir}/src $(WARN_CFLAGS)
+
+ bin_PROGRAMS=fc-cache
+
+diff --git a/fc-cat/Makefile.am b/fc-cat/Makefile.am
+index b426723..04c1cc4 100644
+--- a/fc-cat/Makefile.am
++++ b/fc-cat/Makefile.am
+@@ -27,7 +27,7 @@ FC_CAT_SRC=${top_srcdir}/fc-cat
+
+ SGML = ${FC_CAT_SRC}/fc-cat.sgml
+
+-INCLUDES=-I${top_srcdir} $(WARN_CFLAGS)
++AM_CPPFLAGS=-I${top_srcdir} $(WARN_CFLAGS)
+
+ bin_PROGRAMS=fc-cat
+
+diff --git a/fc-list/Makefile.am b/fc-list/Makefile.am
+index b2c499d..c58540e 100644
+--- a/fc-list/Makefile.am
++++ b/fc-list/Makefile.am
+@@ -29,7 +29,7 @@ SGML = ${FC_LIST_SRC}/fc-list.sgml
+
+ bin_PROGRAMS=fc-list
+
+-INCLUDES=-I${top_srcdir} $(WARN_CFLAGS)
++AM_CPPFLAGS=-I${top_srcdir} $(WARN_CFLAGS)
+
+ BUILT_MANS=fc-list.1
+
+diff --git a/fc-match/Makefile.am b/fc-match/Makefile.am
+index 0e9e8fd..84afb8b 100644
+--- a/fc-match/Makefile.am
++++ b/fc-match/Makefile.am
+@@ -29,7 +29,7 @@ FC_MATCH_SRC=${top_srcdir}/fc-match
+
+ SGML = ${FC_MATCH_SRC}/fc-match.sgml
+
+-INCLUDES=-I${top_srcdir} $(WARN_CFLAGS)
++AM_CPPFLAGS=-I${top_srcdir} $(WARN_CFLAGS)
+
+ BUILT_MANS=fc-match.1
+
+diff --git a/fc-pattern/Makefile.am b/fc-pattern/Makefile.am
+index 92b0433..c456247 100644
+--- a/fc-pattern/Makefile.am
++++ b/fc-pattern/Makefile.am
+@@ -29,7 +29,7 @@ FC_PATTERN_SRC=${top_srcdir}/fc-pattern
+
+ SGML = ${FC_PATTERN_SRC}/fc-pattern.sgml
+
+-INCLUDES=-I${top_srcdir} $(WARN_CFLAGS)
++AM_CPPFLAGS=-I${top_srcdir} $(WARN_CFLAGS)
+
+ BUILT_MANS=fc-pattern.1
+
+diff --git a/fc-query/Makefile.am b/fc-query/Makefile.am
+index b3ea1e6..73b3f11 100644
+--- a/fc-query/Makefile.am
++++ b/fc-query/Makefile.am
+@@ -29,7 +29,7 @@ FC_QUERY_SRC=${top_srcdir}/fc-query
+
+ SGML = ${FC_QUERY_SRC}/fc-query.sgml
+
+-INCLUDES=-I${top_srcdir} $(FREETYPE_CFLAGS) $(WARN_CFLAGS)
++AM_CPPFLAGS=-I${top_srcdir} $(FREETYPE_CFLAGS) $(WARN_CFLAGS)
+
+ BUILT_MANS=fc-query.1
+
+diff --git a/fc-scan/Makefile.am b/fc-scan/Makefile.am
+index 2063405..471a42f 100644
+--- a/fc-scan/Makefile.am
++++ b/fc-scan/Makefile.am
+@@ -29,7 +29,7 @@ FC_SCAN_SRC=${top_srcdir}/fc-scan
+
+ SGML = ${FC_SCAN_SRC}/fc-scan.sgml
+
+-INCLUDES=-I${top_srcdir} $(FREETYPE_CFLAGS) $(WARN_CFLAGS)
++AM_CPPFLAGS=-I${top_srcdir} $(FREETYPE_CFLAGS) $(WARN_CFLAGS)
+
+ BUILT_MANS=fc-scan.1
+
+diff --git a/fc-validate/Makefile.am b/fc-validate/Makefile.am
+index 54edec2..782cead 100644
+--- a/fc-validate/Makefile.am
++++ b/fc-validate/Makefile.am
+@@ -29,7 +29,7 @@ FC_VALIDATE_SRC=${top_srcdir}/fc-validate
+
+ SGML = ${FC_VALIDATE_SRC}/fc-validate.sgml
+
+-INCLUDES=-I${top_srcdir} $(FREETYPE_CFLAGS) $(WARN_CFLAGS)
++AM_CPPFLAGS=-I${top_srcdir} $(FREETYPE_CFLAGS) $(WARN_CFLAGS)
+
+ BUILT_MANS=fc-validate.1
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 9fd7dd8..066cc03 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -70,7 +70,7 @@ uninstall-ms-import-lib:
+
+ endif
+
+-INCLUDES = \
++AM_CPPFLAGS = \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/src \
+ $(FREETYPE_CFLAGS) \
+--
+cgit v0.9.0.2-2-gbebe
diff --git a/media-libs/fontconfig/files/fontconfig-2.10.92-closing-fp.patch b/media-libs/fontconfig/files/fontconfig-2.10.92-closing-fp.patch
new file mode 100644
index 000000000000..2f0083f39ed8
--- /dev/null
+++ b/media-libs/fontconfig/files/fontconfig-2.10.92-closing-fp.patch
@@ -0,0 +1,21 @@
+From 9299155b5247255d6b6687448173056c3ca8d09b Mon Sep 17 00:00:00 2001
+From: Akira TAGOH <akira@tagoh.org>
+Date: Tue, 09 Apr 2013 02:34:35 +0000
+Subject: Ensure closing fp on error
+
+---
+diff --git a/src/fchash.c b/src/fchash.c
+index 827b20f..4ea5f37 100644
+--- a/src/fchash.c
++++ b/src/fchash.c
+@@ -220,7 +220,7 @@ FcHashGetSHA256DigestFromFile (const FcChar8 *filename)
+
+ ret = FcHashInitSHA256Digest ();
+ if (!ret)
+- return NULL;
++ goto bail0;
+
+ while (!feof (fp))
+ {
+--
+cgit v0.9.0.2-2-gbebe
diff --git a/media-libs/fontconfig/files/fontconfig-2.10.92-fix-check.patch b/media-libs/fontconfig/files/fontconfig-2.10.92-fix-check.patch
new file mode 100644
index 000000000000..ea07c0c02a35
--- /dev/null
+++ b/media-libs/fontconfig/files/fontconfig-2.10.92-fix-check.patch
@@ -0,0 +1,143 @@
+From 03216ccf4ca0808f9c7b9513efcaeb7f4058b575 Mon Sep 17 00:00:00 2001
+From: Akira TAGOH <akira@tagoh.org>
+Date: Wed, 10 Apr 2013 09:41:22 +0000
+Subject: Bug 63329 - make check fails: .. contents:: :depth: 2
+
+Add back FcHashGetSHA256DigestFromFile() and fall back to it
+when font isn't SFNT-based font because FT_Load_Sfnt_Table
+fails with FT_Err_Invalid_Face_Handle.
+---
+diff --git a/src/fcfreetype.c b/src/fcfreetype.c
+index 22064b3..5e8990d 100644
+--- a/src/fcfreetype.c
++++ b/src/fcfreetype.c
+@@ -1666,17 +1666,29 @@ FcFreeTypeQueryFace (const FT_Face face,
+ goto bail1;
+
+ err = FT_Load_Sfnt_Table (face, 0, 0, NULL, &len);
+- if (err != FT_Err_Ok)
+- goto bail1;
+- alen = (len + 63) & ~63;
+- fontdata = malloc (alen);
+- if (!fontdata)
+- goto bail1;
+- err = FT_Load_Sfnt_Table (face, 0, 0, (FT_Byte *)fontdata, &len);
+- if (err != FT_Err_Ok)
++ if (err == FT_Err_Ok)
++ {
++ alen = (len + 63) & ~63;
++ fontdata = malloc (alen);
++ if (!fontdata)
++ goto bail1;
++ err = FT_Load_Sfnt_Table (face, 0, 0, (FT_Byte *)fontdata, &len);
++ if (err != FT_Err_Ok)
++ goto bail1;
++ memset (&fontdata[len], 0, alen - len);
++ hashstr = FcHashGetSHA256DigestFromMemory (fontdata, len);
++ }
++ else if (err == FT_Err_Invalid_Face_Handle)
++ {
++ /* font may not support SFNT. falling back to
++ * read the font data from file directly
++ */
++ hashstr = FcHashGetSHA256DigestFromFile (file);
++ }
++ else
++ {
+ goto bail1;
+- memset (&fontdata[len], 0, alen - len);
+- hashstr = FcHashGetSHA256DigestFromMemory (fontdata, len);
++ }
+ if (!hashstr)
+ goto bail1;
+ if (!FcPatternAddString (pat, FC_HASH, hashstr))
+diff --git a/src/fchash.c b/src/fchash.c
+index 1ef1e16..92585a6 100644
+--- a/src/fchash.c
++++ b/src/fchash.c
+@@ -204,6 +204,68 @@ FcHashGetSHA256Digest (const FcChar8 *input_strings,
+ }
+
+ FcChar8 *
++FcHashGetSHA256DigestFromFile (const FcChar8 *filename)
++{
++ FILE *fp = fopen ((const char *)filename, "rb");
++ char ibuf[64];
++ FcChar32 *ret;
++ size_t len;
++ struct stat st;
++
++ if (!fp)
++ return NULL;
++
++ if (FcStat (filename, &st))
++ goto bail0;
++
++ ret = FcHashInitSHA256Digest ();
++ if (!ret)
++ goto bail0;
++
++ while (!feof (fp))
++ {
++ if ((len = fread (ibuf, sizeof (char), 64, fp)) < 64)
++ {
++ long v;
++
++ /* add a padding */
++ memset (&ibuf[len], 0, 64 - len);
++ ibuf[len] = 0x80;
++ if ((64 - len) < 9)
++ {
++ /* process a block once */
++ FcHashComputeSHA256Digest (ret, ibuf);
++ memset (ibuf, 0, 64);
++ }
++ /* set input size at the end */
++ v = (long)st.st_size * 8;
++ ibuf[63 - 0] = v & 0xff;
++ ibuf[63 - 1] = (v >> 8) & 0xff;
++ ibuf[63 - 2] = (v >> 16) & 0xff;
++ ibuf[63 - 3] = (v >> 24) & 0xff;
++ ibuf[63 - 4] = (v >> 32) & 0xff;
++ ibuf[63 - 5] = (v >> 40) & 0xff;
++ ibuf[63 - 6] = (v >> 48) & 0xff;
++ ibuf[63 - 7] = (v >> 56) & 0xff;
++ FcHashComputeSHA256Digest (ret, ibuf);
++ break;
++ }
++ else
++ {
++ FcHashComputeSHA256Digest (ret, ibuf);
++ }
++ }
++ fclose (fp);
++
++ return FcHashSHA256ToString (ret);
++
++bail0:
++ fclose (fp);
++
++ return NULL;
++}
++
++FcChar8 *
+ FcHashGetSHA256DigestFromMemory (const char *fontdata,
+ size_t length)
+ {
+diff --git a/src/fcint.h b/src/fcint.h
+index a662dbf..8919958 100644
+--- a/src/fcint.h
++++ b/src/fcint.h
+@@ -818,6 +818,10 @@ FcFontSetSerialize (FcSerialize *serialize, const FcFontSet * s);
+ FcPrivate FcChar8 *
+ FcHashGetSHA256Digest (const FcChar8 *input_strings,
+ size_t len);
++
++FcPrivate FcChar8 *
++FcHashGetSHA256DigestFromFile (const FcChar8 *filename);
++
+ FcPrivate FcChar8 *
+ FcHashGetSHA256DigestFromMemory (const char *fontdata,
+ size_t length);
+--
+cgit v0.9.0.2-2-gbebe
diff --git a/media-libs/fontconfig/files/fontconfig-2.10.92-fix-woff.patch b/media-libs/fontconfig/files/fontconfig-2.10.92-fix-woff.patch
new file mode 100644
index 000000000000..a3600c0186ba
--- /dev/null
+++ b/media-libs/fontconfig/files/fontconfig-2.10.92-fix-woff.patch
@@ -0,0 +1,157 @@
+diff --git a/src/fcfreetype.c b/src/fcfreetype.c
+index 8a037c0..5e8990d 100644
+--- a/src/fcfreetype.c
++++ b/src/fcfreetype.c
+@@ -1104,7 +1104,10 @@ FcFreeTypeQueryFace (const FT_Face face,
+ char psname[256];
+ const char *tmp;
+
+- FcChar8 *hashstr;
++ FcChar8 *hashstr = NULL;
++ char *fontdata = NULL;
++ FT_Error err;
++ FT_ULong len = 0, alen;
+
+ pat = FcPatternCreate ();
+ if (!pat)
+@@ -1662,12 +1665,34 @@ FcFreeTypeQueryFace (const FT_Face face,
+ if (!FcPatternAddBool (pat, FC_DECORATIVE, decorative))
+ goto bail1;
+
+- hashstr = FcHashGetSHA256DigestFromFile (file);
++ err = FT_Load_Sfnt_Table (face, 0, 0, NULL, &len);
++ if (err == FT_Err_Ok)
++ {
++ alen = (len + 63) & ~63;
++ fontdata = malloc (alen);
++ if (!fontdata)
++ goto bail1;
++ err = FT_Load_Sfnt_Table (face, 0, 0, (FT_Byte *)fontdata, &len);
++ if (err != FT_Err_Ok)
++ goto bail1;
++ memset (&fontdata[len], 0, alen - len);
++ hashstr = FcHashGetSHA256DigestFromMemory (fontdata, len);
++ }
++ else if (err == FT_Err_Invalid_Face_Handle)
++ {
++ /* font may not support SFNT. falling back to
++ * read the font data from file directly
++ */
++ hashstr = FcHashGetSHA256DigestFromFile (file);
++ }
++ else
++ {
++ goto bail1;
++ }
+ if (!hashstr)
+ goto bail1;
+ if (!FcPatternAddString (pat, FC_HASH, hashstr))
+ goto bail1;
+- free (hashstr);
+
+ /*
+ * Compute the unicode coverage for the font
+@@ -1756,6 +1781,10 @@ FcFreeTypeQueryFace (const FT_Face face,
+ bail2:
+ FcCharSetDestroy (cs);
+ bail1:
++ if (hashstr)
++ free (hashstr);
++ if (fontdata)
++ free (fontdata);
+ FcPatternDestroy (pat);
+ bail0:
+ return NULL;
+diff --git a/src/fchash.c b/src/fchash.c
+index 827b20f..92585a6 100644
+--- a/src/fchash.c
++++ b/src/fchash.c
+@@ -220,7 +220,7 @@ FcHashGetSHA256DigestFromFile (const FcChar8 *filename)
+
+ ret = FcHashInitSHA256Digest ();
+ if (!ret)
+- return NULL;
++ goto bail0;
+
+ while (!feof (fp))
+ {
+@@ -261,5 +261,60 @@ FcHashGetSHA256DigestFromFile (const FcChar8 *filename)
+
+ bail0:
+ fclose (fp);
++
+ return NULL;
+ }
++
++FcChar8 *
++FcHashGetSHA256DigestFromMemory (const char *fontdata,
++ size_t length)
++{
++ char ibuf[64];
++ FcChar32 *ret;
++ size_t i = 0;
++
++ ret = FcHashInitSHA256Digest ();
++ if (!ret)
++ return NULL;
++
++ while (i <= length)
++ {
++ if ((length - i) < 64)
++ {
++ long v;
++ size_t n;
++
++ /* add a padding */
++ n = length - i;
++ if (n > 0)
++ memcpy (ibuf, &fontdata[i], n);
++ memset (&ibuf[n], 0, 64 - n);
++ ibuf[n] = 0x80;
++ if ((64 - n) < 9)
++ {
++ /* process a block once */
++ FcHashComputeSHA256Digest (ret, ibuf);
++ memset (ibuf, 0, 64);
++ }
++ /* set input size at the end */
++ v = length * 8;
++ ibuf[63 - 0] = v & 0xff;
++ ibuf[63 - 1] = (v >> 8) & 0xff;
++ ibuf[63 - 2] = (v >> 16) & 0xff;
++ ibuf[63 - 3] = (v >> 24) & 0xff;
++ ibuf[63 - 4] = (v >> 32) & 0xff;
++ ibuf[63 - 5] = (v >> 40) & 0xff;
++ ibuf[63 - 6] = (v >> 48) & 0xff;
++ ibuf[63 - 7] = (v >> 56) & 0xff;
++ FcHashComputeSHA256Digest (ret, ibuf);
++ break;
++ }
++ else
++ {
++ FcHashComputeSHA256Digest (ret, &fontdata[i]);
++ }
++ i += 64;
++ }
++
++ return FcHashSHA256ToString (ret);
++}
+diff --git a/src/fcint.h b/src/fcint.h
+index c45075e..8919958 100644
+--- a/src/fcint.h
++++ b/src/fcint.h
+@@ -818,9 +818,14 @@ FcFontSetSerialize (FcSerialize *serialize, const FcFontSet * s);
+ FcPrivate FcChar8 *
+ FcHashGetSHA256Digest (const FcChar8 *input_strings,
+ size_t len);
++
+ FcPrivate FcChar8 *
+ FcHashGetSHA256DigestFromFile (const FcChar8 *filename);
+
++FcPrivate FcChar8 *
++FcHashGetSHA256DigestFromMemory (const char *fontdata,
++ size_t length);
++
+ /* fcinit.c */
+ FcPrivate FcConfig *
+ FcInitLoadOwnConfig (FcConfig *config);
diff --git a/media-libs/fontconfig/files/fontconfig-2.10.92-ft-face.patch b/media-libs/fontconfig/files/fontconfig-2.10.92-ft-face.patch
new file mode 100644
index 000000000000..1df404846330
--- /dev/null
+++ b/media-libs/fontconfig/files/fontconfig-2.10.92-ft-face.patch
@@ -0,0 +1,144 @@
+From c93a8b8b54afe33e5ecf9870723543cb4058fa94 Mon Sep 17 00:00:00 2001
+From: Akira TAGOH <akira@tagoh.org>
+Date: Tue, 09 Apr 2013 03:46:30 +0000
+Subject: Obtain fonts data via FT_Face instead of opening a file directly
+
+---
+diff --git a/src/fcfreetype.c b/src/fcfreetype.c
+index 8a037c0..1eecfdb 100644
+--- a/src/fcfreetype.c
++++ b/src/fcfreetype.c
+@@ -1662,7 +1662,7 @@ FcFreeTypeQueryFace (const FT_Face face,
+ if (!FcPatternAddBool (pat, FC_DECORATIVE, decorative))
+ goto bail1;
+
+- hashstr = FcHashGetSHA256DigestFromFile (file);
++ hashstr = FcHashGetSHA256DigestFromFace (face);
+ if (!hashstr)
+ goto bail1;
+ if (!FcPatternAddString (pat, FC_HASH, hashstr))
+diff --git a/src/fchash.c b/src/fchash.c
+index 4ea5f37..043d94b 100644
+--- a/src/fchash.c
++++ b/src/fchash.c
+@@ -29,6 +29,9 @@
+ #include "fcint.h"
+ #include <stdio.h>
+ #include <string.h>
++#include <ft2build.h>
++#include FT_TRUETYPE_TABLES_H
++#include FT_TRUETYPE_TAGS_H
+
+ #define ROTRN(w, v, n) ((((FcChar32)v) >> n) | (((FcChar32)v) << (w - n)))
+ #define ROTR32(v, n) ROTRN(32, v, n)
+@@ -204,41 +207,50 @@ FcHashGetSHA256Digest (const FcChar8 *input_strings,
+ }
+
+ FcChar8 *
+-FcHashGetSHA256DigestFromFile (const FcChar8 *filename)
++FcHashGetSHA256DigestFromFace (const FT_Face face)
+ {
+- FILE *fp = fopen ((const char *)filename, "rb");
+- char ibuf[64];
++ char ibuf[64], *buf = NULL;
+ FcChar32 *ret;
+- size_t len;
+- struct stat st;
++ FT_Error err;
++ FT_ULong len = 0, alen, i = 0;
+
+- if (!fp)
++ err = FT_Load_Sfnt_Table (face, 0, 0, NULL, &len);
++ if (err != FT_Err_Ok)
+ return NULL;
+-
+- if (FcStat (filename, &st))
++ alen = (len + 63) & ~63;
++ buf = malloc (alen);
++ if (!buf)
++ return NULL;
++ err = FT_Load_Sfnt_Table (face, 0, 0, (FT_Byte *)buf, &len);
++ if (err != FT_Err_Ok)
+ goto bail0;
++ memset (&buf[len], 0, alen - len);
+
+ ret = FcHashInitSHA256Digest ();
+ if (!ret)
+ goto bail0;
+
+- while (!feof (fp))
++ while (i <= len)
+ {
+- if ((len = fread (ibuf, sizeof (char), 64, fp)) < 64)
++ if ((len - i) < 64)
+ {
+ long v;
++ int n;
+
+ /* add a padding */
+- memset (&ibuf[len], 0, 64 - len);
+- ibuf[len] = 0x80;
+- if ((64 - len) < 9)
++ n = len - i;
++ if (n > 0)
++ memcpy (ibuf, &buf[i], n);
++ memset (&ibuf[n], 0, 64 - n);
++ ibuf[n] = 0x80;
++ if ((64 - n) < 9)
+ {
+ /* process a block once */
+ FcHashComputeSHA256Digest (ret, ibuf);
+ memset (ibuf, 0, 64);
+ }
+ /* set input size at the end */
+- v = (long)st.st_size * 8;
++ v = len * 8;
+ ibuf[63 - 0] = v & 0xff;
+ ibuf[63 - 1] = (v >> 8) & 0xff;
+ ibuf[63 - 2] = (v >> 16) & 0xff;
+@@ -252,14 +264,18 @@ FcHashGetSHA256DigestFromFile (const FcChar8 *filename)
+ }
+ else
+ {
+- FcHashComputeSHA256Digest (ret, ibuf);
++ FcHashComputeSHA256Digest (ret, &buf[i]);
+ }
++ i += 64;
+ }
+- fclose (fp);
++ if (buf)
++ free (buf);
+
+ return FcHashSHA256ToString (ret);
+
+ bail0:
+- fclose (fp);
++ if (buf)
++ free (buf);
++
+ return NULL;
+ }
+diff --git a/src/fcint.h b/src/fcint.h
+index c45075e..703b983 100644
+--- a/src/fcint.h
++++ b/src/fcint.h
+@@ -47,6 +47,8 @@
+ #include "fcdeprecate.h"
+ #include "fcmutex.h"
+ #include "fcatomic.h"
++#include <ft2build.h>
++#include FT_FREETYPE_H
+
+ #ifndef FC_CONFIG_PATH
+ #define FC_CONFIG_PATH "fonts.conf"
+@@ -819,7 +821,7 @@ FcPrivate FcChar8 *
+ FcHashGetSHA256Digest (const FcChar8 *input_strings,
+ size_t len);
+ FcPrivate FcChar8 *
+-FcHashGetSHA256DigestFromFile (const FcChar8 *filename);
++FcHashGetSHA256DigestFromFace (const FT_Face face);
+
+ /* fcinit.c */
+ FcPrivate FcConfig *
+--
+cgit v0.9.0.2-2-gbebe
diff --git a/media-libs/fontconfig/files/fontconfig-2.10.92-ft-face2.patch b/media-libs/fontconfig/files/fontconfig-2.10.92-ft-face2.patch
new file mode 100644
index 000000000000..62735675275c
--- /dev/null
+++ b/media-libs/fontconfig/files/fontconfig-2.10.92-ft-face2.patch
@@ -0,0 +1,177 @@
+From fc5a589abad0e8285f7d95007ebda76536e8fa7d Mon Sep 17 00:00:00 2001
+From: Akira TAGOH <akira@tagoh.org>
+Date: Tue, 09 Apr 2013 08:18:43 +0000
+Subject: Revert the previous change and rework to not export freetype API outside fcfreetype.c
+
+---
+diff --git a/src/fcfreetype.c b/src/fcfreetype.c
+index 1eecfdb..22064b3 100644
+--- a/src/fcfreetype.c
++++ b/src/fcfreetype.c
+@@ -1104,7 +1104,10 @@ FcFreeTypeQueryFace (const FT_Face face,
+ char psname[256];
+ const char *tmp;
+
+- FcChar8 *hashstr;
++ FcChar8 *hashstr = NULL;
++ char *fontdata = NULL;
++ FT_Error err;
++ FT_ULong len = 0, alen;
+
+ pat = FcPatternCreate ();
+ if (!pat)
+@@ -1662,12 +1665,22 @@ FcFreeTypeQueryFace (const FT_Face face,
+ if (!FcPatternAddBool (pat, FC_DECORATIVE, decorative))
+ goto bail1;
+
+- hashstr = FcHashGetSHA256DigestFromFace (face);
++ err = FT_Load_Sfnt_Table (face, 0, 0, NULL, &len);
++ if (err != FT_Err_Ok)
++ goto bail1;
++ alen = (len + 63) & ~63;
++ fontdata = malloc (alen);
++ if (!fontdata)
++ goto bail1;
++ err = FT_Load_Sfnt_Table (face, 0, 0, (FT_Byte *)fontdata, &len);
++ if (err != FT_Err_Ok)
++ goto bail1;
++ memset (&fontdata[len], 0, alen - len);
++ hashstr = FcHashGetSHA256DigestFromMemory (fontdata, len);
+ if (!hashstr)
+ goto bail1;
+ if (!FcPatternAddString (pat, FC_HASH, hashstr))
+ goto bail1;
+- free (hashstr);
+
+ /*
+ * Compute the unicode coverage for the font
+@@ -1756,6 +1769,10 @@ FcFreeTypeQueryFace (const FT_Face face,
+ bail2:
+ FcCharSetDestroy (cs);
+ bail1:
++ if (hashstr)
++ free (hashstr);
++ if (fontdata)
++ free (fontdata);
+ FcPatternDestroy (pat);
+ bail0:
+ return NULL;
+diff --git a/src/fchash.c b/src/fchash.c
+index 043d94b..1ef1e16 100644
+--- a/src/fchash.c
++++ b/src/fchash.c
+@@ -29,9 +29,6 @@
+ #include "fcint.h"
+ #include <stdio.h>
+ #include <string.h>
+-#include <ft2build.h>
+-#include FT_TRUETYPE_TABLES_H
+-#include FT_TRUETYPE_TAGS_H
+
+ #define ROTRN(w, v, n) ((((FcChar32)v) >> n) | (((FcChar32)v) << (w - n)))
+ #define ROTR32(v, n) ROTRN(32, v, n)
+@@ -207,40 +204,28 @@ FcHashGetSHA256Digest (const FcChar8 *input_strings,
+ }
+
+ FcChar8 *
+-FcHashGetSHA256DigestFromFace (const FT_Face face)
++FcHashGetSHA256DigestFromMemory (const char *fontdata,
++ size_t length)
+ {
+- char ibuf[64], *buf = NULL;
++ char ibuf[64];
+ FcChar32 *ret;
+- FT_Error err;
+- FT_ULong len = 0, alen, i = 0;
+-
+- err = FT_Load_Sfnt_Table (face, 0, 0, NULL, &len);
+- if (err != FT_Err_Ok)
+- return NULL;
+- alen = (len + 63) & ~63;
+- buf = malloc (alen);
+- if (!buf)
+- return NULL;
+- err = FT_Load_Sfnt_Table (face, 0, 0, (FT_Byte *)buf, &len);
+- if (err != FT_Err_Ok)
+- goto bail0;
+- memset (&buf[len], 0, alen - len);
++ size_t i = 0;
+
+ ret = FcHashInitSHA256Digest ();
+ if (!ret)
+- goto bail0;
++ return NULL;
+
+- while (i <= len)
++ while (i <= length)
+ {
+- if ((len - i) < 64)
++ if ((length - i) < 64)
+ {
+ long v;
+- int n;
++ size_t n;
+
+ /* add a padding */
+- n = len - i;
++ n = length - i;
+ if (n > 0)
+- memcpy (ibuf, &buf[i], n);
++ memcpy (ibuf, &fontdata[i], n);
+ memset (&ibuf[n], 0, 64 - n);
+ ibuf[n] = 0x80;
+ if ((64 - n) < 9)
+@@ -250,7 +235,7 @@ FcHashGetSHA256DigestFromFace (const FT_Face face)
+ memset (ibuf, 0, 64);
+ }
+ /* set input size at the end */
+- v = len * 8;
++ v = length * 8;
+ ibuf[63 - 0] = v & 0xff;
+ ibuf[63 - 1] = (v >> 8) & 0xff;
+ ibuf[63 - 2] = (v >> 16) & 0xff;
+@@ -264,18 +249,10 @@ FcHashGetSHA256DigestFromFace (const FT_Face face)
+ }
+ else
+ {
+- FcHashComputeSHA256Digest (ret, &buf[i]);
++ FcHashComputeSHA256Digest (ret, &fontdata[i]);
+ }
+ i += 64;
+ }
+- if (buf)
+- free (buf);
+
+ return FcHashSHA256ToString (ret);
+-
+-bail0:
+- if (buf)
+- free (buf);
+-
+- return NULL;
+ }
+diff --git a/src/fcint.h b/src/fcint.h
+index 703b983..a662dbf 100644
+--- a/src/fcint.h
++++ b/src/fcint.h
+@@ -47,8 +47,6 @@
+ #include "fcdeprecate.h"
+ #include "fcmutex.h"
+ #include "fcatomic.h"
+-#include <ft2build.h>
+-#include FT_FREETYPE_H
+
+ #ifndef FC_CONFIG_PATH
+ #define FC_CONFIG_PATH "fonts.conf"
+@@ -821,7 +819,8 @@ FcPrivate FcChar8 *
+ FcHashGetSHA256Digest (const FcChar8 *input_strings,
+ size_t len);
+ FcPrivate FcChar8 *
+-FcHashGetSHA256DigestFromFace (const FT_Face face);
++FcHashGetSHA256DigestFromMemory (const char *fontdata,
++ size_t length);
+
+ /* fcinit.c */
+ FcPrivate FcConfig *
+--
+cgit v0.9.0.2-2-gbebe
diff --git a/media-libs/fontconfig/files/fontconfig-2.10.92-native-fonts.patch b/media-libs/fontconfig/files/fontconfig-2.10.92-native-fonts.patch
new file mode 100644
index 000000000000..05e9ee90d904
--- /dev/null
+++ b/media-libs/fontconfig/files/fontconfig-2.10.92-native-fonts.patch
@@ -0,0 +1,73 @@
+From 8fd0ed60a62cb7f36b2ade1bd16a66671eaf79da Mon Sep 17 00:00:00 2001
+From: Akira TAGOH <akira@tagoh.org>
+Date: Mon, 01 Apr 2013 09:16:28 +0000
+Subject: Bug 62980 - matching native fonts with even :lang=en
+
+Fix the matcher modified by 4eab908c8679a797ac7016b77a93ee41bb11b0fc
+to deal with both strong and weak of FC_LANG as the same location in the score
+---
+diff --git a/src/fcmatch.c b/src/fcmatch.c
+index 68f39ae..2d7b798 100644
+--- a/src/fcmatch.c
++++ b/src/fcmatch.c
+@@ -227,9 +227,10 @@ typedef enum _FcMatcherPriorityDummy {
+ #undef FC_OBJECT
+
+ #undef PRI1
+-#define PRI1(n) \
+- PRI_ ## n ## _STRONG, \
+- PRI_ ## n ## _WEAK
++#define PRI1(n) \
++ PRI_ ## n, \
++ PRI_ ## n ## _STRONG = PRI_ ## n, \
++ PRI_ ## n ## _WEAK = PRI_ ## n
+
+ typedef enum _FcMatcherPriority {
+ PRI1(HASH),
+@@ -237,9 +238,8 @@ typedef enum _FcMatcherPriority {
+ PRI1(FOUNDRY),
+ PRI1(CHARSET),
+ PRI_FAMILY_STRONG,
+- PRI_LANG_STRONG,
+ PRI_POSTSCRIPT_NAME_STRONG,
+- PRI_LANG_WEAK,
++ PRI1(LANG),
+ PRI_FAMILY_WEAK,
+ PRI_POSTSCRIPT_NAME_WEAK,
+ PRI1(SPACING),
+@@ -910,8 +910,7 @@ FcFontSetSort (FcConfig *config FC_UNUSED,
+ * If this node matches any language, go check
+ * which ones and satisfy those entries
+ */
+- if (nodeps[f]->score[PRI_LANG_STRONG] < 2000 ||
+- nodeps[f]->score[PRI_LANG_WEAK] < 2000)
++ if (nodeps[f]->score[PRI_LANG] < 2000)
+ {
+ for (i = 0; i < nPatternLang; i++)
+ {
+@@ -935,13 +934,6 @@ FcFontSetSort (FcConfig *config FC_UNUSED,
+ }
+ patternLangSat[i] = FcTrue;
+ satisfies = FcTrue;
+- /* adjust score to ensure it's not more than 10000.0
+- * which would means the lang didn't satisfy the requirements
+- */
+- if (nodeps[f]->score[PRI_LANG_STRONG] > 10000.0)
+- nodeps[f]->score[PRI_LANG_STRONG] = 10000.0;
+- if (nodeps[f]->score[PRI_LANG_WEAK] > 10000.0)
+- nodeps[f]->score[PRI_LANG_WEAK] = 10000.0;
+ break;
+ }
+ }
+@@ -949,8 +941,7 @@ FcFontSetSort (FcConfig *config FC_UNUSED,
+ }
+ if (!satisfies)
+ {
+- nodeps[f]->score[PRI_LANG_STRONG] = 10000.0;
+- nodeps[f]->score[PRI_LANG_WEAK] = 10000.0;
++ nodeps[f]->score[PRI_LANG] = 10000.0;
+ }
+ }
+
+--
+cgit v0.9.0.2-2-gbebe
diff --git a/media-libs/fontconfig/files/fontconfig-2.10.92-use-glob.patch b/media-libs/fontconfig/files/fontconfig-2.10.92-use-glob.patch
new file mode 100644
index 000000000000..e2040fcd4b10
--- /dev/null
+++ b/media-libs/fontconfig/files/fontconfig-2.10.92-use-glob.patch
@@ -0,0 +1,164 @@
+From f6244d2cf231e1dc756f3e941e61b9bf124879bb Mon Sep 17 00:00:00 2001
+From: Akira TAGOH <akira@tagoh.org>
+Date: Wed, 08 May 2013 02:57:49 +0000
+Subject: Use the glob matching for filename
+
+Regex is expensive to compare filenames. we already have the glob matching
+and it works enough in this case.
+
+Prior to this change, renaming FcConfigGlobMatch() to FcStrGlobMatch() and moving to fcstr.c
+---
+diff --git a/src/fccfg.c b/src/fccfg.c
+index 7da50b5..fcdf73e 100644
+--- a/src/fccfg.c
++++ b/src/fccfg.c
+@@ -2211,57 +2211,13 @@ FcConfigGlobAdd (FcConfig *config,
+ }
+
+ static FcBool
+-FcConfigGlobMatch (const FcChar8 *glob,
+- const FcChar8 *string)
+-{
+- FcChar8 c;
+-
+- while ((c = *glob++))
+- {
+- switch (c) {
+- case '*':
+- /* short circuit common case */
+- if (!*glob)
+- return FcTrue;
+- /* short circuit another common case */
+- if (strchr ((char *) glob, '*') == 0)
+- {
+- size_t l1, l2;
+-
+- l1 = strlen ((char *) string);
+- l2 = strlen ((char *) glob);
+- if (l1 < l2)
+- return FcFalse;
+- string += (l1 - l2);
+- }
+- while (*string)
+- {
+- if (FcConfigGlobMatch (glob, string))
+- return FcTrue;
+- string++;
+- }
+- return FcFalse;
+- case '?':
+- if (*string++ == '\0')
+- return FcFalse;
+- break;
+- default:
+- if (*string++ != c)
+- return FcFalse;
+- break;
+- }
+- }
+- return *string == '\0';
+-}
+-
+-static FcBool
+ FcConfigGlobsMatch (const FcStrSet *globs,
+ const FcChar8 *string)
+ {
+ int i;
+
+ for (i = 0; i < globs->num; i++)
+- if (FcConfigGlobMatch (globs->strs[i], string))
++ if (FcStrGlobMatch (globs->strs[i], string))
+ return FcTrue;
+ return FcFalse;
+ }
+diff --git a/src/fcint.h b/src/fcint.h
+index 8919958..65bf333 100644
+--- a/src/fcint.h
++++ b/src/fcint.h
+@@ -1090,6 +1090,10 @@ FcPrivate int
+ FcStrMatchIgnoreCaseAndDelims (const FcChar8 *s1, const FcChar8 *s2, const FcChar8 *delims);
+
+ FcPrivate FcBool
++FcStrGlobMatch (const FcChar8 *glob,
++ const FcChar8 *string);
++
++FcPrivate FcBool
+ FcStrUsesHome (const FcChar8 *s);
+
+ FcPrivate FcChar8 *
+diff --git a/src/fcmatch.c b/src/fcmatch.c
+index 2d7b798..84c9a9a 100644
+--- a/src/fcmatch.c
++++ b/src/fcmatch.c
+@@ -196,12 +196,10 @@ FcCompareFilename (FcValue *v1, FcValue *v2)
+ return 0.0;
+ else if (FcStrCmpIgnoreCase (s1, s2) == 0)
+ return 1.0;
+- else if (FcStrRegexCmp (s2, s1))
++ else if (FcStrGlobMatch (s1, s2))
+ return 2.0;
+- else if (FcStrRegexCmpIgnoreCase (s2, s1))
+- return 3.0;
+ else
+- return 4.0;
++ return 3.0;
+ }
+
+ #define PRI_NULL(n) \
+diff --git a/src/fcstr.c b/src/fcstr.c
+index 339a346..3a32031 100644
+--- a/src/fcstr.c
++++ b/src/fcstr.c
+@@ -459,6 +459,50 @@ FcStrMatchIgnoreCaseAndDelims (const FcChar8 *s1, const FcChar8 *s2, const FcCha
+ return w1.src - s1 - 1;
+ }
+
++FcBool
++FcStrGlobMatch (const FcChar8 *glob,
++ const FcChar8 *string)
++{
++ FcChar8 c;
++
++ while ((c = *glob++))
++ {
++ switch (c) {
++ case '*':
++ /* short circuit common case */
++ if (!*glob)
++ return FcTrue;
++ /* short circuit another common case */
++ if (strchr ((char *) glob, '*') == 0)
++ {
++ size_t l1, l2;
++
++ l1 = strlen ((char *) string);
++ l2 = strlen ((char *) glob);
++ if (l1 < l2)
++ return FcFalse;
++ string += (l1 - l2);
++ }
++ while (*string)
++ {
++ if (FcStrGlobMatch (glob, string))
++ return FcTrue;
++ string++;
++ }
++ return FcFalse;
++ case '?':
++ if (*string++ == '\0')
++ return FcFalse;
++ break;
++ default:
++ if (*string++ != c)
++ return FcFalse;
++ break;
++ }
++ }
++ return *string == '\0';
++}
++
+ const FcChar8 *
+ FcStrStrIgnoreCase (const FcChar8 *s1, const FcChar8 *s2)
+ {
+--
+cgit v0.9.0.2-2-gbebe
diff --git a/media-libs/fontconfig/files/fontconfig-2.11.0-baseconfigdir_fix.patch b/media-libs/fontconfig/files/fontconfig-2.11.0-baseconfigdir_fix.patch
new file mode 100644
index 000000000000..c3f38aad4218
--- /dev/null
+++ b/media-libs/fontconfig/files/fontconfig-2.11.0-baseconfigdir_fix.patch
@@ -0,0 +1,21 @@
+From 320283cd70ae31ce46b03e0c5da55412089ce953 Mon Sep 17 00:00:00 2001
+From: Akira TAGOH <akira@tagoh.org>
+Date: Thu, 16 Jan 2014 10:30:35 +0000
+Subject: Bug 73686 - confdir is not set correctly in fontconfig.pc
+
+---
+diff --git a/fontconfig.pc.in b/fontconfig.pc.in
+index 6e112bb..fa00a72 100644
+--- a/fontconfig.pc.in
++++ b/fontconfig.pc.in
+@@ -5,7 +5,7 @@ includedir=@includedir@
+ sysconfdir=@sysconfdir@
+ localstatedir=@localstatedir@
+ PACKAGE=@PACKAGE@
+-confdir=@baseconfigdir@
++confdir=@BASECONFIGDIR@
+ cachedir=@fc_cachedir@
+
+ Name: Fontconfig
+--
+cgit v0.9.0.2-2-gbebe
diff --git a/media-libs/fontconfig/files/fontconfig-2.11.0-solaris.patch b/media-libs/fontconfig/files/fontconfig-2.11.0-solaris.patch
new file mode 100644
index 000000000000..a2c7a7640c66
--- /dev/null
+++ b/media-libs/fontconfig/files/fontconfig-2.11.0-solaris.patch
@@ -0,0 +1,57 @@
+
+ test/test-migration.c | 18 ++++++++++++++++++
+ 1 file changed, 18 insertions(+)
+
+New commits:
+commit 76ea9af816a50c6bb0b3dc2960460a90fadd9cdb
+Author: Akira TAGOH <akira@tagoh.org>
+Date: Tue Oct 22 15:00:29 2013 +0900
+
+ Use stat() if there are no d_type in struct dirent
+
+ Reported by Thomas Klausner
+
+diff --git a/test/test-migration.c b/test/test-migration.c
+index a0ab839..9709651 100644
+--- a/test/test-migration.c
++++ b/test/test-migration.c
+@@ -4,6 +4,11 @@
+ #include <unistd.h>
+ #include <sys/types.h>
+ #include <dirent.h>
++#ifndef HAVE_STRUCT_DIRENT_D_TYPE
++#include <sys/types.h>
++#include <sys/stat.h>
++#include <unistd.h>
++#endif
+ #include <fontconfig/fontconfig.h>
+
+ FcBool
+@@ -36,6 +41,9 @@ unlink_dirs(const char *dir)
+ size_t len = strlen (dir);
+ char *n = NULL;
+ FcBool ret = FcTrue;
++#ifndef HAVE_STRUCT_DIRENT_D_TYPE
++ struct stat statb;
++#endif
+
+ if (!d)
+ return FcFalse;
+@@ -53,7 +61,17 @@ unlink_dirs(const char *dir)
+ strcpy (n, dir);
+ n[len] = '/';
+ strcpy (&n[len + 1], e->d_name);
++#ifdef HAVE_STRUCT_DIRENT_D_TYPE
+ if (e->d_type == DT_DIR)
++#else
++ if (stat (n, &statb) == -1)
++ {
++ fprintf (stderr, "E: %s\n", n);
++ ret = FcFalse;
++ break;
++ }
++ if (S_ISDIR (statb.st_mode))
++#endif
+ {
+ if (!unlink_dirs (n))
+ {
diff --git a/media-libs/fontconfig/files/fontconfig-2.11.0-solaris10.patch b/media-libs/fontconfig/files/fontconfig-2.11.0-solaris10.patch
new file mode 100644
index 000000000000..8ea47d4c646c
--- /dev/null
+++ b/media-libs/fontconfig/files/fontconfig-2.11.0-solaris10.patch
@@ -0,0 +1,63 @@
+
+ configure.ac | 2 +-
+ test/test-migration.c | 15 ++++++++++++++-
+ 2 files changed, 15 insertions(+), 2 deletions(-)
+
+New commits:
+commit 65872e9e46d17e4461c3a891ef23abe156005e04
+Author: Akira TAGOH <akira@tagoh.org>
+Date: Thu Oct 24 19:35:26 2013 +0900
+
+ Fix a build issue on Solaris 10
+
+ Use own mkdtemp implementation if not available.
+
+ Reported by Thomas Klausner and Jörn Clausen
+
+diff --git a/configure.ac b/configure.ac
+index c3743f4..4478914 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -148,7 +148,7 @@ AC_TYPE_PID_T
+ # Checks for library functions.
+ AC_FUNC_VPRINTF
+ AC_FUNC_MMAP
+-AC_CHECK_FUNCS([link mkstemp mkostemp _mktemp_s getopt getopt_long getprogname getexecname rand random lrand48 random_r rand_r regcomp regerror regexec regfree fstatvfs fstatfs lstat])
++AC_CHECK_FUNCS([link mkstemp mkostemp _mktemp_s mkdtemp getopt getopt_long getprogname getexecname rand random lrand48 random_r rand_r regcomp regerror regexec regfree fstatvfs fstatfs lstat])
+
+ dnl AC_CHECK_FUNCS doesn't check for header files.
+ dnl posix_fadvise() may be not available in older libc.
+diff --git a/test/test-migration.c b/test/test-migration.c
+index 9709651..f127e27 100644
+--- a/test/test-migration.c
++++ b/test/test-migration.c
+@@ -11,6 +11,19 @@
+ #endif
+ #include <fontconfig/fontconfig.h>
+
++#ifdef HAVE_MKDTEMP
++#define fc_mkdtemp mkdtemp
++#else
++char *
++fc_mkdtemp (char *template)
++{
++ if (!mktemp (template) || mkdir (template, 0700))
++ return NULL;
++
++ return template;
++}
++#endif
++
+ FcBool
+ mkdir_p(const char *dir)
+ {
+@@ -107,7 +120,7 @@ int
+ main(void)
+ {
+ char template[32] = "fontconfig-XXXXXXXX";
+- char *tmp = mkdtemp (template);
++ char *tmp = fc_mkdtemp (template);
+ size_t len = strlen (tmp), xlen, dlen;
+ char xdg[256], confd[256], fn[256], nfn[256], ud[256], nud[256];
+ int ret = -1;
+
diff --git a/media-libs/fontconfig/files/fontconfig-2.11.1-fc-cache-r.patch b/media-libs/fontconfig/files/fontconfig-2.11.1-fc-cache-r.patch
new file mode 100644
index 000000000000..48f67f12974d
--- /dev/null
+++ b/media-libs/fontconfig/files/fontconfig-2.11.1-fc-cache-r.patch
@@ -0,0 +1,26 @@
+From f44157c809d280e2a0ce87fb078fc4b278d24a67 Mon Sep 17 00:00:00 2001
+From: Akira TAGOH <akira@tagoh.org>
+Date: Thu, 10 Apr 2014 19:27:55 +0900
+Subject: Fix fc-cache fail with -r
+
+Do not unlink the cache even if --really-force is given.
+because re-scanning process expects the cache exists.
+
+https://bugs.freedesktop.org/show_bug.cgi?id=77252
+
+diff --git a/fc-cache/fc-cache.c b/fc-cache/fc-cache.c
+index 99e0e9f..90ebad3 100644
+--- a/fc-cache/fc-cache.c
++++ b/fc-cache/fc-cache.c
+@@ -388,7 +388,7 @@ main (int argc, char **argv)
+ list = FcStrListCreate (updateDirs);
+ if (list)
+ {
+- ret += scanDirs (list, config, FcTrue, really_force, verbose, FcFalse, &changed, NULL);
++ ret += scanDirs (list, config, FcTrue, FcFalse, verbose, FcFalse, &changed, NULL);
+ FcStrListDone (list);
+ }
+ FcStrSetDestroy (updateDirs);
+--
+cgit v0.10.2
+
diff --git a/media-libs/fontconfig/files/fontconfig-2.11.93-addfile.patch b/media-libs/fontconfig/files/fontconfig-2.11.93-addfile.patch
new file mode 100644
index 000000000000..8b96da2e5946
--- /dev/null
+++ b/media-libs/fontconfig/files/fontconfig-2.11.93-addfile.patch
@@ -0,0 +1,109 @@
+From c965c9f67759585909fa03236bad826de85bd39c Mon Sep 17 00:00:00 2001
+From: Akira TAGOH <akira@tagoh.org>
+Date: Mon, 23 Mar 2015 13:30:59 +0900
+Subject: Bug 89617 - FcConfigAppFontAddFile() returns false on any font file
+
+Prior to the change of 32ac7c75e8db0135ef37cf86f92d8b9be000c8bb
+FcConfigAppFontAddFile() always returned FcTrue no matter what
+fonts was added. after that, it always returned FcFalse because
+adding a font doesn't add any subdirs with FcFileScanConfig().
+so changing that to simply ignore it.
+
+Also fixing it to return FcFalse if non-fonts was added, i.e.
+FcFreeTypeQuery() fails.
+
+https://bugs.freedesktop.org/show_bug.cgi?id=89617
+
+diff --git a/src/fccfg.c b/src/fccfg.c
+index b92270b..5467493 100644
+--- a/src/fccfg.c
++++ b/src/fccfg.c
+@@ -2227,7 +2227,9 @@ FcConfigAppFontAddFile (FcConfig *config,
+ FcStrSetDestroy (subdirs);
+ return FcFalse;
+ }
+- if ((sublist = FcStrListCreate (subdirs)))
++ if (subdirs->num == 0)
++ ret = FcTrue;
++ else if ((sublist = FcStrListCreate (subdirs)))
+ {
+ while ((subdir = FcStrListNext (sublist)))
+ {
+diff --git a/src/fcdir.c b/src/fcdir.c
+index 00dee72..2e7f0dc 100644
+--- a/src/fcdir.c
++++ b/src/fcdir.c
+@@ -136,6 +136,8 @@ FcFileScanFontConfig (FcFontSet *set,
+ ret = FcFalse;
+ }
+ }
++ else
++ ret = FcFalse;
+ id++;
+ } while (font && ret && id < count);
+ return ret;
+diff --git a/test/Makefile.am b/test/Makefile.am
+index f270b50..bf1ec24 100644
+--- a/test/Makefile.am
++++ b/test/Makefile.am
+@@ -24,6 +24,13 @@ test_pthread_LDADD = $(top_builddir)/src/libfontconfig.la
+ # to meaningfully test anything, and we are not installed yet.
+ #TESTS += test-pthread
+ endif
++check_PROGRAMS += test-bz89617
++test_bz89617_CFLAGS = \
++ -DSRCDIR="\"$(abs_srcdir)\""
++
++test_bz89617_LDADD = $(top_builddir)/src/libfontconfig.la
++TESTS += test-bz89617
++
+ noinst_PROGRAMS = $(check_PROGRAMS)
+
+ if !OS_WIN32
+diff --git a/test/test-bz89617.c b/test/test-bz89617.c
+new file mode 100644
+index 0000000..389f470
+--- /dev/null
++++ b/test/test-bz89617.c
+@@ -0,0 +1,38 @@
++/*
++ * fontconfig/test/test-bz89617.c
++ *
++ * Copyright © 2000 Keith Packard
++ * Copyright © 2015 Akira TAGOH
++ *
++ * Permission to use, copy, modify, distribute, and sell this software and its
++ * documentation for any purpose is hereby granted without fee, provided that
++ * the above copyright notice appear in all copies and that both that
++ * copyright notice and this permission notice appear in supporting
++ * documentation, and that the name of the author(s) not be used in
++ * advertising or publicity pertaining to distribution of the software without
++ * specific, written prior permission. The authors make no
++ * representations about the suitability of this software for any purpose. It
++ * is provided "as is" without express or implied warranty.
++ *
++ * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
++ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
++ * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
++ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
++ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
++ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
++ * PERFORMANCE OF THIS SOFTWARE.
++ */
++#include <stdio.h>
++#include <fontconfig/fontconfig.h>
++
++int
++main (void)
++{
++ FcConfig *config = FcConfigGetCurrent ();
++
++ if (!FcConfigAppFontAddFile (config, SRCDIR "/4x6.pcf") ||
++ FcConfigAppFontAddFile (config, "/dev/null"))
++ return 1;
++
++ return 0;
++}
+--
+cgit v0.10.2
+
diff --git a/media-libs/fontconfig/files/fontconfig-2.11.93-fix-sigfpe.patch b/media-libs/fontconfig/files/fontconfig-2.11.93-fix-sigfpe.patch
new file mode 100644
index 000000000000..e5a5558e2c49
--- /dev/null
+++ b/media-libs/fontconfig/files/fontconfig-2.11.93-fix-sigfpe.patch
@@ -0,0 +1,22 @@
+From 7bc07cf6c2a5685ab95f146f5af2b3bcd5f5864d Mon Sep 17 00:00:00 2001
+From: Akira TAGOH <akira@tagoh.org>
+Date: Mon, 30 Mar 2015 15:18:44 +0900
+Subject: Fix SIGFPE
+
+
+diff --git a/src/fcrange.c b/src/fcrange.c
+index 37cf067..9b1b67b 100644
+--- a/src/fcrange.c
++++ b/src/fcrange.c
+@@ -204,7 +204,7 @@ FcRangeHash (const FcRange *r)
+ {
+ FcRange c = FcRangeCanonicalize (r);
+ int b = (int) (c.u.d.begin * 100);
+- int e = (int) (c.u.d.end * 100);
++ int e = FcDoubleCmpEQ (c.u.d.end, DBL_MAX) ? INT_MAX : (int) (c.u.d.end * 100);
+
+ return b ^ (b << 1) ^ (e << 9);
+ }
+--
+cgit v0.10.2
+
diff --git a/media-libs/fontconfig/files/fontconfig-2.11.93-latin-update.patch b/media-libs/fontconfig/files/fontconfig-2.11.93-latin-update.patch
new file mode 100644
index 000000000000..033fe895bc10
--- /dev/null
+++ b/media-libs/fontconfig/files/fontconfig-2.11.93-latin-update.patch
@@ -0,0 +1,67 @@
+--- fontconfig-2.11.93.orig/conf.d/60-latin.conf 2015-04-18 20:06:06.070687989 +0800
++++ fontconfig-2.11.93/conf.d/60-latin.conf 2015-04-18 20:14:15.245732796 +0800
+@@ -4,46 +4,49 @@
+ <alias>
+ <family>serif</family>
+ <prefer>
+- <family>Bitstream Vera Serif</family>
++ <family>Liberation Serif</family>
+ <family>DejaVu Serif</family>
+ <family>Times New Roman</family>
+- <family>Thorndale AMT</family>
+ <family>Luxi Serif</family>
+ <family>Nimbus Roman No9 L</family>
+ <family>Nimbus Roman</family>
+ <family>Times</family>
++ <family>Thorndale AMT</family>
++ <family>Bitstream Vera Serif</family>
+ </prefer>
+ </alias>
+ <alias>
+ <family>sans-serif</family>
+ <prefer>
+- <family>Bitstream Vera Sans</family>
++ <family>Liberation Sans</family>
+ <family>DejaVu Sans</family>
+- <family>Verdana</family>
+ <family>Arial</family>
+- <family>Albany AMT</family>
+ <family>Luxi Sans</family>
+ <family>Nimbus Sans L</family>
+ <family>Nimbus Sans</family>
+ <family>Helvetica</family>
+ <family>Lucida Sans Unicode</family>
+ <family>BPG Glaho International</family> <!-- lat,cyr,arab,geor -->
++ <family>Verdana</family>
+ <family>Tahoma</family> <!-- lat,cyr,greek,heb,arab,thai -->
++ <family>Albany AMT</family>
++ <family>Bitstream Vera Sans</family>
+ </prefer>
+ </alias>
+ <alias>
+ <family>monospace</family>
+ <prefer>
+- <family>Bitstream Vera Sans Mono</family>
++ <family>Liberation Mono</family>
+ <family>DejaVu Sans Mono</family>
+ <family>Inconsolata</family>
+ <family>Andale Mono</family>
+ <family>Courier New</family>
+- <family>Cumberland AMT</family>
+ <family>Luxi Mono</family>
+ <family>Nimbus Mono L</family>
+ <family>Nimbus Mono</family>
+ <family>Courier</family>
++ <family>Cumberland AMT</family>
++ <family>Bitstream Vera Sans Mono</family>
+ </prefer>
+ </alias>
+ <!--
+@@ -64,6 +67,7 @@
+ <alias>
+ <family>cursive</family>
+ <prefer>
++ <family>Comic Neue</family>
+ <family>ITC Zapf Chancery Std</family>
+ <family>Zapfino</family>
+ <family>Comic Sans MS</family>
diff --git a/media-libs/fontconfig/files/fontconfig-2.11.93-rmdead.patch b/media-libs/fontconfig/files/fontconfig-2.11.93-rmdead.patch
new file mode 100644
index 000000000000..388ecc6ee58a
--- /dev/null
+++ b/media-libs/fontconfig/files/fontconfig-2.11.93-rmdead.patch
@@ -0,0 +1,22 @@
+From 7301f2f02816c5d44ee75dd0689c806c5aabdbda Mon Sep 17 00:00:00 2001
+From: Akira TAGOH <akira@tagoh.org>
+Date: Mon, 23 Mar 2015 13:18:49 +0900
+Subject: Remove the dead code
+
+
+diff --git a/src/fcdir.c b/src/fcdir.c
+index 593382f..00dee72 100644
+--- a/src/fcdir.c
++++ b/src/fcdir.c
+@@ -136,8 +136,6 @@ FcFileScanFontConfig (FcFontSet *set,
+ ret = FcFalse;
+ }
+ }
+- else if (font)
+- FcPatternDestroy (font);
+ id++;
+ } while (font && ret && id < count);
+ return ret;
+--
+cgit v0.10.2
+
diff --git a/media-libs/fontconfig/files/fontconfig-2.3.2-docbook.patch b/media-libs/fontconfig/files/fontconfig-2.3.2-docbook.patch
new file mode 100644
index 000000000000..6a6c01e26f64
--- /dev/null
+++ b/media-libs/fontconfig/files/fontconfig-2.3.2-docbook.patch
@@ -0,0 +1,15 @@
+--- configure.in.old 2006-03-31 18:31:26.000000000 +0200
++++ configure.in 2006-03-31 18:44:47.000000000 +0200
+@@ -407,7 +407,11 @@
+ # Let people not build/install docs if they don't have docbook
+ #
+
+-AC_CHECK_PROG(HASDOCBOOK, docbook2html, yes, no)
++AC_ARG_ENABLE(docbook, [ --disable-docbook Don't build documentation],,)
++
++if test x$enable_docbook != xno; then
++ AC_CHECK_PROG(HASDOCBOOK, docbook2html, yes, no)
++fi
+
+ AM_CONDITIONAL(USEDOCBOOK, test "x$HASDOCBOOK" = xyes)
+
diff --git a/media-libs/fontconfig/files/fontconfig-2.7.1-latin-reorder.patch b/media-libs/fontconfig/files/fontconfig-2.7.1-latin-reorder.patch
new file mode 100644
index 000000000000..6ecf6cb9df6e
--- /dev/null
+++ b/media-libs/fontconfig/files/fontconfig-2.7.1-latin-reorder.patch
@@ -0,0 +1,50 @@
+diff -Naurp fontconfig-2.7.1-orig/conf.d/60-latin.conf fontconfig-2.7.1/conf.d/60-latin.conf
+--- fontconfig-2.7.1-orig/conf.d/60-latin.conf 2009-07-10 11:09:33.000000000 -0600
++++ fontconfig-2.7.1/conf.d/60-latin.conf 2009-08-16 15:25:38.347701112 -0600
+@@ -4,8 +4,8 @@
+ <alias>
+ <family>serif</family>
+ <prefer>
+- <family>Bitstream Vera Serif</family>
+ <family>DejaVu Serif</family>
++ <family>Bitstream Vera Serif</family>
+ <family>Times New Roman</family>
+ <family>Thorndale AMT</family>
+ <family>Luxi Serif</family>
+@@ -16,14 +16,14 @@
+ <alias>
+ <family>sans-serif</family>
+ <prefer>
+- <family>Bitstream Vera Sans</family>
+ <family>DejaVu Sans</family>
+- <family>Verdana</family>
+- <family>Arial</family>
+- <family>Albany AMT</family>
++ <family>Bitstream Vera Sans</family>
+ <family>Luxi Sans</family>
+ <family>Nimbus Sans L</family>
++ <family>Arial</family>
++ <family>Albany AMT</family>
+ <family>Helvetica</family>
++ <family>Verdana</family>
+ <family>Lucida Sans Unicode</family>
+ <family>BPG Glaho International</family> <!-- lat,cyr,arab,geor -->
+ <family>Tahoma</family> <!-- lat,cyr,greek,heb,arab,thai -->
+@@ -32,14 +32,14 @@
+ <alias>
+ <family>monospace</family>
+ <prefer>
+- <family>Bitstream Vera Sans Mono</family>
+ <family>DejaVu Sans Mono</family>
++ <family>Bitstream Vera Sans Mono</family>
+ <family>Inconsolata</family>
++ <family>Luxi Mono</family>
++ <family>Nimbus Mono L</family>
+ <family>Andale Mono</family>
+ <family>Courier New</family>
+ <family>Cumberland AMT</family>
+- <family>Luxi Mono</family>
+- <family>Nimbus Mono L</family>
+ <family>Courier</family>
+ </prefer>
+ </alias>
diff --git a/media-libs/fontconfig/files/fontconfig-2.8.0-urw-aliases.patch b/media-libs/fontconfig/files/fontconfig-2.8.0-urw-aliases.patch
new file mode 100644
index 000000000000..76a4aaafb0ce
--- /dev/null
+++ b/media-libs/fontconfig/files/fontconfig-2.8.0-urw-aliases.patch
@@ -0,0 +1,18 @@
+http://bugs.freedesktop.org/19128
+http://bugs.gentoo.org/303591
+http://bugzilla.redhat.com/468565
+http://bugzilla.gnome.org/502664
+
+--- a/conf.d/30-urw-aliases.conf
++++ b/conf.d/30-urw-aliases.conf
+@@ -29,6 +29,10 @@
+ <family>Zapf Dingbats</family>
+ <accept><family>Dingbats</family></accept>
+ </alias>
++ <alias binding="same">
++ <family>ZapfDingbats</family>
++ <accept><family>Dingbats</family></accept>
++ </alias>
+ <match target="pattern">
+ <test name="family">
+ <string>Symbol</string>
diff --git a/media-libs/fontconfig/fontconfig-2.11.1-r2.ebuild b/media-libs/fontconfig/fontconfig-2.11.1-r2.ebuild
new file mode 100644
index 000000000000..b812a0a73859
--- /dev/null
+++ b/media-libs/fontconfig/fontconfig-2.11.1-r2.ebuild
@@ -0,0 +1,160 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+AUTOTOOLS_AUTORECONF=yes
+
+inherit eutils readme.gentoo autotools-multilib
+
+DESCRIPTION="A library for configuring and customizing font access"
+HOMEPAGE="http://fontconfig.org/"
+SRC_URI="http://fontconfig.org/release/${P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="1.0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+IUSE="doc static-libs"
+
+# Purposefully dropped the xml USE flag and libxml2 support. Expat is the
+# default and used by every distro. See bug #283191.
+
+RDEPEND=">=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
+ >=media-libs/freetype-2.5.3-r1[${MULTILIB_USEDEP}]
+ abi_x86_32? ( !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? (
+ =app-text/docbook-sgml-dtd-3.1*
+ app-text/docbook-sgml-utils[jadetex]
+ )"
+PDEPEND="!x86-winnt? ( app-eselect/eselect-fontconfig )
+ virtual/ttf-fonts"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.7.1-latin-reorder.patch # 130466
+ "${FILESDIR}"/${PN}-2.10.2-docbook.patch # 310157
+ "${FILESDIR}"/${PN}-2.11.1-fc-cache-r.patch # 531748
+)
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/fc-cache
+)
+
+pkg_setup() {
+ DOC_CONTENTS="Please make fontconfig configuration changes using
+ \`eselect fontconfig\`. Any changes made to /etc/fonts/fonts.conf will be
+ overwritten. If you need to reset your configuration to upstream defaults,
+ delete the directory ${EROOT}etc/fonts/conf.d/ and re-emerge fontconfig."
+}
+
+src_configure() {
+ local addfonts
+ # harvest some font locations, such that users can benefit from the
+ # host OS's installed fonts
+ case ${CHOST} in
+ *-darwin*)
+ addfonts=",/Library/Fonts,/System/Library/Fonts"
+ ;;
+ *-solaris*)
+ [[ -d /usr/X/lib/X11/fonts/TrueType ]] && \
+ addfonts=",/usr/X/lib/X11/fonts/TrueType"
+ [[ -d /usr/X/lib/X11/fonts/Type1 ]] && \
+ addfonts="${addfonts},/usr/X/lib/X11/fonts/Type1"
+ ;;
+ *-linux-gnu)
+ use prefix && [[ -d /usr/share/fonts ]] && \
+ addfonts=",/usr/share/fonts"
+ ;;
+ esac
+
+ local myeconfargs=(
+ $(use_enable doc docbook)
+ # always enable docs to install manpages
+ --enable-docs
+ --localstatedir="${EPREFIX}"/var
+ --with-default-fonts="${EPREFIX}"/usr/share/fonts
+ --with-add-fonts="${EPREFIX}/usr/local/share/fonts${addfonts}" \
+ --with-templatedir="${EPREFIX}"/etc/fonts/conf.avail
+ )
+
+ autotools-multilib_src_configure
+}
+
+multilib_src_install() {
+ default
+
+ # XXX: avoid calling this multiple times, bug #459210
+ if multilib_is_native_abi; then
+ # stuff installed from build-dir
+ emake -C doc DESTDIR="${D}" install-man
+
+ insinto /etc/fonts
+ doins fonts.conf
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ prune_libtool_files --all
+
+ #fc-lang directory contains language coverage datafiles
+ #which are needed to test the coverage of fonts.
+ insinto /usr/share/fc-lang
+ doins fc-lang/*.orth
+
+ dodoc doc/fontconfig-user.{txt,pdf}
+
+ if [[ -e ${ED}usr/share/doc/fontconfig/ ]]; then
+ mv "${ED}"usr/share/doc/fontconfig/* "${ED}"/usr/share/doc/${P} || die
+ rm -rf "${ED}"usr/share/doc/fontconfig
+ fi
+
+ # Changes should be made to /etc/fonts/local.conf, and as we had
+ # too much problems with broken fonts.conf we force update it ...
+ echo 'CONFIG_PROTECT_MASK="/etc/fonts/fonts.conf"' > "${T}"/37fontconfig
+ doenvd "${T}"/37fontconfig
+
+ # As of fontconfig 2.7, everything sticks their noses in here.
+ dodir /etc/sandbox.d
+ echo 'SANDBOX_PREDICT="/var/cache/fontconfig"' > "${ED}"/etc/sandbox.d/37fontconfig
+
+ readme.gentoo_create_doc
+}
+
+pkg_preinst() {
+ # Bug #193476
+ # /etc/fonts/conf.d/ contains symlinks to ../conf.avail/ to include various
+ # config files. If we install as-is, we'll blow away user settings.
+ ebegin "Syncing fontconfig configuration to system"
+ if [[ -e ${EROOT}/etc/fonts/conf.d ]]; then
+ for file in "${EROOT}"/etc/fonts/conf.avail/*; do
+ f=${file##*/}
+ if [[ -L ${EROOT}/etc/fonts/conf.d/${f} ]]; then
+ [[ -f ${ED}etc/fonts/conf.avail/${f} ]] \
+ && ln -sf ../conf.avail/"${f}" "${ED}"etc/fonts/conf.d/ &>/dev/null
+ else
+ [[ -f ${ED}etc/fonts/conf.avail/${f} ]] \
+ && rm "${ED}"etc/fonts/conf.d/"${f}" &>/dev/null
+ fi
+ done
+ fi
+ eend $?
+}
+
+pkg_postinst() {
+ einfo "Cleaning broken symlinks in "${EROOT}"etc/fonts/conf.d/"
+ find -L "${EROOT}"etc/fonts/conf.d/ -type l -delete
+
+ readme.gentoo_print_elog
+
+ if [[ ${ROOT} = / ]]; then
+ multilib_pkg_postinst() {
+ ebegin "Creating global font cache for ${ABI}"
+ "${EPREFIX}"/usr/bin/${CHOST}-fc-cache -srf
+ eend $?
+ }
+
+ multilib_parallel_foreach_abi multilib_pkg_postinst
+ fi
+}
diff --git a/media-libs/fontconfig/fontconfig-2.11.93.ebuild b/media-libs/fontconfig/fontconfig-2.11.93.ebuild
new file mode 100644
index 000000000000..c5a899d0cf1b
--- /dev/null
+++ b/media-libs/fontconfig/fontconfig-2.11.93.ebuild
@@ -0,0 +1,155 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+AUTOTOOLS_AUTORECONF=yes
+inherit eutils readme.gentoo autotools-multilib
+
+DESCRIPTION="A library for configuring and customizing font access"
+HOMEPAGE="http://fontconfig.org/"
+SRC_URI="http://fontconfig.org/release/${P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="1.0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+IUSE="doc static-libs"
+
+# Purposefully dropped the xml USE flag and libxml2 support. Expat is the
+# default and used by every distro. See bug #283191.
+RDEPEND=">=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
+ >=media-libs/freetype-2.5.3-r1[${MULTILIB_USEDEP}]
+ abi_x86_32? ( !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( =app-text/docbook-sgml-dtd-3.1*
+ app-text/docbook-sgml-utils[jadetex] )"
+PDEPEND="!x86-winnt? ( app-eselect/eselect-fontconfig )
+ virtual/ttf-fonts"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.10.2-docbook.patch # 310157
+ "${FILESDIR}"/${PN}-2.11.93-latin-update.patch # 130466 + make liberation default
+ "${FILESDIR}"/${PN}-2.11.93-rmdead.patch # these 3 are upstream, in next release
+ "${FILESDIR}"/${PN}-2.11.93-addfile.patch
+ "${FILESDIR}"/${PN}-2.11.93-fix-sigfpe.patch
+)
+
+MULTILIB_CHOST_TOOLS=( /usr/bin/fc-cache )
+
+pkg_setup() {
+ DOC_CONTENTS="Please make fontconfig configuration changes using
+ \`eselect fontconfig\`. Any changes made to /etc/fonts/fonts.conf will be
+ overwritten. If you need to reset your configuration to upstream defaults,
+ delete the directory ${EROOT}etc/fonts/conf.d/ and re-emerge fontconfig."
+}
+
+src_configure() {
+ local addfonts
+ # harvest some font locations, such that users can benefit from the
+ # host OS's installed fonts
+ case ${CHOST} in
+ *-darwin*)
+ addfonts=",/Library/Fonts,/System/Library/Fonts"
+ ;;
+ *-solaris*)
+ [[ -d /usr/X/lib/X11/fonts/TrueType ]] && \
+ addfonts=",/usr/X/lib/X11/fonts/TrueType"
+ [[ -d /usr/X/lib/X11/fonts/Type1 ]] && \
+ addfonts="${addfonts},/usr/X/lib/X11/fonts/Type1"
+ ;;
+ *-linux-gnu)
+ use prefix && [[ -d /usr/share/fonts ]] && \
+ addfonts=",/usr/share/fonts"
+ ;;
+ esac
+
+ local myeconfargs=(
+ $(use_enable doc docbook)
+ --enable-docs
+ --localstatedir="${EPREFIX}"/var
+ --with-default-fonts="${EPREFIX}"/usr/share/fonts
+ --with-add-fonts="${EPREFIX}/usr/local/share/fonts${addfonts}" \
+ --with-templatedir="${EPREFIX}"/etc/fonts/conf.avail
+ )
+
+ autotools-multilib_src_configure
+}
+
+multilib_src_install() {
+ default
+
+ # avoid calling this multiple times, bug #459210
+ if multilib_is_native_abi; then
+ # stuff installed from build-dir
+ emake -C doc DESTDIR="${D}" install-man
+
+ insinto /etc/fonts
+ doins fonts.conf
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ prune_libtool_files --all
+
+ # fc-lang directory contains language coverage datafiles
+ # which are needed to test the coverage of fonts.
+ insinto /usr/share/fc-lang
+ doins fc-lang/*.orth
+
+ dodoc doc/fontconfig-user.{txt,pdf}
+
+ if [[ -e ${ED}usr/share/doc/fontconfig/ ]]; then
+ mv "${ED}"usr/share/doc/fontconfig/* "${ED}"/usr/share/doc/${P} || die
+ rm -rf "${ED}"usr/share/doc/fontconfig
+ fi
+
+ # Changes should be made to /etc/fonts/local.conf, and as we had
+ # too much problems with broken fonts.conf we force update it ...
+ echo 'CONFIG_PROTECT_MASK="/etc/fonts/fonts.conf"' > "${T}"/37fontconfig
+ doenvd "${T}"/37fontconfig
+
+ # As of fontconfig 2.7, everything sticks their noses in here.
+ dodir /etc/sandbox.d
+ echo 'SANDBOX_PREDICT="/var/cache/fontconfig"' > "${ED}"/etc/sandbox.d/37fontconfig
+
+ readme.gentoo_create_doc
+}
+
+pkg_preinst() {
+ # Bug #193476
+ # /etc/fonts/conf.d/ contains symlinks to ../conf.avail/ to include various
+ # config files. If we install as-is, we'll blow away user settings.
+ ebegin "Syncing fontconfig configuration to system"
+ if [[ -e ${EROOT}/etc/fonts/conf.d ]]; then
+ for file in "${EROOT}"/etc/fonts/conf.avail/*; do
+ f=${file##*/}
+ if [[ -L ${EROOT}/etc/fonts/conf.d/${f} ]]; then
+ [[ -f ${ED}etc/fonts/conf.avail/${f} ]] \
+ && ln -sf ../conf.avail/"${f}" "${ED}"etc/fonts/conf.d/ &>/dev/null
+ else
+ [[ -f ${ED}etc/fonts/conf.avail/${f} ]] \
+ && rm "${ED}"etc/fonts/conf.d/"${f}" &>/dev/null
+ fi
+ done
+ fi
+ eend $?
+}
+
+pkg_postinst() {
+ einfo "Cleaning broken symlinks in "${EROOT}"etc/fonts/conf.d/"
+ find -L "${EROOT}"etc/fonts/conf.d/ -type l -delete
+
+ readme.gentoo_print_elog
+
+ if [[ ${ROOT} = / ]]; then
+ multilib_pkg_postinst() {
+ ebegin "Creating global font cache for ${ABI}"
+ "${EPREFIX}"/usr/bin/${CHOST}-fc-cache -srf
+ eend $?
+ }
+
+ multilib_parallel_foreach_abi multilib_pkg_postinst
+ fi
+}
diff --git a/media-libs/fontconfig/fontconfig-2.11.94.ebuild b/media-libs/fontconfig/fontconfig-2.11.94.ebuild
new file mode 100644
index 000000000000..895cf5cce823
--- /dev/null
+++ b/media-libs/fontconfig/fontconfig-2.11.94.ebuild
@@ -0,0 +1,152 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+AUTOTOOLS_AUTORECONF=yes
+inherit eutils readme.gentoo autotools-multilib
+
+DESCRIPTION="A library for configuring and customizing font access"
+HOMEPAGE="http://fontconfig.org/"
+SRC_URI="http://fontconfig.org/release/${P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="1.0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+IUSE="doc static-libs"
+
+# Purposefully dropped the xml USE flag and libxml2 support. Expat is the
+# default and used by every distro. See bug #283191.
+RDEPEND=">=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
+ >=media-libs/freetype-2.5.3-r1[${MULTILIB_USEDEP}]
+ abi_x86_32? ( !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( =app-text/docbook-sgml-dtd-3.1*
+ app-text/docbook-sgml-utils[jadetex] )"
+PDEPEND="!x86-winnt? ( app-eselect/eselect-fontconfig )
+ virtual/ttf-fonts"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.10.2-docbook.patch # 310157
+ "${FILESDIR}"/${PN}-2.11.93-latin-update.patch # 130466 + make liberation default
+)
+
+MULTILIB_CHOST_TOOLS=( /usr/bin/fc-cache )
+
+pkg_setup() {
+ DOC_CONTENTS="Please make fontconfig configuration changes using
+ \`eselect fontconfig\`. Any changes made to /etc/fonts/fonts.conf will be
+ overwritten. If you need to reset your configuration to upstream defaults,
+ delete the directory ${EROOT}etc/fonts/conf.d/ and re-emerge fontconfig."
+}
+
+src_configure() {
+ local addfonts
+ # harvest some font locations, such that users can benefit from the
+ # host OS's installed fonts
+ case ${CHOST} in
+ *-darwin*)
+ addfonts=",/Library/Fonts,/System/Library/Fonts"
+ ;;
+ *-solaris*)
+ [[ -d /usr/X/lib/X11/fonts/TrueType ]] && \
+ addfonts=",/usr/X/lib/X11/fonts/TrueType"
+ [[ -d /usr/X/lib/X11/fonts/Type1 ]] && \
+ addfonts="${addfonts},/usr/X/lib/X11/fonts/Type1"
+ ;;
+ *-linux-gnu)
+ use prefix && [[ -d /usr/share/fonts ]] && \
+ addfonts=",/usr/share/fonts"
+ ;;
+ esac
+
+ local myeconfargs=(
+ $(use_enable doc docbook)
+ --enable-docs
+ --localstatedir="${EPREFIX}"/var
+ --with-default-fonts="${EPREFIX}"/usr/share/fonts
+ --with-add-fonts="${EPREFIX}/usr/local/share/fonts${addfonts}" \
+ --with-templatedir="${EPREFIX}"/etc/fonts/conf.avail
+ )
+
+ autotools-multilib_src_configure
+}
+
+multilib_src_install() {
+ default
+
+ # avoid calling this multiple times, bug #459210
+ if multilib_is_native_abi; then
+ # stuff installed from build-dir
+ emake -C doc DESTDIR="${D}" install-man
+
+ insinto /etc/fonts
+ doins fonts.conf
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ prune_libtool_files --all
+
+ # fc-lang directory contains language coverage datafiles
+ # which are needed to test the coverage of fonts.
+ insinto /usr/share/fc-lang
+ doins fc-lang/*.orth
+
+ dodoc doc/fontconfig-user.{txt,pdf}
+
+ if [[ -e ${ED}usr/share/doc/fontconfig/ ]]; then
+ mv "${ED}"usr/share/doc/fontconfig/* "${ED}"/usr/share/doc/${P} || die
+ rm -rf "${ED}"usr/share/doc/fontconfig
+ fi
+
+ # Changes should be made to /etc/fonts/local.conf, and as we had
+ # too much problems with broken fonts.conf we force update it ...
+ echo 'CONFIG_PROTECT_MASK="/etc/fonts/fonts.conf"' > "${T}"/37fontconfig
+ doenvd "${T}"/37fontconfig
+
+ # As of fontconfig 2.7, everything sticks their noses in here.
+ dodir /etc/sandbox.d
+ echo 'SANDBOX_PREDICT="/var/cache/fontconfig"' > "${ED}"/etc/sandbox.d/37fontconfig
+
+ readme.gentoo_create_doc
+}
+
+pkg_preinst() {
+ # Bug #193476
+ # /etc/fonts/conf.d/ contains symlinks to ../conf.avail/ to include various
+ # config files. If we install as-is, we'll blow away user settings.
+ ebegin "Syncing fontconfig configuration to system"
+ if [[ -e ${EROOT}/etc/fonts/conf.d ]]; then
+ for file in "${EROOT}"/etc/fonts/conf.avail/*; do
+ f=${file##*/}
+ if [[ -L ${EROOT}/etc/fonts/conf.d/${f} ]]; then
+ [[ -f ${ED}etc/fonts/conf.avail/${f} ]] \
+ && ln -sf ../conf.avail/"${f}" "${ED}"etc/fonts/conf.d/ &>/dev/null
+ else
+ [[ -f ${ED}etc/fonts/conf.avail/${f} ]] \
+ && rm "${ED}"etc/fonts/conf.d/"${f}" &>/dev/null
+ fi
+ done
+ fi
+ eend $?
+}
+
+pkg_postinst() {
+ einfo "Cleaning broken symlinks in "${EROOT}"etc/fonts/conf.d/"
+ find -L "${EROOT}"etc/fonts/conf.d/ -type l -delete
+
+ readme.gentoo_print_elog
+
+ if [[ ${ROOT} = / ]]; then
+ multilib_pkg_postinst() {
+ ebegin "Creating global font cache for ${ABI}"
+ "${EPREFIX}"/usr/bin/${CHOST}-fc-cache -srf
+ eend $?
+ }
+
+ multilib_parallel_foreach_abi multilib_pkg_postinst
+ fi
+}
diff --git a/media-libs/fontconfig/metadata.xml b/media-libs/fontconfig/metadata.xml
new file mode 100644
index 000000000000..a46832ff9ef6
--- /dev/null
+++ b/media-libs/fontconfig/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>fonts</herd>
+ <maintainer>
+ <email>yngwin@gentoo.org</email>
+ <name>Ben de Groot</name>
+ </maintainer>
+ <maintainer>
+ <email>multilib@gentoo.org</email>
+ <name>gx86-multilib project</name>
+ <description>Handling the bugs related to multilib support in the package and related changes.</description>
+ </maintainer>
+ <longdescription>Fontconfig is a font configuration and customization library, which does not depend on the X Window System. It is designed to locate fonts within the system and select them according to requirements specified by applications.</longdescription>
+</pkgmetadata>
diff --git a/media-libs/freealut/Manifest b/media-libs/freealut/Manifest
new file mode 100644
index 000000000000..36cea9e8a167
--- /dev/null
+++ b/media-libs/freealut/Manifest
@@ -0,0 +1 @@
+DIST freealut-1.1.0.tar.gz 461830 SHA256 60d1ea8779471bb851b89b49ce44eecb78e46265be1a6e9320a28b100c8df44f SHA512 270f74972548b4ac6b98c52c51787ed43c20cf79979063d073bbee7bd08ac4f34c2b579fbf15c09c4e606a5ed38dcd0252f5c46fb3cfe43b727b6b53cf747933 WHIRLPOOL 3b3526fc4c95d985dae47e50bc10073a1d35f1d3d1602b011db721be47ef60d911ad70356e3abf575902a70fad5e8254d150a3b976d6f8c61fde7417ddeffd51
diff --git a/media-libs/freealut/freealut-1.1.0-r3.ebuild b/media-libs/freealut/freealut-1.1.0-r3.ebuild
new file mode 100644
index 000000000000..995f6cac4780
--- /dev/null
+++ b/media-libs/freealut/freealut-1.1.0-r3.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 eutils autotools multilib-minimal
+
+DESCRIPTION="The OpenAL Utility Toolkit"
+HOMEPAGE="http://www.openal.org/"
+SRC_URI="http://connect.creativelabs.com/openal/Downloads/ALUT/${P}.tar.gz"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux"
+IUSE="static-libs"
+
+RDEPEND="
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ !<=app-emulation/emul-linux-x86-sdl-20140406
+ )
+ >=media-libs/openal-1.15.1[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ # Link against openal and pthread
+ sed -i -e 's/libalut_la_LIBADD = .*/& -lopenal -lpthread/' src/Makefile.am
+ AT_M4DIR="${S}/admin/autotools/m4" eautoreconf
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE=${S} econf \
+ $(use_enable static-libs static)
+}
+
+multilib_src_install_all() {
+ dohtml doc/*
+ prune_libtool_files
+}
diff --git a/media-libs/freealut/metadata.xml b/media-libs/freealut/metadata.xml
new file mode 100644
index 000000000000..ae573a60407f
--- /dev/null
+++ b/media-libs/freealut/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>sound</herd>
+</pkgmetadata>
diff --git a/media-libs/freeglut/Manifest b/media-libs/freeglut/Manifest
new file mode 100644
index 000000000000..0a15bde2c8b4
--- /dev/null
+++ b/media-libs/freeglut/Manifest
@@ -0,0 +1,2 @@
+DIST freeglut-2.8.1.tar.gz 1005343 SHA256 dde46626a62a1cd9cf48a11951cdd592e7067c345cffe193a149dfd47aef999a SHA512 935fddfa197c5f0ec74c5f2005fe5a0ebfd39f4a402cc79363da7cfe2e8576263130e44bd7e4f6c07ea53d3137bd7ca8ee8db85c0a09f25508fcf1b9ed07052e WHIRLPOOL f191f870fa85b867f17ac3b69d18be386dd020b5f9c0fbc58814718986760570aa93cf4b2790daf944587d95a60408892fe68bd56f0dcc3f0f154c8a1ae33256
+DIST freeglut-3.0.0.tar.gz 419095 SHA256 2a43be8515b01ea82bcfa17d29ae0d40bd128342f0930cd1f375f1ff999f76a2 SHA512 9c45d5b203b26a7ff92331b3e080a48e806c92fbbe7c65d9262dd18c39cd6efdad8a795a80f499a2d23df84b4909dbd7c1bab20d7dd3555d3d88782ce9dd15b0 WHIRLPOOL 15ff1910fbb1bbcc2017da15c7d8b3436d543bd1901007e66159645560c5811eeb5da8f757a83d4503c37db4158ad3b61889a8976ddd3231213c427c4982fcbd
diff --git a/media-libs/freeglut/files/freeglut-2.4.0-bsd-usb-joystick.patch b/media-libs/freeglut/files/freeglut-2.4.0-bsd-usb-joystick.patch
new file mode 100644
index 000000000000..08aa1326ebc5
--- /dev/null
+++ b/media-libs/freeglut/files/freeglut-2.4.0-bsd-usb-joystick.patch
@@ -0,0 +1,16 @@
+We disable BSD usb joystick support until upstream has a better support for it
+so that it can at least build. For now it builds but does not link to libusbhid
+so that libglut.so has undefined references to hid_* symbols and causes linking
+errors later on in the build process.
+
+--- freeglut-2.4.0/src/freeglut_joystick.c.old 2008-08-08 15:26:15 +0000
++++ freeglut-2.4.0/src/freeglut_joystick.c 2008-08-08 15:26:32 +0000
+@@ -78,7 +78,7 @@
+ # include <errno.h>
+ # if defined(__FreeBSD__) || defined(__NetBSD__)
+ /* XXX The below hack is done until freeglut's autoconf is updated. */
+-# define HAVE_USB_JS 1
++# undef HAVE_USB_JS
+
+ # if defined(__FreeBSD__) && __FreeBSD_version >= 500000
+ # include <sys/joystick.h>
diff --git a/media-libs/freeglut/freeglut-2.8.1-r1.ebuild b/media-libs/freeglut/freeglut-2.8.1-r1.ebuild
new file mode 100644
index 000000000000..1b5d167f04cb
--- /dev/null
+++ b/media-libs/freeglut/freeglut-2.8.1-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
+inherit autotools-multilib
+
+DESCRIPTION="A completely OpenSourced alternative to the OpenGL Utility Toolkit (GLUT) library"
+HOMEPAGE="http://freeglut.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="debug static-libs"
+
+RDEPEND=">=virtual/glu-9.0-r1[${MULTILIB_USEDEP}]
+ >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}]
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXi-1.7.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXrandr-1.4.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXxf86vm-1.1.3[${MULTILIB_USEDEP}]
+ abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ >=x11-proto/inputproto-2.3[${MULTILIB_USEDEP}]
+ >=x11-proto/xproto-7.0.24[${MULTILIB_USEDEP}]"
+
+PATCHES=(
+ # Please read the comments in the patch before thinking about dropping it
+ # yet again...
+ "${FILESDIR}"/${PN}-2.4.0-bsd-usb-joystick.patch
+)
+
+HTML_DOCS=( doc/. )
diff --git a/media-libs/freeglut/freeglut-3.0.0.ebuild b/media-libs/freeglut/freeglut-3.0.0.ebuild
new file mode 100644
index 000000000000..0a07712eb63c
--- /dev/null
+++ b/media-libs/freeglut/freeglut-3.0.0.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit cmake-multilib
+
+DESCRIPTION="A completely OpenSourced alternative to the OpenGL Utility Toolkit (GLUT) library"
+HOMEPAGE="http://freeglut.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="debug static-libs"
+
+# enabling GLES support seems to cause build failures
+RDEPEND=">=virtual/glu-9.0-r1[${MULTILIB_USEDEP}]
+ >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}]
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXi-1.7.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXrandr-1.4.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXxf86vm-1.1.3[${MULTILIB_USEDEP}]
+ abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] )"
+# gles? ( media-libs/mesa[gles1,${MULTILIB_USEDEP}] )
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ >=x11-proto/inputproto-2.3[${MULTILIB_USEDEP}]
+ >=x11-proto/xproto-7.0.24[${MULTILIB_USEDEP}]"
+
+HTML_DOCS=( doc/. )
+
+src_configure() {
+ local mycmakeargs=(
+ "-DFREEGLUT_GLES=OFF"
+ )
+# $(cmake-utils_use gles FREEGLUT_GLES)
+ cmake-multilib_src_configure
+}
diff --git a/media-libs/freeglut/metadata.xml b/media-libs/freeglut/metadata.xml
new file mode 100644
index 000000000000..2bac441ccc74
--- /dev/null
+++ b/media-libs/freeglut/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>x11</herd>
+ <longdescription>
+ Freeglut provides an open-source alternative to the OpenGL Utility Toolkit
+ (GLUT) library. It is actively developed and maintained, while not being
+ restricted by its license.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">freeglut</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/freeimage/Manifest b/media-libs/freeimage/Manifest
new file mode 100644
index 000000000000..f29f982ee07e
--- /dev/null
+++ b/media-libs/freeimage/Manifest
@@ -0,0 +1,3 @@
+DIST FreeImage3154.pdf 1007480 SHA256 455b0ba7cf571f3fc3027681a70abf3c2321d0a4fd7956c5ba58bd7ccb7b5373 SHA512 cebde5e2609c9a0c06b4e07e1c595d7d6714895095cd9935f59c8b2ff9b34116248f5453b41f469f6242d87cae79be82d59f6a9ec0f75b1ea3df61ac1f651b28 WHIRLPOOL a1e8b575d198b61e74db9eb31e9472460158e86989ed822c156cae3f625f6ea0d156e4b7ddffc8b7a1d16a601be39b4cf0e20558d36bb4dd73195fea4faa43e7
+DIST FreeImage3154.zip 5513923 SHA256 eb6361519d33131690a0e726b085a05825e5adf9fb72c752d8d39100e48dc829 SHA512 0db9eb7d0ed8e08e10ff4fa274c4484541ca119c3d437a85fdc3b2d9232bf14a7877c79b1e62c8c99278d7020a9f623c161f2342475f3ee526233404138112cc WHIRLPOOL 2747bb7a35d8de24a1a876616626a9e840495f06da836ce15135aafaa21bc1d8d9cece17f7512424b66edfcc521ed096ea85da5ea5b5b90b4c032bf080356b4d
+DIST freeimage-3.15.4-libjpeg-turbo.patch.gz 5386 SHA256 e33374db55d1de1f12357138c1a2dac750957c36da9ed6052c1a6084312737a6 SHA512 8b1be0d1b63c5e0dc4f6c841f569929d7a91738c29d86bb3c3f15dd7a5a198bdc5fc6612668ac6ed263674caae1e07520eae003a5adf7395e0539f2820d888f6 WHIRLPOOL 75b8f3486ae9ebf34e7467068b0d93d1a9cc4539e27c6cbb29b617d41459333b0dc263f4003a8d81628922c1fb562452dfa39829eef721898809d40ede9498a9
diff --git a/media-libs/freeimage/files/freeimage-3.15.4-raw.patch b/media-libs/freeimage/files/freeimage-3.15.4-raw.patch
new file mode 100644
index 000000000000..44f566627e2f
--- /dev/null
+++ b/media-libs/freeimage/files/freeimage-3.15.4-raw.patch
@@ -0,0 +1,16 @@
+https://bugs.gentoo.org/show_bug.cgi?id=458516
+
+--- FreeImage/Source/FreeImage.h
++++ FreeImage/Source/FreeImage.h
+@@ -141,8 +141,10 @@
+ typedef uint16_t WORD;
+ typedef uint32_t DWORD;
+ typedef int32_t LONG;
++#ifndef _LIBRAW_TYPES_H
+ typedef int64_t INT64;
+ typedef uint64_t UINT64;
++#endif
+ #else
+ // MS is not C99 ISO compliant
+ typedef long BOOL;
+
diff --git a/media-libs/freeimage/files/freeimage-3.15.4-unbundling.patch b/media-libs/freeimage/files/freeimage-3.15.4-unbundling.patch
new file mode 100644
index 000000000000..f770b7ecf773
--- /dev/null
+++ b/media-libs/freeimage/files/freeimage-3.15.4-unbundling.patch
@@ -0,0 +1,639 @@
+lots of fixes here:
+ - use system graphics libraries
+ - make all of them optional
+ - drop root users from install (fix user installs)
+ - make static lib build optional
+ - link with CXX and CXXFLAGS (since this is C++ code)
+
+--- Makefile.gnu
++++ Makefile.gnu
+@@ -11,7 +11,24 @@
+ # Converts cr/lf to just lf
+ DOS2UNIX = dos2unix
+
+-LIBRARIES = -lstdc++
++PKG_CONFIG ?= pkg-config
++
++USE_EXR ?= yes
++USE_JPEG ?= yes
++USE_JPEG2K ?= yes
++USE_MNG ?= yes
++USE_PNG ?= yes
++USE_TIFF ?= yes
++USE_RAW ?= yes
++
++LIBRARIES-yes = $(shell $(PKG_CONFIG) --libs zlib)
++LIBRARIES-$(USE_EXR) += $(shell $(PKG_CONFIG) --libs OpenEXR)
++LIBRARIES-$(USE_JPEG) += -ljpeg
++LIBRARIES-$(USE_JPEG2K) += $(shell $(PKG_CONFIG) --libs libopenjpeg)
++LIBRARIES-$(USE_MNG) += -lmng
++LIBRARIES-$(USE_PNG) += $(shell $(PKG_CONFIG) --libs libpng)
++LIBRARIES-$(USE_TIFF) += $(shell $(PKG_CONFIG) --libs libtiff-4 IlmBase)
++LIBRARIES-$(USE_RAW) += $(shell $(PKG_CONFIG) --libs libraw)
+
+ MODULES = $(SRCS:.c=.o)
+ MODULES := $(MODULES:.cpp=.o)
+@@ -64,13 +81,15 @@
+ $(AR) r $@ $(MODULES)
+
+ $(SHAREDLIB): $(MODULES)
+- $(CC) -s -shared -Wl,-soname,$(VERLIBNAME) $(LDFLAGS) -o $@ $(MODULES) $(LIBRARIES)
++ $(CXX) $(CXXFLAGS) -shared -Wl,-soname,$(VERLIBNAME) $(LDFLAGS) -o $@ $(MODULES) $(LIBRARIES-yes)
+
+ install:
+ install -d $(INCDIR) $(INSTALLDIR)
+- install -m 644 -o root -g root $(HEADER) $(INCDIR)
+- install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR)
+- install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR)
++ install -m 644 $(HEADER) $(INCDIR)
++ifneq ($(STATICLIB),)
++ install -m 644 $(STATICLIB) $(INSTALLDIR)
++endif
++ install -m 755 $(SHAREDLIB) $(INSTALLDIR)
+ ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME)
+ ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME)
+ # ldconfig
+--- Source/FreeImage/J2KHelper.cpp
++++ Source/FreeImage/J2KHelper.cpp
+@@ -21,7 +21,7 @@
+
+ #include "FreeImage.h"
+ #include "Utilities.h"
+-#include "../LibOpenJPEG/openjpeg.h"
++#include <openjpeg.h>
+
+ /**
+ Divide an integer by a power of 2 and round upwards
+--- Source/FreeImage/PluginEXR.cpp
++++ Source/FreeImage/PluginEXR.cpp
+@@ -22,16 +22,16 @@
+
+ #include "FreeImage.h"
+ #include "Utilities.h"
+-#include "../OpenEXR/IlmImf/ImfIO.h"
+-#include "../OpenEXR/Iex/Iex.h"
+-#include "../OpenEXR/IlmImf/ImfOutputFile.h"
+-#include "../OpenEXR/IlmImf/ImfInputFile.h"
+-#include "../OpenEXR/IlmImf/ImfRgbaFile.h"
+-#include "../OpenEXR/IlmImf/ImfChannelList.h"
+-#include "../OpenEXR/IlmImf/ImfRgba.h"
+-#include "../OpenEXR/IlmImf/ImfArray.h"
+-#include "../OpenEXR/IlmImf/ImfPreviewImage.h"
+-#include "../OpenEXR/Half/half.h"
++#include <ImfIO.h>
++#include <Iex.h>
++#include <ImfOutputFile.h>
++#include <ImfInputFile.h>
++#include <ImfRgbaFile.h>
++#include <ImfChannelList.h>
++#include <ImfRgba.h>
++#include <ImfArray.h>
++#include <ImfPreviewImage.h>
++#include <half.h>
+
+
+ // ==========================================================
+--- Source/FreeImage/PluginJ2K.cpp
++++ Source/FreeImage/PluginJ2K.cpp
+@@ -21,7 +21,7 @@
+
+ #include "FreeImage.h"
+ #include "Utilities.h"
+-#include "../LibOpenJPEG/openjpeg.h"
++#include <openjpeg.h>
+
+ // ==========================================================
+ // Plugin Interface
+--- Source/FreeImage/PluginJP2.cpp
++++ Source/FreeImage/PluginJP2.cpp
+@@ -21,7 +21,7 @@
+
+ #include "FreeImage.h"
+ #include "Utilities.h"
+-#include "../LibOpenJPEG/openjpeg.h"
++#include <openjpeg.h>
+
+ // ==========================================================
+ // Plugin Interface
+--- Source/FreeImage/PluginPNG.cpp
++++ Source/FreeImage/PluginPNG.cpp
+@@ -37,8 +37,8 @@
+
+ // ----------------------------------------------------------
+
+-#include "../ZLib/zlib.h"
+-#include "../LibPNG/png.h"
++#include <zlib.h>
++#include <png.h>
+
+ // ----------------------------------------------------------
+
+--- Source/transupp.c
++++ Source/transupp.c
+@@ -15,8 +15,7 @@
+ /* Although this file really shouldn't have access to the library internals,
+ * it's helpful to let it call jround_up() and jcopy_block_row().
+ */
+-#define JPEG_INTERNALS
+-
++#include <jerror.h>
+ #include "jinclude.h"
+ #include "jpeglib.h"
+ #include "transupp.h" /* My own external interface */
+--- Source/FreeImage/ZLibInterface.cpp
++++ Source/FreeImage/ZLibInterface.cpp
+@@ -19,10 +19,10 @@
+ // Use at your own risk!
+ // ==========================================================
+
+-#include "../ZLib/zlib.h"
++#include <zlib.h>
+ #include "FreeImage.h"
+ #include "Utilities.h"
+-#include "../ZLib/zutil.h" /* must be the last header because of error C3163 in VS2008 (_vsnprintf defined in stdio.h) */
++#define OS_CODE 0x03
+
+ /**
+ Compresses a source buffer into a target buffer, using the ZLib library.
+--- Source/FreeImage/PluginG3.cpp
++++ Source/FreeImage/PluginG3.cpp
+@@ -20,7 +20,7 @@
+ // Use at your own risk!
+ // ==========================================================
+
+-#include "../LibTIFF4/tiffiop.h"
++#include "tiffiop.h"
+
+ #include "FreeImage.h"
+ #include "Utilities.h"
+--- Source/FreeImage/PluginJPEG.cpp
++++ Source/FreeImage/PluginJPEG.cpp
+@@ -35,11 +35,15 @@
+ #undef FAR
+ #include <setjmp.h>
+
+-#include "../LibJPEG/jinclude.h"
+-#include "../LibJPEG/jpeglib.h"
+-#include "../LibJPEG/jerror.h"
++#include <string.h>
++#include <stdio.h>
++#include <jconfig.h>
++#include <jpeglib.h>
++#include <jerror.h>
+ }
+
++#define SIZEOF(object) ((size_t) sizeof(object))
++
+ #include "FreeImage.h"
+ #include "Utilities.h"
+
+--- Source/FreeImageToolkit/JPEGTransform.cpp
++++ Source/FreeImageToolkit/JPEGTransform.cpp
+@@ -25,10 +25,11 @@
+ #undef FAR
+ #include <setjmp.h>
+
+-#include "../LibJPEG/jinclude.h"
+-#include "../LibJPEG/jpeglib.h"
+-#include "../LibJPEG/jerror.h"
+-#include "../LibJPEG/transupp.h"
++#include <string.h>
++#include <stdio.h>
++#include <jpeglib.h>
++#include <jerror.h>
++#include "transupp.h"
+ }
+
+ #include "FreeImage.h"
+--- Makefile.fip
++++ Makefile.fip
+@@ -11,7 +11,24 @@
+ # Converts cr/lf to just lf
+ DOS2UNIX = dos2unix
+
+-LIBRARIES = -lstdc++
++PKG_CONFIG ?= pkg-config
++
++USE_EXR ?= yes
++USE_JPEG ?= yes
++USE_JPEG2K ?= yes
++USE_MNG ?= yes
++USE_PNG ?= yes
++USE_TIFF ?= yes
++USE_RAW ?= yes
++
++LIBRARIES-yes = $(shell $(PKG_CONFIG) --libs zlib)
++LIBRARIES-$(USE_EXR) += $(shell $(PKG_CONFIG) --libs OpenEXR)
++LIBRARIES-$(USE_JPEG) += -ljpeg
++LIBRARIES-$(USE_JPEG2K) += $(shell $(PKG_CONFIG) --libs libopenjpeg)
++LIBRARIES-$(USE_MNG) += -lmng
++LIBRARIES-$(USE_PNG) += $(shell $(PKG_CONFIG) --libs libpng)
++LIBRARIES-$(USE_TIFF) += $(shell $(PKG_CONFIG) --libs libtiff-4 IlmBase)
++LIBRARIES-$(USE_RAW) += $(shell $(PKG_CONFIG) --libs libraw)
+
+ MODULES = $(SRCS:.c=.o)
+ MODULES := $(MODULES:.cpp=.o)
+@@ -65,14 +82,18 @@
+ $(AR) r $@ $(MODULES)
+
+ $(SHAREDLIB): $(MODULES)
+- $(CC) -s -shared -Wl,-soname,$(VERLIBNAME) $(LDFLAGS) -o $@ $(MODULES) $(LIBRARIES)
++ $(CXX) $(CXXFLAGS) -shared -Wl,-soname,$(VERLIBNAME) $(LDFLAGS) -o $@ $(MODULES) $(LIBRARIES-yes)
+
+ install:
+ install -d $(INCDIR) $(INSTALLDIR)
+- install -m 644 -o root -g root $(HEADER) $(INCDIR)
+- install -m 644 -o root -g root $(HEADERFIP) $(INCDIR)
+- install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR)
+- install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR)
++ install -m 644 $(HEADER) $(INCDIR)
++ install -m 644 $(HEADERFIP) $(INCDIR)
++ifneq ($(STATICLIB),)
++ install -m 644 $(STATICLIB) $(INSTALLDIR)
++endif
++ install -m 755 $(SHAREDLIB) $(INSTALLDIR)
++ ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME)
++ ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME)
+
+ clean:
+ rm -f core Dist/*.* u2dtmp* $(MODULES) $(STATICLIB) $(SHAREDLIB) $(LIBNAME)
+--- Makefile.srcs
++++ Makefile.srcs
+@@ -1,6 +1,14 @@
++USE_EXR ?= yes
++USE_JPEG ?= yes
++USE_JPEG2K ?= yes
++USE_MNG ?= yes
++USE_PNG ?= yes
++USE_TIFF ?= yes
++USE_RAW ?= yes
++
+ VER_MAJOR = 3
+ VER_MINOR = 15.4
+-SRCS = \
++SRCS-yes = \
+ Source/FreeImage/BitmapAccess.cpp \
+ Source/FreeImage/ColorLookup.cpp \
+ Source/FreeImage/FreeImage.cpp \
+@@ -17,36 +25,74 @@ SRCS = \
+ Source/FreeImage/GetType.cpp \
+ Source/FreeImage/MemoryIO.cpp \
+ Source/FreeImage/PixelAccess.cpp \
++
++SRCS-$(USE_JPEG2K) += \
+ Source/FreeImage/J2KHelper.cpp \
++
++SRCS-$(USE_MNG) += \
+ Source/FreeImage/MNGHelper.cpp \
++
++SRCS-yes += \
+ Source/FreeImage/Plugin.cpp \
+ Source/FreeImage/PluginBMP.cpp \
+ Source/FreeImage/PluginCUT.cpp \
+ Source/FreeImage/PluginDDS.cpp \
++
++SRCS-$(USE_EXR) += \
+ Source/FreeImage/PluginEXR.cpp \
++
++SRCS-$(USE_TIFF) += \
+ Source/FreeImage/PluginG3.cpp \
++
++SRCS-yes += \
+ Source/FreeImage/PluginGIF.cpp \
+ Source/FreeImage/PluginHDR.cpp \
+ Source/FreeImage/PluginICO.cpp \
+ Source/FreeImage/PluginIFF.cpp \
++
++SRCS-$(USE_JPEG2K) += \
+ Source/FreeImage/PluginJ2K.cpp \
++
++SRCS-$(USE_MNG) += \
+ Source/FreeImage/PluginJNG.cpp \
++
++SRCS-$(USE_JPEG2K) += \
+ Source/FreeImage/PluginJP2.cpp \
++
++SRCS-$(USE_JPEG) += \
+ Source/FreeImage/PluginJPEG.cpp \
++
++SRCS-yes += \
+ Source/FreeImage/PluginKOALA.cpp \
++
++SRCS-$(USE_MNG) += \
+ Source/FreeImage/PluginMNG.cpp \
++
++SRCS-yes += \
+ Source/FreeImage/PluginPCD.cpp \
+ Source/FreeImage/PluginPCX.cpp \
+ Source/FreeImage/PluginPFM.cpp \
+ Source/FreeImage/PluginPICT.cpp \
++
++SRCS-$(USE_PNG) += \
+ Source/FreeImage/PluginPNG.cpp \
++
++SRCS-yes += \
+ Source/FreeImage/PluginPNM.cpp \
+ Source/FreeImage/PluginPSD.cpp \
+ Source/FreeImage/PluginRAS.cpp \
++
++SRCS-$(USE_RAW) += \
+ Source/FreeImage/PluginRAW.cpp \
++
++SRCS-yes += \
+ Source/FreeImage/PluginSGI.cpp \
+ Source/FreeImage/PluginTARGA.cpp \
++
++SRCS-$(USE_TIFF) += \
+ Source/FreeImage/PluginTIFF.cpp \
++
++SRCS-yes += \
+ Source/FreeImage/PluginWBMP.cpp \
+ Source/FreeImage/PluginXBM.cpp \
+ Source/FreeImage/PluginXPM.cpp \
+@@ -83,7 +129,11 @@ SRCS = \
+ Source/Metadata/IPTC.cpp \
+ Source/Metadata/TagConversion.cpp \
+ Source/Metadata/TagLib.cpp \
++
++SRCS-$(USE_TIFF) += \
+ Source/Metadata/XTIFF.cpp \
++
++SRCS-yes += \
+ Source/FreeImageToolkit/Background.cpp \
+ Source/FreeImageToolkit/BSplineRotate.cpp \
+ Source/FreeImageToolkit/Channels.cpp \
+@@ -92,10 +142,18 @@ SRCS = \
+ Source/FreeImageToolkit/CopyPaste.cpp \
+ Source/FreeImageToolkit/Display.cpp \
+ Source/FreeImageToolkit/Flip.cpp \
++
++SRCS-$(USE_JPEG) += \
+ Source/FreeImageToolkit/JPEGTransform.cpp \
++
++SRCS-yes += \
+ Source/FreeImageToolkit/MultigridPoissonSolver.cpp \
+ Source/FreeImageToolkit/Rescale.cpp \
+ Source/FreeImageToolkit/Resize.cpp \
++
++SRCS-$(USE_JPEG) += \
++ Source/transupp.c
++SRCS = $(SRCS-yes)
+ INCLS = \
+ Examples/OpenGL/TextureManager/TextureManager.h \
+ Examples/Plugin/PluginCradle.h \
+@@ -116,7 +174,17 @@
+ Wrapper/FreeImagePlus/test/fipTest.h \
+ TestAPI/TestSuite.h
+
+-INCLUDE = -I. \
++INCLUDE-yes = -I. \
+ -ISource \
+ -ISource/Metadata \
+ -ISource/FreeImageToolkit \
++
++INCLUDE-yes += $(shell $(PKG_CONFIG) --cflags-only-I zlib)
++INCLUDE-$(USE_EXR) += -DUSE_EXR $(shell $(PKG_CONFIG) --cflags-only-I OpenEXR)
++INCLUDE-$(USE_JPEG) += -DUSE_JPEG
++INCLUDE-$(USE_JPEG2K) += -DUSE_JPEG2K $(shell $(PKG_CONFIG) --cflags-only-I libopenjpeg)
++INCLUDE-$(USE_MNG) += -DUSE_MNG
++INCLUDE-$(USE_PNG) += -DUSE_PNG $(shell $(PKG_CONFIG) --cflags-only-I libpng)
++INCLUDE-$(USE_TIFF) += -DUSE_TIFF $(shell $(PKG_CONFIG) --cflags-only-I libtiff-4 IlmBase)
++INCLUDE-$(USE_RAW) += -DUSE_RAW $(shell $(PKG_CONFIG) --cflags-only-I libraw)
++INCLUDE = $(INCLUDE-yes)
+--- fipMakefile.srcs
++++ fipMakefile.srcs
+@@ -1,6 +1,14 @@
++USE_EXR ?= yes
++USE_JPEG ?= yes
++USE_JPEG2K ?= yes
++USE_MNG ?= yes
++USE_PNG ?= yes
++USE_TIFF ?= yes
++USE_RAW ?= yes
++
+ VER_MAJOR = 3
+ VER_MINOR = 15.4
+-SRCS = \
++SRCS-yes = \
+ Source/FreeImage/BitmapAccess.cpp \
+ Source/FreeImage/ColorLookup.cpp \
+ Source/FreeImage/FreeImage.cpp \
+@@ -9,36 +17,74 @@
+ Source/FreeImage/GetType.cpp \
+ Source/FreeImage/MemoryIO.cpp \
+ Source/FreeImage/PixelAccess.cpp \
++
++SRCS-$(USE_JPEG2K) += \
+ Source/FreeImage/J2KHelper.cpp \
++
++SRCS-$(USE_MNG) += \
+ Source/FreeImage/MNGHelper.cpp \
++
++SRCS-yes += \
+ Source/FreeImage/Plugin.cpp \
+ Source/FreeImage/PluginBMP.cpp \
+ Source/FreeImage/PluginCUT.cpp \
+ Source/FreeImage/PluginDDS.cpp \
++
++SRCS-$(USE_EXR) += \
+ Source/FreeImage/PluginEXR.cpp \
++
++SRCS-$(USE_TIFF) += \
+ Source/FreeImage/PluginG3.cpp \
++
++SRCS-yes += \
+ Source/FreeImage/PluginGIF.cpp \
+ Source/FreeImage/PluginHDR.cpp \
+ Source/FreeImage/PluginICO.cpp \
+ Source/FreeImage/PluginIFF.cpp \
++
++SRCS-$(USE_JPEG2K) += \
+ Source/FreeImage/PluginJ2K.cpp \
++
++SRCS-$(USE_MNG) += \
+ Source/FreeImage/PluginJNG.cpp \
++
++SRCS-$(USE_JPEG2K) += \
+ Source/FreeImage/PluginJP2.cpp \
++
++SRCS-$(USE_JPEG) += \
+ Source/FreeImage/PluginJPEG.cpp \
++
++SRCS-yes += \
+ Source/FreeImage/PluginKOALA.cpp \
++
++SRCS-$(USE_MNG) += \
+ Source/FreeImage/PluginMNG.cpp \
++
++SRCS-yes += \
+ Source/FreeImage/PluginPCD.cpp \
+ Source/FreeImage/PluginPCX.cpp \
+ Source/FreeImage/PluginPFM.cpp \
+ Source/FreeImage/PluginPICT.cpp \
++
++SRCS-$(USE_PNG) += \
+ Source/FreeImage/PluginPNG.cpp \
++
++SRCS-yes += \
+ Source/FreeImage/PluginPNM.cpp \
+ Source/FreeImage/PluginPSD.cpp \
+ Source/FreeImage/PluginRAS.cpp \
++
++SRCS-$(USE_RAW) += \
+ Source/FreeImage/PluginRAW.cpp \
++
++SRCS-yes += \
+ Source/FreeImage/PluginSGI.cpp \
+ Source/FreeImage/PluginTARGA.cpp \
++
++SRCS-$(USE_TIFF) += \
+ Source/FreeImage/PluginTIFF.cpp \
++
++SRCS-yes += \
+ Source/FreeImage/PluginWBMP.cpp \
+ Source/FreeImage/PluginXBM.cpp \
+ Source/FreeImage/PluginXPM.cpp \
+@@ -75,7 +121,11 @@
+ Source/Metadata/IPTC.cpp \
+ Source/Metadata/TagConversion.cpp \
+ Source/Metadata/TagLib.cpp \
++
++SRCS-$(USE_TIFF) += \
+ Source/Metadata/XTIFF.cpp \
++
++SRCS-yes += \
+ Source/FreeImageToolkit/Background.cpp \
+ Source/FreeImageToolkit/BSplineRotate.cpp \
+ Source/FreeImageToolkit/Channels.cpp \
+@@ -84,7 +134,11 @@
+ Source/FreeImageToolkit/CopyPaste.cpp \
+ Source/FreeImageToolkit/Display.cpp \
+ Source/FreeImageToolkit/Flip.cpp \
++
++SRCS-$(USE_JPEG) += \
+ Source/FreeImageToolkit/JPEGTransform.cpp \
++
++SRCS-yes += \
+ Source/FreeImageToolkit/MultigridPoissonSolver.cpp \
+ Source/FreeImageToolkit/Rescale.cpp \
+ Source/FreeImageToolkit/Resize.cpp \
+@@ -95,6 +149,11 @@
+ Wrapper/FreeImagePlus/src/fipTag.cpp \
+ Wrapper/FreeImagePlus/src/fipWinImage.cpp \
+ Wrapper/FreeImagePlus/src/FreeImagePlus.cpp
++
++SRCS-$(USE_JPEG) += \
++ Source/transupp.c
++
++SRCS = $(SRCS-yes)
+ INCLUDE = -I. \
+ -ISource \
+ -ISource/Metadata \
+--- Source/FreeImage/PluginRAW.cpp
++++ Source/FreeImage/PluginRAW.cpp
+@@ -19,7 +19,7 @@
+ // Use at your own risk!
+ // ==========================================================
+
+-#include "../LibRawLite/libraw/libraw.h"
++#include <libraw.h>
+
+ #include "FreeImage.h"
+ #include "Utilities.h"
+--- Source/Metadata/XTIFF.cpp
++++ Source/Metadata/XTIFF.cpp
+@@ -29,7 +29,7 @@
+ #pragma warning (disable : 4786) // identifier was truncated to 'number' characters
+ #endif
+
+-#include "../LibTIFF4/tiffiop.h"
++#include "tiffiop.h"
+
+ #include "FreeImage.h"
+ #include "Utilities.h"
+--- Source/FreeImage/PluginTIFF.cpp
++++ Source/FreeImage/PluginTIFF.cpp
+@@ -37,9 +37,9 @@
+
+ #include "FreeImage.h"
+ #include "Utilities.h"
+-#include "../LibTIFF4/tiffiop.h"
++#include "tiffiop.h"
+ #include "../Metadata/FreeImageTag.h"
+-#include "../OpenEXR/Half/half.h"
++#include <half.h>
+
+ #include "FreeImageIO.h"
+ #include "PSDParser.h"
+--- Source/tiffiop.h
++++ Source/tiffiop.h
+@@ -30,7 +30,9 @@
+ * ``Library-private'' definitions.
+ */
+
+-#include "tif_config.h"
++#include <tiffconf.h>
++#define HAVE_SEARCH_H
++#define HAVE_FCNTL_H
+
+ #ifdef HAVE_FCNTL_H
+ # include <fcntl.h>
+--- Source/FreeImage/Plugin.cpp
++++ Source/FreeImage/Plugin.cpp
+@@ -223,23 +223,33 @@
+ */
+ s_plugins->AddNode(InitBMP);
+ s_plugins->AddNode(InitICO);
++#ifdef USE_JPEG
+ s_plugins->AddNode(InitJPEG);
++#endif
++#ifdef USE_MNG
+ s_plugins->AddNode(InitJNG);
++#endif
+ s_plugins->AddNode(InitKOALA);
+ s_plugins->AddNode(InitIFF);
++#ifdef USE_MNG
+ s_plugins->AddNode(InitMNG);
++#endif
+ s_plugins->AddNode(InitPNM, NULL, "PBM", "Portable Bitmap (ASCII)", "pbm", "^P1");
+ s_plugins->AddNode(InitPNM, NULL, "PBMRAW", "Portable Bitmap (RAW)", "pbm", "^P4");
+ s_plugins->AddNode(InitPCD);
+ s_plugins->AddNode(InitPCX);
+ s_plugins->AddNode(InitPNM, NULL, "PGM", "Portable Greymap (ASCII)", "pgm", "^P2");
+ s_plugins->AddNode(InitPNM, NULL, "PGMRAW", "Portable Greymap (RAW)", "pgm", "^P5");
++#ifdef USE_PNG
+ s_plugins->AddNode(InitPNG);
++#endif
+ s_plugins->AddNode(InitPNM, NULL, "PPM", "Portable Pixelmap (ASCII)", "ppm", "^P3");
+ s_plugins->AddNode(InitPNM, NULL, "PPMRAW", "Portable Pixelmap (RAW)", "ppm", "^P6");
+ s_plugins->AddNode(InitRAS);
+ s_plugins->AddNode(InitTARGA);
++#ifdef USE_TIFF
+ s_plugins->AddNode(InitTIFF);
++#endif
+ s_plugins->AddNode(InitWBMP);
+ s_plugins->AddNode(InitPSD);
+ s_plugins->AddNode(InitCUT);
+@@ -248,14 +258,22 @@
+ s_plugins->AddNode(InitDDS);
+ s_plugins->AddNode(InitGIF);
+ s_plugins->AddNode(InitHDR);
++#ifdef USE_TIFF
+ s_plugins->AddNode(InitG3);
++#endif
+ s_plugins->AddNode(InitSGI);
++#ifdef USE_EXR
+ s_plugins->AddNode(InitEXR);
++#endif
++#ifdef USE_JPEG2K
+ s_plugins->AddNode(InitJ2K);
+ s_plugins->AddNode(InitJP2);
++#endif
+ s_plugins->AddNode(InitPFM);
+ s_plugins->AddNode(InitPICT);
++#ifdef USE_RAW
+ s_plugins->AddNode(InitRAW);
++#endif
+
+ // external plugin initialization
+
diff --git a/media-libs/freeimage/freeimage-3.15.4.ebuild b/media-libs/freeimage/freeimage-3.15.4.ebuild
new file mode 100644
index 000000000000..fd846cac22ad
--- /dev/null
+++ b/media-libs/freeimage/freeimage-3.15.4.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit toolchain-funcs eutils multilib
+
+MY_PN=FreeImage
+MY_PV=${PV//.}
+MY_P=${MY_PN}${MY_PV}
+
+DESCRIPTION="Image library supporting many formats"
+HOMEPAGE="http://freeimage.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.zip
+ mirror://sourceforge/${PN}/${MY_P}.pdf
+ http://dev.gentoo.org/~gienah/2big4tree/media-libs/freeimage/${PN}-3.15.4-libjpeg-turbo.patch.gz"
+
+LICENSE="|| ( GPL-2 FIPL-1.0 )"
+SLOT="0"
+KEYWORDS="amd64 ~arm x86 ~amd64-linux ~x86-linux"
+IUSE="jpeg jpeg2k mng openexr png raw static-libs tiff"
+
+# The tiff/ilmbase isn't a typo. The TIFF plugin cheats and
+# uses code from it to handle 16bit<->float conversions.
+RDEPEND="sys-libs/zlib
+ jpeg? ( virtual/jpeg )
+ jpeg2k? ( media-libs/openjpeg:0 )
+ mng? ( media-libs/libmng )
+ openexr? ( media-libs/openexr )
+ png? ( media-libs/libpng )
+ raw? ( media-libs/libraw )
+ tiff? (
+ media-libs/ilmbase
+ media-libs/tiff
+ )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ app-arch/unzip"
+
+S=${WORKDIR}/${MY_PN}
+
+src_prepare() {
+ cd Source
+ if has_version ">=media-libs/libjpeg-turbo-1.2.1"; then
+ # Patch from Christian Heimes's fork (thanks) https://bitbucket.org/tiran/freeimageturbo
+ epatch "${DISTDIR}"/${PN}-3.15.4-libjpeg-turbo.patch.gz
+ cp LibJPEG/{jpegcomp.h,jpegint.h} . || die
+ fi
+ cp LibJPEG/{transupp.c,transupp.h,jinclude.h} . || die
+ cp LibTIFF4/{tiffiop,tif_dir}.h . || die
+ rm -rf LibPNG LibMNG LibOpenJPEG ZLib OpenEXR LibRawLite LibTIFF4 LibJPEG || die
+ cd ..
+ edos2unix Makefile.{gnu,fip,srcs} fipMakefile.srcs */*.h */*/*.cpp
+ sed -i \
+ -e "s:/./:/:g" \
+ -e "s: ./: :g" \
+ -e 's: Source: \\\n\tSource:g' \
+ -e 's: Wrapper: \\\n\tWrapper:g' \
+ -e 's: Examples: \\\n\tExamples:g' \
+ -e 's: TestAPI: \\\n\tTestAPI:g' \
+ -e 's: -ISource: \\\n\t-ISource:g' \
+ -e 's: -IWrapper: \\\n\t-IWrapper:g' \
+ Makefile.srcs fipMakefile.srcs || die
+ sed -i \
+ -e "/LibJPEG/d" \
+ -e "/LibPNG/d" \
+ -e "/LibTIFF/d" \
+ -e "/Source\/ZLib/d" \
+ -e "/LibOpenJPEG/d" \
+ -e "/OpenEXR/d" \
+ -e "/LibRawLite/d" \
+ -e "/LibMNG/d" \
+ Makefile.srcs fipMakefile.srcs || die
+ epatch "${FILESDIR}"/${PN}-3.15.4-{unbundling,raw}.patch
+}
+
+foreach_make() {
+ local m
+ for m in Makefile.{gnu,fip} ; do
+ emake -f ${m} \
+ USE_EXR=$(usex openexr) \
+ USE_JPEG=$(usex jpeg) \
+ USE_JPEG2K=$(usex jpeg2k) \
+ USE_MNG=$(usex mng) \
+ USE_PNG=$(usex png) \
+ USE_TIFF=$(usex tiff) \
+ USE_RAW=$(usex raw) \
+ $(usex static-libs '' STATICLIB=) \
+ "$@"
+ done
+}
+
+src_compile() {
+ tc-export AR PKG_CONFIG
+ foreach_make \
+ CXX="$(tc-getCXX) -fPIC" \
+ CC="$(tc-getCC) -fPIC" \
+ ${MY_PN}
+}
+
+src_install() {
+ foreach_make install DESTDIR="${ED}" INSTALLDIR="${ED}"/usr/$(get_libdir)
+ dodoc Whatsnew.txt "${DISTDIR}"/${MY_P}.pdf
+}
diff --git a/media-libs/freeimage/metadata.xml b/media-libs/freeimage/metadata.xml
new file mode 100644
index 000000000000..a1cf48602f18
--- /dev/null
+++ b/media-libs/freeimage/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>games</herd>
+ <upstream>
+ <remote-id type="sourceforge">freeimage</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/freetype/Manifest b/media-libs/freetype/Manifest
new file mode 100644
index 000000000000..bd0b270d8092
--- /dev/null
+++ b/media-libs/freetype/Manifest
@@ -0,0 +1,8 @@
+DIST freetype-2.5.5-infinality-patches.tar.xz 24380 SHA256 6b7bc373b068c71feca2e19c3741993ee0ff787984aa0653ca66814e05ef195f SHA512 8831e3337214cc57a0381c56ef6750f85b11f1b6358adaa3dda34d449f234335bede124be9d23df817ae8c06f80c8e3ce63ed3fc32eb05586b8c8e43ce52e575 WHIRLPOOL 27b945e9524e984ef57f96415a86095d91dea8fa8e402a3eb6a3d7c38a7636d53d5e47fc37b734ca88f41a499f3398ab9d7bd147e1424c19b09f41e17f2cbe8d
+DIST freetype-2.5.5.tar.bz2 1714529 SHA256 387bcc4b780b12484aa2ec9f7db1a55d8286eb5639f45fbc0fbba7a4e5a1afb9 SHA512 1fc72d24da1744a6a5faf3338e49912c81ce83f30def1e80a2a15b50e7f83893a4fe24a70ef88b65ecc217bed1c15d85804c364eba221b35e25531c727fe8559 WHIRLPOOL 57cf0f020cda6a66cfe8e2a30e1e997c0fd7f97bdaed38da65cce0b360fcc60cfdf1ba0724c1745668ae3f80743052e135edb8356dff4c90365caa6262d59158
+DIST freetype-2.6-infinality-patches.tar.xz 24356 SHA256 95bd7f6bd191063e4691e000b1f59aa776a6c0afb5501e19a88d7b72ec47831e SHA512 87e206ffe78b9411753c0491da9ef6bbea4f9dde45cba539f0d51e9c5c4461c94b75af8fc8b96b9b9d5c7d7c63ac1ec88c227e93db197c56e02ead60b502d9a0 WHIRLPOOL 3d671e637ed4f1b7adfa862be684f8513d58e7071ce7ef1e26ca3a4311c0ec5e1817409299f0266129fe0b2c2bd330fdf6e6894e05ef937ba94c95b6e860dcd0
+DIST freetype-2.6.tar.bz2 1726219 SHA256 8469fb8124764f85029cc8247c31e132a2c5e51084ddce2a44ea32ee4ae8347e SHA512 0242c832dcac3d9dc5d434b7f5145e63f2289d5df32f16e1c7afc1e31c3c92f0dd374e20dfef79a9ecb26b14419f42b0d897c7154f249f629c35ee7af0aa5297 WHIRLPOOL bf7f105b74348a1ca0e95e21091670a5d73793e8aea8aa8e0dad515086885a182f3bced713c2cf76704c7814031f308a642d6db45a0c065627d0e7bdcaedffd6
+DIST freetype-doc-2.5.5.tar.bz2 108133 SHA256 68becbae3578a8101e9f3c55f10e435fb75535011d3f7a523719371e86e368e7 SHA512 0e2455433f72766ec88275d2e53e49630457579a83ca491697bb5ce12196ee964618d1af86956651557d34e8ea1d57f75f69e0d60ef90e943509bc571370fb64 WHIRLPOOL 28d13ae3ce9bc3fb278df9a963cef3622672fa288fc0fd654e874054bedccd8510a3dcf7636ea2ec107b5299984742607d2a9436d5e473202856e27bf262655f
+DIST freetype-doc-2.6.tar.bz2 477177 SHA256 4868ec0b2b6890a1db296b00ce302ebf311b93b08aabd7ffca902e9c16b3e470 SHA512 ca8e5c44ac912c939e891b1e3386852d1771806f1f5684429964a6bac284d5cb51e80645a4b492067ad8c46e0e91d1651e8f593b3d5c03c5bceeaec1c51b6b15 WHIRLPOOL e02cb2b4382aabfd0ed48a8e652467bc11dee0a7b7591a5d3755012f903218c5ed3030ee3eb9888393cc9bad52585687e7794f82883fdf1d64835a87c27c2cd2
+DIST ft2demos-2.5.5.tar.bz2 182006 SHA256 b87c7deb5d9b1fddb8520c091a5491cc63ecac4de25139e1da38aebee82195ea SHA512 c6e1855f2315665e39a894ecfcb65f8546de435c1dada0ea0a6665a1e3ef22331d6949cd9261dfb6b68e653631d4c2e74f8ea31b53b40e46f44ab4dae38e368b WHIRLPOOL 55d6add5e3fac008a39231e3805e151a5a9b7cafb6ef970e546d96d3fa338a6a4a744aeb59ea04804312164aedd5e5a21e19773dbf5c42a1acfc42d283d90930
+DIST ft2demos-2.6.tar.bz2 190240 SHA256 f8f4bc2a2e76e0dbe61838e452c5a7daf1d4bd9dfa44691940bf308f776d32b6 SHA512 f9b8dfe40266ffdd2927e0d2cfe641b9028de07935d0abcd0a2dadcf0359700c296cd2a9b0c4114f47c0cd1489db287224a31b7dbcb1f6b937b1bdfcda3c1db8 WHIRLPOOL 400796659c523f4c2c16c8c523161cbf34505be5a08d1eb601312362cf0eb226fa86561d199d34f0e1a9e83bd76525663e9a040865f456bfa3ed49b64d51720d
diff --git a/media-libs/freetype/files/freetype-2.3.2-enable-valid.patch b/media-libs/freetype/files/freetype-2.3.2-enable-valid.patch
new file mode 100644
index 000000000000..44f3bf6e1c94
--- /dev/null
+++ b/media-libs/freetype/files/freetype-2.3.2-enable-valid.patch
@@ -0,0 +1,22 @@
+Enables gxvalid and otvalid modules for use with ftvalid.
+
+--- freetype-2.2.1/modules.cfg.orig 2006-07-07 21:01:09.000000000 -0400
++++ freetype-2.2.1/modules.cfg 2006-07-07 21:01:54.000000000 -0400
+@@ -110,7 +110,7 @@
+ AUX_MODULES += cache
+
+ # TrueType GX/AAT table validation. Needs ftgxval.c below.
+-# AUX_MODULES += gxvalid
++AUX_MODULES += gxvalid
+
+ # Support for streams compressed with gzip (files with suffix .gz).
+ #
+@@ -124,7 +124,7 @@
+
+ # OpenType table validation. Needs ftotval.c below.
+ #
+-# AUX_MODULES += otvalid
++AUX_MODULES += otvalid
+
+ # Auxiliary PostScript driver component to share common code.
+ #
diff --git a/media-libs/freetype/files/freetype-2.4.11-sizeof-types.patch b/media-libs/freetype/files/freetype-2.4.11-sizeof-types.patch
new file mode 100644
index 000000000000..5be0530ee007
--- /dev/null
+++ b/media-libs/freetype/files/freetype-2.4.11-sizeof-types.patch
@@ -0,0 +1,31 @@
+From 8af7b9e403240c2c3ace1005f5a91fa2f1625ac9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Mon, 11 Mar 2013 22:13:34 +0100
+Subject: [PATCH] Prevent apps from using the autoconf sizeof branch.
+
+Use #error to make sure that any app trying to enable that branch fails
+miserably. This guarantees the code to be multilib-friendly and also
+removes the header differences triggering QA errors.
+---
+ builds/unix/ftconfig.in | 5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
+
+diff --git a/builds/unix/ftconfig.in b/builds/unix/ftconfig.in
+index 9531afd..457cbfc 100644
+--- a/builds/unix/ftconfig.in
++++ b/builds/unix/ftconfig.in
+@@ -78,10 +78,7 @@ FT_BEGIN_HEADER
+ #undef FT_USE_AUTOCONF_SIZEOF_TYPES
+ #ifdef FT_USE_AUTOCONF_SIZEOF_TYPES
+
+-#undef SIZEOF_INT
+-#undef SIZEOF_LONG
+-#define FT_SIZEOF_INT SIZEOF_INT
+-#define FT_SIZEOF_LONG SIZEOF_LONG
++#error "Unsupported code branch enabled. Please report a bug to bugs.gentoo.org."
+
+ #else /* !FT_USE_AUTOCONF_SIZEOF_TYPES */
+
+--
+1.8.1.5
+
diff --git a/media-libs/freetype/freetype-2.5.5.ebuild b/media-libs/freetype/freetype-2.5.5.ebuild
new file mode 100644
index 000000000000..0c75d2ad64c4
--- /dev/null
+++ b/media-libs/freetype/freetype-2.5.5.ebuild
@@ -0,0 +1,176 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools-multilib flag-o-matic multilib toolchain-funcs
+
+DESCRIPTION="A high-quality and portable font engine"
+HOMEPAGE="http://www.freetype.org/"
+SRC_URI="mirror://sourceforge/freetype/${P/_/}.tar.bz2
+ mirror://nongnu/freetype/${P/_/}.tar.bz2
+ utils? ( mirror://sourceforge/freetype/ft2demos-${PV}.tar.bz2
+ mirror://nongnu/freetype/ft2demos-${PV}.tar.bz2 )
+ doc? ( mirror://sourceforge/freetype/${PN}-doc-${PV}.tar.bz2
+ mirror://nongnu/freetype/${PN}-doc-${PV}.tar.bz2 )
+ infinality? ( http://dev.gentoo.org/~polynomial-c/${P}-infinality-patches.tar.xz )"
+
+LICENSE="|| ( FTL GPL-2+ )"
+SLOT="2"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+IUSE="X +adobe-cff auto-hinter bindist bzip2 debug doc fontforge harfbuzz
+ infinality png static-libs utils"
+REQUIRED_USE="harfbuzz? ( auto-hinter )"
+RESTRICT="!bindist? ( bindist )" # bug 541408
+
+CDEPEND=">=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+ bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
+ harfbuzz? ( >=media-libs/harfbuzz-0.9.19[truetype,${MULTILIB_USEDEP}] )
+ png? ( >=media-libs/libpng-1.2.51:=[${MULTILIB_USEDEP}] )
+ utils? (
+ X? (
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXau-1.0.7-r1[${MULTILIB_USEDEP}]
+ >=x11-libs/libXdmcp-1.1.1-r1[${MULTILIB_USEDEP}]
+ )
+ )"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ abi_x86_32? ( utils? ( !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)] ) )"
+PDEPEND="infinality? ( media-libs/fontconfig-infinality )"
+
+src_prepare() {
+ enable_option() {
+ sed -i -e "/#define $1/a #define $1" \
+ include/config/ftoption.h \
+ || die "unable to enable option $1"
+ }
+
+ disable_option() {
+ sed -i -e "/#define $1/ { s:^:/*:; s:$:*/: }" \
+ include/config/ftoption.h \
+ || die "unable to disable option $1"
+ }
+
+ # This is the same as the 01 patch from infinality
+ epatch "${FILESDIR}"/${PN}-2.3.2-enable-valid.patch
+
+ if use infinality; then
+ EPATCH_SOURCE="${WORKDIR}/${P}-infinality-patches" EPATCH_SUFFIX="patch" \
+ EPATCH_FORCE="yes" epatch
+
+ # FT_CONFIG_OPTION_SUBPIXEL_RENDERING is already enabled in freetype-2.4.11
+ enable_option TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ fi
+
+ if ! use bindist; then
+ # See http://freetype.org/patents.html
+ # ClearType is covered by several Microsoft patents in the US
+ enable_option FT_CONFIG_OPTION_SUBPIXEL_RENDERING
+ fi
+
+ if use auto-hinter; then
+ disable_option TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+ enable_option TT_CONFIG_OPTION_UNPATENTED_HINTING
+ fi
+
+ if ! use adobe-cff; then
+ enable_option CFF_CONFIG_OPTION_OLD_ENGINE
+ fi
+
+ if use debug; then
+ enable_option FT_DEBUG_LEVEL_TRACE
+ enable_option FT_DEBUG_MEMORY
+ fi
+
+ epatch "${FILESDIR}"/${PN}-2.4.11-sizeof-types.patch # 459966
+
+ if use utils; then
+ cd "${WORKDIR}/ft2demos-${PV}" || die
+ # Disable tests needing X11 when USE="-X". (bug #177597)
+ if ! use X; then
+ sed -i -e "/EXES\ +=\ ftdiff/ s:^:#:" Makefile || die
+ fi
+ cd "${S}" || die
+ fi
+
+ # we need non-/bin/sh to run configure
+ if [[ -n ${CONFIG_SHELL} ]] ; then
+ sed -i -e "1s:^#![[:space:]]*/bin/sh:#!$CONFIG_SHELL:" \
+ "${S}"/builds/unix/configure || die
+ fi
+
+ autotools-utils_src_prepare
+}
+
+multilib_src_configure() {
+ append-flags -fno-strict-aliasing
+ type -P gmake &> /dev/null && export GNUMAKE=gmake
+
+ local myeconfargs=(
+ --enable-biarch-config
+ $(use_with bzip2)
+ $(use_with harfbuzz)
+ $(use_with png)
+
+ # avoid using libpng-config
+ LIBPNG_CFLAGS="$($(tc-getPKG_CONFIG) --cflags libpng)"
+ LIBPNG_LDFLAGS="$($(tc-getPKG_CONFIG) --libs libpng)"
+ )
+
+ autotools-utils_src_configure
+}
+
+multilib_src_compile() {
+ default
+
+ if multilib_is_native_abi && use utils; then
+ einfo "Building utils"
+ # fix for Prefix, bug #339334
+ emake \
+ X11_PATH="${EPREFIX}/usr/$(get_libdir)" \
+ FT2DEMOS=1 TOP_DIR_2="${WORKDIR}/ft2demos-${PV}"
+ fi
+}
+
+multilib_src_install() {
+ default
+
+ if multilib_is_native_abi && use utils; then
+ einfo "Installing utils"
+ rm "${WORKDIR}"/ft2demos-${PV}/bin/README || die
+ local ft2demo
+ for ft2demo in ../ft2demos-${PV}/bin/*; do
+ ./libtool --mode=install $(type -P install) -m 755 "$ft2demo" \
+ "${ED}"/usr/bin || die
+ done
+ fi
+}
+
+multilib_src_install_all() {
+ if use fontforge; then
+ # Probably fontforge needs less but this way makes things simplier...
+ einfo "Installing internal headers required for fontforge"
+ local header
+ find src/truetype include/freetype/internal -name '*.h' | \
+ while read header; do
+ mkdir -p "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die
+ cp ${header} "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die
+ done
+ fi
+
+ dodoc docs/{CHANGES,CUSTOMIZE,DEBUG,INSTALL.UNIX,*.txt,PROBLEMS,TODO}
+ use doc && dohtml -r docs/*
+
+ prune_libtool_files --all
+}
+
+pkg_postinst() {
+ if use auto-hinter && ! use harfbuzz; then
+ elog "To improve OpenType font hinting with the auto-hinter, the harfbuzz"
+ elog "useflag needs to be enabled for ${CATEGORY}/${PN}."
+ elog "See the INSTALL.UNIX file in the doc directory of this package for"
+ elog "more information. But it is recommended not to use the auto-hinter."
+ fi
+}
diff --git a/media-libs/freetype/freetype-2.6.ebuild b/media-libs/freetype/freetype-2.6.ebuild
new file mode 100644
index 000000000000..e84bf0380a46
--- /dev/null
+++ b/media-libs/freetype/freetype-2.6.ebuild
@@ -0,0 +1,161 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools-multilib flag-o-matic multilib toolchain-funcs
+
+DESCRIPTION="A high-quality and portable font engine"
+HOMEPAGE="http://www.freetype.org/"
+SRC_URI="mirror://sourceforge/freetype/${P/_/}.tar.bz2
+ mirror://nongnu/freetype/${P/_/}.tar.bz2
+ utils? ( mirror://sourceforge/freetype/ft2demos-${PV}.tar.bz2
+ mirror://nongnu/freetype/ft2demos-${PV}.tar.bz2 )
+ doc? ( mirror://sourceforge/freetype/${PN}-doc-${PV}.tar.bz2
+ mirror://nongnu/freetype/${PN}-doc-${PV}.tar.bz2 )
+ infinality? ( http://dev.gentoo.org/~polynomial-c/${P}-infinality-patches.tar.xz )"
+
+LICENSE="|| ( FTL GPL-2+ )"
+SLOT="2"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+IUSE="X +adobe-cff bindist bzip2 debug doc fontforge harfbuzz
+ infinality png static-libs utils"
+RESTRICT="!bindist? ( bindist )" # bug 541408
+
+CDEPEND=">=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+ bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
+ harfbuzz? ( >=media-libs/harfbuzz-0.9.19[truetype,${MULTILIB_USEDEP}] )
+ png? ( >=media-libs/libpng-1.2.51:=[${MULTILIB_USEDEP}] )
+ utils? (
+ X? (
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXau-1.0.7-r1[${MULTILIB_USEDEP}]
+ >=x11-libs/libXdmcp-1.1.1-r1[${MULTILIB_USEDEP}]
+ )
+ )"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ abi_x86_32? ( utils? ( !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)] ) )"
+PDEPEND="infinality? ( media-libs/fontconfig-infinality )"
+
+src_prepare() {
+ enable_option() {
+ sed -i -e "/#define $1/a #define $1" \
+ include/config/ftoption.h \
+ || die "unable to enable option $1"
+ }
+
+ disable_option() {
+ sed -i -e "/#define $1/ { s:^:/*:; s:$:*/: }" \
+ include/config/ftoption.h \
+ || die "unable to disable option $1"
+ }
+
+ # This is the same as the 01 patch from infinality
+ epatch "${FILESDIR}"/${PN}-2.3.2-enable-valid.patch
+
+ if use infinality; then
+ EPATCH_SOURCE="${WORKDIR}/${P}-infinality-patches" EPATCH_SUFFIX="patch" \
+ EPATCH_FORCE="yes" epatch
+
+ # FT_CONFIG_OPTION_SUBPIXEL_RENDERING is already enabled in freetype-2.4.11
+ enable_option TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ fi
+
+ if ! use bindist; then
+ # See http://freetype.org/patents.html
+ # ClearType is covered by several Microsoft patents in the US
+ enable_option FT_CONFIG_OPTION_SUBPIXEL_RENDERING
+ fi
+
+ if ! use adobe-cff; then
+ enable_option CFF_CONFIG_OPTION_OLD_ENGINE
+ fi
+
+ if use debug; then
+ enable_option FT_DEBUG_LEVEL_TRACE
+ enable_option FT_DEBUG_MEMORY
+ fi
+
+ epatch "${FILESDIR}"/${PN}-2.4.11-sizeof-types.patch # 459966
+
+ if use utils; then
+ cd "${WORKDIR}/ft2demos-${PV}" || die
+ # Disable tests needing X11 when USE="-X". (bug #177597)
+ if ! use X; then
+ sed -i -e "/EXES\ +=\ ftdiff/ s:^:#:" Makefile || die
+ fi
+ cd "${S}" || die
+ fi
+
+ # we need non-/bin/sh to run configure
+ if [[ -n ${CONFIG_SHELL} ]] ; then
+ sed -i -e "1s:^#![[:space:]]*/bin/sh:#!$CONFIG_SHELL:" \
+ "${S}"/builds/unix/configure || die
+ fi
+
+ autotools-utils_src_prepare
+}
+
+multilib_src_configure() {
+ append-flags -fno-strict-aliasing
+ type -P gmake &> /dev/null && export GNUMAKE=gmake
+
+ local myeconfargs=(
+ --enable-biarch-config
+ $(use_with bzip2)
+ $(use_with harfbuzz)
+ $(use_with png)
+
+ # avoid using libpng-config
+ LIBPNG_CFLAGS="$($(tc-getPKG_CONFIG) --cflags libpng)"
+ LIBPNG_LDFLAGS="$($(tc-getPKG_CONFIG) --libs libpng)"
+ )
+
+ autotools-utils_src_configure
+}
+
+multilib_src_compile() {
+ default
+
+ if multilib_is_native_abi && use utils; then
+ einfo "Building utils"
+ # fix for Prefix, bug #339334
+ emake \
+ X11_PATH="${EPREFIX}/usr/$(get_libdir)" \
+ FT2DEMOS=1 TOP_DIR_2="${WORKDIR}/ft2demos-${PV}"
+ fi
+}
+
+multilib_src_install() {
+ default
+
+ if multilib_is_native_abi && use utils; then
+ einfo "Installing utils"
+ rm "${WORKDIR}"/ft2demos-${PV}/bin/README || die
+ local ft2demo
+ for ft2demo in ../ft2demos-${PV}/bin/*; do
+ ./libtool --mode=install $(type -P install) -m 755 "$ft2demo" \
+ "${ED}"/usr/bin || die
+ done
+ fi
+}
+
+multilib_src_install_all() {
+ if use fontforge; then
+ # Probably fontforge needs less but this way makes things simplier...
+ einfo "Installing internal headers required for fontforge"
+ local header
+ find src/truetype include/freetype/internal -name '*.h' | \
+ while read header; do
+ mkdir -p "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die
+ cp ${header} "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die
+ done
+ fi
+
+ dodoc docs/{CHANGES,CUSTOMIZE,DEBUG,INSTALL.UNIX,*.txt,PROBLEMS,TODO}
+ use doc && dohtml -r docs/*
+
+ prune_libtool_files --all
+}
diff --git a/media-libs/freetype/metadata.xml b/media-libs/freetype/metadata.xml
new file mode 100644
index 000000000000..ed6ed0892a88
--- /dev/null
+++ b/media-libs/freetype/metadata.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>fonts</herd>
+ <maintainer>
+ <email>yngwin@gentoo.org</email>
+ <name>Ben de Groot</name>
+ </maintainer>
+ <maintainer>
+ <email>polynomial-c@gentoo.org</email>
+ <name>Lars Wendler</name>
+ </maintainer>
+ <maintainer>
+ <email>multilib@gentoo.org</email>
+ <name>gx86-multilib project</name>
+ <description>Handling the bugs related to multilib support in the
+ package and related changes.</description>
+ </maintainer>
+ <use>
+ <flag name="adobe-cff">Use Adobe CFF as default font-renderer</flag>
+ <flag name="auto-hinter">Use the unpatented auto-hinter instead
+ of the (recommended) TrueType bytecode interpreter</flag>
+ <flag name="bzip2">Support bzip2 compressed PCF fonts.</flag>
+ <flag name="fontforge">Install internal headers required for TrueType
+ debugger in <pkg>media-gfx/fontforge</pkg> (built with
+ USE=truetype-debugger)</flag>
+ <flag name="harfbuzz">Use <pkg>media-libs/harfbuzz</pkg> for auto-hinting
+ OpenType fonts. WARNING: may trigger circular dependencies!</flag>
+ <flag name="infinality">Enable infinality options for improved LCD
+ filtering</flag>
+ <flag name="utils">Install utilities and examples from ft2demos</flag>
+ </use>
+ <upstream>
+ <remote-id type="cpe">cpe:/a:freetype:freetype</remote-id>
+ <remote-id type="sourceforge">freetype</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/freeverb3/Manifest b/media-libs/freeverb3/Manifest
new file mode 100644
index 000000000000..ea5dba1858b3
--- /dev/null
+++ b/media-libs/freeverb3/Manifest
@@ -0,0 +1,3 @@
+DIST freeverb3-2.5.13.tar.gz 6143981 SHA256 9c29adc15a94e6140e52f0b1a5a60923a8e9a3beb21ada4182363c60b25126dd
+DIST freeverb3-2.6.6.tar.gz 6208119 SHA256 55c0585c8d53df1bcc5dcb6ffd26fc123583a239c3f064229af71e5f8dca6816 SHA512 755c95ef184487af7e01ea32765b77eba6ffc9738aece3d64f9da019f720075fb7907341689a8adbe81d6fd265a82436da578df2d98ff2e82803a064df4c5dc1 WHIRLPOOL 77795333dc30f3aca514a3a16d8760373bf1ac34fdcc1f3feef3d3bd3071fedf1dcb73ca85b3bf27666c0fba176d86607d68d4c0d5d37a2cfa42a5417d282bb4
+DIST freeverb3-3.1.1.tar.xz 6067288 SHA256 6327b6809f4c15dfc74331f0b88af8d92f593d1bf8eabee15ec2a98217aa8d93 SHA512 83feb43a6c178b82958089a3527788f1426bc76e5a86d353df5818a0ebeb1656742e225d4e3eb3187b768169af1a6f2716215408fdb30869452d10d64a967516 WHIRLPOOL e2ac3bec3f2ba90bfc8f25d9c09290dcdc5e43e4528182cbf112614f9d86e97f27beb13a4869cfe5ac10a29af47e4ed9ab64a064189d57ac1d4282a38442b935
diff --git a/media-libs/freeverb3/files/freeverb3-2.3.0-fix-implicit.patch b/media-libs/freeverb3/files/freeverb3-2.3.0-fix-implicit.patch
new file mode 100644
index 000000000000..1db4dc8a1733
--- /dev/null
+++ b/media-libs/freeverb3/files/freeverb3-2.3.0-fix-implicit.patch
@@ -0,0 +1,90 @@
+diff -cr freeverb3-2.3.0/libsamplerate2/samplerate.c freeverb3/libsamplerate2/samplerate.c
+*** freeverb3-2.3.0/libsamplerate2/samplerate.c 2008-09-18 22:52:39.000000000 +0900
+--- freeverb3/libsamplerate2/samplerate.c 2009-03-03 20:23:52.000000000 +0900
+***************
+*** 20,30 ****
+ #include <stdlib.h>
+ #include <string.h>
+
+! #include "config.h"
+!
+ #include "samplerate2.h"
+ #include "common.h"
+- #include "float_cast.h"
+
+ static long SR2_(psrc_set_converter) (SR2_(SRC_PRIVATE) *psrc, long converter_type);
+
+--- 20,28 ----
+ #include <stdlib.h>
+ #include <string.h>
+
+! #include "float_cast.h"
+ #include "samplerate2.h"
+ #include "common.h"
+
+ static long SR2_(psrc_set_converter) (SR2_(SRC_PRIVATE) *psrc, long converter_type);
+
+diff -cr freeverb3-2.3.0/libsamplerate2/samplerate_common.c freeverb3/libsamplerate2/samplerate_common.c
+*** freeverb3-2.3.0/libsamplerate2/samplerate_common.c 2008-09-18 22:50:26.000000000 +0900
+--- freeverb3/libsamplerate2/samplerate_common.c 2009-03-03 20:23:39.000000000 +0900
+***************
+*** 19,28 ****
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+! #include "config.h"
+ #include "common_c.h"
+ #include "samplerate2_common.h"
+- #include "float_cast.h"
+
+ const char * src_get_name (long converter_type)
+ {
+--- 19,27 ----
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+! #include "float_cast.h"
+ #include "common_c.h"
+ #include "samplerate2_common.h"
+
+ const char * src_get_name (long converter_type)
+ {
+diff -cr freeverb3-2.3.0/libsamplerate2/src_linear.c freeverb3/libsamplerate2/src_linear.c
+*** freeverb3-2.3.0/libsamplerate2/src_linear.c 2008-09-18 21:11:55.000000000 +0900
+--- freeverb3/libsamplerate2/src_linear.c 2009-03-03 20:24:07.000000000 +0900
+***************
+*** 20,26 ****
+ #include <stdlib.h>
+ #include <string.h>
+
+- #include "config.h"
+ #include "float_cast.h"
+ #include "samplerate2.h"
+ #include "common.h"
+--- 20,25 ----
+diff -cr freeverb3-2.3.0/libsamplerate2/src_sinc.c freeverb3/libsamplerate2/src_sinc.c
+*** freeverb3-2.3.0/libsamplerate2/src_sinc.c 2008-09-18 23:31:00.000000000 +0900
+--- freeverb3/libsamplerate2/src_sinc.c 2009-03-03 20:24:11.000000000 +0900
+***************
+*** 20,26 ****
+ #include <stdlib.h>
+ #include <string.h>
+
+- #include "config.h"
+ #include "float_cast.h"
+ #include "samplerate2.h"
+ #include "common.h"
+--- 20,25 ----
+diff -cr freeverb3-2.3.0/libsamplerate2/src_zoh.c freeverb3/libsamplerate2/src_zoh.c
+*** freeverb3-2.3.0/libsamplerate2/src_zoh.c 2008-09-18 23:21:46.000000000 +0900
+--- freeverb3/libsamplerate2/src_zoh.c 2009-03-03 20:24:15.000000000 +0900
+***************
+*** 20,26 ****
+ #include <stdlib.h>
+ #include <string.h>
+
+- #include "config.h"
+ #include "float_cast.h"
+ #include "samplerate2.h"
+ #include "common.h"
+--- 20,25 ----
diff --git a/media-libs/freeverb3/files/freeverb3-2.3.1-plugin-api-v8-v10.patch b/media-libs/freeverb3/files/freeverb3-2.3.1-plugin-api-v8-v10.patch
new file mode 100644
index 000000000000..5bc6c8f328b9
--- /dev/null
+++ b/media-libs/freeverb3/files/freeverb3-2.3.1-plugin-api-v8-v10.patch
@@ -0,0 +1,125 @@
+From a5dbe75a4b2c26ff969ef0b8eb2acc0b39f477a7 Mon Sep 17 00:00:00 2001
+From: Sebastian Pipping <sebastian@pipping.org>
+Date: Sat, 3 Oct 2009 04:57:55 +0200
+Subject: [PATCH] Support Plugin API v8, v10 and later
+
+---
+ work/freeverb3-2.3.1/xmms/compressor.cpp | 12 ++++++++++++
+ work/freeverb3-2.3.1/xmms/filter.cpp | 3 +++
+ work/freeverb3-2.3.1/xmms/freeverb3.cpp | 3 +++
+ work/freeverb3-2.3.1/xmms/impulser.cpp | 3 +++
+ work/freeverb3-2.3.1/xmms/impulser2.cpp | 3 +++
+ work/freeverb3-2.3.1/xmms/revmodel.cpp | 3 +++
+ work/freeverb3-2.3.1/xmms/stenh.cpp | 3 +++
+ 7 files changed, 30 insertions(+), 0 deletions(-)
+
+diff --git a/work/freeverb3-2.3.1/xmms/compressor.cpp b/work/freeverb3-2.3.1/xmms/compressor.cpp
+index a02570f..a18eca3 100644
+--- a/work/freeverb3-2.3.1/xmms/compressor.cpp
++++ b/work/freeverb3-2.3.1/xmms/compressor.cpp
+@@ -1095,6 +1095,18 @@ static EffectPlugin epe = {
+ cleanup,
+ about,
+ configure,
++/*
++ * Compile fix for Audacious 2.2_alpha1
++ *
++ * Increase PAPI version.
++ * http://hg.atheme.org/audacious/annotate/74969c017b3e/src/audacious/plugin.h#64
++ *
++ * Shuffle some functors and fields around in plugin structures; Start of cleanup.
++ * http://hg.atheme.org/audacious/annotate/8554b25b0087/src/audacious/plugin.h#1025
++ */
++#if __AUDACIOUS_PLUGIN_API__ >= 10
++ NULL,
++#endif
+ FALSE,
+ mod_samples,
+ NULL,
+diff --git a/work/freeverb3-2.3.1/xmms/filter.cpp b/work/freeverb3-2.3.1/xmms/filter.cpp
+index 3b01e4d..b403124 100644
+--- a/work/freeverb3-2.3.1/xmms/filter.cpp
++++ b/work/freeverb3-2.3.1/xmms/filter.cpp
+@@ -462,6 +462,9 @@ static EffectPlugin epe = {
+ cleanup,
+ about,
+ configure,
++#if __AUDACIOUS_PLUGIN_API__ >= 10
++ NULL,
++#endif
+ FALSE,
+ mod_samples,
+ NULL,
+diff --git a/work/freeverb3-2.3.1/xmms/freeverb3.cpp b/work/freeverb3-2.3.1/xmms/freeverb3.cpp
+index f00bc8e..8bda2be 100644
+--- a/work/freeverb3-2.3.1/xmms/freeverb3.cpp
++++ b/work/freeverb3-2.3.1/xmms/freeverb3.cpp
+@@ -700,6 +700,9 @@ static EffectPlugin epe = {
+ cleanup,
+ about,
+ configure,
++#if __AUDACIOUS_PLUGIN_API__ >= 10
++ NULL,
++#endif
+ FALSE,
+ mod_samples,
+ NULL,
+diff --git a/work/freeverb3-2.3.1/xmms/impulser.cpp b/work/freeverb3-2.3.1/xmms/impulser.cpp
+index c1b6856..6341219 100644
+--- a/work/freeverb3-2.3.1/xmms/impulser.cpp
++++ b/work/freeverb3-2.3.1/xmms/impulser.cpp
+@@ -617,6 +617,9 @@ static EffectPlugin epe = {
+ cleanup,
+ about,
+ configure,
++#if __AUDACIOUS_PLUGIN_API__ >= 10
++ NULL,
++#endif
+ FALSE,
+ mod_samples,
+ NULL,
+diff --git a/work/freeverb3-2.3.1/xmms/impulser2.cpp b/work/freeverb3-2.3.1/xmms/impulser2.cpp
+index cf8e453..1385484 100644
+--- a/work/freeverb3-2.3.1/xmms/impulser2.cpp
++++ b/work/freeverb3-2.3.1/xmms/impulser2.cpp
+@@ -1538,6 +1538,9 @@ static EffectPlugin epe = {
+ cleanup,
+ about,
+ configure,
++#if __AUDACIOUS_PLUGIN_API__ >= 10
++ NULL,
++#endif
+ FALSE,
+ mod_samples,
+ NULL,
+diff --git a/work/freeverb3-2.3.1/xmms/revmodel.cpp b/work/freeverb3-2.3.1/xmms/revmodel.cpp
+index d596df4..bc808ae 100644
+--- a/work/freeverb3-2.3.1/xmms/revmodel.cpp
++++ b/work/freeverb3-2.3.1/xmms/revmodel.cpp
+@@ -592,6 +592,9 @@ static EffectPlugin epe = {
+ cleanup,
+ about,
+ configure,
++#if __AUDACIOUS_PLUGIN_API__ >= 10
++ NULL,
++#endif
+ FALSE,
+ mod_samples,
+ NULL,
+diff --git a/work/freeverb3-2.3.1/xmms/stenh.cpp b/work/freeverb3-2.3.1/xmms/stenh.cpp
+index 3eca478..d376896 100644
+--- a/work/freeverb3-2.3.1/xmms/stenh.cpp
++++ b/work/freeverb3-2.3.1/xmms/stenh.cpp
+@@ -905,6 +905,9 @@ static EffectPlugin epe = {
+ cleanup,
+ about,
+ configure,
++#if __AUDACIOUS_PLUGIN_API__ >= 10
++ NULL,
++#endif
+ FALSE,
+ mod_samples,
+ NULL,
+--
+1.6.4.4
+
diff --git a/media-libs/freeverb3/files/freeverb3-2.5.0-pow-ambiguity.patch b/media-libs/freeverb3/files/freeverb3-2.5.0-pow-ambiguity.patch
new file mode 100644
index 000000000000..2c79e793e27c
--- /dev/null
+++ b/media-libs/freeverb3/files/freeverb3-2.5.0-pow-ambiguity.patch
@@ -0,0 +1,12 @@
+--- xmms/impulser2.cpp
++++ xmms/impulser2.cpp
+@@ -1221,7 +1221,8 @@
+ presetLatencyValue2[latencyIndex]);
+ }
+ CFILELOADER fileLoader;
+- double l_stretch = std::pow(std::sqrt(2), (*slotVector)[i].stretch);
++ // NOTE: Casting to double to help compile select from pow(double,double) and pow(float,float)
++ double l_stretch = std::pow(static_cast<double>(std::sqrt(2)), static_cast<double>((*slotVector)[i].stretch));
+ int ret = fileLoader.load((*slotVector)[i].filename.c_str(), srate,
+ l_stretch, (*slotVector)[i].limit, SRC_SINC_BEST_QUALITY);
+
diff --git a/media-libs/freeverb3/files/freeverb3-2.5.13-fix-sse1v2-assembly.patch b/media-libs/freeverb3/files/freeverb3-2.5.13-fix-sse1v2-assembly.patch
new file mode 100644
index 000000000000..e18f504fbe29
--- /dev/null
+++ b/media-libs/freeverb3/files/freeverb3-2.5.13-fix-sse1v2-assembly.patch
@@ -0,0 +1,13 @@
+--- freeverb/frag.cpp 2010-12-10 18:44:37.006729672 +0100
++++ freeverb/frag.cpp 2010-12-10 18:45:10.220476080 +0100
+@@ -434,8 +434,8 @@
+ "mulps (%2), %%xmm1 \n\t"
+ "addps (%0), %%xmm1 \n\t" // saved in xmm1
+ "xor %0, %0 \n\t"
+- "movl $0x80000000, %0 \n\t" // 32bit float -1 mask
+- "movl %0, (%4) \n\t"
++ "mov $0x80000000, %0 \n\t" // 32bit float -1 mask
++ "mov %0, (%4) \n\t"
+ "xorps %%xmm2, %%xmm2 \n\t" // pxor xmm,xmm (mmx,sse2)
+ "movss (%4), %%xmm2 \n\t" // movd eax,xmm (sse2)
+ "movlhps %%xmm2, %%xmm2 \n\t" // bitmask = xmm2 ([0]=-1,[1]=0,[2]=-1,[3]=0)
diff --git a/media-libs/freeverb3/files/freeverb3-2.5.13-respect-disable-sse.patch b/media-libs/freeverb3/files/freeverb3-2.5.13-respect-disable-sse.patch
new file mode 100644
index 000000000000..3e8b9f05db0e
--- /dev/null
+++ b/media-libs/freeverb3/files/freeverb3-2.5.13-respect-disable-sse.patch
@@ -0,0 +1,24 @@
+--- configure.in_BACKUP 2010-12-10 09:49:30.204907020 +0100
++++ configure.in 2010-12-10 09:50:59.063128511 +0100
+@@ -137,9 +137,18 @@
+ [cv_avx="$enable_avx"], [cv_avx="no"])
+
+ case "${target_cpu}" in
+- x86_64*) cv_sse=yes cv_sse2=yes;;
+- amd64*) cv_sse=yes cv_sse2=yes;;
+- *) ;;
++ amd64*|x86_64*)
++ if test "x$cv_sse" = "x"; then
++ AC_MSG_NOTICE([Auto-enabling SSE codes])
++ cv_sse=yes
++ fi
++ if test "x$cv_sse2" = "x"; then
++ AC_MSG_NOTICE([Auto-enabling SSE2 codes])
++ cv_sse2=yes
++ fi
++ ;;
++ *)
++ ;;
+ esac
+
+ dnl option checks
diff --git a/media-libs/freeverb3/files/freeverb3-3.0.0-audacious-3.3.x.patch b/media-libs/freeverb3/files/freeverb3-3.0.0-audacious-3.3.x.patch
new file mode 100644
index 000000000000..9e343c0b0838
--- /dev/null
+++ b/media-libs/freeverb3/files/freeverb3-3.0.0-audacious-3.3.x.patch
@@ -0,0 +1,40 @@
+From 43416e5d5ce5d13f81e1cd0f69da7ff0351f6d65 Mon Sep 17 00:00:00 2001
+From: Sebastian Pipping <sebastian@pipping.org>
+Date: Sat, 8 Jun 2013 14:00:33 +0200
+Subject: [PATCH] Make Audacious plugin work with Audacious 3.3.x, too
+
+---
+ audacious/so.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/audacious/so.c b/audacious/so.c
+index 8c679df..37aa056 100644
+--- a/audacious/so.c
++++ b/audacious/so.c
+@@ -44,8 +44,12 @@ static void dsp_start(gint * channels, gint * rate){ if(ptable != NULL) ptable->
+ static void dsp_process(gfloat ** data, gint * samples){ if(ptable != NULL) ptable->process(data,samples); }
+ static void dsp_flush(){ if(ptable != NULL) ptable->flush(); }
+ static void dsp_finish(gfloat ** data, gint * samples){ if(ptable != NULL) ptable->finish(data,samples); }
++#if defined(_AUD_PLUGIN_VERSION_MIN) && (_AUD_PLUGIN_VERSION_MIN < 40)
+ static gint decoder_to_output_time(gint time){ return time; }
+ static gint output_to_decoder_time(gint time){ return time; }
++#else
++static int adjust_delay(int delay){ return delay; }
++#endif
+
+ AUD_EFFECT_PLUGIN
+ (
+@@ -57,6 +61,10 @@ AUD_EFFECT_PLUGIN
+ .start = dsp_start,
+ .process = dsp_process,
+ .finish = dsp_finish,
++#if defined(_AUD_PLUGIN_VERSION_MIN) && (_AUD_PLUGIN_VERSION_MIN < 40)
+ .decoder_to_output_time = decoder_to_output_time,
+ .output_to_decoder_time = output_to_decoder_time,
++#else
++ .adjust_delay = adjust_delay,
++#endif
+ )
+--
+1.8.2.1
+
diff --git a/media-libs/freeverb3/files/freeverb3-3.1.1-jack-compilation.patch b/media-libs/freeverb3/files/freeverb3-3.1.1-jack-compilation.patch
new file mode 100644
index 000000000000..768782021768
--- /dev/null
+++ b/media-libs/freeverb3/files/freeverb3-3.1.1-jack-compilation.patch
@@ -0,0 +1,67 @@
+From c2ab38ee2cd768ea4875450b146b12edbc28d656 Mon Sep 17 00:00:00 2001
+From: Sebastian Pipping <sebastian@pipping.org>
+Date: Tue, 9 Jun 2015 01:41:45 +0200
+Subject: [PATCH] Fix function name mis-match for JACK compilation
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fixes compile error:
+
+../audacious/impulser2.cpp: In function ‘void slot_save(SlotConfiguration*, int)’:
+../audacious/impulser2.cpp:278:86: error: ‘aud_set_str’ was not declared in this scope
+ t_str (configSectionString, key_i("file",i), (gchar*)slot->filename.c_str());
+ ^
+../audacious/impulser2.cpp: In function ‘void slot_load(SlotConfiguration*, int)’:
+../audacious/impulser2.cpp:293:62: error: ‘aud_get_str’ was not declared in this scope
+ filename = aud_get_str(configSectionString, key_i("file",i));
+---
+ jack/configdb.h | 4 ++--
+ jack/configdb_rcfile.c | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/jack/configdb.h b/jack/configdb.h
+index c3e6c19..0f793fa 100644
+--- a/jack/configdb.h
++++ b/jack/configdb.h
+@@ -23,13 +23,13 @@ void bmp_cfg_db_set_float (ConfigDb *db, const gchar *section, const gchar *key,
+ void bmp_cfg_db_set_double(ConfigDb *db, const gchar *section, const gchar *key, gdouble value);
+ void bmp_cfg_db_unset_key (ConfigDb *db, const gchar *section, const gchar *key);
+
+-gchar * aud_get_string(const gchar *section, const gchar *key);
++gchar * aud_get_str (const gchar *section, const gchar *key);
+ gint aud_get_int (const gchar *section, const gchar *key);
+ gboolean aud_get_bool (const gchar *section, const gchar *key);
+ gfloat aud_get_float (const gchar *section, const gchar *key);
+ gdouble aud_get_double(const gchar *section, const gchar *key);
+
+-void aud_set_string(const gchar *section, const gchar *key, gchar *value);
++void aud_set_str (const gchar *section, const gchar *key, gchar *value);
+ void aud_set_int (const gchar *section, const gchar *key, gint value);
+ void aud_set_bool (const gchar *section, const gchar *key, gboolean value);
+ void aud_set_float (const gchar *section, const gchar *key, gfloat value);
+diff --git a/jack/configdb_rcfile.c b/jack/configdb_rcfile.c
+index c0125c8..69bb085 100644
+--- a/jack/configdb_rcfile.c
++++ b/jack/configdb_rcfile.c
+@@ -109,7 +109,7 @@ void bmp_cfg_db_unset_key(ConfigDb * db, const gchar * section, const gchar * ke
+ }
+
+ gchar * cfg_string;
+-gchar * aud_get_string(const gchar *section, const gchar *key)
++gchar * aud_get_str(const gchar *section, const gchar *key)
+ {
+ ConfigDb * cfg = bmp_cfg_db_open();
+ bmp_cfg_db_get_string(cfg,section,key,&cfg_string);
+@@ -153,7 +153,7 @@ gdouble aud_get_double(const gchar *section, const gchar *key)
+ return cfg_double;
+ }
+
+-void aud_set_string(const gchar *section, const gchar *key, gchar *value)
++void aud_set_str(const gchar *section, const gchar *key, gchar *value)
+ {
+ ConfigDb * cfg = bmp_cfg_db_open();
+ bmp_cfg_db_set_string(cfg,section,key,value);
+--
+2.4.0
+
diff --git a/media-libs/freeverb3/files/freeverb3-3.1.1-jack-linking.patch b/media-libs/freeverb3/files/freeverb3-3.1.1-jack-linking.patch
new file mode 100644
index 000000000000..d52d6d424fba
--- /dev/null
+++ b/media-libs/freeverb3/files/freeverb3-3.1.1-jack-linking.patch
@@ -0,0 +1,27 @@
+From e10a2a4eb6985731881ad145eac5e8e8ec45a1fd Mon Sep 17 00:00:00 2001
+From: Sebastian Pipping <sebastian@pipping.org>
+Date: Tue, 9 Jun 2015 00:06:51 +0200
+Subject: [PATCH] Fix linking of JACK effect module
+
+/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.4/../../../../x86_64-pc-linux-gnu/bin/ld: ./.libs/libjack_common.a(libjack_common_la-jack_main.o): undefined
+reference to symbol 'gdk_threads_init'
+/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.4/../../../../lib64/libgdk-3.so: error adding symbols: DSO missing from command line
+---
+ jack/Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/jack/Makefile.am b/jack/Makefile.am
+index 651a034..a18fe15 100644
+--- a/jack/Makefile.am
++++ b/jack/Makefile.am
+@@ -36,6 +36,7 @@ libbmp_int_la_CPPFLAGS = -DJACK $(AM_CPPFLAGS)
+ libbmp_int_la_SOURCES = configdb.h configdb_rcfile.c rcfile.c rcfile.h util.c util.h
+ libjack_common_la_CPPFLAGS = -DJACK $(AM_CPPFLAGS)
+ libjack_common_la_SOURCES = plugin.h jack_main.cpp ../samples/CArg.cpp ../samples/CArg.hpp ../audacious/so.c
++libjack_common_la_LIBADD = $(jack_LIBS) $(gtk3_LIBS)
+
+ I_LIBS += libbmp_int.la libjack_common.la
+
+--
+2.4.0
+
diff --git a/media-libs/freeverb3/freeverb3-2.5.13-r2.ebuild b/media-libs/freeverb3/freeverb3-2.5.13-r2.ebuild
new file mode 100644
index 000000000000..44cf4eeb06d6
--- /dev/null
+++ b/media-libs/freeverb3/freeverb3-2.5.13-r2.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit eutils autotools versionator
+
+MY_PV=$(replace_version_separator 3 '')
+
+DESCRIPTION="High Quality Reverb and Impulse Response Convolution library including XMMS/Audacious Effect plugins"
+HOMEPAGE="http://freeverb3.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}-${MY_PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="audacious jack plugdouble cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse3 cpu_flags_x86_sse4_1 cpu_flags_x86_3dnow forcefpu"
+
+RDEPEND=">=sci-libs/fftw-3.0.1
+ audacious? ( <media-sound/audacious-2.5
+ media-libs/libsndfile )
+ jack? ( media-sound/jack-audio-connection-kit
+ media-libs/libsndfile )"
+DEPEND=${RDEPEND}
+
+S="${WORKDIR}/${PN}-$(get_version_component_range 1-3)"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-respect-disable-sse.patch
+ eautoreconf
+
+ epatch "${FILESDIR}"/${P}-fix-sse1v2-assembly.patch
+}
+
+src_configure() {
+ econf \
+ --enable-release \
+ --disable-bmp \
+ --disable-pluginit \
+ $(use_enable audacious) \
+ $(use_enable jack) \
+ $(use_enable plugdouble) \
+ $(use_enable cpu_flags_x86_3dnow 3dnow) \
+ $(use_enable cpu_flags_x86_sse sse) \
+ $(use_enable cpu_flags_x86_sse2 sse2) \
+ $(use_enable cpu_flags_x86_sse3 sse3) \
+ $(use_enable cpu_flags_x86_sse4_1 sse4) \
+ $(use_enable forcefpu) \
+ || die "econf failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ dodoc ChangeLog README || die 'dodoc failed'
+
+ insinto /usr/share/${PN}/samples/IR
+ doins samples/IR/*.wav || die
+}
diff --git a/media-libs/freeverb3/freeverb3-2.6.6.ebuild b/media-libs/freeverb3/freeverb3-2.6.6.ebuild
new file mode 100644
index 000000000000..1b2f2c45a452
--- /dev/null
+++ b/media-libs/freeverb3/freeverb3-2.6.6.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit multilib versionator
+
+DESCRIPTION="High Quality Reverb and Impulse Response Convolution library including XMMS/Audacious Effect plugins"
+HOMEPAGE="http://freeverb3.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="audacious cpu_flags_x86_avx jack plugdouble cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse3 cpu_flags_x86_sse4_1 cpu_flags_x86_3dnow forcefpu"
+
+RDEPEND=">=sci-libs/fftw-3.0.1
+ audacious? ( <media-sound/audacious-3
+ media-libs/libsndfile )
+ jack? ( media-sound/jack-audio-connection-kit
+ media-libs/libsndfile )"
+DEPEND=${RDEPEND}
+
+S="${WORKDIR}/${PN}-$(get_version_component_range 1-3)"
+
+src_configure() {
+ # TODO: Expose --enable-pthread (of >=2.6.0) to the outside
+ econf \
+ --enable-release \
+ --disable-bmp \
+ --disable-pluginit \
+ $(use_enable audacious) \
+ $(use_enable jack) \
+ $(use_enable plugdouble) \
+ --disable-autocflags \
+ $(use_enable cpu_flags_x86_3dnow 3dnow) \
+ $(use_enable cpu_flags_x86_sse sse) \
+ $(use_enable cpu_flags_x86_sse2 sse2) \
+ $(use_enable cpu_flags_x86_sse3 sse3) \
+ $(use_enable cpu_flags_x86_sse4_1 sse4) \
+ $(use_enable cpu_flags_x86_avx avx) \
+ --disable-fma \
+ --disable-fma4 \
+ $(use_enable forcefpu) \
+ || die "econf failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ dodoc ChangeLog README || die 'dodoc failed'
+
+ if use audacious ; then
+ find "${D}/usr/$(get_libdir)/audacious/" -name '*.la' -print -delete || die
+ fi
+
+ insinto /usr/share/${PN}/samples/IR
+ doins samples/IR/*.wav || die
+}
diff --git a/media-libs/freeverb3/freeverb3-3.1.1-r1.ebuild b/media-libs/freeverb3/freeverb3-3.1.1-r1.ebuild
new file mode 100644
index 000000000000..0081048c9a3a
--- /dev/null
+++ b/media-libs/freeverb3/freeverb3-3.1.1-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
+inherit eutils multilib versionator
+
+DESCRIPTION="High Quality Reverb and Impulse Response Convolution library including XMMS/Audacious Effect plugins"
+HOMEPAGE="https://savannah.nongnu.org/projects/freeverb3"
+SRC_URI="mirror://nongnu/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+_IUSE_INSTRUCTION_SETS="cpu_flags_x86_3dnow cpu_flags_x86_avx cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse3 cpu_flags_x86_sse4_1"
+IUSE="${_IUSE_INSTRUCTION_SETS} audacious forcefpu jack openmp plugdouble threads"
+
+_GTK_DEPEND=">=dev-libs/glib-2.4.7:2
+ >=x11-libs/gtk+-3.0.0:3
+ x11-libs/pango
+ x11-libs/cairo"
+
+RDEPEND=">=sci-libs/fftw-3.0.1
+ audacious? ( >=media-sound/audacious-3.5
+ ${_GTK_DEPEND}
+ media-libs/libsndfile )
+ jack? ( media-sound/jack-audio-connection-kit
+ ${_GTK_DEPEND}
+ media-libs/libsndfile )"
+DEPEND=${RDEPEND}
+
+S="${WORKDIR}/${PN}-$(get_version_component_range 1-3)"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-jack-compilation.patch
+ epatch "${FILESDIR}"/${P}-jack-linking.patch
+}
+
+src_configure() {
+ econf \
+ --disable-profile \
+ --enable-release \
+ --disable-autocflags \
+ --enable-undenormal \
+ $(use_enable threads pthread) \
+ $(use_enable forcefpu) \
+ --disable-force3dnow \
+ $(use_enable cpu_flags_x86_3dnow 3dnow) \
+ $(use_enable cpu_flags_x86_sse sse) \
+ $(use_enable cpu_flags_x86_sse2 sse2) \
+ $(use_enable cpu_flags_x86_sse3 sse3) \
+ $(use_enable cpu_flags_x86_sse4_1 sse4) \
+ $(use_enable cpu_flags_x86_avx avx) \
+ --disable-fma \
+ --disable-fma4 \
+ $(use_enable openmp omp) \
+ --disable-sample \
+ $(use_enable jack) \
+ $(use_enable audacious) \
+ --disable-srcnewcoeffs \
+ $(use_enable plugdouble) \
+ --disable-pluginit \
+ || die "econf failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ dodoc ChangeLog README || die 'dodoc failed'
+
+ if use audacious ; then
+ find "${D}/usr/$(get_libdir)/audacious/" -name '*.la' -print -delete || die
+ fi
+
+ insinto /usr/share/${PN}/samples/IR
+ doins samples/IR/*.wav || die
+}
diff --git a/media-libs/freeverb3/freeverb3-3.1.1.ebuild b/media-libs/freeverb3/freeverb3-3.1.1.ebuild
new file mode 100644
index 000000000000..c0e35d5a1623
--- /dev/null
+++ b/media-libs/freeverb3/freeverb3-3.1.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
+inherit multilib versionator
+
+DESCRIPTION="High Quality Reverb and Impulse Response Convolution library including XMMS/Audacious Effect plugins"
+HOMEPAGE="https://savannah.nongnu.org/projects/freeverb3"
+SRC_URI="mirror://nongnu/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+_IUSE_INSTRUCTION_SETS="cpu_flags_x86_3dnow cpu_flags_x86_avx cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse3 cpu_flags_x86_sse4_1"
+IUSE="${_IUSE_INSTRUCTION_SETS} audacious forcefpu jack openmp plugdouble threads"
+
+_GTK_DEPEND=">=dev-libs/glib-2.4.7:2
+ >=x11-libs/gtk+-3.0.0:3
+ x11-libs/pango
+ x11-libs/cairo"
+
+RDEPEND=">=sci-libs/fftw-3.0.1
+ audacious? ( >=media-sound/audacious-3.5
+ ${_GTK_DEPEND}
+ media-libs/libsndfile )
+ jack? ( media-sound/jack-audio-connection-kit
+ ${_GTK_DEPEND}
+ media-libs/libsndfile )"
+DEPEND=${RDEPEND}
+
+S="${WORKDIR}/${PN}-$(get_version_component_range 1-3)"
+
+src_configure() {
+ econf \
+ --disable-profile \
+ --enable-release \
+ --disable-autocflags \
+ --enable-undenormal \
+ $(use_enable threads pthread) \
+ $(use_enable forcefpu) \
+ --disable-force3dnow \
+ $(use_enable cpu_flags_x86_3dnow 3dnow) \
+ $(use_enable cpu_flags_x86_sse sse) \
+ $(use_enable cpu_flags_x86_sse2 sse2) \
+ $(use_enable cpu_flags_x86_sse3 sse3) \
+ $(use_enable cpu_flags_x86_sse4_1 sse4) \
+ $(use_enable cpu_flags_x86_avx avx) \
+ --disable-fma \
+ --disable-fma4 \
+ $(use_enable openmp omp) \
+ --disable-sample \
+ $(use_enable jack) \
+ $(use_enable audacious) \
+ --disable-srcnewcoeffs \
+ $(use_enable plugdouble) \
+ --disable-pluginit \
+ || die "econf failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ dodoc ChangeLog README || die 'dodoc failed'
+
+ if use audacious ; then
+ find "${D}/usr/$(get_libdir)/audacious/" -name '*.la' -print -delete || die
+ fi
+
+ insinto /usr/share/${PN}/samples/IR
+ doins samples/IR/*.wav || die
+}
diff --git a/media-libs/freeverb3/metadata.xml b/media-libs/freeverb3/metadata.xml
new file mode 100644
index 000000000000..5251146e238d
--- /dev/null
+++ b/media-libs/freeverb3/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>sound</herd>
+ <maintainer>
+ <email>sping@gentoo.org</email>
+ <name>Sebastian Pipping</name>
+ </maintainer>
+ <use>
+ <flag name='audacious'>Build Audacious plugin</flag>
+ <flag name='forcefpu'>Disable assembly code</flag>
+ <flag name='plugdouble'>Build plugins in double precision mode
+ (default is float)</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/ftgl/Manifest b/media-libs/ftgl/Manifest
new file mode 100644
index 000000000000..6757b4e4b4d4
--- /dev/null
+++ b/media-libs/ftgl/Manifest
@@ -0,0 +1 @@
+DIST ftgl-2.1.3-rc5.tar.bz2 707854 SHA256 521ff7bd62c459ff5372e269c223e2a6107a6a99a36afdc2ae634a973af70c59 SHA512 9841bdbe7e299dd0ae3bcbef08dc3a8787a863389bf242aa023b1c2442f3ffc8a2c6768a35d093d27e3ad7197c8228a9b15e795a36824424f05bef66b68c89a4 WHIRLPOOL 330e19923e51739d336c3c44345e1f8ae6907606be0635c55536409c7bb0caea6a61ede49b793c25c1542f60575cdf04f656e9b6436e8f8a43dcfea784e0056c
diff --git a/media-libs/ftgl/files/ftgl-2.1.3_rc5-gentoo.patch b/media-libs/ftgl/files/ftgl-2.1.3_rc5-gentoo.patch
new file mode 100644
index 000000000000..43571d5a07db
--- /dev/null
+++ b/media-libs/ftgl/files/ftgl-2.1.3_rc5-gentoo.patch
@@ -0,0 +1,42 @@
+--- configure.ac.old 2008-11-21 14:41:15.000000000 +0100
++++ configure.ac 2008-11-21 14:44:19.000000000 +0100
+@@ -64,19 +64,11 @@
+ CFLAGS="${CFLAGS} -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs"
+
+ # Build HTML documentatin?
+-AC_PATH_PROG(DOXYGEN, doxygen, no)
++DOXYGEN="no"
+ AM_CONDITIONAL(HAVE_DOXYGEN, test "x$DOXYGEN" != "xno")
+
+ # Build PDF documentation?
+-AC_PATH_PROG(LATEX, pdflatex, no)
+-AC_PATH_PROG(KPSEWHICH, kpsewhich, no)
+-AC_PATH_PROG(DVIPS, dvips, no)
+-AC_PATH_PROG(CONVERT, convert, no)
+-AC_PATH_PROG(EPSTOPDF, epstopdf, no)
+-if test "${DVIPS}" = "no" -o "${KPSEWHICH}" = "no" -o "${EPSTOPDF}" = "no" \
+- -o "${CONVERT}" = "no"; then
+ LATEX="no"
+-fi
+ if test "x${LATEX}" != "xno"; then
+ AC_MSG_CHECKING(for a4.sty and a4wide.sty)
+ if "${KPSEWHICH}" a4.sty >/dev/null 2>&1; then
+--- Makefile.am.old 2008-11-24 22:35:16.000000000 +0100
++++ Makefile.am 2008-11-24 22:36:32.000000000 +0100
+@@ -24,16 +24,6 @@
+ m4 \
+ $(NULL)
+
+-# Print out an informative summary.
+-all-local:
+- @$(ECHO) "Done."
+- @$(ECHO)
+- @if test "x$(MAKECMDGOALS)" = "xall-am" -o "x$(.TARGETS)" = "xall-am" -o "x$(MAKECMDGOALS)" = "x" -o "x$(.TARGETS)" = "x" ; then \
+- $(ECHO) "---" ;\
+- $(ECHO) "Run 'make install' to begin installation into $(prefix)" ;\
+- fi
+- @$(ECHO)
+-
+ # Upload documentation
+ DOC = docs/html docs/latex/ftgl.pdf
+ HOST = ftgl.sf.net
diff --git a/media-libs/ftgl/files/ftgl-2.1.3_rc5-underlink.patch b/media-libs/ftgl/files/ftgl-2.1.3_rc5-underlink.patch
new file mode 100644
index 000000000000..30bfba04c7d4
--- /dev/null
+++ b/media-libs/ftgl/files/ftgl-2.1.3_rc5-underlink.patch
@@ -0,0 +1,11 @@
+--- demo/Makefile.am.old 2011-05-20 11:13:18.822445466 +0200
++++ demo/Makefile.am 2011-05-20 11:13:28.271042994 +0200
+@@ -17,7 +17,7 @@
+ $(NULL)
+ c_demo_CFLAGS = $(FT2_CFLAGS) $(GL_CFLAGS)
+ c_demo_LDFLAGS = $(FT2_LIBS) $(GLUT_LIBS)
+-c_demo_LDADD = ../src/libftgl.la
++c_demo_LDADD = ../src/libftgl.la -lm
+
+ FTGLDemo_SOURCES = \
+ FTGLDemo.cpp \
diff --git a/media-libs/ftgl/ftgl-2.1.3_rc5.ebuild b/media-libs/ftgl/ftgl-2.1.3_rc5.ebuild
new file mode 100644
index 000000000000..c34e22fc8d36
--- /dev/null
+++ b/media-libs/ftgl/ftgl-2.1.3_rc5.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils flag-o-matic autotools
+
+MY_PV=${PV/_/-}
+MY_PV2=${PV/_/\~}
+MY_P=${PN}-${MY_PV}
+MY_P2=${PN}-${MY_PV2}
+
+DESCRIPTION="library to use arbitrary fonts in OpenGL applications"
+HOMEPAGE="http://ftgl.wiki.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="static-libs"
+
+DEPEND=">=media-libs/freetype-2.0.9
+ virtual/opengl
+ virtual/glu
+ media-libs/freeglut"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${MY_P2}
+
+DOCS="AUTHORS BUGS ChangeLog INSTALL NEWS README TODO docs/projects_using_ftgl.txt"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo.patch \
+ "${FILESDIR}"/${P}-underlink.patch
+# AT_M4DIR=m4 eautoreconf
+ sed -e "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/" -i configure.ac || die
+ eautoreconf
+}
+
+src_configure() {
+ strip-flags # ftgl is sensitive - bug #112820
+ econf \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ rm -rf "${D}"/usr/share/doc/ftgl
+
+ find "${ED}" -name '*.la' -exec rm -f {} +
+}
diff --git a/media-libs/ftgl/metadata.xml b/media-libs/ftgl/metadata.xml
new file mode 100644
index 000000000000..cf3590a61d88
--- /dev/null
+++ b/media-libs/ftgl/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>games</herd>
+ <upstream>
+ <remote-id type="sourceforge">ftgl</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/game-music-emu/Manifest b/media-libs/game-music-emu/Manifest
new file mode 100644
index 000000000000..cb09c6cb8074
--- /dev/null
+++ b/media-libs/game-music-emu/Manifest
@@ -0,0 +1 @@
+DIST game-music-emu-0.6.0.tar.bz2 170202 SHA256 506e81d0c61e1a26d503fbf5351503e0b31f9fbb374cb1f09979758b46a24987 SHA512 9bd914cc89279519456a37a71c66cec12f7bea64f286fd118680b83eba76ebe547bb0774ad91230a53d004f5cd1a41ad399ffb94e15dd9fc3460abe6732ab4dd WHIRLPOOL f8d93a0d4f1a87ac0333241e21dd31d8a86a1b9aa6ca8c5df63c2e2fee95ffef253b53817363d72b7be194e5b7daf0de4f5344b60295501050ec3df851a2b377
diff --git a/media-libs/game-music-emu/game-music-emu-0.6.0-r1.ebuild b/media-libs/game-music-emu/game-music-emu-0.6.0-r1.ebuild
new file mode 100644
index 000000000000..82e324341799
--- /dev/null
+++ b/media-libs/game-music-emu/game-music-emu-0.6.0-r1.ebuild
@@ -0,0 +1,17 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit cmake-multilib
+
+DESCRIPTION="Video game music file emulators"
+HOMEPAGE="http://code.google.com/p/game-music-emu/"
+SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ppc ppc64 x86 ~amd64-fbsd ~x86-fbsd"
+IUSE=""
+
+DOCS="changes.txt design.txt gme.txt readme.txt"
diff --git a/media-libs/game-music-emu/metadata.xml b/media-libs/game-music-emu/metadata.xml
new file mode 100644
index 000000000000..1d206b9a1f24
--- /dev/null
+++ b/media-libs/game-music-emu/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>sound</herd>
+ <upstream>
+ <remote-id type="google-code">game-music-emu</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/ganv/Manifest b/media-libs/ganv/Manifest
new file mode 100644
index 000000000000..3d7dedc1d9d8
--- /dev/null
+++ b/media-libs/ganv/Manifest
@@ -0,0 +1 @@
+DIST ganv-1.4.2.tar.bz2 175510 SHA256 145028ade1567f258de6ad58ad0f7941646208d261028a9b74eb61126e2dfa3c SHA512 0609dea81cceb0c560286ad2f132f318c2d583af5163dcea4511155e78a022248dcb7ae535233493bdf906fb036422ebd4368d688123f3e1676c4e0398cbc6c2 WHIRLPOOL d8b59f57e6321fdeede0cc23054349b00a7824587cf995a054618a0d0d39882150cf4bad704c7c80a9f0b5fc063f2204601338d2167b03a50e25136de93fb70f
diff --git a/media-libs/ganv/ganv-1.4.2.ebuild b/media-libs/ganv/ganv-1.4.2.ebuild
new file mode 100644
index 000000000000..11adbd7c2949
--- /dev/null
+++ b/media-libs/ganv/ganv-1.4.2.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 )
+PYTHON_REQ_USE='threads(+)'
+inherit waf-utils python-any-r1
+
+DESCRIPTION="A GTK+ widget for interactive graph-like environments"
+HOMEPAGE="http://drobilla.net/software/ganv/"
+SRC_URI="http://download.drobilla.net/${P}.tar.bz2"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+fdgl +graphviz introspection nls"
+
+RDEPEND="dev-cpp/glibmm:2
+ dev-cpp/gtkmm:2.4
+ x11-libs/gtk+:2
+ graphviz? ( media-gfx/graphviz[gtk] )
+ introspection? ( app-text/yelp-tools
+ dev-libs/gobject-introspection[doctool] )"
+DEPEND="${RDEPEND}
+ nls? ( virtual/libintl )"
+
+DOCS=( AUTHORS NEWS README )
+
+src_configure() {
+ waf-utils_src_configure \
+ $(use graphviz || echo "--no-graphviz") \
+ $(use fdgl || echo "--no-fdgl") \
+ $(use nls || echo "--no-nls") \
+ $(use introspection && echo "--gir")
+}
diff --git a/media-libs/ganv/metadata.xml b/media-libs/ganv/metadata.xml
new file mode 100644
index 000000000000..bd43bef08dd3
--- /dev/null
+++ b/media-libs/ganv/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>proaudio</herd>
+ <use>
+ <flag name="fdgl">Use experimental force-directed graph layout</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/gavl/Manifest b/media-libs/gavl/Manifest
new file mode 100644
index 000000000000..9493b62162d7
--- /dev/null
+++ b/media-libs/gavl/Manifest
@@ -0,0 +1,2 @@
+DIST gavl-1.2.0.tar.gz 4589139 SHA256 814120339f7a99d35c36e0eb61ba6cf60bd939ee4a47d73a17f3ba1438c5f88e
+DIST gavl-1.4.0.tar.gz 4592701 SHA256 51aaac41391a915bd9bad07710957424b046410a276e7deaff24a870929d33ce SHA512 beda0073cab865fdb3a55de5d5c800fabcd40b21c5bb5b5f9d43046db3602d8967fb8b893325fcdaca3fa66d978aa3cae79a4a797d43d40ad50ea5af752a650a WHIRLPOOL 59a35edfaeafc311f1c4537eb03fc747c3c2807152543e3d7f721e525a67f14553e9903a7c9704ea36c77354e5f3958160368c58a43ab3f48388ef9de2d4f2e2
diff --git a/media-libs/gavl/gavl-1.2.0.ebuild b/media-libs/gavl/gavl-1.2.0.ebuild
new file mode 100644
index 000000000000..c52cf0a4670e
--- /dev/null
+++ b/media-libs/gavl/gavl-1.2.0.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit autotools-utils
+
+DESCRIPTION="library for handling uncompressed audio and video data"
+HOMEPAGE="http://gmerlin.sourceforge.net"
+SRC_URI="mirror://sourceforge/gmerlin/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 hppa ppc ~ppc64 x86"
+IUSE="doc"
+
+RDEPEND=""
+DEPEND="doc? ( app-doc/doxygen )
+ virtual/pkgconfig"
+# pkg-config is only here to satisfy autotools-utils.eclass wrt #432796
+
+DOCS=( AUTHORS README TODO )
+
+src_prepare() {
+ sed -i \
+ -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' \
+ -e 's:-mfpmath=387::g' \
+ -e 's:-O3 -funroll-all-loops -fomit-frame-pointer -ffast-math::g' \
+ -e '/LDFLAGS=/d' \
+ configure.ac || die
+
+ AT_M4DIR="m4" eautoreconf
+}
+
+src_configure() {
+ # --disable-libpng because it's only used for tests
+ local myeconfargs=(
+ --docdir=/usr/share/doc/${PF}/html
+ --disable-libpng
+ $(use_with doc doxygen)
+ --without-cpuflags
+ )
+
+ autotools-utils_src_configure
+}
diff --git a/media-libs/gavl/gavl-1.4.0-r1.ebuild b/media-libs/gavl/gavl-1.4.0-r1.ebuild
new file mode 100644
index 000000000000..a6674fa770b6
--- /dev/null
+++ b/media-libs/gavl/gavl-1.4.0-r1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+
+inherit autotools-multilib
+
+DESCRIPTION="library for handling uncompressed audio and video data"
+HOMEPAGE="http://gmerlin.sourceforge.net"
+SRC_URI="mirror://sourceforge/gmerlin/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 hppa ppc ~ppc64 x86"
+IUSE="doc static-libs"
+
+DEPEND="doc? ( app-doc/doxygen )
+ virtual/pkgconfig"
+
+DOCS=( AUTHORS README TODO )
+
+src_prepare() {
+ # AC_CONFIG_HEADERS, bug #467736
+ sed -i \
+ -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' \
+ -e 's:-mfpmath=387::g' \
+ -e 's:-O3 -funroll-all-loops -fomit-frame-pointer -ffast-math::g' \
+ -e '/LDFLAGS=/d' \
+ configure.ac || die
+
+ export AT_M4DIR="m4"
+
+ autotools-multilib_src_prepare
+}
+
+src_configure() {
+ # --disable-libpng because it's only used for tests
+ local myeconfargs=(
+ --docdir=/usr/share/doc/${PF}/html
+ --disable-libpng
+ $(use_with doc doxygen)
+ --without-cpuflags
+ )
+
+ autotools-multilib_src_configure
+}
diff --git a/media-libs/gavl/gavl-1.4.0.ebuild b/media-libs/gavl/gavl-1.4.0.ebuild
new file mode 100644
index 000000000000..a421951bffa8
--- /dev/null
+++ b/media-libs/gavl/gavl-1.4.0.ebuild
@@ -0,0 +1,49 @@
+# 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
+
+DESCRIPTION="library for handling uncompressed audio and video data"
+HOMEPAGE="http://gmerlin.sourceforge.net"
+SRC_URI="mirror://sourceforge/gmerlin/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~x86"
+IUSE="doc static-libs"
+
+DEPEND="doc? ( app-doc/doxygen )
+ virtual/pkgconfig"
+
+DOCS=( AUTHORS README TODO )
+
+src_prepare() {
+ # AC_CONFIG_HEADERS, bug #467736
+ sed -i \
+ -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' \
+ -e 's:-mfpmath=387::g' \
+ -e 's:-O3 -funroll-all-loops -fomit-frame-pointer -ffast-math::g' \
+ -e '/LDFLAGS=/d' \
+ configure.ac || die
+
+ export AT_M4DIR="m4"
+
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ # --disable-libpng because it's only used for tests
+ local myeconfargs=(
+ --docdir=/usr/share/doc/${PF}/html
+ --disable-libpng
+ $(use_with doc doxygen)
+ --without-cpuflags
+ )
+
+ autotools-utils_src_configure
+}
diff --git a/media-libs/gavl/metadata.xml b/media-libs/gavl/metadata.xml
new file mode 100644
index 000000000000..79a37f98e4af
--- /dev/null
+++ b/media-libs/gavl/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">gmerlin</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/gd/Manifest b/media-libs/gd/Manifest
new file mode 100644
index 000000000000..8fc786d72e27
--- /dev/null
+++ b/media-libs/gd/Manifest
@@ -0,0 +1,2 @@
+DIST gd-2.0.35.tar.bz2 1212730 SHA256 bf222490749d2a9a9ac3593b01eb55aed98461ff81202414707f61b42aa300f9 SHA512 eef8150adc040bed920155337211864a41ae3c4532e852ad443a3a3b9ffdc7fd3130698041b7b19b0b1207e78a80c263c6da26eba7208cdeeff78283c7d0d281 WHIRLPOOL 9eca23a184106652ef5c19ee3b5c18e23d742e21103c66907bf829910b95aa92eea7620c5579bf493c14730bc0327a4d662ffaf9bf9a5538127b8c10cc9c6b84
+DIST libgd-2.1.1.tar.xz 2039132 SHA256 9ada1ed45594abc998ebc942cef12b032fbad672e73efc22bc9ff54f5df2b285 SHA512 48f444402a4b89e412870f9091b92eb26136c5c0d795722262ad973c7d4103476204a2de36133a2634b8f410d6bccdcf60afb829a74ac2fddfb96aff2cd2567b WHIRLPOOL a38cf1f060db35d247b54038e731484e6230cd8a9da263a8c4823aaf6b3ce455c0747bbbde60f131d85a48340e39a5c8d6273fa51366cbe2436530520211a238
diff --git a/media-libs/gd/files/gd-2.0.35-fontconfig.patch b/media-libs/gd/files/gd-2.0.35-fontconfig.patch
new file mode 100644
index 000000000000..ca313024870e
--- /dev/null
+++ b/media-libs/gd/files/gd-2.0.35-fontconfig.patch
@@ -0,0 +1,25 @@
+fix from upstream
+
+http://bugs.gentoo.org/363367
+
+# HG changeset patch
+# User tabe
+# Date 1239812355 0
+# Node ID 3ea283efcdafcb2acc1dd0ace1d3d48da6d8cec8
+# Parent 4f29a877875f63cee5a64e7bea406a61882a565e
+fixed FS#199
+
+199, Fixed useFontConfig() to work as documented (Ethan Merritt)
+
+diff -r 4f29a877875f -r 3ea283efcdaf src/gdft.c
+--- a/src/gdft.c Sat Apr 04 12:00:37 2009 +0000
++++ b/src/gdft.c Wed Apr 15 16:19:15 2009 +0000
+@@ -1688,7 +1688,7 @@
+ BGD_DECLARE(int) gdFTUseFontConfig(int flag)
+ {
+ #ifdef HAVE_LIBFONTCONFIG
+- fontConfigFlag = 1;
++ fontConfigFlag = flag;
+ return 1;
+ #else
+ return 0;
diff --git a/media-libs/gd/files/gd-2.0.35-libpng-pkg-config.patch b/media-libs/gd/files/gd-2.0.35-libpng-pkg-config.patch
new file mode 100644
index 000000000000..4b8971f1e302
--- /dev/null
+++ b/media-libs/gd/files/gd-2.0.35-libpng-pkg-config.patch
@@ -0,0 +1,113 @@
+use libpng's pkg-config files rather than the ugly xxx-config scripts
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -47,6 +47,7 @@ AC_PROG_LIBTOOL
+ AC_PROG_LN_S
+ AC_PROG_MAKE_SET
+ #AC_PROG_RANLIB
++PKG_PROG_PKG_CONFIG
+
+ dnl may be required for freetype and Xpm
+ AC_PATH_X
+@@ -340,74 +341,26 @@ AC_CHECK_LIB(z,deflate,
+ dnl libpng is required
+ AC_ARG_WITH(png,dnl
+ [ --with-png=DIR where to find the png library],,
+- withval=yes)
+-
+-# libpng12.so is a nightmare. We have to test separately for
+-# libpng12-config and libpng-config. If we find libpng12-config,
+-# we don't look for the other, which will just be a symlink to it,
+-# confusing autoconf into thinking the library itself will be named -lpng,
+-# which it won't be. Awful. This code will suffice unless the libpng
+-# authors decide to do this AGAIN. Which I really hope they won't. TBB
+-
+-if test "$withval" != no; then
+- AC_PATH_PROG([LIBPNG12_CONFIG], [libpng12-config])
+- AC_PATH_PROG([LIBPNG_CONFIG], [libpng-config])
+- if test -n "$LIBPNG12_CONFIG"; then
+- libpng_CPPFLAGS=`libpng12-config --cflags`
+- # should be --ldopts, but it's currently broken
+- libpng_LDFLAGS=`libpng12-config --ldflags`
+- libpng_LDFLAGS=`echo " $libpng_LDFLAGS" | sed 's/ -l[[^ ]][[^ ]]*//g'`
+- elif test -n "$LIBPNG_CONFIG"; then
+- libpng_CPPFLAGS=`libpng-config --cflags`
+- # should be --ldopts, but it's currently broken
+- libpng_LDFLAGS=`libpng-config --ldflags`
+- libpng_LDFLAGS=`echo " $libpng_LDFLAGS" | sed 's/ -l[[^ ]][[^ ]]*//g'`
+- elif test -d "$withval"; then
+- libpng_CPPFLAGS="-I$withval/include"
+- libpng_LDFLAGS="-L$withval/lib"
+- fi
+-
+- AC_CHECK_HEADERS(png.h,,
+- [AC_CHECK_HEADERS(libpng/png.h,
+- [CPPFLAGS="$CPPFLAGS $libpng_CPPFLAGS/libpng"],
+- [CPPFLAGS="$_cppflags"])])
+-
+- _ldflags="$LDFLAGS"
+- LDFLAGS="$libpng_LDFLAGS $LDFLAGS"
+-
+- if test -n "$LIBPNG12_CONFIG"; then
+- AC_CHECK_LIB(png12,png_create_read_struct,
+- [LIBS="-lpng12 $LIBS"
+- FEATURES="GD_PNG $FEATURES"
+- AC_DEFINE(HAVE_LIBPNG, 1, [ Define if you have the png library. ])],
+- [LDFLAGS="$_ldflags"
+- AC_MSG_WARN([libpng is required - see http://www.libpng.org/pub/png/])])
+- elif test -n "$LIBPNG_CONFIG"; then
+- AC_CHECK_LIB(png,png_create_read_struct,
+- [LIBS="-lpng $LIBS"
+- FEATURES="GD_PNG $FEATURES"
+- AC_DEFINE(HAVE_LIBPNG, 1, [ Define if you have the png library. ])],
+- [LDFLAGS="$_ldflags"
+- AC_MSG_WARN([libpng is required - see http://www.libpng.org/pub/png/])])
+- else
+- AC_CHECK_LIB(png,png_create_read_struct,
+- [LIBS="-lpng $LIBS"
+- FEATURES="GD_PNG $FEATURES"
+- AC_DEFINE(HAVE_LIBPNG, 1, [ Define if you have the png library. ])],
+- [LDFLAGS="$_ldflags"
+- AC_MSG_WARN([libpng is required - see http://www.libpng.org/pub/png/])])
+- fi
+-else
+- ac_cv_lib_png_png_create_read_struct=no
++ with_png=detect)
++
++if test "$with_png" != no; then
++ PKG_CHECK_MODULES([LIBPNG], libpng, [
++ FEATURES="GD_PNG $FEATURES"
++ AC_DEFINE(HAVE_LIBPNG, 1, [ Define if you have the png library. ])
++ CPPFLAGS="$CPPFLAGS $LIBPNG_CFLAGS"
++ LDFLAGS="$LDFLAGS $LIBPNG_LIBS"
++ with_png=yes
++ ],[
++ if test "$with_png" = yes; then
++ AC_MSG_ERROR([png support requested, but not found])
++ fi
++ with_png=no
++ ])
++fi
++if test "$with_png" = no; then
+ AC_MSG_WARN([libpng is required - see http://www.libpng.org/pub/png/])
+ fi
+
+-#TBB: png12's png_create_read_struct is just as good
+-#2.0.23: should be = not ==
+-if test "$ac_cv_lib_png12_png_create_read_struct" = yes; then
+- ac_cv_lib_png_png_create_read_struct=yes
+-fi
+-
+ dnl FreeType configure tests snarfed from libwmf ..
+ AC_ARG_WITH(freetype,dnl
+ [ --with-freetype=DIR where to find the freetype 2.x library],
+@@ -528,7 +481,7 @@ dnl report configuration
+ AC_MSG_RESULT([
+ ** Configuration summary for $PACKAGE $VERSION:
+
+- Support for PNG library: $ac_cv_lib_png_png_create_read_struct
++ Support for PNG library: $with_png
+ Support for JPEG library: $ac_cv_lib_jpeg_jpeg_set_defaults
+ Support for Freetype 2.x library: $ac_cv_lib_freetype_FT_Init_FreeType
+ Support for Fontconfig library: $ac_cv_lib_fontconfig_FcInit
diff --git a/media-libs/gd/files/gd-2.0.35-libpng14.patch b/media-libs/gd/files/gd-2.0.35-libpng14.patch
new file mode 100644
index 000000000000..46e621e7755a
--- /dev/null
+++ b/media-libs/gd/files/gd-2.0.35-libpng14.patch
@@ -0,0 +1,16 @@
+http://bugs.gentoo.org/305101
+http://repos.archlinux.org/wsvn/packages/gd/trunk/libpng14.patch
+
+patch in upstream repo already
+
+--- gd_png.c
++++ gd_png.c
+@@ -149,7 +149,7 @@
+ return NULL;
+ }
+
+- if (!png_check_sig (sig, 8)) { /* bad signature */
++ if (png_sig_cmp (sig, 0, 8)) { /* bad signature */
+ return NULL; /* bad signature */
+ }
+
diff --git a/media-libs/gd/files/gd-2.0.35-maxcolors.patch b/media-libs/gd/files/gd-2.0.35-maxcolors.patch
new file mode 100644
index 000000000000..7d6852ecc095
--- /dev/null
+++ b/media-libs/gd/files/gd-2.0.35-maxcolors.patch
@@ -0,0 +1,17 @@
+http://bugs.gentoo.org/292130
+
+fix in usptream repo already
+
+--- gd-2.0.35/gd_gd.c
++++ gd-2.0.35/gd_gd.c
+@@ -44,6 +44,10 @@
+ {
+ goto fail1;
+ }
++ if (im->colorsTotal > gdMaxColors)
++ {
++ goto fail1;
++ }
+ }
+ /* Int to accommodate truecolor single-color transparency */
+ if (!gdGetInt (&im->transparent, in))
diff --git a/media-libs/gd/files/gd-2.1.1-headers.patch b/media-libs/gd/files/gd-2.1.1-headers.patch
new file mode 100644
index 000000000000..089e52f8fff1
--- /dev/null
+++ b/media-libs/gd/files/gd-2.1.1-headers.patch
@@ -0,0 +1,30 @@
+From 92f5a4b113deca14e80c218e6bcd06835c3e059f Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sat, 28 Feb 2015 17:17:52 -0500
+Subject: [PATCH] tests: fix header inclusion
+
+gdnametest uses string funcs, so pull in string.h. It also can't pull
+in test_config.h directly as it breaks when building out of tree. Use
+the -I paths to find it.
+
+URL: https://bugs.gentoo.org/540376
+
+diff --git a/tests/gdimagefile/gdnametest.c b/tests/gdimagefile/gdnametest.c
+index dd8f019..f2bb8a6 100644
+--- a/tests/gdimagefile/gdnametest.c
++++ b/tests/gdimagefile/gdnametest.c
+@@ -1,9 +1,10 @@
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+
+ #include "gd.h"
+ #include "gdtest.h"
+-#include "../test_config.h"
++#include "test_config.h"
+
+ #define WIDTH 60
+ #define HEIGHT 50
+--
+2.3.1
+
diff --git a/media-libs/gd/files/gd-2.1.1-webp-pre.patch b/media-libs/gd/files/gd-2.1.1-webp-pre.patch
new file mode 100644
index 000000000000..766a4cbda24e
--- /dev/null
+++ b/media-libs/gd/files/gd-2.1.1-webp-pre.patch
@@ -0,0 +1,28 @@
+https://bugs.gentoo.org/545956
+
+From c7e5dc617c7466c44935cdefbe7e79de319f98ca Mon Sep 17 00:00:00 2001
+From: Pierre Joye <pierre.php@gmail.com>
+Date: Sat, 17 Jan 2015 08:20:17 +0100
+Subject: [PATCH] fix #111, invalid default quantization
+
+---
+ src/gd_webp.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/gd_webp.c b/src/gd_webp.c
+index fae3861..a3ae1ac 100644
+--- a/src/gd_webp.c
++++ b/src/gd_webp.c
+@@ -185,6 +185,9 @@ BGD_DECLARE(void) gdImageWebpCtx (gdImagePtr im, gdIOCtx * outfile, int quantiza
+ gd_error("gd-webp error: cannot allocate Y buffer");
+ return;
+ }
++ if (quantization == -1) {
++ quantization = 80;
++ }
+ vp8_quality = mapQualityToVP8QP(quantization);
+
+ U = Y + width * height;
+--
+2.3.5
+
diff --git a/media-libs/gd/files/gd-2.1.1-webp.patch b/media-libs/gd/files/gd-2.1.1-webp.patch
new file mode 100644
index 000000000000..93d91552fe45
--- /dev/null
+++ b/media-libs/gd/files/gd-2.1.1-webp.patch
@@ -0,0 +1,409 @@
+https://bugs.gentoo.org/545956
+
+From a79232c5fa692c3b6e3f5bc95ecfc455424c3f54 Mon Sep 17 00:00:00 2001
+From: Pierre Joye <pierre.php@gmail.com>
+Date: Tue, 20 Jan 2015 04:55:11 +0100
+Subject: [PATCH] fix #129, drop VPX usage in favor of libwebp
+
+---
+ configure.ac | 80 +++++------------
+ src/gd_webp.c | 231 +++++++++++++++++++++-----------------------------
+ tests/Makefile.am | 2 +-
+ tests/webp/bug00111.c | 2 +-
+ 4 files changed, 122 insertions(+), 193 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 1024a3a..8923186 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -317,63 +317,6 @@ if test "$with_xpm" != no; then
+ fi
+ AM_CONDITIONAL([HAVE_LIBXPM], test "$with_xpm" = yes)
+
+-dnl check for libvpx by default
+-AC_ARG_WITH(vpx,dnl
+-[ --with-vpx=DIR where to find the vpx library])
+-
+-case $with_vpx in
+-no) ;;
+-yes|"")
+- PKG_CHECK_MODULES([LIBVPX], vpx, [with_vpx=yes],
+- [
+- PKG_CHECK_MODULES([LIBVPX], libvpx, [with_vpx=yes],
+- [
+- if test "$with_vpx" = yes; then
+- AC_MSG_ERROR([VPX support requested, but not found])
+- fi
+- with_vpx=no
+- ])
+- ])
+- ;;
+-*)
+- save_LIBS="$LIBS"
+- save_CPPFLAGS="$CPPFLAGS"
+-
+- if test -d "$with_vpx"; then
+- LIBVPX_CFLAGS="-I$with_vpx/include"
+- LIBVPX_LIBS="-L$with_vpx/lib -lvpx"
+- fi
+-
+- CPPFLAGS="$CPPFLAGS $LIBVPX_CFLAGS"
+- LIBS="$LIBS $LIBVPX_LIBS"
+-
+- AC_CHECK_LIB(vpx,vpx_codec_destroy,
+- [
+- if test -z "$LIBVPX_LIBS"; then
+- LIBVPX_LIBS="-lvpx"
+- fi
+- with_vpx=yes
+- ],[
+- if test "$with_vpx" != ""; then
+- AC_MSG_ERROR([vpx support requested, but not found])
+- else
+- with_vpx=no
+- fi
+- ])
+-
+- CPPFLAGS="$save_CPPFLAGS"
+- LIBS="$save_LIBS"
+- ;;
+-esac
+-
+-if test "$with_vpx" != no; then
+- CPPFLAGS="$CPPFLAGS $LIBVPX_CFLAGS"
+- LIBS="$LIBS $LIBVPX_LIBS"
+- FEATURES="GD_VPX $FEATURES"
+- AC_DEFINE(HAVE_LIBVPX, 1, [ Define if you have the VPX library. ])
+-fi
+-AM_CONDITIONAL([HAVE_LIBVPX], test "$with_vpx" = yes)
+-
+ dnl check for libtiff by default
+ AC_ARG_WITH(tiff,dnl
+ [ --with-tiff=DIR where to find the TIFF library])
+@@ -437,6 +380,27 @@ if test "$mingw_cv_win32_host" = yes; then
+ AC_DEFINE([BGDWIN32], [], [Define is you are building for Win32 API])
+ fi
+
++
++dnl check for libwebp by default
++AC_ARG_WITH(webp,dnl
++[ --with-webp=DIR where to find the webp library],
++ [if test -d "$withval"; then
++ LDFLAGS="$LDFLAGS -L$withval/lib"
++ CFLAGS="$CFLAGS -I$withval/include"
++ fi],
++ withval=yes)
++
++if test "$withval" != no; then
++ AC_CHECK_LIB(webp,WebPGetInfo,
++ [LIBS="-lwebp $LIBS"
++ FEATURES="GD_WEBP $FEATURES"
++ AC_DEFINE(HAVE_LIBWEBP, 1, [ Define if you have the webp library. ])])
++ with_webp=yes
++else
++ with_webp=no
++fi
++AM_CONDITIONAL([HAVE_LIBWEBP], test "$with_webp" = yes)
++
+ dnl report configuration
+ AC_MSG_RESULT([
+ ** Configuration summary for $PACKAGE $VERSION:
+@@ -444,7 +408,7 @@ AC_MSG_RESULT([
+ Support for Zlib: $with_zlib
+ Support for PNG library: $with_png
+ Support for JPEG library: $ac_cv_lib_jpeg_jpeg_set_defaults
+- Support for VPX library: $with_vpx
++ Support for WebP library: $with_webp
+ Support for TIFF library: $with_tiff
+ Support for Freetype 2.x library: $with_freetype
+ Support for Fontconfig library: $with_fontconfig
+diff --git a/src/gd_webp.c b/src/gd_webp.c
+index a3ae1ac..c44bd80 100644
+--- a/src/gd_webp.c
++++ b/src/gd_webp.c
+@@ -2,33 +2,21 @@
+ #include "config.h"
+ #endif /* HAVE_CONFIG_H */
+
++
++#ifdef HAVE_LIBWEBP
+ #include <stdio.h>
+ #include <math.h>
+ #include <string.h>
+ #include <stdlib.h>
+ #include "gd.h"
+ #include "gd_errors.h"
+-
+-#ifdef HAVE_LIBVPX
+-#include "webpimg.h"
+ #include "gdhelpers.h"
++#include "webp/decode.h"
++#include "webp/encode.h"
+
+-extern void gd_YUV420toRGBA(uint8* Y,
+- uint8* U,
+- uint8* V,
+- gdImagePtr im);
+-
+-extern void gd_RGBAToYUV420(gdImagePtr im2,
+- uint8* Y,
+- uint8* U,
+- uint8* V);
+-
+-const char * gdWebpGetVersionString()
+-{
+- return "not defined";
+-}
++#define GD_WEBP_ALLOC_STEP (4*1024)
+
+-BGD_DECLARE(gdImagePtr) gdImageCreateFromWebp (FILE * inFile)
++gdImagePtr gdImageCreateFromWebp (FILE * inFile)
+ {
+ gdImagePtr im;
+ gdIOCtx *in = gdNewFileCtx(inFile);
+@@ -38,42 +26,16 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFromWebp (FILE * inFile)
+ return im;
+ }
+
+-BGD_DECLARE(gdImagePtr) gdImageCreateFromWebpPtr (int size, void *data)
++gdImagePtr gdImageCreateFromWebpCtx (gdIOCtx * infile)
+ {
+- int width, height, ret;
+- unsigned char *Y = NULL;
+- unsigned char *U = NULL;
+- unsigned char *V = NULL;
+- gdImagePtr im;
+-
+- ret = WebPDecode(data, size, &Y, &U, &V, &width, &height);
+- if (ret != webp_success) {
+- if (Y) free(Y);
+- if (U) free(U);
+- if (V) free(V);
+- gd_error("WebP decode: fail to decode input data");
+- return NULL;
+- }
+- im = gdImageCreateTrueColor(width, height);
+- if (!im) {
+- return NULL;
+- }
+- gd_YUV420toRGBA(Y, U, V, im);
+- return im;
+-}
+-
+-#define GD_WEBP_ALLOC_STEP (4*1024)
+-
+-BGD_DECLARE(gdImagePtr) gdImageCreateFromWebpCtx (gdIOCtx * infile)
+-{
+- int width, height, ret;
+- unsigned char *filedata = NULL;
++ int width, height;
++ uint8_t *filedata = NULL;
++ uint8_t *argb = NULL;
+ unsigned char *read, *temp;
+- unsigned char *Y = NULL;
+- unsigned char *U = NULL;
+- unsigned char *V = NULL;
+ size_t size = 0, n;
+ gdImagePtr im;
++ int x, y;
++ uint8_t *p;
+
+ do {
+ temp = gdRealloc(filedata, size+GD_WEBP_ALLOC_STEP);
+@@ -89,23 +51,97 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFromWebpCtx (gdIOCtx * infile)
+ }
+
+ n = gdGetBuf(read, GD_WEBP_ALLOC_STEP, infile);
+- size += n;
+- } while (n>0);
++ if (n>0 && n!=EOF) {
++ size += n;
++ }
++ } while (n>0 && n!=EOF);
+
+- ret = WebPDecode(filedata, size, &Y, &U, &V, &width, &height);
+- gdFree(filedata);
+- if (ret != webp_success) {
+- if (Y) free(Y);
+- if (U) free(U);
+- if (V) free(V);
+- gd_error("WebP decode: fail to decode input data");
++ if (WebPGetInfo(filedata,size, &width, &height) == 0) {
++ gd_error("gd-webp cannot get webp info");
+ return NULL;
+ }
++
+ im = gdImageCreateTrueColor(width, height);
+- gd_YUV420toRGBA(Y, U, V, im);
++ if (!im) {
++ return NULL;
++ }
++ argb = WebPDecodeARGB(filedata, size, &width, &height);
++ if (!argb) {
++ gd_error("gd-webp cannot allocate temporary buffer");
++ gdFree(argb);
++ return NULL;
++ }
++ for (y = 0, p = argb; y < height; y++) {
++ for (x = 0; x < width; x++) {
++ register uint8_t a = gdAlphaMax - (*(p++) >> 1);
++ register uint8_t r = *(p++);
++ register uint8_t g = *(p++);
++ register uint8_t b = *(p++);
++ im->tpixels[y][x] = gdTrueColorAlpha(r, g, b, a);
++ }
++ }
++ gdFree(filedata);
++ free(argb);
++ im->saveAlphaFlag = 1;
+ return im;
+ }
+
++void gdImageWebpCtx (gdImagePtr im, gdIOCtx * outfile, int quantization)
++{
++ uint8_t *argb;
++ int x, y;
++ uint8_t *p;
++ uint8_t *out;
++ size_t out_size;
++
++ if (im == NULL) {
++ return;
++ }
++
++ if (!gdImageTrueColor(im)) {
++ gd_error("Paletter image not supported by webp");
++ return;
++ }
++
++ if (quantization == -1) {
++ quantization = 80;
++ }
++
++ argb = (uint8_t *)gdMalloc(gdImageSX(im) * 4 * gdImageSY(im));
++ if (!argb) {
++ return;
++ }
++ p = argb;
++ for (y = 0; y < gdImageSY(im); y++) {
++ for (x = 0; x < gdImageSX(im); x++) {
++ register int c;
++ register char a;
++ c = im->tpixels[y][x];
++ a = gdTrueColorGetAlpha(c);
++ if (a == 127) {
++ a = 0;
++ } else {
++ a = 255 - ((a << 1) + (a >> 6));
++ }
++ *(p++) = gdTrueColorGetRed(c);
++ *(p++) = gdTrueColorGetGreen(c);
++ *(p++) = gdTrueColorGetBlue(c);
++ *(p++) = a;
++ }
++ }
++ out_size = WebPEncodeRGBA(argb, gdImageSX(im), gdImageSY(im), gdImageSX(im) * 4, quantization, &out);
++ printf("outsize: %i\n", out_size);
++ if (out_size == 0) {
++ gd_error("gd-webp encoding failed");
++ goto freeargb;
++ }
++ gdPutBuf(out, out_size, outfile);
++ free(out);
++
++freeargb:
++ gdFree(argb);
++}
++
+ BGD_DECLARE(void) gdImageWebpEx (gdImagePtr im, FILE * outFile, int quantization)
+ {
+ gdIOCtx *out = gdNewFileCtx(outFile);
+@@ -116,7 +152,7 @@ BGD_DECLARE(void) gdImageWebpEx (gdImagePtr im, FILE * outFile, int quantization
+ BGD_DECLARE(void) gdImageWebp (gdImagePtr im, FILE * outFile)
+ {
+ gdIOCtx *out = gdNewFileCtx(outFile);
+- gdImageWebpCtx(im, out, -1);
++ gdImageWebpCtx(im, out, -1);
+ out->gd_free(out);
+ }
+
+@@ -140,75 +176,4 @@ BGD_DECLARE(void *) gdImageWebpPtrEx (gdImagePtr im, int *size, int quantization
+ out->gd_free(out);
+ return rv;
+ }
+-
+-/*
+- * Maps normalized QP (quality) to VP8 QP
+- */
+-int mapQualityToVP8QP(int quality) {
+-#define MIN_QUALITY 0
+-#define MAX_QUALITY 100
+-#define MIN_VP8QP 1
+-#define MAX_VP8QP 63
+- const float scale = MAX_VP8QP - MIN_VP8QP;
+- const float vp8qp =
+- scale * (MAX_QUALITY - quality) / (MAX_QUALITY - MIN_QUALITY) + MIN_VP8QP;
+- if (quality < MIN_QUALITY || quality > MAX_QUALITY) {
+- gd_error("Wrong quality value %d.", quality);
+- return -1;
+- }
+-
+- return (int)(vp8qp + 0.5);
+-}
+-
+-/* This routine is based in part on code from Dale Lutz (Safe Software Inc.)
+- * and in part on demo code from Chapter 15 of "PNG: The Definitive Guide"
+- * (http://www.cdrom.com/pub/png/pngbook.html).
+- */
+-BGD_DECLARE(void) gdImageWebpCtx (gdImagePtr im, gdIOCtx * outfile, int quantization)
+-{
+- int width = im->sx;
+- int height = im->sy;
+-
+- int yuv_width, yuv_height, yuv_nbytes, ret;
+- int vp8_quality;
+- unsigned char *Y = NULL,
+- *U = NULL,
+- *V = NULL;
+- unsigned char *filedata = NULL;
+-
+- /* Conversion to Y,U,V buffer */
+- yuv_width = (width + 1) >> 1;
+- yuv_height = (height + 1) >> 1;
+- yuv_nbytes = width * height + 2 * yuv_width * yuv_height;
+-
+- if ((Y = (unsigned char *)gdCalloc(yuv_nbytes, sizeof(unsigned char))) == NULL) {
+- gd_error("gd-webp error: cannot allocate Y buffer");
+- return;
+- }
+- if (quantization == -1) {
+- quantization = 80;
+- }
+- vp8_quality = mapQualityToVP8QP(quantization);
+-
+- U = Y + width * height;
+- V = U + yuv_width * yuv_height;
+- gd_RGBAToYUV420(im, Y, U, V);
+-
+- /* Encode Y,U,V and write data to file */
+- ret = WebPEncode(Y, U, V, width, height, width, yuv_width, yuv_height, yuv_width,
+- vp8_quality, &filedata, &yuv_nbytes, NULL);
+- gdFree(Y);
+-
+- if (ret != webp_success) {
+- if (filedata) {
+- free(filedata);
+- }
+- gd_error("gd-webp error: WebP Encoder failed");
+- return;
+- }
+-
+- gdPutBuf (filedata, yuv_nbytes, outfile);
+- free(filedata);
+-}
+-
+-#endif /* HAVE_LIBVPX */
++#endif /* HAVE_LIBWEBP */
+--
+2.3.5
+
diff --git a/media-libs/gd/gd-2.0.35-r3.ebuild b/media-libs/gd/gd-2.0.35-r3.ebuild
new file mode 100644
index 000000000000..6363cfa5c299
--- /dev/null
+++ b/media-libs/gd/gd-2.0.35-r3.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit autotools eutils
+
+DESCRIPTION="A graphics library for fast image creation"
+HOMEPAGE="http://libgd.org/ http://www.boutell.com/gd/"
+SRC_URI="http://libgd.org/releases/${P}.tar.bz2"
+
+LICENSE="gd IJG HPND BSD"
+SLOT="2"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="fontconfig jpeg png static-libs truetype xpm zlib"
+
+RDEPEND="fontconfig? ( media-libs/fontconfig )
+ jpeg? ( virtual/jpeg:0 )
+ png? ( >=media-libs/libpng-1.2:0 )
+ truetype? ( >=media-libs/freetype-2.1.5 )
+ xpm? ( x11-libs/libXpm x11-libs/libXt )
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-libpng14.patch #305101
+ epatch "${FILESDIR}"/${P}-maxcolors.patch #292130
+ epatch "${FILESDIR}"/${P}-fontconfig.patch #363367
+ epatch "${FILESDIR}"/${P}-libpng-pkg-config.patch
+
+ # Avoid programs we never install
+ local make_sed=( -e '/^noinst_PROGRAMS/s:noinst:check:' )
+ use png || make_sed+=( -e '/_PROGRAMS/s:(gdparttopng|gdtopng|gd2topng|pngtogd|pngtogd2|webpng)::g' )
+ use zlib || make_sed+=( -e '/_PROGRAMS/s:(gd2topng|gd2copypal|gd2togif|giftogd2|gdparttopng|pngtogd2)::g' )
+ sed -i -r "${make_sed[@]}" Makefile.am || die
+
+ # bug 466996
+ sed -i 's/AM_PROG_CC_STDC/AC_PROG_CC/' configure.ac || die
+
+ cat <<-EOF > acinclude.m4
+ m4_ifndef([AM_ICONV],[m4_define([AM_ICONV],[:])])
+ EOF
+
+ eautoreconf
+}
+
+src_configure() {
+ export ac_cv_lib_z_deflate=$(usex zlib)
+ # we aren't actually {en,dis}abling X here ... the configure
+ # script uses it just to add explicit -I/-L paths which we
+ # don't care about on Gentoo systems.
+ econf \
+ --without-x \
+ $(use_enable static-libs static) \
+ $(use_with fontconfig) \
+ $(use_with png) \
+ $(use_with truetype freetype) \
+ $(use_with jpeg) \
+ $(use_with xpm)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc INSTALL README*
+ dohtml -r ./
+ use static-libs || rm -f "${D}"/usr/*/libgd.la
+}
diff --git a/media-libs/gd/gd-2.0.35-r4.ebuild b/media-libs/gd/gd-2.0.35-r4.ebuild
new file mode 100644
index 000000000000..6fbbc35b637d
--- /dev/null
+++ b/media-libs/gd/gd-2.0.35-r4.ebuild
@@ -0,0 +1,101 @@
+# 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
+
+DESCRIPTION="A graphics library for fast image creation"
+HOMEPAGE="http://libgd.org/ http://www.boutell.com/gd/"
+SRC_URI="http://libgd.org/releases/${P}.tar.bz2"
+
+LICENSE="gd IJG HPND BSD"
+SLOT="2"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="fontconfig jpeg png static-libs truetype xpm zlib"
+
+#fontconfig has prefixed font paths, details see bug #518970
+REQUIRED_USE="prefix? ( fontconfig )"
+
+RDEPEND="fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] )
+ jpeg? ( >=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}] )
+ png? ( >=media-libs/libpng-1.6.10:0=[${MULTILIB_USEDEP}] )
+ truetype? ( >=media-libs/freetype-2.5.0.1[${MULTILIB_USEDEP}] )
+ xpm? ( >=x11-libs/libXpm-3.5.10-r1[${MULTILIB_USEDEP}] >=x11-libs/libXt-1.1.4[${MULTILIB_USEDEP}] )
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]"
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/gdlib-config
+)
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-libpng14.patch #305101
+ epatch "${FILESDIR}"/${P}-maxcolors.patch #292130
+ epatch "${FILESDIR}"/${P}-fontconfig.patch #363367
+ epatch "${FILESDIR}"/${P}-libpng-pkg-config.patch
+
+ # Avoid programs we never install
+ local make_sed=( -e '/^noinst_PROGRAMS/s:noinst:check:' )
+ use png || make_sed+=( -e '/_PROGRAMS/s:(gdparttopng|gdtopng|gd2topng|pngtogd|pngtogd2|webpng)::g' )
+ use zlib || make_sed+=( -e '/_PROGRAMS/s:(gd2topng|gd2copypal|gd2togif|giftogd2|gdparttopng|pngtogd2)::g' )
+ sed -i -r "${make_sed[@]}" Makefile.am || die
+
+ # bug 466996
+ sed -i 's/AM_PROG_CC_STDC/AC_PROG_CC/' configure.ac || die
+
+ cat <<-EOF > acinclude.m4
+ m4_ifndef([AM_ICONV],[m4_define([AM_ICONV],[AC_SUBST(LIBICONV)])])
+ EOF
+
+ eautoreconf
+}
+
+multilib_src_configure() {
+ # setup a default FONT path that has a chance of existing using corefonts,
+ # as to make it more useful with e.g. gnuplot
+ local fontpath="${EPREFIX}/usr/share/fonts/corefonts"
+ # like with fontconfig, try to use fonts from the host OS, because that's
+ # beneficial for the user
+ use prefix && case ${CHOST} in
+ *-darwin*)
+ fontpath+=":/Library/Fonts:/System/Library/Fonts"
+ ;;
+ *-solaris*)
+ [[ -d /usr/X/lib/X11/fonts/TrueType ]] && \
+ fontpath+=":/usr/X/lib/X11/fonts/TrueType"
+ [[ -d /usr/X/lib/X11/fonts/Type1 ]] && \
+ fontpath+=":/usr/X/lib/X11/fonts/Type1"
+ # OpenIndiana
+ [[ -d /usr/share/fonts/X11/Type1 ]] && \
+ fontpath+=":/usr/share/fonts/X11/Type1"
+ ;;
+ *-linux-gnu)
+ [[ -d /usr/share/fonts/truetype ]] && \
+ fontpath+=":/usr/share/fonts/truetype"
+ ;;
+ esac
+ append-cppflags "-DDEFAULT_FONTPATH=\\\"${fontpath}\\\""
+
+ export ac_cv_lib_z_deflate=$(usex zlib)
+ # we aren't actually {en,dis}abling X here ... the configure
+ # script uses it just to add explicit -I/-L paths which we
+ # don't care about on Gentoo systems.
+ ECONF_SOURCE=${S} \
+ econf \
+ --without-x \
+ $(use_enable static-libs static) \
+ $(use_with fontconfig) \
+ $(use_with png) \
+ $(use_with truetype freetype) \
+ $(use_with jpeg) \
+ $(use_with xpm)
+}
+
+multilib_src_install_all() {
+ dodoc INSTALL README*
+ dohtml -r ./
+ prune_libtool_files
+}
diff --git a/media-libs/gd/gd-2.1.1-r1.ebuild b/media-libs/gd/gd-2.1.1-r1.ebuild
new file mode 100644
index 000000000000..5e62731d649f
--- /dev/null
+++ b/media-libs/gd/gd-2.1.1-r1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit libtool multilib-minimal eutils autotools
+
+DESCRIPTION="A graphics library for fast image creation"
+HOMEPAGE="http://libgd.org/ http://www.boutell.com/gd/"
+SRC_URI="mirror://bitbucket/libgd/gd-libgd/downloads/lib${P}.tar.xz"
+
+LICENSE="gd IJG HPND BSD"
+SLOT="2/3"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="fontconfig jpeg png static-libs truetype webp xpm zlib"
+
+# fontconfig has prefixed font paths, details see bug #518970
+REQUIRED_USE="prefix? ( fontconfig )"
+
+RDEPEND="fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] )
+ jpeg? ( >=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}] )
+ png? ( >=media-libs/libpng-1.6.10:0=[${MULTILIB_USEDEP}] )
+ truetype? ( >=media-libs/freetype-2.5.0.1[${MULTILIB_USEDEP}] )
+ webp? ( media-libs/libwebp[${MULTILIB_USEDEP}] )
+ xpm? ( >=x11-libs/libXpm-3.5.10-r1[${MULTILIB_USEDEP}] >=x11-libs/libXt-1.1.4[${MULTILIB_USEDEP}] )
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]"
+
+S="${WORKDIR}/lib${P}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-headers.patch" #540376
+ epatch "${FILESDIR}/${P}-webp-pre.patch" #545956
+ epatch "${FILESDIR}/${P}-webp.patch" #545956
+
+ #elibtoolize # for shared library on Solaris
+ eautoreconf
+}
+
+multilib_src_configure() {
+ # we aren't actually {en,dis}abling X here ... the configure
+ # script uses it just to add explicit -I/-L paths which we
+ # don't care about on Gentoo systems.
+ ECONF_SOURCE=${S} \
+ econf \
+ --without-x \
+ $(use_enable static-libs static) \
+ $(use_with fontconfig) \
+ $(use_with png) \
+ $(use_with truetype freetype) \
+ $(use_with jpeg) \
+ $(use_with webp) \
+ $(use_with xpm) \
+ $(use_with zlib)
+}
+
+multilib_src_install_all() {
+ dodoc NEWS README
+ prune_libtool_files
+}
diff --git a/media-libs/gd/gd-2.1.1.ebuild b/media-libs/gd/gd-2.1.1.ebuild
new file mode 100644
index 000000000000..a888450fb255
--- /dev/null
+++ b/media-libs/gd/gd-2.1.1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit libtool multilib-minimal eutils
+
+DESCRIPTION="A graphics library for fast image creation"
+HOMEPAGE="http://libgd.org/ http://www.boutell.com/gd/"
+SRC_URI="mirror://bitbucket/libgd/gd-libgd/downloads/lib${P}.tar.xz"
+
+LICENSE="gd IJG HPND BSD"
+SLOT="2/3"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="fontconfig jpeg png static-libs truetype webp xpm zlib"
+
+# fontconfig has prefixed font paths, details see bug #518970
+REQUIRED_USE="prefix? ( fontconfig )"
+
+RDEPEND="fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] )
+ jpeg? ( >=virtual/jpeg-0-r2:0[${MULTILIB_USEDEP}] )
+ png? ( >=media-libs/libpng-1.6.10:0[${MULTILIB_USEDEP}] )
+ truetype? ( >=media-libs/freetype-2.5.0.1[${MULTILIB_USEDEP}] )
+ webp? ( <media-libs/libvpx-1.4.0[${MULTILIB_USEDEP}] )
+ xpm? ( >=x11-libs/libXpm-3.5.10-r1[${MULTILIB_USEDEP}] >=x11-libs/libXt-1.1.4[${MULTILIB_USEDEP}] )
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]"
+
+S="${WORKDIR}/lib${P}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-headers.patch" #540376
+
+ elibtoolize # for shared library on Solaris
+}
+
+multilib_src_configure() {
+ # we aren't actually {en,dis}abling X here ... the configure
+ # script uses it just to add explicit -I/-L paths which we
+ # don't care about on Gentoo systems.
+ ECONF_SOURCE=${S} \
+ econf \
+ --without-x \
+ $(use_enable static-libs static) \
+ $(use_with fontconfig) \
+ $(use_with png) \
+ $(use_with truetype freetype) \
+ $(use_with jpeg) \
+ $(use_with webp vpx) \
+ $(use_with xpm) \
+ $(use_with zlib)
+}
+
+multilib_src_install_all() {
+ dodoc NEWS README
+ prune_libtool_files
+}
diff --git a/media-libs/gd/metadata.xml b/media-libs/gd/metadata.xml
new file mode 100644
index 000000000000..96855a007ecb
--- /dev/null
+++ b/media-libs/gd/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>graphics</herd>
+<maintainer>
+ <email>vapier@gentoo.org</email>
+</maintainer>
+<longdescription>
+gd is a graphics library. It allows your code to quickly draw images complete
+with lines, arcs, text, multiple colors, cut and paste from other images, and
+flood fills, and write out the result as a PNG or JPEG file. This is particularly
+useful in World Wide Web applications, where PNG and JPEG are two of the formats
+accepted for inline images by most browsers.
+
+gd is not a paint program. If you are looking for a paint program, you are
+looking in the wrong place. If you are not a programmer, you are looking in the
+wrong place, unless you are installing a required library in order to run an
+application.
+
+gd does not provide for every possible desirable graphics operation. It is not
+necessary or desirable for gd to become a kitchen-sink graphics package, but
+version 2.0 does include most frequently requested features, including both
+truecolor and palette images, resampling (smooth resizing of truecolor images)
+and so forth.
+</longdescription>
+<upstream>
+ <remote-id type="github">libgd/libgd</remote-id>
+ <bugs-to>https://github.com/libgd/libgd/issues</bugs-to>
+</upstream>
+<use>
+ <flag name='webp'>Enable support for the webp format</flag>
+</use>
+</pkgmetadata>
diff --git a/media-libs/gegl/Manifest b/media-libs/gegl/Manifest
new file mode 100644
index 000000000000..c9bb6efb732f
--- /dev/null
+++ b/media-libs/gegl/Manifest
@@ -0,0 +1,2 @@
+DIST gegl-0.2.0.tar.bz2 7502040 SHA256 df2e6a0d9499afcbc4f9029c18d9d1e0dd5e8710a75e17c9b1d9a6480dd8d426 SHA512 16ef3f6852fd8efef2b6468a754342a2d003f2c2bef468d9465a448e6c89dedb8e791570f073a9faed05218a7c94c6c418eaa0f3abeadfb3e6b88d766ab792c8 WHIRLPOOL 74e9c18b095526b1d053f0700b3c3776197a5c1066cb77adb7c83f154aae9087319f7b7f0379fb9e895a5ef3ac62ebf05e2158c1d18180bafcef41dff096c01d
+DIST gegl-0.3.0.tar.bz2 5463571 SHA256 f0fec8f2e7b8835979d3cf4e38b05d41bb79f68dc80cf899a846484da693bbf7 SHA512 ff758df4689b0fa8f5e16ebcea32a7fe77bccfef70efc20d10669ce5139a70ec3533e78227fd4798812b31ac1ca5081b9d1d701a7449bf75356f879ece5fadd6 WHIRLPOOL 4827d6e40025c36d4ef869b5856f4def1e93cc195757f430cfd2980742ce6b37c79833283d17ec51e93b569a144548aaf7021854b9bcdb241b90049b1321a99b
diff --git a/media-libs/gegl/files/0.1.6-ffmpeg.patch b/media-libs/gegl/files/0.1.6-ffmpeg.patch
new file mode 100644
index 000000000000..51fb95d28c18
--- /dev/null
+++ b/media-libs/gegl/files/0.1.6-ffmpeg.patch
@@ -0,0 +1,33 @@
+diff -urN gegl-0.1.6.old//operations/external/ff-load.c gegl-0.1.6/operations/external/ff-load.c
+--- gegl-0.1.6.old//operations/external/ff-load.c 2011-01-24 19:03:30.000000000 -0300
++++ gegl-0.1.6/operations/external/ff-load.c 2011-05-04 09:59:48.910379742 -0300
+@@ -69,17 +69,17 @@
+ {
+ switch (err)
+ {
+- case AVERROR_NUMEXPECTED:
++ case AVERROR(EDOM):
+ g_warning ("%s: Incorrect image filename syntax.\n"
+ "Use '%%d' to specify the image number:\n"
+ " for img1.jpg, img2.jpg, ..., use 'img%%d.jpg';\n"
+ " for img001.jpg, img002.jpg, ..., use 'img%%03d.jpg'.\n",
+ filename);
+ break;
+- case AVERROR_INVALIDDATA:
++ case AVERROR(EINVAL):
+ g_warning ("%s: Error while parsing header\n", filename);
+ break;
+- case AVERROR_NOFMT:
++ case AVERROR(EILSEQ):
+ g_warning ("%s: Unknown format\n", filename);
+ break;
+ default:
+@@ -278,7 +278,7 @@
+ for (i = 0; i< p->ic->nb_streams; i++)
+ {
+ AVCodecContext *c = p->ic->streams[i]->codec;
+- if (c->codec_type == CODEC_TYPE_VIDEO)
++ if (c->codec_type == AVMEDIA_TYPE_VIDEO)
+ {
+ p->video_st = p->ic->streams[i];
+ p->video_stream = i;
diff --git a/media-libs/gegl/files/gegl-0.0.22-locale_h.diff b/media-libs/gegl/files/gegl-0.0.22-locale_h.diff
new file mode 100644
index 000000000000..a4a9707fc24b
--- /dev/null
+++ b/media-libs/gegl/files/gegl-0.0.22-locale_h.diff
@@ -0,0 +1,10 @@
+--- gegl-0.0.22/gegl/gegl-init.c 2008-12-31 02:38:59.000000000 +0100
++++ gegl-0.0.22-1/gegl/gegl-init.c 2009-01-14 22:21:41.000000000 +0100
+@@ -26,6 +26,7 @@
+ #include <glib/gi18n-lib.h>
+
+ #include <stdlib.h>
++#include <locale.h>
+ #ifdef HAVE_UNISTD_H
+ #include <unistd.h>
+ #endif
diff --git a/media-libs/gegl/files/gegl-0.1.8-cve-2012-4433-4757cdf7.patch b/media-libs/gegl/files/gegl-0.1.8-cve-2012-4433-4757cdf7.patch
new file mode 100644
index 000000000000..7bda5b065c0a
--- /dev/null
+++ b/media-libs/gegl/files/gegl-0.1.8-cve-2012-4433-4757cdf7.patch
@@ -0,0 +1,74 @@
+From 3d3b1559cb34bc862f145c9880d156f6f2fe7b5f Mon Sep 17 00:00:00 2001
+From: Sebastian Pipping <sebastian@pipping.org>
+Date: Sat, 17 Nov 2012 16:22:21 +0100
+Subject: [PATCH] ppm-load: CVE-2012-4433: add plausibility checks for header
+ fields
+
+"Port" of 4757cdf73d3675478d645a3ec8250ba02168a230 by Nils Philippsen from GEGL 0.2.0 to 0.1.8
+---
+ operations/external/ppm-load.c | 33 ++++++++++++++++++++++++++++-----
+ 1 file changed, 28 insertions(+), 5 deletions(-)
+
+diff --git a/operations/external/ppm-load.c b/operations/external/ppm-load.c
+index 6db6e5a..2d4f0ca 100644
+--- a/operations/external/ppm-load.c
++++ b/operations/external/ppm-load.c
+@@ -36,6 +36,7 @@ gegl_chant_file_path (path, _("File"), "", _("Path of file to load."))
+ #include "gegl-chant.h"
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <errno.h>
+
+ typedef enum {
+ PIXMAP_ASCII = 51,
+@@ -44,8 +45,8 @@ typedef enum {
+
+ typedef struct {
+ map_type type;
+- gint width;
+- gint height;
++ glong width;
++ glong height;
+ gsize numsamples; /* width * height * channels */
+ gsize bpc; /* bytes per channel */
+ guchar *data;
+@@ -82,11 +83,33 @@ ppm_load_read_header(FILE *fp,
+ }
+
+ /* Get Width and Height */
+- img->width = strtol (header,&ptr,0);
+- img->height = atoi (ptr);
++ errno = 0;
++ img->width = strtol (header,&ptr,10);
++ if (errno)
++ {
++ g_warning ("Error reading width: %s", strerror(errno));
++ return FALSE;
++ }
++ else if (img->width < 0)
++ {
++ g_warning ("Error: width is negative");
++ return FALSE;
++ }
++
++ img->height = strtol (ptr,&ptr,10);
++ if (errno)
++ {
++ g_warning ("Error reading height: %s", strerror(errno));
++ return FALSE;
++ }
++ else if (img->width < 0)
++ {
++ g_warning ("Error: height is negative");
++ return FALSE;
++ }
+
+ retval = fgets (header,MAX_CHARS_IN_ROW,fp);
+- maxval = strtol (header,&ptr,0);
++ maxval = strtol (header,&ptr,10);
+
+ if ((maxval != 255) && (maxval != 65535))
+ {
+--
+1.7.12.4
+
diff --git a/media-libs/gegl/files/gegl-0.2.0-cve-2012-4433-1e92e523.patch b/media-libs/gegl/files/gegl-0.2.0-cve-2012-4433-1e92e523.patch
new file mode 100644
index 000000000000..0babb0f41c1b
--- /dev/null
+++ b/media-libs/gegl/files/gegl-0.2.0-cve-2012-4433-1e92e523.patch
@@ -0,0 +1,68 @@
+From 1e92e5235ded0415d555aa86066b8e4041ee5a53 Mon Sep 17 00:00:00 2001
+From: Nils Philippsen <nils@redhat.com>
+Date: Tue, 16 Oct 2012 14:58:27 +0000
+Subject: ppm-load: CVE-2012-4433: don't overflow memory allocation
+
+Carefully selected width/height values could cause the size of a later
+allocation to overflow, resulting in a buffer much too small to store
+the data which would then written beyond its end.
+---
+diff --git a/operations/external/ppm-load.c b/operations/external/ppm-load.c
+index efe6d56..3d6bce7 100644
+--- a/operations/external/ppm-load.c
++++ b/operations/external/ppm-load.c
+@@ -84,7 +84,6 @@ ppm_load_read_header(FILE *fp,
+ /* Get Width and Height */
+ img->width = strtol (header,&ptr,0);
+ img->height = atoi (ptr);
+- img->numsamples = img->width * img->height * CHANNEL_COUNT;
+
+ fgets (header,MAX_CHARS_IN_ROW,fp);
+ maxval = strtol (header,&ptr,0);
+@@ -109,6 +108,16 @@ ppm_load_read_header(FILE *fp,
+ g_warning ("%s: Programmer stupidity error", G_STRLOC);
+ }
+
++ /* Later on, img->numsamples is multiplied with img->bpc to allocate
++ * memory. Ensure it doesn't overflow. */
++ if (!img->width || !img->height ||
++ G_MAXSIZE / img->width / img->height / CHANNEL_COUNT < img->bpc)
++ {
++ g_warning ("Illegal width/height: %ld/%ld", img->width, img->height);
++ return FALSE;
++ }
++ img->numsamples = img->width * img->height * CHANNEL_COUNT;
++
+ return TRUE;
+ }
+
+@@ -229,12 +238,24 @@ process (GeglOperation *operation,
+ if (!ppm_load_read_header (fp, &img))
+ goto out;
+
+- rect.height = img.height;
+- rect.width = img.width;
+-
+ /* Allocating Array Size */
++
++ /* Should use g_try_malloc(), but this causes crashes elsewhere because the
++ * error signalled by returning FALSE isn't properly acted upon. Therefore
++ * g_malloc() is used here which aborts if the requested memory size can't be
++ * allocated causing a controlled crash. */
+ img.data = (guchar*) g_malloc (img.numsamples * img.bpc);
+
++ /* No-op without g_try_malloc(), see above. */
++ if (! img.data)
++ {
++ g_warning ("Couldn't allocate %" G_GSIZE_FORMAT " bytes, giving up.", ((gsize)img.numsamples * img.bpc));
++ goto out;
++ }
++
++ rect.height = img.height;
++ rect.width = img.width;
++
+ switch (img.bpc)
+ {
+ case 1:
+--
+cgit v0.9.0.2
diff --git a/media-libs/gegl/files/gegl-0.2.0-cve-2012-4433-4757cdf7.patch b/media-libs/gegl/files/gegl-0.2.0-cve-2012-4433-4757cdf7.patch
new file mode 100644
index 000000000000..f78557f5772a
--- /dev/null
+++ b/media-libs/gegl/files/gegl-0.2.0-cve-2012-4433-4757cdf7.patch
@@ -0,0 +1,70 @@
+From 4757cdf73d3675478d645a3ec8250ba02168a230 Mon Sep 17 00:00:00 2001
+From: Nils Philippsen <nils@redhat.com>
+Date: Tue, 16 Oct 2012 14:56:40 +0000
+Subject: ppm-load: CVE-2012-4433: add plausibility checks for header fields
+
+Refuse values that are non-decimal, negative or overflow the target
+type.
+---
+diff --git a/operations/external/ppm-load.c b/operations/external/ppm-load.c
+index 3d6bce7..465096d 100644
+--- a/operations/external/ppm-load.c
++++ b/operations/external/ppm-load.c
+@@ -36,6 +36,7 @@ gegl_chant_file_path (path, _("File"), "", _("Path of file to load."))
+ #include "gegl-chant.h"
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <errno.h>
+
+ typedef enum {
+ PIXMAP_ASCII = 51,
+@@ -44,8 +45,8 @@ typedef enum {
+
+ typedef struct {
+ map_type type;
+- gint width;
+- gint height;
++ glong width;
++ glong height;
+ gsize numsamples; /* width * height * channels */
+ gsize bpc; /* bytes per channel */
+ guchar *data;
+@@ -82,11 +83,33 @@ ppm_load_read_header(FILE *fp,
+ }
+
+ /* Get Width and Height */
+- img->width = strtol (header,&ptr,0);
+- img->height = atoi (ptr);
++ errno = 0;
++ img->width = strtol (header,&ptr,10);
++ if (errno)
++ {
++ g_warning ("Error reading width: %s", strerror(errno));
++ return FALSE;
++ }
++ else if (img->width < 0)
++ {
++ g_warning ("Error: width is negative");
++ return FALSE;
++ }
++
++ img->height = strtol (ptr,&ptr,10);
++ if (errno)
++ {
++ g_warning ("Error reading height: %s", strerror(errno));
++ return FALSE;
++ }
++ else if (img->width < 0)
++ {
++ g_warning ("Error: height is negative");
++ return FALSE;
++ }
+
+ fgets (header,MAX_CHARS_IN_ROW,fp);
+- maxval = strtol (header,&ptr,0);
++ maxval = strtol (header,&ptr,10);
+
+ if ((maxval != 255) && (maxval != 65535))
+ {
+--
+cgit v0.9.0.2
diff --git a/media-libs/gegl/files/gegl-0.2.0-ffmpeg-0.11.diff b/media-libs/gegl/files/gegl-0.2.0-ffmpeg-0.11.diff
new file mode 100644
index 000000000000..8e9a328524c3
--- /dev/null
+++ b/media-libs/gegl/files/gegl-0.2.0-ffmpeg-0.11.diff
@@ -0,0 +1,57 @@
+From 97067622352e58f86a24851dacb1f5daa0762897 Mon Sep 17 00:00:00 2001
+From: nick black <nick.black@sprezzatech.com>
+Date: Fri, 14 Dec 2012 04:11:16 +0000
+Subject: port gegl forward to libav 54
+
+---
+diff --git a/operations/external/ff-load.c b/operations/external/ff-load.c
+index 442ec5f..75d26e9 100644
+--- a/operations/external/ff-load.c
++++ b/operations/external/ff-load.c
+@@ -137,7 +137,7 @@ ff_cleanup (GeglChantO *o)
+ if (p->enc)
+ avcodec_close (p->enc);
+ if (p->ic)
+- av_close_input_file (p->ic);
++ avformat_close_input(&p->ic);
+ if (p->lavc_frame)
+ av_free (p->lavc_frame);
+
+@@ -216,9 +216,9 @@ decode_frame (GeglOperation *operation,
+ {
+ do
+ {
+- if (av_read_packet (p->ic, &p->pkt) < 0)
++ if (av_read_frame (p->ic, &p->pkt) < 0)
+ {
+- fprintf (stderr, "av_read_packet failed for %s\n",
++ fprintf (stderr, "av_read_frame failed for %s\n",
+ o->path);
+ return -1;
+ }
+@@ -271,12 +271,12 @@ prepare (GeglOperation *operation)
+ gint err;
+
+ ff_cleanup (o);
+- err = av_open_input_file (&p->ic, o->path, NULL, 0, NULL);
++ err = avformat_open_input(&p->ic, o->path, NULL, 0);
+ if (err < 0)
+ {
+ print_error (o->path, err);
+ }
+- err = av_find_stream_info (p->ic);
++ err = avformat_find_stream_info (p->ic, NULL);
+ if (err < 0)
+ {
+ g_warning ("ff-load: error finding stream info for %s", o->path);
+@@ -312,7 +312,7 @@ prepare (GeglOperation *operation)
+ if (p->codec->capabilities & CODEC_CAP_TRUNCATED)
+ p->enc->flags |= CODEC_FLAG_TRUNCATED;
+
+- if (avcodec_open (p->enc, p->codec) < 0)
++ if (avcodec_open2 (p->enc, p->codec, NULL) < 0)
+ {
+ g_warning ("error opening codec %s", p->enc->codec->name);
+ return;
+--
+cgit v0.9.1
diff --git a/media-libs/gegl/files/gegl-0.2.0-g_log_domain.patch b/media-libs/gegl/files/gegl-0.2.0-g_log_domain.patch
new file mode 100644
index 000000000000..cdb42b2ca5f2
--- /dev/null
+++ b/media-libs/gegl/files/gegl-0.2.0-g_log_domain.patch
@@ -0,0 +1,25 @@
+From deaa974528ac1f4099d091a333214b1a50147243 Mon Sep 17 00:00:00 2001
+From: Sebastian Pipping <sebastian@pipping.org>
+Date: Wed, 1 May 2013 00:39:42 +0200
+Subject: [PATCH] Prevent double escaping / error "stray ‘\’ in program"
+
+---
+ gegl/Makefile.am | 1 +
+ 1 file changed, 1 insertion(+), 0 deletion(-)
+
+diff --git a/gegl/Makefile.am b/gegl/Makefile.am
+index 43010ce..fd046d2 100644
+--- a/gegl/Makefile.am
++++ b/gegl/Makefile.am
+@@ -119,7 +119,8 @@ INCLUDES = $(AM_CFLAGS) $(AM_CPPFLAGS)
+
+ Gegl-@GEGL_API_VERSION@.gir: libgegl-@GEGL_API_VERSION@.la Makefile
+ Gegl_@GEGL_MAJOR_VERSION@_@GEGL_MINOR_VERSION@_gir_INCLUDES = GObject-2.0 GLib-2.0 Babl-0.1
+ Gegl_@GEGL_MAJOR_VERSION@_@GEGL_MINOR_VERSION@_gir_CFLAGS = $(INCLUDES)
++INTROSPECTION_SCANNER_ENV = CFLAGS="${CFLAGS} "-D'G_LOG_DOMAIN="GEGL-"__FILE__' # No extra backslashes here!
+ Gegl_@GEGL_MAJOR_VERSION@_@GEGL_MINOR_VERSION@_gir_LIBS = libgegl-@GEGL_API_VERSION@.la
+ Gegl_@GEGL_MAJOR_VERSION@_@GEGL_MINOR_VERSION@_gir_FILES = $(introspection_sources)
+ INTROSPECTION_GIRS += Gegl-@GEGL_API_VERSION@.gir
+--
+1.8.1.5
+
diff --git a/media-libs/gegl/files/gegl-0.2.0-introspection-version.patch b/media-libs/gegl/files/gegl-0.2.0-introspection-version.patch
new file mode 100644
index 000000000000..1ac28dc62964
--- /dev/null
+++ b/media-libs/gegl/files/gegl-0.2.0-introspection-version.patch
@@ -0,0 +1,31 @@
+From 35469116fbf0b398d748f8116e4dcc8bdaee12c7 Mon Sep 17 00:00:00 2001
+From: Jon Nordby <jononor@gmail.com>
+Date: Thu, 12 Apr 2012 12:10:05 +0000
+Subject: gobject-introspection: Fix build after 0.2.x version bump
+
+Remove hardcoding of version numbers so that this does
+not happen again.
+---
+(limited to 'gegl/Makefile.am')
+
+diff --git a/gegl/Makefile.am b/gegl/Makefile.am
+index aef4c33..43010ce 100644
+--- a/gegl/Makefile.am
++++ b/gegl/Makefile.am
+@@ -118,10 +118,10 @@ introspection_sources = \
+ INCLUDES = $(AM_CFLAGS) $(AM_CPPFLAGS)
+
+ Gegl-@GEGL_API_VERSION@.gir: libgegl-@GEGL_API_VERSION@.la Makefile
+-Gegl_0_1_gir_INCLUDES = GObject-2.0 GLib-2.0 Babl-0.1
+-Gegl_0_1_gir_CFLAGS = $(INCLUDES)
+-Gegl_0_1_gir_LIBS = libgegl-@GEGL_API_VERSION@.la
+-Gegl_0_1_gir_FILES = $(introspection_sources)
++Gegl_@GEGL_MAJOR_VERSION@_@GEGL_MINOR_VERSION@_gir_INCLUDES = GObject-2.0 GLib-2.0 Babl-0.1
++Gegl_@GEGL_MAJOR_VERSION@_@GEGL_MINOR_VERSION@_gir_CFLAGS = $(INCLUDES)
++Gegl_@GEGL_MAJOR_VERSION@_@GEGL_MINOR_VERSION@_gir_LIBS = libgegl-@GEGL_API_VERSION@.la
++Gegl_@GEGL_MAJOR_VERSION@_@GEGL_MINOR_VERSION@_gir_FILES = $(introspection_sources)
+ INTROSPECTION_GIRS += Gegl-@GEGL_API_VERSION@.gir
+
+ girdir = $(datadir)/gir-1.0
+--
+cgit v0.9.1
diff --git a/media-libs/gegl/files/gegl-doubledestdir.diff b/media-libs/gegl/files/gegl-doubledestdir.diff
new file mode 100644
index 000000000000..8a9bf33461c9
--- /dev/null
+++ b/media-libs/gegl/files/gegl-doubledestdir.diff
@@ -0,0 +1,12 @@
+diff -Naur gegl-0.1.6/docs/Makefile.am gegl-0.1.6-1//docs/Makefile.am
+--- gegl-0.1.6/docs/Makefile.am 2010-10-08 18:51:41.000000000 +0200
++++ gegl-0.1.6-1//docs/Makefile.am 2011-02-16 20:05:30.458043758 +0100
+@@ -6,7 +6,7 @@
+ # is very small, and should probably be documented in a tutorial.
+ #
+
+-gtkdochtmldir = $(DESTDIR)$(datadir)/gtk-doc/html/gegl
++gtkdochtmldir = $(datadir)/gtk-doc/html/gegl
+
+ HTML_FILES = \
+ operations.html \
diff --git a/media-libs/gegl/files/replace-imgconvert-by-swsscale.patch b/media-libs/gegl/files/replace-imgconvert-by-swsscale.patch
new file mode 100644
index 000000000000..2cf5601e1665
--- /dev/null
+++ b/media-libs/gegl/files/replace-imgconvert-by-swsscale.patch
@@ -0,0 +1,58 @@
+Index: gegl-0.0.22/operations/workshop/external/ff-save.c
+===================================================================
+--- gegl-0.0.22.orig/operations/workshop/external/ff-save.c
++++ gegl-0.0.22/operations/workshop/external/ff-save.c
+@@ -19,6 +19,8 @@
+ #include "config.h"
+ #include <glib/gi18n-lib.h>
+
++#include <libswscale/swscale.h>
++
+
+ #ifdef GEGL_CHANT_PROPERTIES
+
+@@ -640,6 +642,7 @@ write_video_frame (GeglChantO *op,
+ int out_size, ret;
+ AVCodecContext *c;
+ AVFrame *picture_ptr;
++ struct SwsContext *img_convert_ctx;
+
+ c = st->codec;
+
+@@ -649,10 +652,22 @@ write_video_frame (GeglChantO *op,
+ to the codec pixel format if needed */
+ fill_yuv_image (op, p->tmp_picture, p->frame_count, c->width,
+ c->height);
+- /* FIXME: img_convert is deprecated. Update code to use sws_scale(). */
++ /* FIXME: img_convert is deprecated. Update code to use sws_scale().
+ img_convert ((AVPicture *) p->picture, c->pix_fmt,
+ (AVPicture *) p->tmp_picture, PIX_FMT_RGB24,
+ c->width, c->height);
++ */
++ img_convert_ctx = sws_getContext(c->width, c->height, c->pix_fmt,
++ c->width, c->height, PIX_FMT_RGB24,
++ SWS_BICUBIC, NULL, NULL, NULL);
++
++ if (img_convert_ctx == NULL)
++ fprintf(stderr, "ff_save: Cannot initialize conversion context.");
++ else
++ {
++ sws_scale(img_convert_ctx, p->tmp_picture->data, p->tmp_picture->linesize,
++ 0, c->height, p->picture->data, p->picture->linesize);
++ }
+ }
+ else
+ {
+Index: gegl-0.0.22/operations/workshop/external/Makefile.am
+===================================================================
+--- gegl-0.0.22.orig/operations/workshop/external/Makefile.am
++++ gegl-0.0.22/operations/workshop/external/Makefile.am
+@@ -21,7 +21,7 @@ endif
+ if HAVE_AVFORMAT
+ ops += ff_save.la
+ ff_save_la_SOURCES = ff-save.c
+-ff_save_la_LIBADD = $(op_libs) $(AVFORMAT_LIBS)
++ff_save_la_LIBADD = $(op_libs) $(AVFORMAT_LIBS) -lswscale
+ ff_save_la_CFLAGS = $(AVFORMAT_CFLAGS)
+ endif
+
diff --git a/media-libs/gegl/gegl-0.2.0-r2.ebuild b/media-libs/gegl/gegl-0.2.0-r2.ebuild
new file mode 100644
index 000000000000..243b7e25bd69
--- /dev/null
+++ b/media-libs/gegl/gegl-0.2.0-r2.ebuild
@@ -0,0 +1,154 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+WANT_AUTOMAKE=1.11 # see bug 471990, comment 3
+# vala and introspection support is broken, bug #468208
+#VALA_MIN_API_VERSION=0.14
+#VALA_USE_DEPEND=vapigen
+
+inherit versionator gnome2-utils eutils autotools #vala
+
+DESCRIPTION="A graph based image processing framework"
+HOMEPAGE="http://www.gegl.org/"
+SRC_URI="ftp://ftp.gimp.org/pub/${PN}/${PV:0:3}/${P}.tar.bz2"
+
+LICENSE="|| ( GPL-3 LGPL-3 )"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+IUSE="cairo debug ffmpeg jpeg jpeg2k lensfun libav cpu_flags_x86_mmx openexr png raw sdl cpu_flags_x86_sse svg umfpack" # +introspection vala
+
+RDEPEND="
+ >=media-libs/babl-0.1.10
+ >=dev-libs/glib-2.28:2
+ >=x11-libs/gdk-pixbuf-2.18:2
+ x11-libs/pango
+ sys-libs/zlib
+ cairo? ( x11-libs/cairo )
+ ffmpeg? (
+ libav? ( media-video/libav:0= )
+ !libav? ( media-video/ffmpeg:0= )
+ )
+ jpeg? ( virtual/jpeg:0 )
+ jpeg2k? ( >=media-libs/jasper-1.900.1 )
+ openexr? ( media-libs/openexr )
+ png? ( media-libs/libpng:0 )
+ raw? ( =media-libs/libopenraw-0.0.9 )
+ sdl? ( media-libs/libsdl )
+ svg? ( >=gnome-base/librsvg-2.14:2 )
+ umfpack? ( sci-libs/umfpack )
+ lensfun? ( >=media-libs/lensfun-0.2.5 )
+"
+# >=media-libs/babl-0.1.10[introspection?]
+# introspection? ( >=dev-libs/gobject-introspection-0.10
+# >=dev-python/pygobject-2.26:2 )
+DEPEND="${RDEPEND}
+ >=dev-util/intltool-0.40.1
+ dev-lang/perl
+ virtual/pkgconfig
+ >=sys-devel/libtool-2.2
+"
+# vala? ( $(vala_depend) )"
+
+DOCS=( ChangeLog INSTALL README NEWS )
+
+src_prepare() {
+ # https://bugs.gentoo.org/show_bug.cgi?id=442016
+ epatch "${FILESDIR}/${P}-cve-2012-4433-1e92e523.patch"
+ epatch "${FILESDIR}/${P}-cve-2012-4433-4757cdf7.patch"
+
+ # https://bugs.gentoo.org/show_bug.cgi?id=416587
+ epatch "${FILESDIR}/${P}-introspection-version.patch"
+
+ epatch "${FILESDIR}/${P}-ffmpeg-0.11.diff"
+ # fix OSX loadable module filename extension
+ sed -i -e 's/\.dylib/.bundle/' configure.ac || die
+ # don't require Apple's OpenCL on versions of OSX that don't have it
+ if [[ ${CHOST} == *-darwin* && ${CHOST#*-darwin} -le 9 ]] ; then
+ sed -i -e 's/#ifdef __APPLE__/#if 0/' gegl/opencl/* || die
+ fi
+
+ epatch "${FILESDIR}"/${P}-g_log_domain.patch
+ eautoreconf
+
+ # https://bugs.gentoo.org/show_bug.cgi?id=468248
+ local deps_file="${PN}/${PN}-$(get_version_component_range 1-2).deps"
+ [[ -f "${deps_file}" ]] || touch "${deps_file}"
+
+# use vala && vala_src_prepare
+}
+
+src_configure() {
+ # never enable altering of CFLAGS via profile option
+ # libspiro: not in portage main tree
+ # disable documentation as the generating is bit automagic
+ # if anyone wants to work on it just create bug with patch
+
+ # Also please note that:
+ #
+ # - Some auto-detections are not patched away since the docs are
+ # not built (--disable-docs, lack of --enable-gtk-doc) and these
+ # tools affect re-generation of docs, only
+ # (e.g. ruby, asciidoc, dot (of graphviz), enscript)
+ #
+ # - Parameter --with-exiv2 compiles a noinst-app only, no use
+ #
+ # - Parameter --disable-workshop disables any use of Lua, effectivly
+ #
+ # - v4l support does not work with our media-libs/libv4l-0.8.9,
+ # upstream bug at https://bugzilla.gnome.org/show_bug.cgi?id=654675
+ #
+ # - There are two checks for dot, one controllable by --with(out)-graphviz
+ # which toggles HAVE_GRAPHVIZ that is not used anywhere. Yes.
+ #
+ # So that's why USE="exif graphviz lua v4l" got resolved. More at:
+ # https://bugs.gentoo.org/show_bug.cgi?id=451136
+ #
+ econf \
+ --disable-silent-rules \
+ --disable-profile \
+ --without-libspiro \
+ --disable-docs --disable-workshop \
+ --with-pango --with-gdk-pixbuf \
+ $(use_enable cpu_flags_x86_mmx mmx) \
+ $(use_enable cpu_flags_x86_sse sse) \
+ $(use_enable debug) \
+ $(use_with cairo) \
+ $(use_with cairo pangocairo) \
+ --without-exiv2 \
+ $(use_with ffmpeg libavformat) \
+ --without-graphviz \
+ $(use_with jpeg libjpeg) \
+ $(use_with jpeg2k jasper) \
+ --without-lua \
+ $(use_with openexr) \
+ $(use_with png libpng) \
+ $(use_with raw libopenraw) \
+ $(use_with sdl) \
+ $(use_with svg librsvg) \
+ $(use_with umfpack) \
+ --without-libv4l \
+ $(use_with lensfun) \
+ --disable-introspection \
+ --without-vala
+# $(use_enable introspection) \
+# $(use_with vala)
+}
+
+src_test() {
+ gnome2_environment_reset # sandbox issues
+ default
+}
+
+src_compile() {
+ gnome2_environment_reset # sandbox issues (bug #396687)
+ default
+}
+
+src_install() {
+ default
+ find "${ED}" -name '*.la' -delete
+}
diff --git a/media-libs/gegl/gegl-0.3.0.ebuild b/media-libs/gegl/gegl-0.3.0.ebuild
new file mode 100644
index 000000000000..bbb271ef0aa3
--- /dev/null
+++ b/media-libs/gegl/gegl-0.3.0.ebuild
@@ -0,0 +1,182 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+# vala and introspection support is broken, bug #468208
+VALA_MIN_API_VERSION=0.20
+VALA_USE_DEPEND=vapigen
+
+inherit versionator gnome2-utils eutils autotools python-any-r1 vala
+
+if [[ ${PV} == *9999* ]]; then
+ inherit autotools git-r3
+ EGIT_REPO_URI="git://git.gnome.org/gegl"
+ SRC_URI=""
+else
+ SRC_URI="http://download.gimp.org/pub/${PN}/${PV:0:3}/${P}.tar.bz2"
+ KEYWORDS="alpha ~amd64 arm hppa ~ia64 ~mips ppc ppc64 sparc ~x86 ~amd64-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+
+DESCRIPTION="A graph based image processing framework"
+HOMEPAGE="http://www.gegl.org/"
+
+LICENSE="|| ( GPL-3 LGPL-3 )"
+SLOT="0.3"
+
+IUSE="cairo cpu_flags_x86_mmx cpu_flags_x86_sse debug ffmpeg +introspection jpeg jpeg2k lcms lensfun libav openexr png raw sdl svg test umfpack vala v4l webp"
+REQUIRED_IUSE="vala? ( introspection )"
+
+RDEPEND="
+ >=dev-libs/glib-2.36:2
+ dev-libs/json-glib
+ >=media-libs/babl-0.1.12
+ sys-libs/zlib
+ >=x11-libs/gdk-pixbuf-2.18:2
+ x11-libs/pango
+
+ cairo? ( x11-libs/cairo )
+ ffmpeg? (
+ libav? ( media-video/libav:0= )
+ !libav? ( media-video/ffmpeg:0= )
+ )
+ introspection? ( >=dev-libs/gobject-introspection-1.32 )
+ jpeg? ( virtual/jpeg:0= )
+ jpeg2k? ( >=media-libs/jasper-1.900.1 )
+ lcms? ( >=media-libs/lcms-2.2:2 )
+ lensfun? ( >=media-libs/lensfun-0.2.5 )
+ openexr? ( media-libs/openexr )
+ png? ( media-libs/libpng:0= )
+ raw? ( =media-libs/libopenraw-0.0.9 )
+ sdl? ( media-libs/libsdl )
+ svg? ( >=gnome-base/librsvg-2.14:2 )
+ umfpack? ( sci-libs/umfpack )
+ v4l? ( >=media-libs/libv4l-1.0.1 )
+ webp? ( media-libs/libwebp )
+"
+DEPEND="${RDEPEND}
+ >=dev-util/gtk-doc-am-1
+ >=dev-util/intltool-0.40.1
+ dev-lang/perl
+ virtual/pkgconfig
+ >=sys-devel/libtool-2.2
+ test? ( introspection? (
+ $(python_gen_any_dep '>=dev-python/pygobject-3.2[${PYTHON_USEDEP}]') ) )
+ vala? ( $(vala_depend) )
+"
+
+pkg_setup() {
+ use test && use introspection && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ # FIXME: the following should be proper patch sent to upstream
+ # fix OSX loadable module filename extension
+ sed -i -e 's/\.dylib/.bundle/' configure.ac || die
+ # don't require Apple's OpenCL on versions of OSX that don't have it
+ if [[ ${CHOST} == *-darwin* && ${CHOST#*-darwin} -le 9 ]] ; then
+ sed -i -e 's/#ifdef __APPLE__/#if 0/' gegl/opencl/* || die
+ fi
+
+ #epatch "${FILESDIR}"/${P}-g_log_domain.patch
+
+ # commit 7c78497b : tests that use gegl.png are broken on non-amd64
+ sed -e '/clones.xml/d' \
+ -e '/composite-transform.xml/d' \
+ -i tests/compositions/Makefile.am || die
+
+ # commit 11a283ab : test-image-compare needs >=babl-0.1.13 (not released yet)
+ # for the new CIE conversions
+ sed -e '/test-image-compare/d' \
+ -i tests/simple/Makefile.am || die
+
+ # Skip broken test with >=dev-python/pygobject-3.14
+ sed -e '/test_buffer/ i\ @unittest.skip("broken")\' \
+ -i tests/python/test-gegl-format.py || die
+
+ epatch_user
+ eautoreconf
+
+ use vala && vala_src_prepare
+}
+
+src_configure() {
+ # never enable altering of CFLAGS via profile option
+ # libspiro: not in portage main tree
+ # disable documentation as the generating is bit automagic
+ # if anyone wants to work on it just create bug with patch
+
+ # Also please note that:
+ #
+ # - Some auto-detections are not patched away since the docs are
+ # not built (--disable-docs, lack of --enable-gtk-doc) and these
+ # tools affect re-generation of docs, only
+ # (e.g. ruby, asciidoc, dot (of graphviz), enscript)
+ #
+ # - Parameter --with-exiv2 compiles a noinst-app only, no use
+ #
+ # - Parameter --disable-workshop disables any use of Lua, effectivly
+ #
+ # - v4l support does not work with our media-libs/libv4l-0.8.9,
+ # upstream bug at https://bugzilla.gnome.org/show_bug.cgi?id=654675
+ #
+ # - There are two checks for dot, one controllable by --with(out)-graphviz
+ # which toggles HAVE_GRAPHVIZ that is not used anywhere. Yes.
+ #
+ # So that's why USE="exif graphviz lua v4l" got resolved. More at:
+ # https://bugs.gentoo.org/show_bug.cgi?id=451136
+ #
+ econf \
+ --disable-docs \
+ --disable-profile \
+ --disable-silent-rules \
+ --disable-workshop \
+ --program-suffix=-${SLOT} \
+ --with-gdk-pixbuf \
+ --with-pango \
+ --without-libspiro \
+ $(use_enable cpu_flags_x86_mmx mmx) \
+ $(use_enable cpu_flags_x86_sse sse) \
+ $(use_enable debug) \
+ $(use_with cairo) \
+ $(use_with cairo pangocairo) \
+ --without-exiv2 \
+ $(use_with ffmpeg libavformat) \
+ --without-graphviz \
+ $(use_with jpeg libjpeg) \
+ $(use_with jpeg2k jasper) \
+ $(use_with lcms) \
+ $(use_with lensfun) \
+ --without-lua \
+ $(use_with openexr) \
+ $(use_with png libpng) \
+ $(use_with raw libopenraw) \
+ $(use_with sdl) \
+ $(use_with svg librsvg) \
+ $(use_with umfpack) \
+ $(use_with v4l libv4l) \
+ $(use_with v4l libv4l2) \
+ $(use_enable introspection) \
+ $(use_with vala) \
+ $(use_with webp)
+}
+
+src_test() {
+ gnome2_environment_reset # sandbox issues
+ default
+}
+
+src_compile() {
+ gnome2_environment_reset # sandbox issues (bug #396687)
+ default
+
+ [[ ${PV} == *9999* ]] && emake ./ChangeLog # "./" prevents "Circular ChangeLog <- ChangeLog dependency dropped."
+}
+
+src_install() {
+ default
+ prune_libtool_files --all
+}
diff --git a/media-libs/gegl/gegl-9999.ebuild b/media-libs/gegl/gegl-9999.ebuild
new file mode 100644
index 000000000000..59a46cd16d71
--- /dev/null
+++ b/media-libs/gegl/gegl-9999.ebuild
@@ -0,0 +1,182 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+# vala and introspection support is broken, bug #468208
+VALA_MIN_API_VERSION=0.20
+VALA_USE_DEPEND=vapigen
+
+inherit versionator gnome2-utils eutils autotools python-any-r1 vala
+
+if [[ ${PV} == *9999* ]]; then
+ inherit autotools git-r3
+ EGIT_REPO_URI="git://git.gnome.org/gegl"
+ SRC_URI=""
+else
+ SRC_URI="http://download.gimp.org/pub/${PN}/${PV:0:3}/${P}.tar.bz2"
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+
+DESCRIPTION="A graph based image processing framework"
+HOMEPAGE="http://www.gegl.org/"
+
+LICENSE="|| ( GPL-3 LGPL-3 )"
+SLOT="0.3"
+
+IUSE="cairo cpu_flags_x86_mmx cpu_flags_x86_sse debug ffmpeg +introspection jpeg jpeg2k lcms lensfun libav openexr png raw sdl svg test umfpack vala v4l webp"
+REQUIRED_IUSE="vala? ( introspection )"
+
+RDEPEND="
+ >=dev-libs/glib-2.36:2
+ dev-libs/json-glib
+ >=media-libs/babl-0.1.12
+ sys-libs/zlib
+ >=x11-libs/gdk-pixbuf-2.18:2
+ x11-libs/pango
+
+ cairo? ( x11-libs/cairo )
+ ffmpeg? (
+ libav? ( media-video/libav:0= )
+ !libav? ( media-video/ffmpeg:0= )
+ )
+ introspection? ( >=dev-libs/gobject-introspection-1.32 )
+ jpeg? ( virtual/jpeg:0= )
+ jpeg2k? ( >=media-libs/jasper-1.900.1 )
+ lcms? ( >=media-libs/lcms-2.2:2 )
+ lensfun? ( >=media-libs/lensfun-0.2.5 )
+ openexr? ( media-libs/openexr )
+ png? ( media-libs/libpng:0= )
+ raw? ( =media-libs/libopenraw-0.0.9 )
+ sdl? ( media-libs/libsdl )
+ svg? ( >=gnome-base/librsvg-2.14:2 )
+ umfpack? ( sci-libs/umfpack )
+ v4l? ( >=media-libs/libv4l-1.0.1 )
+ webp? ( media-libs/libwebp )
+"
+DEPEND="${RDEPEND}
+ >=dev-util/gtk-doc-am-1
+ >=dev-util/intltool-0.40.1
+ dev-lang/perl
+ virtual/pkgconfig
+ >=sys-devel/libtool-2.2
+ test? ( introspection? (
+ $(python_gen_any_dep '>=dev-python/pygobject-3.2[${PYTHON_USEDEP}]') ) )
+ vala? ( $(vala_depend) )
+"
+
+pkg_setup() {
+ use test && use introspection && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ # FIXME: the following should be proper patch sent to upstream
+ # fix OSX loadable module filename extension
+ sed -i -e 's/\.dylib/.bundle/' configure.ac || die
+ # don't require Apple's OpenCL on versions of OSX that don't have it
+ if [[ ${CHOST} == *-darwin* && ${CHOST#*-darwin} -le 9 ]] ; then
+ sed -i -e 's/#ifdef __APPLE__/#if 0/' gegl/opencl/* || die
+ fi
+
+ #epatch "${FILESDIR}"/${P}-g_log_domain.patch
+
+ # commit 7c78497b : tests that use gegl.png are broken on non-amd64
+ sed -e '/clones.xml/d' \
+ -e '/composite-transform.xml/d' \
+ -i tests/compositions/Makefile.am || die
+
+ # commit 11a283ab : test-image-compare needs >=babl-0.1.13 (not released yet)
+ # for the new CIE conversions
+ sed -e '/test-image-compare/d' \
+ -i tests/simple/Makefile.am || die
+
+ # Skip broken test with >=dev-python/pygobject-3.14
+ sed -e '/test_buffer/ i\ @unittest.skip("broken")\' \
+ -i tests/python/test-gegl-format.py || die
+
+ epatch_user
+ eautoreconf
+
+ use vala && vala_src_prepare
+}
+
+src_configure() {
+ # never enable altering of CFLAGS via profile option
+ # libspiro: not in portage main tree
+ # disable documentation as the generating is bit automagic
+ # if anyone wants to work on it just create bug with patch
+
+ # Also please note that:
+ #
+ # - Some auto-detections are not patched away since the docs are
+ # not built (--disable-docs, lack of --enable-gtk-doc) and these
+ # tools affect re-generation of docs, only
+ # (e.g. ruby, asciidoc, dot (of graphviz), enscript)
+ #
+ # - Parameter --with-exiv2 compiles a noinst-app only, no use
+ #
+ # - Parameter --disable-workshop disables any use of Lua, effectivly
+ #
+ # - v4l support does not work with our media-libs/libv4l-0.8.9,
+ # upstream bug at https://bugzilla.gnome.org/show_bug.cgi?id=654675
+ #
+ # - There are two checks for dot, one controllable by --with(out)-graphviz
+ # which toggles HAVE_GRAPHVIZ that is not used anywhere. Yes.
+ #
+ # So that's why USE="exif graphviz lua v4l" got resolved. More at:
+ # https://bugs.gentoo.org/show_bug.cgi?id=451136
+ #
+ econf \
+ --disable-docs \
+ --disable-profile \
+ --disable-silent-rules \
+ --disable-workshop \
+ --program-suffix=-${SLOT} \
+ --with-gdk-pixbuf \
+ --with-pango \
+ --without-libspiro \
+ $(use_enable cpu_flags_x86_mmx mmx) \
+ $(use_enable cpu_flags_x86_sse sse) \
+ $(use_enable debug) \
+ $(use_with cairo) \
+ $(use_with cairo pangocairo) \
+ --without-exiv2 \
+ $(use_with ffmpeg libavformat) \
+ --without-graphviz \
+ $(use_with jpeg libjpeg) \
+ $(use_with jpeg2k jasper) \
+ $(use_with lcms) \
+ $(use_with lensfun) \
+ --without-lua \
+ $(use_with openexr) \
+ $(use_with png libpng) \
+ $(use_with raw libopenraw) \
+ $(use_with sdl) \
+ $(use_with svg librsvg) \
+ $(use_with umfpack) \
+ $(use_with v4l libv4l) \
+ $(use_with v4l libv4l2) \
+ $(use_enable introspection) \
+ $(use_with vala) \
+ $(use_with webp)
+}
+
+src_test() {
+ gnome2_environment_reset # sandbox issues
+ default
+}
+
+src_compile() {
+ gnome2_environment_reset # sandbox issues (bug #396687)
+ default
+
+ [[ ${PV} == *9999* ]] && emake ./ChangeLog # "./" prevents "Circular ChangeLog <- ChangeLog dependency dropped."
+}
+
+src_install() {
+ default
+ prune_libtool_files --all
+}
diff --git a/media-libs/gegl/metadata.xml b/media-libs/gegl/metadata.xml
new file mode 100644
index 000000000000..93d122d4a6f3
--- /dev/null
+++ b/media-libs/gegl/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>sping@gentoo.org</email>
+</maintainer>
+<use>
+ <flag name="introspection">Use <pkg>dev-libs/gobject-introspection</pkg> for introspection.</flag>
+ <flag name="lensfun">Enable support for <pkg>media-libs/lensfun</pkg>.</flag>
+ <flag name="umfpack">Enable sparse solving via <pkg>sci-libs/umfpack</pkg>.</flag>
+ <flag name="vala">Enable bindings for <pkg>dev-lang/vala</pkg></flag>
+ <flag name="webp">Enable support for <pkg>media-libs/libwebp</pkg></flag>
+</use>
+</pkgmetadata>
diff --git a/media-libs/gexiv2/Manifest b/media-libs/gexiv2/Manifest
new file mode 100644
index 000000000000..3002b7180d7a
--- /dev/null
+++ b/media-libs/gexiv2/Manifest
@@ -0,0 +1,3 @@
+DIST gexiv2-0.10.2.tar.xz 242704 SHA256 2fd21f0ed5125e51d02226e7f41be751cfa8ae411a8ed1a651e16b06d79047b2 SHA512 4f2f666b0dc1beb730dbd791dc690bebd8acefbc32a5e2d22fc72a4e2d839d3965b5367134c79c6076507713369193d5fb3e6d0fad984d53e53d57a20e41deab WHIRLPOOL d29a2e13ab12ce7f78ec664ce08f10efb70ce38bae6c8eb4061b16925c6eb498265ceb936eeef35788ea7ac5dc8fd98ddd873dcbd686ceb38f6bd1ebd571810f
+DIST gexiv2-0.10.3.tar.xz 244816 SHA256 390cfb966197fa9f3f32200bc578d7c7f3560358c235e6419657206a362d3988 SHA512 a258a95e3e9dddc6636430d8a2bc222b6605e5d0d122ea1b951f97568cecd04b2d3cbc522625918faf3b5a3e670b01db81a45c2c5c5d65e6eb4b4f4a2ac69e8f WHIRLPOOL e50401f642a2252cad664716004038fdd364e9a42b93c7b9748e0f93b652cad31432f7f58571dd0ff67c8dcb1deca590eaaf42ad287d8d27110d0626a352154b
+DIST libgexiv2_0.6.1.tar.xz 27300 SHA256 72ee2fcc6a98c9e83467adea45b10d1b61c55654c204dcce9c2463615389a9e3 SHA512 76aecd20ffac202badb51eab4e40fee563c3073892beec716bcf24e285df42f2498594a9e0bf487e198e8c955047d55e5b49b506bbf8b67c64956c0b99a84b1b WHIRLPOOL f0d9b514c96ecd8924395a614f4e69d046eff7f99dcad332c843d934923d5a2ad115975c083cfa9fb5b6fe620e5a8fe662738691a54d5c42219279591d79846d
diff --git a/media-libs/gexiv2/gexiv2-0.10.2.ebuild b/media-libs/gexiv2/gexiv2-0.10.2.ebuild
new file mode 100644
index 000000000000..31254672ea42
--- /dev/null
+++ b/media-libs/gexiv2/gexiv2-0.10.2.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+inherit eutils multilib python-r1 toolchain-funcs versionator
+
+MY_PV=$(get_version_component_range 1-2)
+
+DESCRIPTION="GObject-based wrapper around the Exiv2 library"
+HOMEPAGE="https://wiki.gnome.org/Projects/gexiv2"
+SRC_URI="mirror://gnome/sources/${PN}/${MY_PV}/${P}.tar.xz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~ia64 ppc ~ppc64 sparc x86"
+IUSE="introspection python static-libs"
+
+REQUIRED_USE="python? ( introspection ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="${PYTHON_DEPS}
+ >=dev-libs/glib-2.26.1:2
+ >=media-gfx/exiv2-0.21:0=
+ introspection? ( dev-libs/gobject-introspection )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ tc-export CXX
+}
+
+src_configure() {
+ econf \
+ $(use_enable introspection) \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ emake DESTDIR="${D}" LIB="$(get_libdir)" install
+ dodoc AUTHORS NEWS README THANKS
+
+ if use python ; then
+ python_moduleinto gi/overrides/
+ python_foreach_impl python_domodule GExiv2.py
+ fi
+
+ use static-libs || prune_libtool_files --modules
+}
diff --git a/media-libs/gexiv2/gexiv2-0.10.3.ebuild b/media-libs/gexiv2/gexiv2-0.10.3.ebuild
new file mode 100644
index 000000000000..c7cf51ee86dd
--- /dev/null
+++ b/media-libs/gexiv2/gexiv2-0.10.3.ebuild
@@ -0,0 +1,51 @@
+# 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} )
+
+inherit eutils multilib python-r1 toolchain-funcs versionator
+
+MY_PV=$(get_version_component_range 1-2)
+
+DESCRIPTION="GObject-based wrapper around the Exiv2 library"
+HOMEPAGE="https://wiki.gnome.org/Projects/gexiv2"
+SRC_URI="mirror://gnome/sources/${PN}/${MY_PV}/${P}.tar.xz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="introspection python static-libs"
+
+REQUIRED_USE="python? ( introspection ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="${PYTHON_DEPS}
+ >=dev-libs/glib-2.26.1:2
+ >=media-gfx/exiv2-0.21:0=
+ introspection? ( dev-libs/gobject-introspection )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ tc-export CXX
+}
+
+src_configure() {
+ econf \
+ $(use_enable introspection) \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ emake DESTDIR="${D}" LIB="$(get_libdir)" install
+ dodoc AUTHORS NEWS README THANKS
+
+ if use python ; then
+ python_moduleinto gi/overrides/
+ python_foreach_impl python_domodule GExiv2.py
+ fi
+
+ use static-libs || prune_libtool_files --modules
+}
diff --git a/media-libs/gexiv2/gexiv2-0.6.1.ebuild b/media-libs/gexiv2/gexiv2-0.6.1.ebuild
new file mode 100644
index 000000000000..ad1f26ea23c3
--- /dev/null
+++ b/media-libs/gexiv2/gexiv2-0.6.1.ebuild
@@ -0,0 +1,52 @@
+# 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} )
+
+inherit eutils multilib python-r1 toolchain-funcs versionator
+
+MY_PV=$(get_version_component_range 1-2)
+
+DESCRIPTION="GObject-based wrapper around the Exiv2 library"
+HOMEPAGE="http://trac.yorba.org/wiki/gexiv2/"
+SRC_URI="http://www.yorba.org/download/${PN}/${MY_PV}/lib${PN}_${PV}.tar.xz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ia64 ppc ppc64 sparc x86"
+IUSE="introspection static-libs"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}
+ dev-libs/glib:2
+ >=media-gfx/exiv2-0.21"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S=${WORKDIR}/lib${P}
+
+src_prepare() {
+ tc-export CXX
+ sed -e 's:CFLAGS:CXXFLAGS:g' -i Makefile || die
+}
+
+src_configure() {
+ ./configure \
+ --prefix=/usr \
+ $(use_enable introspection) \
+ || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" LIB="$(get_libdir)" install
+ dodoc AUTHORS NEWS README THANKS
+
+ python_moduleinto gi/overrides/
+ python_foreach_impl python_domodule GExiv2.py
+
+ use static-libs || find "${D}" \( -name '*.a' -or -name '*.la' \) -delete
+}
diff --git a/media-libs/gexiv2/metadata.xml b/media-libs/gexiv2/metadata.xml
new file mode 100644
index 000000000000..9be90a258970
--- /dev/null
+++ b/media-libs/gexiv2/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>graphics</herd>
+</pkgmetadata>
diff --git a/media-libs/giblib/Manifest b/media-libs/giblib/Manifest
new file mode 100644
index 000000000000..43a41e9bb071
--- /dev/null
+++ b/media-libs/giblib/Manifest
@@ -0,0 +1 @@
+DIST giblib-1.2.4.tar.gz 287653 SHA256 176611c4d88d742ea4013991ad54c2f9d2feefbc97a28434c0f48922ebaa8bac SHA512 4866df223e6d219a5c9a327874bcd67260c83fba8f99862222df41ef86fb31efa0172a777bf46c853ca380dc2a64bbd41bf4fd658fcb84a924cab4e0f525dcfd WHIRLPOOL b2668cb8a27dc16f279e9b0215eb4729548033a74eeec37cfc13788c4a572fd2eadf451704b80da2903d5a41f3e8833e4fdbe526efe36d35a8db07b747264f77
diff --git a/media-libs/giblib/giblib-1.2.4-r1.ebuild b/media-libs/giblib/giblib-1.2.4-r1.ebuild
new file mode 100644
index 000000000000..52edced574fa
--- /dev/null
+++ b/media-libs/giblib/giblib-1.2.4-r1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+inherit eutils libtool
+
+DESCRIPTION="a graphics library built on top of imlib2"
+HOMEPAGE="http://freecode.com/projects/giblib http://www.linuxbrit.co.uk/giblib/"
+SRC_URI="http://www.linuxbrit.co.uk/downloads/${P}.tar.gz"
+
+LICENSE="feh"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="static-libs"
+
+RDEPEND=">=media-libs/imlib2-1.0.3[X]
+ x11-libs/libX11
+ x11-libs/libXext
+ >=media-libs/freetype-2.0"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ sed -i 's:@LDFLAGS@::' giblib-config.in giblib.pc.in || die #430724
+ sed -i "/^docsdir/s:=.*:= @datadir@/doc/${PF}:" Makefile.in || die
+ epunt_cxx
+ elibtoolize # otherwise it doesnt install the .so -> .so.x symlink on fbsd
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
diff --git a/media-libs/giblib/giblib-1.2.4.ebuild b/media-libs/giblib/giblib-1.2.4.ebuild
new file mode 100644
index 000000000000..5e275f7613c9
--- /dev/null
+++ b/media-libs/giblib/giblib-1.2.4.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit toolchain-funcs eutils
+
+DESCRIPTION="Giblib, graphics library"
+HOMEPAGE="http://www.linuxbrit.co.uk/giblib/"
+SRC_URI="http://www.linuxbrit.co.uk/downloads/${P}.tar.gz"
+
+LICENSE="feh"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ppc ppc64 sh sparc x86 ~x86-fbsd"
+IUSE=""
+
+RDEPEND=">=media-libs/imlib2-1.0.3[X]
+ x11-libs/libX11
+ x11-libs/libXext
+ >=media-libs/freetype-2.0"
+DEPEND="${RDEPEND}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epunt_cxx
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ rm -r "${D}"/usr/doc
+ dodoc README AUTHORS ChangeLog TODO
+}
diff --git a/media-libs/giblib/metadata.xml b/media-libs/giblib/metadata.xml
new file mode 100644
index 000000000000..2a8e42b4aa1d
--- /dev/null
+++ b/media-libs/giblib/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>graphics</herd>
+ <longdescription>
+giblib is a utility library used by many of the applications I write. It
+incorporates doubly linked lists, some string functions, and a wrapper
+for imlib2. The wrapper does two things. It gives you access to
+fontstyles, which can be loaded from files, saved to files or defined
+dynamically through the API. It also, and more importantly, wraps
+imlib2's context API changing.
+</longdescription>
+ <upstream>
+ <remote-id type="freecode">giblib</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/giflib/Manifest b/media-libs/giflib/Manifest
new file mode 100644
index 000000000000..7fa74b7abe5c
--- /dev/null
+++ b/media-libs/giflib/Manifest
@@ -0,0 +1,5 @@
+DIST giflib-4.1.6.tar.bz2 506050 SHA256 e1c1ced9c5bc8f93ef0faf0a8c7717abf784d10a7b270d2285e8e1f3b93f2bed SHA512 f47954218ed7d3415cc195a1031a688fcb7dd2bc2b394491830e6b5f5332903ed7c4433b795cd3da9ac53bfc969fe94bec2a4e66b15c0385c732c01b1b7e5057 WHIRLPOOL ee5c3c606dcc2a56151cfd8f9ec33ce6071fb433969df92fae5d51def5bdf974f6dcdb1acf7d83234967f0f5fd3822702822e1e6b274c2e6c39e3e324b54fe09
+DIST giflib-4.2.3.tar.bz2 560968 SHA256 0ac8d56726f77c8bc9648c93bbb4d6185d32b15ba7bdb702415990f96f3cb766 SHA512 f582fafa3ccb0f9ae6f040df0e33469a26fb275437f8615c39af613523ef5f3b09003ed3419f62880200606edfbe08b5aa3ba18a4d615ecd8da27331aec16b36 WHIRLPOOL b23ef64d227eb5219a9a1143cdafea6cb0aea12409fc18a686d5bf2d5241f97ac1c8f8bb76b0c99a5fd60fcff45fc092a2226a6b54ee24a2ec3841765a102447
+DIST giflib-5.0.6.tar.bz2 621073 SHA256 8909839ccbdfca75cfbe6a4db907b55978e11fb268a8f3cde24bd923a0f669ea SHA512 117e20319f2df32bdf094678cdececad2b6f33a40baff172d4df68ade86547825ebca81186071bff51e60126692df84dbd7bb5cc4877ba68448f7c47a2cc2491 WHIRLPOOL e9c0bce41f36c00a87ce119310f39ae9ba8af8b7fa029ce8481d9ed81aa9ef1e417fb7236d5e3ea0c93d7b40ce07876100515051628b504506ec0d1fffe00bad
+DIST giflib-5.1.0.tar.bz2 621155 SHA256 5aec694f1c68132e6af499a621996b5a1fc219f4bbe19ab2ba972b3f95188d1b SHA512 5e32fe6fb69298a3ba06842b33cadf33409a8ca92eef3625cedd40cfd99535a994eaa8beae0eff4fa82747937b851af5d5f895c9e58368d6b703df5e2b0bb245 WHIRLPOOL a0c2e3cf291a5f94cdf853f2d65972de3cb5575b4f1d1e61470408006eabc87e21291bd3ea0d8af586690d756059acbafb62018caaba82ad390a44a0c0a64066
+DIST giflib-5.1.1.tar.bz2 654389 SHA256 391014aceb21c8b489dc7b0d0b6a917c4e32cc014ce2426d47ca376d02fe2ffc SHA512 9d9cba004c1402c7c547b7a7f35485fe03b0bc3637102b9eba96d1dea2984415fccdff4a6463215af82e2d3817d75bdd64ae7a96d4acc98b4904e5e5f352dd3e WHIRLPOOL 17a8876e6663e3f4b5623da1d2eb3c86ffd59d84edcb1291b358300b51eb21996987fe68ebce79892547972c87a8bf31e44ec5e5cd1a1f293102e679441bbedc
diff --git a/media-libs/giflib/files/giflib-4.1.6-gif2rle.patch b/media-libs/giflib/files/giflib-4.1.6-gif2rle.patch
new file mode 100644
index 000000000000..f36b6b41fcc2
--- /dev/null
+++ b/media-libs/giflib/files/giflib-4.1.6-gif2rle.patch
@@ -0,0 +1,18 @@
+http://sourceforge.net/tracker/index.php?func=detail&aid=1829712&group_id=102202&atid=631304
+
+--- giflib/util/gif2rle.c
++++ giflib/util/gif2rle.c
+@@ -222,11 +222,8 @@
+ ColorMap = (GifFile->Image.ColorMap ?
+ GifFile->Image.ColorMap->Colors :
+ GifFile->SColorMap->Colors);
+- if (ColorMap == NULL) {
+- fprintf(stderr, "Gif Image does not have a colormap\n");
+- exit(EXIT_FAILURE);
+- }
+- ColorMapSize = 1 << ColorMap->BitsPerPixel;
++ ColorMapSize = 1 << (GifFile->Image.ColorMap ? GifFile->Image.ColorMap->BitsPerPixel :
++ GifFile->SColorMap->BitsPerPixel);
+ DumpScreen2Rle(ScreenBuffer, GifFile->SWidth, GifFile->SHeight);
+
+ if (DGifCloseFile(GifFile) == GIF_ERROR) {
diff --git a/media-libs/giflib/files/giflib-4.1.6-giffix-null-Extension-fix.patch b/media-libs/giflib/files/giflib-4.1.6-giffix-null-Extension-fix.patch
new file mode 100644
index 000000000000..3e99e66c0d15
--- /dev/null
+++ b/media-libs/giflib/files/giflib-4.1.6-giffix-null-Extension-fix.patch
@@ -0,0 +1,15 @@
+diff -ru giflib-4.1.6/util/giffix.c giflib-4.1.6.new/util/giffix.c
+--- giflib-4.1.6/util/giffix.c 2005-10-09 23:22:23.000000000 -0700
++++ giflib-4.1.6.new/util/giffix.c 2008-09-04 14:00:41.000000000 -0700
+@@ -181,8 +181,8 @@
+ /* Skip any extension blocks in file: */
+ if (DGifGetExtension(GifFileIn, &ExtCode, &Extension) == GIF_ERROR)
+ QuitGifError(GifFileIn, GifFileOut);
+- if (EGifPutExtension(GifFileOut, ExtCode, Extension[0],
+- Extension) == GIF_ERROR)
++ if (Extension && EGifPutExtension(GifFileOut, ExtCode,
++ Extension[0], Extension) == GIF_ERROR)
+ QuitGifError(GifFileIn, GifFileOut);
+
+ /* No support to more than one extension blocks, so discard: */
+
diff --git a/media-libs/giflib/giflib-4.1.6-r2.ebuild b/media-libs/giflib/giflib-4.1.6-r2.ebuild
new file mode 100644
index 000000000000..5131fde5c9e5
--- /dev/null
+++ b/media-libs/giflib/giflib-4.1.6-r2.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils libtool
+
+DESCRIPTION="Library to handle, display and manipulate GIF images"
+HOMEPAGE="http://sourceforge.net/projects/giflib/"
+SRC_URI="mirror://sourceforge/giflib/${P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="rle static-libs X"
+
+DEPEND="X? (
+ x11-libs/libXt
+ x11-libs/libX11
+ x11-libs/libICE
+ x11-libs/libSM
+ )
+ rle? ( media-libs/urt )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gif2rle.patch
+ epatch "${FILESDIR}"/${P}-giffix-null-Extension-fix.patch
+ elibtoolize
+ epunt_cxx
+}
+
+src_configure() {
+ local myconf=""
+
+ # prevent circular depend #111455
+ if has_version media-libs/urt ; then
+ myconf="${myconf} $(use_enable rle)"
+ else
+ myconf="${myconf} --disable-rle"
+ fi
+
+ econf \
+ --disable-gl \
+ $(use_enable static-libs static) \
+ $(use_enable X x11) \
+ ${myconf}
+}
+
+src_install() {
+ default
+ # for static libs the .la file is required if build with +rle or +X
+ use static-libs || find "${ED}" -name '*.la' -exec rm -f {} +
+ dodoc AUTHORS BUGS ChangeLog NEWS ONEWS README TODO doc/*.txt
+ dohtml -r doc
+}
diff --git a/media-libs/giflib/giflib-4.1.6-r3.ebuild b/media-libs/giflib/giflib-4.1.6-r3.ebuild
new file mode 100644
index 000000000000..5b56f86afa29
--- /dev/null
+++ b/media-libs/giflib/giflib-4.1.6-r3.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils libtool multilib-minimal
+
+DESCRIPTION="Library to handle, display and manipulate GIF images"
+HOMEPAGE="http://sourceforge.net/projects/giflib/"
+SRC_URI="mirror://sourceforge/giflib/${P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="rle static-libs X"
+
+RDEPEND="
+ rle? ( media-libs/urt )
+ X? ( >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20140406-r1
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32]
+ )"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gif2rle.patch
+ epatch "${FILESDIR}"/${P}-giffix-null-Extension-fix.patch
+ sed -i '/X_PRE_LIBS/s:-lSM -lICE::' configure || die #483258
+ elibtoolize
+ epunt_cxx
+}
+
+multilib_src_configure() {
+ local myconf=()
+
+ # prevent circular depend #111455
+ if multilib_is_native_abi && has_version media-libs/urt ; then
+ myconf+=( $(use_enable rle) )
+ else
+ myconf+=( --disable-rle )
+ fi
+
+ ECONF_SOURCE=${S} \
+ econf \
+ --disable-gl \
+ $(use_enable static-libs static) \
+ $(use_enable X x11) \
+ "${myconf[@]}"
+}
+
+multilib_src_install_all() {
+ # for static libs the .la file is required if build with +rle or +X
+ use static-libs || prune_libtool_files --all
+
+ dodoc AUTHORS BUGS ChangeLog NEWS ONEWS README TODO doc/*.txt
+ dohtml -r doc
+}
diff --git a/media-libs/giflib/giflib-4.2.3-r1.ebuild b/media-libs/giflib/giflib-4.2.3-r1.ebuild
new file mode 100644
index 000000000000..a375038fe2e1
--- /dev/null
+++ b/media-libs/giflib/giflib-4.2.3-r1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools-multilib eutils
+
+DESCRIPTION="Library to handle, display and manipulate GIF images"
+HOMEPAGE="http://sourceforge.net/projects/giflib/"
+SRC_URI="mirror://sourceforge/giflib/${P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="static-libs X"
+
+RDEPEND="X? ( >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20140406-r1
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32]
+ )"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ # don't generate html docs
+ sed -i '/^SUBDIRS/s/doc//' Makefile.am || die
+
+ epatch "${FILESDIR}"/${PN}-4.1.6-giffix-null-Extension-fix.patch
+ sed -i \
+ -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' \
+ -e 's:${X_PRE_LIBS}::' \
+ configure.ac || die #486542,#483258
+ eautoreconf
+
+ sed -i '/X_PRE_LIBS/s:-lSM -lICE::' configure || die #483258
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable static-libs static)
+ $(use_enable X x11)
+ )
+ autotools-multilib_src_configure
+}
+
+src_test() {
+ autotools-multilib_src_test -C tests
+}
+
+src_install() {
+ autotools-multilib_src_install
+
+ # for static libs the .la file is required if built with +X
+ use static-libs || prune_libtool_files --all
+
+ doman doc/*.1
+ dodoc doc/*.txt
+}
diff --git a/media-libs/giflib/giflib-4.2.3.ebuild b/media-libs/giflib/giflib-4.2.3.ebuild
new file mode 100644
index 000000000000..bf113fc1e65d
--- /dev/null
+++ b/media-libs/giflib/giflib-4.2.3.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils autotools
+
+DESCRIPTION="Library to handle, display and manipulate GIF images"
+HOMEPAGE="http://sourceforge.net/projects/giflib/"
+SRC_URI="mirror://sourceforge/giflib/${P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="static-libs X"
+
+DEPEND="X? (
+ x11-libs/libXt
+ x11-libs/libX11
+ x11-libs/libICE
+ x11-libs/libSM
+ )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ # don't generate html docs
+ sed -i '/^SUBDIRS/s/doc//' Makefile.am || die
+
+ epatch "${FILESDIR}"/${PN}-4.1.6-giffix-null-Extension-fix.patch
+ sed -i \
+ -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' \
+ configure.ac || die #486542
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable X x11)
+}
+
+src_test() {
+ cd tests || die
+ emake
+}
+
+src_install() {
+ default
+ # for static libs the .la file is required if built with +X
+ use static-libs || find "${ED}" -name '*.la' -exec rm -f {} +
+ doman doc/*.1
+ dodoc doc/*.txt
+}
diff --git a/media-libs/giflib/giflib-5.0.6.ebuild b/media-libs/giflib/giflib-5.0.6.ebuild
new file mode 100644
index 000000000000..bc461e29333c
--- /dev/null
+++ b/media-libs/giflib/giflib-5.0.6.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils libtool autotools-multilib
+
+DESCRIPTION="Library to handle, display and manipulate GIF images"
+HOMEPAGE="http://sourceforge.net/projects/giflib/"
+SRC_URI="mirror://sourceforge/giflib/${P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0/6"
+# Needs testing first.
+#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="static-libs"
+
+RDEPEND="
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20140406-r1
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32]
+ )"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ elibtoolize
+}
+
+src_configure() {
+ local myeconfargs=(
+ # No need for xmlto as they ship generated files.
+ ac_cv_prog_have_xmlto=no
+
+ $(use_enable static-libs static)
+ )
+
+ autotools-multilib_src_configure
+}
+
+src_install() {
+ autotools-multilib_src_install
+
+ # for static libs the .la file is required if built with +X
+ use static-libs || prune_libtool_files --all
+
+ doman doc/*.1
+ dodoc doc/*.txt
+ dohtml -r doc
+}
diff --git a/media-libs/giflib/giflib-5.1.0.ebuild b/media-libs/giflib/giflib-5.1.0.ebuild
new file mode 100644
index 000000000000..7a8a46d72ec1
--- /dev/null
+++ b/media-libs/giflib/giflib-5.1.0.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils libtool autotools-multilib
+
+DESCRIPTION="Library to handle, display and manipulate GIF images"
+HOMEPAGE="http://sourceforge.net/projects/giflib/"
+SRC_URI="mirror://sourceforge/giflib/${P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0/7"
+# Needs testing first.
+#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="static-libs"
+
+RDEPEND="
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20140406-r1
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32]
+ )"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ elibtoolize
+}
+
+src_configure() {
+ local myeconfargs=(
+ # No need for xmlto as they ship generated files.
+ ac_cv_prog_have_xmlto=no
+
+ $(use_enable static-libs static)
+ )
+
+ autotools-multilib_src_configure
+}
+
+src_install() {
+ autotools-multilib_src_install
+
+ # for static libs the .la file is required if built with +X
+ use static-libs || prune_libtool_files --all
+
+ doman doc/*.1
+ dodoc doc/*.txt
+ dohtml -r doc
+}
diff --git a/media-libs/giflib/giflib-5.1.1.ebuild b/media-libs/giflib/giflib-5.1.1.ebuild
new file mode 100644
index 000000000000..dc4fced5634f
--- /dev/null
+++ b/media-libs/giflib/giflib-5.1.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 eutils libtool autotools-multilib
+
+DESCRIPTION="Library to handle, display and manipulate GIF images"
+HOMEPAGE="http://sourceforge.net/projects/giflib/"
+SRC_URI="mirror://sourceforge/giflib/${P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0/7"
+# Needs testing first.
+#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="static-libs"
+
+RDEPEND="
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20140406-r1
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32]
+ )"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ elibtoolize
+}
+
+src_configure() {
+ local myeconfargs=(
+ # No need for xmlto as they ship generated files.
+ ac_cv_prog_have_xmlto=no
+
+ $(use_enable static-libs static)
+ )
+
+ autotools-multilib_src_configure
+}
+
+src_install() {
+ autotools-multilib_src_install
+
+ # for static libs the .la file is required if built with +X
+ use static-libs || prune_libtool_files --all
+
+ doman doc/*.1
+ dodoc doc/*.txt
+ dohtml -r doc
+}
diff --git a/media-libs/giflib/metadata.xml b/media-libs/giflib/metadata.xml
new file mode 100644
index 000000000000..c5d674103568
--- /dev/null
+++ b/media-libs/giflib/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>graphics</herd>
+ <use>
+ <flag name="rle">Build converters for RLE format (utah raster toolkit)</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">giflib</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/glew/Manifest b/media-libs/glew/Manifest
new file mode 100644
index 000000000000..bf26c300313a
--- /dev/null
+++ b/media-libs/glew/Manifest
@@ -0,0 +1,4 @@
+DIST glew-1.10.0.tgz 567605 SHA256 99c41320b63f6860869b5fb9af9a1854b15582796c64ee3dfd7096dc0c89f307 SHA512 0c998fda9fe01c9296a3453966c0449c9968f4f5f989065ca65f0da3830ae8d805699d0ee0362c3b18765420222ba18842b9db20986212afceb36c971ae1bdca WHIRLPOOL 7c931d990b667fc5da79b0b0c11f76693adbd75c730252d5fd1129ff5d54690222a0f0efc0d2abe0535edcde7f72d76bad6de40d02c5a48f0bc4804a248b7d72
+DIST glew-1.11.0.tgz 601430 SHA256 69bbce306ac281c4fa806a7a7d02c0596281a2d8f9d70690e98126f23ba513d6 SHA512 ab7fa5027b069adb7ce2f0ec9dc4e7f30d852e4212c68759873f060e32cc2be04cef66748a7e8696240ed6e3efbf4f0a2aa94640723facf83123c4cc6d955308 WHIRLPOOL 0190203051e8eb5fb887b3a013928072aabf3c418faf9e5bd86ae2d60c7dd788b5694de60ab40fe5a616dcf61e6b8b24fc09a8fef8aa1fb90e42e8b87ab65ee3
+DIST glew-1.12.0.tgz 610965 SHA256 af58103f4824b443e7fa4ed3af593b8edac6f3a7be3b30911edbc7344f48e4bf SHA512 9af4db32f6ada61f578c903fe1674f98fcaba2fb6fafced2cea2b1d82769427283d940b095c69237860357dcb1629b5227bb74a392b80da41f7be6288cbda0ae WHIRLPOOL b1ec49ebffb85bf44cdfce4aa3ee5a51f09d41c1fa45a39e3c865117a5e33e36aff7b64b41c4f79598b0ca21c55f424a88657479c395a22a8e34283e4950a510
+DIST glew-1.9.0.tgz 544440 SHA256 9b36530e414c95d6624be9d6815a5be1531d1986300ae5903f16977ab8aeb787 SHA512 e4b566de6bfc84d73a2c3eedc5eeace30b1d8126f425fbd880dcc3f5850dd445247d6ef950194944cfc71d71155773c47bb593fe2ca9879032d1c65a8a70f5e5 WHIRLPOOL d1c49e13561834c2049f8d5027260b37f5814cf96466f30494d5c2a0251b655c97f9f82a4c9f76ec62513e1408586b1ff8a0ee21258af7e9afa5a7407cf8cdba
diff --git a/media-libs/glew/glew-1.10.0-r1.ebuild b/media-libs/glew/glew-1.10.0-r1.ebuild
new file mode 100644
index 000000000000..bbca11a4af02
--- /dev/null
+++ b/media-libs/glew/glew-1.10.0-r1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit multilib toolchain-funcs versionator
+
+DESCRIPTION="The OpenGL Extension Wrangler Library"
+HOMEPAGE="http://glew.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tgz"
+
+LICENSE="BSD MIT"
+SLOT="0/$(get_version_component_range 1-2)"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="doc static-libs"
+
+RDEPEND="virtual/glu
+ virtual/opengl
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXi
+ x11-libs/libXmu"
+DEPEND=${RDEPEND}
+
+pkg_setup() {
+ myglewopts=(
+ AR="$(tc-getAR)"
+ STRIP=true
+ CC="$(tc-getCC)"
+ LD="$(tc-getCC) ${LDFLAGS}"
+ M_ARCH=""
+ LDFLAGS.EXTRA=""
+ POPT="${CFLAGS}"
+ )
+}
+
+src_prepare() {
+ sed -i \
+ -e '/INSTALL/s:-s::' \
+ -e '/$(CC) $(CFLAGS) -o/s:$(CFLAGS):$(CFLAGS) $(LDFLAGS):' \
+ -e '/^.PHONY: .*\.pc$/d' \
+ Makefile || die
+
+ if ! use static-libs ; then
+ sed -i \
+ -e '/glew.lib:/s|lib/$(LIB.STATIC) ||' \
+ -e '/glew.lib.mx:/s|lib/$(LIB.STATIC.MX) ||' \
+ -e '/INSTALL.*LIB.STATIC/d' \
+ Makefile || die
+ fi
+
+ # don't do stupid Solaris specific stuff that won't work in Prefix
+ cp config/Makefile.linux config/Makefile.solaris || die
+ # and let freebsd be built as on linux too
+ cp config/Makefile.linux config/Makefile.freebsd || die
+}
+
+src_compile(){
+ emake GLEW_DEST="${EPREFIX}/usr" LIBDIR="${EPREFIX}/usr/$(get_libdir)" "${myglewopts[@]}"
+}
+
+src_install() {
+ emake \
+ GLEW_DEST="${ED}/usr" \
+ LIBDIR="${ED}/usr/$(get_libdir)" \
+ "${myglewopts[@]}" \
+ install.all
+
+ dodoc TODO.txt
+ use doc && dohtml doc/*
+}
diff --git a/media-libs/glew/glew-1.10.0-r2.ebuild b/media-libs/glew/glew-1.10.0-r2.ebuild
new file mode 100644
index 000000000000..e9519f66a1c5
--- /dev/null
+++ b/media-libs/glew/glew-1.10.0-r2.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit multilib multilib-minimal toolchain-funcs versionator
+
+DESCRIPTION="The OpenGL Extension Wrangler Library"
+HOMEPAGE="http://glew.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tgz"
+
+LICENSE="BSD MIT"
+SLOT="0/$(get_version_component_range 1-2)"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="doc static-libs"
+
+RDEPEND=">=virtual/glu-9.0-r1[${MULTILIB_USEDEP}]
+ >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}]
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXi-1.7.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXmu-1.1.1-r1[${MULTILIB_USEDEP}]
+ abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] )"
+DEPEND=${RDEPEND}
+
+src_prepare() {
+ sed -i \
+ -e '/INSTALL/s:-s::' \
+ -e '/$(CC) $(CFLAGS) -o/s:$(CFLAGS):$(CFLAGS) $(LDFLAGS):' \
+ -e '/^.PHONY: .*\.pc$/d' \
+ Makefile || die
+
+ if ! use static-libs ; then
+ sed -i \
+ -e '/glew.lib:/s|lib/$(LIB.STATIC) ||' \
+ -e '/glew.lib.mx:/s|lib/$(LIB.STATIC.MX) ||' \
+ -e '/INSTALL.*LIB.STATIC/d' \
+ Makefile || die
+ fi
+
+ # don't do stupid Solaris specific stuff that won't work in Prefix
+ cp config/Makefile.linux config/Makefile.solaris || die
+ # and let freebsd be built as on linux too
+ cp config/Makefile.linux config/Makefile.freebsd || die
+
+ multilib_copy_sources
+}
+
+set_opts() {
+ myglewopts=(
+ AR="$(tc-getAR)"
+ STRIP=true
+ CC="$(tc-getCC)"
+ LD="$(tc-getCC) ${LDFLAGS}"
+ M_ARCH=""
+ LDFLAGS.EXTRA=""
+ POPT="${CFLAGS}"
+ )
+}
+
+multilib_src_compile() {
+ set_opts
+ emake GLEW_DEST="${EPREFIX}/usr" LIBDIR="${EPREFIX}/usr/$(get_libdir)" "${myglewopts[@]}"
+}
+
+multilib_src_install() {
+ set_opts
+ emake \
+ GLEW_DEST="${ED}/usr" \
+ LIBDIR="${ED}/usr/$(get_libdir)" \
+ "${myglewopts[@]}" \
+ install.all
+
+ dodoc TODO.txt
+ use doc && dohtml doc/*
+}
diff --git a/media-libs/glew/glew-1.11.0.ebuild b/media-libs/glew/glew-1.11.0.ebuild
new file mode 100644
index 000000000000..dbd74fa9a4c1
--- /dev/null
+++ b/media-libs/glew/glew-1.11.0.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit multilib multilib-minimal toolchain-funcs versionator
+
+DESCRIPTION="The OpenGL Extension Wrangler Library"
+HOMEPAGE="http://glew.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tgz"
+
+LICENSE="BSD MIT"
+SLOT="0/$(get_version_component_range 1-2)"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="doc static-libs"
+
+RDEPEND=">=virtual/glu-9.0-r1[${MULTILIB_USEDEP}]
+ >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}]
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXi-1.7.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXmu-1.1.1-r1[${MULTILIB_USEDEP}]
+ abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] )"
+DEPEND=${RDEPEND}
+
+src_prepare() {
+ sed -i \
+ -e '/INSTALL/s:-s::' \
+ -e '/$(CC) $(CFLAGS) -o/s:$(CFLAGS):$(CFLAGS) $(LDFLAGS):' \
+ -e '/^.PHONY: .*\.pc$/d' \
+ Makefile || die
+
+ if ! use static-libs ; then
+ sed -i \
+ -e '/glew.lib:/s|lib/$(LIB.STATIC) ||' \
+ -e '/glew.lib.mx:/s|lib/$(LIB.STATIC.MX) ||' \
+ -e '/INSTALL.*LIB.STATIC/d' \
+ Makefile || die
+ fi
+
+ # don't do stupid Solaris specific stuff that won't work in Prefix
+ cp config/Makefile.linux config/Makefile.solaris || die
+ # and let freebsd be built as on linux too
+ cp config/Makefile.linux config/Makefile.freebsd || die
+
+ multilib_copy_sources
+}
+
+set_opts() {
+ myglewopts=(
+ AR="$(tc-getAR)"
+ STRIP=true
+ CC="$(tc-getCC)"
+ LD="$(tc-getCC) ${LDFLAGS}"
+ M_ARCH=""
+ LDFLAGS.EXTRA=""
+ POPT="${CFLAGS}"
+ )
+
+ # support MinGW targets (bug #523444)
+ [[ ${CHOST} == *-mingw* ]] && myglewopts+=( SYSTEM=mingw )
+}
+
+multilib_src_compile() {
+ set_opts
+ emake GLEW_DEST="${EPREFIX}/usr" LIBDIR="${EPREFIX}/usr/$(get_libdir)" "${myglewopts[@]}"
+}
+
+multilib_src_install() {
+ set_opts
+ emake \
+ GLEW_DEST="${ED}/usr" \
+ LIBDIR="${ED}/usr/$(get_libdir)" \
+ "${myglewopts[@]}" \
+ install.all
+
+ dodoc TODO.txt
+ use doc && dohtml doc/*
+}
diff --git a/media-libs/glew/glew-1.12.0.ebuild b/media-libs/glew/glew-1.12.0.ebuild
new file mode 100644
index 000000000000..28e13456cb4d
--- /dev/null
+++ b/media-libs/glew/glew-1.12.0.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit multilib multilib-minimal toolchain-funcs versionator
+
+DESCRIPTION="The OpenGL Extension Wrangler Library"
+HOMEPAGE="http://glew.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tgz"
+
+LICENSE="BSD MIT"
+SLOT="0/$(get_version_component_range 1-2)"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="doc static-libs"
+
+RDEPEND=">=virtual/glu-9.0-r1[${MULTILIB_USEDEP}]
+ >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}]
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXi-1.7.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXmu-1.1.1-r1[${MULTILIB_USEDEP}]
+ abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] )"
+DEPEND=${RDEPEND}
+
+src_prepare() {
+ sed -i \
+ -e '/INSTALL/s:-s::' \
+ -e '/$(CC) $(CFLAGS) -o/s:$(CFLAGS):$(CFLAGS) $(LDFLAGS):' \
+ -e '/^.PHONY: .*\.pc$/d' \
+ Makefile || die
+
+ if ! use static-libs ; then
+ sed -i \
+ -e '/glew.lib:/s|lib/$(LIB.STATIC) ||' \
+ -e '/glew.lib.mx:/s|lib/$(LIB.STATIC.MX) ||' \
+ -e '/INSTALL.*LIB.STATIC/d' \
+ Makefile || die
+ fi
+
+ # don't do stupid Solaris specific stuff that won't work in Prefix
+ cp config/Makefile.linux config/Makefile.solaris || die
+ # and let freebsd be built as on linux too
+ cp config/Makefile.linux config/Makefile.freebsd || die
+
+ multilib_copy_sources
+}
+
+set_opts() {
+ myglewopts=(
+ AR="$(tc-getAR)"
+ STRIP=true
+ CC="$(tc-getCC)"
+ LD="$(tc-getCC) ${LDFLAGS}"
+ M_ARCH=""
+ LDFLAGS.EXTRA=""
+ POPT="${CFLAGS}"
+ )
+
+ # support MinGW targets (bug #523444)
+ [[ ${CHOST} == *-mingw* ]] && myglewopts+=( SYSTEM=mingw )
+}
+
+multilib_src_compile() {
+ set_opts
+ emake GLEW_DEST="${EPREFIX}/usr" LIBDIR="${EPREFIX}/usr/$(get_libdir)" "${myglewopts[@]}"
+}
+
+multilib_src_install() {
+ set_opts
+ emake \
+ GLEW_DEST="${ED}/usr" \
+ LIBDIR="${ED}/usr/$(get_libdir)" \
+ "${myglewopts[@]}" \
+ install.all
+
+ dodoc TODO.txt
+ use doc && dohtml doc/*
+}
diff --git a/media-libs/glew/glew-1.9.0.ebuild b/media-libs/glew/glew-1.9.0.ebuild
new file mode 100644
index 000000000000..b2ca9008f61d
--- /dev/null
+++ b/media-libs/glew/glew-1.9.0.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit multilib toolchain-funcs
+
+DESCRIPTION="The OpenGL Extension Wrangler Library"
+HOMEPAGE="http://glew.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tgz"
+
+LICENSE="BSD MIT"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="doc static-libs"
+
+RDEPEND="virtual/glu
+ virtual/opengl
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXi
+ x11-libs/libXmu"
+DEPEND=${RDEPEND}
+
+pkg_setup() {
+ myglewopts=(
+ AR="$(tc-getAR)"
+ STRIP=true
+ CC="$(tc-getCC)"
+ LD="$(tc-getCC) ${LDFLAGS}"
+ M_ARCH=""
+ LDFLAGS.EXTRA=""
+ POPT="${CFLAGS}"
+ )
+}
+
+src_prepare() {
+ sed -i \
+ -e '/INSTALL/s:-s::' \
+ -e '/$(CC) $(CFLAGS) -o/s:$(CFLAGS):$(CFLAGS) $(LDFLAGS):' \
+ Makefile || die
+
+ if ! use static-libs ; then
+ sed -i \
+ -e '/glew.lib:/s|lib/$(LIB.STATIC) ||' \
+ -e '/glew.lib.mx:/s|lib/$(LIB.STATIC.MX) ||' \
+ -e '/INSTALL.*LIB.STATIC/d' \
+ Makefile || die
+ fi
+
+ # don't do stupid Solaris specific stuff that won't work in Prefix
+ cp config/Makefile.linux config/Makefile.solaris || die
+ # and let freebsd be built as on linux too
+ cp config/Makefile.linux config/Makefile.freebsd || die
+}
+
+src_compile(){
+ emake GLEW_DEST="${EPREFIX}/usr" "${myglewopts[@]}"
+}
+
+src_install() {
+ emake \
+ GLEW_DEST="${ED}/usr" \
+ LIBDIR="${ED}/usr/$(get_libdir)" \
+ "${myglewopts[@]}" \
+ install.all
+
+ dodoc TODO.txt
+ use doc && dohtml doc/*
+}
diff --git a/media-libs/glew/metadata.xml b/media-libs/glew/metadata.xml
new file mode 100644
index 000000000000..fb0ec33aea1f
--- /dev/null
+++ b/media-libs/glew/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>radhermit@gentoo.org</email>
+ <name>Tim Harder</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">glew</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/glfw/Manifest b/media-libs/glfw/Manifest
new file mode 100644
index 000000000000..a5d494d8caf6
--- /dev/null
+++ b/media-libs/glfw/Manifest
@@ -0,0 +1,2 @@
+DIST glfw-2.7.7.tar.bz2 927805 SHA256 422e755979524a1da28e4addcae723b7132998ca15e89be41bf34964d9360aa2 SHA512 1b51b9d88c8eed9da8084421949b561a4779410a6369ffdf482c2d8a166bab8c58bbb087ef6f32180d3fe9430988549be5c183b338dd0e1191b2c4b4a7b55379 WHIRLPOOL 646d38fd3ea88e8aa19dcbfa8f8b933adc530ea946cd51c3e03971ed6cdb294dadf5020a876ba298c378896179a4a7ba0129b858fc7f1273a574fe1c2c388a77
+DIST glfw-3.1.1.tar.bz2 584344 SHA256 4a8516223c1df079efb398754f4533af7e943188ea9b5222e7f27c25e4822d61 SHA512 c54da5a1714aa1f9a79283922374672dac01c6a6093ed4cddd257d565258e6adffab83bcb34723cd34b415d9a8029f5f13fb225e6cf0a29bc74126a9bd5147e7 WHIRLPOOL d2ee39e01b3d6ff24af8fe5c262d4c099412eb42324726d8a0aa306d93fe6c6fe8477b6afd72e79122fc35258e573e87232128b193a461d7c7f8544338e292a5
diff --git a/media-libs/glfw/files/glfw-2.7.7-dyn.patch b/media-libs/glfw/files/glfw-2.7.7-dyn.patch
new file mode 100644
index 000000000000..4dc4cc242ee7
--- /dev/null
+++ b/media-libs/glfw/files/glfw-2.7.7-dyn.patch
@@ -0,0 +1,31 @@
+--- lib/x11/Makefile.x11.in
++++ lib/x11/Makefile.x11.in
+@@ -8,7 +8,7 @@
+ ##########################################################################
+ # Default: Build GLFW static library
+ ##########################################################################
+-all: libglfw.a libglfw.so
++all: libglfw.a libglfw.so.2.7.7
+
+
+ ##########################################################################
+@@ -112,7 +112,7 @@
+ ##########################################################################
+ # Rule for building shared library
+ ##########################################################################
+-libglfw.so: $(SHARED_OBJS)
++libglfw.so.2.7.7: $(SHARED_OBJS)
+ $(CC) $(SOFLAGS) -o $@ $(SHARED_OBJS) $(LFLAGS) $(LIBS)
+
+
+--- compile.sh
++++ compile.sh
+@@ -88,7 +88,7 @@
+ case "x`uname 2> /dev/null`" in
+ xLinux)
+ GLFW_LIB_CFLAGS="$GLFW_LIB_CFLAGS -D_GLFW_USE_LINUX_JOYSTICKS"
+- SOFLAGS="-shared -Wl,-soname,libglfw.so"
++ SOFLAGS="-shared -Wl,-soname,libglfw.so.2.7.7"
+ echo "Linux" 1>&6
+ ;;
+ xDarwin)
diff --git a/media-libs/glfw/files/glfw-2.7.7-pkgconfig.patch b/media-libs/glfw/files/glfw-2.7.7-pkgconfig.patch
new file mode 100644
index 000000000000..e880995c1a6b
--- /dev/null
+++ b/media-libs/glfw/files/glfw-2.7.7-pkgconfig.patch
@@ -0,0 +1,37 @@
+support libsuffix, fix version
+
+--- lib/x11/Makefile.x11.in
++++ lib/x11/Makefile.x11.in
+@@ -3,6 +3,7 @@
+ # Installation prefix (default to /usr/local)
+ ##########################################################################
+ PREFIX ?= /usr/local
++LIBDIR ?= lib
+
+
+ ##########################################################################
+@@ -99,7 +100,7 @@
+ # Rule for building libglfw.pc
+ ##########################################################################
+ libglfw.pc: libglfw.pc.in
+- $(SED) -e 's,\@PREFIX\@,$(PREFIX),' libglfw.pc.in > libglfw.pc
++ $(SED) -e 's,\@PREFIX\@,$(PREFIX),' -e 's,\@LIBDIR@,$(LIBDIR),' libglfw.pc.in > libglfw.pc
+
+
+ ##########################################################################
+--- compile.sh
++++ compile.sh
+@@ -734,11 +734,11 @@
+ prefix=@PREFIX@
+ exec_prefix=\${prefix}
+ includedir=\${prefix}/include
+-libdir=\${exec_prefix}/lib
++libdir=\${exec_prefix}/@LIBDIR@
+
+ Name: GLFW
+ Description: A portable framework for OpenGL development
+-Version: 2.7.4
++Version: 2.7.7
+ URL: http://www.glfw.org/
+ Requires.private: gl x11 $PKG_LIBS
+ Libs: -L\${libdir} -lglfw $LFLAGS_THREAD $LFLAGS_CLOCK
diff --git a/media-libs/glfw/glfw-2.7.7.ebuild b/media-libs/glfw/glfw-2.7.7.ebuild
new file mode 100644
index 000000000000..c8155acc2cf7
--- /dev/null
+++ b/media-libs/glfw/glfw-2.7.7.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="The Portable OpenGL FrameWork"
+HOMEPAGE="http://www.glfw.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="examples static-libs"
+
+DEPEND="x11-libs/libX11
+ x11-libs/libXrandr
+ virtual/glu
+ virtual/opengl"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ sed -i \
+ -e "s:\"docs/:\"/usr/share/doc/${PF}/pdf/:" \
+ readme.html || die
+
+ epatch "${FILESDIR}"/${P}-{dyn,pkgconfig}.patch
+
+ # respect ldflags
+ sed -i \
+ -e "s/\$(LFLAGS)/\$(LDFLAGS) \$(LFLAGS)/" \
+ {lib/x11,examples}/Makefile.x11.in || die
+
+ # respect cflags in linking command
+ # build system is messing up CFLAGS variable, so sed is the easy way to go
+ sed -i \
+ -e "/^libglfw.so/{n;s/\$(CC)/\$(CC) ${CFLAGS}/;}" \
+ lib/x11/Makefile.x11.in || die
+
+ if use !static-libs ; then
+ sed -i \
+ -e '/^all:/s/libglfw.a//' \
+ lib/x11/Makefile.x11.in || die
+ fi
+}
+
+src_configure() {
+ sh ./compile.sh
+}
+
+src_compile() {
+ emake -C lib/x11 AR=$(tc-getAR) CC=$(tc-getCC) PREFIX=/usr LIBDIR=$(get_libdir) -f Makefile.x11 all libglfw.pc
+ use examples && emake -C examples CC=$(tc-getCC) -f Makefile.x11 all
+}
+
+src_install() {
+ use static-libs && dolib.a lib/x11/libglfw.a
+ dolib.so lib/x11/libglfw.so.2.7.7
+ dosym libglfw.so.2.7.7 /usr/$(get_libdir)/libglfw.so
+
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins lib/x11/libglfw.pc
+ doheader -r include/GL
+ dohtml -r readme.html
+ insinto /usr/share/doc/${PF}/pdf
+ doins docs/*.pdf
+ dodoc docs/readme.txt
+
+ if use examples; then
+ local f
+ local MY_EXAMPLES="boing gears listmodes mipmaps
+ mtbench mthello particles pong3d splitview
+ triangle wave"
+ local MY_PICS="mipmaps.tga pong3d_field.tga pong3d_instr.tga
+ pong3d_menu.tga pong3d_title.tga
+ pong3d_winner1.tga pong3d_winner2.tga"
+
+ docompress -x /usr/share/doc/${PF}/examples
+ insinto /usr/share/doc/${PF}/examples
+
+ doins examples/Makefile.x11
+ for f in $MY_EXAMPLES; do
+ doins examples/${f}.c
+ done
+ for f in $MY_PICS; do
+ doins examples/${f}
+ done
+
+ insopts -m0755
+ for f in $MY_EXAMPLES; do
+ doins examples/${f}
+ done
+ fi
+}
diff --git a/media-libs/glfw/glfw-3.1.1.ebuild b/media-libs/glfw/glfw-3.1.1.ebuild
new file mode 100644
index 000000000000..58aac50bc09d
--- /dev/null
+++ b/media-libs/glfw/glfw-3.1.1.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 cmake-utils
+
+DESCRIPTION="The Portable OpenGL FrameWork"
+HOMEPAGE="http://www.glfw.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="egl examples"
+
+RDEPEND="x11-libs/libXrandr
+ x11-libs/libX11
+ x11-libs/libXi
+ x11-libs/libXxf86vm
+ x11-libs/libXinerama
+ virtual/opengl"
+DEPEND="${RDEPEND}
+ virtual/glu"
+
+src_configure() {
+ local mycmakeargs="
+ $(cmake-utils_use egl GLFW_USE_EGL)
+ $(cmake-utils_use examples GLFW_BUILD_EXAMPLES)
+ -DBUILD_SHARED_LIBS=1
+ "
+ cmake-utils_src_configure
+}
diff --git a/media-libs/glfw/metadata.xml b/media-libs/glfw/metadata.xml
new file mode 100644
index 000000000000..ca66c0fcb12a
--- /dev/null
+++ b/media-libs/glfw/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>games</herd>
+ <use>
+ <flag name="egl">Use EGL instead of GLX for GL context creation</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">glfw</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/glm/Manifest b/media-libs/glm/Manifest
new file mode 100644
index 000000000000..c91819f95ea4
--- /dev/null
+++ b/media-libs/glm/Manifest
@@ -0,0 +1,4 @@
+DIST glm-0.9.2.4.zip 3462705 SHA256 1ec0e08c15c3f7e67d646ffae57777836c64431ddbf6bdcda4b73fb584b2542c
+DIST glm-0.9.3.2.zip 6451695 SHA256 ee66ab8336b9b6b3dff69268c497688268cf5a9d2b3a14e1aa6fbd7f48c911be SHA512 7e446cb32c62254f6c44d4bc350a691312d33866bcb42865ee750342a22437e3df791007574582e9c0152f66d86d891cc433e8474c6167432f1604123b33ea51 WHIRLPOOL 9da6e38528ee7f3823983a0c4967e1528b05c7775adc548021bca36e908d987828f023e983a24bd46be48ad6a6e64c00b0c9fdb7f50abc97e1a9dbf9a0e15cd9
+DIST glm-0.9.5.1.zip 4071873 SHA256 4f621657a3a7e73e2062f0c9b4366ba5e14a3c3b3c04928378f37fdd70bd0bf5 SHA512 9644e7d76dda057fb25c3c387316c551e964a179662baf095cc2519ec84693499fd1f9c8d614ed617c3a0e406843aad7a01cbbc9399e86d52cdd8cf72f1b9194 WHIRLPOOL 5a5e2e64c4236f46d97f286b6675fd01b92905fa86c02fe9812d272d0dd0319a1bff8ab0c8d27d1bb706b0033ba08b49085bd83264b72954ca7704fe7260333c
+DIST glm-0.9.6.1.zip 4232099 SHA256 1a8a0c84dee47b0493aa8d45ccd38dc02b917d9f14da835c5b06fb0b93bb33e8 SHA512 7f1468c5e60e65181f4685a2429fa8d70350a3576175a55b7c9e8597a03837cb84aeaeb88d311e1e1948c5bd90ad9cee9286433cb78fdee54b0fbe5313ce2f84 WHIRLPOOL 88e0c6df25ee1bf73b625614be61c21c07389a7ecc05e2e74714da08412ab3ab0eba6c99c6a793f7b08d52f6748ef5202d8301c1b6cf4d64ab06184bc9482030
diff --git a/media-libs/glm/glm-0.9.2.4.ebuild b/media-libs/glm/glm-0.9.2.4.ebuild
new file mode 100644
index 000000000000..8630f6ce396b
--- /dev/null
+++ b/media-libs/glm/glm-0.9.2.4.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="OpenGL Mathematics"
+HOMEPAGE="http://glm.g-truc.net/"
+SRC_URI="mirror://sourceforge/ogl-math/${P}.zip"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=""
+DEPEND="app-arch/unzip"
+
+src_install() {
+ dodoc doc/${PN}-0.9.2.pdf
+ cd ${PN}
+ insinto /usr/include/${PN}
+ doins -r *.hpp core gtc gtx virtrev
+ rm "${D}"/usr/include/${PN}/core/*cpp
+}
diff --git a/media-libs/glm/glm-0.9.3.2.ebuild b/media-libs/glm/glm-0.9.3.2.ebuild
new file mode 100644
index 000000000000..3d2a439dc55a
--- /dev/null
+++ b/media-libs/glm/glm-0.9.3.2.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="OpenGL Mathematics"
+HOMEPAGE="http://glm.g-truc.net/"
+SRC_URI="mirror://sourceforge/ogl-math/${P}.zip"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=""
+DEPEND="app-arch/unzip"
+
+src_install() {
+ dodoc doc/${PN}-0.9.3.pdf
+ cd ${PN}
+ insinto /usr/include/${PN}
+ doins -r *.hpp core gtc gtx virtrev
+ rm "${D}"/usr/include/${PN}/core/*cpp
+}
diff --git a/media-libs/glm/glm-0.9.5.1.ebuild b/media-libs/glm/glm-0.9.5.1.ebuild
new file mode 100644
index 000000000000..7498c75d7352
--- /dev/null
+++ b/media-libs/glm/glm-0.9.5.1.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="OpenGL Mathematics"
+HOMEPAGE="http://glm.g-truc.net/"
+SRC_URI="mirror://sourceforge/ogl-math/${P}.zip"
+
+S="${WORKDIR}/${PN}"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+
+RDEPEND=""
+DEPEND="app-arch/unzip"
+
+src_install() {
+ dodoc doc/${PN}.pdf
+ cd ${PN}
+ insinto /usr/include/${PN}
+ doins -r *.hpp detail gtc gtx virtrev
+ rm "${D}"/usr/include/${PN}/detail/*cpp
+}
diff --git a/media-libs/glm/glm-0.9.6.1.ebuild b/media-libs/glm/glm-0.9.6.1.ebuild
new file mode 100644
index 000000000000..c15d89dfa933
--- /dev/null
+++ b/media-libs/glm/glm-0.9.6.1.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="OpenGL Mathematics"
+HOMEPAGE="http://glm.g-truc.net/"
+SRC_URI="mirror://sourceforge/ogl-math/${P}.zip"
+
+S="${WORKDIR}/${PN}"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 ~arm x86"
+IUSE=""
+
+RDEPEND=""
+DEPEND="app-arch/unzip"
+
+src_install() {
+ dodoc readme.txt doc/${PN}.pdf
+ cd ${PN} || die
+ insinto /usr/include/${PN}
+ doins -r *.hpp detail gtc gtx
+ rm "${ED}"usr/include/${PN}/detail/*.cpp || die
+}
diff --git a/media-libs/glm/metadata.xml b/media-libs/glm/metadata.xml
new file mode 100644
index 000000000000..8b1dc50b7580
--- /dev/null
+++ b/media-libs/glm/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>tupone@gentoo.org</email>
+ <name>Tupone Alfredo</name>
+ </maintainer>
+ <longdescription lang="en">
+ header only C++ mathematics library for graphics software based on the OpenGL Shading Language (GLSL) specification.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">ogl-math</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/glpng/Manifest b/media-libs/glpng/Manifest
new file mode 100644
index 000000000000..9dc535d26c0e
--- /dev/null
+++ b/media-libs/glpng/Manifest
@@ -0,0 +1,2 @@
+DIST glpng-1.45.tar.bz2 64426 SHA256 a002aa60f460b0f363267d10c79c730b9dba4c834d0ee43eac15460c2e05f2e8 SHA512 002d6ca05c603d2728454c4daafddca3be23afabd17181d69d7993734306e71c65cf4562e6598ca09b5a50e0c94ecbb0e3b1622788d50af53f54abfae5904747 WHIRLPOOL 643c3dc658068c397fdfe4002a7e0f098c79dbd74189926b4fbbcad70302fe666cec170169562bf776c022894c5910685c247474d8fa37196eef887ccc020892
+DIST glpng-1.46.tar.gz 41024 SHA256 4a3e489deca733524780470c4fb89806e354515b541efb58d44f2e11936dc39e SHA512 82fbd6154a0ca16102b4c31f7fbd907cf8c18b20c1693c60f8dcdd1fe42ebe579f98da2b36c00fc080b2880c720e8099dac0d460a8de1b2bf1145abbf05a20ae WHIRLPOOL 1bad8a51377fed856cfba3309ae7c4069517d31d372b297f3f8d60616e561d3cc042751ff50bb11aaac73d27198b47c4d428139ce4f27d5f38dd4d7a80678b78
diff --git a/media-libs/glpng/files/glpng-1.45-libpng15.patch b/media-libs/glpng/files/glpng-1.45-libpng15.patch
new file mode 100644
index 000000000000..06a3e9e0f508
--- /dev/null
+++ b/media-libs/glpng/files/glpng-1.45-libpng15.patch
@@ -0,0 +1,40 @@
+--- include/GL/glpng.h
++++ include/GL/glpng.h
+@@ -57,7 +57,7 @@
+ #define PNG_SIMPLEMIPMAP PNG_SIMPLEMIPMAPS
+
+ /* Transparency parameters */
+-#define PNG_CALLBACK -3 /* Call the callback function to generate alpha */
++#define PNG_CALLBACKT -3 /* Call the callback function to generate alpha */
+ #define PNG_ALPHA -2 /* Use alpha channel in PNG file, if there is one */
+ #define PNG_SOLID -1 /* No transparency */
+ #define PNG_STENCIL 0 /* Sets alpha to 0 for r=g=b=0, 1 otherwise */
+--- src/glpng.c
++++ src/glpng.c
+@@ -276,7 +276,7 @@
+ endinfo = png_create_info_struct(png);
+
+ // DH: added following lines
+- if (setjmp(png->jmpbuf))
++ if (setjmp(png_jmpbuf(png)))
+ {
+ png_destroy_read_struct(&png, &info, &endinfo);
+ return 0;
+@@ -380,7 +380,7 @@
+ endinfo = png_create_info_struct(png);
+
+ // DH: added following lines
+- if (setjmp(png->jmpbuf))
++ if (setjmp(png_jmpbuf(png)))
+ {
+ png_destroy_read_struct(&png, &info, &endinfo);
+ return 0;
+@@ -559,7 +559,7 @@
+ #define ALPHA *q
+
+ switch (trans) {
+- case PNG_CALLBACK:
++ case PNG_CALLBACKT:
+ FORSTART
+ ALPHA = AlphaCallback((unsigned char) r, (unsigned char) g, (unsigned char) b);
+ FOREND
diff --git a/media-libs/glpng/glpng-1.45-r1.ebuild b/media-libs/glpng/glpng-1.45-r1.ebuild
new file mode 100644
index 000000000000..235fd5672232
--- /dev/null
+++ b/media-libs/glpng/glpng-1.45-r1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit cmake-utils eutils multilib
+
+DESCRIPTION="An OpenGL png image library"
+HOMEPAGE="http://www.fifi.org/doc/libglpng-dev/glpng.html"
+SRC_URI="http://dev.gentooexperimental.org/~scarabeus/${P}.tar.bz2"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+RDEPEND="virtual/opengl
+ virtual/glu
+ media-libs/libpng
+ sys-libs/zlib"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-libpng15.patch
+
+ # fix libdir placement
+ sed -i \
+ -e "s:CMAKE_INSTALL_LIBDIR lib:CMAKE_INSTALL_LIBDIR $(get_libdir):g"\
+ CMakeLists.txt || die
+}
diff --git a/media-libs/glpng/glpng-1.46-r1.ebuild b/media-libs/glpng/glpng-1.46-r1.ebuild
new file mode 100644
index 000000000000..88d70343bff0
--- /dev/null
+++ b/media-libs/glpng/glpng-1.46-r1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit cmake-multilib
+
+DESCRIPTION="An OpenGL PNG image library"
+HOMEPAGE="http://repo.or.cz/w/glpng.git"
+SRC_URI="http://repo.or.cz/w/glpng.git/snapshot/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="static-libs"
+
+RDEPEND="virtual/opengl[${MULTILIB_USEDEP}]
+ virtual/glu[${MULTILIB_USEDEP}]
+ media-libs/libpng:0=[${MULTILIB_USEDEP}]
+ sys-libs/zlib:=[${MULTILIB_USEDEP}]"
+DEPEND=${RDEPEND}
+
+S=${WORKDIR}/${PN}
+
+src_configure() {
+ local mycmakeargs=( "$(cmake-utils_use_build static-libs STATIC_LIBS)" )
+ cmake-multilib_src_configure
+}
diff --git a/media-libs/glpng/metadata.xml b/media-libs/glpng/metadata.xml
new file mode 100644
index 000000000000..d30d9a3bd0f4
--- /dev/null
+++ b/media-libs/glpng/metadata.xml
@@ -0,0 +1,9 @@
+<?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>This is a library for OpenGL to load PNG graphics files as an OpenGL texture as easily as possible. It also has a number of options for generating the alpha channel and mipmaps.</longdescription>
+</pkgmetadata>
diff --git a/media-libs/glu/Manifest b/media-libs/glu/Manifest
new file mode 100644
index 000000000000..30c62e73a49a
--- /dev/null
+++ b/media-libs/glu/Manifest
@@ -0,0 +1 @@
+DIST glu-9.0.0.tar.bz2 493206 SHA256 1f7ad0d379a722fcbd303aa5650c6d7d5544fde83196b42a73d1193568a4df12 SHA512 ff920e3fbca739794e1432a92fdd8517aa732110fea71ed724185425042f83ce18e9866c16f95c6e10f6993f0814a90fac9636e2b3d8ca2084d1ac0a860f61c8 WHIRLPOOL 3b63c789dc54da94bceae57601baad96b6d05901e262d2758f68163ed67d9d9bdecf49f96a2a2598891b0398d3403555e1be28d1c7f7deb7a95431cc2e2c2b1e
diff --git a/media-libs/glu/glu-9.0.0-r1.ebuild b/media-libs/glu/glu-9.0.0-r1.ebuild
new file mode 100644
index 000000000000..ae3c6f5c8a75
--- /dev/null
+++ b/media-libs/glu/glu-9.0.0-r1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI="git://anongit.freedesktop.org/mesa/glu"
+
+if [[ ${PV} = 9999* ]]; then
+ AUTOTOOLS_AUTORECONF=1
+ GIT_ECLASS="git-2"
+ EXPERIMENTAL="true"
+fi
+
+inherit autotools-multilib multilib ${GIT_ECLASS}
+
+DESCRIPTION="The OpenGL Utility Library"
+HOMEPAGE="http://cgit.freedesktop.org/mesa/glu/"
+
+if [[ ${PV} = 9999* ]]; then
+ SRC_URI=""
+else
+ SRC_URI="ftp://ftp.freedesktop.org/pub/mesa/${PN}/${P}.tar.bz2"
+fi
+
+LICENSE="SGI-B-2.0"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="static-libs"
+
+DEPEND=">=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}]"
+RDEPEND="${DEPEND}
+ !<media-libs/mesa-9
+ abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] )"
+
+src_unpack() {
+ default
+ [[ $PV = 9999* ]] && git-2_src_unpack
+}
+
+src_test() {
+ :;
+}
diff --git a/media-libs/glu/glu-9.0.0.ebuild b/media-libs/glu/glu-9.0.0.ebuild
new file mode 100644
index 000000000000..6af2878b6253
--- /dev/null
+++ b/media-libs/glu/glu-9.0.0.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+EGIT_REPO_URI="git://anongit.freedesktop.org/mesa/glu"
+
+if [[ ${PV} = 9999* ]]; then
+ GIT_ECLASS="git-2"
+ EXPERIMENTAL="true"
+fi
+
+inherit autotools-utils multilib ${GIT_ECLASS}
+
+DESCRIPTION="The OpenGL Utility Library"
+HOMEPAGE="http://cgit.freedesktop.org/mesa/glu/"
+
+if [[ ${PV} = 9999* ]]; then
+ SRC_URI=""
+else
+ SRC_URI="ftp://ftp.freedesktop.org/pub/mesa/${PN}/${P}.tar.bz2"
+fi
+
+LICENSE="SGI-B-2.0"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="multilib static-libs"
+
+DEPEND="virtual/opengl"
+RDEPEND="${DEPEND}
+ !<media-libs/mesa-9
+ multilib? ( !app-emulation/emul-linux-x86-opengl )"
+
+foreachabi() {
+ if use multilib; then
+ local ABI
+ for ABI in $(get_all_abis); do
+ multilib_toolchain_setup ${ABI}
+ AUTOTOOLS_BUILD_DIR=${WORKDIR}/${ABI} "${@}"
+ done
+ else
+ "${@}"
+ fi
+}
+
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} != buildonly ]] && has collision-protect ${FEATURES}; then
+ if [[ $(readlink "${EPREFIX}"/usr/$(get_libdir)/libGLU$(get_libname)) == *opengl* ]]; then
+ eerror "FEATURES=\"collision-protect\" is enabled, which will prevent overwriting"
+ eerror "symlinks that were formerly managed by eselect opengl. You must disable"
+ eerror "collision-protect or remove ${EPREFIX}/usr/$(get_libdir)/libGLU$(get_libname)*"
+ eerror "manually. For details see bug #435682."
+ die "collision-protect cannot overwrite libGLU$(get_libname)*"
+ fi
+ fi
+}
+
+src_unpack() {
+ default
+ [[ $PV = 9999* ]] && git-2_src_unpack
+}
+
+src_prepare() {
+ AUTOTOOLS_AUTORECONF=1 autotools-utils_src_prepare
+}
+
+src_configure() {
+ foreachabi autotools-utils_src_configure
+}
+
+src_compile() {
+ foreachabi autotools-utils_src_compile
+}
+
+src_install() {
+ foreachabi autotools-utils_src_install
+}
+
+src_test() {
+ :;
+}
diff --git a/media-libs/glu/metadata.xml b/media-libs/glu/metadata.xml
new file mode 100644
index 000000000000..7f7fe83cd799
--- /dev/null
+++ b/media-libs/glu/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>x11</herd>
+</pkgmetadata>
diff --git a/media-libs/gluon/Manifest b/media-libs/gluon/Manifest
new file mode 100644
index 000000000000..e42a71a3af8d
--- /dev/null
+++ b/media-libs/gluon/Manifest
@@ -0,0 +1 @@
+DIST gluon-0.71.0.tar.gz 14739398 SHA256 76d1c43eac52563541e0502d50450ddb5c2d1841b882f5f652202ff0ebd21ab3
diff --git a/media-libs/gluon/files/gluon-0.71.0-gcc-4.7.patch b/media-libs/gluon/files/gluon-0.71.0-gcc-4.7.patch
new file mode 100644
index 000000000000..5f54687f3527
--- /dev/null
+++ b/media-libs/gluon/files/gluon-0.71.0-gcc-4.7.patch
@@ -0,0 +1,30 @@
+commit bccbda88a6bc53ac20091bb6aefd2f1b501ba31a
+Author: Christoph Feck <christoph@maxiom.de>
+Date: Fri Mar 23 23:35:09 2012 +0100
+
+ Fix includes
+
+diff --git a/input/linux/detectlinux.cpp b/input/linux/detectlinux.cpp
+index 632249a..6ae85a4 100644
+--- a/input/linux/detectlinux.cpp
++++ b/input/linux/detectlinux.cpp
+@@ -26,6 +26,7 @@
+
+ #include <QtCore/QDir>
+
++#include <unistd.h>
+ // #include <libudev.h>
+
+ using namespace GluonInput;
+diff --git a/input/linux/inputthread.cpp b/input/linux/inputthread.cpp
+index f92b104..202745e 100644
+--- a/input/linux/inputthread.cpp
++++ b/input/linux/inputthread.cpp
+@@ -30,6 +30,7 @@
+ // #include <QtCore/QStringList>
+
+ #include <fcntl.h>
++#include <unistd.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
+ #include <linux/input.h>
diff --git a/media-libs/gluon/gluon-0.71.0.ebuild b/media-libs/gluon/gluon-0.71.0.ebuild
new file mode 100644
index 000000000000..b0f9b6622dc2
--- /dev/null
+++ b/media-libs/gluon/gluon-0.71.0.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+OPENGL_REQUIRED="always"
+inherit kde4-base versionator
+
+DESCRIPTION="Free and Open Source framework for creating and distributing games"
+HOMEPAGE="http://gluon.tuxfamily.org/"
+SRC_URI="mirror://kde/unstable/${PN}/$(get_version_component_range 1-2)/src/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+KEYWORDS="~amd64"
+SLOT="4"
+IUSE="debug examples"
+
+DEPEND="
+ media-libs/alure
+ media-libs/libsndfile
+ media-libs/openal
+ virtual/glu
+ virtual/opengl
+ dev-qt/qtdeclarative:4
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}/${P}-gcc-4.7.patch" )
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use examples INSTALL_EXAMPLES)
+ )
+
+ kde4-base_src_configure
+}
diff --git a/media-libs/gluon/metadata.xml b/media-libs/gluon/metadata.xml
new file mode 100644
index 000000000000..8d1e86a9cefb
--- /dev/null
+++ b/media-libs/gluon/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-libs/glyr/Manifest b/media-libs/glyr/Manifest
new file mode 100644
index 000000000000..84a343ff9279
--- /dev/null
+++ b/media-libs/glyr/Manifest
@@ -0,0 +1 @@
+DIST glyr-1.0.5.tar.gz 426382 SHA256 5606ff8713c28c83489628673328a625485a513b009ed64d9a5a781e64d78047 SHA512 e630116ae5a673c9b85a0a4f3dfa2a8ede319bdca357225250ab687b7bf08ddf86041316962918d577376d9641ba1128ec95fa24b5784150155acf78959af744 WHIRLPOOL 765e893642e431daeae4c814c8ca9a3163e0016c45be86f29e2e355e3b99bde1919cfba359aaf15d9952ce4410fa6e9f0b1e9f9378409a8b8dbd45e48ce888d1
diff --git a/media-libs/glyr/glyr-1.0.5.ebuild b/media-libs/glyr/glyr-1.0.5.ebuild
new file mode 100644
index 000000000000..eda49842e5e1
--- /dev/null
+++ b/media-libs/glyr/glyr-1.0.5.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit cmake-utils
+
+DESCRIPTION="A music related metadata searchengine, both with commandline interface and C API"
+HOMEPAGE="http://github.com/sahib/glyr"
+SRC_URI="https://github.com/sahib/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="dev-db/sqlite:3
+ >=dev-libs/glib-2.10:2
+ net-misc/curl"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS="AUTHORS README*" # CHANGELOG is obsolete in favour of git history
+
+src_prepare() {
+ sed -i \
+ -e '/GCC_ONLY_OPT.*-s/d' \
+ -e '/FLAGS/s:-Os::' \
+ -e '/FLAGS/s:-g3::' \
+ CMakeLists.txt || die
+}
diff --git a/media-libs/glyr/metadata.xml b/media-libs/glyr/metadata.xml
new file mode 100644
index 000000000000..f4394f6a0b57
--- /dev/null
+++ b/media-libs/glyr/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>sound</herd>
+ <upstream>
+ <remote-id type="github">sahib/glyr</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/gmtk/Manifest b/media-libs/gmtk/Manifest
new file mode 100644
index 000000000000..9d09addb744d
--- /dev/null
+++ b/media-libs/gmtk/Manifest
@@ -0,0 +1,2 @@
+DIST gmtk-1.0.8.tar.gz 407790 SHA256 007fba85f4ba6af6b3fd9d5162e18a7e4059c848e112eb03b84b2c7aad008b0c SHA512 ef2bff079df5ba41b86b52118b51bfe0343093e206dd7eca0da39f0420eca4d2f3cbb93940ecadb1526303c8ca0f9b27ff61cbd193122cc91a0fff768e6601ee WHIRLPOOL cc64ee0b4a6df03aeddd914bb3018274a0de9fe1930ff54e8e65352bbcbd1ed3d460eed1dde0a054fd7c7edd7bc9cb52eab0d2c361637dc437655dc01c794130
+DIST gmtk-1.0.9.tar.gz 411609 SHA256 d633832ab3b223f9a669934d168c74574ab47a6a21f76d942c05ad78c56bf87a SHA512 61da4bbba5b74510c5ad5d6b5e10606fb99f54732cf412aa6245add2dc2b0df12b75e4e6f1474b4cab0541063ba6f95893e366f1c8b52a055521b667c182dcdf WHIRLPOOL a9fcfd67880f5caf50560a8a71f677b7d9a9cf49b5e9ec8f4572f41b2bc448e27c5a6d8143cbc6fe9a10fc86671094e10ac52ce9abe41190d60ded1c32350459
diff --git a/media-libs/gmtk/gmtk-1.0.8.ebuild b/media-libs/gmtk/gmtk-1.0.8.ebuild
new file mode 100644
index 000000000000..22132e3af2d5
--- /dev/null
+++ b/media-libs/gmtk/gmtk-1.0.8.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+DESCRIPTION="GTK+ widget and function libraries for gnome-mplayer"
+HOMEPAGE="http://code.google.com/p/gmtk/"
+SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~ppc ~ppc64 x86"
+IUSE="alsa +dconf pulseaudio"
+
+COMMON_DEPEND=">=dev-libs/glib-2.30
+ >=x11-libs/gtk+-3.2:3
+ x11-libs/libX11
+ alsa? ( media-libs/alsa-lib )
+ pulseaudio? ( media-sound/pulseaudio )"
+RDEPEND="${COMMON_DEPEND}
+ dconf? ( gnome-base/dconf )"
+DEPEND="${COMMON_DEPEND}
+ dev-util/intltool
+ sys-devel/gettext
+ virtual/pkgconfig"
+
+DOCS="ChangeLog"
+
+src_configure() {
+ econf \
+ --disable-static \
+ --enable-gtk3 \
+ $(use_enable dconf gsettings) \
+ --disable-gconf \
+ $(use_enable !dconf keystore) \
+ --with-gio \
+ $(use_with alsa) \
+ $(use_with pulseaudio)
+}
+
+src_install() {
+ default
+
+ rm -rf "${ED}"/usr/share/doc/${PN}
+ prune_libtool_files
+}
diff --git a/media-libs/gmtk/gmtk-1.0.9.ebuild b/media-libs/gmtk/gmtk-1.0.9.ebuild
new file mode 100644
index 000000000000..a3bed22b12c6
--- /dev/null
+++ b/media-libs/gmtk/gmtk-1.0.9.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
+
+DESCRIPTION="GTK+ widget and function libraries for gnome-mplayer"
+HOMEPAGE="http://code.google.com/p/gmtk/"
+SRC_URI="http://${PN}.googlecode.com/svn/packages/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~ppc ~ppc64 x86"
+IUSE="alsa +dconf pulseaudio"
+
+COMMON_DEPEND=">=dev-libs/glib-2.30
+ >=x11-libs/gtk+-3.2:3
+ x11-libs/libX11
+ alsa? ( media-libs/alsa-lib )
+ pulseaudio? ( media-sound/pulseaudio )"
+RDEPEND="${COMMON_DEPEND}
+ dconf? ( gnome-base/dconf )"
+DEPEND="${COMMON_DEPEND}
+ dev-util/intltool
+ sys-devel/gettext
+ virtual/pkgconfig"
+
+DOCS="ChangeLog"
+
+src_configure() {
+ econf \
+ --disable-static \
+ --enable-gtk3 \
+ $(use_enable dconf gsettings) \
+ --disable-gconf \
+ $(use_enable !dconf keystore) \
+ --with-gio \
+ $(use_with alsa) \
+ $(use_with pulseaudio)
+}
+
+src_install() {
+ default
+
+ rm -rf "${ED}"/usr/share/doc/${PN}
+ prune_libtool_files
+}
diff --git a/media-libs/gmtk/metadata.xml b/media-libs/gmtk/metadata.xml
new file mode 100644
index 000000000000..5e8e19936618
--- /dev/null
+++ b/media-libs/gmtk/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='dconf'>Enable support for <pkg>gnome-base/dconf</pkg></flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/gnonlin/Manifest b/media-libs/gnonlin/Manifest
new file mode 100644
index 000000000000..be58dfbbd7bd
--- /dev/null
+++ b/media-libs/gnonlin/Manifest
@@ -0,0 +1,4 @@
+DIST gnonlin-0.10.17.tar.bz2 468711 SHA256 e4a2dd8af1c0c97f2f63e918a25c26e871c896e88b7ee85948509f68f29e8935 SHA512 e7e7c7999a1886641cf327ad75ba63171c2f9e74fe7a18c4e7c0a5ca69ea3926d4de21f92b01c7896591d2fb48a5c040be2fe05d4d8d43237948c9fe8e4d0f74 WHIRLPOOL a959d5779a5c4f9ee5ca7e608ae3b15c0a89e5c6f3691666370db01e4992c9e8c225d1a9d2e6334b4f157ae365583bfab86cff97d731319f5952817f5a6623c3
+DIST gnonlin-0.10.9.tar.bz2 366567 SHA256 99633d7ddb2c261030eb82567ff7f39ca75c94110cbfc6fe384889b23f2d1dae SHA512 31763d460b249b6f7e3aacc51e84c57f7d8a866f564aa56be6ee410292024b9da4b9c3383b42149bc8776b0daafd431ad2a610cdcfa8f34d5e6969eef56860a3 WHIRLPOOL e2d2b40cf4a8629cdcb92e27112fc1d54d97085659387eeb8740bccc8ea27fb4ec3eb7b12f9e95e643acc28785f6c932047299bbd958e8da525a2d21ef00ff92
+DIST gnonlin-1.2.1.tar.xz 401620 SHA256 787006231184753f8330b4b6d63d37979d937355291c6da75080d83efe1aeb93 SHA512 7e2579b77f6901cd14a57c849a97cc0915a439c11ea1f8989f52f2087926df49577b84866d81161a70de637241de76846373f9af2436eaab73d4573cc3dad792 WHIRLPOOL 2f183214fdca82e6405dcef201a250e5ed651eaba602d792a557a40440ae02b56d5cc57911cd16d4ae996690288f0d8e6d0a0dca16e91f54dc7097720d3040a1
+DIST gnonlin-1.4.0.tar.xz 404096 SHA256 2d667e1632816ea8a6ff7c8b75b29241b6542e1f6ab41d9d51661c287006667f SHA512 22734a8cbc648811467a3a161fdf86997fff682007b57849b253618663d30996a787734df8caff56f0b4b24e98f8cbd073d4c48557b8d09091ab27b72851b055 WHIRLPOOL 37988b6a83c9a7c3a565be412dd5d7b52fb62da51317a8dd135bafce299124cef230b4fcabd0f1f74e931cc72a11fef9c5177f2944082f8a518640a06f1e3123
diff --git a/media-libs/gnonlin/gnonlin-0.10.17.ebuild b/media-libs/gnonlin/gnonlin-0.10.17.ebuild
new file mode 100644
index 000000000000..8e22f71f7f3c
--- /dev/null
+++ b/media-libs/gnonlin/gnonlin-0.10.17.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+DESCRIPTION="Gnonlin is a set of GStreamer elements to ease the creation of non-linear multimedia editors"
+HOMEPAGE="http://gnonlin.sourceforge.net"
+SRC_URI="http://gstreamer.freedesktop.org/src/${PN}/${P}.tar.bz2"
+
+LICENSE="LGPL-2"
+SLOT="0.10"
+KEYWORDS="amd64 x86"
+IUSE="doc test"
+
+RDEPEND=">=media-libs/gstreamer-0.10.30:0.10
+ >=media-libs/gst-plugins-base-0.10.30:0.10"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( || (
+ >=dev-util/gtk-doc-am-1.13
+ >=dev-util/gtk-doc-1.3 ) )
+ test? ( dev-libs/check
+ media-libs/gst-plugins-good:0.10 )" # videomixer
+
+src_configure() {
+ econf \
+ $(use_enable doc gtk-doc) \
+ $(use_enable doc docbook)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed."
+ dodoc AUTHORS ChangeLog NEWS README RELEASE
+
+ # For some reason, make install doesn't do this
+ if use doc; then
+ local htmldir="/usr/share/gtk-doc/html"
+ cd "${S}/docs/libs/html"
+ gtkdoc-rebase --html-dir=${htmldir} || die "gtkdoc-rebase failed"
+ insinto "${htmldir}/gnonlin"
+ doins "${S}"/docs/libs/html/* || die "doins docs failed"
+ fi
+}
diff --git a/media-libs/gnonlin/gnonlin-0.10.9.ebuild b/media-libs/gnonlin/gnonlin-0.10.9.ebuild
new file mode 100644
index 000000000000..fef4d1dfdd68
--- /dev/null
+++ b/media-libs/gnonlin/gnonlin-0.10.9.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+DESCRIPTION="Gnonlin is a set of GStreamer elements to ease the creation of non-linear multimedia editors"
+HOMEPAGE="http://gnonlin.sourceforge.net"
+SRC_URI="http://gstreamer.freedesktop.org/src/${PN}/${P}.tar.bz2"
+
+LICENSE="LGPL-2"
+SLOT="0.10"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND=">=media-libs/gstreamer-0.10.9:0.10
+ >=media-libs/gst-plugins-base-0.10.9:0.10"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed."
+ dodoc AUTHORS ChangeLog NEWS README RELEASE
+}
diff --git a/media-libs/gnonlin/gnonlin-1.2.1.ebuild b/media-libs/gnonlin/gnonlin-1.2.1.ebuild
new file mode 100644
index 000000000000..268b2176158d
--- /dev/null
+++ b/media-libs/gnonlin/gnonlin-1.2.1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit gst-plugins10
+
+DESCRIPTION="Gnonlin is a set of GStreamer elements to ease the creation of non-linear multimedia editors"
+HOMEPAGE="http://gnonlin.sourceforge.net"
+
+LICENSE="LGPL-2"
+SLOT="1.0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+RDEPEND="
+ >=dev-libs/glib-2.34:2
+ >=media-libs/gstreamer-1.2:1.0
+ >=media-libs/gst-plugins-base-1.2:1.0
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ >=dev-util/gtk-doc-am-1.13
+ test? (
+ dev-libs/check
+ >=media-libs/gst-plugins-good-1.2:1.0 )
+" # videomixer
+
+src_configure() {
+ econf --disable-gtk-doc
+}
+
+src_compile() {
+ default
+}
+
+src_install() {
+ default
+ prune_libtool_files --all
+}
diff --git a/media-libs/gnonlin/gnonlin-1.4.0.ebuild b/media-libs/gnonlin/gnonlin-1.4.0.ebuild
new file mode 100644
index 000000000000..e26beb079717
--- /dev/null
+++ b/media-libs/gnonlin/gnonlin-1.4.0.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit gst-plugins10
+
+DESCRIPTION="Gnonlin is a set of GStreamer elements to ease the creation of non-linear multimedia editors"
+HOMEPAGE="http://gnonlin.sourceforge.net"
+
+LICENSE="LGPL-2"
+SLOT="1.0"
+KEYWORDS="amd64 x86"
+IUSE="test"
+
+RDEPEND="
+ >=dev-libs/glib-2.32:2
+ >=media-libs/gstreamer-1.4.0:1.0
+ >=media-libs/gst-plugins-base-1.4.0:1.0
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ >=dev-util/gtk-doc-am-1.13
+ test? (
+ dev-libs/check
+ >=media-libs/gst-plugins-good-1.4.0:1.0 )
+" # videomixer
+
+src_configure() {
+ econf --disable-gtk-doc
+}
+
+src_compile() {
+ default
+}
+
+src_install() {
+ default
+ prune_libtool_files --modules
+}
diff --git a/media-libs/gnonlin/metadata.xml b/media-libs/gnonlin/metadata.xml
new file mode 100644
index 000000000000..9e260ceca3e3
--- /dev/null
+++ b/media-libs/gnonlin/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-libs/grilo/Manifest b/media-libs/grilo/Manifest
new file mode 100644
index 000000000000..4c5d636bba30
--- /dev/null
+++ b/media-libs/grilo/Manifest
@@ -0,0 +1,2 @@
+DIST grilo-0.2.11.tar.xz 614060 SHA256 8a52c37521de80d6caf08a519a708489b9e2b097c2758a0acaab6fbd26d30ea6 SHA512 1e1538ee6657b25bdf902e6b2fd0a75409a8c0a72ebfc1a43c10464e33c2b2455943a4a76491ee9470bdf8f6d934f28fa385fef9f61f0020e943adc01b3a194e WHIRLPOOL 4b9f84a7340e1ca8ae5d27107da6112dbb006da481f5ee39f097b965645ef5f08960ad6520107a683ec060cc7ff6219408d649d116ca44c4521cc1cd64f3a4cb
+DIST grilo-0.2.12.tar.xz 617284 SHA256 55b4663550bc8185f8db232e96b9ba99fbfa9175e31e7321fa5ccaacf3617b85 SHA512 a8102dc66e30676a3fcf2be1c96b4c461b78095c03d7566216bb6c04f875b3be6a305d81464058a11f92dee00e68b2abdcb8d5c5f2a0d95732ac7dbb473820f4 WHIRLPOOL fece087c8003138e9b6a977cb3c9d60dd41364dd6b7cb2efe98efab863e38ea360daf44b90ec7a970810a8b4a980221ef73e8a4606dca8e26e52f36980ba9ffc
diff --git a/media-libs/grilo/files/grilo-0.1.16-constants.py b/media-libs/grilo/files/grilo-0.1.16-constants.py
new file mode 100644
index 000000000000..e8e26906a79f
--- /dev/null
+++ b/media-libs/grilo/files/grilo-0.1.16-constants.py
@@ -0,0 +1,50 @@
+KEY_NONEXISTING = 'nonexisting-key'
+KEY_ALBUM = 'album'
+KEY_ARTIST = 'artist'
+KEY_AUTHOR = 'author'
+KEY_BITRATE = 'bitrate'
+KEY_CERTIFICATE = 'certificate'
+KEY_CHILDCOUNT = 'childcount'
+KEY_DATE = 'date'
+KEY_DESCRIPTION = 'description'
+KEY_DURATION = 'duration'
+KEY_EXTERNAL_PLAYER = 'external-player'
+KEY_EXTERNAL_URL = 'external-url'
+KEY_FRAMERATE = 'framerate'
+KEY_GENRE = 'genre'
+KEY_HEIGHT = 'height'
+KEY_ID = 'id'
+KEY_LAST_PLAYED = 'last-played'
+KEY_LAST_POSITION = 'last-position'
+KEY_LICENSE = 'license'
+KEY_LYRICS = 'lyrics'
+KEY_MIME = 'mime'
+KEY_PLAY_COUNT = 'play-count'
+KEY_RATING = 'rating'
+KEY_SITE = 'site'
+KEY_SOURCE = 'source'
+KEY_STUDIO = 'studio'
+KEY_THUMBNAIL = 'thumbnail'
+KEY_TITLE = 'title'
+KEY_URL = 'url'
+KEY_WIDTH = 'width'
+
+REGISTERED_KEYS = [KEY_ALBUM, KEY_ARTIST, KEY_AUTHOR, KEY_BITRATE,
+ KEY_CERTIFICATE, KEY_CHILDCOUNT, KEY_DATE,
+ KEY_DESCRIPTION, KEY_DURATION, KEY_EXTERNAL_PLAYER,
+ KEY_EXTERNAL_URL, KEY_FRAMERATE, KEY_GENRE, KEY_HEIGHT,
+ KEY_ID, KEY_LAST_PLAYED, KEY_LAST_POSITION, KEY_LICENSE,
+ KEY_LYRICS, KEY_MIME, KEY_PLAY_COUNT, KEY_RATING,
+ KEY_SITE, KEY_SOURCE, KEY_STUDIO, KEY_THUMBNAIL,
+ KEY_TITLE, KEY_URL, KEY_WIDTH]
+
+SUPPORTED_OPS = []
+try:
+ from gi.repository import Grl
+ SUPPORTED_OPS = [Grl.SupportedOps.NONE, Grl.SupportedOps.METADATA,
+ Grl.SupportedOps.RESOLVE, Grl.SupportedOps.BROWSE,
+ Grl.SupportedOps.SEARCH, Grl.SupportedOps.QUERY,
+ Grl.SupportedOps.STORE, Grl.SupportedOps.STORE_PARENT,
+ Grl.SupportedOps.REMOVE, Grl.SupportedOps.SET_METADATA]
+except:
+ pass
diff --git a/media-libs/grilo/grilo-0.2.11.ebuild b/media-libs/grilo/grilo-0.2.11.ebuild
new file mode 100644
index 000000000000..5137206f894f
--- /dev/null
+++ b/media-libs/grilo/grilo-0.2.11.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no" # --enable-debug only changes CFLAGS
+GNOME2_LA_PUNT="yes"
+PYTHON_COMPAT=( python2_7 )
+VALA_MIN_API_VERSION="0.12"
+VALA_USE_DEPEND="vapigen"
+
+inherit gnome2 python-any-r1 vala
+
+DESCRIPTION="A framework for easy media discovery and browsing"
+HOMEPAGE="https://wiki.gnome.org/Projects/Grilo"
+
+LICENSE="LGPL-2.1+"
+SLOT="0.2/1" # subslot is libgrilo-0.2 soname suffix
+KEYWORDS="~alpha amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc x86"
+
+IUSE="gtk examples +introspection +network playlist test vala"
+REQUIRED_USE="test? ( introspection )"
+
+RDEPEND="
+ >=dev-libs/glib-2.34:2
+ dev-libs/libxml2:2
+ net-libs/liboauth
+ gtk? ( >=x11-libs/gtk+-3:3 )
+ introspection? ( >=dev-libs/gobject-introspection-0.9 )
+ network? ( >=net-libs/libsoup-2.41.3:2.4 )
+ playlist? ( >=dev-libs/totem-pl-parser-3.4.1 )
+"
+DEPEND="${RDEPEND}
+ >=dev-util/gtk-doc-am-1.10
+ >=dev-util/intltool-0.40
+ virtual/pkgconfig
+ vala? ( $(vala_depend) )
+ test? (
+ $(python_gen_any_dep '
+ dev-python/pygobject:2[${PYTHON_USEDEP}]
+ dev-python/pygobject:3[${PYTHON_USEDEP}]')
+ media-plugins/grilo-plugins:0.2 )
+"
+# eautoreconf requires gnome-common
+
+python_check_deps() {
+ has_version "dev-python/pygobject:2[${PYTHON_USEDEP}]" && \
+ has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+ use test && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ # Don't build examples
+ sed -e '/SUBDIRS/s/examples//' \
+ -i Makefile.am -i Makefile.in || die
+
+ use vala && vala_src_prepare
+ gnome2_src_prepare
+}
+
+src_configure() {
+ # --enable-debug only changes CFLAGS, useless for us
+ gnome2_src_configure \
+ --disable-static \
+ --disable-debug \
+ $(use_enable gtk test-ui) \
+ $(use_enable introspection) \
+ $(use_enable network grl-net) \
+ $(use_enable playlist grl-pls) \
+ $(use_enable test tests) \
+ $(use_enable vala)
+}
+
+src_install() {
+ gnome2_src_install
+ # Upstream made this conditional on gtk-doc build...
+ emake -C doc install DESTDIR="${ED}"
+
+ if use examples; then
+ # Install example code
+ insinto /usr/share/doc/${PF}/examples
+ doins "${S}"/examples/*.c
+ fi
+}
diff --git a/media-libs/grilo/grilo-0.2.12.ebuild b/media-libs/grilo/grilo-0.2.12.ebuild
new file mode 100644
index 000000000000..796c66c18eb5
--- /dev/null
+++ b/media-libs/grilo/grilo-0.2.12.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no" # --enable-debug only changes CFLAGS
+GNOME2_LA_PUNT="yes"
+PYTHON_COMPAT=( python2_7 )
+VALA_MIN_API_VERSION="0.27"
+VALA_USE_DEPEND="vapigen"
+
+inherit gnome2 python-any-r1 vala
+
+DESCRIPTION="A framework for easy media discovery and browsing"
+HOMEPAGE="https://wiki.gnome.org/Projects/Grilo"
+
+LICENSE="LGPL-2.1+"
+SLOT="0.2/1" # subslot is libgrilo-0.2 soname suffix
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+
+IUSE="gtk examples +introspection +network playlist test vala"
+REQUIRED_USE="test? ( introspection )"
+
+RDEPEND="
+ >=dev-libs/glib-2.43.1:2
+ dev-libs/libxml2:2
+ net-libs/liboauth
+ gtk? ( >=x11-libs/gtk+-3:3 )
+ introspection? ( >=dev-libs/gobject-introspection-0.9 )
+ network? ( >=net-libs/libsoup-2.41.3:2.4 )
+ playlist? ( >=dev-libs/totem-pl-parser-3.4.1 )
+"
+DEPEND="${RDEPEND}
+ >=dev-util/gtk-doc-am-1.10
+ >=dev-util/intltool-0.40
+ virtual/pkgconfig
+ vala? ( $(vala_depend) )
+ test? (
+ $(python_gen_any_dep '
+ dev-python/pygobject:2[${PYTHON_USEDEP}]
+ dev-python/pygobject:3[${PYTHON_USEDEP}]')
+ media-plugins/grilo-plugins:0.2 )
+"
+# eautoreconf requires gnome-common
+
+python_check_deps() {
+ has_version "dev-python/pygobject:2[${PYTHON_USEDEP}]" && \
+ has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+ use test && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ # Don't build examples
+ sed -e '/SUBDIRS/s/examples//' \
+ -i Makefile.am -i Makefile.in || die
+
+ use vala && vala_src_prepare
+ gnome2_src_prepare
+}
+
+src_configure() {
+ # --enable-debug only changes CFLAGS, useless for us
+ gnome2_src_configure \
+ --disable-static \
+ --disable-debug \
+ $(use_enable gtk test-ui) \
+ $(use_enable introspection) \
+ $(use_enable network grl-net) \
+ $(use_enable playlist grl-pls) \
+ $(use_enable test tests) \
+ $(use_enable vala)
+}
+
+src_install() {
+ gnome2_src_install
+ # Upstream made this conditional on gtk-doc build...
+ emake -C doc install DESTDIR="${ED}"
+
+ if use examples; then
+ # Install example code
+ insinto /usr/share/doc/${PF}/examples
+ doins "${S}"/examples/*.c
+ fi
+}
diff --git a/media-libs/grilo/metadata.xml b/media-libs/grilo/metadata.xml
new file mode 100644
index 000000000000..08f4481ad1f9
--- /dev/null
+++ b/media-libs/grilo/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>gnome</herd>
+ <use>
+ <flag name='network'>Enable network access for media discovery using
+ <pkg>net-libs/libsoup</pkg></flag>
+ <flag name='playlist'>Enable support for playlists through
+ <pkg>dev-libs/totem-pl-parser</pkg></flag>
+ <flag name='vala'>Generate bindings for <pkg>dev-lang/vala</pkg></flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/gsound/Manifest b/media-libs/gsound/Manifest
new file mode 100644
index 000000000000..4a4f82aa045f
--- /dev/null
+++ b/media-libs/gsound/Manifest
@@ -0,0 +1 @@
+DIST gsound-1.0.1.tar.xz 256804 SHA256 ea0dd94429c0645f2f98824274ef04543fe459dd83a5449a68910acc3ba67f29 SHA512 0c4db73f5e9a620c53598b439cfa001482b86d58bcd77986b43d83bee42a905dadc1b7c44c78dfcd9b5c361b5275508c7320569358423bc7a82ee1a1f2995529 WHIRLPOOL a8355c9fc45b94aa46252f2beabe458d3f0cc6031993f6811d70940ec497dc08b264f021eb083d5ec1b888464abb0b41c517e5af3ef9d7bbbf586e141032c51a
diff --git a/media-libs/gsound/gsound-1.0.1.ebuild b/media-libs/gsound/gsound-1.0.1.ebuild
new file mode 100644
index 000000000000..391f0cc0caec
--- /dev/null
+++ b/media-libs/gsound/gsound-1.0.1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+VALA_USE_DEPEND="vapigen"
+VALA_MIN_API_VERSION="0.20"
+
+inherit gnome2 vala
+
+DESCRIPTION="Thin GObject wrapper around the libcanberra sound event library"
+HOMEPAGE="https://wiki.gnome.org/Projects/GSound"
+
+LICENSE="LGPL-2.1+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+introspection"
+
+# vala setup required for vapigen check
+RDEPEND="
+ >=dev-libs/glib-2.36:2
+ media-libs/libcanberra
+ introspection? ( >=dev-libs/gobject-introspection-1.2.9 )
+"
+DEPEND="${RDEPEND}
+ $(vala_depend)
+ >=dev-util/gtk-doc-am-1.20
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ vala_src_prepare
+ gnome2_src_prepare
+}
+
+src_configure () {
+ gnome2_src_configure \
+ --disable-static \
+ $(use_enable introspection)
+}
diff --git a/media-libs/gsound/metadata.xml b/media-libs/gsound/metadata.xml
new file mode 100644
index 000000000000..6e0e2ecb48ca
--- /dev/null
+++ b/media-libs/gsound/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>gnome</herd>
+</pkgmetadata>
diff --git a/media-libs/gst-plugins-bad/Manifest b/media-libs/gst-plugins-bad/Manifest
new file mode 100644
index 000000000000..07a0b18d41b7
--- /dev/null
+++ b/media-libs/gst-plugins-bad/Manifest
@@ -0,0 +1,4 @@
+DIST gst-plugins-bad-0.10.23-h264-patches.tar.xz 5284 SHA256 40890e4d7792d1b4e18c21204be57d71c34a9add20ef84f8de88c4037ba90858 SHA512 528ed30edb544dd970047fd4b0f05bf75f9f49f07a8118f805430c56c3ec75643013799491aeba70c62cb0343cd3e72758bf5c167d00e90a6a3f13857e4860e1 WHIRLPOOL f48af056d50df855e1281d3c1026c420f1158c3a007416f54bd690ce781089bacf71f0c6a90cece7bb64341c450fb9f6a6bab9a41cf9bd893c96440a0be1c33c
+DIST gst-plugins-bad-0.10.23.tar.xz 3155044 SHA256 03cf0786391c64625569072e904082a08861f05a63d64b2f8e8dad3f26d81bf9 SHA512 6437dd12707ef29651f4014b54612cf2a3a42ed4e05a1c5f4a432d80e27efd2abc0df891ebcfdc9e7b2cf9f71a15b88e48b3aa6db24a178ed6de3b1bdf4c3dc4 WHIRLPOOL dd657100909c32ab75cb8aada8db24d68ddf7a10dc0eb055982d7e4d9ae7a50c364eeac9017cea8b176734fc09cf7f8e4e8f52d24e3173806633ddb8a7acd93c
+DIST gst-plugins-bad-1.2.4.tar.xz 3272824 SHA256 984c133ec9d5d705e313d9e2bbd1472b93c6567460602a9a316578925ffe2eca SHA512 4344dedb899cdc0e3bf36a3b5dd36c6091e2e2f2a7440e3831cebbd9b4463f89cc4bc2d589b0c2c806bcaeb1864a49b3c9e0e3bedc051f1f46e09a8f131f0aa9 WHIRLPOOL 98bce50e7018d7c8d442bf8c7f26f14bd719a8af5af0fde39841c4282a9e4edfeefe06ab10797826cf9b876e173dafcf2e2df86408c373e6c4d8902072cf393c
+DIST gst-plugins-bad-1.4.5.tar.xz 3824936 SHA256 152fad7250683d72f9deb36c5685428338365fe4a4c87ffe15e38783b14f983c SHA512 65d6be58957b1329420611b8e6f1eb9869420745d9165047631cdf9e45083605f37dcfaf68a288fe4252f1b3543f7f70ded9c12eab2e0ac4ac9f4c4ce9eaac7a WHIRLPOOL f5ade3f101ca82b52e7145e5ac16f5c1ab5d042415ee7753586dc6ad0942467c4c5b5b4aa6b0bc44e1ebd9c40de1964df265aa41599cb692fd32aab2b6a7acf7
diff --git a/media-libs/gst-plugins-bad/gst-plugins-bad-0.10.23-r2.ebuild b/media-libs/gst-plugins-bad/gst-plugins-bad-0.10.23-r2.ebuild
new file mode 100644
index 000000000000..86033b7c8966
--- /dev/null
+++ b/media-libs/gst-plugins-bad/gst-plugins-bad-0.10.23-r2.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+GST_ORG_MODULE="gst-plugins-bad"
+inherit eutils flag-o-matic gstreamer
+
+DESCRIPTION="Less plugins for GStreamer"
+HOMEPAGE="http://gstreamer.freedesktop.org/"
+SRC_URI+=" http://dev.gentoo.org/~tetromino/distfiles/${PN}/${P}-h264-patches.tar.xz"
+
+LICENSE="LGPL-2"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="+orc"
+
+RDEPEND="
+ >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}]
+ >=media-libs/gst-plugins-base-0.10.36:${SLOT}[${MULTILIB_USEDEP}]
+ >=media-libs/gstreamer-0.10.36:${SLOT}[${MULTILIB_USEDEP}]
+ orc? ( >=dev-lang/orc-0.4.17[${MULTILIB_USEDEP}] )
+"
+DEPEND="${RDEPEND}"
+RDEPEND="${RDEPEND}
+ !<media-plugins/gst-plugins-farsight-0.12.11:${SLOT}"
+
+src_prepare() {
+ # Patches from 0.10 branch fixing h264 baseline decoding; bug #446384
+ epatch "${WORKDIR}/${P}-h264-patches"/*.patch
+}
+
+src_configure() {
+ strip-flags
+ replace-flags "-O3" "-O2"
+ filter-flags "-fprefetch-loop-arrays" # (Bug #22249)
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ gstreamer_multilib_src_configure \
+ $(use_enable orc) \
+ --disable-examples \
+ --disable-debug \
+ --disable-static
+}
+
+multilib_src_install_all() {
+ DOCS="AUTHORS ChangeLog NEWS README RELEASE"
+ einstalldocs
+ prune_libtool_files --modules
+}
diff --git a/media-libs/gst-plugins-bad/gst-plugins-bad-1.2.4-r1.ebuild b/media-libs/gst-plugins-bad/gst-plugins-bad-1.2.4-r1.ebuild
new file mode 100644
index 000000000000..d2e84b32cc9f
--- /dev/null
+++ b/media-libs/gst-plugins-bad/gst-plugins-bad-1.2.4-r1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+GST_ORG_MODULE="gst-plugins-bad"
+inherit eutils flag-o-matic gstreamer
+
+DESCRIPTION="Less plugins for GStreamer"
+HOMEPAGE="http://gstreamer.freedesktop.org/"
+
+LICENSE="LGPL-2"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="egl +introspection +orc vnc"
+
+# FIXME: we need to depend on mesa to avoid automagic on egl
+# dtmf plugin moved from bad to good in 1.2
+# X11 is automagic for now, upstream #709530
+RDEPEND="
+ >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}]
+ >=media-libs/gst-plugins-base-1.2:${SLOT}[${MULTILIB_USEDEP}]
+ >=media-libs/gstreamer-1.2:${SLOT}[${MULTILIB_USEDEP}]
+ egl? ( >=media-libs/mesa-9.1.6[egl,${MULTILIB_USEDEP}] )
+ introspection? ( >=dev-libs/gobject-introspection-1.31.1 )
+ orc? ( >=dev-lang/orc-0.4.17[${MULTILIB_USEDEP}] )
+
+ !<media-libs/gst-plugins-good-1.1:${SLOT}
+"
+DEPEND="${RDEPEND}
+ >=dev-util/gtk-doc-am-1.12
+"
+
+src_configure() {
+ strip-flags
+ replace-flags "-O3" "-O2"
+ filter-flags "-fprefetch-loop-arrays" # (Bug #22249)
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ gstreamer_multilib_src_configure \
+ $(multilib_native_use_enable introspection) \
+ $(use_enable orc) \
+ $(use_enable vnc librfb) \
+ --disable-examples \
+ --disable-debug \
+ --with-egl-window-system=$(usex egl x11 none)
+}
+
+multilib_src_install_all() {
+ DOCS="AUTHORS ChangeLog NEWS README RELEASE"
+ einstalldocs
+ prune_libtool_files --modules
+}
diff --git a/media-libs/gst-plugins-bad/gst-plugins-bad-1.4.5.ebuild b/media-libs/gst-plugins-bad/gst-plugins-bad-1.4.5.ebuild
new file mode 100644
index 000000000000..e1cc44b84504
--- /dev/null
+++ b/media-libs/gst-plugins-bad/gst-plugins-bad-1.4.5.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GST_ORG_MODULE="gst-plugins-bad"
+
+inherit eutils flag-o-matic gstreamer
+
+DESCRIPTION="Less plugins for GStreamer"
+HOMEPAGE="http://gstreamer.freedesktop.org/"
+
+LICENSE="LGPL-2"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+
+IUSE="X egl gles2 +introspection opengl +orc vnc wayland"
+REQUIRED_USE="
+ egl? ( !gles2 )
+ gles2? ( !egl !opengl )
+ opengl? ( X )
+ wayland? ( egl )
+"
+
+# dtmf plugin moved from bad to good in 1.2
+# X11 is automagic for now, upstream #709530
+RDEPEND="
+ >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}]
+ >=media-libs/gst-plugins-base-1.4:${SLOT}[${MULTILIB_USEDEP}]
+ >=media-libs/gstreamer-1.4:${SLOT}[${MULTILIB_USEDEP}]
+ introspection? ( >=dev-libs/gobject-introspection-1.31.1 )
+
+ egl? ( >=media-libs/mesa-9.1.6[egl,${MULTILIB_USEDEP}] )
+ gles2? ( >=media-libs/mesa-9.1.6[gles2,${MULTILIB_USEDEP}] )
+ opengl? (
+ >=media-libs/mesa-9.1.6[${MULTILIB_USEDEP}]
+ virtual/glu[${MULTILIB_USEDEP}] )
+ X? ( x11-libs/libX11[${MULTILIB_USEDEP}] )
+ wayland? ( dev-libs/wayland[${MULTILIB_USEDEP}] )
+
+ orc? ( >=dev-lang/orc-0.4.17[${MULTILIB_USEDEP}] )
+
+ !<media-libs/gst-plugins-good-1.1:${SLOT}
+"
+DEPEND="${RDEPEND}
+ >=dev-util/gtk-doc-am-1.12
+"
+
+src_configure() {
+ strip-flags
+ replace-flags "-O3" "-O2"
+ filter-flags "-fprefetch-loop-arrays" # (Bug #22249)
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ gstreamer_multilib_src_configure \
+ $(multilib_native_use_enable introspection) \
+ $(use_enable egl) \
+ $(use_enable gles2) \
+ $(use_enable opengl) \
+ $(use_enable opengl glx) \
+ $(use_enable orc) \
+ $(use_enable vnc librfb) \
+ $(use_enable X x11) \
+ $(use_enable wayland) \
+ --disable-examples \
+ --disable-debug \
+ --disable-cocoa \
+ --disable-wgl
+}
+
+multilib_src_install_all() {
+ DOCS="AUTHORS ChangeLog NEWS README RELEASE"
+ einstalldocs
+ prune_libtool_files --modules
+}
diff --git a/media-libs/gst-plugins-bad/metadata.xml b/media-libs/gst-plugins-bad/metadata.xml
new file mode 100644
index 000000000000..730ab73210a7
--- /dev/null
+++ b/media-libs/gst-plugins-bad/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>gstreamer</herd>
+ <use>
+ <flag name="egl">Enable EGL support</flag>
+ <flag name="gles2">Enable GLES2 support</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/gst-plugins-base/Manifest b/media-libs/gst-plugins-base/Manifest
new file mode 100644
index 000000000000..d183ce5f3329
--- /dev/null
+++ b/media-libs/gst-plugins-base/Manifest
@@ -0,0 +1,3 @@
+DIST gst-plugins-base-0.10.36.tar.xz 2364108 SHA256 1fe45c3894903001d4d008b0713dab089f53726dcb5842d5b40c2595a984e64a SHA512 ea77778e073515df58229a641b4363df31f0b80204a5a43a8feb31f0b03a5a4b9b79d6e07e1615c773a59927a9b649f1b1d782def1120d581d09a090be8363b8 WHIRLPOOL e455f2a1aafd60078080735108e4ac336bc4764ed92b9579d83a453f75491331d16b48e5983f3c9712b6edb28ec379e696f06f6910c93168b019d6077c28fb6d
+DIST gst-plugins-base-1.2.4.tar.xz 2538012 SHA256 4d6273dc3f5a94bcc53ccfe0711cfddd49e31371d1136bf62fa1ecc604fc6550 SHA512 8e7e7fd494ee2335e917dae3fef93a2103db37c8cc645ccf1f63b7e6676a6cc6fee78bb90e43f8ccacab367788a416600577cb3d9630e9d64258ecb3dbe63338 WHIRLPOOL 173b2c71b2be05db75ef0d7c344b64ec5d74ba291cc8058546a2963257a1af8e7699737214e11c2d811e6349a008386f822a82f5fe5f5491f5faca64e9d8f20d
+DIST gst-plugins-base-1.4.5.tar.xz 2637680 SHA256 77bd8199e7a312d3d71de9b7ddf761a3b78560a2c2a80829d0815ca39cbd551d SHA512 63d3c531de736ad8a64d6962c0af75857d3b016d7f8e85d1884e8de50e64576902bb1161161b74130ab5dfb1d453eb995e374d8a958eac6e44ae5272eeaaf8b6 WHIRLPOOL cf6ef1c9589ed7a39be74e7663b0821c81b1b4cffdd612ccd7fd5b7929508af21d68817530a4b0fb2517f3a7044ee068afba7602816fdd0ada31444f0bcf8383
diff --git a/media-libs/gst-plugins-base/files/gst-plugins-base-0.10.36-gcc-4.9.patch b/media-libs/gst-plugins-base/files/gst-plugins-base-0.10.36-gcc-4.9.patch
new file mode 100644
index 000000000000..8ee0e7e4acbd
--- /dev/null
+++ b/media-libs/gst-plugins-base/files/gst-plugins-base-0.10.36-gcc-4.9.patch
@@ -0,0 +1,18 @@
+--- 1/gst/audioresample/resample.c
++++ 1/gst/audioresample/resample.c
+@@ -77,13 +77,13 @@
+ #define EXPORT G_GNUC_INTERNAL
+
+ #ifdef _USE_SSE
+-#ifndef HAVE_XMMINTRIN_H
++#if !defined(__SSE__) || !defined(HAVE_XMMINTRIN_H)
+ #undef _USE_SSE
+ #endif
+ #endif
+
+ #ifdef _USE_SSE2
+-#ifndef HAVE_EMMINTRIN_H
++#if !defined(__SSE2__) || !defined(HAVE_EMMINTRIN_H)
+ #undef _USE_SSE2
+ #endif
+ #endif
diff --git a/media-libs/gst-plugins-base/files/gst-plugins-base-0.10.36-resync-ringbuffer.patch b/media-libs/gst-plugins-base/files/gst-plugins-base-0.10.36-resync-ringbuffer.patch
new file mode 100644
index 000000000000..1aae7099659e
--- /dev/null
+++ b/media-libs/gst-plugins-base/files/gst-plugins-base-0.10.36-resync-ringbuffer.patch
@@ -0,0 +1,15 @@
+--- a/gst-libs/gst/audio/gstbaseaudiosink.c
++++ b/gst-libs/gst/audio/gstbaseaudiosink.c
+@@ -921,6 +921,12 @@
+ if (!gst_ring_buffer_acquire (sink->ringbuffer, spec))
+ goto acquire_error;
+
++ /* We need to resync since the ringbuffer restarted */
++ sink->priv->avg_skew = -1;
++ sink->next_sample = -1;
++ sink->priv->eos_time = -1;
++ sink->priv->discont_time = -1;
++
+ if (bsink->pad_mode == GST_ACTIVATE_PUSH) {
+ GST_DEBUG_OBJECT (sink, "activate ringbuffer");
+ gst_ring_buffer_activate (sink->ringbuffer, TRUE); \ No newline at end of file
diff --git a/media-libs/gst-plugins-base/gst-plugins-base-0.10.36-r1.ebuild b/media-libs/gst-plugins-base/gst-plugins-base-0.10.36-r1.ebuild
new file mode 100644
index 000000000000..b85e4c88a375
--- /dev/null
+++ b/media-libs/gst-plugins-base/gst-plugins-base-0.10.36-r1.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+GST_ORG_MODULE="gst-plugins-base"
+inherit eutils gstreamer
+
+DESCRIPTION="Basepack of plugins for gstreamer"
+HOMEPAGE="http://gstreamer.freedesktop.org/"
+
+LICENSE="GPL-2+ LGPL-2+"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="+introspection nls +orc"
+
+RDEPEND=">=media-libs/gstreamer-${PV}:0.10[introspection?,${MULTILIB_USEDEP}]
+ >=dev-libs/libxml2-2.9.1-r4:2[${MULTILIB_USEDEP}]
+ >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+ app-text/iso-codes
+ introspection? ( >=dev-libs/gobject-introspection-0.9.12 )
+ orc? ( >=dev-lang/orc-0.4.17[${MULTILIB_USEDEP}] )
+"
+DEPEND="${RDEPEND}
+ >=dev-util/gtk-doc-am-1.3
+"
+RDEPEND="${RDEPEND}
+ !<media-libs/gst-plugins-bad-0.10.10:0.10
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-medialibs-20140508-r5
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ )
+"
+
+src_prepare() {
+ # The AC_PATH_XTRA macro unnecessarily pulls in libSM and libICE even
+ # though they are not actually used. This needs to be fixed upstream by
+ # replacing AC_PATH_XTRA with PKG_CONFIG calls.
+ sed -i -e 's:X_PRE_LIBS -lSM -lICE:X_PRE_LIBS:' "${S}"/configure || die
+
+ # Fix compilation with gcc-4.9, bug #529962
+ epatch "${FILESDIR}"/${PN}-0.10.36-gcc-4.9.patch
+}
+
+multilib_src_configure() {
+ gstreamer_multilib_src_configure \
+ $(multilib_native_use_enable introspection) \
+ $(use_enable nls) \
+ $(use_enable orc) \
+ --disable-examples \
+ --disable-debug \
+ --disable-static
+
+ # bug #366931, flag-o-matic for the whole thing is overkill
+ if [[ ${CHOST} == *86-*-darwin* ]] ; then
+ sed -i \
+ -e '/FLAGS = /s|-O[23]|-O1|g' \
+ gst/audioconvert/Makefile \
+ gst/volume/Makefile || die
+ fi
+
+ if multilib_is_native_abi; then
+ local x
+ for x in libs plugins; do
+ ln -s "${S}"/docs/${x}/html docs/${x}/html || die
+ done
+ fi
+}
+
+multilib_src_install_all() {
+ DOCS="AUTHORS NEWS README RELEASE"
+ einstalldocs
+ prune_libtool_files --modules
+}
diff --git a/media-libs/gst-plugins-base/gst-plugins-base-0.10.36-r2.ebuild b/media-libs/gst-plugins-base/gst-plugins-base-0.10.36-r2.ebuild
new file mode 100644
index 000000000000..5157ce8f6c22
--- /dev/null
+++ b/media-libs/gst-plugins-base/gst-plugins-base-0.10.36-r2.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+GST_ORG_MODULE="gst-plugins-base"
+inherit eutils gstreamer
+
+DESCRIPTION="Basepack of plugins for gstreamer"
+HOMEPAGE="http://gstreamer.freedesktop.org/"
+
+LICENSE="GPL-2+ LGPL-2+"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="+introspection nls +orc"
+
+RDEPEND=">=media-libs/gstreamer-${PV}:0.10[introspection?,${MULTILIB_USEDEP}]
+ >=dev-libs/libxml2-2.9.1-r4:2[${MULTILIB_USEDEP}]
+ >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+ app-text/iso-codes
+ introspection? ( >=dev-libs/gobject-introspection-0.9.12 )
+ orc? ( >=dev-lang/orc-0.4.17[${MULTILIB_USEDEP}] )
+"
+DEPEND="${RDEPEND}
+ >=dev-util/gtk-doc-am-1.3
+"
+RDEPEND="${RDEPEND}
+ !<media-libs/gst-plugins-bad-0.10.10:0.10
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-medialibs-20140508-r5
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ )
+"
+
+src_prepare() {
+ # The AC_PATH_XTRA macro unnecessarily pulls in libSM and libICE even
+ # though they are not actually used. This needs to be fixed upstream by
+ # replacing AC_PATH_XTRA with PKG_CONFIG calls.
+ sed -i -e 's:X_PRE_LIBS -lSM -lICE:X_PRE_LIBS:' "${S}"/configure || die
+
+ # Fix compilation with gcc-4.9, bug #529962
+ epatch "${FILESDIR}"/${PN}-0.10.36-gcc-4.9.patch
+
+ # baseaudiosink: Resync when ringbuffer resets (from '0.10' branch)
+ epatch "${FILESDIR}"/${PN}-0.10.36-resync-ringbuffer.patch
+}
+
+multilib_src_configure() {
+ gstreamer_multilib_src_configure \
+ $(multilib_native_use_enable introspection) \
+ $(use_enable nls) \
+ $(use_enable orc) \
+ --disable-examples \
+ --disable-debug \
+ --disable-static
+
+ # bug #366931, flag-o-matic for the whole thing is overkill
+ if [[ ${CHOST} == *86-*-darwin* ]] ; then
+ sed -i \
+ -e '/FLAGS = /s|-O[23]|-O1|g' \
+ gst/audioconvert/Makefile \
+ gst/volume/Makefile || die
+ fi
+
+ if multilib_is_native_abi; then
+ local x
+ for x in libs plugins; do
+ ln -s "${S}"/docs/${x}/html docs/${x}/html || die
+ done
+ fi
+}
+
+multilib_src_install_all() {
+ DOCS="AUTHORS NEWS README RELEASE"
+ einstalldocs
+ prune_libtool_files --modules
+}
diff --git a/media-libs/gst-plugins-base/gst-plugins-base-1.2.4-r1.ebuild b/media-libs/gst-plugins-base/gst-plugins-base-1.2.4-r1.ebuild
new file mode 100644
index 000000000000..dece56ec52c2
--- /dev/null
+++ b/media-libs/gst-plugins-base/gst-plugins-base-1.2.4-r1.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+GST_ORG_MODULE="gst-plugins-base"
+inherit eutils gstreamer
+
+DESCRIPTION="Basepack of plugins for gstreamer"
+HOMEPAGE="http://gstreamer.freedesktop.org/"
+
+LICENSE="GPL-2+ LGPL-2+"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="alsa +introspection ivorbis +ogg +orc +pango theora +vorbis X"
+REQUIRED_USE="
+ ivorbis? ( ogg )
+ theora? ( ogg )
+ vorbis? ( ogg )
+"
+
+RDEPEND="
+ app-text/iso-codes
+ >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}]
+ >=media-libs/gstreamer-1.2.3:1.0[introspection?,${MULTILIB_USEDEP}]
+ >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+ alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
+ introspection? ( >=dev-libs/gobject-introspection-1.31.1 )
+ ivorbis? ( >=media-libs/tremor-0_pre20130223[${MULTILIB_USEDEP}] )
+ ogg? ( >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}] )
+ orc? ( >=dev-lang/orc-0.4.18[${MULTILIB_USEDEP}] )
+ pango? ( >=x11-libs/pango-1.36.3[${MULTILIB_USEDEP}] )
+ theora? ( >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}] )
+ vorbis? ( >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}] )
+ X? (
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXv-1.0.10[${MULTILIB_USEDEP}] )
+"
+DEPEND="${RDEPEND}
+ >=dev-util/gtk-doc-am-1.12
+ X? (
+ >=x11-proto/videoproto-2.3.1-r1[${MULTILIB_USEDEP}]
+ >=x11-proto/xextproto-7.2.1-r1[${MULTILIB_USEDEP}]
+ >=x11-proto/xproto-7.0.24[${MULTILIB_USEDEP}] )
+"
+
+src_prepare() {
+ # The AC_PATH_XTRA macro unnecessarily pulls in libSM and libICE even
+ # though they are not actually used. This needs to be fixed upstream by
+ # replacing AC_PATH_XTRA with PKG_CONFIG calls, upstream bug #731047
+ sed -i -e 's:X_PRE_LIBS -lSM -lICE:X_PRE_LIBS:' "${S}"/configure || die
+
+ # Fix compilation with gcc-4.9, bug #529962
+ epatch "${FILESDIR}"/${PN}-0.10.36-gcc-4.9.patch
+}
+
+multilib_src_configure() {
+ gstreamer_multilib_src_configure \
+ $(use_enable alsa) \
+ $(multilib_native_use_enable introspection) \
+ $(use_enable ivorbis) \
+ $(use_enable ogg) \
+ $(use_enable orc) \
+ $(use_enable pango) \
+ $(use_enable theora) \
+ $(use_enable vorbis) \
+ $(use_enable X x) \
+ $(use_enable X xshm) \
+ $(use_enable X xvideo) \
+ --disable-debug \
+ --disable-examples \
+ --disable-freetypetest \
+ --disable-static
+ # cdparanoia and libvisual are split out, per leio's request
+
+ # bug #366931, flag-o-matic for the whole thing is overkill
+ if [[ ${CHOST} == *86-*-darwin* ]] ; then
+ sed -i \
+ -e '/FLAGS = /s|-O[23]|-O1|g' \
+ gst/audioconvert/Makefile \
+ gst/volume/Makefile || die
+ fi
+
+ if multilib_is_native_abi; then
+ local x
+ for x in libs plugins; do
+ ln -s "${S}"/docs/${x}/html docs/${x}/html || die
+ done
+ fi
+}
+
+multilib_src_install_all() {
+ DOCS="AUTHORS NEWS README RELEASE"
+ einstalldocs
+ prune_libtool_files --modules
+}
diff --git a/media-libs/gst-plugins-base/gst-plugins-base-1.4.5.ebuild b/media-libs/gst-plugins-base/gst-plugins-base-1.4.5.ebuild
new file mode 100644
index 000000000000..e63e6a1605f2
--- /dev/null
+++ b/media-libs/gst-plugins-base/gst-plugins-base-1.4.5.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+GST_ORG_MODULE="gst-plugins-base"
+inherit gstreamer
+
+DESCRIPTION="Basepack of plugins for gstreamer"
+HOMEPAGE="http://gstreamer.freedesktop.org/"
+
+LICENSE="GPL-2+ LGPL-2+"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="alsa +introspection ivorbis +ogg +orc +pango theora +vorbis X"
+REQUIRED_USE="
+ ivorbis? ( ogg )
+ theora? ( ogg )
+ vorbis? ( ogg )
+"
+
+RDEPEND="
+ app-text/iso-codes
+ >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}]
+ >=media-libs/gstreamer-${PV}:1.0[introspection?,${MULTILIB_USEDEP}]
+ >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+ alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
+ introspection? ( >=dev-libs/gobject-introspection-1.31.1 )
+ ivorbis? ( >=media-libs/tremor-0_pre20130223[${MULTILIB_USEDEP}] )
+ ogg? ( >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}] )
+ orc? ( >=dev-lang/orc-0.4.18[${MULTILIB_USEDEP}] )
+ pango? ( >=x11-libs/pango-1.36.3[${MULTILIB_USEDEP}] )
+ theora? ( >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}] )
+ vorbis? ( >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}] )
+ X? (
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXv-1.0.10[${MULTILIB_USEDEP}] )
+"
+DEPEND="${RDEPEND}
+ >=dev-util/gtk-doc-am-1.12
+ X? (
+ >=x11-proto/videoproto-2.3.1-r1[${MULTILIB_USEDEP}]
+ >=x11-proto/xextproto-7.2.1-r1[${MULTILIB_USEDEP}]
+ >=x11-proto/xproto-7.0.24[${MULTILIB_USEDEP}] )
+"
+
+src_prepare() {
+ # The AC_PATH_XTRA macro unnecessarily pulls in libSM and libICE even
+ # though they are not actually used. This needs to be fixed upstream by
+ # replacing AC_PATH_XTRA with PKG_CONFIG calls, upstream bug #731047
+ sed -i -e 's:X_PRE_LIBS -lSM -lICE:X_PRE_LIBS:' "${S}"/configure || die
+}
+
+multilib_src_configure() {
+ gstreamer_multilib_src_configure \
+ $(use_enable alsa) \
+ $(multilib_native_use_enable introspection) \
+ $(use_enable ivorbis) \
+ $(use_enable ogg) \
+ $(use_enable orc) \
+ $(use_enable pango) \
+ $(use_enable theora) \
+ $(use_enable vorbis) \
+ $(use_enable X x) \
+ $(use_enable X xshm) \
+ $(use_enable X xvideo) \
+ --disable-debug \
+ --disable-examples \
+ --disable-freetypetest \
+ --disable-static
+ # cdparanoia and libvisual are split out, per leio's request
+
+ # bug #366931, flag-o-matic for the whole thing is overkill
+ if [[ ${CHOST} == *86-*-darwin* ]] ; then
+ sed -i \
+ -e '/FLAGS = /s|-O[23]|-O1|g' \
+ gst/audioconvert/Makefile \
+ gst/volume/Makefile || die
+ fi
+
+ if multilib_is_native_abi; then
+ local x
+ for x in libs plugins; do
+ ln -s "${S}"/docs/${x}/html docs/${x}/html || die
+ done
+ fi
+}
+
+multilib_src_install_all() {
+ DOCS="AUTHORS NEWS README RELEASE"
+ einstalldocs
+ prune_libtool_files --modules
+}
diff --git a/media-libs/gst-plugins-base/metadata.xml b/media-libs/gst-plugins-base/metadata.xml
new file mode 100644
index 000000000000..7b5b837f3466
--- /dev/null
+++ b/media-libs/gst-plugins-base/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>gstreamer</herd>
+ <use>
+ <flag name="pango">Enable pango GStreamer plugin</flag>
+ <flag name="ivorbis">Enable integer based vorbis decoder.</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/gst-plugins-good/Manifest b/media-libs/gst-plugins-good/Manifest
new file mode 100644
index 000000000000..e947067639be
--- /dev/null
+++ b/media-libs/gst-plugins-good/Manifest
@@ -0,0 +1,4 @@
+DIST gst-plugins-good-0.10.31.tar.xz 2738016 SHA256 77a8436a7c0a15f876bad29616835046890df2bcaf72da02151bd91e3d292b64 SHA512 d153dcd5bb846450e9d76fe247f2b2e627e760feaad1bfd4c503a39af2128fad3630788463ea0d50539209236c864df0b2172ab9dac52f49cadff69ac7346809 WHIRLPOOL 952f65219d9e9645c9ab89b071c56d783e2c795fadbf59176e430ba86a5fcaeb6bfc93f0978d424158550a4526145b5567acf2ff1d59e0068241821d332fd3c9
+DIST gst-plugins-good-1.2.3.tar.xz 2878780 SHA256 bfb33536a515bdcc34482f64b8d9cc3e47c753878b254923b419bc2f7485e470 SHA512 74203578c92c6979b76e6070fd976989b7b81d3fec4317037d04391cab8142738d7b443915bced1c77e97137ebd47728ef570a55b758a946fb5bc06b7c67b407 WHIRLPOOL 0b5a66751d6e966f4df7455b9227a8da07716a9111cf74bab75e0f3c0efdc8e1e872bb5b220a5ae1edf870c00f5677451f61fb198c709e51bb3f055ebf27669d
+DIST gst-plugins-good-1.2.4.tar.xz 2882188 SHA256 c9c90368393c2e5e78387e95c02ce7b19f48e793bba6d8547f2c4b51c6f420d3 SHA512 2c057062e10b5ff4cc63d54ffd2a8fb013f264584a175fdadc2fa0b02a7bc390bde0747e7888c6bed45713ce62cd0b6da7d255c99ce5171e9e5c41d6aac90086 WHIRLPOOL 43b4fefa94cfe85e3082fcaaa70fc159381a3d43c43bc15e8bc92b9fe0412bfdba56107c1b2334c632fecdf9b78c8334d962a49efb29a4e82a487a9121bbea33
+DIST gst-plugins-good-1.4.5.tar.xz 3031588 SHA256 79b1b5f3f7bcaa8a615202eb5e176121eeb8336960f70687e536ad78dbc7e641 SHA512 0cf880af21956138e127508f6020fdc10f6ed01b765b0d3364d038c8e104947486c83c157c7b957193b82d59f724e342a6d12900b6a97abe6e2f3dac65d71be0 WHIRLPOOL a56ca2c2f2b73f299cb3c3605eb70ddbd97d9513d26ee11d91608c08589149df97f23490a6513d991c6b552a7b8a71f75463fd6dbf7579943ac859254eb0af3c
diff --git a/media-libs/gst-plugins-good/files/gst-plugins-good-1.4.5-rtp-test-fixes.patch b/media-libs/gst-plugins-good/files/gst-plugins-good-1.4.5-rtp-test-fixes.patch
new file mode 100644
index 000000000000..08f49f396476
--- /dev/null
+++ b/media-libs/gst-plugins-good/files/gst-plugins-good-1.4.5-rtp-test-fixes.patch
@@ -0,0 +1,98 @@
+Upstream commits d416336 and d67da4c
+
+diff --git a/tests/check/elements/rtpaux.c b/tests/check/elements/rtpaux.c
+index 1f410bf..729604a 100644
+--- a/tests/check/elements/rtpaux.c
++++ b/tests/check/elements/rtpaux.c
+@@ -218,8 +218,8 @@ GST_START_TEST (test_simple_rtpbin_aux)
+ rtpbinsend = gst_element_factory_make ("rtpbin", "rtpbinsend");
+ g_object_set (rtpbinsend, "latency", 200, "do-retransmission", TRUE, NULL);
+ src = gst_element_factory_make ("audiotestsrc", "src");
+- encoder = gst_element_factory_make ("speexenc", "encoder");
+- rtppayloader = gst_element_factory_make ("rtpspeexpay", "rtppayloader");
++ encoder = gst_element_factory_make ("alawenc", "encoder");
++ rtppayloader = gst_element_factory_make ("rtppcmapay", "rtppayloader");
+ rtprtxsend = gst_element_factory_make ("rtprtxsend", "rtprtxsend");
+ sendrtp_udpsink = gst_element_factory_make ("udpsink", "sendrtp_udpsink");
+ g_object_set (sendrtp_udpsink, "host", "127.0.0.1", NULL);
+@@ -238,7 +238,7 @@ GST_START_TEST (test_simple_rtpbin_aux)
+ g_object_set (recvrtp_udpsrc, "port", 5006, NULL);
+ rtpcaps =
+ gst_caps_from_string
+- ("application/x-rtp,media=(string)audio,clock-rate=(int)8000,encoding-name=(string)SPEEX,encoding-params=(string)1,octet-align=(string)1");
++ ("application/x-rtp,media=(string)audio,clock-rate=(int)8000,encoding-name=(string)PCMA,payload=(int)8");
+ g_object_set (recvrtp_udpsrc, "caps", rtpcaps, NULL);
+ gst_caps_unref (rtpcaps);
+ recvrtcp_udpsrc = gst_element_factory_make ("udpsrc", "recvrtcp_udpsrc");
+@@ -249,8 +249,8 @@ GST_START_TEST (test_simple_rtpbin_aux)
+ g_object_set (recvrtcp_udpsink, "sync", FALSE, NULL);
+ g_object_set (recvrtcp_udpsink, "async", FALSE, NULL);
+ rtprtxreceive = gst_element_factory_make ("rtprtxreceive", "rtprtxreceive");
+- rtpdepayloader = gst_element_factory_make ("rtpspeexdepay", "rtpdepayloader");
+- decoder = gst_element_factory_make ("speexdec", "decoder");
++ rtpdepayloader = gst_element_factory_make ("rtppcmadepay", "rtpdepayloader");
++ decoder = gst_element_factory_make ("alawdec", "decoder");
+ converter = gst_element_factory_make ("identity", "converter");
+ sink = gst_element_factory_make ("fakesink", "sink");
+ g_object_set (sink, "sync", TRUE, NULL);
+diff --git a/tests/check/elements/rtpcollision.c b/tests/check/elements/rtpcollision.c
+index e9528f9..16f665f 100644
+--- a/tests/check/elements/rtpcollision.c
++++ b/tests/check/elements/rtpcollision.c
+@@ -156,7 +156,7 @@ fake_udp_sink_chain_func (GstPad * pad, GstObject * parent, GstBuffer * buffer)
+ return GST_FLOW_OK;
+ }
+
+-/* This test build the pipeline audiotestsrc ! speexenc ! rtpspeexpay ! \
++/* This test build the pipeline audiotestsrc ! alawenc ! rtppcmapay ! \
+ * rtpsession ! fakesink
+ * It manually pushs buffer into rtpsession with same ssrc but different
+ * ip so that collision can be detected
+@@ -186,9 +186,9 @@ GST_START_TEST (test_master_ssrc_collision)
+
+ src = gst_element_factory_make ("audiotestsrc", "src");
+ g_object_set (src, "num-buffers", 5, NULL);
+- encoder = gst_element_factory_make ("speexenc", NULL);
+- rtppayloader = gst_element_factory_make ("rtpspeexpay", NULL);
+- g_object_set (rtppayloader, "pt", 96, NULL);
++ encoder = gst_element_factory_make ("alawenc", NULL);
++ rtppayloader = gst_element_factory_make ("rtppcmapay", NULL);
++ g_object_set (rtppayloader, "pt", 8, NULL);
+ rtpsession = gst_element_factory_make ("rtpsession", NULL);
+ sink = gst_element_factory_make ("fakesink", "sink");
+ gst_bin_add_many (GST_BIN (bin), src, encoder, rtppayloader,
+@@ -261,7 +261,7 @@ GST_START_TEST (test_master_ssrc_collision)
+ gst_object_unref (bin);
+
+ /* check results */
+- fail_unless_equals_int (nb_ssrc_changes, 7);
++ fail_unless_equals_int (nb_ssrc_changes, 4);
+ }
+
+ GST_END_TEST;
+@@ -325,7 +325,7 @@ rtpsession_sinkpad_probe2 (GstPad * pad, GstPadProbeInfo * info,
+ return ret;
+ }
+
+-/* This test build the pipeline audiotestsrc ! speexenc ! rtpspeexpay ! \
++/* This test build the pipeline audiotestsrc ! alawenc ! rtppcmapay ! \
+ * rtprtxsend ! rtpsession ! fakesink
+ * It manually pushs buffer into rtpsession with same ssrc than rtx stream
+ * but different ip so that collision can be detected
+@@ -355,12 +355,12 @@ GST_START_TEST (test_rtx_ssrc_collision)
+
+ src = gst_element_factory_make ("audiotestsrc", "src");
+ g_object_set (src, "num-buffers", 5, NULL);
+- encoder = gst_element_factory_make ("speexenc", NULL);
+- rtppayloader = gst_element_factory_make ("rtpspeexpay", NULL);
+- g_object_set (rtppayloader, "pt", 96, NULL);
++ encoder = gst_element_factory_make ("alawenc", NULL);
++ rtppayloader = gst_element_factory_make ("rtppcmapay", NULL);
++ g_object_set (rtppayloader, "pt", 8, NULL);
+ rtprtxsend = gst_element_factory_make ("rtprtxsend", NULL);
+ pt_map = gst_structure_new ("application/x-rtp-pt-map",
+- "96", G_TYPE_UINT, 99, NULL);
++ "8", G_TYPE_UINT, 99, NULL);
+ g_object_set (rtprtxsend, "payload-type-map", pt_map, NULL);
+ gst_structure_free (pt_map);
+ rtpsession = gst_element_factory_make ("rtpsession", NULL);
diff --git a/media-libs/gst-plugins-good/gst-plugins-good-0.10.31-r1.ebuild b/media-libs/gst-plugins-good/gst-plugins-good-0.10.31-r1.ebuild
new file mode 100644
index 000000000000..cef13579dab8
--- /dev/null
+++ b/media-libs/gst-plugins-good/gst-plugins-good-0.10.31-r1.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+GST_ORG_MODULE="gst-plugins-good"
+inherit eutils flag-o-matic gstreamer
+
+DESCRIPTION="Basepack of plugins for gstreamer"
+HOMEPAGE="http://gstreamer.freedesktop.org/"
+
+LICENSE="LGPL-2.1+"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="+orc"
+
+RDEPEND="
+ >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}]
+ >=media-libs/gstreamer-0.10.36:${SLOT}[${MULTILIB_USEDEP}]
+ >=media-libs/gst-plugins-base-0.10.36:${SLOT}[${MULTILIB_USEDEP}]
+ >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}]
+ >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+ orc? ( >=dev-lang/orc-0.4.17[${MULTILIB_USEDEP}] )
+"
+DEPEND="${RDEPEND}
+ >=dev-util/gtk-doc-am-1.12
+ !<media-libs/gst-plugins-bad-0.10.22:${SLOT}
+"
+# audioparsers and qtmux moves
+
+src_configure() {
+ # gst doesnt handle optimisations well
+ strip-flags
+ replace-flags "-O3" "-O2"
+ filter-flags "-fprefetch-loop-arrays" # see bug 22249
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ # Always enable optional bz2 support for matroska
+ # Always enable optional zlib support for qtdemux and matroska
+ # Many media files require these to work, as some container headers are often
+ # compressed, bug #291154
+ gstreamer_multilib_src_configure \
+ --enable-bz2 \
+ --enable-zlib \
+ --disable-examples \
+ --with-default-audiosink=autoaudiosink \
+ --with-default-visualizer=goom
+}
+
+multilib_src_install_all() {
+ DOCS="AUTHORS ChangeLog NEWS README RELEASE"
+ einstalldocs
+ prune_libtool_files --modules
+}
diff --git a/media-libs/gst-plugins-good/gst-plugins-good-0.10.31.ebuild b/media-libs/gst-plugins-good/gst-plugins-good-0.10.31.ebuild
new file mode 100644
index 000000000000..c6551f6502bd
--- /dev/null
+++ b/media-libs/gst-plugins-good/gst-plugins-good-0.10.31.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+# order is important, gst-plugins10 after gst-plugins-good
+inherit eutils flag-o-matic gst-plugins-good gst-plugins10
+
+DESCRIPTION="Basepack of plugins for gstreamer"
+HOMEPAGE="http://gstreamer.freedesktop.org/"
+
+LICENSE="LGPL-2.1+"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="+orc"
+
+RDEPEND="
+ >=dev-libs/glib-2.24:2
+ >=media-libs/gstreamer-0.10.36:${SLOT}
+ >=media-libs/gst-plugins-base-0.10.36:${SLOT}
+ app-arch/bzip2
+ sys-libs/zlib
+ orc? ( >=dev-lang/orc-0.4.11 )
+"
+DEPEND="${RDEPEND}
+ >=dev-util/gtk-doc-am-1.12
+ !<media-libs/gst-plugins-bad-0.10.22:${SLOT}
+"
+# audioparsers and qtmux moves
+
+src_configure() {
+ # gst doesnt handle optimisations well
+ strip-flags
+ replace-flags "-O3" "-O2"
+ filter-flags "-fprefetch-loop-arrays" # see bug 22249
+
+ # Always enable optional bz2 support for matroska
+ # Always enable optional zlib support for qtdemux and matroska
+ # Many media files require these to work, as some container headers are often
+ # compressed, bug #291154
+ gst-plugins10_src_configure \
+ --enable-bz2 \
+ --enable-zlib \
+ --disable-examples \
+ --with-default-audiosink=autoaudiosink \
+ --with-default-visualizer=goom
+}
+
+src_compile() {
+ default
+}
+
+src_install() {
+ DOCS="AUTHORS ChangeLog NEWS README RELEASE"
+ default
+ prune_libtool_files --modules
+}
diff --git a/media-libs/gst-plugins-good/gst-plugins-good-1.2.3.ebuild b/media-libs/gst-plugins-good/gst-plugins-good-1.2.3.ebuild
new file mode 100644
index 000000000000..a09eb51fbdb0
--- /dev/null
+++ b/media-libs/gst-plugins-good/gst-plugins-good-1.2.3.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+# order is important, gst-plugins10 after gst-plugins-good
+inherit eutils flag-o-matic gst-plugins-good gst-plugins10
+
+DESCRIPTION="Basepack of plugins for gstreamer"
+HOMEPAGE="http://gstreamer.freedesktop.org/"
+
+LICENSE="LGPL-2.1+"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="+orc"
+
+# dtmf plugin moved from bad to good in 1.2
+RDEPEND="
+ >=dev-libs/glib-2.32:2
+ >=media-libs/gst-plugins-base-1.2.3:${SLOT}
+ >=media-libs/gstreamer-1.2:${SLOT}
+ app-arch/bzip2
+ sys-libs/zlib
+ orc? ( >=dev-lang/orc-0.4.17 )
+
+ !<media-libs/gst-plugins-bad-1.1:${SLOT}
+"
+DEPEND="${RDEPEND}
+ >=dev-util/gtk-doc-am-1.12
+"
+
+src_configure() {
+ # gst doesnt handle optimisations well
+ strip-flags
+ replace-flags "-O3" "-O2"
+ filter-flags "-fprefetch-loop-arrays" # see bug 22249
+
+ # Always enable optional bz2 support for matroska
+ # Always enable optional zlib support for qtdemux and matroska
+ # Many media files require these to work, as some container headers are often
+ # compressed, bug #291154
+ gst-plugins10_src_configure \
+ --enable-bz2 \
+ --enable-zlib \
+ --disable-examples \
+ --with-default-audiosink=autoaudiosink \
+ --with-default-visualizer=goom
+}
+
+src_compile() {
+ default
+}
+
+src_install() {
+ DOCS="AUTHORS ChangeLog NEWS README RELEASE"
+ default
+ prune_libtool_files --modules
+}
diff --git a/media-libs/gst-plugins-good/gst-plugins-good-1.2.4-r1.ebuild b/media-libs/gst-plugins-good/gst-plugins-good-1.2.4-r1.ebuild
new file mode 100644
index 000000000000..43391d3542bf
--- /dev/null
+++ b/media-libs/gst-plugins-good/gst-plugins-good-1.2.4-r1.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+GST_ORG_MODULE="gst-plugins-good"
+inherit eutils flag-o-matic gstreamer
+
+DESCRIPTION="Basepack of plugins for gstreamer"
+HOMEPAGE="http://gstreamer.freedesktop.org/"
+
+LICENSE="LGPL-2.1+"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="+orc"
+
+# dtmf plugin moved from bad to good in 1.2
+RDEPEND="
+ >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}]
+ >=media-libs/gst-plugins-base-1.2.3:${SLOT}[${MULTILIB_USEDEP}]
+ >=media-libs/gstreamer-1.2.4:${SLOT}[${MULTILIB_USEDEP}]
+ >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}]
+ >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+ orc? ( >=dev-lang/orc-0.4.17[${MULTILIB_USEDEP}] )
+
+ !<media-libs/gst-plugins-bad-1.1:${SLOT}
+"
+DEPEND="${RDEPEND}
+ >=dev-util/gtk-doc-am-1.12
+"
+
+src_configure() {
+ # gst doesnt handle optimisations well
+ strip-flags
+ replace-flags "-O3" "-O2"
+ filter-flags "-fprefetch-loop-arrays" # see bug 22249
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ # Always enable optional bz2 support for matroska
+ # Always enable optional zlib support for qtdemux and matroska
+ # Many media files require these to work, as some container headers are often
+ # compressed, bug #291154
+ gstreamer_multilib_src_configure \
+ --enable-bz2 \
+ --enable-zlib \
+ --disable-examples \
+ --with-default-audiosink=autoaudiosink \
+ --with-default-visualizer=goom
+}
+
+multilib_src_install_all() {
+ DOCS="AUTHORS ChangeLog NEWS README RELEASE"
+ einstalldocs
+ prune_libtool_files --modules
+}
diff --git a/media-libs/gst-plugins-good/gst-plugins-good-1.4.5.ebuild b/media-libs/gst-plugins-good/gst-plugins-good-1.4.5.ebuild
new file mode 100644
index 000000000000..a8f5bb93786a
--- /dev/null
+++ b/media-libs/gst-plugins-good/gst-plugins-good-1.4.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"
+
+GST_ORG_MODULE="gst-plugins-good"
+inherit eutils flag-o-matic gstreamer
+
+DESCRIPTION="Basepack of plugins for GStreamer"
+HOMEPAGE="http://gstreamer.freedesktop.org/"
+
+LICENSE="LGPL-2.1+"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="+orc"
+
+# dtmf plugin moved from bad to good in 1.2
+RDEPEND="
+ >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}]
+ >=media-libs/gst-plugins-base-${PV}:${SLOT}[${MULTILIB_USEDEP}]
+ >=media-libs/gstreamer-${PV}:${SLOT}[${MULTILIB_USEDEP}]
+ >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}]
+ >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+ orc? ( >=dev-lang/orc-0.4.17[${MULTILIB_USEDEP}] )
+
+ !<media-libs/gst-plugins-bad-1.1:${SLOT}
+"
+DEPEND="${RDEPEND}
+ >=dev-util/gtk-doc-am-1.12
+ sys-apps/sed
+"
+
+src_prepare() {
+ # video coders subtest uses jpeg and png unconditionally; fixed upstream, check on bump, remove sys-apps/sed bdep
+ sed -e '/tcase_add_test.*test_video_encoders_decoders/d' -i "${S}"/tests/check/pipelines/simple-launch-lines.c || die
+
+ epatch "${FILESDIR}/${P}-rtp-test-fixes.patch"
+}
+
+src_configure() {
+ # gst doesnt handle optimisations well
+ strip-flags
+ replace-flags "-O3" "-O2"
+ filter-flags "-fprefetch-loop-arrays" # see bug 22249
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ # Always enable optional bz2 support for matroska
+ # Always enable optional zlib support for qtdemux and matroska
+ # Many media files require these to work, as some container headers are often
+ # compressed, bug #291154
+ gstreamer_multilib_src_configure \
+ --enable-bz2 \
+ --enable-zlib \
+ --disable-examples \
+ --with-default-audiosink=autoaudiosink \
+ --with-default-visualizer=goom
+}
+
+multilib_src_install_all() {
+ DOCS="AUTHORS ChangeLog NEWS README RELEASE"
+ einstalldocs
+ prune_libtool_files --modules
+}
diff --git a/media-libs/gst-plugins-good/metadata.xml b/media-libs/gst-plugins-good/metadata.xml
new file mode 100644
index 000000000000..d1096fb54bd8
--- /dev/null
+++ b/media-libs/gst-plugins-good/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-libs/gst-plugins-ugly/Manifest b/media-libs/gst-plugins-ugly/Manifest
new file mode 100644
index 000000000000..b14ec571d6ff
--- /dev/null
+++ b/media-libs/gst-plugins-ugly/Manifest
@@ -0,0 +1,3 @@
+DIST gst-plugins-ugly-0.10.19.tar.xz 882452 SHA256 4934f65ff892637e7efaf1cfe635779189dde429d0706f40c86a3aac476ea873 SHA512 16d030998142f698f8ab7dbe55c0c6c8db05ade6b3c007a3aacb5491592e8c60e0a9d62f1a840eab4d57825b1beb9017e3f68f5a90288435216586d67040deda WHIRLPOOL f72f224c5f486982370e9d264ad7c658324783b42e995eef759faf270a18d8f12261d90ac6e70af38579921b0970f7aba50c6d091edcd6dc3dda272bcbef755f
+DIST gst-plugins-ugly-1.2.4.tar.xz 844968 SHA256 4ef6f76a47d57b8385d457c7b620b4c28fc041ab1d7c2e3e2f5f05b12b988ea8 SHA512 91a9d950e73a8d6c8bb4c559ba8f4a4dffc163be714d93c0d0d6421f2c9932a4b1af665f76417e79b50b31c83d8a766df9cf6c337b8371371708efc8683e24e1 WHIRLPOOL c1c3885cf2e041c4427f30ca13cda2948b8a35273d3e6417bfe83566f03230208ce1e019e655ae2c98725e94cce6c7fb37b450307312f682bdbd7c948190e7c0
+DIST gst-plugins-ugly-1.4.5.tar.xz 846828 SHA256 5cd5e81cf618944f4dc935f1669b2125e8bb2fe9cc7dc8dc15b72237aca49067 SHA512 9353a5b9492758d8255fcab23c0eb170ec31e884774c22915b57cc4a2ed56bad61643d7bd44fcdb919e7ad9b2023d1d0fab23f9c9fda1cb2b9883c92ec6b6fc0 WHIRLPOOL b212a4dcba654dac7866ad75551b26818349780b0d7905e63c45b75e21ffbb86ae0f4e9e79ef8bfb317149c2d4f01cbda2c6e2cf2cbcf58991bc09ba9aa85f4e
diff --git a/media-libs/gst-plugins-ugly/gst-plugins-ugly-0.10.19-r1.ebuild b/media-libs/gst-plugins-ugly/gst-plugins-ugly-0.10.19-r1.ebuild
new file mode 100644
index 000000000000..10e781c7485e
--- /dev/null
+++ b/media-libs/gst-plugins-ugly/gst-plugins-ugly-0.10.19-r1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+GST_ORG_MODULE="gst-plugins-ugly"
+inherit eutils flag-o-matic gstreamer
+
+DESCRIPTION="Basepack of plugins for gstreamer"
+HOMEPAGE="http://gstreamer.sourceforge.net"
+
+LICENSE="GPL-2"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="+orc"
+
+RDEPEND="
+ >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}]
+ >=media-libs/gstreamer-0.10.36:${SLOT}[${MULTILIB_USEDEP}]
+ >=media-libs/gst-plugins-base-0.10.36:${SLOT}[${MULTILIB_USEDEP}]
+ orc? ( >=dev-lang/orc-0.4.17[${MULTILIB_USEDEP}] )
+"
+DEPEND="${RDEPEND}
+ >=dev-util/gtk-doc-am-1.3
+"
+RDEPEND="${RDEPEND}
+ !<media-libs/gst-plugins-bad-0.10.13"
+
+src_configure() {
+ # gst doesnt handle optimisations well
+ strip-flags
+ replace-flags "-O3" "-O2"
+ filter-flags "-fprefetch-loop-arrays" # see bug 22249
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_install_all() {
+ DOCS="AUTHORS ChangeLog NEWS README RELEASE"
+ einstalldocs
+ prune_libtool_files --modules
+}
diff --git a/media-libs/gst-plugins-ugly/gst-plugins-ugly-1.2.4-r1.ebuild b/media-libs/gst-plugins-ugly/gst-plugins-ugly-1.2.4-r1.ebuild
new file mode 100644
index 000000000000..8380dc99f2ce
--- /dev/null
+++ b/media-libs/gst-plugins-ugly/gst-plugins-ugly-1.2.4-r1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+GST_ORG_MODULE="gst-plugins-ugly"
+inherit eutils flag-o-matic gstreamer
+
+DESCRIPTION="Basepack of plugins for gstreamer"
+HOMEPAGE="http://gstreamer.sourceforge.net"
+
+LICENSE="GPL-2"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="+orc"
+
+RDEPEND="
+ >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}]
+ >=media-libs/gstreamer-1.2.4:${SLOT}[${MULTILIB_USEDEP}]
+ >=media-libs/gst-plugins-base-1.2:${SLOT}[${MULTILIB_USEDEP}]
+ orc? ( >=dev-lang/orc-0.4.17[${MULTILIB_USEDEP}] )
+"
+DEPEND="${RDEPEND}
+ >=dev-util/gtk-doc-am-1.12
+"
+
+src_configure() {
+ # gst doesnt handle optimisations well
+ strip-flags
+ replace-flags "-O3" "-O2"
+ filter-flags "-fprefetch-loop-arrays" # see bug 22249
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_install_all() {
+ DOCS="AUTHORS ChangeLog NEWS README RELEASE"
+ einstalldocs
+ prune_libtool_files --modules
+}
diff --git a/media-libs/gst-plugins-ugly/gst-plugins-ugly-1.4.5.ebuild b/media-libs/gst-plugins-ugly/gst-plugins-ugly-1.4.5.ebuild
new file mode 100644
index 000000000000..b6a7c26afbcc
--- /dev/null
+++ b/media-libs/gst-plugins-ugly/gst-plugins-ugly-1.4.5.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GST_ORG_MODULE="gst-plugins-ugly"
+
+inherit eutils flag-o-matic gstreamer
+
+DESCRIPTION="Basepack of plugins for gstreamer"
+HOMEPAGE="http://gstreamer.freedesktop.org/"
+
+LICENSE="GPL-2"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="+orc"
+
+RDEPEND="
+ >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}]
+ >=media-libs/gstreamer-1.4.0:${SLOT}[${MULTILIB_USEDEP}]
+ >=media-libs/gst-plugins-base-1.4.0:${SLOT}[${MULTILIB_USEDEP}]
+ orc? ( >=dev-lang/orc-0.4.17[${MULTILIB_USEDEP}] )
+"
+DEPEND="${RDEPEND}
+ >=dev-util/gtk-doc-am-1.12
+"
+
+src_configure() {
+ # gst doesnt handle optimisations well
+ strip-flags
+ replace-flags "-O3" "-O2"
+ filter-flags "-fprefetch-loop-arrays" # see bug 22249
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_install_all() {
+ DOCS="AUTHORS ChangeLog NEWS README RELEASE"
+ einstalldocs
+ prune_libtool_files --modules
+}
diff --git a/media-libs/gst-plugins-ugly/metadata.xml b/media-libs/gst-plugins-ugly/metadata.xml
new file mode 100644
index 000000000000..d1096fb54bd8
--- /dev/null
+++ b/media-libs/gst-plugins-ugly/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-libs/gst-rtsp-server/Manifest b/media-libs/gst-rtsp-server/Manifest
new file mode 100644
index 000000000000..a6bfbca1e916
--- /dev/null
+++ b/media-libs/gst-rtsp-server/Manifest
@@ -0,0 +1,2 @@
+DIST gst-rtsp-0.10.8.tar.bz2 567670 SHA256 9915887cf8515bda87462c69738646afb715b597613edc7340477ccab63a6617 SHA512 c5020cffa9334b7d9c6b9dbe6f32bd4580eeee1c67689269d232e954ef9d96d8b988e3fb19da89701eae26419df0bf6de5796f7780cfbedda4c07154b1c1ebd7 WHIRLPOOL 6bd260edaef5ab003ef7176d84c46d5a94d365af51226108af9ab845d6e5910d90c721d5fd87e7fe93b141a82e5114b4c674a1d2500ef57302bf845c87f5463c
+DIST gst-rtsp-server-1.4.5.tar.xz 530724 SHA256 3089254bd31b7c1f1cf2c034a3b3551f92878f9e3cab65cef3a901a04c0f1d37 SHA512 0f7bbad94416de73abffd76f88fa051b6db4e5250486669b29b101d06a3629ccef886f2048d51d1e3b78c22393eaa86a1f44c696b25ffabc19a1c37c3e442a35 WHIRLPOOL 0a82942e3172a5d6f7699e73c41ab6cfd5c85c52153058fc38673dd347df5f67fa26229273cf29a6ef841c85ddf3ae3f37c0d5db073978c7f9d5546db9b7ce39
diff --git a/media-libs/gst-rtsp-server/gst-rtsp-server-0.10.8-r1.ebuild b/media-libs/gst-rtsp-server/gst-rtsp-server-0.10.8-r1.ebuild
new file mode 100644
index 000000000000..456ce1c21658
--- /dev/null
+++ b/media-libs/gst-rtsp-server/gst-rtsp-server-0.10.8-r1.ebuild
@@ -0,0 +1,101 @@
+# 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 gstreamer python-r1 vala
+
+DESCRIPTION="A GStreamer based RTSP server"
+HOMEPAGE="http://people.freedesktop.org/~wtay/"
+SRC_URI="http://gstreamer.freedesktop.org/src/${PN}/${PN/-server/}-${PV}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0.10"
+KEYWORDS="amd64 x86"
+IUSE="examples +introspection nls python static-libs test vala"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S="${WORKDIR}/${P/-server/}"
+
+# ./configure is broken, so PYGOBJECT_REQ must be defined
+PYGOBJECT_REQ=2.11.2
+
+# FIXME: check should depend on USE=test but check is losy
+# libxml2 required in python binding
+RDEPEND="
+ >=dev-libs/glib-2.10.0:2[${MULTILIB_USEDEP}]
+ dev-libs/libxml2:2[python,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
+ >=dev-python/pygobject-${PYGOBJECT_REQ}:2[${PYTHON_USEDEP}]
+ >=media-libs/gstreamer-0.10.29:0.10[introspection?,${MULTILIB_USEDEP}]
+ >=media-libs/gst-plugins-base-0.10.29:0.10[introspection?,${MULTILIB_USEDEP}]
+
+ introspection? ( >=dev-libs/gobject-introspection-0.6.3 )
+ python? ( dev-python/gst-python:0.10[${PYTHON_USEDEP}] )
+ vala? ( $(vala_depend) )
+"
+DEPEND="${RDEPEND}
+ >=dev-libs/check-0.9.2
+ >=dev-util/gtk-doc-am-1.3
+ virtual/pkgconfig
+ nls? ( >=sys-devel/gettext-0.17 )
+"
+
+# Does not provide any unittest
+RESTRICT="test"
+
+src_prepare() {
+ if ! use test; then
+ # don't waste time building tests
+ sed -e 's/^\(SUBDIRS =.*\)tests\(.*\)$/\1\2/' \
+ -i Makefile.am Makefile.in \
+ || die
+ fi
+
+ # don't waste time building examples
+ sed -e 's/^\(SUBDIRS =.*\)examples\(.*\)$/\1\2/' \
+ -i Makefile.am Makefile.in \
+ || die
+
+ use vala && vala_src_prepare
+}
+
+multilib_src_configure() {
+ if use python ; then
+ python_setup
+ fi
+
+ # debug: only adds -g to CFLAGS
+ # docbook: nothing behing that switch
+ gstreamer_multilib_src_configure \
+ --disable-docbook \
+ --disable-gtk-doc \
+ $(multilib_native_use_enable introspection) \
+ $(use_enable nls) \
+ $(use_enable static-libs static) \
+ $(use_enable vala) \
+ PYTHON=$(multilib_native_usex python "${PYTHON}" false) \
+ PYGOBJECT_REQ=${PYGOBJECT_REQ}
+
+ # work-around gtk-doc out-of-source brokedness
+ if multilib_is_native_abi ; then
+ ln -s "${S}"/docs/libs/${d}/html docs/libs/${d}/html || die
+ fi
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}"
+ # Handle broken upstream modifications to defaults of gtk-doc
+ emake install -C docs/libs DESTDIR="${D}"
+ prune_libtool_files
+}
+
+multilib_src_install_all() {
+ einstalldocs
+
+ if use examples ; then
+ insinto /usr/share/doc/${PF}/examples
+ doins "${S}"/examples/*.c
+ fi
+}
diff --git a/media-libs/gst-rtsp-server/gst-rtsp-server-1.4.5.ebuild b/media-libs/gst-rtsp-server/gst-rtsp-server-1.4.5.ebuild
new file mode 100644
index 000000000000..e5a82326cf24
--- /dev/null
+++ b/media-libs/gst-rtsp-server/gst-rtsp-server-1.4.5.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils gstreamer
+
+DESCRIPTION="A GStreamer based RTSP server"
+HOMEPAGE="http://people.freedesktop.org/~wtay/"
+
+LICENSE="LGPL-2"
+KEYWORDS="amd64 x86"
+IUSE="examples +introspection static-libs test"
+
+# FIXME: check should depend on USE=test but check is losy
+# configure says good and bad are required by macros forces them to be optional
+# they are only used in unittests anyway.
+RDEPEND="
+ >=dev-libs/glib-2.32:2[${MULTILIB_USEDEP}]
+ >=media-libs/gstreamer-1.4:${SLOT}[introspection?,${MULTILIB_USEDEP}]
+ >=media-libs/gst-plugins-base-1.4:${SLOT}[introspection?,${MULTILIB_USEDEP}]
+
+ introspection? ( >=dev-libs/gobject-introspection-1.31.1 )
+"
+DEPEND="${RDEPEND}
+ >=dev-libs/check-0.9.2
+ >=dev-util/gtk-doc-am-1.12
+ virtual/pkgconfig
+ test? (
+ >=media-libs/gst-plugins-bad-1.4:${SLOT}[introspection?,${MULTILIB_USEDEP}]
+ >=media-libs/gst-plugins-good-1.4:${SLOT}[${MULTILIB_USEDEP}]
+ )
+"
+
+# Due to gstreamer src_configure
+QA_CONFIGURE_OPTIONS="--enable-nls"
+
+src_prepare() {
+ # don't waste time building examples
+ sed -e '/SUBDIRS.*=/,/^$/ { s/examples// };' \
+ -i Makefile.am Makefile.in \
+ || die
+}
+
+multilib_src_configure() {
+ # debug: only adds -g to CFLAGS
+ # docbook: nothing behind that switch
+ # libcgroup is automagic and only used in examples
+ gstreamer_multilib_src_configure \
+ --disable-docbook \
+ --disable-gtk-doc \
+ $(multilib_native_use_enable introspection) \
+ $(use_enable static-libs static) \
+ $(use_enable test tests) \
+ LIBCGROUP_LIBS= \
+ LIBCGROUP_FLAGS=
+
+ # work-around gtk-doc out-of-source brokedness
+ if multilib_is_native_abi ; then
+ ln -s "${S}"/docs/libs/${d}/html docs/libs/${d}/html || die
+ fi
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}"
+ # Handle broken upstream modifications to defaults of gtk-doc
+ emake install -C docs/libs DESTDIR="${D}"
+ prune_libtool_files
+}
+
+multilib_src_install_all() {
+ einstalldocs
+
+ if use examples ; then
+ insinto /usr/share/doc/${PF}/examples
+ doins "${S}"/examples/*.c
+ fi
+}
diff --git a/media-libs/gst-rtsp-server/metadata.xml b/media-libs/gst-rtsp-server/metadata.xml
new file mode 100644
index 000000000000..9e260ceca3e3
--- /dev/null
+++ b/media-libs/gst-rtsp-server/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-libs/gstreamer-editing-services/Manifest b/media-libs/gstreamer-editing-services/Manifest
new file mode 100644
index 000000000000..7c27ae0a08c9
--- /dev/null
+++ b/media-libs/gstreamer-editing-services/Manifest
@@ -0,0 +1,2 @@
+DIST gstreamer-editing-services-1.2.1.tar.xz 900316 SHA256 fe768b21af5c644093a06a0e573b6e2fa9b467bec18de408c7ff7171c4fb40b0 SHA512 245d3f8934e36f5c58112a820375c90f775af928f5a32e5f6c5793a6ad0709b1d29f4e60e572778d1b3fca308d5eb7c55f89a04b38de67a0ba254f85d43d42fa WHIRLPOOL d354c6cfb1c8226b6a5f3b7d175187dfa1a099dbe5d292f1d6b691e51638f72534ac1b412e7851b5c05073e731ecefd0dfbc7ee1106459906498d8d6b61b7080
+DIST gstreamer-editing-services-1.4.0.tar.xz 915420 SHA256 cc20b90fb7bcec257b2afda7474664d493b1acece66da675d7df584588808bb3 SHA512 4a3e39089810aa15f2e2e802b1f2a0fcf6f3508a86a5aa8323078334a3f3b427a53e0d3bbb62d42140dc43cbcd9d4985faf0b28edefbcb9814fa76cbb638119b WHIRLPOOL 913149756f5a3dc19e2549014b66484e6390c33d7bfd204899d5d3e9d1f86fe73570ed04548d8ad6700cf9b917344917ae647b0b1d8fb06655dc446e42653e56
diff --git a/media-libs/gstreamer-editing-services/gstreamer-editing-services-1.2.1.ebuild b/media-libs/gstreamer-editing-services/gstreamer-editing-services-1.2.1.ebuild
new file mode 100644
index 000000000000..fb635903c8f2
--- /dev/null
+++ b/media-libs/gstreamer-editing-services/gstreamer-editing-services-1.2.1.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils
+
+DESCRIPTION="SDK for making video editors and more"
+HOMEPAGE="http://wiki.pitivi.org/wiki/GES"
+SRC_URI="http://gstreamer.freedesktop.org/src/${PN}/${P}.tar.xz"
+
+LICENSE="LGPL-2+"
+SLOT="1.0"
+KEYWORDS="~amd64"
+IUSE="+introspection"
+
+# FIXME: There is something odd with pygobject check for >=4.22,
+# check with upstream
+COMMON_DEPEND="
+ >=dev-libs/glib-2.34:2
+ dev-libs/libxml2:2
+ >=media-libs/gstreamer-1.2:1.0[introspection?]
+ >=media-libs/gst-plugins-base-1.2:1.0[introspection?]
+ introspection? ( >=dev-libs/gobject-introspection-0.9.6 )
+"
+RDEPEND="${COMMON_DEPEND}
+ media-libs/gnonlin:1.0
+"
+DEPEND="${COMMON_DEPEND}
+ >=dev-util/gtk-doc-am-1.3
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ # FIXME: disable failing check
+ sed -e 's|\(tcase_add_test (.* test_project_load_xges);\)|/*\1*/|' \
+ -i "${S}"/tests/check/ges/project.c || die
+}
+
+src_configure() {
+ # gtk is only used for examples
+ # GST_INSPECT true due bug #508096
+ econf \
+ GST_INSPECT=$(type -P true) \
+ $(use_enable introspection) \
+ --disable-examples \
+ --disable-gtk-doc \
+ --without-gtk \
+ --with-package-name="GStreamer editing services ebuild for Gentoo" \
+ --with-package-origin="http://packages.gentoo.org/package/media-libs/gstreamer-editing-services"
+}
+
+src_install() {
+ default
+ prune_libtool_files
+}
diff --git a/media-libs/gstreamer-editing-services/gstreamer-editing-services-1.4.0.ebuild b/media-libs/gstreamer-editing-services/gstreamer-editing-services-1.4.0.ebuild
new file mode 100644
index 000000000000..fc81e0e15c96
--- /dev/null
+++ b/media-libs/gstreamer-editing-services/gstreamer-editing-services-1.4.0.ebuild
@@ -0,0 +1,59 @@
+# 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="SDK for making video editors and more"
+HOMEPAGE="http://wiki.pitivi.org/wiki/GES"
+SRC_URI="http://gstreamer.freedesktop.org/src/${PN}/${P}.tar.xz"
+
+LICENSE="LGPL-2+"
+SLOT="1.0"
+KEYWORDS="amd64"
+IUSE="+introspection"
+
+# FIXME: There is something odd with pygobject check for >=4.22,
+# check with upstream
+COMMON_DEPEND="
+ >=dev-libs/glib-2.34:2
+ dev-libs/libxml2:2
+ >=media-libs/gstreamer-1.4:1.0[introspection?]
+ >=media-libs/gst-plugins-base-1.4:1.0[introspection?]
+ introspection? ( >=dev-libs/gobject-introspection-0.9.6 )
+"
+RDEPEND="${COMMON_DEPEND}
+ media-libs/gnonlin:1.0
+"
+DEPEND="${COMMON_DEPEND}
+ >=dev-util/gtk-doc-am-1.3
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ # FIXME: disable failing check
+ sed -e 's|\(tcase_add_test (.* test_project_load_xges);\)|/*\1*/|' \
+ -i "${S}"/tests/check/ges/project.c || die
+ gnome2_src_prepare
+}
+
+src_configure() {
+ # gtk is only used for examples
+ gnome2_src_configure \
+ $(use_enable introspection) \
+ --disable-examples \
+ --without-gtk \
+ --with-package-name="GStreamer editing services ebuild for Gentoo" \
+ --with-package-origin="http://packages.gentoo.org/package/media-libs/gstreamer-editing-services"
+}
+
+src_compile() {
+ # Prevent sandbox violations, bug #538888
+ # https://bugzilla.gnome.org/show_bug.cgi?id=744135
+ # https://bugzilla.gnome.org/show_bug.cgi?id=744134
+ addpredict /dev
+ gnome2_src_compile
+}
diff --git a/media-libs/gstreamer-editing-services/metadata.xml b/media-libs/gstreamer-editing-services/metadata.xml
new file mode 100644
index 000000000000..9e260ceca3e3
--- /dev/null
+++ b/media-libs/gstreamer-editing-services/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-libs/gstreamer/Manifest b/media-libs/gstreamer/Manifest
new file mode 100644
index 000000000000..19eaed0507b8
--- /dev/null
+++ b/media-libs/gstreamer/Manifest
@@ -0,0 +1,3 @@
+DIST gstreamer-0.10.36.tar.xz 3025876 SHA256 9151aa108c177054387885763fa0e433e76780f7c5655c70a5390f2a6c6871da SHA512 7468abb578398681d2adb0e9bbc9ee8ae25aaef72369d45a66ada6c67d1759afdce606cb32e68d9e30ae813196bdfef3d4d33202bc77839cc1fbf5fc436c1bd8 WHIRLPOOL 03b841624552be860d4bf824bde9d6d5d6afc629048244b02037c96370c88191f34a6d09f02af61f295a9d6f84952efec2c5d4b0a28e8e70cd17966ed1b01d93
+DIST gstreamer-1.2.4.tar.xz 3225208 SHA256 1e7ca67a7870a82c9ed51d51d0008cdbc550c41d64cc3ff3f9a1c2fc311b4929 SHA512 e1feaae567e5dba23270b87bc031b9ba061f664b83a3f18064b8abf802ce3ae6855c97df7a9cb8d861c3c6668e671144da859ae9cda663e88720602198f6f8fc WHIRLPOOL 8c8325ee24d2fe6bb218e6d2cc8e3a2870ac47fb2134914205490decf6593c54ca59f92c95a3da0c7f4eb656191ae9b70a40ae02df87ba64a9c39e9e82fd36c0
+DIST gstreamer-1.4.5.tar.xz 3324052 SHA256 40801aa7f979024526258a0e94707ba42b8ab6f7d2206e56adbc4433155cb0ae SHA512 ed7b371f99b7da4ec462e34cd8e02062a0faaad7498a87cfc1ef39f8740db9bca0cc5bfe17ae5ff24abe0bd4a6771e732da193c01ca0e2d835b6c5d9f0d41403 WHIRLPOOL 3065b43a84d8d1d09ec9fb9bda5afc91550cd9f55e2db486c6aceec8fa41dd5ae7d3809c6b6249e86e658c94ffed6ec5a4a7a3cd25b2ab17c24c5a3488355bee
diff --git a/media-libs/gstreamer/files/gstreamer-0.10.36-disable-test_fail_abstract_new.patch b/media-libs/gstreamer/files/gstreamer-0.10.36-disable-test_fail_abstract_new.patch
new file mode 100644
index 000000000000..8162478232ae
--- /dev/null
+++ b/media-libs/gstreamer/files/gstreamer-0.10.36-disable-test_fail_abstract_new.patch
@@ -0,0 +1,35 @@
+From e4707bfb24a8175018975a542f6e1c3b84ac02dd Mon Sep 17 00:00:00 2001
+From: Alexandre Rostovtsev <tetromino@gentoo.org>
+Date: Sun, 21 Oct 2012 00:26:24 -0400
+Subject: [PATCH] test: disable test_fail_abstract_new
+
+Depending on how glib is configured, whether there are systemwide
+debugging tools running, etc., this test can produce other signals, not
+necessarily signal 11.
+---
+ tests/check/gst/gstobject.c | 9 ---------
+ 1 file changed, 9 deletions(-)
+
+diff --git a/tests/check/gst/gstobject.c b/tests/check/gst/gstobject.c
+index d5956db..25995bf 100644
+--- a/tests/check/gst/gstobject.c
++++ b/tests/check/gst/gstobject.c
+@@ -531,15 +531,6 @@ gst_object_suite (void)
+
+ /* FIXME: GLib shouldn't crash here, but issue a warning and return a NULL
+ * object, or at least g_error() and then abort properly ... (tpm) */
+-#ifndef HAVE_OSX
+- /* Disabled for OS/X because a) it's a pretty silly test anyway and
+- * b) different OS/X versions raise different signals and it isn't worth
+- * the effort to try and detect which one should be producing which
+- */
+- /* SEGV tests go last so we can debug the others */
+- if (g_getenv ("CK_FORK") == NULL || strcmp (g_getenv ("CK_FORK"), "no") != 0)
+- tcase_add_test_raise_signal (tc_chain, test_fail_abstract_new, SIGSEGV);
+-#endif
+
+ return s;
+ }
+--
+1.7.12.3
+
diff --git a/media-libs/gstreamer/files/gstreamer-make-grammar.y-work-with-bison-3.patch b/media-libs/gstreamer/files/gstreamer-make-grammar.y-work-with-bison-3.patch
new file mode 100644
index 000000000000..56bd5979c504
--- /dev/null
+++ b/media-libs/gstreamer/files/gstreamer-make-grammar.y-work-with-bison-3.patch
@@ -0,0 +1,33 @@
+From 90622bb35544655cf641e3ab65cf35a6d01869bc Mon Sep 17 00:00:00 2001
+From: Kerrick Staley <kerrick@kerrickstaley.com>
+Date: Tue, 20 Aug 2013 23:59:29 -0700
+Subject: [PATCH] Make grammar.y work with Bison 3
+
+YYLEX_PARAM is no longer supported in Bison 3.
+---
+ gst/parse/grammar.y | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gst/parse/grammar.y b/gst/parse/grammar.y
+index 8a9019c..f533389 100644
+--- a/gst/parse/grammar.y
++++ b/gst/parse/grammar.y
+@@ -26,7 +26,6 @@
+ */
+
+ #define YYERROR_VERBOSE 1
+-#define YYLEX_PARAM scanner
+
+ #define YYENABLE_NLS 0
+
+@@ -659,6 +658,7 @@ static int yyerror (void *scanner, graph_t *graph, const char *s);
+ %right '.'
+ %left '!' '='
+
++%lex-param { void *scanner }
+ %parse-param { void *scanner }
+ %parse-param { graph_t *graph }
+ %pure-parser
+--
+1.8.3.4
+
diff --git a/media-libs/gstreamer/gstreamer-0.10.36-r2.ebuild b/media-libs/gstreamer/gstreamer-0.10.36-r2.ebuild
new file mode 100644
index 000000000000..fcb2c99ccb43
--- /dev/null
+++ b/media-libs/gstreamer/gstreamer-0.10.36-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
+
+inherit eutils multilib multilib-minimal pax-utils
+
+DESCRIPTION="Streaming media framework"
+HOMEPAGE="http://gstreamer.freedesktop.org/"
+SRC_URI="http://${PN}.freedesktop.org/src/${PN}/${P}.tar.xz"
+
+LICENSE="LGPL-2+"
+SLOT="0.10"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="+introspection nls +orc test"
+
+RDEPEND=">=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}]
+ >=dev-libs/libxml2-2.9.1-r4[${MULTILIB_USEDEP}]
+ introspection? ( >=dev-libs/gobject-introspection-0.6.8 )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ >=dev-util/gtk-doc-am-1.3
+ sys-devel/bison
+ sys-devel/flex
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
+ nls? ( sys-devel/gettext )"
+# gtk-doc-am to install API docs
+RDEPEND="${RDEPEND}
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-medialibs-20140508-r5
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ )
+ !<media-libs/gst-plugins-base-0.10.26"
+ # ^^ queue2 move, mustn't have both libgstcoreleements.so and libgstqueue2.so at runtime providing the element at once
+
+src_prepare() {
+ # Disable silly test that's not guaranteed to pass on an arbitrary machine
+ epatch "${FILESDIR}/${PN}-0.10.36-disable-test_fail_abstract_new.patch"
+
+ # Fix compilation with >=sys-devel/bison-3.0 (#478676)
+ epatch "${FILESDIR}/${PN}-make-grammar.y-work-with-bison-3.patch"
+
+ # Disable windows-portability tests that are relevant only on x86 and amd64
+ # and can fail on other arches (bug #455038)
+ if [[ ${ABI} != x86 && ${ABI} != amd64 ]]; then
+ sed -e 's#check:\(.*\)$(CHECK_EXPORTS)#check:\1#' -i Makefile.{am,in} || die
+ fi
+}
+
+src_configure() {
+ if [[ ${CHOST} == *-interix* ]] ; then
+ export ac_cv_lib_dl_dladdr=no
+ export ac_cv_func_poll=no
+ fi
+ if [[ ${CHOST} == powerpc-apple-darwin* ]] ; then
+ # GCC groks this, but then refers to an implementation (___multi3,
+ # ___udivti3) that don't exist (at least I can't find it), so force
+ # this one to be off, such that we use 2x64bit emulation code.
+ export gst_cv_uint128_t=no
+ fi
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ # Set 'libexecdir' to ABI-specific location for the library spawns
+ # helpers from there.
+ # Disable static archives, dependency tracking and examples
+ # to speed up build time
+ # Disable debug, as it only affects -g passing (debugging symbols), this must done through make.conf in gentoo
+ ECONF_SOURCE=${S} \
+ econf \
+ --libexecdir="${EPREFIX}"/usr/$(get_libdir) \
+ --disable-static \
+ $(use_enable nls) \
+ --disable-valgrind \
+ --disable-examples \
+ --disable-debug \
+ --enable-check \
+ $(multilib_native_use_enable introspection) \
+ $(use_enable test tests) \
+ --with-package-name="GStreamer ebuild for Gentoo" \
+ --with-package-origin="http://packages.gentoo.org/package/media-libs/gstreamer"
+
+ if multilib_is_native_abi; then
+ local x
+ for x in gst libs plugins; do
+ ln -s "${S}"/docs/${x}/html docs/${x}/html || die
+ done
+ fi
+}
+
+multilib_src_install() {
+ # can't do "default", we want to install docs in multilib_src_install_all
+ emake DESTDIR="${D}" install
+
+ # Needed for orc-using gst plugins on hardened/PaX systems, bug #421579
+ use orc && pax-mark -m "${ED}usr/$(get_libdir)/gstreamer-${SLOT}/gst-plugin-scanner"
+}
+
+multilib_src_install_all() {
+ DOCS="AUTHORS ChangeLog NEWS MAINTAINERS README RELEASE"
+ einstalldocs
+
+ # Remove unversioned binaries to allow SLOT installations in future
+ cd "${ED%/}"/usr/bin || die
+ local gst_bins
+ for gst_bins in *-${SLOT} ; do
+ [[ -e ${gst_bins} ]] || continue
+ rm ${gst_bins/-${SLOT}/}
+ einfo "Removed ${gst_bins/-${SLOT}/}"
+ done
+
+ # Punt useless .la files
+ prune_libtool_files --modules
+
+ # Needed for orc-using gst plugins on hardened/PaX systems, bug #421579
+ use orc && pax-mark -m "${ED}usr/bin/gst-launch-${SLOT}"
+}
diff --git a/media-libs/gstreamer/gstreamer-1.2.4-r2.ebuild b/media-libs/gstreamer/gstreamer-1.2.4-r2.ebuild
new file mode 100644
index 000000000000..8ca36e89b612
--- /dev/null
+++ b/media-libs/gstreamer/gstreamer-1.2.4-r2.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils multilib multilib-minimal pax-utils
+
+DESCRIPTION="Streaming media framework"
+HOMEPAGE="http://gstreamer.freedesktop.org/"
+SRC_URI="http://${PN}.freedesktop.org/src/${PN}/${P}.tar.xz"
+
+LICENSE="LGPL-2+"
+SLOT="1.0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="+introspection nls +orc test"
+
+RDEPEND="
+ >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}]
+ introspection? ( >=dev-libs/gobject-introspection-1.31.1 )
+"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ >=dev-util/gtk-doc-am-1.12
+ sys-devel/bison
+ sys-devel/flex
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
+ nls? ( sys-devel/gettext )
+"
+# gtk-doc-am to install API docs
+
+src_configure() {
+ if [[ ${CHOST} == *-interix* ]] ; then
+ export ac_cv_lib_dl_dladdr=no
+ export ac_cv_func_poll=no
+ fi
+ if [[ ${CHOST} == powerpc-apple-darwin* ]] ; then
+ # GCC groks this, but then refers to an implementation (___multi3,
+ # ___udivti3) that don't exist (at least I can't find it), so force
+ # this one to be off, such that we use 2x64bit emulation code.
+ export gst_cv_uint128_t=no
+ fi
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ # Set 'libexecdir' to ABI-specific location for the library spawns
+ # helpers from there.
+ # Disable static archives, dependency tracking and examples
+ # to speed up build time
+ # Disable debug, as it only affects -g passing (debugging symbols), this must done through make.conf in gentoo
+ ECONF_SOURCE=${S} \
+ econf \
+ --libexecdir="${EPREFIX}"/usr/$(get_libdir) \
+ --disable-debug \
+ --disable-examples \
+ --disable-static \
+ --disable-valgrind \
+ --enable-check \
+ $(multilib_native_use_enable introspection) \
+ $(use_enable nls) \
+ $(use_enable test tests) \
+ --with-package-name="GStreamer ebuild for Gentoo" \
+ --with-package-origin="http://packages.gentoo.org/package/media-libs/gstreamer"
+
+ if multilib_is_native_abi; then
+ local x
+ for x in gst libs plugins; do
+ ln -s "${S}"/docs/${x}/html docs/${x}/html || die
+ done
+ fi
+}
+
+multilib_src_install() {
+ # can't do "default", we want to install docs in multilib_src_install_all
+ emake DESTDIR="${D}" install
+
+ # Needed for orc-using gst plugins on hardened/PaX systems, bug #421579
+ use orc && pax-mark -m "${ED}usr/$(get_libdir)/gstreamer-${SLOT}/gst-plugin-scanner"
+}
+
+multilib_src_install_all() {
+ DOCS="AUTHORS ChangeLog NEWS MAINTAINERS README RELEASE"
+ einstalldocs
+ prune_libtool_files --modules
+
+ # Needed for orc-using gst plugins on hardened/PaX systems, bug #421579
+ use orc && pax-mark -m "${ED}usr/bin/gst-launch-${SLOT}"
+}
diff --git a/media-libs/gstreamer/gstreamer-1.4.5.ebuild b/media-libs/gstreamer/gstreamer-1.4.5.ebuild
new file mode 100644
index 000000000000..4baf19a26e90
--- /dev/null
+++ b/media-libs/gstreamer/gstreamer-1.4.5.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils multilib multilib-minimal pax-utils
+
+DESCRIPTION="Open source multimedia framework"
+HOMEPAGE="http://gstreamer.freedesktop.org/"
+SRC_URI="http://${PN}.freedesktop.org/src/${PN}/${P}.tar.xz"
+
+LICENSE="LGPL-2+"
+SLOT="1.0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="+introspection nls +orc test"
+
+RDEPEND="
+ >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}]
+ introspection? ( >=dev-libs/gobject-introspection-1.31.1 )
+"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ >=dev-util/gtk-doc-am-1.12
+ sys-devel/bison
+ sys-devel/flex
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
+ nls? ( sys-devel/gettext )
+"
+# gtk-doc-am to install API docs
+
+src_configure() {
+ if [[ ${CHOST} == *-interix* ]] ; then
+ export ac_cv_lib_dl_dladdr=no
+ export ac_cv_func_poll=no
+ fi
+ if [[ ${CHOST} == powerpc-apple-darwin* ]] ; then
+ # GCC groks this, but then refers to an implementation (___multi3,
+ # ___udivti3) that don't exist (at least I can't find it), so force
+ # this one to be off, such that we use 2x64bit emulation code.
+ export gst_cv_uint128_t=no
+ fi
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ # Set 'libexecdir' to ABI-specific location for the library spawns
+ # helpers from there.
+ # Disable static archives, dependency tracking and examples
+ # to speed up build time
+ # Disable debug, as it only affects -g passing (debugging symbols), this must done through make.conf in gentoo
+ ECONF_SOURCE=${S} \
+ econf \
+ --libexecdir="${EPREFIX}"/usr/$(get_libdir) \
+ --disable-debug \
+ --disable-examples \
+ --disable-static \
+ --disable-valgrind \
+ --enable-check \
+ $(multilib_native_use_enable introspection) \
+ $(use_enable nls) \
+ $(use_enable test tests) \
+ --with-package-name="GStreamer ebuild for Gentoo" \
+ --with-package-origin="http://packages.gentoo.org/package/media-libs/gstreamer"
+
+ if multilib_is_native_abi; then
+ local x
+ for x in gst libs plugins; do
+ ln -s "${S}"/docs/${x}/html docs/${x}/html || die
+ done
+ fi
+}
+
+multilib_src_install() {
+ # can't do "default", we want to install docs in multilib_src_install_all
+ emake DESTDIR="${D}" install
+
+ # Needed for orc-using gst plugins on hardened/PaX systems, bug #421579
+ use orc && pax-mark -m "${ED}usr/$(get_libdir)/gstreamer-${SLOT}/gst-plugin-scanner"
+}
+
+multilib_src_install_all() {
+ DOCS="AUTHORS ChangeLog NEWS MAINTAINERS README RELEASE"
+ einstalldocs
+ prune_libtool_files --modules
+
+ # Needed for orc-using gst plugins on hardened/PaX systems, bug #421579
+ use orc && pax-mark -m "${ED}usr/bin/gst-launch-${SLOT}"
+}
diff --git a/media-libs/gstreamer/metadata.xml b/media-libs/gstreamer/metadata.xml
new file mode 100644
index 000000000000..5ed0f2f88bb5
--- /dev/null
+++ b/media-libs/gstreamer/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>gstreamer</herd>
+ <use>
+ <flag name="orc">Disable some PaX memory protections to allow plugins
+ that use <pkg>dev-lang/orc</pkg> for runtime optimization to be
+ used on hardened PaX systems</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/guilib/Manifest b/media-libs/guilib/Manifest
new file mode 100644
index 000000000000..fce2db9ed8d9
--- /dev/null
+++ b/media-libs/guilib/Manifest
@@ -0,0 +1 @@
+DIST GUIlib-1.2.1.tar.gz 345042 SHA256 3b383e537238048f4712395a38b9e3c65475d1dc93413e557f1b0a39c88f68df
diff --git a/media-libs/guilib/files/guilib-1.1.0-gcc-4.1.x-fix.diff b/media-libs/guilib/files/guilib-1.1.0-gcc-4.1.x-fix.diff
new file mode 100644
index 000000000000..450a4401b24d
--- /dev/null
+++ b/media-libs/guilib/files/guilib-1.1.0-gcc-4.1.x-fix.diff
@@ -0,0 +1,20 @@
+will fix some compile Problems on gcc-4.1
+
+Joerg Bornkessel <hd_brummy@gentoo.org> 29 Sep 2006
+
+diff -Naur GUIlib-1.1.0.orig/GUI_menu.h GUIlib-1.1.0/GUI_menu.h
+--- GUIlib-1.1.0.orig/GUI_menu.h 2006-09-29 19:38:54.767324511 +0200
++++ GUIlib-1.1.0/GUI_menu.h 2006-09-29 19:40:13.464242760 +0200
+@@ -39,9 +39,9 @@
+ virtual void AddSubitem(GUI_Menuitem *newitem);
+ virtual GUI_Menuitem* GetSubItem(int Aid);
+
+- GUI_status GUI_Submenu:: MouseDown(int x, int y, int button);
+- GUI_status GUI_Submenu::MouseUp(int x,int y,int button);
+- GUI_status GUI_Submenu::MouseMotion(int x,int y,Uint8 state);
++ GUI_status MouseDown(int x, int y, int button);
++ GUI_status MouseUp(int x,int y,int button);
++ GUI_status MouseMotion(int x,int y,Uint8 state);
+
+ inline virtual int GetSubmenuId()
+ {return submenuid;}
diff --git a/media-libs/guilib/files/guilib-1.1.0.makefile.patch b/media-libs/guilib/files/guilib-1.1.0.makefile.patch
new file mode 100644
index 000000000000..bd7209eea44a
--- /dev/null
+++ b/media-libs/guilib/files/guilib-1.1.0.makefile.patch
@@ -0,0 +1,36 @@
+*** Makefile.in.good Sun Nov 10 17:26:31 2002
+--- Makefile.in Sun Nov 10 17:26:44 2002
+***************
+*** 271,277 ****
+
+ hello_C: $(hello_C_OBJECTS) $(hello_C_DEPENDENCIES)
+ @rm -f hello_C
+! $(LINK) $(hello_C_LDFLAGS) $(hello_C_OBJECTS) $(hello_C_LDADD) $(LIBS)
+
+ keyboard: $(keyboard_OBJECTS) $(keyboard_DEPENDENCIES)
+ @rm -f keyboard
+--- 271,277 ----
+
+ hello_C: $(hello_C_OBJECTS) $(hello_C_DEPENDENCIES)
+ @rm -f hello_C
+! $(CXXLINK) $(hello_C_LDFLAGS) $(hello_C_OBJECTS) $(hello_C_LDADD) $(LIBS)
+
+ keyboard: $(keyboard_OBJECTS) $(keyboard_DEPENDENCIES)
+ @rm -f keyboard
+***************
+*** 279,285 ****
+
+ okay: $(okay_OBJECTS) $(okay_DEPENDENCIES)
+ @rm -f okay
+! $(LINK) $(okay_LDFLAGS) $(okay_OBJECTS) $(okay_LDADD) $(LIBS)
+ .cpp.o:
+ $(CXXCOMPILE) -c $<
+ .cpp.lo:
+--- 279,285 ----
+
+ okay: $(okay_OBJECTS) $(okay_DEPENDENCIES)
+ @rm -f okay
+! $(CXXLINK) $(okay_LDFLAGS) $(okay_OBJECTS) $(okay_LDADD) $(LIBS)
+ .cpp.o:
+ $(CXXCOMPILE) -c $<
+ .cpp.lo:
diff --git a/media-libs/guilib/guilib-1.2.1.ebuild b/media-libs/guilib/guilib-1.2.1.ebuild
new file mode 100644
index 000000000000..a9fb0a66885f
--- /dev/null
+++ b/media-libs/guilib/guilib-1.2.1.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 autotools
+
+MY_P=GUIlib-${PV}
+
+DESCRIPTION="a simple widget set for SDL"
+SRC_URI="http://www.libsdl.org/projects/GUIlib/src/${MY_P}.tar.gz"
+HOMEPAGE="http://www.libsdl.org/projects/GUIlib/"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="amd64 ~hppa ppc x86"
+IUSE="static-libs"
+
+RDEPEND=">=media-libs/libsdl-1.0.1"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ sed -i -e '/^noinst_PROGRAMS/,$d' Makefile.am
+
+ rm -f *.m4
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+
+ use static-libs || find "${ED}" -name '*.la' -exec rm {} +
+}
diff --git a/media-libs/guilib/metadata.xml b/media-libs/guilib/metadata.xml
new file mode 100644
index 000000000000..c572c7d9b478
--- /dev/null
+++ b/media-libs/guilib/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-libs/gupnp-dlna/Manifest b/media-libs/gupnp-dlna/Manifest
new file mode 100644
index 000000000000..eed1a0145bd7
--- /dev/null
+++ b/media-libs/gupnp-dlna/Manifest
@@ -0,0 +1,2 @@
+DIST gupnp-dlna-0.10.2.tar.xz 314088 SHA256 158a22dc9c11645817596322e2516701f0d49e40f1892ddc8832afd26221c5c3 SHA512 b4a889e77022339a25ba532c3160e590c080a732de9fd6961d4109ab310937dec531b9a92ba6d6a7918f3b96bf70b85e068cda116d33c58bc55f015809889402 WHIRLPOOL 67d6c135429c0b30c4464907025065c3666fb7433538e13117cc5b83e42ebc04f227b4e692a5a334c3cd47e2c2d8ac4ea89791a05e72d81af835c4d47af49a51
+DIST gupnp-dlna-0.10.3.tar.xz 328376 SHA256 dcbe5f5f721c76781f3d3bb1bfcdf9818df0905203d4e5759aecb9cb127872d5 SHA512 751969c117a21534a8137e3b89268518ee93a086e70a3d985656a14719c19abdae5c604195bbe68c114725be8ef3f56960b6288f82be59cb13b2e2ff27809f35 WHIRLPOOL b1f8680086564d661de5ff24ede40b635cc4e68597316a5c1ff1b55aa7082d9c7cd73d3e771ad0fa9540f666d36cdebc6a1df010544cf581470b92d727452069
diff --git a/media-libs/gupnp-dlna/gupnp-dlna-0.10.2.ebuild b/media-libs/gupnp-dlna/gupnp-dlna-0.10.2.ebuild
new file mode 100644
index 000000000000..5debb4e844c9
--- /dev/null
+++ b/media-libs/gupnp-dlna/gupnp-dlna-0.10.2.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+GNOME2_LA_PUNT="yes"
+VALA_MIN_API_VERSION="0.18"
+VALA_USE_DEPEND="vapigen"
+
+inherit gnome2 vala
+
+DESCRIPTION="Library providing DLNA-related functionality for MediaServers"
+HOMEPAGE="http://gupnp.org/"
+
+LICENSE="LGPL-2"
+SLOT="2.0"
+KEYWORDS="~alpha amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc x86"
+IUSE="+introspection"
+
+RDEPEND="
+ >=dev-libs/glib-2.34:2
+ >=dev-libs/libxml2-2.5:2
+ media-libs/gstreamer:1.0
+ media-libs/gst-plugins-base:1.0[introspection?]
+ introspection? ( >=dev-libs/gobject-introspection-0.6.4 )
+"
+DEPEND="${RDEPEND}
+ >=dev-util/gtk-doc-am-1.11
+ virtual/pkgconfig
+ introspection? ( $(vala_depend) )
+"
+
+src_prepare() {
+ # Make doc parallel installable
+ cd "${S}"/doc/gupnp-dlna
+ sed -e "s/\(DOC_MODULE.*=\).*/\1${PN}-${SLOT}/" \
+ -e "s/\(DOC_MAIN_SGML_FILE.*=\).*/\1${PN}-docs-${SLOT}.sgml/" \
+ -i Makefile.am Makefile.in || die
+ sed -e "s/\(<book.*name=\"\)${PN}/\1${PN}-${SLOT}/" \
+ -i html/${PN}.devhelp2 || die
+ mv ${PN}-docs{,-${SLOT}}.sgml || die
+ mv ${PN}-overrides{,-${SLOT}}.txt || die
+ mv ${PN}-sections{,-${SLOT}}.txt || die
+ mv ${PN}{,-${SLOT}}.types || die
+ mv html/${PN}{,-${SLOT}}.devhelp2
+
+ cd "${S}"
+
+ use introspection && vala_src_prepare
+ gnome2_src_prepare
+}
+
+src_configure() {
+ gnome2_src_configure \
+ --disable-static \
+ $(use_enable introspection)
+}
+
+src_install() {
+ # Parallel install fails, upstream bug #720053
+ MAKEOPTS="${MAKEOPTS} -j1" gnome2_src_install
+}
diff --git a/media-libs/gupnp-dlna/gupnp-dlna-0.10.3.ebuild b/media-libs/gupnp-dlna/gupnp-dlna-0.10.3.ebuild
new file mode 100644
index 000000000000..d0d48960e042
--- /dev/null
+++ b/media-libs/gupnp-dlna/gupnp-dlna-0.10.3.ebuild
@@ -0,0 +1,62 @@
+# 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"
+VALA_USE_DEPEND="vapigen"
+
+inherit gnome2 vala
+
+DESCRIPTION="Library providing DLNA-related functionality for MediaServers"
+HOMEPAGE="http://gupnp.org/"
+
+LICENSE="LGPL-2"
+SLOT="2.0"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="+introspection"
+
+RDEPEND="
+ >=dev-libs/glib-2.34:2
+ >=dev-libs/libxml2-2.5:2
+ media-libs/gstreamer:1.0
+ media-libs/gst-plugins-base:1.0[introspection?]
+ introspection? ( >=dev-libs/gobject-introspection-0.6.4:= )
+"
+DEPEND="${RDEPEND}
+ >=dev-util/gtk-doc-am-1.11
+ virtual/pkgconfig
+ introspection? ( $(vala_depend) )
+"
+
+src_prepare() {
+ # Make doc parallel installable
+ cd "${S}"/doc/gupnp-dlna
+ sed -e "s/\(DOC_MODULE.*=\).*/\1${PN}-${SLOT}/" \
+ -e "s/\(DOC_MAIN_SGML_FILE.*=\).*/\1${PN}-docs-${SLOT}.sgml/" \
+ -i Makefile.am Makefile.in || die
+ sed -e "s/\(<book.*name=\"\)${PN}/\1${PN}-${SLOT}/" \
+ -i html/${PN}.devhelp2 || die
+ mv ${PN}-docs{,-${SLOT}}.sgml || die
+ mv ${PN}-overrides{,-${SLOT}}.txt || die
+ mv ${PN}-sections{,-${SLOT}}.txt || die
+ mv ${PN}{,-${SLOT}}.types || die
+ mv html/${PN}{,-${SLOT}}.devhelp2
+
+ cd "${S}"
+
+ use introspection && vala_src_prepare
+ gnome2_src_prepare
+}
+
+src_configure() {
+ gnome2_src_configure \
+ --disable-static \
+ $(use_enable introspection)
+}
+
+src_install() {
+ # Parallel install fails, upstream bug #720053
+ MAKEOPTS="${MAKEOPTS} -j1" gnome2_src_install
+}
diff --git a/media-libs/gupnp-dlna/metadata.xml b/media-libs/gupnp-dlna/metadata.xml
new file mode 100644
index 000000000000..da6fd63d0085
--- /dev/null
+++ b/media-libs/gupnp-dlna/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>gnome</herd>
+</pkgmetadata>
diff --git a/media-libs/hal-flash/Manifest b/media-libs/hal-flash/Manifest
new file mode 100644
index 000000000000..270ad299f726
--- /dev/null
+++ b/media-libs/hal-flash/Manifest
@@ -0,0 +1 @@
+DIST libhal1-flash_0.2.0rc1.tar.gz 21363 SHA256 1ceb6d887b7bdd7e52c0296f3b4029d5237b87bdf02ac2bf53ddb5a4341800c7 SHA512 26731ef4c13176222c54bf39dd21704891ce75b0467559cecbe6c81ae2ac3c937b6f8d84b7df388bd4e7a43b94837d6b05391b5eab3893762faeb9875e53a2ff WHIRLPOOL f9f2562424acec685a903294b42eb1609026fc39d78fc742d20b076d53190aed1a8042394231828189f3c34075353f0141f7089c859e863bd22ceb4956fc8060
diff --git a/media-libs/hal-flash/hal-flash-0.2.0_rc1.ebuild b/media-libs/hal-flash/hal-flash-0.2.0_rc1.ebuild
new file mode 100644
index 000000000000..2e3eef356876
--- /dev/null
+++ b/media-libs/hal-flash/hal-flash-0.2.0_rc1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+MY_P=${PN/hal/libhal1}_${PV/_}
+
+DESCRIPTION="A libhal stub library forwarding to UDisks for www-plugins/adobe-flash to play DRM content"
+HOMEPAGE="http://github.com/cshorler/hal-flash http://build.opensuse.org/package/show/devel:openSUSE:Factory/hal-flash"
+SRC_URI="http://build.opensuse.org/package/rawsourcefile/devel:openSUSE:Factory/${PN}/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+COMMON_DEPEND="sys-apps/dbus
+ !sys-apps/hal"
+RDEPEND="${COMMON_DEPEND}
+ sys-fs/udisks:0"
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig"
+
+DOCS="README"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() { eautoreconf; }
+
+src_install() {
+ default
+ prune_libtool_files
+}
diff --git a/media-libs/hal-flash/metadata.xml b/media-libs/hal-flash/metadata.xml
new file mode 100644
index 000000000000..51217b9ddfee
--- /dev/null
+++ b/media-libs/hal-flash/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>ssuominen@gentoo.org</email>
+ <name>Samuli Suominen</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">cshorler/hal-flash</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/hamlib/Manifest b/media-libs/hamlib/Manifest
new file mode 100644
index 000000000000..17378b86778f
--- /dev/null
+++ b/media-libs/hamlib/Manifest
@@ -0,0 +1 @@
+DIST hamlib-1.2.15.3.tar.gz 1675879 SHA256 a2ca4549e4fd99d6e5600e354ebcb57502611aa63c6921c1b8a825289833f75e SHA512 88f9cb8d82d813ac02944def0adf6eada0e4ed1407f60e344d51172462d51ab0c3ddd9cbf9ef8cbd61efba6c4158a77acb7c23b886e174c9a082bf1dd11f5baa WHIRLPOOL 33f8e114d05c778e30c1b634e2494cd3f9d89213ccc58b34b4d195bb4f1c803c5451f54c8e232bf276a1daebe6c0a01bae73a51fa90538fe537d3b5bf4ce91de
diff --git a/media-libs/hamlib/files/hamlib-1.2.11-bindings.diff b/media-libs/hamlib/files/hamlib-1.2.11-bindings.diff
new file mode 100644
index 000000000000..bf92076c7f82
--- /dev/null
+++ b/media-libs/hamlib/files/hamlib-1.2.11-bindings.diff
@@ -0,0 +1,28 @@
+Index: bindings/Makefile.am
+# fix tcl install path
+===================================================================
+--- bindings/Makefile.am (revision 2854)
++++ bindings/Makefile.am (working copy)
+@@ -62,7 +62,7 @@
+
+ tcl_ltlib = hamlibtcl.la
+
+-tcldir = $(prefix)/lib/tcl
++tcldir = @tclpackagedir@/hamlib
+
+ PKG_VER=1.0
+ DLL=hamlibtcl-$(PKG_VER)@TCL_SHLIB_SUFFIX@
+Index: configure.ac
+# add macro to determine path to tcl packages
+===================================================================
+--- configure.ac (revision 2854)
++++ configure.ac (working copy)
+@@ -316,6 +316,8 @@
+ AC_SUBST(TCL_LIB_SPEC)
+ AC_SUBST(TCL_INCLUDE_SPEC)
+ AC_SUBST(TCL_SHLIB_SUFFIX)
++tclpackagedir=`echo $TCL_PACKAGE_PATH | cut -d ' ' -f 1 | sed "s,$TCL_PREFIX,\\${prefix},"`
++AC_SUBST(tclpackagedir)
+
+ # TODO: require "${ac_cv_header_sys_socket_h}" = "no"
+
diff --git a/media-libs/hamlib/files/hamlib-1.2.15.3-configure.diff b/media-libs/hamlib/files/hamlib-1.2.15.3-configure.diff
new file mode 100644
index 000000000000..51a8e85f91d1
--- /dev/null
+++ b/media-libs/hamlib/files/hamlib-1.2.15.3-configure.diff
@@ -0,0 +1,12 @@
+# Use CXXFLAGS to built c++ components
+--- configure.ac.old 2013-01-22 09:20:31.000000000 +0100
++++ configure.ac 2013-01-22 09:20:43.000000000 +0100
+@@ -87,7 +87,7 @@
+ ACX_PTHREAD
+ if test x"$acx_pthread_ok" = xyes; then
+ CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS}"
+- CXXFLAGS="${CFLAGS} ${PTHREAD_CFLAGS}"
++ CXXFLAGS="${CXXFLAGS} ${PTHREAD_CFLAGS}"
+ fi
+
+ AC_SYS_POSIX_TERMIOS()
diff --git a/media-libs/hamlib/hamlib-1.2.15.3-r1.ebuild b/media-libs/hamlib/hamlib-1.2.15.3-r1.ebuild
new file mode 100644
index 000000000000..4ddcd82dbbf7
--- /dev/null
+++ b/media-libs/hamlib/hamlib-1.2.15.3-r1.ebuild
@@ -0,0 +1,87 @@
+# 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-utils eutils multilib python-single-r1
+
+DESCRIPTION="Ham radio backend rig control libraries"
+HOMEPAGE="http://sourceforge.net/apps/mediawiki/hamlib"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2 GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86 ~x86-fbsd"
+IUSE="doc python tcl"
+
+RESTRICT="test"
+
+RDEPEND="
+ =virtual/libusb-0*
+ dev-libs/libxml2
+ python? ( ${PYTHON_DEPS} )
+ tcl? ( dev-lang/tcl:0= )"
+
+DEPEND=" ${RDEPEND}
+ virtual/pkgconfig
+ dev-lang/swig
+ >=sys-devel/libtool-2.2
+ doc? ( app-doc/doxygen )"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DOCS=(AUTHORS NEWS PLAN README README.betatester README.developer TODO)
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # fix hardcoded libdir paths
+ sed -i -e "s#fix}/lib#fix}/$(get_libdir)/hamlib#" \
+ -e "s#fix}/include#fix}/include/hamlib#" \
+ hamlib.pc.in || die "sed failed"
+
+ # make building of documentation compatible with autotools-utils
+ sed -i -e "s/doc:/html:/g" doc/Makefile.am || die "sed failed"
+
+ # fix tcl lib path
+ epatch "${FILESDIR}"/${PN}-1.2.11-bindings.diff
+
+ # use CXXFLAGS for building c++ components (bug #453240)
+ epatch "${FILESDIR}"/${P}-configure.diff
+
+ eautoreconf
+}
+
+src_configure() {
+ local myeconfargs=(
+ --libdir=/usr/$(get_libdir)/hamlib
+ --disable-static
+ --with-rpc-backends
+ --without-perl-binding
+ $(use_with python python-binding)
+ $(use_enable tcl tcl-binding)
+ --disable-silent-rules
+ )
+ autotools-utils_src_configure
+}
+
+src_compile() {
+ autotools-utils_src_compile
+ use doc && autotools-utils_src_compile html
+}
+
+src_install() {
+ use doc && HTML_DOCS=("${AUTOTOOLS_BUILD_DIR}/doc/html/")
+ autotools-utils_src_install
+
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins "${AUTOTOOLS_BUILD_DIR}"/hamlib.pc || die "doins failed"
+
+ echo "LDPATH=/usr/$(get_libdir)/hamlib" > "${T}"/73hamlib
+ doenvd "${T}"/73hamlib || die "doenvd failed"
+}
diff --git a/media-libs/hamlib/metadata.xml b/media-libs/hamlib/metadata.xml
new file mode 100644
index 000000000000..631e17e43106
--- /dev/null
+++ b/media-libs/hamlib/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>tomjbe@gentoo.org</email>
+ <name>Thomas Beierlein</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">hamlib</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/harfbuzz/Manifest b/media-libs/harfbuzz/Manifest
new file mode 100644
index 000000000000..5abce9b43558
--- /dev/null
+++ b/media-libs/harfbuzz/Manifest
@@ -0,0 +1,3 @@
+DIST harfbuzz-0.9.38.tar.bz2 1177106 SHA256 6736f383b4edfcaaeb6f3292302ca382d617d8c79948bb2dd2e8f86cdccfd514 SHA512 7638853a33bafa139d3a87b2733e89d19239c2ef13afcd1bb0dac3a0f95f786caaaf327560c1714d502ee0adcc2bb068ee6095e81b501a66f8c7559394f1458e WHIRLPOOL 79278d7db00a401af036f35bb90d7dd058b99bc13095f5ba4dac97e68372b51b8192dc0538667ff67b13e39c97318df8351c9c5f5482cc1af7c3bc6764cd534e
+DIST harfbuzz-0.9.40.tar.bz2 1182989 SHA256 1771d53583be6d91ca961854b2a24fb239ef0545eed221ae3349abae0ab8321f SHA512 9dcc8f5790b78efa14d328e48c68d97f44fce8658fdad9f6d46a79feb715a57903064087d2aef6cea84904936c27c623583b4c67d0e21511a4b82a9213d86eff WHIRLPOOL 4b450d4a1a02bb846de582f84a63483182d3b2f071e54abd2a58b2b9d88c25eb7b880a961584ad087bee8c1eae2789446a9da29634f22467f00d72e7b90eb0d2
+DIST harfbuzz-0.9.41.tar.bz2 1188176 SHA256 d81aa53d0c02b437beeaac159d7fc16394d676bbce0860fb6f6a10b587dc057c SHA512 821b2fbd0d668c90e9e0040f60b7cfd8d35954d218045cebfb5e9c6ba29aba4230d0cd8e951697c26afcc4da447177fe967fa323449499fa710b52dd7e1a7011 WHIRLPOOL 84ba899d8fbc27b19d255d3c40e2d1f92c8c0dcc0a764b5c83c8c470af4902891f954d11aa64b6eb69aac0e8cf55c36ee9babff0a9260fc9f6286ce48330accb
diff --git a/media-libs/harfbuzz/harfbuzz-0.9.38.ebuild b/media-libs/harfbuzz/harfbuzz-0.9.38.ebuild
new file mode 100644
index 000000000000..2cae8120bcca
--- /dev/null
+++ b/media-libs/harfbuzz/harfbuzz-0.9.38.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI="git://anongit.freedesktop.org/harfbuzz"
+[[ ${PV} == 9999 ]] && inherit git-r3 autotools
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils libtool multilib-minimal python-any-r1
+
+DESCRIPTION="An OpenType text shaping engine"
+HOMEPAGE="http://www.freedesktop.org/wiki/Software/HarfBuzz"
+[[ ${PV} == 9999 ]] || SRC_URI="http://www.freedesktop.org/software/${PN}/release/${P}.tar.bz2"
+
+LICENSE="Old-MIT ISC icu"
+SLOT="0/0.9.18" # 0.9.18 introduced the harfbuzz-icu split; bug #472416
+[[ ${PV} == 9999 ]] || \
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris"
+IUSE="+cairo +glib +graphite icu +introspection static-libs test +truetype"
+REQUIRED_USE="introspection? ( glib )"
+
+RDEPEND="
+ cairo? ( x11-libs/cairo:= )
+ glib? ( >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}] )
+ graphite? ( >=media-gfx/graphite2-1.2.1:=[${MULTILIB_USEDEP}] )
+ icu? ( >=dev-libs/icu-51.2-r1:=[${MULTILIB_USEDEP}] )
+ introspection? ( >=dev-libs/gobject-introspection-1.34 )
+ truetype? ( >=media-libs/freetype-2.5.0.1:2=[${MULTILIB_USEDEP}] )
+"
+DEPEND="${RDEPEND}
+ dev-util/gtk-doc-am
+ virtual/pkgconfig
+ test? ( ${PYTHON_DEPS} )
+"
+# eautoreconf requires gobject-introspection-common
+# ragel needed if regenerating *.hh files from *.rl
+[[ ${PV} = 9999 ]] && DEPEND="${DEPEND}
+ >=dev-libs/gobject-introspection-common-1.34
+ dev-util/ragel
+"
+
+pkg_setup() {
+ use test && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ if [[ ${CHOST} == *-darwin* || ${CHOST} == *-solaris* ]] ; then
+ # on Darwin/Solaris we need to link with g++, like automake defaults
+ # to, but overridden by upstream because on Linux this is not
+ # necessary, bug #449126
+ sed -i \
+ -e 's/\<LINK\>/CXXLINK/' \
+ src/Makefile.am || die
+ sed -i \
+ -e '/libharfbuzz_la_LINK = /s/\<LINK\>/CXXLINK/' \
+ src/Makefile.in || die
+ sed -i \
+ -e '/AM_V_CCLD/s/\<LINK\>/CXXLINK/' \
+ test/api/Makefile.in || die
+ fi
+
+ [[ ${PV} == 9999 ]] && eautoreconf
+ elibtoolize # for Solaris
+
+ # failing test, https://bugs.freedesktop.org/show_bug.cgi?id=89190
+ sed -e 's#tests/arabic-fallback-shaping.tests##' -i test/shaping/Makefile.in || die "sed failed"
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" \
+ # harfbuzz-gobject only used for instrospection, bug #535852
+ econf \
+ --without-coretext \
+ --without-uniscribe \
+ $(use_enable static-libs static) \
+ $(multilib_native_use_with cairo) \
+ $(use_with glib) \
+ $(use_with introspection gobject) \
+ $(use_with graphite graphite2) \
+ $(use_with icu) \
+ $(multilib_native_use_enable introspection) \
+ $(use_with truetype freetype)
+
+ if multilib_is_native_abi; then
+ ln -s "${S}"/docs/reference/html docs/reference/html || die
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ prune_libtool_files --modules
+}
diff --git a/media-libs/harfbuzz/harfbuzz-0.9.40.ebuild b/media-libs/harfbuzz/harfbuzz-0.9.40.ebuild
new file mode 100644
index 000000000000..7b0789786d53
--- /dev/null
+++ b/media-libs/harfbuzz/harfbuzz-0.9.40.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI="git://anongit.freedesktop.org/harfbuzz"
+[[ ${PV} == 9999 ]] && inherit git-r3 autotools
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils libtool multilib-minimal python-any-r1
+
+DESCRIPTION="An OpenType text shaping engine"
+HOMEPAGE="http://www.freedesktop.org/wiki/Software/HarfBuzz"
+[[ ${PV} == 9999 ]] || SRC_URI="http://www.freedesktop.org/software/${PN}/release/${P}.tar.bz2"
+
+LICENSE="Old-MIT ISC icu"
+SLOT="0/0.9.18" # 0.9.18 introduced the harfbuzz-icu split; bug #472416
+[[ ${PV} == 9999 ]] || \
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris"
+IUSE="+cairo +glib +graphite icu +introspection static-libs test +truetype"
+REQUIRED_USE="introspection? ( glib )"
+
+RDEPEND="
+ cairo? ( x11-libs/cairo:= )
+ glib? ( >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}] )
+ graphite? ( >=media-gfx/graphite2-1.2.1:=[${MULTILIB_USEDEP}] )
+ icu? ( >=dev-libs/icu-51.2-r1:=[${MULTILIB_USEDEP}] )
+ introspection? ( >=dev-libs/gobject-introspection-1.34 )
+ truetype? ( >=media-libs/freetype-2.5.0.1:2=[${MULTILIB_USEDEP}] )
+"
+DEPEND="${RDEPEND}
+ dev-util/gtk-doc-am
+ virtual/pkgconfig
+ test? ( ${PYTHON_DEPS} )
+"
+# eautoreconf requires gobject-introspection-common
+# ragel needed if regenerating *.hh files from *.rl
+[[ ${PV} = 9999 ]] && DEPEND="${DEPEND}
+ >=dev-libs/gobject-introspection-common-1.34
+ dev-util/ragel
+"
+
+pkg_setup() {
+ use test && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ if [[ ${CHOST} == *-darwin* || ${CHOST} == *-solaris* ]] ; then
+ # on Darwin/Solaris we need to link with g++, like automake defaults
+ # to, but overridden by upstream because on Linux this is not
+ # necessary, bug #449126
+ sed -i \
+ -e 's/\<LINK\>/CXXLINK/' \
+ src/Makefile.am || die
+ sed -i \
+ -e '/libharfbuzz_la_LINK = /s/\<LINK\>/CXXLINK/' \
+ src/Makefile.in || die
+ sed -i \
+ -e '/AM_V_CCLD/s/\<LINK\>/CXXLINK/' \
+ test/api/Makefile.in || die
+ fi
+
+ [[ ${PV} == 9999 ]] && eautoreconf
+ elibtoolize # for Solaris
+
+ # failing test, https://bugs.freedesktop.org/show_bug.cgi?id=89190
+ sed -e 's#tests/arabic-fallback-shaping.tests##' -i test/shaping/Makefile.in || die "sed failed"
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" \
+ # harfbuzz-gobject only used for instrospection, bug #535852
+ econf \
+ --without-coretext \
+ --without-uniscribe \
+ $(use_enable static-libs static) \
+ $(multilib_native_use_with cairo) \
+ $(use_with glib) \
+ $(use_with introspection gobject) \
+ $(use_with graphite graphite2) \
+ $(use_with icu) \
+ $(multilib_native_use_enable introspection) \
+ $(use_with truetype freetype)
+
+ if multilib_is_native_abi; then
+ ln -s "${S}"/docs/reference/html docs/reference/html || die
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ prune_libtool_files --modules
+}
diff --git a/media-libs/harfbuzz/harfbuzz-0.9.41.ebuild b/media-libs/harfbuzz/harfbuzz-0.9.41.ebuild
new file mode 100644
index 000000000000..58e018663488
--- /dev/null
+++ b/media-libs/harfbuzz/harfbuzz-0.9.41.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI="git://anongit.freedesktop.org/harfbuzz"
+[[ ${PV} == 9999 ]] && inherit git-r3 autotools
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils libtool multilib-minimal python-any-r1
+
+DESCRIPTION="An OpenType text shaping engine"
+HOMEPAGE="http://www.freedesktop.org/wiki/Software/HarfBuzz"
+[[ ${PV} == 9999 ]] || SRC_URI="http://www.freedesktop.org/software/${PN}/release/${P}.tar.bz2"
+
+LICENSE="Old-MIT ISC icu"
+SLOT="0/0.9.18" # 0.9.18 introduced the harfbuzz-icu split; bug #472416
+[[ ${PV} == 9999 ]] || \
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris"
+
+IUSE="+cairo fontconfig +glib +graphite icu +introspection static-libs test +truetype"
+REQUIRED_USE="introspection? ( glib )"
+
+RDEPEND="
+ cairo? ( x11-libs/cairo:= )
+ fontconfig? ( media-libs/fontconfig:1.0[${MULTILIB_USEDEP}] )
+ glib? ( >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}] )
+ graphite? ( >=media-gfx/graphite2-1.2.1:=[${MULTILIB_USEDEP}] )
+ icu? ( >=dev-libs/icu-51.2-r1:=[${MULTILIB_USEDEP}] )
+ introspection? ( >=dev-libs/gobject-introspection-1.34 )
+ truetype? ( >=media-libs/freetype-2.5.0.1:2=[${MULTILIB_USEDEP}] )
+"
+DEPEND="${RDEPEND}
+ dev-util/gtk-doc-am
+ virtual/pkgconfig
+ test? ( ${PYTHON_DEPS} )
+"
+# eautoreconf requires gobject-introspection-common
+# ragel needed if regenerating *.hh files from *.rl
+[[ ${PV} = 9999 ]] && DEPEND="${DEPEND}
+ >=dev-libs/gobject-introspection-common-1.34
+ dev-util/ragel
+"
+
+pkg_setup() {
+ use test && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ if [[ ${CHOST} == *-darwin* || ${CHOST} == *-solaris* ]] ; then
+ # on Darwin/Solaris we need to link with g++, like automake defaults
+ # to, but overridden by upstream because on Linux this is not
+ # necessary, bug #449126
+ sed -i \
+ -e 's/\<LINK\>/CXXLINK/' \
+ src/Makefile.am || die
+ sed -i \
+ -e '/libharfbuzz_la_LINK = /s/\<LINK\>/CXXLINK/' \
+ src/Makefile.in || die
+ sed -i \
+ -e '/AM_V_CCLD/s/\<LINK\>/CXXLINK/' \
+ test/api/Makefile.in || die
+ fi
+
+ [[ ${PV} == 9999 ]] && eautoreconf
+ elibtoolize # for Solaris
+
+ # failing test, https://bugs.freedesktop.org/show_bug.cgi?id=89190
+ sed -e 's#tests/arabic-fallback-shaping.tests##' -i test/shaping/Makefile.in || die "sed failed"
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" \
+ # harfbuzz-gobject only used for instrospection, bug #535852
+ econf \
+ --without-coretext \
+ --without-uniscribe \
+ $(use_enable static-libs static) \
+ $(multilib_native_use_with cairo) \
+ $(use_with fontconfig) \
+ $(use_with glib) \
+ $(use_with introspection gobject) \
+ $(use_with graphite graphite2) \
+ $(use_with icu) \
+ $(multilib_native_use_enable introspection) \
+ $(use_with truetype freetype)
+
+ if multilib_is_native_abi; then
+ ln -s "${S}"/docs/reference/html docs/reference/html || die
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ prune_libtool_files --modules
+}
diff --git a/media-libs/harfbuzz/harfbuzz-9999.ebuild b/media-libs/harfbuzz/harfbuzz-9999.ebuild
new file mode 100644
index 000000000000..7b0789786d53
--- /dev/null
+++ b/media-libs/harfbuzz/harfbuzz-9999.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI="git://anongit.freedesktop.org/harfbuzz"
+[[ ${PV} == 9999 ]] && inherit git-r3 autotools
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils libtool multilib-minimal python-any-r1
+
+DESCRIPTION="An OpenType text shaping engine"
+HOMEPAGE="http://www.freedesktop.org/wiki/Software/HarfBuzz"
+[[ ${PV} == 9999 ]] || SRC_URI="http://www.freedesktop.org/software/${PN}/release/${P}.tar.bz2"
+
+LICENSE="Old-MIT ISC icu"
+SLOT="0/0.9.18" # 0.9.18 introduced the harfbuzz-icu split; bug #472416
+[[ ${PV} == 9999 ]] || \
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris"
+IUSE="+cairo +glib +graphite icu +introspection static-libs test +truetype"
+REQUIRED_USE="introspection? ( glib )"
+
+RDEPEND="
+ cairo? ( x11-libs/cairo:= )
+ glib? ( >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}] )
+ graphite? ( >=media-gfx/graphite2-1.2.1:=[${MULTILIB_USEDEP}] )
+ icu? ( >=dev-libs/icu-51.2-r1:=[${MULTILIB_USEDEP}] )
+ introspection? ( >=dev-libs/gobject-introspection-1.34 )
+ truetype? ( >=media-libs/freetype-2.5.0.1:2=[${MULTILIB_USEDEP}] )
+"
+DEPEND="${RDEPEND}
+ dev-util/gtk-doc-am
+ virtual/pkgconfig
+ test? ( ${PYTHON_DEPS} )
+"
+# eautoreconf requires gobject-introspection-common
+# ragel needed if regenerating *.hh files from *.rl
+[[ ${PV} = 9999 ]] && DEPEND="${DEPEND}
+ >=dev-libs/gobject-introspection-common-1.34
+ dev-util/ragel
+"
+
+pkg_setup() {
+ use test && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ if [[ ${CHOST} == *-darwin* || ${CHOST} == *-solaris* ]] ; then
+ # on Darwin/Solaris we need to link with g++, like automake defaults
+ # to, but overridden by upstream because on Linux this is not
+ # necessary, bug #449126
+ sed -i \
+ -e 's/\<LINK\>/CXXLINK/' \
+ src/Makefile.am || die
+ sed -i \
+ -e '/libharfbuzz_la_LINK = /s/\<LINK\>/CXXLINK/' \
+ src/Makefile.in || die
+ sed -i \
+ -e '/AM_V_CCLD/s/\<LINK\>/CXXLINK/' \
+ test/api/Makefile.in || die
+ fi
+
+ [[ ${PV} == 9999 ]] && eautoreconf
+ elibtoolize # for Solaris
+
+ # failing test, https://bugs.freedesktop.org/show_bug.cgi?id=89190
+ sed -e 's#tests/arabic-fallback-shaping.tests##' -i test/shaping/Makefile.in || die "sed failed"
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" \
+ # harfbuzz-gobject only used for instrospection, bug #535852
+ econf \
+ --without-coretext \
+ --without-uniscribe \
+ $(use_enable static-libs static) \
+ $(multilib_native_use_with cairo) \
+ $(use_with glib) \
+ $(use_with introspection gobject) \
+ $(use_with graphite graphite2) \
+ $(use_with icu) \
+ $(multilib_native_use_enable introspection) \
+ $(use_with truetype freetype)
+
+ if multilib_is_native_abi; then
+ ln -s "${S}"/docs/reference/html docs/reference/html || die
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ prune_libtool_files --modules
+}
diff --git a/media-libs/harfbuzz/metadata.xml b/media-libs/harfbuzz/metadata.xml
new file mode 100644
index 000000000000..76b20737ffdf
--- /dev/null
+++ b/media-libs/harfbuzz/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>openoffice</herd>
+ <herd>gnome</herd>
+ <use>
+ <flag name="glib">Compile with GLib Unicode support</flag>
+ <flag name="graphite">Use graphite to render complex non-Roman writing systems</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/herqq/Manifest b/media-libs/herqq/Manifest
new file mode 100644
index 000000000000..3ee2dcb205d9
--- /dev/null
+++ b/media-libs/herqq/Manifest
@@ -0,0 +1 @@
+DIST herqq-1.0.0.zip 1070813 SHA256 cbcfc76f72d561d822a7ff5374b97e80d1731b610a5c257edbf5c013bfe6748e SHA512 57cc45aa2a29110723f3e8d96307eb200c5e928bda5832a21f6d40d4e374050984227a9e0ba5b556e49c5fe9680b789d201db54f698a6294d0a32447f8ccae7c WHIRLPOOL 493351e9f1a75adc0dc4ba647609ce788d050adb15b9e573e82369e455b618f497adf00ef553c70f291a8bb90b42382312120e7559a247c52bcf4ba59781452a
diff --git a/media-libs/herqq/herqq-1.0.0-r2.ebuild b/media-libs/herqq/herqq-1.0.0-r2.ebuild
new file mode 100644
index 000000000000..6d0770876f99
--- /dev/null
+++ b/media-libs/herqq/herqq-1.0.0-r2.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit multilib qt4-r2
+
+DESCRIPTION="A software library for building UPnP devices"
+HOMEPAGE="http://www.herqq.org"
+SRC_URI="mirror://sourceforge/hupnp/${P}.zip"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~ppc64 x86"
+IUSE="doc"
+
+# no release of QtSolutions using bundled libQtSolutions_SOAP
+RDEPEND="
+ dev-qt/qtcore:4
+ !media-libs/hupnp-ng
+"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+"
+
+DOCS=( hupnp/ChangeLog )
+
+src_prepare() {
+ # fix the .pro file for multilib issues
+ sed \
+ -e "s:PREFIX/lib:PREFIX/$(get_libdir):" \
+ -i "${S}/hupnp/src.pro" \
+ -i "${S}/hupnp/lib/qtsoap-2.7-opensource/buildlib/buildlib.pro" || die
+ qt4-r2_src_prepare
+}
+
+src_configure() {
+ eqmake4 PREFIX="${EPREFIX}/usr/" CONFIG+=DISABLE_TESTAPP
+}
+
+src_install() {
+ qt4-r2_src_install
+ use doc && dohtml -r hupnp/docs/html/
+}
diff --git a/media-libs/herqq/metadata.xml b/media-libs/herqq/metadata.xml
new file mode 100644
index 000000000000..db06e3ffda3c
--- /dev/null
+++ b/media-libs/herqq/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="sourceforge">hupnp</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/hupnp-ng/hupnp-ng-9999.ebuild b/media-libs/hupnp-ng/hupnp-ng-9999.ebuild
new file mode 100644
index 000000000000..a7b14ac6086b
--- /dev/null
+++ b/media-libs/hupnp-ng/hupnp-ng-9999.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI="https://github.com/0xd34df00d/hupnp-ng.git"
+
+inherit multilib base qt4-r2 git-r3
+
+DESCRIPTION="A software library for building UPnP devices, fork of herqq"
+HOMEPAGE="https://github.com/0xd34df00d/hupnp-ng"
+
+LICENSE="LGPL-3"
+SLOT="0"
+KEYWORDS=""
+
+# no release of QtSolutions using bundled libQtSolutions_SOAP
+RDEPEND="
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ dev-qt/qtxmlpatterns:4
+ !media-libs/herqq
+"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ # fix the .pro file for multilib issues
+ sed \
+ -e "s:PREFIX/lib:PREFIX/$(get_libdir):" \
+ -i "${S}/hupnp/src.pro" \
+ -i "${S}/hupnp_av/hupnp_av.pro" \
+ -i "${S}/hupnp/lib/qtsoap-2.7-opensource/buildlib/buildlib.pro" || die
+
+ qt4-r2_src_prepare
+}
+
+src_configure() {
+ eqmake4 \
+ PREFIX="${EPREFIX}/usr" \
+ "CONFIG += DISABLE_AVTESTAPP" \
+ "CONFIG += DISABLE_TESTAPP" \
+ herqq.pro
+}
diff --git a/media-libs/hupnp-ng/metadata.xml b/media-libs/hupnp-ng/metadata.xml
new file mode 100644
index 000000000000..2db1d62a8043
--- /dev/null
+++ b/media-libs/hupnp-ng/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>leechcraft</herd>
+ <upstream>
+ <remote-id type="github">0xd34df00d/hupnp-ng</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/icc-profiles-basiccolor-printing2009/Manifest b/media-libs/icc-profiles-basiccolor-printing2009/Manifest
new file mode 100644
index 000000000000..80c5308058ce
--- /dev/null
+++ b/media-libs/icc-profiles-basiccolor-printing2009/Manifest
@@ -0,0 +1 @@
+DIST icc-profiles-basiccolor-printing2009-1.2.0.tar.bz2 36625722 SHA256 0d1ab5cb8a72ab76a02c67f07708e94a5794397eeac0acdb7503e2c11b515707
diff --git a/media-libs/icc-profiles-basiccolor-printing2009/icc-profiles-basiccolor-printing2009-1.2.0.ebuild b/media-libs/icc-profiles-basiccolor-printing2009/icc-profiles-basiccolor-printing2009-1.2.0.ebuild
new file mode 100644
index 000000000000..d6802b408e58
--- /dev/null
+++ b/media-libs/icc-profiles-basiccolor-printing2009/icc-profiles-basiccolor-printing2009-1.2.0.ebuild
@@ -0,0 +1,14 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="ICC profiles for printing/offset"
+HOMEPAGE="http://www.freedesktop.org/wiki/OpenIcc/ProfilePackages"
+SRC_URI="mirror://sourceforge/openicc/basICColor-Profiles/${P}.tar.bz2"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
diff --git a/media-libs/icc-profiles-basiccolor-printing2009/metadata.xml b/media-libs/icc-profiles-basiccolor-printing2009/metadata.xml
new file mode 100644
index 000000000000..21a84f6c3161
--- /dev/null
+++ b/media-libs/icc-profiles-basiccolor-printing2009/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>xmw@gentoo.org</email>
+ <name>Michael Weber</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">openicc</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/icc-profiles-openicc/Manifest b/media-libs/icc-profiles-openicc/Manifest
new file mode 100644
index 000000000000..ab007e75fb27
--- /dev/null
+++ b/media-libs/icc-profiles-openicc/Manifest
@@ -0,0 +1,2 @@
+DIST icc-profiles-openicc-1.3.0.tar.bz2 398917 SHA256 f6a52c0a016a01f95a8e9e4d87a55726b10998dc8307547bfef9ddf925f67ddf
+DIST icc-profiles-openicc-1.3.1.tar.bz2 399620 SHA256 a6a8b3b1153faa3a84e71ed81206b19335902fae5f7dee5427a381f4983c217d
diff --git a/media-libs/icc-profiles-openicc/icc-profiles-openicc-1.3.0.ebuild b/media-libs/icc-profiles-openicc/icc-profiles-openicc-1.3.0.ebuild
new file mode 100644
index 000000000000..7d337f55316f
--- /dev/null
+++ b/media-libs/icc-profiles-openicc/icc-profiles-openicc-1.3.0.ebuild
@@ -0,0 +1,14 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="ICC color profiles by OpenICC"
+HOMEPAGE="http://www.freedesktop.org/wiki/OpenIcc/ProfilePackages"
+SRC_URI="mirror://sourceforge/openicc/OpenICC-Profiles/${P}.tar.bz2"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
diff --git a/media-libs/icc-profiles-openicc/icc-profiles-openicc-1.3.1.ebuild b/media-libs/icc-profiles-openicc/icc-profiles-openicc-1.3.1.ebuild
new file mode 100644
index 000000000000..7d337f55316f
--- /dev/null
+++ b/media-libs/icc-profiles-openicc/icc-profiles-openicc-1.3.1.ebuild
@@ -0,0 +1,14 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="ICC color profiles by OpenICC"
+HOMEPAGE="http://www.freedesktop.org/wiki/OpenIcc/ProfilePackages"
+SRC_URI="mirror://sourceforge/openicc/OpenICC-Profiles/${P}.tar.bz2"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
diff --git a/media-libs/icc-profiles-openicc/metadata.xml b/media-libs/icc-profiles-openicc/metadata.xml
new file mode 100644
index 000000000000..21a84f6c3161
--- /dev/null
+++ b/media-libs/icc-profiles-openicc/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>xmw@gentoo.org</email>
+ <name>Michael Weber</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">openicc</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/icclib/Manifest b/media-libs/icclib/Manifest
new file mode 100644
index 000000000000..97385e1b6f0c
--- /dev/null
+++ b/media-libs/icclib/Manifest
@@ -0,0 +1 @@
+DIST icclib_V2.14.zip 158606 SHA256 e07cf9d3d7aec7ed4b1944a890300eba2272f2ce32deb51fb72c36e218f5a0aa SHA512 ed038c8655968c794491f30c295ef115900bfcc2e8bfd8607f12f73d6f2236fc339c1ed53a364524478273097ab9065a372bb26f38231bfc6dc02773a11546a3 WHIRLPOOL 698bb4b139e87f7d6a7ec9e531ee788c0ae3edd9e5ead6d237f49b697a72ea0d4d642a7ca83b7665f901977a2f1d965aa9be96b00a1a0f4bb98e6e613698bfee
diff --git a/media-libs/icclib/files/icclib-2.14-make.patch b/media-libs/icclib/files/icclib-2.14-make.patch
new file mode 100644
index 000000000000..14e69f17f21a
--- /dev/null
+++ b/media-libs/icclib/files/icclib-2.14-make.patch
@@ -0,0 +1,114 @@
+--- icclib_V2.14/Makefile
++++ icclib_V2.14/Makefile
+@@ -3,13 +3,13 @@
+ # by uncommenting the appropriate line:
+
+ # Microsoft C++, WinNT setup
+-include Makefile.WNT
++#include Makefile.WNT
+
+ # IBM C++, WinNT setup
+ #include Makefile.IBMNT
+
+ # Generic UNIX setup
+-#include Makefile.UNIX
++include Makefile.UNIX
+
+ # Apple OSX
+ #include Makefile.OSX
+@@ -32,7 +32,7 @@
+
+
+ icc$(SUFOBJ): icc.c icc.h
+- $(CC) $(CCOF)icc$(SUFOBJ) icc.c
++ $(CC) $(CFLAGS) $(CCOF)icc$(SUFOBJ) icc.c
+
+ libicc$(SUFLIB): icc$(SUFOBJ)
+ $(LIBU) $(LIBOF)libicc$(SUFLIB) icc$(SUFOBJ)
+@@ -41,39 +41,39 @@
+
+ # Separate for executables
+ iccstd$(SUFOBJ): iccstd.c icc.h
+- $(CC) $(CCOF)iccstd$(SUFOBJ) iccstd.c
++ $(CC) $(CFLAGS) $(CCOF)iccstd$(SUFOBJ) iccstd.c
+
+
+ icctest$(SUFOBJ): icctest.c icc.h
+- $(CC) $(CCOF)icctest$(SUFOBJ) icctest.c
++ $(CC) $(CFLAGS) $(CCOF)icctest$(SUFOBJ) icctest.c
+
+ icctest$(SUFEXE): icctest$(SUFOBJ) iccstd$(SUFOBJ) libicc$(SUFLIB)
+ $(LINK) $(LINKOF)icctest$(SUFEXE) icctest$(SUFOBJ) iccstd$(SUFOBJ) libicc$(SUFLIB)
+
+
+ lutest$(SUFOBJ): lutest.c icc.h
+- $(CC) $(CCOF)lutest$(SUFOBJ) lutest.c
++ $(CC) $(CFLAGS) $(CCOF)lutest$(SUFOBJ) lutest.c
+
+ lutest$(SUFEXE): lutest$(SUFOBJ) iccstd$(SUFOBJ) libicc$(SUFLIB)
+ $(LINK) $(LINKOF)lutest$(SUFEXE) lutest$(SUFOBJ) iccstd$(SUFOBJ) libicc$(SUFLIB)
+
+
+ icclu$(SUFOBJ): icclu.c icc.h
+- $(CC) $(CCOF)icclu$(SUFOBJ) icclu.c
++ $(CC) $(CFLAGS) $(CCOF)icclu$(SUFOBJ) icclu.c
+
+ icclu$(SUFEXE): icclu$(SUFOBJ) iccstd$(SUFOBJ) libicc$(SUFLIB)
+ $(LINK) $(LINKOF)icclu$(SUFEXE) icclu$(SUFOBJ) iccstd$(SUFOBJ) libicc$(SUFLIB)
+
+
+ iccdump$(SUFOBJ): iccdump.c icc.h
+- $(CC) $(CCOF)iccdump$(SUFOBJ) iccdump.c
++ $(CC) $(CFLAGS) $(CCOF)iccdump$(SUFOBJ) iccdump.c
+
+ iccdump$(SUFEXE): iccdump$(SUFOBJ) iccstd$(SUFOBJ) libicc$(SUFLIB)
+ $(LINK) $(LINKOF)iccdump$(SUFEXE) iccdump$(SUFOBJ) iccstd$(SUFOBJ) libicc$(SUFLIB)
+
+
+ iccrw$(SUFOBJ): iccrw.c icc.h
+- $(CC) $(CCOF)iccrw$(SUFOBJ) iccrw.c
++ $(CC) $(CFLAGS) $(CCOF)iccrw$(SUFOBJ) iccrw.c
+
+ iccrw$(SUFEXE): iccrw$(SUFOBJ) iccstd$(SUFOBJ) libicc$(SUFLIB)
+ $(LINK) $(LINKOF)iccrw$(SUFEXE) iccrw$(SUFOBJ) iccstd$(SUFOBJ) libicc$(SUFLIB)
+--- icclib_V2.14/Makefile.UNIX
++++ icclib_V2.14/Makefile.UNIX
+@@ -1,7 +1,7 @@
+ # Generic UNIX setup
+
+ SLASH = /
+-SUFLIB = .a
++SUFLIB = .so
+ SUFOBJ = .o
+ SUFEXE =
+ CMDSEP = ;
+@@ -18,21 +18,22 @@
+ STDHDRSDEF = /usr/include
+
+ MAKEU = make
+-LIBU = ar -r
+-LIBOF = -o
++LIBOF =
+ RANLIB = echo
+ AS = as
+-CCFLAGSDEF = -DUNIX -c
+-CC = cc $(CCFLAGS) $(INCFLAG)$(STDHDRS)
++CCFLAGSDEF = -DUNIX -fPIC -c
++CFLAGS += $(CCFLAGSDEF) $(INCFLAG)$(STDHDRS)
++CC = cc
+ CCOF = -o
+-LINKFLAGSDEF = -lm
++LINKFLAGSDEF = -shared
+ LINKLIBS =
+-LINK = cc $(LINKFLAGS) $(LINKLIBS)
++LINK = $(CC) $(LINKFLAGSDEF) $(LDFLAGS) $(LINKLIBS)
+ LINKOF = -o
++LIBU = $(CC) $(LINKFLAGSDEF) $(LDFLAGS) -Wl,-soname,libicc.so.$(ICCLIB_SOVERSION) $(LINKLIBS) -o
+
+ .SUFFIXES:
+ .SUFFIXES: .c $(SUFLIB) $(SUFOBJ) $(SUFEXE)
+
+ .c$(SUFOBJ):
+- $(CC) $(CCOF)$*$(SUFOBJ) $<
++ $(CC) $(CFLAGS) $(CCOF)$*$(SUFOBJ) $<
+
diff --git a/media-libs/icclib/icclib-2.14.ebuild b/media-libs/icclib/icclib-2.14.ebuild
new file mode 100644
index 000000000000..929a62a9e721
--- /dev/null
+++ b/media-libs/icclib/icclib-2.14.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 base multilib toolchain-funcs
+
+MY_P="${PN}_V${PV}"
+DESCRIPTION="Library for reading and writing ICC color profile files"
+HOMEPAGE="http://freecode.com/projects/icclib"
+SRC_URI="http://www.argyllcms.com/${MY_P}.zip"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="app-arch/unzip"
+
+S=${WORKDIR}
+
+ICCLIB_SOVERSION="0"
+
+PATCHES=(
+ "${FILESDIR}/${P}-make.patch"
+)
+
+src_compile() {
+ emake CC="$(tc-getCC)" ICCLIB_SOVERSION=${ICCLIB_SOVERSION}
+}
+
+src_install() {
+ mv libicc.so libicc.so.${ICCLIB_SOVERSION} || die
+ dolib.so libicc.so.${ICCLIB_SOVERSION}
+ dosym libicc.so.${ICCLIB_SOVERSION} /usr/$(get_libdir)/libicc.so
+ dobin iccdump
+ dodoc Readme.txt todo.txt log.txt
+
+ insinto /usr/include
+ doins icc*.h
+}
diff --git a/media-libs/icclib/metadata.xml b/media-libs/icclib/metadata.xml
new file mode 100644
index 000000000000..173bc3668b43
--- /dev/null
+++ b/media-libs/icclib/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>graphics</herd>
+ <herd>printing</herd>
+ <upstream>
+ <remote-id type="freecode">icclib</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/id3lib/Manifest b/media-libs/id3lib/Manifest
new file mode 100644
index 000000000000..1b52bc1f1c90
--- /dev/null
+++ b/media-libs/id3lib/Manifest
@@ -0,0 +1 @@
+DIST id3lib-3.8.3.tar.gz 950726 SHA256 2749cc3c0cd7280b299518b1ddf5a5bcfe2d1100614519b68702230e26c7d079 SHA512 3787e261f86933c1c2f2bff2c4b349b42f5d8636e489e4f39f9d75e6dfbdc79b87009a0f4ce4b786f2fb3dbc01ca9d56c4112095b46244f897e6c9a28573adaf WHIRLPOOL c52c4239578bcdb1bf1c999cfa5fdf28e80064a3e0ccffc67a4dc5d4ac19978da95479b59bb8cd72638d2b5dea6448dd6f1e9a3985389ef3c5ae8900a1695b97
diff --git a/media-libs/id3lib/files/id3lib-3.8.3-autoconf259.patch b/media-libs/id3lib/files/id3lib-3.8.3-autoconf259.patch
new file mode 100644
index 000000000000..16921e17425e
--- /dev/null
+++ b/media-libs/id3lib/files/id3lib-3.8.3-autoconf259.patch
@@ -0,0 +1,31 @@
+Index: id3lib-3.8.3/configure.in
+===================================================================
+--- id3lib-3.8.3.orig/configure.in
++++ id3lib-3.8.3/configure.in
+@@ -168,7 +168,7 @@ if test $has_iconv = 1; then
+ iconv_oldstyle=1, iconv_oldstyle=0)
+ if test $iconv_oldstyle = 1; then
+ AC_MSG_RESULT(const char **)
+- AC_DEFINE(ID3LIB_ICONV_OLDSTYLE)
++ AC_DEFINE(ID3LIB_ICONV_OLDSTYLE, [], [Unknown])
+ #we'll check out the need of
+ #typecast in the call of iconv_open
+ AC_MSG_CHECKING(whether to typecast in iconv)
+@@ -184,7 +184,7 @@ if test $has_iconv = 1; then
+ iconv_cast=0, iconv_cast=1)
+ if test $iconv_cast = 1; then
+ AC_MSG_RESULT(yes)
+- AC_DEFINE(ID3LIB_ICONV_CAST_OK)
++ AC_DEFINE(ID3LIB_ICONV_CAST_OK, [], [Unknown])
+ else
+ AC_MSG_RESULT(no)
+ fi
+@@ -206,7 +206,7 @@ if test $has_iconv = 1; then
+ iconv_cast=0, iconv_cast=1)
+ if test $iconv_cast = 1; then
+ AC_MSG_RESULT(yes)
+- AC_DEFINE(ID3LIB_ICONV_CAST_OK)
++ AC_DEFINE(ID3LIB_ICONV_CAST_OK, [], [Unknown])
+ else
+ AC_MSG_RESULT(no)
+ fi
diff --git a/media-libs/id3lib/files/id3lib-3.8.3-doxyinput.patch b/media-libs/id3lib/files/id3lib-3.8.3-doxyinput.patch
new file mode 100644
index 000000000000..b118f487e06c
--- /dev/null
+++ b/media-libs/id3lib/files/id3lib-3.8.3-doxyinput.patch
@@ -0,0 +1,23 @@
+Index: id3lib-3.8.3/doc/Doxyfile
+===================================================================
+--- id3lib-3.8.3.orig/doc/Doxyfile
++++ id3lib-3.8.3/doc/Doxyfile
+@@ -262,17 +262,7 @@ WARN_FORMAT = "$file:$line: $
+ # with spaces.
+
+ INPUT = ../src \
+- ../include/id3/field.h \
+- ../include/id3/frame.h \
+- ../include/id3/globals.h \
+- ../include/id3/misc_support.h \
+- ../include/id3/reader.h \
+- ../include/id3/readers.h \
+- ../include/id3/sized_types.h \
+- ../include/id3/tag.h \
+- ../include/id3/tag.h \
+- ../include/id3/writer.h \
+- ../include/id3/writers.h
++ ../include/id3 \
+
+
+ # If the value of the INPUT tag contains directories, you can use the
diff --git a/media-libs/id3lib/files/id3lib-3.8.3-gcc-4.3.patch b/media-libs/id3lib/files/id3lib-3.8.3-gcc-4.3.patch
new file mode 100644
index 000000000000..090dc0bc092d
--- /dev/null
+++ b/media-libs/id3lib/files/id3lib-3.8.3-gcc-4.3.patch
@@ -0,0 +1,82 @@
+diff -Naur id3lib-3.8.3-orig/configure.in id3lib-3.8.3/configure.in
+--- id3lib-3.8.3-orig/configure.in 2008-03-05 18:03:25.000000000 -0600
++++ id3lib-3.8.3/configure.in 2008-03-05 18:15:42.000000000 -0600
+@@ -227,7 +227,6 @@
+ )
+ AC_CHECK_HEADERS( \
+ string \
+- iomanip.h \
+ ,,AC_MSG_ERROR([Missing a vital header file for id3lib])
+ )
+
+diff -Naur id3lib-3.8.3-orig/include/id3/id3lib_strings.h id3lib-3.8.3/include/id3/id3lib_strings.h
+--- id3lib-3.8.3-orig/include/id3/id3lib_strings.h 2008-03-05 18:19:46.000000000 -0600
++++ id3lib-3.8.3/include/id3/id3lib_strings.h 2008-03-05 18:19:38.000000000 -0600
+@@ -30,6 +30,7 @@
+ #define _ID3LIB_STRINGS_H_
+
+ #include <string>
++#include <cstring>
+
+ #if (defined(__GNUC__) && (__GNUC__ >= 3) || (defined(_MSC_VER) && _MSC_VER > 1000))
+ namespace std
+diff -Naur id3lib-3.8.3-orig/include/id3/writers.h id3lib-3.8.3/include/id3/writers.h
+--- id3lib-3.8.3-orig/include/id3/writers.h 2003-03-01 18:23:00.000000000 -0600
++++ id3lib-3.8.3/include/id3/writers.h 2008-03-05 18:23:05.000000000 -0600
+@@ -30,7 +30,7 @@
+
+ #include "id3/writer.h"
+ #include "id3/id3lib_streams.h"
+-//#include <string.h>
++#include <string.h>
+
+ class ID3_CPP_EXPORT ID3_OStreamWriter : public ID3_Writer
+ {
+diff -Naur id3lib-3.8.3-orig/examples/demo_convert.cpp id3lib-3.8.3/examples/demo_convert.cpp
+--- id3lib-3.8.3-orig/examples/demo_convert.cpp 2003-03-01 18:23:00.000000000 -0600
++++ id3lib-3.8.3/examples/demo_convert.cpp 2008-03-05 18:26:50.000000000 -0600
+@@ -84,7 +84,7 @@
+ }
+ }
+
+-int main( unsigned int argc, char * const argv[])
++int main( int argc, char * const argv[])
+ {
+ flags_t ulFlag = ID3TT_ALL;
+ gengetopt_args_info args;
+diff -Naur id3lib-3.8.3-orig/examples/demo_info.cpp id3lib-3.8.3/examples/demo_info.cpp
+--- id3lib-3.8.3-orig/examples/demo_info.cpp 2003-03-01 18:23:00.000000000 -0600
++++ id3lib-3.8.3/examples/demo_info.cpp 2008-03-05 18:27:40.000000000 -0600
+@@ -309,7 +309,7 @@
+
+ #define DEBUG
+
+-int main( unsigned int argc, char * const argv[])
++int main( int argc, char * const argv[])
+ {
+ ID3D_INIT_DOUT();
+
+diff -Naur id3lib-3.8.3-orig/examples/demo_tag.cpp id3lib-3.8.3/examples/demo_tag.cpp
+--- id3lib-3.8.3-orig/examples/demo_tag.cpp 2003-03-01 18:23:00.000000000 -0600
++++ id3lib-3.8.3/examples/demo_tag.cpp 2008-03-05 18:31:20.000000000 -0600
+@@ -46,7 +46,7 @@
+ os << "v2";
+ }
+
+-int main( unsigned int argc, char * const argv[])
++int main( int argc, char * const argv[])
+ {
+ int ulFlag = ID3TT_ID3;
+ ID3D_INIT_DOUT();
+diff -Naur id3lib-3.8.3-orig/examples/demo_copy.cpp id3lib-3.8.3/examples/demo_copy.cpp
+--- id3lib-3.8.3-orig/examples/demo_copy.cpp 2003-03-01 18:23:00.000000000 -0600
++++ id3lib-3.8.3/examples/demo_copy.cpp 2008-03-05 18:32:44.000000000 -0600
+@@ -81,7 +81,7 @@
+ }
+ }
+
+-int main( unsigned int argc, char * const argv[])
++int main( int argc, char * const argv[])
+ {
+ int ulFlag = ID3TT_ID3;
+ ID3D_INIT_DOUT();
diff --git a/media-libs/id3lib/files/id3lib-3.8.3-missing_nullpointer_check.patch b/media-libs/id3lib/files/id3lib-3.8.3-missing_nullpointer_check.patch
new file mode 100644
index 000000000000..3b9437967842
--- /dev/null
+++ b/media-libs/id3lib/files/id3lib-3.8.3-missing_nullpointer_check.patch
@@ -0,0 +1,11 @@
+--- id3lib-3.8.3/src/header_tag.cpp.orig 2003-03-02 01:23:00.000000000 +0100
++++ id3lib-3.8.3/src/header_tag.cpp 2009-07-13 22:54:21.000000000 +0200
+@@ -54,7 +54,7 @@
+ {
+ size_t bytesUsed = ID3_TagHeader::SIZE;
+
+- if (_info->is_extended)
++ if (_info && _info->is_extended)
+ {
+ bytesUsed += _info->extended_bytes;
+ }
diff --git a/media-libs/id3lib/files/id3lib-3.8.3-security.patch b/media-libs/id3lib/files/id3lib-3.8.3-security.patch
new file mode 100644
index 000000000000..2cf7c1420340
--- /dev/null
+++ b/media-libs/id3lib/files/id3lib-3.8.3-security.patch
@@ -0,0 +1,51 @@
+http://bugs.gentoo.org/189610
+
+--- src/tag_file.cpp
++++ src/tag_file.cpp
+@@ -242,8 +242,8 @@
+ strcpy(sTempFile, filename.c_str());
+ strcat(sTempFile, sTmpSuffix.c_str());
+
+-#if ((defined(__GNUC__) && __GNUC__ >= 3 ) || !defined(HAVE_MKSTEMP))
+- // This section is for Windows folk && gcc 3.x folk
++#if !defined(HAVE_MKSTEMP)
++ // This section is for Windows folk
+ fstream tmpOut;
+ createFile(sTempFile, tmpOut);
+
+@@ -257,7 +257,7 @@
+ tmpOut.write((char *)tmpBuffer, nBytes);
+ }
+
+-#else //((defined(__GNUC__) && __GNUC__ >= 3 ) || !defined(HAVE_MKSTEMP))
++#else //!defined(HAVE_MKSTEMP)
+
+ // else we gotta make a temp file, copy the tag into it, copy the
+ // rest of the old file after the tag, delete the old file, rename
+@@ -270,7 +270,7 @@
+ //ID3_THROW_DESC(ID3E_NoFile, "couldn't open temp file");
+ }
+
+- ofstream tmpOut(fd);
++ ofstream tmpOut(sTempFile);
+ if (!tmpOut)
+ {
+ tmpOut.close();
+@@ -285,14 +285,14 @@
+ uchar tmpBuffer[BUFSIZ];
+ while (file)
+ {
+- file.read(tmpBuffer, BUFSIZ);
++ file.read((char *)tmpBuffer, BUFSIZ);
+ size_t nBytes = file.gcount();
+- tmpOut.write(tmpBuffer, nBytes);
++ tmpOut.write((char *)tmpBuffer, nBytes);
+ }
+
+ close(fd); //closes the file
+
+-#endif ////((defined(__GNUC__) && __GNUC__ >= 3 ) || !defined(HAVE_MKSTEMP))
++#endif ////!defined(HAVE_MKSTEMP)
+
+ tmpOut.close();
+ file.close();
diff --git a/media-libs/id3lib/files/id3lib-3.8.3-test_io.patch b/media-libs/id3lib/files/id3lib-3.8.3-test_io.patch
new file mode 100644
index 000000000000..b4a0d24d65e3
--- /dev/null
+++ b/media-libs/id3lib/files/id3lib-3.8.3-test_io.patch
@@ -0,0 +1,10 @@
+--- id3lib-3.8.3/examples/test_io.cpp.orig 2004-09-21 23:40:48.398826320 +0200
++++ id3lib-3.8.3/examples/test_io.cpp 2004-09-21 23:40:55.408760648 +0200
+@@ -16,6 +16,7 @@
+ using std::cerr;
+
+ using namespace dami;
++using namespace std;
+
+ int
+ main(size_t argc, const char** argv)
diff --git a/media-libs/id3lib/files/id3lib-3.8.3-unicode16.patch b/media-libs/id3lib/files/id3lib-3.8.3-unicode16.patch
new file mode 100644
index 000000000000..b05d2cf298d3
--- /dev/null
+++ b/media-libs/id3lib/files/id3lib-3.8.3-unicode16.patch
@@ -0,0 +1,39 @@
+diff -ruN id3lib-3.8.3.orig/ChangeLog id3lib-3.8.3/ChangeLog
+--- id3lib-3.8.3.orig/ChangeLog 2003-03-02 01:23:00.000000000 +0100
++++ id3lib-3.8.3/ChangeLog 2006-02-22 00:33:59.946214472 +0100
+@@ -1,3 +1,8 @@
++2006-02-17 Jerome Couderc
++
++ * Patch from Spoon to fix UTF-16 writing bug
++ http://sourceforge.net/tracker/index.php?func=detail&aid=1016290&group_id=979&atid=300979
++
+ 2003-03-02 Sunday 17:38 Thijmen Klok <thijmen@id3lib.org>
+
+ * THANKS (1.20): added more people
+diff -ruN id3lib-3.8.3.orig/src/io_helpers.cpp id3lib-3.8.3/src/io_helpers.cpp
+--- id3lib-3.8.3.orig/src/io_helpers.cpp 2003-03-02 01:23:00.000000000 +0100
++++ id3lib-3.8.3/src/io_helpers.cpp 2006-02-22 00:35:02.926639992 +0100
+@@ -363,11 +363,22 @@
+ // Write the BOM: 0xFEFF
+ unicode_t BOM = 0xFEFF;
+ writer.writeChars((const unsigned char*) &BOM, 2);
++ // Patch from Spoon : 2004-08-25 14:17
++ // http://sourceforge.net/tracker/index.php?func=detail&aid=1016290&group_id=979&atid=300979
++ // Wrong code
++ //for (size_t i = 0; i < size; i += 2)
++ //{
++ // unicode_t ch = (data[i] << 8) | data[i+1];
++ // writer.writeChars((const unsigned char*) &ch, 2);
++ //}
++ // Right code
++ unsigned char *pdata = (unsigned char *) data.c_str();
+ for (size_t i = 0; i < size; i += 2)
+ {
+- unicode_t ch = (data[i] << 8) | data[i+1];
++ unicode_t ch = (pdata[i] << 8) | pdata[i+1];
+ writer.writeChars((const unsigned char*) &ch, 2);
+ }
++ // End patch
+ }
+ return writer.getCur() - beg;
+ }
diff --git a/media-libs/id3lib/files/id3lib-3.8.3-zlib.patch b/media-libs/id3lib/files/id3lib-3.8.3-zlib.patch
new file mode 100644
index 000000000000..177320bc17a3
--- /dev/null
+++ b/media-libs/id3lib/files/id3lib-3.8.3-zlib.patch
@@ -0,0 +1,23 @@
+diff -Naur id3lib-3.8.3.orig/Makefile.am id3lib-3.8.3/Makefile.am
+--- id3lib-3.8.3.orig/Makefile.am 2003-03-01 16:23:00.000000000 -0800
++++ id3lib-3.8.3/Makefile.am 2004-09-12 19:05:39.564456828 -0700
+@@ -28,7 +28,7 @@
+ endif
+
+ SUBDIRS = . m4 $(zlib_subdir) doc include id3com src examples
+-DIST_SUBDIRS = . m4 zlib doc include id3com src examples prj libprj
++DIST_SUBDIRS = . m4 $(zlib_subdir) doc include id3com src examples prj libprj
+
+ INCLUDES = @ID3LIB_DEBUG_FLAGS@
+
+diff -Naur id3lib-3.8.3.orig/src/Makefile.am id3lib-3.8.3/src/Makefile.am
+--- id3lib-3.8.3.orig/src/Makefile.am 2003-03-01 16:23:00.000000000 -0800
++++ id3lib-3.8.3/src/Makefile.am 2004-09-12 19:08:30.814149521 -0700
+@@ -77,6 +77,7 @@
+ endif
+
+ libid3_la_LDFLAGS = \
++ -lz \
+ -version-info $(LT_VERSION) \
+ -release $(LT_RELEASE) \
+ -export-dynamic
diff --git a/media-libs/id3lib/id3lib-3.8.3-r8.ebuild b/media-libs/id3lib/id3lib-3.8.3-r8.ebuild
new file mode 100644
index 000000000000..08638fa9c6e7
--- /dev/null
+++ b/media-libs/id3lib/id3lib-3.8.3-r8.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="Id3 library for C/C++"
+HOMEPAGE="http://id3lib.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P/_}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris"
+IUSE="doc static-libs"
+
+RDEPEND="sys-libs/zlib:="
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )"
+
+RESTRICT="test"
+
+DOCS="AUTHORS ChangeLog HISTORY README THANKS TODO"
+
+S=${WORKDIR}/${P/_}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-zlib.patch \
+ "${FILESDIR}"/${P}-test_io.patch \
+ "${FILESDIR}"/${P}-autoconf259.patch \
+ "${FILESDIR}"/${P}-doxyinput.patch \
+ "${FILESDIR}"/${P}-unicode16.patch \
+ "${FILESDIR}"/${P}-gcc-4.3.patch \
+ "${FILESDIR}"/${P}-missing_nullpointer_check.patch \
+ "${FILESDIR}"/${P}-security.patch
+
+ sed -i 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' {.,zlib}/configure.in || die
+
+ AT_M4DIR=${S}/m4 eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_compile() {
+ default
+ if use doc; then
+ pushd doc >/dev/null
+ doxygen Doxyfile || die
+ popd >/dev/null
+ fi
+}
+
+src_install() {
+ default
+ prune_libtool_files
+ use doc && dohtml -r doc
+}
diff --git a/media-libs/id3lib/metadata.xml b/media-libs/id3lib/metadata.xml
new file mode 100644
index 000000000000..df6eee6a10ef
--- /dev/null
+++ b/media-libs/id3lib/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>sound</herd>
+ <upstream>
+ <remote-id type="sourceforge">id3lib</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/ilmbase/Manifest b/media-libs/ilmbase/Manifest
new file mode 100644
index 000000000000..f05adac0727d
--- /dev/null
+++ b/media-libs/ilmbase/Manifest
@@ -0,0 +1,4 @@
+DIST ilmbase-1.0.2.tar.gz 496540 SHA256 2e5cda799ffdfca9b1a16bb120d49c74a39af1457ef22f968918c6200ba62e44 SHA512 5a1a0011ef43132f33832d2e322320abb81a0f495e921de52af8f6e9ee50e0bed63897a0054de228f4081cc2f6591cb99a686f908620e87bf86c9d2d689923cd WHIRLPOOL c111275a20b7506216d8888d1f88483dbec2577e4fb47986f8c1b19dc0b320518d5f251f7499dc10df4e145594a7717156d22f6d64e11a01e92c8eb20045bcd0
+DIST ilmbase-2.0.1.tar.gz 555828 SHA256 19b03975fea4461f2eff91f5df138b301b3ea9709eccbda98447f372bf09735f SHA512 0f2341fefd7c661b62bfd42590c9f29e5b58fbf303a4418e17d3bb831c40ebe23848250f360bc755113b84882665eb8c90497ee2f8d77bc5ed8e1fd43182c712 WHIRLPOOL cc0ca175d47691a8223fdec9804476e5a095122b9519a057fca0dd68e236016f5ffdfcbcac08ba5f9cad30d8eb543ff51d412169f03b44da7b39a781a0d77d4e
+DIST ilmbase-2.1.0.tar.gz 557552 SHA256 1e841ad89c5761940b07a125e6909ad22fe9fe0f99eadef45e0cca4efc6819b4 SHA512 2d168accc4f4fb8256fa7a4488c1a930bf1f088bda93f6d8272d3ce15219716d3e85dfa1e85dc2766bce10438e8fb38607a232a145c00d5d742cbde6604df342 WHIRLPOOL 10105bf617ecf17318f09ceb70226f14c544f16d3c7683577c9133b682ef049ecdaccd4f623b3eca1cf9b563dacaae87ed6134fd4d0878ec31bdb9a83942c936
+DIST ilmbase-2.2.0.tar.gz 525289 SHA256 ecf815b60695555c1fbc73679e84c7c9902f4e8faa6e8000d2f905b8b86cedc7 SHA512 0bbad14ed2bd286dff3987b16ef8631470211da54f822cb3e29b7931807216845ded81c9bf41fd2d22a8b362e8b9904a5450f61f5a242e460083e86b846513f1 WHIRLPOOL 740586dd279bc4b28921c7675f56253743d3ed43a9af828a59b2e72603dbeb2f7669c876ede8b6dbcf58e11c407f43325f04ac49b47cf00fd963c1a4ae216052
diff --git a/media-libs/ilmbase/files/ilmbase-1.0.0-asneeded.patch b/media-libs/ilmbase/files/ilmbase-1.0.0-asneeded.patch
new file mode 100644
index 000000000000..dc69fb983636
--- /dev/null
+++ b/media-libs/ilmbase/files/ilmbase-1.0.0-asneeded.patch
@@ -0,0 +1,11 @@
+--- IlmThread/Makefile.in
++++ IlmThread/Makefile.in
+@@ -209,7 +209,7 @@
+ IlmThreadMutexPosix.cpp
+
+ libIlmThread_la_LDFLAGS = -version-info @LIBTOOL_VERSION@ -no-undefined
+-libIlmThread_la_LIBADD = ../Iex/libIex.la
++libIlmThread_la_LIBADD = ../Iex/libIex.la -lpthread
+ libIlmThreadincludedir = $(includedir)/OpenEXR
+ libIlmThreadinclude_HEADERS = IlmThreadPool.h IlmThread.h \
+ IlmThreadSemaphore.h IlmThreadMutex.h
diff --git a/media-libs/ilmbase/files/ilmbase-1.0.2-gcc43.patch b/media-libs/ilmbase/files/ilmbase-1.0.2-gcc43.patch
new file mode 100644
index 000000000000..d822092254d8
--- /dev/null
+++ b/media-libs/ilmbase/files/ilmbase-1.0.2-gcc43.patch
@@ -0,0 +1,11 @@
+--- Imath/ImathMatrix.h
++++ Imath/ImathMatrix.h
+@@ -37,6 +37,8 @@
+ #ifndef INCLUDED_IMATHMATRIX_H
+ #define INCLUDED_IMATHMATRIX_H
+
++#include <cstring>
++
+ //----------------------------------------------------------------
+ //
+ // 2D (3x3) and 3D (4x4) transformation matrix templates.
diff --git a/media-libs/ilmbase/ilmbase-1.0.2.ebuild b/media-libs/ilmbase/ilmbase-1.0.2.ebuild
new file mode 100644
index 000000000000..2d09895ad56b
--- /dev/null
+++ b/media-libs/ilmbase/ilmbase-1.0.2.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit eutils libtool
+
+DESCRIPTION="OpenEXR ILM Base libraries"
+HOMEPAGE="http://openexr.com/"
+SRC_URI="http://download.savannah.gnu.org/releases/openexr/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 -arm hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="static-libs"
+
+RDEPEND="!<media-libs/openexr-1.5.0"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.0.0-asneeded.patch \
+ "${FILESDIR}"/${P}-gcc43.patch
+ elibtoolize
+}
+
+src_configure() {
+ econf \
+ --disable-dependency-tracking \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS ChangeLog NEWS README
+ find "${D}" -name '*.la' -delete
+}
diff --git a/media-libs/ilmbase/ilmbase-2.0.1-r1.ebuild b/media-libs/ilmbase/ilmbase-2.0.1-r1.ebuild
new file mode 100644
index 000000000000..8630aa393017
--- /dev/null
+++ b/media-libs/ilmbase/ilmbase-2.0.1-r1.ebuild
@@ -0,0 +1,18 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools-multilib
+
+DESCRIPTION="OpenEXR ILM Base libraries"
+HOMEPAGE="http://openexr.com/"
+SRC_URI="http://download.savannah.gnu.org/releases/openexr/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/2.0.1" # 2.0.1 for the namespace off -> on switch, caused library renaming
+KEYWORDS="~amd64 -arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="static-libs"
+
+DOCS=( AUTHORS ChangeLog NEWS README )
+MULTILIB_WRAPPED_HEADERS=( /usr/include/OpenEXR/IlmBaseConfig.h )
diff --git a/media-libs/ilmbase/ilmbase-2.1.0.ebuild b/media-libs/ilmbase/ilmbase-2.1.0.ebuild
new file mode 100644
index 000000000000..1868fd5fceb4
--- /dev/null
+++ b/media-libs/ilmbase/ilmbase-2.1.0.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 autotools-multilib
+
+DESCRIPTION="OpenEXR ILM Base libraries"
+HOMEPAGE="http://openexr.com/"
+SRC_URI="http://download.savannah.gnu.org/releases/openexr/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/11" # 11 from SONAME
+KEYWORDS="amd64 -arm hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~x64-macos ~x86-solaris"
+IUSE="static-libs"
+
+DOCS=( AUTHORS ChangeLog NEWS README )
+MULTILIB_WRAPPED_HEADERS=( /usr/include/OpenEXR/IlmBaseConfig.h )
+
+src_configure() {
+ # Disable use of ucontext.h wrt #482890
+ if use hppa || use ppc || use ppc64; then
+ export ac_cv_header_ucontext_h=no
+ fi
+
+ autotools-multilib_src_configure
+}
diff --git a/media-libs/ilmbase/ilmbase-2.2.0.ebuild b/media-libs/ilmbase/ilmbase-2.2.0.ebuild
new file mode 100644
index 000000000000..1c6485d13acb
--- /dev/null
+++ b/media-libs/ilmbase/ilmbase-2.2.0.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 autotools-multilib
+
+DESCRIPTION="OpenEXR ILM Base libraries"
+HOMEPAGE="http://openexr.com/"
+SRC_URI="http://download.savannah.gnu.org/releases/openexr/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/12" # based on SONAME
+KEYWORDS="~amd64 -arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~x64-macos ~x86-solaris"
+IUSE="static-libs"
+
+DOCS=( AUTHORS ChangeLog NEWS README )
+MULTILIB_WRAPPED_HEADERS=( /usr/include/OpenEXR/IlmBaseConfig.h )
+
+src_configure() {
+ # Disable use of ucontext.h wrt #482890
+ if use hppa || use ppc || use ppc64; then
+ export ac_cv_header_ucontext_h=no
+ fi
+
+ autotools-multilib_src_configure
+}
diff --git a/media-libs/ilmbase/metadata.xml b/media-libs/ilmbase/metadata.xml
new file mode 100644
index 000000000000..edccfe5754d2
--- /dev/null
+++ b/media-libs/ilmbase/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-libs/imlib/Manifest b/media-libs/imlib/Manifest
new file mode 100644
index 000000000000..3590e248b08b
--- /dev/null
+++ b/media-libs/imlib/Manifest
@@ -0,0 +1,2 @@
+DIST gtk-1-for-imlib.m4.bz2 2742 SHA256 e024d822d64819e23f7ad7c8283086ffd1e112b859b4669f1624dda1c56d8c47 SHA512 83708af1c7d7cf10960463b785bad096d77e985be5907dd59c73c2cb86c4b89fb5453a02ffddca1519185b91d205dbd96c4c4c1df4da4b67e64bad413cd8a40e WHIRLPOOL 5490f53e1559b9f505cd0ac4b8d0a9c74d8cb323daf4e048b4123725b1f1c12dae936595a0173cdb9d74e2377f6c8942d14e783977d91e6d920342bd5d2e724e
+DIST imlib-1.9.15.tar.bz2 683242 SHA256 4e6a270308a9ae16586bfc133c1a3dfb2e56f431edb66aaa3a80e36e5ed84ce0 SHA512 f50d9141b3c54b44921aa09c0a5ea848aefaa904efdd6da132dace42604671f8dbd3e4b71a596f054f0db4525ba2002864b5e5b21f8805cf1b5514b661ac254a WHIRLPOOL b9127c602a69eb52ab2bbe66733e8d35c8311a6decf569dd3d63dcff8d1d69ca8ed5572fac4ab795685beef46fb039a68325b70e697e7257d4ee92ad2c4edde2
diff --git a/media-libs/imlib/files/imlib-1.9.15-asneeded.patch b/media-libs/imlib/files/imlib-1.9.15-asneeded.patch
new file mode 100644
index 000000000000..3b7dd8a8bbca
--- /dev/null
+++ b/media-libs/imlib/files/imlib-1.9.15-asneeded.patch
@@ -0,0 +1,38 @@
+This code is broken with the newer libtool. Just dropping it is more or less
+safe as in any case if libtool does not supports shared libraries it'll issue
+an error...
+
+Adding include is necessary for gcc-4.3.
+
+--- configure.in 2008-07-16 09:18:35 +0000
++++ configure.in 2008-07-16 09:18:43 +0000
+@@ -61,6 +61,7 @@
+ AC_TRY_RUN([
+ #include <glib.h>
+ #include <gmodule.h>
++#include <stdlib.h>
+ main ()
+ {
+ if (g_module_supported ())
+@@ -74,21 +74,6 @@
+ CFLAGS="$oCFLAGS"
+ fi
+
+-dnl Now we check to see if our libtool supports shared lib deps
+-dnl (in a rather ugly way even)
+-builddir=`pwd`
+-if $dynworks; then
+- imlib_libtool_config="$builddir/libtool --config"
+- imlib_deplibs_check=`$imlib_libtool_config | \
+- grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \
+- sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'`
+- if test "x$imlib_deplibs_check" = "xnone" || \
+- test "x$imlib_deplibs_check" = "xunknown" || \
+- test "x$imlib_deplibs_check" = "x"; then
+- dynworks=false
+- fi
+-fi
+-
+ if $dynworks; then
+ AC_DEFINE(USE_GMODULE, 1, [ ])
+ GMODULE_LIBS="`glib-config --libs gmodule`"
diff --git a/media-libs/imlib/files/imlib-1.9.15-bpp16-CVE-2007-3568.patch b/media-libs/imlib/files/imlib-1.9.15-bpp16-CVE-2007-3568.patch
new file mode 100644
index 000000000000..94595ffdf55a
--- /dev/null
+++ b/media-libs/imlib/files/imlib-1.9.15-bpp16-CVE-2007-3568.patch
@@ -0,0 +1,11 @@
+--- Imlib/load.c.orig 2007-08-13 23:06:20.000000000 -0300
++++ Imlib/load.c 2007-08-13 23:06:51.000000000 -0300
+@@ -645,7 +645,7 @@
+ planes = (int)word;
+ fread(&word, 2, 1, file);
+ bpp = (int)word;
+- if (bpp != 1 && bpp != 4 && bpp != 8 && bpp && 16 && bpp != 24 && bpp != 32)
++ if (bpp != 1 && bpp != 4 && bpp != 8 && bpp != 16 && bpp != 24 && bpp != 32)
+ {
+ fprintf(stderr, "IMLIB ERROR: unknown bitdepth in file\n");
+ return NULL;
diff --git a/media-libs/imlib/files/imlib-1.9.15-fix-rendering.patch b/media-libs/imlib/files/imlib-1.9.15-fix-rendering.patch
new file mode 100644
index 000000000000..6212ed31428e
--- /dev/null
+++ b/media-libs/imlib/files/imlib-1.9.15-fix-rendering.patch
@@ -0,0 +1,105 @@
+Michel Dänzer <daenzer AT debian.org>
+
+* The boolean value returned via the last parameter to XShmQueryVersion()
+ isn't honoured everywhere.
+* The init functions that take parameters allow the caller to enable shared
+ pixmaps when they aren't supported (or disabled by configuration files).
+
+
+These result in incorrect rendering when the MIT-SHM extension doesn't support
+shared pixmaps, e.g. using EXA with current versions of Xorg.
+
+http://bugs.gentoo.org/show_bug.cgi?id=197489
+
+diff -up -ru imlib-1.9.15.orig/gdk_imlib/misc.c imlib-1.9.15/gdk_imlib/misc.c
+--- imlib-1.9.15.orig/gdk_imlib/misc.c 2002-03-04 18:06:32.000000000 +0100
++++ imlib-1.9.15/gdk_imlib/misc.c 2007-10-28 14:00:04.000000000 +0100
+@@ -674,6 +674,10 @@ gdk_imlib_init_params(GdkImlibInitParams
+ visual = gdk_rgb_get_visual();
+ id->x.visual = GDK_VISUAL_XVISUAL(visual); /* the visual type */
+ id->x.depth = visual->depth; /* the depth of the screen in bpp */
++
++ id->x.shm = 0;
++ id->x.shmp = 0;
++ id->max_shm = 0;
+ #ifdef HAVE_SHM
+ if (XShmQueryExtension(id->x.disp))
+ {
+@@ -689,17 +693,14 @@ gdk_imlib_init_params(GdkImlibInitParams
+ id->x.last_xim = NULL;
+ id->x.last_sxim = NULL;
+ id->max_shm = 0x7fffffff;
+- if (XShmPixmapFormat(id->x.disp) == ZPixmap)
++ if ((XShmPixmapFormat(id->x.disp) == ZPixmap) &&
++ (pm == True))
+ id->x.shmp = 1;
+ }
+ }
+ }
+- else
+ #endif
+- {
+- id->x.shm = 0;
+- id->x.shmp = 0;
+- }
++
+ id->cache.on_image = 0;
+ id->cache.size_image = 0;
+ id->cache.num_image = 0;
+@@ -935,8 +936,8 @@ gdk_imlib_init_params(GdkImlibInitParams
+ }
+ if (p->flags & PARAMS_SHAREDPIXMAPS)
+ {
+- if (id->x.shm)
+- id->x.shmp = p->sharedpixmaps;
++ if (!p->sharedpixmaps)
++ id->x.shmp = 0;
+ }
+ if (p->flags & PARAMS_PALETTEOVERRIDE)
+ override = p->paletteoverride;
+diff -up -ru imlib-1.9.15.orig/Imlib/misc.c imlib-1.9.15/Imlib/misc.c
+--- imlib-1.9.15.orig/Imlib/misc.c 2004-09-21 02:22:59.000000000 +0200
++++ imlib-1.9.15/Imlib/misc.c 2007-10-28 14:00:23.000000000 +0100
+@@ -675,6 +675,10 @@ Imlib_init_with_params(Display * disp, I
+ id->x.root = DefaultRootWindow(disp); /* the root window id */
+ id->x.visual = DefaultVisual(disp, id->x.screen); /* the visual type */
+ id->x.depth = DefaultDepth(disp, id->x.screen); /* the depth of the screen in bpp */
++
++ id->x.shm = 0;
++ id->x.shmp = 0;
++ id->max_shm = 0;
+ #ifdef HAVE_SHM
+ if (XShmQueryExtension(id->x.disp))
+ {
+@@ -690,17 +694,14 @@ Imlib_init_with_params(Display * disp, I
+ id->x.last_xim = NULL;
+ id->x.last_sxim = NULL;
+ id->max_shm = 0x7fffffff;
+- if (XShmPixmapFormat(id->x.disp) == ZPixmap)
++ if ((XShmPixmapFormat(id->x.disp) == ZPixmap &&
++ (pm == True)))
+ id->x.shmp = 1;
+ }
+ }
+ }
+- else
+ #endif
+- {
+- id->x.shm = 0;
+- id->x.shmp = 0;
+- }
++
+ id->cache.on_image = 0;
+ id->cache.size_image = 0;
+ id->cache.num_image = 0;
+@@ -952,8 +953,8 @@ Imlib_init_with_params(Display * disp, I
+ }
+ if (p->flags & PARAMS_SHAREDPIXMAPS)
+ {
+- if (id->x.shm)
+- id->x.shmp = p->sharedpixmaps;
++ if (!p->sharedpixmaps)
++ id->x.shmp = 0;
+ }
+ if (p->flags & PARAMS_PALETTEOVERRIDE)
+ override = p->paletteoverride;
diff --git a/media-libs/imlib/files/imlib-1.9.15-libpng15.patch b/media-libs/imlib/files/imlib-1.9.15-libpng15.patch
new file mode 100644
index 000000000000..7837cd488cf2
--- /dev/null
+++ b/media-libs/imlib/files/imlib-1.9.15-libpng15.patch
@@ -0,0 +1,142 @@
+--- gdk_imlib/io-png.c
++++ gdk_imlib/io-png.c
+@@ -40,13 +40,13 @@
+ return NULL;
+ }
+
+- if (setjmp(png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(png_ptr)))
+ {
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+ return NULL;
+ }
+
+- if (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
++ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_RGB_ALPHA)
+ {
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+ return NULL;
+@@ -275,13 +275,13 @@
+ return NULL;
+ }
+
+- if (setjmp(png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(png_ptr)))
+ {
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+ return NULL;
+ }
+
+- if (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
++ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_RGB_ALPHA)
+ {
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+ return NULL;
+@@ -301,6 +301,9 @@
+ /* Setup Translators */
+ if (color_type == PNG_COLOR_TYPE_PALETTE)
+ png_set_expand(png_ptr);
++ if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8)
++ png_set_expand(png_ptr);
++
+ png_set_strip_16(png_ptr);
+ png_set_packing(png_ptr);
+ if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS))
+@@ -440,13 +443,13 @@
+ return NULL;
+ }
+
+- if (setjmp(png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(png_ptr)))
+ {
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+ return NULL;
+ }
+
+- if (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
++ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_RGB_ALPHA)
+ {
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+ return NULL;
+@@ -635,7 +638,7 @@
+ png_destroy_write_struct(&png_ptr, (png_infopp) NULL);
+ return 0;
+ }
+- if (setjmp(png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(png_ptr)))
+ {
+ fclose(f);
+ png_destroy_write_struct(&png_ptr, (png_infopp) NULL);
+--- Imlib/load.c
++++ Imlib/load.c
+@@ -197,12 +197,12 @@
+ png_destroy_read_struct(&png_ptr, NULL, NULL);
+ return NULL;
+ }
+- if (setjmp(png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(png_ptr)))
+ {
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+ return NULL;
+ }
+- if (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
++ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_RGB_ALPHA)
+ {
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+ return NULL;
+@@ -260,7 +260,8 @@
+ png_read_image(png_ptr, lines);
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+ ptr = data;
+- if (color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
++ if (color_type == PNG_COLOR_TYPE_GRAY
++ || color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
+ {
+ for (y = 0; y < *h; y++)
+ {
+@@ -285,6 +286,7 @@
+ }
+ }
+ }
++#if 0
+ else if (color_type == PNG_COLOR_TYPE_GRAY)
+ {
+ for (y = 0; y < *h; y++)
+@@ -300,6 +302,7 @@
+ }
+ }
+ }
++#endif
+ else
+ {
+ for (y = 0; y < *h; y++)
+--- Imlib/save.c
++++ Imlib/save.c
+@@ -342,7 +342,7 @@
+ png_destroy_write_struct(&png_ptr, (png_infopp) NULL);
+ return 0;
+ }
+- if (setjmp(png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(png_ptr)))
+ {
+ fclose(f);
+ png_destroy_write_struct(&png_ptr, (png_infopp) NULL);
+--- Imlib/utils.c
++++ Imlib/utils.c
+@@ -1981,14 +1981,13 @@
+ png_destroy_read_struct(&png_ptr, NULL, NULL);
+ return NULL;
+ }
+-
+- if (setjmp(png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(png_ptr)))
+ {
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+ return NULL;
+ }
+
+- if (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
++ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_RGB_ALPHA)
+ {
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+ return NULL;
diff --git a/media-libs/imlib/files/imlib-1.9.15.patch b/media-libs/imlib/files/imlib-1.9.15.patch
new file mode 100644
index 000000000000..c78aea9ad98f
--- /dev/null
+++ b/media-libs/imlib/files/imlib-1.9.15.patch
@@ -0,0 +1,70 @@
+diff -ur imlib-1.9.15.orig/configure.in imlib-1.9.15/configure.in
+--- imlib-1.9.15.orig/configure.in 2004-09-23 04:13:45.000000000 +0300
++++ imlib-1.9.15/configure.in 2007-02-05 23:43:18.000000000 +0200
+@@ -17,11 +17,26 @@
+ dnl incase it is broken for example.
+ AC_ARG_ENABLE(shm, [ --enable-shm support shared memory if available [default=yes]], echo $enable_shm, enable_shm="yes")
+
++AC_ARG_ENABLE(gdk, [ --enable-gdk enable gdk_imlib compilation [default=yes]],[
++ if test x$enableval = xyes; then
++ disable_gdk="no"
++ else
++ disable_gdk="yes"
++ fi],disable_gdk=no)
++
++if test x$disable_gdk = xno; then
++ AC_MSG_RESULT(no)
++
+ AM_PATH_GTK(1.2.1,[
+ GDK_IMLIB="gdk_imlib utils"],[
+ GDK_IMLIB=""
+ AC_MSG_WARN([*** gdk_imlib will not be built ***])])
+
++else
++ AC_MSG_RESULT(yes)
++ GDK_IMLIB=""
++fi
++
+ AC_MSG_CHECKING(whether to build gmodulized imlib)
+
+ AC_ARG_ENABLE(modules, [ --disable-modules Disables dynamic module loading],[
+diff -ur imlib-1.9.15.orig/imlib-config.in imlib-1.9.15/imlib-config.in
+--- imlib-1.9.15.orig/imlib-config.in 2004-08-27 19:03:11.000000000 +0300
++++ imlib-1.9.15/imlib-config.in 2007-02-05 23:46:34.000000000 +0200
+@@ -46,15 +46,9 @@
+ echo @VERSION@
+ ;;
+ --cflags)
+- if test @includedir@ != /usr/include ; then
+- includes=-I@includedir@
+- fi
+ echo $includes @X_CFLAGS@
+ ;;
+ --cflags-gdk)
+- if test @includedir@ != /usr/include ; then
+- includes=-I@includedir@
+- fi
+ echo `@GTK_CONFIG@ --cflags` $includes @X_CFLAGS@
+ ;;
+ --libs)
+diff -ur imlib-1.9.15.orig/imlib.m4 imlib-1.9.15/imlib.m4
+--- imlib-1.9.15.orig/imlib.m4 2004-08-27 19:03:11.000000000 +0300
++++ imlib-1.9.15/imlib.m4 2007-02-05 23:42:57.000000000 +0200
+@@ -6,7 +6,7 @@
+ dnl AM_PATH_IMLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
+ dnl Test for IMLIB, and define IMLIB_CFLAGS and IMLIB_LIBS
+ dnl
+-AC_DEFUN(AM_PATH_IMLIB,
++AC_DEFUN([AM_PATH_IMLIB],
+ [dnl
+ dnl Get the cflags and libraries from the imlib-config script
+ dnl
+@@ -164,7 +164,7 @@
+ ])
+
+ # Check for gdk-imlib
+-AC_DEFUN(AM_PATH_GDK_IMLIB,
++AC_DEFUN([AM_PATH_GDK_IMLIB],
+ [dnl
+ dnl Get the cflags and libraries from the imlib-config script
+ dnl
diff --git a/media-libs/imlib/files/imlib-security.patch b/media-libs/imlib/files/imlib-security.patch
new file mode 100644
index 000000000000..c820270d47e1
--- /dev/null
+++ b/media-libs/imlib/files/imlib-security.patch
@@ -0,0 +1,510 @@
+diff -urN imlib-1.9.13.orig/Imlib/load.c imlib-1.9.13/Imlib/load.c
+--- imlib-1.9.13.orig/Imlib/load.c Wed Mar 13 19:06:29 2002
++++ imlib-1.9.13/Imlib/load.c Thu Sep 16 17:21:01 2004
+@@ -4,6 +4,8 @@
+ #include "Imlib_private.h"
+ #include <setjmp.h>
+
++#define G_MAXINT ((int) 0x7fffffff)
++
+ /* Split the ID - damages input */
+
+ static char *
+@@ -41,13 +43,17 @@
+
+ /*
+ * Make sure we don't wrap on our memory allocations
++ * we check G_MAXINT/4 because rend.c malloc's w * h * bpp
++ * + 3 is safety margin
+ */
+
+ void * _imlib_malloc_image(unsigned int w, unsigned int h)
+ {
+- if( w > 32767 || h > 32767)
+- return NULL;
+- return malloc(w * h * 3);
++ if (w <= 0 || w > 32767 ||
++ h <= 0 || h > 32767 ||
++ h >= (G_MAXINT/4 - 1) / w)
++ return NULL;
++ return malloc(w * h * 3 + 3);
+ }
+
+ #ifdef HAVE_LIBJPEG
+@@ -360,7 +366,9 @@
+ npix = ww * hh;
+ *w = (int)ww;
+ *h = (int)hh;
+- if(ww > 32767 || hh > 32767)
++ if (ww <= 0 || ww > 32767 ||
++ hh <= 0 || hh > 32767 ||
++ hh >= (G_MAXINT/sizeof(uint32)) / ww)
+ {
+ TIFFClose(tif);
+ return NULL;
+@@ -463,7 +471,7 @@
+ }
+ *w = gif->Image.Width;
+ *h = gif->Image.Height;
+- if (*h > 32767 || *w > 32767)
++ if (*h <= 0 || *h > 32767 || *w <= 0 || *w > 32767)
+ {
+ return NULL;
+ }
+@@ -965,7 +973,12 @@
+ comment = 0;
+ quote = 0;
+ context = 0;
++ memset(lookup, 0, sizeof(lookup));
++
+ line = malloc(lsz);
++ if (!line)
++ return NULL;
++
+ while (!done)
+ {
+ pc = c;
+@@ -994,25 +1007,25 @@
+ {
+ /* Header */
+ sscanf(line, "%i %i %i %i", w, h, &ncolors, &cpp);
+- if (ncolors > 32766)
++ if (ncolors <= 0 || ncolors > 32766)
+ {
+ fprintf(stderr, "IMLIB ERROR: XPM files wth colors > 32766 not supported\n");
+ free(line);
+ return NULL;
+ }
+- if (cpp > 5)
++ if (cpp <= 0 || cpp > 5)
+ {
+ fprintf(stderr, "IMLIB ERROR: XPM files with characters per pixel > 5 not supported\n");
+ free(line);
+ return NULL;
+ }
+- if (*w > 32767)
++ if (*w <= 0 || *w > 32767)
+ {
+ fprintf(stderr, "IMLIB ERROR: Image width > 32767 pixels for file\n");
+ free(line);
+ return NULL;
+ }
+- if (*h > 32767)
++ if (*h <= 0 || *h > 32767)
+ {
+ fprintf(stderr, "IMLIB ERROR: Image height > 32767 pixels for file\n");
+ free(line);
+@@ -1045,11 +1058,13 @@
+ {
+ int slen;
+ int hascolor, iscolor;
++ int space;
+
+ iscolor = 0;
+ hascolor = 0;
+ tok[0] = 0;
+ col[0] = 0;
++ space = sizeof(col) - 1;
+ s[0] = 0;
+ len = strlen(line);
+ strncpy(cmap[j].str, line, cpp);
+@@ -1072,10 +1087,10 @@
+ {
+ if (k >= len)
+ {
+- if (col[0])
+- strcat(col, " ");
+- if (strlen(col) + strlen(s) < sizeof(col))
+- strcat(col, s);
++ if (col[0] && space > 0)
++ strcat(col, " "), space -= 1;
++ if (slen <= space)
++ strcat(col, s), space -= slen;
+ }
+ if (col[0])
+ {
+@@ -1105,14 +1120,17 @@
+ }
+ }
+ }
+- strcpy(tok, s);
++ if (slen < sizeof(tok));
++ strcpy(tok, s);
+ col[0] = 0;
++ space = sizeof(col) - 1;
+ }
+ else
+ {
+- if (col[0])
+- strcat(col, " ");
+- strcat(col, s);
++ if (col[0] && space > 0)
++ strcat(col, " "), space -=1;
++ if (slen <= space)
++ strcat(col, s), space -= slen;
+ }
+ }
+ }
+@@ -1341,12 +1359,12 @@
+ sscanf(s, "%i %i", w, h);
+ a = *w;
+ b = *h;
+- if (a > 32767)
++ if (a <= 0 || a > 32767)
+ {
+ fprintf(stderr, "IMLIB ERROR: Image width > 32767 pixels for file\n");
+ return NULL;
+ }
+- if (b > 32767)
++ if (b <= 0 || b > 32767)
+ {
+ fprintf(stderr, "IMLIB ERROR: Image height > 32767 pixels for file\n");
+ return NULL;
+diff -urN imlib-1.9.13.orig/Imlib/utils.c imlib-1.9.13/Imlib/utils.c
+--- imlib-1.9.13.orig/Imlib/utils.c Mon Mar 4 17:45:28 2002
++++ imlib-1.9.13/Imlib/utils.c Thu Sep 16 17:21:15 2004
+@@ -1496,36 +1496,56 @@
+ context = 0;
+ ptr = NULL;
+ end = NULL;
++ memset(lookup, 0, sizeof(lookup));
+
+ while (!done)
+ {
+ line = data[count++];
++ if (!line)
++ break;
++ line = strdup(line);
++ if (!line)
++ break;
++ len = strlen(line);
++ for (i = 0; i < len; ++i)
++ {
++ c = line[i];
++ if (c < 32)
++ line[i] = 32;
++ else if (c > 127)
++ line[i] = 127;
++ }
++
+ if (context == 0)
+ {
+ /* Header */
+ sscanf(line, "%i %i %i %i", &w, &h, &ncolors, &cpp);
+- if (ncolors > 32766)
++ if (ncolors <= 0 || ncolors > 32766)
+ {
+ fprintf(stderr, "IMLIB ERROR: XPM data wth colors > 32766 not supported\n");
+ free(im);
++ free(line);
+ return NULL;
+ }
+- if (cpp > 5)
++ if (cpp <= 0 || cpp > 5)
+ {
+ fprintf(stderr, "IMLIB ERROR: XPM data with characters per pixel > 5 not supported\n");
+ free(im);
++ free(line);
+ return NULL;
+ }
+- if (w > 32767)
++ if (w <= 0 || w > 32767)
+ {
+ fprintf(stderr, "IMLIB ERROR: Image width > 32767 pixels for data\n");
+ free(im);
++ free(line);
+ return NULL;
+ }
+- if (h > 32767)
++ if (h <= 0 || h > 32767)
+ {
+ fprintf(stderr, "IMLIB ERROR: Image height > 32767 pixels for data\n");
+ free(im);
++ free(line);
+ return NULL;
+ }
+ cmap = malloc(sizeof(struct _cmap) * ncolors);
+@@ -1533,6 +1553,7 @@
+ if (!cmap)
+ {
+ free(im);
++ free(line);
+ return NULL;
+ }
+ im->rgb_width = w;
+@@ -1542,6 +1563,7 @@
+ {
+ free(cmap);
+ free(im);
++ free(line);
+ return NULL;
+ }
+ im->alpha_data = NULL;
+@@ -1817,6 +1839,7 @@
+ }
+ if ((ptr) && ((ptr - im->rgb_data) >= w * h * 3))
+ done = 1;
++ free(line);
+ }
+ if (!transp)
+ {
+diff -urN imlib-1.9.13.orig/gdk_imlib/io-gif.c imlib-1.9.13/gdk_imlib/io-gif.c
+--- imlib-1.9.13.orig/gdk_imlib/io-gif.c Mon Mar 4 17:26:51 2002
++++ imlib-1.9.13/gdk_imlib/io-gif.c Thu Sep 16 16:11:31 2004
+@@ -55,7 +55,7 @@
+ }
+ *w = gif->Image.Width;
+ *h = gif->Image.Height;
+- if(*h > 32767 || *w > 32767)
++ if(*h <= 0 || *h > 32767 || *w <= 0 || *w > 32767)
+ {
+ return NULL;
+ }
+diff -urN imlib-1.9.13.orig/gdk_imlib/io-ppm.c imlib-1.9.13/gdk_imlib/io-ppm.c
+--- imlib-1.9.13.orig/gdk_imlib/io-ppm.c Mon Mar 4 17:26:51 2002
++++ imlib-1.9.13/gdk_imlib/io-ppm.c Thu Sep 16 16:13:13 2004
+@@ -53,12 +53,12 @@
+ sscanf(s, "%i %i", w, h);
+ a = *w;
+ b = *h;
+- if (a > 32767)
++ if (a <= 0 || a > 32767)
+ {
+ fprintf(stderr, "gdk_imlib ERROR: Image width > 32767 pixels for file\n");
+ return NULL;
+ }
+- if (b > 32767)
++ if (b <= 0 || b > 32767)
+ {
+ fprintf(stderr, "gdk_imlib ERROR: Image height > 32767 pixels for file\n");
+ return NULL;
+diff -urN imlib-1.9.13.orig/gdk_imlib/io-tiff.c imlib-1.9.13/gdk_imlib/io-tiff.c
+--- imlib-1.9.13.orig/gdk_imlib/io-tiff.c Mon Mar 4 17:26:51 2002
++++ imlib-1.9.13/gdk_imlib/io-tiff.c Thu Sep 16 16:13:57 2004
+@@ -36,7 +36,9 @@
+ npix = ww * hh;
+ *w = (int)ww;
+ *h = (int)hh;
+- if(ww > 32767 || hh > 32767)
++ if (ww <= 0 || ww > 32767 ||
++ hh <= 0 || hh > 32767 ||
++ hh >= (G_MAXINT/sizeof(uint32)) / ww)
+ {
+ TIFFClose(tif);
+ return NULL;
+diff -urN imlib-1.9.13.orig/gdk_imlib/io-xpm.c imlib-1.9.13/gdk_imlib/io-xpm.c
+--- imlib-1.9.13.orig/gdk_imlib/io-xpm.c Mon Mar 4 17:26:51 2002
++++ imlib-1.9.13/gdk_imlib/io-xpm.c Thu Sep 16 17:08:24 2004
+@@ -40,8 +40,12 @@
+ context = 0;
+ i = j = 0;
+ cmap = NULL;
++ memset(lookup, 0, sizeof(lookup));
+
+ line = malloc(lsz);
++ if (!line)
++ return NULL;
++
+ while (!done)
+ {
+ pc = c;
+@@ -70,25 +74,25 @@
+ {
+ /* Header */
+ sscanf(line, "%i %i %i %i", w, h, &ncolors, &cpp);
+- if (ncolors > 32766)
++ if (ncolors <= 0 || ncolors > 32766)
+ {
+ fprintf(stderr, "gdk_imlib ERROR: XPM files wth colors > 32766 not supported\n");
+ free(line);
+ return NULL;
+ }
+- if (cpp > 5)
++ if (cpp <= 0 || cpp > 5)
+ {
+ fprintf(stderr, "gdk_imlib ERROR: XPM files with characters per pixel > 5 not supported\n");
+ free(line);
+ return NULL;
+ }
+- if (*w > 32767)
++ if (*w <= 0 || *w > 32767)
+ {
+ fprintf(stderr, "gdk_imlib ERROR: Image width > 32767 pixels for file\n");
+ free(line);
+ return NULL;
+ }
+- if (*h > 32767)
++ if (*h <= 0 || *h > 32767)
+ {
+ fprintf(stderr, "gdk_imlib ERROR: Image height > 32767 pixels for file\n");
+ free(line);
+@@ -120,11 +124,13 @@
+ {
+ int slen;
+ int hascolor, iscolor;
++ int space;
+
+ hascolor = 0;
+ iscolor = 0;
+ tok[0] = 0;
+ col[0] = 0;
++ space = sizeof(col) - 1;
+ s[0] = 0;
+ len = strlen(line);
+ strncpy(cmap[j].str, line, cpp);
+@@ -147,10 +153,10 @@
+ {
+ if (k >= len)
+ {
+- if (col[0])
+- strcat(col, " ");
+- if (strlen(col) + strlen(s) < sizeof(col))
+- strcat(col, s);
++ if (col[0] && space > 0)
++ strncat(col, " ", space), space -= 1;
++ if (slen <= space)
++ strcat(col, s), space -= slen;
+ }
+ if (col[0])
+ {
+@@ -180,14 +186,17 @@
+ }
+ }
+ }
+- strcpy(tok, s);
++ if (slen < sizeof(tok))
++ strcpy(tok, s);
+ col[0] = 0;
++ space = sizeof(col) - 1;
+ }
+ else
+ {
+- if (col[0])
+- strcat(col, " ");
+- strcat(col, s);
++ if (col[0] && space > 0)
++ strcat(col, " "), space -= 1;
++ if (slen <= space)
++ strcat(col, s), space -= slen;
+ }
+ }
+ }
+diff -urN imlib-1.9.13.orig/gdk_imlib/misc.c imlib-1.9.13/gdk_imlib/misc.c
+--- imlib-1.9.13.orig/gdk_imlib/misc.c Mon Mar 4 17:26:51 2002
++++ imlib-1.9.13/gdk_imlib/misc.c Thu Sep 16 16:35:32 2004
+@@ -1355,11 +1355,16 @@
+
+ /*
+ * Make sure we don't wrap on our memory allocations
++ * we check G_MAX_INT/4 because rend.c malloc's w * h * bpp
++ * + 3 is safety margin
+ */
+
+ void *_gdk_malloc_image(unsigned int w, unsigned int h)
+ {
+- if( w > 32767 || h > 32767)
++ if (w <= 0 || w > 32767 ||
++ h <= 0 || h > 32767 ||
++ h >= (G_MAXINT/4 - 1) / w)
+ return NULL;
+- return malloc(w * h * 3);
++ return malloc(w * h * 3 + 3);
+ }
++
+diff -urN imlib-1.9.13.orig/gdk_imlib/utils.c imlib-1.9.13/gdk_imlib/utils.c
+--- imlib-1.9.13.orig/gdk_imlib/utils.c Mon Mar 4 17:26:51 2002
++++ imlib-1.9.13/gdk_imlib/utils.c Thu Sep 16 17:28:35 2004
+@@ -1236,36 +1236,56 @@
+ context = 0;
+ ptr = NULL;
+ end = NULL;
++ memset(lookup, 0, sizeof(lookup));
+
+ while (!done)
+ {
+ line = data[count++];
++ if (!line)
++ break;
++ line = strdup(line);
++ if (!line)
++ break;
++ len = strlen(line);
++ for (i = 0; i < len; ++i)
++ {
++ c = line[i];
++ if (c < 32)
++ line[i] = 32;
++ else if (c > 127)
++ line[i] = 127;
++ }
++
+ if (context == 0)
+ {
+ /* Header */
+ sscanf(line, "%i %i %i %i", &w, &h, &ncolors, &cpp);
+- if (ncolors > 32766)
++ if (ncolors <= 0 || ncolors > 32766)
+ {
+ fprintf(stderr, "gdk_imlib ERROR: XPM data wth colors > 32766 not supported\n");
+ free(im);
++ free(line);
+ return NULL;
+ }
+- if (cpp > 5)
++ if (cpp <= 0 || cpp > 5)
+ {
+ fprintf(stderr, "gdk_imlib ERROR: XPM data with characters per pixel > 5 not supported\n");
+ free(im);
++ free(line);
+ return NULL;
+ }
+- if (w > 32767)
++ if (w <= 0 || w > 32767)
+ {
+ fprintf(stderr, "gdk_imlib ERROR: Image width > 32767 pixels for data\n");
+ free(im);
++ free(line);
+ return NULL;
+ }
+- if (h > 32767)
++ if (h <= 0 || h > 32767)
+ {
+ fprintf(stderr, "gdk_imlib ERROR: Image height > 32767 pixels for data\n");
+ free(im);
++ free(line);
+ return NULL;
+ }
+ cmap = malloc(sizeof(struct _cmap) * ncolors);
+@@ -1273,6 +1293,7 @@
+ if (!cmap)
+ {
+ free(im);
++ free(line);
+ return NULL;
+ }
+ im->rgb_width = w;
+@@ -1282,6 +1303,7 @@
+ {
+ free(cmap);
+ free(im);
++ free(line);
+ return NULL;
+ }
+ im->alpha_data = NULL;
+@@ -1355,7 +1377,7 @@
+ strcpy(col + colptr, " ");
+ colptr++;
+ }
+- if (colptr + ls <= sizeof(col))
++ if (colptr + ls < sizeof(col))
+ {
+ strcpy(col + colptr, s);
+ colptr += ls;
+@@ -1558,6 +1580,7 @@
+ }
+ if ((ptr) && ((ptr - im->rgb_data) >= w * h * 3))
+ done = 1;
++ free(line);
+ }
+ if (!transp)
+ {
diff --git a/media-libs/imlib/imlib-1.9.15-r4.ebuild b/media-libs/imlib/imlib-1.9.15-r4.ebuild
new file mode 100644
index 000000000000..d85d7b6dd6cd
--- /dev/null
+++ b/media-libs/imlib/imlib-1.9.15-r4.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit autotools eutils multilib-minimal
+
+PVP=(${PV//[-\._]/ })
+DESCRIPTION="Image loading and rendering library"
+HOMEPAGE="http://ftp.acc.umu.se/pub/GNOME/sources/imlib/1.9/"
+SRC_URI="mirror://gnome/sources/${PN}/${PVP[0]}.${PVP[1]}/${P}.tar.bz2
+ mirror://gentoo/gtk-1-for-imlib.m4.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~x86-fbsd"
+IUSE="doc static-libs"
+
+RDEPEND=">=media-libs/tiff-3.9.7-r1[${MULTILIB_USEDEP}]
+ >=media-libs/giflib-4.1.6-r3[${MULTILIB_USEDEP}]
+ >=media-libs/libpng-1.2.51[${MULTILIB_USEDEP}]
+ >=virtual/jpeg-0-r2:0[${MULTILIB_USEDEP}]
+ >=x11-libs/libICE-1.0.8-r1[${MULTILIB_USEDEP}]
+ >=x11-libs/libSM-1.2.1-r1[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-gtklibs[-abi_x86_32(-)]
+ !<=app-emulation/emul-linux-x86-gtklibs-20140406
+ )"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ # Fix aclocal underquoted definition warnings.
+ # Conditionalize gdk functions for bug 40453.
+ # Fix imlib-config for bug 3425.
+ epatch "${FILESDIR}"/${P}.patch
+ epatch "${FILESDIR}"/${PN}-security.patch #security #72681
+ epatch "${FILESDIR}"/${P}-bpp16-CVE-2007-3568.patch # security #201887
+ epatch "${FILESDIR}"/${P}-fix-rendering.patch #197489
+ epatch "${FILESDIR}"/${P}-asneeded.patch #207638
+ epatch "${FILESDIR}"/${P}-libpng15.patch #357167
+
+ mkdir m4 && cp "${WORKDIR}"/gtk-1-for-imlib.m4 m4
+
+ AT_M4DIR="m4" eautoreconf
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ --sysconfdir=/etc/imlib \
+ $(use_enable static-libs static) \
+ --disable-gdk \
+ --disable-gtktest
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install || die
+}
+
+multilib_src_install_all() {
+ dodoc AUTHORS ChangeLog README
+ use doc && dohtml doc/*
+
+ # Punt unused files
+ rm -f "${D}"/usr/lib*/pkgconfig/imlibgdk.pc
+ find "${D}" -name '*.la' -exec rm -f {} +
+}
diff --git a/media-libs/imlib/metadata.xml b/media-libs/imlib/metadata.xml
new file mode 100644
index 000000000000..e770d1bc9a96
--- /dev/null
+++ b/media-libs/imlib/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>graphics</herd>
+</pkgmetadata>
diff --git a/media-libs/imlib2/Manifest b/media-libs/imlib2/Manifest
new file mode 100644
index 000000000000..90cf5f2c1a22
--- /dev/null
+++ b/media-libs/imlib2/Manifest
@@ -0,0 +1,3 @@
+DIST imlib2-1.4.5.tar.gz 986785 SHA256 6e809413a571f82b9e67aeaf5577a1245a034c866ae5fa83c191a227f60cc7a0 SHA512 6c3bceec39ffcb7515925c3eb4199834295732a1cc9cfa307aa8610e2565e770edfc5464ca983d1d95570bd9bac09c989e0751fa39b07cf794c0c5dce4262edf WHIRLPOOL 53c003601ca6f89927794af0f0ba48f31cce31504061b71f68f0d67b0c4266d2617a24df467af2a03d485d129ad6de745382338addf39f70810ec71db6b0833c
+DIST imlib2-1.4.6.tar.gz 971792 SHA256 17cc128c0e61974d59c423b59d0fb5cb85c97169adf5b05184cc58f7c87b4f4e SHA512 8c49f2c9a4b997b536ab7553ffd80b764eccf95c6926a90c10390463e353df27c0e52345bdea9ac8fbefae3e29274022e6a8c0944f406a449293a06192a95fe5 WHIRLPOOL 98ff99fb216a867f60287b369a0b05bf5eea2da23ee8bec14f105f1805f12b035f3ff03ede0bc5909eec178b09e285b5bb0ab0c394487502aa893a94a34da90c
+DIST imlib2-1.4.7.tar.gz 1027716 SHA256 48e98337a560d8904f685447f41c43914fec1f8cd3745a9fd86cba9fd24a6563 SHA512 24728586bf0d2a289fdaa7d05385a059b10092f3f777691881f01d6c9e4aa8f893ebb7bc04933644a9f62163cc649272851f1189f72aee83035816caca3a73a2 WHIRLPOOL 662c671b723f4df8267d84607b74bc76b6790d2a694a2e7b3bef084403ae8f41761813455a404c4886dbf3b7b7782534c17677b1ac81bdccf24120a3d07714e1
diff --git a/media-libs/imlib2/files/imlib2-1.4.5-giflib-5.patch b/media-libs/imlib2/files/imlib2-1.4.5-giflib-5.patch
new file mode 100644
index 000000000000..5ca05247b974
--- /dev/null
+++ b/media-libs/imlib2/files/imlib2-1.4.5-giflib-5.patch
@@ -0,0 +1,31 @@
+https://bugs.gentoo.org/457634
+
+From 1df8defbaa5712fe23d34f13d6aae7a568c720a1 Mon Sep 17 00:00:00 2001
+From: Kim Woelders <kim@woelders.dk>
+Date: Sun, 4 Aug 2013 08:05:27 +0200
+Subject: [PATCH] GIF loader: Fix for libgif version 5.
+
+---
+ src/modules/loaders/loader_gif.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/modules/loaders/loader_gif.c b/src/modules/loaders/loader_gif.c
+index 23b8fd0..d1c2ae2 100644
+--- a/src/modules/loaders/loader_gif.c
++++ b/src/modules/loaders/loader_gif.c
+@@ -36,7 +37,12 @@ load(ImlibImage * im, ImlibProgressFunction progress, char progress_granularity,
+ #endif
+ if (fd < 0)
+ return 0;
++
++#if GIFLIB_MAJOR >= 5
++ gif = DGifOpenFileHandle(fd, NULL);
++#else
+ gif = DGifOpenFileHandle(fd);
++#endif
+ if (!gif)
+ {
+ close(fd);
+--
+1.8.4.3
+
diff --git a/media-libs/imlib2/files/imlib2-1.4.5-no-my-libs.patch b/media-libs/imlib2/files/imlib2-1.4.5-no-my-libs.patch
new file mode 100644
index 000000000000..55afb38bf243
--- /dev/null
+++ b/media-libs/imlib2/files/imlib2-1.4.5-no-my-libs.patch
@@ -0,0 +1,28 @@
+From 5dde234b2d3caf067ea827858c53adc5d4c56c13 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sat, 18 Jan 2014 13:56:54 -0500
+Subject: [PATCH] imlib2-config: delete old reference to @my_libs@
+
+This was cleaned up a while ago, but this file was missed.
+
+URL: https://bugs.gentoo.org/497894
+---
+ imlib2-config.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/imlib2-config.in b/imlib2-config.in
+index cf814c6..965f7c3 100644
+--- a/imlib2-config.in
++++ b/imlib2-config.in
+@@ -46,7 +46,7 @@ while test $# -gt 0; do
+ ;;
+ --libs)
+ libdirs=-L@libdir@
+- echo $libdirs -lImlib2 @my_libs@
++ echo $libdirs -lImlib2
+ ;;
+ *)
+ echo "${usage}" 1>&2
+--
+1.8.4.3
+
diff --git a/media-libs/imlib2/files/imlib2-1.4.6-no-x.patch b/media-libs/imlib2/files/imlib2-1.4.6-no-x.patch
new file mode 100644
index 000000000000..b3ce989b9c3e
--- /dev/null
+++ b/media-libs/imlib2/files/imlib2-1.4.6-no-x.patch
@@ -0,0 +1,33 @@
+https://bugs.gentoo.org/517670
+
+already in upstream
+
+From 3e6ca0b48d2b07980c310935ad1a8dde209efed5 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Mon, 28 Jul 2014 23:01:23 -0400
+Subject: [PATCH] do not link with X libs when X is disabled
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ src/lib/Makefile.am | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
+index b03f753..93c708f 100644
+--- a/src/lib/Makefile.am
++++ b/src/lib/Makefile.am
+@@ -84,7 +84,10 @@ AMD64_OBJS = $(AMD64_SRCS:.S=.lo)
+
+ EXTRA_DIST = $(MMX_SRCS) $(AMD64_SRCS) asm_loadimmq.S
+
+-MY_LIBS = -lXext -lX11 $(FREETYPE_LIBS) $(DLOPEN_LIBS) -lm
++MY_LIBS = $(FREETYPE_LIBS) $(DLOPEN_LIBS) -lm
++if BUILD_X11
++MY_LIBS += -lXext -lX11
++endif
+
+ if BUILD_MMX
+ libImlib2_la_LIBADD = $(MMX_OBJS) $(MY_LIBS)
+--
+2.0.0
+
diff --git a/media-libs/imlib2/files/imlib2-1.4.6-out-of-source-build.patch b/media-libs/imlib2/files/imlib2-1.4.6-out-of-source-build.patch
new file mode 100644
index 000000000000..84426283f8fa
--- /dev/null
+++ b/media-libs/imlib2/files/imlib2-1.4.6-out-of-source-build.patch
@@ -0,0 +1,28 @@
+From 8d5ebc7399ee03d742a1abe115905c807f8186e3 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sat, 17 May 2014 09:23:02 +0200
+Subject: [PATCH] Fix -I flags to support building out-of-source.
+
+When building out-of-source, the headers are located in subdirectories
+in $(top_srcdir) rather than $(top_builddir). Adjust AM_CPPFLAGS
+accordingly.
+---
+ src/bin/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am
+index 1d3d445..111c24a 100644
+--- a/src/bin/Makefile.am
++++ b/src/bin/Makefile.am
+@@ -2,7 +2,7 @@ MAINTAINERCLEANFILES = Makefile.in
+
+ AM_CPPFLAGS = \
+ -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
+--I$(top_builddir)/src/lib \
++-I$(top_srcdir)/src/lib \
+ $(X_CFLAGS)
+
+ if BUILD_X11
+--
+1.9.3
+
diff --git a/media-libs/imlib2/imlib2-1.4.5-r1.ebuild b/media-libs/imlib2/imlib2-1.4.5-r1.ebuild
new file mode 100644
index 000000000000..041400a15497
--- /dev/null
+++ b/media-libs/imlib2/imlib2-1.4.5-r1.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+EGIT_SUB_PROJECT="legacy"
+EGIT_URI_APPEND=${PN}
+
+if [[ ${PV} != "9999" ]] ; then
+ EKEY_STATE="release"
+fi
+
+inherit enlightenment toolchain-funcs
+
+DESCRIPTION="Version 2 of an advanced replacement library for libraries like libXpm"
+HOMEPAGE="http://www.enlightenment.org/"
+
+IUSE="bzip2 gif jpeg cpu_flags_x86_mmx mp3 png static-libs tiff X zlib"
+
+RDEPEND="=media-libs/freetype-2*
+ bzip2? ( app-arch/bzip2 )
+ zlib? ( sys-libs/zlib )
+ gif? ( >=media-libs/giflib-4.1.0 )
+ png? ( media-libs/libpng:0 )
+ jpeg? ( virtual/jpeg:0 )
+ tiff? ( media-libs/tiff:0 )
+ X? (
+ x11-libs/libX11
+ x11-libs/libXext
+ )
+ mp3? ( media-libs/libid3tag )"
+DEPEND="${RDEPEND}
+ png? ( virtual/pkgconfig )
+ X? (
+ x11-proto/xextproto
+ x11-proto/xproto
+ )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.4.5-no-my-libs.patch #497894
+ epatch "${FILESDIR}"/${PN}-1.4.5-giflib-5.patch #457634
+}
+
+src_configure() {
+ # imlib2 has diff configure options for x86/amd64 mmx
+ if [[ $(tc-arch) == amd64 ]]; then
+ E_ECONF+=( $(use_enable cpu_flags_x86_mmx amd64) --disable-mmx )
+ else
+ E_ECONF+=( --disable-amd64 $(use_enable cpu_flags_x86_mmx mmx) )
+ fi
+
+ [[ $(gcc-major-version) -ge 4 ]] && E_ECONF+=( --enable-visibility-hiding )
+
+ E_ECONF+=(
+ $(use_enable static-libs static)
+ $(use_with X x)
+ $(use_with jpeg)
+ $(use_with png)
+ $(use_with tiff)
+ $(use_with gif)
+ $(use_with zlib)
+ $(use_with bzip2)
+ $(use_with mp3 id3)
+ )
+
+ enlightenment_src_configure
+}
+
+src_install() {
+ enlightenment_src_install
+
+ # enlightenment_src_install should take care of this for us, but it doesn't
+ find "${ED}" -name '*.la' -delete
+}
diff --git a/media-libs/imlib2/imlib2-1.4.6-r1.ebuild b/media-libs/imlib2/imlib2-1.4.6-r1.ebuild
new file mode 100644
index 000000000000..ea2512a0e43f
--- /dev/null
+++ b/media-libs/imlib2/imlib2-1.4.6-r1.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+EGIT_SUB_PROJECT="legacy"
+EGIT_URI_APPEND=${PN}
+
+if [[ ${PV} != "9999" ]] ; then
+ EKEY_STATE="snap"
+fi
+
+inherit enlightenment toolchain-funcs
+
+DESCRIPTION="Version 2 of an advanced replacement library for libraries like libXpm"
+HOMEPAGE="http://www.enlightenment.org/"
+
+IUSE="bzip2 gif jpeg cpu_flags_x86_mmx mp3 png static-libs tiff X zlib"
+
+RDEPEND="=media-libs/freetype-2*
+ bzip2? ( app-arch/bzip2 )
+ zlib? ( sys-libs/zlib )
+ gif? ( >=media-libs/giflib-4.1.0 )
+ png? ( media-libs/libpng:0 )
+ jpeg? ( virtual/jpeg:0 )
+ tiff? ( media-libs/tiff:0 )
+ X? (
+ x11-libs/libX11
+ x11-libs/libXext
+ )
+ mp3? ( media-libs/libid3tag )"
+DEPEND="${RDEPEND}
+ png? ( virtual/pkgconfig )
+ X? (
+ x11-proto/xextproto
+ x11-proto/xproto
+ )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.4.5-no-my-libs.patch #497894
+ epatch "${FILESDIR}"/${PN}-1.4.5-giflib-5.patch #457634
+}
+
+src_configure() {
+ # imlib2 has diff configure options for x86/amd64 mmx
+ if [[ $(tc-arch) == amd64 ]]; then
+ E_ECONF+=( $(use_enable cpu_flags_x86_mmx amd64) --disable-mmx )
+ else
+ E_ECONF+=( --disable-amd64 $(use_enable cpu_flags_x86_mmx mmx) )
+ fi
+
+ [[ $(gcc-major-version) -ge 4 ]] && E_ECONF+=( --enable-visibility-hiding )
+
+ E_ECONF+=(
+ $(use_enable static-libs static)
+ $(use_with X x)
+ $(use_with jpeg)
+ $(use_with png)
+ $(use_with tiff)
+ $(use_with gif)
+ $(use_with zlib)
+ $(use_with bzip2)
+ $(use_with mp3 id3)
+ )
+
+ enlightenment_src_configure
+}
+
+src_install() {
+ enlightenment_src_install
+
+ # enlightenment_src_install should take care of this for us, but it doesn't
+ find "${ED}" -name '*.la' -delete
+}
diff --git a/media-libs/imlib2/imlib2-1.4.6-r2.ebuild b/media-libs/imlib2/imlib2-1.4.6-r2.ebuild
new file mode 100644
index 000000000000..8851f39dbbdc
--- /dev/null
+++ b/media-libs/imlib2/imlib2-1.4.6-r2.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+EGIT_SUB_PROJECT="legacy"
+EGIT_URI_APPEND=${PN}
+
+if [[ ${PV} != "9999" ]] ; then
+ EKEY_STATE="snap"
+fi
+
+# Select automake version explicitly to avoid regenerating all autotools.
+# This is a minor optimization.
+WANT_AUTOMAKE="1.13"
+inherit autotools enlightenment toolchain-funcs multilib-minimal
+
+DESCRIPTION="Version 2 of an advanced replacement library for libraries like libXpm"
+HOMEPAGE="http://www.enlightenment.org/"
+
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+IUSE="bzip2 gif jpeg cpu_flags_x86_mmx mp3 png static-libs tiff X zlib"
+
+RDEPEND="=media-libs/freetype-2*[${MULTILIB_USEDEP}]
+ bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
+ gif? ( >=media-libs/giflib-4.1.6-r3[${MULTILIB_USEDEP}] )
+ png? ( >=media-libs/libpng-1.6.10:0[${MULTILIB_USEDEP}] )
+ jpeg? ( >=virtual/jpeg-0-r2:0[${MULTILIB_USEDEP}] )
+ tiff? ( >=media-libs/tiff-4.0.3-r6:0[${MULTILIB_USEDEP}] )
+ X? (
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
+ )
+ mp3? ( >=media-libs/libid3tag-0.15.1b-r3[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ png? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ X? (
+ >=x11-proto/xextproto-7.2.1-r1[${MULTILIB_USEDEP}]
+ >=x11-proto/xproto-7.0.24[${MULTILIB_USEDEP}]
+ )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.4.5-no-my-libs.patch #497894
+ epatch "${FILESDIR}"/${PN}-1.4.5-giflib-5.patch #457634
+ epatch "${FILESDIR}"/${P}-out-of-source-build.patch #510522
+ epatch "${FILESDIR}"/${P}-no-x.patch
+
+ eautomake
+}
+
+multilib_src_configure() {
+ # imlib2 has diff configure options for x86/amd64 mmx
+ if [[ $(tc-arch) == amd64 ]]; then
+ E_ECONF+=( $(use_enable cpu_flags_x86_mmx amd64) --disable-mmx )
+ else
+ E_ECONF+=( --disable-amd64 $(use_enable cpu_flags_x86_mmx mmx) )
+ fi
+
+ [[ $(gcc-major-version) -ge 4 ]] && E_ECONF+=( --enable-visibility-hiding )
+
+ ECONF_SOURCE="${S}" \
+ E_ECONF+=(
+ $(use_enable static-libs static)
+ $(use_with X x)
+ $(use_with jpeg)
+ $(use_with png)
+ $(use_with tiff)
+ $(use_with gif)
+ $(use_with zlib)
+ $(use_with bzip2)
+ $(use_with mp3 id3)
+ )
+
+ enlightenment_src_configure
+}
+
+multilib_src_install() {
+ enlightenment_src_install
+}
diff --git a/media-libs/imlib2/imlib2-1.4.7.ebuild b/media-libs/imlib2/imlib2-1.4.7.ebuild
new file mode 100644
index 000000000000..c307d51d0687
--- /dev/null
+++ b/media-libs/imlib2/imlib2-1.4.7.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+EGIT_SUB_PROJECT="legacy"
+EGIT_URI_APPEND=${PN}
+
+if [[ ${PV} != "9999" ]] ; then
+ EKEY_STATE="snap"
+fi
+
+inherit enlightenment toolchain-funcs multilib-minimal
+
+DESCRIPTION="Version 2 of an advanced replacement library for libraries like libXpm"
+HOMEPAGE="http://www.enlightenment.org/"
+
+IUSE="bzip2 gif jpeg cpu_flags_x86_mmx mp3 png static-libs tiff X zlib"
+
+RDEPEND="=media-libs/freetype-2*[${MULTILIB_USEDEP}]
+ bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
+ gif? ( >=media-libs/giflib-4.1.6-r3[${MULTILIB_USEDEP}] )
+ png? ( >=media-libs/libpng-1.6.10:0[${MULTILIB_USEDEP}] )
+ jpeg? ( >=virtual/jpeg-0-r2:0[${MULTILIB_USEDEP}] )
+ tiff? ( >=media-libs/tiff-4.0.3-r6:0[${MULTILIB_USEDEP}] )
+ X? (
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
+ )
+ mp3? ( >=media-libs/libid3tag-0.15.1b-r3[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ png? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ X? (
+ >=x11-proto/xextproto-7.2.1-r1[${MULTILIB_USEDEP}]
+ >=x11-proto/xproto-7.0.24[${MULTILIB_USEDEP}]
+ )"
+
+multilib_src_configure() {
+ # imlib2 has diff configure options for x86/amd64 mmx
+ if [[ $(tc-arch) == amd64 ]]; then
+ E_ECONF+=( $(use_enable cpu_flags_x86_mmx amd64) --disable-mmx )
+ else
+ E_ECONF+=( --disable-amd64 $(use_enable cpu_flags_x86_mmx mmx) )
+ fi
+
+ [[ $(gcc-major-version) -ge 4 ]] && E_ECONF+=( --enable-visibility-hiding )
+
+ ECONF_SOURCE="${S}" \
+ E_ECONF+=(
+ $(use_enable static-libs static)
+ $(use_with X x)
+ $(use_with jpeg)
+ $(use_with png)
+ $(use_with tiff)
+ $(use_with gif)
+ $(use_with zlib)
+ $(use_with bzip2)
+ $(use_with mp3 id3)
+ )
+
+ enlightenment_src_configure
+}
+
+multilib_src_install() {
+ enlightenment_src_install
+}
diff --git a/media-libs/imlib2/imlib2-9999.ebuild b/media-libs/imlib2/imlib2-9999.ebuild
new file mode 100644
index 000000000000..3d0fb2ef858f
--- /dev/null
+++ b/media-libs/imlib2/imlib2-9999.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+EGIT_SUB_PROJECT="legacy"
+EGIT_URI_APPEND=${PN}
+
+if [[ ${PV} != "9999" ]] ; then
+ EKEY_STATE="stable"
+fi
+
+inherit enlightenment toolchain-funcs multilib-minimal
+
+DESCRIPTION="Version 2 of an advanced replacement library for libraries like libXpm"
+HOMEPAGE="http://www.enlightenment.org/"
+
+IUSE="bzip2 gif jpeg cpu_flags_x86_mmx mp3 png static-libs tiff X zlib"
+
+RDEPEND="=media-libs/freetype-2*[${MULTILIB_USEDEP}]
+ bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
+ gif? ( >=media-libs/giflib-4.1.6-r3[${MULTILIB_USEDEP}] )
+ png? ( >=media-libs/libpng-1.6.10:0[${MULTILIB_USEDEP}] )
+ jpeg? ( >=virtual/jpeg-0-r2:0[${MULTILIB_USEDEP}] )
+ tiff? ( >=media-libs/tiff-4.0.3-r6:0[${MULTILIB_USEDEP}] )
+ X? (
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
+ )
+ mp3? ( >=media-libs/libid3tag-0.15.1b-r3[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ png? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
+ X? (
+ >=x11-proto/xextproto-7.2.1-r1[${MULTILIB_USEDEP}]
+ >=x11-proto/xproto-7.0.24[${MULTILIB_USEDEP}]
+ )"
+
+multilib_src_configure() {
+ # imlib2 has diff configure options for x86/amd64 mmx
+ if [[ $(tc-arch) == amd64 ]]; then
+ E_ECONF+=( $(use_enable cpu_flags_x86_mmx amd64) --disable-mmx )
+ else
+ E_ECONF+=( --disable-amd64 $(use_enable cpu_flags_x86_mmx mmx) )
+ fi
+
+ [[ $(gcc-major-version) -ge 4 ]] && E_ECONF+=( --enable-visibility-hiding )
+
+ ECONF_SOURCE="${S}" \
+ E_ECONF+=(
+ $(use_enable static-libs static)
+ $(use_with X x)
+ $(use_with jpeg)
+ $(use_with png)
+ $(use_with tiff)
+ $(use_with gif)
+ $(use_with zlib)
+ $(use_with bzip2)
+ $(use_with mp3 id3)
+ )
+
+ enlightenment_src_configure
+}
+
+multilib_src_install() {
+ enlightenment_src_install
+}
diff --git a/media-libs/imlib2/metadata.xml b/media-libs/imlib2/metadata.xml
new file mode 100644
index 000000000000..0bf556b63f44
--- /dev/null
+++ b/media-libs/imlib2/metadata.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>enlightenment</herd>
+ <longdescription>
+Imlib 2 is the successor to Imlib. It is not just a newer version - it is a
+completely new library. Imlib2 can be installed alongside Imlib 1.x without any
+problems since they are effectively different libraries - but they Have very
+similar functionality.
+
+Imlib2 can do the following:
+* Load image files from disk in one of many formats
+* Save images to disk in one of many formats
+* Render image data onto other images
+* Render images to an X-Windows drawable
+* Produce pixmaps and pixmap masks of Images
+* Apply filters to images
+* Rotate images
+* Accept RGBA Data for images
+* Scale images
+* Alpha blend Images on other images or drawables
+* Apply color correction and modification tables and factors to images
+* Render images onto images with color correction and modification tables
+* Render truetype anti-aliased text
+* Render truetype anti-aliased text at any angle
+* Render anti-aliased lines
+* Render rectangles
+* Render linear multi-colored gradients
+* Cache data intelligently for maximum performance
+* Allocate colors automatically
+* Allow full control over caching and color allocation
+* Provide highly optimized MMX assembly for core routines
+* Provide plug-in filter interface
+* Provide on-the-fly runtime plug-in image loading and saving interface
+* Fastest image compositing, rendering and manipulation library for X
+
+If what you want isn't in the list above somewhere then likely Imlib 2 does not
+do it. If it does it it likely does it faster than any other library you can find
+(this includes gdk-pixbuf, gdkrgb, etc.) primarily because of highly optimized
+code and a smart subsystem that does the dirty work for you and picks up the
+pieces for you so you can be lazy and let all the optimizations for you.
+
+Imlib 2 can run without a display, so it can be easily used for background image
+processing for web sites or servers - it only requires the X libraries to be
+installed - that is all - it does not require an XServer to run unless you wish
+to display images.
+ </longdescription>
+</pkgmetadata>
diff --git a/media-libs/iulib/Manifest b/media-libs/iulib/Manifest
new file mode 100644
index 000000000000..b80e21fdf8a2
--- /dev/null
+++ b/media-libs/iulib/Manifest
@@ -0,0 +1,2 @@
+DIST iulib-0.3.tar.gz 3065868 SHA256 229f6c6b3724a442efd7306def6d2b35cd7ad38ec725adc6446632c9e8cd20f2
+DIST iulib-0.4.tgz 3288112 SHA256 c70dab420f5ce0ff0185c922881576f4a82eacec3feb0befa66bd7468151d99b
diff --git a/media-libs/iulib/files/iulib-0.3-install.patch b/media-libs/iulib/files/iulib-0.3-install.patch
new file mode 100644
index 000000000000..542420c4a13a
--- /dev/null
+++ b/media-libs/iulib/files/iulib-0.3-install.patch
@@ -0,0 +1,40 @@
+http://code.google.com/p/iulib/issues/detail?id=3
+
+--- Makefile.in
++++ Makefile.in
+@@ -43,7 +43,7 @@ POST_UNINSTALL = :
+ @have_vidio_TRUE@am__append_4 = $(srcdir)/vidio/vidio.h
+ @have_v4l2_TRUE@am__append_5 = $(srcdir)/vidio/v4l2cap.cc
+ subdir = .
+-DIST_COMMON = $(am__configure_deps) $(am__include_HEADERS_DIST) \
++DIST_COMMON = README $(am__configure_deps) $(am__include_HEADERS_DIST) \
+ $(colib_HEADERS) $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(top_srcdir)/configure COPYING INSTALL TODO depcomp \
+ install-sh missing
+@@ -997,6 +997,7 @@ installdirs:
+ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(colibdir)" "$(DESTDIR)$(includedir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
++install: install-am
+ install-exec: install-exec-am
+ install-data: install-data-am
+ uninstall: uninstall-am
+@@ -1088,18 +1089,6 @@ uninstall-am: uninstall-colibHEADERS uninstall-includeHEADERS \
+ uninstall-am uninstall-colibHEADERS uninstall-includeHEADERS \
+ uninstall-info-am uninstall-libLIBRARIES
+
+-
+-# make installation of colib a separate target
+-
+-install-colib:
+- install -d $(colibdir)
+- install $(colib_HEADERS) $(colibdir)
+-
+-install: all install-colib
+- install -d $(includedir)
+- install -d $(libdir)
+- install $(include_HEADERS) $(includedir)
+- install $(lib_LIBRARIES) $(libdir)
+ # 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-libs/iulib/files/iulib-0.4-scons-build-env.patch b/media-libs/iulib/files/iulib-0.4-scons-build-env.patch
new file mode 100644
index 000000000000..3983d9c820b4
--- /dev/null
+++ b/media-libs/iulib/files/iulib-0.4-scons-build-env.patch
@@ -0,0 +1,39 @@
+--- SConstruct
++++ SConstruct
+@@ -36,12 +36,25 @@
+
+ ### Options exposed via SCons
+ opts = Options('custom.py')
+-opts.Add('opt', 'Compiler flags for optimization/debugging', "-g -O3")
++opts.Add('opt', 'Compiler flags for optimization/debugging', "")
+ opts.Add('warn', 'Compiler flags for warnings', "-Wall -D__warn_unused_result__=__far__")
+ opts.Add('prefix', 'The installation root for iulib', "/usr/local")
+
++env = Environment(options=opts)
++
++import SCons.Util
++if os.environ.has_key('CC'):
++ env['CC'] = os.environ['CC']
++if os.environ.has_key('CFLAGS'):
++ env['CCFLAGS'] += SCons.Util.CLVar(os.environ['CFLAGS'])
++if os.environ.has_key('CXX'):
++ env['CXX'] = os.environ['CXX']
++if os.environ.has_key('CXXFLAGS'):
++ env['CXXFLAGS'] += SCons.Util.CLVar(os.environ['CXXFLAGS'])
++if os.environ.has_key('LDFLAGS'):
++ env['LINKFLAGS'] += SCons.Util.CLVar(os.environ['LDFLAGS'])
++
+ ### globals
+-env = Environment(options=opts, CXXFLAGS="${opt} ${warn}")
+ Help(opts.GenerateHelpText(env))
+ conf = Configure(env)
+ if "-DUNSAFE" in env["opt"]:
+@@ -134,7 +147,7 @@
+ src_suffix = '')
+ progs.Append(BUILDERS={'Test':test_builder})
+
+-if True: #"test" in COMMAND_LINE_TARGETS:
++if "test" in COMMAND_LINE_TARGETS:
+ for file in glob.glob("*/test-*.cc") + glob.glob("*/*/test-*.cc"):
+ if not file.startswith('vidio'):
+ progs.Program(file[:-3],file)
diff --git a/media-libs/iulib/iulib-0.3.ebuild b/media-libs/iulib/iulib-0.3.ebuild
new file mode 100644
index 000000000000..96413a6512c6
--- /dev/null
+++ b/media-libs/iulib/iulib-0.3.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+DESCRIPTION="easy-to-use image and video I/O functions"
+HOMEPAGE="http://code.google.com/p/iulib/"
+SRC_URI="http://iulib.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="sdl"
+
+DEPEND="sys-libs/zlib
+ media-libs/libpng
+ virtual/jpeg
+ media-libs/tiff
+ sdl? ( media-libs/libsdl )"
+
+S=${WORKDIR}/${PN}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-install.patch
+}
+
+src_compile() {
+ econf $(use_with sdl SDL) || die
+ emake || die
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die
+ dodoc CHANGES README TODO
+}
diff --git a/media-libs/iulib/iulib-0.4.ebuild b/media-libs/iulib/iulib-0.4.ebuild
new file mode 100644
index 000000000000..edb8dacc1607
--- /dev/null
+++ b/media-libs/iulib/iulib-0.4.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils toolchain-funcs multilib scons-utils
+
+DESCRIPTION="easy-to-use image and video I/O functions"
+HOMEPAGE="http://code.google.com/p/iulib/"
+SRC_URI="http://iulib.googlecode.com/files/${P}.tgz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="sdl"
+
+RDEPEND="sys-libs/zlib
+ media-libs/libpng
+ virtual/jpeg
+ media-libs/tiff
+ sdl? (
+ media-libs/libsdl
+ media-libs/sdl-gfx
+ )"
+DEPEND="${RDEPEND}
+ dev-util/scons"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.4-scons-build-env.patch
+ sed -i \
+ -e "/^have_sdl = 1/s:1:$(usex sdl 1 0):" \
+ -e '/tiff/s:inflate:TIFFOpen:' \
+ -e '/progs.Append(LIBS=libiulib)/s:Append:Prepend:' \
+ -e "/^libdir/s:/lib:/$(get_libdir):" \
+ SConstruct || die #297326 #308955 #310439
+ sed -i '/SDL.SDL_image.h/d' utils/dgraphics.cc || die #310443
+ tc-export AR CC CXX RANLIB
+}
+
+src_configure() {
+ # Avoid configure as we build/install with scons
+ :
+}
+
+src_compile() {
+ escons prefix=/usr
+}
+
+src_install() {
+ escons prefix="${D}"/usr install
+ dodoc CHANGES README TODO
+}
diff --git a/media-libs/iulib/metadata.xml b/media-libs/iulib/metadata.xml
new file mode 100644
index 000000000000..0213a52c37fe
--- /dev/null
+++ b/media-libs/iulib/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>maintainer-needed@gentoo.org</email></maintainer>
+ <upstream>
+ <remote-id type="google-code">iulib</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/jasper/Manifest b/media-libs/jasper/Manifest
new file mode 100644
index 000000000000..a9004f7f56dc
--- /dev/null
+++ b/media-libs/jasper/Manifest
@@ -0,0 +1,2 @@
+DIST jasper-1.900.1-fixes-20120611.patch.bz2 26303 SHA256 8727c94843f141c311be54eed97eca18f96542f52b991df6f7d4f005bad2ec59 SHA512 36ec1735a89008fa6be16698f78ca5ec52d4ef34f10653ba3bf081c665c4e2d747cdbd7bfc0d56859ad4dc0fac166cf08248336d25d3ba8e7feb57e65d5c5ef6 WHIRLPOOL 341639dc208c44eefb18d14b16bc74591989e4ec0bf6426bee1ed161f1c997a23dad487ac821f2bf8e1ae16ae74d6174dce39a913b44b4e24628a7a1510395a7
+DIST jasper-1.900.1.zip 1415752 SHA256 6b905a9c2aca2e275544212666eefc4eb44d95d0a57e4305457b407fe63f9494 SHA512 e3a3c803de848b50482f5bd693b1945197c6999285226c45b671855734d7bb2611fbe6f28cd8ba9c56a4ea59417795eba42d72516c9fec93b8fbaa21b8210cb6 WHIRLPOOL cd53901537bb8d32706e82326bf01f7f960af5172e2da738d1fcc9c5a4087829210a177d3df96617cf289e5db8ec97e06aa6cd60ada3b887db65418b90e9a86b
diff --git a/media-libs/jasper/files/CVE-2011-4516+7.patch b/media-libs/jasper/files/CVE-2011-4516+7.patch
new file mode 100644
index 000000000000..1f1c7bb35f63
--- /dev/null
+++ b/media-libs/jasper/files/CVE-2011-4516+7.patch
@@ -0,0 +1,24 @@
+diff -up jasper-1.900.1/src/libjasper/jpc/jpc_cs.c.CERT-VU-887409 jasper-1.900.1/src/libjasper/jpc/jpc_cs.c
+--- jasper-1.900.1/src/libjasper/jpc/jpc_cs.c.CERT-VU-887409 2011-10-25 17:25:39.000000000 +0200
++++ jasper-1.900.1/src/libjasper/jpc/jpc_cs.c 2011-10-25 17:29:14.379371908 +0200
+@@ -744,6 +744,10 @@ static int jpc_cox_getcompparms(jpc_ms_t
+ return -1;
+ }
+ compparms->numrlvls = compparms->numdlvls + 1;
++ if (compparms->numrlvls > JPC_MAXRLVLS) {
++ jpc_cox_destroycompparms(compparms);
++ return -1;
++ }
+ if (prtflag) {
+ for (i = 0; i < compparms->numrlvls; ++i) {
+ if (jpc_getuint8(in, &tmp)) {
+@@ -1331,7 +1335,7 @@ static int jpc_crg_getparms(jpc_ms_t *ms
+ jpc_crgcomp_t *comp;
+ uint_fast16_t compno;
+ crg->numcomps = cstate->numcomps;
+- if (!(crg->comps = jas_alloc2(cstate->numcomps, sizeof(uint_fast16_t)))) {
++ if (!(crg->comps = jas_alloc2(cstate->numcomps, sizeof(jpc_crgcomp_t)))) {
+ return -1;
+ }
+ for (compno = 0, comp = crg->comps; compno < cstate->numcomps;
+
diff --git a/media-libs/jasper/files/jasper-1.701.0-GL-ac.patch b/media-libs/jasper/files/jasper-1.701.0-GL-ac.patch
new file mode 100644
index 000000000000..bf571433c0b8
--- /dev/null
+++ b/media-libs/jasper/files/jasper-1.701.0-GL-ac.patch
@@ -0,0 +1,11 @@
+--- jasper-1.701.0.GEO/configure.ac.GL 2006-02-20 19:58:02.000000000 -0600
++++ jasper-1.701.0.GEO/configure.ac 2006-02-24 07:40:38.000000000 -0600
+@@ -242,7 +242,7 @@
+ OPENGL_LIBS=""
+ if test $ENABLE_OPENGL = yes; then
+ if test $HAVE_OPENGL = no; then
+- TMPLIBS="-lglut -lGL -lGLU $X_PRE_LIBS -lX11 -lXmu -lXi -lXext -lXt $X_EXTRA_LIBS $X_LIBS"
++ TMPLIBS="-lglut -lGL -lGLU"
+ AC_CHECK_LIB(glut, glutInit, [HAVE_OPENGL=yes;
+ OPENGL_LIBS=$TMPLIBS], HAVE_OPENGL=no, $TMPLIBS)
+ fi
diff --git a/media-libs/jasper/files/jasper-1.701.0-GL.patch b/media-libs/jasper/files/jasper-1.701.0-GL.patch
new file mode 100644
index 000000000000..ba199e226faf
--- /dev/null
+++ b/media-libs/jasper/files/jasper-1.701.0-GL.patch
@@ -0,0 +1,11 @@
+--- jasper-1.701.0.GEO/configure.GL 2006-02-20 20:01:30.000000000 -0600
++++ jasper-1.701.0.GEO/configure 2006-02-24 07:40:46.000000000 -0600
+@@ -9464,7 +9464,7 @@
+ OPENGL_LIBS=""
+ if test $ENABLE_OPENGL = yes; then
+ if test $HAVE_OPENGL = no; then
+- TMPLIBS="-lglut -lGL -lGLU $X_PRE_LIBS -lX11 -lXmu -lXi -lXext -lXt $X_EXTRA_LIBS $X_LIBS"
++ TMPLIBS="-lglut -lGL -lGLU"
+ echo "$as_me:$LINENO: checking for glutInit in -lglut" >&5
+ echo $ECHO_N "checking for glutInit in -lglut... $ECHO_C" >&6
+ if test "${ac_cv_lib_glut_glutInit+set}" = set; then
diff --git a/media-libs/jasper/files/jasper-CVE-2014-8137.patch b/media-libs/jasper/files/jasper-CVE-2014-8137.patch
new file mode 100644
index 000000000000..9600cd3231de
--- /dev/null
+++ b/media-libs/jasper/files/jasper-CVE-2014-8137.patch
@@ -0,0 +1,57 @@
+--- jasper-1.900.1.orig/src/libjasper/base/jas_icc.c 2014-12-11 14:06:44.000000000 +0100
++++ jasper-1.900.1/src/libjasper/base/jas_icc.c 2014-12-11 15:16:37.971272386 +0100
+@@ -1009,7 +1009,6 @@ static int jas_icccurv_input(jas_iccattr
+ return 0;
+
+ error:
+- jas_icccurv_destroy(attrval);
+ return -1;
+ }
+
+@@ -1127,7 +1126,6 @@ static int jas_icctxtdesc_input(jas_icca
+ #endif
+ return 0;
+ error:
+- jas_icctxtdesc_destroy(attrval);
+ return -1;
+ }
+
+@@ -1206,8 +1204,6 @@ static int jas_icctxt_input(jas_iccattrv
+ goto error;
+ return 0;
+ error:
+- if (txt->string)
+- jas_free(txt->string);
+ return -1;
+ }
+
+@@ -1328,7 +1324,6 @@ static int jas_icclut8_input(jas_iccattr
+ goto error;
+ return 0;
+ error:
+- jas_icclut8_destroy(attrval);
+ return -1;
+ }
+
+@@ -1497,7 +1492,6 @@ static int jas_icclut16_input(jas_iccatt
+ goto error;
+ return 0;
+ error:
+- jas_icclut16_destroy(attrval);
+ return -1;
+ }
+
+--- jasper-1.900.1.orig/src/libjasper/jp2/jp2_dec.c 2014-12-11 14:30:54.193209780 +0100
++++ jasper-1.900.1/src/libjasper/jp2/jp2_dec.c 2014-12-11 14:36:46.313217814 +0100
+@@ -291,7 +291,10 @@ jas_image_t *jp2_decode(jas_stream_t *in
+ case JP2_COLR_ICC:
+ iccprof = jas_iccprof_createfrombuf(dec->colr->data.colr.iccp,
+ dec->colr->data.colr.iccplen);
+- assert(iccprof);
++ if (!iccprof) {
++ jas_eprintf("error: failed to parse ICC profile\n");
++ goto error;
++ }
+ jas_iccprof_gethdr(iccprof, &icchdr);
+ jas_eprintf("ICC Profile CS %08x\n", icchdr.colorspc);
+ jas_image_setclrspc(dec->image, fromiccpcs(icchdr.colorspc));
diff --git a/media-libs/jasper/files/jasper-CVE-2014-8138.patch b/media-libs/jasper/files/jasper-CVE-2014-8138.patch
new file mode 100644
index 000000000000..5aaf8abb1d5e
--- /dev/null
+++ b/media-libs/jasper/files/jasper-CVE-2014-8138.patch
@@ -0,0 +1,14 @@
+--- jasper-1.900.1.orig/src/libjasper/jp2/jp2_dec.c 2014-12-11 14:06:44.000000000 +0100
++++ jasper-1.900.1/src/libjasper/jp2/jp2_dec.c 2014-12-11 14:06:26.000000000 +0100
+@@ -386,6 +386,11 @@ jas_image_t *jp2_decode(jas_stream_t *in
+ /* Determine the type of each component. */
+ if (dec->cdef) {
+ for (i = 0; i < dec->numchans; ++i) {
++ /* Is the channel number reasonable? */
++ if (dec->cdef->data.cdef.ents[i].channo >= dec->numchans) {
++ jas_eprintf("error: invalid channel number in CDEF box\n");
++ goto error;
++ }
+ jas_image_setcmpttype(dec->image,
+ dec->chantocmptlut[dec->cdef->data.cdef.ents[i].channo],
+ jp2_getct(jas_image_clrspc(dec->image),
diff --git a/media-libs/jasper/files/jasper-CVE-2014-8157.patch b/media-libs/jasper/files/jasper-CVE-2014-8157.patch
new file mode 100644
index 000000000000..ebfc1b2d0f25
--- /dev/null
+++ b/media-libs/jasper/files/jasper-CVE-2014-8157.patch
@@ -0,0 +1,12 @@
+diff -up jasper-1.900.1/src/libjasper/jpc/jpc_dec.c.CVE-2014-8157 jasper-1.900.1/src/libjasper/jpc/jpc_dec.c
+--- jasper-1.900.1/src/libjasper/jpc/jpc_dec.c.CVE-2014-8157 2015-01-19 16:59:36.000000000 +0100
++++ jasper-1.900.1/src/libjasper/jpc/jpc_dec.c 2015-01-19 17:07:41.609863268 +0100
+@@ -489,7 +489,7 @@ static int jpc_dec_process_sot(jpc_dec_t
+ dec->curtileendoff = 0;
+ }
+
+- if (JAS_CAST(int, sot->tileno) > dec->numtiles) {
++ if (JAS_CAST(int, sot->tileno) >= dec->numtiles) {
+ jas_eprintf("invalid tile number in SOT marker segment\n");
+ return -1;
+ }
diff --git a/media-libs/jasper/files/jasper-CVE-2014-8158.patch b/media-libs/jasper/files/jasper-CVE-2014-8158.patch
new file mode 100644
index 000000000000..ce9e4b497f39
--- /dev/null
+++ b/media-libs/jasper/files/jasper-CVE-2014-8158.patch
@@ -0,0 +1,329 @@
+diff -up jasper-1.900.1/src/libjasper/jpc/jpc_qmfb.c.CVE-2014-8158 jasper-1.900.1/src/libjasper/jpc/jpc_qmfb.c
+--- jasper-1.900.1/src/libjasper/jpc/jpc_qmfb.c.CVE-2014-8158 2015-01-19 17:25:28.730195502 +0100
++++ jasper-1.900.1/src/libjasper/jpc/jpc_qmfb.c 2015-01-19 17:27:20.214663127 +0100
+@@ -306,11 +306,7 @@ void jpc_qmfb_split_row(jpc_fix_t *a, in
+ {
+
+ int bufsize = JPC_CEILDIVPOW2(numcols, 1);
+-#if !defined(HAVE_VLA)
+ jpc_fix_t splitbuf[QMFB_SPLITBUFSIZE];
+-#else
+- jpc_fix_t splitbuf[bufsize];
+-#endif
+ jpc_fix_t *buf = splitbuf;
+ register jpc_fix_t *srcptr;
+ register jpc_fix_t *dstptr;
+@@ -318,7 +314,6 @@ void jpc_qmfb_split_row(jpc_fix_t *a, in
+ register int m;
+ int hstartcol;
+
+-#if !defined(HAVE_VLA)
+ /* Get a buffer. */
+ if (bufsize > QMFB_SPLITBUFSIZE) {
+ if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) {
+@@ -326,7 +321,6 @@ void jpc_qmfb_split_row(jpc_fix_t *a, in
+ abort();
+ }
+ }
+-#endif
+
+ if (numcols >= 2) {
+ hstartcol = (numcols + 1 - parity) >> 1;
+@@ -360,12 +354,10 @@ void jpc_qmfb_split_row(jpc_fix_t *a, in
+ }
+ }
+
+-#if !defined(HAVE_VLA)
+ /* If the split buffer was allocated on the heap, free this memory. */
+ if (buf != splitbuf) {
+ jas_free(buf);
+ }
+-#endif
+
+ }
+
+@@ -374,11 +366,7 @@ void jpc_qmfb_split_col(jpc_fix_t *a, in
+ {
+
+ int bufsize = JPC_CEILDIVPOW2(numrows, 1);
+-#if !defined(HAVE_VLA)
+ jpc_fix_t splitbuf[QMFB_SPLITBUFSIZE];
+-#else
+- jpc_fix_t splitbuf[bufsize];
+-#endif
+ jpc_fix_t *buf = splitbuf;
+ register jpc_fix_t *srcptr;
+ register jpc_fix_t *dstptr;
+@@ -386,7 +374,6 @@ void jpc_qmfb_split_col(jpc_fix_t *a, in
+ register int m;
+ int hstartcol;
+
+-#if !defined(HAVE_VLA)
+ /* Get a buffer. */
+ if (bufsize > QMFB_SPLITBUFSIZE) {
+ if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) {
+@@ -394,7 +381,6 @@ void jpc_qmfb_split_col(jpc_fix_t *a, in
+ abort();
+ }
+ }
+-#endif
+
+ if (numrows >= 2) {
+ hstartcol = (numrows + 1 - parity) >> 1;
+@@ -428,12 +414,10 @@ void jpc_qmfb_split_col(jpc_fix_t *a, in
+ }
+ }
+
+-#if !defined(HAVE_VLA)
+ /* If the split buffer was allocated on the heap, free this memory. */
+ if (buf != splitbuf) {
+ jas_free(buf);
+ }
+-#endif
+
+ }
+
+@@ -442,11 +426,7 @@ void jpc_qmfb_split_colgrp(jpc_fix_t *a,
+ {
+
+ int bufsize = JPC_CEILDIVPOW2(numrows, 1);
+-#if !defined(HAVE_VLA)
+ jpc_fix_t splitbuf[QMFB_SPLITBUFSIZE * JPC_QMFB_COLGRPSIZE];
+-#else
+- jpc_fix_t splitbuf[bufsize * JPC_QMFB_COLGRPSIZE];
+-#endif
+ jpc_fix_t *buf = splitbuf;
+ jpc_fix_t *srcptr;
+ jpc_fix_t *dstptr;
+@@ -457,7 +437,6 @@ void jpc_qmfb_split_colgrp(jpc_fix_t *a,
+ int m;
+ int hstartcol;
+
+-#if !defined(HAVE_VLA)
+ /* Get a buffer. */
+ if (bufsize > QMFB_SPLITBUFSIZE) {
+ if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) {
+@@ -465,7 +444,6 @@ void jpc_qmfb_split_colgrp(jpc_fix_t *a,
+ abort();
+ }
+ }
+-#endif
+
+ if (numrows >= 2) {
+ hstartcol = (numrows + 1 - parity) >> 1;
+@@ -517,12 +495,10 @@ void jpc_qmfb_split_colgrp(jpc_fix_t *a,
+ }
+ }
+
+-#if !defined(HAVE_VLA)
+ /* If the split buffer was allocated on the heap, free this memory. */
+ if (buf != splitbuf) {
+ jas_free(buf);
+ }
+-#endif
+
+ }
+
+@@ -531,11 +507,7 @@ void jpc_qmfb_split_colres(jpc_fix_t *a,
+ {
+
+ int bufsize = JPC_CEILDIVPOW2(numrows, 1);
+-#if !defined(HAVE_VLA)
+ jpc_fix_t splitbuf[QMFB_SPLITBUFSIZE * JPC_QMFB_COLGRPSIZE];
+-#else
+- jpc_fix_t splitbuf[bufsize * numcols];
+-#endif
+ jpc_fix_t *buf = splitbuf;
+ jpc_fix_t *srcptr;
+ jpc_fix_t *dstptr;
+@@ -546,7 +518,6 @@ void jpc_qmfb_split_colres(jpc_fix_t *a,
+ int m;
+ int hstartcol;
+
+-#if !defined(HAVE_VLA)
+ /* Get a buffer. */
+ if (bufsize > QMFB_SPLITBUFSIZE) {
+ if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) {
+@@ -554,7 +525,6 @@ void jpc_qmfb_split_colres(jpc_fix_t *a,
+ abort();
+ }
+ }
+-#endif
+
+ if (numrows >= 2) {
+ hstartcol = (numrows + 1 - parity) >> 1;
+@@ -606,12 +576,10 @@ void jpc_qmfb_split_colres(jpc_fix_t *a,
+ }
+ }
+
+-#if !defined(HAVE_VLA)
+ /* If the split buffer was allocated on the heap, free this memory. */
+ if (buf != splitbuf) {
+ jas_free(buf);
+ }
+-#endif
+
+ }
+
+@@ -619,18 +587,13 @@ void jpc_qmfb_join_row(jpc_fix_t *a, int
+ {
+
+ int bufsize = JPC_CEILDIVPOW2(numcols, 1);
+-#if !defined(HAVE_VLA)
+ jpc_fix_t joinbuf[QMFB_JOINBUFSIZE];
+-#else
+- jpc_fix_t joinbuf[bufsize];
+-#endif
+ jpc_fix_t *buf = joinbuf;
+ register jpc_fix_t *srcptr;
+ register jpc_fix_t *dstptr;
+ register int n;
+ int hstartcol;
+
+-#if !defined(HAVE_VLA)
+ /* Allocate memory for the join buffer from the heap. */
+ if (bufsize > QMFB_JOINBUFSIZE) {
+ if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) {
+@@ -638,7 +601,6 @@ void jpc_qmfb_join_row(jpc_fix_t *a, int
+ abort();
+ }
+ }
+-#endif
+
+ hstartcol = (numcols + 1 - parity) >> 1;
+
+@@ -670,12 +632,10 @@ void jpc_qmfb_join_row(jpc_fix_t *a, int
+ ++srcptr;
+ }
+
+-#if !defined(HAVE_VLA)
+ /* If the join buffer was allocated on the heap, free this memory. */
+ if (buf != joinbuf) {
+ jas_free(buf);
+ }
+-#endif
+
+ }
+
+@@ -684,18 +644,13 @@ void jpc_qmfb_join_col(jpc_fix_t *a, int
+ {
+
+ int bufsize = JPC_CEILDIVPOW2(numrows, 1);
+-#if !defined(HAVE_VLA)
+ jpc_fix_t joinbuf[QMFB_JOINBUFSIZE];
+-#else
+- jpc_fix_t joinbuf[bufsize];
+-#endif
+ jpc_fix_t *buf = joinbuf;
+ register jpc_fix_t *srcptr;
+ register jpc_fix_t *dstptr;
+ register int n;
+ int hstartcol;
+
+-#if !defined(HAVE_VLA)
+ /* Allocate memory for the join buffer from the heap. */
+ if (bufsize > QMFB_JOINBUFSIZE) {
+ if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) {
+@@ -703,7 +658,6 @@ void jpc_qmfb_join_col(jpc_fix_t *a, int
+ abort();
+ }
+ }
+-#endif
+
+ hstartcol = (numrows + 1 - parity) >> 1;
+
+@@ -735,12 +689,10 @@ void jpc_qmfb_join_col(jpc_fix_t *a, int
+ ++srcptr;
+ }
+
+-#if !defined(HAVE_VLA)
+ /* If the join buffer was allocated on the heap, free this memory. */
+ if (buf != joinbuf) {
+ jas_free(buf);
+ }
+-#endif
+
+ }
+
+@@ -749,11 +701,7 @@ void jpc_qmfb_join_colgrp(jpc_fix_t *a,
+ {
+
+ int bufsize = JPC_CEILDIVPOW2(numrows, 1);
+-#if !defined(HAVE_VLA)
+ jpc_fix_t joinbuf[QMFB_JOINBUFSIZE * JPC_QMFB_COLGRPSIZE];
+-#else
+- jpc_fix_t joinbuf[bufsize * JPC_QMFB_COLGRPSIZE];
+-#endif
+ jpc_fix_t *buf = joinbuf;
+ jpc_fix_t *srcptr;
+ jpc_fix_t *dstptr;
+@@ -763,7 +711,6 @@ void jpc_qmfb_join_colgrp(jpc_fix_t *a,
+ register int i;
+ int hstartcol;
+
+-#if !defined(HAVE_VLA)
+ /* Allocate memory for the join buffer from the heap. */
+ if (bufsize > QMFB_JOINBUFSIZE) {
+ if (!(buf = jas_alloc2(bufsize, JPC_QMFB_COLGRPSIZE * sizeof(jpc_fix_t)))) {
+@@ -771,7 +718,6 @@ void jpc_qmfb_join_colgrp(jpc_fix_t *a,
+ abort();
+ }
+ }
+-#endif
+
+ hstartcol = (numrows + 1 - parity) >> 1;
+
+@@ -821,12 +767,10 @@ void jpc_qmfb_join_colgrp(jpc_fix_t *a,
+ srcptr += JPC_QMFB_COLGRPSIZE;
+ }
+
+-#if !defined(HAVE_VLA)
+ /* If the join buffer was allocated on the heap, free this memory. */
+ if (buf != joinbuf) {
+ jas_free(buf);
+ }
+-#endif
+
+ }
+
+@@ -835,11 +779,7 @@ void jpc_qmfb_join_colres(jpc_fix_t *a,
+ {
+
+ int bufsize = JPC_CEILDIVPOW2(numrows, 1);
+-#if !defined(HAVE_VLA)
+ jpc_fix_t joinbuf[QMFB_JOINBUFSIZE * JPC_QMFB_COLGRPSIZE];
+-#else
+- jpc_fix_t joinbuf[bufsize * numcols];
+-#endif
+ jpc_fix_t *buf = joinbuf;
+ jpc_fix_t *srcptr;
+ jpc_fix_t *dstptr;
+@@ -849,7 +789,6 @@ void jpc_qmfb_join_colres(jpc_fix_t *a,
+ register int i;
+ int hstartcol;
+
+-#if !defined(HAVE_VLA)
+ /* Allocate memory for the join buffer from the heap. */
+ if (bufsize > QMFB_JOINBUFSIZE) {
+ if (!(buf = jas_alloc3(bufsize, numcols, sizeof(jpc_fix_t)))) {
+@@ -857,7 +796,6 @@ void jpc_qmfb_join_colres(jpc_fix_t *a,
+ abort();
+ }
+ }
+-#endif
+
+ hstartcol = (numrows + 1 - parity) >> 1;
+
+@@ -907,12 +845,10 @@ void jpc_qmfb_join_colres(jpc_fix_t *a,
+ srcptr += numcols;
+ }
+
+-#if !defined(HAVE_VLA)
+ /* If the join buffer was allocated on the heap, free this memory. */
+ if (buf != joinbuf) {
+ jas_free(buf);
+ }
+-#endif
+
+ }
+
diff --git a/media-libs/jasper/files/jasper-CVE-2014-9029.patch b/media-libs/jasper/files/jasper-CVE-2014-9029.patch
new file mode 100644
index 000000000000..98a2035999be
--- /dev/null
+++ b/media-libs/jasper/files/jasper-CVE-2014-9029.patch
@@ -0,0 +1,29 @@
+--- jasper-1.900.1.orig/src/libjasper/jpc/jpc_dec.c 2014-11-27 12:45:44.000000000 +0100
++++ jasper-1.900.1/src/libjasper/jpc/jpc_dec.c 2014-11-27 12:44:58.000000000 +0100
+@@ -1281,7 +1281,7 @@ static int jpc_dec_process_coc(jpc_dec_t
+ jpc_coc_t *coc = &ms->parms.coc;
+ jpc_dec_tile_t *tile;
+
+- if (JAS_CAST(int, coc->compno) > dec->numcomps) {
++ if (JAS_CAST(int, coc->compno) >= dec->numcomps) {
+ jas_eprintf("invalid component number in COC marker segment\n");
+ return -1;
+ }
+@@ -1307,7 +1307,7 @@ static int jpc_dec_process_rgn(jpc_dec_t
+ jpc_rgn_t *rgn = &ms->parms.rgn;
+ jpc_dec_tile_t *tile;
+
+- if (JAS_CAST(int, rgn->compno) > dec->numcomps) {
++ if (JAS_CAST(int, rgn->compno) >= dec->numcomps) {
+ jas_eprintf("invalid component number in RGN marker segment\n");
+ return -1;
+ }
+@@ -1356,7 +1356,7 @@ static int jpc_dec_process_qcc(jpc_dec_t
+ jpc_qcc_t *qcc = &ms->parms.qcc;
+ jpc_dec_tile_t *tile;
+
+- if (JAS_CAST(int, qcc->compno) > dec->numcomps) {
++ if (JAS_CAST(int, qcc->compno) >= dec->numcomps) {
+ jas_eprintf("invalid component number in QCC marker segment\n");
+ return -1;
+ }
diff --git a/media-libs/jasper/files/jasper-pkgconfig.patch b/media-libs/jasper/files/jasper-pkgconfig.patch
new file mode 100644
index 000000000000..c8af5ca83f49
--- /dev/null
+++ b/media-libs/jasper/files/jasper-pkgconfig.patch
@@ -0,0 +1,48 @@
+diff -Naur jasper-1.900.1/configure.ac jasper-1.900.1.new/configure.ac
+--- jasper-1.900.1/configure.ac 2007-01-19 21:47:11.000000000 +0000
++++ jasper-1.900.1.new/configure.ac 2009-10-29 13:37:02.000000000 +0000
+@@ -399,6 +399,8 @@
+ src/libjasper/pnm/Makefile
+ src/libjasper/ras/Makefile
+ src/msvc/Makefile
++pkgconfig/Makefile
++pkgconfig/jasper.pc
+ jasper.spec
+ ])
+ AC_OUTPUT
+diff -Naur jasper-1.900.1/Makefile.am jasper-1.900.1.new/Makefile.am
+--- jasper-1.900.1/Makefile.am 2007-01-19 21:43:14.000000000 +0000
++++ jasper-1.900.1.new/Makefile.am 2009-10-29 13:36:28.000000000 +0000
+@@ -64,7 +64,7 @@
+ # Note: We need to put the derived file "jasper.spec" in the distribution
+ # in order to facilitate RPM building.
+
+-SUBDIRS = src
++SUBDIRS = src pkgconfig
+
+ rpm: dist
+ for i in BUILD RPMS SRPMS SOURCES SPECS; do \
+diff -Naur jasper-1.900.1/pkgconfig/jasper.pc.in jasper-1.900.1.new/pkgconfig/jasper.pc.in
+--- jasper-1.900.1/pkgconfig/jasper.pc.in 1970-01-01 01:00:00.000000000 +0100
++++ jasper-1.900.1.new/pkgconfig/jasper.pc.in 2009-10-29 16:30:43.000000000 +0000
+@@ -0,0 +1,11 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: Jasper
++Description: JPEG 2000 encoding and decoding library
++Version: @VERSION@
++
++Libs: -L${libdir} -ljasper
++Cflags: -I${includedir}/jasper
+diff -Naur jasper-1.900.1/pkgconfig/Makefile.am jasper-1.900.1.new/pkgconfig/Makefile.am
+--- jasper-1.900.1/pkgconfig/Makefile.am 1970-01-01 01:00:00.000000000 +0100
++++ jasper-1.900.1.new/pkgconfig/Makefile.am 2009-10-29 13:38:59.000000000 +0000
+@@ -0,0 +1,5 @@
++pkgconfigdir = $(libdir)/pkgconfig
++pkgconfig_DATA = jasper.pc
++
++EXTRA_DIST = \
++ jasper.pc.in
diff --git a/media-libs/jasper/jasper-1.900.1-r9.ebuild b/media-libs/jasper/jasper-1.900.1-r9.ebuild
new file mode 100644
index 000000000000..f7a4d565040f
--- /dev/null
+++ b/media-libs/jasper/jasper-1.900.1-r9.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# outdated './configure': breaks in 'USE=opengl ABI_X86="32 64"' case:
+# uses /usr/lib64 for 32-bit ABI.
+AUTOTOOLS_AUTORECONF=yes
+
+inherit autotools-multilib
+
+DESCRIPTION="software-based implementation of the codec specified in the JPEG-2000 Part-1 standard"
+HOMEPAGE="http://www.ece.uvic.ca/~mdadams/jasper/"
+SRC_URI="
+ http://www.ece.uvic.ca/~mdadams/${PN}/software/${P}.zip
+ mirror://gentoo/${P}-fixes-20120611.patch.bz2"
+
+LICENSE="JasPer2.0"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+IUSE="jpeg opengl static-libs"
+
+RDEPEND="
+ jpeg? ( >=virtual/jpeg-0-r2:0[${MULTILIB_USEDEP}] )
+ opengl? (
+ >=virtual/opengl-7.0-r1:0[${MULTILIB_USEDEP}]
+ >=media-libs/freeglut-2.8.1:0[${MULTILIB_USEDEP}]
+ virtual/glu
+ )"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+PATCHES=(
+ "${WORKDIR}"/${P}-fixes-20120611.patch
+ "${FILESDIR}"/${PN}-1.701.0-GL-ac.patch
+ "${FILESDIR}"/${PN}-1.701.0-GL.patch
+ "${FILESDIR}"/${PN}-CVE-2014-9029.patch
+ "${FILESDIR}"/${PN}-CVE-2014-8137.patch
+ "${FILESDIR}"/${PN}-CVE-2014-8138.patch
+ "${FILESDIR}"/${PN}-CVE-2014-8157.patch
+ "${FILESDIR}"/${PN}-CVE-2014-8158.patch
+ "${FILESDIR}"/${PN}-pkgconfig.patch
+ )
+
+DOCS=( NEWS README doc/. )
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable jpeg libjpeg)
+ $(use_enable opengl)
+ )
+ autotools-multilib_src_configure
+}
diff --git a/media-libs/jasper/metadata.xml b/media-libs/jasper/metadata.xml
new file mode 100644
index 000000000000..897aa2e6b59a
--- /dev/null
+++ b/media-libs/jasper/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>sci</herd>
+</pkgmetadata>
diff --git a/media-libs/jbig2dec/Manifest b/media-libs/jbig2dec/Manifest
new file mode 100644
index 000000000000..c77d1457a7c5
--- /dev/null
+++ b/media-libs/jbig2dec/Manifest
@@ -0,0 +1,2 @@
+DIST jb2streams.zip 1285838 SHA256 3d1e5c79054b59d061cabdb1d7ba2d1b3f84700f5c517ba4306f7047660016f7
+DIST jbig2dec-0.11.tar.gz 371499 SHA256 7e2d8330b36f2765da22043d174827bee0f30db8d78c330904f363275c7dd0b9 SHA512 25f71ad58af0254d70a9d23efc488e1f2d931b47e344f2acf9931959c1e93749051a57905291a7dfd40407bc1995726e667d0ed6ef94e07da02330f14477c55e WHIRLPOOL 7014d3e63f55b16636f28d58bc93b1b58869b1bc70fb016360f9df314a880f79715a1d1f1b73f8ecb2b8214039942559e2e7b3df676298f19fae44d7ff849f3d
diff --git a/media-libs/jbig2dec/files/jbig2dec-0.11-libpng15.patch b/media-libs/jbig2dec/files/jbig2dec-0.11-libpng15.patch
new file mode 100644
index 000000000000..c18ccb7af606
--- /dev/null
+++ b/media-libs/jbig2dec/files/jbig2dec-0.11-libpng15.patch
@@ -0,0 +1,31 @@
+--- configure.ac
++++ configure.ac
+@@ -45,7 +45,7 @@
+ fi
+ dnl libpng requires pow() which may be in libm
+ AC_SEARCH_LIBS([pow], [m])
+- AC_CHECK_LIB([png], [png_check_sig], [
++ AC_CHECK_LIB([png], [png_sig_cmp], [
+ AC_CHECK_LIB([z], [deflate], [
+ AC_DEFINE(HAVE_LIBPNG, 1, [Define if libpng is available (-lpng)])
+ LIBS="-lpng -lz $LIBS"
+--- jbig2_image_png.c
++++ jbig2_image_png.c
+@@ -33,7 +33,7 @@
+ {
+ png_size_t check;
+
+- check = fwrite(data, 1, length, (png_FILE_p)png_ptr->io_ptr);
++ check = fwrite(data, 1, length, (png_FILE_p)png_get_io_ptr(png_ptr));
+ if (check != length) {
+ png_error(png_ptr, "Write Error");
+ }
+@@ -43,7 +43,7 @@
+ jbig2_png_flush(png_structp png_ptr)
+ {
+ png_FILE_p io_ptr;
+- io_ptr = (png_FILE_p)CVT_PTR((png_ptr->io_ptr));
++ io_ptr = (png_FILE_p)png_get_io_ptr(png_ptr);
+ if (io_ptr != NULL)
+ fflush(io_ptr);
+ }
diff --git a/media-libs/jbig2dec/jbig2dec-0.11-r1.ebuild b/media-libs/jbig2dec/jbig2dec-0.11-r1.ebuild
new file mode 100644
index 000000000000..458ae63cef02
--- /dev/null
+++ b/media-libs/jbig2dec/jbig2dec-0.11-r1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="A decoder implementation of the JBIG2 image compression format"
+HOMEPAGE="http://jbig2dec.sourceforge.net/"
+SRC_URI="http://ghostscript.com/~giles/jbig2/${PN}/${P}.tar.gz
+ test? ( http://jbig2dec.sourceforge.net/ubc/jb2streams.zip )"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~x86-solaris"
+IUSE="png static-libs test"
+
+RDEPEND="png? ( media-libs/libpng:0= )"
+DEPEND="${RDEPEND}
+ test? ( app-arch/unzip )"
+
+RESTRICT="test"
+# bug 324275
+
+DOCS="CHANGES README"
+
+src_prepare() {
+ sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' configure.ac || die #466998
+ epatch "${FILESDIR}"/${P}-libpng15.patch
+ eautoreconf
+
+ if use test; then
+ mkdir "${WORKDIR}/ubc" || die
+ mv -v "${WORKDIR}"/*.jb2 "${WORKDIR}/ubc/" || die
+ mv -v "${WORKDIR}"/*.bmp "${WORKDIR}/ubc/" || die
+ fi
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ $(use_with png libpng)
+}
+
+src_install() {
+ default
+ prune_libtool_files
+}
diff --git a/media-libs/jbig2dec/metadata.xml b/media-libs/jbig2dec/metadata.xml
new file mode 100644
index 000000000000..75356f788a00
--- /dev/null
+++ b/media-libs/jbig2dec/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>graphics</herd>
+ <herd>printing</herd>
+</pkgmetadata>
diff --git a/media-libs/jbig2enc/Manifest b/media-libs/jbig2enc/Manifest
new file mode 100644
index 000000000000..16e27623d393
--- /dev/null
+++ b/media-libs/jbig2enc/Manifest
@@ -0,0 +1 @@
+DIST jbig2enc-0.28.tar.gz 39879 SHA256 c7c876805403696f3f713b3930c9cc055061ef780201727fa3fcb34f062d4661 SHA512 81d194fb648fe7a866302796fd5e2adbb213d52193a279a94dbc5918ce3480561ea204e8497125eed5d6c6e4c6d089f7f35a89ef98bc484ca753ffde23e444c6 WHIRLPOOL 284b8737285a6181c01d2df788e5ca3ad00b927d176528cfcab228c982ad3503405bc2177f4a10e9d39cc3e96fbedcd5e2f1539c040f05e396f84fda88b931c3
diff --git a/media-libs/jbig2enc/files/jbig2enc-0.28-leptonica-1.70.patch b/media-libs/jbig2enc/files/jbig2enc-0.28-leptonica-1.70.patch
new file mode 100644
index 000000000000..e2ed771d2045
--- /dev/null
+++ b/media-libs/jbig2enc/files/jbig2enc-0.28-leptonica-1.70.patch
@@ -0,0 +1,52 @@
+From 53ce5fe7e73d7ed95c9e12b52dd4984723f865fa Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zdenko=20Podobn=C3=BD?= <zdenop@gmail.com>
+Date: Sun, 6 Apr 2014 21:25:27 +0200
+Subject: [PATCH] fix build with leptonica 1.70
+
+Merged upstream
+
+---
+ configure.ac | 1 +
+ src/jbig2.cc | 13 +++++++++----
+ 2 files changed, 10 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index fe37c22..753a607 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -55,6 +55,7 @@ AC_CHECK_LIB([lept], [findFileFormatStream], [], [
+ echo "Error! Leptonica not detected."
+ exit -1
+ ])
++AC_CHECK_FUNCS(expandBinaryPower2Low,,)
+ # test for function - it should detect leptonica dependecies
+
+ # Check for possible dependancies of leptonica.
+diff --git a/src/jbig2.cc b/src/jbig2.cc
+index e10f042..515c1ef 100644
+--- a/src/jbig2.cc
++++ b/src/jbig2.cc
+@@ -130,11 +130,16 @@ segment_image(PIX *pixb, PIX *piximg) {
+ // input color image, so we have to do it this way...
+ // is there a better way?
+ // PIX *pixd = pixExpandBinary(pixd4, 4);
+- PIX *pixd = pixCreate(piximg->w, piximg->h, 1);
+- pixCopyResolution(pixd, piximg);
+- if (verbose) pixInfo(pixd, "mask image: ");
+- expandBinaryPower2Low(pixd->data, pixd->w, pixd->h, pixd->wpl,
++ PIX *pixd;
++#ifdef HAVE_EXPANDBINARYPOWER2LOW
++ pixd = pixCreate(piximg->w, piximg->h, 1);
++ pixCopyResolution(pixd, piximg);
++ expandBinaryPower2Low(pixd->data, pixd->w, pixd->h, pixd->wpl,
+ pixd4->data, pixd4->w, pixd4->h, pixd4->wpl, 4);
++#else
++ pixd = pixExpandBinaryPower2(pixd4, 4);
++#endif
++ if (verbose) pixInfo(pixd, "mask image: ");
+
+ pixDestroy(&pixd4);
+ pixDestroy(&pixsf4);
+--
+2.0.3
+
diff --git a/media-libs/jbig2enc/jbig2enc-0.28-r1.ebuild b/media-libs/jbig2enc/jbig2enc-0.28-r1.ebuild
new file mode 100644
index 000000000000..361bc7c3f9ca
--- /dev/null
+++ b/media-libs/jbig2enc/jbig2enc-0.28-r1.ebuild
@@ -0,0 +1,32 @@
+# 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
+
+DESCRIPTION="JBIG2 Encoder and libs"
+HOMEPAGE="https://github.com/agl/jbig2enc"
+SRC_URI="https://github.com/agl/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="amd64 x86"
+
+IUSE="gif jpeg png static-libs tiff webp"
+
+RDEPEND="media-libs/leptonica[gif?,jpeg?,png?,tiff?,webp?]"
+DEPEND="${RDEPEND}"
+
+PATCHES=( "${FILESDIR}/${P}-leptonica-1.70.patch" )
+
+src_prepare() {
+ # remove -Werror
+ sed -i -e '/AM_INIT_AUTOMAKE/s/-Werror//' configure.ac || die 'sed on configure.ac failed'
+ # prevent static linking and QA notice about insecure RUNPATHs
+ sed -i -e '/jbig2_LDFLAGS/d' src/Makefile.am || die 'sed on src/Makefile.am failed'
+
+ autotools-utils_src_prepare
+}
diff --git a/media-libs/jbig2enc/metadata.xml b/media-libs/jbig2enc/metadata.xml
new file mode 100644
index 000000000000..650ea9af5c9b
--- /dev/null
+++ b/media-libs/jbig2enc/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>pinkbyte@gentoo.org</email>
+ <name>Sergey Popov</name>
+ </maintainer>
+ <use>
+ <flag name="webp">Add support for WEBP image format</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">agl/jbig2enc</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/jbigkit/Manifest b/media-libs/jbigkit/Manifest
new file mode 100644
index 000000000000..2c997004a667
--- /dev/null
+++ b/media-libs/jbigkit/Manifest
@@ -0,0 +1 @@
+DIST jbigkit-2.1.tar.gz 438710 SHA256 de7106b6bfaf495d6865c7dd7ac6ca1381bd12e0d81405ea81e7f2167263d932 SHA512 c4127480470ef90db1ef3bd2caa444df10b50ed8df0bc9997db7612cb48b49278baf44965028f1807a21028eb965d677e015466306b44683c4ec75a23e1922cf WHIRLPOOL fa904bf84d8854a8d0ced7214ce1c3c74de7441b6c612643509bd844e599685ab9380cdef3fc8d6d77b8810194d3c1c70165e4cc69ee7e177a5345d6f0cf7fcd
diff --git a/media-libs/jbigkit/files/jbigkit-2.1-build.patch b/media-libs/jbigkit/files/jbigkit-2.1-build.patch
new file mode 100644
index 000000000000..4d0ebd381342
--- /dev/null
+++ b/media-libs/jbigkit/files/jbigkit-2.1-build.patch
@@ -0,0 +1,239 @@
+This patch has been mailed to upstream. No reply at this time. Status unknown.
+
+--- libjbig/Makefile
++++ libjbig/Makefile
+@@ -1,28 +1,58 @@
+ # Unix makefile for the JBIG-KIT library
+
+ # Select an ANSI/ISO C compiler here, GNU gcc is recommended
+-CC = gcc
++AR ?= ar
++CC ?= gcc
++RANLIB ?= ranlib
+
+ # Options for the compiler: A high optimization level is suggested
+-CFLAGS = -g -O -W -Wall -ansi -pedantic # --coverage
++CFLAGS += -W -Wall -ansi -pedantic # --coverage
+
+-all: libjbig.a libjbig85.a tstcodec tstcodec85
++ifeq ($(shell uname),Darwin)
++ SONAME = dylib
++ LIBDIR ?= /usr/lib
++else
++ SONAME = so
++endif
++
++all: libjbig.$(SONAME) libjbig85.$(SONAME) tstcodec tstcodec85
++
++static: libjbig.a libjbig85.a
+
+ tstcodec: tstcodec.o jbig.o jbig_ar.o
+- $(CC) $(CFLAGS) -o tstcodec tstcodec.o jbig.o jbig_ar.o
++ $(CC) $(LDFLAGS) $(CFLAGS) -o tstcodec tstcodec.o jbig.o jbig_ar.o
+
+ tstcodec85: tstcodec85.o jbig85.o jbig_ar.o
+- $(CC) $(CFLAGS) -o tstcodec85 tstcodec85.o jbig85.o jbig_ar.o
++ $(CC) $(LDFLAGS) $(CFLAGS) -o tstcodec85 tstcodec85.o jbig85.o jbig_ar.o
+
+ libjbig.a: jbig.o jbig_ar.o
+ rm -f libjbig.a
+- ar rc libjbig.a jbig.o jbig_ar.o
+- -ranlib libjbig.a
++ $(AR) rc libjbig.a jbig.o jbig_ar.o
++ -$(RANLIB) libjbig.a
++
++SOBJS = jbig.lo jbig_ar.lo
++
++libjbig.so: $(SOBJS)
++ $(CC) $(CFLAGS) -shared $(LDFLAGS) -o $@ -Wl,-soname -Wl,$@ $(SOBJS)
++
++libjbig.dylib: $(SOBJS)
++ $(CC) $(CFLAGS) -dynamic $(LDFLAGS) -o $@ -dynamiclib -install_name $(LIBDIR)/$@ $(SOBJS)
++
++SOBJS85 = jbig85.lo jbig_ar.lo
++
++libjbig85.so: $(SOBJS85)
++ $(CC) $(CFLAGS) -shared $(LDFLAGS) -o $@ -Wl,-soname -Wl,$@ $(SOBJS85)
++
++libjbig85.dylib: $(SOBJS85)
++ $(CC) $(CFLAGS) -dynamic $(LDFLAGS) -o $@ -dynamiclib -install_name $(LIBDIR)/$@ $(SOBJS85)
++
++%.lo: %.c jbig.h jbig85.h jbig_ar.h
++ $(CC) $(CFLAGS) -fPIC -c $< -o $@
+
+ libjbig85.a: jbig85.o jbig_ar.o
+ rm -f libjbig85.a
+- ar rc libjbig85.a jbig85.o jbig_ar.o
+- -ranlib libjbig85.a
++ $(AR) rc libjbig85.a jbig85.o jbig_ar.o
++ -$(RANLIB) libjbig85.a
+
+ jbig.o: jbig.c jbig.h jbig_ar.h
+ jbig85.o: jbig85.c jbig85.h jbig_ar.h
+--- Makefile
++++ Makefile
+@@ -1,10 +1,10 @@
+ # Unix makefile for JBIG-KIT
+
+ # Select an ANSI/ISO C compiler here, GNU gcc is recommended
+-CC = gcc
++CC ?= gcc
+
+ # Options for the compiler: A high optimization level is suggested
+-CFLAGS = -O2 -W -Wno-unused-result
++CFLAGS += -W
+ # CFLAGS = -O -g -W -Wall -Wno-unused-result -ansi -pedantic # -DDEBUG
+
+ export CC CFLAGS
+@@ -36,7 +36,7 @@
+ distribution:
+ rm -rf jbigkit-$(VERSION)
+ git archive v$(VERSION) --prefix jbigkit-$(VERSION)/ | tar xvf -
+- make -C jbigkit-$(VERSION)/pbmtools txt
++ $(MAKE) -C jbigkit-$(VERSION)/pbmtools txt
+ tar cvaf jbigkit-$(VERSION).tar.gz jbigkit-$(VERSION)
+
+ release:
+--- pbmtools/Makefile
++++ pbmtools/Makefile
+@@ -1,11 +1,11 @@
+ # Unix makefile for the JBIG-KIT PBM tools
+
+ # Select an ANSI/ISO C compiler here, e.g. GNU gcc is recommended
+-CC = gcc
++CC ?= gcc
+
+ # Options for the compiler
+-CFLAGS = -g -O -W -Wall -Wno-unused-result -ansi -pedantic # --coverage
+-CPPFLAGS = -I../libjbig
++CFLAGS += -W -Wall -Wno-unused-result -ansi -pedantic # --coverage
++CPPFLAGS += -I../libjbig
+
+ .SUFFIXES: .1 .5 .txt $(SUFFIXES)
+ .PHONY: txt test test82 test85 clean
+@@ -15,16 +15,16 @@
+ txt: pbmtojbg.txt jbgtopbm.txt pbm.txt pgm.txt
+
+ pbmtojbg: pbmtojbg.o ../libjbig/libjbig.a
+- $(CC) $(CFLAGS) -o pbmtojbg pbmtojbg.o -L../libjbig -ljbig
++ $(CC) $(LDFLAGS) $(CFLAGS) -o pbmtojbg pbmtojbg.o -L../libjbig -ljbig
+
+ jbgtopbm: jbgtopbm.o ../libjbig/libjbig.a
+- $(CC) $(CFLAGS) -o jbgtopbm jbgtopbm.o -L../libjbig -ljbig
++ $(CC) $(LDFLAGS) $(CFLAGS) -o jbgtopbm jbgtopbm.o -L../libjbig -ljbig
+
+ pbmtojbg85: pbmtojbg85.o ../libjbig/libjbig85.a
+- $(CC) $(CFLAGS) -o pbmtojbg85 pbmtojbg85.o -L../libjbig -ljbig85
++ $(CC) $(LDFLAGS) $(CFLAGS) -o pbmtojbg85 pbmtojbg85.o -L../libjbig -ljbig85
+
+ jbgtopbm85: jbgtopbm85.o ../libjbig/libjbig85.a
+- $(CC) $(CFLAGS) -o jbgtopbm85 jbgtopbm85.o -L../libjbig -ljbig85
++ $(CC) $(LDFLAGS) $(CFLAGS) -o jbgtopbm85 jbgtopbm85.o -L../libjbig -ljbig85
+
+ jbgtopbm.o: jbgtopbm.c ../libjbig/jbig.h
+ pbmtojbg.o: pbmtojbg.c ../libjbig/jbig.h
+@@ -33,11 +33,11 @@
+
+ ../libjbig/libjbig.a: ../libjbig/jbig.c ../libjbig/jbig.h \
+ ../libjbig/jbig_ar.c ../libjbig/jbig_ar.h
+- make -C ../libjbig libjbig.a
++ $(MAKE) -C ../libjbig libjbig.a
+
+ ../libjbig/libjbig85.a: ../libjbig/jbig85.c ../libjbig/jbig85.h \
+ ../libjbig/jbig_ar.c ../libjbig/jbig_ar.h
+- make -C ../libjbig libjbig85.a
++ $(MAKE) -C ../libjbig libjbig85.a
+
+ analyze:
+ clang $(CPPFLAGS) --analyze *.c
+@@ -45,22 +45,22 @@
+ test: test82 test85
+
+ test82: pbmtojbg jbgtopbm
+- make IMG=ccitt1 OPTIONSP= dotest1
+- make IMG=ccitt2 OPTIONSP= dotest1
+- make IMG=ccitt3 OPTIONSP= dotest1
+- make IMG=xvlogo "OPTIONSP=-d 3" dotest1
+- make IMG=sandra OPTIONSP= OPTIONSJ= dotest2g
+- make IMG=sandra OPTIONSP=-b OPTIONSJ=-b dotest2g
+- make IMG=sandra OPTIONSP=-q OPTIONSJ= dotest2g
+- make IMG=sandra "OPTIONSP=-o 0" OPTIONSJ= dotest2g
+- make IMG=sandra "OPTIONSP=-o 2" OPTIONSJ= dotest2g
+- make IMG=multi OPTIONSP= OPTIONSJ= dotest2g
+- make IMG=multi OPTIONSP=-b OPTIONSJ=-b dotest2g
+- make IMG=mx "OPTIONSP=-q -s 3 -m 128" dotest1
+- make IMG=mx "OPTIONSP=-q -s 3 -m 128" dotest2b
+- make IMG=mx "OPTIONSP=-q -s 3 -m 128 -p 92" dotest2b
+- make IMG=mx "OPTIONSP=-q -Y -1" dotest2b
+- make IMG=mx "OPTIONSP=-Y -1" dotest2b
++ $(MAKE) IMG=ccitt1 OPTIONSP= dotest1
++ $(MAKE) IMG=ccitt2 OPTIONSP= dotest1
++ $(MAKE) IMG=ccitt3 OPTIONSP= dotest1
++ $(MAKE) IMG=xvlogo "OPTIONSP=-d 3" dotest1
++ $(MAKE) IMG=sandra OPTIONSP= OPTIONSJ= dotest2g
++ $(MAKE) IMG=sandra OPTIONSP=-b OPTIONSJ=-b dotest2g
++ $(MAKE) IMG=sandra OPTIONSP=-q OPTIONSJ= dotest2g
++ $(MAKE) IMG=sandra "OPTIONSP=-o 0" OPTIONSJ= dotest2g
++ $(MAKE) IMG=sandra "OPTIONSP=-o 2" OPTIONSJ= dotest2g
++ $(MAKE) IMG=multi OPTIONSP= OPTIONSJ= dotest2g
++ $(MAKE) IMG=multi OPTIONSP=-b OPTIONSJ=-b dotest2g
++ $(MAKE) IMG=mx "OPTIONSP=-q -s 3 -m 128" dotest1
++ $(MAKE) IMG=mx "OPTIONSP=-q -s 3 -m 128" dotest2b
++ $(MAKE) IMG=mx "OPTIONSP=-q -s 3 -m 128 -p 92" dotest2b
++ $(MAKE) IMG=mx "OPTIONSP=-q -Y -1" dotest2b
++ $(MAKE) IMG=mx "OPTIONSP=-Y -1" dotest2b
+ rm -f test-*.jbg test-*.pbm test-*.pgm
+ ./jbgtopbm ../examples/ccitt1.jbg | ./pbmtojbg > test-ccitt1.jbg
+ cmp ../examples/ccitt1.jbg test-ccitt1.jbg
+@@ -96,24 +96,24 @@
+ cmp test-$(IMG).pgm ../examples/$(IMG).pgm
+
+ test85: pbmtojbg jbgtopbm pbmtojbg85 jbgtopbm85 test-t82.pbm
+- make IMG=t82 "OPTIONSP=-p 0" dotest85
+- make IMG=t82 "OPTIONSP=-p 8" dotest85
+- make IMG=t82 "OPTIONSP=-p 8 -r" dotest85b
+- make IMG=t82 "OPTIONSP=-p 64" dotest85
+- make IMG=t82 "OPTIONSP=-p 72" dotest85
+- make IMG=t82 "OPTIONSP=-s 2 -C c" dotest85
+- make IMG=t82 "OPTIONSP=-s 99999" dotest85
+- make IMG=t82 "OPTIONSP=-Y 9999 0" dotest85
+- make IMG=t82 "OPTIONSP=-Y 1951 0" dotest85
+- make IMG=t82 "OPTIONSP=-Y -1 127" dotest85
+- make IMG=t82 "OPTIONSP=-Y -1 128" dotest85
+- make IMG=t82 "OPTIONSP=-Y -1 1919" dotest85
+- make IMG=t82 "OPTIONSP=-Y -1 1920" dotest85
+- make IMG=t82 "OPTIONSP=-Y -1 1949" dotest85
+- make IMG=t82 "OPTIONSP=-Y -1 1950" dotest85
+- make IMG=ccitt1 dotest85
+- make IMG=ccitt2 dotest85
+- make IMG=ccitt3 dotest85
++ $(MAKE) IMG=t82 "OPTIONSP=-p 0" dotest85
++ $(MAKE) IMG=t82 "OPTIONSP=-p 8" dotest85
++ $(MAKE) IMG=t82 "OPTIONSP=-p 8 -r" dotest85b
++ $(MAKE) IMG=t82 "OPTIONSP=-p 64" dotest85
++ $(MAKE) IMG=t82 "OPTIONSP=-p 72" dotest85
++ $(MAKE) IMG=t82 "OPTIONSP=-s 2 -C c" dotest85
++ $(MAKE) IMG=t82 "OPTIONSP=-s 99999" dotest85
++ $(MAKE) IMG=t82 "OPTIONSP=-Y 9999 0" dotest85
++ $(MAKE) IMG=t82 "OPTIONSP=-Y 1951 0" dotest85
++ $(MAKE) IMG=t82 "OPTIONSP=-Y -1 127" dotest85
++ $(MAKE) IMG=t82 "OPTIONSP=-Y -1 128" dotest85
++ $(MAKE) IMG=t82 "OPTIONSP=-Y -1 1919" dotest85
++ $(MAKE) IMG=t82 "OPTIONSP=-Y -1 1920" dotest85
++ $(MAKE) IMG=t82 "OPTIONSP=-Y -1 1949" dotest85
++ $(MAKE) IMG=t82 "OPTIONSP=-Y -1 1950" dotest85
++ $(MAKE) IMG=ccitt1 dotest85
++ $(MAKE) IMG=ccitt2 dotest85
++ $(MAKE) IMG=ccitt3 dotest85
+ rm -f test-*.jbg test-*.jbg85 test-*.pbm
+ @echo
+ @echo "The T.85 pbmtools have PASSED the functional tests. Good!"
+@@ -147,7 +147,7 @@
+ ./jbgtopbm $< $@
+
+ test-t82.pbm:
+- make -C ../libjbig tstcodec
++ $(MAKE) -C ../libjbig tstcodec
+ ../libjbig/tstcodec $@
+
+ FOPT=-c 1000 -p 300000 -m 3
diff --git a/media-libs/jbigkit/jbigkit-2.1.ebuild b/media-libs/jbigkit/jbigkit-2.1.ebuild
new file mode 100644
index 000000000000..db72bc36c398
--- /dev/null
+++ b/media-libs/jbigkit/jbigkit-2.1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib toolchain-funcs multilib-minimal
+
+DESCRIPTION="data compression algorithm for bi-level high-resolution images"
+HOMEPAGE="http://www.cl.cam.ac.uk/~mgk25/jbigkit/"
+SRC_URI="http://www.cl.cam.ac.uk/~mgk25/download/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0/2.1" # Since we install libjbig.so and libjbig85.so without version, use ${PV} like 2.1
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="static-libs"
+
+DOCS="ANNOUNCE CHANGES TODO libjbig/*.txt pbmtools/*.txt"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-build.patch
+ multilib_copy_sources
+ tc-export AR CC RANLIB
+}
+
+multilib_src_compile() {
+ emake \
+ LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
+ $(multilib_is_native_abi || echo lib)
+
+ if use static-libs; then
+ cd libjbig && emake static
+ fi
+}
+
+multilib_src_test() {
+ LD_LIBRARY_PATH=${BUILD_DIR}/libjbig emake -j1 test
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ dobin pbmtools/jbgtopbm{,85} pbmtools/pbmtojbg{,85}
+ doman pbmtools/jbgtopbm.1 pbmtools/pbmtojbg.1
+ fi
+
+ insinto /usr/include
+ doins libjbig/*.h
+ dolib libjbig/libjbig{,85}$(get_libname)
+ use static-libs && dolib libjbig/libjbig{,85}.a
+}
diff --git a/media-libs/jbigkit/metadata.xml b/media-libs/jbigkit/metadata.xml
new file mode 100644
index 000000000000..58327d37fac9
--- /dev/null
+++ b/media-libs/jbigkit/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>graphics</herd>
+ <longdescription lang="en">Provides a library implementing a
+ highly effective data compression algorithm for bi-level
+ high-resolution images such as fax pages or scanned documents.
+ </longdescription>
+</pkgmetadata>
+
diff --git a/media-libs/jpeg/Manifest b/media-libs/jpeg/Manifest
new file mode 100644
index 000000000000..4a29ce8ae317
--- /dev/null
+++ b/media-libs/jpeg/Manifest
@@ -0,0 +1,5 @@
+DIST jpeg-6b-patchset-1.tar.xz 2592 SHA256 533ef36e4ca8cdad81d0c931e486776983f60696779c07d11ed601febebec70d SHA512 6deb845a08f4ac6b88c47803b528842cedd145fb12295060d52553b8c803ba192478306496701a409c796c264ceaed0988575ae8f7717e2e7b24da5733bc9c2b WHIRLPOOL cdc42a1a68a090043ca95302f25979293197322f108f083cb16ba57c9bd20a56d21820590cd79f7c7f51836b133fc47a0948928d2d8f9e64bb270bf4ee11844a
+DIST jpegsrc.v6b.tar.gz 613261 SHA256 75c3ec241e9996504fe02a9ed4d12f16b74ade713972f3db9e65ce95cd27e35d SHA512 5d37d3695105fc345ca269ab98cd991472e5de72f702c9a8a652a7d114a40eb99670c69a87ecb24bf64e96318fc0ee2bcb44c497d9d3d2a67378c99e4eb348fe WHIRLPOOL ab649fd5ff29dfbcdf52f337b73c65e29d577c3fd0a1c910590177d83985115c8e8e4c392e196f7a497d6346072b40053999171f0cd74ee3325e74c005c5ba9b
+DIST jpegsrc.v8d.tar.gz 991456 SHA256 00029b1473f0f0ea72fbca3230e8cb25797fbb27e58ae2e46bb8bf5a806fe0b3 SHA512 7a8b4cff5b1caf6a7281c5dce4e1efa1b68360bd64dd2e619b60c9e1d49f22624bc8780b681bfab073e7b1d4b7f41008a464a58f0eeeacb0a40ff996d7eb5753 WHIRLPOOL 7489605809b43cfac02230b89013075806df32246b37eb12ac05ef890ee690f85744887e296f5a21fa64012570aa298d2aa54e4469066f4c21dd40141f3bd8a8
+DIST jpegsrc.v9a.tar.gz 1000034 SHA256 3a753ea48d917945dd54a2d97de388aa06ca2eb1066cbfdc6652036349fe05a7 SHA512 9b21cc115e22c68bea46db462263c5c7a0d10beb192a919ecccbd801a25982b518ce44d8c301dd582ecaba1850e0e0f20e322be82b0e24ae917b9949b4f10d3b WHIRLPOOL cd92fd028c8f55c653d74ee74d0c744ebded578bdc7f415a5e8321bed638300c908d08e4129ebb031a6ed19560a2610942ed23cb0a075cc1a34319b9ebaa2265
+DIST libjpeg8_8d-1.debian.tar.gz 13676 SHA256 70ec6689b0ad85739802cf3ebbdcc12ea01e21edd8f931c614b25b44cf199057 SHA512 7def4f13524f0af3b9adf35a370027a18f43b9a635f56a17d5bb7883370db8b18b8a12737d0f0cb4b0287ccf8fb474eb5f754de6b398ffe7d522c54e5bf68040 WHIRLPOOL 94526c31d401eb14c9bf0f7115e13a27886ad58863e25d6653eba2b2f5ef260ec272368d2b9d9934bd75b1e5b5f1afc97230e540248efc24d6e85e5680399d27
diff --git a/media-libs/jpeg/files/jpeg-7-maxmem_sysconf.patch b/media-libs/jpeg/files/jpeg-7-maxmem_sysconf.patch
new file mode 100644
index 000000000000..9ea87d4fa399
--- /dev/null
+++ b/media-libs/jpeg/files/jpeg-7-maxmem_sysconf.patch
@@ -0,0 +1,49 @@
+# Make a reasonable guess about memory limits using sysconf().
+# includes 5% slop factor as suggested in documentation.
+
+--- jpeg-7/jmemansi.c
++++ jpeg-7/jmemansi.c
+@@ -12,6 +12,15 @@
+ * is shoved onto the user.
+ */
+
++#include <unistd.h>
++
++#ifdef __FreeBSD__
++# include <sys/types.h>
++# include <sys/sysctl.h>
++# include <sys/vmmeter.h>
++# include <vm/vm_param.h>
++#endif
++
+ #define JPEG_INTERNALS
+ #include "jinclude.h"
+ #include "jpeglib.h"
+@@ -157,7 +166,26 @@
+ GLOBAL(long)
+ jpeg_mem_init (j_common_ptr cinfo)
+ {
+- return DEFAULT_MAX_MEM; /* default for max_memory_to_use */
++#ifdef _SC_AVPHYS_PAGES
++ long phys_size;
++
++ if ((phys_size = sysconf(_SC_AVPHYS_PAGES)) == -1)
++ return DEFAULT_MAX_MEM; /* default for max_memory_to_use */
++ if ((phys_size *= sysconf(_SC_PAGESIZE)) < 0)
++ return DEFAULT_MAX_MEM;
++ return (long) (phys_size * 0.95);
++#elif defined(HAVE_SYSCTL) && defined(HW_PHYSMEM)
++ /* This works on *bsd and darwin. */
++ unsigned int physmem;
++ size_t len = sizeof physmem;
++ static int mib[2] = { CTL_HW, HW_PHYSMEM };
++
++ if (sysctl (mib, ARRAY_SIZE (mib), &physmem, &len, NULL, 0) == 0
++ && len == sizeof (physmem))
++ return (long) (physmem * 0.95);
++#endif
++
++ return DEFAULT_MAX_MEM;
+ }
+
+ GLOBAL(void)
diff --git a/media-libs/jpeg/files/jpeg-8d-CVE-2013-6629.patch b/media-libs/jpeg/files/jpeg-8d-CVE-2013-6629.patch
new file mode 100644
index 000000000000..a1535a79ffec
--- /dev/null
+++ b/media-libs/jpeg/files/jpeg-8d-CVE-2013-6629.patch
@@ -0,0 +1,17 @@
+http://bugs.gentoo.org/491152
+
+--- jdmarker.c
++++ jdmarker.c
+@@ -347,6 +347,12 @@
+
+ TRACEMS3(cinfo, 1, JTRC_SOS_COMPONENT, cc,
+ compptr->dc_tbl_no, compptr->ac_tbl_no);
++
++ /* This CSi (cc) should differ from the previous CSi */
++ for (ci = 0; ci < i; ci++) {
++ if (cinfo->cur_comp_info[ci] == compptr)
++ ERREXIT1(cinfo, JERR_BAD_COMPONENT_ID, cc);
++ }
+ }
+
+ /* Collect the additional scan parameters Ss, Se, Ah/Al. */
diff --git a/media-libs/jpeg/jpeg-6b-r12.ebuild b/media-libs/jpeg/jpeg-6b-r12.ebuild
new file mode 100644
index 000000000000..61dc42442877
--- /dev/null
+++ b/media-libs/jpeg/jpeg-6b-r12.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# this ebuild is only for the libjpeg.so.62 SONAME for ABI compat
+
+PATCH_VER=1
+inherit eutils libtool toolchain-funcs multilib-minimal
+
+DESCRIPTION="library to load, handle and manipulate images in the JPEG format (transition package)"
+HOMEPAGE="http://www.ijg.org/"
+SRC_URI="mirror://gentoo/jpegsrc.v${PV}.tar.gz
+ http://dev.gentoo.org/~ssuominen/${P}-patchset-${PATCH_VER}.tar.xz"
+
+LICENSE="IJG"
+SLOT="62"
+KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 m68k ~mips ~ppc ~ppc64 s390 sh ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE=""
+
+DOCS=""
+
+RDEPEND="!>=media-libs/libjpeg-turbo-1.3.0-r2:0
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r5
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
+ epatch "${FILESDIR}"/${PN}-8d-CVE-2013-6629.patch
+ elibtoolize
+}
+
+multilib_src_configure() {
+ tc-export CC
+ ECONF_SOURCE=${S} \
+ econf \
+ --enable-shared \
+ --disable-static \
+ --enable-maxmem=64
+}
+
+multilib_src_compile() {
+ emake libjpeg.la
+}
+
+multilib_src_install() {
+ newlib.so .libs/libjpeg.so.62.0.0 libjpeg.so.62
+}
diff --git a/media-libs/jpeg/jpeg-8d-r1.ebuild b/media-libs/jpeg/jpeg-8d-r1.ebuild
new file mode 100644
index 000000000000..d9d68ab80386
--- /dev/null
+++ b/media-libs/jpeg/jpeg-8d-r1.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils libtool toolchain-funcs multilib-minimal
+
+DESCRIPTION="Library to load, handle and manipulate images in the JPEG format"
+HOMEPAGE="http://jpegclub.org/ http://www.ijg.org/"
+SRC_URI="http://www.ijg.org/files/${PN}src.v${PV}.tar.gz
+ mirror://debian/pool/main/libj/lib${PN}8/lib${PN}8_8d-1.debian.tar.gz"
+
+LICENSE="IJG"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="static-libs"
+
+RDEPEND="!media-libs/libjpeg-turbo:0
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r5
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-7-maxmem_sysconf.patch \
+ "${FILESDIR}"/${P}-CVE-2013-6629.patch
+ elibtoolize
+}
+
+multilib_src_configure() {
+ # Fix building against this library on eg. Solaris and DragonFly BSD, see:
+ # http://mail-index.netbsd.org/pkgsrc-bugs/2010/01/18/msg035644.html
+ local ldverscript=
+ [[ ${CHOST} == *-solaris* ]] && ldverscript="--disable-ld-version-script"
+
+ ECONF_SOURCE=${S} \
+ econf \
+ $(use_enable static-libs static) \
+ --enable-maxmem=64 \
+ ${ldverscript}
+}
+
+multilib_src_compile() {
+ emake
+
+ if multilib_is_native_abi; then
+ # Build exifautotran and jpegexiforient
+ cd ../debian/extra
+ emake CC="$(tc-getCC)" CFLAGS="${LDFLAGS} ${CFLAGS}"
+ fi
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+}
+
+multilib_src_install_all() {
+ prune_libtool_files
+
+ dodoc change.log example.c README *.txt
+
+ # Install exifautotran and jpegexiforient
+ newdoc ../debian/changelog changelog.debian
+ cd ../debian/extra
+ emake \
+ DESTDIR="${D}" prefix="${EPREFIX}"/usr \
+ INSTALL="install -m755" INSTALLDIR="install -d -m755" \
+ install
+}
diff --git a/media-libs/jpeg/jpeg-8d-r2.ebuild b/media-libs/jpeg/jpeg-8d-r2.ebuild
new file mode 100644
index 000000000000..d60b5d765aee
--- /dev/null
+++ b/media-libs/jpeg/jpeg-8d-r2.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# this ebuild is only for the libjpeg.so.8 SONAME for ABI compat
+
+inherit eutils libtool toolchain-funcs multilib-minimal
+
+DESCRIPTION="Library to load, handle and manipulate images in the JPEG format"
+HOMEPAGE="http://jpegclub.org/ http://www.ijg.org/"
+SRC_URI="http://www.ijg.org/files/${PN}src.v${PV}.tar.gz"
+
+LICENSE="IJG"
+SLOT="8"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE=""
+
+RDEPEND="!=media-libs/jpeg-8*:0
+ !<media-libs/libjpeg-turbo-1.3.0-r2
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r5
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}"
+
+DOCS=""
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-7-maxmem_sysconf.patch \
+ "${FILESDIR}"/${P}-CVE-2013-6629.patch
+ elibtoolize
+}
+
+multilib_src_configure() {
+ # Fix building against this library on eg. Solaris and DragonFly BSD, see:
+ # http://mail-index.netbsd.org/pkgsrc-bugs/2010/01/18/msg035644.html
+ local ldverscript=
+ [[ ${CHOST} == *-solaris* ]] && ldverscript="--disable-ld-version-script"
+
+ ECONF_SOURCE=${S} \
+ econf \
+ --disable-static \
+ --enable-maxmem=64 \
+ ${ldverscript}
+}
+
+multilib_src_compile() {
+ emake libjpeg.la
+}
+
+multilib_src_install() {
+ newlib.so .libs/libjpeg.so.8.4.0 libjpeg.so.8
+}
diff --git a/media-libs/jpeg/jpeg-9a.ebuild b/media-libs/jpeg/jpeg-9a.ebuild
new file mode 100644
index 000000000000..d3d1d2e0eb74
--- /dev/null
+++ b/media-libs/jpeg/jpeg-9a.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils libtool toolchain-funcs multilib-minimal
+
+DESCRIPTION="Library to load, handle and manipulate images in the JPEG format"
+HOMEPAGE="http://jpegclub.org/ http://www.ijg.org/"
+SRC_URI="http://www.ijg.org/files/${PN}src.v${PV}.tar.gz
+ mirror://debian/pool/main/libj/lib${PN}8/lib${PN}8_8d-1.debian.tar.gz"
+
+LICENSE="IJG"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="static-libs"
+
+RDEPEND="!media-libs/libjpeg-turbo:0
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r5
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-7-maxmem_sysconf.patch
+ elibtoolize
+}
+
+multilib_src_configure() {
+ # Fix building against this library on eg. Solaris and DragonFly BSD, see:
+ # http://mail-index.netbsd.org/pkgsrc-bugs/2010/01/18/msg035644.html
+ local ldverscript=
+ [[ ${CHOST} == *-solaris* ]] && ldverscript="--disable-ld-version-script"
+
+ ECONF_SOURCE=${S} \
+ econf \
+ $(use_enable static-libs static) \
+ --enable-maxmem=64 \
+ ${ldverscript}
+}
+
+multilib_src_compile() {
+ emake
+
+ if multilib_is_native_abi; then
+ # Build exifautotran and jpegexiforient
+ cd ../debian/extra
+ emake CC="$(tc-getCC)" CFLAGS="${LDFLAGS} ${CFLAGS}"
+ fi
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+}
+
+multilib_src_install_all() {
+ prune_libtool_files
+
+ dodoc change.log example.c README *.txt
+
+ # Install exifautotran and jpegexiforient
+ newdoc ../debian/changelog changelog.debian
+ cd ../debian/extra
+ emake \
+ DESTDIR="${D}" prefix="${EPREFIX}"/usr \
+ INSTALL="install -m755" INSTALLDIR="install -d -m755" \
+ install
+}
diff --git a/media-libs/jpeg/metadata.xml b/media-libs/jpeg/metadata.xml
new file mode 100644
index 000000000000..e770d1bc9a96
--- /dev/null
+++ b/media-libs/jpeg/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>graphics</herd>
+</pkgmetadata>
diff --git a/media-libs/ladspa-cmt/Manifest b/media-libs/ladspa-cmt/Manifest
new file mode 100644
index 000000000000..f955a8d589ea
--- /dev/null
+++ b/media-libs/ladspa-cmt/Manifest
@@ -0,0 +1 @@
+DIST cmt_src_1.16.tgz 63909 SHA256 512a1d7e698b9e0e7c692202c29f4bd70846d52241ec254e1a324abaef405635 SHA512 be4aaa064183b6121b4ca8d7d2535cb9a3bcb557e3a2f22b45ec9775b0e296f70a9a7edf697b78095d6ef1564bb5459bb742649082ac724d1774c0790379af21 WHIRLPOOL 7daeaf8dfc30c1acb6b9387fe96ac55121f136c355c7cb0d48d402ac8c9ea2fcabf6f3d436ed009c65d9cafcedab2ed705204ef34e7f4a24dbcdca0054cbc0d8
diff --git a/media-libs/ladspa-cmt/files/cmt.rdf b/media-libs/ladspa-cmt/files/cmt.rdf
new file mode 100644
index 000000000000..c63fd9249a1b
--- /dev/null
+++ b/media-libs/ladspa-cmt/files/cmt.rdf
@@ -0,0 +1,91 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+<!DOCTYPE rdf:RDF [
+ <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'>
+ <!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#'>
+ <!ENTITY dc 'http://purl.org/dc/elements/1.1/'>
+ <!ENTITY ladspa 'http://ladspa.org/ontology#'>
+]>
+<rdf:RDF xmlns:rdf="&rdf;"
+ xmlns:rdfs="&rdfs;"
+ xmlns:dc="&dc;"
+ xmlns:ladspa="&ladspa;">
+
+ <!-- New classes needed by CMT -->
+ <rdfs:Class rdf:about="&ladspa;AmbisonicPlugin" ladspa:hasLabel="Ambisonic">
+ <rdfs:subClassOf rdf:resource="&ladspa;UtilityPlugin" />
+ </rdfs:Class>
+
+ <ladspa:AmbisonicPlugin rdf:about="&ladspa;1092"/>
+ <ladspa:AmbisonicPlugin rdf:about="&ladspa;1091"/>
+ <ladspa:AmbisonicPlugin rdf:about="&ladspa;1090"/>
+ <ladspa:AmbisonicPlugin rdf:about="&ladspa;1093"/>
+ <ladspa:AmbisonicPlugin rdf:about="&ladspa;1087"/>
+ <ladspa:AmbisonicPlugin rdf:about="&ladspa;1094"/>
+ <ladspa:AmbisonicPlugin rdf:about="&ladspa;1089"/>
+ <ladspa:AmbisonicPlugin rdf:about="&ladspa;1088"/>
+
+ <ladspa:AmplifierPlugin rdf:about="&ladspa;1067"/>
+ <ladspa:AmplifierPlugin rdf:about="&ladspa;1068"/>
+ <ladspa:ModulatorPlugin rdf:about="&ladspa;1070"/>
+
+ <ladspa:DistortionPlugin rdf:about="&ladspa;1846"/>
+ <ladspa:DistortionPlugin rdf:about="&ladspa;1227"/>
+ <ladspa:WaveshaperPlugin rdf:about="&ladspa;1097"/>
+
+ <ladspa:DelayPlugin rdf:about="&ladspa;1225"/>
+ <ladspa:DelayPlugin rdf:about="&ladspa;1053"/>
+ <ladspa:DelayPlugin rdf:about="&ladspa;1054"/>
+ <ladspa:DelayPlugin rdf:about="&ladspa;1055"/>
+ <ladspa:DelayPlugin rdf:about="&ladspa;1056"/>
+ <ladspa:DelayPlugin rdf:about="&ladspa;1057"/>
+ <ladspa:DelayPlugin rdf:about="&ladspa;1058"/>
+ <ladspa:DelayPlugin rdf:about="&ladspa;1059"/>
+ <ladspa:DelayPlugin rdf:about="&ladspa;1060"/>
+ <ladspa:DelayPlugin rdf:about="&ladspa;1061"/>
+ <ladspa:DelayPlugin rdf:about="&ladspa;1062"/>
+
+ <ladspa:UtilityPlugin rdf:about="&ladspa;1080"/>
+ <ladspa:UtilityPlugin rdf:about="&ladspa;1081"/>
+ <ladspa:UtilityPlugin rdf:about="&ladspa;1078"/>
+ <ladspa:UtilityPlugin rdf:about="&ladspa;1079"/>
+ <ladspa:UtilityPlugin rdf:about="&ladspa;1098"/>
+ <ladspa:UtilityPlugin rdf:about="&ladspa;1099"/>
+ <ladspa:UtilityPlugin rdf:about="&ladspa;1849"/>
+ <ladspa:UtilityPlugin rdf:about="&ladspa;1071"/>
+ <ladspa:UtilityPlugin rdf:about="&ladspa;1083"/>
+ <ladspa:UtilityPlugin rdf:about="&ladspa;1084"/>
+ <ladspa:UtilityPlugin rdf:about="&ladspa;1085"/>
+ <ladspa:UtilityPlugin rdf:about="&ladspa;1086"/>
+ <ladspa:UtilityPlugin rdf:about="&ladspa;1082"/>
+
+ <ladspa:ReverbPlugin rdf:about="&ladspa;1123"/>
+
+ <ladspa:GeneratorPlugin rdf:about="&ladspa;1221"/>
+ <ladspa:GeneratorPlugin rdf:about="&ladspa;1096"/>
+ <ladspa:GeneratorPlugin rdf:about="&ladspa;1069"/>
+ <ladspa:GeneratorPlugin rdf:about="&ladspa;1222"/>
+ <ladspa:GeneratorPlugin rdf:about="&ladspa;1226"/>
+ <ladspa:GeneratorPlugin rdf:about="&ladspa;1841"/>
+ <ladspa:GeneratorPlugin rdf:about="&ladspa;1844"/>
+ <ladspa:GeneratorPlugin rdf:about="&ladspa;1843"/>
+ <ladspa:GeneratorPlugin rdf:about="&ladspa;1063"/>
+ <ladspa:GeneratorPlugin rdf:about="&ladspa;1064"/>
+ <ladspa:GeneratorPlugin rdf:about="&ladspa;1065"/>
+ <ladspa:GeneratorPlugin rdf:about="&ladspa;1066"/>
+ <ladspa:GeneratorPlugin rdf:about="&ladspa;1223"/>
+
+ <ladspa:GatePlugin rdf:about="&ladspa;1845"/>
+ <ladspa:LimiterPlugin rdf:about="&ladspa;1848"/>
+ <ladspa:LimiterPlugin rdf:about="&ladspa;1842"/>
+ <ladspa:LimiterPlugin rdf:about="&ladspa;1076"/>
+ <ladspa:LimiterPlugin rdf:about="&ladspa;1077"/>
+ <ladspa:CompressorPlugin rdf:about="&ladspa;1072"/>
+ <ladspa:CompressorPlugin rdf:about="&ladspa;1073"/>
+ <ladspa:ExpanderPlugin rdf:about="&ladspa;1074"/>
+ <ladspa:ExpanderPlugin rdf:about="&ladspa;1075"/>
+
+ <ladspa:LowpassPlugin rdf:about="&ladspa;1051"/>
+ <ladspa:LowpassPlugin rdf:about="&ladspa;1224"/>
+ <ladspa:HighpassPlugin rdf:about="&ladspa;1052"/>
+
+</rdf:RDF>
diff --git a/media-libs/ladspa-cmt/files/ladspa-cmt-1.16-darwin.patch b/media-libs/ladspa-cmt/files/ladspa-cmt-1.16-darwin.patch
new file mode 100644
index 000000000000..f4352bfdcb91
--- /dev/null
+++ b/media-libs/ladspa-cmt/files/ladspa-cmt-1.16-darwin.patch
@@ -0,0 +1,12 @@
+diff -u src-org/makefile src/makefile
+--- src-org/makefile Thu Oct 28 19:22:56 2004
++++ src/makefile Thu Oct 28 19:28:16 2004
+@@ -68,7 +68,7 @@
+ targets: $(PLUGIN_LIB)
+
+ $(PLUGIN_LIB): $(PLUGIN_OBJECTS)
+- $(CXX) -shared \
++ $(CXX) -dynamiclib -ldl \
+ -o $(PLUGIN_LIB) \
+ $(PLUGIN_OBJECTS)
+
diff --git a/media-libs/ladspa-cmt/files/ladspa-cmt-1.16-mallocstdlib.patch b/media-libs/ladspa-cmt/files/ladspa-cmt-1.16-mallocstdlib.patch
new file mode 100644
index 000000000000..f4e7663282c6
--- /dev/null
+++ b/media-libs/ladspa-cmt/files/ladspa-cmt-1.16-mallocstdlib.patch
@@ -0,0 +1,75 @@
+Index: cmt/src/analogue.cpp
+===================================================================
+--- cmt.orig/src/analogue.cpp
++++ cmt/src/analogue.cpp
+@@ -24,7 +24,6 @@
+
+ /*****************************************************************************/
+
+-#include <malloc.h>
+ #include <math.h>
+ #include <stdlib.h>
+ #include "cmt.h"
+Index: cmt/src/canyondelay.cpp
+===================================================================
+--- cmt.orig/src/canyondelay.cpp
++++ cmt/src/canyondelay.cpp
+@@ -25,7 +25,7 @@
+ /*****************************************************************************/
+
+
+-#include <malloc.h>
++#include <stdlib.h>
+ #include <math.h>
+ #include "cmt.h"
+
+Index: cmt/src/lofi.cpp
+===================================================================
+--- cmt.orig/src/lofi.cpp
++++ cmt/src/lofi.cpp
+@@ -24,7 +24,6 @@
+
+ /*****************************************************************************/
+
+-#include <malloc.h>
+ #include <math.h>
+ #include <stdlib.h>
+ #include "cmt.h"
+Index: cmt/src/phasemod.cpp
+===================================================================
+--- cmt.orig/src/phasemod.cpp
++++ cmt/src/phasemod.cpp
+@@ -24,7 +24,6 @@
+
+ /*****************************************************************************/
+
+-#include <malloc.h>
+ #include <math.h>
+ #include <stdlib.h>
+ #include "cmt.h"
+Index: cmt/src/syndrum.cpp
+===================================================================
+--- cmt.orig/src/syndrum.cpp
++++ cmt/src/syndrum.cpp
+@@ -24,7 +24,7 @@
+
+ /*****************************************************************************/
+
+-#include <malloc.h>
++#include <stdlib.h>
+ #include <math.h>
+ #include "cmt.h"
+
+Index: cmt/src/vcf303.cpp
+===================================================================
+--- cmt.orig/src/vcf303.cpp
++++ cmt/src/vcf303.cpp
+@@ -26,7 +26,7 @@
+ /*****************************************************************************/
+
+
+-#include <malloc.h>
++#include <stdlib.h>
+ #include <math.h>
+ #include "cmt.h"
+
diff --git a/media-libs/ladspa-cmt/files/ladspa-cmt-1.16-respect-ldflags.patch b/media-libs/ladspa-cmt/files/ladspa-cmt-1.16-respect-ldflags.patch
new file mode 100644
index 000000000000..e851c2a781ed
--- /dev/null
+++ b/media-libs/ladspa-cmt/files/ladspa-cmt-1.16-respect-ldflags.patch
@@ -0,0 +1,14 @@
+https://bugs.gentoo.org/show_bug.cgi?id=334711
+
+--- cmt/src/makefile.old 2010-09-13 16:43:26.000000000 +0100
++++ cmt/src/makefile 2010-09-13 16:45:08.000000000 +0100
+@@ -66,7 +66,8 @@
+ targets: $(PLUGIN_LIB)
+
+ $(PLUGIN_LIB): $(PLUGIN_OBJECTS)
+- $(CXX) -shared \
++ $(CXX) $(LDFLAGS) \
++ -shared \
+ -o $(PLUGIN_LIB) \
+ $(PLUGIN_OBJECTS)
+
diff --git a/media-libs/ladspa-cmt/files/ladspa-cmt-1.16-sa.patch b/media-libs/ladspa-cmt/files/ladspa-cmt-1.16-sa.patch
new file mode 100644
index 000000000000..161c06d27eed
--- /dev/null
+++ b/media-libs/ladspa-cmt/files/ladspa-cmt-1.16-sa.patch
@@ -0,0 +1,18 @@
+Fix strict aliasing warnings: reeverb/Components/allpass.h:36:2: warning:
+dereferencing type-punned pointer will break strict-aliasing rules
+
+https://bugs.gentoo.org/show_bug.cgi?id=307563
+
+Index: cmt/src/freeverb/Components/denormals.h
+===================================================================
+--- cmt.orig/src/freeverb/Components/denormals.h
++++ cmt/src/freeverb/Components/denormals.h
+@@ -8,7 +8,7 @@
+ #ifndef _denormals_
+ #define _denormals_
+
+-#define undenormalise(sample) if(((*(unsigned int*)&sample)&0x7f800000)==0) sample=0.0f
++#define undenormalise(sample) if((((unsigned int)sample)&0x7f800000)==0) sample=0.0f
+
+ #endif//_denormals_
+
diff --git a/media-libs/ladspa-cmt/ladspa-cmt-1.16-r4.ebuild b/media-libs/ladspa-cmt/ladspa-cmt-1.16-r4.ebuild
new file mode 100644
index 000000000000..860c729d307c
--- /dev/null
+++ b/media-libs/ladspa-cmt/ladspa-cmt-1.16-r4.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib toolchain-funcs multilib-minimal
+
+S="${WORKDIR}/cmt/src"
+MY_P="cmt_src_${PV}"
+
+DESCRIPTION="CMT (computer music toolkit) LADSPA library plugins"
+HOMEPAGE="http://www.ladspa.org/"
+SRC_URI="http://www.ladspa.org/download/${MY_P}.tgz"
+
+KEYWORDS="alpha amd64 hppa ppc ppc64 sparc x86 ~x86-fbsd"
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE=""
+
+DEPEND=">=media-libs/ladspa-sdk-1.13-r2[${MULTILIB_USEDEP}]"
+RDEPEND=""
+
+src_prepare() {
+ sed -i \
+ -e "/^CFLAGS/ s/-O3/${CFLAGS}/" \
+ -e 's|/usr/local/include||g' \
+ -e 's|/usr/local/lib||g' makefile \
+ || die "sed makefile failed"
+ sed -i -e "s/^CXXFLAGS*/CXXFLAGS = ${CXXFLAGS} \$(INCLUDES) -Wall -fPIC\n#/" \
+ "${S}/makefile" || die "sed makefile failed (CXXFLAGS)"
+
+ cd "${S}" || die
+ epatch "${FILESDIR}/${P}-mallocstdlib.patch"
+ epatch "${FILESDIR}/${P}-respect-ldflags.patch"
+ epatch "${FILESDIR}/${P}-sa.patch"
+ use elibc_Darwin && epatch "${FILESDIR}/${P}-darwin.patch"
+ multilib_copy_sources
+}
+
+multilib_src_compile() {
+ tc-export CXX
+ emake PLUGIN_LIB="cmt.so"
+}
+
+multilib_src_install() {
+ insopts -m755
+ insinto /usr/$(get_libdir)/ladspa
+ doins *.so
+}
+
+multilib_src_install_all() {
+ insinto /usr/share/ladspa/rdf/
+ doins "${FILESDIR}/cmt.rdf"
+
+ dodoc ../README
+ dohtml ../doc/*
+}
diff --git a/media-libs/ladspa-cmt/metadata.xml b/media-libs/ladspa-cmt/metadata.xml
new file mode 100644
index 000000000000..0dc3775f83d7
--- /dev/null
+++ b/media-libs/ladspa-cmt/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>proaudio</herd>
+</pkgmetadata>
diff --git a/media-libs/ladspa-sdk/Manifest b/media-libs/ladspa-sdk/Manifest
new file mode 100644
index 000000000000..8e77fae5231d
--- /dev/null
+++ b/media-libs/ladspa-sdk/Manifest
@@ -0,0 +1 @@
+DIST ladspa_sdk_1.13.tgz 70540 SHA256 b5ed3f4f253a0f6c1b7a1f4b8cf62376ca9f51d999650dd822650c43852d306b SHA512 a1dab807fda58e08869d3f519be5fa91c394690eb13006fbe7f20b332548e4676b32b01273f5695bf36c8da72190c07618662a76d50f991b3f05068ac2b346ef WHIRLPOOL e92da3bf4b6fbf3ac9b3d25aa60170d88488943bc389765ec1abe31dd3b6893642016a89621d2db7d6acbe51bc2c964d66e31b3e9629c13f3432685dacab382a
diff --git a/media-libs/ladspa-sdk/files/ladspa-sdk-1.13-asneeded.patch b/media-libs/ladspa-sdk/files/ladspa-sdk-1.13-asneeded.patch
new file mode 100644
index 000000000000..19e3811b0707
--- /dev/null
+++ b/media-libs/ladspa-sdk/files/ladspa-sdk-1.13-asneeded.patch
@@ -0,0 +1,15 @@
+Index: ladspa_sdk/src/makefile
+===================================================================
+--- ladspa_sdk.orig/src/makefile
++++ ladspa_sdk/src/makefile
+@@ -36,6 +36,10 @@ MKDIR_P = mkdirhier
+ # RULES TO BUILD PLUGINS FROM C OR C++ CODE
+ #
+
++../plugins/filter.so: plugins/filter.c ladspa.h
++ $(CC) $(CFLAGS) $(INCLUDES) -fPIC -o plugins/filter.o -c plugins/filter.c
++ $(LD) $(RAW_LDFLAGS) -o ../plugins/filter.so plugins/filter.o -shared -lm
++
+ ../plugins/%.so: plugins/%.c ladspa.h
+ $(CC) $(CFLAGS) $(INCLUDES) -fPIC -o plugins/$*.o -c plugins/$*.c
+ $(LD) $(RAW_LDFLAGS) -o ../plugins/$*.so plugins/$*.o -shared
diff --git a/media-libs/ladspa-sdk/files/ladspa-sdk-1.13-fbsd.patch b/media-libs/ladspa-sdk/files/ladspa-sdk-1.13-fbsd.patch
new file mode 100644
index 000000000000..b5614b2377de
--- /dev/null
+++ b/media-libs/ladspa-sdk/files/ladspa-sdk-1.13-fbsd.patch
@@ -0,0 +1,16 @@
+Index: ladspa_sdk/src/applyplugin.c
+===================================================================
+--- ladspa_sdk.orig/src/applyplugin.c
++++ ladspa_sdk/src/applyplugin.c
+@@ -6,7 +6,11 @@
+ /*****************************************************************************/
+
+ #include <dlfcn.h>
++#ifdef __FreeBSD__
++#include <machine/endian.h>
++#else
+ #include <endian.h>
++#endif
+ #include <errno.h>
+ #include <math.h>
+ #include <stdlib.h>
diff --git a/media-libs/ladspa-sdk/files/ladspa-sdk-1.13-no-LD.patch b/media-libs/ladspa-sdk/files/ladspa-sdk-1.13-no-LD.patch
new file mode 100644
index 000000000000..acc53abace75
--- /dev/null
+++ b/media-libs/ladspa-sdk/files/ladspa-sdk-1.13-no-LD.patch
@@ -0,0 +1,16 @@
+--- a/src/makefile
++++ b/src/makefile
+@@ -38,11 +38,11 @@
+
+ ../plugins/filter.so: plugins/filter.c ladspa.h
+ $(CC) $(CFLAGS) $(INCLUDES) -fPIC -o plugins/filter.o -c plugins/filter.c
+- $(LD) $(RAW_LDFLAGS) -o ../plugins/filter.so plugins/filter.o -shared -lm
++ $(CC) $(CFLAGS) $(LDFLAGS) -o ../plugins/filter.so plugins/filter.o -nostartfiles -shared -lm
+
+ ../plugins/%.so: plugins/%.c ladspa.h
+ $(CC) $(CFLAGS) $(INCLUDES) -fPIC -o plugins/$*.o -c plugins/$*.c
+- $(LD) $(RAW_LDFLAGS) -o ../plugins/$*.so plugins/$*.o -shared
++ $(CC) $(CFLAGS) $(LDFLAGS) -o ../plugins/$*.so plugins/$*.o -nostartfiles -shared
+
+ ../plugins/%.so: plugins/%.cpp ladspa.h
+ $(CXX) $(CXXFLAGS) $(INCLUDES) -fPIC -o plugins/$*.o -c plugins/$*.cpp
diff --git a/media-libs/ladspa-sdk/files/ladspa-sdk-1.13-properbuild.patch b/media-libs/ladspa-sdk/files/ladspa-sdk-1.13-properbuild.patch
new file mode 100644
index 000000000000..c30a5084478a
--- /dev/null
+++ b/media-libs/ladspa-sdk/files/ladspa-sdk-1.13-properbuild.patch
@@ -0,0 +1,92 @@
+Index: ladspa_sdk/src/makefile
+===================================================================
+--- ladspa_sdk.orig/src/makefile
++++ ladspa_sdk/src/makefile
+@@ -13,10 +13,12 @@ INSTALL_BINARY_DIR = /usr/bin/
+ # GENERAL
+ #
+
++CFLAGS = -Wall -Werror -O3
++CXXFLAGS = -Wall -Werror -O3
++
+ INCLUDES = -I.
+-LIBRARIES = -ldl -lm
+-CFLAGS = $(INCLUDES) -Wall -Werror -O3 -fPIC
+-CXXFLAGS = $(CFLAGS)
++DYNAMIC_LD_LIBS = -ldl
++LIBRARIES = $(DYNAMIC_LD_LIBS) -lm
+ PLUGINS = ../plugins/amp.so \
+ ../plugins/delay.so \
+ ../plugins/filter.so \
+@@ -26,7 +28,8 @@ PROGRAMS = ../bin/analyseplugin \
+ ../bin/applyplugin \
+ ../bin/listplugins
+ CC = cc
+-CPP = c++
++CXX = c++
++MKDIR_P = mkdirhier
+
+ ###############################################################################
+ #
+@@ -34,12 +37,12 @@ CPP = c++
+ #
+
+ ../plugins/%.so: plugins/%.c ladspa.h
+- $(CC) $(CFLAGS) -o plugins/$*.o -c plugins/$*.c
+- $(LD) -o ../plugins/$*.so plugins/$*.o -shared
++ $(CC) $(CFLAGS) $(INCLUDES) -fPIC -o plugins/$*.o -c plugins/$*.c
++ $(LD) $(RAW_LDFLAGS) -o ../plugins/$*.so plugins/$*.o -shared
+
+ ../plugins/%.so: plugins/%.cpp ladspa.h
+- $(CPP) $(CXXFLAGS) -o plugins/$*.o -c plugins/$*.cpp
+- $(CPP) -o ../plugins/$*.so plugins/$*.o -shared
++ $(CXX) $(CXXFLAGS) $(INCLUDES) -fPIC -o plugins/$*.o -c plugins/$*.cpp
++ $(CXX) $(LDFLAGS) -o ../plugins/$*.so plugins/$*.o -shared
+
+ ###############################################################################
+ #
+@@ -59,12 +62,12 @@ test: /tmp/test.wav ../snd/noise.wav alw
+ @echo Test complete.
+
+ install: targets
+- -mkdirhier $(INSTALL_PLUGINS_DIR)
+- -mkdirhier $(INSTALL_INCLUDE_DIR)
+- -mkdirhier $(INSTALL_BINARY_DIR)
+- cp ../plugins/* $(INSTALL_PLUGINS_DIR)
+- cp ladspa.h $(INSTALL_INCLUDE_DIR)
+- cp ../bin/* $(INSTALL_BINARY_DIR)
++ -$(MKDIR_P) $(DESTDIR)$(INSTALL_PLUGINS_DIR)
++ -$(MKDIR_P) $(DESTDIR)$(INSTALL_INCLUDE_DIR)
++ -$(MKDIR_P) $(DESTDIR)$(INSTALL_BINARY_DIR)
++ cp ../plugins/* $(DESTDIR)$(INSTALL_PLUGINS_DIR)
++ cp ladspa.h $(DESTDIR)$(INSTALL_INCLUDE_DIR)
++ cp ../bin/* $(DESTDIR)$(INSTALL_BINARY_DIR)
+
+ /tmp/test.wav: targets ../snd/noise.wav
+ ../bin/listplugins
+@@ -90,19 +93,19 @@ targets: $(PLUGINS) $(PROGRAMS)
+ #
+
+ ../bin/applyplugin: applyplugin.o load.o default.o
+- $(CC) $(CFLAGS) $(LIBRARIES) \
++ $(CC) $(CFLAGS) $(INCLUDES) $(LDFLAGS) \
+ -o ../bin/applyplugin \
+- applyplugin.o load.o default.o
++ applyplugin.o load.o default.o $(LIBRARIES)
+
+ ../bin/analyseplugin: analyseplugin.o load.o default.o
+- $(CC) $(CFLAGS) $(LIBRARIES) \
++ $(CC) $(CFLAGS) $(INCLUDES) $(LDFLAGS) \
+ -o ../bin/analyseplugin \
+- analyseplugin.o load.o default.o
++ analyseplugin.o load.o default.o $(LIBRARIES)
+
+ ../bin/listplugins: listplugins.o search.o
+- $(CC) $(CFLAGS) $(LIBRARIES) \
++ $(CC) $(CFLAGS) $(INCLUDES) $(LDFLAGS) \
+ -o ../bin/listplugins \
+- listplugins.o search.o
++ listplugins.o search.o $(LIBRARIES)
+
+ ###############################################################################
+ #
diff --git a/media-libs/ladspa-sdk/ladspa-sdk-1.13-r1.ebuild b/media-libs/ladspa-sdk/ladspa-sdk-1.13-r1.ebuild
new file mode 100644
index 000000000000..30518d9a87e1
--- /dev/null
+++ b/media-libs/ladspa-sdk/ladspa-sdk-1.13-r1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils multilib toolchain-funcs portability flag-o-matic
+
+MY_PN=${PN/-/_}
+MY_P=${MY_PN}_${PV}
+
+DESCRIPTION="The Linux Audio Developer's Simple Plugin API"
+HOMEPAGE="http://www.ladspa.org/"
+SRC_URI="http://www.ladspa.org/download/${MY_P}.tgz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE=""
+
+RDEPEND=""
+DEPEND=">=sys-apps/sed-4"
+
+S="${WORKDIR}/${MY_PN}/src"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-properbuild.patch \
+ "${FILESDIR}"/${P}-asneeded.patch \
+ "${FILESDIR}"/${P}-fbsd.patch \
+ "${FILESDIR}"/${P}-no-LD.patch
+
+ sed -i -e 's:-sndfile-play*:@echo Disabled \0:' \
+ makefile || die "sed makefile failed (sound playing tests)"
+}
+
+src_compile() {
+ emake CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" \
+ DYNAMIC_LD_LIBS="$(dlopen_lib)" \
+ CC="$(tc-getCC)" CXX="$(tc-getCXX)" \
+ targets
+}
+
+src_install() {
+ emake INSTALL_PLUGINS_DIR="/usr/$(get_libdir)/ladspa" \
+ DESTDIR="${D}" \
+ MKDIR_P="mkdir -p" \
+ install
+
+ dohtml ../doc/*.html
+
+ # Needed for apps like rezound
+ dodir /etc/env.d
+ echo "LADSPA_PATH=/usr/$(get_libdir)/ladspa" > "${D}/etc/env.d/60ladspa"
+}
diff --git a/media-libs/ladspa-sdk/ladspa-sdk-1.13-r2.ebuild b/media-libs/ladspa-sdk/ladspa-sdk-1.13-r2.ebuild
new file mode 100644
index 000000000000..090f26af5f01
--- /dev/null
+++ b/media-libs/ladspa-sdk/ladspa-sdk-1.13-r2.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 eutils multilib toolchain-funcs portability flag-o-matic multilib-minimal
+
+MY_PN=${PN/-/_}
+MY_P=${MY_PN}_${PV}
+
+DESCRIPTION="The Linux Audio Developer's Simple Plugin API"
+HOMEPAGE="http://www.ladspa.org/"
+SRC_URI="http://www.ladspa.org/download/${MY_P}.tgz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE=""
+
+RDEPEND="abi_x86_32? ( !<=app-emulation/emul-linux-x86-soundlibs-20130224-r2
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)] )"
+DEPEND=">=sys-apps/sed-4"
+
+S="${WORKDIR}/${MY_PN}"
+
+src_prepare() {
+ cd "${WORKDIR}/${MY_PN}/src"
+ epatch "${FILESDIR}"/${P}-properbuild.patch \
+ "${FILESDIR}"/${P}-asneeded.patch \
+ "${FILESDIR}"/${P}-fbsd.patch \
+ "${FILESDIR}"/${P}-no-LD.patch
+
+ sed -i -e 's:-sndfile-play*:@echo Disabled \0:' \
+ makefile || die "sed makefile failed (sound playing tests)"
+
+ cd "${S}"
+ multilib_copy_sources
+}
+
+multilib_src_compile() {
+ cd src
+ emake CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" \
+ DYNAMIC_LD_LIBS="$(dlopen_lib)" \
+ CC="$(tc-getCC)" CXX="$(tc-getCXX)" \
+ targets
+}
+
+multilib_src_test() {
+ cd src
+ emake test
+}
+
+multilib_src_install() {
+ cd src
+ emake INSTALL_PLUGINS_DIR="/usr/$(get_libdir)/ladspa" \
+ DESTDIR="${D}" \
+ MKDIR_P="mkdir -p" \
+ install
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ dohtml doc/*.html
+
+ # Needed for apps like rezound
+ # emul-linux-soundlibs doesnt seem to install this, so keep it only for the
+ # default abi.
+ dodir /etc/env.d
+ echo "LADSPA_PATH=/usr/$(get_libdir)/ladspa" > "${D}/etc/env.d/60ladspa"
+}
diff --git a/media-libs/ladspa-sdk/metadata.xml b/media-libs/ladspa-sdk/metadata.xml
new file mode 100644
index 000000000000..0dc3775f83d7
--- /dev/null
+++ b/media-libs/ladspa-sdk/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>proaudio</herd>
+</pkgmetadata>
diff --git a/media-libs/lasi/Manifest b/media-libs/lasi/Manifest
new file mode 100644
index 000000000000..6592c80d06dc
--- /dev/null
+++ b/media-libs/lasi/Manifest
@@ -0,0 +1 @@
+DIST libLASi-1.1.1.tar.gz 223589 SHA256 175964cb4fec347737899f9fa0b8d7441864ae20f439e013432d9b9072ab3723 SHA512 b6a0aa180baebab5f7817186b443d828169b7493e2436190b9f98ef6f6769f546e05772a02dc705f68adf899f7e51878e580818ea0ce5258943de2273672dc77 WHIRLPOOL e49c63b7d2a6f611ca78b6f6fbef4dc1286bc42b217a870a0d79a9089bc7ad5ba8d902f78aa2ed8e33a9b02a3a400a18a60d459b5ef6fb758cbd88ecb199cefb
diff --git a/media-libs/lasi/files/lasi-1.1.0-cmake.patch b/media-libs/lasi/files/lasi-1.1.0-cmake.patch
new file mode 100644
index 000000000000..491c1733693a
--- /dev/null
+++ b/media-libs/lasi/files/lasi-1.1.0-cmake.patch
@@ -0,0 +1,11 @@
+--- cmake/modules.orig/summary.cmake 2008-02-09 01:27:56.000000000 +0000
++++ cmake/modules/summary.cmake 2008-11-04 16:25:59.968913787 +0000
+@@ -30,7 +30,7 @@
+
+ CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}
+ CMAKE_CXX_COMPILER: ${CMAKE_CXX_COMPILER}")
+-if(NOT CMAKE_BUILD_TYPE)
++if(NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL "None")
+ set(_output_results
+ "${_output_results}
+ CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}")
diff --git a/media-libs/lasi/files/lasi-1.1.0-pkgconfig.patch b/media-libs/lasi/files/lasi-1.1.0-pkgconfig.patch
new file mode 100644
index 000000000000..8eab557c8fcb
--- /dev/null
+++ b/media-libs/lasi/files/lasi-1.1.0-pkgconfig.patch
@@ -0,0 +1,22 @@
+diff -ur libLASi-1.1.0.orig/CMakeLists.txt libLASi-1.1.0/CMakeLists.txt
+--- libLASi-1.1.0.orig/CMakeLists.txt 2010-04-29 14:24:58.000000000 +0300
++++ libLASi-1.1.0/CMakeLists.txt 2010-04-29 14:28:54.000000000 +0300
+@@ -35,6 +35,7 @@
+ configure_file(
+ ${CMAKE_CURRENT_SOURCE_DIR}/lasi.pc.in
+ ${CMAKE_CURRENT_BINARY_DIR}/lasi.pc
++@ONLY
+ )
+
+ install(FILES
+diff -ur libLASi-1.1.0.orig/lasi.pc.in libLASi-1.1.0/lasi.pc.in
+--- libLASi-1.1.0.orig/lasi.pc.in 2010-04-29 14:24:58.000000000 +0300
++++ libLASi-1.1.0/lasi.pc.in 2010-04-29 14:26:25.000000000 +0300
+@@ -1,6 +1,6 @@
+ prefix=@prefix@
+ exec_prefix=@exec_prefix@
+-libdir=@libdir@
++libdir=${exec_prefix}/@libdir@
+ includedir=@includedir@
+
+ Name: LASi
diff --git a/media-libs/lasi/files/lasi-1.1.1-freetype251.patch b/media-libs/lasi/files/lasi-1.1.1-freetype251.patch
new file mode 100644
index 000000000000..515b159208ff
--- /dev/null
+++ b/media-libs/lasi/files/lasi-1.1.1-freetype251.patch
@@ -0,0 +1,63 @@
+Add compatibility for >=freetype-2.5.1
+
+Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
+
+--- libLASi-1.1.1/include/LASi.h
++++ libLASi-1.1.1/include/LASi.h
+@@ -11,7 +11,8 @@
+ #include <sstream>
+ #include <map>
+ #include <pango/pango.h>
+-#include <freetype/ftglyph.h>
++#include <ft2build.h>
++#include FT_GLYPH_H
+
+ class FreetypeGlyphMgr;
+ class ContextMgr;
+--- libLASi-1.1.1/src/drawGlyph.cpp
++++ libLASi-1.1.1/src/drawGlyph.cpp
+@@ -6,7 +6,8 @@
+ */
+
+ #include <ostream>
+-#include <freetype/ftoutln.h>
++#include <ft2build.h>
++#include FT_OUTLINE_H
+ #include <algorithm>
+ #include <LASi.h>
+ #include <config.h>
+--- libLASi-1.1.1/src/glyphMgr.cpp
++++ libLASi-1.1.1/src/glyphMgr.cpp
+@@ -10,8 +10,7 @@
+
+ #include <ft2build.h>
+ #include FT_FREETYPE_H
+-
+-#include <freetype/ftglyph.h>
++#include FT_GLYPH_H
+
+ #include <cassert>
+ #include "util.h"
+--- libLASi-1.1.1/src/glyphMgr.h
++++ libLASi-1.1.1/src/glyphMgr.h
+@@ -15,8 +15,8 @@
+
+ #include <ft2build.h>
+ #include FT_FREETYPE_H
++#include FT_GLYPH_H
+
+-#include <freetype/ftglyph.h>
+
+ /** Manage FT_Glyph by insuring that FT_Glyph is handled correctly.
+ */
+--- libLASi-1.1.1/src/util.h
++++ libLASi-1.1.1/src/util.h
+@@ -18,7 +18,7 @@
+
+ #include <ft2build.h>
+ #include FT_FREETYPE_H
+-#include <freetype/ftglyph.h>
++#include FT_GLYPH_H
+
+ std::ostream& operator<<(std::ostream&, const FT_Library);
+ std::ostream& operator<<(std::ostream&, const FT_Face);
diff --git a/media-libs/lasi/lasi-1.1.1.ebuild b/media-libs/lasi/lasi-1.1.1.ebuild
new file mode 100644
index 000000000000..485fe127eed6
--- /dev/null
+++ b/media-libs/lasi/lasi-1.1.1.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit cmake-utils eutils multilib
+
+MY_PN=libLASi
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="C++ library for postscript stream output"
+HOMEPAGE="http://www.unifont.org/lasi/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="doc examples"
+
+RDEPEND="
+ media-libs/freetype:2
+ x11-libs/pango"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+S=${WORKDIR}/${MY_P}
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.1.0-cmake.patch
+ "${FILESDIR}"/${PN}-1.1.0-pkgconfig.patch
+ "${FILESDIR}"/${PN}-1.1.1-freetype251.patch
+ )
+
+src_prepare() {
+ cmake-utils_src_prepare
+ sed -i \
+ -e "s:\/lib$:\/$(get_libdir):" \
+ -e "s/libLASi-\${VERSION}/${PF}/" \
+ cmake/modules/instdirs.cmake \
+ || die "Failed to fix cmake module"
+ sed -i \
+ -e "s:\${DATA_DIR}/examples:/usr/share/doc/${PF}/examples:" \
+ examples/CMakeLists.txt || die
+
+ use examples || sed -i -e '/add_subdirectory(examples)/d' CMakeLists.txt
+}
+
+src_configure() {
+ CMAKE_BUILD_TYPE=None
+ local mycmakeargs=(
+ -DCMAKE_INSTALL_LIBDIR="${EPREFIX}"/usr/$(get_libdir)
+ )
+ use doc || mycmakeargs+=( -DDOXYGEN_EXECUTABLE= )
+ cmake-utils_src_configure
+}
diff --git a/media-libs/lasi/metadata.xml b/media-libs/lasi/metadata.xml
new file mode 100644
index 000000000000..01ee798826cf
--- /dev/null
+++ b/media-libs/lasi/metadata.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci</herd>
+ <herd>graphics</herd>
+ <longdescription lang="en">
+ libLASi is a library written by Larry Siden that provides a C++
+ stream output interface for creating Postscript documents that can
+ contain characters from any of the scripts and symbol blocks
+ supported in Unicode and by Owen Taylor's Pango layout engine.
+ The library accomodates right-to-left scripts such as Arabic
+ and Hebrew as easily as left-to-right scripts. Indic and Indic-derived
+ Complex Text Layout (CTL) scripts, such as Devanagari, Thai, Lao, and
+ Tibetan are supported to the extent provided by Pango and by the
+ OpenType fonts installed on your system. All of this is provided
+ without need for any special configuration or layout calculation on
+ the programmer's part.
+ libLASi was designed for projects which require the ability to
+ produce Postscript independent of any one application framework.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">lasi</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/lastfmlib/Manifest b/media-libs/lastfmlib/Manifest
new file mode 100644
index 000000000000..367113770288
--- /dev/null
+++ b/media-libs/lastfmlib/Manifest
@@ -0,0 +1 @@
+DIST lastfmlib-0.4.0.tar.gz 333224 SHA256 28ecaffe2efecd5ac6ac00ba8e0a07b08e7fb35b45dfe384d88392ad6428309a
diff --git a/media-libs/lastfmlib/lastfmlib-0.4.0.ebuild b/media-libs/lastfmlib/lastfmlib-0.4.0.ebuild
new file mode 100644
index 000000000000..e910f8670af6
--- /dev/null
+++ b/media-libs/lastfmlib/lastfmlib-0.4.0.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+DESCRIPTION="C++ library to scrobble tracks on Last.fm"
+HOMEPAGE="http://code.google.com/p/lastfmlib/"
+SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="debug syslog"
+
+RDEPEND="net-misc/curl"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_configure() {
+ econf \
+ --disable-dependency-tracking \
+ --disable-static \
+ $(use_enable debug) \
+ $(use_enable syslog logging) \
+ --disable-unittests
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS ChangeLog
+ find "${D}"/usr -name '*.la' -delete
+}
diff --git a/media-libs/lastfmlib/metadata.xml b/media-libs/lastfmlib/metadata.xml
new file mode 100644
index 000000000000..17f241ddb540
--- /dev/null
+++ b/media-libs/lastfmlib/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>sound</herd>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>dirk.vdb@gmail.com</email>
+ <name>Dirk Vanden Boer</name>
+ <description>Proxy maintainer and upstream developer. Please CC him on bugs</description>
+ </maintainer>
+ <longdescription lang="en">
+ </longdescription>
+ <upstream>
+ <remote-id type="google-code">lastfmlib</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/lcms/Manifest b/media-libs/lcms/Manifest
new file mode 100644
index 000000000000..e9172fa2b2cc
--- /dev/null
+++ b/media-libs/lcms/Manifest
@@ -0,0 +1,2 @@
+DIST lcms2-2.6.tar.gz 4583389 SHA256 5172528839647c54c3da211837225e221be93e4733f5b5e9f57668f7107e14b1 SHA512 af2dd8829a5d8b280688bc247812829c885368951d385a23a1596cf8d0a7aed627c8faa35740073efc51a86ef5c900fc9bdb9dcdfad885fb8b1eae16953f9041 WHIRLPOOL 4fe1be53c48b0928bd474e05613c443eea49570a074d22b71863c485408523116927655b57d86bcb02aca85d9e06c0e26d9ee46bc7c4d746e91e951212de9e59
+DIST lcms2-2.7.tar.gz 6497867 SHA256 4524234ae7de185e6b6da5d31d6875085b2198bc63b1211f7dde6e2d197d6a53 SHA512 9e69ec30efa9d50474808c6ae3d9afb0c5798eaabca0052f82d54efecdc2b58ab40434ee6dee9cd80028597d79a07f6b3b1a73f5293fc444343274eac3e32fd4 WHIRLPOOL 2f5cffcdfdf7258e6825c403bc7e455a57e658a6e54ffc27349cb825a45fdee20979991940c9cc59e8a1e5c50f44f1ea57ba06e09ad534753ea8d24b3e2142b4
diff --git a/media-libs/lcms/files/lcms-2.6-cve-2014-0459.patch b/media-libs/lcms/files/lcms-2.6-cve-2014-0459.patch
new file mode 100644
index 000000000000..aa1b17b24083
--- /dev/null
+++ b/media-libs/lcms/files/lcms-2.6-cve-2014-0459.patch
@@ -0,0 +1,92 @@
+patch is directly taken from upstream at
+ https://github.com/mm2/Little-CMS/commit/74ba39195a0cf87c43f46a2fabd9c2168692822d
+original version
+ http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/rev/d6739b8326a4
+cleaned from parts of an accidental commit of unrelated changes.
+
+--- a/src/cmscnvrt.c
++++ b/src/cmscnvrt.c
+@@ -1045,7 +1045,7 @@
+ if (TheIntents[i] == INTENT_PERCEPTUAL || TheIntents[i] == INTENT_SATURATION) {
+
+ // Force BPC for V4 profiles in perceptual and saturation
+- if (cmsGetProfileVersion(hProfiles[i]) >= 4.0)
++ if (cmsGetEncodedICCversion(hProfiles[i]) >= 0x4000000)
+ BPC[i] = TRUE;
+ }
+ }
+--- a/src/cmsintrp.c
++++ b/src/cmsintrp.c
+@@ -929,7 +929,7 @@
+
+ Rest = c1 * rx + c2 * ry + c3 * rz;
+
+- Tmp1[OutChan] = (cmsUInt16Number) c0 + ROUND_FIXED_TO_INT(_cmsToFixedDomain(Rest));
++ Tmp1[OutChan] = (cmsUInt16Number) ( c0 + ROUND_FIXED_TO_INT(_cmsToFixedDomain(Rest)));
+ }
+
+
+@@ -993,7 +993,7 @@
+
+ Rest = c1 * rx + c2 * ry + c3 * rz;
+
+- Tmp2[OutChan] = (cmsUInt16Number) c0 + ROUND_FIXED_TO_INT(_cmsToFixedDomain(Rest));
++ Tmp2[OutChan] = (cmsUInt16Number) (c0 + ROUND_FIXED_TO_INT(_cmsToFixedDomain(Rest)));
+ }
+
+
+--- a/src/cmsio0.c
++++ b/src/cmsio0.c
+@@ -623,6 +623,32 @@
+ }
+
+
++
++// Enforces that the profile version is per. spec.
++// Operates on the big endian bytes from the profile.
++// Called before converting to platform endianness.
++// Byte 0 is BCD major version, so max 9.
++// Byte 1 is 2 BCD digits, one per nibble.
++// Reserved bytes 2 & 3 must be 0.
++static
++cmsUInt32Number _validatedVersion(cmsUInt32Number DWord)
++{
++ cmsUInt8Number* pByte = (cmsUInt8Number*) &DWord;
++ cmsUInt8Number temp1;
++ cmsUInt8Number temp2;
++
++ if (*pByte > 0x09) *pByte = (cmsUInt8Number) 0x09;
++ temp1 = *(pByte+1) & 0xf0;
++ temp2 = *(pByte+1) & 0x0f;
++ if (temp1 > 0x90) temp1 = 0x90;
++ if (temp2 > 0x09) temp2 = 0x09;
++ *(pByte+1) = (cmsUInt8Number)(temp1 | temp2);
++ *(pByte+2) = (cmsUInt8Number)0;
++ *(pByte+3) = (cmsUInt8Number)0;
++
++ return DWord;
++}
++
+ // Read profile header and validate it
+ cmsBool _cmsReadHeader(_cmsICCPROFILE* Icc)
+ {
+@@ -657,7 +683,7 @@
+ Icc -> creator = _cmsAdjustEndianess32(Header.creator);
+
+ _cmsAdjustEndianess64(&Icc -> attributes, &Header.attributes);
+- Icc -> Version = _cmsAdjustEndianess32(Header.version);
++ Icc -> Version = _cmsAdjustEndianess32(_validatedVersion(Header.version));
+
+ // Get size as reported in header
+ HeaderSize = _cmsAdjustEndianess32(Header.size);
+--- a/src/cmsio1.c
++++ b/src/cmsio1.c
+@@ -906,7 +906,7 @@
+ {
+ if (!cmsWriteTag(hProfile, cmsSigProfileSequenceDescTag, seq)) return FALSE;
+
+- if (cmsGetProfileVersion(hProfile) >= 4.0) {
++ if (cmsGetEncodedICCversion(hProfile) >= 0x4000000) {
+
+ if (!cmsWriteTag(hProfile, cmsSigProfileSequenceIdTag, seq)) return FALSE;
+ }
diff --git a/media-libs/lcms/lcms-2.6-r1.ebuild b/media-libs/lcms/lcms-2.6-r1.ebuild
new file mode 100644
index 000000000000..1b93405bef7f
--- /dev/null
+++ b/media-libs/lcms/lcms-2.6-r1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+AUTOTOOLS_PRUNE_LIBTOOL_FILES="modules"
+inherit autotools-multilib
+
+DESCRIPTION="A lightweight, speed optimized color management engine"
+HOMEPAGE="http://www.littlecms.com/"
+SRC_URI="mirror://sourceforge/${PN}/lcms2-${PV}.tar.gz"
+
+LICENSE="MIT"
+SLOT="2"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="doc jpeg static-libs +threads test tiff zlib"
+
+RDEPEND="jpeg? ( >=virtual/jpeg-0-r2:0[${MULTILIB_USEDEP}] )
+ tiff? ( >=media-libs/tiff-4.0.3-r6:0=[${MULTILIB_USEDEP}] )
+ zlib? ( >=sys-libs/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20130224-r10
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ )"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/lcms2-${PV}
+
+PATCHES=( "${FILESDIR}"/lcms-2.6-cve-2014-0459.patch )
+
+src_configure() {
+ local myeconfargs=(
+ $(use_with jpeg)
+ $(use_with tiff)
+ $(use_with zlib)
+ $(use_with threads)
+ )
+ autotools-multilib_src_configure
+}
+
+src_install() {
+ autotools-multilib_src_install
+
+ if use doc; then
+ docinto pdf
+ dodoc doc/*.pdf
+ fi
+}
diff --git a/media-libs/lcms/lcms-2.7.ebuild b/media-libs/lcms/lcms-2.7.ebuild
new file mode 100644
index 000000000000..bdb468e992bf
--- /dev/null
+++ b/media-libs/lcms/lcms-2.7.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+AUTOTOOLS_PRUNE_LIBTOOL_FILES="modules"
+inherit autotools-multilib
+
+DESCRIPTION="A lightweight, speed optimized color management engine"
+HOMEPAGE="http://www.littlecms.com/"
+SRC_URI="mirror://sourceforge/${PN}/lcms2-${PV}.tar.gz"
+
+LICENSE="MIT"
+SLOT="2"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="doc jpeg static-libs +threads test tiff zlib"
+
+RDEPEND="jpeg? ( >=virtual/jpeg-0-r2:0[${MULTILIB_USEDEP}] )
+ tiff? ( >=media-libs/tiff-4.0.3-r6:0=[${MULTILIB_USEDEP}] )
+ zlib? ( >=sys-libs/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20130224-r10
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ )"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/lcms2-${PV}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_with jpeg)
+ $(use_with tiff)
+ $(use_with zlib)
+ $(use_with threads)
+ )
+ autotools-multilib_src_configure
+}
+
+src_install() {
+ autotools-multilib_src_install
+
+ if use doc; then
+ docinto pdf
+ dodoc doc/*.pdf
+ fi
+}
diff --git a/media-libs/lcms/metadata.xml b/media-libs/lcms/metadata.xml
new file mode 100644
index 000000000000..65b8a18eb022
--- /dev/null
+++ b/media-libs/lcms/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>printing</herd>
+ <upstream>
+ <remote-id type="sourceforge">lcms</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/lensfun/Manifest b/media-libs/lensfun/Manifest
new file mode 100644
index 000000000000..01a09e2e654d
--- /dev/null
+++ b/media-libs/lensfun/Manifest
@@ -0,0 +1,2 @@
+DIST lensfun-0.3.0.tar.bz2 636694 SHA256 c2c3c03873cb549d49d42f118fcb0ffa95d1e45b9ff395e19facb63bf699bec1 SHA512 2b0a57b3ae48401908d51372814424c1076d4219400935990af917f131e34261c44122773114c045a39db9062d6a0146cd44e20e3942d2bf3c281a5cc1494cc7 WHIRLPOOL 898b19dcfc70e8721bba45a8782f9e33a17180ab4ce21eef06b874f1bcf76bc0cae8231fdcff797ceb0bdd086266a42a47ebe6d63d20d0595aee11bbe713484a
+DIST lensfun-0.3.1.tar.gz 761892 SHA256 216c23754212e051c8b834437e46af3812533bd770c09714e8c06c9d91cdb535 SHA512 cd0f142bb7d6aa154f587d89502da35473a7a02660246bd025ccd5d1982f55425359405898e11ce9094351ad44a2d6786b9ff07d227f75699e99e4de8f40938c WHIRLPOOL f71fc6452253dd4bb5f40cab8079bdb7a0d36a0ef1ad969261c997ce2b944f4ffd8116b3f4f522567c630099bb84b5cb8b4a57f5ea7141e2b8a0cdc2ceab5c20
diff --git a/media-libs/lensfun/files/lensfun-0.3.0-rst2man.patch b/media-libs/lensfun/files/lensfun-0.3.0-rst2man.patch
new file mode 100644
index 000000000000..1f2382feabb4
--- /dev/null
+++ b/media-libs/lensfun/files/lensfun-0.3.0-rst2man.patch
@@ -0,0 +1,12 @@
+diff -r -U1 lensfun-0.3.0.orig/docs/CMakeLists.txt lensfun-0.3.0/docs/CMakeLists.txt
+--- lensfun-0.3.0.orig/docs/CMakeLists.txt 2014-10-01 00:37:34.000000000 +0700
++++ lensfun-0.3.0/docs/CMakeLists.txt 2014-10-08 15:50:44.135182005 +0700
+@@ -28,5 +28,5 @@
+ TARGET man
+- COMMAND rst2man ${CMAKE_CURRENT_SOURCE_DIR}/man/g-lensfun-update-data.1.rst > ${CMAKE_CURRENT_BINARY_DIR}/g-lensfun-update-data.1
+- COMMAND rst2man ${CMAKE_CURRENT_SOURCE_DIR}/man/lensfun-update-data.1.rst > ${CMAKE_CURRENT_BINARY_DIR}/lensfun-update-data.1
+- COMMAND rst2man ${CMAKE_CURRENT_SOURCE_DIR}/man/lensfun-add-adapter.1.rst > ${CMAKE_CURRENT_BINARY_DIR}/lensfun-add-adapter.1
++ COMMAND rst2man.py ${CMAKE_CURRENT_SOURCE_DIR}/man/g-lensfun-update-data.1.rst > ${CMAKE_CURRENT_BINARY_DIR}/g-lensfun-update-data.1
++ COMMAND rst2man.py ${CMAKE_CURRENT_SOURCE_DIR}/man/lensfun-update-data.1.rst > ${CMAKE_CURRENT_BINARY_DIR}/lensfun-update-data.1
++ COMMAND rst2man.py ${CMAKE_CURRENT_SOURCE_DIR}/man/lensfun-add-adapter.1.rst > ${CMAKE_CURRENT_BINARY_DIR}/lensfun-add-adapter.1
+ WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
diff --git a/media-libs/lensfun/lensfun-0.3.0.ebuild b/media-libs/lensfun/lensfun-0.3.0.ebuild
new file mode 100644
index 000000000000..57dc113fa33a
--- /dev/null
+++ b/media-libs/lensfun/lensfun-0.3.0.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit multilib python-single-r1 cmake-utils
+
+DESCRIPTION="lensfun: A library for rectifying and simulating photographic lens distortions"
+HOMEPAGE="http://lensfun.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="LGPL-3 CC-BY-SA-3.0" # See README for reasoning.
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~amd64-linux ~x86-linux"
+IUSE="doc cpu_flags_x86_sse cpu_flags_x86_sse2"
+
+RDEPEND=">=dev-libs/glib-2.28
+ media-libs/libpng:0=
+ sys-libs/zlib:="
+DEPEND="${RDEPEND}
+ doc? (
+ app-doc/doxygen
+ dev-python/docutils
+ )"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+PATCHES=( "${FILESDIR}"/${P}-rst2man.patch )
+
+DOCS=( README docs/mounts.txt ChangeLog )
+
+src_configure() {
+ local mycmakeargs=(
+ -DDOCDIR="${EPREFIX}"/usr/share/doc/${PF}/html
+ -DLIBDIR="${EPREFIX}"/usr/$(get_libdir)
+ -DBUILD_AUXFUN=ON
+ $(cmake-utils_use_build doc)
+ $(cmake-utils_use_build cpu_flags_x86_sse FOR_SSE)
+ $(cmake-utils_use_build cpu_flags_x86_sse2 FOR_SSE2)
+ -DBUILD_STATIC=OFF
+ -DBUILD_TESTS=OFF
+ )
+
+ cmake-utils_src_configure
+}
diff --git a/media-libs/lensfun/lensfun-0.3.1.ebuild b/media-libs/lensfun/lensfun-0.3.1.ebuild
new file mode 100644
index 000000000000..aa32d5e794e9
--- /dev/null
+++ b/media-libs/lensfun/lensfun-0.3.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
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit multilib python-single-r1 cmake-utils
+
+DESCRIPTION="lensfun: A library for rectifying and simulating photographic lens distortions"
+HOMEPAGE="http://lensfun.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-3 CC-BY-SA-3.0" # See README for reasoning.
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux"
+IUSE="doc cpu_flags_x86_sse cpu_flags_x86_sse2 test"
+
+RDEPEND=">=dev-libs/glib-2.28
+ media-libs/libpng:0=
+ sys-libs/zlib:="
+DEPEND="${RDEPEND}
+ doc? (
+ app-doc/doxygen
+ dev-python/docutils
+ )"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DOCS=( README docs/mounts.txt ChangeLog )
+
+src_configure() {
+ local mycmakeargs=(
+ -DDOCDIR="${EPREFIX}"/usr/share/doc/${PF}/html
+ -DLIBDIR="${EPREFIX}"/usr/$(get_libdir)
+ -DBUILD_AUXFUN=ON
+ $(cmake-utils_use_build doc)
+ $(cmake-utils_use_build cpu_flags_x86_sse FOR_SSE)
+ $(cmake-utils_use_build cpu_flags_x86_sse2 FOR_SSE2)
+ $(cmake-utils_use_build test TESTS)
+ -DBUILD_STATIC=OFF
+ )
+
+ cmake-utils_src_configure
+}
diff --git a/media-libs/lensfun/metadata.xml b/media-libs/lensfun/metadata.xml
new file mode 100644
index 000000000000..007927e3fe5b
--- /dev/null
+++ b/media-libs/lensfun/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>graphics</herd>
+ <longdescription lang="en">
+The project provides a database of photographic lenses and a library that allows advanced access to the database including functions to correct images based on intimate knowledge of lens characteristics and calibration data.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">lensfun</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/leptonica/Manifest b/media-libs/leptonica/Manifest
new file mode 100644
index 000000000000..35f963e9d88c
--- /dev/null
+++ b/media-libs/leptonica/Manifest
@@ -0,0 +1,2 @@
+DIST leptonica-1.71.tar.gz 10212309 SHA256 cc5d736e81496eb25e195f380f553537e0410c3f7151a778b2a546e35c7eb848 SHA512 fd02eec19a442d767ba39ce01132ef1304a977e038bdbf64ec5e763607d51adf1c06aaa687fc3ec542854e535618b6da2042f10709286c2e1d236e43d77efd51 WHIRLPOOL 5a3d57735e8e36785dea9a481a602b0f812c08bab5e42ebaac2e3fa2d42a0c8c697a61351ec1122a14fd9f471945c200a1c75015bd35b043fd208a1cad079733
+DIST leptonica-1.72.tar.gz 10580170 SHA256 79d5eadd32658c9fea38700c975d60aa3d088eaa3e307659f004d40834de1f56 SHA512 8cb7acade68fbd9239dee4c24c5f35fd4cbb4db9e36fbf596478bd1e4635e45034664a16cec21c084091fbad64b4b6e78a4cb43fda8d0c0fc32f55a8cbf110d2 WHIRLPOOL b494b2ef928d1c1bd0b142e81c1cccf6312ee5b9822909506b1e9c7c9f57bebba5a7d824efdbde5e85e6dadb974775c9e7c5a7cdd2fc2f9466703e68694d471a
diff --git a/media-libs/leptonica/files/leptonica-1.71-fix-openjpeg-test.patch b/media-libs/leptonica/files/leptonica-1.71-fix-openjpeg-test.patch
new file mode 100644
index 000000000000..f7d18a24adce
--- /dev/null
+++ b/media-libs/leptonica/files/leptonica-1.71-fix-openjpeg-test.patch
@@ -0,0 +1,15 @@
+--- leptonica-1.71.orig/configure.ac 2014-08-31 14:33:16.834598973 +0200
++++ leptonica-1.71/configure.ac 2014-09-01 10:56:59.394975447 +0200
+@@ -78,10 +78,10 @@
+ )
+ )
+
+-AS_IF([test "x$with_libopenjp2" != xno],
++AS_IF([test "x$with_libopenjpeg" != xno],
+ AC_CHECK_LIB([openjp2], [opj_create_decompress],
+ AC_DEFINE([HAVE_LIBJP2K], 1, [Define to 1 if you have libopenjp2.]) AC_SUBST([LIBJP2K_LIBS], [-lopenjp2]),
+- AS_IF([test "x$with_libopenjp2" = xyes], AC_MSG_ERROR([libopenjp2 support requested but library not found]))
++ AS_IF([test "x$with_libopenjpeg" = xyes], AC_MSG_ERROR([libopenjp2 support requested but library not found]))
+ )
+ )
+
diff --git a/media-libs/leptonica/files/leptonica-1.71-openjpeg-2.0.patch b/media-libs/leptonica/files/leptonica-1.71-openjpeg-2.0.patch
new file mode 100644
index 000000000000..ed855729f1f6
--- /dev/null
+++ b/media-libs/leptonica/files/leptonica-1.71-openjpeg-2.0.patch
@@ -0,0 +1,26 @@
+Better use `pkg-config --cflags libopenjp2`
+
+Michael Weber, xmw@gentoo.org
+
+--- leptonica-1.71/src/libversions.c
++++ leptonica-1.71/src/libversions.c
+@@ -69,7 +69,7 @@
+ #endif
+
+ #if HAVE_LIBJP2K /* assuming it's 2.1 */
+-#include "openjpeg-2.1/openjpeg.h"
++#include "openjpeg-2.0/openjpeg.h"
+ #endif
+
+ #define stringJoinInPlace(s1, s2) \
+--- leptonica-1.71/src/jp2kio.c
++++ leptonica-1.71/src/jp2kio.c
+@@ -108,7 +108,7 @@
+
+ /* Leptonica supports both 2.0 and 2.1. If you have 2.0,
+ * change MINOR to 0. */
+-#define MINOR 1
++#define MINOR 0
+
+ #if MINOR == 0
+ static const l_int32 OpjMinor = 0;
diff --git a/media-libs/leptonica/leptonica-1.71-r1.ebuild b/media-libs/leptonica/leptonica-1.71-r1.ebuild
new file mode 100644
index 000000000000..422c0612704b
--- /dev/null
+++ b/media-libs/leptonica/leptonica-1.71-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
+
+AUTOTOOLS_AUTORECONF="1"
+inherit eutils autotools-utils
+
+DESCRIPTION="C library for image processing and analysis"
+HOMEPAGE="http://code.google.com/p/leptonica/"
+SRC_URI="http://www.leptonica.com/source/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm ~mips ~ppc ~ppc64 ~sparc x86"
+IUSE="gif jpeg jpeg2k png tiff webp utils zlib static-libs test"
+
+# N.b. Tests need all tested features enabled:
+REQUIRED_USE="test? ( gif jpeg jpeg2k png tiff webp )"
+
+DEPEND="gif? ( media-libs/giflib )
+ jpeg? ( virtual/jpeg )
+ jpeg2k? ( media-libs/openjpeg:2= )
+ png? ( media-libs/libpng
+ sys-libs/zlib
+ )
+ tiff? ( media-libs/tiff )
+ webp? ( media-libs/libwebp )
+ zlib? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}"
+
+DOCS=( README version-notes )
+PATCHES=( "${FILESDIR}"/"${P}"-fix-openjpeg-test.patch )
+
+src_prepare() {
+ if has_version "=media-libs/openjpeg-2.0.0" ; then
+ epatch "${FILESDIR}"/"${P}"-openjpeg-2.0.patch
+ fi
+
+ # unhtmlize docs
+ local X
+ for X in ${DOCS[@]}; do
+ awk '/<\/pre>/{s--} {if (s) print $0} /<pre>/{s++}' \
+ "${X}.html" > "${X}" || die 'awk failed'
+ rm -f -- "${X}.html"
+ done
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ # $(use_with webp libwebp) -> unknown
+ # so use-flag just for pulling dependencies
+ # zlib handling see bug 454890
+ local myeconfargs=(
+ $(use_with gif giflib)
+ $(use_with jpeg)
+ $(use_with jpeg2k libopenjpeg)
+ $(use_with png libpng)
+ $(use_with tiff libtiff)
+ $(use_enable utils programs)
+ $(use_enable static-libs static)
+ )
+ # libpng requires zlib:
+ if use png && ! use zlib ; then
+ # Ignore users non-sensical choice of -zlib
+ myeconfargs+=("--with-zlib")
+ else
+ myeconfargs+=( $(use_with zlib) )
+ fi
+ autotools-utils_src_configure
+}
diff --git a/media-libs/leptonica/leptonica-1.71.ebuild b/media-libs/leptonica/leptonica-1.71.ebuild
new file mode 100644
index 000000000000..f9ab57c804bc
--- /dev/null
+++ b/media-libs/leptonica/leptonica-1.71.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils autotools-utils
+
+DESCRIPTION="C library for image processing and analysis"
+HOMEPAGE="http://code.google.com/p/leptonica/"
+SRC_URI="http://www.leptonica.com/source/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm ~mips ppc ppc64 ~sparc x86"
+IUSE="gif jpeg jpeg2k png tiff webp utils zlib static-libs"
+
+DEPEND="gif? ( media-libs/giflib )
+ jpeg? ( virtual/jpeg )
+ jpeg2k? ( >=media-libs/openjpeg-2.1 )
+ !jpeg2k? ( !<media-libs/openjpeg-2.1 )
+ png? ( media-libs/libpng )
+ tiff? ( media-libs/tiff )
+ webp? ( media-libs/libwebp )
+ zlib? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}"
+
+DOCS=( README version-notes )
+
+src_prepare() {
+ # unhtmlize docs
+ local X
+ for X in ${DOCS[@]}; do
+ awk '/<\/pre>/{s--} {if (s) print $0} /<pre>/{s++}' \
+ "${X}.html" > "${X}" || die 'awk failed'
+ rm -f -- "${X}.html"
+ done
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ # $(use_with webp libwebp) -> unknown
+ # so use-flag just for pulling dependencies
+ # zlib handling see bug 454890
+ local myeconfargs=(
+ $(use_with gif giflib)
+ $(use_with jpeg)
+ $(use_with jpeg2k libopenjpeg)
+ $(use_with png libpng)
+ $(use_with tiff libtiff)
+ $(use_enable utils programs)
+ $(use_enable static-libs static)
+ )
+ # libpng requires zlib:
+ if use png && ! use zlib ; then
+ # Ignore users non-sensical choice of -zlib
+ myeconfargs+=("--with-zlib")
+ else
+ myeconfargs+=( $(use_with zlib) )
+ fi
+ autotools-utils_src_configure
+}
diff --git a/media-libs/leptonica/leptonica-1.72-r2.ebuild b/media-libs/leptonica/leptonica-1.72-r2.ebuild
new file mode 100644
index 000000000000..4a9e722168fd
--- /dev/null
+++ b/media-libs/leptonica/leptonica-1.72-r2.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools-multilib
+
+DESCRIPTION="C library for image processing and analysis"
+HOMEPAGE="http://code.google.com/p/leptonica/"
+SRC_URI="http://www.leptonica.com/source/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="gif jpeg jpeg2k png static-libs test tiff utils webp zlib"
+
+# N.B. Tests need some features enabled:
+REQUIRED_USE="test? ( jpeg png tiff )"
+
+DEPEND="gif? ( media-libs/giflib:=[${MULTILIB_USEDEP}] )
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
+ jpeg2k? ( media-libs/openjpeg:2=[${MULTILIB_USEDEP}] )
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}]
+ sys-libs/zlib:=[${MULTILIB_USEDEP}] )
+ tiff? ( media-libs/tiff:0=[${MULTILIB_USEDEP}] )
+ webp? ( media-libs/libwebp:=[${MULTILIB_USEDEP}] )
+ zlib? ( sys-libs/zlib:=[${MULTILIB_USEDEP}] )"
+RDEPEND="${DEPEND}"
+
+DOCS=( README version-notes )
+
+src_prepare() {
+ # unhtmlize docs
+ local X
+ for X in ${DOCS[@]}; do
+ awk '/<\/pre>/{s--} {if (s) print $0} /<pre>/{s++}' \
+ "${X}.html" > "${X}" || die 'awk failed'
+ rm -f -- "${X}.html"
+ done
+
+ autotools-utils_src_prepare
+}
+
+multilib_src_configure() {
+ local myeconfargs=(
+ $(use_with gif giflib)
+ $(use_with jpeg)
+ $(use_with jpeg2k libopenjpeg)
+ $(use_with png libpng)
+ $(use_with tiff libtiff)
+ $(use_with webp libwebp)
+ $(use_with zlib)
+ $(use_enable static-libs static)
+ $(multilib_native_use_enable utils programs)
+ )
+ autotools-utils_src_configure
+}
diff --git a/media-libs/leptonica/metadata.xml b/media-libs/leptonica/metadata.xml
new file mode 100644
index 000000000000..3f7ef2924819
--- /dev/null
+++ b/media-libs/leptonica/metadata.xml
@@ -0,0 +1,17 @@
+<?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>
+ <use>
+ <flag name="webp">Adds support for the WebP image format</flag>
+ <flag name="utils">Install command-line utilities</flag>
+ </use>
+ <longdescription>
+ Leptonica is a pedagogically-oriented open source site
+ containing software that is broadly useful for image
+ processing and image analysis applications.
+ </longdescription>
+</pkgmetadata>
diff --git a/media-libs/lib3ds/Manifest b/media-libs/lib3ds/Manifest
new file mode 100644
index 000000000000..18a4c259d5e2
--- /dev/null
+++ b/media-libs/lib3ds/Manifest
@@ -0,0 +1,2 @@
+DIST lib3ds-1.3.0.zip 443675 SHA256 f5b00c302955a67fa5fb1f2d3f2583767cdc61fdbc6fd843c0c7c9d95c5629e3 SHA512 7c866ea9721a7a124c25b4962e933a7066ec2e3c7998e5ae2ba93727f19b91bdb103699bada6d1e04b67e0a54b9f58d09382093569114a1846d86bb03821b8ac WHIRLPOOL 33adf50f5afff3563dabd48844cb0ea0631a4c2ce047fc7998139b15293f7de68646465ce0956918e1e3d04ece5efdd575d172c5d4183a73bb816d3d262c3682
+DIST lib3ds-20080909.zip 427233 SHA256 5d4df5f86a17a1aba58e9f54fe6a43c825bab15d8439ac9416c3f0c30fd1cca2 SHA512 ba7166dbd9fb97edc0f5cf0df56747b7e3c5aa1e62334ca995020a6ccd77284abc58e3fba80ec96ecf3765f5ce3121612c9f8c7dfedb2322f1cd2af85d567f87 WHIRLPOOL fd9c19a3fe6341cbf970d2c75352cb317c8073b23e94b792c4e905aa0a79e7c31d7ca1dd35dbef11f891052438c9216faee8245470423d5d8e206ea4981a9aa5
diff --git a/media-libs/lib3ds/files/lib3ds-1.3.0-r1-mesh.c.patch b/media-libs/lib3ds/files/lib3ds-1.3.0-r1-mesh.c.patch
new file mode 100644
index 000000000000..1455660596bf
--- /dev/null
+++ b/media-libs/lib3ds/files/lib3ds-1.3.0-r1-mesh.c.patch
@@ -0,0 +1,17 @@
+diff -Naur lib3ds-1.3.0.orig/lib3ds/mesh.c lib3ds-1.3.0/lib3ds/mesh.c
+--- lib3ds-1.3.0.orig/lib3ds/mesh.c 2007-06-20 19:04:08.000000000 +0200
++++ lib3ds-1.3.0/lib3ds/mesh.c 2010-09-14 06:34:39.987807911 +0200
+@@ -87,8 +87,11 @@
+ faces=lib3ds_io_read_word(io);
+ for (i=0; i<faces; ++i) {
+ index=lib3ds_io_read_word(io);
+- ASSERT(index<mesh->faces);
+- strcpy(mesh->faceL[index].material, name);
++ if (index<mesh->faces) {
++ strncpy(mesh->faceL[index].material, name, 64);
++ } else {
++ // TODO warning
++ }
+ }
+ }
+ break;
diff --git a/media-libs/lib3ds/files/lib3ds-1.3.0-r1-pkgconfig.patch b/media-libs/lib3ds/files/lib3ds-1.3.0-r1-pkgconfig.patch
new file mode 100644
index 000000000000..41f658e5311b
--- /dev/null
+++ b/media-libs/lib3ds/files/lib3ds-1.3.0-r1-pkgconfig.patch
@@ -0,0 +1,94 @@
+diff -uNr lib3ds-1.2.0.orig/lib3ds-config.in lib3ds-1.2.0/lib3ds-config.in
+--- lib3ds-1.2.0.orig/lib3ds-config.in 2000-05-23 14:13:08.000000000 +0200
++++ lib3ds-1.2.0/lib3ds-config.in 2007-10-21 06:37:48.000000000 +0200
+@@ -1,9 +1,5 @@
+ #!/bin/sh
+
+-prefix=@prefix@
+-exec_prefix=@exec_prefix@
+-exec_prefix_set=no
+-
+ usage()
+ {
+ cat <<EOF
+@@ -22,6 +18,8 @@
+ usage 1 1>&2
+ fi
+
++PKG_CONFIG_ARGS=
++
+ while test $# -gt 0; do
+ case "$1" in
+ -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+@@ -30,23 +28,23 @@
+
+ case $1 in
+ --prefix=*)
+- prefix=$optarg
++ PKG_CONFIG_ARGS="$PKG_CONFIG_ARGS --define-variable=prefix=$optarg"
+ if test $exec_prefix_set = no ; then
+- exec_prefix=$optarg
++ PKG_CONFIG_ARGS="$PKG_CONFIG_ARGS --define-variable=exec_prefix=$optarg"
+ fi
+ ;;
+ --prefix)
+ echo_prefix=yes
+ ;;
+ --exec-prefix=*)
+- exec_prefix=$optarg
++ PKG_CONFIG_ARGS="$PKG_CONFIG_ARGS --define-variable=exec_prefix=$optarg"
+ exec_prefix_set=yes
+ ;;
+ --exec-prefix)
+ echo_exec_prefix=yes
+ ;;
+ --version)
+- echo @LIB3DS_VERSION@
++ pkg-config --modversion lib3ds
+ ;;
+ --cflags)
+ echo_cflags=yes
+@@ -62,23 +60,18 @@
+ done
+
+ if test "$echo_prefix" = "yes"; then
+- echo $prefix
++ pkg-config $PKG_CONFIG_ARGS --variable=prefix lib3ds
+ fi
+
+ if test "$echo_exec_prefix" = "yes"; then
+- echo $exec_prefix
++ pkg-config $PKG_CONFIG_ARGS --variable=exec_prefix lib3ds
+ fi
+
+ if test "$echo_cflags" = "yes"; then
+- if test @includedir@ != /usr/include ; then
+- echo -I@includedir@
+- fi
++ pkg-config $PKG_CONFIG_ARGS --cflags lib3ds
+ fi
+
+ if test "$echo_libs" = "yes"; then
+- if test @libdir@ != /usr/lib ; then
+- my_linker_flags="-L@libdir@"
+- fi
+- echo ${my_linker_flags} -l3ds
+-fi
++ pkg-config $PKG_CONFIG_ARGS --libs lib3ds
++fi
+
+diff -uNr lib3ds-1.2.0.orig/lib3ds.pc.in lib3ds-1.2.0/lib3ds.pc.in
+--- lib3ds-1.2.0.orig/lib3ds.pc.in 1970-01-01 01:00:00.000000000 +0100
++++ lib3ds-1.2.0/lib3ds.pc.in 2007-10-21 06:23:53.000000000 +0200
+@@ -0,0 +1,11 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: lib3ds
++Description: lib3ds
++Version: @VERSION@
++Requires:
++Libs: -L${libdir} -l3ds -lm
++Cflags: -I${includedir}
diff --git a/media-libs/lib3ds/files/lib3ds-2.0.0_rc1-underlinking-no-autoreconf.patch b/media-libs/lib3ds/files/lib3ds-2.0.0_rc1-underlinking-no-autoreconf.patch
new file mode 100644
index 000000000000..af9040883c10
--- /dev/null
+++ b/media-libs/lib3ds/files/lib3ds-2.0.0_rc1-underlinking-no-autoreconf.patch
@@ -0,0 +1,45 @@
+commit 562d1412a705b6667bc9fa594133366fb7e787ab
+Author: hasufell <hasufell@gentoo.org>
+Date: Thu Sep 26 20:49:44 2013 +0200
+
+ avoid autoreconf
+
+diff --git a/examples/3ds2obj/Makefile.in b/examples/3ds2obj/Makefile.in
+index 1b5b1fe..d2fda8a 100644
+--- a/examples/3ds2obj/Makefile.in
++++ b/examples/3ds2obj/Makefile.in
+@@ -180,7 +180,7 @@ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+ INCLUDES = -I$(top_srcdir)/src
+ 3ds2obj_SOURCES = 3ds2obj.c
+-LDADD = $(top_builddir)/src/lib3ds.la
++LDADD = $(top_builddir)/src/lib3ds.la -lm
+ EXTRA_DIST = 3ds2obj.vcproj
+ all: all-am
+
+diff --git a/examples/3dsdump/Makefile.in b/examples/3dsdump/Makefile.in
+index 4c915cc..f9f7bba 100644
+--- a/examples/3dsdump/Makefile.in
++++ b/examples/3dsdump/Makefile.in
+@@ -180,7 +180,7 @@ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+ INCLUDES = -I$(top_srcdir)/src
+ 3dsdump_SOURCES = 3dsdump.c
+-LDADD = $(top_builddir)/src/lib3ds.la
++LDADD = $(top_builddir)/src/lib3ds.la -lm
+ EXTRA_DIST = 3dsdump.vcproj
+ all: all-am
+
+diff --git a/examples/cube/Makefile.in b/examples/cube/Makefile.in
+index 76b7946..1c4b5b6 100644
+--- a/examples/cube/Makefile.in
++++ b/examples/cube/Makefile.in
+@@ -180,7 +180,7 @@ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+ INCLUDES = -I$(top_srcdir)/src
+ cube_SOURCES = cube.c
+-LDADD = $(top_builddir)/src/lib3ds.la
++LDADD = $(top_builddir)/src/lib3ds.la -lm
+ EXTRA_DIST = cube.vcproj cube.tga
+ all: all-am
+
diff --git a/media-libs/lib3ds/files/lib3ds-2.0.0_rc1-underlinking.patch b/media-libs/lib3ds/files/lib3ds-2.0.0_rc1-underlinking.patch
new file mode 100644
index 000000000000..b9001af2993a
--- /dev/null
+++ b/media-libs/lib3ds/files/lib3ds-2.0.0_rc1-underlinking.patch
@@ -0,0 +1,56 @@
+commit 158cf6f8deaac69eba0c5941f809469cc3eefb43
+Author: hasufell <hasufell@gentoo.org>
+Date: Thu Sep 26 20:49:01 2013 +0200
+
+ fix underlinking
+
+diff --git a/configure.in b/configure.in
+index 7bf17c2..fa5bd3f 100644
+--- a/configure.in
++++ b/configure.in
+@@ -16,6 +16,8 @@ AM_INIT_AUTOMAKE(lib3ds, $LIB3DS_VERSION)
+ AC_PROG_CC
+ AC_PROG_LIBTOOL
+
++AC_CHECK_LIBM
++
+ AC_OUTPUT([ \
+ lib3ds-config \
+ Makefile \
+diff --git a/examples/3ds2obj/Makefile.am b/examples/3ds2obj/Makefile.am
+index 8213225..4214675 100644
+--- a/examples/3ds2obj/Makefile.am
++++ b/examples/3ds2obj/Makefile.am
+@@ -3,6 +3,6 @@ INCLUDES = -I$(top_srcdir)/src
+ bin_PROGRAMS = 3ds2obj
+ 3ds2obj_SOURCES = 3ds2obj.c
+
+-LDADD = $(top_builddir)/src/lib3ds.la
++LDADD = $(top_builddir)/src/lib3ds.la $(LIBM)
+
+ EXTRA_DIST = 3ds2obj.vcproj
+diff --git a/examples/3dsdump/Makefile.am b/examples/3dsdump/Makefile.am
+index 98ec5d1..ef19b04 100644
+--- a/examples/3dsdump/Makefile.am
++++ b/examples/3dsdump/Makefile.am
+@@ -3,6 +3,6 @@ INCLUDES = -I$(top_srcdir)/src
+ bin_PROGRAMS = 3dsdump
+ 3dsdump_SOURCES = 3dsdump.c
+
+-LDADD = $(top_builddir)/src/lib3ds.la
++LDADD = $(top_builddir)/src/lib3ds.la $(LIBM)
+
+ EXTRA_DIST = 3dsdump.vcproj
+diff --git a/examples/cube/Makefile.am b/examples/cube/Makefile.am
+index c79c0ee..539813d 100644
+--- a/examples/cube/Makefile.am
++++ b/examples/cube/Makefile.am
+@@ -3,7 +3,7 @@ INCLUDES = -I$(top_srcdir)/src
+ bin_PROGRAMS = cube
+ cube_SOURCES = cube.c
+
+-LDADD = $(top_builddir)/src/lib3ds.la
++LDADD = $(top_builddir)/src/lib3ds.la $(LIBM)
+
+ EXTRA_DIST = cube.vcproj cube.tga
+
diff --git a/media-libs/lib3ds/lib3ds-1.3.0-r1.ebuild b/media-libs/lib3ds/lib3ds-1.3.0-r1.ebuild
new file mode 100644
index 000000000000..6ac25a9c1095
--- /dev/null
+++ b/media-libs/lib3ds/lib3ds-1.3.0-r1.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-utils
+
+DESCRIPTION="library for managing 3D-Studio Release 3 and 4 .3DS files"
+HOMEPAGE="https://code.google.com/p/lib3ds/"
+SRC_URI="https://${PN}.googlecode.com/files/${P}.zip"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86"
+IUSE="static-libs"
+
+RDEPEND="media-libs/freeglut
+ virtual/opengl"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+PATCHES=(
+ "${FILESDIR}/lib3ds-1.3.0-r1-pkgconfig.patch"
+ "${FILESDIR}/lib3ds-1.3.0-r1-mesh.c.patch"
+)
diff --git a/media-libs/lib3ds/lib3ds-2.0.0_rc1.ebuild b/media-libs/lib3ds/lib3ds-2.0.0_rc1.ebuild
new file mode 100644
index 000000000000..a6a6ecf0ea20
--- /dev/null
+++ b/media-libs/lib3ds/lib3ds-2.0.0_rc1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+MY_PV="20080909"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="library for managing 3D-Studio Release 3 and 4 .3DS files"
+HOMEPAGE="http://code.google.com/p/lib3ds/"
+SRC_URI="http://lib3ds.googlecode.com/files/${MY_P}.zip"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86"
+IUSE=""
+
+S=${WORKDIR}/${MY_P}
+
+RDEPEND="media-libs/freeglut
+ virtual/opengl"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+src_prepare() {
+# epatch "${FILESDIR}"/${P}-underlinking.patch
+ epatch "${FILESDIR}"/${P}-underlinking-no-autoreconf.patch
+}
diff --git a/media-libs/lib3ds/metadata.xml b/media-libs/lib3ds/metadata.xml
new file mode 100644
index 000000000000..6dd50faab98c
--- /dev/null
+++ b/media-libs/lib3ds/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>games</herd>
+<herd>3dprint</herd>
+<maintainer>
+ <email>amynka@gentoo.org</email>
+</maintainer>
+<longdescription>
+lib3ds is an overall software library for managing 3D-Studio Release 3 and 4 ".3DS" files.
+</longdescription>
+</pkgmetadata>
diff --git a/media-libs/libXcm/Manifest b/media-libs/libXcm/Manifest
new file mode 100644
index 000000000000..93d3f4cfee6c
--- /dev/null
+++ b/media-libs/libXcm/Manifest
@@ -0,0 +1,2 @@
+DIST libXcm-0.5.2.tar.bz2 301813 SHA256 1ed2750e55dd3c8c9e1597de577bdc3a72d37e976979926d973ea9e3583afcd5 SHA512 4d67218206ba319cb768c055c44a0537468232c12fa463525993c578b5a5a8ee82fc55463ef5e34e85dda221facd2517372bc1920bd025e951337fa84c72f6ab WHIRLPOOL 72ebdb1883065d4c42ed4caee6ad018df7f43f03aab241af576e8e8b91d6a8b03b082da94179f35508b720ff4660ebd533dc5bfc243b8c86faa6766905444790
+DIST libXcm-0.5.3.tar.bz2 303829 SHA256 04bda6aa4e8b1ef61815ebfc7760277856a5fd3b347948e0d99cf0ec78b03050 SHA512 af5ccb3d6834ceb34b25a6ec0362a0d111e5fde91fe41f7ff8ea3000d2031573f477f1074eada1bc67a2fe920d7d63f272996b3ad3678a010e0d0092351ea5e4 WHIRLPOOL 259367e279c53bbc91c468046a7e5c8a646739f3499b91834082167af82fc134658f6826cf2ef94c775a1c36b7eec2b30386d0e23a8b70b33ab966aaf92f68c5
diff --git a/media-libs/libXcm/libXcm-0.5.2-r1.ebuild b/media-libs/libXcm/libXcm-0.5.2-r1.ebuild
new file mode 100644
index 000000000000..c5d4bd0d28f7
--- /dev/null
+++ b/media-libs/libXcm/libXcm-0.5.2-r1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools-multilib
+
+DESCRIPTION="reference implementation of the net-color spec"
+HOMEPAGE="http://www.oyranos.org/libxcm/"
+SRC_URI="mirror://sourceforge/oyranos/${PN}/${PN}-0.4.x/${P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="X static-libs"
+
+RDEPEND="X? ( >=x11-libs/libXmu-1.1.1-r1[${MULTILIB_USEDEP}]
+ >=x11-libs/libXfixes-5.0.1[${MULTILIB_USEDEP}]
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ >=x11-proto/xproto-7.0.24[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}"
+
+src_configure() {
+ local myeconfargs=(
+ --disable-silent-rules
+ $(use_with X x11)
+ $(use_enable static-libs static)
+ )
+ autotools-multilib_src_configure
+}
diff --git a/media-libs/libXcm/libXcm-0.5.3.ebuild b/media-libs/libXcm/libXcm-0.5.3.ebuild
new file mode 100644
index 000000000000..6c66071380ba
--- /dev/null
+++ b/media-libs/libXcm/libXcm-0.5.3.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools-multilib
+
+DESCRIPTION="reference implementation of the net-color spec"
+HOMEPAGE="http://www.oyranos.org/libxcm/"
+SRC_URI="mirror://sourceforge/oyranos/${PN}/${PN}-0.4.x/${P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="X static-libs"
+
+RDEPEND="X? ( >=x11-libs/libXmu-1.1.1-r1[${MULTILIB_USEDEP}]
+ >=x11-libs/libXfixes-5.0.1[${MULTILIB_USEDEP}]
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ >=x11-proto/xproto-7.0.24[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}"
+
+src_configure() {
+ local myeconfargs=(
+ --disable-silent-rules
+ $(use_with X x11)
+ $(use_enable static-libs static)
+ )
+ autotools-multilib_src_configure
+}
diff --git a/media-libs/libXcm/libXcm-9999.ebuild b/media-libs/libXcm/libXcm-9999.ebuild
new file mode 100644
index 000000000000..4c70f928984b
--- /dev/null
+++ b/media-libs/libXcm/libXcm-9999.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools-multilib git-2
+
+DESCRIPTION="reference implementation of the net-color spec"
+HOMEPAGE="http://www.oyranos.org/libxcm/"
+EGIT_REPO_URI="git://www.oyranos.org/git/xcolor"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS=""
+IUSE="X static-libs"
+
+RDEPEND="X? ( >=x11-libs/libXmu-1.1.1-r1[${MULTILIB_USEDEP}]
+ >=x11-libs/libXfixes-5.0.1[${MULTILIB_USEDEP}]
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ >=x11-proto/xproto-7.0.24[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}"
+
+src_configure() {
+ local myeconfargs=(
+ --disable-silent-rules
+ $(use_with X x11)
+ $(use_enable static-libs static)
+ )
+ autotools-multilib_src_configure
+}
diff --git a/media-libs/libXcm/metadata.xml b/media-libs/libXcm/metadata.xml
new file mode 100644
index 000000000000..59acc2cc580e
--- /dev/null
+++ b/media-libs/libXcm/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>xmw@gentoo.org</email>
+<name>Michael Weber</name>
+</maintainer>
+</pkgmetadata>
+
diff --git a/media-libs/libaacplus/Manifest b/media-libs/libaacplus/Manifest
new file mode 100644
index 000000000000..cd28a9e2b947
--- /dev/null
+++ b/media-libs/libaacplus/Manifest
@@ -0,0 +1,2 @@
+DIST 26410-800.zip 1348294 SHA256 4e7b3268b4e21a4dc2c88ee3af57c9115334d6b616a6e5f2e3f43643bf37b72f SHA512 a1d5a4d9b67b4e7292d3d07ba62090f92e9f6cd90e72aadb0e4067120941cc89b93ed136023461354567e845f34274a8097187a70d1477695b3e2024f86ee29d WHIRLPOOL a8a595e2347d7ee8c6d229d4546ef14438821a54c6d4b92af26e47a9df1380288603df197bc84920373611dc861cebc1f921efea459487ec63d8066a2ea2717b
+DIST libaacplus-2.0.2.tar.gz 42155 SHA256 60dceb64d4ecf0be8d21661d5af2f214710f9d5b6ab389a5bdebf746baa7e1d7 SHA512 05a6cc206fc187c96b065e94a80a57f6f1610fc5a3228f0163ac5acedabab2f2501dec8df3d196b9a1e2c2785277b0224cd5bb4d2a090bad2dcae44e023f9189 WHIRLPOOL 8af2ab05419cb2b72633ffef14e8930712241a7f9133dace168c443f57c993bd047950803f19df98e90579bf713846ee9882fa683049cb036ddc89e6e820603e
diff --git a/media-libs/libaacplus/libaacplus-2.0.2-r2.ebuild b/media-libs/libaacplus/libaacplus-2.0.2-r2.ebuild
new file mode 100644
index 000000000000..b5e5c3242636
--- /dev/null
+++ b/media-libs/libaacplus/libaacplus-2.0.2-r2.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils multilib-minimal
+
+# This file cannot be mirrored.
+# See the notes at http://tipok.org.ua/node/17
+# The .tar.gz, ie the wrapper library, is lgpl though.
+TGPPDIST=26410-800.zip
+
+DESCRIPTION="HE-AAC+ v2 library, based on the reference implementation"
+HOMEPAGE="http://tipok.org.ua/node/17"
+SRC_URI="
+ http://dev.gentoo.org/~aballier/${P}.tar.gz
+ http://tipok.ath.cx/downloads/media/aac+/libaacplus/${P}.tar.gz
+ http://217.20.164.161/~tipok/aacplus/${P}.tar.gz
+ http://www.3gpp.org/ftp/Specs/archive/26_series/26.410/${TGPPDIST}"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 hppa ppc ppc64 x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="fftw static-libs"
+RESTRICT="bindist mirror"
+
+RDEPEND="
+ !media-sound/aacplusenc
+ fftw? ( >=sci-libs/fftw-3.3.3-r2:3.0[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ virtual/pkgconfig"
+
+src_unpack() {
+ unpack ${P}.tar.gz
+}
+
+src_prepare() {
+ sed \
+ -e 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/g' \
+ -i configure.ac || die
+ eautoreconf
+ cp "${DISTDIR}/${TGPPDIST}" src/ || die
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ econf \
+ $(use_with fftw fftw3) \
+ $(use_enable static-libs static)
+}
+
+multilib_src_compile() {
+ emake -j1
+}
+
+multilib_src_install_all() {
+ prune_libtool_files --all
+ einstalldocs
+}
diff --git a/media-libs/libaacplus/metadata.xml b/media-libs/libaacplus/metadata.xml
new file mode 100644
index 000000000000..3bf6bcfeb512
--- /dev/null
+++ b/media-libs/libaacplus/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>sound</herd>
+</pkgmetadata>
diff --git a/media-libs/libaacs/Manifest b/media-libs/libaacs/Manifest
new file mode 100644
index 000000000000..a1ef18491ab2
--- /dev/null
+++ b/media-libs/libaacs/Manifest
@@ -0,0 +1,3 @@
+DIST libaacs-0.7.1.tar.bz2 318472 SHA256 ecc49a22ae2a645cfb5b8e732b51fe0e2684e6488a68debc5edd6e07edadb2b0 SHA512 0fc603854380d51c0d517d64fad54047c726de4c8ad510b035f1d8fe50e6febb41bea9ef00f38356be8c3588b531e687fae7655a56ad93bf48c40bd7cf90bff7 WHIRLPOOL 8d350d6137faf630d09cbcd0b1b9b3472037a00887d4d46af8395bc646203a0fd316660c9fb8815b4955d27a42e279ea7fd404b57907f740e74f5e0913c857d4
+DIST libaacs-0.8.0.tar.bz2 311904 SHA256 5e44545c7c4cb48bea49ff6b19d148416663593d6125ac8734776df21154ba94 SHA512 038ce28ca6c13f1ba6f77ed73bcdbdd4cca7e760a68d65b4c24f9b3480c527ac0cef7301e379fc29b71527a1953b17adb8f0d955926aa4691fb892aa8a09c3f4 WHIRLPOOL 1838e558221f3dd7aa72d0fd8099c96f7dac290927c410f592720f0a5e0c3929df840b273baab4bd4a381fb330a19f8cc9d34ad98f0b9764cde9fb23eeaef3d8
+DIST libaacs-0.8.1.tar.bz2 315231 SHA256 95c344a02c47c9753c50a5386fdfb8313f9e4e95949a5c523a452f0bcb01bbe8 SHA512 dd677627f073460b719b9f836b026acc3e23b166c7b16bd205cf2ca97c376095980532fb15087c0d77b30c712cd5a5dd90b2cc2ae3128da717621ebd825afcc4 WHIRLPOOL e85d7978cb2b46cb5897c9b2c5f3af0512725d8bdb1e2a2e09758c87dc1da1ac7146841234e1c07c52919531573a4686548ef1699f029d76bb6a66cc335b0f19
diff --git a/media-libs/libaacs/libaacs-0.7.1.ebuild b/media-libs/libaacs/libaacs-0.7.1.ebuild
new file mode 100644
index 000000000000..88ea41694320
--- /dev/null
+++ b/media-libs/libaacs/libaacs-0.7.1.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 autotools-multilib
+
+DESCRIPTION="Open implementation of the Advanced Access Content System (AACS) specification"
+HOMEPAGE="http://www.videolan.org/developers/libaacs.html"
+SRC_URI="ftp://ftp.videolan.org/pub/videolan/libaacs/${PV}/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ~arm ppc ppc64 sparc x86 ~amd64-fbsd"
+IUSE="static-libs"
+
+RDEPEND=">=dev-libs/libgcrypt-1.5.3:0[${MULTILIB_USEDEP}]
+ >=dev-libs/libgpg-error-1.12[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ virtual/yacc"
+
+DOCS=( ChangeLog KEYDB.cfg README.txt )
+
+AUTOTOOLS_IN_SOURCE_BUILD=1
+
+src_configure() {
+ local myeconfargs=(
+ --disable-optimizations
+ )
+ autotools-multilib_src_configure
+}
diff --git a/media-libs/libaacs/libaacs-0.8.0.ebuild b/media-libs/libaacs/libaacs-0.8.0.ebuild
new file mode 100644
index 000000000000..d4e426385856
--- /dev/null
+++ b/media-libs/libaacs/libaacs-0.8.0.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 autotools-multilib
+
+DESCRIPTION="Open implementation of the Advanced Access Content System (AACS) specification"
+HOMEPAGE="http://www.videolan.org/developers/libaacs.html"
+SRC_URI="ftp://ftp.videolan.org/pub/videolan/libaacs/${PV}/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd"
+IUSE="static-libs"
+
+RDEPEND=">=dev-libs/libgcrypt-1.5.3:0=[${MULTILIB_USEDEP}]
+ >=dev-libs/libgpg-error-1.12[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ virtual/yacc"
+
+DOCS=( ChangeLog KEYDB.cfg README.txt )
+
+AUTOTOOLS_IN_SOURCE_BUILD=1
+
+src_configure() {
+ local myeconfargs=(
+ --disable-optimizations
+ )
+ autotools-multilib_src_configure
+}
diff --git a/media-libs/libaacs/libaacs-0.8.1.ebuild b/media-libs/libaacs/libaacs-0.8.1.ebuild
new file mode 100644
index 000000000000..d4e426385856
--- /dev/null
+++ b/media-libs/libaacs/libaacs-0.8.1.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 autotools-multilib
+
+DESCRIPTION="Open implementation of the Advanced Access Content System (AACS) specification"
+HOMEPAGE="http://www.videolan.org/developers/libaacs.html"
+SRC_URI="ftp://ftp.videolan.org/pub/videolan/libaacs/${PV}/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd"
+IUSE="static-libs"
+
+RDEPEND=">=dev-libs/libgcrypt-1.5.3:0=[${MULTILIB_USEDEP}]
+ >=dev-libs/libgpg-error-1.12[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ virtual/yacc"
+
+DOCS=( ChangeLog KEYDB.cfg README.txt )
+
+AUTOTOOLS_IN_SOURCE_BUILD=1
+
+src_configure() {
+ local myeconfargs=(
+ --disable-optimizations
+ )
+ autotools-multilib_src_configure
+}
diff --git a/media-libs/libaacs/metadata.xml b/media-libs/libaacs/metadata.xml
new file mode 100644
index 000000000000..d9df1878d8e2
--- /dev/null
+++ b/media-libs/libaacs/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-libs/libafterimage/Manifest b/media-libs/libafterimage/Manifest
new file mode 100644
index 000000000000..1017aee005eb
--- /dev/null
+++ b/media-libs/libafterimage/Manifest
@@ -0,0 +1 @@
+DIST libAfterImage-1.20.tar.bz2 1017055 SHA256 6e233253f4d1dd22dfce9f9a245cc036d814fc99ba7f6732f4e345de62cfe458 SHA512 4056c73d1ab401480803a3a932d647a66574df9f65efc0d30ba80800e1a3424b4fbfce8e9cdf82c4852862491d92cbb42392f8cce8d6ac21d3b49e4ffe1808c4 WHIRLPOOL 27ee6236ba9b84bb736c9caeabedf0f872fc4223d198f20c530d804d5ace1b91e2f5c26e2015a547899f1cea482a7ea5fcc91e84123ee7390eb38caa3460dd5b
diff --git a/media-libs/libafterimage/files/libafterimage-config.patch b/media-libs/libafterimage/files/libafterimage-config.patch
new file mode 100644
index 000000000000..d2ed9e032953
--- /dev/null
+++ b/media-libs/libafterimage/files/libafterimage-config.patch
@@ -0,0 +1,15 @@
+--- afterimage-config.in 2005-01-12 18:03:36.000000000 +0000
++++ afterimage-config.in.new 2006-10-15 14:16:12.000000000 +0100
+@@ -110,11 +110,7 @@
+ libs="-lAfterBase $libs"
+ fi
+ libs="-lAfterImage $libs"
+- if test "@libdir@" != "/usr/lib" ; then
+- echo -L@libdir@ $libs
+- else
+- echo $libs
+- fi
++ echo $libs
+ else
+ echo $libs
+ fi
diff --git a/media-libs/libafterimage/files/libafterimage-gif.patch b/media-libs/libafterimage/files/libafterimage-gif.patch
new file mode 100644
index 000000000000..8a2ca8e46720
--- /dev/null
+++ b/media-libs/libafterimage/files/libafterimage-gif.patch
@@ -0,0 +1,18 @@
+--- configure.in.orig 2011-03-28 18:55:22.000000000 +0100
++++ configure.in 2011-03-28 18:56:08.000000000 +0100
+@@ -60,12 +60,9 @@
+ dnl# AC_ARG_WITH(xpm_includes, [ --with-xpm-includes=DIR use libXpm includes in DIR( when builtin XPM handling is disabled )], xpm_includes="$withval", xpm_includes=no)
+
+ dnl# standard libgif/ungif should not be used and considered obsolete!
+-dnl# AC_ARG_WITH(ungif, [ --with-ungif support Uncompressed GIF image format using libungif [no]],with_ungif="$withval",with_ungif=no)
+-dnl# AC_ARG_WITH(gif, [ --with-gif support GIF image format using libgif [no]],with_gif="$withval",with_gif=no)
+-dnl# AC_ARG_WITH(gif_includes, [ --with-gif-includes=DIR use GIF includes in DIR], gif_includes="$withval", gif_includes=no)
+-with_ungif=no
+-with_gif=no
+-with_gif_includes=no
++AC_ARG_WITH(ungif, [ --with-ungif support Uncompressed GIF image format using libungif [no]],with_ungif="$withval",with_ungif=no)
++AC_ARG_WITH(gif, [ --with-gif support GIF image format using libgif [no]],with_gif="$withval",with_gif=no)
++AC_ARG_WITH(gif_includes, [ --with-gif-includes=DIR use GIF includes in DIR], gif_includes="$withval", gif_includes=no)
+ AC_ARG_WITH(builtin_gif, [ --with-builtin-gif support Uncompressed GIF image format using builtin libgif [yes]],with_builtin_gif="$withval",with_builtin_gif=yes)
+
+
diff --git a/media-libs/libafterimage/files/libafterimage-giflib42.patch b/media-libs/libafterimage/files/libafterimage-giflib42.patch
new file mode 100644
index 000000000000..b1b1f7263da1
--- /dev/null
+++ b/media-libs/libafterimage/files/libafterimage-giflib42.patch
@@ -0,0 +1,19 @@
+Fix build failure with giflib 4.2.
+Patch by Andrew Savchenko <bircoph@gmail.com>.
+https://bugs.gentoo.org/486804
+
+--- libAfterImage-1.20/ungif.h.orig
++++ libAfterImage-1.20/ungif.h
+@@ -7,6 +7,12 @@
+ extern "C" {
+ #endif
+
++#if (GIFLIB_MAJOR>4) || ((GIFLIB_MAJOR==4) && (GIFLIB_MINOR>=2))
++static inline void PrintGifError(void) {
++ fprintf(stderr, "%s\n", GifErrorString());
++}
++#endif
++
+ #ifdef __GNUC__
+ #define ASIM_PrintGifError() do{ fprintf( stderr, "%s():%d:<%s> ",__FUNCTION__, __LINE__, path?path:"null" ); PrintGifError(); }while(0)
+ #else
diff --git a/media-libs/libafterimage/files/libafterimage-libpng15.patch b/media-libs/libafterimage/files/libafterimage-libpng15.patch
new file mode 100644
index 000000000000..44d5b944007c
--- /dev/null
+++ b/media-libs/libafterimage/files/libafterimage-libpng15.patch
@@ -0,0 +1,31 @@
+--- export.c
++++ export.c
+@@ -496,7 +496,7 @@
+ png_ptr = png_create_write_struct( PNG_LIBPNG_VER_STRING, NULL, NULL, NULL );
+ if ( png_ptr != NULL )
+ if( (info_ptr = png_create_info_struct(png_ptr)) != NULL )
+- if( setjmp(png_ptr->jmpbuf) )
++ if( setjmp(png_jmpbuf(png_ptr)) )
+ {
+ png_destroy_info_struct(png_ptr, (png_infopp) &info_ptr);
+ info_ptr = NULL ;
+--- import.c
++++ import.c
+@@ -1251,7 +1251,7 @@
+ * the normal method of doing things with libpng). REQUIRED unless you
+ * set up your own error handlers in the png_create_read_struct() earlier.
+ */
+- if ( !setjmp (png_ptr->jmpbuf))
++ if ( !setjmp (png_jmpbuf(png_ptr)))
+ {
+ ASFlagType rgb_flags = ASStorage_RLEDiffCompress|ASStorage_32Bit ;
+
+@@ -1468,7 +1468,7 @@
+
+ static void asim_png_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
+ {
+- ASImPNGReadBuffer *buf = (ASImPNGReadBuffer *)png_ptr->io_ptr;
++ ASImPNGReadBuffer *buf = (ASImPNGReadBuffer *)png_get_io_ptr(png_ptr);
+ memcpy(data, buf->buffer, length);
+ buf->buffer += length;
+ }
diff --git a/media-libs/libafterimage/files/libafterimage-makefile.in.patch b/media-libs/libafterimage/files/libafterimage-makefile.in.patch
new file mode 100644
index 000000000000..a41f90a64c58
--- /dev/null
+++ b/media-libs/libafterimage/files/libafterimage-makefile.in.patch
@@ -0,0 +1,62 @@
+--- Makefile.in.orig 2005-08-16 10:00:02.000000000 +0200
++++ Makefile.in 2005-08-16 10:00:35.000000000 +0200
+@@ -79,7 +79,7 @@
+ MV = @MV@
+ RM = @RM@
+ RMF = @RM@ -f
+-MKDIR = @MKDIR@
++MKDIR = @MKDIR@ -p
+ FIND = @FIND@
+ XARGS = @XARGS@
+ LDCONFIG = @LDCONFIG@
+@@ -135,20 +135,6 @@
+ @(if [ -d $(LIBDIR) ] && [ -w $(LIBDIR) ]; then \
+ echo "$(INSTALL_LIB) $(LIB_STATIC) $(LIBDIR)"; \
+ $(INSTALL_LIB) $(LIB_STATIC) $(LIBDIR); \
+- if [ `uname` = "Linux" ]; then \
+- if test $(LIBDIR) = "/lib" || test $(LIBDIR) = "/usr/lib"; then \
+- echo "" > /dev/null; \
+- elif grep -q $(LIBDIR) /etc/ld.so.conf > /dev/null 2>&1; then \
+- echo "" > /dev/null; \
+- else \
+- echo "Unable to find $(LIBDIR) in ld.so.conf. In order to use "; \
+- echo "$(LIB_STATIC), you may need to add it or set LD_LIBRARY_PATH."; \
+- fi; \
+- if test -w /etc; then \
+- echo "$(LDCONFIG)"; \
+- $(LDCONFIG); \
+- fi; \
+- fi ;\
+ fi \
+ )
+
+@@ -161,18 +147,6 @@
+ $(RM) -f $(LIBDIR)/$(LIB_SHARED).$(LIBVERMAJOR) $(LIBDIR)/$(LIB_SHARED); \
+ $(LN_S) -f $(LIB_SHARED).$(LIBVER) $(LIBDIR)/$(LIB_SHARED).$(LIBVERMAJOR); \
+ $(LN_S) -f $(LIB_SHARED).$(LIBVERMAJOR) $(LIBDIR)/$(LIB_SHARED); \
+- if test `uname` = "Linux"; then \
+- if test $(LIBDIR) = "/lib" || test $(LIBDIR) = "/usr/lib"; then \
+- echo "" > /dev/null; \
+- elif grep -q $(LIBDIR) /etc/ld.so.conf > /dev/null 2>&1; then \
+- echo "" > /dev/null; \
+- else \
+- echo "Unable to find $(LIBDIR) in ld.so.conf. In order to use "; \
+- echo "$(LIB_SHARED), you may need to add it or set LD_LIBRARY_PATH."; \
+- fi; \
+- echo "$(LDCONFIG)"; \
+- $(LDCONFIG); \
+- fi \
+ )
+
+ install.cyg:
+@@ -393,8 +366,8 @@
+ $(LN_S) -f $(LIB_SHARED).$(LIBVER) $(LIB_SHARED).$(LIBVERMAJOR)
+
+ $(LIB_SHARED).$(LIBVER): $(LIB_OBJS) $(LIB_INCS) config.h
+- $(CC) -shared -Wl,-soname,$(LIB_SHARED).$(LIBVERMAJOR) -o $(LIB_SHARED).$(LIBVER) \
+- $(LIB_OBJS)
++ $(CC) -shared $(USER_LD_FLAGS) -Wl,-soname,$(LIB_SHARED).$(LIBVERMAJOR) -o $(LIB_SHARED).$(LIBVER) \
++ $(LIB_OBJS) $(LIBRARIES)
+
+ install.man:
+ @if [ -d doc/man ] ; then \
diff --git a/media-libs/libafterimage/libafterimage-1.20.ebuild b/media-libs/libafterimage/libafterimage-1.20.ebuild
new file mode 100644
index 000000000000..9b5da9c5e98c
--- /dev/null
+++ b/media-libs/libafterimage/libafterimage-1.20.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils autotools
+
+MY_PN=libAfterImage
+
+DESCRIPTION="Afterstep's standalone generic image manipulation library"
+HOMEPAGE="http://www.afterstep.org/afterimage/index.php"
+SRC_URI="ftp://ftp.afterstep.org/stable/${MY_PN}/${MY_PN}-${PV}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="examples gif jpeg cpu_flags_x86_mmx nls png static-libs svg tiff truetype"
+
+RDEPEND="
+ x11-libs/libSM
+ x11-libs/libXext
+ x11-libs/libXrender
+ png? ( >=media-libs/libpng-1.4:0 )
+ jpeg? ( virtual/jpeg )
+ gif? ( media-libs/giflib )
+ svg? ( gnome-base/librsvg )
+ tiff? ( media-libs/tiff:0 )
+ truetype? ( media-libs/freetype )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ x11-proto/xextproto
+ !!x11-wm/afterstep"
+
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+src_prepare() {
+ # fix some ldconfig problem in makefile.in
+ epatch "${FILESDIR}"/${PN}-makefile.in.patch
+ # fix lib paths in afterimage-config
+ epatch "${FILESDIR}"/${PN}-config.patch
+ # fix gif unbundle
+ epatch "${FILESDIR}"/${PN}-gif.patch
+ # fix for libpng15 compability
+ epatch "${FILESDIR}"/${PN}-libpng15.patch
+ # fix for gif library bug #486804
+ epatch "${FILESDIR}"/${PN}-giflib42.patch
+ # do not build examples
+ sed -i \
+ -e '/^all:/s/apps//' \
+ -e '/^install:/s/install.apps//' \
+ Makefile.in || die
+ # remove forced flags
+ sed -i \
+ -e 's/CFLAGS="-O3"//' \
+ -e 's/ -rdynamic//' \
+ configure.in || die "sed failed"
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs staticlibs) \
+ $(use_enable nls i18n) \
+ $(use_enable cpu_flags_x86_mmx mmx-optimization) \
+ $(use_with png) \
+ $(use_with jpeg) \
+ $(use_with gif) \
+ $(use_with svg) \
+ $(use_with tiff) \
+ $(use_with truetype ttf) \
+ --enable-glx \
+ --enable-sharedlibs \
+ --with-x \
+ --with-xpm \
+ --without-builtin-gif \
+ --without-builtin-jpeg \
+ --without-builtin-png \
+ --without-builtin-zlib \
+ --without-afterbase
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ AFTER_DOC_DIR="${ED}/usr/share/doc/${PF}" \
+ install
+ dodoc ChangeLog README
+ if use examples; then
+ cd apps || die
+ emake clean
+ rm Makefile* || die
+ insinto /usr/share/doc/${PF}/examples
+ doins *
+ fi
+}
diff --git a/media-libs/libafterimage/metadata.xml b/media-libs/libafterimage/metadata.xml
new file mode 100644
index 000000000000..7a85a428b17d
--- /dev/null
+++ b/media-libs/libafterimage/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>sci-physics</herd>
+<longdescription lang='en'>
+ libAfterImage is a generic image manipulation library.
+ It was initially implemented to address AfterStep Window Manager's needs for
+ image handling, but it evolved into software suitable for project
+ that has needs for handling images. Most of the popular image formats are
+ supported using standard libraries, with XCF, XPM, PPM/PNM, BMP, ICO,
+ TGA and GIF being supported internally. PNG, JPEG and TIFF formats are
+ supported via standard libraries. Text rendering capabilities
+ included, providing support for TrueType fonts using FreeType library,
+ and anti-aliasing of standard fonts from X window system.
+</longdescription>
+</pkgmetadata>
diff --git a/media-libs/libao/Manifest b/media-libs/libao/Manifest
new file mode 100644
index 000000000000..b45e471e3efa
--- /dev/null
+++ b/media-libs/libao/Manifest
@@ -0,0 +1,2 @@
+DIST libao-1.1.0.tar.gz 397102 SHA256 29de5bb9b1726ba890455ef7e562d877df87811febb0d99ee69164b88c171bd4 SHA512 8eee73cfd3ffd79b5cae76fc3ad88270b56cc49dfbf4599c4ed591b259b79475e396c984abde94118a916fba20db84e26ac8e51dbf5efd4bb10341328ca0615a WHIRLPOOL 2bb1f946ceb89e44373850bd53696a41c57ef9902d760ef485368163ca3efaf622c0faf06a46c609e03c9fb2dc5b0f51c9f45020981cba199024ea581d859d26
+DIST libao-1.2.0.tar.gz 464596 SHA256 03ad231ad1f9d64b52474392d63c31197b0bc7bd416e58b1c10a329a5ed89caf SHA512 9456953826c188d67129ad78366bb86d6243499f2cd340d20d61366f7e40a33f3f8ab601c7f18ce9e24aa22f898093b482b2415b7e428c1486ef7e5ac27b3ee4 WHIRLPOOL 00bca36fd033775f9fb8551ce20425d7c3ebd138174692831f256fbcef306e391479ae63a8bd25fa4995a2ff53ba5e478317ef6c3b5028925a737b08189f4bf2
diff --git a/media-libs/libao/libao-1.1.0-r1.ebuild b/media-libs/libao/libao-1.1.0-r1.ebuild
new file mode 100644
index 000000000000..2375cacf67e0
--- /dev/null
+++ b/media-libs/libao/libao-1.1.0-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit libtool multilib eutils
+
+DESCRIPTION="The Audio Output library"
+HOMEPAGE="http://www.xiph.org/ao/"
+SRC_URI="http://downloads.xiph.org/releases/ao/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc x86 ~x86-fbsd ~x86-interix ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-solaris"
+IUSE="alsa nas mmap pulseaudio static-libs"
+
+RDEPEND="alsa? ( media-libs/alsa-lib )
+ nas? ( media-libs/nas )
+ pulseaudio? ( media-sound/pulseaudio )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ sed -i -e 's:-O20::' configure || die
+ sed -i -e "s:/lib:/$(get_libdir):g" ao.m4 || die
+ elibtoolize
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ --disable-esd \
+ $(use_enable alsa alsa) \
+ $(use_enable mmap alsa-mmap) \
+ --disable-arts \
+ $(use_enable nas) \
+ $(use_enable pulseaudio pulse)
+}
+
+src_install() {
+ emake DESTDIR="${D}" docdir="${EPREFIX}/usr/share/doc/${PF}/html" install
+ dodoc AUTHORS CHANGES README TODO
+ prune_libtool_files --all
+}
diff --git a/media-libs/libao/libao-1.1.0-r2.ebuild b/media-libs/libao/libao-1.1.0-r2.ebuild
new file mode 100644
index 000000000000..d80a5a46e72e
--- /dev/null
+++ b/media-libs/libao/libao-1.1.0-r2.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 libtool multilib multilib-minimal eutils
+
+DESCRIPTION="The Audio Output library"
+HOMEPAGE="http://www.xiph.org/ao/"
+SRC_URI="http://downloads.xiph.org/releases/ao/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd ~x86-interix ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-solaris"
+IUSE="alsa nas mmap pulseaudio static-libs"
+
+RDEPEND="alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
+ nas? ( >=media-libs/nas-1.9.4[${MULTILIB_USEDEP}] )
+ pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] )
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-soundlibs-20131008-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ sed -i -e 's:-O20::' configure || die
+ sed -i -e "s:/lib:/$(get_libdir):g" ao.m4 || die
+ elibtoolize
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE=${S} \
+ econf \
+ $(use_enable static-libs static) \
+ --disable-esd \
+ $(use_enable alsa alsa) \
+ $(use_enable mmap alsa-mmap) \
+ --disable-arts \
+ $(use_enable nas) \
+ $(use_enable pulseaudio pulse)
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" docdir="${EPREFIX}/usr/share/doc/${PF}/html" install
+}
+
+multilib_src_install_all() {
+ dodoc AUTHORS CHANGES README TODO
+ prune_libtool_files --all
+}
diff --git a/media-libs/libao/libao-1.2.0.ebuild b/media-libs/libao/libao-1.2.0.ebuild
new file mode 100644
index 000000000000..f9774d1e35ad
--- /dev/null
+++ b/media-libs/libao/libao-1.2.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 libtool multilib multilib-minimal eutils
+
+DESCRIPTION="The Audio Output library"
+HOMEPAGE="http://www.xiph.org/ao/"
+SRC_URI="http://downloads.xiph.org/releases/ao/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~x86-fbsd ~x86-interix ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-solaris"
+IUSE="alsa nas mmap pulseaudio static-libs"
+
+RDEPEND="alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
+ nas? ( >=media-libs/nas-1.9.4[${MULTILIB_USEDEP}] )
+ pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] )
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-soundlibs-20131008-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ sed -i 's:-O20::' configure || die
+ sed -i "s:/lib:/$(get_libdir):g" ao.m4 || die
+ elibtoolize
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE=${S} \
+ econf \
+ $(use_enable static-libs static) \
+ --disable-esd \
+ $(use_enable alsa alsa) \
+ $(use_enable mmap alsa-mmap) \
+ --disable-arts \
+ $(use_enable nas) \
+ $(use_enable pulseaudio pulse)
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" docdir="${EPREFIX}/usr/share/doc/${PF}/html" install
+}
+
+multilib_src_install_all() {
+ dodoc AUTHORS CHANGES README TODO
+ prune_libtool_files --all
+}
diff --git a/media-libs/libao/metadata.xml b/media-libs/libao/metadata.xml
new file mode 100644
index 000000000000..e1774e3d9ad7
--- /dev/null
+++ b/media-libs/libao/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>sound</herd>
+</pkgmetadata>
diff --git a/media-libs/libart_lgpl/Manifest b/media-libs/libart_lgpl/Manifest
new file mode 100644
index 000000000000..3ecde2f73047
--- /dev/null
+++ b/media-libs/libart_lgpl/Manifest
@@ -0,0 +1 @@
+DIST libart_lgpl-2.3.21.tar.bz2 329102 SHA256 fdc11e74c10fc9ffe4188537e2b370c0abacca7d89021d4d303afdf7fd7476fa SHA512 8a632a6a4da59e5e8c02ec2f5a57e36d182b325b46513765425e5f171ff9ae326af1b133725beba28f7e76654309e001aee9bace727b5b4c8589405256a3c020 WHIRLPOOL 1e524326519b5e8b12a6bc708bcd9c8e9789a79d2a3cd6bf71fd526b6868407436af7d5b00ece7e41b7ea7419cb700ef0b417e7f22ebcfe4aace2cbfa02bcd80
diff --git a/media-libs/libart_lgpl/files/libart_lgpl-2.3.21-crosscompile.patch b/media-libs/libart_lgpl/files/libart_lgpl-2.3.21-crosscompile.patch
new file mode 100644
index 000000000000..152e9d501e6a
--- /dev/null
+++ b/media-libs/libart_lgpl/files/libart_lgpl-2.3.21-crosscompile.patch
@@ -0,0 +1,79 @@
+From e1443c945a4cf67096d8c27721aadd7368382b3f Mon Sep 17 00:00:00 2001
+From: Gilles Dartiguelongue <eva@gentoo.org>
+Date: Tue, 6 Apr 2010 15:22:25 +0200
+Subject: [PATCH 2/2] gentoo: use ISO types for fixed type size
+
+---
+ Makefile.am | 11 ++---------
+ art_config.h | 5 +++++
+ configure.in | 10 ----------
+ 3 files changed, 7 insertions(+), 19 deletions(-)
+ create mode 100644 art_config.h
+
+diff --git a/Makefile.am b/Makefile.am
+index 95952da..6aa2fe3 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -2,13 +2,6 @@ check_PROGRAMS = testart testuta
+
+ bin_SCRIPTS = \
+ libart2-config
+-
+-noinst_SCRIPTS = gen_art_config.sh
+-
+-BUILT_SOURCES = art_config.h
+-
+-art_config.h:
+- ./gen_art_config.sh > art_config.h
+
+ EXTRA_DIST = \
+ libart.def \
+@@ -173,5 +166,5 @@ install-data-local: install-ms-lib install-libtool-import-lib
+
+ uninstall-local: uninstall-ms-lib uninstall-libtool-import-lib
+
+-CLEANFILES = $(BUILT_SOURCES) $(bin_SCRIPTS)
+-DISTCLEANFILES = $(BUILT_SOURCES) $(bin_SCRIPTS)
++CLEANFILES = $(bin_SCRIPTS)
++DISTCLEANFILES = $(bin_SCRIPTS)
+diff --git a/art_config.h b/art_config.h
+new file mode 100644
+index 0000000..5985f1f
+--- a/art_config.h
++++ b/art_config.h
+@@ -0,0 +1,5 @@
++#include <stdint.h>
++
++typedef uint8_t art_u8;
++typedef uint16_t art_u16;
++typedef uint32_t art_u32;
+diff --git a/configure.in b/configure.in
+index e4804f7..ddcac4f 100644
+--- a/configure.in
++++ b/configure.in
+@@ -92,15 +92,6 @@ AC_FUNC_ALLOCA
+
+ AC_C_BIGENDIAN
+
+-AC_CHECK_SIZEOF(char)
+-AC_SUBST(ART_SIZEOF_CHAR, $ac_cv_sizeof_char)
+-AC_CHECK_SIZEOF(short)
+-AC_SUBST(ART_SIZEOF_SHORT, $ac_cv_sizeof_short)
+-AC_CHECK_SIZEOF(int)
+-AC_SUBST(ART_SIZEOF_INT, $ac_cv_sizeof_int)
+-AC_CHECK_SIZEOF(long)
+-AC_SUBST(ART_SIZEOF_LONG, $ac_cv_sizeof_long)
+-
+ AC_CONFIG_FILES([
+ libart-features.h
+ Makefile
+@@ -109,6 +100,5 @@ libart-2.0-uninstalled.pc
+ libart-zip])
+
+ AC_CONFIG_FILES([libart-config],[chmod +x libart-config])
+-AC_CONFIG_FILES([gen_art_config.sh],[chmod +x gen_art_config.sh])
+
+ AC_OUTPUT
+--
+1.7.0.4
+
diff --git a/media-libs/libart_lgpl/files/libart_lgpl-2.3.21-no-test-build.patch b/media-libs/libart_lgpl/files/libart_lgpl-2.3.21-no-test-build.patch
new file mode 100644
index 000000000000..0937d9091762
--- /dev/null
+++ b/media-libs/libart_lgpl/files/libart_lgpl-2.3.21-no-test-build.patch
@@ -0,0 +1,22 @@
+From f3afed3b06c34c588a7c67cb83064e16255f54b4 Mon Sep 17 00:00:00 2001
+From: Gilles Dartiguelongue <eva@gentoo.org>
+Date: Tue, 6 Apr 2010 15:11:46 +0200
+Subject: [PATCH 1/2] gentoo: do not build tests if not required
+
+---
+ Makefile.am | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index aec6c5d..95952da 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,4 +1,4 @@
+-noinst_PROGRAMS = testart testuta
++check_PROGRAMS = testart testuta
+
+ bin_SCRIPTS = \
+ libart2-config
+--
+1.7.0.4
+
diff --git a/media-libs/libart_lgpl/libart_lgpl-2.3.21-r2.ebuild b/media-libs/libart_lgpl/libart_lgpl-2.3.21-r2.ebuild
new file mode 100644
index 000000000000..aad74c2c9616
--- /dev/null
+++ b/media-libs/libart_lgpl/libart_lgpl-2.3.21-r2.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+GNOME_TARBALL_SUFFIX="bz2"
+GNOME2_LA_PUNT="yes"
+
+inherit autotools eutils gnome2 multilib-minimal
+
+DESCRIPTION="a LGPL version of libart"
+HOMEPAGE="http://www.levien.com/libart"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE=""
+
+RDEPEND="
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20140508-r6
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ )"
+DEPEND=">=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]"
+
+# The provided tests are interactive only
+RESTRICT="test"
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/libart2-config
+)
+
+DOCS="AUTHORS ChangeLog NEWS README"
+
+src_prepare() {
+ gnome2_src_prepare
+
+ # Fix crosscompiling, bug #185684
+ rm "${S}"/art_config.h
+ epatch "${FILESDIR}"/${PN}-2.3.21-crosscompile.patch
+
+ # Do not build tests if not required
+ epatch "${FILESDIR}"/${PN}-2.3.21-no-test-build.patch
+
+ AT_NOELIBTOOLIZE=yes eautoreconf
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE=${S} \
+ gnome2_src_configure \
+ --disable-static
+}
diff --git a/media-libs/libart_lgpl/metadata.xml b/media-libs/libart_lgpl/metadata.xml
new file mode 100644
index 000000000000..da6fd63d0085
--- /dev/null
+++ b/media-libs/libart_lgpl/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>gnome</herd>
+</pkgmetadata>
diff --git a/media-libs/libass/Manifest b/media-libs/libass/Manifest
new file mode 100644
index 000000000000..3f59e6db7626
--- /dev/null
+++ b/media-libs/libass/Manifest
@@ -0,0 +1,9 @@
+DIST libass-0.10.1.tar.xz 257792 SHA256 fbf287ac6d0dbdf015783b7354280ad8371c106326ad3f77a99471bc5aa18210 SHA512 3990886b9e708bf29f48921f65f99cee85031e299065860bce4f3e626970f82e60130b7525c1aaaf40e02c7b49d7003378724dbcf72db5894ab79768776694cf WHIRLPOOL 7278b893a047f8d0709e0b644495e2f42e4a10aea3174a91eea055501d66ad70f3bc7e924c49aaa9f8de3ddadc564aefbb6f35a0158ed714bf1486e275e1706b
+DIST libass-0.10.2.tar.xz 278244 SHA256 f02afcc6410b800f0007dc7c282e897dab64f817c23b37d171fd6ff7fc4ca1d8 SHA512 50e77a488bc47d03a8cfca49cd7d26b702f88f649640cc63b40eb288c0f2771a6db5656e77fb8ab072a2a0b10dadf4a21e375ed831605c6de37466003f36bfd7 WHIRLPOOL d0884a663a86c33696f0909b1be09fad213ed972ec908d5dfc25fa13ed85fa48a6d4fabfe99efbf03939d5af7d0323969e06ee185c762914594e3b4ee78f0b03
+DIST libass-0.11.1.tar.xz 297016 SHA256 9d773a2880114ae4edc4b7686ed67219348d932c24e322ffd7d4c1d97e8813ac SHA512 16b047f688c9d9804d402e7a30377bc98ddadb5d464d621e6e035521532b9ff1e86d0e144e7c5089782afc6ac42ab934b03d75c1c4972fbaea7d8949f732ff62 WHIRLPOOL d89e1eea227cccf09f5267dcd853d07c5981359d8714aa541c3bd03a4e1b438fec4162c0a5fd0fe14cde9d8774f12a0473e24f62e3100fd880259c9248b04055
+DIST libass-0.11.2.tar.xz 297172 SHA256 499dbaf14d7743e5899c9ca918988e81a9894f674b22d4682922f2e5d095ff9e SHA512 93e7b9ce328fc8ac7555c49015baf89c2f07957e501e3ea9ee5a2a7750c1454891a202a92f1348aef27c877bf01674bb7958b7e500c59538b67fe68a89315540 WHIRLPOOL 9c0e0b869efc815e9ecd0e0dfa0488b9643404bd8fc33fe4be2cbf7c026989b27ee7eeb6d8f11218d903881629d864b52bdb0f3a7433325f03b0a6c5a21d1d23
+DIST libass-0.12.0.tar.xz 310412 SHA256 0f34e9b4d1badbe85f2865e308d191b311f12266f9612a0fbf995ea8436bae29 SHA512 329727064ac1c90f1bfe449548a2b4d9e5b02346eb43c69b4e9623227efc19e91690950540fac7465aa44bd351103f17fa075f71836a1aa3400ee0647995a197 WHIRLPOOL 51aa187e10916c9d21902dbc1cd3418209f3df181b99392a2cd5271cc3d1eead09321240b3edd2e1a45c5658b6333afca2a8b9dba97c8bb32ea62d903920e764
+DIST libass-0.12.1.tar.xz 312020 SHA256 87864517e482e94130864ad9e4217c3925119e8cc0c1509133989997a61592d7 SHA512 ace022b214cdbd0f043037a6be25c2b58e12630717fe839f3a896462e3c7b0ccbb1e33c0128a09bbd416ec6e1e30230d514341a5c5c9190058fdedcf95082c91 WHIRLPOOL b351344437c1d3c780b84dd98c02c786216226019879186c3da659e690e27e23a49be38fb8e302551978fa5e02dcfed13c3ff057ce778757ee04af5433f06f4e
+DIST libass-0.12.2.tar.xz 313208 SHA256 673c1b15bde182168b17e17ee1c8d9e01173f20af352134216135b5bf15bf1e3 SHA512 7cdbb6514c17eafebcc5e558d96ac06f301fa2d7658275379b8598b71b1e10c5dee4d91ebce5181ee3f16f4fe4e1afa9bb9942fa81c38babdcad7de05b59d35f WHIRLPOOL 7990731baa4ee55060dc86fd8fb240ae5fe4a7305aebdab3d434846fda7ed616b7247283b3f65de6db56e102965eb7cd21c9cee59c94f6b5b6a53068d01e11f3
+DIST libass-0.12.3.tar.xz 313852 SHA256 a67c54ebaf5ec19ae72e86259ee6ab6adfe2e64ed9f9149db03dc863360ea38c SHA512 84931e89f02487ff01bfe24be3d90b1db8599ab2a5ec2277824b4330cd9219189a54f19d2d83f223d2d6f973b5e7474f2691905091749a776147669b72754be2 WHIRLPOOL 7187d678dfec621d5736ecb4d9dbf6559c74d6c1b4dfcdd7bc4f78313e8f10f73d3cefd33bfa9a1ceed87cb00767e4235b95e144c527e74746e680b6bb12c719
+DIST libass-0.9.13.tar.xz 250536 SHA256 eef55595355cd4dd14b88b61d4e34c7bcfb6060a6b28f5a9ebc7dd5a72b69cc8 SHA512 82c1a280b5cff9dd09f015562db420295a465ce7e80ad51b2f879e347c3a675ea05ac2beaa106c178aa57a390a19eb1ffb90771689e76e2b0619e75673631e0d WHIRLPOOL b1769d3a5b9a14d43447ddaa8c459b5fda4c857abdee270d022cced3d5db93a25059ef4291c0fe27cf235c20507f6c77fdc9c3037d032bad57e1971eaa8436c9
diff --git a/media-libs/libass/libass-0.10.1.ebuild b/media-libs/libass/libass-0.10.1.ebuild
new file mode 100644
index 000000000000..db6767455d92
--- /dev/null
+++ b/media-libs/libass/libass-0.10.1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="Library for SSA/ASS subtitles rendering"
+HOMEPAGE="http://code.google.com/p/libass/"
+SRC_URI="http://libass.googlecode.com/files/${P}.tar.xz"
+
+LICENSE="ISC"
+SLOT="0"
+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"
+IUSE="+enca +fontconfig +harfbuzz static-libs"
+
+RDEPEND="fontconfig? ( >=media-libs/fontconfig-2.4.2 )
+ >=media-libs/freetype-2.4:2
+ virtual/libiconv
+ >=dev-libs/fribidi-0.19.0
+ harfbuzz? ( >=media-libs/harfbuzz-0.9.11 )
+ enca? ( app-i18n/enca )"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS="Changelog"
+
+src_configure() {
+ econf \
+ $(use_enable enca) \
+ $(use_enable fontconfig) \
+ $(use_enable harfbuzz) \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+
+ find "${ED}" -name '*.la' -delete
+}
diff --git a/media-libs/libass/libass-0.10.2.ebuild b/media-libs/libass/libass-0.10.2.ebuild
new file mode 100644
index 000000000000..1a0886f26939
--- /dev/null
+++ b/media-libs/libass/libass-0.10.2.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+DESCRIPTION="Library for SSA/ASS subtitles rendering"
+HOMEPAGE="http://code.google.com/p/libass/"
+SRC_URI="http://libass.googlecode.com/files/${P}.tar.xz"
+
+LICENSE="ISC"
+SLOT="0/5" # subslot = libass soname version
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="+enca +fontconfig +harfbuzz static-libs"
+
+RDEPEND="fontconfig? ( >=media-libs/fontconfig-2.4.2 )
+ >=media-libs/freetype-2.4:2
+ virtual/libiconv
+ >=dev-libs/fribidi-0.19.0
+ harfbuzz? ( >=media-libs/harfbuzz-0.9.11[truetype] )
+ enca? ( app-i18n/enca )"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS="Changelog"
+
+src_configure() {
+ econf \
+ $(use_enable enca) \
+ $(use_enable fontconfig) \
+ $(use_enable harfbuzz) \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ prune_libtool_files
+}
diff --git a/media-libs/libass/libass-0.11.1.ebuild b/media-libs/libass/libass-0.11.1.ebuild
new file mode 100644
index 000000000000..318f657255ce
--- /dev/null
+++ b/media-libs/libass/libass-0.11.1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils multilib-minimal
+
+DESCRIPTION="Library for SSA/ASS subtitles rendering"
+HOMEPAGE="http://github.com/libass/libass"
+SRC_URI="http://github.com/libass/libass/releases/download/${PV}/${P}.tar.xz"
+
+LICENSE="ISC"
+SLOT="0/5" # subslot = libass soname version
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="+enca +fontconfig +harfbuzz static-libs"
+
+RDEPEND="fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] )
+ >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}]
+ >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
+ >=dev-libs/fribidi-0.19.5-r1[${MULTILIB_USEDEP}]
+ harfbuzz? ( >=media-libs/harfbuzz-0.9.12[truetype,${MULTILIB_USEDEP}] )
+ enca? ( >=app-i18n/enca-1.14-r1[${MULTILIB_USEDEP}] )"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+X86_CPU_OPTS="abi_x86_32 abi_x86_64"
+for i in ${X86_CPU_OPTS} ; do
+ DEPEND="${DEPEND}
+ ${i}? ( dev-lang/yasm )"
+done
+
+DOCS="Changelog"
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ $(use_enable enca) \
+ $(use_enable fontconfig) \
+ $(use_enable harfbuzz) \
+ $(use_enable static-libs static)
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ prune_libtool_files
+}
diff --git a/media-libs/libass/libass-0.11.2.ebuild b/media-libs/libass/libass-0.11.2.ebuild
new file mode 100644
index 000000000000..251238af3119
--- /dev/null
+++ b/media-libs/libass/libass-0.11.2.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils multilib-minimal
+
+DESCRIPTION="Library for SSA/ASS subtitles rendering"
+HOMEPAGE="http://github.com/libass/libass"
+SRC_URI="http://github.com/libass/libass/releases/download/${PV}/${P}.tar.xz"
+
+LICENSE="ISC"
+SLOT="0/5" # subslot = libass soname version
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="+enca +fontconfig +harfbuzz static-libs"
+
+RDEPEND="fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] )
+ >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}]
+ >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
+ >=dev-libs/fribidi-0.19.5-r1[${MULTILIB_USEDEP}]
+ harfbuzz? ( >=media-libs/harfbuzz-0.9.12[truetype,${MULTILIB_USEDEP}] )
+ enca? ( >=app-i18n/enca-1.14-r1[${MULTILIB_USEDEP}] )"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+X86_CPU_OPTS="abi_x86_32 abi_x86_64"
+for i in ${X86_CPU_OPTS} ; do
+ DEPEND="${DEPEND}
+ ${i}? ( dev-lang/yasm )"
+done
+
+DOCS="Changelog"
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ $(use_enable enca) \
+ $(use_enable fontconfig) \
+ $(use_enable harfbuzz) \
+ $(use_enable static-libs static)
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ prune_libtool_files
+}
diff --git a/media-libs/libass/libass-0.12.0.ebuild b/media-libs/libass/libass-0.12.0.ebuild
new file mode 100644
index 000000000000..318f657255ce
--- /dev/null
+++ b/media-libs/libass/libass-0.12.0.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils multilib-minimal
+
+DESCRIPTION="Library for SSA/ASS subtitles rendering"
+HOMEPAGE="http://github.com/libass/libass"
+SRC_URI="http://github.com/libass/libass/releases/download/${PV}/${P}.tar.xz"
+
+LICENSE="ISC"
+SLOT="0/5" # subslot = libass soname version
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="+enca +fontconfig +harfbuzz static-libs"
+
+RDEPEND="fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] )
+ >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}]
+ >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
+ >=dev-libs/fribidi-0.19.5-r1[${MULTILIB_USEDEP}]
+ harfbuzz? ( >=media-libs/harfbuzz-0.9.12[truetype,${MULTILIB_USEDEP}] )
+ enca? ( >=app-i18n/enca-1.14-r1[${MULTILIB_USEDEP}] )"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+X86_CPU_OPTS="abi_x86_32 abi_x86_64"
+for i in ${X86_CPU_OPTS} ; do
+ DEPEND="${DEPEND}
+ ${i}? ( dev-lang/yasm )"
+done
+
+DOCS="Changelog"
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ $(use_enable enca) \
+ $(use_enable fontconfig) \
+ $(use_enable harfbuzz) \
+ $(use_enable static-libs static)
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ prune_libtool_files
+}
diff --git a/media-libs/libass/libass-0.12.1.ebuild b/media-libs/libass/libass-0.12.1.ebuild
new file mode 100644
index 000000000000..141829546a0d
--- /dev/null
+++ b/media-libs/libass/libass-0.12.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 eutils multilib-minimal
+
+DESCRIPTION="Library for SSA/ASS subtitles rendering"
+HOMEPAGE="http://github.com/libass/libass"
+SRC_URI="http://github.com/libass/libass/releases/download/${PV}/${P}.tar.xz"
+
+LICENSE="ISC"
+SLOT="0/5" # subslot = libass soname version
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="+enca +fontconfig +harfbuzz static-libs"
+
+RDEPEND="fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] )
+ >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}]
+ >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
+ >=dev-libs/fribidi-0.19.5-r1[${MULTILIB_USEDEP}]
+ harfbuzz? ( >=media-libs/harfbuzz-0.9.12[truetype,${MULTILIB_USEDEP}] )
+ enca? ( >=app-i18n/enca-1.14-r1[${MULTILIB_USEDEP}] )"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+X86_CPU_OPTS="abi_x86_32 abi_x86_64"
+for i in ${X86_CPU_OPTS} ; do
+ DEPEND="${DEPEND}
+ ${i}? ( dev-lang/yasm )"
+done
+
+DOCS="Changelog"
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ $(use_enable enca) \
+ $(use_enable fontconfig) \
+ $(use_enable harfbuzz) \
+ $(use_enable static-libs static)
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ prune_libtool_files
+}
diff --git a/media-libs/libass/libass-0.12.2.ebuild b/media-libs/libass/libass-0.12.2.ebuild
new file mode 100644
index 000000000000..141829546a0d
--- /dev/null
+++ b/media-libs/libass/libass-0.12.2.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 multilib-minimal
+
+DESCRIPTION="Library for SSA/ASS subtitles rendering"
+HOMEPAGE="http://github.com/libass/libass"
+SRC_URI="http://github.com/libass/libass/releases/download/${PV}/${P}.tar.xz"
+
+LICENSE="ISC"
+SLOT="0/5" # subslot = libass soname version
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="+enca +fontconfig +harfbuzz static-libs"
+
+RDEPEND="fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] )
+ >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}]
+ >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
+ >=dev-libs/fribidi-0.19.5-r1[${MULTILIB_USEDEP}]
+ harfbuzz? ( >=media-libs/harfbuzz-0.9.12[truetype,${MULTILIB_USEDEP}] )
+ enca? ( >=app-i18n/enca-1.14-r1[${MULTILIB_USEDEP}] )"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+X86_CPU_OPTS="abi_x86_32 abi_x86_64"
+for i in ${X86_CPU_OPTS} ; do
+ DEPEND="${DEPEND}
+ ${i}? ( dev-lang/yasm )"
+done
+
+DOCS="Changelog"
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ $(use_enable enca) \
+ $(use_enable fontconfig) \
+ $(use_enable harfbuzz) \
+ $(use_enable static-libs static)
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ prune_libtool_files
+}
diff --git a/media-libs/libass/libass-0.12.3.ebuild b/media-libs/libass/libass-0.12.3.ebuild
new file mode 100644
index 000000000000..141829546a0d
--- /dev/null
+++ b/media-libs/libass/libass-0.12.3.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 multilib-minimal
+
+DESCRIPTION="Library for SSA/ASS subtitles rendering"
+HOMEPAGE="http://github.com/libass/libass"
+SRC_URI="http://github.com/libass/libass/releases/download/${PV}/${P}.tar.xz"
+
+LICENSE="ISC"
+SLOT="0/5" # subslot = libass soname version
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="+enca +fontconfig +harfbuzz static-libs"
+
+RDEPEND="fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] )
+ >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}]
+ >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
+ >=dev-libs/fribidi-0.19.5-r1[${MULTILIB_USEDEP}]
+ harfbuzz? ( >=media-libs/harfbuzz-0.9.12[truetype,${MULTILIB_USEDEP}] )
+ enca? ( >=app-i18n/enca-1.14-r1[${MULTILIB_USEDEP}] )"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+X86_CPU_OPTS="abi_x86_32 abi_x86_64"
+for i in ${X86_CPU_OPTS} ; do
+ DEPEND="${DEPEND}
+ ${i}? ( dev-lang/yasm )"
+done
+
+DOCS="Changelog"
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ $(use_enable enca) \
+ $(use_enable fontconfig) \
+ $(use_enable harfbuzz) \
+ $(use_enable static-libs static)
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ prune_libtool_files
+}
diff --git a/media-libs/libass/libass-0.9.13.ebuild b/media-libs/libass/libass-0.9.13.ebuild
new file mode 100644
index 000000000000..c2b32681bc4e
--- /dev/null
+++ b/media-libs/libass/libass-0.9.13.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="Library for SSA/ASS subtitles rendering"
+HOMEPAGE="http://code.google.com/p/libass/"
+SRC_URI="http://libass.googlecode.com/files/${P}.tar.xz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="+enca +fontconfig static-libs"
+
+RDEPEND="fontconfig? ( >=media-libs/fontconfig-2.4.2 )
+ >=media-libs/freetype-2.2.1:2
+ virtual/libiconv
+ enca? ( app-i18n/enca )"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS="Changelog"
+
+src_configure() {
+ econf \
+ $(use_enable enca) \
+ $(use_enable fontconfig) \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+
+ find "${ED}" -name '*.la' -delete
+}
diff --git a/media-libs/libass/metadata.xml b/media-libs/libass/metadata.xml
new file mode 100644
index 000000000000..235d662cc461
--- /dev/null
+++ b/media-libs/libass/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='enca'>Enables support for charset discovery and conversion.</flag>
+ <flag name='harfbuzz'>Enables OpenType shaping via <pkg>media-libs/harfbuzz</pkg>.</flag>
+</use>
+</pkgmetadata>
diff --git a/media-libs/libbdplus/Manifest b/media-libs/libbdplus/Manifest
new file mode 100644
index 000000000000..be5cf1a9e57c
--- /dev/null
+++ b/media-libs/libbdplus/Manifest
@@ -0,0 +1 @@
+DIST libbdplus-0.1.2.tar.bz2 319828 SHA256 a631cae3cd34bf054db040b64edbfc8430936e762eb433b1789358ac3d3dc80a SHA512 e00e7bc9f52b9275646593b753ba646b052255be94a7241965f4dbe4734f8f6a072973ed4b9997957f939236b0633897c295749f79e232188430795be5b5087b WHIRLPOOL 56ab27f0aaeaacc2cc0338091cea810da6126fd09da201084dcdf5f69e4d2b483c31a0e59004c101a900a43b7581fed03b4f1686c20531f1241f7f92291b3e55
diff --git a/media-libs/libbdplus/libbdplus-0.1.2.ebuild b/media-libs/libbdplus/libbdplus-0.1.2.ebuild
new file mode 100644
index 000000000000..e5c04bcf0f49
--- /dev/null
+++ b/media-libs/libbdplus/libbdplus-0.1.2.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools-multilib
+
+if [[ ${PV} == 9999 ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="git://git.videolan.org/${PN}.git"
+else
+ SRC_URI="http://ftp.videolan.org/pub/videolan/${PN}/${PV}/${P}.tar.bz2"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Blu-ray library for BD+ decryption"
+HOMEPAGE="http://www.videolan.org/developers/libbdplus.html"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="aacs static-libs"
+
+RDEPEND="dev-libs/libgcrypt:0=[${MULTILIB_USEDEP}]
+ dev-libs/libgpg-error[${MULTILIB_USEDEP}]
+ aacs? ( >=media-libs/libaacs-0.7.0[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}"
+
+DOCS="ChangeLog README.txt"
+
+src_configure() {
+ local myeconfargs=(
+ --disable-optimizations
+ $(use_with aacs libaacs)
+ )
+ autotools-multilib_src_configure
+}
diff --git a/media-libs/libbdplus/libbdplus-9999.ebuild b/media-libs/libbdplus/libbdplus-9999.ebuild
new file mode 100644
index 000000000000..e5c04bcf0f49
--- /dev/null
+++ b/media-libs/libbdplus/libbdplus-9999.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools-multilib
+
+if [[ ${PV} == 9999 ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="git://git.videolan.org/${PN}.git"
+else
+ SRC_URI="http://ftp.videolan.org/pub/videolan/${PN}/${PV}/${P}.tar.bz2"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Blu-ray library for BD+ decryption"
+HOMEPAGE="http://www.videolan.org/developers/libbdplus.html"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="aacs static-libs"
+
+RDEPEND="dev-libs/libgcrypt:0=[${MULTILIB_USEDEP}]
+ dev-libs/libgpg-error[${MULTILIB_USEDEP}]
+ aacs? ( >=media-libs/libaacs-0.7.0[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}"
+
+DOCS="ChangeLog README.txt"
+
+src_configure() {
+ local myeconfargs=(
+ --disable-optimizations
+ $(use_with aacs libaacs)
+ )
+ autotools-multilib_src_configure
+}
diff --git a/media-libs/libbdplus/metadata.xml b/media-libs/libbdplus/metadata.xml
new file mode 100644
index 000000000000..17b802af2afd
--- /dev/null
+++ b/media-libs/libbdplus/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>
+ <use>
+ <flag name='aacs'>Add support for decryption of AACS</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/libbluray/Manifest b/media-libs/libbluray/Manifest
new file mode 100644
index 000000000000..b9ab7eedaa47
--- /dev/null
+++ b/media-libs/libbluray/Manifest
@@ -0,0 +1,6 @@
+DIST libbluray-0.5.0.tar.bz2 559639 SHA256 19213e193e1abc5ed2de65edfb539deda1dbf6cc64dfef03e405524c9c6f7216 SHA512 bd709a01689bbb03ac291a2544eee93b47d72e065c8ccf825f9fb568ddb339a75a18c721b3c59fd4a8214a0f9b652cbd845bccd9de08248dd4cf61616a77e1dd WHIRLPOOL ab6b422889e6469053f567a489afe6c4cbf79cc1e56461ccad3eec948be819748da7760377686430db212a249b450da8fe5a9c914828f13354135dcf2e314add
+DIST libbluray-0.6.1.tar.bz2 586646 SHA256 bf51c4fb65f4d8b02e9b2708017ecd829c8d0dfa9239bca011e67a2a6e368b3f SHA512 f32f5ce238955efd8d9f34d488d89ca1f52b4dd1f63334ade92dc8e053b15e180549fc5f83f4b7d532c145acb1b8ddfca2230df65451bfb0f77bf6aa2c3806ec WHIRLPOOL bed882bef96effc81241eab736b6be4caa098fdb1e9e2c50bdb70ebfdf0ee53490aed6697bc298c5a8271547113e9c0de151b95198ca2db90733ea70adc4ad44
+DIST libbluray-0.6.2.tar.bz2 582227 SHA256 8ca410c8a4a1e2e8344014a67e2c908182cff3e04ece4e3b9ef196cf6bca5cd0 SHA512 20fbc5f34d7d025efaac1b6398c18b94b603a52bfb6dd0f021059d3bd4c3cf785e715698cd09e5d1c97a7ed11bbd146b29aa363650620eef1efca08053fc033a WHIRLPOOL 5e69fe4042d709677635fdc6569a2b14a34ff93ef672b3138bffde3a492ca5b38d960ed3bec814444b5dc4b4491f108ed50d64c2c8d956164dfedd0a43b8f506
+DIST libbluray-0.7.0.tar.bz2 597266 SHA256 f79beb9fbb24117cbb1264c919e686ae9e6349c0ad08b48c4b6233b2887eb68d SHA512 2bf73398003e5a6b12ffdf44ec5716c18da4a176328b4eac52adb3337d09fcb4e5b553362cb67d70506fb0b2cd60e2e59ccc398104630554f41f0b095fc4703f WHIRLPOOL 28f9422704230cfe2fea3c84d0c7c3ae06495b07fdc22c33937d2cb4a0087be4af4364d219ab38e0ee94cf5c14826f7f2a1750da6d5c8f7e71178dbdfb1fc1e5
+DIST libbluray-0.8.0.tar.bz2 621606 SHA256 7b80208b2af54313fedbb49f54b7e13ff7f86f1843a81dddd5e17aa9575bfd08 SHA512 1928ed86a39f3846014f3c5083e78aaf87366fb4589a48a1a87ad053fc32edafe6e89d382c44cffc5f27610d4d3ccf17bf2ef79982e3e39a0ada6895defe5bfe WHIRLPOOL d72b50920e8f0b994cc543d3efbc6b7e4849a1dcda1774e1eda85e527a36a8382c3e273fb45309776c696bb7b215271cfb822f04c02a4133c5ee5687ea8805f5
+DIST libbluray-0.8.1.tar.bz2 623402 SHA256 cdbec680c5bbc2251de6ccd109cf5f798ea51db6fcb938df39283be1799efb8f SHA512 6618e01a567f0dc5d21302fc771d4155589c81703028b76f6090a2d12ef1c7e9d08d9c79312a7c8b2ca0d6c63ce980195f0866509a4f8f05f64ed6650c7f78dc WHIRLPOOL 899ffe320997d245ed76987993d7d7e1697fcea61474ad7fb664c0c519d2c6578344986e22a9fe7d23d7c458525f6effff68718619334916fbe42cccb6c5c801
diff --git a/media-libs/libbluray/files/90libbluray b/media-libs/libbluray/files/90libbluray
new file mode 100644
index 000000000000..c2a0d7c80a5d
--- /dev/null
+++ b/media-libs/libbluray/files/90libbluray
@@ -0,0 +1 @@
+LIBBLURAY_CP="/usr/share/libbluray/lib/libbluray.jar"
diff --git a/media-libs/libbluray/libbluray-0.5.0-r1.ebuild b/media-libs/libbluray/libbluray-0.5.0-r1.ebuild
new file mode 100644
index 000000000000..357e82fc701f
--- /dev/null
+++ b/media-libs/libbluray/libbluray-0.5.0-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
+
+inherit autotools java-pkg-opt-2 flag-o-matic eutils multilib-minimal
+
+DESCRIPTION="Blu-ray playback libraries"
+HOMEPAGE="http://www.videolan.org/developers/libbluray.html"
+SRC_URI="http://ftp.videolan.org/pub/videolan/libbluray/${PV}/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="aacs java static-libs +truetype utils +xml"
+
+COMMON_DEPEND="
+ xml? ( >=dev-libs/libxml2-2.9.1-r4[${MULTILIB_USEDEP}] )
+ truetype? ( >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}] )
+"
+RDEPEND="
+ ${COMMON_DEPEND}
+ aacs? ( >=media-libs/libaacs-0.6.0[${MULTILIB_USEDEP}] )
+ java? ( >=virtual/jre-1.6 )
+"
+DEPEND="
+ ${COMMON_DEPEND}
+ java? (
+ >=virtual/jdk-1.6
+ dev-java/ant-core
+ )
+ virtual/pkgconfig
+"
+
+DOCS=( ChangeLog README.txt )
+
+src_prepare() {
+ if use java ; then
+ export JDK_HOME="$(java-config -g JAVA_HOME)"
+
+ # don't install a duplicate jar file
+ sed -i '/^jar_DATA/d' src/Makefile.am || die
+
+ eautoreconf
+
+ java-pkg-opt-2_src_prepare
+ fi
+}
+
+multilib_src_configure() {
+ local myconf
+ if multilib_is_native_abi && use java; then
+ export JAVACFLAGS="$(java-pkg_javac-args)"
+ append-cflags "$(java-pkg_get-jni-cflags)"
+ myconf="--enable-bdjava"
+ else
+ myconf="--disable-bdjava"
+ fi
+
+ ECONF_SOURCE="${S}" econf \
+ --disable-optimizations \
+ $(multilib_native_use_enable utils examples) \
+ $(use_with truetype freetype) \
+ $(use_enable static-libs static) \
+ $(use_with xml libxml2) \
+ ${myconf}
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+
+ if multilib_is_native_abi && use utils; then
+ cd src
+ dobin index_dump mobj_dump mpls_dump
+ cd .libs/
+ dobin bd_info bdsplice clpi_dump hdmv_test libbluray_test list_titles sound_dump
+ if use java; then
+ dobin bdj_test
+ fi
+ fi
+
+ if multilib_is_native_abi && use java; then
+ java-pkg_dojar "${BUILD_DIR}"/src/.libs/${PN}.jar
+ doenvd "${FILESDIR}"/90${PN}
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ prune_libtool_files
+}
diff --git a/media-libs/libbluray/libbluray-0.5.0.ebuild b/media-libs/libbluray/libbluray-0.5.0.ebuild
new file mode 100644
index 000000000000..5527be37b5e2
--- /dev/null
+++ b/media-libs/libbluray/libbluray-0.5.0.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools java-pkg-opt-2 flag-o-matic eutils
+
+DESCRIPTION="Blu-ray playback libraries"
+HOMEPAGE="http://www.videolan.org/developers/libbluray.html"
+SRC_URI="http://ftp.videolan.org/pub/videolan/libbluray/${PV}/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="aacs java static-libs +truetype utils +xml"
+
+COMMON_DEPEND="
+ xml? ( dev-libs/libxml2 )
+"
+RDEPEND="
+ ${COMMON_DEPEND}
+ aacs? ( media-libs/libaacs )
+ java? (
+ truetype? ( media-libs/freetype:2 )
+ >=virtual/jre-1.6
+ )
+"
+DEPEND="
+ ${COMMON_DEPEND}
+ java? (
+ truetype? ( media-libs/freetype:2 )
+ >=virtual/jdk-1.6
+ dev-java/ant-core
+ )
+ virtual/pkgconfig
+"
+
+DOCS=( ChangeLog README.txt )
+
+src_prepare() {
+ if use java ; then
+ export JDK_HOME="$(java-config -g JAVA_HOME)"
+
+ # don't install a duplicate jar file
+ sed -i '/^jar_DATA/d' src/Makefile.am || die
+
+ eautoreconf
+
+ java-pkg-opt-2_src_prepare
+ fi
+}
+
+src_configure() {
+ local myconf
+ if use java; then
+ export JAVACFLAGS="$(java-pkg_javac-args)"
+ append-cflags "$(java-pkg_get-jni-cflags)"
+ myconf="$(use_with truetype freetype)"
+ fi
+
+ econf \
+ --disable-optimizations \
+ $(use_enable utils examples) \
+ $(use_enable java bdjava) \
+ $(use_enable static-libs static) \
+ $(use_with xml libxml2) \
+ ${myconf}
+}
+
+src_install() {
+ default
+
+ if use utils; then
+ cd src
+ dobin index_dump mobj_dump mpls_dump
+ cd .libs/
+ dobin bd_info bdsplice clpi_dump hdmv_test libbluray_test list_titles sound_dump
+ if use java; then
+ dobin bdj_test
+ fi
+ fi
+
+ if use java; then
+ java-pkg_dojar "${S}"/src/.libs/${PN}.jar
+ doenvd "${FILESDIR}"/90${PN}
+ fi
+
+ prune_libtool_files
+}
diff --git a/media-libs/libbluray/libbluray-0.6.1.ebuild b/media-libs/libbluray/libbluray-0.6.1.ebuild
new file mode 100644
index 000000000000..54985a27b550
--- /dev/null
+++ b/media-libs/libbluray/libbluray-0.6.1.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools java-pkg-opt-2 flag-o-matic eutils multilib-minimal
+
+DESCRIPTION="Blu-ray playback libraries"
+HOMEPAGE="http://www.videolan.org/developers/libbluray.html"
+SRC_URI="http://ftp.videolan.org/pub/videolan/libbluray/${PV}/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="aacs java static-libs +truetype utils +xml"
+
+COMMON_DEPEND="
+ xml? ( >=dev-libs/libxml2-2.9.1-r4[${MULTILIB_USEDEP}] )
+ truetype? ( >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}] )
+"
+RDEPEND="
+ ${COMMON_DEPEND}
+ aacs? ( >=media-libs/libaacs-0.6.0[${MULTILIB_USEDEP}] )
+ java? ( >=virtual/jre-1.6 )
+"
+DEPEND="
+ ${COMMON_DEPEND}
+ java? (
+ >=virtual/jdk-1.6
+ dev-java/ant-core
+ )
+ virtual/pkgconfig
+"
+
+DOCS=( ChangeLog README.txt )
+
+src_prepare() {
+ if use java ; then
+ export JDK_HOME="$(java-config -g JAVA_HOME)"
+
+ # don't install a duplicate jar file
+ sed -i '/^jar_DATA/d' src/Makefile.am || die
+
+ java-pkg-opt-2_src_prepare
+ fi
+
+ eautoreconf
+}
+
+multilib_src_configure() {
+ local myconf
+ if multilib_is_native_abi && use java; then
+ export JAVACFLAGS="$(java-pkg_javac-args)"
+ append-cflags "$(java-pkg_get-jni-cflags)"
+ myconf="--enable-bdjava"
+ else
+ myconf="--disable-bdjava"
+ fi
+
+ ECONF_SOURCE="${S}" econf \
+ --disable-optimizations \
+ $(multilib_native_use_enable utils examples) \
+ $(use_with truetype freetype) \
+ $(use_enable static-libs static) \
+ $(use_with xml libxml2) \
+ ${myconf}
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+
+ if multilib_is_native_abi && use utils; then
+ cd src
+ dobin index_dump mobj_dump mpls_dump
+ cd .libs/
+ dobin bd_info bdsplice clpi_dump hdmv_test libbluray_test list_titles sound_dump
+ if use java; then
+ dobin bdj_test
+ fi
+ fi
+
+ if multilib_is_native_abi && use java; then
+ java-pkg_dojar "${BUILD_DIR}"/src/.libs/${PN}-j2se-${PV}.jar
+ doenvd "${FILESDIR}"/90${PN}
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ prune_libtool_files
+}
diff --git a/media-libs/libbluray/libbluray-0.6.2.ebuild b/media-libs/libbluray/libbluray-0.6.2.ebuild
new file mode 100644
index 000000000000..cdd87b8d2ca1
--- /dev/null
+++ b/media-libs/libbluray/libbluray-0.6.2.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools java-pkg-opt-2 flag-o-matic eutils multilib-minimal
+
+DESCRIPTION="Blu-ray playback libraries"
+HOMEPAGE="http://www.videolan.org/developers/libbluray.html"
+SRC_URI="http://ftp.videolan.org/pub/videolan/libbluray/${PV}/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ~arm ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="aacs java static-libs +truetype utils +xml"
+
+COMMON_DEPEND="
+ xml? ( >=dev-libs/libxml2-2.9.1-r4[${MULTILIB_USEDEP}] )
+ truetype? ( >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}] )
+"
+RDEPEND="
+ ${COMMON_DEPEND}
+ aacs? ( >=media-libs/libaacs-0.6.0[${MULTILIB_USEDEP}] )
+ java? ( >=virtual/jre-1.6 )
+"
+DEPEND="
+ ${COMMON_DEPEND}
+ java? (
+ >=virtual/jdk-1.6
+ dev-java/ant-core
+ )
+ virtual/pkgconfig
+"
+
+DOCS=( ChangeLog README.txt )
+
+src_prepare() {
+ if use java ; then
+ export JDK_HOME="$(java-config -g JAVA_HOME)"
+
+ # don't install a duplicate jar file
+ sed -i '/^jar_DATA/d' src/Makefile.am || die
+
+ java-pkg-opt-2_src_prepare
+ fi
+
+ eautoreconf
+}
+
+multilib_src_configure() {
+ local myconf
+ if multilib_is_native_abi && use java; then
+ export JAVACFLAGS="$(java-pkg_javac-args)"
+ append-cflags "$(java-pkg_get-jni-cflags)"
+ myconf="--enable-bdjava"
+ else
+ myconf="--disable-bdjava"
+ fi
+
+ ECONF_SOURCE="${S}" econf \
+ --disable-optimizations \
+ $(multilib_native_use_enable utils examples) \
+ $(use_with truetype freetype) \
+ $(use_enable static-libs static) \
+ $(use_with xml libxml2) \
+ ${myconf}
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+
+ if multilib_is_native_abi && use utils; then
+ cd src
+ dobin index_dump mobj_dump mpls_dump
+ cd .libs/
+ dobin bd_info bdsplice clpi_dump hdmv_test libbluray_test list_titles sound_dump
+ if use java; then
+ dobin bdj_test
+ fi
+ fi
+
+ if multilib_is_native_abi && use java; then
+ java-pkg_dojar "${BUILD_DIR}"/src/.libs/${PN}-j2se-${PV}.jar
+ doenvd "${FILESDIR}"/90${PN}
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ prune_libtool_files
+}
diff --git a/media-libs/libbluray/libbluray-0.7.0.ebuild b/media-libs/libbluray/libbluray-0.7.0.ebuild
new file mode 100644
index 000000000000..0d583a84526f
--- /dev/null
+++ b/media-libs/libbluray/libbluray-0.7.0.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools java-pkg-opt-2 flag-o-matic eutils multilib-minimal
+
+DESCRIPTION="Blu-ray playback libraries"
+HOMEPAGE="http://www.videolan.org/developers/libbluray.html"
+SRC_URI="http://ftp.videolan.org/pub/videolan/libbluray/${PV}/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="aacs bdplus +fontconfig java static-libs +truetype utils +xml"
+
+COMMON_DEPEND="
+ xml? ( >=dev-libs/libxml2-2.9.1-r4[${MULTILIB_USEDEP}] )
+ fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] )
+ truetype? ( >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}] )
+"
+RDEPEND="
+ ${COMMON_DEPEND}
+ aacs? ( >=media-libs/libaacs-0.6.0[${MULTILIB_USEDEP}] )
+ bdplus? ( media-libs/libbdplus[${MULTILIB_USEDEP}] )
+ java? ( >=virtual/jre-1.6 )
+"
+DEPEND="
+ ${COMMON_DEPEND}
+ java? (
+ >=virtual/jdk-1.6
+ dev-java/ant-core
+ )
+ virtual/pkgconfig
+"
+
+DOCS=( ChangeLog README.txt )
+
+src_prepare() {
+ if use java ; then
+ export JDK_HOME="$(java-config -g JAVA_HOME)"
+
+ # don't install a duplicate jar file
+ sed -i '/^jar_DATA/d' src/Makefile.am || die
+
+ java-pkg-opt-2_src_prepare
+ fi
+
+ eautoreconf
+}
+
+multilib_src_configure() {
+ local myconf
+ if multilib_is_native_abi && use java; then
+ export JAVACFLAGS="$(java-pkg_javac-args)"
+ append-cflags "$(java-pkg_get-jni-cflags)"
+ myconf="--enable-bdjava"
+ else
+ myconf="--disable-bdjava"
+ fi
+
+ ECONF_SOURCE="${S}" econf \
+ --disable-optimizations \
+ $(multilib_native_use_enable utils examples) \
+ $(use_with fontconfig) \
+ $(use_with truetype freetype) \
+ $(use_enable static-libs static) \
+ $(use_with xml libxml2) \
+ ${myconf}
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+
+ if multilib_is_native_abi && use utils; then
+ cd src
+ dobin index_dump mobj_dump mpls_dump
+ cd .libs/
+ dobin bd_info bdsplice clpi_dump hdmv_test libbluray_test list_titles sound_dump
+ if use java; then
+ dobin bdj_test
+ fi
+ fi
+
+ if multilib_is_native_abi && use java; then
+ java-pkg_dojar "${BUILD_DIR}"/src/.libs/${PN}-j2se-${PV}.jar
+ doenvd "${FILESDIR}"/90${PN}
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ prune_libtool_files
+}
diff --git a/media-libs/libbluray/libbluray-0.8.0.ebuild b/media-libs/libbluray/libbluray-0.8.0.ebuild
new file mode 100644
index 000000000000..805d248c84dc
--- /dev/null
+++ b/media-libs/libbluray/libbluray-0.8.0.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 autotools java-pkg-opt-2 flag-o-matic eutils multilib-minimal
+
+DESCRIPTION="Blu-ray playback libraries"
+HOMEPAGE="http://www.videolan.org/developers/libbluray.html"
+SRC_URI="http://ftp.videolan.org/pub/videolan/libbluray/${PV}/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="aacs bdplus +fontconfig java static-libs +truetype utils +xml"
+
+COMMON_DEPEND="
+ xml? ( >=dev-libs/libxml2-2.9.1-r4[${MULTILIB_USEDEP}] )
+ fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] )
+ truetype? ( >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}] )
+"
+RDEPEND="
+ ${COMMON_DEPEND}
+ aacs? ( >=media-libs/libaacs-0.6.0[${MULTILIB_USEDEP}] )
+ bdplus? ( media-libs/libbdplus[${MULTILIB_USEDEP}] )
+ java? ( >=virtual/jre-1.6 )
+"
+DEPEND="
+ ${COMMON_DEPEND}
+ java? (
+ >=virtual/jdk-1.6
+ dev-java/ant-core
+ )
+ virtual/pkgconfig
+"
+
+DOCS=( ChangeLog README.txt )
+
+src_prepare() {
+ if use java ; then
+ export JDK_HOME="$(java-config -g JAVA_HOME)"
+
+ # don't install a duplicate jar file
+ sed -i '/^jar_DATA/d' Makefile.am || die
+
+ java-pkg-opt-2_src_prepare
+ fi
+
+ eautoreconf
+}
+
+multilib_src_configure() {
+ local myconf
+ if multilib_is_native_abi && use java; then
+ export JAVACFLAGS="$(java-pkg_javac-args)"
+ append-cflags "$(java-pkg_get-jni-cflags)"
+ myconf="--enable-bdjava"
+ else
+ myconf="--disable-bdjava"
+ fi
+
+ ECONF_SOURCE="${S}" econf \
+ --disable-optimizations \
+ $(multilib_native_use_enable utils examples) \
+ $(use_with fontconfig) \
+ $(use_with truetype freetype) \
+ $(use_enable static-libs static) \
+ $(use_with xml libxml2) \
+ ${myconf}
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+
+ if multilib_is_native_abi && use utils; then
+ dobin index_dump mobj_dump mpls_dump
+ cd .libs/
+ dobin bd_info bdsplice clpi_dump hdmv_test libbluray_test list_titles sound_dump
+ if use java; then
+ dobin bdj_test
+ fi
+ fi
+
+ if multilib_is_native_abi && use java; then
+ java-pkg_dojar "${BUILD_DIR}"/.libs/${PN}-j2se-${PV}.jar
+ doenvd "${FILESDIR}"/90${PN}
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ prune_libtool_files
+}
diff --git a/media-libs/libbluray/libbluray-0.8.1.ebuild b/media-libs/libbluray/libbluray-0.8.1.ebuild
new file mode 100644
index 000000000000..805d248c84dc
--- /dev/null
+++ b/media-libs/libbluray/libbluray-0.8.1.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 autotools java-pkg-opt-2 flag-o-matic eutils multilib-minimal
+
+DESCRIPTION="Blu-ray playback libraries"
+HOMEPAGE="http://www.videolan.org/developers/libbluray.html"
+SRC_URI="http://ftp.videolan.org/pub/videolan/libbluray/${PV}/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="aacs bdplus +fontconfig java static-libs +truetype utils +xml"
+
+COMMON_DEPEND="
+ xml? ( >=dev-libs/libxml2-2.9.1-r4[${MULTILIB_USEDEP}] )
+ fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] )
+ truetype? ( >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}] )
+"
+RDEPEND="
+ ${COMMON_DEPEND}
+ aacs? ( >=media-libs/libaacs-0.6.0[${MULTILIB_USEDEP}] )
+ bdplus? ( media-libs/libbdplus[${MULTILIB_USEDEP}] )
+ java? ( >=virtual/jre-1.6 )
+"
+DEPEND="
+ ${COMMON_DEPEND}
+ java? (
+ >=virtual/jdk-1.6
+ dev-java/ant-core
+ )
+ virtual/pkgconfig
+"
+
+DOCS=( ChangeLog README.txt )
+
+src_prepare() {
+ if use java ; then
+ export JDK_HOME="$(java-config -g JAVA_HOME)"
+
+ # don't install a duplicate jar file
+ sed -i '/^jar_DATA/d' Makefile.am || die
+
+ java-pkg-opt-2_src_prepare
+ fi
+
+ eautoreconf
+}
+
+multilib_src_configure() {
+ local myconf
+ if multilib_is_native_abi && use java; then
+ export JAVACFLAGS="$(java-pkg_javac-args)"
+ append-cflags "$(java-pkg_get-jni-cflags)"
+ myconf="--enable-bdjava"
+ else
+ myconf="--disable-bdjava"
+ fi
+
+ ECONF_SOURCE="${S}" econf \
+ --disable-optimizations \
+ $(multilib_native_use_enable utils examples) \
+ $(use_with fontconfig) \
+ $(use_with truetype freetype) \
+ $(use_enable static-libs static) \
+ $(use_with xml libxml2) \
+ ${myconf}
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+
+ if multilib_is_native_abi && use utils; then
+ dobin index_dump mobj_dump mpls_dump
+ cd .libs/
+ dobin bd_info bdsplice clpi_dump hdmv_test libbluray_test list_titles sound_dump
+ if use java; then
+ dobin bdj_test
+ fi
+ fi
+
+ if multilib_is_native_abi && use java; then
+ java-pkg_dojar "${BUILD_DIR}"/.libs/${PN}-j2se-${PV}.jar
+ doenvd "${FILESDIR}"/90${PN}
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ prune_libtool_files
+}
diff --git a/media-libs/libbluray/libbluray-9999.ebuild b/media-libs/libbluray/libbluray-9999.ebuild
new file mode 100644
index 000000000000..5aae52ef6068
--- /dev/null
+++ b/media-libs/libbluray/libbluray-9999.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 autotools java-pkg-opt-2 git-r3 flag-o-matic eutils multilib-minimal
+
+DESCRIPTION="Blu-ray playback libraries"
+HOMEPAGE="http://www.videolan.org/developers/libbluray.html"
+EGIT_REPO_URI="git://git.videolan.org/libbluray.git"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS=""
+IUSE="aacs bdplus +fontconfig java static-libs +truetype utils +xml"
+
+COMMON_DEPEND="
+ xml? ( >=dev-libs/libxml2-2.9.1-r4[${MULTILIB_USEDEP}] )
+ fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] )
+ truetype? ( >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}] )
+"
+RDEPEND="
+ ${COMMON_DEPEND}
+ aacs? ( >=media-libs/libaacs-0.6.0[${MULTILIB_USEDEP}] )
+ bdplus? ( media-libs/libbdplus[${MULTILIB_USEDEP}] )
+ java? ( >=virtual/jre-1.6 )
+"
+DEPEND="
+ ${COMMON_DEPEND}
+ java? (
+ >=virtual/jdk-1.6
+ dev-java/ant-core
+ )
+ virtual/pkgconfig
+"
+
+DOCS=( ChangeLog README.txt )
+
+src_prepare() {
+ if use java ; then
+ export JDK_HOME="$(java-config -g JAVA_HOME)"
+
+ # don't install a duplicate jar file
+ sed -i '/^jar_DATA/d' src/Makefile.am || die
+
+ java-pkg-opt-2_src_prepare
+ fi
+ eautoreconf
+}
+
+multilib_src_configure() {
+ local myconf
+ if multilib_is_native_abi && use java; then
+ export JAVACFLAGS="$(java-pkg_javac-args)"
+ append-cflags "$(java-pkg_get-jni-cflags)"
+ myconf="--enable-bdjava"
+ else
+ myconf="--disable-bdjava"
+ fi
+
+ ECONF_SOURCE="${S}" econf \
+ --disable-optimizations \
+ $(multilib_native_use_enable utils examples) \
+ $(use_with fontconfig) \
+ $(use_with truetype freetype) \
+ $(use_enable static-libs static) \
+ $(use_with xml libxml2) \
+ ${myconf}
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+
+ if multilib_is_native_abi && use utils; then
+ cd src
+ dobin index_dump mobj_dump mpls_dump
+ cd .libs/
+ dobin bd_info bdsplice clpi_dump hdmv_test libbluray_test list_titles sound_dump
+ if use java; then
+ dobin bdj_test
+ fi
+ fi
+
+ if multilib_is_native_abi && use java; then
+ java-pkg_dojar "${BUILD_DIR}"/src/.libs/${PN}-j2se-${PV}.jar
+ doenvd "${FILESDIR}"/90${PN}
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ prune_libtool_files
+}
diff --git a/media-libs/libbluray/metadata.xml b/media-libs/libbluray/metadata.xml
new file mode 100644
index 000000000000..f9c1f5a88cdc
--- /dev/null
+++ b/media-libs/libbluray/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>
+ <use>
+ <flag name='aacs'>Add support for decryption of AACS</flag>
+ <flag name='bdplus'>Use <pkg>media-libs/libbdplus</pkg> for BD+ decryption</flag>
+ <flag name='java'>Add support for BD-J</flag>
+ <flag name='utils'>Install command-line utilities and examples</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/libbmp/Manifest b/media-libs/libbmp/Manifest
new file mode 100644
index 000000000000..f96c2364097c
--- /dev/null
+++ b/media-libs/libbmp/Manifest
@@ -0,0 +1 @@
+DIST libbmp-0.1.3.tar.bz2 254442 SHA256 57e0101262f3ae9676bd6d9f44e6038d936ffa450cc2ef72295c37f51b072320 SHA512 70eb81832c16b9ebd7005a643efe0362c91389d91ab9a9d5d7456b3bb87f508c3b56f12d4c6a546c60f263f656ff6a00145b31f7bb997921c552664b9bfbbd74 WHIRLPOOL 4d4464062295a463a591a7942cd9c0b64a2bfd389317a6a2c435fd997b1a1687bd49bf47fba6b1c3004cb0aebb3e5abc1f7419ffd114c69b2799b33bcbb4a61b
diff --git a/media-libs/libbmp/libbmp-0.1.3.ebuild b/media-libs/libbmp/libbmp-0.1.3.ebuild
new file mode 100644
index 000000000000..baeec2e7588a
--- /dev/null
+++ b/media-libs/libbmp/libbmp-0.1.3.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="C library for reading, writing, and modifying Windows bitmap image files"
+HOMEPAGE="http://code.google.com/p/libbmp/"
+SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0/2"
+KEYWORDS="~amd64 ~x86"
+IUSE="static-libs"
+
+RDEPEND=""
+RDEPEND=""
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ prune_libtool_files
+}
diff --git a/media-libs/libbmp/metadata.xml b/media-libs/libbmp/metadata.xml
new file mode 100644
index 000000000000..e4a273bfa4cf
--- /dev/null
+++ b/media-libs/libbmp/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>xmw@gentoo.org</email>
+<name>Michael Weber</name>
+</maintainer>
+<longdescription lang="en">
+libbmp is a simple, cross-platform, open source (revised LGPL) C library designed for easily reading, writing, and modifying Windows bitmap (BMP) image files. The library is oriented towards the novice programmer with little formal experience, but it is sufficiently capable for anybody who desires to do I/O and pixel operations on uncompressed 1, 4, 8, 16, 24, and 32 bpp (bits per pixel) BMP files.
+</longdescription>
+</pkgmetadata>
diff --git a/media-libs/libbs2b/Manifest b/media-libs/libbs2b/Manifest
new file mode 100644
index 000000000000..199a852d1037
--- /dev/null
+++ b/media-libs/libbs2b/Manifest
@@ -0,0 +1 @@
+DIST libbs2b-3.1.0.tar.bz2 606283 SHA256 4799974becdeeedf0db00115bc63f60ea3fe4b25f1dfdb6903505839a720e46f SHA512 50cf477ff9ce6adf26fa8a696831c3a4f219c80a21ec4c93be8ec3f67f077447c17abbd9588a9de5eeb3ddacac1564a7138807468fc80e853bc78f193b4afbc4 WHIRLPOOL c8703324bf54656af8533a5ce71234ca158f819498258426c5df2da87c4c4ebb0987217e1fecf39d5f510d9a96a6b6a7da0fa0c3db9c259b573448d35ba58374
diff --git a/media-libs/libbs2b/files/3.1.0-format-security.patch b/media-libs/libbs2b/files/3.1.0-format-security.patch
new file mode 100644
index 000000000000..1b9f9f97479b
--- /dev/null
+++ b/media-libs/libbs2b/files/3.1.0-format-security.patch
@@ -0,0 +1,11 @@
+--- src/bs2bconvert.c.orig 2015-03-06 12:24:00.168451618 +0000
++++ src/bs2bconvert.c 2015-03-06 12:22:20.504446655 +0000
+@@ -153,7 +153,7 @@
+ if( ( infile = sf_open( infilename, SFM_READ, &sfinfo ) ) == NULL )
+ {
+ printf( "Not able to open input file %s.\n", infilename );
+- printf( sf_strerror( NULL ) );
++ printf( "%s", sf_strerror( NULL ) );
+ return 1;
+ }
+
diff --git a/media-libs/libbs2b/libbs2b-3.1.0-r1.ebuild b/media-libs/libbs2b/libbs2b-3.1.0-r1.ebuild
new file mode 100644
index 000000000000..56059f38fd3e
--- /dev/null
+++ b/media-libs/libbs2b/libbs2b-3.1.0-r1.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit multilib-minimal
+
+DESCRIPTION="Bauer stereophonic-to-binaural DSP library"
+HOMEPAGE="http://bs2b.sourceforge.net/"
+SRC_URI="mirror://sourceforge/bs2b/${P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE=""
+
+RDEPEND=">=media-libs/libsndfile-1.0.25-r1[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+# for default_src_configure to work
+ECONF_SOURCE="${S}"
diff --git a/media-libs/libbs2b/libbs2b-3.1.0-r2.ebuild b/media-libs/libbs2b/libbs2b-3.1.0-r2.ebuild
new file mode 100644
index 000000000000..38ab0d53bf51
--- /dev/null
+++ b/media-libs/libbs2b/libbs2b-3.1.0-r2.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 eutils multilib-minimal
+
+DESCRIPTION="Bauer stereophonic-to-binaural DSP library"
+HOMEPAGE="http://bs2b.sourceforge.net/"
+SRC_URI="mirror://sourceforge/bs2b/${P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE=""
+
+RDEPEND=">=media-libs/libsndfile-1.0.25-r1[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+# for default_src_configure to work
+ECONF_SOURCE="${S}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PV}-format-security.patch"
+}
diff --git a/media-libs/libbs2b/metadata.xml b/media-libs/libbs2b/metadata.xml
new file mode 100644
index 000000000000..9ecb53a9d80d
--- /dev/null
+++ b/media-libs/libbs2b/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>sound</herd>
+ <maintainer>
+ <email>chainsaw@gentoo.org</email>
+ <name>Tony Vroon</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">bs2b</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libbsb/Manifest b/media-libs/libbsb/Manifest
new file mode 100644
index 000000000000..2de998b747a3
--- /dev/null
+++ b/media-libs/libbsb/Manifest
@@ -0,0 +1 @@
+DIST libbsb-0.0.7.tar.gz 155443 SHA256 71365c674ce8f06f180ba8542c773ce937b70052b24db8b552212f7198b7be5d SHA512 9a6d7f3d5c2680e008e87ac8b31b676814c9e89b4fb6a42cbbfd96d2d7bc7d734593a3aa94420a374e89431ffac655efdc48cf06718e682933f8975bc3c56515 WHIRLPOOL 6a0bf93ff1cf296b44948a758f5e7d6f65954fd05c1dd64057ce0f7c4454ed7a729ffbc23b560ab1e38928b93a08551bf9b5227d06914caffb864a4569013c7a
diff --git a/media-libs/libbsb/libbsb-0.0.7.ebuild b/media-libs/libbsb/libbsb-0.0.7.ebuild
new file mode 100644
index 000000000000..fe995612946b
--- /dev/null
+++ b/media-libs/libbsb/libbsb-0.0.7.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="A portable C library for reading and writing BSB format image files"
+HOMEPAGE="http://libbsb.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ~x86"
+IUSE=""
+
+DEPEND="media-libs/libpng
+ media-libs/tiff"
+RDEPEND="${DEPEND}"
+
+# "make check" in 0.0.7 fails with newer tiff versions (4.0.0) altough the
+# tools work perfectly, so restrict test until this is fixed upstream
+RESTRICT="test"
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc README AUTHORS
+}
diff --git a/media-libs/libbsb/metadata.xml b/media-libs/libbsb/metadata.xml
new file mode 100644
index 000000000000..958adaa1987b
--- /dev/null
+++ b/media-libs/libbsb/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>mschiff@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">libbsb</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libcaca/Manifest b/media-libs/libcaca/Manifest
new file mode 100644
index 000000000000..d4afef877f3f
--- /dev/null
+++ b/media-libs/libcaca/Manifest
@@ -0,0 +1,2 @@
+DIST libcaca-0.99.beta18.tar.gz 1168552 SHA256 77ea06633f4a6022dccd4f76c1823e167a40cb05308fc1c7ea0fa1f80f6c33a1 SHA512 b2a8264ec36b74a01ff415a1fd7cb1806c76e28795b73607d4f8fa5ed5cc776b215f2817f45f06c672688f010622ee5c5e2f9dc4d0c43417dedbff545d575ca5 WHIRLPOOL 3e6404f0d16ca5718022a919c1568b0e8afaa40d58ca4a1e3271c437bebd3cde40ac63f45c6bbfea00a4936a673c24bdd21ecc0070f4814464d787dab33c183b
+DIST libcaca-0.99.beta19.tar.gz 1203495 SHA256 128b467c4ed03264c187405172a4e83049342cc8cc2f655f53a2d0ee9d3772f4 SHA512 780fc7684d40207cc10df3f87d6d8f1d47ddfffa0e76e41a5ce671b82d5c7f090facb054c3d49ca7c4ea1a619625bb9085ce52f837f50792b4a2d776a4c68e15 WHIRLPOOL 5e0e72543aab79f39c063ab67396ec5e31610c4cffade8c33f5f54e75ccb2ced561da194d287d4857cb712b6cd813bc1430197cc101ca675a441b7ea74d44839
diff --git a/media-libs/libcaca/files/libcaca-0.99_beta18-fix-tests.patch b/media-libs/libcaca/files/libcaca-0.99_beta18-fix-tests.patch
new file mode 100644
index 000000000000..f9ff8090c215
--- /dev/null
+++ b/media-libs/libcaca/files/libcaca-0.99_beta18-fix-tests.patch
@@ -0,0 +1,61 @@
+--- test/Makefile.am
++++ test/Makefile.am
+@@ -1,3 +1,5 @@
++AM_TESTS_ENVIRONMENT = \
++ top_srcdir="$(top_srcdir)"
+
+ AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/caca -I../caca
+
+--- test/check-copyright
++++ test/check-copyright
+@@ -3,10 +3,11 @@
+ #
+ # Check that the copyright information is valid
+ #
++echo "top srcdir: ${top_srcdir:=..}"
+ nfails=0
+ nfiles=0
+ for dir in $(make -s echo-dirs -C ..); do
+- if [ ! -d "../$dir" ]; then continue; fi
++ if [ ! -d "$top_srcdir/$dir" ]; then continue; fi
+ for x in $(make -s echo-sources -C ../$dir); do
+ case "$x" in
+ *.c|*.cpp|*.h|*.m|*.php|*.cs|*.java|.py|.pl)
+@@ -14,7 +15,7 @@
+ *)
+ continue ;;
+ esac
+- if ! grep 'Copyright *([cC])' "../$dir/$x" >/dev/null 2>&1; then
++ if ! grep 'Copyright *([cC])' "$top_srcdir/$dir/$x" >/dev/null 2>&1; then
+ echo "error: $dir/$x lacks proper copyright information"
+ nfails=$(($nfails + 1))
+ elif [ -d ../.git ]; then
+--- test/check-source
++++ test/check-source
+@@ -3,6 +3,7 @@
+ #
+ # Check that we have no tabs or trailing spaces in the source code
+ #
++echo "top srcdir: ${top_srcdir:=..}"
+ nfails=0
+ nfiles=0
+ nlines=0
+@@ -12,15 +13,15 @@
+ case "$x" in
+ *.c|*.cpp|*.h|*.m|*.php|*.cs|*.java|*.py|*.pl)
+ nfiles=$(($nfiles + 1));
+- nlines=$(($nlines + `grep -c . "../$dir/$x"`)) ;;
++ nlines=$(($nlines + `grep -c . "$top_srcdir/$dir/$x"`)) ;;
+ *)
+ continue ;;
+ esac
+- if grep '[[:space:]]$' "../$dir/$x" >/dev/null 2>&1; then
++ if grep '[[:space:]]$' "$top_srcdir/$dir/$x" >/dev/null 2>&1; then
+ echo "error: $dir/$x contains trailing spaces"
+ nfails=$(($nfails + 1))
+ fi
+- if grep ' ' "../$dir/$x" >/dev/null 2>&1; then
++ if grep ' ' "$top_srcdir/$dir/$x" >/dev/null 2>&1; then
+ echo "error: $dir/$x contains tabs"
+ nfails=$(($nfails + 1))
+ fi
diff --git a/media-libs/libcaca/files/libcaca-0.99_beta18-latex_hacks.patch b/media-libs/libcaca/files/libcaca-0.99_beta18-latex_hacks.patch
new file mode 100644
index 000000000000..060822e6dcc7
--- /dev/null
+++ b/media-libs/libcaca/files/libcaca-0.99_beta18-latex_hacks.patch
@@ -0,0 +1,14 @@
+Hack it a bit differently so that it works with texlive 2013, see http://bugs.gentoo.org/480862
+Turns out this patch is required also for texlive 2012, see http://bugs.gentoo.org/517474
+
+--- doc/Makefile.am
++++ doc/Makefile.am
+@@ -29,7 +29,7 @@ if BUILD_DOCUMENTATION
+ if USE_LATEX
+ rm -f latex/libcaca.tex latex/libcaca.pdf
+ mv latex/refman.tex latex/libcaca.tex
+- sed 's/setlength{/renewcommand{/' latex/libcaca.tex \
++ sed 's/\\setlength{/%\0/' latex/libcaca.tex \
+ | sed 's/.*usepackage.*times.*//' > latex/refman.tex
+ cd latex && $(MAKE) $(AM_CFLAGS) refman.pdf || (cat refman.log; exit 1)
+ mv latex/refman.pdf latex/libcaca.pdf
diff --git a/media-libs/libcaca/libcaca-0.99_beta18-r2.ebuild b/media-libs/libcaca/libcaca-0.99_beta18-r2.ebuild
new file mode 100644
index 000000000000..8afe49a6eec1
--- /dev/null
+++ b/media-libs/libcaca/libcaca-0.99_beta18-r2.ebuild
@@ -0,0 +1,138 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+inherit autotools eutils flag-o-matic mono multilib java-pkg-opt-2 python-single-r1 multilib-minimal
+
+MY_P=${P/_/.}
+DESCRIPTION="A library that creates colored ASCII-art graphics"
+HOMEPAGE="http://libcaca.zoy.org/"
+SRC_URI="http://libcaca.zoy.org/files/${PN}/${MY_P}.tar.gz"
+
+LICENSE="GPL-2 ISC LGPL-2.1 WTFPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="cxx doc imlib java mono ncurses opengl python ruby slang static-libs test truetype X"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+COMMON_DEPEND="imlib? ( >=media-libs/imlib2-1.4.6-r2[${MULTILIB_USEDEP}] )
+ mono? ( dev-lang/mono )
+ ncurses? ( >=sys-libs/ncurses-5.9-r3[${MULTILIB_USEDEP}] )
+ opengl? (
+ >=virtual/glu-9.0-r1[${MULTILIB_USEDEP}]
+ >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}]
+ >=media-libs/freeglut-2.8.1[${MULTILIB_USEDEP}]
+ truetype? ( >=media-libs/ftgl-2.1.3_rc5 )
+ )
+ python? ( ${PYTHON_DEPS} )
+ ruby? ( =dev-lang/ruby-1.8* )
+ slang? ( >=sys-libs/slang-2.2.4-r1[${MULTILIB_USEDEP}] )
+ X? ( >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] >=x11-libs/libXt-1.1.4[${MULTILIB_USEDEP}] )"
+RDEPEND="${COMMON_DEPEND}
+ java? ( >=virtual/jre-1.5 )"
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig
+ doc? (
+ app-doc/doxygen
+ virtual/latex-base
+ >=dev-texlive/texlive-fontsrecommended-2012
+ >=dev-texlive/texlive-latexextra-2012
+ dev-tex/xcolor
+ )
+ java? ( >=virtual/jdk-1.5 )
+ test? ( dev-util/cppunit )"
+
+S=${WORKDIR}/${MY_P}
+
+DOCS=( AUTHORS ChangeLog NEWS NOTES README THANKS )
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ sed -i -e '/doxygen_tests = check-doxygen/d' test/Makefile.am || die #339962
+
+ sed -i \
+ -e 's:-g -O2 -fno-strength-reduce -fomit-frame-pointer::' \
+ -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' \
+ configure.ac || die
+
+ sed -i \
+ -e 's:$(JAVAC):$(JAVAC) $(JAVACFLAGS):' \
+ -e 's:libcaca_java_la_CPPFLAGS =:libcaca_java_la_CPPFLAGS = -I$(top_srcdir)/caca:' \
+ java/Makefile.am || die
+
+ if ! use truetype; then
+ sed -i -e '/PKG_CHECK_MODULES/s:ftgl:dIsAbLe&:' configure.ac || die
+ fi
+
+ if use imlib && ! use X; then
+ append-cflags -DX_DISPLAY_MISSING
+ fi
+
+ # Removed 'has_version '>=dev-texlive/texlive-latex-2013' &&' that prefixed this
+ # patch before wrt #517474
+ epatch "${FILESDIR}"/${P}-latex_hacks.patch
+
+ # fix out of source tests
+ epatch "${FILESDIR}"/${P}-fix-tests.patch
+
+ eautoreconf
+
+ java-pkg-opt-2_src_prepare
+}
+
+multilib_src_configure() {
+ if multilib_is_native_abi; then
+ if use java; then
+ export JAVACFLAGS="$(java-pkg_javac-args)"
+ append-cflags "$(java-pkg_get-jni-cflags)"
+ fi
+
+ use mono && export CSC="$(type -P gmcs)" #329651
+ export VARTEXFONTS="${T}/fonts" #44128
+ fi
+
+ ECONF_SOURCE="${S}" \
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable slang) \
+ $(use_enable ncurses) \
+ $(use_enable X x11) $(use_with X x) --x-libraries=/usr/$(get_libdir) \
+ $(use_enable opengl gl) \
+ $(use_enable cxx) \
+ $(use_enable imlib imlib2) \
+ $(use_enable test cppunit) \
+ $(multilib_native_use_enable java) \
+ $(multilib_native_use_enable ruby) \
+ $(multilib_native_use_enable python) \
+ $(multilib_native_use_enable mono csharp) \
+ $(multilib_native_use_enable doc)
+}
+
+multilib_src_compile() {
+ local _java_makeopts
+ use java && _java_makeopts="-j1" #480864
+ emake ${_java_makeopts}
+}
+
+multilib_src_test() {
+ emake -j1 check
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+
+ if multilib_is_native_abi && use java; then
+ java-pkg_newjar java/libjava.jar
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ rm -rf "${D}"/usr/share/java
+ prune_libtool_files --modules
+}
diff --git a/media-libs/libcaca/libcaca-0.99_beta19.ebuild b/media-libs/libcaca/libcaca-0.99_beta19.ebuild
new file mode 100644
index 000000000000..551216476e35
--- /dev/null
+++ b/media-libs/libcaca/libcaca-0.99_beta19.ebuild
@@ -0,0 +1,151 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+RUBY_OPTIONAL=yes
+USE_RUBY=ruby20
+
+inherit autotools ruby-ng eutils flag-o-matic mono-env multilib java-pkg-opt-2 python-single-r1 multilib-minimal
+
+MY_P=${P/_/.}
+DESCRIPTION="A library that creates colored ASCII-art graphics"
+HOMEPAGE="http://libcaca.zoy.org/"
+SRC_URI="http://libcaca.zoy.org/files/${PN}/${MY_P}.tar.gz"
+
+LICENSE="GPL-2 ISC LGPL-2.1 WTFPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="cxx doc imlib java mono ncurses opengl python ruby slang static-libs test truetype X"
+REQUIRED_USE="
+ python? ( ${PYTHON_REQUIRED_USE} )
+ ruby? ( ruby_targets_${USE_RUBY} )
+"
+
+COMMON_DEPEND="imlib? ( >=media-libs/imlib2-1.4.6-r2[${MULTILIB_USEDEP}] )
+ mono? ( dev-lang/mono )
+ ncurses? ( >=sys-libs/ncurses-5.9-r3[${MULTILIB_USEDEP}] )
+ opengl? (
+ >=virtual/glu-9.0-r1[${MULTILIB_USEDEP}]
+ >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}]
+ >=media-libs/freeglut-2.8.1[${MULTILIB_USEDEP}]
+ truetype? ( >=media-libs/ftgl-2.1.3_rc5 )
+ )
+ python? ( ${PYTHON_DEPS} )
+ ruby? ( $(ruby_implementations_depend) )
+ slang? ( >=sys-libs/slang-2.2.4-r1[${MULTILIB_USEDEP}] )
+ X? ( >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] >=x11-libs/libXt-1.1.4[${MULTILIB_USEDEP}] )"
+RDEPEND="${COMMON_DEPEND}
+ java? ( >=virtual/jre-1.5 )"
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig
+ doc? (
+ app-doc/doxygen
+ virtual/latex-base
+ >=dev-texlive/texlive-fontsrecommended-2012
+ >=dev-texlive/texlive-latexextra-2012
+ dev-tex/xcolor
+ )
+ java? ( >=virtual/jdk-1.5 )
+ test? ( dev-util/cppunit )"
+
+S=${WORKDIR}/${MY_P}
+
+DOCS=( AUTHORS ChangeLog NEWS NOTES README THANKS )
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+ java-pkg-opt-2_pkg_setup
+ use mono && mono-env_pkg_setup
+}
+
+src_unpack() {
+ default
+}
+
+src_prepare() {
+ sed -i -e '/doxygen_tests = check-doxygen/d' test/Makefile.am || die #339962
+
+ sed -i \
+ -e 's:-g -O2 -fno-strength-reduce -fomit-frame-pointer::' \
+ -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' \
+ configure.ac || die
+
+ sed -i \
+ -e 's:$(JAVAC):$(JAVAC) $(JAVACFLAGS):' \
+ -e 's:libcaca_java_la_CPPFLAGS =:libcaca_java_la_CPPFLAGS = -I$(top_srcdir)/caca:' \
+ java/Makefile.am || die
+
+ if ! use truetype; then
+ sed -i -e '/PKG_CHECK_MODULES/s:ftgl:dIsAbLe&:' configure.ac || die
+ fi
+
+ if use imlib && ! use X; then
+ append-cflags -DX_DISPLAY_MISSING
+ fi
+
+ # Removed 'has_version '>=dev-texlive/texlive-latex-2013' &&' that prefixed this
+ # patch before wrt #517474
+ epatch "${FILESDIR}"/${PN}-0.99_beta18-latex_hacks.patch
+
+ # fix out of source tests
+ epatch "${FILESDIR}"/${PN}-0.99_beta18-fix-tests.patch
+
+ eautoreconf
+
+ java-pkg-opt-2_src_prepare
+}
+
+multilib_src_configure() {
+ if multilib_is_native_abi; then
+ if use java; then
+ export JAVACFLAGS="$(java-pkg_javac-args)"
+ export JAVA_CFLAGS="$(java-pkg_get-jni-cflags)"
+ fi
+
+ use mono && export CSC="$(type -P gmcs)" #329651
+ export VARTEXFONTS="${T}/fonts" #44128
+ use ruby && use ruby_targets_${USE_RUBY} && export RUBY=$(ruby_implementation_command ${USE_RUBY})
+ fi
+
+ ECONF_SOURCE="${S}" \
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable slang) \
+ $(use_enable ncurses) \
+ $(use_enable X x11) $(use_with X x) --x-libraries=/usr/$(get_libdir) \
+ $(use_enable opengl gl) \
+ $(use_enable cxx) \
+ $(use_enable imlib imlib2) \
+ $(use_enable test cppunit) \
+ $(multilib_native_use_enable java) \
+ $(multilib_native_use_enable ruby) \
+ $(multilib_native_use_enable python) \
+ $(multilib_native_use_enable mono csharp) \
+ $(multilib_native_use_enable doc)
+}
+
+multilib_src_compile() {
+ local _java_makeopts
+ use java && _java_makeopts="-j1" #480864
+ emake V=1 ${_java_makeopts}
+}
+
+multilib_src_test() {
+ emake V=1 -j1 check
+}
+
+multilib_src_install() {
+ emake V=1 DESTDIR="${D}" install
+
+ if multilib_is_native_abi && use java; then
+ java-pkg_newjar java/libjava.jar
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ rm -rf "${D}"/usr/share/java
+ prune_libtool_files --modules
+}
diff --git a/media-libs/libcaca/metadata.xml b/media-libs/libcaca/metadata.xml
new file mode 100644
index 000000000000..edccfe5754d2
--- /dev/null
+++ b/media-libs/libcaca/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-libs/libcanberra/Manifest b/media-libs/libcanberra/Manifest
new file mode 100644
index 000000000000..ec2610dddead
--- /dev/null
+++ b/media-libs/libcanberra/Manifest
@@ -0,0 +1 @@
+DIST libcanberra-0.30.tar.xz 318960 SHA256 c2b671e67e0c288a69fc33dc1b6f1b534d07882c2aceed37004bf48c601afa72 SHA512 f7543582122256826cd01d0f5673e1e58d979941a93906400182305463d6166855cb51f35c56d807a56dc20b7a64f7ce4391368d24990c1b70782a7d0b4429c2 WHIRLPOOL 684f0c4886f5bbc22d92500d0aa6371655106c8e788fe57d98b011e61fc0b09412edfddf782d42424009445e66bfa28ec43953ad263ea3eb0d9d9049ec479d87
diff --git a/media-libs/libcanberra/files/libcanberra-0.30-wayland.patch b/media-libs/libcanberra/files/libcanberra-0.30-wayland.patch
new file mode 100644
index 000000000000..e51cfe00c0df
--- /dev/null
+++ b/media-libs/libcanberra/files/libcanberra-0.30-wayland.patch
@@ -0,0 +1,64 @@
+From c0620e432650e81062c1967cc669829dbd29b310 Mon Sep 17 00:00:00 2001
+From: Michael Meeks <michael.meeks@suse.com>
+Date: Fri, 09 Nov 2012 16:16:40 +0000
+Subject: gtk: Don't assume all GdkDisplays are GdkX11Displays: broadway/wayland
+
+---
+diff --git a/src/canberra-gtk-module.c b/src/canberra-gtk-module.c
+index 67791f0..c1532ab 100644
+--- a/src/canberra-gtk-module.c
++++ b/src/canberra-gtk-module.c
+@@ -307,6 +307,11 @@ static gint window_get_desktop(GdkDisplay *d, GdkWindow *w) {
+ guchar *data = NULL;
+ gint ret = -1;
+
++#ifdef GDK_IS_X11_DISPLAY
++ if (!GDK_IS_X11_DISPLAY(d))
++ return 0;
++#endif
++
+ if (XGetWindowProperty(GDK_DISPLAY_XDISPLAY(d), GDK_WINDOW_XID(w),
+ gdk_x11_get_xatom_by_name_for_display(d, "_NET_WM_DESKTOP"),
+ 0, G_MAXLONG, False, XA_CARDINAL, &type_return,
+@@ -335,6 +340,11 @@ static gint display_get_desktop(GdkDisplay *d) {
+ guchar *data = NULL;
+ gint ret = -1;
+
++#ifdef GDK_IS_X11_DISPLAY
++ if (!GDK_IS_X11_DISPLAY(d))
++ return 0;
++#endif
++
+ if (XGetWindowProperty(GDK_DISPLAY_XDISPLAY(d), DefaultRootWindow(GDK_DISPLAY_XDISPLAY(d)),
+ gdk_x11_get_xatom_by_name_for_display(d, "_NET_CURRENT_DESKTOP"),
+ 0, G_MAXLONG, False, XA_CARDINAL, &type_return,
+@@ -365,6 +375,11 @@ static gboolean window_is_xembed(GdkDisplay *d, GdkWindow *w) {
+ gboolean ret = FALSE;
+ Atom xembed;
+
++#ifdef GDK_IS_X11_DISPLAY
++ if (!GDK_IS_X11_DISPLAY(d))
++ return FALSE;
++#endif
++
+ /* Gnome Panel applets are XEMBED windows. We need to make sure we
+ * ignore them */
+
+diff --git a/src/canberra-gtk.c b/src/canberra-gtk.c
+index 34446f5..08cb668 100644
+--- a/src/canberra-gtk.c
++++ b/src/canberra-gtk.c
+@@ -185,6 +185,11 @@ static gint window_get_desktop(GdkDisplay *d, GdkWindow *w) {
+ guchar *data = NULL;
+ gint ret = -1;
+
++#ifdef GDK_IS_X11_DISPLAY
++ if (!GDK_IS_X11_DISPLAY(d))
++ return 0;
++#endif
++
+ if (XGetWindowProperty(GDK_DISPLAY_XDISPLAY(d), GDK_WINDOW_XID(w),
+ gdk_x11_get_xatom_by_name_for_display(d, "_NET_WM_DESKTOP"),
+ 0, G_MAXLONG, False, XA_CARDINAL, &type_return,
+--
+cgit v0.9.2
diff --git a/media-libs/libcanberra/files/libcanberra-gtk-module.sh b/media-libs/libcanberra/files/libcanberra-gtk-module.sh
new file mode 100644
index 000000000000..63c16af71861
--- /dev/null
+++ b/media-libs/libcanberra/files/libcanberra-gtk-module.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+# to be sourced
+
+case "$SESSION" in
+ GNOME)
+ # Done by gnome-settings-daemon
+ ;;
+ *)
+ if [ -z "$GTK_MODULES" ] ; then
+ GTK_MODULES="canberra-gtk-module"
+ else
+ GTK_MODULES="$GTK_MODULES:canberra-gtk-module"
+ fi
+ export GTK_MODULES
+ ;;
+esac
diff --git a/media-libs/libcanberra/libcanberra-0.30-r4.ebuild b/media-libs/libcanberra/libcanberra-0.30-r4.ebuild
new file mode 100644
index 000000000000..8771431299e9
--- /dev/null
+++ b/media-libs/libcanberra/libcanberra-0.30-r4.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit eutils systemd
+
+DESCRIPTION="Portable sound event library"
+HOMEPAGE="http://git.0pointer.net/libcanberra.git/"
+SRC_URI="http://0pointer.de/lennart/projects/${PN}/${P}.tar.xz"
+
+LICENSE="LGPL-2.1+"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x86-solaris"
+IUSE="alsa gnome gstreamer +gtk +gtk3 oss pulseaudio +sound tdb udev"
+
+COMMON_DEPEND="
+ dev-libs/libltdl:0
+ media-libs/libvorbis
+ alsa? (
+ media-libs/alsa-lib:=
+ udev? ( virtual/libudev:= ) )
+ gstreamer? ( media-libs/gstreamer:1.0 )
+ gtk? (
+ >=dev-libs/glib-2.32:2
+ >=x11-libs/gtk+-2.20.0:2
+ x11-libs/libX11 )
+ gtk3? (
+ >=dev-libs/glib-2.32:2
+ x11-libs/gtk+:3
+ x11-libs/libX11 )
+ pulseaudio? ( >=media-sound/pulseaudio-0.9.11 )
+ tdb? ( sys-libs/tdb:= )
+"
+RDEPEND="${COMMON_DEPEND}
+ gnome? (
+ gnome-base/dconf
+ gnome-base/gsettings-desktop-schemas )
+ sound? ( x11-themes/sound-theme-freedesktop )" # Required for index.theme wrt #323379
+DEPEND="${COMMON_DEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig
+"
+
+REQUIRED_USE="udev? ( alsa )"
+
+src_prepare() {
+ # gtk: Don't assume all GdkDisplays are GdkX11Displays: broadway/wayland (from 'master')
+ epatch "${FILESDIR}/${PN}-0.30-wayland.patch"
+}
+
+src_configure() {
+ econf \
+ --docdir="${EPREFIX}"/usr/share/doc/${PF} \
+ $(use_enable alsa) \
+ $(use_enable oss) \
+ $(use_enable pulseaudio pulse) \
+ $(use_enable gstreamer) \
+ $(use_enable gtk) \
+ $(use_enable gtk3) \
+ $(use_enable tdb) \
+ $(use_enable udev) \
+ $(systemd_with_unitdir) \
+ --disable-lynx \
+ --disable-gtk-doc
+}
+
+src_install() {
+ # Disable parallel installation until bug #253862 is solved
+ MAKEOPTS="${MAKEOPTS} -j1" default
+ prune_libtool_files --modules
+
+ # This is needed for desktops different than GNOME, bug #520550
+ exeinto /etc/X11/xinit/xinitrc.d
+ newexe "${FILESDIR}"/libcanberra-gtk-module.sh 40-libcanberra-gtk-module
+}
diff --git a/media-libs/libcanberra/libcanberra-0.30-r5.ebuild b/media-libs/libcanberra/libcanberra-0.30-r5.ebuild
new file mode 100644
index 000000000000..25a60dae4cc9
--- /dev/null
+++ b/media-libs/libcanberra/libcanberra-0.30-r5.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit autotools-multilib eutils systemd
+
+DESCRIPTION="Portable sound event library"
+HOMEPAGE="http://git.0pointer.net/libcanberra.git/"
+SRC_URI="http://0pointer.de/lennart/projects/${PN}/${P}.tar.xz"
+
+LICENSE="LGPL-2.1+"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x86-solaris"
+IUSE="alsa gnome gstreamer +gtk +gtk3 oss pulseaudio +sound tdb udev"
+
+COMMON_DEPEND="
+ dev-libs/libltdl:0[${MULTILIB_USEDEP}]
+ media-libs/libvorbis[${MULTILIB_USEDEP}]
+ alsa? (
+ media-libs/alsa-lib:=[${MULTILIB_USEDEP}]
+ udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) )
+ gstreamer? ( media-libs/gstreamer:1.0[${MULTILIB_USEDEP}] )
+ gtk? (
+ >=dev-libs/glib-2.32:2[${MULTILIB_USEDEP}]
+ >=x11-libs/gtk+-2.20.0:2[${MULTILIB_USEDEP}]
+ x11-libs/libX11[${MULTILIB_USEDEP}] )
+ gtk3? (
+ >=dev-libs/glib-2.32:2[${MULTILIB_USEDEP}]
+ x11-libs/gtk+:3[${MULTILIB_USEDEP}]
+ x11-libs/libX11[${MULTILIB_USEDEP}] )
+ pulseaudio? ( >=media-sound/pulseaudio-0.9.11[${MULTILIB_USEDEP}] )
+ tdb? ( sys-libs/tdb:=[${MULTILIB_USEDEP}] )
+"
+RDEPEND="${COMMON_DEPEND}
+ gnome? (
+ gnome-base/dconf
+ gnome-base/gsettings-desktop-schemas )
+ sound? ( x11-themes/sound-theme-freedesktop )" # Required for index.theme wrt #323379
+DEPEND="${COMMON_DEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig
+"
+
+REQUIRED_USE="udev? ( alsa )"
+
+src_prepare() {
+ # gtk: Don't assume all GdkDisplays are GdkX11Displays: broadway/wayland (from 'master')
+ epatch "${FILESDIR}/${PN}-0.30-wayland.patch"
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ --docdir="${EPREFIX}"/usr/share/doc/${PF} \
+ $(use_enable alsa) \
+ $(use_enable oss) \
+ $(use_enable pulseaudio pulse) \
+ $(use_enable gstreamer) \
+ $(use_enable gtk) \
+ $(use_enable gtk3) \
+ $(use_enable tdb) \
+ $(use_enable udev) \
+ $(systemd_with_unitdir) \
+ --disable-lynx \
+ --disable-gtk-doc
+
+ if multilib_is_native_abi; then
+ ln -s "${S}"/gtkdoc/html gtkdoc/html || die
+ fi
+}
+
+multilib_src_install() {
+ # Disable parallel installation until bug #253862 is solved
+ emake DESTDIR="${D}" -j1 install
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ prune_libtool_files --modules
+
+ # This is needed for desktops different than GNOME, bug #520550
+ exeinto /etc/X11/xinit/xinitrc.d
+ newexe "${FILESDIR}"/libcanberra-gtk-module.sh 40-libcanberra-gtk-module
+}
diff --git a/media-libs/libcanberra/metadata.xml b/media-libs/libcanberra/metadata.xml
new file mode 100644
index 000000000000..073731283aef
--- /dev/null
+++ b/media-libs/libcanberra/metadata.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>gnome</herd>
+ <herd>sound</herd>
+ <longdescription>
+ A small and lightweight implementation of the XDG Sound Theme Specification
+ (http://0pointer.de/public/sound-theme-spec.html)
+ </longdescription>
+ <use>
+ <flag name='alsa'>Enables ALSA sound driver.</flag>
+ <flag name='gstreamer'>Enables gstreamer sound driver. Not useful when
+ alsa or pulseaudio is available.</flag>
+ <flag name='gtk'>Enables building of gtk+ helper library, gtk+ runtime
+ sound effects and the canberra-gtk-play utility. To enable the gtk+
+ sound effects add canberra-gtk-module to the colon separated list of
+ modules in the GTK_MODULES environment variable.</flag>
+ <flag name='gtk3'>Enables building of gtk+3 helper library, gtk+3
+ runtime sound effects and the canberra-gtk-play utility. To enable
+ the gtk+3 sound effects add canberra-gtk-module to the colon
+ separated list of modules in the GTK_MODULES environment
+ variable.</flag>
+ <flag name='pulseaudio'>Enables PulseAudio sound driver that should be
+ able to support positional event sounds. This is the preferred
+ choice for best sound events experience and picked by default if
+ compiled in and possible to use at runtime.</flag>
+ <flag name='sound'>Install x11-themes/sound-theme-freedesktop to get
+ sounds on Gnome and Xfce.</flag>
+ <flag name='tdb'>Enables Trivial Database support for caching
+ purposes.</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/libcdaudio/Manifest b/media-libs/libcdaudio/Manifest
new file mode 100644
index 000000000000..79c30f8770d3
--- /dev/null
+++ b/media-libs/libcdaudio/Manifest
@@ -0,0 +1 @@
+DIST libcdaudio-0.99.12.tar.gz 357150 SHA256 eb79fa66b3e17424a1a16bb3551108ae32131bea9d6ea0ef3d103d116c506bbc
diff --git a/media-libs/libcdaudio/files/libcdaudio-0.99-CAN-2005-0706.patch b/media-libs/libcdaudio/files/libcdaudio-0.99-CAN-2005-0706.patch
new file mode 100644
index 000000000000..7fc60e367b7d
--- /dev/null
+++ b/media-libs/libcdaudio/files/libcdaudio-0.99-CAN-2005-0706.patch
@@ -0,0 +1,12 @@
+--- libcdaudio-0.99.10/src/cddb.c.orig 2005-04-03 15:37:04.180240520 +0200
++++ libcdaudio-0.99.10/src/cddb.c 2005-04-03 15:38:07.389631232 +0200
+@@ -1034,7 +1034,7 @@
+ }
+
+ query->query_matches = 0;
+- while(!cddb_read_line(sock, inbuffer, 256)) {
++ while(query->query_matches < MAX_INEXACT_MATCHES && !cddb_read_line(sock, inbuffer, 256)) {
+ slashed = 0;
+ if(strchr(inbuffer, '/') != NULL && parse_disc_artist) {
+ index = 0;
+
diff --git a/media-libs/libcdaudio/files/libcdaudio-0.99.12-bug245649.patch b/media-libs/libcdaudio/files/libcdaudio-0.99.12-bug245649.patch
new file mode 100644
index 000000000000..988c4c21c85d
--- /dev/null
+++ b/media-libs/libcdaudio/files/libcdaudio-0.99.12-bug245649.patch
@@ -0,0 +1,13 @@
+--- src/cddb.c
++++ src/cddb.c
+@@ -1679,7 +1679,7 @@ cddb_read_disc_data(int cd_desc, struct disc_data *outdata)
+ free(file);
+
+ while(!feof(cddb_data)) {
+- fgets(inbuffer, 512, cddb_data);
++ fgets(inbuffer, 256, cddb_data);
+ cddb_process_line(inbuffer, data);
+ }
+
+
+
diff --git a/media-libs/libcdaudio/libcdaudio-0.99.12-r1.ebuild b/media-libs/libcdaudio/libcdaudio-0.99.12-r1.ebuild
new file mode 100644
index 000000000000..ec027995a666
--- /dev/null
+++ b/media-libs/libcdaudio/libcdaudio-0.99.12-r1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+DESCRIPTION="Library of cd audio related routines"
+HOMEPAGE="http://libcdaudio.sourceforge.net/"
+SRC_URI="mirror://sourceforge/libcdaudio/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd"
+IUSE=""
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${PN}-0.99-CAN-2005-0706.patch #84936
+ epatch "${FILESDIR}"/${P}-bug245649.patch
+}
+
+src_compile() {
+ econf --enable-threads
+ emake || die "compile problem."
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "make install failed"
+ dodoc AUTHORS ChangeLog NEWS README TODO
+}
diff --git a/media-libs/libcdaudio/metadata.xml b/media-libs/libcdaudio/metadata.xml
new file mode 100644
index 000000000000..385a5882ed42
--- /dev/null
+++ b/media-libs/libcdaudio/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>sound</herd>
+ <upstream>
+ <remote-id type="sourceforge">libcdaudio</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libcddb/Manifest b/media-libs/libcddb/Manifest
new file mode 100644
index 000000000000..97d441b909c6
--- /dev/null
+++ b/media-libs/libcddb/Manifest
@@ -0,0 +1 @@
+DIST libcddb-1.3.2.tar.bz2 352909 SHA256 35ce0ee1741ea38def304ddfe84a958901413aa829698357f0bee5bb8f0a223b SHA512 0e07e7d37f2013164d75b530a5528f54847271fd20f3b7bedb192a05d1f61dcf006d10dc2927efe155a01eddcc57b940bc31d8ac88d5dfc4f1a09771caa84e0a WHIRLPOOL 83a76a9f3c602c1ea3fc0fbce77cc51b3dec03f39a3ba2b89d7c1e6a6875a3fdc58323728d9f417bc6b4f3daea506848a4b36b7a75a977b930d24f11f7d10d61
diff --git a/media-libs/libcddb/libcddb-1.3.2-r1.ebuild b/media-libs/libcddb/libcddb-1.3.2-r1.ebuild
new file mode 100644
index 000000000000..c16ebcab93c5
--- /dev/null
+++ b/media-libs/libcddb/libcddb-1.3.2-r1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_PRUNE_LIBTOOL_FILES=all
+
+inherit autotools-multilib
+
+DESCRIPTION="A library for accessing a CDDB server"
+HOMEPAGE="http://libcddb.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~x86-solaris"
+IUSE="doc static-libs"
+
+RDEPEND=">=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]"
+DEPEND="doc? ( app-doc/doxygen )"
+
+RESTRICT="test"
+
+DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO )
+
+MULTILIB_WRAPPED_HEADERS=( /usr/include/cddb/version.h )
+
+src_configure() {
+ local myeconfargs=( --without-cdio )
+ autotools-multilib_src_configure
+}
+
+src_compile() {
+ autotools-multilib_src_compile
+
+ if use doc; then
+ cd "${S}"/doc
+ doxygen doxygen.conf || die
+ fi
+}
+
+src_install() {
+ autotools-multilib_src_install
+
+ use doc && dohtml "${S}"/doc/html/*
+}
diff --git a/media-libs/libcddb/libcddb-1.3.2.ebuild b/media-libs/libcddb/libcddb-1.3.2.ebuild
new file mode 100644
index 000000000000..2b769fa8f62f
--- /dev/null
+++ b/media-libs/libcddb/libcddb-1.3.2.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit libtool
+
+DESCRIPTION="A library for accessing a CDDB server"
+HOMEPAGE="http://libcddb.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~x86-solaris"
+IUSE="doc static-libs"
+
+RDEPEND="virtual/libiconv"
+DEPEND="doc? ( app-doc/doxygen )"
+
+RESTRICT="test"
+
+DOCS="AUTHORS ChangeLog NEWS README THANKS TODO"
+
+src_prepare() {
+ elibtoolize # Sanitizing .so version for FreeBSD
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ --without-cdio
+}
+
+src_compile() {
+ default
+
+ if use doc; then
+ cd doc
+ doxygen doxygen.conf || die
+ fi
+}
+
+src_install() {
+ default
+
+ rm -f "${ED}"/usr/lib*/libcddb.la
+
+ use doc && dohtml doc/html/*
+}
diff --git a/media-libs/libcddb/metadata.xml b/media-libs/libcddb/metadata.xml
new file mode 100644
index 000000000000..9cbe1d82af9a
--- /dev/null
+++ b/media-libs/libcddb/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>sound</herd>
+ <upstream>
+ <remote-id type="sourceforge">libcddb</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libcdr/Manifest b/media-libs/libcdr/Manifest
new file mode 100644
index 000000000000..ff1bb4f1f9d4
--- /dev/null
+++ b/media-libs/libcdr/Manifest
@@ -0,0 +1,4 @@
+DIST libcdr-0.0.14.tar.xz 570728 SHA256 720b693ba5e777f099f41ecd40418a16674ab29d823f7d62a23be170781dd8a0 SHA512 08f5cdf6926f2305ffc24ca7f03709c4f6045ed6c3aad15bc524b8c8d6bf1b873bb8bf9acd39ca112f0f51ba5324f1cf6a72d2f04ec9139d6c61a58a337a92a8 WHIRLPOOL fad944466269e1b8794fa7a3bd4ab471c5b0ff8cf0122c9eeaf109f51ad7092334e326c7e60c0ef1a7ae670425e2a5edf70c742bca9fc8c52a042322e66e058d
+DIST libcdr-0.0.16.tar.xz 569644 SHA256 4c8a6586920f7b040ce51fa375eb87507291e0de4f568469db25f52915bc1135 SHA512 59b65b95806bce3c97c1a0762bb80ce0845e444a23b7b4683c74d6c0c9155664e7a7e558d787f6cfa69460f657e4d7416ae8e8947e426f04e369b42fc5da4838 WHIRLPOOL a0021dc4b8640fc2c192ead7b34a9c98536dcfcc2d13b65028768cb61a0ed96a163e8189a1b16751a62bdb7853d210fdfd9d3343870140eb6fe9cd95011c24af
+DIST libcdr-0.1.0.tar.xz 562240 SHA256 a9bd1faca049cf1e2285b27da213a499434591919227beb209b191ad1bb240e8 SHA512 823c98a7185d5dd31bac240d007056f36fb290085efa3392d75f4ed26a4703ffeb2b9be0d9a19417473fb44c4e3abad7242773f5455431040bcfffc8aa51d18e WHIRLPOOL a1dfe38eec531eb10c01416aa7b83ec70c9736cba24aa6d2e4cf3f7f0bf0e6260f38d746663537b97c2875af9f9c87fa755d695effdb58a87cf2f3ee9f24eeb5
+DIST libcdr-0.1.1.tar.xz 564668 SHA256 d0a6e0667e5a37fe059bcb81d5077fc2abffc7e7bac86fe302fbcf927d58df1f SHA512 a655b5390022fb5049d2f75fe836a693033943060d820942d59eb0a34548363ff183e0f32d22ec277d1f8b5c7ab89ab1fba933f17ef1239d14d053bd6a5cf624 WHIRLPOOL f7d5b6b1655f86ac3b843957e476ab17f2ef234bb5073678d182760cd6a370d24c98b14570474221d9f5ef9b24ffc76a5f4f82d596f466a7324dac95a04b9d77
diff --git a/media-libs/libcdr/libcdr-0.0.14.ebuild b/media-libs/libcdr/libcdr-0.0.14.ebuild
new file mode 100644
index 000000000000..20d2c39a0aa6
--- /dev/null
+++ b/media-libs/libcdr/libcdr-0.0.14.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI="git://anongit.freedesktop.org/git/libreoffice/libcdr/"
+inherit base eutils
+[[ ${PV} == 9999 ]] && inherit autotools git-2
+
+DESCRIPTION="Library parsing the Corel cdr documents"
+HOMEPAGE="http://www.freedesktop.org/wiki/Software/libcdr"
+[[ ${PV} == 9999 ]] || SRC_URI="http://dev-www.libreoffice.org/src/${P}.tar.xz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+[[ ${PV} == 9999 ]] || \
+KEYWORDS="amd64 ~arm ppc x86"
+
+IUSE="doc static-libs"
+
+RDEPEND="
+ app-text/libwpd:0.9
+ app-text/libwpg:0.2
+ dev-libs/icu:=
+ media-libs/lcms:2
+ sys-libs/zlib
+"
+DEPEND="${RDEPEND}
+ dev-libs/boost
+ sys-devel/libtool
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )
+"
+
+src_prepare() {
+ base_src_prepare
+ [[ -d m4 ]] || mkdir "m4"
+ [[ ${PV} == 9999 ]] && eautoreconf
+}
+
+src_configure() {
+ econf \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ $(use_enable static-libs static) \
+ --disable-werror \
+ $(use_with doc docs)
+}
+
+src_install() {
+ default
+ prune_libtool_files --all
+}
diff --git a/media-libs/libcdr/libcdr-0.0.16.ebuild b/media-libs/libcdr/libcdr-0.0.16.ebuild
new file mode 100644
index 000000000000..90dfe3b84087
--- /dev/null
+++ b/media-libs/libcdr/libcdr-0.0.16.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI="git://anongit.freedesktop.org/git/libreoffice/libcdr/"
+inherit base eutils
+[[ ${PV} == 9999 ]] && inherit autotools git-2
+
+DESCRIPTION="Library parsing the Corel cdr documents"
+HOMEPAGE="http://www.freedesktop.org/wiki/Software/libcdr"
+[[ ${PV} == 9999 ]] || SRC_URI="http://dev-www.libreoffice.org/src/${P}.tar.xz"
+
+LICENSE="MPL-2.0"
+SLOT="0"
+[[ ${PV} == 9999 ]] || \
+KEYWORDS="~amd64 ~arm ~ppc ~x86"
+IUSE="doc static-libs"
+
+RDEPEND="
+ app-text/libwpd:0.9
+ app-text/libwpg:0.2
+ dev-libs/icu:=
+ media-libs/lcms:2
+ sys-libs/zlib
+"
+DEPEND="${RDEPEND}
+ dev-libs/boost
+ sys-devel/libtool
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )
+"
+
+src_prepare() {
+ base_src_prepare
+ [[ -d m4 ]] || mkdir "m4"
+ [[ ${PV} == 9999 ]] && eautoreconf
+}
+
+src_configure() {
+ econf \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ $(use_enable static-libs static) \
+ --disable-werror \
+ $(use_with doc docs)
+}
+
+src_install() {
+ default
+ prune_libtool_files --all
+}
diff --git a/media-libs/libcdr/libcdr-0.1.0.ebuild b/media-libs/libcdr/libcdr-0.1.0.ebuild
new file mode 100644
index 000000000000..3484f9b3c89e
--- /dev/null
+++ b/media-libs/libcdr/libcdr-0.1.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
+
+EGIT_REPO_URI="git://anongit.freedesktop.org/git/libreoffice/libcdr/"
+inherit base eutils
+[[ ${PV} == 9999 ]] && inherit autotools git-2
+
+DESCRIPTION="Library parsing the Corel cdr documents"
+HOMEPAGE="https://wiki.documentfoundation.org/DLP/Libraries/libcdr"
+[[ ${PV} == 9999 ]] || SRC_URI="http://dev-www.libreoffice.org/src/${PN}/${P}.tar.xz"
+
+LICENSE="MPL-2.0"
+SLOT="0"
+[[ ${PV} == 9999 ]] || \
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="doc static-libs"
+
+RDEPEND="
+ dev-libs/icu:=
+ dev-libs/librevenge
+ media-libs/lcms:2
+ sys-libs/zlib
+"
+DEPEND="${RDEPEND}
+ dev-libs/boost
+ sys-devel/libtool
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )
+"
+
+src_prepare() {
+ base_src_prepare
+ [[ -d m4 ]] || mkdir "m4"
+ [[ ${PV} == 9999 ]] && eautoreconf
+}
+
+src_configure() {
+ econf \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ $(use_enable static-libs static) \
+ --disable-werror \
+ $(use_with doc docs)
+}
+
+src_install() {
+ default
+ prune_libtool_files --all
+}
diff --git a/media-libs/libcdr/libcdr-0.1.1.ebuild b/media-libs/libcdr/libcdr-0.1.1.ebuild
new file mode 100644
index 000000000000..099c70afc14f
--- /dev/null
+++ b/media-libs/libcdr/libcdr-0.1.1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI="git://anongit.freedesktop.org/git/libreoffice/libcdr/"
+inherit base eutils
+[[ ${PV} == 9999 ]] && inherit autotools git-2
+
+DESCRIPTION="Library parsing the Corel cdr documents"
+HOMEPAGE="https://wiki.documentfoundation.org/DLP/Libraries/libcdr"
+[[ ${PV} == 9999 ]] || SRC_URI="http://dev-www.libreoffice.org/src/${PN}/${P}.tar.xz"
+
+LICENSE="MPL-2.0"
+SLOT="0"
+[[ ${PV} == 9999 ]] || \
+KEYWORDS="amd64 ~arm ~hppa ~ppc64 x86"
+IUSE="doc static-libs"
+
+RDEPEND="
+ dev-libs/icu:=
+ dev-libs/librevenge
+ media-libs/lcms:2
+ sys-libs/zlib
+"
+DEPEND="${RDEPEND}
+ dev-libs/boost
+ sys-devel/libtool
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )
+"
+
+src_prepare() {
+ base_src_prepare
+ [[ -d m4 ]] || mkdir "m4"
+ [[ ${PV} == 9999 ]] && eautoreconf
+}
+
+src_configure() {
+ econf \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ $(use_enable static-libs static) \
+ --disable-werror \
+ $(use_with doc docs)
+}
+
+src_install() {
+ default
+ prune_libtool_files --all
+}
diff --git a/media-libs/libcdr/libcdr-9999.ebuild b/media-libs/libcdr/libcdr-9999.ebuild
new file mode 100644
index 000000000000..77db09ef2224
--- /dev/null
+++ b/media-libs/libcdr/libcdr-9999.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI="git://anongit.freedesktop.org/git/libreoffice/libcdr/"
+inherit base eutils
+[[ ${PV} == 9999 ]] && inherit autotools git-2
+
+DESCRIPTION="Library parsing the Corel cdr documents"
+HOMEPAGE="https://wiki.documentfoundation.org/DLP/Libraries/libcdr"
+[[ ${PV} == 9999 ]] || SRC_URI="http://dev-www.libreoffice.org/src/${PN}/${P}.tar.xz"
+
+LICENSE="MPL-2.0"
+SLOT="0"
+[[ ${PV} == 9999 ]] || \
+KEYWORDS="~amd64 ~arm ~ppc ~x86"
+IUSE="doc static-libs"
+
+RDEPEND="
+ dev-libs/icu:=
+ dev-libs/librevenge
+ media-libs/lcms:2
+ sys-libs/zlib
+"
+DEPEND="${RDEPEND}
+ dev-libs/boost
+ sys-devel/libtool
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )
+"
+
+src_prepare() {
+ base_src_prepare
+ [[ -d m4 ]] || mkdir "m4"
+ [[ ${PV} == 9999 ]] && eautoreconf
+}
+
+src_configure() {
+ econf \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ $(use_enable static-libs static) \
+ --disable-werror \
+ $(use_with doc docs)
+}
+
+src_install() {
+ default
+ prune_libtool_files --all
+}
diff --git a/media-libs/libcdr/metadata.xml b/media-libs/libcdr/metadata.xml
new file mode 100644
index 000000000000..5d46203011d6
--- /dev/null
+++ b/media-libs/libcdr/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>openoffice</herd>
+</pkgmetadata>
diff --git a/media-libs/libchamplain/Manifest b/media-libs/libchamplain/Manifest
new file mode 100644
index 000000000000..079b6acd5577
--- /dev/null
+++ b/media-libs/libchamplain/Manifest
@@ -0,0 +1,2 @@
+DIST libchamplain-0.12.10.tar.xz 597476 SHA256 bf53ceb2405d4e23a14596a53ecc2a821b003f8c69de4a7de3a39d6e99462b05 SHA512 e9ac75f3fb785c8c124a4ac3e0d3ea7a0c1b2115342a8f18c77cd912f7d0e3946dd9000459cb91cf7fe90c6e6459da038cee7a3726734fb8013d8beb5e778496 WHIRLPOOL 06232727d43ae8fcefaa140d7f752a564bbff8f584cd49da4599118dcd2d8179df024093f65afa879bed34242b691273be951efa28f341eaf5343b5f29c4613b
+DIST libchamplain-0.12.9.tar.xz 594280 SHA256 b25ce832334976c07bf9564bf7f31e628881c69cf871a256cf4530cb277917e3 SHA512 3aa67e7038667c4be3b2120baefb1526f10542af1b6727b70d9f63da6bc85fccf1e146a743c01193a045fbbda662e1da65fe5bc64ea2d776c5af793d54b32def WHIRLPOOL 33c58e34cb75260a4af6c6689b6f011bbd37204a03a508ff22517cfbf9a68d7933d1e94e5dad4ed071f9cf467cc60c9c44f3bb21fb304973872c4a03719d6ca4
diff --git a/media-libs/libchamplain/libchamplain-0.12.10-r1.ebuild b/media-libs/libchamplain/libchamplain-0.12.10-r1.ebuild
new file mode 100644
index 000000000000..9654680e9827
--- /dev/null
+++ b/media-libs/libchamplain/libchamplain-0.12.10-r1.ebuild
@@ -0,0 +1,67 @@
+# 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.14
+VALA_USE_DEPEND=vapigen
+
+inherit gnome2 vala
+
+DESCRIPTION="Clutter based world map renderer"
+HOMEPAGE="https://wiki.gnome.org/Projects/libchamplain"
+
+SLOT="0.12"
+LICENSE="LGPL-2"
+KEYWORDS="~alpha amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc x86"
+
+IUSE="debug +gtk +introspection vala"
+REQUIRED_USE="vala? ( introspection )"
+
+RDEPEND="
+ dev-db/sqlite:3
+ dev-libs/glib:2
+ >=media-libs/clutter-1.12:1.0[introspection?]
+ media-libs/cogl:=
+ >=net-libs/libsoup-2.34:2.4
+ x11-libs/cairo
+ gtk? (
+ x11-libs/gtk+:3[introspection?]
+ media-libs/clutter-gtk:1.0 )
+ introspection? ( dev-libs/gobject-introspection )
+"
+DEPEND="${RDEPEND}
+ dev-util/gtk-doc-am
+ virtual/pkgconfig
+ vala? ( $(vala_depend) )
+"
+# segfaults with vala:0.12
+# vala-0.14.2-r1 required for bug #402013
+
+src_prepare() {
+ # Fix documentation slotability
+ sed \
+ -e "s/^DOC_MODULE.*/DOC_MODULE = ${PN}-${SLOT}/" \
+ -i docs/reference/Makefile.{am,in} || die "sed (1) failed"
+ sed \
+ -e "s/^DOC_MODULE.*/DOC_MODULE = ${PN}-gtk-${SLOT}/" \
+ -i docs/reference-gtk/Makefile.{am,in} || die "sed (2) failed"
+ mv "${S}"/docs/reference/${PN}{,-${SLOT}}-docs.sgml || die "mv (1) failed"
+ mv "${S}"/docs/reference-gtk/${PN}-gtk{,-${SLOT}}-docs.sgml || die "mv (2) failed"
+
+ use vala && vala_src_prepare
+ gnome2_src_prepare
+}
+
+src_configure() {
+ # Vala demos are only built, so just disable them
+ gnome2_src_configure \
+ --disable-maemo \
+ --disable-memphis \
+ --disable-static \
+ --disable-vala-demos \
+ $(use_enable debug) \
+ $(use_enable gtk) \
+ $(use_enable introspection)
+}
diff --git a/media-libs/libchamplain/libchamplain-0.12.10.ebuild b/media-libs/libchamplain/libchamplain-0.12.10.ebuild
new file mode 100644
index 000000000000..6c92bf5f8884
--- /dev/null
+++ b/media-libs/libchamplain/libchamplain-0.12.10.ebuild
@@ -0,0 +1,68 @@
+# 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.14
+VALA_USE_DEPEND=vapigen
+
+inherit gnome2 vala
+
+DESCRIPTION="Clutter based world map renderer"
+HOMEPAGE="https://wiki.gnome.org/Projects/libchamplain"
+
+SLOT="0.12"
+LICENSE="LGPL-2"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+
+IUSE="debug +gtk +introspection vala"
+REQUIRED_USE="vala? ( introspection )"
+
+RDEPEND="
+ dev-db/sqlite:3
+ dev-libs/glib:2
+ >=media-libs/clutter-1.12:1.0[introspection?]
+ media-libs/memphis:0.2[introspection?]
+ media-libs/cogl:=
+ >=net-libs/libsoup-2.34:2.4
+ x11-libs/cairo
+ gtk? (
+ x11-libs/gtk+:3[introspection?]
+ media-libs/clutter-gtk:1.0 )
+ introspection? ( dev-libs/gobject-introspection )
+"
+DEPEND="${RDEPEND}
+ dev-util/gtk-doc-am
+ virtual/pkgconfig
+ vala? ( $(vala_depend) )
+"
+# segfaults with vala:0.12
+# vala-0.14.2-r1 required for bug #402013
+
+src_prepare() {
+ # Fix documentation slotability
+ sed \
+ -e "s/^DOC_MODULE.*/DOC_MODULE = ${PN}-${SLOT}/" \
+ -i docs/reference/Makefile.{am,in} || die "sed (1) failed"
+ sed \
+ -e "s/^DOC_MODULE.*/DOC_MODULE = ${PN}-gtk-${SLOT}/" \
+ -i docs/reference-gtk/Makefile.{am,in} || die "sed (2) failed"
+ mv "${S}"/docs/reference/${PN}{,-${SLOT}}-docs.sgml || die "mv (1) failed"
+ mv "${S}"/docs/reference-gtk/${PN}-gtk{,-${SLOT}}-docs.sgml || die "mv (2) failed"
+
+ use vala && vala_src_prepare
+ gnome2_src_prepare
+}
+
+src_configure() {
+ # Vala demos are only built, so just disable them
+ gnome2_src_configure \
+ --disable-static \
+ --disable-maemo \
+ --disable-vala-demos \
+ --enable-memphis \
+ $(use_enable debug) \
+ $(use_enable gtk) \
+ $(use_enable introspection)
+}
diff --git a/media-libs/libchamplain/libchamplain-0.12.9.ebuild b/media-libs/libchamplain/libchamplain-0.12.9.ebuild
new file mode 100644
index 000000000000..49a6d208d5f3
--- /dev/null
+++ b/media-libs/libchamplain/libchamplain-0.12.9.ebuild
@@ -0,0 +1,68 @@
+# 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.14
+VALA_USE_DEPEND=vapigen
+
+inherit gnome2 vala
+
+DESCRIPTION="Clutter based world map renderer"
+HOMEPAGE="https://wiki.gnome.org/Projects/libchamplain"
+
+SLOT="0.12"
+LICENSE="LGPL-2"
+KEYWORDS="~alpha amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc x86"
+IUSE="debug +gtk +introspection vala"
+
+REQUIRED_USE="vala? ( introspection )"
+
+RDEPEND="
+ dev-db/sqlite:3
+ dev-libs/glib:2
+ >=media-libs/clutter-1.12:1.0[introspection?]
+ media-libs/memphis:0.2[introspection?]
+ media-libs/cogl:=
+ >=net-libs/libsoup-2.34:2.4
+ x11-libs/cairo
+ gtk? (
+ x11-libs/gtk+:3[introspection?]
+ media-libs/clutter-gtk:1.0 )
+ introspection? ( dev-libs/gobject-introspection )
+"
+DEPEND="${RDEPEND}
+ dev-util/gtk-doc-am
+ virtual/pkgconfig
+ vala? ( $(vala_depend) )
+"
+# segfaults with vala:0.12
+# vala-0.14.2-r1 required for bug #402013
+
+src_prepare() {
+ # Fix documentation slotability
+ sed \
+ -e "s/^DOC_MODULE.*/DOC_MODULE = ${PN}-${SLOT}/" \
+ -i docs/reference/Makefile.{am,in} || die "sed (1) failed"
+ sed \
+ -e "s/^DOC_MODULE.*/DOC_MODULE = ${PN}-gtk-${SLOT}/" \
+ -i docs/reference-gtk/Makefile.{am,in} || die "sed (2) failed"
+ mv "${S}"/docs/reference/${PN}{,-${SLOT}}-docs.sgml || die "mv (1) failed"
+ mv "${S}"/docs/reference-gtk/${PN}-gtk{,-${SLOT}}-docs.sgml || die "mv (2) failed"
+
+ use vala && vala_src_prepare
+ gnome2_src_prepare
+}
+
+src_configure() {
+ # Vala demos are only built, so just disable them
+ gnome2_src_configure \
+ --disable-static \
+ --disable-maemo \
+ --disable-vala-demos \
+ --enable-memphis \
+ $(use_enable debug) \
+ $(use_enable gtk) \
+ $(use_enable introspection)
+}
diff --git a/media-libs/libchamplain/metadata.xml b/media-libs/libchamplain/metadata.xml
new file mode 100644
index 000000000000..0cf683cda8fe
--- /dev/null
+++ b/media-libs/libchamplain/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>gnome</herd>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/media-libs/libclalsadrv/Manifest b/media-libs/libclalsadrv/Manifest
new file mode 100644
index 000000000000..905e1382618b
--- /dev/null
+++ b/media-libs/libclalsadrv/Manifest
@@ -0,0 +1,2 @@
+DIST clalsadrv-1.2.2.tar.bz2 12593 SHA256 0fed89dd092936b5ffa74ad7df77a72b8cbeec8cea226ff48e107e326bd36f50
+DIST clalsadrv-2.0.0.tar.bz2 14373 SHA256 7886b60ea79ad16f2353bb5165404ffac8287ec56704f2d07cc5804447674a2f
diff --git a/media-libs/libclalsadrv/files/libclalsadrv-1.2.2-makefile.patch b/media-libs/libclalsadrv/files/libclalsadrv-1.2.2-makefile.patch
new file mode 100644
index 000000000000..dd7845f6c52e
--- /dev/null
+++ b/media-libs/libclalsadrv/files/libclalsadrv-1.2.2-makefile.patch
@@ -0,0 +1,30 @@
+Index: clalsadrv/Makefile
+===================================================================
+--- clalsadrv.orig/Makefile
++++ clalsadrv/Makefile
+@@ -28,7 +28,7 @@ VERSION = $(MAJVERS).$(MINVERS)
+ DISTDIR = clalsadrv-$(VERSION)
+
+
+-CPPFLAGS += -Wall -I. -fpic -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -O2
++CPPFLAGS += -Wall -I. -fpic -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS
+ LDLFAGS +=
+ LDLIBS += -lclalsadrv -lclthreads -lrt
+
+@@ -42,14 +42,14 @@ CLALSADRV_H = clalsadrv.h
+
+
+ $(CLALSADRV_MIN): $(CLALSADRV_O)
+- g++ -shared $(LDFLAGS) -Wl,-soname,$(CLALSADRV_MAJ) -o $(CLALSADRV_MIN) $(CLALSADRV_O) $(CLALSADRV_DEP)
++ $(CXX) -shared $(LDFLAGS) -Wl,-soname,$(CLALSADRV_MAJ) -o $(CLALSADRV_MIN) $(CLALSADRV_O) $(CLALSADRV_DEP)
+
+
+ install: $(CLALSADRV_MIN)
+ /usr/bin/install -d $(PREFIX)/$(LIBDIR)
++ /usr/bin/install -d $(PREFIX)/include
+ /usr/bin/install -m 644 $(CLALSADRV_H) $(PREFIX)/include
+ /usr/bin/install -m 755 $(CLALSADRV_MIN) $(PREFIX)/$(LIBDIR)
+- /sbin/ldconfig -n $(PREFIX)/$(LIBDIR)
+ ln -sf $(CLALSADRV_MIN) $(PREFIX)/$(LIBDIR)/$(CLALSADRV_SO)
+
+
diff --git a/media-libs/libclalsadrv/files/libclalsadrv-2.0.0-makefile.patch b/media-libs/libclalsadrv/files/libclalsadrv-2.0.0-makefile.patch
new file mode 100644
index 000000000000..a90d64b6953d
--- /dev/null
+++ b/media-libs/libclalsadrv/files/libclalsadrv-2.0.0-makefile.patch
@@ -0,0 +1,28 @@
+--- libs/Makefile
++++ libs/Makefile
+@@ -27,7 +27,7 @@
+ VERSION = $(MAJVERS).$(MINVERS)
+
+
+-CPPFLAGS += -Wall -I. -fPIC -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -O2
++CPPFLAGS += -Wall -I. -fPIC -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS
+ LDLFAGS +=
+ LDLIBS += -lclalsadrv -lclthreads -lrt
+
+@@ -41,14 +41,14 @@
+
+
+ $(CLALSADRV_MIN): $(CLALSADRV_O)
+- g++ -shared $(LDFLAGS) -Wl,-soname,$(CLALSADRV_MAJ) -o $(CLALSADRV_MIN) $(CLALSADRV_O) $(CLALSADRV_DEP)
++ $(CXX) -shared $(LDFLAGS) -Wl,-soname,$(CLALSADRV_MAJ) -o $(CLALSADRV_MIN) $(CLALSADRV_O) $(CLALSADRV_DEP)
+
+
+ install: $(CLALSADRV_MIN)
+ install -Dm 644 $(CLALSADRV_H) $(DESTDIR)$(PREFIX)/include/$(CLALSADRV_H)
+ install -Dm 755 $(CLALSADRV_MIN) $(DESTDIR)$(PREFIX)/$(LIBDIR)/$(CLALSADRV_MIN)
+- /sbin/ldconfig $(PREFIX)/$(LIBDIR)
+ ln -sf $(CLALSADRV_MIN) $(DESTDIR)$(PREFIX)/$(LIBDIR)/$(CLALSADRV_SO)
++ ln -sf $(CLALSADRV_MIN) $(DESTDIR)$(PREFIX)/$(LIBDIR)/$(CLALSADRV_MAJ)
+
+ clean:
+ /bin/rm -f *~ *.o *.a *.d *.so.*
diff --git a/media-libs/libclalsadrv/libclalsadrv-1.2.2.ebuild b/media-libs/libclalsadrv/libclalsadrv-1.2.2.ebuild
new file mode 100644
index 000000000000..2a187536cb9e
--- /dev/null
+++ b/media-libs/libclalsadrv/libclalsadrv-1.2.2.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils multilib toolchain-funcs
+
+MY_P="${P/lib/}"
+
+S="${WORKDIR}/${PN/lib/}"
+
+DESCRIPTION="An audio library by Fons Adriaensen <fons.adriaensen@skynet.be>"
+HOMEPAGE="http://www.kokkinizita.net/linuxaudio/"
+SRC_URI="http://www.kokkinizita.net/linuxaudio/downloads/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~sparc x86"
+IUSE=""
+
+DEPEND="media-libs/alsa-lib"
+
+src_unpack() {
+ unpack ${A} || die
+ cd "${S}"
+ epatch "${FILESDIR}/${P}-makefile.patch"
+}
+
+src_compile() {
+ tc-export CC CXX
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake LIBDIR="$(get_libdir)" PREFIX="${D}/usr" install || die "make install failed"
+ dodoc AUTHORS
+}
diff --git a/media-libs/libclalsadrv/libclalsadrv-2.0.0.ebuild b/media-libs/libclalsadrv/libclalsadrv-2.0.0.ebuild
new file mode 100644
index 000000000000..8b247f5363e4
--- /dev/null
+++ b/media-libs/libclalsadrv/libclalsadrv-2.0.0.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils multilib toolchain-funcs
+
+MY_P=${P/lib}
+
+DESCRIPTION="ALSA driver C++ access library"
+HOMEPAGE="http://packages.debian.org/libclalsadrv"
+SRC_URI="mirror://gentoo/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE=""
+
+RDEPEND="media-libs/alsa-lib"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${P/lib}/libs
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-makefile.patch
+}
+
+src_compile() {
+ tc-export CXX
+ emake
+}
+
+src_install() {
+ emake LIBDIR="$(get_libdir)" PREFIX="${D}/usr" install
+ dodoc ../AUTHORS
+}
diff --git a/media-libs/libclalsadrv/metadata.xml b/media-libs/libclalsadrv/metadata.xml
new file mode 100644
index 000000000000..e1774e3d9ad7
--- /dev/null
+++ b/media-libs/libclalsadrv/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>sound</herd>
+</pkgmetadata>
diff --git a/media-libs/libclastfm/Manifest b/media-libs/libclastfm/Manifest
new file mode 100644
index 000000000000..11f93b99c462
--- /dev/null
+++ b/media-libs/libclastfm/Manifest
@@ -0,0 +1 @@
+DIST libclastfm-0.5.tar.gz 346754 SHA256 c9aa7817b557f8d8ef834755740fc813f9351f3185b5bdf4de249bee3675ee42
diff --git a/media-libs/libclastfm/libclastfm-0.5.ebuild b/media-libs/libclastfm/libclastfm-0.5.ebuild
new file mode 100644
index 000000000000..58120117acf5
--- /dev/null
+++ b/media-libs/libclastfm/libclastfm-0.5.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="C API library to the last.fm web service (unofficial)"
+HOMEPAGE="http://liblastfm.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN/c}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="static-libs"
+
+RDEPEND="net-misc/curl"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS="AUTHORS README"
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ rm -f "${ED}"/usr/lib*/*.la
+}
diff --git a/media-libs/libclastfm/metadata.xml b/media-libs/libclastfm/metadata.xml
new file mode 100644
index 000000000000..48da25009c3f
--- /dev/null
+++ b/media-libs/libclastfm/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>sound</herd>
+ <upstream>
+ <remote-id type="sourceforge">liblastfm</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libclthreads/Manifest b/media-libs/libclthreads/Manifest
new file mode 100644
index 000000000000..e736f98e3a85
--- /dev/null
+++ b/media-libs/libclthreads/Manifest
@@ -0,0 +1,3 @@
+DIST clthreads-1.0.2.tar.bz2 5681 SHA256 df63dc5999e8522c60d2f915df7a84db9030d27dbfa2433b16e8ff0e7a2e6a37
+DIST clthreads-2.2.1.tar.bz2 5968 SHA256 dc29cff17bb4909a11646dc43fa6bebd90c0c64956d924b360ff46896313725e
+DIST clthreads-2.4.0.tar.bz2 14796 SHA256 a69fd566af24b85a10c5ecd957a85b7f5eb1c56995d2b999219b52f353ea1de9 SHA512 c307d9611e0530469b36367f05721e6676d7bb186be97d38b851e66d9f670663ceceedf065823b27ac5864725d52cc2f462fd8d96f1398a202e30d82910ec58b WHIRLPOOL a2ee34fff689569b47208c30dfcb60e52da3e2c7186e4e22cccf218768cf7a2476f2ff48c610c57bb28c29fafb33f7745e8b58c379f6bc02ff75141d870ad52c
diff --git a/media-libs/libclthreads/files/libclthreads-1.0.2-makefile.patch b/media-libs/libclthreads/files/libclthreads-1.0.2-makefile.patch
new file mode 100644
index 000000000000..f4604f34b300
--- /dev/null
+++ b/media-libs/libclthreads/files/libclthreads-1.0.2-makefile.patch
@@ -0,0 +1,23 @@
+Index: clthreads-1.0.2/Makefile
+===================================================================
+--- clthreads-1.0.2.orig/Makefile
++++ clthreads-1.0.2/Makefile
+@@ -16,14 +16,13 @@ CLTHREADS_H = clthreads.h
+
+
+ $(CLTHREADS_MIN): $(CLTHREADS_O)
+- g++ -shared $(LDFLAGS) -Wl,-soname,$(CLTHREADS_MAJ) -o $(CLTHREADS_MIN) $(CLTHREADS_O) $(CLTHREADS_DEP)
++ $(CXX) -shared $(LDFLAGS) -Wl,-soname,$(CLTHREADS_MAJ) -o $(CLTHREADS_MIN) $(CLTHREADS_O) $(CLTHREADS_DEP)
+
+
+ install: $(CLTHREADS_MIN)
+- cp -f $(CLTHREADS_H) $(CLTHREADS_INCDIR)
+- cp -f $(CLTHREADS_MIN) $(CLTHREADS_LIBDIR)
+- /sbin/ldconfig -n $(CLTHREADS_LIBDIR)
+- ln -sf $(CLTHREADS_MIN) $(CLTHREADS_LIBDIR)/$(CLTHREADS_SO)
++ install -D $(CLTHREADS_H) $(DESTDIR)$(CLTHREADS_INCDIR)/$(CLTHREADS_H)
++ install -D $(CLTHREADS_MIN) $(DESTDIR)$(CLTHREADS_LIBDIR)/$(CLTHREADS_MIN)
++ ln -sf $(CLTHREADS_MIN) $(DESTDIR)$(CLTHREADS_LIBDIR)/$(CLTHREADS_SO)
+
+
+ clean:
diff --git a/media-libs/libclthreads/files/libclthreads-2.2.1-Makefile.patch b/media-libs/libclthreads/files/libclthreads-2.2.1-Makefile.patch
new file mode 100644
index 000000000000..6303edaeab9a
--- /dev/null
+++ b/media-libs/libclthreads/files/libclthreads-2.2.1-Makefile.patch
@@ -0,0 +1,39 @@
+--- Makefile.orig 2006-11-23 10:01:20.000000000 -0800
++++ Makefile 2007-01-05 06:15:50.000000000 -0800
+@@ -28,7 +28,7 @@
+ DISTDIR = clthreads-$(VERSION)
+
+
+-CPPFLAGS += -Wall -I. -fpic -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -O2
++CPPFLAGS += -Wall -I. -fpic -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS
+ LDLFAGS +=
+ LDLIBS +=
+
+@@ -36,22 +36,19 @@
+ CLTHREADS_SO = libclthreads.so
+ CLTHREADS_MAJ = $(CLTHREADS_SO).$(MAJVERS)
+ CLTHREADS_MIN = $(CLTHREADS_MAJ).$(MINVERS)
+-CLTHREADS_DEP = -lpthread
++CLTHREADS_DEP = -lpthread -lrt
+ CLTHREADS_O = p_thread.o a_thread.o itc_mesg.o itc_ip1q.o itc_ctrl.o textmsg.o
+ CLTHREADS_H = clthreads.h
+
+
+ $(CLTHREADS_MIN): $(CLTHREADS_O)
+- g++ -shared $(LDFLAGS) -Wl,-soname,$(CLTHREADS_MAJ) -o $(CLTHREADS_MIN) $(CLTHREADS_O) $(CLTHREADS_DEP)
++ $(CXX) -shared $(LDFLAGS) -Wl,-soname,$(CLTHREADS_MAJ) -o $(CLTHREADS_MIN) $(CLTHREADS_O) $(CLTHREADS_DEP)
+
+
+ install: $(CLTHREADS_MIN)
+- /usr/bin/install -d $(PREFIX)/$(LIBDIR)
+- /usr/bin/install -m 644 $(CLTHREADS_H) $(PREFIX)/include
+- /usr/bin/install -m 755 $(CLTHREADS_MIN) $(PREFIX)/$(LIBDIR)
+- /sbin/ldconfig -n $(PREFIX)/$(LIBDIR)
+- ln -sf $(CLTHREADS_MIN) $(PREFIX)/$(LIBDIR)/$(CLTHREADS_SO)
+-
++ /usr/bin/install -D $(CLTHREADS_H) $(DESTDIR)usr/include/$(CLTHREADS_H)
++ /usr/bin/install -D $(CLTHREADS_MIN) $(DESTDIR)$(CLTHREADS_LIBDIR)/$(CLTHREADS_MIN)
++ ln -sf $(CLTHREADS_MIN) $(DESTDIR)$(CLTHREADS_LIBDIR)/$(CLTHREADS_SO)
+
+ clean:
+ /bin/rm -f *~ *.o *.a *.d *.so.*
diff --git a/media-libs/libclthreads/files/libclthreads-2.4.0-Makefile.patch b/media-libs/libclthreads/files/libclthreads-2.4.0-Makefile.patch
new file mode 100644
index 000000000000..c20ba176d765
--- /dev/null
+++ b/media-libs/libclthreads/files/libclthreads-2.4.0-Makefile.patch
@@ -0,0 +1,42 @@
+Index: Makefile
+===================================================================
+--- Makefile.orig
++++ Makefile
+@@ -28,7 +28,7 @@ VERSION = $(MAJVERS).$(MINVERS)
+ DISTDIR = clthreads-$(VERSION)
+
+
+-CPPFLAGS += -Wall -I. -fpic -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -O2
++CPPFLAGS += -Wall -I. -fpic -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS
+ LDLFAGS +=
+ LDLIBS +=
+
+@@ -36,22 +36,20 @@ LDLIBS +=
+ CLTHREADS_SO = libclthreads.so
+ CLTHREADS_MAJ = $(CLTHREADS_SO).$(MAJVERS)
+ CLTHREADS_MIN = $(CLTHREADS_MAJ).$(MINVERS)
+-CLTHREADS_DEP = -lpthread
++CLTHREADS_DEP = -lpthread -lrt
+ CLTHREADS_O = p_thread.o a_thread.o itc_mesg.o itc_ip1q.o itc_ctrl.o textmsg.o
+ CLTHREADS_H = clthreads.h
+
+
+ $(CLTHREADS_MIN): $(CLTHREADS_O)
+- g++ -shared $(LDFLAGS) -Wl,-soname,$(CLTHREADS_MAJ) -o $(CLTHREADS_MIN) $(CLTHREADS_O) $(CLTHREADS_DEP)
++ $(CXX) -shared $(LDFLAGS) -Wl,-soname,$(CLTHREADS_MAJ) -o $(CLTHREADS_MIN) $(CLTHREADS_O) $(CLTHREADS_DEP)
+
+
+ install: $(CLTHREADS_MIN)
+- /usr/bin/install -d $(PREFIX)/$(LIBDIR)
+- /usr/bin/install -m 644 $(CLTHREADS_H) $(PREFIX)/include
+- /usr/bin/install -m 755 $(CLTHREADS_MIN) $(PREFIX)/$(LIBDIR)
+- /sbin/ldconfig -n $(PREFIX)/$(LIBDIR)
+- ln -sf $(CLTHREADS_MIN) $(PREFIX)/$(LIBDIR)/$(CLTHREADS_SO)
+-
++ /usr/bin/install -D $(CLTHREADS_H) $(DESTDIR)usr/include/$(CLTHREADS_H)
++ /usr/bin/install -D $(CLTHREADS_MIN) $(DESTDIR)$(CLTHREADS_LIBDIR)/$(CLTHREADS_MIN)
++ ln -sf $(CLTHREADS_MIN) $(DESTDIR)$(CLTHREADS_LIBDIR)/$(CLTHREADS_MAJ)
++ ln -sf $(CLTHREADS_MAJ) $(DESTDIR)$(CLTHREADS_LIBDIR)/$(CLTHREADS_SO)
+
+ clean:
+ /bin/rm -f *~ *.o *.a *.d *.so.*
diff --git a/media-libs/libclthreads/libclthreads-1.0.2.ebuild b/media-libs/libclthreads/libclthreads-1.0.2.ebuild
new file mode 100644
index 000000000000..cd827f12635d
--- /dev/null
+++ b/media-libs/libclthreads/libclthreads-1.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=2
+inherit eutils multilib toolchain-funcs
+
+MY_P=clthreads-${PV}
+
+DESCRIPTION="An audio library by Fons Adriaensen <fons.adriaensen@skynet.be>"
+HOMEPAGE="http://kokkinizita.linuxaudio.org/linuxaudio/index.html"
+SRC_URI="http://kokkinizita.linuxaudio.org/linuxaudio/downloads/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc sparc x86"
+IUSE=""
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-makefile.patch
+}
+
+src_compile() {
+ tc-export CC CXX
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake CLTHREADS_LIBDIR="/usr/$(get_libdir)" DESTDIR="${D}" install || die "emake install failed"
+}
diff --git a/media-libs/libclthreads/libclthreads-2.2.1.ebuild b/media-libs/libclthreads/libclthreads-2.2.1.ebuild
new file mode 100644
index 000000000000..79230e3e9fd2
--- /dev/null
+++ b/media-libs/libclthreads/libclthreads-2.2.1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils multilib toolchain-funcs
+
+MY_P="${P/lib/}"
+
+S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="An audio library by Fons Adriaensen <fons.adriaensen@skynet.be>"
+HOMEPAGE="http://kokkinizita.linuxaudio.org/linuxaudio/index.html"
+SRC_URI="http://kokkinizita.linuxaudio.org/linuxaudio/downloads/${MY_P}.tar.bz2"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~sparc x86"
+IUSE=""
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/${P}-Makefile.patch"
+}
+
+src_compile() {
+ tc-export CC CXX
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake CLTHREADS_LIBDIR="/usr/$(get_libdir)" DESTDIR="${D}" install || die "make install failed"
+ dodoc AUTHORS
+}
diff --git a/media-libs/libclthreads/libclthreads-2.4.0-r1.ebuild b/media-libs/libclthreads/libclthreads-2.4.0-r1.ebuild
new file mode 100644
index 000000000000..6ea469fd6d7f
--- /dev/null
+++ b/media-libs/libclthreads/libclthreads-2.4.0-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
+
+inherit eutils multilib toolchain-funcs
+
+MY_P="${P/lib/}"
+
+S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="An audio library by Fons Adriaensen <fons.adriaensen@skynet.be>"
+HOMEPAGE="http://kokkinizita.linuxaudio.org/linuxaudio/index.html"
+SRC_URI="http://kokkinizita.linuxaudio.org/linuxaudio/downloads/${MY_P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE=""
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-2.4.0-Makefile.patch"
+}
+
+src_compile() {
+ tc-export CC CXX
+ emake
+}
+
+src_install() {
+ emake CLTHREADS_LIBDIR="/usr/$(get_libdir)" DESTDIR="${ED}" install || die "make install failed"
+ dodoc AUTHORS
+}
diff --git a/media-libs/libclthreads/libclthreads-2.4.0.ebuild b/media-libs/libclthreads/libclthreads-2.4.0.ebuild
new file mode 100644
index 000000000000..7f26c9a12757
--- /dev/null
+++ b/media-libs/libclthreads/libclthreads-2.4.0.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils multilib toolchain-funcs
+
+MY_P="${P/lib/}"
+
+S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="An audio library by Fons Adriaensen <fons.adriaensen@skynet.be>"
+HOMEPAGE="http://kokkinizita.linuxaudio.org/linuxaudio/index.html"
+SRC_URI="http://kokkinizita.linuxaudio.org/linuxaudio/downloads/${MY_P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE=""
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/${PN}-2.2.1-Makefile.patch"
+}
+
+src_compile() {
+ tc-export CC CXX
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake CLTHREADS_LIBDIR="/usr/$(get_libdir)" DESTDIR="${D}" install || die "make install failed"
+ dodoc AUTHORS
+}
diff --git a/media-libs/libclthreads/metadata.xml b/media-libs/libclthreads/metadata.xml
new file mode 100644
index 000000000000..e1774e3d9ad7
--- /dev/null
+++ b/media-libs/libclthreads/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>sound</herd>
+</pkgmetadata>
diff --git a/media-libs/libclxclient/Manifest b/media-libs/libclxclient/Manifest
new file mode 100644
index 000000000000..2e7e2fe72391
--- /dev/null
+++ b/media-libs/libclxclient/Manifest
@@ -0,0 +1,4 @@
+DIST clxclient-1.0.1.tar.bz2 16499 SHA256 770c6bb8ab2b16f4097147367dd1ea920638de5bcc12ca9a633610b943b9009a
+DIST clxclient-3.3.2.tar.bz2 20835 SHA256 011c0854c5db262d7cc5aa79a3422f0d55e352725d1e801a589b3d06ed432f07
+DIST clxclient-3.6.1.tar.bz2 30089 SHA256 9de3e621d7acabb161b5926565a9c9373fedbc632222018f692346790149545d SHA512 9f4592d8fa11b6dd0e27af73ca140591d0f8b2672e127e44e5dc58ced5eea9d6956c12990f84f7d6706cdbbf641f0611605c410ea8daa7ff565178c01298166e WHIRLPOOL 72383f40f6b00f65e27231134be056f6a6aa99382f6a33c449127b6dbe2c40a8251ca78b5adbf70fa08fb944196e63a986abcd7647a761ff67327799c102f839
+DIST clxclient-3.9.0.tar.bz2 30272 SHA256 80da572961ff0c635889986ae9b42c97a4aede2d966095aba7f4119360ee8792 SHA512 4bbd621ceeebf3dfc36f0a3d02c63ba1c0e818e691e5c9681e737710824f53a58c682fb2475a7a2bba4f2dfd520166b782977320ceb73de39448cf512e26c842 WHIRLPOOL 0fce9f7e96870cd73db3fa158b5cc9135980ebcfb15c5e6fb55d2850a88876ab25f4b5d2a75e49de4371adae0dc80a669fa14113edaf9a84e089974f04ecf0d9
diff --git a/media-libs/libclxclient/files/libclxclient-1.0.1-gcc41.patch b/media-libs/libclxclient/files/libclxclient-1.0.1-gcc41.patch
new file mode 100644
index 000000000000..12f4d5df4565
--- /dev/null
+++ b/media-libs/libclxclient/files/libclxclient-1.0.1-gcc41.patch
@@ -0,0 +1,31 @@
+Index: clxclient-1.0.1/clxclient.h
+===================================================================
+--- clxclient-1.0.1.orig/clxclient.h
++++ clxclient-1.0.1/clxclient.h
+@@ -75,7 +75,7 @@ class X_hints
+ {
+ public:
+
+- X_hints::X_hints (void) { _sh.flags = 0; _mh.flags = 0; _ch.res_name = 0; _ch.res_class = 0; }
++ X_hints (void) { _sh.flags = 0; _mh.flags = 0; _ch.res_name = 0; _ch.res_class = 0; }
+
+ void position (int x, int y);
+ void minsize (int x, int y);
+@@ -187,7 +187,7 @@ public:
+ X_resman (const X_resman&);
+ X_resman& operator=(const X_resman&);
+
+- void X_resman::init (int *argc, char *argv [], char *name,
++ void init (int *argc, char *argv [], char *name,
+ XrmOptionDescRec *opt, int nopt);
+
+ const char *get (const char *res, const char *def) const;
+@@ -205,7 +205,7 @@ private:
+ char *_home;
+ XrmDatabase _xrmdata;
+
+- static XrmOptionDescRec X_resman::defopt [X_resman::NDEFOPT];
++ static XrmOptionDescRec defopt [X_resman::NDEFOPT];
+ };
+
+
diff --git a/media-libs/libclxclient/files/libclxclient-1.0.1-makefile.patch b/media-libs/libclxclient/files/libclxclient-1.0.1-makefile.patch
new file mode 100644
index 000000000000..c254e5f1e05f
--- /dev/null
+++ b/media-libs/libclxclient/files/libclxclient-1.0.1-makefile.patch
@@ -0,0 +1,30 @@
+Index: clxclient-1.0.1/Makefile
+===================================================================
+--- clxclient-1.0.1.orig/Makefile
++++ clxclient-1.0.1/Makefile
+@@ -1,5 +1,5 @@
+ CPPFLAGS += -I. -fpic -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -O2
+-LDFLAGS += -L/usr/X11R6/lib
++LDFLAGS +=
+ LDLIBS +=
+
+
+@@ -17,14 +17,13 @@ CLXCLIENT_H = clxclient.h
+
+
+ $(CLXCLIENT_MIN): $(CLXCLIENT_O)
+- g++ -shared $(LDFLAGS) -Wl,-soname,$(CLXCLIENT_MAJ) -o $(CLXCLIENT_MIN) $(CLXCLIENT_O) $(CLXCLIENT_DEP)
++ $(CXX) -shared $(LDFLAGS) -Wl,-soname,$(CLXCLIENT_MAJ) -o $(CLXCLIENT_MIN) $(CLXCLIENT_O) $(CLXCLIENT_DEP)
+
+
+ install: $(CLXCLIENT_MIN)
+- cp -f $(CLXCLIENT_H) $(CLXCLIENT_INCDIR)
+- cp -f $(CLXCLIENT_MIN) $(CLXCLIENT_LIBDIR)
+- /sbin/ldconfig -n $(CLXCLIENT_LIBDIR)
+- ln -sf $(CLXCLIENT_MIN) $(CLXCLIENT_LIBDIR)/$(CLXCLIENT_SO)
++ install -D $(CLXCLIENT_H) $(DESTDIR)$(CLXCLIENT_INCDIR)/$(CLXCLIENT_H)
++ install -D $(CLXCLIENT_MIN) $(DESTDIR)$(CLXCLIENT_LIBDIR)/$(CLXCLIENT_MIN)
++ ln -sf $(CLXCLIENT_MIN) $(DESTDIR)$(CLXCLIENT_LIBDIR)/$(CLXCLIENT_SO)
+
+
+ clean:
diff --git a/media-libs/libclxclient/files/libclxclient-3.3.2-Makefile.patch b/media-libs/libclxclient/files/libclxclient-3.3.2-Makefile.patch
new file mode 100644
index 000000000000..59e55f38a493
--- /dev/null
+++ b/media-libs/libclxclient/files/libclxclient-3.3.2-Makefile.patch
@@ -0,0 +1,32 @@
+--- Makefile.orig 2007-01-05 05:21:48.000000000 -0800
++++ Makefile 2007-01-05 05:26:44.000000000 -0800
+@@ -28,8 +28,7 @@
+ DISTDIR = clxclient-$(VERSION)
+
+
+-CPPFLAGS += -Wall -I. -I/usr/X11R6/include -I/usr/include/freetype2 -fpic -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -O2
+-LDFLAGS += -L$(PREFIX)/$(LIBDIR) -L/usr/X11R6/$(LIBDIR)
++CPPFLAGS += -Wall -I. -I/usr/X11R6/include -I/usr/include/freetype2 -fpic -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS
+ LDLIBS +=
+
+
+@@ -43,15 +42,13 @@
+
+
+ $(CLXCLIENT_MIN): $(CLXCLIENT_O)
+- g++ -shared $(LDFLAGS) -Wl,-soname,$(CLXCLIENT_MAJ) -o $(CLXCLIENT_MIN) $(CLXCLIENT_O) $(CLXCLIENT_DEP)
++ $(CXX) -shared $(LDFLAGS) -Wl,-soname,$(CLXCLIENT_MAJ) -o $(CLXCLIENT_MIN) $(CLXCLIENT_O) $(CLXCLIENT_DEP)
+
+
+ install: $(CLXCLIENT_MIN)
+- /usr/bin/install -d $(PREFIX)/$(LIBDIR)
+- /usr/bin/install -m 644 $(CLXCLIENT_H) $(PREFIX)/include
+- /usr/bin/install -m 755 $(CLXCLIENT_MIN) $(PREFIX)/$(LIBDIR)
+- /sbin/ldconfig -n $(PREFIX)/$(LIBDIR)
+- ln -sf $(CLXCLIENT_MIN) $(PREFIX)/$(LIBDIR)/$(CLXCLIENT_SO)
++ /usr/bin/install -D $(CLXCLIENT_H) $(DESTDIR)usr/include/$(CLXCLIENT_H)
++ /usr/bin/install -D $(CLXCLIENT_MIN) $(DESTDIR)$(CLXCLIENT_LIBDIR)/$(CLXCLIENT_MIN)
++ ln -sf $(CLXCLIENT_MIN) $(DESTDIR)$(CLXCLIENT_LIBDIR)/$(CLXCLIENT_SO)
+
+
+ clean:
diff --git a/media-libs/libclxclient/files/libclxclient-3.6.1-Makefile.patch b/media-libs/libclxclient/files/libclxclient-3.6.1-Makefile.patch
new file mode 100644
index 000000000000..d8e1bac8e47a
--- /dev/null
+++ b/media-libs/libclxclient/files/libclxclient-3.6.1-Makefile.patch
@@ -0,0 +1,37 @@
+Index: clxclient-3.6.1/Makefile
+===================================================================
+--- clxclient-3.6.1.orig/Makefile
++++ clxclient-3.6.1/Makefile
+@@ -28,9 +28,9 @@ VERSION = $(MAJVERS).$(MINVERS)
+ DISTDIR = clxclient-$(VERSION)
+
+
+-CPPFLAGS += -Wall -I. -I/usr/X11R6/include `freetype-config --cflags` -fpic -DVERSION=\"$(VERSION)\" -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -O2
+-LDFLAGS += -L$(PREFIX)/$(LIBDIR) -L/usr/X11R6/$(LIBDIR) `freetype-config --libs`
+-LDLIBS +=
++CPPFLAGS += -Wall -I. -I/usr/X11R6/include `freetype-config --cflags` -fpic -DVERSION=\"$(VERSION)\" -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS
++LDFLAGS += -L$(PREFIX)/$(LIBDIR) -L/usr/X11R6/$(LIBDIR)
++LDLIBS += `freetype-config --libs`
+
+
+ CLXCLIENT_SO = libclxclient.so
+@@ -43,15 +43,13 @@ CLXCLIENT_H = clxclient.h
+
+
+ $(CLXCLIENT_MIN): $(CLXCLIENT_O)
+- g++ -shared $(LDFLAGS) -Wl,-soname,$(CLXCLIENT_MAJ) -o $(CLXCLIENT_MIN) $(CLXCLIENT_O) $(CLXCLIENT_DEP)
++ $(CXX) -shared $(LDFLAGS) -Wl,-soname,$(CLXCLIENT_MAJ) -o $(CLXCLIENT_MIN) $(CLXCLIENT_O) $(CLXCLIENT_DEP) $(LDLIBS)
+
+
+ install: $(CLXCLIENT_MIN)
+- /usr/bin/install -d $(PREFIX)/$(LIBDIR)
+- /usr/bin/install -m 644 $(CLXCLIENT_H) $(PREFIX)/include
+- /usr/bin/install -m 755 $(CLXCLIENT_MIN) $(PREFIX)/$(LIBDIR)
+- /sbin/ldconfig -n $(PREFIX)/$(LIBDIR)
+- ln -sf $(CLXCLIENT_MIN) $(PREFIX)/$(LIBDIR)/$(CLXCLIENT_SO)
++ /usr/bin/install -m 644 -D $(CLXCLIENT_H) $(DESTDIR)$(PREFIX)/include/$(CLXCLIENT_H)
++ /usr/bin/install -m 755 -D $(CLXCLIENT_MIN) $(DESTDIR)$(PREFIX)/$(LIBDIR)/$(CLXCLIENT_MIN)
++ ln -sf $(CLXCLIENT_MIN) $(DESTDIR)$(PREFIX)/$(LIBDIR)/$(CLXCLIENT_SO)
+
+
+ clean:
diff --git a/media-libs/libclxclient/files/libclxclient-3.9.0-Makefile.patch b/media-libs/libclxclient/files/libclxclient-3.9.0-Makefile.patch
new file mode 100644
index 000000000000..7714ec5e9111
--- /dev/null
+++ b/media-libs/libclxclient/files/libclxclient-3.9.0-Makefile.patch
@@ -0,0 +1,46 @@
+Index: clxclient-3.9.0/Makefile
+===================================================================
+--- clxclient-3.9.0.orig/Makefile
++++ clxclient-3.9.0/Makefile
+@@ -24,6 +24,7 @@
+ PREFIX = /usr/local
+ SUFFIX := $(shell uname -m | sed -e 's/^unknown/$//' -e 's/^i.86/$//' -e 's/^x86_64/$/64/')
+ LIBDIR = lib$(SUFFIX)
++PKGCONFIG = pkg-config
+
+
+ MAJVERS = 3
+@@ -31,9 +32,9 @@ MINVERS = 9.0
+ VERSION = $(MAJVERS).$(MINVERS)
+
+
+-CPPFLAGS += -Wall -I. -I/usr/X11R6/include `freetype-config --cflags` -fpic -DVERSION=\"$(VERSION)\" -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -O2
+-LDFLAGS += -L/usr/X11R6/$(LIBDIR) `freetype-config --libs`
+-LDLIBS +=
++CPPFLAGS += -Wall -I. -I/usr/X11R6/include `$(PKGCONFIG) --cflags freetype2` -fpic -DVERSION=\"$(VERSION)\" -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS
++LDFLAGS += -L/usr/X11R6/$(LIBDIR)
++LDLIBS += `$(PKGCONFIG) --libs freetype2`
+
+
+ CLXCLIENT_SO = libclxclient.so
+@@ -46,15 +47,14 @@ CLXCLIENT_H = clxclient.h
+
+
+ $(CLXCLIENT_MIN): $(CLXCLIENT_O)
+- g++ -shared $(LDFLAGS) -Wl,-soname,$(CLXCLIENT_MAJ) -o $(CLXCLIENT_MIN) $(CLXCLIENT_O) $(CLXCLIENT_DEP)
++ $(CXX) -shared $(LDFLAGS) -Wl,-soname,$(CLXCLIENT_MAJ) -o $(CLXCLIENT_MIN) $(CLXCLIENT_O) $(CLXCLIENT_DEP) $(LDLIBS)
+
+
+ install: $(CLXCLIENT_MIN)
+- install -d $(PREFIX)/$(LIBDIR)
+- install -m 644 $(CLXCLIENT_H) $(PREFIX)/include
+- install -m 755 $(CLXCLIENT_MIN) $(PREFIX)/$(LIBDIR)
+- ldconfig
+- ln -sf $(CLXCLIENT_MIN) $(PREFIX)/$(LIBDIR)/$(CLXCLIENT_SO)
++ install -m 644 -D $(CLXCLIENT_H) $(PREFIX)/include/$(CLXCLIENT_H)
++ install -m 755 -D $(CLXCLIENT_MIN) $(PREFIX)/$(LIBDIR)/$(CLXCLIENT_MIN)
++ ln -sf $(CLXCLIENT_MIN) $(PREFIX)/$(LIBDIR)/$(CLXCLIENT_MAJ)
++ ln -sf $(CLXCLIENT_MAJ) $(PREFIX)/$(LIBDIR)/$(CLXCLIENT_SO)
+
+
+ clean:
diff --git a/media-libs/libclxclient/libclxclient-1.0.1.ebuild b/media-libs/libclxclient/libclxclient-1.0.1.ebuild
new file mode 100644
index 000000000000..9bc7e5912915
--- /dev/null
+++ b/media-libs/libclxclient/libclxclient-1.0.1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+IUSE=""
+
+inherit eutils multilib toolchain-funcs
+
+S="${WORKDIR}/clxclient-${PV}"
+
+DESCRIPTION="An audio library by Fons Adriaensen <fons.adriaensen@skynet.be>"
+HOMEPAGE="http://users.skynet.be/solaris/linuxaudio"
+SRC_URI="http://users.skynet.be/solaris/linuxaudio/downloads/clxclient-${PV}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc sparc x86"
+
+RDEPEND="x11-libs/libX11
+ >=media-libs/libclthreads-1.0.1"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ epatch "${FILESDIR}/${P}-makefile.patch"
+ epatch "${FILESDIR}/${P}-gcc41.patch"
+}
+
+src_compile() {
+ tc-export CC CXX
+ emake || die "emake failed"
+}
+
+src_install() {
+ make CLXCLIENT_LIBDIR="/usr/$(get_libdir)" DESTDIR="${D}" install || die "make install failed"
+}
diff --git a/media-libs/libclxclient/libclxclient-3.3.2.ebuild b/media-libs/libclxclient/libclxclient-3.3.2.ebuild
new file mode 100644
index 000000000000..890a0ada2fdf
--- /dev/null
+++ b/media-libs/libclxclient/libclxclient-3.3.2.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils multilib toolchain-funcs
+
+MY_P=${P/lib/}
+
+S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="An audio library by Fons Adriaensen <fons.adriaensen@skynet.be>"
+HOMEPAGE="http://kokkinizita.linuxaudio.org/linuxaudio/index.html"
+SRC_URI="http://kokkinizita.linuxaudio.org/linuxaudio/downloads/${MY_P}.tar.bz2"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~sparc x86"
+IUSE=""
+
+RDEPEND="x11-libs/libX11
+ x11-libs/libXft
+ >=media-libs/libclthreads-2.2.1"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/${P}-Makefile.patch"
+}
+
+src_compile() {
+ tc-export CC CXX
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake CLXCLIENT_LIBDIR="/usr/$(get_libdir)" DESTDIR="${D}" install || die "make install failed"
+ dodoc AUTHORS
+}
diff --git a/media-libs/libclxclient/libclxclient-3.6.1.ebuild b/media-libs/libclxclient/libclxclient-3.6.1.ebuild
new file mode 100644
index 000000000000..30d321da495c
--- /dev/null
+++ b/media-libs/libclxclient/libclxclient-3.6.1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils multilib toolchain-funcs
+
+MY_P=${P/lib/}
+
+S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="An audio library by Fons Adriaensen <fons.adriaensen@skynet.be>"
+HOMEPAGE="http://kokkinizita.linuxaudio.org/linuxaudio/index.html"
+SRC_URI="http://kokkinizita.linuxaudio.org/linuxaudio/downloads/${MY_P}.tar.bz2"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE=""
+
+RDEPEND="x11-libs/libX11
+ x11-libs/libXft
+ >=media-libs/freetype-2
+ >=media-libs/libclthreads-2.4.0"
+DEPEND="${RDEPEND}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/${P}-Makefile.patch"
+}
+
+src_compile() {
+ tc-export CC CXX
+ emake PREFIX="/usr" LIBDIR="$(get_libdir)" || die "emake failed"
+}
+
+src_install() {
+ emake PREFIX="/usr" LIBDIR="$(get_libdir)" DESTDIR="${D}" install || die "make install failed"
+ dodoc AUTHORS
+}
diff --git a/media-libs/libclxclient/libclxclient-3.9.0.ebuild b/media-libs/libclxclient/libclxclient-3.9.0.ebuild
new file mode 100644
index 000000000000..1ac8792feee7
--- /dev/null
+++ b/media-libs/libclxclient/libclxclient-3.9.0.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib toolchain-funcs
+
+MY_P=${P/lib/}
+
+S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="An audio library by Fons Adriaensen <fons.adriaensen@skynet.be>"
+HOMEPAGE="http://kokkinizita.linuxaudio.org/linuxaudio/index.html"
+SRC_URI="http://kokkinizita.linuxaudio.org/linuxaudio/downloads/${MY_P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE=""
+
+RDEPEND="x11-libs/libX11
+ x11-libs/libXft
+ media-libs/freetype:2
+ >=media-libs/libclthreads-2.4.0"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-Makefile.patch"
+}
+
+src_compile() {
+ tc-export CC CXX
+ emake PREFIX="${EPREFIX}/usr" LIBDIR="$(get_libdir)" PKGCONFIG="$(tc-getPKG_CONFIG)"
+}
+
+src_install() {
+ emake PREFIX="${ED}/usr" LIBDIR="$(get_libdir)" PKGCONFIG="$(tc-getPKG_CONFIG)" install
+ dodoc AUTHORS
+}
diff --git a/media-libs/libclxclient/metadata.xml b/media-libs/libclxclient/metadata.xml
new file mode 100644
index 000000000000..e1774e3d9ad7
--- /dev/null
+++ b/media-libs/libclxclient/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>sound</herd>
+</pkgmetadata>
diff --git a/media-libs/libcue/Manifest b/media-libs/libcue/Manifest
new file mode 100644
index 000000000000..f0499ab8eadb
--- /dev/null
+++ b/media-libs/libcue/Manifest
@@ -0,0 +1 @@
+DIST libcue-1.4.0.tar.bz2 249426 SHA256 8b7276ec2a2b3918cbc59a3cc03c68dc0775965cc20e4b88757b852ff369729e
diff --git a/media-libs/libcue/libcue-1.4.0.ebuild b/media-libs/libcue/libcue-1.4.0.ebuild
new file mode 100644
index 000000000000..cc83c3e53c49
--- /dev/null
+++ b/media-libs/libcue/libcue-1.4.0.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="CUE Sheet Parser Library"
+HOMEPAGE="http://libcue.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sh sparc x86"
+IUSE="static-libs"
+
+RDEPEND=""
+DEPEND="sys-devel/flex
+ || ( dev-util/yacc sys-devel/bison )"
+
+DOCS=( AUTHORS ChangeLog NEWS )
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ find "${ED}" -name '*.la' -exec rm -f {} +
+}
diff --git a/media-libs/libcue/metadata.xml b/media-libs/libcue/metadata.xml
new file mode 100644
index 000000000000..b70536994b66
--- /dev/null
+++ b/media-libs/libcue/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>sound</herd>
+ <upstream>
+ <remote-id type="sourceforge">libcue</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libcuefile/Manifest b/media-libs/libcuefile/Manifest
new file mode 100644
index 000000000000..19cbd6fdc408
--- /dev/null
+++ b/media-libs/libcuefile/Manifest
@@ -0,0 +1 @@
+DIST libcuefile-477.tar.xz 41676 SHA256 135e5c72165bf7a2a82b8d2bd54a01c2d5ea967df4e075d5bf7f0c56675e9edf SHA512 9cf46f9fd1b178758b2d15fa65d67d069bba41a83354a5aedf7b57ed5752bb68ad1d10208ffbb22f2aac7bd5d938e9395f67d4248441743d45e0099638d60d5e WHIRLPOOL 5f6f8d20154f355074f8caf806da3056c53f841ead4184cf115f18acd04142ce6fe1027f44648075ea8d8d72d725022c1d4428521c15ec2c262e0d4081a962e0
diff --git a/media-libs/libcuefile/libcuefile-477-r1.ebuild b/media-libs/libcuefile/libcuefile-477-r1.ebuild
new file mode 100644
index 000000000000..68cdfb37fd88
--- /dev/null
+++ b/media-libs/libcuefile/libcuefile-477-r1.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit cmake-multilib
+
+# svn export http://svn.musepack.net/libcuefile/trunk libcuefile-${PV}
+# tar -cJf libcuefile-${PV}.tar.xz libcuefile-${PV}
+
+DESCRIPTION="Cue File library from Musepack"
+HOMEPAGE="http://www.musepack.net/"
+SRC_URI="http://dev.gentoo.org/~ssuominen/${P}.tar.xz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm hppa ~ia64 ppc ppc64 ~sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE=""
+RDEPEND="abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20130224-r2
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+
+src_install() {
+ cmake-multilib_src_install
+ insinto /usr/include
+ doins -r include/cuetools
+}
diff --git a/media-libs/libcuefile/libcuefile-477.ebuild b/media-libs/libcuefile/libcuefile-477.ebuild
new file mode 100644
index 000000000000..25cf4effea5c
--- /dev/null
+++ b/media-libs/libcuefile/libcuefile-477.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit cmake-utils
+
+# svn export http://svn.musepack.net/libcuefile/trunk libcuefile-${PV}
+# tar -cJf libcuefile-${PV}.tar.xz libcuefile-${PV}
+
+DESCRIPTION="Cue File library from Musepack"
+HOMEPAGE="http://www.musepack.net/"
+SRC_URI="http://dev.gentoo.org/~ssuominen/${P}.tar.xz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm hppa ~ia64 ppc ppc64 ~sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE=""
+
+src_install() {
+ cmake-utils_src_install
+ insinto /usr/include
+ doins -r include/cuetools
+}
diff --git a/media-libs/libcuefile/metadata.xml b/media-libs/libcuefile/metadata.xml
new file mode 100644
index 000000000000..ae573a60407f
--- /dev/null
+++ b/media-libs/libcuefile/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>sound</herd>
+</pkgmetadata>
diff --git a/media-libs/libdc1394/Manifest b/media-libs/libdc1394/Manifest
new file mode 100644
index 000000000000..ac33864972fc
--- /dev/null
+++ b/media-libs/libdc1394/Manifest
@@ -0,0 +1,5 @@
+DIST libdc1394-2.1.3.tar.gz 596778 SHA256 6690e8f97abadd41aa6a5f6e0365e17287847bb267d251ea308641a6dd7aa0e9 SHA512 502e1c55dbcf755a12d2efa1d7d14f9b735d279b47df4782c5303e48cb57eacabb89be20a374e1303d8c9b3d57eadac86541b2aae859e939a84d8c25bd20290c WHIRLPOOL 2f9e569d200de2cc7542eeead405a7dc85cebb8919c9b2ce887832426ccf99de4ca9ed4cb677522629248aaf1c6c2681a6e4a5353400a3d64f3adc26e20dc5d6
+DIST libdc1394-2.1.4.tar.gz 576406 SHA256 c605d1f099690a71b743827f01a7733e898a45da69ca31eb912fa007f4a3acf0 SHA512 21f36988cc1b85ec058b8c17b5311ee7c0c61ff3bc69e9ade94c44b9e96ab02fa5f243bead0ed3f1e3f130663cc46843f83cd78d3a960bb8d06fffa3df4ac1e8 WHIRLPOOL 3485bb2f140c6a5b7acb4a6982f8be6979cbf693fe60d588e5967c01614921647902f690583ca5b0eadaa9ab663a9b98b9f3830a4e444d67f8238b13ac732c80
+DIST libdc1394-2.2.1.tar.gz 556544 SHA256 920c331abf8bf2e1f73dfee0df103daf9f1850a69552ee825a9824e01ce96cf2 SHA512 e79370d4ac50f60535ef8b6f6ae21d5ede965812c775853e98c5c38e9bfc87929ef6e0d3737a20a443cd60c0225af18944bcba6d2cfb2ba858ac868bfb53c446 WHIRLPOOL 2107a2baf8090151ff5b81933dbe0e67198a87579db204bf69e574625007048d00b6b9d9a29309a026b49f7e55c10847cbe894f431ea976d5cc9f4e33a0f5499
+DIST libdc1394-2.2.3.tar.gz 606042 SHA256 4a197880657f54519683ce014e613acdfd909767a69873eb23409fe423232bdd SHA512 d60771fe196cfd5c1ede413c0159ed9f0a977183f4b414f8e26a7be0098c10599c8dd93f8175e7ad38dac1504295c7c9987633bc9cb7de561ad0b64da0c8ca28 WHIRLPOOL b486a2b7075e41b0a6b6b3a4a79580a3fe811f4c66797e419380365562d72e3fea78d90656531a220f20170ca398947fac0113ce0134721b6490d8e39919e165
+DIST sdl.m4-20140620.tar.xz 2420 SHA256 855651a9da571ce87c9d62479c82174809dae902bdeb274144f94ca444675560 SHA512 d8844d0967809241b642e0b6aaf45f2a5e94567d239d338aee45aaeb0e38765bcae419660562b7064d91afec63cc6ade0878fc7d6f36c61c083d136098a9af55 WHIRLPOOL a6361961fce75f715943642c185a1750862469aef222cf8d8ddb5c023a878b346919376aa5360c10bd870b79b7309ae62913a63dd51458c64777be50f96ee424
diff --git a/media-libs/libdc1394/files/libdc1394-2.2.1-includes.patch b/media-libs/libdc1394/files/libdc1394-2.2.1-includes.patch
new file mode 100644
index 000000000000..db703e9c3718
--- /dev/null
+++ b/media-libs/libdc1394/files/libdc1394-2.2.1-includes.patch
@@ -0,0 +1,29 @@
+Fix out of source builds.
+https://bugs.gentoo.org/show_bug.cgi?id=488716
+
+Index: libdc1394-2.2.1/dc1394/juju/Makefile.am
+===================================================================
+--- libdc1394-2.2.1.orig/dc1394/juju/Makefile.am
++++ libdc1394-2.2.1/dc1394/juju/Makefile.am
+@@ -7,7 +7,7 @@ noinst_LTLIBRARIES = libdc1394-juju.la
+ pkgjujuinclude_HEADERS =
+ endif
+
+-AM_CFLAGS = -I$(top_srcdir)/dc1394
++AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/dc1394
+ libdc1394_juju_la_SOURCES = \
+ control.c \
+ capture.c \
+Index: libdc1394-2.2.1/dc1394/usb/Makefile.am
+===================================================================
+--- libdc1394-2.2.1.orig/dc1394/usb/Makefile.am
++++ libdc1394-2.2.1/dc1394/usb/Makefile.am
+@@ -7,7 +7,7 @@ noinst_LTLIBRARIES = libdc1394-usb.la
+ pkgusbinclude_HEADERS =
+ endif
+
+-AM_CFLAGS = -I$(top_srcdir)/dc1394 $(LIBUSB_CFLAGS)
++AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/dc1394 $(LIBUSB_CFLAGS)
+ libdc1394_usb_la_LIBADD = $(LIBUSB_LIBS)
+ libdc1394_usb_la_SOURCES = \
+ control.c \
diff --git a/media-libs/libdc1394/files/libdc1394-2.2.1-pthread.patch b/media-libs/libdc1394/files/libdc1394-2.2.1-pthread.patch
new file mode 100644
index 000000000000..6ea7651e1463
--- /dev/null
+++ b/media-libs/libdc1394/files/libdc1394-2.2.1-pthread.patch
@@ -0,0 +1,13 @@
+http://bugs.gentoo.org/514008
+
+--- dc1394/usb/Makefile.am
++++ dc1394/usb/Makefile.am
+@@ -8,7 +8,7 @@
+ endif
+
+ AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/dc1394 $(LIBUSB_CFLAGS)
+-libdc1394_usb_la_LIBADD = $(LIBUSB_LIBS)
++libdc1394_usb_la_LIBADD = $(LIBUSB_LIBS) -lpthread
+ libdc1394_usb_la_SOURCES = \
+ control.c \
+ usb.h \
diff --git a/media-libs/libdc1394/files/libdc1394-usbinit.patch b/media-libs/libdc1394/files/libdc1394-usbinit.patch
new file mode 100644
index 000000000000..e94d25355ad8
--- /dev/null
+++ b/media-libs/libdc1394/files/libdc1394-usbinit.patch
@@ -0,0 +1,39 @@
+diff --git a/libdc1394/dc1394/control.c b/libdc1394/dc1394/control.c
+index c62e0e2..f250f6a 100644
+--- a/libdc1394/dc1394/control.c
++++ b/libdc1394/dc1394/control.c
+@@ -1955,7 +1955,7 @@ dc1394_new (void)
+ windows_init (d);
+ #endif
+ #ifdef HAVE_LIBUSB
+- usb_init (d);
++ dc1394_usb_init (d);
+ #endif
+
+ int i;
+diff --git a/libdc1394/dc1394/internal.h b/libdc1394/dc1394/internal.h
+index b4d295a..c59e5d3 100644
+--- a/libdc1394/dc1394/internal.h
++++ b/libdc1394/dc1394/internal.h
+@@ -74,7 +74,7 @@ void juju_init(dc1394_t *d);
+ void linux_init(dc1394_t *d);
+ void macosx_init(dc1394_t *d);
+ void windows_init(dc1394_t *d);
+-void usb_init(dc1394_t *d);
++void dc1394_usb_init(dc1394_t *d);
+
+ void register_platform (dc1394_t * d, const platform_dispatch_t * dispatch,
+ const char * name);
+diff --git a/libdc1394/dc1394/usb/control.c b/libdc1394/dc1394/usb/control.c
+index 6509452..19a21a6 100644
+--- a/libdc1394/dc1394/usb/control.c
++++ b/libdc1394/dc1394/usb/control.c
+@@ -378,7 +378,7 @@ usb_dispatch = {
+ };
+
+ void
+-usb_init(dc1394_t * d)
++dc1394_usb_init(dc1394_t * d)
+ {
+ register_platform (d, &usb_dispatch, "usb");
+ }
diff --git a/media-libs/libdc1394/files/libdc1394-videodev.h.patch b/media-libs/libdc1394/files/libdc1394-videodev.h.patch
new file mode 100644
index 000000000000..dba42c46f0bd
--- /dev/null
+++ b/media-libs/libdc1394/files/libdc1394-videodev.h.patch
@@ -0,0 +1,53 @@
+From 2ee7e7f98dd6225b40d5cd570c240504be7bc86a Mon Sep 17 00:00:00 2001
+From: David Moore <david.moore@gmail.com>
+Date: Sun, 27 Mar 2011 22:48:15 -0700
+Subject: [PATCH 1/1] Conditionally compile dc1394_vloopback only when linux/videodev.h exists
+
+---
+ libdc1394/ChangeLog | 3 +++
+ libdc1394/configure.in | 3 +++
+ libdc1394/examples/Makefile.am | 2 ++
+ 3 files changed, 8 insertions(+), 0 deletions(-)
+
+diff --git a/libdc1394/ChangeLog b/libdc1394/ChangeLog
+index e1355de..536ccae 100644
+--- a/libdc1394/ChangeLog
++++ b/libdc1394/ChangeLog
+@@ -1,3 +1,6 @@
++2011-03-27 David Moore <david.moore@gmail.com>
++ * Conditionally compile dc1394_vloopback only when linux/video.h exists
++
+ 2011-01-02 David Moore <david.moore@gmail.com>
+ * dc1394/conversions.h: Fix typo in DC1394_STEREO_METHOD_MIN
+ * Update NEWS, README, AUTHORS and version for release 2.1.3.
+diff --git a/libdc1394/configure.in b/libdc1394/configure.in
+index 69babab..bdddc9b 100644
+--- a/libdc1394/configure.in
++++ b/libdc1394/configure.in
+@@ -75,6 +75,9 @@ AM_CONDITIONAL(HAVE_WINDOWS, test x$have_windows = xtrue)
+ AM_CONDITIONAL(HAVE_LIBRAW1394, test x$libraw1394 = xtrue)
+ AM_CONDITIONAL(HAVE_LIBUSB, test "x$LIBUSB_LIBS" != "x")
+
++AC_CHECK_HEADER([linux/videodev.h], [have_videodev=true])
++AM_CONDITIONAL(HAVE_VIDEODEV, test x$have_videodev = xtrue)
++
+ AC_ARG_ENABLE([examples], [AS_HELP_STRING([--disable-examples], [don't build example programs])], [build_examples=$enableval], [build_examples=true])
+
+ AM_CONDITIONAL(MAKE_EXAMPLES, test x$build_examples = xtrue)
+diff --git a/libdc1394/examples/Makefile.am b/libdc1394/examples/Makefile.am
+index fcebf18..035612e 100644
+--- a/libdc1394/examples/Makefile.am
++++ b/libdc1394/examples/Makefile.am
+@@ -8,7 +8,9 @@ A = grab_gray_image grab_partial_image grab_color_image \
+ B = dc1394_reset_bus
+
+ if HAVE_LINUX
++if HAVE_VIDEODEV
+ B += dc1394_vloopback
++endif
+ if HAVE_XV
+ A += dc1394_multiview
+ endif
+--
+1.7.0.1
+
diff --git a/media-libs/libdc1394/libdc1394-2.1.3-r1.ebuild b/media-libs/libdc1394/libdc1394-2.1.3-r1.ebuild
new file mode 100644
index 000000000000..e102fd9b8dd6
--- /dev/null
+++ b/media-libs/libdc1394/libdc1394-2.1.3-r1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit autotools eutils
+
+DESCRIPTION="Library to interface with IEEE 1394 cameras following the IIDC specification"
+HOMEPAGE="http://sourceforge.net/projects/libdc1394/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="2"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86"
+IUSE="doc static-libs X"
+
+RDEPEND=">=sys-libs/libraw1394-1.2.0
+ virtual/libusb:1
+ X? ( x11-libs/libSM x11-libs/libXv )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-videodev.h.patch \
+ "${FILESDIR}"/${PN}-usbinit.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ --program-suffix=2 \
+ $(use_with X x) \
+ $(use_enable doc doxygen-html)
+}
+
+src_compile() {
+ default
+ use doc && emake doc
+}
+
+src_install() {
+ default
+ use doc && dohtml doc/html/*
+ find "${ED}" -name '*.la' -exec rm -f {} +
+}
diff --git a/media-libs/libdc1394/libdc1394-2.1.4.ebuild b/media-libs/libdc1394/libdc1394-2.1.4.ebuild
new file mode 100644
index 000000000000..4afe8bcee245
--- /dev/null
+++ b/media-libs/libdc1394/libdc1394-2.1.4.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="Library to interface with IEEE 1394 cameras following the IIDC specification"
+HOMEPAGE="http://sourceforge.net/projects/libdc1394/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="2"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="doc static-libs X"
+
+RDEPEND=">=sys-libs/libraw1394-1.2.0
+ virtual/libusb:1
+ X? ( x11-libs/libSM x11-libs/libXv )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ --program-suffix=2 \
+ $(use_with X x) \
+ $(use_enable doc doxygen-html)
+}
+
+src_compile() {
+ default
+ use doc && emake doc
+}
+
+src_install() {
+ default
+ use doc && dohtml doc/html/*
+ find "${ED}" -name '*.la' -exec rm -f {} +
+}
diff --git a/media-libs/libdc1394/libdc1394-2.2.1.ebuild b/media-libs/libdc1394/libdc1394-2.2.1.ebuild
new file mode 100644
index 000000000000..2975b243ec55
--- /dev/null
+++ b/media-libs/libdc1394/libdc1394-2.2.1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils multilib-minimal
+
+DESCRIPTION="Library to interface with IEEE 1394 cameras following the IIDC specification"
+HOMEPAGE="http://sourceforge.net/projects/libdc1394/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz
+ http://dev.gentoo.org/~ssuominen/sdl.m4-20140620.tar.xz"
+
+LICENSE="LGPL-2.1"
+SLOT="2"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86"
+IUSE="doc static-libs X"
+
+RDEPEND=">=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}]
+ >=virtual/libusb-1-r1:1[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-includes.patch \
+ "${FILESDIR}"/${P}-pthread.patch
+
+ AT_M4DIR=${WORKDIR}/aclocal eautoreconf
+}
+
+multilib_src_configure() {
+ local myconf="$(use_enable doc doxygen-html)"
+ multilib_is_native_abi || myconf="--disable-doxygen-html --disable-examples"
+
+ # X is only useful for examples that are not installed.
+ ECONF_SOURCE="${S}" econf \
+ $(use_enable static-libs static) \
+ --program-suffix=2 \
+ --without-x \
+ ${myconf}
+}
+
+multilib_src_compile() {
+ default
+ multilib_is_native_abi && use doc && emake doc
+}
+
+multilib_src_install() {
+ default
+ multilib_is_native_abi && use doc && dohtml doc/html/*
+ find "${ED}" -name '*.la' -exec rm -f {} +
+}
diff --git a/media-libs/libdc1394/libdc1394-2.2.3.ebuild b/media-libs/libdc1394/libdc1394-2.2.3.ebuild
new file mode 100644
index 000000000000..9e72258dc891
--- /dev/null
+++ b/media-libs/libdc1394/libdc1394-2.2.3.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 autotools eutils multilib-minimal
+
+DESCRIPTION="Library to interface with IEEE 1394 cameras following the IIDC specification"
+HOMEPAGE="http://sourceforge.net/projects/libdc1394/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz
+ http://dev.gentoo.org/~ssuominen/sdl.m4-20140620.tar.xz"
+
+LICENSE="LGPL-2.1"
+SLOT="2"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="doc static-libs X"
+
+RDEPEND=">=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}]
+ >=virtual/libusb-1-r1:1[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-2.2.1-pthread.patch
+
+ AT_M4DIR=${WORKDIR}/aclocal eautoreconf
+}
+
+multilib_src_configure() {
+ local myconf="$(use_enable doc doxygen-html)"
+ multilib_is_native_abi || myconf="--disable-doxygen-html --disable-examples"
+
+ # X is only useful for examples that are not installed.
+ ECONF_SOURCE="${S}" econf \
+ $(use_enable static-libs static) \
+ --program-suffix=2 \
+ --without-x \
+ ${myconf}
+}
+
+multilib_src_compile() {
+ default
+ multilib_is_native_abi && use doc && emake doc
+}
+
+multilib_src_install() {
+ default
+ multilib_is_native_abi && use doc && dohtml doc/html/*
+ find "${ED}" -name '*.la' -exec rm -f {} +
+}
diff --git a/media-libs/libdc1394/metadata.xml b/media-libs/libdc1394/metadata.xml
new file mode 100644
index 000000000000..0ad59fcffb30
--- /dev/null
+++ b/media-libs/libdc1394/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">libdc1394</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libdca/Manifest b/media-libs/libdca/Manifest
new file mode 100644
index 000000000000..01c075364ff5
--- /dev/null
+++ b/media-libs/libdca/Manifest
@@ -0,0 +1,2 @@
+DIST libdca-0.0.5-constant.patch.bz2 3424 SHA256 d8923ad6a61b3e5219e83842e1499e08cace8eabc4b8a9ae23db2ee00939cc5d SHA512 37bd56b8c240f16a6ee86b04d44571345278f8b9dd395cbc307e9fb7e6c001487411d1b4775af19dc97f18fcaed63be97fafeb4fe504f0a76b87022ec792d23e WHIRLPOOL 167492c49abbb02e2683c7bb5b29e23078022b1d77590a52b87cd0db5fa643a381ec02950aad7da34271fbc08447a0ed868dc5b50d63cd6532de5d907c54abe5
+DIST libdca-0.0.5.tar.bz2 393291 SHA256 dba022e022109a5bacbe122d50917769ff27b64a7bba104bd38ced8de8510642 SHA512 d9f0ed34efeb3f27af8424fcb3e6df56744c6735854a65b5709c02b42b4513b9c4618dcc19eb44293afa051bd95616651bda5fc3b49dfabe975d0babfb1bc287 WHIRLPOOL 04d4c12ee32ba6d067a2dfdd4274cb2e3ac242b9b4d68bb43249398a2b77a629c90567ed3cdccb0b830b77f5ed98ce2d3e048e23754ee3e838533986b0a5c5b6
diff --git a/media-libs/libdca/files/libdca-0.0.5-cflags.patch b/media-libs/libdca/files/libdca-0.0.5-cflags.patch
new file mode 100644
index 000000000000..16e897f79e50
--- /dev/null
+++ b/media-libs/libdca/files/libdca-0.0.5-cflags.patch
@@ -0,0 +1,12 @@
+Index: libdca-0.0.5/configure.ac
+===================================================================
+--- libdca-0.0.5.orig/configure.ac
++++ libdca-0.0.5/configure.ac
+@@ -32,7 +32,6 @@ if test x"$GCC" = x"yes"; then
+ TRY_CFLAGS=`echo "$OPT_CFLAGS $CFLAGS"|sed "s/-O[0-9]*//g"`
+ changequote([,])
+ TRY_CFLAGS="$TRY_CFLAGS -O3"
+- AC_TRY_CFLAGS([$TRY_CFLAGS],[OPT_CFLAGS=$TRY_CFLAGS; CFLAGS=""])
+
+ AC_ARG_ENABLE([debug],
+ [ --enable-debug debug mode configuration])
diff --git a/media-libs/libdca/files/libdca-0.0.5-tests-optional.patch b/media-libs/libdca/files/libdca-0.0.5-tests-optional.patch
new file mode 100644
index 000000000000..73a5dfaa9ff5
--- /dev/null
+++ b/media-libs/libdca/files/libdca-0.0.5-tests-optional.patch
@@ -0,0 +1,15 @@
+diff -NrU5 libdca-0.0.5.orig/test/Makefile.am libdca-0.0.5/test/Makefile.am
+--- libdca-0.0.5.orig/test/Makefile.am 2008-06-13 23:54:27.000000000 +0200
++++ libdca-0.0.5/test/Makefile.am 2008-06-13 23:54:46.000000000 +0200
+@@ -1,10 +1,10 @@
+ AM_CFLAGS = $(DCADEC_CFLAGS)
+
+-noinst_PROGRAMS = compare
++check_PROGRAMS = compare
+ compare_SOURCES = compare.c
+ compare_LDADD = $(COMPARE_LIBS)
+
+ dist_check_SCRIPTS = regression compile globals
+ EXTRA_DIST = tests
+ TESTS = regression compile
+ #broken test: globals
diff --git a/media-libs/libdca/libdca-0.0.5-r3.ebuild b/media-libs/libdca/libdca-0.0.5-r3.ebuild
new file mode 100644
index 000000000000..ef01f1ebc77a
--- /dev/null
+++ b/media-libs/libdca/libdca-0.0.5-r3.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils flag-o-matic multilib multilib-minimal
+
+DESCRIPTION="library for decoding DTS Coherent Acoustics streams used in DVD"
+HOMEPAGE="http://www.videolan.org/developers/libdca.html"
+SRC_URI="http://www.videolan.org/pub/videolan/${PN}/${PV}/${P}.tar.bz2
+ mirror://gentoo/${P}-constant.patch.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="debug oss static-libs"
+
+RDEPEND="!media-libs/libdts
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20130224-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}"
+
+DOCS=( AUTHORS ChangeLog NEWS README TODO doc/${PN}.txt )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-cflags.patch \
+ "${FILESDIR}"/${P}-tests-optional.patch \
+ "${WORKDIR}"/${P}-constant.patch
+
+ eautoreconf
+}
+
+multilib_src_configure() {
+ append-lfs-flags #328875
+
+ ECONF_SOURCE="${S}" econf \
+ --disable-dependency-tracking \
+ $(use_enable debug) \
+ $(use_enable static-libs static) \
+ $(use_enable oss)
+
+ # Those are thrown away afterwards, don't build them in the first place
+ if [ "${ABI}" != "${DEFAULT_ABI}" ] ; then
+ sed -i -e 's/ libao src//' Makefile || die
+ fi
+}
+
+multilib_src_compile() {
+ emake OPT_CFLAGS="" || die
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install || die
+
+ find "${ED}" -name '*.la' -exec rm -f '{}' +
+ rm -f "${ED}"/usr/$(get_libdir)/libdts.a
+}
diff --git a/media-libs/libdca/metadata.xml b/media-libs/libdca/metadata.xml
new file mode 100644
index 000000000000..e1774e3d9ad7
--- /dev/null
+++ b/media-libs/libdca/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>sound</herd>
+</pkgmetadata>
diff --git a/media-libs/libde265/Manifest b/media-libs/libde265/Manifest
new file mode 100644
index 000000000000..5872f638c205
--- /dev/null
+++ b/media-libs/libde265/Manifest
@@ -0,0 +1 @@
+DIST libde265-0.9.tar.gz 258887 SHA256 226856358b1cb7aa54d3f3e1bc9bb9f062b867c6de58ab1ee94cfcb8a111cda2 SHA512 1e519cea8447bffd14dd1b78d9ab07f3e558e5f3731e26a3d5c3bd8c4a67e05c1ab228f1f82d671d64442ca78e6ead9305edd19bb17fa62c27253616ff6a84d2 WHIRLPOOL 0c0ee2cc844c2551ae1effa1305d6413a5a4a81406f1957f4d48fe74d9e1c912e424106d4c3290100b15c2d8277833cc07931fb30c4e14e827e86e785ff7f3d3
diff --git a/media-libs/libde265/libde265-0.9.ebuild b/media-libs/libde265/libde265-0.9.ebuild
new file mode 100644
index 000000000000..d42d386340ad
--- /dev/null
+++ b/media-libs/libde265/libde265-0.9.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_IN_SOURCE_BUILD=1
+AUTOTOOLS_AUTORECONF=1
+inherit autotools-multilib
+
+DESCRIPTION="Open h.265 video codec implementation"
+HOMEPAGE="https://github.com/strukturag/libde265"
+SRC_URI="https://github.com/strukturag/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug qt4 qt5 static-libs cpu_flags_x86_sse tools"
+
+DEPEND="
+ qt4? ( dev-qt/qtgui:4 dev-qt/qtcore:4 )
+ qt5? ( dev-qt/qtgui:5 dev-qt/qtcore:5 dev-qt/qtwidgets:5 )
+ media-libs/libsdl
+ virtual/ffmpeg
+"
+RDEPEND="${DEPEND}"
+
+REQUIRED_USE="tools? ( || ( qt4 qt5 ) )"
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable cpu_flags_x86_sse sse)
+ $(use_enable static-libs static)
+ $(use_enable debug log-info)
+ $(use_enable debug log-debug)
+ $(use_enable debug log-trace)
+ $(use_enable tools dec265)
+ $(use_enable tools sherlock265)
+ --disable-silent-rules
+ --enable-log-error
+ )
+ autotools-multilib_src_configure "${myeconfargs[@]}"
+}
diff --git a/media-libs/libde265/libde265-9999.ebuild b/media-libs/libde265/libde265-9999.ebuild
new file mode 100644
index 000000000000..74f8da72d15a
--- /dev/null
+++ b/media-libs/libde265/libde265-9999.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_IN_SOURCE_BUILD=1
+AUTOTOOLS_AUTORECONF=1
+inherit git-r3 autotools-multilib
+
+DESCRIPTION="Open h.265 video codec implementation"
+HOMEPAGE="https://github.com/strukturag/libde265"
+EGIT_REPO_URI="git://github.com/strukturag/libde265.git"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS=""
+IUSE="debug qt4 qt5 static-libs cpu_flags_x86_sse tools"
+
+DEPEND="
+ qt4? ( dev-qt/qtgui:4 dev-qt/qtcore:4 )
+ qt5? ( dev-qt/qtgui:5 dev-qt/qtcore:5 dev-qt/qtwidgets:5 )
+ media-libs/libsdl
+ virtual/ffmpeg
+"
+RDEPEND="${DEPEND}"
+
+REQUIRED_USE="tools? ( || ( qt4 qt5 ) )"
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable cpu_flags_x86_sse sse)
+ $(use_enable static-libs static)
+ $(use_enable debug log-info)
+ $(use_enable debug log-debug)
+ $(use_enable debug log-trace)
+ $(use_enable tools dec265)
+ $(use_enable tools sherlock265)
+ --disable-silent-rules
+ --enable-log-error
+ )
+ autotools-multilib_src_configure "${myeconfargs[@]}"
+}
diff --git a/media-libs/libde265/metadata.xml b/media-libs/libde265/metadata.xml
new file mode 100644
index 000000000000..dba98e6d2a82
--- /dev/null
+++ b/media-libs/libde265/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>dlan@gentoo.org</email>
+ <name>Yixun Lan</name>
+ </maintainer>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">
+</longdescription>
+ <use>
+ <flag name="tools">Install addtional tools, require USE=qt4 or qt5</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">strukturag/libde265</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libdiscid/Manifest b/media-libs/libdiscid/Manifest
new file mode 100644
index 000000000000..0bdceb319742
--- /dev/null
+++ b/media-libs/libdiscid/Manifest
@@ -0,0 +1,4 @@
+DIST libdiscid-0.2.2.tar.gz 347907 SHA256 974b5d5ab23fb45910a4fe171045a22a749cd8cb9833168f7178839993a58402 SHA512 5a10b16cd3698641276ebb7b9dc9bc4aeeca8afeda2b3850a0c9309fecfcba5d0c0954f7de3e077460bcb409e056e3b69f23aad677f522891751c0edc4b657cd WHIRLPOOL 96329bb6654ef4f1a286b1da3699051a665361db3afba9f2c69affd1fb5d846cb47f5d7c44457a7ae9457594a9c7e2e6485f64de703a4ddc2cbed2025b450b3f
+DIST libdiscid-0.3.0.tar.gz 344348 SHA256 94ae143a98fbe74f1ba6c39a8d4f28785cfaa86ef5669b394d4d0baa3138ee53 SHA512 51900e3a22d20041a6bab70ab62ab501523d8d13f459f5af81cbef95f954483ed9bdd86f2167efcad44c3d283a4f26ac0e0fa55609f71fbe7e67435bb9245db9 WHIRLPOOL dcde078f6cde8f58f2bdae1f6675c8104e952876896ccf5852aa22fdb347aa5f84514ba0c9e4755f2776ec8b20036e9b4b3e05c832cd12736b16a963b6c859b3
+DIST libdiscid-0.5.0.tar.gz 366828 SHA256 35ef385d2186b73ad69a70a8f956ba09e2b6abe786e680e69d45fa7953790d70 SHA512 c1e7b67968b678464b5fdc4cef4dbe6e4b6af2809b9d140d24913061e27869ea5bfcc417b1fa4ee2ec731842bebe8816c721ca4e20d8051125a300c408a1b679 WHIRLPOOL b47ca921c8ce86e0e05b433edfe29a325b959f637bfe32378dfa8afe43c60b83bf850b3c53f297f7ef7bc6cd02c4fef40d2f2ab5d7a3b0896275a6686ddd51b2
+DIST libdiscid-0.6.1.tar.gz 366393 SHA256 aceb2bd1a8d15d69b2962dec7c51983af32ece318cbbeb1c43c39802922f6dd5 SHA512 12808040b6bac7dd513d32b2f7a8424f0d9753a89c5703ede0454d0d8dea508a446adba20d899c3499e8621d2a752b3e8ca787b92e3ae92402c6df7bc2a3819d WHIRLPOOL d51cc785a479269b503c84b4f3da8d0e18438bfb3e08d4efb5e6c14cd80ffc986e6c1bd5d3e1e709cfeef6107fcc561cdcf4e4745c991d72f73f05aed29498a0
diff --git a/media-libs/libdiscid/libdiscid-0.2.2.ebuild b/media-libs/libdiscid/libdiscid-0.2.2.ebuild
new file mode 100644
index 000000000000..6d95306fa082
--- /dev/null
+++ b/media-libs/libdiscid/libdiscid-0.2.2.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="Client library to create MusicBrainz enabled tagging applications"
+HOMEPAGE="http://musicbrainz.org/doc/libdiscid"
+SRC_URI="http://users.musicbrainz.org/~matt/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="static-libs"
+
+DOCS="AUTHORS ChangeLog examples/discid.c README"
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ rm -f "${ED}"usr/lib*/lib*.la
+}
diff --git a/media-libs/libdiscid/libdiscid-0.3.0.ebuild b/media-libs/libdiscid/libdiscid-0.3.0.ebuild
new file mode 100644
index 000000000000..f4206216c287
--- /dev/null
+++ b/media-libs/libdiscid/libdiscid-0.3.0.ebuild
@@ -0,0 +1,18 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools-utils
+
+DESCRIPTION="Client library to create MusicBrainz enabled tagging applications"
+HOMEPAGE="http://musicbrainz.org/doc/libdiscid"
+SRC_URI="http://ftp.musicbrainz.org/pub/musicbrainz/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="static-libs"
+
+DOCS=( AUTHORS ChangeLog examples/discid.c README )
diff --git a/media-libs/libdiscid/libdiscid-0.5.0.ebuild b/media-libs/libdiscid/libdiscid-0.5.0.ebuild
new file mode 100644
index 000000000000..f4206216c287
--- /dev/null
+++ b/media-libs/libdiscid/libdiscid-0.5.0.ebuild
@@ -0,0 +1,18 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools-utils
+
+DESCRIPTION="Client library to create MusicBrainz enabled tagging applications"
+HOMEPAGE="http://musicbrainz.org/doc/libdiscid"
+SRC_URI="http://ftp.musicbrainz.org/pub/musicbrainz/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="static-libs"
+
+DOCS=( AUTHORS ChangeLog examples/discid.c README )
diff --git a/media-libs/libdiscid/libdiscid-0.6.1.ebuild b/media-libs/libdiscid/libdiscid-0.6.1.ebuild
new file mode 100644
index 000000000000..f4206216c287
--- /dev/null
+++ b/media-libs/libdiscid/libdiscid-0.6.1.ebuild
@@ -0,0 +1,18 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools-utils
+
+DESCRIPTION="Client library to create MusicBrainz enabled tagging applications"
+HOMEPAGE="http://musicbrainz.org/doc/libdiscid"
+SRC_URI="http://ftp.musicbrainz.org/pub/musicbrainz/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="static-libs"
+
+DOCS=( AUTHORS ChangeLog examples/discid.c README )
diff --git a/media-libs/libdiscid/metadata.xml b/media-libs/libdiscid/metadata.xml
new file mode 100644
index 000000000000..22b5b2dc7090
--- /dev/null
+++ b/media-libs/libdiscid/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>sound</herd>
+ <longdescription>libdiscid is a C library for creating MusicBrainz DiscIDs
+ from audio CDs. It reads a CD's table of contents (TOC) and generates an
+ identifier which can be used to lookup the CD at MusicBrainz.
+ Additionally, it provides a submission URL for adding the DiscID to the
+ database.</longdescription>
+</pkgmetadata>
diff --git a/media-libs/libdlna/Manifest b/media-libs/libdlna/Manifest
new file mode 100644
index 000000000000..fb42cd6ef262
--- /dev/null
+++ b/media-libs/libdlna/Manifest
@@ -0,0 +1 @@
+DIST libdlna-0.2.4.tar.bz2 37579 SHA256 4b2787392ea5ff61c0056bbaa0bb00a2c83d595d20b5658741658cddd17678c5 SHA512 2d6185e0d7f9d449fe48e5e6c7331a46fb795794c6b8f229e730e47ae519e28d012a79227c2bb43d3a62442560e0d65c8a84ef48e714a99848b854495d6bf7e6 WHIRLPOOL c2977ca71891cd64b12342b6ceb509c7c03ddb3ae1cbda44c0517796e990c07c9306c7372fcd112d7f211d7f79ae476fe146eaf2197065d5aebf6ba7dc20fda9
diff --git a/media-libs/libdlna/files/libdlna-0.2.4-ffmpeg.patch b/media-libs/libdlna/files/libdlna-0.2.4-ffmpeg.patch
new file mode 100644
index 000000000000..1a908ac20c94
--- /dev/null
+++ b/media-libs/libdlna/files/libdlna-0.2.4-ffmpeg.patch
@@ -0,0 +1,22 @@
+Adapt to the latest ffmpeg API
+
+Gentoo bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=540150
+Signed-off-by: Markos Chandras <hwoarang@gentoo.org>
+
+Index: libdlna-0.2.4/src/profiles.c
+===================================================================
+--- libdlna-0.2.4.orig/src/profiles.c
++++ libdlna-0.2.4/src/profiles.c
+@@ -334,7 +334,12 @@ dlna_guess_media_profile (dlna_t *dlna,
+ p = p->next;
+ }
+
++#if LIBAVFORMAT_VERSION_MAJOR < 54
+ av_close_input_file (ctx);
++#else
++ avformat_close_input(&ctx);
++#endif
++
+ free (codecs);
+ return profile;
+ }
diff --git a/media-libs/libdlna/files/libdlna-0.2.4-libav9.patch b/media-libs/libdlna/files/libdlna-0.2.4-libav9.patch
new file mode 100644
index 000000000000..7b6deb055e75
--- /dev/null
+++ b/media-libs/libdlna/files/libdlna-0.2.4-libav9.patch
@@ -0,0 +1,11 @@
+--- a/src/profiles.c
++++ b/src/profiles.c
+@@ -287,7 +287,7 @@
+ return NULL;
+ }
+
+- if (av_find_stream_info (ctx) < 0)
++ if (avformat_find_stream_info (ctx, NULL) < 0)
+ {
+ if (dlna->verbosity)
+ fprintf (stderr, "can't find stream info\n");
diff --git a/media-libs/libdlna/libdlna-0.2.4.ebuild b/media-libs/libdlna/libdlna-0.2.4.ebuild
new file mode 100644
index 000000000000..702d5ddb1774
--- /dev/null
+++ b/media-libs/libdlna/libdlna-0.2.4.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="A reference open-source implementation of DLNA (Digital Living Network Alliance) standards"
+HOMEPAGE="http://libdlna.geexbox.org"
+SRC_URI="http://libdlna.geexbox.org/releases/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86 ~amd64-linux"
+
+DEPEND=">=virtual/ffmpeg-0.6.90"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-libav9.patch
+ # 540150
+ epatch "${FILESDIR}"/${P}-ffmpeg.patch
+
+ tc-export CC
+}
+
+src_configure() {
+ # I can't use econf
+ # --host is not implemented in ./configure file
+ ./configure \
+ --prefix="${EPREFIX}/usr" \
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \
+ --disable-static \
+ || die
+}
+
+src_compile() {
+ # not parallel safe, error "cannot find -ldlna"
+ emake -j1
+}
diff --git a/media-libs/libdlna/metadata.xml b/media-libs/libdlna/metadata.xml
new file mode 100644
index 000000000000..1470e032181b
--- /dev/null
+++ b/media-libs/libdlna/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-libs/libdmtx/Manifest b/media-libs/libdmtx/Manifest
new file mode 100644
index 000000000000..610e56849f64
--- /dev/null
+++ b/media-libs/libdmtx/Manifest
@@ -0,0 +1 @@
+DIST libdmtx-0.7.4.tar.gz 370999 SHA256 686bcfb44e50b96345aa53f41e285f2118a2cf87a333b69b74165a2e7ddca492
diff --git a/media-libs/libdmtx/libdmtx-0.7.4.ebuild b/media-libs/libdmtx/libdmtx-0.7.4.ebuild
new file mode 100644
index 000000000000..a36d6c58122c
--- /dev/null
+++ b/media-libs/libdmtx/libdmtx-0.7.4.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="Barcode data matrix reading and writing library"
+HOMEPAGE="http://www.libdmtx.org/"
+SRC_URI="mirror://sourceforge/project/${PN}/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ~arm ppc ppc64 x86 ~x86-fbsd"
+IUSE="static-libs"
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ find "${ED}" -name '*.la' -exec rm -f {} +
+}
diff --git a/media-libs/libdmtx/metadata.xml b/media-libs/libdmtx/metadata.xml
new file mode 100644
index 000000000000..d081f5e429f7
--- /dev/null
+++ b/media-libs/libdmtx/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="sourceforge">libdmtx</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libdv/Manifest b/media-libs/libdv/Manifest
new file mode 100644
index 000000000000..2bd5f7b65c11
--- /dev/null
+++ b/media-libs/libdv/Manifest
@@ -0,0 +1,2 @@
+DIST libdv-1.0.0-pic.patch.bz2 9771 SHA256 474a50d373e39dd8a0dac0b22f089e957d752145712f97f987ad18028f6d6a5e SHA512 18fbc341f9a9349f2325c4cbdf2fcf60bf0b35e2efeaacb9a3e541ace4ab2ffcf64d18409b2d76fd40c6096a69ffd151c2bdc8c33411d1640f150202eef12021 WHIRLPOOL e06d6c6a5919302572dc99f0cabdbf6f7c9c2ed7c203b2d1d1da39f054678892510ef9532c134f8e32de6b5449e2812e9e4b13750306ab1abee2ab6ebb6cefb3
+DIST libdv-1.0.0.tar.gz 574565 SHA256 a305734033a9c25541a59e8dd1c254409953269ea7c710c39e540bd8853389ba SHA512 19887a6f452fa7da8924901ad841f5c4a434a3bde56c932ddb43717592aa744281e3a8ad220231e11d7e6bc3b0e704952a8324e5f85d4e088675edceeeca7dc8 WHIRLPOOL 4b6fdeabf3c6d0ac0c3dc53a997dd4fce8ea569c1b1ae83b443ece6401cfef19593b72f33110f4f53eea88e3ec3372b509320d9987c6643af85301001b48e32e
diff --git a/media-libs/libdv/files/libdv-0.99-2.6.patch b/media-libs/libdv/files/libdv-0.99-2.6.patch
new file mode 100644
index 000000000000..c2663be353d4
--- /dev/null
+++ b/media-libs/libdv/files/libdv-0.99-2.6.patch
@@ -0,0 +1,17 @@
+--- libdv-0.99/libdv/enc_input.c 2002-12-31 23:04:02.000000000 +0000
++++ libdv-0.99/libdv/enc_input.c.plasmaroo 2003-12-30 16:42:19.000000000 +0000
+@@ -48,13 +48,13 @@
+
+ #if HAVE_DEV_VIDEO
+ #include <sys/types.h>
+-#include <linux/videodev.h>
+ #include <sys/time.h>
+ #include <unistd.h>
+ #include <fcntl.h>
+ #include <sys/stat.h>
+ #include <sys/ioctl.h>
+ #include <sys/mman.h>
++#include <linux/videodev.h>
+ #endif
+
+ // #define ARCH_X86 0
diff --git a/media-libs/libdv/libdv-1.0.0-r2.ebuild b/media-libs/libdv/libdv-1.0.0-r2.ebuild
new file mode 100644
index 000000000000..7b0dd9a08567
--- /dev/null
+++ b/media-libs/libdv/libdv-1.0.0-r2.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils libtool
+
+DESCRIPTION="Software codec for dv-format video (camcorders etc)"
+HOMEPAGE="http://libdv.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz
+ mirror://gentoo/${PN}-1.0.0-pic.patch.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="debug sdl static-libs xv"
+
+RDEPEND="dev-libs/popt
+ sdl? ( >=media-libs/libsdl-1.2.5 )
+ xv? ( x11-libs/libXv )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS=( AUTHORS ChangeLog INSTALL NEWS TODO )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.99-2.6.patch
+ epatch "${WORKDIR}"/${PN}-1.0.0-pic.patch
+ elibtoolize
+ epunt_cxx #74497
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ $(use_with debug) \
+ --disable-gtk \
+ --disable-gtktest \
+ $(use_enable sdl) \
+ $(use_enable xv)
+}
+
+src_install() {
+ default
+
+ find "${ED}" -name '*.la' -exec rm -f {} +
+}
diff --git a/media-libs/libdv/libdv-1.0.0-r3.ebuild b/media-libs/libdv/libdv-1.0.0-r3.ebuild
new file mode 100644
index 000000000000..03457d422188
--- /dev/null
+++ b/media-libs/libdv/libdv-1.0.0-r3.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils libtool flag-o-matic multilib-minimal
+
+DESCRIPTION="Software codec for dv-format video (camcorders etc)"
+HOMEPAGE="http://libdv.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz
+ mirror://gentoo/${PN}-1.0.0-pic.patch.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="static-libs"
+
+RDEPEND="dev-libs/popt
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20130224-r12
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS=( AUTHORS ChangeLog INSTALL NEWS TODO )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.99-2.6.patch
+ epatch "${WORKDIR}"/${PN}-1.0.0-pic.patch
+ elibtoolize
+ epunt_cxx #74497
+
+ append-cppflags "-I${S}"
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ $(use_enable static-libs static) \
+ --without-debug \
+ --disable-gtk \
+ --disable-gtktest
+ if ! multilib_is_native_abi ; then
+ sed -i \
+ -e 's/ encodedv//' \
+ Makefile || die
+ fi
+}
+
+multilib_src_install_all() {
+ prune_libtool_files --all
+ einstalldocs
+}
diff --git a/media-libs/libdv/metadata.xml b/media-libs/libdv/metadata.xml
new file mode 100644
index 000000000000..dbae49788e6e
--- /dev/null
+++ b/media-libs/libdv/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">libdv</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libdvb/Manifest b/media-libs/libdvb/Manifest
new file mode 100644
index 000000000000..bfa5ad75a7cd
--- /dev/null
+++ b/media-libs/libdvb/Manifest
@@ -0,0 +1 @@
+DIST libdvb-0.5.5.1.tar.gz 312295 SHA256 941e8020129111377652bd7253ea85e6c133fd1c23c66bd9fc0ca9eabab1385a
diff --git a/media-libs/libdvb/files/libdvb-0.5.5.1-autotools.patch b/media-libs/libdvb/files/libdvb-0.5.5.1-autotools.patch
new file mode 100644
index 000000000000..bf3ded22d60b
--- /dev/null
+++ b/media-libs/libdvb/files/libdvb-0.5.5.1-autotools.patch
@@ -0,0 +1,617 @@
+diff -urpN libdvb-0.5.5.1/autogen.sh libdvb-0.5.5.1.az/autogen.sh
+--- libdvb-0.5.5.1/autogen.sh 1970-01-01 02:00:00.000000000 +0200
++++ libdvb-0.5.5.1.az/autogen.sh 2006-07-24 20:12:24.000000000 +0200
+@@ -0,0 +1,9 @@
++#!/bin/bash
++
++aclocal-1.9 || exit 1
++libtoolize --automake -c -f || exit 1
++aclocal-1.9 || exit 1
++autoconf || exit 1
++autoheader || exit 1
++automake-1.9 -a -c || exit 1
++
+diff -urpN libdvb-0.5.5.1/config.mk libdvb-0.5.5.1.az/config.mk
+--- libdvb-0.5.5.1/config.mk 2005-03-22 15:23:25.000000000 +0200
++++ libdvb-0.5.5.1.az/config.mk 1970-01-01 02:00:00.000000000 +0200
+@@ -1,10 +0,0 @@
+-# -*- makefile -*-
+-#
+-
+-PREFIX = /usr/local
+-VERSION = 0.5.5.1
+-CFLAGS=-O2 -Wall -g
+-INCLUDES=-I. -I../include
+-TEST_PROGS= merge_dvb conv satscan cam_set cam_test quickscan cam_menu dump_TS
+-#CXX = g++-3.2
+-#CC = gcc-3.2
+diff -urpN libdvb-0.5.5.1/configure.ac libdvb-0.5.5.1.az/configure.ac
+--- libdvb-0.5.5.1/configure.ac 1970-01-01 02:00:00.000000000 +0200
++++ libdvb-0.5.5.1.az/configure.ac 2006-07-24 21:08:47.000000000 +0200
+@@ -0,0 +1,26 @@
++AC_PREREQ([2.59])
++AC_INIT([libdvb], [0.5.5.1], [mocm@metzlerbros.de])
++AM_INIT_AUTOMAKE
++AC_CONFIG_HEADER([config.h])
++
++dnl Checks for programs.
++AC_PROG_CC
++AC_PROG_CXX
++AC_ISC_POSIX
++AC_PROG_INSTALL
++AC_PROG_MAKE_SET
++AC_PROG_AWK
++
++AC_PROG_LIBTOOL
++
++AC_OUTPUT([
++ Makefile
++ include/Makefile
++ libdvb/Makefile
++ libdvbci/Makefile
++ libdvbmpeg/Makefile
++ dvb-mpegtools/Makefile
++ sample_progs/Makefile
++ samplerc/Makefile
++])
++
+diff -urpN libdvb-0.5.5.1/dvb-mpegtools/Makefile libdvb-0.5.5.1.az/dvb-mpegtools/Makefile
+--- libdvb-0.5.5.1/dvb-mpegtools/Makefile 2005-03-22 15:23:25.000000000 +0200
++++ libdvb-0.5.5.1.az/dvb-mpegtools/Makefile 1970-01-01 02:00:00.000000000 +0200
+@@ -1,82 +0,0 @@
+-
+-include ../config.mk
+-
+-DCFLAGS = $(CFLAGS) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
+-LIBS = -L../ -ldvbmpegtools
+-MFLAG = -M
+-MPLEXOBS = buffer.o inits.o interact.o systems.o domplex.o inptstrm.o \
+- multplex.o timecode.o mplex.o bits.o
+-
+-SRC = $(wildcard *.c)
+-CPPSRC = $(wildcard *.cpp)
+-CSRC = $(wildcard *.cc)
+-COBJ = $(notdir $(SRC:.c=.o))
+-LINKS = streamtype ts2pes ps2vid pes2aud_es pes2aud pes2vid_es pes2vid \
+- tspids pes2ts analyze pes_demux es_demux ts_demux ts_es_demux \
+- pesplot pes2ts2 pes_repack split_mpg cut_mpg ts2ps ts2es\
+- insert_pat_pmt get_http extract_pes extract_pes_payload\
+- change_aspect_1_1 change_aspect_4_3 change_aspect_16_9 \
+- change_aspect_221_1
+-
+-.PHONY: depend clean install uninstall
+-
+-
+-all: dvb-mpegtools_main dvb-mplex links audiofilter dvbaudio show_dvb_image
+-
+-links: dvb-mpegtools_main
+- for f in $(LINKS); do\
+- ln -sf dvb-mpegtools_main $$f ;\
+- done
+-
+-clean:
+- - rm -f *.o .depend dvb-mpegtools_main dvb-mplex ctest *~ $(LINKS) ctest audiofilter show_dvb_image\
+- dvbaudio
+-
+-dvb-mpegtools_main: main.o
+- $(CXX) main.o $(LIBS) -o $@
+-
+-ctest: mainc.o
+- $(CC) $(COBJ) -o $@
+-
+-dvb-mplex: $(MPLEXOBS)
+- $(CXX) $(MPLEXOBS) $(LIBS) -o $@
+-
+-dvbaudio: dvbaudio.o
+- $(CXX) dvbaudio.o $(LIBS) -ldvb -o $@
+-
+-audiofilter: audiofilter.o
+- $(CXX) audiofilter.o -o $@
+-
+-%.o: %.cc
+- $(CXX) -c $(DCFLAGS) $(INCLUDES) $(DEFINES) $<
+-
+-%.o: %.cpp
+- $(CXX) -c $(DCFLAGS) $(INCLUDES) $(DEFINES) $<
+-
+-%.o: %.c
+- $(CC) -c $(DCFLAGS) $(INCLUDES) $(DEFINES) $<
+-
+-install: dvb-mpegtools_main
+- install -D -m 755 dvb-mplex $(DESTDIR)$(PREFIX)/bin/dvb-mplex
+- install -m 755 audiofilter $(DESTDIR)$(PREFIX)/bin/
+- install -m 755 dvb-mpegtools_main $(DESTDIR)$(PREFIX)/bin/
+- install -m 755 dvbaudio $(DESTDIR)$(PREFIX)/bin/
+- install -m 755 show_dvb_image $(DESTDIR)$(PREFIX)/bin/
+- install -m 755 dia $(DESTDIR)$(PREFIX)/bin/
+- for f in $(LINKS); do\
+- (cd $(DESTDIR)$(PREFIX)/bin && ln -s -f dvb-mpegtools_main $$f) ;\
+- done
+-
+-uninstall:
+- for f in $(LINKS); do rm -f $(DESTDIR)$(PREFIX)/bin/$$f;done
+- rm -f $(DESTDIR)$(PREFIX)/bin/dvb-mpegtools_main
+- rm -f $(DESTDIR)$(PREFIX)/bin/dvbaudio
+- rm -f $(DESTDIR)$(PREFIX)/bin/audiofilter
+- rm -f $(DESTDIR)$(PREFIX)/lib/libdvbmpegtools
+-
+-.depend:
+- $(CXX) $(DEFINES) $(MFLAG) $(SRC) $(CSRC) $(CPPSRC) $(INCLUDES)> .depend
+-
+-
+-
+-include .depend
+diff -urpN libdvb-0.5.5.1/dvb-mpegtools/Makefile.am libdvb-0.5.5.1.az/dvb-mpegtools/Makefile.am
+--- libdvb-0.5.5.1/dvb-mpegtools/Makefile.am 1970-01-01 02:00:00.000000000 +0200
++++ libdvb-0.5.5.1.az/dvb-mpegtools/Makefile.am 2006-07-24 21:44:55.000000000 +0200
+@@ -0,0 +1,73 @@
++INCLUDES = -I$(top_srcdir)/include
++
++dist_bin_SCRIPTS = dia
++
++bin_PROGRAMS = \
++ dvb-mpegtools_main \
++ dvb-mplex \
++ audiofilter \
++ dvbaudio \
++ show_dvb_image
++
++# Don't build currently
++#noinst_PROGRAMS = ctest
++
++LF_FLAGS = \
++ -D_FILE_OFFSET_BITS=64 \
++ -D_LARGEFILE_SOURCE \
++ -D_LARGEFILE64_SOURCE
++
++LIBDVB = $(top_builddir)/libdvb/libdvb.la
++LIBDVBMPEG = $(top_builddir)/libdvbmpeg/libdvbmpegtools.la
++
++LINKS = \
++ streamtype ts2pes ps2vid pes2aud_es pes2aud pes2vid_es pes2vid \
++ tspids pes2ts analyze pes_demux es_demux ts_demux ts_es_demux \
++ pesplot pes2ts2 pes_repack split_mpg cut_mpg ts2ps ts2es \
++ insert_pat_pmt get_http extract_pes extract_pes_payload \
++ change_aspect_1_1 change_aspect_4_3 change_aspect_16_9 \
++ change_aspect_221_1
++
++dvb_mpegtools_main_LDADD = $(LIBDVBMPEG)
++dvb_mpegtools_main_CFLAGS = $(LF_FLAGS)
++dvb_mpegtools_main_SOURCES = main.cc
++
++dvb_mplex_LDADD = $(LIBDVBMPEG)
++dvb_mplex_CFLAGS = $(LF_FLAGS)
++dvb_mplex_SOURCES = \
++ bits.cpp \
++ domplex.cpp \
++ inptstrm.cpp \
++ mplex.cpp \
++ multplex.cpp \
++ timecode.cpp \
++ buffer.cpp \
++ inits.cpp \
++ interact.cpp \
++ common.h \
++ consts.h \
++ consts1.h \
++ main.h \
++ mplex.h \
++ systems.cpp
++
++dvbaudio_LDADD = $(LIBDVB) $(LIBDVBMPEG)
++dvbaudio_CFLAGS = $(LF_FLAGS)
++dvbaudio_SOURCES = dvbaudio.cc
++
++audiofilter_CFLAGS = $(LF_FLAGS)
++audiofilter_SOURCES = audiofilter.c
++
++show_dvb_image_CFLAGS = $(LF_FLAGS)
++show_dvb_image_SOURCES = show_dvb_image.c
++
++# Don't build currently
++#ctest_CFLAGS = $(LF_FLAGS)
++#ctest_SOURCES = mainc.c
++
++install-exec-hook:
++ @for x in $(LINKS) ; do \
++ rm -f $(DESTDIR)$(bindir)/$$x; \
++ $(LN_S) dvb-mpegtools_main $(DESTDIR)$(bindir)/$$x; \
++ done
++
+diff -urpN libdvb-0.5.5.1/include/Makefile.am libdvb-0.5.5.1.az/include/Makefile.am
+--- libdvb-0.5.5.1/include/Makefile.am 1970-01-01 02:00:00.000000000 +0200
++++ libdvb-0.5.5.1.az/include/Makefile.am 2006-07-24 20:16:18.000000000 +0200
+@@ -0,0 +1,13 @@
++dvbdir = $(pkgincludedir)
++dvb_HEADERS = \
++ channel.h \
++ ci.hh \
++ cpptools.hh \
++ ctools.h \
++ devices.hh \
++ DVB.hh \
++ OSD.h \
++ osd.hh \
++ ringbuffy.h \
++ transform.h
++
+diff -urpN libdvb-0.5.5.1/libdvb/Makefile libdvb-0.5.5.1.az/libdvb/Makefile
+--- libdvb-0.5.5.1/libdvb/Makefile 2005-03-22 15:23:25.000000000 +0200
++++ libdvb-0.5.5.1.az/libdvb/Makefile 1970-01-01 02:00:00.000000000 +0200
+@@ -1,26 +0,0 @@
+-
+-include ../config.mk
+-
+-OBJS=devices.o DVB.o OSD.o
+-LIBS=-L./ -lpthread
+-DVB_LIBS=libdvb.a
+-
+-main: $(DVB_LIBS)
+-
+-libdvb.a: $(OBJS)
+- ar -rcs libdvb.a $(OBJS)
+-
+-DVB.o: DVB.cc ../include/DVB.hh
+- $(CXX) $(INCLUDES) $(CFLAGS) -c $<
+-
+-devices.o: devices.cc ../include/devices.hh
+- $(CXX) $(INCLUDES) $(CFLAGS) -c $<
+-
+-.c.o:
+- $(CC) $(INCLUDES) $(CFLAGS) -c $<
+-
+-.cc.o:
+- $(CXX) $(INCLUDES) $(CFLAGS) -c $<
+-
+-clean:
+- -rm -f *.o $(DVB_LIBS) *~
+diff -urpN libdvb-0.5.5.1/libdvb/Makefile.am libdvb-0.5.5.1.az/libdvb/Makefile.am
+--- libdvb-0.5.5.1/libdvb/Makefile.am 1970-01-01 02:00:00.000000000 +0200
++++ libdvb-0.5.5.1.az/libdvb/Makefile.am 2006-07-24 20:20:58.000000000 +0200
+@@ -0,0 +1,12 @@
++AUTOMAKE_OPTIONS = foreign
++
++INCLUDES = -I$(top_srcdir)/include
++
++lib_LTLIBRARIES = libdvb.la
++
++libdvb_la_LDFLAGS = -lpthread
++libdvb_la_SOURCES = \
++ devices.cc \
++ DVB.cc \
++ OSD.c
++
+diff -urpN libdvb-0.5.5.1/libdvbci/Makefile libdvb-0.5.5.1.az/libdvbci/Makefile
+--- libdvb-0.5.5.1/libdvbci/Makefile 2005-03-22 15:23:25.000000000 +0200
++++ libdvb-0.5.5.1.az/libdvbci/Makefile 1970-01-01 02:00:00.000000000 +0200
+@@ -1,23 +0,0 @@
+-
+-include ../config.mk
+-
+-CI_OBJS=ci.o ci2.o
+-LIBS=-L./ -lpthread
+-DVB_LIBS=libdvbci.a
+-
+-main: $(DVB_LIBS)
+-
+-libdvbci.a: $(CI_OBJS)
+- ar -rcs libdvbci.a $(CI_OBJS)
+-
+-ci.o: ci.cc ../include/ci.hh
+- $(CXX) $(INCLUDES) $(CFLAGS) -c $<
+-
+-.c.o:
+- $(CC) $(INCLUDES) $(CFLAGS) -c $<
+-
+-.cc.o:
+- $(CXX) $(INCLUDES) $(CFLAGS) -c $<
+-
+-clean:
+- -rm -f *.o $(DVB_LIBS) *~
+diff -urpN libdvb-0.5.5.1/libdvbci/Makefile.am libdvb-0.5.5.1.az/libdvbci/Makefile.am
+--- libdvb-0.5.5.1/libdvbci/Makefile.am 1970-01-01 02:00:00.000000000 +0200
++++ libdvb-0.5.5.1.az/libdvbci/Makefile.am 2006-07-24 20:21:19.000000000 +0200
+@@ -0,0 +1,11 @@
++AUTOMAKE_OPTIONS = foreign
++
++INCLUDES = -I$(top_srcdir)/include
++
++lib_LTLIBRARIES = libdvbci.la
++
++libdvbci_la_LDFLAGS = -lpthread
++libdvbci_la_SOURCES = \
++ ci2.c \
++ ci.cc
++
+diff -urpN libdvb-0.5.5.1/libdvbmpeg/Makefile libdvb-0.5.5.1.az/libdvbmpeg/Makefile
+--- libdvb-0.5.5.1/libdvbmpeg/Makefile 2005-03-22 15:23:25.000000000 +0200
++++ libdvb-0.5.5.1.az/libdvbmpeg/Makefile 1970-01-01 02:00:00.000000000 +0200
+@@ -1,36 +0,0 @@
+-
+-include ../config.mk
+-
+-DCFLAGS = $(CFLAGS) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
+-MFLAG = -M
+-OBJS = ctools.o ringbuffy.o transform.o cpptools.o
+-SRC = $(wildcard *.c)
+-CPPSRC = $(wildcard *.cpp)
+-CSRC = $(wildcard *.cc)
+-INCS = -I../include
+-
+-all: libdvbmpegtools.a
+-
+-.PHONY: depend clean install uninstall
+-
+-clean:
+- - rm -f *.o *~ *.a .depend
+-
+-libdvbmpegtools.a: $(OBJS)
+- ar -rcs libdvbmpegtools.a $(OBJS)
+-
+-%.o: %.cc
+- $(CXX) -c $(DCFLAGS) $(INCLUDES) $(DEFINES) $<
+-
+-%.o: %.cpp
+- $(CXX) -c $(DCFLAGS) $(INCLUDES) $(DEFINES) $<
+-
+-%.o: %.c
+- $(CC) -c $(DCFLAGS) $(INCLUDES) $(DEFINES) $<
+-
+-.depend:
+- $(CXX) $(DEFINES) $(MFLAG) $(SRC) $(CSRC) $(CPPSRC) $(INCLUDES)> .depend
+-
+-
+-
+-include .depend
+diff -urpN libdvb-0.5.5.1/libdvbmpeg/Makefile.am libdvb-0.5.5.1.az/libdvbmpeg/Makefile.am
+--- libdvb-0.5.5.1/libdvbmpeg/Makefile.am 1970-01-01 02:00:00.000000000 +0200
++++ libdvb-0.5.5.1.az/libdvbmpeg/Makefile.am 2006-07-24 20:21:30.000000000 +0200
+@@ -0,0 +1,21 @@
++AUTOMAKE_OPTIONS = foreign
++
++INCLUDES = -I$(top_srcdir)/include
++
++lib_LTLIBRARIES = libdvbmpegtools.la
++
++LF_FLAGS = \
++ -D_FILE_OFFSET_BITS=64 \
++ -D_LARGEFILE_SOURCE \
++ -D_LARGEFILE64_SOURCE
++
++libdvbmpegtools_la_CFLAGS = $(LF_FLAGS)
++libdvbmpegtools_la_CXXFLAGS = $(LF_FLAGS)
++libdvbmpegtools_la_LDFLAGS = -lpthread
++libdvbmpegtools_la_SOURCES = \
++ cpptools.cc \
++ ctools.c \
++ remux.c \
++ ringbuffy.c \
++ transform.c
++
+diff -urpN libdvb-0.5.5.1/Makefile libdvb-0.5.5.1.az/Makefile
+--- libdvb-0.5.5.1/Makefile 2005-03-22 15:23:25.000000000 +0200
++++ libdvb-0.5.5.1.az/Makefile 1970-01-01 02:00:00.000000000 +0200
+@@ -1,82 +0,0 @@
+-
+-SOURCEDIRS=include libdvb libdvbci libdvbmpeg sample_progs dvb-mpegtools samplerc
+-DVB-MPEGTOOLS= dvb-mpegtools_main dvb-mplex audiofilter dvbaudio
+-DVB_LIBS=libdvb.a libdvbci.a libdvbmpegtools.a
+-HEADERS=include/DVB.hh include/ci.hh include/devices.hh include/channel.h include/ctools.h \
+- include/transform.h include/ringbuffy.h include/cpptools.hh include/OSD.h \
+- include/osd.hh
+-
+-RESOURCES=README
+-include config.mk
+-
+-
+-
+-main: $(DVB_LIBS) $(TEST_PROGS) $(DVB-MPEGTOOLS)
+-
+-install: $(DVB_LIBS) $(HEADERS)
+- mkdir -p $(DESTDIR)$(PREFIX)/lib
+- install -m 644 $(DVB_LIBS) $(DESTDIR)$(PREFIX)/lib/
+- mkdir -p $(DESTDIR)$(PREFIX)/include
+- install -m 644 $(HEADERS) $(DESTDIR)$(PREFIX)/include/
+- make -C dvb-mpegtools install
+-
+-uninstall:
+- for i in $(DVB_LIBS); do rm -f $(DESTDIR)$(PREFIX)/lib/$$i;done
+- for i in $(HEADERS); do rm -f $(DESTDIR)$(PREFIX)/$$i;done
+- make -C dvb-mpegtools uninstall
+-
+-libdvb.a: libdvb/libdvb.a
+- cp libdvb/libdvb.a .
+-
+-libdvbci.a: libdvbci/libdvbci.a
+- cp libdvbci/libdvbci.a .
+-
+-libdvbmpegtools.a: libdvbmpeg/libdvbmpegtools.a
+- cp libdvbmpeg/libdvbmpegtools.a .
+-
+-libdvb/libdvb.a:
+- make -C libdvb main
+-
+-libdvbci/libdvbci.a:
+- make -C libdvbci main
+-
+-libdvbmpeg/libdvbmpegtools.a:
+- make -C libdvbmpeg libdvbmpegtools.a
+-
+-merge_dvb: libdvb.a sample_progs/merge.cc
+-conv: libdvb.a sample_progs/conv.cc
+-satscan: libdvb.a sample_progs/satscan.cc
+-quickscan: libdvb.a sample_progs/quickscan.cc
+-cam_set: libdvbci.a sample_progs/cam_set.cc
+-cam_test: libdvb.a libdvbmpegtools.a sample_progs/cam_test.cc
+- make -C sample_progs main
+- for f in $(TEST_PROGS); do cp sample_progs/$$f . ; done
+-
+-dvb-mpegtools_main: libdvbmpegtools.a dvb-mpegtools/main.cc
+-dvb-mplex: libdvbmpegtools.a dvb-mpegtools/mplex.cpp
+-audiofilter: dvb-mpegtools/audiofilter.c
+-dvbaudio: libdvb.a libdvbmpegtools.a dvb-mpegtools/dvbaudio.cc
+- make -C dvb-mpegtools all
+- for f in $(DVB-MPEGTOOLS); do cp dvb-mpegtools/$$f . ; done
+-
+-dvbs: libdvb.a libdvbmpegtools.a dvbserver/dvbs_main.cc
+- make -C dvbserver dvbs_main
+-
+-
+-clean:
+- -rm -f libdvb-$(VERSION).tar.gz $(DVB_LIBS) $(TEST_PROGS) $(DVB-MPEGTOOLS) *~
+- make -C libdvb clean
+- make -C libdvbci clean
+- make -C libdvbmpeg clean
+- make -C sample_progs clean
+- make -C dvb-mpegtools clean
+- rm include/*~
+-
+-dist:
+- mkdir libdvb-$(VERSION)
+- for f in $(SOURCEDIRS); do mkdir libdvb-$(VERSION)/$$f;done
+- cp -r $(SOURCEDIRS) libdvb-$(VERSION)
+- for f in $(SOURCEDIRS); do rm -rf libdvb-$(VERSION)/$$f/CVS;done
+- cp COPYING README Makefile config.mk libdvb-$(VERSION)
+- tar zcf libdvb-$(VERSION).tar.gz libdvb-$(VERSION)
+- rm -rf libdvb-$(VERSION)
+diff -urpN libdvb-0.5.5.1/Makefile.am libdvb-0.5.5.1.az/Makefile.am
+--- libdvb-0.5.5.1/Makefile.am 1970-01-01 02:00:00.000000000 +0200
++++ libdvb-0.5.5.1.az/Makefile.am 2006-07-24 21:07:35.000000000 +0200
+@@ -0,0 +1,9 @@
++SUBDIRS = \
++ include \
++ libdvb \
++ libdvbci \
++ libdvbmpeg \
++ dvb-mpegtools \
++ sample_progs \
++ samplerc
++
+diff -urpN libdvb-0.5.5.1/sample_progs/cam_menu.cc libdvb-0.5.5.1.az/sample_progs/cam_menu.cc
+--- libdvb-0.5.5.1/sample_progs/cam_menu.cc 2005-03-22 15:23:25.000000000 +0200
++++ libdvb-0.5.5.1.az/sample_progs/cam_menu.cc 2006-07-24 21:14:18.000000000 +0200
+@@ -46,7 +46,7 @@ void reset_keypress()
+
+ void byebye(int i, void *f)
+ {
+- int fd = (int) f;
++ long fd = (long) f;
+
+ CamPacket cp(fd, CMENU_CLOSE, 0, NULL);
+ cp.psend();
+diff -urpN libdvb-0.5.5.1/sample_progs/Makefile libdvb-0.5.5.1.az/sample_progs/Makefile
+--- libdvb-0.5.5.1/sample_progs/Makefile 2005-03-22 15:23:25.000000000 +0200
++++ libdvb-0.5.5.1.az/sample_progs/Makefile 1970-01-01 02:00:00.000000000 +0200
+@@ -1,48 +0,0 @@
+-
+-include ../config.mk
+-
+-LIBS=-L../
+-DVB_LIBS=libdvb.a libdvbci.a
+-HEADERS=DVB.hh ci.hh devices.hh channel.h
+-SOURCES=Makefile $(HEADERS) DVB.cc ci.cc devices.cc OSD.h OSD.c osd.hh\
+- merge.cc conv.cc satscan.cc cam_set.cc cam_test.cc quickscan.cc cam_menu.cc
+-RESOURCES=README astrarc hotbirdrc
+-
+-main: $(TEST_PROGS)
+-
+-dump_TS: dump_TS.cc ../libdvb/libdvb.a ../include/DVB.hh
+- $(CXX) $(LIBS) $(INCLUDES) $(CFLAGS) -o dump_TS dump_TS.cc -ldvb -ldvbmpegtools
+-
+-merge_dvb: merge.cc ../libdvb/libdvb.a ../include/DVB.hh
+- $(CXX) $(LIBS) $(INCLUDES) $(CFLAGS) -o merge_dvb merge.cc -ldvb
+-
+-conv: conv.cc ../libdvb/libdvb.a ../include/DVB.hh
+- $(CXX) $(LIBS) $(INCLUDES) $(CFLAGS) -o conv conv.cc -ldvb
+-
+-satscan: satscan.cc ../libdvb/libdvb.a ../include/DVB.hh
+- $(CXX) $(LIBS) $(INCLUDES) $(CFLAGS) -o satscan satscan.cc -ldvb
+-
+-quickscan: quickscan.cc ../libdvb/libdvb.a ../include/DVB.hh
+- $(CXX) $(LIBS) $(INCLUDES) $(CFLAGS) -o quickscan quickscan.cc -ldvb
+-
+-cam_set: cam_set.cc cam_menu.hh ../libdvbci/libdvbci.a ../include/ci.hh
+- $(CXX) $(LIBS) $(INCLUDES) $(CFLAGS) -o cam_set cam_set.cc -ldvbci
+-
+-cam_test: cam_test.cc ../libdvb/libdvb.a ../include/DVB.hh ../include/ci.hh
+- $(CXX) $(LIBS) $(INCLUDES) -o cam_test cam_test.cc -ldvb -ldvbmpegtools
+-
+-cam_menu: cam_menu.cc cam_menu.hh ../libdvb/libdvb.a ../include/DVB.hh
+- $(CXX) $(LIBS) $(INCLUDES) -o cam_menu cam_menu.cc -ldvb
+-
+-status_check: status_check.c
+- $(CC) $(INCLUDES) $(CFLAGS) -o status_check status_check.c
+-
+-.c.o:
+- $(CC) $(INCLUDES) $(CFLAGS) -c $<
+-
+-.cc.o:
+- $(CXX) $(INCLUDES) $(CFLAGS) -c $<
+-
+-clean:
+- -rm -f *.o $(TEST_PROGS) *~
+-
+diff -urpN libdvb-0.5.5.1/sample_progs/Makefile.am libdvb-0.5.5.1.az/sample_progs/Makefile.am
+--- libdvb-0.5.5.1/sample_progs/Makefile.am 1970-01-01 02:00:00.000000000 +0200
++++ libdvb-0.5.5.1.az/sample_progs/Makefile.am 2006-07-24 21:23:45.000000000 +0200
+@@ -0,0 +1,45 @@
++INCLUDES = -I$(top_srcdir)/include
++
++noinst_PROGRAMS = \
++ merge_dvb \
++ conv \
++ satscan \
++ cam_set \
++ cam_test \
++ quickscan \
++ cam_menu \
++ dump_TS
++# Not building currently
++# status_check
++
++LIBDVB = $(top_builddir)/libdvb/libdvb.la
++LIBDVBCI = $(top_builddir)/libdvbci/libdvbci.la
++LIBDVBMPEG = $(top_builddir)/libdvbmpeg/libdvbmpegtools.la
++
++dump_TS_LDADD = $(LIBDVB) $(LIBDVBMPEG)
++dump_TS_SOURCES = dump_TS.cc
++
++merge_dvb_LDADD = $(LIBDVB)
++merge_dvb_SOURCES = merge.cc
++
++conv_LDADD = $(LIBDVB)
++conv_SOURCES = conv.cc
++
++satscan_LDADD = $(LIBDVB)
++satscan_SOURCES = satscan.cc
++
++quickscan_LDADD = $(LIBDVB)
++quickscan_SOURCES = quickscan.cc
++
++cam_set_LDADD = $(LIBDVBCI)
++cam_set_SOURCES = cam_set.cc cam_menu.hh
++
++cam_test_LDADD = $(LIBDVB) $(LIBDVBMPEG)
++cam_test_SOURCES = cam_test.cc
++
++cam_menu_LDADD = $(LIBDVB)
++cam_menu_SOURCES = cam_menu.cc cam_menu.hh
++
++# Not building currently
++#status_check_SOURCES = status_check.c
++
+diff -urpN libdvb-0.5.5.1/samplerc/Makefile.am libdvb-0.5.5.1.az/samplerc/Makefile.am
+--- libdvb-0.5.5.1/samplerc/Makefile.am 1970-01-01 02:00:00.000000000 +0200
++++ libdvb-0.5.5.1.az/samplerc/Makefile.am 2006-07-24 21:06:49.000000000 +0200
+@@ -0,0 +1,11 @@
++EXTRA_DIST = \
++ 28erc \
++ astrarc \
++ astra.xml \
++ dvbt-koeln \
++ hotbirdrc \
++ nokia.dat \
++ siriusrc \
++ thorrc \
++ w2-16.nokia
++
diff --git a/media-libs/libdvb/files/libdvb-0.5.5.1-gcc43.patch b/media-libs/libdvb/files/libdvb-0.5.5.1-gcc43.patch
new file mode 100644
index 000000000000..8f9ea6b76d6e
--- /dev/null
+++ b/media-libs/libdvb/files/libdvb-0.5.5.1-gcc43.patch
@@ -0,0 +1,20 @@
+--- libdvb-0.5.5.1.orig/sample_progs/cam_menu.hh 2008-01-28 10:23:53.000000000 +0100
++++ libdvb-0.5.5.1/sample_progs/cam_menu.hh 2008-01-28 10:22:55.000000000 +0100
+@@ -2,6 +2,7 @@
+ * cam_menu.hh
+ *
+ */
++#include <cstring>
+ #include <sys/types.h>
+ #include <sys/socket.h>
+
+--- libdvb-0.5.5.1.orig/libdvbmpeg/ringbuffy.c 2007-03-16 17:53:31.000000000 +0100
++++ libdvb-0.5.5.1/libdvbmpeg/ringbuffy.c 2007-03-16 17:54:10.000000000 +0100
+@@ -19,6 +19,7 @@
+ */
+
+ #include "ringbuffy.h"
++#include <string.h>
+
+ int ring_init (ringbuffy *rbuf, int size)
+ {
diff --git a/media-libs/libdvb/files/libdvb-0.5.5.1-gentoo-file-collisions.patch b/media-libs/libdvb/files/libdvb-0.5.5.1-gentoo-file-collisions.patch
new file mode 100644
index 000000000000..408c62c28112
--- /dev/null
+++ b/media-libs/libdvb/files/libdvb-0.5.5.1-gentoo-file-collisions.patch
@@ -0,0 +1,129 @@
+diff -ru libdvb-0.5.5.1-orig/dvb-mpegtools/main.cc libdvb-0.5.5.1/dvb-mpegtools/main.cc
+--- libdvb-0.5.5.1-orig/dvb-mpegtools/main.cc 2006-01-21 14:16:09.919104500 +0100
++++ libdvb-0.5.5.1/dvb-mpegtools/main.cc 2006-01-21 14:16:38.460888250 +0100
+@@ -54,7 +54,7 @@
+
+ #define PROGS 29
+
+-char *prognames[PROGS+1] = { "streamtype", // 0
++char *prognames[PROGS+1] = { "streamtype_mpg", // 0
+ "ts2pes", // 1
+ "ps2vid",
+ "pes2aud_es",
+@@ -63,7 +63,7 @@
+ "pes2vid",
+ "tspids",
+ "pes2ts",
+- "analyze",
++ "analyze_mpg",
+ "pes_demux", // 10
+ "es_demux",
+ "ts_demux",
+@@ -87,7 +87,7 @@
+ };
+
+
+-enum { streamtype_, // 0
++enum { streamtype_mpg_, // 0
+ ts2pes_, // 1
+ ps2vid_,
+ pes2aud_es_,
+@@ -96,7 +96,7 @@
+ pes2vid_,
+ tspids_,
+ pes2ts_,
+- analyze_,
++ analyze_mpg_,
+ pes_demux_, // 10
+ es_demux_,
+ ts_demux_,
+@@ -123,9 +123,9 @@
+ {
+ switch(progn) {
+
+- case streamtype_:
+- cerr << "usage: streamtype <filename>" << endl;
+- cerr << "or streamtype < <filename> (or pipe)" << endl;
++ case streamtype_mpg_:
++ cerr << "usage: streamtype_mpg <filename>" << endl;
++ cerr << "or streamtype_mpg < <filename> (or pipe)" << endl;
+ break;
+
+ case ts2pes_:
+@@ -175,9 +175,9 @@
+ cerr << " (or pipe)" << endl;
+ break;
+
+- case analyze_:
+- cerr << "usage: analyze <filename>" << endl;
+- cerr << " or analyze < <filename> (or pipe)" << endl;
++ case analyze_mpg_:
++ cerr << "usage: analyze_mpg <filename>" << endl;
++ cerr << " or analyze_mpg < <filename> (or pipe)" << endl;
+ break;
+
+ case pes_demux_:
+@@ -320,7 +320,7 @@
+ }
+
+ switch( progn ) {
+- case streamtype_: {
++ case streamtype_mpg_: {
+ char *streams[4] = { "PS_STREAM", "TS_STREAM"
+ , "PES_STREAM"};
+ char *tv_form[3] = {"DUNNO", "PAL", "NTSC"};
+@@ -426,7 +426,7 @@
+ }
+ break;
+
+- case analyze_:
++ case analyze_mpg_:
+ if (fd == STDIN_FILENO) {
+ analyze(cin);
+ } else {
+diff -ru libdvb-0.5.5.1-orig/dvb-mpegtools/Makefile libdvb-0.5.5.1/dvb-mpegtools/Makefile
+--- libdvb-0.5.5.1-orig/dvb-mpegtools/Makefile 2006-01-21 14:16:09.919104500 +0100
++++ libdvb-0.5.5.1/dvb-mpegtools/Makefile 2006-01-21 14:16:38.460888250 +0100
+@@ -11,8 +11,8 @@
+ CPPSRC = $(wildcard *.cpp)
+ CSRC = $(wildcard *.cc)
+ COBJ = $(notdir $(SRC:.c=.o))
+-LINKS = streamtype ts2pes ps2vid pes2aud_es pes2aud pes2vid_es pes2vid \
+- tspids pes2ts analyze pes_demux es_demux ts_demux ts_es_demux \
++LINKS = streamtype_mpg ts2pes ps2vid pes2aud_es pes2aud pes2vid_es pes2vid \
++ tspids pes2ts analyze_mpg pes_demux es_demux ts_demux ts_es_demux \
+ pesplot pes2ts2 pes_repack split_mpg cut_mpg ts2ps ts2es\
+ insert_pat_pmt get_http extract_pes extract_pes_payload\
+ change_aspect_1_1 change_aspect_4_3 change_aspect_16_9 \
+diff -ru libdvb-0.5.5.1-orig/dvb-mpegtools/README libdvb-0.5.5.1/dvb-mpegtools/README
+--- libdvb-0.5.5.1-orig/dvb-mpegtools/README 2006-01-21 14:16:09.923104750 +0100
++++ libdvb-0.5.5.1/dvb-mpegtools/README 2006-01-21 14:24:06.020859000 +0100
+@@ -21,10 +21,10 @@
+ get_http http://mymachine:8090/test.avi | mplayer -
+ usage: get_http <URL>
+
+-streamtype
++streamtype_mpg (original name was streamtype, renamed to avoid name collisions)
+ tries to recognize the stream type and gives information about the stream.
+-usage: streamtype <filename>
+-or streamtype < <filename> (or pipe)
++usage: streamtype_mpg <filename>
++or streamtype_mpg < <filename> (or pipe)
+
+ ts2ps
+ ts2pes
+@@ -70,11 +70,11 @@
+ usage: pes2ts2 <filename> <audio PID> <video PID>
+ or pes2ts2 < <filename> <audio PID> <video PID> (or pipe)
+
+-analyze
++analyze_mpg (original name was analyze, renamed to avoid name collisions)
+ gives some information about a PS/PES stream and all the packets
+ contained therein.
+-usage: analyze <filename>
+-or analyze < <filename> (or pipe)
++usage: analyze_mpg <filename>
++or analyze_mpg < <filename> (or pipe)
+
+ pes_demux
+ es_demux
diff --git a/media-libs/libdvb/files/libdvb-0.5.5.1-gentoo.patch b/media-libs/libdvb/files/libdvb-0.5.5.1-gentoo.patch
new file mode 100644
index 000000000000..2820abfc65a0
--- /dev/null
+++ b/media-libs/libdvb/files/libdvb-0.5.5.1-gentoo.patch
@@ -0,0 +1,33 @@
+--- Makefile.orig 2005-03-22 14:23:25.000000000 +0100
++++ Makefile 2005-04-06 16:25:50.000000000 +0200
+@@ -11,7 +11,7 @@
+
+
+
+-main: $(DVB_LIBS) $(TEST_PROGS) $(DVB-MPEGTOOLS)
++main: $(DVB_LIBS) $(DVB-MPEGTOOLS)
+
+ install: $(DVB_LIBS) $(HEADERS)
+ mkdir -p $(DESTDIR)$(PREFIX)/lib
+--- config.mk.orig 2005-03-22 14:23:25.000000000 +0100
++++ config.mk 2005-04-06 16:27:14.000000000 +0200
+@@ -1,7 +1,7 @@
+ # -*- makefile -*-
+ #
+
+-PREFIX = /usr/local
++PREFIX = /usr
+ VERSION = 0.5.5.1
+ CFLAGS=-O2 -Wall -g
+ INCLUDES=-I. -I../include
+--- dvb-mpegtools/Makefile.orig 2005-03-22 14:23:25.000000000 +0100
++++ dvb-mpegtools/Makefile 2005-04-06 16:28:08.000000000 +0200
+@@ -62,7 +62,7 @@
+ install -m 755 dvb-mpegtools_main $(DESTDIR)$(PREFIX)/bin/
+ install -m 755 dvbaudio $(DESTDIR)$(PREFIX)/bin/
+ install -m 755 show_dvb_image $(DESTDIR)$(PREFIX)/bin/
+- install -m 755 dia $(DESTDIR)$(PREFIX)/bin/
++ install -m 755 dia $(DESTDIR)$(PREFIX)/bin/dia_dvb
+ for f in $(LINKS); do\
+ (cd $(DESTDIR)$(PREFIX)/bin && ln -s -f dvb-mpegtools_main $$f) ;\
+ done
diff --git a/media-libs/libdvb/files/libdvb-0.5.5.1-rename-analyze.patch b/media-libs/libdvb/files/libdvb-0.5.5.1-rename-analyze.patch
new file mode 100644
index 000000000000..23b4f22e44f6
--- /dev/null
+++ b/media-libs/libdvb/files/libdvb-0.5.5.1-rename-analyze.patch
@@ -0,0 +1,129 @@
+diff -ru libdvb-0.5.5.1-orig/dvb-mpegtools/main.cc libdvb-0.5.5.1/dvb-mpegtools/main.cc
+--- libdvb-0.5.5.1-orig/dvb-mpegtools/main.cc 2006-07-24 21:48:22.000000000 +0200
++++ libdvb-0.5.5.1/dvb-mpegtools/main.cc 2006-07-24 21:50:03.000000000 +0200
+@@ -54,7 +54,7 @@
+
+ #define PROGS 29
+
+-char *prognames[PROGS+1] = { "streamtype", // 0
++char *prognames[PROGS+1] = { "streamtype_mpg", // 0
+ "ts2pes", // 1
+ "ps2vid",
+ "pes2aud_es",
+@@ -63,7 +63,7 @@
+ "pes2vid",
+ "tspids",
+ "pes2ts",
+- "analyze",
++ "analyze_mpg",
+ "pes_demux", // 10
+ "es_demux",
+ "ts_demux",
+@@ -87,7 +87,7 @@
+ };
+
+
+-enum { streamtype_, // 0
++enum { streamtype_mpg_, // 0
+ ts2pes_, // 1
+ ps2vid_,
+ pes2aud_es_,
+@@ -96,7 +96,7 @@
+ pes2vid_,
+ tspids_,
+ pes2ts_,
+- analyze_,
++ analyze_mpg_,
+ pes_demux_, // 10
+ es_demux_,
+ ts_demux_,
+@@ -123,9 +123,9 @@
+ {
+ switch(progn) {
+
+- case streamtype_:
+- cerr << "usage: streamtype <filename>" << endl;
+- cerr << "or streamtype < <filename> (or pipe)" << endl;
++ case streamtype_mpg_:
++ cerr << "usage: streamtype_mpg <filename>" << endl;
++ cerr << "or streamtype_mpg < <filename> (or pipe)" << endl;
+ break;
+
+ case ts2pes_:
+@@ -175,9 +175,9 @@
+ cerr << " (or pipe)" << endl;
+ break;
+
+- case analyze_:
+- cerr << "usage: analyze <filename>" << endl;
+- cerr << " or analyze < <filename> (or pipe)" << endl;
++ case analyze_mpg_:
++ cerr << "usage: analyze_mpg <filename>" << endl;
++ cerr << " or analyze_mpg < <filename> (or pipe)" << endl;
+ break;
+
+ case pes_demux_:
+@@ -320,7 +320,7 @@
+ }
+
+ switch( progn ) {
+- case streamtype_: {
++ case streamtype_mpg_: {
+ char *streams[4] = { "PS_STREAM", "TS_STREAM"
+ , "PES_STREAM"};
+ char *tv_form[3] = {"DUNNO", "PAL", "NTSC"};
+@@ -426,7 +426,7 @@
+ }
+ break;
+
+- case analyze_:
++ case analyze_mpg_:
+ if (fd == STDIN_FILENO) {
+ analyze(cin);
+ } else {
+diff -ru libdvb-0.5.5.1-orig/dvb-mpegtools/Makefile.am libdvb-0.5.5.1/dvb-mpegtools/Makefile.am
+--- libdvb-0.5.5.1-orig/dvb-mpegtools/Makefile.am 2006-07-24 21:48:22.000000000 +0200
++++ libdvb-0.5.5.1/dvb-mpegtools/Makefile.am 2006-07-24 22:04:56.000000000 +0200
+@@ -21,8 +21,8 @@
+ LIBDVBMPEG = $(top_builddir)/libdvbmpeg/libdvbmpegtools.la
+
+ LINKS = \
+- streamtype ts2pes ps2vid pes2aud_es pes2aud pes2vid_es pes2vid \
+- tspids pes2ts analyze pes_demux es_demux ts_demux ts_es_demux \
++ streamtype_mpg ts2pes ps2vid pes2aud_es pes2aud pes2vid_es pes2vid \
++ tspids pes2ts analyze_mpg pes_demux es_demux ts_demux ts_es_demux \
+ pesplot pes2ts2 pes_repack split_mpg cut_mpg ts2ps ts2es \
+ insert_pat_pmt get_http extract_pes extract_pes_payload \
+ change_aspect_1_1 change_aspect_4_3 change_aspect_16_9 \
+diff -ru libdvb-0.5.5.1-orig/dvb-mpegtools/README libdvb-0.5.5.1/dvb-mpegtools/README
+--- libdvb-0.5.5.1-orig/dvb-mpegtools/README 2006-07-24 21:48:22.000000000 +0200
++++ libdvb-0.5.5.1/dvb-mpegtools/README 2006-07-24 21:50:03.000000000 +0200
+@@ -21,10 +21,10 @@
+ get_http http://mymachine:8090/test.avi | mplayer -
+ usage: get_http <URL>
+
+-streamtype
++streamtype_mpg (original name was streamtype, renamed to avoid name collisions)
+ tries to recognize the stream type and gives information about the stream.
+-usage: streamtype <filename>
+-or streamtype < <filename> (or pipe)
++usage: streamtype_mpg <filename>
++or streamtype_mpg < <filename> (or pipe)
+
+ ts2ps
+ ts2pes
+@@ -70,11 +70,11 @@
+ usage: pes2ts2 <filename> <audio PID> <video PID>
+ or pes2ts2 < <filename> <audio PID> <video PID> (or pipe)
+
+-analyze
++analyze_mpg (original name was analyze, renamed to avoid name collisions)
+ gives some information about a PS/PES stream and all the packets
+ contained therein.
+-usage: analyze <filename>
+-or analyze < <filename> (or pipe)
++usage: analyze_mpg <filename>
++or analyze_mpg < <filename> (or pipe)
+
+ pes_demux
+ es_demux
diff --git a/media-libs/libdvb/libdvb-0.5.5.1-r3.ebuild b/media-libs/libdvb/libdvb-0.5.5.1-r3.ebuild
new file mode 100644
index 000000000000..abba9da4242d
--- /dev/null
+++ b/media-libs/libdvb/libdvb-0.5.5.1-r3.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils autotools
+
+DESCRIPTION="libdvb package with added CAM library and libdvbmpegtools as well as dvb-mpegtools"
+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="doc"
+
+DEPEND="virtual/linuxtv-dvb-headers"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}/${P}-autotools.patch"
+ epatch "${FILESDIR}/${P}-rename-analyze.patch"
+ epatch "${FILESDIR}/${P}-gcc43.patch"
+
+ eautoreconf
+}
+
+src_install() {
+ #einstall DESTDIR="${D}" || die "Install problem"
+ insinto /usr/$(get_libdir)
+ make DESTDIR="${D}" PREFIX=/usr LIBDIR=$(get_libdir) install || die "Problem at make install"
+
+ cd "${D}"/usr/bin
+ mv dia dia_dvb
+
+ cd "${S}"
+ if use doc; then
+ insinto "/usr/share/doc/${PF}/sample_progs"
+ doins sample_progs/*
+ insinto "/usr/share/doc/${PF}/samplerc"
+ doins samplerc/*
+ fi
+
+ elog "The script called 'dia' has been installed as dia_dvb"
+ elog "so that it doesn't overwrite the binary of app-office/dia."
+ elog "analyze has been renamed to analyze_mpg."
+
+ dodoc README
+}
diff --git a/media-libs/libdvb/metadata.xml b/media-libs/libdvb/metadata.xml
new file mode 100644
index 000000000000..a6b9e38a1b93
--- /dev/null
+++ b/media-libs/libdvb/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-libs/libdvbpsi/Manifest b/media-libs/libdvbpsi/Manifest
new file mode 100644
index 000000000000..373f4c36f87f
--- /dev/null
+++ b/media-libs/libdvbpsi/Manifest
@@ -0,0 +1,6 @@
+DIST libdvbpsi-0.2.1.tar.bz2 330137 SHA256 f2b9004f39dd6541538f5403041870ba75fdde8a9ec9821a7e2f5d268f61b0b7 SHA512 93ec2881ffd15bbcb723746717ea73afca74b6dcbb3a2db3d8a98fdcc92be7b9508cd813d8bf22b899c99e7246e495df4108ab2b7ac9d33605bcf9e361826366 WHIRLPOOL cf06961205e601960257ddd7ca8cc16d659574376fdf884b7d52fd4f377774b8da350b27f099964d887d116438df9af96179074882f7359ff4745995c6456123
+DIST libdvbpsi-0.2.2.tar.bz2 330403 SHA256 9aa62345c8fed04a4f59524967fb154e3f9b02625666a200861555dcb9163ed3 SHA512 9077a87d31b6c142773d68a5679a5b864df1c063f66d8b405964127b5e2f0b6b8ab4c1c003f873c221ba5657022667bfdb19cc399211be52bbc94a227de262a7 WHIRLPOOL e7fd34d5e4217a6f0b8d854c39810b48e9d31b49594185ad0c19c78c24681387b3691da7c1810467a0e630590c91f553d74a18269569735c347338effe3cb671
+DIST libdvbpsi-1.1.0.tar.bz2 443464 SHA256 c02ca4a9159b540955ddb8183f08292a94bdf6b95800161e9e8eff777e552380 SHA512 1302eeb5310db5ed0f979b46aa972f6cbca9f76c2ce40fa418ed904b63651bf5ceda2c2472772e7c1c919dc6cb1ea1892e795b7cdb237f28aafb0d692a3d1d7e WHIRLPOOL acdc55e18b90945df95f296cbdde5f68c79dca752e50860e41a45c3504f49933b0de3d30f71039649d476209618d37ebc246a01fb589b78db6f2979bacf89d2a
+DIST libdvbpsi-1.1.2.tar.bz2 450573 SHA256 22436366beaa1bff27b3f6d80e43de1012b16d3b63b1e22d37d4a6fcb5db8933 SHA512 9102157467b5b1d1cc42574ce0b6e250974a138ad402eff6707fed1656aeefc19ccff8b041cfef8dd10d8ca3914e83272c0683aa8e7cb59970e619db65eb6167 WHIRLPOOL a6420ba58d3a128c12cf2e9598a04dcef25b7ceff2057a36617223ac148bd29058b156d04e7ddf0ebb74e26eb5487c6513111514f162d49fc2bd79f00a586670
+DIST libdvbpsi-1.2.0.tar.bz2 461372 SHA256 36d9b233306e48b58999e87864253b564e20932ed46a485e44ef7058f1f927e8 SHA512 951db13f5645d4d6a160719fc6ac97fd31a32d5d17cb8e26db94702e65b6fac3d4e7a99c3c417e09fe5ce33f3b0c0ef86206c77b36816dcd8a3bd5b0bb4a9684 WHIRLPOOL 103c602d65177a973c073e09b62765ac28ad30eddc1ad9c3a1dc70d6c93e41599f97c2c0fa6c99f7309e51b7d2aee9d2bb5e3cdcfb2b44929105cfc2cc4f66b3
+DIST libdvbpsi-1.3.0.tar.bz2 459083 SHA256 a2fed1d11980662f919bbd1f29e2462719e0f6227e1a531310bd5a706db0a1fe SHA512 59f097a1032e8cf461210128c7468da4204f077a61f68f2be3310e60004774157335cd7cba82271fcc89b7b6b17a12a06b6214357227ec9976281d9b50565c54 WHIRLPOOL 10820433df88cdc914e8c15805c94e48c0eec500f78113fb46d2c2a178b8ce564a647d0b31c2b3eea6d40828f588a0b3a5db558af5d92f7d86cc2a437013ecbd
diff --git a/media-libs/libdvbpsi/libdvbpsi-0.2.1.ebuild b/media-libs/libdvbpsi/libdvbpsi-0.2.1.ebuild
new file mode 100644
index 000000000000..c7770acfdd79
--- /dev/null
+++ b/media-libs/libdvbpsi/libdvbpsi-0.2.1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="library for MPEG TS/DVB PSI tables decoding and generation"
+HOMEPAGE="http://www.videolan.org/libdvbpsi"
+SRC_URI="http://download.videolan.org/pub/${PN}/${PV}/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ppc ppc64 sparc x86 ~x86-fbsd"
+IUSE="doc static-libs"
+
+RDEPEND=""
+DEPEND="
+ doc? (
+ app-doc/doxygen
+ >=media-gfx/graphviz-2.26
+ )" # Require recent enough graphviz wrt #181147
+
+DOCS=( AUTHORS ChangeLog NEWS README TODO )
+
+src_prepare() {
+ sed -e '/CFLAGS/s:-O2::' -e '/CFLAGS/s:-O6::' -i configure || die
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ --enable-release
+}
+
+src_compile() {
+ emake
+ use doc && emake doc
+}
+
+src_install() {
+ default
+ use doc && dohtml doc/doxygen/html/*
+ rm -f "${ED}"usr/lib*/${PN}.la
+}
diff --git a/media-libs/libdvbpsi/libdvbpsi-0.2.2.ebuild b/media-libs/libdvbpsi/libdvbpsi-0.2.2.ebuild
new file mode 100644
index 000000000000..9e5437b31ba2
--- /dev/null
+++ b/media-libs/libdvbpsi/libdvbpsi-0.2.2.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="library for MPEG TS/DVB PSI tables decoding and generation"
+HOMEPAGE="http://www.videolan.org/libdvbpsi"
+SRC_URI="http://download.videolan.org/pub/${PN}/${PV}/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="doc static-libs"
+
+RDEPEND=""
+DEPEND="
+ doc? (
+ app-doc/doxygen
+ >=media-gfx/graphviz-2.26
+ )" # Require recent enough graphviz wrt #181147
+
+DOCS=( AUTHORS ChangeLog NEWS README TODO )
+
+src_prepare() {
+ sed -e '/CFLAGS/s:-O2::' -e '/CFLAGS/s:-O6::' -i configure || die
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ --enable-release
+}
+
+src_compile() {
+ emake
+ use doc && emake doc
+}
+
+src_install() {
+ default
+ use doc && dohtml doc/doxygen/html/*
+ rm -f "${ED}"usr/lib*/${PN}.la
+}
diff --git a/media-libs/libdvbpsi/libdvbpsi-1.1.0.ebuild b/media-libs/libdvbpsi/libdvbpsi-1.1.0.ebuild
new file mode 100644
index 000000000000..ba09366f728f
--- /dev/null
+++ b/media-libs/libdvbpsi/libdvbpsi-1.1.0.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="library for MPEG TS/DVB PSI tables decoding and generation"
+HOMEPAGE="http://www.videolan.org/libdvbpsi"
+SRC_URI="http://download.videolan.org/pub/${PN}/${PV}/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="doc static-libs"
+
+RDEPEND=""
+DEPEND="
+ doc? (
+ app-doc/doxygen
+ >=media-gfx/graphviz-2.26
+ )" # Require recent enough graphviz wrt #181147
+
+DOCS=( AUTHORS ChangeLog NEWS README )
+
+src_prepare() {
+ sed -e '/CFLAGS/s:-O2::' -e '/CFLAGS/s:-O6::' -e '/CFLAGS/s:-Werror::' -i configure || die
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ --enable-release
+}
+
+src_compile() {
+ emake
+ use doc && emake doc
+}
+
+src_install() {
+ default
+ use doc && dohtml doc/doxygen/html/*
+ rm -f "${ED}"usr/lib*/${PN}.la
+}
diff --git a/media-libs/libdvbpsi/libdvbpsi-1.1.2.ebuild b/media-libs/libdvbpsi/libdvbpsi-1.1.2.ebuild
new file mode 100644
index 000000000000..69afc37e17f1
--- /dev/null
+++ b/media-libs/libdvbpsi/libdvbpsi-1.1.2.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="library for MPEG TS/DVB PSI tables decoding and generation"
+HOMEPAGE="http://www.videolan.org/libdvbpsi"
+SRC_URI="http://download.videolan.org/pub/${PN}/${PV}/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="doc static-libs"
+
+RDEPEND=""
+DEPEND="
+ doc? (
+ app-doc/doxygen
+ >=media-gfx/graphviz-2.26
+ )" # Require recent enough graphviz wrt #181147
+
+DOCS=( AUTHORS ChangeLog NEWS README )
+
+src_prepare() {
+ sed -e '/CFLAGS/s:-O2::' -e '/CFLAGS/s:-O6::' -e '/CFLAGS/s:-Werror::' -i configure || die
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ --enable-release
+}
+
+src_compile() {
+ emake
+ use doc && emake doc
+}
+
+src_install() {
+ default
+ use doc && dohtml doc/doxygen/html/*
+ rm -f "${ED}"usr/lib*/${PN}.la
+}
diff --git a/media-libs/libdvbpsi/libdvbpsi-1.2.0.ebuild b/media-libs/libdvbpsi/libdvbpsi-1.2.0.ebuild
new file mode 100644
index 000000000000..7395dd420c27
--- /dev/null
+++ b/media-libs/libdvbpsi/libdvbpsi-1.2.0.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="library for MPEG TS/DVB PSI tables decoding and generation"
+HOMEPAGE="http://www.videolan.org/libdvbpsi"
+SRC_URI="http://download.videolan.org/pub/${PN}/${PV}/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 ppc ~ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="doc static-libs"
+
+RDEPEND=""
+DEPEND="
+ doc? (
+ app-doc/doxygen
+ >=media-gfx/graphviz-2.26
+ )" # Require recent enough graphviz wrt #181147
+
+DOCS=( AUTHORS ChangeLog NEWS README )
+
+src_prepare() {
+ sed -e '/CFLAGS/s:-O2::' -e '/CFLAGS/s:-O6::' -e '/CFLAGS/s:-Werror::' -i configure || die
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ --enable-release
+}
+
+src_compile() {
+ emake
+ use doc && emake doc
+}
+
+src_install() {
+ default
+ use doc && dohtml doc/doxygen/html/*
+ rm -f "${ED}"usr/lib*/${PN}.la
+}
diff --git a/media-libs/libdvbpsi/libdvbpsi-1.3.0-r1.ebuild b/media-libs/libdvbpsi/libdvbpsi-1.3.0-r1.ebuild
new file mode 100644
index 000000000000..26a0c55f0b51
--- /dev/null
+++ b/media-libs/libdvbpsi/libdvbpsi-1.3.0-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="library for MPEG TS/DVB PSI tables decoding and generation"
+HOMEPAGE="http://www.videolan.org/libdvbpsi"
+SRC_URI="http://download.videolan.org/pub/${PN}/${PV}/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+# Sublot == libdvbpsi.so major
+SLOT="0/10"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="doc static-libs"
+
+RDEPEND=""
+DEPEND="
+ doc? (
+ app-doc/doxygen
+ >=media-gfx/graphviz-2.26
+ )" # Require recent enough graphviz wrt #181147
+
+DOCS=( AUTHORS ChangeLog NEWS README )
+
+src_prepare() {
+ sed -e '/CFLAGS/s:-O2::' -e '/CFLAGS/s:-O6::' -e '/CFLAGS/s:-Werror::' -i configure || die
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ --enable-release
+}
+
+src_compile() {
+ emake
+ use doc && emake doc
+}
+
+src_install() {
+ default
+ use doc && dohtml doc/doxygen/html/*
+ rm -f "${ED}"usr/lib*/${PN}.la
+}
diff --git a/media-libs/libdvbpsi/libdvbpsi-1.3.0.ebuild b/media-libs/libdvbpsi/libdvbpsi-1.3.0.ebuild
new file mode 100644
index 000000000000..d43fbf07f8f4
--- /dev/null
+++ b/media-libs/libdvbpsi/libdvbpsi-1.3.0.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="library for MPEG TS/DVB PSI tables decoding and generation"
+HOMEPAGE="http://www.videolan.org/libdvbpsi"
+SRC_URI="http://download.videolan.org/pub/${PN}/${PV}/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="doc static-libs"
+
+RDEPEND=""
+DEPEND="
+ doc? (
+ app-doc/doxygen
+ >=media-gfx/graphviz-2.26
+ )" # Require recent enough graphviz wrt #181147
+
+DOCS=( AUTHORS ChangeLog NEWS README )
+
+src_prepare() {
+ sed -e '/CFLAGS/s:-O2::' -e '/CFLAGS/s:-O6::' -e '/CFLAGS/s:-Werror::' -i configure || die
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ --enable-release
+}
+
+src_compile() {
+ emake
+ use doc && emake doc
+}
+
+src_install() {
+ default
+ use doc && dohtml doc/doxygen/html/*
+ rm -f "${ED}"usr/lib*/${PN}.la
+}
diff --git a/media-libs/libdvbpsi/metadata.xml b/media-libs/libdvbpsi/metadata.xml
new file mode 100644
index 000000000000..2677d846fc47
--- /dev/null
+++ b/media-libs/libdvbpsi/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>media-tv</herd>
+<maintainer><email>lordvan@gentoo.org</email></maintainer>
+</pkgmetadata>
diff --git a/media-libs/libdvdcss/Manifest b/media-libs/libdvdcss/Manifest
new file mode 100644
index 000000000000..07d43aed7ee5
--- /dev/null
+++ b/media-libs/libdvdcss/Manifest
@@ -0,0 +1,3 @@
+DIST libdvdcss-1.2.13.tar.bz2 338588 SHA256 84f1bba6cfef1df87f774fceaefc8e73c4cda32e8f6700b224ad0acb5511ba2c SHA512 b7d912ef87854bca052c2f38709d49eeb72be9148b6598a7f71f9ccb1ad7f43a521f9533821fbd8d7ef16e2c36fe140209c9183f5ca91e8f806150cc16645717 WHIRLPOOL d3278f9fa3eda884e14ab3e6ce52b9dfdb20910b884a91b2b7201fee70a1e6cfba7bc3f5a1a51123bc9eb2b3126a38c45dbccfa8c500d9074825c4e35bf5b146
+DIST libdvdcss-1.3.0.tar.bz2 355417 SHA256 7c414acd520c4e4dd7267952f72d738ff50321a7869af4d75c65aefad44f1395 SHA512 f3254cb882f03d24e9fbe70fa9aa32ac34c104b57b3ad43727e26a4ab930bddd75de8d9a0e4ba68cdac23e1828f38c2b276679f5386f296cf20db46828836a3d WHIRLPOOL 0086f2410597d3b9e22a5c30f70bbc6cd0178a57d0e32960bfbc34d51ba8880e18dbfbbe0ca8f38cdf712a5c7768e872978e33ddb8650847450400518438f42e
+DIST libdvdcss-1.3.99.tar.bz2 377167 SHA256 08b0fab9171b338cbbe07b3a4ea227d991d5f1665717780df5030abbbd9b5c5d SHA512 d81ac96d81181dae4e6d63a11fa56fd4ff1ce1ee58c49a1354c10315eb5f9e743475d7e3896bac4dc7ea3ed35e52a964dd337a9b3f32f9ff9e37d11fcd4292b1 WHIRLPOOL 1c78f085e4658471585e3f0161a36143355206fa9eb6f0f774905649bd5fa2416a00a10dfb22239b538f3e7a5fa14fbd401c1e6b3e96090527f9b2cd2db46e99
diff --git a/media-libs/libdvdcss/libdvdcss-1.2.13-r1.ebuild b/media-libs/libdvdcss/libdvdcss-1.2.13-r1.ebuild
new file mode 100644
index 000000000000..516ff9731d24
--- /dev/null
+++ b/media-libs/libdvdcss/libdvdcss-1.2.13-r1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools-multilib
+
+DESCRIPTION="A portable abstraction library for DVD decryption"
+HOMEPAGE="http://www.videolan.org/developers/libdvdcss.html"
+SRC_URI="http://www.videolan.org/pub/${PN}/${PV}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="1.2"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="doc static-libs"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )"
+
+#DOCS=( AUTHORS ChangeLog NEWS README )
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable doc)
+ --htmldir=/usr/share/doc/${PF}/html
+ )
+
+ autotools-multilib_src_configure
+}
diff --git a/media-libs/libdvdcss/libdvdcss-1.2.13.ebuild b/media-libs/libdvdcss/libdvdcss-1.2.13.ebuild
new file mode 100644
index 000000000000..b86234fa0150
--- /dev/null
+++ b/media-libs/libdvdcss/libdvdcss-1.2.13.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools-utils
+
+DESCRIPTION="A portable abstraction library for DVD decryption"
+HOMEPAGE="http://www.videolan.org/developers/libdvdcss.html"
+SRC_URI="http://www.videolan.org/pub/${PN}/${PV}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="1.2"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="doc static-libs"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )"
+
+#DOCS=( AUTHORS ChangeLog NEWS README )
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable doc)
+ --htmldir=/usr/share/doc/${PF}/html
+ )
+
+ autotools-utils_src_configure
+}
diff --git a/media-libs/libdvdcss/libdvdcss-1.3.0.ebuild b/media-libs/libdvdcss/libdvdcss-1.3.0.ebuild
new file mode 100644
index 000000000000..31325a2c2c9a
--- /dev/null
+++ b/media-libs/libdvdcss/libdvdcss-1.3.0.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 autotools-multilib
+
+DESCRIPTION="A portable abstraction library for DVD decryption"
+HOMEPAGE="http://www.videolan.org/developers/libdvdcss.html"
+SRC_URI="http://www.videolan.org/pub/${PN}/${PV}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="1.2"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="doc static-libs"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )"
+
+#DOCS=( AUTHORS ChangeLog NEWS README )
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable doc)
+ --htmldir=/usr/share/doc/${PF}/html
+ )
+
+ autotools-multilib_src_configure
+}
diff --git a/media-libs/libdvdcss/libdvdcss-1.3.99.ebuild b/media-libs/libdvdcss/libdvdcss-1.3.99.ebuild
new file mode 100644
index 000000000000..a75f7c1f7659
--- /dev/null
+++ b/media-libs/libdvdcss/libdvdcss-1.3.99.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 autotools-multilib
+
+DESCRIPTION="A portable abstraction library for DVD decryption"
+HOMEPAGE="http://www.videolan.org/developers/libdvdcss.html"
+SRC_URI="http://download.videolan.org/pub/${PN}/${PV}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="1.2"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="doc static-libs"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )"
+
+#DOCS=( AUTHORS ChangeLog NEWS README )
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable doc)
+ --htmldir=/usr/share/doc/${PF}/html
+ )
+
+ autotools-multilib_src_configure
+}
diff --git a/media-libs/libdvdcss/metadata.xml b/media-libs/libdvdcss/metadata.xml
new file mode 100644
index 000000000000..edccfe5754d2
--- /dev/null
+++ b/media-libs/libdvdcss/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-libs/libdvdnav/Manifest b/media-libs/libdvdnav/Manifest
new file mode 100644
index 000000000000..1179b7435ed1
--- /dev/null
+++ b/media-libs/libdvdnav/Manifest
@@ -0,0 +1,3 @@
+DIST libdvdnav-4.2.1.tar.xz 109856 SHA256 7fca272ecc3241b6de41bbbf7ac9a303ba25cb9e0c82aa23901d3104887f2372 SHA512 3b7b18069b77a5a48ff5ad74f823b88f5dbf5058f11737ffef9d388d755616a581688c95dc1c3d9ab2377bce1dafaf53c9d46981a12588e6b3d8b70ce582e756 WHIRLPOOL cf4e3788c0bc4d96d453d0dcecae31347c5949d46388a8d7bb74bb957f746af7c4684ae1cc4855ba3eb47a06b063cad34d0078fe7676bb8ad191b8541634736b
+DIST libdvdnav-5.0.1.tar.bz2 354568 SHA256 72b1cb8266f163d4a1481b92c7b6c53e6dc9274d2a6befb08ffc351fe7a4a2a9 SHA512 4c86a664b0f32b2dc3cf0e332d6603cd24cae12cf8f8ca6b3d825db51d35ee222a566909103444e35e588347e3e5a8ff15ad8d00263b99e52020585bc823de29 WHIRLPOOL dac5a04adadbb2a91870dfa10c16cc50d7d693f5e7bdefed39c40624cc7a0c6c4699127a892eed286e5754b6f473ca8316ebeec08ad968228590623c47bf99d2
+DIST libdvdnav-5.0.3.tar.bz2 372203 SHA256 5097023e3d2b36944c763f1df707ee06b19dc639b2b68fb30113a5f2cbf60b6d SHA512 d6d0519f654649bd65b3029224191e7d6acc893d94e8578e435d77b75327584e9f44410a062c1fc60c6211f5bea6b3971228d84de595808733ab7356980e0123 WHIRLPOOL 44f2c56341aa0fd711dc2e1f295336de149949f31353bc02ccb73e898be1f2bcff22e14e28b5adc4d6b84468605113a9eaea16f6c293bc58ccb101dd4fb366b4
diff --git a/media-libs/libdvdnav/files/libdvdnav-4.2.0-pkgconfig.patch b/media-libs/libdvdnav/files/libdvdnav-4.2.0-pkgconfig.patch
new file mode 100644
index 000000000000..0edcab9d7fba
--- /dev/null
+++ b/media-libs/libdvdnav/files/libdvdnav-4.2.0-pkgconfig.patch
@@ -0,0 +1,54 @@
+http://lists.mplayerhq.hu/pipermail/dvdnav-discuss/2012-March/001672.html
+
+use pkg-config for libdvdread by default rather than the ugly xxx-config scripts
+
+https://bugs.gentoo.org/410189
+
+hassle vapier@gentoo.org if this causes issues
+
+--- configure.ac (revision 1243)
++++ configure.ac (working copy)
+@@ -89,6 +89,7 @@ AC_PROG_CC
+ AC_PROG_MAKE_SET
+ AC_PROG_INSTALL
+ AC_PROG_LN_S
++PKG_PROG_PKG_CONFIG
+
+ dnl --------------------------------------------------------------
+ dnl Libtool
+@@ -185,15 +186,26 @@ AC_ARG_WITH([dvdread-config],
+ [AS_HELP_STRING([--with-dvdread-config=PROG],
+ [dvdread-config program to use @<:@default=from PATH@:>@])],
+ [DVDREAD_CONFIG="$withval"],
+- [dnl User didn't specify program, search PATH
+- AC_PATH_PROG([DVDREAD_CONFIG], [dvdread-config], [no])
+- test "x$DVDREAD_CONFIG" = xno && \
+- AC_MSG_ERROR([dvdread-config required to link with libdvdread])
+- ])
+-DVDREAD_CFLAGS=`$DVDREAD_CONFIG --cflags` || \
+- AC_MSG_ERROR([Could not get libdvdread CFLAGS from $DVDREAD_CONFIG])
+-DVDREAD_LIBS=`$DVDREAD_CONFIG --libs` || \
+- AC_MSG_ERROR([Could not get libdvdread LIBS from $DVDREAD_CONFIG])
++ [DVDREAD_CONFIG=""])
++
++dnl by default, search pkg-config, and then fall back to dvdread-config
++DVDREAD_PKG_CONFIG="no"
++if test "x$DVDREAD_CONFIG" = "x"; then
++ PKG_CHECK_MODULES([DVDREAD], [dvdread],
++ [DVDREAD_PKG_CONFIG="yes"],
++ [dnl User didn't specify program, search PATH
++ AC_PATH_PROG([DVDREAD_CONFIG], [dvdread-config], [no])
++ test "x$DVDREAD_CONFIG" = xno && \
++ AC_MSG_ERROR([dvdread-config required to link with libdvdread])
++ ])
++fi
++if test "x$DVDREAD_PKG_CONFIG" != "xyes"; then
++ DVDREAD_CFLAGS=`$DVDREAD_CONFIG --cflags` || \
++ AC_MSG_ERROR([Could not get libdvdread CFLAGS from $DVDREAD_CONFIG])
++ DVDREAD_LIBS=`$DVDREAD_CONFIG --libs` || \
++ AC_MSG_ERROR([Could not get libdvdread LIBS from $DVDREAD_CONFIG])
++fi
++
+ AC_SUBST([DVDREAD_CFLAGS])
+ AC_SUBST([DVDREAD_LIBS])
+
diff --git a/media-libs/libdvdnav/libdvdnav-4.2.1.ebuild b/media-libs/libdvdnav/libdvdnav-4.2.1.ebuild
new file mode 100644
index 000000000000..5f78de9bd7a6
--- /dev/null
+++ b/media-libs/libdvdnav/libdvdnav-4.2.1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+AUTOTOOLS_PRUNE_LIBTOOL_FILES=all
+
+SCM=""
+
+if [ "${PV#9999}" != "${PV}" ] ; then
+ SCM="subversion"
+ ESVN_REPO_URI="svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdnav"
+ ESVN_PROJECT="libdvdnav"
+ SRC_URI=""
+else
+ SRC_URI="http://dvdnav.mplayerhq.hu/releases/${P}.tar.xz"
+fi
+
+inherit autotools-multilib ${SCM}
+
+DESCRIPTION="Library for DVD navigation tools"
+HOMEPAGE="http://dvdnav.mplayerhq.hu/"
+
+LICENSE="GPL-2"
+SLOT="0"
+if [ "${PV#9999}" = "${PV}" ] ; then
+ KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+else
+ KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86"
+fi
+IUSE=""
+RDEPEND=">=media-libs/libdvdread-4.2.0-r1[${MULTILIB_USEDEP}]
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20130224-r4
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig" # To get pkg.m4 for eautoreconf #414391
+
+DOCS=( AUTHORS ChangeLog DEVELOPMENT-POLICY.txt doc/dvd_structures NEWS README TODO )
+
+src_prepare() {
+ [ "${PV#9999}" != "${PV}" ] && subversion_src_prepare
+ autotools-multilib_src_prepare
+}
diff --git a/media-libs/libdvdnav/libdvdnav-5.0.1.ebuild b/media-libs/libdvdnav/libdvdnav-5.0.1.ebuild
new file mode 100644
index 000000000000..446113402695
--- /dev/null
+++ b/media-libs/libdvdnav/libdvdnav-5.0.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
+
+AUTOTOOLS_AUTORECONF=1
+AUTOTOOLS_PRUNE_LIBTOOL_FILES=all
+
+SCM=""
+
+if [ "${PV#9999}" != "${PV}" ] ; then
+ SCM="git-r3"
+ EGIT_REPO_URI="git://git.videolan.org/libdvdnav.git"
+ SRC_URI=""
+else
+ SRC_URI="http://downloads.videolan.org/pub/videolan/libdvdnav/${PV}/${P}.tar.bz2"
+fi
+
+inherit autotools-multilib ${SCM}
+
+DESCRIPTION="Library for DVD navigation tools"
+HOMEPAGE="http://dvdnav.mplayerhq.hu/"
+
+LICENSE="GPL-2"
+SLOT="0"
+if [ "${PV#9999}" = "${PV}" ] ; then
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+else
+ KEYWORDS=""
+fi
+IUSE=""
+RDEPEND=">=media-libs/libdvdread-5.0.0[${MULTILIB_USEDEP}]
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20130224-r4
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig" # To get pkg.m4 for eautoreconf #414391
+
+DOCS=( AUTHORS ChangeLog doc/dvd_structures doc/library_layout README TODO )
diff --git a/media-libs/libdvdnav/libdvdnav-5.0.3.ebuild b/media-libs/libdvdnav/libdvdnav-5.0.3.ebuild
new file mode 100644
index 000000000000..a462ec95d1a3
--- /dev/null
+++ b/media-libs/libdvdnav/libdvdnav-5.0.3.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+AUTOTOOLS_AUTORECONF=1
+AUTOTOOLS_PRUNE_LIBTOOL_FILES=all
+inherit autotools-multilib
+
+DESCRIPTION="Library for DVD navigation tools"
+HOMEPAGE="http://dvdnav.mplayerhq.hu/"
+if [[ ${PV} = 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="git://git.videolan.org/libdvdnav.git"
+ KEYWORDS="alpha hppa ia64 ppc ppc64 sparc"
+else
+ SRC_URI="http://downloads.videolan.org/pub/videolan/libdvdnav/${PV}/${P}.tar.bz2"
+ KEYWORDS="alpha amd64 ~arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="static-libs"
+
+RDEPEND=">=media-libs/libdvdread-5.0.2[${MULTILIB_USEDEP}]
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20130224-r4
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig" # To get pkg.m4 for eautoreconf #414391
+
+DOCS=( AUTHORS ChangeLog doc/dvd_structures doc/library_layout README TODO )
diff --git a/media-libs/libdvdnav/libdvdnav-9999.ebuild b/media-libs/libdvdnav/libdvdnav-9999.ebuild
new file mode 100644
index 000000000000..0b7327707abd
--- /dev/null
+++ b/media-libs/libdvdnav/libdvdnav-9999.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+AUTOTOOLS_AUTORECONF=1
+AUTOTOOLS_PRUNE_LIBTOOL_FILES=all
+inherit autotools-multilib
+
+DESCRIPTION="Library for DVD navigation tools"
+HOMEPAGE="http://dvdnav.mplayerhq.hu/"
+if [[ ${PV} = 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="git://git.videolan.org/libdvdnav.git"
+ KEYWORDS=""
+else
+ SRC_URI="http://downloads.videolan.org/pub/videolan/libdvdnav/${PV}/${P}.tar.bz2"
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86
+ ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos
+ ~sparc-solaris ~x86-solaris"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="static-libs"
+
+RDEPEND=">=media-libs/libdvdread-5.0.2[${MULTILIB_USEDEP}]
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20130224-r4
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig" # To get pkg.m4 for eautoreconf #414391
+
+DOCS=( AUTHORS ChangeLog doc/dvd_structures doc/library_layout README TODO )
diff --git a/media-libs/libdvdnav/metadata.xml b/media-libs/libdvdnav/metadata.xml
new file mode 100644
index 000000000000..1cadc2e4ec21
--- /dev/null
+++ b/media-libs/libdvdnav/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-libs/libdvdplay/Manifest b/media-libs/libdvdplay/Manifest
new file mode 100644
index 000000000000..72e4703584aa
--- /dev/null
+++ b/media-libs/libdvdplay/Manifest
@@ -0,0 +1 @@
+DIST libdvdplay-1.0.1.tar.bz2 173229 RMD160 fb2d485ac2a04134e43bbe2e2bc5f15f0934164e SHA1 8546cb5b02895e2018b69120d0cf070e834ad5e5 SHA256 8ccd88b593c9ead644e588448d41101f47379a6b008892608df28b690f722b95
diff --git a/media-libs/libdvdplay/libdvdplay-1.0.1.ebuild b/media-libs/libdvdplay/libdvdplay-1.0.1.ebuild
new file mode 100644
index 000000000000..353f29d1bfc7
--- /dev/null
+++ b/media-libs/libdvdplay/libdvdplay-1.0.1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit libtool
+
+IUSE=""
+
+DESCRIPTION="A simple library designed for DVD-menu navigation"
+SRC_URI="http://www.videolan.org/pub/${PN}/${PV}/${P}.tar.bz2"
+HOMEPAGE="http://developers.videolan.org/libdvdplay/"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="alpha amd64 ~arm ia64 ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-solaris"
+
+DEPEND=">=media-libs/libdvdread-0.9.3"
+RDEPEND="${DEPEND}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ # Needed to get a sane .so versionning on fbsd, please don't drop it.
+ elibtoolize
+}
+
+src_compile() {
+ econf --enable-shared || die
+ emake || die
+}
+
+src_install() {
+ einstall || die
+ dodoc AUTHORS ChangeLog NEWS README THANKS TODO
+}
diff --git a/media-libs/libdvdplay/metadata.xml b/media-libs/libdvdplay/metadata.xml
new file mode 100644
index 000000000000..edccfe5754d2
--- /dev/null
+++ b/media-libs/libdvdplay/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-libs/libdvdread/Manifest b/media-libs/libdvdread/Manifest
new file mode 100644
index 000000000000..6eb08a759155
--- /dev/null
+++ b/media-libs/libdvdread/Manifest
@@ -0,0 +1,4 @@
+DIST libdvdread-4.2.1.tar.xz 96108 SHA256 af9b98f049580a6521d56c978b736d3d609562dd12955e11d50e26d97542dcd4 SHA512 80738a70068c83fbd309ffd7335485909812ad0cd862df25ca041b8fb302428be0fc9e678aaeafe529b7652f8b1435e406d8aee3504e939fd29a7e45bd7d8139 WHIRLPOOL 4b6859bf5a1943d78bbb1ac925547959279b7fcea1abcb594a301384a9f26644356c57b7bbb3f7941cc775c37aead3d9d0deabe0224e6d1c9f876b8867b0a44c
+DIST libdvdread-5.0.0.tar.bz2 378196 SHA256 66fb1a3a42aa0c56b02547f69c7eb0438c5beeaf21aee2ae2c6aa23ea8305f14 SHA512 bc6d700001b6d71642ef92c4b9eec5732892f25ca53434edf0febf62797ebb85d2e5489109528c8e5b11cc71706b87c5ceedf458ed950b60efe6f2350ce4f09b WHIRLPOOL 5bb2c7b49a2ac91b2bdd60f34e0bab4d5bf753a98350c7641a2a8caa56e1f58c9639f58907eabf5c734dfc10c43bdfc4184a232ba1ea81300f22d470e70b29b6
+DIST libdvdread-5.0.2.tar.bz2 393479 SHA256 82cbe693f2a3971671e7428790b5498392db32185b8dc8622f7b9cd307d3cfbf SHA512 2c963450d2870063f2f7cefbee3a574dcf570601bbb1834657fd8486715df80ad08da0d16a87e8081ec0baaab7b5509f02ab5aaa17a2ec95f7692819837b8f24 WHIRLPOOL 1aff1f80aba89ffd533cfb920ccf5c22fd16f7041b912acb0ec25cd952af0d1d89d37a1a932e5a6cd882b2da6824d9227ff740a829134040c455a9a3a4c1a904
+DIST libdvdread-5.0.3.tar.bz2 394885 SHA256 321cdf2dbdc83c96572bc583cd27d8c660ddb540ff16672ecb28607d018ed82b SHA512 1ca438f0b5c406549eec62e1abef1e8745b9f932bcd30a3194ee9e37995b269ec8f1652a24cc3d2cb11ddb964e4a47a06e5405f9402e616586ff6263a1af3fc2 WHIRLPOOL 808306ffc4de79321a6b0294b0ccd5e194fd50fa890fd19c40f4a30a1f69a357e0b3d8d882cb900ca92a6097d85dbecb9608d1d9588d629200bcb402164fd457
diff --git a/media-libs/libdvdread/libdvdread-4.2.1.ebuild b/media-libs/libdvdread/libdvdread-4.2.1.ebuild
new file mode 100644
index 000000000000..2b1acaf9eb6b
--- /dev/null
+++ b/media-libs/libdvdread/libdvdread-4.2.1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+AUTOTOOLS_PRUNE_LIBTOOL_FILES=all
+
+SCM=""
+
+if [ "${PV#9999}" != "${PV}" ] ; then
+ SCM="subversion"
+ ESVN_REPO_URI="svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread"
+ ESVN_PROJECT="libdvdread"
+ SRC_URI=""
+else
+ SRC_URI="http://dvdnav.mplayerhq.hu/releases/${P}.tar.xz"
+fi
+
+inherit autotools-multilib ${SCM}
+
+DESCRIPTION="Library for DVD navigation tools"
+HOMEPAGE="http://dvdnav.mplayerhq.hu/"
+
+LICENSE="GPL-2"
+SLOT="0"
+
+if [ "${PV#9999}" = "${PV}" ] ; then
+ KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+else
+ KEYWORDS=""
+fi
+IUSE="+css"
+
+RDEPEND="!<media-libs/libdvdnav-4.2.1
+ css? ( >=media-libs/libdvdcss-1.2.13[${MULTILIB_USEDEP}] )
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20130224-r4
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils"
+
+DOCS=( AUTHORS ChangeLog DEVELOPMENT-POLICY.txt NEWS TODO README )
+
+src_prepare() {
+ [ "${PV#9999}" != "${PV}" ] && subversion_src_prepare
+ autotools-multilib_src_prepare
+}
diff --git a/media-libs/libdvdread/libdvdread-5.0.0-r2.ebuild b/media-libs/libdvdread/libdvdread-5.0.0-r2.ebuild
new file mode 100644
index 000000000000..b0d62edd614f
--- /dev/null
+++ b/media-libs/libdvdread/libdvdread-5.0.0-r2.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+AUTOTOOLS_PRUNE_LIBTOOL_FILES=all
+
+SCM=""
+
+if [ "${PV#9999}" != "${PV}" ] ; then
+ SCM="git-r3"
+ EGIT_REPO_URI="git://git.videolan.org/libdvdread.git"
+ SRC_URI=""
+else
+ SRC_URI="http://downloads.videolan.org/pub/videolan/libdvdread/${PV}/${P}.tar.bz2"
+fi
+
+inherit autotools-multilib ${SCM}
+
+DESCRIPTION="Library for DVD navigation tools"
+HOMEPAGE="http://dvdnav.mplayerhq.hu/"
+
+LICENSE="GPL-2"
+SLOT="0"
+
+if [ "${PV#9999}" = "${PV}" ] ; then
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+else
+ KEYWORDS=""
+fi
+IUSE="+css"
+
+RDEPEND="css? ( >=media-libs/libdvdcss-1.3.0[${MULTILIB_USEDEP}] )
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20130224-r4
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}"
+
+DOCS=( AUTHORS ChangeLog NEWS TODO README )
diff --git a/media-libs/libdvdread/libdvdread-5.0.2.ebuild b/media-libs/libdvdread/libdvdread-5.0.2.ebuild
new file mode 100644
index 000000000000..6e0140b540c3
--- /dev/null
+++ b/media-libs/libdvdread/libdvdread-5.0.2.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+AUTOTOOLS_AUTORECONF=1
+AUTOTOOLS_PRUNE_LIBTOOL_FILES=all
+inherit autotools-multilib
+
+DESCRIPTION="Library for DVD navigation tools"
+HOMEPAGE="http://dvdnav.mplayerhq.hu/"
+if [[ ${PV} = 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="git://git.videolan.org/libdvdread.git"
+ KEYWORDS=""
+else
+ SRC_URI="http://downloads.videolan.org/pub/videolan/libdvdread/${PV}/${P}.tar.bz2"
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="+css static-libs"
+
+RDEPEND="css? ( >=media-libs/libdvdcss-1.3.0[${MULTILIB_USEDEP}] )
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20130224-r4
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}"
+
+DOCS=( AUTHORS ChangeLog NEWS TODO README )
diff --git a/media-libs/libdvdread/libdvdread-5.0.3.ebuild b/media-libs/libdvdread/libdvdread-5.0.3.ebuild
new file mode 100644
index 000000000000..810b7564f2f1
--- /dev/null
+++ b/media-libs/libdvdread/libdvdread-5.0.3.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+AUTOTOOLS_AUTORECONF=1
+AUTOTOOLS_PRUNE_LIBTOOL_FILES=all
+inherit autotools-multilib
+
+DESCRIPTION="Library for DVD navigation tools"
+HOMEPAGE="http://dvdnav.mplayerhq.hu/"
+if [[ ${PV} = 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="git://git.videolan.org/libdvdread.git"
+ KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86"
+else
+ SRC_URI="http://downloads.videolan.org/pub/videolan/libdvdread/${PV}/${P}.tar.bz2"
+ KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="+css static-libs"
+
+RDEPEND="css? ( >=media-libs/libdvdcss-1.3.0[${MULTILIB_USEDEP}] )
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20130224-r4
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}"
+
+DOCS=( AUTHORS ChangeLog NEWS TODO README )
diff --git a/media-libs/libdvdread/libdvdread-9999.ebuild b/media-libs/libdvdread/libdvdread-9999.ebuild
new file mode 100644
index 000000000000..6e0140b540c3
--- /dev/null
+++ b/media-libs/libdvdread/libdvdread-9999.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+AUTOTOOLS_AUTORECONF=1
+AUTOTOOLS_PRUNE_LIBTOOL_FILES=all
+inherit autotools-multilib
+
+DESCRIPTION="Library for DVD navigation tools"
+HOMEPAGE="http://dvdnav.mplayerhq.hu/"
+if [[ ${PV} = 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="git://git.videolan.org/libdvdread.git"
+ KEYWORDS=""
+else
+ SRC_URI="http://downloads.videolan.org/pub/videolan/libdvdread/${PV}/${P}.tar.bz2"
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="+css static-libs"
+
+RDEPEND="css? ( >=media-libs/libdvdcss-1.3.0[${MULTILIB_USEDEP}] )
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20130224-r4
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}"
+
+DOCS=( AUTHORS ChangeLog NEWS TODO README )
diff --git a/media-libs/libdvdread/metadata.xml b/media-libs/libdvdread/metadata.xml
new file mode 100644
index 000000000000..1cadc2e4ec21
--- /dev/null
+++ b/media-libs/libdvdread/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-libs/libechonest/Manifest b/media-libs/libechonest/Manifest
new file mode 100644
index 000000000000..b640a5a0bee7
--- /dev/null
+++ b/media-libs/libechonest/Manifest
@@ -0,0 +1,4 @@
+DIST libechonest-2.0.2.tar.bz2 82005 SHA256 e0d9b3fe7bf5fff0ce8d0f182c4cac8ea3b478c57be21549fc57da69c1a3088c SHA512 fb8baf396206cc567ae880c3f19191bd5a723820a8a8f7ea96f1065cea88c213b46ec9f7688838353331bdac105893c4e9ea118e5b17cdda313dce5ba810a1fb WHIRLPOOL d1bfd6059c5e648e190bf4ba9ddb5a3bdaeca8af346c34dc0f0177f3f05314b491f37bba2ad05944e6ff9b4ddd88e7042a089c9ecb370e75b61b6b405aa5e8d7
+DIST libechonest-2.2.0.tar.bz2 84242 SHA256 f2c043a3564bc9c5a4556a80737d1440519ced583feaa62f7afa362e35e81ee0 SHA512 482df30a7a139b14da28d752cff405267bae8af448014857aa5151c08312bcb1144039dc962c85d1613d013446eede8b97efca970801262a240a5f790e95d48e WHIRLPOOL d836f14163168f455311ed30ded1cd860311913693de41f24d6416419128487f6568fd4b8f9e52cb02ffe72b2418c46d2ffb55cab7f432b6a861dc295a99347c
+DIST libechonest-2.3.0.tar.bz2 87798 SHA256 79983ba72fbf9b112ebfb329b96b60eddf25d719ebe34eb70de01aa106ae2b44 SHA512 c6c01b463e9d3c5ab7178454d2341e61e4f4f184e0082cf4d0ea13a95752dbff2d3dee4bdc3aa2480265db6677611c9d9228c83da322242d23f5e67a7f0ee0f3 WHIRLPOOL 421257e75aea2a4a6b5d092fe5e579bc4759c8d51a59cc6e1587936c080bf6601fb30cad303f86f6a599ab4f3584abef6b2cea0fc1802f0f4f59bfae749ce6d8
+DIST libechonest-2.3.1.tar.bz2 87729 SHA256 56756545fd1cb3d9067479f52215b6157c1ced2bc82b895e72fdcd9bebb47889 SHA512 6d4c3571680657d01516e1fa5c55478a25931a825801b06b7bdd6d16715fe2a72385bd8e74be95e15b8fd2521f8b9f7bde5c2afe73a7bbc1faeba9fadd80d2f3 WHIRLPOOL 003b799295075f07310666d3352fb1dfd8704608d5595dd1962e31c3f1946af96c3fe28d4e7aa5e6ad75b77c9ed4eb803c5eeb00019007a18a30f37dc6ddb296
diff --git a/media-libs/libechonest/files/libechonest-2.0.1-Werror.patch b/media-libs/libechonest/files/libechonest-2.0.1-Werror.patch
new file mode 100644
index 000000000000..af8b1b9a814f
--- /dev/null
+++ b/media-libs/libechonest/files/libechonest-2.0.1-Werror.patch
@@ -0,0 +1,43 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Thu Dec 27 22:58:59 UTC 2012
+Subject: build system
+
+ only enable Werror for development
+
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -5,6 +5,10 @@
+
+ cmake_minimum_required( VERSION 2.6 )
+
++# options
++option(WERROR "enable -Werror for development" OFF)
++option(ECHONEST_BUILD_TESTS "Build all unit tests" ON)
++
+ set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
+ set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII" )
+
+@@ -32,8 +36,12 @@
+ endif()
+
+ # disable -Werror on ARM since Qt containers cause a lot of alignment warnings
+- if ( NOT CMAKE_SYSTEM_PROCESSOR MATCHES "arm" )
+- add_definitions( -Werror )
++ if (WERROR)
++ if ( NOT CMAKE_SYSTEM_PROCESSOR MATCHES "arm" )
++ add_definitions( -Werror )
++ else()
++ message( STATUS "-Werror breaks this package on ARM, disabled!" )
++ endif()
+ endif()
+
+ # to be added:
+@@ -48,8 +56,6 @@
+ endif(MSVC)
+
+
+-option(ECHONEST_BUILD_TESTS "Build all unit tests" ON)
+-
+ if(ECHONEST_BUILD_TESTS)
+ enable_testing()
+ endif(ECHONEST_BUILD_TESTS)
diff --git a/media-libs/libechonest/files/libechonest-2.2.0-always_use_QJSON_LIBRARIES.patch b/media-libs/libechonest/files/libechonest-2.2.0-always_use_QJSON_LIBRARIES.patch
new file mode 100644
index 000000000000..9edd035979c7
--- /dev/null
+++ b/media-libs/libechonest/files/libechonest-2.2.0-always_use_QJSON_LIBRARIES.patch
@@ -0,0 +1,23 @@
+http://bugs.gentoo.org/show_bug.cgi?id=503656#c4
+http://github.com/lfranchi/libechonest/pull/14
+
+--- src/CMakeLists.txt
++++ src/CMakeLists.txt
+@@ -40,16 +40,8 @@
+
+ QT_WRAP_CPP( ${LIBECHONEST_H} )
+
+-SET( OS_SPECIFIC_LINK_LIBRARIES "" )
+-IF( APPLE OR MINGW )
+- SET( OS_SPECIFIC_LINK_LIBRARIES ${QJSON_LIBRARIES} )
+-ELSE( APPLE OR MINGW )
+- SET( OS_SPECIFIC_LINK_LIBRARIES ${QJSON_LDFLAGS} )
+-ENDIF( APPLE OR MINGW )
+-
+-
+ add_library( echonest SHARED ${LIBECHONEST_SRC} )
+-target_link_libraries( echonest ${OS_SPECIFIC_LINK_LIBRARIES} ${QT_QTCORE_LIBRARY} ${QT_QTNETWORK_LIBRARY} )
++target_link_libraries( echonest ${QT_QTCORE_LIBRARY} ${QT_QTNETWORK_LIBRARY} ${QJSON_LIBRARIES} )
+ set_target_properties( echonest PROPERTIES VERSION ${ECHONEST_LIB_VERSION} SOVERSION ${ECHONEST_LIB_VERSION_SONAME} )
+ qt5_use_modules( echonest Core Network Xml )
+ install( TARGETS echonest RUNTIME DESTINATION bin
diff --git a/media-libs/libechonest/libechonest-2.0.2.ebuild b/media-libs/libechonest/libechonest-2.0.2.ebuild
new file mode 100644
index 000000000000..c5495fc59a7d
--- /dev/null
+++ b/media-libs/libechonest/libechonest-2.0.2.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit cmake-utils
+
+DESCRIPTION="A library for communicating with The Echo Nest"
+HOMEPAGE="http://projects.kde.org/projects/playground/libs/libechonest"
+SRC_URI="http://files.lfranchi.com/${P}.tar.bz2
+ http://pwsp.cleinias.com/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RESTRICT="test" # Networking required
+
+RDEPEND=">=dev-libs/qjson-0.5
+ dev-qt/qtcore:4"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ dev-qt/qttest:4"
+
+PATCHES=( "${FILESDIR}"/${PN}-2.0.1-Werror.patch )
+
+DOCS=( AUTHORS README TODO )
diff --git a/media-libs/libechonest/libechonest-2.2.0-r1.ebuild b/media-libs/libechonest/libechonest-2.2.0-r1.ebuild
new file mode 100644
index 000000000000..6ca99b06f3ce
--- /dev/null
+++ b/media-libs/libechonest/libechonest-2.2.0-r1.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 cmake-utils
+
+DESCRIPTION="A library for communicating with The Echo Nest"
+HOMEPAGE="http://projects.kde.org/projects/playground/libs/libechonest"
+SRC_URI="http://files.lfranchi.com/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0/2.2"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RESTRICT="test" # Networking required
+
+RDEPEND=">=dev-libs/qjson-0.5
+ dev-qt/qtcore:4"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS=( AUTHORS README TODO )
+
+PATCHES=( "${FILESDIR}"/${P}-always_use_QJSON_LIBRARIES.patch )
+
+src_prepare() {
+ cmake-utils_src_prepare
+ sed -i -e '/find_package/s/QtTest//' CMakeLists.txt || die #507086
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DECHONEST_BUILD_TESTS=OFF
+ )
+ cmake-utils_src_configure
+}
diff --git a/media-libs/libechonest/libechonest-2.3.0.ebuild b/media-libs/libechonest/libechonest-2.3.0.ebuild
new file mode 100644
index 000000000000..8dabd88dbd2f
--- /dev/null
+++ b/media-libs/libechonest/libechonest-2.3.0.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit cmake-utils multibuild
+
+DESCRIPTION="A library for communicating with The Echo Nest"
+HOMEPAGE="http://projects.kde.org/projects/playground/libs/libechonest"
+SRC_URI="http://files.lfranchi.com/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0/2.3"
+KEYWORDS="~amd64 ~x86"
+IUSE="+qt4 qt5"
+
+RESTRICT="test" # Networking required
+
+RDEPEND="
+ qt4? (
+ dev-libs/qjson[qt4(+)]
+ dev-qt/qtcore:4
+ )
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtnetwork:5
+ )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS=( AUTHORS README TODO )
+
+pkg_setup() {
+ MULTIBUILD_VARIANTS=( $(usev qt4) $(usev qt5) )
+}
+
+src_configure() {
+ myconfigure() {
+ local mycmakeargs=(
+ -DECHONEST_BUILD_TESTS=OFF
+ )
+
+ if [[ ${MULTIBUILD_VARIANT} = qt4 ]]; then
+ mycmakeargs+=(-DBUILD_WITH_QT4=ON)
+ fi
+
+ if [[ ${MULTIBUILD_VARIANT} = qt5 ]]; then
+ mycmakeargs+=(-DBUILD_WITH_QT4=OFF)
+ fi
+
+ cmake-utils_src_configure
+ }
+
+ multibuild_foreach_variant myconfigure
+}
+
+src_compile() {
+ multibuild_foreach_variant cmake-utils_src_compile
+}
+
+src_test() {
+ multibuild_foreach_variant cmake-utils_src_test
+}
+
+src_install() {
+ multibuild_foreach_variant cmake-utils_src_install
+}
diff --git a/media-libs/libechonest/libechonest-2.3.1.ebuild b/media-libs/libechonest/libechonest-2.3.1.ebuild
new file mode 100644
index 000000000000..8ca01f594f29
--- /dev/null
+++ b/media-libs/libechonest/libechonest-2.3.1.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit cmake-utils multibuild
+
+DESCRIPTION="A library for communicating with The Echo Nest"
+HOMEPAGE="http://projects.kde.org/projects/playground/libs/libechonest"
+SRC_URI="http://files.lfranchi.com/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0/2.3"
+KEYWORDS="~amd64 ~x86"
+IUSE="+qt4 qt5"
+
+REQUIRED_USE="|| ( qt4 qt5 )"
+
+RESTRICT="test" # Networking required
+
+RDEPEND="
+ qt4? (
+ dev-libs/qjson[qt4(+)]
+ dev-qt/qtcore:4
+ )
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtnetwork:5
+ )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS=( AUTHORS README TODO )
+
+pkg_setup() {
+ MULTIBUILD_VARIANTS=( $(usev qt4) $(usev qt5) )
+}
+
+src_configure() {
+ myconfigure() {
+ local mycmakeargs=(
+ -DECHONEST_BUILD_TESTS=OFF
+ )
+
+ if [[ ${MULTIBUILD_VARIANT} = qt4 ]]; then
+ mycmakeargs+=(-DBUILD_WITH_QT4=ON)
+ fi
+
+ if [[ ${MULTIBUILD_VARIANT} = qt5 ]]; then
+ mycmakeargs+=(-DBUILD_WITH_QT4=OFF)
+ fi
+
+ cmake-utils_src_configure
+ }
+
+ multibuild_foreach_variant myconfigure
+}
+
+src_compile() {
+ multibuild_foreach_variant cmake-utils_src_compile
+}
+
+src_test() {
+ multibuild_foreach_variant cmake-utils_src_test
+}
+
+src_install() {
+ multibuild_foreach_variant cmake-utils_src_install
+}
diff --git a/media-libs/libechonest/metadata.xml b/media-libs/libechonest/metadata.xml
new file mode 100644
index 000000000000..ff73030e0408
--- /dev/null
+++ b/media-libs/libechonest/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>sound</herd>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>nikoli@gmx.us</email>
+ <name>Nikoli</name>
+ </maintainer>
+ <maintainer>
+ <email>ssuominen@gentoo.org</email>
+ <name>Samuli Suominen</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/media-libs/libemf/Manifest b/media-libs/libemf/Manifest
new file mode 100644
index 000000000000..b7daa58ea585
--- /dev/null
+++ b/media-libs/libemf/Manifest
@@ -0,0 +1,2 @@
+DIST libEMF-1.0.4.tar.gz 818060 SHA256 71f6a72ec7b9693217da2b366ac39655803b5f07d4600d7636e827f3b16c66ff SHA512 8abd6081e79e6045b0a4a1575fbcc19921beeefb22036164ed906a35e4dbc67b6959899acf46bb5db5996ae07cf38aaecf8eb62dd6bf5f528200a4d20b13db55 WHIRLPOOL bf71d9812f88ae81e3a6f5436c24de8daf7bee3d0d60e6a9c4743c3aeb8a1a99c1029be4c688c0d9f11204ac7bf62d90be87cb435b2c9075d94bc5403e166cc1
+DIST libEMF-1.0.7.tar.gz 908973 SHA256 9f2fd8bb84e345978c7fc45a39e06fc6a44fee867a91ebe83433d3a34348fd21 SHA512 eff5c46a6e1008d8f581fda59355faa608a825e4832c54dbb074bf20caeee5b038ce18ed3a13181de04bd0601837db7f5c5a0913eb1b8301100dbc26a9ee5888 WHIRLPOOL 7bf19d95b7a679a1c4e3a9a1075c94f04cf40a46bfec3e7308fcbf3d1ce3810c900706c35f2fe42209c5514d8c8ccb76343bd0985bcec6cdc37f7f34af6b3322
diff --git a/media-libs/libemf/files/libemf-1.0.4-amd64-alpha.patch b/media-libs/libemf/files/libemf-1.0.4-amd64-alpha.patch
new file mode 100644
index 000000000000..6f809a957e76
--- /dev/null
+++ b/media-libs/libemf/files/libemf-1.0.4-amd64-alpha.patch
@@ -0,0 +1,95 @@
+--- a/include/libEMF/wine/winbase.h
++++ b/include/libEMF/wine/winbase.h
+@@ -1802,6 +1802,7 @@ LONG WINAPI InterlockedIncrement(PLONG);
+ VOID WINAPI SetLastError(DWORD);
+ #endif /* __i386__ && __GNUC__ */
+
++#if 0
+ /* FIXME: should handle platforms where sizeof(void*) != sizeof(long) */
+ static inline PVOID WINAPI InterlockedCompareExchangePointer( PVOID *dest, PVOID xchg, PVOID compare )
+ {
+@@ -1812,6 +1813,7 @@ static inline PVOID WINAPI InterlockedExchangePointer( PVOID *dest, PVOID val )
+ {
+ return (PVOID)InterlockedExchange( (PLONG)dest, (LONG)val );
+ }
++#endif
+
+ #ifdef __WINE__
+ #define GetCurrentProcess() ((HANDLE)0xffffffff)
+--- a/include/libEMF/wine/winnt.h
++++ b/include/libEMF/wine/winnt.h
+@@ -29,10 +29,14 @@
+
+ /* Architecture dependent settings. */
+ /* These are hardcoded to avoid dependencies on config.h in Winelib apps. */
+-#if defined(__i386__)
++#if defined(__i386__) || defined(__x86_64__)
+ # undef WORDS_BIGENDIAN
+ # undef BITFIELDS_BIGENDIAN
+ # define ALLOW_UNALIGNED_ACCESS
++#elif defined(__alpha__)
++# undef WORDS_BIGENDIAN
++# undef BITFIELDS_BIGENDIAN
++# undef ALLOW_UNALIGNED_ACCESS
+ #elif defined(__sparc__)
+ # define WORDS_BIGENDIAN
+ # define BITFIELDS_BIGENDIAN
+@@ -222,8 +226,13 @@ typedef unsigned short USHORT, *PUSHORT, *LPUSHORT;
+ typedef unsigned short WORD, *PWORD, *LPWORD;
+ typedef int INT, *PINT, *LPINT;
+ typedef unsigned int UINT, *PUINT, *LPUINT;
++#if defined(_LP64) || defined(__alpha__)
++typedef unsigned int DWORD, *PDWORD, *LPDWORD;
++typedef unsigned int ULONG, *PULONG, *LPULONG;
++#else
+ typedef unsigned long DWORD, *PDWORD, *LPDWORD;
+ typedef unsigned long ULONG, *PULONG, *LPULONG;
++#endif
+ typedef float FLOAT, *PFLOAT, *LPFLOAT;
+ typedef double DOUBLE, *PDOUBLE, *LPDOUBLE;
+ typedef double DATE;
+@@ -263,7 +272,11 @@ typedef VOID *PVOID, *LPVOID;
+ typedef BYTE BOOLEAN, *PBOOLEAN;
+ typedef char CHAR, *PCHAR;
+ typedef short SHORT, *PSHORT;
++#if defined(_LP64) || defined(__alpha__)
++typedef int LONG, *PLONG, *LPLONG;
++#else
+ typedef long LONG, *PLONG, *LPLONG;
++#endif
+
+ /* Some systems might have wchar_t, but we really need 16 bit characters */
+ #ifndef WINE_WCHAR_DEFINED
+@@ -652,8 +665,13 @@ typedef CONTEXT86 CONTEXT;
+
+ #endif /* __i386__ */
+
++#ifdef __x86_64__
++#define CONTEXT_FULL 1
++typedef struct _CONTEXT CONTEXT;
++#endif
++
+ /* Alpha context definitions */
+-#ifdef _ALPHA_
++#if defined(__alpha__)
+
+ #define CONTEXT_ALPHA 0x00020000
+
+--- a/libemf/libemf.h
++++ b/libemf/libemf.h
+@@ -306,6 +306,7 @@ namespace EMF {
+ fread( &word, sizeof(INT16), 1, fp_ );
+ return *this;
+ }
++#if !(defined(_LP64) || defined(__alpha__))
+ /*!
+ * Output a double word (long) to the stream (swabbed).
+ * \param word word (long) to output.
+@@ -374,6 +375,7 @@ namespace EMF {
+ fread( &long_, sizeof(LONG), 1, fp_ );
+ return *this;
+ }
++#endif
+ /*!
+ * Output a (long) int to the stream (swabbed).
+ * \param int_ (long) int to output.
diff --git a/media-libs/libemf/libemf-1.0.4-r1.ebuild b/media-libs/libemf/libemf-1.0.4-r1.ebuild
new file mode 100644
index 000000000000..39248699699a
--- /dev/null
+++ b/media-libs/libemf/libemf-1.0.4-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=true
+
+inherit autotools-utils
+
+MY_P="${P/emf/EMF}"
+DESCRIPTION="Library implementation of ECMA-234 API for the generation of enhanced metafiles"
+HOMEPAGE="http://libemf.sourceforge.net/"
+SRC_URI="mirror://sourceforge/libemf/${MY_P}.tar.gz"
+
+LICENSE="LGPL-2.1 GPL-2"
+SLOT="0"
+KEYWORDS="amd64 -arm ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="doc static-libs"
+
+S=${WORKDIR}/${MY_P}
+
+PATCHES=( "${FILESDIR}"/${P}-amd64-alpha.patch )
+
+src_prepare(){
+ sed -i 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/g' configure.ac || die
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=( --enable-editing )
+ autotools-utils_src_configure
+}
+
+src_install() {
+ use doc && HTML_DOCS=( doc/html/. )
+ autotools-utils_src_install
+}
diff --git a/media-libs/libemf/libemf-1.0.7.ebuild b/media-libs/libemf/libemf-1.0.7.ebuild
new file mode 100644
index 000000000000..695a61c45f62
--- /dev/null
+++ b/media-libs/libemf/libemf-1.0.7.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=true
+
+inherit autotools-utils
+
+MY_P="${P/emf/EMF}"
+DESCRIPTION="Library implementation of ECMA-234 API for the generation of enhanced metafiles"
+HOMEPAGE="http://libemf.sourceforge.net/"
+SRC_URI="mirror://sourceforge/libemf/${MY_P}.tar.gz"
+
+LICENSE="LGPL-2.1 GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 -arm ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="doc static-libs"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare(){
+ sed -i 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/g' configure.ac || die
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=( --enable-editing )
+ autotools-utils_src_configure
+}
+
+src_install() {
+ use doc && HTML_DOCS=( doc/html/. )
+ autotools-utils_src_install
+}
diff --git a/media-libs/libemf/metadata.xml b/media-libs/libemf/metadata.xml
new file mode 100644
index 000000000000..9dc9ef9f1c8c
--- /dev/null
+++ b/media-libs/libemf/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">libemf</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libepoxy/Manifest b/media-libs/libepoxy/Manifest
new file mode 100644
index 000000000000..fcc755633e83
--- /dev/null
+++ b/media-libs/libepoxy/Manifest
@@ -0,0 +1 @@
+DIST libepoxy-1.2.tar.gz 267110 SHA256 42c328440f60a5795835c5ec4bdfc1329e75bba16b6e22b3a87ed17e9679e8f6 SHA512 1104fc7e6cbb4bb95e422e7801491067806df6849690be4068b5eec33a5fc84672a5bb4666357e9a46d2fae436f83b37402b6cc0c4ee69627e48d48a4d32a2ed WHIRLPOOL 6a678b9999a909a858a6bd6d9695fd1b6093cd266c1b8c72c401c880a11c09aa9e819ec1459fd12e997ecf54460d7b1da0c476f79d27539218533fff53fc78a6
diff --git a/media-libs/libepoxy/libepoxy-1.2.ebuild b/media-libs/libepoxy/libepoxy-1.2.ebuild
new file mode 100644
index 000000000000..e52f15546a91
--- /dev/null
+++ b/media-libs/libepoxy/libepoxy-1.2.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=yes
+
+EGIT_REPO_URI="git://github.com/anholt/libepoxy.git"
+
+if [[ ${PV} = 9999* ]]; then
+ GIT_ECLASS="git-r3"
+fi
+
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+PYTHON_REQ_USE='xml(+)'
+inherit autotools-multilib ${GIT_ECLASS} python-any-r1
+
+DESCRIPTION="Epoxy is a library for handling OpenGL function pointer management for you"
+HOMEPAGE="https://github.com/anholt/libepoxy"
+if [[ ${PV} = 9999* ]]; then
+ KEYWORDS=""
+ SRC_URI=""
+else
+ KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86"
+ SRC_URI="https://github.com/anholt/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+IUSE="test"
+RESTICT="test" # FIXME: tests fail when run from portage.
+
+DEPEND="${PYTHON_DEPS}
+ media-libs/mesa[egl]
+ x11-misc/util-macros
+ x11-libs/libX11"
+RDEPEND=""
+
+src_unpack() {
+ default
+ [[ $PV = 9999* ]] && git-r3_src_unpack
+}
diff --git a/media-libs/libepoxy/libepoxy-9999.ebuild b/media-libs/libepoxy/libepoxy-9999.ebuild
new file mode 100644
index 000000000000..882629e467ee
--- /dev/null
+++ b/media-libs/libepoxy/libepoxy-9999.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=yes
+
+EGIT_REPO_URI="git://github.com/anholt/libepoxy.git"
+
+if [[ ${PV} = 9999* ]]; then
+ GIT_ECLASS="git-r3"
+fi
+
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+PYTHON_REQ_USE='xml(+)'
+inherit autotools-multilib ${GIT_ECLASS} python-any-r1
+
+DESCRIPTION="Epoxy is a library for handling OpenGL function pointer management for you"
+HOMEPAGE="https://github.com/anholt/libepoxy"
+if [[ ${PV} = 9999* ]]; then
+ KEYWORDS=""
+ SRC_URI=""
+else
+ KEYWORDS="~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~x86"
+ SRC_URI="https://github.com/anholt/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+IUSE="test"
+RESTICT="test" # FIXME: tests fail when run from portage.
+
+DEPEND="${PYTHON_DEPS}
+ media-libs/mesa[egl]
+ x11-misc/util-macros
+ x11-libs/libX11"
+RDEPEND=""
+
+src_unpack() {
+ default
+ [[ $PV = 9999* ]] && git-r3_src_unpack
+}
diff --git a/media-libs/libepoxy/metadata.xml b/media-libs/libepoxy/metadata.xml
new file mode 100644
index 000000000000..8f185a37f13b
--- /dev/null
+++ b/media-libs/libepoxy/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>x11</herd>
+ <upstream>
+ <remote-id type="github">anholt/libepoxy</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libexif-gtk/Manifest b/media-libs/libexif-gtk/Manifest
new file mode 100644
index 000000000000..54a1c74d0244
--- /dev/null
+++ b/media-libs/libexif-gtk/Manifest
@@ -0,0 +1 @@
+DIST libexif-gtk-0.3.5.tar.gz 396534 SHA256 d9b58f2f8524520829b19b11c550a3eb97d33d273a8033a41ba7d305c144bff9
diff --git a/media-libs/libexif-gtk/files/libexif-gtk-0.3.5-confcheck.patch b/media-libs/libexif-gtk/files/libexif-gtk-0.3.5-confcheck.patch
new file mode 100644
index 000000000000..ed22ca64115f
--- /dev/null
+++ b/media-libs/libexif-gtk/files/libexif-gtk-0.3.5-confcheck.patch
@@ -0,0 +1,20 @@
+--- configure.in.orig 2004-10-18 15:12:58.000000000 -0400
++++ configure.in 2006-01-05 19:06:05.000000000 -0500
+@@ -52,7 +52,7 @@
+ dnl ---------------------------------------------------------------------------
+ CPPFLAGS_save="$CPPFLAGS"
+ CPPFLAGS=$LIBEXIF_GTK_CFLAGS
+-AC_CHECK_HEADER([exif-mem.h], [
++PKG_CHECK_MODULES(HAVE_EXIF_0_6_12, libexif >= 0.6.12, [
+ exif_msg=">= 0.6.12"
+ AC_DEFINE(HAVE_EXIF_0_6_12,1,[whether we use a version of libexif greater than 0.6.12])],[
+ exif_msg="< 0.6.12 (think about upgrading)"])
+@@ -73,7 +73,7 @@
+
+ Configuration (${PACKAGE}):
+
+- Source code location: $(srcdir)
++ Source code location: ${srcdir}
+ Version: ${VERSION}
+ Compiler: ${CC}
+
diff --git a/media-libs/libexif-gtk/files/libexif-gtk-0.3.5-gtk212.patch b/media-libs/libexif-gtk/files/libexif-gtk-0.3.5-gtk212.patch
new file mode 100644
index 000000000000..1d5e581d1624
--- /dev/null
+++ b/media-libs/libexif-gtk/files/libexif-gtk-0.3.5-gtk212.patch
@@ -0,0 +1,24 @@
+diff -ur libexif-gtk-0.3.5.orig/gtk-extensions/Makefile.am libexif-gtk-0.3.5/gtk-extensions/Makefile.am
+--- libexif-gtk-0.3.5.orig/gtk-extensions/Makefile.am 2004-10-17 17:57:31.000000000 +0300
++++ libexif-gtk-0.3.5/gtk-extensions/Makefile.am 2007-10-04 17:39:01.000000000 +0300
+@@ -1,7 +1,6 @@
+ INCLUDES = \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/intl \
+- -DGTK_DISABLE_DEPRECATED \
+ $(GTK_CFLAGS)
+
+ noinst_LTLIBRARIES = libgtk-extensions.la
+diff -ur libexif-gtk-0.3.5.orig/libexif-gtk/Makefile.am libexif-gtk-0.3.5/libexif-gtk/Makefile.am
+--- libexif-gtk-0.3.5.orig/libexif-gtk/Makefile.am 2004-10-17 16:48:35.000000000 +0300
++++ libexif-gtk-0.3.5/libexif-gtk/Makefile.am 2007-10-04 17:39:32.000000000 +0300
+@@ -3,8 +3,7 @@
+ -I$(top_srcdir)/intl \
+ -I$(top_srcdir)/gtk-extensions \
+ $(LIBEXIF_GTK_CFLAGS) \
+- -DG_LOG_DOMAIN=\"libexif\" \
+- -DGTK_DISABLE_DEPRECATED
++ -DG_LOG_DOMAIN=\"libexif\"
+
+ lib_LTLIBRARIES = libexif-gtk.la
+
diff --git a/media-libs/libexif-gtk/libexif-gtk-0.3.5-r2.ebuild b/media-libs/libexif-gtk/libexif-gtk-0.3.5-r2.ebuild
new file mode 100644
index 000000000000..4ab5f3524646
--- /dev/null
+++ b/media-libs/libexif-gtk/libexif-gtk-0.3.5-r2.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 autotools eutils
+
+DESCRIPTION="GTK+ frontend to the libexif library (parsing, editing, and saving EXIF data)"
+HOMEPAGE="http://libexif.sf.net"
+SRC_URI="mirror://sourceforge/libexif/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ia64 ppc sparc x86 ~amd64-linux ~x86-linux ~x86-solaris"
+IUSE="nls static-libs"
+
+RDEPEND="x11-libs/gtk+:2
+ >=media-libs/libexif-0.6.12"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS=( ChangeLog )
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-confcheck.patch \
+ "${FILESDIR}"/${P}-gtk212.patch
+
+ AT_M4DIR="m4" eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable nls)
+}
+
+src_install() {
+ default
+ rm -f "${ED}"usr/lib*/${PN}.la
+}
diff --git a/media-libs/libexif-gtk/metadata.xml b/media-libs/libexif-gtk/metadata.xml
new file mode 100644
index 000000000000..5c7a0372083d
--- /dev/null
+++ b/media-libs/libexif-gtk/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>graphics</herd>
+ <upstream>
+ <remote-id type="sourceforge">libexif</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libexif/Manifest b/media-libs/libexif/Manifest
new file mode 100644
index 000000000000..bb16f8cc6d5c
--- /dev/null
+++ b/media-libs/libexif/Manifest
@@ -0,0 +1 @@
+DIST libexif-0.6.21.tar.bz2 1368435 SHA256 16cdaeb62eb3e6dfab2435f7d7bccd2f37438d21c5218ec4e58efa9157d4d41a SHA512 4e0fe2abe85d1c95b41cb3abe1f6333dc3a9eb69dba106a674a78d74a4d5b9c5a19647118fa1cc2d72b98a29853394f1519eda9e2889eb28d3be26b21c7cfc35 WHIRLPOOL 929dba4cbe95064f3de15de3ccbee8c0fb3014054e1615d3fa5fd63af75a425171aa1376e469f5f48d727288ab40ffaf02ecd974b366ea66810ee860ba37c09d
diff --git a/media-libs/libexif/files/libexif-0.6.13-pkgconfig.patch b/media-libs/libexif/files/libexif-0.6.13-pkgconfig.patch
new file mode 100644
index 000000000000..2c6460fd46cf
--- /dev/null
+++ b/media-libs/libexif/files/libexif-0.6.13-pkgconfig.patch
@@ -0,0 +1,11 @@
+--- libexif/libexif.pc.in
++++ libexif/libexif.pc.in
+@@ -1,7 +1,7 @@
+ prefix=@prefix@
+ exec_prefix=@exec_prefix@
+ libdir=@libdir@
+-includedir=@includedir@
++includedir=@includedir@/libexif
+
+ Name: libexif
+ Description: Library for easy access to EXIF data
diff --git a/media-libs/libexif/libexif-0.6.21-r1.ebuild b/media-libs/libexif/libexif-0.6.21-r1.ebuild
new file mode 100644
index 000000000000..de0d7f9c539a
--- /dev/null
+++ b/media-libs/libexif/libexif-0.6.21-r1.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 libtool multilib-minimal
+
+DESCRIPTION="Library for parsing, editing, and saving EXIF data"
+HOMEPAGE="http://libexif.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+IUSE="doc nls static-libs"
+
+RDEPEND="nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )
+ nls? ( sys-devel/gettext )"
+
+ECONF_SOURCE=${S}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.6.13-pkgconfig.patch
+ sed -i -e '/FLAGS=/s:-g::' configure || die #390249
+ elibtoolize # For *-bsd
+}
+
+multilib_src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable nls) \
+ $(use_enable doc docs) \
+ --with-doc-dir="${EPREFIX}"/usr/share/doc/${PF}
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+}
+
+multilib_src_install_all() {
+ prune_libtool_files
+ rm -f "${ED}"/usr/share/doc/${PF}/{ABOUT-NLS,COPYING}
+}
diff --git a/media-libs/libexif/libexif-0.6.21.ebuild b/media-libs/libexif/libexif-0.6.21.ebuild
new file mode 100644
index 000000000000..0975597247c8
--- /dev/null
+++ b/media-libs/libexif/libexif-0.6.21.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 libtool
+
+DESCRIPTION="Library for parsing, editing, and saving EXIF data"
+HOMEPAGE="http://libexif.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+IUSE="doc nls static-libs"
+
+RDEPEND="nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )
+ nls? ( sys-devel/gettext )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.6.13-pkgconfig.patch
+ sed -i -e '/FLAGS=/s:-g::' configure || die #390249
+ elibtoolize # For *-bsd
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable nls) \
+ $(use_enable doc docs) \
+ --with-doc-dir="${EPREFIX}"/usr/share/doc/${PF}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ prune_libtool_files
+ rm -f "${ED}"/usr/share/doc/${PF}/{ABOUT-NLS,COPYING}
+}
diff --git a/media-libs/libexif/metadata.xml b/media-libs/libexif/metadata.xml
new file mode 100644
index 000000000000..59b180fa99e1
--- /dev/null
+++ b/media-libs/libexif/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>graphics</herd>
+ <upstream>
+ <remote-id type="sourceforge">libexif</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libextractor/Manifest b/media-libs/libextractor/Manifest
new file mode 100644
index 000000000000..af9a5afd2ebc
--- /dev/null
+++ b/media-libs/libextractor/Manifest
@@ -0,0 +1,2 @@
+DIST libextractor-1.0.1.tar.gz 7894265 SHA256 3251cbb4324defee1e641de44afb11156b13d676e27e01e031c6e06d904e1ece SHA512 616db2880cfc3b8974107b24346472e5650c5ce4b7580c4b78bcbff41bb1eea313a732891d1eced74a7d90518be7da481859dff98365212cd728d0d19447619c WHIRLPOOL c83561506e3f98f5b212bea23bce44ed42287fde03dbcf2ab2f5cec4ff37a1dba2fc9a2cf1beb984e96518b12ae5ac4561a2acc3b949acb9307bd26eda9006d5
+DIST libextractor-1.3.tar.gz 7942021 SHA256 868ad64c9a056d6b923d451d746935bffb1ddf5d89c3eb4f67d786001a3f7b7f SHA512 38ed47e5e5f50ddf216408f698a104900baa3b03cc8a81a14e63afd30b3e3922acda17363d88d9ba1356ebf70287c8a5152ff6933a36ec1042ca0d832218d45d WHIRLPOOL aeb8305d9efbe6e52632bb7281ea6df26c417c8bbe1398fdc0106653e3b4109095ea734c84f92ede03bd6406c69b362ee4590a0c964c550d8878f890b32b52d9
diff --git a/media-libs/libextractor/libextractor-1.0.1.ebuild b/media-libs/libextractor/libextractor-1.0.1.ebuild
new file mode 100644
index 000000000000..3d678304ce00
--- /dev/null
+++ b/media-libs/libextractor/libextractor-1.0.1.ebuild
@@ -0,0 +1,129 @@
+# Copyright 1999-2015 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="A library used to extract metadata from files of arbitrary type"
+HOMEPAGE="http://www.gnu.org/software/libextractor/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 ~arm ppc ppc64 x86"
+IUSE="+archive +bzip2 ffmpeg flac gif gsf gtk jpeg mp4 +magic midi mpeg qt4 tidy tiff vorbis +zlib" # test
+
+RESTRICT="test"
+
+RDEPEND="app-text/iso-codes
+ >=dev-libs/glib-2
+ media-gfx/exiv2
+ sys-devel/libtool
+ virtual/libiconv
+ virtual/libintl
+ archive? ( app-arch/libarchive )
+ bzip2? ( app-arch/bzip2 )
+ ffmpeg? ( virtual/ffmpeg )
+ flac? (
+ media-libs/flac
+ media-libs/libogg
+ )
+ gif? ( media-libs/giflib )
+ gsf? ( gnome-extra/libgsf )
+ gtk? ( x11-libs/gtk+:3 )
+ jpeg? ( virtual/jpeg )
+ mp4? ( media-libs/libmp4v2:0 )
+ magic? ( sys-apps/file )
+ midi? ( media-libs/libsmf )
+ mpeg? ( media-libs/libmpeg2 )
+ qt4? (
+ dev-qt/qtgui:4
+ dev-qt/qtsvg:4
+ )
+ tidy? ( app-text/htmltidy )
+ tiff? ( media-libs/tiff:0 )
+ vorbis? (
+ media-libs/libogg
+ media-libs/libvorbis
+ )
+ zlib? ( sys-libs/zlib )
+ !<app-crypt/pkcrack-1.2.2-r1
+ !sci-biology/glimmer
+ !sci-chemistry/pdb-extract"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ virtual/pkgconfig"
+# test? ( app-forensics/zzuf )
+
+DOCS="AUTHORS ChangeLog NEWS README TODO"
+
+src_prepare() {
+ # m4/ax_create_pkgconfig_info.m4 is passing environment LDFLAGS to Libs:
+ sed -i \
+ -e '/^ax_create_pkgconfig_ldflags=/s:$LDFLAGS ::' \
+ -e 's:ac_cv_header_tidy_tidy_h:ac_cv_header_tidy_h:g' \
+ -e 's:tidy/tidy.h:tidy.h:g' \
+ -e 's:tidy/buffio.h:buffio.h:g' \
+ configure src/plugins/html_extractor.c || die
+}
+
+src_configure() {
+ e_ac_cv() {
+ export ac_cv_"$@"
+ }
+
+ e_ac_cv {lib_rpm_rpmReadPackageFile,prog_HAVE_ZZUF}=no
+
+ if use flac; then
+ e_ac_cv header_FLAC_all_h=yes
+ e_ac_cv lib_FLAC_FLAC__stream_decoder_init_stream=yes
+ else
+ e_ac_cv header_FLAC_all_h=no
+ e_ac_cv lib_FLAC_FLAC__stream_decoder_init_stream=no
+ e_ac_cv lib_FLAC_FLAC__stream_decoder_init_ogg_stream=no
+ fi
+
+ e_ac_cv header_archive_h=$(usex archive)
+ e_ac_cv header_bzlib_h=$(usex bzip2)
+ e_ac_cv header_gif_lib_h=$(usex gif)
+ e_ac_cv header_jpeglib_h=$(usex jpeg)
+ e_ac_cv header_magic_h=$(usex magic)
+ e_ac_cv header_mpeg2dec_mpeg2_h=$(usex mpeg)
+ e_ac_cv header_tiffio_h=$(usex tiff)
+ e_ac_cv header_vorbis_vorbisfile_h=$(usex vorbis)
+ e_ac_cv header_zlib_h=$(usex zlib)
+ e_ac_cv lib_tidy_tidyInitSource=$(usex tidy)
+ e_ac_cv lib_mp4v2_MP4ReadProvider=$(usex mp4)
+ e_ac_cv lib_smf_smf_load_from_memory=$(usex midi)
+
+ local myconf
+
+ if use qt4; then
+ append-cppflags "$($(tc-getPKG_CONFIG) --cflags-only-I QtGui QtSvg)"
+ append-ldflags "$($(tc-getPKG_CONFIG) --libs-only-L QtGui QtSvg)"
+ else
+ myconf='--without-qt'
+ fi
+
+ # gstreamer support is for 1.0, no 0.10 support
+ econf \
+ --disable-static \
+ --enable-experimental \
+ --enable-glib \
+ $(use_enable gsf) \
+ --disable-gnome \
+ $(use_enable ffmpeg) \
+ --with-gtk_version=$(usex gtk 3.0.0 false) \
+ --without-gstreamer \
+ ${myconf}
+}
+
+src_compile() {
+ emake -j1
+}
+
+src_install() {
+ default
+ find "${ED}" -name '*.la' -exec sed -i -e "/^dependency_libs/s:=.*:='':" {} +
+}
diff --git a/media-libs/libextractor/libextractor-1.3.ebuild b/media-libs/libextractor/libextractor-1.3.ebuild
new file mode 100644
index 000000000000..2c9edefb14ae
--- /dev/null
+++ b/media-libs/libextractor/libextractor-1.3.ebuild
@@ -0,0 +1,114 @@
+# 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
+
+DESCRIPTION="A library used to extract metadata from files of arbitrary type"
+HOMEPAGE="http://www.gnu.org/software/libextractor/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 ~arm ppc ppc64 x86"
+IUSE="+archive +bzip2 ffmpeg flac gif gsf gtk jpeg mp4 +magic midi mpeg tidy tiff vorbis +zlib" # test
+
+RESTRICT="test"
+
+RDEPEND="app-text/iso-codes
+ >=dev-libs/glib-2
+ media-gfx/exiv2
+ sys-devel/libtool
+ virtual/libiconv
+ virtual/libintl
+ archive? ( app-arch/libarchive )
+ bzip2? ( app-arch/bzip2 )
+ ffmpeg? ( virtual/ffmpeg )
+ flac? (
+ media-libs/flac
+ media-libs/libogg
+ )
+ gif? ( media-libs/giflib )
+ gsf? ( gnome-extra/libgsf )
+ gtk? ( x11-libs/gtk+:3 )
+ jpeg? ( virtual/jpeg )
+ mp4? ( media-libs/libmp4v2:0 )
+ magic? ( sys-apps/file )
+ midi? ( media-libs/libsmf )
+ mpeg? ( media-libs/libmpeg2 )
+ tidy? ( app-text/htmltidy )
+ tiff? ( media-libs/tiff:0 )
+ vorbis? (
+ media-libs/libogg
+ media-libs/libvorbis
+ )
+ zlib? ( sys-libs/zlib )
+ !<app-crypt/pkcrack-1.2.2-r1
+ !sci-biology/glimmer
+ !sci-chemistry/pdb-extract"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ virtual/pkgconfig"
+# test? ( app-forensics/zzuf )
+
+DOCS="AUTHORS ChangeLog NEWS README TODO"
+
+src_prepare() {
+ # m4/ax_create_pkgconfig_info.m4 is passing environment LDFLAGS to Libs:
+ sed -i \
+ -e '/^ax_create_pkgconfig_ldflags=/s:$LDFLAGS ::' \
+ -e 's:tidy/tidy.h:tidy.h:' \
+ configure src/plugins/html_extractor.c || die
+
+ use tidy || { sed -i -e 's:tidy.h:dIsAbLe&:' configure || die; }
+}
+
+src_configure() {
+ e_ac_cv() {
+ export ac_cv_"$@"
+ }
+
+ e_ac_cv {lib_rpm_rpmReadPackageFile,prog_HAVE_ZZUF}=no
+
+ if use flac; then
+ e_ac_cv header_FLAC_all_h=yes
+ e_ac_cv lib_FLAC_FLAC__stream_decoder_init_stream=yes
+ else
+ e_ac_cv header_FLAC_all_h=no
+ e_ac_cv lib_FLAC_FLAC__stream_decoder_init_stream=no
+ e_ac_cv lib_FLAC_FLAC__stream_decoder_init_ogg_stream=no
+ fi
+
+ e_ac_cv header_archive_h=$(usex archive)
+ e_ac_cv header_bzlib_h=$(usex bzip2)
+ e_ac_cv header_gif_lib_h=$(usex gif)
+ e_ac_cv header_jpeglib_h=$(usex jpeg)
+ e_ac_cv header_magic_h=$(usex magic)
+ e_ac_cv header_mpeg2dec_mpeg2_h=$(usex mpeg)
+ e_ac_cv header_tiffio_h=$(usex tiff)
+ e_ac_cv header_vorbis_vorbisfile_h=$(usex vorbis)
+ e_ac_cv header_zlib_h=$(usex zlib)
+ e_ac_cv lib_mp4v2_MP4ReadProvider=$(usex mp4)
+ e_ac_cv lib_smf_smf_load_from_memory=$(usex midi)
+
+ # gstreamer support is for 1.0, no 0.10 support
+ econf \
+ --disable-static \
+ --enable-experimental \
+ --enable-glib \
+ $(use_enable gsf) \
+ --disable-gsf-gnome \
+ $(use_enable ffmpeg) \
+ --with-gtk_version=$(usex gtk 3.0.0 false) \
+ --without-gstreamer
+}
+
+src_compile() {
+ emake -j1
+}
+
+src_install() {
+ default
+ find "${ED}" -name '*.la' -exec sed -i -e "/^dependency_libs/s:=.*:='':" {} +
+}
diff --git a/media-libs/libextractor/metadata.xml b/media-libs/libextractor/metadata.xml
new file mode 100644
index 000000000000..a4ea11c6c377
--- /dev/null
+++ b/media-libs/libextractor/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>net-p2p</herd>
+ <maintainer>
+ <email>ssuominen@gentoo.org</email>
+ <name>Samuli Suominen</name>
+ </maintainer>
+ <use>
+ <flag name='archive'>Enable archive support using <pkg>app-arch/libarchive</pkg></flag>
+ <flag name='gsf'>Enable OLE2 (MS Office) plug-in support using <pkg>gnome-base/libgsf</pkg></flag>
+ <flag name='magic'>Enable magic support using <pkg>sys-apps/file</pkg></flag>
+ <flag name='midi'>Enable MIDI support through <pkg>media-libs/libsmf</pkg></flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/libfame/Manifest b/media-libs/libfame/Manifest
new file mode 100644
index 000000000000..8c7dee9221f2
--- /dev/null
+++ b/media-libs/libfame/Manifest
@@ -0,0 +1,2 @@
+DIST libfame-0.9.1.tar.gz 296837 SHA256 7b2c5b883db98e99476ae07bbf4f3aa91615e74a4d7fc918cb79154dd4fc08e1 SHA512 511e7be0bac81482edbe5357b982ad1f4adf2bc784a9f52a3f095269076cd1e42866d2ae24a31b17c38acefc03e2c9d868b17074931e5d320ab5eb52271c4345 WHIRLPOOL bfb07c9e4db74b153d690e63f008613cf21bdca7bfad7dd582953ee25a9b575443b90bda285d145d5c2dd74a6c143940d447208165514d4041a47c98e0178c5a
+DIST libfame-patches-2.tar.bz2 5324 SHA256 abe183ef106198c0023de087a4597a5ef3b2784a456b14509c2c235d50d56a9e SHA512 e4f67b137c3397dd00f8a4d5835a180963c3109c0d239d8f0fe616983a5187f6eaad9f4097cc9eaceb5b9c42de9d9e7518a4174247665a8203a4f69b3383abc4 WHIRLPOOL 82d4f6315d33d573bd4aed86bcae0c1e6363ba2129024936f8fd954dfc0356b6528b00c14a3656b2dbe77b0afed7dfb215414f27e97fac6a9aca40e89bda677d
diff --git a/media-libs/libfame/files/libfame-0.9.1-gcc43.patch b/media-libs/libfame/files/libfame-0.9.1-gcc43.patch
new file mode 100644
index 000000000000..71fdbf59c522
--- /dev/null
+++ b/media-libs/libfame/files/libfame-0.9.1-gcc43.patch
@@ -0,0 +1,33 @@
+diff -rupN libfame-0.9.1b/src/fame_motion_pmvfast.c libfame-0.9.1/src/fame_motion_pmvfast.c
+--- libfame-0.9.1b/src/fame_motion_pmvfast.c 2009-02-03 01:30:26.000000000 -0400
++++ libfame-0.9.1/src/fame_motion_pmvfast.c 2009-02-03 01:31:33.000000000 -0400
+@@ -19,6 +19,7 @@
+
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include "fame.h"
+ #include "fame_malloc.h"
+ #include "fame_motion.h"
+diff -rupN libfame-0.9.1b/src/fame_rate_1param.c libfame-0.9.1/src/fame_rate_1param.c
+--- libfame-0.9.1b/src/fame_rate_1param.c 2009-02-03 01:30:26.000000000 -0400
++++ libfame-0.9.1/src/fame_rate_1param.c 2009-02-03 01:31:15.000000000 -0400
+@@ -19,6 +19,7 @@
+
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <math.h>
+ #include "fame.h"
+ #include "fame_rate_1param.h"
+diff -rupN libfame-0.9.1b/src/fame_rate_simple.c libfame-0.9.1/src/fame_rate_simple.c
+--- libfame-0.9.1b/src/fame_rate_simple.c 2009-02-03 01:30:26.000000000 -0400
++++ libfame-0.9.1/src/fame_rate_simple.c 2009-02-03 01:30:57.000000000 -0400
+@@ -19,6 +19,7 @@
+
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <math.h>
+ #include "fame.h"
+ #include "fame_rate_simple.h"
diff --git a/media-libs/libfame/files/libfame-0.9.1-mmx-configure.ac.patch b/media-libs/libfame/files/libfame-0.9.1-mmx-configure.ac.patch
new file mode 100644
index 000000000000..ff4e7327ce2f
--- /dev/null
+++ b/media-libs/libfame/files/libfame-0.9.1-mmx-configure.ac.patch
@@ -0,0 +1,20 @@
+Index: libfame-0.9.1/configure.in
+===================================================================
+--- libfame-0.9.1.orig/configure.in
++++ libfame-0.9.1/configure.in
+@@ -101,12 +101,9 @@ if test x$ac_cv_prog_gcc = xyes; then
+ CFLAGS="$CFLAGS -Wall -fexpensive-optimizations -funroll-loops -ffast-math"
+
+ dnl -fstrict-aliasing doesn't seem to be supported by gcc < 2.95
+- gcc_major_version=`$CC --version | \
+- sed -e 's,[[^0-9.]],,g' -e 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+- gcc_minor_version=`$CC --version | \
+- sed -e 's,[[^0-9.]],,g' -e 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+- gcc_micro_version=`$CC --version | \
+- sed -e 's,[[^0-9.]],,g' -e 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
++ gcc_major_version=`${CC} -dumpversion | cut -f1 -d.`
++ gcc_minor_version=`${CC} -dumpversion | cut -f2 -d.`
++ gcc_micro_version=`${CC} -dumpversion | cut -f3 -d.`
+
+ dnl ok, I must admit I don't know how to do or/and ;)
+ if test $gcc_major_version -eq 2; then
diff --git a/media-libs/libfame/libfame-0.9.1-r1.ebuild b/media-libs/libfame/libfame-0.9.1-r1.ebuild
new file mode 100644
index 000000000000..fedc619a1a09
--- /dev/null
+++ b/media-libs/libfame/libfame-0.9.1-r1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit autotools-utils
+
+PATCHLEVEL="2"
+DESCRIPTION="MPEG-1 and MPEG-4 video encoding library"
+HOMEPAGE="http://fame.sourceforge.net/"
+SRC_URI="mirror://sourceforge/fame/${P}.tar.gz
+ http://digilander.libero.it/dgp85/gentoo/${PN}-patches-${PATCHLEVEL}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc x86"
+IUSE="cpu_flags_x86_mmx static-libs"
+
+PATCHES=( "${FILESDIR}"/${P}-gcc43.patch )
+
+DOCS=( AUTHORS BUGS CHANGES README TODO )
+
+src_prepare() {
+ EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/${PV}
+
+ # Do not add -march=i586, bug #41770.
+ sed -i -e 's:-march=i[345]86 ::g' configure
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable cpu_flags_x86_mmx mmx)
+ )
+ autotools-utils_src_configure
+}
diff --git a/media-libs/libfame/libfame-0.9.1-r2.ebuild b/media-libs/libfame/libfame-0.9.1-r2.ebuild
new file mode 100644
index 000000000000..f2271f322733
--- /dev/null
+++ b/media-libs/libfame/libfame-0.9.1-r2.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+
+inherit autotools-multilib
+
+PATCHLEVEL="2"
+DESCRIPTION="MPEG-1 and MPEG-4 video encoding library"
+HOMEPAGE="http://fame.sourceforge.net/"
+SRC_URI="mirror://sourceforge/fame/${P}.tar.gz
+ http://digilander.libero.it/dgp85/gentoo/${PN}-patches-${PATCHLEVEL}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86"
+IUSE="cpu_flags_x86_mmx static-libs"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-gcc43.patch
+ "${FILESDIR}"/${P}-mmx-configure.ac.patch )
+
+DOCS=( AUTHORS BUGS CHANGES README TODO )
+
+src_prepare() {
+ EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/${PV}
+
+ # Do not add -march=i586, bug #41770.
+ sed -i -e 's:-march=i[345]86 ::g' configure.in || die
+
+ rm -f acinclude.m4
+
+ autotools-multilib_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable cpu_flags_x86_mmx mmx)
+ )
+ autotools-multilib_src_configure
+}
diff --git a/media-libs/libfame/metadata.xml b/media-libs/libfame/metadata.xml
new file mode 100644
index 000000000000..2fbced3903fb
--- /dev/null
+++ b/media-libs/libfame/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-libs/libfishsound/Manifest b/media-libs/libfishsound/Manifest
new file mode 100644
index 000000000000..8ef666905faa
--- /dev/null
+++ b/media-libs/libfishsound/Manifest
@@ -0,0 +1 @@
+DIST libfishsound-1.0.0.tar.gz 444980 SHA256 2e0b57ce2fecc9375eef72938ed08ac8c8f6c5238e1cae24458f0b0e8dade7c7
diff --git a/media-libs/libfishsound/files/libfishsound-1.0.0-pc.patch b/media-libs/libfishsound/files/libfishsound-1.0.0-pc.patch
new file mode 100644
index 000000000000..fa417bb98ef8
--- /dev/null
+++ b/media-libs/libfishsound/files/libfishsound-1.0.0-pc.patch
@@ -0,0 +1,13 @@
+This will avoid including -I/usr/include/FLAC in `pkg-config --cflags fishsound` since
+FLAC/assert.h will collide with system assert.h.
+
+--- fishsound.pc.in
++++ fishsound.pc.in
+@@ -5,7 +5,6 @@
+
+ Name: fishsound
+ Description: Encode and decode Vorbis, Speex, FLAC audio
+-Requires: @fishsound_pkgdeps@
+ Version: @VERSION@
+ Libs: -L${libdir} -lfishsound
+ Libs.private: @VORBIS_LIBS@ @SPEEX_LIBS@ @FLAC_LIBS@
diff --git a/media-libs/libfishsound/libfishsound-1.0.0.ebuild b/media-libs/libfishsound/libfishsound-1.0.0.ebuild
new file mode 100644
index 000000000000..897e70462c48
--- /dev/null
+++ b/media-libs/libfishsound/libfishsound-1.0.0.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit eutils
+
+DESCRIPTION="Simple programming interface for decoding and encoding audio data using vorbis or speex"
+HOMEPAGE="http://www.xiph.org/fishsound/"
+SRC_URI="http://downloads.xiph.org/releases/libfishsound/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="flac speex"
+
+RDEPEND="media-libs/libvorbis
+ media-libs/libogg
+ flac? ( media-libs/flac )
+ speex? ( media-libs/speex )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+# bug #395153
+RESTRICT="test"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-pc.patch
+ sed -i \
+ -e 's:doxygen:doxygen-dummy:' \
+ configure || die
+}
+
+src_configure() {
+ local myconf=""
+ use flac || myconf="${myconf} --disable-flac"
+ use speex || myconf="${myconf} --disable-speex"
+
+ econf \
+ --disable-dependency-tracking \
+ ${myconf}
+}
+
+src_install() {
+ emake DESTDIR="${D}" \
+ docdir="${D}/usr/share/doc/${PF}" install || die
+ dodoc AUTHORS ChangeLog README
+}
diff --git a/media-libs/libfishsound/metadata.xml b/media-libs/libfishsound/metadata.xml
new file mode 100644
index 000000000000..3bf6bcfeb512
--- /dev/null
+++ b/media-libs/libfishsound/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>sound</herd>
+</pkgmetadata>
diff --git a/media-libs/libfpx/Manifest b/media-libs/libfpx/Manifest
new file mode 100644
index 000000000000..4f5a80037606
--- /dev/null
+++ b/media-libs/libfpx/Manifest
@@ -0,0 +1 @@
+DIST libfpx-1.3.0-1.tar.bz2 2285921 SHA256 0cc240e9458d099c0a50db9c771b3e5b109164472c08f40f31e1190716af48b6
diff --git a/media-libs/libfpx/files/libfpx-1.2.0.13-export-symbols.patch b/media-libs/libfpx/files/libfpx-1.2.0.13-export-symbols.patch
new file mode 100644
index 000000000000..9e0f16325500
--- /dev/null
+++ b/media-libs/libfpx/files/libfpx-1.2.0.13-export-symbols.patch
@@ -0,0 +1,14 @@
+* At least the Darwin linker doesn't like double symbols during the
+ final linking stage...
+
+--- jpeg/jpegconf.h
++++ jpeg/jpegconf.h
+@@ -27,6 +27,6 @@
+ # pragma warning(disable : 4244)
+ # pragma warning(disable : 4142)
+ #else
+-# define JPEGEXPORT
+-# define FPXEXPORT
++# define JPEGEXPORT extern
++# define FPXEXPORT extern
+ #endif
diff --git a/media-libs/libfpx/libfpx-1.3.0-r1.ebuild b/media-libs/libfpx/libfpx-1.3.0-r1.ebuild
new file mode 100644
index 000000000000..06240d89ff85
--- /dev/null
+++ b/media-libs/libfpx/libfpx-1.3.0-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit eutils flag-o-matic libtool
+
+DESCRIPTION="A library for manipulating FlashPIX images"
+HOMEPAGE="http://www.i3a.org/"
+SRC_URI="mirror://imagemagick/delegates/${P}-1.tar.bz2"
+
+LICENSE="Flashpix"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-solaris"
+IUSE=""
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.2.0.13-export-symbols.patch
+ # we're not windows, even though we don't define __unix by default
+ [[ ${CHOST} == *-darwin* ]] && append-flags -D__unix
+ elibtoolize
+}
+
+src_configure() {
+ append-ldflags -Wl,--no-undefined
+ econf \
+ --disable-dependency-tracking \
+ LIBS="-lstdc++ -lm"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ dodoc AUTHORS ChangeLog doc/*.txt || die "dodoc failed"
+ insinto /usr/share/doc/${PF}/pdf
+ doins doc/*.pdf || die "doins failed"
+}
diff --git a/media-libs/libfpx/metadata.xml b/media-libs/libfpx/metadata.xml
new file mode 100644
index 000000000000..9be90a258970
--- /dev/null
+++ b/media-libs/libfpx/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>graphics</herd>
+</pkgmetadata>
diff --git a/media-libs/libfreehand/Manifest b/media-libs/libfreehand/Manifest
new file mode 100644
index 000000000000..769fce60d547
--- /dev/null
+++ b/media-libs/libfreehand/Manifest
@@ -0,0 +1,3 @@
+DIST libfreehand-0.0.0.tar.xz 268908 SHA256 5a38eb890ca8b658f17e5e22d39c654052d24b90a699b6a4b6834880e3afc912 SHA512 9577053fbdd21431e7331e61b0f855e1c3ff7c056be2b64fa600cc383a917ace2850f25f3d0b7517bcbe18055ef6b2cd87f17d3a0f044e33775c0092c06f879d WHIRLPOOL 18d0a4f8240a209c36affcb9761913c32b0bc6599f024f656fbed295dab591e09f8a2cad4c46fee80e00ae87c83b05f2a08abbf7c079f0d4a591eed59d27ee91
+DIST libfreehand-0.1.0.tar.xz 265592 SHA256 5119aac8b0b28d749905f8094e526b9a018a2e4a208b5d0317c7554a62af4706 SHA512 8b3bdd3df158d4371f5007abaa5fd11f7039e0f3e2bbef9540b730ca3fcf94cbf6bd50a8bf917c948fb5257f1b0704b2a10b7cb49b1becdedfef52b41a826f90 WHIRLPOOL a0244a4e4191fddfece2f53deb1b53ed9e325faf20ebfe8b1bc9ce35a3899f4310cd888892f1d1628c955f5aa3cf5e5c483f7448809ef2b867014f445e9549f0
+DIST libfreehand-0.1.1.tar.xz 492916 SHA256 ec6676d0c63f7feac7801a1fe18dd7abe9044b39c3882fc99b9afef39bdf1d30 SHA512 552b6b8c00aabe0d557fdacf4bfe8b0b4c2d34ec6f15820f3a54da76b4f24ca5842ba38ea756d05b947a0e8cf48d351429abef64b25508ea032a92965e9c91e2 WHIRLPOOL 2b82b4a3790df93fb52ec872ed38c1c991ce63b35fd25c87c60c2816f3275b6fa8f7d607fc6f9bd41c6bcbc0fca44efc11e5486b4d0bd47077543ce5e69d9fd8
diff --git a/media-libs/libfreehand/libfreehand-0.0.0.ebuild b/media-libs/libfreehand/libfreehand-0.0.0.ebuild
new file mode 100644
index 000000000000..d9d3a72f79c4
--- /dev/null
+++ b/media-libs/libfreehand/libfreehand-0.0.0.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI="git://anongit.freedesktop.org/git/libreoffice/libfreehand/"
+inherit base eutils
+[[ ${PV} == 9999 ]] && inherit autotools git-2
+
+DESCRIPTION="Library for import of FreeHand drawings"
+HOMEPAGE="http://www.freedesktop.org/wiki/Software/libfreehand/"
+[[ ${PV} == 9999 ]] || SRC_URI="http://dev-www.libreoffice.org/src/${P}.tar.xz"
+
+LICENSE="MPL-2.0"
+SLOT="0"
+[[ ${PV} == 9999 ]] || \
+KEYWORDS="amd64 ~arm ~ppc x86"
+IUSE="doc static-libs"
+
+RDEPEND="
+ app-text/libwpd:0.9
+ app-text/libwpg:0.2
+ sys-libs/zlib
+"
+DEPEND="${RDEPEND}
+ dev-util/gperf
+ sys-devel/libtool
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )
+"
+
+src_prepare() {
+ [[ -d m4 ]] || mkdir "m4"
+ base_src_prepare
+ [[ ${PV} == 9999 ]] && eautoreconf
+}
+
+src_configure() {
+ econf \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ $(use_enable static-libs static) \
+ --disable-werror \
+ $(use_with doc docs)
+}
+
+src_install() {
+ default
+ prune_libtool_files --all
+}
diff --git a/media-libs/libfreehand/libfreehand-0.1.0.ebuild b/media-libs/libfreehand/libfreehand-0.1.0.ebuild
new file mode 100644
index 000000000000..b371c0098c57
--- /dev/null
+++ b/media-libs/libfreehand/libfreehand-0.1.0.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI="git://anongit.freedesktop.org/git/libreoffice/libfreehand/"
+inherit base eutils
+[[ ${PV} == 9999 ]] && inherit autotools git-2
+
+DESCRIPTION="Library for import of FreeHand drawings"
+HOMEPAGE="https://wiki.documentfoundation.org/DLP/Libraries/libfreehand"
+[[ ${PV} == 9999 ]] || SRC_URI="http://dev-www.libreoffice.org/src/${PN}/${P}.tar.xz"
+
+LICENSE="MPL-2.0"
+SLOT="0"
+[[ ${PV} == 9999 ]] || \
+KEYWORDS="amd64 ~arm x86"
+IUSE="doc static-libs"
+
+RDEPEND="
+ dev-libs/librevenge
+ sys-libs/zlib
+"
+DEPEND="${RDEPEND}
+ dev-util/gperf
+ sys-devel/libtool
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )
+"
+
+src_prepare() {
+ [[ -d m4 ]] || mkdir "m4"
+ base_src_prepare
+ [[ ${PV} == 9999 ]] && eautoreconf
+}
+
+src_configure() {
+ econf \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ $(use_enable static-libs static) \
+ --disable-werror \
+ $(use_with doc docs)
+}
+
+src_install() {
+ default
+ prune_libtool_files --all
+}
diff --git a/media-libs/libfreehand/libfreehand-0.1.1.ebuild b/media-libs/libfreehand/libfreehand-0.1.1.ebuild
new file mode 100644
index 000000000000..484a835f779f
--- /dev/null
+++ b/media-libs/libfreehand/libfreehand-0.1.1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI="git://anongit.freedesktop.org/git/libreoffice/libfreehand/"
+inherit base eutils
+[[ ${PV} == 9999 ]] && inherit autotools git-2
+
+DESCRIPTION="Library for import of FreeHand drawings"
+HOMEPAGE="https://wiki.documentfoundation.org/DLP/Libraries/libfreehand"
+[[ ${PV} == 9999 ]] || SRC_URI="http://dev-www.libreoffice.org/src/${PN}/${P}.tar.xz"
+
+LICENSE="MPL-2.0"
+SLOT="0"
+[[ ${PV} == 9999 ]] || \
+KEYWORDS="amd64 ~arm x86"
+IUSE="doc static-libs"
+
+RDEPEND="
+ dev-libs/librevenge
+ sys-libs/zlib
+"
+DEPEND="${RDEPEND}
+ dev-libs/icu:=
+ dev-util/gperf
+ media-libs/lcms
+ sys-devel/libtool
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )
+"
+
+src_prepare() {
+ [[ -d m4 ]] || mkdir "m4"
+ base_src_prepare
+ [[ ${PV} == 9999 ]] && eautoreconf
+}
+
+src_configure() {
+ econf \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ $(use_enable static-libs static) \
+ --disable-werror \
+ $(use_with doc docs)
+}
+
+src_install() {
+ default
+ prune_libtool_files --all
+}
diff --git a/media-libs/libfreehand/libfreehand-9999.ebuild b/media-libs/libfreehand/libfreehand-9999.ebuild
new file mode 100644
index 000000000000..902fedcefb46
--- /dev/null
+++ b/media-libs/libfreehand/libfreehand-9999.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI="git://anongit.freedesktop.org/git/libreoffice/libfreehand/"
+inherit base eutils
+[[ ${PV} == 9999 ]] && inherit autotools git-2
+
+DESCRIPTION="Library for import of FreeHand drawings"
+HOMEPAGE="https://wiki.documentfoundation.org/DLP/Libraries/libfreehand"
+[[ ${PV} == 9999 ]] || SRC_URI="http://dev-www.libreoffice.org/src/${PN}/${P}.tar.xz"
+
+LICENSE="MPL-2.0"
+SLOT="0"
+[[ ${PV} == 9999 ]] || \
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="doc static-libs"
+
+RDEPEND="
+ dev-libs/librevenge
+ sys-libs/zlib
+"
+DEPEND="${RDEPEND}
+ dev-libs/icu:=
+ dev-util/gperf
+ media-libs/lcms
+ sys-devel/libtool
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )
+"
+
+src_prepare() {
+ [[ -d m4 ]] || mkdir "m4"
+ base_src_prepare
+ [[ ${PV} == 9999 ]] && eautoreconf
+}
+
+src_configure() {
+ econf \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ $(use_enable static-libs static) \
+ --disable-werror \
+ $(use_with doc docs)
+}
+
+src_install() {
+ default
+ prune_libtool_files --all
+}
diff --git a/media-libs/libfreehand/metadata.xml b/media-libs/libfreehand/metadata.xml
new file mode 100644
index 000000000000..5d46203011d6
--- /dev/null
+++ b/media-libs/libfreehand/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>openoffice</herd>
+</pkgmetadata>
diff --git a/media-libs/libggi/Manifest b/media-libs/libggi/Manifest
new file mode 100644
index 000000000000..065cc20fc723
--- /dev/null
+++ b/media-libs/libggi/Manifest
@@ -0,0 +1 @@
+DIST libggi-2.2.2.src.tar.bz2 1071939 SHA256 acee4201cce6c658531717441ec33269e57f04823226461598152553a5b633a7
diff --git a/media-libs/libggi/libggi-2.2.2.ebuild b/media-libs/libggi/libggi-2.2.2.ebuild
new file mode 100644
index 000000000000..7b8f131bb555
--- /dev/null
+++ b/media-libs/libggi/libggi-2.2.2.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Fast and safe graphics and drivers for about any graphics card to the Linux kernel (sometimes)"
+HOMEPAGE="http://www.ggi-project.org"
+SRC_URI="mirror://sourceforge/ggi/${P}.src.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="X aalib svga fbcon directfb 3dfx debug cpu_flags_x86_mmx vis"
+
+RDEPEND=">=media-libs/libgii-1.0.2
+ X? ( x11-libs/libXt
+ x11-libs/libXxf86dga
+ x11-libs/libXxf86vm
+ x11-libs/libXt )
+ svga? ( >=media-libs/svgalib-1.4.2 )
+ aalib? ( >=media-libs/aalib-1.2-r1 )"
+DEPEND="${RDEPEND}
+ X? ( x11-proto/xf86dgaproto
+ x11-proto/xf86vidmodeproto
+ x11-proto/xextproto )"
+
+src_compile() {
+ local myconf=""
+
+ use svga || myconf="${myconf} --disable-svga --disable-vgagl"
+
+ if use !fbcon && use !directfb; then
+ myconf="${myconf} --disable-fbdev --disable-directfb"
+ elif use directfb; then
+ myconf="${myconf} --enable-fbdev --enable-directfb"
+ else
+ myconf="${myconf} --enable-fbdev"
+ fi
+
+ if use amd64 || use ppc64 || use ia64 ; then
+ myconf="${myconf} --enable-64bitc"
+ else
+ myconf="${myconf} --disable-64bitc"
+ fi
+
+ econf $(use_enable 3dfx glide) \
+ $(use_enable aalib aa) \
+ $(use_enable debug) \
+ $(use_enable cpu_flags_x86_mmx mmx) \
+ $(use_enable vis) \
+ $(use_with X x) \
+ $(use_enable X x) \
+ ${myconf}
+ emake || die
+}
+
+src_install () {
+ emake DESTDIR="${D}" install || die
+
+ dodoc ChangeLog* FAQ NEWS README
+ docinto txt
+ dodoc doc/*.txt
+}
diff --git a/media-libs/libggi/metadata.xml b/media-libs/libggi/metadata.xml
new file mode 100644
index 000000000000..55a6e7af8ea8
--- /dev/null
+++ b/media-libs/libggi/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="vis">Enables sparc vis support for libggi</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">ggi</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libggigcp/Manifest b/media-libs/libggigcp/Manifest
new file mode 100644
index 000000000000..811c5e57558d
--- /dev/null
+++ b/media-libs/libggigcp/Manifest
@@ -0,0 +1 @@
+DIST libggigcp-1.0.2.src.tar.bz2 365368 SHA256 6c66821a5f1ccc20290c08b85138ecd00a91745c8abff97f476e82bc81362188
diff --git a/media-libs/libggigcp/libggigcp-1.0.2.ebuild b/media-libs/libggigcp/libggigcp-1.0.2.ebuild
new file mode 100644
index 000000000000..9eed0bfd6ec1
--- /dev/null
+++ b/media-libs/libggigcp/libggigcp-1.0.2.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Library for General Graphics Interface"
+HOMEPAGE="http://www.ggi-project.org"
+SRC_URI="mirror://sourceforge/ggi/${P}.src.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 ~x86"
+IUSE=""
+
+RDEPEND=">=media-libs/libggi-2.2.2"
+DEPEND="${RDEPEND}"
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed."
+ dodoc ChangeLog README doc/{TODO,*.txt,*.faq}
+}
diff --git a/media-libs/libggigcp/metadata.xml b/media-libs/libggigcp/metadata.xml
new file mode 100644
index 000000000000..4428fc215295
--- /dev/null
+++ b/media-libs/libggigcp/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">ggi</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libggimisc/Manifest b/media-libs/libggimisc/Manifest
new file mode 100644
index 000000000000..f01663429436
--- /dev/null
+++ b/media-libs/libggimisc/Manifest
@@ -0,0 +1 @@
+DIST libggimisc-2.2.2.src.tar.bz2 320084 SHA256 0f5f62c67f31dbc2577de013d17caddaa864bcaa619c2fec5bb4e6c1440e5484
diff --git a/media-libs/libggimisc/libggimisc-2.2.2.ebuild b/media-libs/libggimisc/libggimisc-2.2.2.ebuild
new file mode 100644
index 000000000000..b9dfa0f29d84
--- /dev/null
+++ b/media-libs/libggimisc/libggimisc-2.2.2.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Library for General Graphics Interface"
+HOMEPAGE="http://www.ggi-project.org"
+SRC_URI="mirror://sourceforge/ggi/${P}.src.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 ~x86"
+IUSE="fbcon svga"
+
+RDEPEND=">=media-libs/libggi-2.2.2
+ svga? ( media-libs/svgalib )"
+DEPEND="${RDEPEND}"
+
+src_compile() {
+ econf --disable-x --without-x \
+ $(use_enable svga svgalib) \
+ $(use_enable fbcon fbdev)
+ emake || die "emake failed."
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed."
+ dodoc ChangeLog README TODO doc/*.txt
+}
+
+pkg_postinst() {
+ elog "X extension for ${PN} has been temporarily disabled for this release."
+}
diff --git a/media-libs/libggimisc/metadata.xml b/media-libs/libggimisc/metadata.xml
new file mode 100644
index 000000000000..4428fc215295
--- /dev/null
+++ b/media-libs/libggimisc/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">ggi</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libggiwmh/Manifest b/media-libs/libggiwmh/Manifest
new file mode 100644
index 000000000000..089530a6f0a6
--- /dev/null
+++ b/media-libs/libggiwmh/Manifest
@@ -0,0 +1 @@
+DIST libggiwmh-0.3.2.src.tar.bz2 316669 SHA256 4f5d08557350b540a3a20ab09aab65e43cdda393a1ec4dec8e48eaad658b548d
diff --git a/media-libs/libggiwmh/libggiwmh-0.3.2.ebuild b/media-libs/libggiwmh/libggiwmh-0.3.2.ebuild
new file mode 100644
index 000000000000..b62dbc74c9ba
--- /dev/null
+++ b/media-libs/libggiwmh/libggiwmh-0.3.2.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Library for General Graphics Interface"
+HOMEPAGE="http://www.ggi-project.org"
+SRC_URI="mirror://sourceforge/ggi/${P}.src.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="X"
+
+RDEPEND=">=media-libs/libggi-2.2.2
+ X? ( x11-libs/libXxf86vm
+ x11-libs/libXxf86dga
+ x11-libs/libXext
+ x11-libs/libX11 )"
+DEPEND="${RDEPEND}"
+
+src_compile() {
+ econf $(use_enable X x) $(use_with X x)
+ emake || die "emake failed."
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed."
+ dodoc ChangeLog README doc/*.txt
+}
diff --git a/media-libs/libggiwmh/metadata.xml b/media-libs/libggiwmh/metadata.xml
new file mode 100644
index 000000000000..4428fc215295
--- /dev/null
+++ b/media-libs/libggiwmh/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">ggi</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libgig/Manifest b/media-libs/libgig/Manifest
new file mode 100644
index 000000000000..d1bce3906564
--- /dev/null
+++ b/media-libs/libgig/Manifest
@@ -0,0 +1,2 @@
+DIST libgig-3.3.0.tar.bz2 338119 SHA256 d22a3c7ba13d920c1d4b6c218107ad105622ae9d1236ffbce007b98547774425
+DIST libgig-4.0.0.tar.bz2 700905 SHA256 5f4db3fbc4effe1b85dd1a2ff791fd3fc418afa6a79cd497f9de5e5c25af28f3 SHA512 171eb322a913447708881edad8da5d0d12b873bf36d191cd181dddf67a82446c8400cb4b7a6386b62ac20df8571a1597c6765fa0ef6d443957b5aae03afb345c WHIRLPOOL 1a91ed666f17b4ed12c4170fa193dead2168f9068d8b19084ec7061802fa5e73fcba2050379c3927a6ca1bcbf178baf87979d4ac94dbebdefcb1f9faccd3ab0d
diff --git a/media-libs/libgig/libgig-3.3.0.ebuild b/media-libs/libgig/libgig-3.3.0.ebuild
new file mode 100644
index 000000000000..60ead98512fe
--- /dev/null
+++ b/media-libs/libgig/libgig-3.3.0.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+DESCRIPTION="a C++ library for loading Gigasampler files and DLS (Downloadable Sounds) Level 1/2 files"
+HOMEPAGE="http://www.linuxsampler.org/libgig/"
+SRC_URI="http://download.linuxsampler.org/packages/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="doc"
+
+RDEPEND=">=media-libs/libsndfile-1.0.2
+ >=media-libs/audiofile-0.2.3"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+src_compile() {
+ econf
+ emake -j1 || die "emake failed."
+
+ if use doc; then
+ emake -j1 docs || die "emake docs failed."
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ dodoc AUTHORS ChangeLog NEWS README TODO
+
+ if use doc; then
+ dohtml -r doc/html/*
+ fi
+}
diff --git a/media-libs/libgig/libgig-4.0.0.ebuild b/media-libs/libgig/libgig-4.0.0.ebuild
new file mode 100644
index 000000000000..2bce38d5f135
--- /dev/null
+++ b/media-libs/libgig/libgig-4.0.0.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
+
+DESCRIPTION="a C++ library for loading Gigasampler files and DLS (Downloadable Sounds) Level 1/2 files"
+HOMEPAGE="http://www.linuxsampler.org/libgig/"
+SRC_URI="http://download.linuxsampler.org/packages/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="doc"
+
+RDEPEND=">=media-libs/libsndfile-1.0.2
+ >=media-libs/audiofile-0.2.3"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+src_compile() {
+ emake
+
+ if use doc ; then
+ emake docs
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc AUTHORS ChangeLog NEWS README TODO
+
+ if use doc ; then
+ dohtml -r doc/html/*
+ fi
+}
diff --git a/media-libs/libgig/metadata.xml b/media-libs/libgig/metadata.xml
new file mode 100644
index 000000000000..e1774e3d9ad7
--- /dev/null
+++ b/media-libs/libgig/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>sound</herd>
+</pkgmetadata>
diff --git a/media-libs/libgii/Manifest b/media-libs/libgii/Manifest
new file mode 100644
index 000000000000..17d8f6753b5e
--- /dev/null
+++ b/media-libs/libgii/Manifest
@@ -0,0 +1 @@
+DIST libgii-1.0.2.src.tar.bz2 701099 SHA256 f72201143281ba972fd9e249afbe342c54e73c29ec996adb0d6e85322c6ee49d SHA512 d45b236e08bb8c6a7a7741ae694650dfc5681712a174f923c9132c41acb388d0d6dbc5589104a7a6bc73c98088f2b5967ee726d83c1f3e913602661c8d30bf07 WHIRLPOOL 1e38eddf5eb2f070076ffc05b0e32bc6ad8b9dd96b9bb82e0e90eb90d67b15e42700c47a65b8b933082e5a70c508b4cd4beeb8a707f434bda91793cf0e9ce79a
diff --git a/media-libs/libgii/files/libgii-0.9.0-linux26-headers.patch b/media-libs/libgii/files/libgii-0.9.0-linux26-headers.patch
new file mode 100644
index 000000000000..ff77c33c4e9e
--- /dev/null
+++ b/media-libs/libgii/files/libgii-0.9.0-linux26-headers.patch
@@ -0,0 +1,12 @@
+--- input/linux_kbd/linkey.c~ 2002-02-23 06:51:05.000000000 +0900
++++ input/linux_kbd/linkey.c 2005-03-28 12:05:43.000000000 +0900
+@@ -25,8 +25,8 @@
+ ******************************************************************************
+ */
+ #include "config.h"
+-#include "linkey.h"
+ #include <ctype.h>
++#include "linkey.h"
+
+ static uint32 basic_trans(int sym, int islabel, uint32 *modifiers,
+ uint32 label, int keycode)
diff --git a/media-libs/libgii/files/libgii-1.0.2-configure-cpuid-pic.patch b/media-libs/libgii/files/libgii-1.0.2-configure-cpuid-pic.patch
new file mode 100644
index 000000000000..5c014a479745
--- /dev/null
+++ b/media-libs/libgii/files/libgii-1.0.2-configure-cpuid-pic.patch
@@ -0,0 +1,13 @@
+dont clobber ebx as that is the pic register and it doesnt work in many cases
+
+--- libgii-1.0.2/m4/swar.m4
++++ libgii-1.0.2/m4/swar.m4
+@@ -8069,7 +8069,7 @@
+ #ifdef _MSC_VER
+ __asm cpuid
+ #else
+- asm("cpuid": "=a" (a), "=b" (b), "=c" (c), "=d" (d) : "a" (in));
++ asm("pushl %%ebx; cpuid; movl %%ebx,%2; popl %%ebx": "=a" (a), "=r" (b), "=c" (c), "=d" (d) : "a" (in));
+ #endif
+ return d;],
+ ggi_cv_cc_can_cpuid="yes", ggi_cv_cc_can_cpuid="no")])
diff --git a/media-libs/libgii/files/libgii-1.0.2-libtool_1.5_compat.patch b/media-libs/libgii/files/libgii-1.0.2-libtool_1.5_compat.patch
new file mode 100644
index 000000000000..851216540b47
--- /dev/null
+++ b/media-libs/libgii/files/libgii-1.0.2-libtool_1.5_compat.patch
@@ -0,0 +1,19 @@
+--- configure.in 2007-01-16 14:52:56.000000000 -0500
++++ configure.in.new 2008-06-10 15:40:14.000000000 -0400
+@@ -12,7 +12,7 @@
+ AM_INIT_AUTOMAKE([libgii],[1.0.2],[-])
+
+ AM_MAINTAINER_MODE
+-
++AC_PROG_LIBTOOL
+
+ AC_CANONICAL_BUILD
+ AC_CANONICAL_HOST
+@@ -100,7 +100,6 @@
+ dnl Make Objective-C work with automake >= 1.7.x
+ AM_CONDITIONAL([am__fastdepOBJC], false)
+
+-LT_INIT([win32-dll])
+
+
+ dnl ========================================================================
diff --git a/media-libs/libgii/libgii-1.0.2-r1.ebuild b/media-libs/libgii/libgii-1.0.2-r1.ebuild
new file mode 100644
index 000000000000..f16deb0d172d
--- /dev/null
+++ b/media-libs/libgii/libgii-1.0.2-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+
+inherit autotools-multilib
+
+DESCRIPTION="Fast and safe graphics and drivers for about any graphics card to the Linux kernel (sometimes)"
+HOMEPAGE="http://www.ggi-project.org"
+SRC_URI="mirror://sourceforge/ggi/${P}.src.tar.bz2"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="X"
+
+RDEPEND="X? (
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXxf86dga-1.1.4[${MULTILIB_USEDEP}]
+ )"
+DEPEND="${RDEPEND}
+ kernel_linux? ( >=sys-kernel/linux-headers-2.6.11 )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.9.0-linux26-headers.patch
+ "${FILESDIR}"/${P}-configure-cpuid-pic.patch
+ "${FILESDIR}"/${P}-libtool_1.5_compat.patch
+)
+
+DOCS=( ChangeLog ChangeLog.1999 FAQ NEWS README )
+
+MULTILIB_WRAPPED_HEADERS=( /usr/include/ggi/system.h )
+
+src_prepare() {
+ rm -f acinclude.m4 m4/libtool.m4 m4/lt*.m4
+ AT_M4DIR=m4 autotools-multilib_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=( $(use_with X x) $(use_enable X x) )
+ autotools-multilib_src_configure
+}
diff --git a/media-libs/libgii/metadata.xml b/media-libs/libgii/metadata.xml
new file mode 100644
index 000000000000..4428fc215295
--- /dev/null
+++ b/media-libs/libgii/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">ggi</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libgltf/Manifest b/media-libs/libgltf/Manifest
new file mode 100644
index 000000000000..aa8ba7851df4
--- /dev/null
+++ b/media-libs/libgltf/Manifest
@@ -0,0 +1,2 @@
+DIST libgltf-0.0.1.tar.bz2 348202 SHA256 2569bd6521a6afc53484746035478f1f8a8f002baa6c3d7ea83764e4db576345 SHA512 7009b9f9fcf4033bf4a884bbc017a740390418552495f2f2c940bdac43ecebb9899f6f4b3b18f28f6fca2f352992c61aeecccf3087ceb272891a8710e678268e WHIRLPOOL a89f7531705cbabb460b6890fbc99007a8cbde1d775a77531d467b5ab9e10d4867358c11ad7c35e2064f6236d906a7bfce569e23ac1b6f74b9e448444e053af6
+DIST libgltf-0.0.2.tar.bz2 538040 SHA256 d1cc7297ed1921aa969e26413b4c4e18afc882ce4d2f5a2aa2a2905706f7206b SHA512 74ca5e5e0f38ee5a67e870b49f4adf6c9710dc696afb776149618c05d15e3527d605143230f7ceacd199b609bcbb683cfc72d8e4ef22ba5b9ca777c8a2b53dcf WHIRLPOOL fbac1dc41cab63d4f322893d1b55d513fe8eefad5d625db703134dc429b3b87b5b6d36c481810d6e819c8f8213846b700d318421ac7858347c5ddf1cd875a246
diff --git a/media-libs/libgltf/libgltf-0.0.1.ebuild b/media-libs/libgltf/libgltf-0.0.1.ebuild
new file mode 100644
index 000000000000..93dde2e6e4c1
--- /dev/null
+++ b/media-libs/libgltf/libgltf-0.0.1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI="git://gerrit.libreoffice.org/libgltf.git"
+inherit base eutils
+[[ ${PV} == 9999 ]] && inherit autotools git-2
+
+DESCRIPTION="C++ Library for rendering OpenGL models stored in glTF format"
+HOMEPAGE="http://www.libreoffice.org"
+[[ ${PV} == 9999 ]] || SRC_URI="http://dev-www.libreoffice.org/src/${PN}/${P}.tar.bz2"
+
+LICENSE="MPL-2.0"
+SLOT="0"
+[[ ${PV} == 9999 ]] || \
+KEYWORDS="~amd64 ~x86"
+IUSE="debug test"
+
+RDEPEND="virtual/opengl"
+
+DEPEND="${RDEPEND}
+ dev-libs/boost
+ media-libs/glew
+ media-libs/glm
+ sys-devel/libtool
+ virtual/pkgconfig
+"
+
+# testsuite not in tarball
+# only in git; unsure
+RESTRICT="test"
+
+src_prepare() {
+ [[ -d m4 ]] || mkdir "m4"
+ base_src_prepare
+ [[ ${PV} == 9999 ]] && eautoreconf
+}
+
+src_configure() {
+ econf \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ --disable-werror \
+ $(use_enable test tests)
+}
+
+src_install() {
+ default
+ prune_libtool_files --all
+}
diff --git a/media-libs/libgltf/libgltf-0.0.2.ebuild b/media-libs/libgltf/libgltf-0.0.2.ebuild
new file mode 100644
index 000000000000..2b4c8618f720
--- /dev/null
+++ b/media-libs/libgltf/libgltf-0.0.2.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI="git://gerrit.libreoffice.org/libgltf.git"
+inherit base eutils
+[[ ${PV} == 9999 ]] && inherit autotools git-2
+
+DESCRIPTION="C++ Library for rendering OpenGL models stored in glTF format"
+HOMEPAGE="http://www.libreoffice.org"
+[[ ${PV} == 9999 ]] || SRC_URI="http://dev-www.libreoffice.org/src/${PN}/${P}.tar.bz2"
+
+LICENSE="MPL-2.0"
+SLOT="0"
+[[ ${PV} == 9999 ]] || \
+KEYWORDS="amd64 x86"
+IUSE="debug test"
+
+RDEPEND="virtual/opengl"
+
+DEPEND="${RDEPEND}
+ dev-libs/boost
+ media-libs/glew
+ media-libs/glm
+ sys-devel/libtool
+ virtual/pkgconfig
+"
+
+# testsuite not in tarball
+# only in git; unsure
+RESTRICT="test"
+
+src_prepare() {
+ [[ -d m4 ]] || mkdir "m4"
+ base_src_prepare
+ [[ ${PV} == 9999 ]] && eautoreconf
+}
+
+src_configure() {
+ econf \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ --disable-werror \
+ $(use_enable test tests)
+}
+
+src_install() {
+ default
+ prune_libtool_files --all
+}
diff --git a/media-libs/libgltf/libgltf-9999.ebuild b/media-libs/libgltf/libgltf-9999.ebuild
new file mode 100644
index 000000000000..93dde2e6e4c1
--- /dev/null
+++ b/media-libs/libgltf/libgltf-9999.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI="git://gerrit.libreoffice.org/libgltf.git"
+inherit base eutils
+[[ ${PV} == 9999 ]] && inherit autotools git-2
+
+DESCRIPTION="C++ Library for rendering OpenGL models stored in glTF format"
+HOMEPAGE="http://www.libreoffice.org"
+[[ ${PV} == 9999 ]] || SRC_URI="http://dev-www.libreoffice.org/src/${PN}/${P}.tar.bz2"
+
+LICENSE="MPL-2.0"
+SLOT="0"
+[[ ${PV} == 9999 ]] || \
+KEYWORDS="~amd64 ~x86"
+IUSE="debug test"
+
+RDEPEND="virtual/opengl"
+
+DEPEND="${RDEPEND}
+ dev-libs/boost
+ media-libs/glew
+ media-libs/glm
+ sys-devel/libtool
+ virtual/pkgconfig
+"
+
+# testsuite not in tarball
+# only in git; unsure
+RESTRICT="test"
+
+src_prepare() {
+ [[ -d m4 ]] || mkdir "m4"
+ base_src_prepare
+ [[ ${PV} == 9999 ]] && eautoreconf
+}
+
+src_configure() {
+ econf \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ --disable-werror \
+ $(use_enable test tests)
+}
+
+src_install() {
+ default
+ prune_libtool_files --all
+}
diff --git a/media-libs/libgltf/metadata.xml b/media-libs/libgltf/metadata.xml
new file mode 100644
index 000000000000..5d46203011d6
--- /dev/null
+++ b/media-libs/libgltf/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>openoffice</herd>
+</pkgmetadata>
diff --git a/media-libs/libgphoto2/Manifest b/media-libs/libgphoto2/Manifest
new file mode 100644
index 000000000000..8b6d4d41290c
--- /dev/null
+++ b/media-libs/libgphoto2/Manifest
@@ -0,0 +1,2 @@
+DIST libgphoto2-2.5.5.1.tar.bz2 6699687 SHA256 600e6bde24545eef4d2d8285af389a5ae738707becb018c78611b2d8a3054846 SHA512 a274bb553abed2f498b28388b2e2bc1810b4f57823744e7461248020818f1b79430198d81091aaa8ddc18a2a2acc5acf4fce5800e80da5e7ba534f0c094c749a WHIRLPOOL 8831627d38a0d53eecc8cbbd54595f7c0eff93a6b78ba40b1651b36d843c1bb973e8ce07ebeba0bffd3dafe4302abcd2512472b76c3225fedc1df4c827aa5190
+DIST libgphoto2-2.5.7.tar.bz2 6726164 SHA256 7260193277bdb4c319dd8f151224f87deac9fde64cbe5d2eb25d9c19e4d09894 SHA512 eaff704eb4ccfc6f7a2890c6583ece268005d91acbf8c5e192e2ac91e5a2f5f4f6c84b4dfc95773a6e6023fb12cb0e63d75eed8cd4f8a98019069ac6ab4e60f1 WHIRLPOOL 87a2fa5bbff780dce0131bcca90169bc4c273a42f4b99f2d614accba42284c1a6087ff4b1dbc6bdf139b88b95df6e4367404c873ac27b8388e594af2959dd563
diff --git a/media-libs/libgphoto2/libgphoto2-2.5.5.1-r1.ebuild b/media-libs/libgphoto2/libgphoto2-2.5.5.1-r1.ebuild
new file mode 100644
index 000000000000..53046c3ce145
--- /dev/null
+++ b/media-libs/libgphoto2/libgphoto2-2.5.5.1-r1.ebuild
@@ -0,0 +1,233 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# TODO
+# 1. Track upstream bug --disable-docs does not work.
+# http://sourceforge.net/tracker/index.php?func=detail&aid=1643870&group_id=8874&atid=108874
+
+EAPI="5"
+
+inherit multilib multilib-minimal udev user
+
+DESCRIPTION="Library that implements support for numerous digital cameras"
+HOMEPAGE="http://www.gphoto.org/"
+SRC_URI="mirror://sourceforge/gphoto/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0/6" # libgphoto2.so soname version
+
+KEYWORDS="alpha amd64 ~arm hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~ia64-linux ~x86-linux"
+IUSE="doc examples exif gd jpeg nls serial zeroconf"
+
+# By default, drivers for all supported cameras will be compiled.
+# If you want to only compile for specific camera(s), set CAMERAS
+# environment to a space-separated list (no commas) of drivers that
+# you want to build.
+IUSE_CAMERAS="
+ adc65 agfa_cl20 aox ax203
+ barbie
+ canon casio_qv clicksmart310
+ digigr8 digita dimagev dimera3500 directory
+ enigma13
+ fuji
+ gsmart300
+ hp215
+ iclick
+ jamcam jd11 jl2005a jl2005c
+ kodak_dc120 kodak_dc210 kodak_dc240 kodak_dc3200 kodak_ez200 konica konica_qm150
+ largan lg_gsm
+ mars mustek
+ panasonic_coolshot panasonic_l859 panasonic_dc1000 panasonic_dc1580 pccam300 pccam600 pentax polaroid_pdc320 polaroid_pdc640 polaroid_pdc700 ptp2
+ ricoh ricoh_g3
+ samsung sierra sipix_blink2 sipix_web2 smal sonix sony_dscf1 sony_dscf55 soundvision spca50x sq905 st2205 stv0674 stv0680 sx330z
+ toshiba_pdrm11 topfield tp6801
+"
+
+for camera in ${IUSE_CAMERAS}; do
+ IUSE="${IUSE} cameras_${camera}"
+done
+
+# libgphoto2 actually links to libltdl, leave old libtool multilib dep there for now
+RDEPEND="
+ >=dev-libs/libxml2-2.9.1-r4:2[${MULTILIB_USEDEP}]
+ || (
+ dev-libs/libltdl:0[${MULTILIB_USEDEP}]
+ >=sys-devel/libtool-2.4.2-r1[${MULTILIB_USEDEP}]
+ )
+ >=virtual/libusb-1-r1:1[${MULTILIB_USEDEP}]
+ cameras_ax203? ( >=media-libs/gd-2.0.35-r4:=[${MULTILIB_USEDEP}] )
+ cameras_st2205? ( >=media-libs/gd-2.0.35-r4:=[${MULTILIB_USEDEP}] )
+ exif? ( >=media-libs/libexif-0.6.21-r1:=[${MULTILIB_USEDEP}] )
+ gd? ( >=media-libs/gd-2.0.35-r4[jpeg=,${MULTILIB_USEDEP}] )
+ jpeg? ( >=virtual/jpeg-0-r2:0[${MULTILIB_USEDEP}] )
+ serial? ( >=dev-libs/lockdev-1.0.3.1.2-r2[${MULTILIB_USEDEP}] )
+ zeroconf? ( >=net-dns/avahi-0.6.31-r2[mdnsresponder-compat,${MULTILIB_USEDEP}] )
+ !<sys-fs/udev-175
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-medialibs-20140508
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ )"
+DEPEND="${RDEPEND}
+ dev-util/gtk-doc-am
+ sys-devel/flex
+ >=sys-devel/gettext-0.14.1
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
+ doc? ( app-doc/doxygen )
+"
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/gphoto2-port-config
+ /usr/bin/gphoto2-config
+)
+
+pkg_pretend() {
+ if ! echo "${USE}" | grep "cameras_" > /dev/null 2>&1; then
+ einfo "No camera drivers will be built since you did not specify any."
+ fi
+}
+
+pkg_setup() {
+ enewgroup plugdev
+}
+
+src_prepare() {
+ # Handle examples ourselves
+ sed 's/^\(SUBDIRS =.*\)examples\(.*\)$/\1\2/' -i Makefile.am Makefile.in \
+ || die "examples sed failed"
+
+ # Fix pkgconfig file when USE="-exif"
+ # https://sourceforge.net/p/gphoto/bugs/980/
+ if ! use exif; then
+ sed -i "s/, @REQUIREMENTS_FOR_LIBEXIF@//" libgphoto2.pc.in || die " libgphoto2.pc sed failed"
+ fi
+
+ # If running eautoreconf
+ # sed -e 's/sleep 2//' -i m4m/gp-camlibs.m4 || die
+ sed -e 's/sleep 2//' -i configure || die
+}
+
+multilib_src_configure() {
+ local cameras
+ local cam
+ local cam_warn=no
+ for cam in ${IUSE_CAMERAS} ; do
+ if use "cameras_${cam}"; then
+ cameras="${cameras},${cam}"
+ else
+ cam_warn=yes
+ fi
+ done
+
+ if [ "${cam_warn}" = "yes" ]; then
+ [ -z "${cameras}" ] || cameras="${cameras:1}"
+ einfo "Enabled camera drivers: ${cameras:-none}"
+ ewarn "Upstream will not support you if you do not compile all camera drivers first"
+ else
+ cameras="all"
+ einfo "Enabled camera drivers: all"
+ fi
+
+ local myconf
+ use doc || myconf=( ac_cv_path_DOXYGEN=false )
+
+ # gd detection is broken: https://sourceforge.net/p/gphoto/bugs/982/
+ if use gd; then
+ export LIBGD_CFLAGS=" "
+ export LIBGD_LIBS="-lgd"
+ fi
+
+ # Upstream doesn't default to --enable-option-checking due having another
+ # configure in libgphoto2_port/ that also needs to be checked on every bump
+ #
+ # Serial port uses either lockdev or ttylock, but we don't have ttylock
+ ECONF_SOURCE=${S} \
+ econf \
+ --disable-docs \
+ --disable-gp2ddb \
+ $(use_with zeroconf bonjour) \
+ $(use_enable nls) \
+ $(use_with exif libexif auto) \
+ $(use_with gd) \
+ $(use_with jpeg) \
+ $(use_enable serial) \
+ $(use_enable serial lockdev) \
+ --with-libusb=no \
+ --with-libusb-1.0=auto \
+ --disable-ttylock \
+ --with-camlibs=${cameras} \
+ --with-doc-dir="${EPREFIX}"/usr/share/doc/${PF} \
+ --with-html-dir="${EPREFIX}"/usr/share/doc/${PF}/html \
+ --with-hotplug-doc-dir="${EPREFIX}"/usr/share/doc/${PF}/hotplug \
+ --with-rpmbuild=$(type -P true) \
+ udevscriptdir="$(get_udevdir)" \
+ "${myconf[@]}"
+}
+
+multilib_src_compile() {
+ default
+
+ if multilib_is_native_abi && use doc; then
+ doxygen doc/Doxyfile || die "Documentation generation failed"
+ fi
+}
+
+multilib_src_install_all() {
+ # Empty dependency_libs in .la files, bug #386665
+ find "${ED}" -name '*.la' -exec sed -i -e "/^dependency_libs/s:=.*:='':" {} +
+
+ # Remove recursive symlink
+ # https://sourceforge.net/p/gphoto/bugs/983/
+ rm "${ED}/usr/include/gphoto2/gphoto2" || die
+
+ # Clean up unwanted files
+ rm "${ED}/usr/share/doc/${PF}/"{ABOUT-NLS,COPYING} || die "rm failed"
+ dodoc ChangeLog NEWS* README* AUTHORS TESTERS MAINTAINERS HACKING
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins examples/README examples/*.c examples/*.h
+ fi
+
+ # FIXME: fixup autoconf bug
+ if ! use doc && [ -d "${ED}/usr/share/doc/${PF}/apidocs.html" ]; then
+ rm -fr "${ED}/usr/share/doc/${PF}/apidocs.html"
+ fi
+ # end fixup
+
+ local udev_rules cam_list
+ udev_rules="$(get_udevdir)/rules.d/70-libgphoto2.rules"
+ cam_list="/usr/$(get_libdir)/libgphoto2/print-camera-list"
+
+ if [ -x "${ED}"${cam_list} ]; then
+ # Let print-camera-list find libgphoto2.so
+ export LD_LIBRARY_PATH="${ED}/usr/$(get_libdir)"
+ # Let libgphoto2 find its camera-modules
+ export CAMLIBS="${ED}/usr/$(get_libdir)/libgphoto2/${PV}"
+
+ einfo "Generating UDEV-rules ..."
+ mkdir -p "${ED}"/${udev_rules%/*}
+ echo -e "# do not edit this file, it will be overwritten on update\n#" \
+ > "${ED}"/${udev_rules}
+ "${ED}"${cam_list} udev-rules version 175 group plugdev >> "${ED}"/${udev_rules} \
+ || die "failed to create udev-rules"
+ else
+ eerror "Unable to find print-camera-list"
+ eerror "and therefore unable to generate hotplug usermap."
+ eerror "You will have to manually generate it by running:"
+ eerror " ${cam_list} udev-rules version 175 group plugdev > ${udev_rules}"
+ fi
+
+}
+
+pkg_postinst() {
+ if ! has_version "sys-auth/consolekit[acl]" && ! has_version "sys-apps/systemd[acl]" ; then
+ elog "Don't forget to add yourself to the plugdev group "
+ elog "if you want to be able to access your camera."
+ fi
+
+ local old_udev_rules="${EROOT}"etc/udev/rules.d/99-libgphoto2.rules
+ if [[ -f ${old_udev_rules} ]]; then
+ rm -f "${old_udev_rules}"
+ fi
+}
diff --git a/media-libs/libgphoto2/libgphoto2-2.5.7.ebuild b/media-libs/libgphoto2/libgphoto2-2.5.7.ebuild
new file mode 100644
index 000000000000..9cc730a4d082
--- /dev/null
+++ b/media-libs/libgphoto2/libgphoto2-2.5.7.ebuild
@@ -0,0 +1,216 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# TODO
+# 1. Track upstream bug --disable-docs does not work.
+# http://sourceforge.net/tracker/index.php?func=detail&aid=1643870&group_id=8874&atid=108874
+
+EAPI="5"
+
+inherit eutils multilib multilib-minimal udev user
+
+DESCRIPTION="Library that implements support for numerous digital cameras"
+HOMEPAGE="http://www.gphoto.org/"
+SRC_URI="mirror://sourceforge/gphoto/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+
+# FIXME: should we also bump for libgphoto2_port.so soname version?
+SLOT="0/6" # libgphoto2.so soname version
+
+KEYWORDS="alpha amd64 ~arm hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~ia64-linux ~x86-linux"
+IUSE="doc examples exif gd jpeg nls serial zeroconf"
+
+# By default, drivers for all supported cameras will be compiled.
+# If you want to only compile for specific camera(s), set CAMERAS
+# environment to a space-separated list (no commas) of drivers that
+# you want to build.
+IUSE_CAMERAS="
+ adc65 agfa_cl20 aox ax203
+ barbie
+ canon casio_qv clicksmart310
+ digigr8 digita dimagev dimera3500 directory
+ enigma13
+ fuji
+ gsmart300
+ hp215
+ iclick
+ jamcam jd11 jl2005a jl2005c
+ kodak_dc120 kodak_dc210 kodak_dc240 kodak_dc3200 kodak_ez200 konica konica_qm150
+ largan lg_gsm
+ mars mustek
+ panasonic_coolshot panasonic_l859 panasonic_dc1000 panasonic_dc1580 pccam300 pccam600 pentax polaroid_pdc320 polaroid_pdc640 polaroid_pdc700 ptp2
+ ricoh ricoh_g3
+ samsung sierra sipix_blink2 sipix_web2 smal sonix sony_dscf1 sony_dscf55 soundvision spca50x sq905 st2205 stv0674 stv0680 sx330z
+ toshiba_pdrm11 topfield tp6801
+"
+
+for camera in ${IUSE_CAMERAS}; do
+ IUSE="${IUSE} cameras_${camera}"
+done
+
+# libgphoto2 actually links to libltdl
+RDEPEND="
+ >=dev-libs/libxml2-2.9.1-r4:2[${MULTILIB_USEDEP}]
+ dev-libs/libltdl:0[${MULTILIB_USEDEP}]
+ >=virtual/libusb-1-r1:1[${MULTILIB_USEDEP}]
+ cameras_ax203? ( >=media-libs/gd-2.0.35-r4:=[${MULTILIB_USEDEP}] )
+ cameras_st2205? ( >=media-libs/gd-2.0.35-r4:=[${MULTILIB_USEDEP}] )
+ exif? ( >=media-libs/libexif-0.6.21-r1:=[${MULTILIB_USEDEP}] )
+ gd? ( >=media-libs/gd-2.0.35-r4[jpeg=,${MULTILIB_USEDEP}] )
+ jpeg? ( >=virtual/jpeg-0-r2:0[${MULTILIB_USEDEP}] )
+ serial? ( >=dev-libs/lockdev-1.0.3.1.2-r2[${MULTILIB_USEDEP}] )
+ zeroconf? ( >=net-dns/avahi-0.6.31-r2[mdnsresponder-compat,${MULTILIB_USEDEP}] )
+ !<sys-fs/udev-175
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-medialibs-20140508
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ )
+"
+DEPEND="${RDEPEND}
+ dev-util/gtk-doc-am
+ sys-devel/flex
+ >=sys-devel/gettext-0.14.1
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
+ doc? ( app-doc/doxygen )
+"
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/gphoto2-port-config
+ /usr/bin/gphoto2-config
+)
+
+pkg_pretend() {
+ if ! echo "${USE}" | grep "cameras_" > /dev/null 2>&1; then
+ einfo "No camera drivers will be built since you did not specify any."
+ fi
+}
+
+pkg_setup() {
+ enewgroup plugdev
+}
+
+src_prepare() {
+ # Handle examples ourselves
+ sed 's/^\(SUBDIRS =.*\)examples\(.*\)$/\1\2/' -i Makefile.am Makefile.in \
+ || die "examples sed failed"
+
+ # If running eautoreconf
+ # sed -e 's/sleep 2//' -i m4m/gp-camlibs.m4 || die
+ sed -e 's/sleep 2//' -i configure || die
+}
+
+multilib_src_configure() {
+ local cameras
+ local cam
+ local cam_warn=no
+ for cam in ${IUSE_CAMERAS} ; do
+ if use "cameras_${cam}"; then
+ cameras="${cameras},${cam}"
+ else
+ cam_warn=yes
+ fi
+ done
+
+ if [ "${cam_warn}" = "yes" ]; then
+ [ -z "${cameras}" ] || cameras="${cameras:1}"
+ einfo "Enabled camera drivers: ${cameras:-none}"
+ ewarn "Upstream will not support you if you do not compile all camera drivers first"
+ else
+ cameras="all"
+ einfo "Enabled camera drivers: all"
+ fi
+
+ local myconf
+ use doc || myconf=( ac_cv_path_DOXYGEN=false )
+
+ # Upstream doesn't default to --enable-option-checking due having another
+ # configure in libgphoto2_port/ that also needs to be checked on every bump
+ #
+ # Serial port uses either lockdev or ttylock, but we don't have ttylock
+ ECONF_SOURCE=${S} \
+ econf \
+ --disable-docs \
+ --disable-gp2ddb \
+ $(use_with zeroconf bonjour) \
+ $(use_enable nls) \
+ $(use_with exif libexif auto) \
+ $(use_with gd) \
+ $(use_with jpeg) \
+ $(use_enable serial) \
+ $(use_enable serial lockdev) \
+ --with-libusb=no \
+ --with-libusb-1.0=auto \
+ --disable-ttylock \
+ --with-camlibs=${cameras} \
+ --with-doc-dir="${EPREFIX}"/usr/share/doc/${PF} \
+ --with-html-dir="${EPREFIX}"/usr/share/doc/${PF}/html \
+ --with-hotplug-doc-dir="${EPREFIX}"/usr/share/doc/${PF}/hotplug \
+ --with-rpmbuild=$(type -P true) \
+ udevscriptdir="$(get_udevdir)" \
+ "${myconf[@]}"
+}
+
+multilib_src_compile() {
+ default
+
+ if multilib_is_native_abi && use doc; then
+ doxygen doc/Doxyfile || die "Documentation generation failed"
+ fi
+}
+
+multilib_src_install_all() {
+ prune_libtool_files --modules
+
+ # Clean up unwanted files
+ rm "${ED}/usr/share/doc/${PF}/"{ABOUT-NLS,COPYING} || die "rm failed"
+ dodoc ChangeLog NEWS* README* AUTHORS TESTERS MAINTAINERS HACKING
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins examples/README examples/*.c examples/*.h
+ fi
+
+ # FIXME: fixup autoconf bug #????
+ if ! use doc && [ -d "${ED}/usr/share/doc/${PF}/apidocs.html" ]; then
+ rm -fr "${ED}/usr/share/doc/${PF}/apidocs.html"
+ fi
+ # end fixup
+
+ local udev_rules cam_list
+ udev_rules="$(get_udevdir)/rules.d/70-libgphoto2.rules"
+ cam_list="/usr/$(get_libdir)/libgphoto2/print-camera-list"
+
+ if [ -x "${ED}"${cam_list} ]; then
+ # Let print-camera-list find libgphoto2.so
+ export LD_LIBRARY_PATH="${ED}/usr/$(get_libdir)"
+ # Let libgphoto2 find its camera-modules
+ export CAMLIBS="${ED}/usr/$(get_libdir)/libgphoto2/${PV}"
+
+ einfo "Generating UDEV-rules ..."
+ mkdir -p "${ED}"/${udev_rules%/*}
+ echo -e "# do not edit this file, it will be overwritten on update\n#" \
+ > "${ED}"/${udev_rules}
+ "${ED}"${cam_list} udev-rules version 175 group plugdev >> "${ED}"/${udev_rules} \
+ || die "failed to create udev-rules"
+ else
+ eerror "Unable to find print-camera-list"
+ eerror "and therefore unable to generate hotplug usermap."
+ eerror "You will have to manually generate it by running:"
+ eerror " ${cam_list} udev-rules version 175 group plugdev > ${udev_rules}"
+ fi
+
+}
+
+pkg_postinst() {
+ if ! has_version "sys-auth/consolekit[acl]" && ! has_version "sys-apps/systemd[acl]" ; then
+ elog "Don't forget to add yourself to the plugdev group "
+ elog "if you want to be able to access your camera."
+ fi
+
+ local old_udev_rules="${EROOT}"etc/udev/rules.d/99-libgphoto2.rules
+ if [[ -f ${old_udev_rules} ]]; then
+ rm -f "${old_udev_rules}"
+ fi
+}
diff --git a/media-libs/libgphoto2/metadata.xml b/media-libs/libgphoto2/metadata.xml
new file mode 100644
index 000000000000..f0ad460eebf7
--- /dev/null
+++ b/media-libs/libgphoto2/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>gnome</herd>
+ <herd>graphics</herd>
+ <use>
+ <flag name="serial">Enable serial port support</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">gphoto</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libgpod/Manifest b/media-libs/libgpod/Manifest
new file mode 100644
index 000000000000..7fb0c403e905
--- /dev/null
+++ b/media-libs/libgpod/Manifest
@@ -0,0 +1 @@
+DIST libgpod-0.8.3.tar.bz2 801903 SHA256 638a7959d04e95f1e62abad02bd33702e4e8dfef98485ac7d9d50395c37e955d SHA512 e39f22054c2d2bdf5fc764aa1f692de17a1a06c7c7e9c60883d126b216dacca7840bf818e7e7e039218fe2a64c0920ba96d8cbbe310e11c1c4e68b82e7cbbd8e WHIRLPOOL a82d5d5c095d3240dbc0c5dd0f857c836591fa0d29347463a66c2811dc6dce0263c220835eb9e12cb54e82d7570c898dfdf69513f5134ea2d8ad18ccee7f3a5f
diff --git a/media-libs/libgpod/libgpod-0.8.3.ebuild b/media-libs/libgpod/libgpod-0.8.3.ebuild
new file mode 100644
index 000000000000..5b2a7f138263
--- /dev/null
+++ b/media-libs/libgpod/libgpod-0.8.3.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# TODO: Use python-r1 instead and support Python 3.x?
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils mono-env python-single-r1 udev
+
+DESCRIPTION="Shared library to access the contents of an iPod"
+HOMEPAGE="http://www.gtkpod.org/libgpod/"
+SRC_URI="mirror://sourceforge/gtkpod/${P}.tar.bz2"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="+gtk python +udev ios mono static-libs"
+
+RDEPEND=">=app-pda/libplist-1.0:=
+ >=dev-db/sqlite-3
+ >=dev-libs/glib-2.16:2
+ dev-libs/libxml2
+ sys-apps/sg3_utils
+ gtk? ( x11-libs/gdk-pixbuf:2 )
+ ios? ( app-pda/libimobiledevice:= )
+ python? (
+ ${PYTHON_DEPS}
+ >=media-libs/mutagen-1.8[${PYTHON_USEDEP}]
+ >=dev-python/pygobject-2.8:2[${PYTHON_USEDEP}]
+ )
+ udev? ( virtual/udev )
+ mono? (
+ >=dev-lang/mono-1.9.1
+ >=dev-dotnet/gtk-sharp-2.12
+ )"
+DEPEND="${RDEPEND}
+ python? ( >=dev-lang/swig-1.3.24 )
+ dev-libs/libxslt
+ dev-util/intltool
+ sys-devel/gettext
+ virtual/pkgconfig"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+DOCS="AUTHORS NEWS README* TROUBLESHOOTING"
+
+pkg_setup() {
+ use mono && mono-env_pkg_setup
+ use python && python-single-r1_pkg_setup
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable udev) \
+ $(use_enable gtk gdk-pixbuf) \
+ $(use_enable python pygobject) \
+ --without-hal \
+ $(use_with ios libimobiledevice) \
+ --with-udev-dir="$(get_udevdir)"
+ --with-html-dir=/usr/share/doc/${PF}/html \
+ $(use_with python) \
+ $(use_with mono)
+}
+
+src_install() {
+ default
+ rmdir "${ED}"/tmp
+ prune_libtool_files --all
+}
diff --git a/media-libs/libgpod/metadata.xml b/media-libs/libgpod/metadata.xml
new file mode 100644
index 000000000000..0ec33c7f18ed
--- /dev/null
+++ b/media-libs/libgpod/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>pda</herd>
+ <longdescription lang="en">
+ libgpod is a shared library to access the contents of an iPod. This
+ library is based on code used in the gtkpod project.
+ </longdescription>
+ <use>
+ <flag name="gtk">Enable ArtworkDB support</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">gtkpod</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libharu/Manifest b/media-libs/libharu/Manifest
new file mode 100644
index 000000000000..b588457dff6b
--- /dev/null
+++ b/media-libs/libharu/Manifest
@@ -0,0 +1 @@
+DIST libharu-2.3.0.tar.gz 1396413 SHA256 8f9e68cc5d5f7d53d1bc61a1ed876add1faf4f91070dbc360d8b259f46d9a4d2 SHA512 ebcabf1e8488e21185a231e97b4c16f9de742ae0ac2ebc7535b72b6b8e2045c2619bc6a94a820f7f923b0dfeceb217408f4e4c613ef3602104373cdf000d3f41 WHIRLPOOL e0a2783d1b2079fde718cb2a3f3a2f512df37afaa0cf1bda9de9af6da583c0113b9915803329a6ac353245c9d4010d72c83d578a1e5fbbabfb26ec28defb2051
diff --git a/media-libs/libharu/files/libharu-2.2.1-libpng-1.5.patch b/media-libs/libharu/files/libharu-2.2.1-libpng-1.5.patch
new file mode 100644
index 000000000000..d59f78f8ecf1
--- /dev/null
+++ b/media-libs/libharu/files/libharu-2.2.1-libpng-1.5.patch
@@ -0,0 +1,344 @@
+diff --git a/src/hpdf_image_png.c b/src/hpdf_image_png.c
+index b8f831e..85bd29f 100644
+--- a/src/hpdf_image_png.c
++++ b/src/hpdf_image_png.c
+@@ -109,14 +109,15 @@ ReadPngData_Interlaced (HPDF_Dict image,
+ png_infop info_ptr)
+ {
+ png_uint_32 len = png_get_rowbytes(png_ptr, info_ptr);
++ png_uint_32 height = png_get_image_height(png_ptr, info_ptr);
+ png_bytep* row_pointers = HPDF_GetMem (image->mmgr,
+- info_ptr->height * sizeof (png_bytep));
++ height * sizeof (png_bytep));
+
+ if (row_pointers) {
+ HPDF_UINT i;
+
+- HPDF_MemSet (row_pointers, 0, info_ptr->height * sizeof (png_bytep));
+- for (i = 0; i < (HPDF_UINT)info_ptr->height; i++) {
++ HPDF_MemSet (row_pointers, 0, height * sizeof (png_bytep));
++ for (i = 0; i < (HPDF_UINT)height; i++) {
+ row_pointers[i] = HPDF_GetMem (image->mmgr, len);
+
+ if (image->error->error_no != HPDF_OK)
+@@ -126,7 +127,7 @@ ReadPngData_Interlaced (HPDF_Dict image,
+ if (image->error->error_no == HPDF_OK) {
+ png_read_image(png_ptr, row_pointers);
+ if (image->error->error_no == HPDF_OK) { /* add this line */
+- for (i = 0; i < (HPDF_UINT)info_ptr->height; i++) {
++ for (i = 0; i < (HPDF_UINT)height; i++) {
+ if (HPDF_Stream_Write (image->stream, row_pointers[i], len) !=
+ HPDF_OK)
+ break;
+@@ -135,7 +136,7 @@ ReadPngData_Interlaced (HPDF_Dict image,
+ }
+
+ /* clean up */
+- for (i = 0; i < (HPDF_UINT)info_ptr->height; i++) {
++ for (i = 0; i < (HPDF_UINT)height; i++) {
+ HPDF_FreeMem (image->mmgr, row_pointers[i]);
+ }
+
+@@ -151,12 +152,13 @@ ReadPngData (HPDF_Dict image,
+ png_infop info_ptr)
+ {
+ png_uint_32 len = png_get_rowbytes(png_ptr, info_ptr);
++ png_uint_32 height = png_get_image_height(png_ptr, info_ptr);
+ png_bytep buf_ptr = HPDF_GetMem (image->mmgr, len);
+
+ if (buf_ptr) {
+ HPDF_UINT i;
+
+- for (i = 0; i < (HPDF_UINT)info_ptr->height; i++) {
++ for (i = 0; i < (HPDF_UINT)height; i++) {
+ png_read_rows(png_ptr, (png_byte**)&buf_ptr, NULL, 1);
+ if (image->error->error_no != HPDF_OK)
+ break;
+@@ -182,17 +184,19 @@ ReadTransparentPaletteData (HPDF_Dict image,
+ HPDF_STATUS ret = HPDF_OK;
+ HPDF_UINT i, j;
+ png_bytep *row_ptr;
++ png_uint_32 height = png_get_image_height(png_ptr, info_ptr);
++ png_uint_32 width = png_get_image_width(png_ptr, info_ptr);
+
+- row_ptr = HPDF_GetMem (image->mmgr, info_ptr->height * sizeof(png_bytep));
++ row_ptr = HPDF_GetMem (image->mmgr, height * sizeof(png_bytep));
+ if (!row_ptr) {
+ return HPDF_FAILD_TO_ALLOC_MEM;
+ } else {
+ png_uint_32 len = png_get_rowbytes(png_ptr, info_ptr);
+
+- for (i = 0; i < (HPDF_UINT)info_ptr->height; i++) {
++ for (i = 0; i < (HPDF_UINT)height; i++) {
+ row_ptr[i] = HPDF_GetMem(image->mmgr, len);
+ if (!row_ptr[i]) {
+- for (; i >= 0; i--) {
++ for (; i > 0; i--) {
+ HPDF_FreeMem (image->mmgr, row_ptr[i]);
+ }
+ HPDF_FreeMem (image->mmgr, row_ptr);
+@@ -207,19 +211,19 @@ ReadTransparentPaletteData (HPDF_Dict image,
+ goto Error;
+ }
+
+- for (j = 0; j < info_ptr->height; j++) {
+- for (i = 0; i < info_ptr->width; i++) {
+- smask_data[info_ptr->width * j + i] = (row_ptr[j][i] < num_trans) ? trans[row_ptr[j][i]] : 0xFF;
++ for (j = 0; j < height; j++) {
++ for (i = 0; i < width; i++) {
++ smask_data[width * j + i] = (row_ptr[j][i] < num_trans) ? trans[row_ptr[j][i]] : 0xFF;
+ }
+
+- if (HPDF_Stream_Write (image->stream, row_ptr[j], info_ptr->width) != HPDF_OK) {
++ if (HPDF_Stream_Write (image->stream, row_ptr[j], width) != HPDF_OK) {
+ ret = HPDF_FILE_IO_ERROR;
+ goto Error;
+ }
+ }
+
+ Error:
+- for (i = 0; i < (HPDF_UINT)info_ptr->height; i++) {
++ for (i = 0; i < (HPDF_UINT)height; i++) {
+ HPDF_FreeMem (image->mmgr, row_ptr[i]);
+ }
+
+@@ -238,6 +242,8 @@ ReadTransparentPngData (HPDF_Dict image,
+ HPDF_UINT i, j;
+ png_bytep *row_ptr, row;
+ png_byte color_type;
++ png_uint_32 height = png_get_image_height(png_ptr, info_ptr);
++ png_uint_32 width = png_get_image_width(png_ptr, info_ptr);
+
+ color_type = png_get_color_type(png_ptr, info_ptr);
+
+@@ -245,16 +251,16 @@ ReadTransparentPngData (HPDF_Dict image,
+ return HPDF_INVALID_PNG_IMAGE;
+ }
+
+- row_ptr = HPDF_GetMem (image->mmgr, info_ptr->height * sizeof(png_bytep));
++ row_ptr = HPDF_GetMem (image->mmgr, height * sizeof(png_bytep));
+ if (!row_ptr) {
+ return HPDF_FAILD_TO_ALLOC_MEM;
+ } else {
+ png_uint_32 len = png_get_rowbytes(png_ptr, info_ptr);
+
+- for (i = 0; i < (HPDF_UINT)info_ptr->height; i++) {
++ for (i = 0; i < (HPDF_UINT)height; i++) {
+ row_ptr[i] = HPDF_GetMem(image->mmgr, len);
+ if (!row_ptr[i]) {
+- for (; i >= 0; i--) {
++ for (; i > 0; i--) {
+ HPDF_FreeMem (image->mmgr, row_ptr[i]);
+ }
+ HPDF_FreeMem (image->mmgr, row_ptr);
+@@ -271,12 +277,12 @@ ReadTransparentPngData (HPDF_Dict image,
+
+ switch (color_type) {
+ case PNG_COLOR_TYPE_RGB_ALPHA:
+- row_len = 3 * info_ptr->width * sizeof(png_byte);
+- for (j = 0; j < info_ptr->height; j++) {
+- for (i = 0; i < info_ptr->width; i++) {
++ row_len = 3 * width * sizeof(png_byte);
++ for (j = 0; j < height; j++) {
++ for (i = 0; i < width; i++) {
+ row = row_ptr[j];
+ memmove(row + (3 * i), row + (4*i), 3);
+- smask_data[info_ptr->width * j + i] = row[4 * i + 3];
++ smask_data[width * j + i] = row[4 * i + 3];
+ }
+
+ if (HPDF_Stream_Write (image->stream, row, row_len) != HPDF_OK) {
+@@ -286,12 +292,12 @@ ReadTransparentPngData (HPDF_Dict image,
+ }
+ break;
+ case PNG_COLOR_TYPE_GRAY_ALPHA:
+- row_len = info_ptr->width * sizeof(png_byte);
+- for (j = 0; j < info_ptr->height; j++) {
+- for (i = 0; i < info_ptr->width; i++) {
++ row_len = width * sizeof(png_byte);
++ for (j = 0; j < height; j++) {
++ for (i = 0; i < width; i++) {
+ row = row_ptr[j];
+ row[i] = row[2 * i];
+- smask_data[info_ptr->width * j + i] = row[2 * i + 1];
++ smask_data[width * j + i] = row[2 * i + 1];
+ }
+
+ if (HPDF_Stream_Write (image->stream, row, row_len) != HPDF_OK) {
+@@ -306,7 +312,7 @@ ReadTransparentPngData (HPDF_Dict image,
+ }
+
+ Error:
+- for (i = 0; i < (HPDF_UINT)info_ptr->height; i++) {
++ for (i = 0; i < (HPDF_UINT)height; i++) {
+ HPDF_FreeMem (image->mmgr, row_ptr[i]);
+ }
+
+@@ -415,7 +421,8 @@ LoadPngData (HPDF_Dict image,
+
+ {
+ HPDF_STATUS ret = HPDF_OK;
+-
++ png_uint_32 width, height;
++ int bit_depth, color_type;
+ png_structp png_ptr = NULL;
+ png_infop info_ptr = NULL;
+
+@@ -447,8 +454,10 @@ LoadPngData (HPDF_Dict image,
+ goto Exit;
+ }
+
++ png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, NULL, NULL, NULL);
++
+ /* 16bit images are not supported. */
+- if (info_ptr->bit_depth == 16) {
++ if (bit_depth == 16) {
+ png_set_strip_16(png_ptr);
+ }
+
+@@ -458,7 +467,7 @@ LoadPngData (HPDF_Dict image,
+ }
+
+ /* check palette-based images for transparent areas and load them immediately if found */
+- if (xref && PNG_COLOR_TYPE_PALETTE & info_ptr->color_type) {
++ if (xref && PNG_COLOR_TYPE_PALETTE & color_type) {
+ png_bytep trans;
+ int num_trans;
+ HPDF_Dict smask;
+@@ -478,10 +487,10 @@ LoadPngData (HPDF_Dict image,
+ smask->header.obj_class |= HPDF_OSUBCLASS_XOBJECT;
+ ret = HPDF_Dict_AddName (smask, "Type", "XObject");
+ ret += HPDF_Dict_AddName (smask, "Subtype", "Image");
+- ret += HPDF_Dict_AddNumber (smask, "Width", (HPDF_UINT)info_ptr->width);
+- ret += HPDF_Dict_AddNumber (smask, "Height", (HPDF_UINT)info_ptr->height);
++ ret += HPDF_Dict_AddNumber (smask, "Width", (HPDF_UINT)width);
++ ret += HPDF_Dict_AddNumber (smask, "Height", (HPDF_UINT)height);
+ ret += HPDF_Dict_AddName (smask, "ColorSpace", "DeviceGray");
+- ret += HPDF_Dict_AddNumber (smask, "BitsPerComponent", (HPDF_UINT)info_ptr->bit_depth);
++ ret += HPDF_Dict_AddNumber (smask, "BitsPerComponent", (HPDF_UINT)bit_depth);
+
+ if (ret != HPDF_OK) {
+ HPDF_Dict_Free(smask);
+@@ -489,7 +498,7 @@ LoadPngData (HPDF_Dict image,
+ goto Exit;
+ }
+
+- smask_data = HPDF_GetMem(image->mmgr, info_ptr->width * info_ptr->height);
++ smask_data = HPDF_GetMem(image->mmgr, width * height);
+ if (!smask_data) {
+ HPDF_Dict_Free(smask);
+ ret = HPDF_FAILD_TO_ALLOC_MEM;
+@@ -503,7 +512,7 @@ LoadPngData (HPDF_Dict image,
+ goto Exit;
+ }
+
+- if (HPDF_Stream_Write(smask->stream, smask_data, info_ptr->width * info_ptr->height) != HPDF_OK) {
++ if (HPDF_Stream_Write(smask->stream, smask_data, width * height) != HPDF_OK) {
+ HPDF_FreeMem(image->mmgr, smask_data);
+ HPDF_Dict_Free(smask);
+ ret = HPDF_FILE_IO_ERROR;
+@@ -513,9 +522,9 @@ LoadPngData (HPDF_Dict image,
+
+
+ ret += CreatePallet(image, png_ptr, info_ptr);
+- ret += HPDF_Dict_AddNumber (image, "Width", (HPDF_UINT)info_ptr->width);
+- ret += HPDF_Dict_AddNumber (image, "Height", (HPDF_UINT)info_ptr->height);
+- ret += HPDF_Dict_AddNumber (image, "BitsPerComponent", (HPDF_UINT)info_ptr->bit_depth);
++ ret += HPDF_Dict_AddNumber (image, "Width", (HPDF_UINT)width);
++ ret += HPDF_Dict_AddNumber (image, "Height", (HPDF_UINT)height);
++ ret += HPDF_Dict_AddNumber (image, "BitsPerComponent", (HPDF_UINT)bit_depth);
+ ret += HPDF_Dict_Add (image, "SMask", smask);
+
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+@@ -526,7 +535,7 @@ no_transparent_color_in_palette:
+
+ /* read images with alpha channel right away
+ we have to do this because image transparent mask must be added to the Xref */
+- if (xref && PNG_COLOR_MASK_ALPHA & info_ptr->color_type) {
++ if (xref && PNG_COLOR_MASK_ALPHA & color_type) {
+ HPDF_Dict smask;
+ png_bytep smask_data;
+
+@@ -539,10 +548,10 @@ no_transparent_color_in_palette:
+ smask->header.obj_class |= HPDF_OSUBCLASS_XOBJECT;
+ ret = HPDF_Dict_AddName (smask, "Type", "XObject");
+ ret += HPDF_Dict_AddName (smask, "Subtype", "Image");
+- ret += HPDF_Dict_AddNumber (smask, "Width", (HPDF_UINT)info_ptr->width);
+- ret += HPDF_Dict_AddNumber (smask, "Height", (HPDF_UINT)info_ptr->height);
++ ret += HPDF_Dict_AddNumber (smask, "Width", (HPDF_UINT)width);
++ ret += HPDF_Dict_AddNumber (smask, "Height", (HPDF_UINT)height);
+ ret += HPDF_Dict_AddName (smask, "ColorSpace", "DeviceGray");
+- ret += HPDF_Dict_AddNumber (smask, "BitsPerComponent", (HPDF_UINT)info_ptr->bit_depth);
++ ret += HPDF_Dict_AddNumber (smask, "BitsPerComponent", (HPDF_UINT)bit_depth);
+
+ if (ret != HPDF_OK) {
+ HPDF_Dict_Free(smask);
+@@ -550,7 +559,7 @@ no_transparent_color_in_palette:
+ goto Exit;
+ }
+
+- smask_data = HPDF_GetMem(image->mmgr, info_ptr->width * info_ptr->height);
++ smask_data = HPDF_GetMem(image->mmgr, width * height);
+ if (!smask_data) {
+ HPDF_Dict_Free(smask);
+ ret = HPDF_FAILD_TO_ALLOC_MEM;
+@@ -564,7 +573,7 @@ no_transparent_color_in_palette:
+ goto Exit;
+ }
+
+- if (HPDF_Stream_Write(smask->stream, smask_data, info_ptr->width * info_ptr->height) != HPDF_OK) {
++ if (HPDF_Stream_Write(smask->stream, smask_data, width * height) != HPDF_OK) {
+ HPDF_FreeMem(image->mmgr, smask_data);
+ HPDF_Dict_Free(smask);
+ ret = HPDF_FILE_IO_ERROR;
+@@ -572,14 +581,14 @@ no_transparent_color_in_palette:
+ }
+ HPDF_FreeMem(image->mmgr, smask_data);
+
+- if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) {
++ if (color_type == PNG_COLOR_TYPE_GRAY_ALPHA) {
+ ret += HPDF_Dict_AddName (image, "ColorSpace", "DeviceGray");
+ } else {
+ ret += HPDF_Dict_AddName (image, "ColorSpace", "DeviceRGB");
+ }
+- ret += HPDF_Dict_AddNumber (image, "Width", (HPDF_UINT)info_ptr->width);
+- ret += HPDF_Dict_AddNumber (image, "Height", (HPDF_UINT)info_ptr->height);
+- ret += HPDF_Dict_AddNumber (image, "BitsPerComponent", (HPDF_UINT)info_ptr->bit_depth);
++ ret += HPDF_Dict_AddNumber (image, "Width", (HPDF_UINT)width);
++ ret += HPDF_Dict_AddNumber (image, "Height", (HPDF_UINT)height);
++ ret += HPDF_Dict_AddNumber (image, "BitsPerComponent", (HPDF_UINT)bit_depth);
+ ret += HPDF_Dict_Add (image, "SMask", smask);
+
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+@@ -589,9 +598,9 @@ no_transparent_color_in_palette:
+ /* if the image has color palette, copy the pallet of the image to
+ * create color map.
+ */
+- if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
++ if (color_type == PNG_COLOR_TYPE_PALETTE)
+ ret = CreatePallet(image, png_ptr, info_ptr);
+- else if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY)
++ else if (color_type == PNG_COLOR_TYPE_GRAY)
+ ret = HPDF_Dict_AddName (image, "ColorSpace", "DeviceGray");
+ else
+ ret = HPDF_Dict_AddName (image, "ColorSpace", "DeviceRGB");
+@@ -617,16 +626,16 @@ no_transparent_color_in_palette:
+ }
+
+ /* setting the info of the image. */
+- if (HPDF_Dict_AddNumber (image, "Width", (HPDF_UINT)info_ptr->width)
++ if (HPDF_Dict_AddNumber (image, "Width", (HPDF_UINT)width)
+ != HPDF_OK)
+ goto Exit;
+
+- if (HPDF_Dict_AddNumber (image, "Height", (HPDF_UINT)info_ptr->height)
++ if (HPDF_Dict_AddNumber (image, "Height", (HPDF_UINT)height)
+ != HPDF_OK)
+ goto Exit;
+
+ if (HPDF_Dict_AddNumber (image, "BitsPerComponent",
+- (HPDF_UINT)info_ptr->bit_depth) != HPDF_OK)
++ (HPDF_UINT)bit_depth) != HPDF_OK)
+ goto Exit;
+
+ /* clean up */
diff --git a/media-libs/libharu/files/libharu-2.3.0-dont-force-strip.patch b/media-libs/libharu/files/libharu-2.3.0-dont-force-strip.patch
new file mode 100644
index 000000000000..393302bce239
--- /dev/null
+++ b/media-libs/libharu/files/libharu-2.3.0-dont-force-strip.patch
@@ -0,0 +1,22 @@
+--- configure.in.orig 2014-02-19 12:22:46.954651117 -0800
++++ configure.in 2014-02-19 12:22:37.211604308 -0800
+@@ -171,11 +171,6 @@
+
+ fi
+
+- dnl Do not strip symbols from developer object files.
+- INSTALL_STRIP_FLAG=""
+-else
+- dnl Make sure to strip symbols from non-developer object files.
+- INSTALL_STRIP_FLAG="-s"
+ fi
+ dnl }}}
+
+@@ -322,7 +317,6 @@
+
+ dnl link against libm
+ LIBS="$LIBS -lm"
+-AC_SUBST(INSTALL_STRIP_FLAG)
+
+ AC_CONFIG_FILES([Makefile src/Makefile include/Makefile])
+ AC_OUTPUT
diff --git a/media-libs/libharu/libharu-2.3.0-r1.ebuild b/media-libs/libharu/libharu-2.3.0-r1.ebuild
new file mode 100644
index 000000000000..cc05c247da75
--- /dev/null
+++ b/media-libs/libharu/libharu-2.3.0-r1.ebuild
@@ -0,0 +1,37 @@
+# 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 multilib-minimal
+
+MYP=RELEASE_${PV//./_}
+
+DESCRIPTION="C/C++ library for PDF generation"
+HOMEPAGE="http://www.libharu.org/"
+SRC_URI="https://github.com/${PN}/${PN}/archive/${MYP}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0/${PV}"
+KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux"
+IUSE="png static-libs zlib"
+
+DEPEND="
+ png? ( >=media-libs/libpng-1.2.51[${MULTILIB_USEDEP}] )
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}-${MYP}"
+
+PATCHES=( "${FILESDIR}"/${P}-dont-force-strip.patch )
+
+multilib_src_configure() {
+ local myeconfargs=(
+ $(use_with png png "${EPREFIX}"/usr)
+ $(use_with zlib)
+ )
+ autotools-utils_src_configure
+}
diff --git a/media-libs/libharu/metadata.xml b/media-libs/libharu/metadata.xml
new file mode 100644
index 000000000000..638ccc8b7924
--- /dev/null
+++ b/media-libs/libharu/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci</herd>
+ <herd>graphics</herd>
+ <longdescription lang="en">
+ Haru PDF library is a ANSI/C library for generating PDF files.
+ It supports the following features:
+ 1. Generating PDF files with lines, text, images.
+ 2. Outline, text annotation, link annotation.
+ 3. Compressing document with deflate-decode.
+ 4. Embedding PNG, Jpeg images.
+ 5. Embedding Type1 font and TrueType font.
+ 6. Creating encrypted PDF files.
+ 7. Using various character sets (ISO8859-1~16, MSCP1250~8, KOI8-R).
+ 8. Supporting CJK fonts and encodings.
+</longdescription>
+ <upstream>
+ <remote-id type="github">libharu/libharu</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libhdhomerun/Manifest b/media-libs/libhdhomerun/Manifest
new file mode 100644
index 000000000000..c8b91c47cae2
--- /dev/null
+++ b/media-libs/libhdhomerun/Manifest
@@ -0,0 +1,3 @@
+DIST libhdhomerun_20130117.tgz 41931 SHA256 80c8abb889b642339c6e30695ea1a0fcaaf48b76bdeaf3b29245297a42eb3141 SHA512 7065f6a0fd7bf67cc62e3b9462887594f7f9ad1617c13aa0f4d9fc7798600488a13179328fab9321be91f198873f961242064c3bb7b9567c63a8b0443d3c04c4 WHIRLPOOL 5fde51e79c6021fd8dc737415175f5ab89e95f23460d4b5e18dc5e2af04d8a7ac3c4ab06f82d27e46260843e13fd24dd2eec99f8711955a26259c4997ff528c5
+DIST libhdhomerun_20130328.tgz 41931 SHA256 66fdf3785f12bc4bcd4a9a6d322a1ad762bedff1a0888531b0ac5476491e4ed0 SHA512 3adbc34fd0aa8c045d491a85aa43f54e728de0b3959af6c675917fca46a66f2625511d879e8277060a5cefedccddc4e9352b2b6c1c70995352f4e6df4b6958cc WHIRLPOOL 0bd8dcbb0cbe64625967afb4592815bcede48fc953771d1e9d26ef380df9289121801e73e4c765dcd19b825c40ee4757b06eb42ad54f8cd39af29bb4664fd5c3
+DIST libhdhomerun_20140121.tgz 47685 SHA256 a86308e7145c0cecb226ee913e7ce44258ef24fcba979d1f32dcff89022f9809 SHA512 bf7bfed024980b4a58d860b28194c6f3a394071ba1e3e25b46b2a20709e5de51fbb61779d46c9f1f01efd1553abf0332b3711afeb21479576f7f40da7f22eca1 WHIRLPOOL f5972c72a5e5eb708d4ada2eb0d09a409370c595ccd9da1d2b0f400e35c4ff41b828dd853116fe6c4c1ca725894423844e14dcf91e5c01d79454179b68c31014
diff --git a/media-libs/libhdhomerun/files/dont-strip.patch b/media-libs/libhdhomerun/files/dont-strip.patch
new file mode 100644
index 000000000000..62aa00af3f07
--- /dev/null
+++ b/media-libs/libhdhomerun/files/dont-strip.patch
@@ -0,0 +1,13 @@
+diff -Nur libhdhomerun/Makefile libhdhomerun.fix/Makefile
+--- libhdhomerun/Makefile 2012-08-30 15:46:27.000000000 -0500
++++ libhdhomerun.fix/Makefile 2013-03-24 14:47:08.740937164 -0500
+@@ -42,7 +42,6 @@
+
+ hdhomerun_config$(BINEXT) : hdhomerun_config.c $(LIBSRCS)
+ $(CC) $(CFLAGS) $+ $(LDFLAGS) -o $@
+- $(STRIP) $@
+
+ libhdhomerun$(LIBEXT) : $(LIBSRCS)
+ $(CC) $(CFLAGS) -fPIC -DDLL_EXPORT $(SHARED) $+ $(LDFLAGS) -o $@
+Binary files libhdhomerun/hdhomerun_config and libhdhomerun.fix/hdhomerun_config differ
+Binary files libhdhomerun/libhdhomerun.so and libhdhomerun.fix/libhdhomerun.so differ
diff --git a/media-libs/libhdhomerun/libhdhomerun-20130117.ebuild b/media-libs/libhdhomerun/libhdhomerun-20130117.ebuild
new file mode 100644
index 000000000000..adbfffdf772b
--- /dev/null
+++ b/media-libs/libhdhomerun/libhdhomerun-20130117.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="SiliconDust HDHomeRun Utilties"
+HOMEPAGE="http://www.silicondust.com/support/hdhomerun/downloads/linux/"
+SRC_URI="http://download.silicondust.com/hdhomerun/${PN}_${PV}.tgz"
+
+LICENSE="LGPL-3+"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ epatch "${FILESDIR}/dont-strip.patch"
+}
+
+src_configure() {
+ :
+}
+
+src_install() {
+ dobin hdhomerun_config
+ dolib libhdhomerun.so
+
+ insinto /usr/include/hdhomerun
+ doins *.h
+}
diff --git a/media-libs/libhdhomerun/libhdhomerun-20130328.ebuild b/media-libs/libhdhomerun/libhdhomerun-20130328.ebuild
new file mode 100644
index 000000000000..9ab38090625c
--- /dev/null
+++ b/media-libs/libhdhomerun/libhdhomerun-20130328.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
+
+DESCRIPTION="SiliconDust HDHomeRun Utilties"
+HOMEPAGE="http://www.silicondust.com/support/hdhomerun/downloads/linux/"
+SRC_URI="http://download.silicondust.com/hdhomerun/${PN}_${PV}.tgz"
+
+LICENSE="LGPL-3+"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ epatch "${FILESDIR}/dont-strip.patch"
+}
+
+src_configure() {
+ :
+}
+
+src_install() {
+ dobin hdhomerun_config
+ dolib libhdhomerun.so
+
+ insinto /usr/include/hdhomerun
+ doins *.h
+}
diff --git a/media-libs/libhdhomerun/libhdhomerun-20140121.ebuild b/media-libs/libhdhomerun/libhdhomerun-20140121.ebuild
new file mode 100644
index 000000000000..9ab38090625c
--- /dev/null
+++ b/media-libs/libhdhomerun/libhdhomerun-20140121.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
+
+DESCRIPTION="SiliconDust HDHomeRun Utilties"
+HOMEPAGE="http://www.silicondust.com/support/hdhomerun/downloads/linux/"
+SRC_URI="http://download.silicondust.com/hdhomerun/${PN}_${PV}.tgz"
+
+LICENSE="LGPL-3+"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ epatch "${FILESDIR}/dont-strip.patch"
+}
+
+src_configure() {
+ :
+}
+
+src_install() {
+ dobin hdhomerun_config
+ dolib libhdhomerun.so
+
+ insinto /usr/include/hdhomerun
+ doins *.h
+}
diff --git a/media-libs/libhdhomerun/metadata.xml b/media-libs/libhdhomerun/metadata.xml
new file mode 100644
index 000000000000..0a94baddc99f
--- /dev/null
+++ b/media-libs/libhdhomerun/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>cardoe@gentoo.org</email>
+<name>Doug Goldstein</name>
+</maintainer>
+</pkgmetadata>
+
diff --git a/media-libs/libicns/Manifest b/media-libs/libicns/Manifest
new file mode 100644
index 000000000000..661b36408e23
--- /dev/null
+++ b/media-libs/libicns/Manifest
@@ -0,0 +1,3 @@
+DIST libicns-0.7.1.tar.gz 444500 SHA256 54d5f6927f8d92f8748ccc13089463867788309f4c3fd94a282b30535678e1fa
+DIST libicns-0.8.0.tar.gz 348803 SHA256 8a720d45f6cf3cb88255d80965e486857b77b894a345e9a6b321cb03aa3d064a
+DIST libicns-0.8.1.tar.gz 460819 SHA256 335f10782fc79855cf02beac4926c4bf9f800a742445afbbf7729dab384555c2 SHA512 e9a6da6d639c4e7aa85e21cf0201ec2e8fcad5c8542ef55375dee7628eff6e0136974ebae93f6c7d95447f879d3d001e8f5d480f6590061c8e0ad0e06b52742c WHIRLPOOL 045c670085d23b6cfb8542e691bb44761f5fdcce8d9df1a2bd2c488e6628c6f00bf622fe764fc169f869f4a96bcc17399f8e0229ecce711a6a148cb278e90a02
diff --git a/media-libs/libicns/libicns-0.7.1.ebuild b/media-libs/libicns/libicns-0.7.1.ebuild
new file mode 100644
index 000000000000..ecee4ba8871b
--- /dev/null
+++ b/media-libs/libicns/libicns-0.7.1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+DESCRIPTION="A library for manipulating MacOS X .icns icon format"
+HOMEPAGE="http://sourceforge.net/projects/icns"
+SRC_URI="mirror://sourceforge/icns/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND=">=media-libs/libpng-1.2.43-r2:0
+ media-libs/jasper"
+
+src_prepare() {
+ sed -i \
+ -e 's:png_set_gray_1_2_4_to_8:png_set_expand_gray_1_2_4_to_8:g' \
+ icnsutils/png2icns.c || die
+}
+
+src_configure() {
+ econf \
+ --disable-dependency-tracking
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS ChangeLog DEVNOTES README TODO
+}
diff --git a/media-libs/libicns/libicns-0.8.0.ebuild b/media-libs/libicns/libicns-0.8.0.ebuild
new file mode 100644
index 000000000000..a3beb5109742
--- /dev/null
+++ b/media-libs/libicns/libicns-0.8.0.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="A library for manipulating MacOS X .icns icon format"
+HOMEPAGE="http://sourceforge.net/projects/icns/"
+SRC_URI="mirror://sourceforge/icns/${P}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static-libs"
+
+RDEPEND=">=media-libs/libpng-1.2:0
+ media-libs/jasper"
+DEPEND="${RDEPEND}"
+
+DOCS="AUTHORS ChangeLog DEVNOTES README TODO"
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ rm -f "${ED}"usr/lib*/lib*.la
+}
diff --git a/media-libs/libicns/libicns-0.8.1.ebuild b/media-libs/libicns/libicns-0.8.1.ebuild
new file mode 100644
index 000000000000..a3beb5109742
--- /dev/null
+++ b/media-libs/libicns/libicns-0.8.1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="A library for manipulating MacOS X .icns icon format"
+HOMEPAGE="http://sourceforge.net/projects/icns/"
+SRC_URI="mirror://sourceforge/icns/${P}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static-libs"
+
+RDEPEND=">=media-libs/libpng-1.2:0
+ media-libs/jasper"
+DEPEND="${RDEPEND}"
+
+DOCS="AUTHORS ChangeLog DEVNOTES README TODO"
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ rm -f "${ED}"usr/lib*/lib*.la
+}
diff --git a/media-libs/libicns/metadata.xml b/media-libs/libicns/metadata.xml
new file mode 100644
index 000000000000..f59bd2ed590c
--- /dev/null
+++ b/media-libs/libicns/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>graphics</herd>
+ <upstream>
+ <remote-id type="sourceforge">icns</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libid3tag/Manifest b/media-libs/libid3tag/Manifest
new file mode 100644
index 000000000000..928e2524b2e4
--- /dev/null
+++ b/media-libs/libid3tag/Manifest
@@ -0,0 +1 @@
+DIST libid3tag-0.15.1b.tar.gz 338143 SHA256 63da4f6e7997278f8a3fef4c6a372d342f705051d1eeb6a46a86b03610e26151 SHA512 ade7ce2a43c3646b4c9fdc642095174b9d4938b078b205cd40906d525acd17e87ad76064054a961f391edcba6495441450af2f68be69f116549ca666b069e6d3 WHIRLPOOL cbd06c7218da08487a4da683f399767a24782ce4d4b4d19b2945b9777c665bc0d91b90564a61db2e79eb9275c7d6f0eef9bd938341f6532a5da94b9470c70985
diff --git a/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-64bit-long.patch b/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-64bit-long.patch
new file mode 100644
index 000000000000..852d9efd69b2
--- /dev/null
+++ b/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-64bit-long.patch
@@ -0,0 +1,24 @@
+--- id3tag.h.orig 2004-01-23 18:22:46.000000000 -0500
++++ id3tag.h 2008-05-04 19:46:33.000000000 -0400
+@@ -25,6 +25,8 @@
+ # ifndef LIBID3TAG_ID3TAG_H
+ # define LIBID3TAG_ID3TAG_H
+
++#include <stdint.h>
++
+ # ifdef __cplusplus
+ extern "C" {
+ # endif
+@@ -36,10 +38,10 @@
+ typedef unsigned char id3_byte_t;
+ typedef unsigned long id3_length_t;
+
+-typedef unsigned long id3_ucs4_t;
++typedef uint32_t id3_ucs4_t;
+
+ typedef unsigned char id3_latin1_t;
+-typedef unsigned short id3_utf16_t;
++typedef uint16_t id3_utf16_t;
+ typedef signed char id3_utf8_t;
+
+ struct id3_tag {
diff --git a/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-a_capella.patch b/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-a_capella.patch
new file mode 100644
index 000000000000..2adc2e6ced28
--- /dev/null
+++ b/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-a_capella.patch
@@ -0,0 +1,35 @@
+diff -urNad /home/debian/mad/libid3tag-0.15.1b/libid3tag-0.15.1b/genre.dat libid3tag-0.15.1b/genre.dat
+--- a/libid3tag-0.15.1b/genre.dat 2004-02-16 21:34:39.000000000 -0500
++++ b/libid3tag-0.15.1b/genre.dat 2004-09-06 09:50:33.000000000 -0400
+@@ -277,8 +277,8 @@
+ { 'P', 'u', 'n', 'k', ' ', 'R', 'o', 'c', 'k', 0 };
+ static id3_ucs4_t const genre_DRUM_SOLO[] =
+ { 'D', 'r', 'u', 'm', ' ', 'S', 'o', 'l', 'o', 0 };
+-static id3_ucs4_t const genre_A_CAPPELLA[] =
+- { 'A', ' ', 'C', 'a', 'p', 'p', 'e', 'l', 'l', 'a', 0 };
++static id3_ucs4_t const genre_A_CAPELLA[] =
++ { 'A', ' ', 'C', 'a', 'p', 'e', 'l', 'l', 'a', 0 };
+ static id3_ucs4_t const genre_EURO_HOUSE[] =
+ { 'E', 'u', 'r', 'o', '-', 'H', 'o', 'u', 's', 'e', 0 };
+ static id3_ucs4_t const genre_DANCE_HALL[] =
+@@ -452,7 +452,7 @@
+ genre_DUET,
+ genre_PUNK_ROCK,
+ genre_DRUM_SOLO,
+- genre_A_CAPPELLA,
++ genre_A_CAPELLA,
+ genre_EURO_HOUSE,
+ genre_DANCE_HALL,
+ genre_GOA,
+diff -urNad /home/debian/mad/libid3tag-0.15.1b/libid3tag-0.15.1b/genre.dat.in libid3tag-0.15.1b/genre.dat.in
+--- a/libid3tag-0.15.1b/genre.dat.in 2004-01-23 04:41:32.000000000 -0500
++++ b/libid3tag-0.15.1b/genre.dat.in 2004-09-06 09:50:33.000000000 -0400
+@@ -153,7 +153,7 @@
+ Duet
+ Punk Rock
+ Drum Solo
+-A Cappella
++A Capella
+ Euro-House
+ Dance Hall
+ Goa
diff --git a/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-compat.patch b/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-compat.patch
new file mode 100644
index 000000000000..6ef1a22d5a64
--- /dev/null
+++ b/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-compat.patch
@@ -0,0 +1,13 @@
+diff -ur libid3tag-0.15.1b/compat.gperf libid3tag-0.15.1b.fixed/compat.gperf
+--- libid3tag-0.15.1b/compat.gperf Fri Jan 23 01:41:32 2004
++++ libid3tag-0.15.1b.fixed/compat.gperf Thu Oct 19 12:21:10 2006
+@@ -237,6 +237,9 @@
+ encoding = id3_parse_uint(&data, 1);
+ string = id3_parse_string(&data, end - data, encoding, 0);
+
++ if (string == 0)
++ continue;
++
+ if (id3_ucs4_length(string) < 4) {
+ free(string);
+ continue;
diff --git a/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-file-write.patch b/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-file-write.patch
new file mode 100644
index 000000000000..aa61d09f8748
--- /dev/null
+++ b/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-file-write.patch
@@ -0,0 +1,52 @@
+diff -ur -x '*.lo' -x '*.o' -x config.h -x config.log libid3tag-0.15.1b/file.c libid3tag-0.15.1b-fixed/file.c
+--- libid3tag-0.15.1b/file.c 2004-01-23 12:41:32.000000000 +0300
++++ libid3tag-0.15.1b-fixed/file.c 2005-05-24 23:34:08.000000000 +0400
+@@ -37,6 +37,10 @@
+ # include <assert.h>
+ # endif
+
++# ifdef HAVE_SYS_STAT_H
++# include <sys/stat.h>
++# endif
++
+ # include "id3tag.h"
+ # include "file.h"
+ # include "tag.h"
+@@ -575,6 +579,10 @@
+ int v2_write(struct id3_file *file,
+ id3_byte_t const *data, id3_length_t length)
+ {
++ struct stat st;
++ char *buffer;
++ id3_length_t datalen, offset;
++
+ assert(!data || length > 0);
+
+ if (data &&
+@@ -592,9 +600,25 @@
+ }
+
+ /* hard general case: rewrite entire file */
++ if (stat(file->path, &st) == -1)
++ return -1;
+
+- /* ... */
++ offset = file->tags ? file->tags[0].length : 0;
++ datalen = st.st_size - offset;
++ if ((buffer = (char *) malloc(datalen)) == NULL)
++ return -1;
+
++ if (fseek(file->iofile, offset, SEEK_SET) == -1 ||
++ fread(buffer, datalen, 1, file->iofile) != 1 ||
++ fseek(file->iofile, 0, SEEK_SET) == -1 ||
++ fwrite(data, length, 1, file->iofile) != 1 ||
++ fwrite(buffer, datalen, 1, file->iofile) != 1 ||
++ fflush(file->iofile) == EOF) {
++ free(buffer);
++ return -1;
++ }
++ free(buffer);
++
+ done:
+ return 0;
+ }
diff --git a/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-fix_overflow.patch b/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-fix_overflow.patch
new file mode 100644
index 000000000000..26c54c5d2cfe
--- /dev/null
+++ b/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-fix_overflow.patch
@@ -0,0 +1,11 @@
+--- field.c.orig 2008-05-05 09:49:15.000000000 -0400
++++ field.c 2008-05-05 09:49:25.000000000 -0400
+@@ -291,7 +291,7 @@
+
+ end = *ptr + length;
+
+- while (end - *ptr > 0) {
++ while (end - *ptr > 0 && **ptr != '\0') {
+ ucs4 = id3_parse_string(ptr, end - *ptr, *encoding, 0);
+ if (ucs4 == 0)
+ goto fail;
diff --git a/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-tag.patch b/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-tag.patch
new file mode 100644
index 000000000000..2badfb35cffa
--- /dev/null
+++ b/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-tag.patch
@@ -0,0 +1,17 @@
+--- tag.c.orig Fri Apr 18 18:14:33 2003
++++ tag.c Mon Sep 26 22:29:24 2005
+@@ -714,9 +714,12 @@
+
+ frame = id3_tag_findframe(tag, ID3_FRAME_TRACK, 0);
+ if (frame) {
+- unsigned int track;
++ id3_ucs4_t const *string;
++ unsigned int track = 0;
+
+- track = id3_ucs4_getnumber(id3_field_getstrings(&frame->fields[1], 0));
++ string = id3_field_getstrings(&frame->fields[1], 0);
++ if (string)
++ track = id3_ucs4_getnumber(string);
+ if (track > 0 && track <= 0xff) {
+ ptr[-2] = 0;
+ ptr[-1] = track;
diff --git a/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-unknown-encoding.patch b/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-unknown-encoding.patch
new file mode 100644
index 000000000000..7c70d0020384
--- /dev/null
+++ b/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-unknown-encoding.patch
@@ -0,0 +1,27 @@
+diff -urNad libid3tag-0.15.1b~/compat.gperf libid3tag-0.15.1b/compat.gperf
+--- libid3tag-0.15.1b~/compat.gperf 2004-01-23 09:41:32.000000000 +0000
++++ libid3tag-0.15.1b/compat.gperf 2007-01-14 14:36:53.000000000 +0000
+@@ -236,6 +236,10 @@
+
+ encoding = id3_parse_uint(&data, 1);
+ string = id3_parse_string(&data, end - data, encoding, 0);
++ if (!string)
++ {
++ continue;
++ }
+
+ if (id3_ucs4_length(string) < 4) {
+ free(string);
+diff -urNad libid3tag-0.15.1b~/parse.c libid3tag-0.15.1b/parse.c
+--- libid3tag-0.15.1b~/parse.c 2004-01-23 09:41:32.000000000 +0000
++++ libid3tag-0.15.1b/parse.c 2007-01-14 14:37:34.000000000 +0000
+@@ -165,6 +165,9 @@
+ case ID3_FIELD_TEXTENCODING_UTF_8:
+ ucs4 = id3_utf8_deserialize(ptr, length);
+ break;
++ default:
++ /* FIXME: Unknown encoding! Print warning? */
++ return NULL;
+ }
+
+ if (ucs4 && !full) {
diff --git a/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-utf16.patchlibid3tag-0.15.1b-utf16.patch b/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-utf16.patchlibid3tag-0.15.1b-utf16.patch
new file mode 100644
index 000000000000..e2e6eaeb6dfe
--- /dev/null
+++ b/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-utf16.patchlibid3tag-0.15.1b-utf16.patch
@@ -0,0 +1,21 @@
+--- libid3tag-0.15.1b/utf16.c
++++ libid3tag-0.15.1b/utf16.c
+@@ -282,5 +282,18 @@
+
+ free(utf16);
+
++ if (end == *ptr && length % 2 != 0)
++ {
++ /* We were called with a bogus length. It should always
++ * be an even number. We can deal with this in a few ways:
++ * - Always give an error.
++ * - Try and parse as much as we can and
++ * - return an error if we're called again when we
++ * already tried to parse everything we can.
++ * - tell that we parsed it, which is what we do here.
++ */
++ (*ptr)++;
++ }
++
+ return ucs4;
+ }
diff --git a/media-libs/libid3tag/files/id3tag.pc b/media-libs/libid3tag/files/id3tag.pc
new file mode 100644
index 000000000000..e68600068919
--- /dev/null
+++ b/media-libs/libid3tag/files/id3tag.pc
@@ -0,0 +1,11 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: id3tag
+Description: ID3 tag reading library
+Requires:
+Version: 0.15.0b
+Libs: -L${libdir} -lid3tag -lz
+Cflags: -I${includedir}
diff --git a/media-libs/libid3tag/libid3tag-0.15.1b-r4.ebuild b/media-libs/libid3tag/libid3tag-0.15.1b-r4.ebuild
new file mode 100644
index 000000000000..e2edd6be9023
--- /dev/null
+++ b/media-libs/libid3tag/libid3tag-0.15.1b-r4.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 multilib libtool multilib-minimal
+
+DESCRIPTION="The MAD id3tag library"
+HOMEPAGE="http://www.underbit.com/products/mad/"
+SRC_URI="mirror://sourceforge/mad/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="debug static-libs"
+
+RDEPEND=">=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20130224-r6
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}
+ dev-util/gperf"
+
+src_prepare() {
+ epunt_cxx #74489
+ epatch "${FILESDIR}/${PV}"/*.patch
+ elibtoolize #sane .so versionning on fbsd and .so -> .so.version symlink
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ $(use_enable static-libs static) \
+ $(use_enable debug debugging)
+}
+
+multilib_src_install() {
+ default
+
+ # This file must be updated with every version update
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins "${FILESDIR}"/id3tag.pc
+ sed -i \
+ -e "s:prefix=.*:prefix=${EPREFIX}/usr:" \
+ -e "s:libdir=\${exec_prefix}/lib:libdir=${EPREFIX}/usr/$(get_libdir):" \
+ -e "s:0.15.0b:${PV}:" \
+ "${ED}"/usr/$(get_libdir)/pkgconfig/id3tag.pc || die
+}
+
+multilib_src_install_all() {
+ prune_libtool_files --all
+ einstalldocs
+}
diff --git a/media-libs/libid3tag/metadata.xml b/media-libs/libid3tag/metadata.xml
new file mode 100644
index 000000000000..315b2eb6f52e
--- /dev/null
+++ b/media-libs/libid3tag/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>sound</herd>
+ <upstream>
+ <remote-id type="sourceforge">mad</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libiec61883/Manifest b/media-libs/libiec61883/Manifest
new file mode 100644
index 000000000000..e7d9dcc6a9e4
--- /dev/null
+++ b/media-libs/libiec61883/Manifest
@@ -0,0 +1 @@
+DIST libiec61883-1.2.0.tar.xz 233640 SHA256 d1e02c7e276fac37313a2f8c1c33d7a9e19282ff16f32e72435428ff5121f09e SHA512 817177081a229c6253340e5911369aab746bd657d5b3d6a1ef3cf639cceee667bdb677fb0536163468cc9e719c4e81c6beaf42c93e5a56eb52684964b6dd1e23 WHIRLPOOL ded259537d15ea7b5571552044b9f47c08b06dab68ecccfa46f96fd88457cc5a9de26809516f6dbe27ff463304de49855c2b373001887d17e24251d7cbac261d
diff --git a/media-libs/libiec61883/libiec61883-1.2.0-r1.ebuild b/media-libs/libiec61883/libiec61883-1.2.0-r1.ebuild
new file mode 100644
index 000000000000..7f09e0247eda
--- /dev/null
+++ b/media-libs/libiec61883/libiec61883-1.2.0-r1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools-multilib eutils unpacker autotools
+
+DESCRIPTION="Library for capturing video (dv or mpeg2) over the IEEE 1394 bus"
+HOMEPAGE="http://dennedy.org/cgi-bin/gitweb.cgi?p=dennedy.org/libiec61883.git"
+SRC_URI="mirror://kernel/linux/libs/ieee1394/${P}.tar.xz"
+
+LICENSE="|| ( LGPL-2.1 GPL-2 )"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ia64 ppc ppc64 sparc x86"
+IUSE="examples static-libs"
+
+RDEPEND=">=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}]
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20130224-r7
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ if use examples; then
+ sed -i -e "s:noinst_PROGRAMS.*:noinst_PROGRAMS = :g" \
+ -e "s:in_PROGRAMS.*:in_PROGRAMS = plugreport plugctl test-amdtp test-dv test-mpeg2 test-plugs:g" \
+ examples/Makefile.am || die "noinst patching failed"
+ AUTOTOOLS_AUTORECONF="1"
+ fi
+ autotools-multilib_src_prepare
+}
diff --git a/media-libs/libiec61883/metadata.xml b/media-libs/libiec61883/metadata.xml
new file mode 100644
index 000000000000..7fbd877fd124
--- /dev/null
+++ b/media-libs/libiec61883/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>calchan@gentoo.org</email>
+ <name>Denis Dupeyron</name>
+ <description>Main maintainer for this is the herd, please CC on
+ bugs.</description>
+</maintainer>
+<longdescription lang="en">
+This library provides third generation media reception and transmission for DV,
+MPEG2-TS, and AMDTP (audio and music) using only raw1394 and not the complicated
+setup and maintenance of other kernel modules and their /dev nodes.
+</longdescription>
+</pkgmetadata>
+
diff --git a/media-libs/libifp/Manifest b/media-libs/libifp/Manifest
new file mode 100644
index 000000000000..1e8e1cc0fc1d
--- /dev/null
+++ b/media-libs/libifp/Manifest
@@ -0,0 +1 @@
+DIST libifp-1.0.0.2.tar.gz 358550 SHA256 3b8fa50b9425b660285484eb42bad3f736f0aecc6a790c5160da276558ebfcee
diff --git a/media-libs/libifp/libifp-1.0.0.2.ebuild b/media-libs/libifp/libifp-1.0.0.2.ebuild
new file mode 100644
index 000000000000..4d9a1c4d6ad4
--- /dev/null
+++ b/media-libs/libifp/libifp-1.0.0.2.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+DESCRIPTION="A general-purpose library for iRiver's iFP portable audio players"
+HOMEPAGE="http://ifp-driver.sourceforge.net/libifp/"
+SRC_URI="mirror://sourceforge/ifp-driver/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ia64 ppc ppc64 x86"
+IUSE="doc examples static-libs"
+
+RDEPEND="virtual/libusb:0"
+DEPEND="${RDEPEND}
+ doc? ( >=app-doc/doxygen-1.3.7 )
+ sys-apps/sed"
+
+src_prepare() {
+ sed -i \
+ -e '/CFLAGS=/s:-g -O2:${CFLAGS}:' \
+ -e '/CXXFLAGS=/s:-g -O2:${CXXFLAGS}:' \
+ configure || die
+}
+
+src_configure() {
+ use doc || export have_doxygen=no
+
+ econf \
+ --disable-dependency-tracking \
+ $(use_enable static-libs static) \
+ $(use_enable examples) \
+ --with-libusb \
+ --without-kmodule
+}
+
+src_test() { :; } # hardware dependant wrt #318597
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+
+ find "${D}" -name '*.la' -exec rm -f {} +
+
+ # clean /usr/bin after installation
+ # by moving examples to examples dir
+ if use examples; then
+ insinto /usr/share/${PN}/examples
+ doins "${S}"/examples/simple.c "${S}"/examples/ifpline.c
+ mv "${D}"/usr/bin/{simple,ifpline} "${D}"/usr/share/${PN}/examples
+ else
+ rm -f "${D}"/usr/bin/{simple,ifpline}
+ fi
+
+ use doc && dodoc README ChangeLog TODO
+}
diff --git a/media-libs/libifp/metadata.xml b/media-libs/libifp/metadata.xml
new file mode 100644
index 000000000000..74257d7e3e82
--- /dev/null
+++ b/media-libs/libifp/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>sound</herd>
+ <upstream>
+ <remote-id type="sourceforge">ifp-driver</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libilbc/Manifest b/media-libs/libilbc/Manifest
new file mode 100644
index 000000000000..6038f79493d0
--- /dev/null
+++ b/media-libs/libilbc/Manifest
@@ -0,0 +1 @@
+DIST libilbc-1.1.1.tar.xz 302324 SHA256 c52a3f46cf5671ac67494371e78281fa72c87a1af1fd8b8e1731693b6541be87 SHA512 7c9fa6da4d8b32fd49ea62f9e876e385930501c9caedcafac94ea74b9372722b06dd28062dc4fcca765ad6c519cfb52bb595d396ca50d361f563c715f6679845 WHIRLPOOL 120a041823e58d0db3d05549491c00e1b74340f2eefd51f2903f29aacefbbbc94f12cc821451e772c7434ea21fc86ff0c5f8ff15a26e732d1e698d2e7ef44c0a
diff --git a/media-libs/libilbc/libilbc-1.1.1.ebuild b/media-libs/libilbc/libilbc-1.1.1.ebuild
new file mode 100644
index 000000000000..082202072f92
--- /dev/null
+++ b/media-libs/libilbc/libilbc-1.1.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
+
+if [[ ${PV} == 9999 ]] ; then
+ SCM="autotools git-2"
+ EGIT_REPO_URI="git://github.com/lu-zero/libilbc.git"
+ SRC_URI=""
+ KEYWORDS=""
+else
+ SRC_URI="http://dev.gentoo.org/~lu_zero/${PN}/${P}.tar.xz"
+ KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
+fi
+
+inherit eutils multilib ${SCM}
+
+DESCRIPTION="Packaged version of iLBC codec from the WebRTC project"
+HOMEPAGE="https://github.com/dekkers/libilbc"
+
+LICENSE="BSD"
+SLOT="0"
+IUSE=""
+
+src_prepare() {
+ [[ ${PV} == *9999 ]] && eautoreconf
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ find "${D}"usr/$(get_libdir) -name '*.la' -delete
+}
diff --git a/media-libs/libilbc/libilbc-9999.ebuild b/media-libs/libilbc/libilbc-9999.ebuild
new file mode 100644
index 000000000000..06728b45f67b
--- /dev/null
+++ b/media-libs/libilbc/libilbc-9999.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+if [[ ${PV} == 9999 ]] ; then
+ SCM="autotools git-2"
+ EGIT_REPO_URI="git://github.com/lu-zero/libilbc.git"
+ SRC_URI=""
+ KEYWORDS=""
+else
+ SRC_URI="http://dev.gentoo.org/~lu_zero/${PN}/${P}.tar.xz"
+ KEYWORDS="~amd64"
+fi
+
+inherit eutils multilib ${SCM}
+
+DESCRIPTION="Packaged version of iLBC codec from the WebRTC project"
+HOMEPAGE="https://github.com/dekkers/libilbc"
+
+LICENSE="BSD"
+SLOT="0"
+IUSE=""
+
+src_prepare() {
+ [[ ${PV} == *9999 ]] && eautoreconf
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ find "${D}"usr/$(get_libdir) -name '*.la' -delete
+}
diff --git a/media-libs/libilbc/metadata.xml b/media-libs/libilbc/metadata.xml
new file mode 100644
index 000000000000..7e328c947817
--- /dev/null
+++ b/media-libs/libilbc/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>sound</herd>
+ <longdescription lang="en">iLBC BSD implementation from WebRTC</longdescription>
+ <upstream>
+ <remote-id type="github">dekkers/libilbc</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libipod/Manifest b/media-libs/libipod/Manifest
new file mode 100644
index 000000000000..755f0d12c902
--- /dev/null
+++ b/media-libs/libipod/Manifest
@@ -0,0 +1 @@
+DIST libipod-0.1.tgz 396009 SHA256 5198703532b831bfc986fdb87f5d72263865dc47c1915fa6026f2c1479c5d1e8
diff --git a/media-libs/libipod/files/libipod-0.1-prototypes.patch b/media-libs/libipod/files/libipod-0.1-prototypes.patch
new file mode 100644
index 000000000000..dc6106894128
--- /dev/null
+++ b/media-libs/libipod/files/libipod-0.1-prototypes.patch
@@ -0,0 +1,101 @@
+--- libipod-0.1/src/ipod_atom_list.c
++++ libipod-0.1/src/ipod_atom_list.c
+@@ -23,6 +23,7 @@
+ #include <ipod/ipod_memory.h>
+ #include <ipod/ipod_constants.h>
+ #include "ipod_atom.h"
++#include <string.h>
+
+ static long ipod_atom_list_allocs;
+ static long ipod_atom_list_frees;
+--- libipod-0.1/src/ipod_atom_mhod.c
++++ libipod-0.1/src/ipod_atom_mhod.c
+@@ -30,6 +30,7 @@
+ #include "ipod_atom_mhlt.h"
+ #include "ipod_atom_mhit.h"
+ #include "ipod_private_constants.h"
++#include <string.h>
+
+ static void ipod_atom_init_mhod(uint32_t version,void *data)
+ {
+--- libipod-0.1/src/ipod.c
++++ libipod-0.1/src/ipod.c
+@@ -37,6 +37,7 @@
+ #include "ipod_atom_mhod.h"
+ #include "ipod_atom_mqed.h"
+ #include "ipod_atom_pqed.h"
++#include <string.h>
+ #include <sys/stat.h>
+ #include <sys/statfs.h>
+ #include <dirent.h>
+--- libipod-0.1/src/ipod_file_utils.c
++++ libipod-0.1/src/ipod_file_utils.c
+@@ -21,6 +21,8 @@
+
+ #include <ipod/ipod_file_utils.h>
+ #include <ipod/ipod_error.h>
++#include <ipod/ipod_memory.h>
++#include <string.h>
+ #include <stdio.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+--- libipod-0.1/src/ipod_io_memory.c
++++ libipod-0.1/src/ipod_io_memory.c
+@@ -21,6 +21,7 @@
+
+ #include <ipod/ipod_io_memory.h>
+ #include <ipod/ipod_memory.h>
++#include <string.h>
+
+ #define MEMORY_CHUNK_SIZE 8192
+ #define IPOD_IO_MEMORY_MAGIC 0x05675309
+--- libipod-0.1/src/ipod_string.c
++++ libipod-0.1/src/ipod_string.c
+@@ -23,6 +23,7 @@
+ #include <ipod/ipod_memory.h>
+ #include <ipod/ipod_error.h>
+ #include <stdio.h>
++#include <string.h>
+
+ static unsigned long ipod_string_allocs;
+ static unsigned long ipod_string_frees;
+--- libipod-0.1/src/ipod_track_add.c
++++ libipod-0.1/src/ipod_track_add.c
+@@ -26,6 +26,7 @@
+ #include <ipod/ipod_constants.h>
+ #include <ipod/ipod_error.h>
+ #include <stdio.h>
++#include <string.h>
+
+ extern ipod_track_t ipod_track_from_m4a(ipod_t ipod,ipod_io io);
+ extern ipod_track_t ipod_track_from_mp3(ipod_t ipod,ipod_io io);
+--- libipod-0.1/examples/teststrings.c
++++ libipod-0.1/examples/teststrings.c
+@@ -6,6 +6,7 @@
+ #include <ipod/ipod_string.h>
+ #include <ipod/ipod_memory.h>
+ #include <stdio.h>
++#include <string.h>
+
+ void compare(const char *testDesc,const char *s1,const char *s2,size_t numBytes)
+ {
+--- libipod-0.1/src/ipod_track_from_mp3.c
++++ libipod-0.1/src/ipod_track_from_mp3.c
+@@ -25,6 +25,7 @@
+ #include <ipod/ipod_constants.h>
+ #include <ipod/ipod_string.h>
+ #include <ipod/ipod_error.h>
++#include <ipod/ipod_memory.h>
+ #include <stdio.h>
+
+ #define IPOD_MPEG_VERSION_1 3
+--- libipod-0.1/src/ipod_atom_mhyp.c
++++ libipod-0.1/src/ipod_atom_mhyp.c
+@@ -29,6 +29,7 @@
+ #include "ipod_atom_mhsd.h"
+ #include "ipod_atom_mhbd.h"
+ #include "ipod_atom_mhlt.h"
++#include "ipod_atom_mhit.h"
+ #include "ipod_private_constants.h"
+
+ static void ipod_atom_init_mhyp(uint32_t version,void *data)
diff --git a/media-libs/libipod/libipod-0.1.ebuild b/media-libs/libipod/libipod-0.1.ebuild
new file mode 100644
index 000000000000..5d615b86272f
--- /dev/null
+++ b/media-libs/libipod/libipod-0.1.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+DESCRIPTION="lightweight and fast library written in C for managing Apple iPods"
+HOMEPAGE="http://libipod.sourceforge.net/"
+SRC_URI="mirror://sourceforge/libipod/${P}.tgz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND=""
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-prototypes.patch
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die
+ dodoc AUTHORS ChangeLog NEWS README
+}
diff --git a/media-libs/libipod/metadata.xml b/media-libs/libipod/metadata.xml
new file mode 100644
index 000000000000..e2ffbc2cee66
--- /dev/null
+++ b/media-libs/libipod/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>
+ <name>Default assignee for orphaned packages</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">libipod</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libiptcdata/Manifest b/media-libs/libiptcdata/Manifest
new file mode 100644
index 000000000000..7795444b40b2
--- /dev/null
+++ b/media-libs/libiptcdata/Manifest
@@ -0,0 +1 @@
+DIST libiptcdata-1.0.4.tar.gz 569132 SHA256 79f63b8ce71ee45cefd34efbb66e39a22101443f4060809b8fc29c5eebdcee0e SHA512 8656b2febaec133d1a8783252047672bebd58ae9ceab5477c4acfa35bcc381dfda08b655a957b962878af28c69deff77d920e780c84b4debdff2f980b3de94e8 WHIRLPOOL c97e9c5566840e5e0ecede481650b91108b047d0324b9260d5083d46e55f0bfe71bf6d91d504fcc59f374dd77a0818397fed87ca8b73ecf0bfe769d43fa2348a
diff --git a/media-libs/libiptcdata/libiptcdata-1.0.4-r1.ebuild b/media-libs/libiptcdata/libiptcdata-1.0.4-r1.ebuild
new file mode 100644
index 000000000000..d4ff52684d75
--- /dev/null
+++ b/media-libs/libiptcdata/libiptcdata-1.0.4-r1.ebuild
@@ -0,0 +1,51 @@
+# 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="library for manipulating the International Press Telecommunications
+Council (IPTC) metadata"
+HOMEPAGE="http://libiptcdata.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="doc examples nls python"
+
+RDEPEND="python? ( ${PYTHON_DEPS} )
+ nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ nls? ( >=sys-devel/gettext-0.13.1 )
+ doc? ( >=dev-util/gtk-doc-1 )"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_configure () {
+ econf \
+ $(use_enable nls) \
+ $(use_enable python) \
+ $(use_enable doc gtk-doc)
+}
+
+src_install () {
+ emake DESTDIR="${D}" install || die "emake install failed."
+ dodoc AUTHORS ChangeLog NEWS README TODO || die "dodoc failed."
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/python
+ doins python/README || die "doins failed"
+ doins -r python/examples || die "doins 2 failed"
+ fi
+
+ find "${D}" -name '*.la' -delete || die "failed to remove *.la files"
+}
diff --git a/media-libs/libiptcdata/libiptcdata-1.0.4.ebuild b/media-libs/libiptcdata/libiptcdata-1.0.4.ebuild
new file mode 100644
index 000000000000..391569f4f0c0
--- /dev/null
+++ b/media-libs/libiptcdata/libiptcdata-1.0.4.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="3.* 2.7-pypy-* *-jython"
+
+inherit eutils python
+
+DESCRIPTION="library for manipulating the International Press Telecommunications
+Council (IPTC) metadata"
+HOMEPAGE="http://libiptcdata.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm ia64 ppc ppc64 sparc x86"
+IUSE="doc examples nls python"
+
+RDEPEND="python? ( =dev-lang/python-2* )
+ nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ nls? ( >=sys-devel/gettext-0.13.1 )
+ doc? ( >=dev-util/gtk-doc-1 )"
+
+pkg_setup() {
+ if use python; then
+ python_pkg_setup
+ fi
+}
+
+src_prepare() {
+ # Python bindings are built/tested/installed manually.
+ sed -e '/SUBDIRS =/s/$(MAYBE_PYTHONLIB)//' -i Makefile.in || die "sed failed"
+}
+
+src_configure () {
+ econf \
+ $(use_enable nls) \
+ $(use_enable python) \
+ $(use_enable doc gtk-doc)
+}
+
+src_compile() {
+ default
+
+ if use python; then
+ python_copy_sources python
+ building() {
+ emake PYTHON_CPPFLAGS=-I$(python_get_includedir) \
+ pyexecdir=$(python_get_sitedir)
+ }
+ python_execute_function -s --source-dir python building
+ fi
+}
+
+src_install () {
+ emake DESTDIR="${D}" install || die "emake install failed."
+
+ if use python; then
+ installation() {
+ emake DESTDIR="${D}" pyexecdir=$(python_get_sitedir) install
+ }
+ python_execute_function -s --source-dir python installation
+ python_clean_installation_image
+ fi
+
+ dodoc AUTHORS ChangeLog NEWS README TODO || die "dodoc failed."
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/python
+ doins python/README || die "doins failed"
+ doins -r python/examples || die "doins 2 failed"
+ fi
+
+ find "${D}" -name '*.la' -delete || die "failed to remove *.la files"
+}
diff --git a/media-libs/libiptcdata/metadata.xml b/media-libs/libiptcdata/metadata.xml
new file mode 100644
index 000000000000..c35be40d2130
--- /dev/null
+++ b/media-libs/libiptcdata/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>eva@gentoo.org</email>
+ <name>Gilles Dartiguelongue</name>
+ </maintainer>
+ <longdescription lang="en">
+ libiptcdata is a library, written in C, for manipulating the
+ International Press Telecommunications Council (IPTC) metadata stored
+ within multimedia files such as images. This metadata can include
+ captions and keywords, often used by popular photo management
+ applications. The library provides routines for parsing, viewing,
+ modifying, and saving this metadata. The library is licensed under the
+ GNU Library General Public License (GNU LGPL). The libiptcdata package
+ also includes a command-line utility, iptc, for editing IPTC data in
+ JPEG files, as well as Python bindings.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">libiptcdata</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libirman/Manifest b/media-libs/libirman/Manifest
new file mode 100644
index 000000000000..aa48c772e074
--- /dev/null
+++ b/media-libs/libirman/Manifest
@@ -0,0 +1 @@
+DIST libirman-0.4.5.tar.bz2 225330 SHA256 e0220645fedb511277720c03feb5fbf51ec2cef08f8e859c0ff4ecff4286064e SHA512 5b0a8e1c0699bf1d8b43bbb2320b3abbd1f8d400264efd78d1cfb5ea942ff1d272b150012dfa61f5afc427824282a62755ec1e1189dd3d849a5f62293125ffb3 WHIRLPOOL 6cf209e416bc162acc5142ab2ce3f390700cdc05cc8a521206a9293322d46d481c8b59bd5bcfa1a1c9d590a79d9e485e2dfd3246b4ff6a6fe7a59288ef37880d
diff --git a/media-libs/libirman/libirman-0.4.5.ebuild b/media-libs/libirman/libirman-0.4.5.ebuild
new file mode 100644
index 000000000000..0e640f70e3a0
--- /dev/null
+++ b/media-libs/libirman/libirman-0.4.5.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+AUTOTOOLS_AUTORECONF=yes
+
+inherit autotools-utils eutils toolchain-funcs
+
+DESCRIPTION="library for Irman control of Unix software"
+HOMEPAGE="http://www.lirc.org/software/snapshots/"
+SRC_URI="http://www.lirc.org/software/snapshots/${P}.tar.bz2"
+
+SLOT="0"
+LICENSE="GPL-2 LGPL-2"
+KEYWORDS="amd64 ppc ppc64 x86"
+IUSE="static-libs"
+
+DOCS=( TECHNICAL NEWS README TODO )
+
+src_prepare() {
+ tc-export CC LD AR RANLIB
+ autotools-utils_src_prepare
+}
+
+src_install() {
+ autotools-utils_src_install LIRC_DRIVER_DEVICE="${D}/dev/lirc"
+
+ dobin ${AUTOTOOLS_BUILD_DIR}/test_{func,io,name}
+}
diff --git a/media-libs/libirman/metadata.xml b/media-libs/libirman/metadata.xml
new file mode 100644
index 000000000000..91f4e72fb544
--- /dev/null
+++ b/media-libs/libirman/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-libs/libjackasyn/Manifest b/media-libs/libjackasyn/Manifest
new file mode 100644
index 000000000000..6809946ef46b
--- /dev/null
+++ b/media-libs/libjackasyn/Manifest
@@ -0,0 +1 @@
+DIST libjackasyn-0.13.tar.gz 74041 SHA256 77cf477815a054d508b0bdd34ffcedfe22c091bfbd4367c55c7e33e29089a902
diff --git a/media-libs/libjackasyn/files/libjackasyn-0.10-destdir.patch b/media-libs/libjackasyn/files/libjackasyn-0.10-destdir.patch
new file mode 100644
index 000000000000..443766f08ad2
--- /dev/null
+++ b/media-libs/libjackasyn/files/libjackasyn-0.10-destdir.patch
@@ -0,0 +1,32 @@
+diff -Naur libjackasyn-0.10.orig/Makefile.in libjackasyn-0.10/Makefile.in
+--- libjackasyn-0.10.orig/Makefile.in 2003-11-14 11:45:15.000000000 -0800
++++ libjackasyn-0.10/Makefile.in 2004-10-07 00:02:31.915756779 -0700
+@@ -13,7 +13,7 @@
+
+
+ prefix = @prefix@
+-
++libdir = @libdir@
+
+ all: static shared
+
+@@ -25,13 +25,12 @@
+ gcc -shared -Wl,-soname=libjackasyn.so.0 -o libjackasyn.so.$(VERSION) *.o $(LIBS)
+
+ install:
+- -rm $(prefix)/lib/libjackasyn.so*
+- install -m 644 libjackasyn.a $(prefix)/lib
+- install -m 644 libjackasyn.so.$(VERSION) $(prefix)/lib
+- install -m 644 libjackoss.h $(prefix)/include
+- ln -s libjackasyn.so.$(VERSION) $(prefix)/lib/libjackasyn.so.0
+- ln -s libjackasyn.so.$(VERSION) $(prefix)/lib/libjackasyn.so
+- install -m 755 jacklaunch $(prefix)/bin
++ install -m 644 libjackasyn.a $(DESTDIR)$(libdir)
++ install -m 644 libjackasyn.so.$(VERSION) $(DESTDIR)$(libdir)
++ install -m 644 libjackoss.h $(DESTDIR)$(prefix)/include
++ ln -s libjackasyn.so.$(VERSION) $(DESTDIR)$(libdir)/libjackasyn.so.0
++ ln -s libjackasyn.so.$(VERSION) $(DESTDIR)$(libdir)/libjackasyn.so
++ install -m 755 jacklaunch $(DESTDIR)$(prefix)/bin
+
+ test:
+ gcc -o test test.c libjackasyn.a -ljack -ldl -lm
diff --git a/media-libs/libjackasyn/files/libjackasyn-0.13-execprefix.patch b/media-libs/libjackasyn/files/libjackasyn-0.13-execprefix.patch
new file mode 100644
index 000000000000..418d4eea3c3f
--- /dev/null
+++ b/media-libs/libjackasyn/files/libjackasyn-0.13-execprefix.patch
@@ -0,0 +1,23 @@
+--- Makefile.in.old 2007-02-13 23:03:12.000000000 +0100
++++ Makefile.in 2007-02-13 23:03:22.000000000 +0100
+@@ -15,6 +15,8 @@
+
+ prefix = @prefix@
+
++exec_prefix=@prefix@
++
+ libdir = @libdir@
+
+ all: static shared
+--- jacklaunch.in.old 2007-02-13 23:03:37.000000000 +0100
++++ jacklaunch.in 2007-02-13 23:03:53.000000000 +0100
+@@ -26,6 +26,9 @@
+
+ PREFIX=@prefix@
+
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++
+ LIBDIR=@libdir@
+
+ LD_PRELOAD_OLD=""
diff --git a/media-libs/libjackasyn/files/libjackasyn-0.13-libdir.patch b/media-libs/libjackasyn/files/libjackasyn-0.13-libdir.patch
new file mode 100644
index 000000000000..d6a855bda6b8
--- /dev/null
+++ b/media-libs/libjackasyn/files/libjackasyn-0.13-libdir.patch
@@ -0,0 +1,27 @@
+diff -u -r libjackasyn-0.13.old/jacklaunch.in libjackasyn-0.13/jacklaunch.in
+--- libjackasyn-0.13.old/jacklaunch.in 2007-02-04 14:07:28.000000000 +0100
++++ libjackasyn-0.13/jacklaunch.in 2007-02-04 14:08:17.000000000 +0100
+@@ -26,18 +26,20 @@
+
+ PREFIX=@prefix@
+
++LIBDIR=@libdir@
++
+ LD_PRELOAD_OLD=""
+
+ if test "$LD_PRELOAD" != ""
+ then
+ LD_PRELOAD_OLD=$LD_PRELOAD
+- PRELOAD=$LD_PRELOAD:$PREFIX/lib/libjackasyn.so.0
++ PRELOAD=$LD_PRELOAD:$LIBDIR/libjackasyn.so.0
+ else
+- PRELOAD=$PREFIX/lib/libjackasyn.so.0
++ PRELOAD=$LIBDIR/libjackasyn.so.0
+ fi
+
+
+-if test -f $PREFIX/lib/libjackasyn.so.0 -a "$jackcnt" != "0"
++if test -f $LIBDIR/libjackasyn.so.0 -a "$jackcnt" != "0"
+ then
+ export LD_PRELOAD=$PRELOAD
+ fi
diff --git a/media-libs/libjackasyn/files/libjackasyn-0.13-pic.patch b/media-libs/libjackasyn/files/libjackasyn-0.13-pic.patch
new file mode 100644
index 000000000000..c52d6b65a6b1
--- /dev/null
+++ b/media-libs/libjackasyn/files/libjackasyn-0.13-pic.patch
@@ -0,0 +1,47 @@
+diff -u -r libjackasyn-0.13.old/Makefile.in libjackasyn-0.13/Makefile.in
+--- libjackasyn-0.13.old/Makefile.in 2007-02-04 14:17:35.000000000 +0100
++++ libjackasyn-0.13/Makefile.in 2007-02-04 14:18:05.000000000 +0100
+@@ -5,10 +5,11 @@
+
+ TARGET = libjackasyn
+
+-SRC_FILES = libjackasyn.c libjackoss.c clientfuncs.c
++SRC_FILES = libjackasyn.c libjackoss.c
+ OBJ_FILES = $(SRC_FILES:.c=.o) libjackoss_pl.o
++OBJ_PIC = $(OBJ_FILES:.o=.opic)
+ HEADERS = libjackasyn.h libjackoss.h
+-CFLAGS = -O2 -Wall -I. -fPIC -rdynamic -DMAJOR=$(MAJOR) -DMINOR=$(MINOR) @DEBUG@
++CFLAGS_ADD = -I. -rdynamic -DMAJOR=$(MAJOR) -DMINOR=$(MINOR) @DEBUG@
+ LIBS = -lc @LIBS@
+
+
+@@ -18,12 +19,17 @@
+
+ all: static shared
+
++%.o : %.c
++ $(CC) $(CFLAGS) $(CFLAGS_ADD) -c $< -o $@
++
++%.opic : %.c
++ $(CC) $(CFLAGS) $(CFLAGS_ADD) -fPIC -c $< -o $@
+
+ static: $(OBJ_FILES)
+- ar cr libjackasyn.a *.o
++ ar cr libjackasyn.a $(OBJ_FILES)
+
+-shared:
+- $(CC) -shared -Wl,-soname=libjackasyn.so.0 $(LDFLAGS) -o libjackasyn.so.$(VERSION) *.o $(LIBS)
++shared: $(OBJ_PIC)
++ $(CC) -shared -Wl,-soname=libjackasyn.so.0 $(LDFLAGS) -o libjackasyn.so.$(VERSION) $(OBJ_PIC) $(LIBS)
+
+ install:
+ -install -d $(DESTDIR)/$(libdir)
+@@ -58,4 +64,7 @@
+ $(OBJ_FILES) : $(HEADERS)
+
+ libjackoss_pl.o: libjackoss.c
+- $(CC) -c $(CFLAGS) -DLD_PRELOAD -o $@ $<
++ $(CC) -c $(CFLAGS) $(CFLAGS_ADD) -DLD_PRELOAD -o $@ $<
++
++libjackoss_pl.opic: libjackoss.c
++ $(CC) -c $(CFLAGS) $(CFLAGS_ADD) -fPIC -DLD_PRELOAD -o $@ $<
diff --git a/media-libs/libjackasyn/files/libjackasyn-0.13-qa.patch b/media-libs/libjackasyn/files/libjackasyn-0.13-qa.patch
new file mode 100644
index 000000000000..437faa9a6adf
--- /dev/null
+++ b/media-libs/libjackasyn/files/libjackasyn-0.13-qa.patch
@@ -0,0 +1,48 @@
+diff -u -r libjackasyn-0.13.old/Makefile.in libjackasyn-0.13/Makefile.in
+--- libjackasyn-0.13.old/Makefile.in 2007-02-04 13:26:52.000000000 +0100
++++ libjackasyn-0.13/Makefile.in 2007-02-04 13:27:14.000000000 +0100
+@@ -14,6 +14,7 @@
+
+ prefix = @prefix@
+
++libdir = @libdir@
+
+ all: static shared
+
+@@ -22,22 +23,21 @@
+ ar cr libjackasyn.a *.o
+
+ shared:
+- gcc -shared -Wl,-soname=libjackasyn.so.0 -o libjackasyn.so.$(VERSION) *.o $(LIBS)
++ $(CC) -shared -Wl,-soname=libjackasyn.so.0 $(LDFLAGS) -o libjackasyn.so.$(VERSION) *.o $(LIBS)
+
+ install:
+- -rm $(DESTDIR)/$(prefix)/lib/libjackasyn.so*
+- -install -d $(DESTDIR)/$(prefix)/lib
++ -install -d $(DESTDIR)/$(libdir)
+ -install -d $(DESTDIR)/$(prefix)/include
+- install -m 644 libjackasyn.a $(DESTDIR)/$(prefix)/lib
+- install -m 644 libjackasyn.so.$(VERSION) $(DESTDIR)/$(prefix)/lib
++ install -m 644 libjackasyn.a $(DESTDIR)/$(libdir)
++ install -m 644 libjackasyn.so.$(VERSION) $(DESTDIR)/$(libdir)
+ install -m 644 libjackoss.h $(DESTDIR)/$(prefix)/include
+- ln -s libjackasyn.so.$(VERSION) $(DESTDIR)/$(prefix)/lib/libjackasyn.so.0
+- ln -s libjackasyn.so.$(VERSION) $(DESTDIR)/$(prefix)/lib/libjackasyn.so
++ ln -s libjackasyn.so.$(VERSION) $(DESTDIR)/$(libdir)/libjackasyn.so.0
++ ln -s libjackasyn.so.$(VERSION) $(DESTDIR)/$(libdir)/libjackasyn.so
+ -install -d $(DESTDIR)/$(prefix)/bin
+ install -m 755 jacklaunch $(DESTDIR)/$(prefix)/bin
+
+ test:
+- gcc -o test test.c libjackasyn.a -ljack -ldl -lm
++ $(CC) -o test test.c libjackasyn.a -ljack -ldl -lm
+
+ clean:
+ -rm *~ $(OBJ_FILES)
+@@ -58,4 +58,4 @@
+ $(OBJ_FILES) : $(HEADERS)
+
+ libjackoss_pl.o: libjackoss.c
+- gcc -c $(CFLAGS) -DLD_PRELOAD -o $@ $<
++ $(CC) -c $(CFLAGS) -DLD_PRELOAD -o $@ $<
+Only in libjackasyn-0.13.old: Makefile.in.orig
diff --git a/media-libs/libjackasyn/files/libjackasyn-0.13-tests.patch b/media-libs/libjackasyn/files/libjackasyn-0.13-tests.patch
new file mode 100644
index 000000000000..8d48b1f47d7e
--- /dev/null
+++ b/media-libs/libjackasyn/files/libjackasyn-0.13-tests.patch
@@ -0,0 +1,13 @@
+Index: libjackasyn-0.13/Makefile.in
+===================================================================
+--- libjackasyn-0.13.orig/Makefile.in
++++ libjackasyn-0.13/Makefile.in
+@@ -45,7 +45,7 @@ install:
+ install -m 755 jacklaunch $(DESTDIR)/$(prefix)/bin
+
+ test:
+- $(CC) -o test test.c libjackasyn.a -ljack -ldl -lm
++ $(CC) $(LDFLAGS) $(CFLAGS) -o test test.c libjackasyn.a $(LIBS)
+
+ clean:
+ -rm *~ $(OBJ_FILES)
diff --git a/media-libs/libjackasyn/libjackasyn-0.13.ebuild b/media-libs/libjackasyn/libjackasyn-0.13.ebuild
new file mode 100644
index 000000000000..fc0628c315f8
--- /dev/null
+++ b/media-libs/libjackasyn/libjackasyn-0.13.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils toolchain-funcs
+
+IUSE="debug"
+
+DESCRIPTION="An application/library for connecting OSS apps to Jackit"
+HOMEPAGE="http://gige.xdv.org/soft/libjackasyn"
+SRC_URI="http://gige.xdv.org/soft/libjackasyn/download/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 sparc x86"
+
+DEPEND="media-sound/jack-audio-connection-kit
+ media-libs/libsamplerate"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/${P}-qa.patch"
+ epatch "${FILESDIR}/${P}-pic.patch"
+ epatch "${FILESDIR}/${P}-libdir.patch"
+ epatch "${FILESDIR}/${P}-execprefix.patch"
+ epatch "${FILESDIR}/${P}-tests.patch"
+}
+
+src_compile() {
+ tc-export CC
+ local myconf
+ use debug && myconf="--enable-debug"
+ econf ${myconf} || die
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS CHANGELOG WORKING TODO README
+}
diff --git a/media-libs/libjackasyn/metadata.xml b/media-libs/libjackasyn/metadata.xml
new file mode 100644
index 000000000000..0dc3775f83d7
--- /dev/null
+++ b/media-libs/libjackasyn/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>proaudio</herd>
+</pkgmetadata>
diff --git a/media-libs/libjpeg-turbo/Manifest b/media-libs/libjpeg-turbo/Manifest
new file mode 100644
index 000000000000..dd91fe8dd671
--- /dev/null
+++ b/media-libs/libjpeg-turbo/Manifest
@@ -0,0 +1,6 @@
+DIST libjpeg-turbo-1.3.0.tar.gz 1361603 SHA256 2657008cfc08aadbaca065bd9f8964b8a2c0abd03e73da5b5f09c1216be31234 SHA512 4d34c3c5f2cdd70b2a3d1b55eeb4ce59cb3d4b8d22bb6d43c2ec844b7eb5685b55a9b1b46ad2bc5f2756b5f5535ccad032791c3b932af9c1efc502aa5e701053 WHIRLPOOL 13c1366b9bef87cab42c88f75d1ff7eddb4ea745e0056154f1f3fb27deedee077d662395bada3bd5c18d6f8bf744d0b1f3d465967d33b453ea2acc327a6f166f
+DIST libjpeg-turbo-1.3.1.tar.gz 1390282 SHA256 c132907417ddc40ed552fe53d6b91d5fecbb14a356a60ddc7ea50d6be9666fb9 SHA512 6b02dc617e291b357230ef3e8cfcd27f9acc8c3e9f1c869ab0a08e9e13711b87156c6cd1aaa1a6406a873fc6732f44c8a7d94a5d6688d24b14ac63a96ee52081 WHIRLPOOL f978b24d0a4e63a421822c2114c0cfc87cbc1dedd648ddc2e97e24ee19dc5584433b1da7d41a64f0ae37b50799a273165aaec6f1377ed35a7971dbe8a0b6a8d5
+DIST libjpeg-turbo-1.4.0.tar.gz 1524645 SHA256 d93ad8546b510244f863b39b4c0da0fa4c0d53a77b61a8a3880f258c232bbbee SHA512 60d038413acee43a23bb81d18309eed16e771d48b839b7aea52f582bbf9f99f04b3cc991e13cafc3d5df1441b726ea0792e7ad593ce4e52c96792c3b1df42c09 WHIRLPOOL 5f6c15bee87d9f9b82013801a8c6cd42c725ba4d65c0d60f990d4d0aec3c0b9334a5be832b34ae71d8606c801fc621de965c17b8b3067f7eef061f0155cbaa19
+DIST libjpeg-turbo-1.4.1.tar.gz 1529614 SHA256 4bf5bad4ce85625bffbbd9912211e06790e00fb982b77724af7211034efafb08 SHA512 81197fdac40c55cb9820b832c55dab9dd5aa19427a22feb6027510a4dc9c45aeea6a37203447600481f5162a0a2ca972324997cc89fc7e51b51808260df0598d WHIRLPOOL b1c2a225720216b602dfda04a3ecf52d2251ea775c44d2cd872e9c33f43f4275ca2fbfaccba8d493c12ece4023f0c4e0c3c029837bdaff577bc401ee46a14433
+DIST libjpeg8_8d-1.debian.tar.gz 13676 SHA256 70ec6689b0ad85739802cf3ebbdcc12ea01e21edd8f931c614b25b44cf199057 SHA512 7def4f13524f0af3b9adf35a370027a18f43b9a635f56a17d5bb7883370db8b18b8a12737d0f0cb4b0287ccf8fb474eb5f754de6b398ffe7d522c54e5bf68040 WHIRLPOOL 94526c31d401eb14c9bf0f7115e13a27886ad58863e25d6653eba2b2f5ef260ec272368d2b9d9934bd75b1e5b5f1afc97230e540248efc24d6e85e5680399d27
+DIST libjpeg8_8d-2.debian.tar.gz 14764 SHA256 9b36468b2aba24d63d3c87625de89f31834ac429e6dec7d68d86a52b5110219c SHA512 8c5959fb7583a2d61e9442187f67b91b45e72d9dd30db3360d583a3b5d8e1a908db5659f760bdd455b3056e6ae3535b2fd3b847df3d58b140a1816b754003675 WHIRLPOOL bda41c37f3f57733fcd86969126f6dbede2fbf633b0168265a7fe353fb7f3cd995a94e7987bac472957ec6fb0b2dc34d5dd646f0de79e06bc94e59d7cf440939
diff --git a/media-libs/libjpeg-turbo/files/libjpeg-turbo-1.2.0-x32.patch b/media-libs/libjpeg-turbo/files/libjpeg-turbo-1.2.0-x32.patch
new file mode 100644
index 000000000000..d85a4d7908f3
--- /dev/null
+++ b/media-libs/libjpeg-turbo/files/libjpeg-turbo-1.2.0-x32.patch
@@ -0,0 +1,38 @@
+https://bugs.gentoo.org/420239
+
+https://sourceforge.net/tracker/?func=detail&aid=3533795&group_id=303195&atid=1278160
+
+--- configure
++++ configure
+@@ -33,7 +33,11 @@ case "$host_os" in
+ linux*)
+ case "$host_cpu" in
+ x86_64)
+- objfmt='ELF64'
++ if echo __ILP32__ | $CC $CFLAGS -E - | grep __ILP32__ > /dev/null; then
++ objfmt='ELF64'
++ else
++ objfmt='ELFX32'
++ fi
+ ;;
+ *)
+ objfmt='ELF'
+@@ -94,6 +98,7 @@ case "$objfmt" in
+ a.out) NAFLAGS='-faout -DAOUT';;
+ BSD-a.out) NAFLAGS='-faoutb -DAOUT';;
+ ELF) NAFLAGS='-felf -DELF';;
++ ELFX32) NAFLAGS='-felfx32 -DELF -D__x86_64__';;
+ ELF64) NAFLAGS='-felf64 -DELF -D__x86_64__';;
+ RDF) NAFLAGS='-frdf -DRDF';;
+ Mach-O) NAFLAGS='-fmacho -DMACHO';;
+--- simd/nasm_lt.sh
++++ simd/nasm_lt.sh
+@@ -11,7 +11,7 @@ while [ $# -gt 0 ]; do
+ pic=yes
+ fi
+ ;;
+- -f|-fbin|-faout|-faoutb|-fcoff|-felf|-felf64|-fas86| \
++ -f|-fbin|-faout|-faoutb|-fcoff|-felf|-felf64|-felfx32|-fas86| \
+ -fobj|-fwin32|-fwin64|-frdf|-fieee|-fmacho|-fmacho64)
+ # it's a file format specifier for nasm.
+ command="$command $1"
diff --git a/media-libs/libjpeg-turbo/files/libjpeg-turbo-1.3.0-CVE-2013-6629-and-6630.patch b/media-libs/libjpeg-turbo/files/libjpeg-turbo-1.3.0-CVE-2013-6629-and-6630.patch
new file mode 100644
index 000000000000..46eefad1604f
--- /dev/null
+++ b/media-libs/libjpeg-turbo/files/libjpeg-turbo-1.3.0-CVE-2013-6629-and-6630.patch
@@ -0,0 +1,38 @@
+http://bugzilla.redhat.com/show_bug.cgi?id=1031734
+http://bugzilla.redhat.com/show_bug.cgi?id=1031749
+http://sourceforge.net/p/libjpeg-turbo/code/1090/
+
+--- jdmarker.c
++++ jdmarker.c
+@@ -304,7 +304,7 @@
+ /* Process a SOS marker */
+ {
+ INT32 length;
+- int i, ci, n, c, cc;
++ int i, ci, n, c, cc, pi;
+ jpeg_component_info * compptr;
+ INPUT_VARS(cinfo);
+
+@@ -348,6 +348,13 @@
+
+ TRACEMS3(cinfo, 1, JTRC_SOS_COMPONENT, cc,
+ compptr->dc_tbl_no, compptr->ac_tbl_no);
++
++ /* This CSi (cc) should differ from the previous CSi */
++ for (pi = 0; pi < i; pi++) {
++ if (cinfo->cur_comp_info[pi] == compptr) {
++ ERREXIT1(cinfo, JERR_BAD_COMPONENT_ID, cc);
++ }
++ }
+ }
+
+ /* Collect the additional scan parameters Ss, Se, Ah/Al. */
+@@ -465,6 +472,8 @@
+ for (i = 0; i < count; i++)
+ INPUT_BYTE(cinfo, huffval[i], return FALSE);
+
++ MEMZERO(&huffval[count], (256 - count) * SIZEOF(UINT8));
++
+ length -= count;
+
+ if (index & 0x10) { /* AC table definition */
diff --git a/media-libs/libjpeg-turbo/files/libjpeg-turbo-1.3.1-jstdhuff.patch b/media-libs/libjpeg-turbo/files/libjpeg-turbo-1.3.1-jstdhuff.patch
new file mode 100644
index 000000000000..764147dbcaf5
--- /dev/null
+++ b/media-libs/libjpeg-turbo/files/libjpeg-turbo-1.3.1-jstdhuff.patch
@@ -0,0 +1,301 @@
+Index: jcparam.c
+===================================================================
+--- jcparam.c (revision 1103)
++++ jcparam.c (revision 1104)
+@@ -16,6 +16,7 @@
+ #define JPEG_INTERNALS
+ #include "jinclude.h"
+ #include "jpeglib.h"
++#include "jstdhuff.c"
+
+
+ /*
+@@ -166,116 +167,6 @@
+
+
+ /*
+- * Huffman table setup routines
+- */
+-
+-LOCAL(void)
+-add_huff_table (j_compress_ptr cinfo,
+- JHUFF_TBL **htblptr, const UINT8 *bits, const UINT8 *val)
+-/* Define a Huffman table */
+-{
+- int nsymbols, len;
+-
+- if (*htblptr == NULL)
+- *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo);
+-
+- /* Copy the number-of-symbols-of-each-code-length counts */
+- MEMCOPY((*htblptr)->bits, bits, SIZEOF((*htblptr)->bits));
+-
+- /* Validate the counts. We do this here mainly so we can copy the right
+- * number of symbols from the val[] array, without risking marching off
+- * the end of memory. jchuff.c will do a more thorough test later.
+- */
+- nsymbols = 0;
+- for (len = 1; len <= 16; len++)
+- nsymbols += bits[len];
+- if (nsymbols < 1 || nsymbols > 256)
+- ERREXIT(cinfo, JERR_BAD_HUFF_TABLE);
+-
+- MEMCOPY((*htblptr)->huffval, val, nsymbols * SIZEOF(UINT8));
+-
+- /* Initialize sent_table FALSE so table will be written to JPEG file. */
+- (*htblptr)->sent_table = FALSE;
+-}
+-
+-
+-LOCAL(void)
+-std_huff_tables (j_compress_ptr cinfo)
+-/* Set up the standard Huffman tables (cf. JPEG standard section K.3) */
+-/* IMPORTANT: these are only valid for 8-bit data precision! */
+-{
+- static const UINT8 bits_dc_luminance[17] =
+- { /* 0-base */ 0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 };
+- static const UINT8 val_dc_luminance[] =
+- { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
+-
+- static const UINT8 bits_dc_chrominance[17] =
+- { /* 0-base */ 0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 };
+- static const UINT8 val_dc_chrominance[] =
+- { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
+-
+- static const UINT8 bits_ac_luminance[17] =
+- { /* 0-base */ 0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 0x7d };
+- static const UINT8 val_ac_luminance[] =
+- { 0x01, 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12,
+- 0x21, 0x31, 0x41, 0x06, 0x13, 0x51, 0x61, 0x07,
+- 0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xa1, 0x08,
+- 0x23, 0x42, 0xb1, 0xc1, 0x15, 0x52, 0xd1, 0xf0,
+- 0x24, 0x33, 0x62, 0x72, 0x82, 0x09, 0x0a, 0x16,
+- 0x17, 0x18, 0x19, 0x1a, 0x25, 0x26, 0x27, 0x28,
+- 0x29, 0x2a, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39,
+- 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49,
+- 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59,
+- 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69,
+- 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79,
+- 0x7a, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89,
+- 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98,
+- 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
+- 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6,
+- 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, 0xc4, 0xc5,
+- 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2, 0xd3, 0xd4,
+- 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xe1, 0xe2,
+- 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea,
+- 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8,
+- 0xf9, 0xfa };
+-
+- static const UINT8 bits_ac_chrominance[17] =
+- { /* 0-base */ 0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 0x77 };
+- static const UINT8 val_ac_chrominance[] =
+- { 0x00, 0x01, 0x02, 0x03, 0x11, 0x04, 0x05, 0x21,
+- 0x31, 0x06, 0x12, 0x41, 0x51, 0x07, 0x61, 0x71,
+- 0x13, 0x22, 0x32, 0x81, 0x08, 0x14, 0x42, 0x91,
+- 0xa1, 0xb1, 0xc1, 0x09, 0x23, 0x33, 0x52, 0xf0,
+- 0x15, 0x62, 0x72, 0xd1, 0x0a, 0x16, 0x24, 0x34,
+- 0xe1, 0x25, 0xf1, 0x17, 0x18, 0x19, 0x1a, 0x26,
+- 0x27, 0x28, 0x29, 0x2a, 0x35, 0x36, 0x37, 0x38,
+- 0x39, 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48,
+- 0x49, 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58,
+- 0x59, 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,
+- 0x69, 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78,
+- 0x79, 0x7a, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
+- 0x88, 0x89, 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96,
+- 0x97, 0x98, 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5,
+- 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4,
+- 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3,
+- 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2,
+- 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda,
+- 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9,
+- 0xea, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8,
+- 0xf9, 0xfa };
+-
+- add_huff_table(cinfo, &cinfo->dc_huff_tbl_ptrs[0],
+- bits_dc_luminance, val_dc_luminance);
+- add_huff_table(cinfo, &cinfo->ac_huff_tbl_ptrs[0],
+- bits_ac_luminance, val_ac_luminance);
+- add_huff_table(cinfo, &cinfo->dc_huff_tbl_ptrs[1],
+- bits_dc_chrominance, val_dc_chrominance);
+- add_huff_table(cinfo, &cinfo->ac_huff_tbl_ptrs[1],
+- bits_ac_chrominance, val_ac_chrominance);
+-}
+-
+-
+-/*
+ * Default parameter setup for compression.
+ *
+ * Applications that don't choose to use this routine must do their
+@@ -313,7 +204,7 @@
+ /* Set up two quantization tables using default quality of 75 */
+ jpeg_set_quality(cinfo, 75, TRUE);
+ /* Set up two Huffman tables */
+- std_huff_tables(cinfo);
++ std_huff_tables((j_common_ptr) cinfo);
+
+ /* Initialize default arithmetic coding conditioning */
+ for (i = 0; i < NUM_ARITH_TBLS; i++) {
+Index: jstdhuff.c
+===================================================================
+--- jstdhuff.c (revision 0)
++++ jstdhuff.c (revision 1104)
+@@ -0,0 +1,133 @@
++/*
++* jstdhuff.c
++*
++* This file was part of the Independent JPEG Group's software:
++* Copyright (C) 1991-1998, Thomas G. Lane.
++* libjpeg-turbo Modifications:
++* Copyright (C) 2013, D. R. Commander.
++* For conditions of distribution and use, see the accompanying README file.
++*
++* This file contains routines to set the default Huffman tables, if they are
++* not already set.
++*/
++
++/*
++ * Huffman table setup routines
++ */
++
++LOCAL(void)
++add_huff_table (j_common_ptr cinfo,
++ JHUFF_TBL **htblptr, const UINT8 *bits, const UINT8 *val)
++/* Define a Huffman table */
++{
++ int nsymbols, len;
++
++ if (*htblptr == NULL)
++ *htblptr = jpeg_alloc_huff_table(cinfo);
++ else
++ return;
++
++ /* Copy the number-of-symbols-of-each-code-length counts */
++ MEMCOPY((*htblptr)->bits, bits, SIZEOF((*htblptr)->bits));
++
++ /* Validate the counts. We do this here mainly so we can copy the right
++ * number of symbols from the val[] array, without risking marching off
++ * the end of memory. jchuff.c will do a more thorough test later.
++ */
++ nsymbols = 0;
++ for (len = 1; len <= 16; len++)
++ nsymbols += bits[len];
++ if (nsymbols < 1 || nsymbols > 256)
++ ERREXIT(cinfo, JERR_BAD_HUFF_TABLE);
++
++ MEMCOPY((*htblptr)->huffval, val, nsymbols * SIZEOF(UINT8));
++
++ /* Initialize sent_table FALSE so table will be written to JPEG file. */
++ (*htblptr)->sent_table = FALSE;
++}
++
++
++LOCAL(void)
++std_huff_tables (j_common_ptr cinfo)
++/* Set up the standard Huffman tables (cf. JPEG standard section K.3) */
++/* IMPORTANT: these are only valid for 8-bit data precision! */
++{
++ JHUFF_TBL **dc_huff_tbl_ptrs, **ac_huff_tbl_ptrs;
++
++ static const UINT8 bits_dc_luminance[17] =
++ { /* 0-base */ 0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 };
++ static const UINT8 val_dc_luminance[] =
++ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
++
++ static const UINT8 bits_dc_chrominance[17] =
++ { /* 0-base */ 0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 };
++ static const UINT8 val_dc_chrominance[] =
++ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
++
++ static const UINT8 bits_ac_luminance[17] =
++ { /* 0-base */ 0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 0x7d };
++ static const UINT8 val_ac_luminance[] =
++ { 0x01, 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12,
++ 0x21, 0x31, 0x41, 0x06, 0x13, 0x51, 0x61, 0x07,
++ 0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xa1, 0x08,
++ 0x23, 0x42, 0xb1, 0xc1, 0x15, 0x52, 0xd1, 0xf0,
++ 0x24, 0x33, 0x62, 0x72, 0x82, 0x09, 0x0a, 0x16,
++ 0x17, 0x18, 0x19, 0x1a, 0x25, 0x26, 0x27, 0x28,
++ 0x29, 0x2a, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39,
++ 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49,
++ 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59,
++ 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69,
++ 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79,
++ 0x7a, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89,
++ 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98,
++ 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
++ 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6,
++ 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, 0xc4, 0xc5,
++ 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2, 0xd3, 0xd4,
++ 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xe1, 0xe2,
++ 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea,
++ 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8,
++ 0xf9, 0xfa };
++
++ static const UINT8 bits_ac_chrominance[17] =
++ { /* 0-base */ 0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 0x77 };
++ static const UINT8 val_ac_chrominance[] =
++ { 0x00, 0x01, 0x02, 0x03, 0x11, 0x04, 0x05, 0x21,
++ 0x31, 0x06, 0x12, 0x41, 0x51, 0x07, 0x61, 0x71,
++ 0x13, 0x22, 0x32, 0x81, 0x08, 0x14, 0x42, 0x91,
++ 0xa1, 0xb1, 0xc1, 0x09, 0x23, 0x33, 0x52, 0xf0,
++ 0x15, 0x62, 0x72, 0xd1, 0x0a, 0x16, 0x24, 0x34,
++ 0xe1, 0x25, 0xf1, 0x17, 0x18, 0x19, 0x1a, 0x26,
++ 0x27, 0x28, 0x29, 0x2a, 0x35, 0x36, 0x37, 0x38,
++ 0x39, 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48,
++ 0x49, 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58,
++ 0x59, 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,
++ 0x69, 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78,
++ 0x79, 0x7a, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
++ 0x88, 0x89, 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96,
++ 0x97, 0x98, 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5,
++ 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4,
++ 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3,
++ 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2,
++ 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda,
++ 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9,
++ 0xea, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8,
++ 0xf9, 0xfa };
++
++ if (cinfo->is_decompressor) {
++ dc_huff_tbl_ptrs = ((j_decompress_ptr)cinfo)->dc_huff_tbl_ptrs;
++ ac_huff_tbl_ptrs = ((j_decompress_ptr)cinfo)->ac_huff_tbl_ptrs;
++ } else {
++ dc_huff_tbl_ptrs = ((j_compress_ptr)cinfo)->dc_huff_tbl_ptrs;
++ ac_huff_tbl_ptrs = ((j_compress_ptr)cinfo)->ac_huff_tbl_ptrs;
++ }
++
++ add_huff_table(cinfo, &dc_huff_tbl_ptrs[0], bits_dc_luminance,
++ val_dc_luminance);
++ add_huff_table(cinfo, &ac_huff_tbl_ptrs[0], bits_ac_luminance,
++ val_ac_luminance);
++ add_huff_table(cinfo, &dc_huff_tbl_ptrs[1], bits_dc_chrominance,
++ val_dc_chrominance);
++ add_huff_table(cinfo, &ac_huff_tbl_ptrs[1], bits_ac_chrominance,
++ val_ac_chrominance);
++}
+Index: jdhuff.c
+===================================================================
+--- jdhuff.c (revision 1103)
++++ jdhuff.c (revision 1104)
+@@ -21,6 +21,7 @@
+ #include "jpeglib.h"
+ #include "jdhuff.h" /* Declarations shared with jdphuff.c */
+ #include "jpegcomp.h"
++#include "jstdhuff.c"
+
+
+ /*
+@@ -795,6 +796,12 @@
+ huff_entropy_ptr entropy;
+ int i;
+
++ /* Motion JPEG frames typically do not include the Huffman tables if they
++ are the default tables. Thus, if the tables are not set by the time
++ the Huffman decoder is initialized (usually within the body of
++ jpeg_start_decompress()), we set them to default values. */
++ std_huff_tables((j_common_ptr) cinfo);
++
+ entropy = (huff_entropy_ptr)
+ (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+ SIZEOF(huff_entropy_decoder));
diff --git a/media-libs/libjpeg-turbo/files/libjpeg-turbo-1.3.1-overrun.patch b/media-libs/libjpeg-turbo/files/libjpeg-turbo-1.3.1-overrun.patch
new file mode 100644
index 000000000000..92f48c38adae
--- /dev/null
+++ b/media-libs/libjpeg-turbo/files/libjpeg-turbo-1.3.1-overrun.patch
@@ -0,0 +1,21 @@
+diff -Naur old/jchuff.c new/jchuff.c
+--- old/jchuff.c 2014-11-27 06:48:21.009442853 -1000
++++ new/jchuff.c 2014-11-27 06:48:46.289700004 -1000
+@@ -391,7 +391,16 @@
+ #endif
+
+
+-#define BUFSIZE (DCTSIZE2 * 2)
++/* Although it is exceedingly rare, it is possible for a Huffman-encoded
++ * coefficient block to be larger than the 128-byte unencoded block. For each
++ * of the 64 coefficients, PUT_BITS is invoked twice, and each invocation can
++ * theoretically store 16 bits (for a maximum of 2048 bits or 256 bytes per
++ * encoded block.) If, for instance, one artificially sets the AC
++ * coefficients to alternating values of 32767 and -32768 (using the JPEG
++ * scanning order-- 1, 8, 16, etc.), then this will produce an encoded block
++ * larger than 200 bytes.
++ */
++#define BUFSIZE (DCTSIZE2 * 4)
+
+ #define LOAD_BUFFER() { \
+ if (state->free_in_buffer < BUFSIZE) { \
diff --git a/media-libs/libjpeg-turbo/libjpeg-turbo-1.3.0-r3.ebuild b/media-libs/libjpeg-turbo/libjpeg-turbo-1.3.0-r3.ebuild
new file mode 100644
index 000000000000..d8cf7c7d1f4e
--- /dev/null
+++ b/media-libs/libjpeg-turbo/libjpeg-turbo-1.3.0-r3.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils java-pkg-opt-2 libtool toolchain-funcs multilib-minimal
+
+DESCRIPTION="MMX, SSE, and SSE2 SIMD accelerated JPEG library"
+HOMEPAGE="http://libjpeg-turbo.virtualgl.org/ http://sourceforge.net/projects/libjpeg-turbo/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz
+ mirror://debian/pool/main/libj/libjpeg8/libjpeg8_8d-1.debian.tar.gz"
+
+LICENSE="BSD IJG"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~x64-macos ~x86-macos"
+IUSE="java static-libs"
+
+ASM_DEPEND="|| ( dev-lang/nasm dev-lang/yasm )"
+COMMON_DEPEND="!media-libs/jpeg:0
+ !media-libs/jpeg:62
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r5
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
+RDEPEND="${COMMON_DEPEND}
+ java? ( >=virtual/jre-1.5 )"
+DEPEND="${COMMON_DEPEND}
+ amd64? ( ${ASM_DEPEND} )
+ x86? ( ${ASM_DEPEND} )
+ amd64-fbsd? ( ${ASM_DEPEND} )
+ x86-fbsd? ( ${ASM_DEPEND} )
+ amd64-linux? ( ${ASM_DEPEND} )
+ x86-linux? ( ${ASM_DEPEND} )
+ x64-macos? ( ${ASM_DEPEND} )
+ java? ( >=virtual/jdk-1.5 )"
+
+MULTILIB_WRAPPED_HEADERS=( /usr/include/jconfig.h )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.2.0-x32.patch #420239
+ epatch "${FILESDIR}"/${P}-CVE-2013-6629-and-6630.patch
+
+ if [[ -x ./configure ]]; then
+ elibtoolize
+ else
+ eautoreconf
+ fi
+
+ epunt_cxx #424689
+
+ java-pkg-opt-2_src_prepare
+}
+
+multilib_src_configure() {
+ local myconf=()
+ if multilib_is_native_abi; then
+ myconf+=( $(use_with java) )
+ if use java; then
+ export JAVACFLAGS="$(java-pkg_javac-args)"
+ export JNI_CFLAGS="$(java-pkg_get-jni-cflags)"
+ fi
+ else
+ myconf+=( --without-java )
+ fi
+ [[ ${ABI} == "x32" ]] && myconf+=( --without-simd ) #420239
+
+ ECONF_SOURCE=${S} \
+ econf \
+ $(use_enable static-libs static) \
+ --with-mem-srcdst \
+ "${myconf[@]}"
+}
+
+multilib_src_compile() {
+ local _java_makeopts
+ use java && _java_makeopts="-j1"
+ emake ${_java_makeopts}
+
+ if multilib_is_native_abi; then
+ pushd ../debian/extra >/dev/null
+ emake CC="$(tc-getCC)" CFLAGS="${LDFLAGS} ${CFLAGS}"
+ popd >/dev/null
+ fi
+}
+
+multilib_src_test() {
+ emake test
+}
+
+multilib_src_install() {
+ emake \
+ DESTDIR="${D}" \
+ docdir="${EPREFIX}"/usr/share/doc/${PF} \
+ exampledir="${EPREFIX}"/usr/share/doc/${PF} \
+ install
+
+ if multilib_is_native_abi; then
+ pushd "${WORKDIR}"/debian/extra >/dev/null
+ emake \
+ DESTDIR="${D}" prefix="${EPREFIX}"/usr \
+ INSTALL="install -m755" INSTALLDIR="install -d -m755" \
+ install
+ popd >/dev/null
+
+ if use java; then
+ rm -rf "${ED}"/usr/classes
+ java-pkg_dojar java/turbojpeg.jar
+ fi
+ fi
+}
+
+multilib_src_install_all() {
+ prune_libtool_files
+
+ insinto /usr/share/doc/${PF}/html
+ doins -r "${S}"/doc/html/*
+ newdoc "${WORKDIR}"/debian/changelog changelog.debian
+ if use java; then
+ insinto /usr/share/doc/${PF}/html/java
+ doins -r "${S}"/java/doc/*
+ newdoc "${S}"/java/README README.java
+ fi
+}
diff --git a/media-libs/libjpeg-turbo/libjpeg-turbo-1.3.1-r1.ebuild b/media-libs/libjpeg-turbo/libjpeg-turbo-1.3.1-r1.ebuild
new file mode 100644
index 000000000000..5c5d52aad793
--- /dev/null
+++ b/media-libs/libjpeg-turbo/libjpeg-turbo-1.3.1-r1.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 autotools eutils java-pkg-opt-2 libtool toolchain-funcs multilib-minimal
+
+DESCRIPTION="MMX, SSE, and SSE2 SIMD accelerated JPEG library"
+HOMEPAGE="http://libjpeg-turbo.virtualgl.org/ http://sourceforge.net/projects/libjpeg-turbo/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz
+ mirror://debian/pool/main/libj/libjpeg8/libjpeg8_8d-2.debian.tar.gz"
+
+LICENSE="BSD IJG"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~x64-macos ~x86-macos"
+IUSE="java static-libs"
+
+ASM_DEPEND="|| ( dev-lang/nasm dev-lang/yasm )"
+COMMON_DEPEND="!media-libs/jpeg:0
+ !media-libs/jpeg:62
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r5
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
+RDEPEND="${COMMON_DEPEND}
+ java? ( >=virtual/jre-1.5 )"
+DEPEND="${COMMON_DEPEND}
+ amd64? ( ${ASM_DEPEND} )
+ x86? ( ${ASM_DEPEND} )
+ amd64-fbsd? ( ${ASM_DEPEND} )
+ x86-fbsd? ( ${ASM_DEPEND} )
+ amd64-linux? ( ${ASM_DEPEND} )
+ x86-linux? ( ${ASM_DEPEND} )
+ x64-macos? ( ${ASM_DEPEND} )
+ java? ( >=virtual/jdk-1.5 )"
+
+MULTILIB_WRAPPED_HEADERS=( /usr/include/jconfig.h )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.2.0-x32.patch #420239
+ epatch "${FILESDIR}"/${PN}-1.3.1-jstdhuff.patch
+ epatch "${FILESDIR}"/${PN}-1.3.1-overrun.patch
+
+ # generate a new ./configure compatible with non-bash shells, #533902
+ eautoreconf
+
+ java-pkg-opt-2_src_prepare
+}
+
+multilib_src_configure() {
+ local myconf=()
+ if multilib_is_native_abi; then
+ myconf+=( $(use_with java) )
+ if use java; then
+ export JAVACFLAGS="$(java-pkg_javac-args)"
+ export JNI_CFLAGS="$(java-pkg_get-jni-cflags)"
+ fi
+ else
+ myconf+=( --without-java )
+ fi
+ [[ ${ABI} == "x32" ]] && myconf+=( --without-simd ) #420239
+
+ ECONF_SOURCE=${S} \
+ econf \
+ $(use_enable static-libs static) \
+ --with-mem-srcdst \
+ "${myconf[@]}"
+}
+
+multilib_src_compile() {
+ local _java_makeopts
+ use java && _java_makeopts="-j1"
+ emake ${_java_makeopts}
+
+ if multilib_is_native_abi; then
+ pushd ../debian/extra >/dev/null
+ emake CC="$(tc-getCC)" CFLAGS="${LDFLAGS} ${CFLAGS}"
+ popd >/dev/null
+ fi
+}
+
+multilib_src_test() {
+ emake test
+}
+
+multilib_src_install() {
+ emake \
+ DESTDIR="${D}" \
+ docdir="${EPREFIX}"/usr/share/doc/${PF} \
+ exampledir="${EPREFIX}"/usr/share/doc/${PF} \
+ install
+
+ if multilib_is_native_abi; then
+ pushd "${WORKDIR}"/debian/extra >/dev/null
+ emake \
+ DESTDIR="${D}" prefix="${EPREFIX}"/usr \
+ INSTALL="install -m755" INSTALLDIR="install -d -m755" \
+ install
+ popd >/dev/null
+
+ if use java; then
+ rm -rf "${ED}"/usr/classes
+ java-pkg_dojar java/turbojpeg.jar
+ fi
+ fi
+}
+
+multilib_src_install_all() {
+ prune_libtool_files
+
+ insinto /usr/share/doc/${PF}/html
+ doins -r "${S}"/doc/html/*
+ newdoc "${WORKDIR}"/debian/changelog changelog.debian
+ if use java; then
+ insinto /usr/share/doc/${PF}/html/java
+ doins -r "${S}"/java/doc/*
+ newdoc "${S}"/java/README README.java
+ fi
+}
diff --git a/media-libs/libjpeg-turbo/libjpeg-turbo-1.3.1.ebuild b/media-libs/libjpeg-turbo/libjpeg-turbo-1.3.1.ebuild
new file mode 100644
index 000000000000..dc1e2bdd6b0b
--- /dev/null
+++ b/media-libs/libjpeg-turbo/libjpeg-turbo-1.3.1.ebuild
@@ -0,0 +1,121 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils java-pkg-opt-2 libtool toolchain-funcs multilib-minimal
+
+DESCRIPTION="MMX, SSE, and SSE2 SIMD accelerated JPEG library"
+HOMEPAGE="http://libjpeg-turbo.virtualgl.org/ http://sourceforge.net/projects/libjpeg-turbo/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz
+ mirror://debian/pool/main/libj/libjpeg8/libjpeg8_8d-2.debian.tar.gz"
+
+LICENSE="BSD IJG"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~x64-macos ~x86-macos"
+IUSE="java static-libs"
+
+ASM_DEPEND="|| ( dev-lang/nasm dev-lang/yasm )"
+COMMON_DEPEND="!media-libs/jpeg:0
+ !media-libs/jpeg:62
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r5
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
+RDEPEND="${COMMON_DEPEND}
+ java? ( >=virtual/jre-1.5 )"
+DEPEND="${COMMON_DEPEND}
+ amd64? ( ${ASM_DEPEND} )
+ x86? ( ${ASM_DEPEND} )
+ amd64-fbsd? ( ${ASM_DEPEND} )
+ x86-fbsd? ( ${ASM_DEPEND} )
+ amd64-linux? ( ${ASM_DEPEND} )
+ x86-linux? ( ${ASM_DEPEND} )
+ x64-macos? ( ${ASM_DEPEND} )
+ java? ( >=virtual/jdk-1.5 )"
+
+MULTILIB_WRAPPED_HEADERS=( /usr/include/jconfig.h )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.2.0-x32.patch #420239
+
+ if [[ -x ./configure ]]; then
+ elibtoolize
+ else
+ eautoreconf
+ fi
+
+ epunt_cxx #424689
+
+ java-pkg-opt-2_src_prepare
+}
+
+multilib_src_configure() {
+ local myconf=()
+ if multilib_is_native_abi; then
+ myconf+=( $(use_with java) )
+ if use java; then
+ export JAVACFLAGS="$(java-pkg_javac-args)"
+ export JNI_CFLAGS="$(java-pkg_get-jni-cflags)"
+ fi
+ else
+ myconf+=( --without-java )
+ fi
+ [[ ${ABI} == "x32" ]] && myconf+=( --without-simd ) #420239
+
+ ECONF_SOURCE=${S} \
+ econf \
+ $(use_enable static-libs static) \
+ --with-mem-srcdst \
+ "${myconf[@]}"
+}
+
+multilib_src_compile() {
+ local _java_makeopts
+ use java && _java_makeopts="-j1"
+ emake ${_java_makeopts}
+
+ if multilib_is_native_abi; then
+ pushd ../debian/extra >/dev/null
+ emake CC="$(tc-getCC)" CFLAGS="${LDFLAGS} ${CFLAGS}"
+ popd >/dev/null
+ fi
+}
+
+multilib_src_test() {
+ emake test
+}
+
+multilib_src_install() {
+ emake \
+ DESTDIR="${D}" \
+ docdir="${EPREFIX}"/usr/share/doc/${PF} \
+ exampledir="${EPREFIX}"/usr/share/doc/${PF} \
+ install
+
+ if multilib_is_native_abi; then
+ pushd "${WORKDIR}"/debian/extra >/dev/null
+ emake \
+ DESTDIR="${D}" prefix="${EPREFIX}"/usr \
+ INSTALL="install -m755" INSTALLDIR="install -d -m755" \
+ install
+ popd >/dev/null
+
+ if use java; then
+ rm -rf "${ED}"/usr/classes
+ java-pkg_dojar java/turbojpeg.jar
+ fi
+ fi
+}
+
+multilib_src_install_all() {
+ prune_libtool_files
+
+ insinto /usr/share/doc/${PF}/html
+ doins -r "${S}"/doc/html/*
+ newdoc "${WORKDIR}"/debian/changelog changelog.debian
+ if use java; then
+ insinto /usr/share/doc/${PF}/html/java
+ doins -r "${S}"/java/doc/*
+ newdoc "${S}"/java/README README.java
+ fi
+}
diff --git a/media-libs/libjpeg-turbo/libjpeg-turbo-1.4.0.ebuild b/media-libs/libjpeg-turbo/libjpeg-turbo-1.4.0.ebuild
new file mode 100644
index 000000000000..537318b84738
--- /dev/null
+++ b/media-libs/libjpeg-turbo/libjpeg-turbo-1.4.0.ebuild
@@ -0,0 +1,116 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils java-pkg-opt-2 libtool toolchain-funcs multilib-minimal
+
+DESCRIPTION="MMX, SSE, and SSE2 SIMD accelerated JPEG library"
+HOMEPAGE="http://libjpeg-turbo.virtualgl.org/ http://sourceforge.net/projects/libjpeg-turbo/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz
+ mirror://gentoo/libjpeg8_8d-2.debian.tar.gz"
+
+LICENSE="BSD IJG"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~x64-macos ~x86-macos"
+IUSE="java static-libs"
+
+ASM_DEPEND="|| ( dev-lang/nasm dev-lang/yasm )"
+COMMON_DEPEND="!media-libs/jpeg:0
+ !media-libs/jpeg:62
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r5
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
+RDEPEND="${COMMON_DEPEND}
+ java? ( >=virtual/jre-1.5 )"
+DEPEND="${COMMON_DEPEND}
+ amd64? ( ${ASM_DEPEND} )
+ x86? ( ${ASM_DEPEND} )
+ amd64-fbsd? ( ${ASM_DEPEND} )
+ x86-fbsd? ( ${ASM_DEPEND} )
+ amd64-linux? ( ${ASM_DEPEND} )
+ x86-linux? ( ${ASM_DEPEND} )
+ x64-macos? ( ${ASM_DEPEND} )
+ java? ( >=virtual/jdk-1.5 )"
+
+MULTILIB_WRAPPED_HEADERS=( /usr/include/jconfig.h )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.2.0-x32.patch #420239
+
+ # generate a new ./configure compatible with non-bash shells, #533902
+ eautoreconf
+
+ java-pkg-opt-2_src_prepare
+}
+
+multilib_src_configure() {
+ local myconf=()
+ if multilib_is_native_abi; then
+ myconf+=( $(use_with java) )
+ if use java; then
+ export JAVACFLAGS="$(java-pkg_javac-args)"
+ export JNI_CFLAGS="$(java-pkg_get-jni-cflags)"
+ fi
+ else
+ myconf+=( --without-java )
+ fi
+ [[ ${ABI} == "x32" ]] && myconf+=( --without-simd ) #420239
+
+ ECONF_SOURCE=${S} \
+ econf \
+ $(use_enable static-libs static) \
+ --with-mem-srcdst \
+ "${myconf[@]}"
+}
+
+multilib_src_compile() {
+ local _java_makeopts
+ use java && _java_makeopts="-j1"
+ emake ${_java_makeopts}
+
+ if multilib_is_native_abi; then
+ pushd ../debian/extra >/dev/null
+ emake CC="$(tc-getCC)" CFLAGS="${LDFLAGS} ${CFLAGS}"
+ popd >/dev/null
+ fi
+}
+
+multilib_src_test() {
+ emake test
+}
+
+multilib_src_install() {
+ emake \
+ DESTDIR="${D}" \
+ docdir="${EPREFIX}"/usr/share/doc/${PF} \
+ exampledir="${EPREFIX}"/usr/share/doc/${PF} \
+ install
+
+ if multilib_is_native_abi; then
+ pushd "${WORKDIR}"/debian/extra >/dev/null
+ emake \
+ DESTDIR="${D}" prefix="${EPREFIX}"/usr \
+ INSTALL="install -m755" INSTALLDIR="install -d -m755" \
+ install
+ popd >/dev/null
+
+ if use java; then
+ rm -rf "${ED}"/usr/classes
+ java-pkg_dojar java/turbojpeg.jar
+ fi
+ fi
+}
+
+multilib_src_install_all() {
+ prune_libtool_files
+
+ insinto /usr/share/doc/${PF}/html
+ doins -r "${S}"/doc/html/*
+ newdoc "${WORKDIR}"/debian/changelog changelog.debian
+ if use java; then
+ insinto /usr/share/doc/${PF}/html/java
+ doins -r "${S}"/java/doc/*
+ newdoc "${S}"/java/README README.java
+ fi
+}
diff --git a/media-libs/libjpeg-turbo/libjpeg-turbo-1.4.1.ebuild b/media-libs/libjpeg-turbo/libjpeg-turbo-1.4.1.ebuild
new file mode 100644
index 000000000000..d473c175f8b9
--- /dev/null
+++ b/media-libs/libjpeg-turbo/libjpeg-turbo-1.4.1.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 libtool eutils java-pkg-opt-2 libtool toolchain-funcs multilib-minimal
+
+DESCRIPTION="MMX, SSE, and SSE2 SIMD accelerated JPEG library"
+HOMEPAGE="http://libjpeg-turbo.virtualgl.org/ http://sourceforge.net/projects/libjpeg-turbo/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz
+ mirror://gentoo/libjpeg8_8d-2.debian.tar.gz"
+
+LICENSE="BSD IJG"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~x64-macos ~x86-macos"
+IUSE="java static-libs"
+
+ASM_DEPEND="|| ( dev-lang/nasm dev-lang/yasm )"
+COMMON_DEPEND="!media-libs/jpeg:0
+ !media-libs/jpeg:62
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r5
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
+RDEPEND="${COMMON_DEPEND}
+ java? ( >=virtual/jre-1.5 )"
+DEPEND="${COMMON_DEPEND}
+ amd64? ( ${ASM_DEPEND} )
+ x86? ( ${ASM_DEPEND} )
+ amd64-fbsd? ( ${ASM_DEPEND} )
+ x86-fbsd? ( ${ASM_DEPEND} )
+ amd64-linux? ( ${ASM_DEPEND} )
+ x86-linux? ( ${ASM_DEPEND} )
+ x64-macos? ( ${ASM_DEPEND} )
+ java? ( >=virtual/jdk-1.5 )"
+
+MULTILIB_WRAPPED_HEADERS=( /usr/include/jconfig.h )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.2.0-x32.patch #420239
+
+ elibtoolize
+
+ java-pkg-opt-2_src_prepare
+}
+
+multilib_src_configure() {
+ local myconf=()
+ if multilib_is_native_abi; then
+ myconf+=( $(use_with java) )
+ if use java; then
+ export JAVACFLAGS="$(java-pkg_javac-args)"
+ export JNI_CFLAGS="$(java-pkg_get-jni-cflags)"
+ fi
+ else
+ myconf+=( --without-java )
+ fi
+ [[ ${ABI} == "x32" ]] && myconf+=( --without-simd ) #420239
+
+ # Force /bin/bash until upstream generates a new version. #533902
+ CONFIG_SHELL=/bin/bash \
+ ECONF_SOURCE=${S} \
+ econf \
+ $(use_enable static-libs static) \
+ --with-mem-srcdst \
+ "${myconf[@]}"
+}
+
+multilib_src_compile() {
+ local _java_makeopts
+ use java && _java_makeopts="-j1"
+ emake ${_java_makeopts}
+
+ if multilib_is_native_abi; then
+ pushd ../debian/extra >/dev/null
+ emake CC="$(tc-getCC)" CFLAGS="${LDFLAGS} ${CFLAGS}"
+ popd >/dev/null
+ fi
+}
+
+multilib_src_test() {
+ emake test
+}
+
+multilib_src_install() {
+ emake \
+ DESTDIR="${D}" \
+ docdir="${EPREFIX}"/usr/share/doc/${PF} \
+ exampledir="${EPREFIX}"/usr/share/doc/${PF} \
+ install
+
+ if multilib_is_native_abi; then
+ pushd "${WORKDIR}"/debian/extra >/dev/null
+ emake \
+ DESTDIR="${D}" prefix="${EPREFIX}"/usr \
+ INSTALL="install -m755" INSTALLDIR="install -d -m755" \
+ install
+ popd >/dev/null
+
+ if use java; then
+ rm -rf "${ED}"/usr/classes
+ java-pkg_dojar java/turbojpeg.jar
+ fi
+ fi
+}
+
+multilib_src_install_all() {
+ prune_libtool_files
+
+ insinto /usr/share/doc/${PF}/html
+ doins -r "${S}"/doc/html/*
+ newdoc "${WORKDIR}"/debian/changelog changelog.debian
+ if use java; then
+ insinto /usr/share/doc/${PF}/html/java
+ doins -r "${S}"/java/doc/*
+ newdoc "${S}"/java/README README.java
+ fi
+}
diff --git a/media-libs/libjpeg-turbo/metadata.xml b/media-libs/libjpeg-turbo/metadata.xml
new file mode 100644
index 000000000000..0ca0b0e3817c
--- /dev/null
+++ b/media-libs/libjpeg-turbo/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>graphics</herd>
+ <maintainer>
+ <email>ssuominen@gentoo.org</email>
+ <name>Samuli Suominen</name>
+ </maintainer>
+ <maintainer>
+ <email>anarchy@gentoo.org</email>
+ <name>Jory A. Pratt</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">libjpeg-turbo</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libjsw/Manifest b/media-libs/libjsw/Manifest
new file mode 100644
index 000000000000..fe84100377e2
--- /dev/null
+++ b/media-libs/libjsw/Manifest
@@ -0,0 +1 @@
+DIST libjsw-1.5.8.tar.bz2 348121 SHA256 082461dbf67efbd7e682b0675b0ced36430c5b1abc152c977e41b98de68fc811 SHA512 b858ed124366bd2df6710c07d82a447cc7227f1e442b3a3652d50734d97edef45b42b5a8bf84d4675c0130ab4da080a8409bfb6e1c80cb747930ac431dbf1226 WHIRLPOOL d85de409b805e64acf1433a4cd872e5816e95ed4e4f39825e2fa91d5e2ebb07037f78e67a27ad785fd5ecab04ceeef8f37cdfe3a11e1ea01f435838f53e896a1
diff --git a/media-libs/libjsw/files/libjsw-1.5.8-build.patch b/media-libs/libjsw/files/libjsw-1.5.8-build.patch
new file mode 100644
index 000000000000..d786195058c1
--- /dev/null
+++ b/media-libs/libjsw/files/libjsw-1.5.8-build.patch
@@ -0,0 +1,110 @@
+--- libjsw/Makefile.old 2010-03-22 17:03:21.000000000 +0100
++++ libjsw/Makefile 2010-03-22 17:07:02.000000000 +0100
+@@ -51,10 +51,10 @@
+ # to debug the program.
+ #
+
+-CFLAGS = -Wall -O2 -g
+-CFLAGS += -ffast-math
++CFLAGS += -fPIC
++CXXFLAGS += -fPIC
+
+-CPPFLAGS = -D__cplusplus
++CPPFLAGS += -D__cplusplus
+
+
+ # ########################################################################
+@@ -82,11 +82,9 @@
+ OBJ_C = $(SRC_C:.c=.o)
+ OBJ_CPP = $(SRC_CPP:.cpp=.o)
+ .c.o:
+- @echo "Compiling module $*.o"
+- @+$(CC) -c $*.c $(INC_DIRS) $(CFLAGS)
++ $(CC) -c $*.c $(INC_DIRS) $(CFLAGS)
+ .cpp.o:
+- @echo "Compiling module $*.o"
+- @+$(CPP) -c $*.cpp $(INC_DIRS) $(CFLAGS) $(CPPFLAGS)
++ $(CPP) -c $*.cpp $(INC_DIRS) $(CXXFLAGS) $(CPPFLAGS)
+
+
+ # ########################################################################
+@@ -95,13 +93,7 @@
+ $(LIB): prebuild modules postbuild
+
+ modules: $(OBJ_C) $(OBJ_CPP)
+- @echo -n "Linking modules..."
+- @$(CC) $(OBJ_C) $(OBJ_CPP) -Wl,-soname=$(LIB) -shared -o $(LIB) $(LIBS) $(LIB_DIRS)
+- @echo -n " "
+- @$(RM) $(RMFLAGS) $(LIBPFX).so
+- @$(LINK) -s $(LIB) $(LIBPFX).so
+- @$(LINK) -s $(LIB) $(LIBPFX).so.1
+- @-$(LS) $(LSFLAGS) $(LIB)
++ $(CPP) $(OBJ_C) $(OBJ_CPP) -o $(LIB) $(LDFLAGS) $(LIBS) $(LIB_DIRS)
+
+ prebuild:
+ @echo "Building library \"$(LIB)\"..."
+--- jscalibrator/Makefile.old 2010-03-22 17:08:07.000000000 +0100
++++ jscalibrator/Makefile 2010-03-22 17:11:26.000000000 +0100
+@@ -59,9 +59,6 @@
+ #CFLAGS = -Wall -O -g \
+ # `gtk-config --cflags`
+
+-CFLAGS = -Wall -O6 -fomit-frame-pointer -funroll-loops -ffast-math \
+- `gtk-config --cflags`
+-
+ CPPFLAGS = -D__cplusplus
+
+
+@@ -76,7 +73,7 @@
+ # to the LIB line depending on what you have set in the CFLAGS line
+ # farther above.
+ #
+-LIBS = -ljsw `gtk-config --libs`
++LIBS := -ljsw $(shell gtk-config --libs)
+
+ # Library Directories:
+ #
+@@ -85,7 +82,7 @@
+ # Each argument is of the format -L<dir> where <dir> is the full
+ # path to the directory.
+ #
+-LIB_DIRS =
++LIB_DIRS = -L../libjsw
+
+ # Header File Directories:
+ #
+@@ -95,7 +92,7 @@
+ # Each argument is of the format -I<dir> where <dir> is the full
+ # path to the directory.
+ #
+-INC_DIRS =
++INC_DIRS = $(shell gtk-config --cflags) -I../libjsw
+
+
+ # ########################################################################
+@@ -117,11 +114,9 @@
+ OBJ_C = $(SRC_C:.c=.o)
+ OBJ_CPP = $(SRC_CPP:.cpp=.o)
+ .c.o:
+- @echo "Compiling module $*.o"
+- @+$(CC) -c $*.c $(INC_DIRS) $(CFLAGS)
++ $(CC) -c $*.c $(INC_DIRS) $(CFLAGS)
+ .cpp.o:
+- @echo "Compiling module $*.o"
+- @+$(CPP) -c $*.cpp $(INC_DIRS) $(CFLAGS) $(CPPFLAGS)
++ $(CPP) -c $*.cpp $(INC_DIRS) $(CXXFLAGS) $(CPPFLAGS)
+
+
+ # ########################################################################
+@@ -130,10 +125,7 @@
+ $(BIN): prebuild modules postbuild
+
+ modules: $(OBJ_C) $(OBJ_CPP)
+- @echo -n "Linking modules..."
+- @$(CC) $(OBJ_C) $(OBJ_CPP) -o $(BIN) $(LIBS) $(LIB_DIRS)
+- @echo -n " "
+- @-$(LS) $(LSFLAGS) $(BIN)
++ $(CC) $(OBJ_C) $(OBJ_CPP) -o $(BIN) $(LDFLAGS) $(LIB_DIRS) $(LIBS)
+
+ prebuild:
+ @echo "Building program \"$(BIN)\"..."
diff --git a/media-libs/libjsw/libjsw-1.5.8.ebuild b/media-libs/libjsw/libjsw-1.5.8.ebuild
new file mode 100644
index 000000000000..9816860e3b8e
--- /dev/null
+++ b/media-libs/libjsw/libjsw-1.5.8.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils multilib
+
+DESCRIPTION="provide a uniform API and user configuration for joysticks and game controllers"
+HOMEPAGE="http://freshmeat.net/projects/libjsw/"
+SRC_URI="http://wolfsinger.com/~wolfpack/packages/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ~ppc64 x86"
+IUSE=""
+
+DEPEND=""
+
+src_prepare() {
+ cp include/jsw.h libjsw/
+ epatch "${FILESDIR}"/${P}-build.patch
+ bunzip2 libjsw/man/* || die
+}
+
+src_compile() {
+ LDFLAGS+=" -Wl,-soname,libjsw.so.1"
+ cd libjsw
+ emake
+ ln -s libjsw.so.${PV} libjsw.so
+}
+
+src_install() {
+ insinto /usr/include
+ doins include/jsw.h
+
+ dodoc README
+ docinto jswdemos
+ dodoc jswdemos/*
+
+ cd "${S}"/libjsw
+ dolib.so libjsw.so.${PV}
+ dosym libjsw.so.${PV} /usr/$(get_libdir)/libjsw.so
+ dosym libjsw.so.${PV} /usr/$(get_libdir)/libjsw.so.1
+ doman man/*
+}
diff --git a/media-libs/libjsw/metadata.xml b/media-libs/libjsw/metadata.xml
new file mode 100644
index 000000000000..a57a2b839230
--- /dev/null
+++ b/media-libs/libjsw/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>games</herd>
+ <upstream>
+ <remote-id type="freshmeat">libjsw</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libkarma/Manifest b/media-libs/libkarma/Manifest
new file mode 100644
index 000000000000..d2510eb8f0a6
--- /dev/null
+++ b/media-libs/libkarma/Manifest
@@ -0,0 +1 @@
+DIST libkarma-0.1.2.tar.gz 81447 SHA256 27281bab00fe11f0416b5b8728f95bcfa738292976e34511826cca8aa4f84223
diff --git a/media-libs/libkarma/files/libkarma-0.1.0-ldflags.patch b/media-libs/libkarma/files/libkarma-0.1.0-ldflags.patch
new file mode 100644
index 000000000000..b2e14e4ecadd
--- /dev/null
+++ b/media-libs/libkarma/files/libkarma-0.1.0-ldflags.patch
@@ -0,0 +1,11 @@
+--- tools/Makefile~ 2007-05-15 18:29:02.000000000 +0200
++++ tools/Makefile 2010-09-12 14:31:31.000000000 +0200
+@@ -40,7 +40,7 @@
+ $(CC) $(INCLUDES) $(LDFLAGS) $(CFLAGS) $@.c -o $@ $(LKARMA)
+
+ karma_helper: karma_helper.c
+- $(CC) $(INCLUDES) $(CFLAGS) $@.c -o $@ -lusb
++ $(CC) $(INCLUDES) $(LDFLAGS) $(CFLAGS) $@.c -o $@ -lusb
+
+ install:
+ ../install-sh -m 0755 -d $(DEST)/bin
diff --git a/media-libs/libkarma/libkarma-0.1.2.ebuild b/media-libs/libkarma/libkarma-0.1.2.ebuild
new file mode 100644
index 000000000000..48c6667c41d6
--- /dev/null
+++ b/media-libs/libkarma/libkarma-0.1.2.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+inherit eutils mono toolchain-funcs
+
+DESCRIPTION="Support library for using Rio devices with mtp"
+HOMEPAGE="http://www.freakysoft.de/libkarma/"
+SRC_URI="http://www.freakysoft.de/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+RDEPEND="virtual/libiconv
+ media-libs/taglib
+ dev-lang/mono
+ virtual/libusb:0"
+DEPEND="${RDEPEND}"
+
+MAKEOPTS="${MAKEOPTS} -j1"
+
+src_prepare() {
+ # Make this respect LDFLAGS, bug #336151
+ epatch "${FILESDIR}"/${PN}-0.1.0-ldflags.patch
+}
+
+src_compile() {
+ tc-export AR CC RANLIB
+ emake all
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc THANKS TODO
+ mono_multilib_comply
+}
diff --git a/media-libs/libkarma/metadata.xml b/media-libs/libkarma/metadata.xml
new file mode 100644
index 000000000000..dd3b4caeeb08
--- /dev/null
+++ b/media-libs/libkarma/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>dotnet</herd>
+ <herd>sound</herd>
+</pkgmetadata>
diff --git a/media-libs/libkate/Manifest b/media-libs/libkate/Manifest
new file mode 100644
index 000000000000..e4ec87f82b47
--- /dev/null
+++ b/media-libs/libkate/Manifest
@@ -0,0 +1,3 @@
+DIST libkate-0.3.7.tar.gz 728239 SHA256 b9af203bb731de961807ad13820911fab57230d42da877336cf98c12c11c3c51 SHA512 4a9f123c271ac8e4df12ea0205160418fb9312a428894f18c8219c1f6569de1bd6ef233972ae3d2ee8ed25bb75a3c8868834ed945b308b0dbf469433c384f16b WHIRLPOOL 1aeaadb42509687159ddf70cbc5b699f92cfb535ba6304718960595afe539ee3946026fd6cb31bac922d7fc9172def8f23058e5225982d27d8da9ab09f15d66e
+DIST libkate-0.3.8.tar.gz 745633 SHA256 56e8990f44a8494d61437e825279f4c7c49d093d2b258cd64a8a86f18229a601 SHA512 d5bfcfa66423f4859490c7c03f4b40dcc4f092801cc16d586648da8af1e50d3f78e0f2568bb05d335ac33a061a49faa7b930633c84cb5626998855dd6f34f7d8 WHIRLPOOL f632853f4043ca50978329dac5f3fb0b7c9bf7eab4abad99a0113cec5aab2917311358868a0cc159863839545cc9cdb727ece45c3de0dab6de6c238b04b81889
+DIST libkate-0.4.1.tar.gz 906896 SHA256 c40e81d5866c3d4bf744e76ce0068d8f388f0e25f7e258ce0c8e76d7adc87b68 SHA512 2635237753abc0f6c43fc07bd0ecc57c2f3c893efa6c62ad08de9191045612477302ed45acd61cdfea7447efd654ebbe0ed2d6a2cbf867eb834581d7ee43377b WHIRLPOOL 8693527ea8680eded864aae49df840e2071eee434391f828b07224b4af279df0fbc6744af6be8a435aad5cdfb3124df10170bcead7b20a6d63ee3dacb1f28d1c
diff --git a/media-libs/libkate/files/libkate-0.3.7-libpng14.patch b/media-libs/libkate/files/libkate-0.3.7-libpng14.patch
new file mode 100644
index 000000000000..e93ac757b1e6
--- /dev/null
+++ b/media-libs/libkate/files/libkate-0.3.7-libpng14.patch
@@ -0,0 +1,38 @@
+http://code.google.com/p/libkate/issues/detail?id=15
+
+--- tools/kpng.c
++++ tools/kpng.c
+@@ -179,13 +179,13 @@
+ }
+ }
+
+- png_destroy_read_struct(&png_ptr,&info_ptr,png_infopp_NULL);
++ png_destroy_read_struct(&png_ptr,&info_ptr,NULL);
+ fclose(f);
+
+ return 0;
+
+ error:
+- if (png_ptr) png_destroy_read_struct(&png_ptr,info_ptr?&info_ptr:png_infopp_NULL,png_infopp_NULL);
++ if (png_ptr) png_destroy_read_struct(&png_ptr,info_ptr?&info_ptr:NULL,NULL);
+ if (f) fclose(f);
+ return -1;
+ }
+@@ -224,7 +224,7 @@
+ if (w) *w=png_get_image_width(png_ptr,info_ptr);
+ if (h) *h=png_get_image_height(png_ptr,info_ptr);
+
+- png_destroy_read_struct(&png_ptr,&info_ptr,png_infopp_NULL);
++ png_destroy_read_struct(&png_ptr,&info_ptr,NULL);
+
+ /* now read the whole file as a binary blob */
+ fseek(f,0,SEEK_END);
+@@ -246,7 +246,7 @@
+ return 0;
+
+ error:
+- if (png_ptr) png_destroy_read_struct(&png_ptr,info_ptr?&info_ptr:png_infopp_NULL,png_infopp_NULL);
++ if (png_ptr) png_destroy_read_struct(&png_ptr,info_ptr?&info_ptr:NULL,NULL);
+ if (f) fclose(f);
+ return -1;
+ }
diff --git a/media-libs/libkate/libkate-0.3.7.ebuild b/media-libs/libkate/libkate-0.3.7.ebuild
new file mode 100644
index 000000000000..07540efbc42b
--- /dev/null
+++ b/media-libs/libkate/libkate-0.3.7.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+PYTHON_DEPEND="wxwidgets? 2"
+
+inherit eutils python
+
+DESCRIPTION="Codec for karaoke and text encapsulation for Ogg"
+HOMEPAGE="http://code.google.com/p/libkate/"
+SRC_URI="http://libkate.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd"
+IUSE="doc wxwidgets"
+
+COMMON_DEPEND="media-libs/libogg
+ media-libs/libpng"
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig
+ sys-devel/flex
+ sys-devel/bison
+ doc? ( app-doc/doxygen )"
+RDEPEND="${COMMON_DEPEND}
+ wxwidgets? ( =dev-python/wxpython-2.8* media-libs/liboggz )"
+
+pkg_setup() {
+ if use wxwidgets; then
+ python_set_active_version 2
+ python_pkg_setup
+ fi
+}
+
+src_prepare() {
+ use wxwidgets && python_clean_py-compile_files
+ epatch "${FILESDIR}"/${P}-libpng14.patch
+}
+
+src_configure() {
+ use wxwidgets || sed -i -e "s/HAVE_PYTHON=yes/HAVE_PYTHON=no/" configure
+ econf $(use_enable doc) --docdir=/usr/share/doc/${PF}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "make install failed"
+ dodoc AUTHORS ChangeLog README
+ use wxwidgets && python_convert_shebangs -r 2 "${D}"
+}
+
+pkg_postinst() {
+ use wxwidgets && python_mod_optimize kdj
+}
+
+pkg_postrm() {
+ use wxwidgets && python_mod_cleanup kdj
+}
diff --git a/media-libs/libkate/libkate-0.3.8.ebuild b/media-libs/libkate/libkate-0.3.8.ebuild
new file mode 100644
index 000000000000..66566cf82b92
--- /dev/null
+++ b/media-libs/libkate/libkate-0.3.8.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+PYTHON_DEPEND="wxwidgets? 2"
+inherit python
+
+DESCRIPTION="Codec for karaoke and text encapsulation for Ogg"
+HOMEPAGE="http://code.google.com/p/libkate/"
+SRC_URI="http://libkate.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="debug doc wxwidgets"
+
+COMMON_DEPEND="media-libs/libogg
+ media-libs/libpng"
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig
+ sys-devel/flex
+ sys-devel/bison
+ doc? ( app-doc/doxygen )"
+RDEPEND="${COMMON_DEPEND}
+ wxwidgets? ( =dev-python/wxpython-2.8* media-libs/liboggz )"
+
+pkg_setup() {
+ if use wxwidgets; then
+ python_set_active_version 2
+ python_pkg_setup
+ fi
+}
+
+src_prepare() {
+ use wxwidgets && python_clean_py-compile_files
+}
+
+src_configure() {
+ use wxwidgets || sed -i -e "s/HAVE_PYTHON=yes/HAVE_PYTHON=no/" configure
+ econf $(use_enable debug) $(use_enable doc) --docdir=/usr/share/doc/${PF}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "make install failed"
+ dodoc AUTHORS ChangeLog README
+ use wxwidgets && python_convert_shebangs -r 2 "${D}"
+}
+
+pkg_postinst() {
+ use wxwidgets && python_mod_optimize kdj
+}
+
+pkg_postrm() {
+ use wxwidgets && python_mod_cleanup kdj
+}
diff --git a/media-libs/libkate/libkate-0.4.1.ebuild b/media-libs/libkate/libkate-0.4.1.ebuild
new file mode 100644
index 000000000000..c5ab6d78f632
--- /dev/null
+++ b/media-libs/libkate/libkate-0.4.1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+PYTHON_DEPEND="wxwidgets? 2"
+inherit python
+
+DESCRIPTION="Codec for karaoke and text encapsulation for Ogg"
+HOMEPAGE="http://code.google.com/p/libkate/"
+SRC_URI="http://libkate.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="debug doc wxwidgets"
+
+COMMON_DEPEND="media-libs/libogg
+ media-libs/libpng"
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig
+ sys-devel/flex
+ sys-devel/bison
+ doc? ( app-doc/doxygen )"
+RDEPEND="${COMMON_DEPEND}
+ wxwidgets? ( =dev-python/wxpython-2.8* media-libs/liboggz )"
+
+pkg_setup() {
+ if use wxwidgets; then
+ python_set_active_version 2
+ python_pkg_setup
+ fi
+}
+
+src_prepare() {
+ use wxwidgets && python_clean_py-compile_files
+}
+
+src_configure() {
+ use wxwidgets || sed -i -e "s/HAVE_PYTHON=yes/HAVE_PYTHON=no/" configure
+ econf $(use_enable debug) $(use_enable doc) --docdir=/usr/share/doc/${PF}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "make install failed"
+ dodoc AUTHORS ChangeLog README
+ use wxwidgets && python_convert_shebangs -r 2 "${D}"
+}
+
+pkg_postinst() {
+ use wxwidgets && python_mod_optimize kdj
+}
+
+pkg_postrm() {
+ use wxwidgets && python_mod_cleanup kdj
+}
diff --git a/media-libs/libkate/metadata.xml b/media-libs/libkate/metadata.xml
new file mode 100644
index 000000000000..479ab999d31a
--- /dev/null
+++ b/media-libs/libkate/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <longdescription lang="en">Kate is a codec for karaoke and text encapsulation for Ogg. Most of the
+ time, this would be multiplexed with audio/video to carry subtitles,
+ song lyrics (with or without karaoke data), etc, but doesn't have to be.
+ A possible use of a lone Kate stream would be an e-book. Moreover, the
+ motion feature gives Kate a powerful means to describe arbitrary curves,
+ so hand drawing of shapes can be achieved. This was originally meant for
+ karaoke use, but can be used for any purpose. Motions can be attached to
+ various semantics, like position, color, etc, so scrolling or fading
+ text can be defined.
+ More information can be found at http://wiki.xiph.org/index.php/OggKate</longdescription>
+ <upstream>
+ <remote-id type="google-code">libkate</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libkface/Manifest b/media-libs/libkface/Manifest
new file mode 100644
index 000000000000..d9b60e0ce7c5
--- /dev/null
+++ b/media-libs/libkface/Manifest
@@ -0,0 +1,4 @@
+DIST digikam-4.10.0.tar.bz2 69413654 SHA256 4207e68b6221307111b66bb69485d3e88150df95dae014a99f6f161a3da0c725 SHA512 a2f1d5f44719409ee45158106cc44541e7226e3c948b722045e104bc398f96233481d60e11dd198e96bfe3028201dac335be403ec74af1ef07e3137c3e9221a4 WHIRLPOOL 5d7997787c549318e5d7d677edc68ee2ebaa95c789b7d5f05e3ea5dea48d56afc23aa7bf3afa33f44353f4189644df7573683580486c0d248352ffb534215f37
+DIST digikam-4.12.0.tar.bz2 69527960 SHA256 15043afb04733e059460165bc3cdf58dc42a67d7a349fbe12c2ebbe1946e3420 SHA512 a5ebe481ef9803475cd2d4d198b0d093753ecb71367662f0e83a151ab34a2ff071139b28c1d9600279463fed96745b025db86d24b059b0794bc4a2b50338df85 WHIRLPOOL cf29c3555ce41a298c9760287996d8edee76ff8a6ec42b503f55059e40b35f91cf56afb054f641e800f6e630d851491c2f77e0bd67020feefe8d6adf36a643f5
+DIST digikam-4.4.0.tar.bz2 68871203 SHA256 5c68a2d200f5b502706128ea64839319aad333fb79548f49ecc92594e280d4e9 SHA512 4992fad1e574fc44eac53f3ac8d4ab78ccbf8e04beb54a211a9afc20af1efb6f8bacedea07e403f490e7f70a74ed5ac02d4f9b939dfaf25f64a4a9bda0a7d94a WHIRLPOOL 7a05ab9926227232a1cf52bf68da45b849b982e840b171f702610acce85a1ce8e59967a02e845a0ef19c316daee835861573aca40dc7b28422cf7d6d56119e2c
+DIST digikam-4.7.0-1.tar.bz2 70151058 SHA256 230a5841754107d273c953ad4aeef2b57265c4623decc74a454c437175468002 SHA512 a9e162c83d83b2183a4e8f254b971993b884677e24676b3dd58dcf8e90ca87f1046c099ea33083ee0f58eedd13aee69a242fbc3d1eab70e285956393637f3dd4 WHIRLPOOL e454bd9c95b3aa9a4c9007065c8ee3e1da595b389fc868a6a21cacba761d8101d4be507c299fd7651d8ab0c0ddff5fb4038bf49f73213a8ec2b69bcdce02808b
diff --git a/media-libs/libkface/files/libkface-4.7.0-histogram.patch b/media-libs/libkface/files/libkface-4.7.0-histogram.patch
new file mode 100644
index 000000000000..d65ac2d2ec5b
--- /dev/null
+++ b/media-libs/libkface/files/libkface-4.7.0-histogram.patch
@@ -0,0 +1,30 @@
+From 916b00af31981a0729e05a92ae212f05279e730f Mon Sep 17 00:00:00 2001
+From: Gilles Caulier <caulier.gilles@gmail.com>
+Date: Sat, 21 Mar 2015 14:57:53 +0100
+Subject: [PATCH] apply patch #91657 to fix libkface histogram DB table grawing
+ at each registration of data. CCBUGS: 338176
+
+---
+ libkface/recognition-opencv-lbph/lbphfacemodel.cpp | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/libkface/recognition-opencv-lbph/lbphfacemodel.cpp b/libkface/recognition-opencv-lbph/lbphfacemodel.cpp
+index 72a3635..af8c6a5 100644
+--- a/libkface/recognition-opencv-lbph/lbphfacemodel.cpp
++++ b/libkface/recognition-opencv-lbph/lbphfacemodel.cpp
+@@ -160,9 +160,12 @@ void LBPHFaceModel::setHistograms(const QList<OpenCVMatData>& histograms, const
+ newHistograms.push_back(histogram.toMat());
+ }
+
++ m_histogramMetadata.clear();
++
+ foreach (const LBPHistogramMetadata& metadata, histogramMetadata)
+ {
+ newLabels.push_back(metadata.identity);
++ m_histogramMetadata << metadata;
+ }
+
+ std::vector<cv::Mat> currentHistograms = ptr()->get<std::vector<cv::Mat> >("histograms");
+--
+2.3.6
+
diff --git a/media-libs/libkface/libkface-4.10.0.ebuild b/media-libs/libkface/libkface-4.10.0.ebuild
new file mode 100644
index 000000000000..0b823c9df55d
--- /dev/null
+++ b/media-libs/libkface/libkface-4.10.0.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_PV="${PV/_/-}"
+MY_P="digikam-${MY_PV}"
+
+KDE_LINGUAS=""
+KDE_MINIMAL="4.10"
+inherit kde4-base
+
+DESCRIPTION="Qt/C++ wrapper around LibFace to perform face recognition and detection"
+HOMEPAGE="http://www.digikam.org/"
+SRC_URI="mirror://kde/stable/digikam/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="4/3"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=">=media-libs/opencv-2.4.9"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${MY_P}/extra/${PN}
diff --git a/media-libs/libkface/libkface-4.12.0.ebuild b/media-libs/libkface/libkface-4.12.0.ebuild
new file mode 100644
index 000000000000..42628aa83d78
--- /dev/null
+++ b/media-libs/libkface/libkface-4.12.0.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_PV="${PV/_/-}"
+MY_P="digikam-${MY_PV}"
+KDE_LINGUAS=""
+inherit kde4-base
+
+DESCRIPTION="Qt/C++ wrapper around LibFace to perform face recognition and detection"
+HOMEPAGE="http://www.digikam.org/"
+SRC_URI="mirror://kde/stable/digikam/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="4/3"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=">=media-libs/opencv-2.4.9"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${MY_P}/extra/${PN}
diff --git a/media-libs/libkface/libkface-4.4.0.ebuild b/media-libs/libkface/libkface-4.4.0.ebuild
new file mode 100644
index 000000000000..6707b626d8a8
--- /dev/null
+++ b/media-libs/libkface/libkface-4.4.0.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DIGIKAMPN=digikam
+
+KDE_LINGUAS=""
+KDE_MINIMAL="4.10"
+
+CMAKE_MIN_VERSION=2.8
+
+inherit kde4-base
+
+MY_PV=${PV/_/-}
+MY_P="digikam-${MY_PV}"
+SRC_URI="mirror://kde/stable/digikam/${MY_P}.tar.bz2"
+
+DESCRIPTION="Qt/C++ wrapper around LibFace to perform face recognition and detection"
+HOMEPAGE="http://www.digikam.org/"
+
+LICENSE="GPL-2"
+KEYWORDS="amd64 x86"
+IUSE=""
+SLOT=4
+
+DEPEND=">=media-libs/opencv-2.4.9"
+RDEPEND=${DEPEND}
+
+S=${WORKDIR}/${MY_P}/extra/${PN}
+
+src_configure() {
+ mycmakeargs=(
+ -DFORCED_UNBUNDLE=ON
+ )
+ kde4-base_src_configure
+}
diff --git a/media-libs/libkface/libkface-4.7.0-r1.ebuild b/media-libs/libkface/libkface-4.7.0-r1.ebuild
new file mode 100644
index 000000000000..df6f08f4355e
--- /dev/null
+++ b/media-libs/libkface/libkface-4.7.0-r1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_PV="${PV/_/-}"
+MY_P="digikam-${MY_PV}"
+
+KDE_LINGUAS=""
+KDE_MINIMAL="4.10"
+inherit kde4-base
+
+DESCRIPTION="Qt/C++ wrapper around LibFace to perform face recognition and detection"
+HOMEPAGE="http://www.digikam.org/"
+SRC_URI="mirror://kde/stable/digikam/${MY_P}-1.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="4/3"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=">=media-libs/opencv-2.4.9"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${MY_P}/extra/${PN}
+
+PATCHES=( "${FILESDIR}/${P}-histogram.patch" )
diff --git a/media-libs/libkface/metadata.xml b/media-libs/libkface/metadata.xml
new file mode 100644
index 000000000000..a23f444b67d6
--- /dev/null
+++ b/media-libs/libkface/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-libs/libkgeomap/Manifest b/media-libs/libkgeomap/Manifest
new file mode 100644
index 000000000000..d9b60e0ce7c5
--- /dev/null
+++ b/media-libs/libkgeomap/Manifest
@@ -0,0 +1,4 @@
+DIST digikam-4.10.0.tar.bz2 69413654 SHA256 4207e68b6221307111b66bb69485d3e88150df95dae014a99f6f161a3da0c725 SHA512 a2f1d5f44719409ee45158106cc44541e7226e3c948b722045e104bc398f96233481d60e11dd198e96bfe3028201dac335be403ec74af1ef07e3137c3e9221a4 WHIRLPOOL 5d7997787c549318e5d7d677edc68ee2ebaa95c789b7d5f05e3ea5dea48d56afc23aa7bf3afa33f44353f4189644df7573683580486c0d248352ffb534215f37
+DIST digikam-4.12.0.tar.bz2 69527960 SHA256 15043afb04733e059460165bc3cdf58dc42a67d7a349fbe12c2ebbe1946e3420 SHA512 a5ebe481ef9803475cd2d4d198b0d093753ecb71367662f0e83a151ab34a2ff071139b28c1d9600279463fed96745b025db86d24b059b0794bc4a2b50338df85 WHIRLPOOL cf29c3555ce41a298c9760287996d8edee76ff8a6ec42b503f55059e40b35f91cf56afb054f641e800f6e630d851491c2f77e0bd67020feefe8d6adf36a643f5
+DIST digikam-4.4.0.tar.bz2 68871203 SHA256 5c68a2d200f5b502706128ea64839319aad333fb79548f49ecc92594e280d4e9 SHA512 4992fad1e574fc44eac53f3ac8d4ab78ccbf8e04beb54a211a9afc20af1efb6f8bacedea07e403f490e7f70a74ed5ac02d4f9b939dfaf25f64a4a9bda0a7d94a WHIRLPOOL 7a05ab9926227232a1cf52bf68da45b849b982e840b171f702610acce85a1ce8e59967a02e845a0ef19c316daee835861573aca40dc7b28422cf7d6d56119e2c
+DIST digikam-4.7.0-1.tar.bz2 70151058 SHA256 230a5841754107d273c953ad4aeef2b57265c4623decc74a454c437175468002 SHA512 a9e162c83d83b2183a4e8f254b971993b884677e24676b3dd58dcf8e90ca87f1046c099ea33083ee0f58eedd13aee69a242fbc3d1eab70e285956393637f3dd4 WHIRLPOOL e454bd9c95b3aa9a4c9007065c8ee3e1da595b389fc868a6a21cacba761d8101d4be507c299fd7651d8ab0c0ddff5fb4038bf49f73213a8ec2b69bcdce02808b
diff --git a/media-libs/libkgeomap/libkgeomap-4.10.0.ebuild b/media-libs/libkgeomap/libkgeomap-4.10.0.ebuild
new file mode 100644
index 000000000000..a396622bd8b9
--- /dev/null
+++ b/media-libs/libkgeomap/libkgeomap-4.10.0.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_PV="${PV/_/-}"
+MY_P="digikam-${MY_PV}"
+
+KDE_MINIMAL="4.10"
+VIRTUALX_REQUIRED="test"
+inherit kde4-base
+
+DESCRIPTION="Wrapper library for world map components as marble, openstreetmap and googlemap"
+HOMEPAGE="http://www.digikam.org/"
+SRC_URI="mirror://kde/stable/digikam/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="4/2.1"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="
+ kde-apps/libkexiv2:4=
+ kde-apps/marble:4=[kde,plasma]
+"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}/extra/${PN}"
diff --git a/media-libs/libkgeomap/libkgeomap-4.12.0.ebuild b/media-libs/libkgeomap/libkgeomap-4.12.0.ebuild
new file mode 100644
index 000000000000..7b6294b37340
--- /dev/null
+++ b/media-libs/libkgeomap/libkgeomap-4.12.0.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_PV="${PV/_/-}"
+MY_P="digikam-${MY_PV}"
+VIRTUALX_REQUIRED="test"
+inherit kde4-base
+
+DESCRIPTION="Wrapper library for world map components as marble, openstreetmap and googlemap"
+HOMEPAGE="http://www.digikam.org/"
+SRC_URI="mirror://kde/stable/digikam/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="4/2.1"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="
+ kde-apps/libkexiv2:4=
+ kde-apps/marble:4=[kde,plasma]
+"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}/extra/${PN}"
diff --git a/media-libs/libkgeomap/libkgeomap-4.4.0.ebuild b/media-libs/libkgeomap/libkgeomap-4.4.0.ebuild
new file mode 100644
index 000000000000..20e47047c25e
--- /dev/null
+++ b/media-libs/libkgeomap/libkgeomap-4.4.0.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+KDE_MINIMAL="4.10"
+VIRTUALX_REQUIRED="test"
+inherit kde4-base
+
+MY_PV=${PV/_/-}
+MY_P="digikam-${MY_PV}"
+SRC_URI="mirror://kde/stable/digikam/${MY_P}.tar.bz2"
+
+DESCRIPTION="Wrapper library for world map components as marble, openstreetmap and googlemap"
+HOMEPAGE="http://www.digikam.org/"
+
+LICENSE="GPL-2"
+KEYWORDS="amd64 x86"
+IUSE=""
+SLOT=4
+
+DEPEND="
+ kde-apps/libkexiv2:4=
+ kde-apps/marble:4=[kde,plasma]
+"
+RDEPEND=${DEPEND}
+
+S="${WORKDIR}/${MY_P}/extra/${PN}"
diff --git a/media-libs/libkgeomap/libkgeomap-4.7.0.ebuild b/media-libs/libkgeomap/libkgeomap-4.7.0.ebuild
new file mode 100644
index 000000000000..ca9311937b26
--- /dev/null
+++ b/media-libs/libkgeomap/libkgeomap-4.7.0.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_PV="${PV/_/-}"
+MY_P="digikam-${MY_PV}"
+
+KDE_MINIMAL="4.10"
+VIRTUALX_REQUIRED="test"
+inherit kde4-base
+
+DESCRIPTION="Wrapper library for world map components as marble, openstreetmap and googlemap"
+HOMEPAGE="http://www.digikam.org/"
+SRC_URI="mirror://kde/stable/digikam/${MY_P}-1.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="4/2.1"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="
+ kde-apps/libkexiv2:4=
+ kde-apps/marble:4=[kde,plasma]
+"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}/extra/${PN}"
diff --git a/media-libs/libkgeomap/metadata.xml b/media-libs/libkgeomap/metadata.xml
new file mode 100644
index 000000000000..a23f444b67d6
--- /dev/null
+++ b/media-libs/libkgeomap/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-libs/liblastfm/Manifest b/media-libs/liblastfm/Manifest
new file mode 100644
index 000000000000..5e99ee04bf68
--- /dev/null
+++ b/media-libs/liblastfm/Manifest
@@ -0,0 +1,2 @@
+DIST liblastfm-1.0.8.tar.gz 119186 SHA256 e36f4f83428ede7021187fe6042db5a1919a579b071a75420364ef7115434607 SHA512 afeea48e4b859a0ce126889258b1f8b9a33224595c8b1d3f791559f854c0f895a0eb6dc5e6295bd5f0fe44d2a706b4b2602d5810d446d588db721f9c2b22af29 WHIRLPOOL b4ec8ed1d3f392a38d82c6a10d100032a62d35e316ad6a5f00b3f7b2e61d81030104ce4eafe8010329b91a81daeca68b89c78996d3ee8d3e586e9df3be74d2b4
+DIST liblastfm-1.0.9.tar.gz 119320 SHA256 5276b5fe00932479ce6fe370ba3213f3ab842d70a7d55e4bead6e26738425f7b SHA512 9d2bcf71b26d8a95920a07649c97b3faa071c49a8269268bb08fab01537392774873233d03cada09d3ce3fe2c45b0affdb74cd27c41f69342b973896effe1018 WHIRLPOOL 491b50ec174d0a344221f12da9c783cfe56fffa99bfe3b84d835a70a510a3157dfecc62f2fff086cd570fb7281ecefe2b05c6982336f27ca6c1db6ccc4bd55dc
diff --git a/media-libs/liblastfm/liblastfm-1.0.8.ebuild b/media-libs/liblastfm/liblastfm-1.0.8.ebuild
new file mode 100644
index 000000000000..066de33a4e63
--- /dev/null
+++ b/media-libs/liblastfm/liblastfm-1.0.8.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+QT_MINIMAL="4.8.0"
+inherit cmake-utils
+
+DESCRIPTION="A Qt C++ library for the Last.fm webservices"
+HOMEPAGE="https://github.com/lastfm/liblastfm"
+SRC_URI="https://github.com/lastfm/liblastfm/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 ppc ~ppc64 x86 ~amd64-linux ~x86-linux"
+IUSE="fingerprint test"
+
+COMMON_DEPEND="
+ >=dev-qt/qtcore-${QT_MINIMAL}:4
+ >=dev-qt/qtdbus-${QT_MINIMAL}:4
+ fingerprint? (
+ media-libs/libsamplerate
+ sci-libs/fftw:3.0
+ >=dev-qt/qtsql-${QT_MINIMAL}:4
+ )
+"
+DEPEND="${COMMON_DEPEND}
+ test? ( >=dev-qt/qttest-${QT_MINIMAL}:4 )
+"
+RDEPEND="${COMMON_DEPEND}
+ !<media-libs/lastfmlib-0.4.0
+"
+
+# 1 of 2 is failing, last checked version 1.0.7
+RESTRICT="test"
+
+src_configure() {
+ # demos not working
+ # qt5 support broken
+ local mycmakeargs=(
+ -DBUILD_DEMOS=OFF
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Core=ON
+ -DBUILD_WITH_QT4=ON
+ $(cmake-utils_use_build fingerprint)
+ $(cmake-utils_use_build test TESTS)
+ )
+
+ cmake-utils_src_configure
+}
diff --git a/media-libs/liblastfm/liblastfm-1.0.9.ebuild b/media-libs/liblastfm/liblastfm-1.0.9.ebuild
new file mode 100644
index 000000000000..d01b0fd340c4
--- /dev/null
+++ b/media-libs/liblastfm/liblastfm-1.0.9.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils multibuild
+
+DESCRIPTION="Collection of libraries to integrate Last.fm services"
+HOMEPAGE="https://github.com/lastfm/liblastfm"
+SRC_URI="https://github.com/lastfm/liblastfm/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+SLOT="0/0"
+IUSE="fingerprint test +qt4 qt5"
+
+REQUIRED_USE="|| ( qt4 qt5 )"
+
+COMMON_DEPEND="
+ qt4? (
+ dev-qt/qtcore:4
+ dev-qt/qtdbus:4
+ )
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtdbus:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtxml:5
+ )
+ fingerprint? (
+ media-libs/libsamplerate
+ sci-libs/fftw:3.0
+ qt4? ( dev-qt/qtsql:4 )
+ qt5? ( dev-qt/qtsql:5 )
+ )
+"
+DEPEND="${COMMON_DEPEND}
+ test? (
+ qt4? ( dev-qt/qttest:4 )
+ qt5? ( dev-qt/qttest:5 )
+ )
+"
+RDEPEND="${COMMON_DEPEND}
+ !<media-libs/lastfmlib-0.4.0
+"
+
+# 1 of 2 (UrlBuilderTest) is failing, last checked version 1.0.9
+RESTRICT="test"
+
+pkg_setup() {
+ MULTIBUILD_VARIANTS=( $(usev qt4) $(usev qt5) )
+}
+
+src_configure() {
+ myconfigure() {
+ # demos not working
+ local mycmakeargs=(
+ -DBUILD_DEMOS=OFF
+ $(cmake-utils_use_build fingerprint)
+ $(cmake-utils_use_build test TESTS)
+ )
+ if [[ ${MULTIBUILD_VARIANT} = qt4 ]]; then
+ mycmakeargs+=(-DBUILD_WITH_QT4=ON)
+ fi
+ if [[ ${MULTIBUILD_VARIANT} = qt5 ]]; then
+ mycmakeargs+=(-DBUILD_WITH_OT4=OFF)
+ fi
+ cmake-utils_src_configure
+ }
+
+ multibuild_foreach_variant myconfigure
+}
+
+src_compile() {
+ multibuild_foreach_variant cmake-utils_src_compile
+}
+
+src_test() {
+ multibuild_foreach_variant cmake-utils_src_test
+}
+
+src_install() {
+ multibuild_foreach_variant cmake-utils_src_install
+}
diff --git a/media-libs/liblastfm/metadata.xml b/media-libs/liblastfm/metadata.xml
new file mode 100644
index 000000000000..b0a55507f566
--- /dev/null
+++ b/media-libs/liblastfm/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>kde</herd>
+ <use>
+ <flag name="fingerprint">Build the lastfm-fingerprint library</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">lastfm/liblastfm</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/liblingoteach/Manifest b/media-libs/liblingoteach/Manifest
new file mode 100644
index 000000000000..55bf9ec54fc4
--- /dev/null
+++ b/media-libs/liblingoteach/Manifest
@@ -0,0 +1 @@
+DIST liblingoteach-0.2.3.tar.gz 341557 SHA256 f1fcb82c49d7e749846eff9394246f8eab1be6f3fc5d37115bd8e115d60e39b0
diff --git a/media-libs/liblingoteach/liblingoteach-0.2.3.ebuild b/media-libs/liblingoteach/liblingoteach-0.2.3.ebuild
new file mode 100644
index 000000000000..400f08c5e40a
--- /dev/null
+++ b/media-libs/liblingoteach/liblingoteach-0.2.3.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+DESCRIPTION="A library to support lingoteach-ui and for generic lesson development"
+HOMEPAGE="http://lingoteach.sourceforge.net"
+SRC_URI="mirror://sourceforge/lingoteach/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~x86"
+IUSE="debug zlib"
+
+RDEPEND="zlib? ( sys-libs/zlib )
+ dev-libs/libxml2"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_configure() {
+ econf --disable-dependency-tracking \
+ $(use_enable zlib compression) \
+ $(use_enable debug)
+}
+
+src_install() {
+ emake HTML_DIR="/usr/share/doc/${PF}" DOC_MODULE="" \
+ DESTDIR="${D}" install || die
+ dodoc AUTHORS ChangeLog HACKING NEWS README
+}
diff --git a/media-libs/liblingoteach/metadata.xml b/media-libs/liblingoteach/metadata.xml
new file mode 100644
index 000000000000..8506b03f6bd0
--- /dev/null
+++ b/media-libs/liblingoteach/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>sound</herd>
+ <upstream>
+ <remote-id type="sourceforge">lingoteach</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/liblo/Manifest b/media-libs/liblo/Manifest
new file mode 100644
index 000000000000..e84b7bb0b14e
--- /dev/null
+++ b/media-libs/liblo/Manifest
@@ -0,0 +1,3 @@
+DIST liblo-0.26.tar.gz 519750 SHA256 a636fb09f8178ad0d5303e94fec37b182d3062a0e3daee85eed2a39ab6232258 SHA512 5bc720be216b796587ee020cc32bdea760c65ee063a1248a44bb7c800c1a91b5e5a1321b55c61fd3b219aecb0d8cfb4d6bf53a6440d46fd59e8697c63e542215 WHIRLPOOL 4fcfa3dbfe8bbb8887eb18a17c3d3e3d532b9386dd83bbe9fd0d1c075fbf556b7abca626f415b60d69e92df49d7dafc2874d43e83f14bec8990b609ca4f5fe3e
+DIST liblo-0.27.tar.gz 533684 SHA256 67b48e1e63fddea60bb4a0f0c25fba32ea42d2a55877752aa342c478b59374b6 SHA512 079f12d349d7fb58d4f7393d2ad72ca6844570524992c56ce87b23531620c2387ac6ba5316f92684b3fae72c7a5abe03e49fcbd97196efdb35d11a2422b065bc WHIRLPOOL efce8f9fca4828338778e120a795cc998cf8dee9bb17477891907d77cf3a5e9c203bca7f0ef201810a0e148e4fabe7086d1093d781d05e31cfa52c863dc476dd
+DIST liblo-0.28.tar.gz 591659 SHA256 da94a9b67b93625354dd89ff7fe31e5297fc9400b6eaf7378c82ee1caf7db909 SHA512 05818218d2d6a7042714b8fa905e7242fb9707795ad53ea27b2a1af3661f0822d25585ce17d286aa269c534ef24e19e377e041bf7fe194c8e47c0046fefcb85f WHIRLPOOL 5de1592d2fe8aee191115ed5b094dd8bb0ca5ec442c94e785c2bc74bef93f3df0dd8804c8aa2a1c3b1a1ce70729fa87c73cd4b09f3535300548999687b9a1ab5
diff --git a/media-libs/liblo/files/liblo-0.27-no-threads.patch b/media-libs/liblo/files/liblo-0.27-no-threads.patch
new file mode 100644
index 000000000000..5e3ebe8e43a0
--- /dev/null
+++ b/media-libs/liblo/files/liblo-0.27-no-threads.patch
@@ -0,0 +1,15 @@
+--- liblo-0.27/examples/Makefile.am
++++ liblo-0.27/examples/Makefile.am
+@@ -3,10 +3,9 @@
+ # Example server depends on server threads, so skip it if threads are
+ # disabled.
+
+-noinst_PROGRAMS = example_client nonblocking_server_example \
+- example_tcp_echo_server
++noinst_PROGRAMS = example_client nonblocking_server_example
+ if ENABLE_THREADS
+-noinst_PROGRAMS += example_server
++noinst_PROGRAMS += example_server example_tcp_echo_server
+ endif
+
+ AM_CFLAGS = -Wall -I@top_srcdir@
diff --git a/media-libs/liblo/liblo-0.26.ebuild b/media-libs/liblo/liblo-0.26.ebuild
new file mode 100644
index 000000000000..cc73d72e9673
--- /dev/null
+++ b/media-libs/liblo/liblo-0.26.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils
+
+DESCRIPTION="Lightweight OSC (Open Sound Control) implementation"
+HOMEPAGE="http://plugin.org.uk/liblo"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86 ~ppc-macos"
+IUSE="doc ipv6 static-libs"
+
+RESTRICT="test"
+
+RDEPEND=""
+DEPEND="doc? ( app-doc/doxygen )"
+
+DOCS="AUTHORS ChangeLog NEWS README TODO"
+
+src_configure() {
+ use doc || export ac_cv_prog_HAVE_DOXYGEN=false
+
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable ipv6)
+}
+
+src_install() {
+ default
+ prune_libtool_files
+}
diff --git a/media-libs/liblo/liblo-0.27.ebuild b/media-libs/liblo/liblo-0.27.ebuild
new file mode 100644
index 000000000000..7853e82eb083
--- /dev/null
+++ b/media-libs/liblo/liblo-0.27.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 autotools
+
+DESCRIPTION="Lightweight OSC (Open Sound Control) implementation"
+HOMEPAGE="http://plugin.org.uk/liblo"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~ppc-macos"
+IUSE="doc ipv6 static-libs"
+
+RESTRICT="test"
+
+DEPEND="doc? ( app-doc/doxygen )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-no-threads.patch
+
+ # don't build examples by default
+ sed -i '/^SUBDIRS =/s/examples//' Makefile.am || die
+
+ eautoreconf
+}
+
+src_configure() {
+ use doc || export ac_cv_prog_HAVE_DOXYGEN=false
+
+ # switching threads on/off breaks ABI, bugs #473282, #473286 and #473356
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable ipv6) \
+ --enable-threads
+}
+
+src_install() {
+ default
+ prune_libtool_files
+}
diff --git a/media-libs/liblo/liblo-0.28.ebuild b/media-libs/liblo/liblo-0.28.ebuild
new file mode 100644
index 000000000000..4fcb9d244fa3
--- /dev/null
+++ b/media-libs/liblo/liblo-0.28.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils autotools
+
+DESCRIPTION="Lightweight OSC (Open Sound Control) implementation"
+HOMEPAGE="http://plugin.org.uk/liblo"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~ppc-macos"
+IUSE="doc ipv6 static-libs"
+
+RESTRICT="test"
+
+DEPEND="doc? ( app-doc/doxygen )"
+
+src_prepare() {
+ # don't build examples by default
+ sed -i '/^SUBDIRS =/s/examples//' Makefile.am || die
+
+ eautoreconf
+}
+
+src_configure() {
+ use doc || export ac_cv_prog_HAVE_DOXYGEN=false
+
+ # switching threads on/off breaks ABI, bugs #473282, #473286 and #473356
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable ipv6) \
+ --enable-threads
+}
+
+src_install() {
+ default
+ prune_libtool_files
+}
diff --git a/media-libs/liblo/metadata.xml b/media-libs/liblo/metadata.xml
new file mode 100644
index 000000000000..2d400e11954c
--- /dev/null
+++ b/media-libs/liblo/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>sound</herd>
+ <longdescription>liblo is an implementation of the Open Sound Control protocol for POSIX systems, started by Steve Harris.</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">liblo</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/liblqr/Manifest b/media-libs/liblqr/Manifest
new file mode 100644
index 000000000000..80fd27de7591
--- /dev/null
+++ b/media-libs/liblqr/Manifest
@@ -0,0 +1 @@
+DIST liblqr-1-0.4.2.tar.bz2 344739 SHA256 173a822efd207d72cda7d7f4e951c5000f31b10209366ff7f0f5972f7f9ff137 SHA512 57d9ed67d5a11c970262263a34b6797576088e14f2ccb01b393eff55bfd22c8bb2b2189e3ed5ff6c187f709c556225fc1fb1038bd0d7e0c03d8839ef0ce998a3 WHIRLPOOL 439720dcbc6b19e49d57151bc8c60392da3ceeb31a6edfaee0c2bb3f9bba89a3a89903f79b06a5f5f2a19377d5548506bcefa3d9b5497d651672c03c86d71cb6
diff --git a/media-libs/liblqr/liblqr-0.4.2-r1.ebuild b/media-libs/liblqr/liblqr-0.4.2-r1.ebuild
new file mode 100644
index 000000000000..5b40868dd71e
--- /dev/null
+++ b/media-libs/liblqr/liblqr-0.4.2-r1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils
+
+DESCRIPTION="An easy to use C/C++ seam carving library"
+HOMEPAGE="http://liblqr.wikidot.com/"
+SRC_URI="http://liblqr.wikidot.com/local--files/en:download-page/${PN}-1-${PV}.tar.bz2"
+
+LICENSE="|| ( GPL-3 LGPL-3 )"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ppc ppc64 x86 ~amd64-fbsd ~x86-fbsd"
+
+RDEPEND="dev-libs/glib:2"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}/${PN}-1-${PV}"
+
+src_prepare() {
+ epatch_user
+}
+
+src_install() {
+ default
+ prune_libtool_files
+}
diff --git a/media-libs/liblqr/metadata.xml b/media-libs/liblqr/metadata.xml
new file mode 100644
index 000000000000..230776629fec
--- /dev/null
+++ b/media-libs/liblqr/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>hwoarang@gentoo.org</email>
+<name>Markos Chandras</name>
+</maintainer>
+</pkgmetadata>
diff --git a/media-libs/liblrdf/Manifest b/media-libs/liblrdf/Manifest
new file mode 100644
index 000000000000..0afa442f21f2
--- /dev/null
+++ b/media-libs/liblrdf/Manifest
@@ -0,0 +1 @@
+DIST liblrdf-0.5.0.tar.gz 283109 SHA256 013002b91ef209827fe99552b8c7f0b569cddb3d6f1439bedbd8bafe1956a93c
diff --git a/media-libs/liblrdf/liblrdf-0.5.0.ebuild b/media-libs/liblrdf/liblrdf-0.5.0.ebuild
new file mode 100644
index 000000000000..c9e602e3d93e
--- /dev/null
+++ b/media-libs/liblrdf/liblrdf-0.5.0.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit autotools
+
+DESCRIPTION="A library for the manipulation of RDF file in LADSPA plugins"
+HOMEPAGE="http://github.com/swh/LRDF"
+SRC_URI="http://github.com/swh/LRDF/tarball/${PV} -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 hppa ppc ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="static-libs"
+
+RDEPEND=">=dev-libs/openssl-1
+ media-libs/raptor:2
+ >=media-libs/ladspa-sdk-1.12"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS=( AUTHORS ChangeLog README )
+
+src_unpack() {
+ unpack ${A}
+ mv *-LRDF-* "${S}"
+}
+
+src_prepare() {
+ sed -i -e 's:usr/local:usr:' examples/{instances,remove}_test.c || die #392221
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_test() {
+ has_version media-plugins/swh-plugins && default #392221
+}
+
+src_install() {
+ default
+ rm -f "${ED}"usr/lib*/liblrdf.la
+}
diff --git a/media-libs/liblrdf/metadata.xml b/media-libs/liblrdf/metadata.xml
new file mode 100644
index 000000000000..7bbcd54ed8d3
--- /dev/null
+++ b/media-libs/liblrdf/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>sound</herd>
+ <upstream>
+ <remote-id type="github">swh/LRDF</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/liblscp/Manifest b/media-libs/liblscp/Manifest
new file mode 100644
index 000000000000..4ba25931a5ca
--- /dev/null
+++ b/media-libs/liblscp/Manifest
@@ -0,0 +1,2 @@
+DIST liblscp-0.5.5.tar.gz 402096 SHA256 bf5c883d219e25234f42a0ae56458b9d9cf06ab74052f440866c90c01c719026
+DIST liblscp-0.5.6.tar.gz 369550 SHA256 4e518d44646465c4b53296bb8c2acd75b87692cc03b555e4896263a09f6b10cf
diff --git a/media-libs/liblscp/liblscp-0.5.5.ebuild b/media-libs/liblscp/liblscp-0.5.5.ebuild
new file mode 100644
index 000000000000..e560861345f2
--- /dev/null
+++ b/media-libs/liblscp/liblscp-0.5.5.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="a C++ library for the Linux Sampler control protocol"
+HOMEPAGE="http://www.linuxsampler.org"
+SRC_URI="http://download.linuxsampler.org/packages/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="doc"
+
+RDEPEND=""
+DEPEND="doc? ( app-doc/doxygen )"
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed."
+ dodoc AUTHORS ChangeLog TODO NEWS README
+
+ if use doc; then
+ dohtml -r doc/html/*
+ fi
+}
diff --git a/media-libs/liblscp/liblscp-0.5.6.ebuild b/media-libs/liblscp/liblscp-0.5.6.ebuild
new file mode 100644
index 000000000000..1ec37993cb19
--- /dev/null
+++ b/media-libs/liblscp/liblscp-0.5.6.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="a C++ library for the Linux Sampler control protocol"
+HOMEPAGE="http://www.linuxsampler.org"
+SRC_URI="http://download.linuxsampler.org/packages/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="doc"
+
+RDEPEND=""
+DEPEND="doc? ( app-doc/doxygen )"
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed."
+ dodoc AUTHORS ChangeLog TODO NEWS README
+
+ if use doc; then
+ dohtml -r doc/html/*
+ fi
+}
diff --git a/media-libs/liblscp/metadata.xml b/media-libs/liblscp/metadata.xml
new file mode 100644
index 000000000000..e1774e3d9ad7
--- /dev/null
+++ b/media-libs/liblscp/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>sound</herd>
+</pkgmetadata>
diff --git a/media-libs/libmad/Manifest b/media-libs/libmad/Manifest
new file mode 100644
index 000000000000..83479d993355
--- /dev/null
+++ b/media-libs/libmad/Manifest
@@ -0,0 +1 @@
+DIST libmad-0.15.1b.tar.gz 502379 SHA256 bbfac3ed6bfbc2823d3775ebb931087371e142bb0e9bb1bee51a76a6e0078690 SHA512 2cad30347fb310dc605c46bacd9da117f447a5cabedd8fefdb24ab5de641429e5ec5ce8af7aefa6a75a3f545d3adfa255e3fa0a2d50971f76bc0c4fc0400cc45 WHIRLPOOL 7453ec587711c3de1a221316e88ef9039e4d2002f5a87a3957ed479899e5cc11fb8e89128f251cfd028c1fb9b89eca6b45aa5cb07f4a5e4f9a92086180084de5
diff --git a/media-libs/libmad/files/libmad-0.15.1b-cflags-O2.patch b/media-libs/libmad/files/libmad-0.15.1b-cflags-O2.patch
new file mode 100644
index 000000000000..61b4b13bd73e
--- /dev/null
+++ b/media-libs/libmad/files/libmad-0.15.1b-cflags-O2.patch
@@ -0,0 +1,12 @@
+diff -Naur libmad-0.15.1b-orig/configure.ac libmad-0.15.1b/configure.ac
+--- libmad-0.15.1b-orig/configure.ac 2007-07-01 12:58:13.000000000 -0600
++++ libmad-0.15.1b/configure.ac 2007-07-01 12:59:13.000000000 -0600
+@@ -105,7 +105,7 @@
+ shift
+ ;;
+ -O2)
+- optimize="-O"
++ optimize="-O2"
+ shift
+ ;;
+ -fomit-frame-pointer)
diff --git a/media-libs/libmad/files/libmad-0.15.1b-cflags.patch b/media-libs/libmad/files/libmad-0.15.1b-cflags.patch
new file mode 100644
index 000000000000..2ec44e344562
--- /dev/null
+++ b/media-libs/libmad/files/libmad-0.15.1b-cflags.patch
@@ -0,0 +1,146 @@
+diff -Naur libmad-0.15.1b-orig/configure.ac libmad-0.15.1b/configure.ac
+--- libmad-0.15.1b-orig/configure.ac 2007-06-30 20:22:31.000000000 -0600
++++ libmad-0.15.1b/configure.ac 2007-06-30 20:25:31.000000000 -0600
+@@ -122,74 +122,74 @@
+ esac
+ done
+
+-if test "$GCC" = yes
+-then
+- if test -z "$arch"
+- then
+- case "$host" in
+- i386-*) ;;
+- i?86-*) arch="-march=i486" ;;
+- arm*-empeg-*) arch="-march=armv4 -mtune=strongarm1100" ;;
+- armv4*-*) arch="-march=armv4 -mtune=strongarm" ;;
+- powerpc-*) ;;
+- mips*-agenda-*) arch="-mcpu=vr4100" ;;
+- mips*-luxsonor-*) arch="-mips1 -mcpu=r3000 -Wa,-m4010" ;;
+- esac
+- fi
+-
+- case "$optimize" in
+- -O|"-O "*)
+- optimize="-O"
+- optimize="$optimize -fforce-mem"
+- optimize="$optimize -fforce-addr"
+- : #x optimize="$optimize -finline-functions"
+- : #- optimize="$optimize -fstrength-reduce"
+- optimize="$optimize -fthread-jumps"
+- optimize="$optimize -fcse-follow-jumps"
+- optimize="$optimize -fcse-skip-blocks"
+- : #x optimize="$optimize -frerun-cse-after-loop"
+- : #x optimize="$optimize -frerun-loop-opt"
+- : #x optimize="$optimize -fgcse"
+- optimize="$optimize -fexpensive-optimizations"
+- optimize="$optimize -fregmove"
+- : #* optimize="$optimize -fdelayed-branch"
+- : #x optimize="$optimize -fschedule-insns"
+- optimize="$optimize -fschedule-insns2"
+- : #? optimize="$optimize -ffunction-sections"
+- : #? optimize="$optimize -fcaller-saves"
+- : #> optimize="$optimize -funroll-loops"
+- : #> optimize="$optimize -funroll-all-loops"
+- : #x optimize="$optimize -fmove-all-movables"
+- : #x optimize="$optimize -freduce-all-givs"
+- : #? optimize="$optimize -fstrict-aliasing"
+- : #* optimize="$optimize -fstructure-noalias"
+-
+- case "$host" in
+- arm*-*)
+- optimize="$optimize -fstrength-reduce"
+- ;;
+- mips*-*)
+- optimize="$optimize -fstrength-reduce"
+- optimize="$optimize -finline-functions"
+- ;;
+- i?86-*)
+- optimize="$optimize -fstrength-reduce"
+- ;;
+- powerpc-apple-*)
+- # this triggers an internal compiler error with gcc2
+- : #optimize="$optimize -fstrength-reduce"
+-
+- # this is really only beneficial with gcc3
+- : #optimize="$optimize -finline-functions"
+- ;;
+- *)
+- # this sometimes provokes bugs in gcc 2.95.2
+- : #optimize="$optimize -fstrength-reduce"
+- ;;
+- esac
+- ;;
+- esac
+-fi
++#if test "$GCC" = yes
++#then
++# if test -z "$arch"
++# then
++# case "$host" in
++# i386-*) ;;
++# i?86-*) arch="-march=i486" ;;
++# arm*-empeg-*) arch="-march=armv4 -mtune=strongarm1100" ;;
++# armv4*-*) arch="-march=armv4 -mtune=strongarm" ;;
++# powerpc-*) ;;
++# mips*-agenda-*) arch="-mcpu=vr4100" ;;
++# mips*-luxsonor-*) arch="-mips1 -mcpu=r3000 -Wa,-m4010" ;;
++# esac
++# fi
++#
++# case "$optimize" in
++# -O|"-O "*)
++# optimize="-O"
++# optimize="$optimize -fforce-mem"
++# optimize="$optimize -fforce-addr"
++# : #x optimize="$optimize -finline-functions"
++# : #- optimize="$optimize -fstrength-reduce"
++# optimize="$optimize -fthread-jumps"
++# optimize="$optimize -fcse-follow-jumps"
++# optimize="$optimize -fcse-skip-blocks"
++# : #x optimize="$optimize -frerun-cse-after-loop"
++# : #x optimize="$optimize -frerun-loop-opt"
++# : #x optimize="$optimize -fgcse"
++# optimize="$optimize -fexpensive-optimizations"
++# optimize="$optimize -fregmove"
++# : #* optimize="$optimize -fdelayed-branch"
++# : #x optimize="$optimize -fschedule-insns"
++# optimize="$optimize -fschedule-insns2"
++# : #? optimize="$optimize -ffunction-sections"
++# : #? optimize="$optimize -fcaller-saves"
++# : #> optimize="$optimize -funroll-loops"
++# : #> optimize="$optimize -funroll-all-loops"
++# : #x optimize="$optimize -fmove-all-movables"
++# : #x optimize="$optimize -freduce-all-givs"
++# : #? optimize="$optimize -fstrict-aliasing"
++# : #* optimize="$optimize -fstructure-noalias"
++#
++# case "$host" in
++# arm*-*)
++# optimize="$optimize -fstrength-reduce"
++# ;;
++# mips*-*)
++# optimize="$optimize -fstrength-reduce"
++# optimize="$optimize -finline-functions"
++# ;;
++# i?86-*)
++# optimize="$optimize -fstrength-reduce"
++# ;;
++# powerpc-apple-*)
++# # this triggers an internal compiler error with gcc2
++# : #optimize="$optimize -fstrength-reduce"
++#
++# # this is really only beneficial with gcc3
++# : #optimize="$optimize -finline-functions"
++# ;;
++# *)
++# # this sometimes provokes bugs in gcc 2.95.2
++# : #optimize="$optimize -fstrength-reduce"
++# ;;
++# esac
++# ;;
++# esac
++#fi
+
+ case "$host" in
+ mips*-agenda-*)
diff --git a/media-libs/libmad/files/libmad-0.15.1b-gcc44-mips-h-constraint-removal.patch b/media-libs/libmad/files/libmad-0.15.1b-gcc44-mips-h-constraint-removal.patch
new file mode 100644
index 000000000000..bff7afe6b6bc
--- /dev/null
+++ b/media-libs/libmad/files/libmad-0.15.1b-gcc44-mips-h-constraint-removal.patch
@@ -0,0 +1,77 @@
+libmad: MIPS GCC-4.4 build fixes
+
+GCC-4.4 on MIPS removed the "h" asm constraint, fix this up.
+Taken from OE.
+
+http://patchwork.openembedded.org/patch/921/
+
+diff -ur libmad-0.15.1b-orig/fixed.h libmad-0.15.1b/fixed.h
+--- libmad-0.15.1b-orig/fixed.h 2004-02-17 12:32:03.000000000 +1030
++++ libmad-0.15.1b/fixed.h 2009-08-05 10:46:30.000000000 +0930
+@@ -299,6 +299,23 @@
+
+ # elif defined(FPM_MIPS)
+
++/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */
++#if defined (__GNUC__) && defined (__GNUC_MINOR__)
++#define __GNUC_PREREQ(maj, min) \
++ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
++#else
++#define __GNUC_PREREQ(maj, min) 0
++#endif
++
++#if __GNUC_PREREQ(4,4)
++ typedef unsigned int u64_di_t __attribute__ ((mode (DI)));
++# define MAD_F_MLX(hi, lo, x, y) \
++ do { \
++ u64_di_t __ll = (u64_di_t) (x) * (y); \
++ hi = __ll >> 32; \
++ lo = __ll; \
++ } while (0)
++#else
+ /*
+ * This MIPS version is fast and accurate; the disposition of the least
+ * significant bit depends on OPT_ACCURACY via mad_f_scale64().
+@@ -328,6 +345,7 @@
+ : "%r" ((x) >> 12), "r" ((y) >> 16))
+ # define MAD_F_MLZ(hi, lo) ((mad_fixed_t) (lo))
+ # endif
++#endif /* __GNU_PREREQ(4,4) */
+
+ # if defined(OPT_SPEED)
+ # define mad_f_scale64(hi, lo) \
+diff -ur libmad-0.15.1b-orig/mad.h libmad-0.15.1b/mad.h
+--- libmad-0.15.1b-orig/mad.h 2004-02-17 13:25:44.000000000 +1030
++++ libmad-0.15.1b/mad.h 2009-08-05 10:42:40.000000000 +0930
+@@ -344,6 +344,23 @@
+
+ # elif defined(FPM_MIPS)
+
++/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */
++#if defined (__GNUC__) && defined (__GNUC_MINOR__)
++#define __GNUC_PREREQ(maj, min) \
++ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
++#else
++#define __GNUC_PREREQ(maj, min) 0
++#endif
++
++#if __GNUC_PREREQ(4,4)
++ typedef unsigned int u64_di_t __attribute__ ((mode (DI)));
++# define MAD_F_MLX(hi, lo, x, y) \
++ do { \
++ u64_di_t __ll = (u64_di_t) (x) * (y); \
++ hi = __ll >> 32; \
++ lo = __ll; \
++ } while (0)
++#else
+ /*
+ * This MIPS version is fast and accurate; the disposition of the least
+ * significant bit depends on OPT_ACCURACY via mad_f_scale64().
+@@ -373,6 +390,7 @@
+ : "%r" ((x) >> 12), "r" ((y) >> 16))
+ # define MAD_F_MLZ(hi, lo) ((mad_fixed_t) (lo))
+ # endif
++#endif /* __GNU_PREREQ(4,4) */
+
+ # if defined(OPT_SPEED)
+ # define mad_f_scale64(hi, lo) \
diff --git a/media-libs/libmad/files/mad.pc b/media-libs/libmad/files/mad.pc
new file mode 100644
index 000000000000..14a66f552582
--- /dev/null
+++ b/media-libs/libmad/files/mad.pc
@@ -0,0 +1,11 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: mad
+Description: MPEG Audio Decoder
+Requires:
+Version: 0.15.0b
+Libs: -L${libdir} -lmad -lm
+Cflags: -I${includedir}
diff --git a/media-libs/libmad/libmad-0.15.1b-r8.ebuild b/media-libs/libmad/libmad-0.15.1b-r8.ebuild
new file mode 100644
index 000000000000..4810bc90c224
--- /dev/null
+++ b/media-libs/libmad/libmad-0.15.1b-r8.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 autotools libtool flag-o-matic multilib-minimal
+
+DESCRIPTION="\"M\"peg \"A\"udio \"D\"ecoder library"
+HOMEPAGE="http://mad.sourceforge.net"
+SRC_URI="mirror://sourceforge/mad/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="debug static-libs"
+
+DEPEND=""
+RDEPEND="abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20130224-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+
+DOCS=( CHANGES CREDITS README TODO VERSION )
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/mad.h
+)
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/libmad-0.15.1b-cflags.patch \
+ "${FILESDIR}"/libmad-0.15.1b-cflags-O2.patch \
+ "${FILESDIR}"/libmad-0.15.1b-gcc44-mips-h-constraint-removal.patch
+
+ # bug 467002
+ sed -i 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' configure.ac || die
+
+ eautoreconf
+ # unnecessary when eautoreconf'd
+# elibtoolize
+ # unnecessary when eautoreconf'd with new autoconf, for example, 2.69
+# epunt_cxx #74490
+}
+
+multilib_src_configure() {
+ local myconf="--enable-accuracy"
+ # --enable-speed optimize for speed over accuracy
+ # --enable-accuracy optimize for accuracy over speed
+ # --enable-experimental enable code using the EXPERIMENTAL
+ # preprocessor define
+
+ # Fix for b0rked sound on sparc64 (maybe also sparc32?)
+ # default/approx is also possible, uses less cpu but sounds worse
+ use sparc && myconf+=" --enable-fpm=64bit"
+
+ [[ $(tc-arch) == "amd64" ]] && myconf+=" --enable-fpm=64bit"
+ [[ $(tc-arch) == "x86" ]] && myconf+=" --enable-fpm=intel"
+ [[ $(tc-arch) == "ppc" ]] && myconf+=" --enable-fpm=default"
+ [[ $(tc-arch) == "ppc64" ]] && myconf+=" --enable-fpm=64bit"
+
+ ECONF_SOURCE="${S}" econf \
+ $(use_enable debug debugging) \
+ $(use_enable static-libs static) \
+ ${myconf}
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+
+ # This file must be updated with each version update
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins "${FILESDIR}"/mad.pc
+
+ # Use correct libdir in pkgconfig file
+ sed -i -e "s:^libdir.*:libdir=${EPREFIX}/usr/$(get_libdir):" \
+ "${ED}"/usr/$(get_libdir)/pkgconfig/mad.pc
+
+ prune_libtool_files --all
+}
diff --git a/media-libs/libmad/metadata.xml b/media-libs/libmad/metadata.xml
new file mode 100644
index 000000000000..315b2eb6f52e
--- /dev/null
+++ b/media-libs/libmad/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>sound</herd>
+ <upstream>
+ <remote-id type="sourceforge">mad</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libmatroska/Manifest b/media-libs/libmatroska/Manifest
new file mode 100644
index 000000000000..bf45ee1dde21
--- /dev/null
+++ b/media-libs/libmatroska/Manifest
@@ -0,0 +1,5 @@
+DIST libmatroska-1.2.0.tar.bz2 80394 SHA256 8b68ed72c4563363fc17517d0fe0862d6a51747870f51ee7d1bb362274a5d44f SHA512 59fe80146dbd287f435fb477f2e589b8e5659fe5abb1a0869b1f6ca4b85e281431b7a18f1e3728d2b406b141039ab1b5e6a1a247a2bc23a7e64e7b5e67e29374 WHIRLPOOL e6706ca647306784a4e056e49db86375b48968e05fe77b7bfbea54c3c2d22adf28c52b88a9604ea9f1251f9f050e3b34cedbe2d415a01b8b216a52064c1934e9
+DIST libmatroska-1.3.0.tar.bz2 80542 SHA256 5231ec958571365e719a6fd3c220227af6cf0f14e0bd1bcf766ddbc068d18e69 SHA512 adbb5f85b0e55e39b6a5f629bac82041fc8d1ac0cdf8aecc6ea9966320c35aee4fe9437ca620229b7e15d3d8f7c2d4cf1beb71280789e1e6700087b4d2ec0c8a WHIRLPOOL 341e5b7568f1d609c98e1b164ca5eb4b1a27db33e1218982a48197975b66c46614a2d76b659a094d6a878f491a1a2400bef44ccceb19ca1fd10bdecc4a471fc2
+DIST libmatroska-1.4.0.tar.gz 98007 SHA256 62c907e7b57ef0748faa1c6304fd91a977de489896bd16c05e918f6e35247c25 SHA512 e35d1b4a0fee7e51cce353705bed81cdfc09b7212b3add4eaa1dc4b0ac606bcd3977bef47e62a96b8e9c76050aa927c841813b6c6224a9fbcef2f329649414ac WHIRLPOOL 2463f6f7da27f1460582e8e5a8018259c23560abbe054e68432a63dfef4f1f3238d26862d4cfbd82380843df21c92d265fd93f104ea2848c38f43be3ee23a8fa
+DIST libmatroska-1.4.1.tar.gz 97741 SHA256 7b735212106bcc53e90bda8ed5d575c4a3ad0816689589bb1641c812e020dd15 SHA512 efaf959c50886acefa83c9f371ea556658703898d606c2af0fa75ebfb504eb592f2d7b2f641ed776db297187429de3c8b0cda685d0bbb3469a11683ff0547fd8 WHIRLPOOL 694034d20aa9fecfab923f3109ec56645969cbce2cd5450acca8483a46d0ec3e721d555833e0524d82935d993fc49f6c385d9c5daedd90cedd9d6bf4fb1a1c68
+DIST libmatroska-1.4.2.tar.bz2 611057 SHA256 bea10320f1f1fd121bbd7db9ffc77b2518e8269f00903549c5425478bbf8393f SHA512 37b7e35c4db0a5265682f69e2ded251168f64499ab86fa228d9a4dde8a85edab7b8b60c722563c1fed27317cd0e94ee86322c18446430aae7cafeda20a90e549 WHIRLPOOL 89824c105139d41595f47d23ba03f08e1ea1fa90cf212aff440406d7532bd43b7fa83e78a2db3c08308efd49efbb46f421e354bc4e7c49fc8439be06a8ec01d4
diff --git a/media-libs/libmatroska/files/libmatroska-1.0.0-respectflags.patch b/media-libs/libmatroska/files/libmatroska-1.0.0-respectflags.patch
new file mode 100644
index 000000000000..1095508160c0
--- /dev/null
+++ b/media-libs/libmatroska/files/libmatroska-1.0.0-respectflags.patch
@@ -0,0 +1,11 @@
+--- make/linux/Makefile.orig 2010-06-05 16:01:48.000000000 -0600
++++ make/linux/Makefile 2010-06-05 16:02:22.000000000 -0600
+@@ -99,7 +99,7 @@
+ $(RANLIB) $@
+
+ $(LIBRARY_SO): $(objects_so)
+- $(CXX) -shared -Wl,-soname,$(LIBRARY_SO_VER) -o $(LIBRARY_SO_VER) $(objects_so) -lebml
++ $(CXX) $(LINKFLAGS) -shared -Wl,-soname,$(LIBRARY_SO_VER) -o $(LIBRARY_SO_VER) $(objects_so) -lebml
+ rm -f $(LIBRARY_SO)
+ ln -s $(LIBRARY_SO_VER) $(LIBRARY_SO)
+
diff --git a/media-libs/libmatroska/files/libmatroska-1.4.1-flags.patch b/media-libs/libmatroska/files/libmatroska-1.4.1-flags.patch
new file mode 100644
index 000000000000..1b00cd23440c
--- /dev/null
+++ b/media-libs/libmatroska/files/libmatroska-1.4.1-flags.patch
@@ -0,0 +1,11 @@
+--- libmatroska-release-1.4.1/make/linux/Makefile
++++ libmatroska-release-1.4.1/make/linux/Makefile
+@@ -104,7 +104,7 @@
+ $(RANLIB) $@
+
+ $(LIBRARY_SO): $(objects_so)
+- $(CXX) -shared -Wl,-soname,$(LIBRARY_SO_VER) -o $(LIBRARY_SO_VER) $(objects_so) -lebml
++ $(CXX) $(LINKFLAGS) -shared -Wl,-soname,$(LIBRARY_SO_VER) -o $(LIBRARY_SO_VER) $(objects_so) -lebml
+ rm -f $(LIBRARY_SO)
+ ln -s $(LIBRARY_SO_VER) $(LIBRARY_SO)
+
diff --git a/media-libs/libmatroska/libmatroska-1.2.0.ebuild b/media-libs/libmatroska/libmatroska-1.2.0.ebuild
new file mode 100644
index 000000000000..b045485c8f3d
--- /dev/null
+++ b/media-libs/libmatroska/libmatroska-1.2.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"
+
+inherit flag-o-matic eutils multilib toolchain-funcs
+
+DESCRIPTION="Extensible multimedia container format based on EBML"
+HOMEPAGE="http://www.matroska.org/"
+SRC_URI="http://www.bunkus.org/videotools/mkvtoolnix/sources/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ia64 ppc ppc64 sparc x86 ~x86-fbsd"
+IUSE=""
+RESTRICT="test"
+
+DEPEND=">=dev-libs/libebml-1.2.1"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${P}/make/linux"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-1.0.0-respectflags.patch"
+}
+
+src_compile() {
+ #fixes locale for gcc3.4.0 to close bug 52385
+ append-flags $(test-flags -finput-charset=ISO8859-15)
+
+ emake PREFIX=/usr \
+ LIBEBML_INCLUDE_DIR=/usr/include/ebml \
+ LIBEBML_LIB_DIR=/usr/$(get_libdir) \
+ CXX="$(tc-getCXX)" || die "make failed"
+}
+
+src_install() {
+ emake prefix="${D}/usr" libdir="${D}/usr/$(get_libdir)" install || die "make install failed"
+ dodoc "${WORKDIR}/${P}/ChangeLog"
+}
diff --git a/media-libs/libmatroska/libmatroska-1.3.0.ebuild b/media-libs/libmatroska/libmatroska-1.3.0.ebuild
new file mode 100644
index 000000000000..a382c7adc54a
--- /dev/null
+++ b/media-libs/libmatroska/libmatroska-1.3.0.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit flag-o-matic eutils multilib toolchain-funcs
+
+DESCRIPTION="Extensible multimedia container format based on EBML"
+HOMEPAGE="http://www.matroska.org/"
+SRC_URI="http://www.bunkus.org/videotools/mkvtoolnix/sources/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-linux"
+IUSE="static-libs"
+RESTRICT="test"
+
+DEPEND=">=dev-libs/libebml-1.2.1"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${P}/make/linux"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-1.0.0-respectflags.patch"
+}
+
+src_compile() {
+ local targets="sharedlib"
+ use static-libs && targets+=" staticlib"
+
+ #fixes locale for gcc3.4.0 to close bug 52385
+ append-flags $(test-flags -finput-charset=ISO8859-15)
+
+ emake PREFIX="${EPREFIX}"/usr \
+ LIBEBML_INCLUDE_DIR="${EPREFIX}"/usr/include/ebml \
+ LIBEBML_LIB_DIR="${EPREFIX}"/usr/$(get_libdir) \
+ CXX="$(tc-getCXX)" \
+ AR="$(tc-getAR)" \
+ ${targets}
+}
+
+src_install() {
+ local targets="install_sharedlib install_headers"
+ use static-libs && targets+=" install_staticlib"
+
+ emake prefix="${ED}/usr" libdir="${ED}/usr/$(get_libdir)" ${targets}
+ dodoc "${WORKDIR}/${P}/ChangeLog"
+}
diff --git a/media-libs/libmatroska/libmatroska-1.4.0.ebuild b/media-libs/libmatroska/libmatroska-1.4.0.ebuild
new file mode 100644
index 000000000000..09d8357b9396
--- /dev/null
+++ b/media-libs/libmatroska/libmatroska-1.4.0.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit flag-o-matic eutils multilib toolchain-funcs
+
+DESCRIPTION="Extensible multimedia container format based on EBML"
+HOMEPAGE="http://www.matroska.org/ https://github.com/Matroska-Org/libmatroska/"
+SRC_URI="https://github.com/Matroska-Org/libmatroska/archive/release-${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0/6" # subslot = soname major version
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-linux"
+IUSE="static-libs"
+RESTRICT="test"
+
+DEPEND=">=dev-libs/libebml-1.3.0:="
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${PN}-release-${PV}/make/linux
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-1.0.0-respectflags.patch"
+}
+
+src_compile() {
+ local targets="sharedlib"
+ use static-libs && targets+=" staticlib"
+
+ #fixes locale for gcc3.4.0 to close bug 52385
+ append-flags $(test-flags -finput-charset=ISO8859-15)
+
+ emake PREFIX="${EPREFIX}"/usr \
+ LIBEBML_INCLUDE_DIR="${EPREFIX}"/usr/include/ebml \
+ LIBEBML_LIB_DIR="${EPREFIX}"/usr/$(get_libdir) \
+ CXX="$(tc-getCXX)" \
+ AR="$(tc-getAR)" \
+ ${targets}
+}
+
+src_install() {
+ local targets="install_sharedlib install_headers"
+ use static-libs && targets+=" install_staticlib"
+
+ emake prefix="${ED}"/usr libdir="${ED}"/usr/$(get_libdir) ${targets}
+ dodoc "${WORKDIR}"/${PN}-release-${PV}/ChangeLog
+}
diff --git a/media-libs/libmatroska/libmatroska-1.4.1.ebuild b/media-libs/libmatroska/libmatroska-1.4.1.ebuild
new file mode 100644
index 000000000000..1768f98c8cff
--- /dev/null
+++ b/media-libs/libmatroska/libmatroska-1.4.1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit flag-o-matic eutils multilib toolchain-funcs
+
+DESCRIPTION="Extensible multimedia container format based on EBML"
+HOMEPAGE="http://www.matroska.org/ https://github.com/Matroska-Org/libmatroska/"
+SRC_URI="https://github.com/Matroska-Org/libmatroska/archive/release-${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0/6" # subslot = soname major version
+KEYWORDS="alpha amd64 arm ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-linux"
+IUSE="static-libs"
+RESTRICT="test"
+
+DEPEND=">=dev-libs/libebml-1.3.0:="
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${PN}-release-${PV}/make/linux
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-flags.patch
+}
+
+src_compile() {
+ local targets="sharedlib"
+ use static-libs && targets+=" staticlib"
+
+ #fixes locale for gcc3.4.0 to close bug 52385
+ append-flags $(test-flags -finput-charset=ISO8859-15)
+
+ emake PREFIX="${EPREFIX}"/usr \
+ LIBEBML_INCLUDE_DIR="${EPREFIX}"/usr/include/ebml \
+ LIBEBML_LIB_DIR="${EPREFIX}"/usr/$(get_libdir) \
+ CXX="$(tc-getCXX)" \
+ AR="$(tc-getAR)" \
+ ${targets}
+}
+
+src_install() {
+ local targets="install_sharedlib install_headers"
+ use static-libs && targets+=" install_staticlib"
+
+ emake DESTDIR="${D}" prefix="${EPREFIX}"/usr libdir="${EPREFIX}"/usr/$(get_libdir) ${targets}
+ dodoc "${WORKDIR}"/${PN}-release-${PV}/ChangeLog
+}
diff --git a/media-libs/libmatroska/libmatroska-1.4.2.ebuild b/media-libs/libmatroska/libmatroska-1.4.2.ebuild
new file mode 100644
index 000000000000..3d890ede299d
--- /dev/null
+++ b/media-libs/libmatroska/libmatroska-1.4.2.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools-utils
+
+DESCRIPTION="Extensible multimedia container format based on EBML"
+HOMEPAGE="http://www.matroska.org/ https://github.com/Matroska-Org/libmatroska/"
+SRC_URI="http://dl.matroska.org/downloads/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0/6" # subslot = soname major version
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-linux"
+IUSE="static-libs"
+
+RDEPEND=">=dev-libs/libebml-1.3.1:="
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
diff --git a/media-libs/libmatroska/metadata.xml b/media-libs/libmatroska/metadata.xml
new file mode 100644
index 000000000000..5effe57bd8db
--- /dev/null
+++ b/media-libs/libmatroska/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">Matroska-Org/libmatroska</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libmediaart/Manifest b/media-libs/libmediaart/Manifest
new file mode 100644
index 000000000000..704e638996cd
--- /dev/null
+++ b/media-libs/libmediaart/Manifest
@@ -0,0 +1,3 @@
+DIST libmediaart-0.4.0.tar.xz 270220 SHA256 e8ec92a642f4df7f988364f6451adf89e1611d7379a636d8c7eff4ca21a0fd1c SHA512 7d3870b47f53a52597126a2f691b89eca9800bb82d7723601756fae57ba32b348b10135ffbabe1922de5dd4400fd41d69eac923d3df0de744a3a600c84dd46c7 WHIRLPOOL 59102f907d0702cd5ddc580b3d2878138bac82a5bfda4a3e30eee6ea8f2cfe36d2278a1158e586a11d9e72689429018229069632d5108168e0b902b2ccadf932
+DIST libmediaart-0.7.0.tar.xz 5811244 SHA256 3a9dffcad862aed7c0921579b93080d694b8a66f3676bfee8037867f653a1cd3 SHA512 94ca38ca2ec2bdd7f3a6f39c7f658053d8c46caba8bad97d004663da027c0308a305ce791b33af3d07e3fe8647a967b1ee1c6f808bbe1b4839844aa10cb0891a WHIRLPOOL 781237cff0511b937408f8f3cf72b336c32b84ec38f08d598e2eba56c89ce2b76deafb8705d41e5bc73f2f39833966dbd67f62bcb28e67108499d6d1bb72897b
+DIST libmediaart-1.9.0.tar.xz 5814844 SHA256 94668adb29d4dc3115b0fd105942ebd5ca6f5f9dbb2afa8a191a73a747dd506f SHA512 fcfdad1d62710a39ea21daf23b13eb0b6d64a521f359153bb79247bae8e91fde3d879f807ed2528f3476425f5214cae755b117b4d06d78ee3af41bcc9a3b3ab4 WHIRLPOOL a78cf905853873d5f778b7ae157b2b260a55e3b07ff59d93fa7f95efb53f2b2adb918bb1a5eecc8a66e6d59ee172e9dea04bbadca4bdc20766d710127b1fef79
diff --git a/media-libs/libmediaart/files/libmediaart-0.7.0-qt5.patch b/media-libs/libmediaart/files/libmediaart-0.7.0-qt5.patch
new file mode 100644
index 000000000000..ecf9de908cfd
--- /dev/null
+++ b/media-libs/libmediaart/files/libmediaart-0.7.0-qt5.patch
@@ -0,0 +1,47 @@
+Solves automagic selection of Qt version.
+
+https://bugs.gentoo.org/show_bug.cgi?id=523122
+https://bugzilla.gnome.org/show_bug.cgi?id=737174
+
+diff --git a/configure.ac b/configure.ac
+index e9ead09..3ee710a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -206,6 +206,10 @@ AC_ARG_ENABLE(qt,
+ AS_HELP_STRING([--enable-qt],
+ [enable Qt support, (MP3 album art) [[default=auto]]]),,
+ [enable_qt=auto])
++AC_ARG_WITH(qt-version,
++ AS_HELP_STRING([--with-qt-version=major],
++ [Force specific Qt version [[default=auto]]]),,
++ [with_qt_version=auto])
+
+ selected_for_media_art="no (disabled)"
+
+@@ -218,14 +222,18 @@ if test "x$enable_qt" == "xyes" && test "x$enable_gdkpixbuf" == "xyes"; then
+ fi
+
+ if test "x$enable_qt" != "xno" && test "x$enable_gdkpixbuf" != "xyes"; then
+- PKG_CHECK_MODULES(QT5,
+- [Qt5Gui >= $QT5_REQUIRED],
+- [have_qt5=yes],
+- [have_qt5=no])
+- PKG_CHECK_MODULES(QT4,
+- [QtGui >= $QT4_REQUIRED],
+- [have_qt4=yes],
+- [have_qt4=no])
++ if test "x$with_qt_version" == "xauto" || test "x$with_qt_version" == "x5"; then
++ PKG_CHECK_MODULES(QT5,
++ [Qt5Gui >= $QT5_REQUIRED],
++ [have_qt5=yes],
++ [have_qt5=no])
++ fi
++ if test "x$with_qt_version" == "xauto" || test "x$with_qt_version" == "x4"; then
++ PKG_CHECK_MODULES(QT4,
++ [QtGui >= $QT4_REQUIRED],
++ [have_qt4=yes],
++ [have_qt4=no])
++ fi
+
+ if test "x$have_qt5" = "xyes"; then
+ BACKEND_CFLAGS="$QT5_CFLAGS -fPIC"
diff --git a/media-libs/libmediaart/libmediaart-0.4.0.ebuild b/media-libs/libmediaart/libmediaart-0.4.0.ebuild
new file mode 100644
index 000000000000..3000d0485b97
--- /dev/null
+++ b/media-libs/libmediaart/libmediaart-0.4.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"
+GCONF_DEBUG="no"
+VALA_USE_DEPEND="vapigen"
+VALA_MIN_API_VERSION="0.16"
+
+inherit gnome2 vala virtualx
+
+DESCRIPTION="Manages, extracts and handles media art caches"
+HOMEPAGE="https://github.com/curlybeast/libmediaart"
+
+LICENSE="LGPL-2.1+"
+SLOT="1.0"
+KEYWORDS="alpha amd64 arm ia64 ppc ppc64 sparc x86"
+IUSE="gtk +introspection qt4 qt5 vala"
+REQUIRED_USE="
+ ?? ( gtk qt4 qt5 )
+ vala? ( introspection )
+"
+
+RDEPEND="
+ >=dev-libs/glib-2.35.1:2
+ gtk? ( >=x11-libs/gdk-pixbuf-2.12:2 )
+ introspection? ( >=dev-libs/gobject-introspection-1.30 )
+ qt4? ( dev-qt/qtgui:4 )
+ qt5? ( dev-qt/qtgui:5 )
+"
+DEPEND="${RDEPEND}
+ >=dev-util/gtk-doc-am-1.8
+ virtual/pkgconfig
+ vala? ( $(vala_depend) )
+"
+
+src_prepare() {
+ use vala && vala_src_prepare
+ gnome2_src_prepare
+}
+
+src_configure() {
+ local myconf=""
+ if use qt4 -o use qt5 ; then
+ myconf="${myconf} --enable-qt"
+ else
+ myconf="${myconf} --disable-qt"
+ fi
+
+ gnome2_src_configure \
+ --enable-unit-tests \
+ $(use_enable gtk gdkpixbuf) \
+ $(use_enable introspection) \
+ $(use_enable vala) \
+ ${myconf}
+}
+
+src_test() {
+ dbus-launch Xemake check #513502
+}
diff --git a/media-libs/libmediaart/libmediaart-0.7.0.ebuild b/media-libs/libmediaart/libmediaart-0.7.0.ebuild
new file mode 100644
index 000000000000..1cc7ae1e5c8f
--- /dev/null
+++ b/media-libs/libmediaart/libmediaart-0.7.0.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+VALA_USE_DEPEND="vapigen"
+VALA_MIN_API_VERSION="0.16"
+
+inherit autotools gnome2 vala virtualx
+
+DESCRIPTION="Manages, extracts and handles media art caches"
+HOMEPAGE="https://github.com/GNOME/libmediaart"
+
+LICENSE="LGPL-2.1+"
+SLOT="1.0"
+KEYWORDS="alpha amd64 arm ia64 ppc ppc64 sparc x86"
+IUSE="gtk +introspection qt4 qt5 vala"
+REQUIRED_USE="
+ ?? ( gtk qt4 qt5 )
+ vala? ( introspection )
+"
+
+RDEPEND="
+ >=dev-libs/glib-2.38.0:2
+ gtk? ( >=x11-libs/gdk-pixbuf-2.12:2 )
+ introspection? ( >=dev-libs/gobject-introspection-1.30 )
+ qt4? ( dev-qt/qtgui:4 )
+ qt5? ( dev-qt/qtgui:5 )
+"
+DEPEND="${RDEPEND}
+ >=dev-util/gtk-doc-am-1.8
+ virtual/pkgconfig
+ vala? ( $(vala_depend) )
+"
+
+src_prepare() {
+ use vala && vala_src_prepare
+ epatch "${FILESDIR}/${P}-qt5.patch" #523122
+ eautoreconf
+ gnome2_src_prepare
+}
+
+src_configure() {
+ local myconf=""
+ if use qt4 ; then
+ myconf="${myconf} --enable-qt --with-qt-version=4"
+ elif use qt5 ; then
+ myconf="${myconf} --enable-qt --with-qt-version=5"
+ else
+ myconf="${myconf} --disable-qt"
+ fi
+
+ gnome2_src_configure \
+ --enable-unit-tests \
+ $(use_enable gtk gdkpixbuf) \
+ $(use_enable introspection) \
+ $(use_enable vala) \
+ ${myconf}
+}
+
+src_test() {
+ dbus-launch Xemake check #513502
+}
diff --git a/media-libs/libmediaart/libmediaart-1.9.0.ebuild b/media-libs/libmediaart/libmediaart-1.9.0.ebuild
new file mode 100644
index 000000000000..3a6ffe2e4e4d
--- /dev/null
+++ b/media-libs/libmediaart/libmediaart-1.9.0.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+VALA_USE_DEPEND="vapigen"
+VALA_MIN_API_VERSION="0.16"
+
+inherit autotools eutils gnome2 vala virtualx
+
+DESCRIPTION="Manages, extracts and handles media art caches"
+HOMEPAGE="https://github.com/GNOME/libmediaart"
+
+LICENSE="LGPL-2.1+"
+SLOT="2.0"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="gtk +introspection qt4 qt5 vala"
+REQUIRED_USE="
+ ?? ( gtk qt4 qt5 )
+ vala? ( introspection )
+"
+
+RDEPEND="
+ >=dev-libs/glib-2.38.0:2
+ gtk? ( >=x11-libs/gdk-pixbuf-2.12:2 )
+ introspection? ( >=dev-libs/gobject-introspection-1.30 )
+ qt4? ( dev-qt/qtgui:4 )
+ qt5? ( dev-qt/qtgui:5 )
+"
+DEPEND="${RDEPEND}
+ >=dev-util/gtk-doc-am-1.8
+ virtual/pkgconfig
+ vala? ( $(vala_depend) )
+"
+
+src_prepare() {
+ # Fix QT automagic selection, bug #523122
+ epatch "${FILESDIR}"/${PN}-0.7.0-qt5.patch
+
+ # Make doc parallel installable
+ cd "${S}"/docs/reference/${PN}
+ sed -e "s/\(DOC_MODULE.*=\).*/\1${PN}-${SLOT}/" \
+ -e "s/\(DOC_MAIN_SGML_FILE.*=\).*/\1${PN}-docs-${SLOT}.sgml/" \
+ -i Makefile.am Makefile.in || die
+ sed -e "s/\(<book.*name=\"\)libmediaart/\1${PN}-${SLOT}/" \
+ -i html/libmediaart.devhelp2 || die
+ mv libmediaart-docs{,-${SLOT}}.sgml || die
+ mv libmediaart-overrides{,-${SLOT}}.txt || die
+ mv libmediaart-sections{,-${SLOT}}.txt || die
+ mv html/libmediaart{,-${SLOT}}.devhelp2
+ cd "${S}"
+
+ eautoreconf
+
+ use vala && vala_src_prepare
+ gnome2_src_prepare
+}
+
+src_configure() {
+ local myconf=""
+ if use qt4 ; then
+ myconf="${myconf} --enable-qt --with-qt-version=4"
+ elif use qt5 ; then
+ myconf="${myconf} --enable-qt --with-qt-version=5"
+ else
+ myconf="${myconf} --disable-qt"
+ fi
+
+ gnome2_src_configure \
+ --enable-unit-tests \
+ $(use_enable gtk gdkpixbuf) \
+ $(use_enable introspection) \
+ $(use_enable vala) \
+ ${myconf}
+}
+
+src_test() {
+ dbus-launch Xemake check #513502
+}
diff --git a/media-libs/libmediaart/metadata.xml b/media-libs/libmediaart/metadata.xml
new file mode 100644
index 000000000000..defff19a494b
--- /dev/null
+++ b/media-libs/libmediaart/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>gnome</herd>
+ <upstream>
+ <remote-id type="github">GNOME/libmediaart</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libmediainfo/Manifest b/media-libs/libmediainfo/Manifest
new file mode 100644
index 000000000000..1b052acf597e
--- /dev/null
+++ b/media-libs/libmediainfo/Manifest
@@ -0,0 +1,3 @@
+DIST libmediainfo_0.7.65.tar.bz2 1030927 SHA256 afda2ab23ff25278c502f6ab2a4adcad96240157953d77555eb425d0aa46cea6 SHA512 63c697f28048d1f545ac721fc8530ddf61a9cc83ad44d9b6020c36f087b1b75af381d33f19dc8e6555a3a599206df51ea44df812ba9383a1057889b68dd8c834 WHIRLPOOL d281f59afb1916799f3f8f296581b00e99c0b7865dc118031fb198974c6981f7a261abe78a14352d1221cadacb8da1b07a9fff00f28dd33d55164946d9375870
+DIST libmediainfo_0.7.72.tar.bz2 1640978 SHA256 a61e3d58521a6b771e45eea7f7ab8b807d4e356aa2bdce639088faa3d253aed9 SHA512 67679fada3c78426abdb394ee68b6ec5b3d59bec56fd6803c5700a6c6ee02e0cb3d2a61fc15375b44d81400337ec2944fb9d2fe5321643743f4299c0af9463a6 WHIRLPOOL 08876bbe1bb3bfa2fcfe405e7b16069bc04a844f198654309eca712d393eaf4c71fc3129323144738cd5268d897d0f28f12c1af4369c8210ba6c9dff3a7dbf32
+DIST libmediainfo_0.7.73.tar.bz2 1648742 SHA256 d350dbbdc25a52f79bcb3d5e91d0a61c68a4f429c13c80166d2e37476a62feb0 SHA512 44e4d5089e4343e503117a6e125e324551ecdc8e3ec01523dd13a66652708d2f0e8e1ab1740754524f0b9847ba317f97f123034bf0b06216ad3e60b5d0f56908 WHIRLPOOL 496e463691410bf8350c31e63e5268dc2974a6b4c9fb80661d80d8738d299f3a5813044cf5057db32aa09639cc365c347c677c0c7ce759f1b953c47fd9b379c0
diff --git a/media-libs/libmediainfo/files/libmediainfo-0.7.63-pkgconfig.patch b/media-libs/libmediainfo/files/libmediainfo-0.7.63-pkgconfig.patch
new file mode 100644
index 000000000000..f8e19216f209
--- /dev/null
+++ b/media-libs/libmediainfo/files/libmediainfo-0.7.63-pkgconfig.patch
@@ -0,0 +1,10 @@
+--- MediaInfoLib/Project/GNU/Library/configure.ac
++++ MediaInfoLib/Project/GNU/Library/configure.ac
+@@ -28,6 +28,7 @@
+ AC_LIBTOOL_WIN32_DLL
+ AC_PROG_LIBTOOL
+ AC_PROG_INSTALL
++PKG_PROG_PKG_CONFIG
+
+ dnl #########################################################################
+ dnl Configure
diff --git a/media-libs/libmediainfo/libmediainfo-0.7.65.ebuild b/media-libs/libmediainfo/libmediainfo-0.7.65.ebuild
new file mode 100644
index 000000000000..400a45012768
--- /dev/null
+++ b/media-libs/libmediainfo/libmediainfo-0.7.65.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils flag-o-matic multilib
+
+MY_PN="MediaInfo"
+DESCRIPTION="MediaInfo libraries"
+HOMEPAGE="http://mediaarea.net/mediainfo/"
+SRC_URI="mirror://sourceforge/mediainfo/${PN}_${PV}.tar.bz2"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="curl doc mms static-libs"
+
+RDEPEND="sys-libs/zlib
+ dev-libs/tinyxml2
+ >=media-libs/libzen-0.4.28[static-libs=]
+ curl? ( net-misc/curl )
+ mms? ( >=media-libs/libmms-0.6.1[static-libs=] )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+S=${WORKDIR}/${MY_PN}Lib/Project/GNU/Library
+
+src_prepare() {
+ sed -i 's:-O2::' configure.ac || die
+ append-cppflags -DMEDIAINFO_LIBMMS_DESCRIBE_SUPPORT=0
+
+ epatch "${FILESDIR}"/${PN}-0.7.63-pkgconfig.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --enable-shared \
+ --with-libtinyxml2 \
+ $(use_with curl libcurl) \
+ $(use_with mms libmms) \
+ $(use_enable static-libs static) \
+ $(use_enable static-libs staticlibs)
+}
+
+src_compile() {
+ default
+
+ if use doc; then
+ cd "${WORKDIR}"/${MY_PN}Lib/Source/Doc
+ doxygen Doxyfile || die
+ fi
+}
+
+src_install() {
+ default
+
+ edos2unix ${PN}.pc #414545
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins ${PN}.pc
+
+ for x in ./ Archive Audio Duplicate Export Image Multiple Reader Tag Text Video; do
+ insinto /usr/include/${MY_PN}/${x}
+ doins "${WORKDIR}"/${MY_PN}Lib/Source/${MY_PN}/${x}/*.h
+ done
+
+ insinto /usr/include/${MY_PN}DLL
+ doins "${WORKDIR}"/${MY_PN}Lib/Source/${MY_PN}DLL/*.h
+
+ dodoc "${WORKDIR}"/${MY_PN}Lib/*.txt
+ if use doc; then
+ dohtml -r "${WORKDIR}"/${MY_PN}Lib/Doc/*
+ fi
+
+ prune_libtool_files
+}
diff --git a/media-libs/libmediainfo/libmediainfo-0.7.72.ebuild b/media-libs/libmediainfo/libmediainfo-0.7.72.ebuild
new file mode 100644
index 000000000000..b696e04678a7
--- /dev/null
+++ b/media-libs/libmediainfo/libmediainfo-0.7.72.ebuild
@@ -0,0 +1,79 @@
+# 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
+
+MY_PN="MediaInfo"
+DESCRIPTION="MediaInfo libraries"
+HOMEPAGE="http://mediaarea.net/mediainfo/"
+SRC_URI="mirror://sourceforge/mediainfo/${PN}_${PV}.tar.bz2"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="curl doc mms static-libs"
+
+RDEPEND="sys-libs/zlib
+ dev-libs/tinyxml2:=
+ >=media-libs/libzen-0.4.28[static-libs=]
+ curl? ( net-misc/curl )
+ mms? ( >=media-libs/libmms-0.6.1[static-libs=] )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+S=${WORKDIR}/${MY_PN}Lib/Project/GNU/Library
+
+src_prepare() {
+ sed -i 's:-O2::' configure.ac || die
+ append-cppflags -DMEDIAINFO_LIBMMS_DESCRIBE_SUPPORT=0
+
+ epatch "${FILESDIR}"/${PN}-0.7.63-pkgconfig.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --enable-shared \
+ --with-libtinyxml2 \
+ $(use_with curl libcurl) \
+ $(use_with mms libmms) \
+ $(use_enable static-libs static) \
+ $(use_enable static-libs staticlibs)
+}
+
+src_compile() {
+ default
+
+ if use doc; then
+ cd "${WORKDIR}"/${MY_PN}Lib/Source/Doc
+ doxygen Doxyfile || die
+ fi
+}
+
+src_install() {
+ default
+
+ edos2unix ${PN}.pc #414545
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins ${PN}.pc
+
+ for x in ./ Archive Audio Duplicate Export Image Multiple Reader Tag Text Video; do
+ insinto /usr/include/${MY_PN}/${x}
+ doins "${WORKDIR}"/${MY_PN}Lib/Source/${MY_PN}/${x}/*.h
+ done
+
+ insinto /usr/include/${MY_PN}DLL
+ doins "${WORKDIR}"/${MY_PN}Lib/Source/${MY_PN}DLL/*.h
+
+ dodoc "${WORKDIR}"/${MY_PN}Lib/*.txt
+ if use doc; then
+ dohtml -r "${WORKDIR}"/${MY_PN}Lib/Doc/*
+ fi
+
+ prune_libtool_files
+}
diff --git a/media-libs/libmediainfo/libmediainfo-0.7.73.ebuild b/media-libs/libmediainfo/libmediainfo-0.7.73.ebuild
new file mode 100644
index 000000000000..b696e04678a7
--- /dev/null
+++ b/media-libs/libmediainfo/libmediainfo-0.7.73.ebuild
@@ -0,0 +1,79 @@
+# 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
+
+MY_PN="MediaInfo"
+DESCRIPTION="MediaInfo libraries"
+HOMEPAGE="http://mediaarea.net/mediainfo/"
+SRC_URI="mirror://sourceforge/mediainfo/${PN}_${PV}.tar.bz2"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="curl doc mms static-libs"
+
+RDEPEND="sys-libs/zlib
+ dev-libs/tinyxml2:=
+ >=media-libs/libzen-0.4.28[static-libs=]
+ curl? ( net-misc/curl )
+ mms? ( >=media-libs/libmms-0.6.1[static-libs=] )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+S=${WORKDIR}/${MY_PN}Lib/Project/GNU/Library
+
+src_prepare() {
+ sed -i 's:-O2::' configure.ac || die
+ append-cppflags -DMEDIAINFO_LIBMMS_DESCRIBE_SUPPORT=0
+
+ epatch "${FILESDIR}"/${PN}-0.7.63-pkgconfig.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --enable-shared \
+ --with-libtinyxml2 \
+ $(use_with curl libcurl) \
+ $(use_with mms libmms) \
+ $(use_enable static-libs static) \
+ $(use_enable static-libs staticlibs)
+}
+
+src_compile() {
+ default
+
+ if use doc; then
+ cd "${WORKDIR}"/${MY_PN}Lib/Source/Doc
+ doxygen Doxyfile || die
+ fi
+}
+
+src_install() {
+ default
+
+ edos2unix ${PN}.pc #414545
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins ${PN}.pc
+
+ for x in ./ Archive Audio Duplicate Export Image Multiple Reader Tag Text Video; do
+ insinto /usr/include/${MY_PN}/${x}
+ doins "${WORKDIR}"/${MY_PN}Lib/Source/${MY_PN}/${x}/*.h
+ done
+
+ insinto /usr/include/${MY_PN}DLL
+ doins "${WORKDIR}"/${MY_PN}Lib/Source/${MY_PN}DLL/*.h
+
+ dodoc "${WORKDIR}"/${MY_PN}Lib/*.txt
+ if use doc; then
+ dohtml -r "${WORKDIR}"/${MY_PN}Lib/Doc/*
+ fi
+
+ prune_libtool_files
+}
diff --git a/media-libs/libmediainfo/metadata.xml b/media-libs/libmediainfo/metadata.xml
new file mode 100644
index 000000000000..7cc6e853becc
--- /dev/null
+++ b/media-libs/libmediainfo/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-libs/libmetalink/Manifest b/media-libs/libmetalink/Manifest
new file mode 100644
index 000000000000..0f50d8c972aa
--- /dev/null
+++ b/media-libs/libmetalink/Manifest
@@ -0,0 +1,2 @@
+DIST libmetalink-0.1.0.tar.bz2 324033 SHA256 501c980b0892e1c25bd20f0c69a166672571caf56a732d73851ff3e6a2eb0cf6 SHA512 50d6dd0a7def447261d44a586a2971b646f69d82e67e7c181c01a876e9177f164f3e9d67268dd0064b6b4ba9555ce2932eb9753e2d291f5263f5622af6e06bda WHIRLPOOL 6070a0578a555b8c11b0e6da69f768da13832467cfe50a552775d03af9df0f400470ed9cdc043aac5e9a7fabec1b721bcfd14cfe3828440d5c59898ca62f5eb8
+DIST libmetalink-0.1.1.tar.bz2 324472 SHA256 fd6d45c84c10cbc7a6e1b0ebbd81198a01866fa88cd01ceb2b0c448f5e74bcfb SHA512 9e9a2bf17b3696b199844703377cf6615bab44fd61b89be9afef579c21b0ac462f156719f60df9b8e7f7a9edb259d9bf461f20cd11ad9960d8376bf20e04f62c WHIRLPOOL 8ac61f6c4e739d752c5a7547bc9894d9a4a1bf5085cc67eda30d0d8cf14ffb1790f122b9a452452f91319400c10a31dd9995ea422148adc6d666db2392606962
diff --git a/media-libs/libmetalink/libmetalink-0.1.0-r1.ebuild b/media-libs/libmetalink/libmetalink-0.1.0-r1.ebuild
new file mode 100644
index 000000000000..b7db60f17a4e
--- /dev/null
+++ b/media-libs/libmetalink/libmetalink-0.1.0-r1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit base
+
+DESCRIPTION="Library for handling Metalink files"
+HOMEPAGE="http://launchpad.net/libmetalink"
+SRC_URI="https://launchpad.net/${PN}/trunk/${P}/+download/${P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 arm hppa ppc ppc64 x86"
+IUSE="expat static-libs test xml"
+
+RDEPEND="expat? ( dev-libs/expat )
+ xml? ( >=dev-libs/libxml2-2.6.24 )"
+DEPEND="${RDEPEND}
+ test? ( dev-util/cunit )"
+
+REQUIRED_USE="^^ ( expat xml )"
+
+src_configure() {
+ econf \
+ $(use_with expat libexpat) \
+ $(use_with xml libxml2) \
+ $(use_enable static-libs static)
+}
diff --git a/media-libs/libmetalink/libmetalink-0.1.1-r1.ebuild b/media-libs/libmetalink/libmetalink-0.1.1-r1.ebuild
new file mode 100644
index 000000000000..74497392f54a
--- /dev/null
+++ b/media-libs/libmetalink/libmetalink-0.1.1-r1.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 multilib-minimal
+
+DESCRIPTION="Library for handling Metalink files"
+HOMEPAGE="http://launchpad.net/libmetalink"
+SRC_URI="https://launchpad.net/${PN}/trunk/${P}/+download/${P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 arm hppa ppc ppc64 x86"
+IUSE="expat static-libs test xml"
+
+RDEPEND="expat? ( >=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}] )
+ xml? ( >=dev-libs/libxml2-2.9.1-r4[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ test? ( >=dev-util/cunit-2.1_p2[${MULTILIB_USEDEP}] )"
+
+REQUIRED_USE="^^ ( expat xml )"
+
+multilib_src_configure() {
+ ECONF_SOURCE=${S} \
+ econf \
+ $(use_with expat libexpat) \
+ $(use_with xml libxml2) \
+ $(use_enable static-libs static)
+}
diff --git a/media-libs/libmetalink/libmetalink-0.1.1.ebuild b/media-libs/libmetalink/libmetalink-0.1.1.ebuild
new file mode 100644
index 000000000000..5e1f53bcc4b5
--- /dev/null
+++ b/media-libs/libmetalink/libmetalink-0.1.1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+DESCRIPTION="Library for handling Metalink files"
+HOMEPAGE="http://launchpad.net/libmetalink"
+SRC_URI="https://launchpad.net/${PN}/trunk/${P}/+download/${P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 arm hppa ppc ppc64 x86"
+IUSE="expat static-libs test xml"
+
+RDEPEND="expat? ( dev-libs/expat )
+ xml? ( >=dev-libs/libxml2-2.6.24 )"
+DEPEND="${RDEPEND}
+ test? ( dev-util/cunit )"
+
+REQUIRED_USE="^^ ( expat xml )"
+
+src_configure() {
+ econf \
+ $(use_with expat libexpat) \
+ $(use_with xml libxml2) \
+ $(use_enable static-libs static)
+}
diff --git a/media-libs/libmetalink/metadata.xml b/media-libs/libmetalink/metadata.xml
new file mode 100644
index 000000000000..af537d205438
--- /dev/null
+++ b/media-libs/libmetalink/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>
+ <upstream>
+ <remote-id type="launchpad">libmetalink</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libmikmod/Manifest b/media-libs/libmikmod/Manifest
new file mode 100644
index 000000000000..fff1d968bacf
--- /dev/null
+++ b/media-libs/libmikmod/Manifest
@@ -0,0 +1,4 @@
+DIST libmikmod-3.2.0.tar.gz 873258 SHA256 734c8490bbf9b0c587920b92414dcfa3c2267838a0cdf698d5f1fb6bba8f661e SHA512 1f48adb4e1540bb9d2ea90c2f1fd1fb2fc494ae2dd0a6bceb20a8f7f7101f37f8c967b0ce36d5e09943d3afe9319f533867d80e5b5552439d300691bee70e33d WHIRLPOOL f7a7aed29026c66abb9e0f2bfb5d703ad5a0cab7bc0454bf5e612ed995808a2d02361eda33c7bbe0e7aaef6aa9ba5f1ed0d6eaf2853a2d6b497c6359043804c3
+DIST libmikmod-3.3.5.tar.gz 1288856 SHA256 b714ee340a04e6867f60246f679e0f40063b92f99269b6b715c8bf19ad469fb6 SHA512 ded555754dcc582a112386ad80c11a29c77d696a184a593964449a6c2c024da5d4cc59133a20d0e0e18a6fbad710a5d8ff567527654c91dff06e070749442aab WHIRLPOOL 30a72a0239257b511d1c2805b5812a57ec271263bbd306e327583a1ac0c8f83b31cdf0ff39846ddd72b650ad122ded2ea741dfdb16f6d43979a49f3c5fe2844e
+DIST libmikmod-3.3.6.tar.gz 1288510 SHA256 3f363e03f7b1db75b9b6602841bbd440ed275a548e53545f980df8155de4d330 SHA512 708008d162bac1a17b090a3a56e3078bb3ce42cb0d54b1e57963881d060198e841654ec7a72212aa9dc0e5c8bd95ec1c41ddd58e2db8c6e91a29d22d7bf363a0 WHIRLPOOL 42c0a1f88620fffc4099f87ed04fc5ad1d308bce86e2df085365a3d2624d801cf27dc3c28ec054ab7c4763af4af09d16c9f44e848b4ee23b7efd09ebfa4268d0
+DIST libmikmod-3.3.7.tar.gz 1226732 SHA256 4cf41040a9af99cb960580210ba900c0a519f73ab97b503c780e82428b9bd9a2 SHA512 3d2db6d0838a957f073f43f81e8ee20d803e5103e71bcbf7bb08f8a7776a77be50958522fc48e3ea9c20ee20a5a60eda8a66cd403f382ebd6c7910c6325dd4e9 WHIRLPOOL 708032fddc2260e52baee07dc00c45ac3dd0936d1c0f3f3b131dd3627fa7e1f0c699ab8184863f6435286ea4e1f83599cac76ce985ebd92a2d15ab7844d83fdf
diff --git a/media-libs/libmikmod/files/3.2.0/001_all_64bit.patch b/media-libs/libmikmod/files/3.2.0/001_all_64bit.patch
new file mode 100644
index 000000000000..5aa45566c30c
--- /dev/null
+++ b/media-libs/libmikmod/files/3.2.0/001_all_64bit.patch
@@ -0,0 +1,26 @@
+http://pkgs.fedoraproject.org/cgit/libmikmod.git/tree/libmikmod-64bit.patch
+
+--- include/mikmod.h.in
++++ include/mikmod.h.in
+@@ -85,7 +85,8 @@ typedef char CHAR;
+
+ @DOES_NOT_HAVE_SIGNED@
+
+-#if defined(__arch64__) || defined(__alpha) || defined(__x86_64) || defined(__powerpc64__)
++#include <stdint.h>
++#if __WORDSIZE == 64
+ /* 64 bit architectures */
+
+ typedef signed char SBYTE; /* 1 byte, signed */
+--- include/mikmod_internals.h
++++ include/mikmod_internals.h
+@@ -43,7 +43,8 @@ extern "C" {
+ /*========== More type definitions */
+
+ /* SLONGLONG: 64bit, signed */
+-#if defined (__arch64__) || defined(__alpha) || defined (__x64_64) || defined (_LP64) || defined (__powerpc64__)
++#include <stdint.h>
++#if __WORDSIZE == 64
+ typedef long SLONGLONG;
+ #define NATIVE_64BIT_INT
+ #elif defined(__WATCOMC__)
diff --git a/media-libs/libmikmod/files/3.2.0/002_all_strip-lib.patch b/media-libs/libmikmod/files/3.2.0/002_all_strip-lib.patch
new file mode 100644
index 000000000000..beef6129f7af
--- /dev/null
+++ b/media-libs/libmikmod/files/3.2.0/002_all_strip-lib.patch
@@ -0,0 +1,13 @@
+http://pkgs.fedoraproject.org/cgit/libmikmod.git/tree/libmikmod-strip-lib.patch
+
+--- libmikmod/Makefile.in
++++ libmikmod/Makefile.in
+@@ -51,7 +51,7 @@
+
+ install: $(LIB)
+ $(MKINSTALLDIRS) $(DESTDIR)$(libdir)
+- $(LIBTOOL) --mode=install $(INSTALL) -m 644 $(LIB) $(DESTDIR)$(libdir)
++ $(LIBTOOL) --mode=install $(INSTALL) -m 755 $(LIB) $(DESTDIR)$(libdir)
+
+ uninstall: $(LIB)
+ $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(LIB)
diff --git a/media-libs/libmikmod/files/3.2.0/003_all_multilib.patch b/media-libs/libmikmod/files/3.2.0/003_all_multilib.patch
new file mode 100644
index 000000000000..be2483857fd4
--- /dev/null
+++ b/media-libs/libmikmod/files/3.2.0/003_all_multilib.patch
@@ -0,0 +1,35 @@
+http://pkgs.fedoraproject.org/cgit/libmikmod.git/tree/libmikmod-multilib.patch
+
+--- libmikmod-config.in
++++ libmikmod-config.in
+@@ -5,7 +5,7 @@
+ exec_prefix_set=no
+
+ usage="\
+-Usage: libmikmod-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cflags] [--ldadd]"
++Usage: libmikmod-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--libs32] [--libs64] [--cflags] [--ldadd]"
+
+ if test $# -eq 0 ; then
+ echo "${usage}" 1>&2
+@@ -49,9 +49,21 @@
+ echo @LIB_LDADD@
+ ;;
+ --libs)
++ if [ -d /usr/lib64 ]; then
++ libdir=-L${exec_prefix}/lib64
++ else
++ libdir=-L${exec_prefix}/lib
++ fi
++ echo $libdir -lmikmod @LIBRARY_LIB@
++ ;;
++ --libs32)
+ libdir=-L${exec_prefix}/lib
+ echo $libdir -lmikmod @LIBRARY_LIB@
+ ;;
++ --libs64)
++ libdir=-L${exec_prefix}/lib64
++ echo $libdir -lmikmod @LIBRARY_LIB@
++ ;;
+ *)
+ echo "${usage}" 1>&2
+ exit 1
diff --git a/media-libs/libmikmod/files/3.2.0/004_all_malloc-fail.patch b/media-libs/libmikmod/files/3.2.0/004_all_malloc-fail.patch
new file mode 100644
index 000000000000..9214df87d72e
--- /dev/null
+++ b/media-libs/libmikmod/files/3.2.0/004_all_malloc-fail.patch
@@ -0,0 +1,22 @@
+http://pkgs.fedoraproject.org/cgit/libmikmod.git/tree/libmikmod-malloc-fail.patch
+
+Some partially corrupt mod files cause mikmod to try and allocate lots
+of memory, this is ok, because failure to do so is being handled.
+
+But the new libmikmod malloc code align_pointer function did not handle
+asking to align the NULL pointer, resulting from the too big alloc,
+causing a segfault, this patch fixes this.
+
+--- mmio/mmalloc.c
++++ mmio/mmalloc.c
+@@ -38,6 +38,10 @@ static void * align_pointer(char *ptr, s
+ {
+ char *pptr = ptr + sizeof(void*);
+ char *fptr;
++
++ if (ptr == NULL)
++ return NULL;
++
+ size_t err = ((size_t)pptr)&(stride-1);
+ if (err)
+ fptr = pptr + (stride - err);
diff --git a/media-libs/libmikmod/files/3.2.0/005_all_CVE-2007-6720.patch b/media-libs/libmikmod/files/3.2.0/005_all_CVE-2007-6720.patch
new file mode 100644
index 000000000000..a49c50a56da6
--- /dev/null
+++ b/media-libs/libmikmod/files/3.2.0/005_all_CVE-2007-6720.patch
@@ -0,0 +1,109 @@
+--- playercode/mplayer.c
++++ playercode/mplayer.c
+@@ -50,6 +50,8 @@ extern long int random(void);
+ /* The currently playing module */
+ MODULE *pf = NULL;
+
++#define NUMVOICES(mod) (md_sngchn < (mod)->numvoices ? md_sngchn : (mod)->numvoices)
++
+ #define HIGH_OCTAVE 2 /* number of above-range octaves */
+
+ static UWORD oldperiods[OCTAVE*2]={
+@@ -246,14 +248,14 @@ static int MP_FindEmptyChannel(MODULE *m
+ MP_VOICE *a;
+ ULONG t,k,tvol,pp;
+
+- for (t=0;t<md_sngchn;t++)
++ for (t=0;t<NUMVOICES(mod);t++)
+ if (((mod->voice[t].main.kick==KICK_ABSENT)||
+ (mod->voice[t].main.kick==KICK_ENV))&&
+ Voice_Stopped_internal(t))
+ return t;
+
+ tvol=0xffffffUL;t=-1;a=mod->voice;
+- for (k=0;k<md_sngchn;k++,a++) {
++ for (k=0;k<NUMVOICES(mod);k++,a++) {
+ /* allow us to take over a nonexisting sample */
+ if (!a->main.s)
+ return k;
+@@ -2247,12 +2249,12 @@ static void DoNNAEffects(MODULE *mod, MP
+
+ switch (dat) {
+ case 0x0: /* past note cut */
+- for (t=0;t<md_sngchn;t++)
++ for (t=0;t<NUMVOICES(mod);t++)
+ if (mod->voice[t].master==a)
+ mod->voice[t].main.fadevol=0;
+ break;
+ case 0x1: /* past note off */
+- for (t=0;t<md_sngchn;t++)
++ for (t=0;t<NUMVOICES(mod);t++)
+ if (mod->voice[t].master==a) {
+ mod->voice[t].main.keyoff|=KEY_OFF;
+ if ((!(mod->voice[t].venv.flg & EF_ON))||
+@@ -2261,7 +2263,7 @@ static void DoNNAEffects(MODULE *mod, MP
+ }
+ break;
+ case 0x2: /* past note fade */
+- for (t=0;t<md_sngchn;t++)
++ for (t=0;t<NUMVOICES(mod);t++)
+ if (mod->voice[t].master==a)
+ mod->voice[t].main.keyoff|=KEY_FADE;
+ break;
+@@ -2316,7 +2318,7 @@ void pt_UpdateVoices(MODULE *mod, int ma
+ SAMPLE *s;
+
+ mod->totalchn=mod->realchn=0;
+- for (channel=0;channel<pf->numchn;channel++) {
++ for (channel=0;channel<NUMVOICES(mod);channel++) {
+ aout=&mod->voice[channel];
+ i=aout->main.i;
+ s=aout->main.s;
+@@ -2737,7 +2739,7 @@ void pt_NNA(MODULE *mod)
+ if (a->dct!=DCT_OFF) {
+ int t;
+
+- for (t=0;t<md_sngchn;t++)
++ for (t=0;t<NUMVOICES(mod);t++)
+ if ((!Voice_Stopped_internal(t))&&
+ (mod->voice[t].masterchn==channel)&&
+ (a->main.sample==mod->voice[t].main.sample)) {
+@@ -2979,6 +2981,11 @@ BOOL Player_Init(MODULE* mod)
+ if (!(mod->voice=(MP_VOICE*)MikMod_calloc(md_sngchn,sizeof(MP_VOICE))))
+ return 1;
+
++ /* mod->numvoices was used during loading to clamp md_sngchn.
++ After loading it's used to remember how big mod->voice is.
++ */
++ mod->numvoices = md_sngchn;
++
+ Player_Init_internal(mod);
+ return 0;
+ }
+@@ -3087,7 +3094,7 @@ MIKMODAPI void Player_NextPosition(void)
+ pf->patbrk=0;
+ pf->vbtick=pf->sngspd;
+
+- for (t=0;t<pf->numchn;t++) {
++ for (t=0;t<NUMVOICES(pf);t++) {
+ Voice_Stop_internal(t);
+ pf->voice[t].main.i=NULL;
+ pf->voice[t].main.s=NULL;
+@@ -3112,7 +3119,7 @@ MIKMODAPI void Player_PrevPosition(void)
+ pf->patbrk=0;
+ pf->vbtick=pf->sngspd;
+
+- for (t=0;t<pf->numchn;t++) {
++ for (t=0;t<NUMVOICES(pf);t++) {
+ Voice_Stop_internal(t);
+ pf->voice[t].main.i=NULL;
+ pf->voice[t].main.s=NULL;
+@@ -3139,7 +3146,7 @@ MIKMODAPI void Player_SetPosition(UWORD
+ pf->sngpos=pos;
+ pf->vbtick=pf->sngspd;
+
+- for (t=0;t<pf->numchn;t++) {
++ for (t=0;t<NUMVOICES(pf);t++) {
+ Voice_Stop_internal(t);
+ pf->voice[t].main.i=NULL;
+ pf->voice[t].main.s=NULL;
diff --git a/media-libs/libmikmod/files/3.2.0/006_all_CVE-2009-0179.patch b/media-libs/libmikmod/files/3.2.0/006_all_CVE-2009-0179.patch
new file mode 100644
index 000000000000..f70c35e0bfe8
--- /dev/null
+++ b/media-libs/libmikmod/files/3.2.0/006_all_CVE-2009-0179.patch
@@ -0,0 +1,12 @@
+--- loaders/load_xm.c
++++ loaders/load_xm.c
+@@ -611,7 +611,8 @@ static BOOL LoadInstruments(void)
+ nextwav[of.numsmp+u]=next;
+ next+=s->length;
+
+- if(_mm_eof(modreader)) {
++ /* last instrument is at the end of file in version 0x0104 */
++ if(_mm_eof(modreader) && (mh->version<0x0104 || t<of.numins-1)) {
+ MikMod_free(nextwav);MikMod_free(wh);
+ nextwav=NULL;wh=NULL;
+ _mm_errno = MMERR_LOADING_SAMPLEINFO;
diff --git a/media-libs/libmikmod/files/3.2.0/007_all_loopingvolume-fix.patch b/media-libs/libmikmod/files/3.2.0/007_all_loopingvolume-fix.patch
new file mode 100644
index 000000000000..a6ccdb8784d2
--- /dev/null
+++ b/media-libs/libmikmod/files/3.2.0/007_all_loopingvolume-fix.patch
@@ -0,0 +1,21 @@
+Yi-Huang Han (24 Oct 2001)
+ * Fixed MOD music volume when looping
+
+Samuli Suominen (17 Nov 2012)
+ * Refresh the patch against libmikmod 3.2.0 release since it didn't make it upstream
+ $ wget http://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-1.2.12.tar.gz
+ $ tar -vzxf SDL_mixer-1.2.12.tar.gz (or "tar xf" with GNU tar)
+ $ unzip libmikmod-3.1.12.zip
+ $ ls -l libmikmod-3.1.12-loopingvolume-fix.diff
+
+--- playercode/mplayer.c
++++ playercode/mplayer.c
+@@ -3013,7 +3013,7 @@
+ {
+ MUTEX_LOCK(vars);
+ if (pf)
+- pf->volume=(volume<0)?0:(volume>128)?128:volume;
++ pf->volume=pf->initvolume=(volume<0)?0:(volume>128)?128:volume;
+ MUTEX_UNLOCK(vars);
+ }
+
diff --git a/media-libs/libmikmod/files/3.2.0/008_all_ldflags.patch b/media-libs/libmikmod/files/3.2.0/008_all_ldflags.patch
new file mode 100644
index 000000000000..e85ca13ea6ec
--- /dev/null
+++ b/media-libs/libmikmod/files/3.2.0/008_all_ldflags.patch
@@ -0,0 +1,15 @@
+* Samuli Suominen (17 Nov 2012)
+ Reviewed libmikmod-3.2.0_beta2-autotools.patch from gentoo-x86 and only this
+ chunk didn't make it upstream
+
+--- libmikmod/Makefile.in
++++ libmikmod/Makefile.in
+@@ -73,7 +73,7 @@
+ rm -f Makefile
+
+ $(LIB): $(OBJ)
+- $(LIBTOOL) --mode=link $(CC) -version-info 3:0:0 -o $@ $(OBJ) $(LIBRARY_LIB) -rpath $(DESTDIR)$(libdir)
++ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -version-info 3:0:0 -o $@ $(OBJ) $(LIBRARY_LIB) -rpath $(DESTDIR)$(libdir)
+
+ dl_hpux.lo: $(top_srcdir)/dlapi/dl_hpux.c \
+ $(top_srcdir)/dlapi/dlfcn.h
diff --git a/media-libs/libmikmod/files/3.2.0/009_all_shell.patch b/media-libs/libmikmod/files/3.2.0/009_all_shell.patch
new file mode 100644
index 000000000000..af4a2f6e0261
--- /dev/null
+++ b/media-libs/libmikmod/files/3.2.0/009_all_shell.patch
@@ -0,0 +1,17 @@
+Upstream didn't ship Makefile.am so we have to patch bits by hands.
+$(SHELL) is needed to run libtool properly (contains bashisms).
+LIBTOOL variable uses $(SHELL) in it's definition.
+
+Gentoo-bug: http://bugs.gentoo.org/401329
+Reported by: Anthony Parsons
+
+--- libmikmod/Makefile.in
++++ libmikmod/Makefile.in
+@@ -27,6 +27,7 @@ CC=@CC@
+ INSTALL=@INSTALL@
+ LIBTOOL=@LIBTOOL@
+ MKINSTALLDIRS=${top_srcdir}/mkinstalldirs
++SHELL=@SHELL@
+
+ DEFS=@DEFS@
+ CFLAGS=@CFLAGS@ -Dunix
diff --git a/media-libs/libmikmod/files/3.2.0/010_all_altivec.patch b/media-libs/libmikmod/files/3.2.0/010_all_altivec.patch
new file mode 100644
index 000000000000..5159634c0fc7
--- /dev/null
+++ b/media-libs/libmikmod/files/3.2.0/010_all_altivec.patch
@@ -0,0 +1,13 @@
+http://bugs.gentoo.org/show_bug.cgi?id=445556#c2
+
+--- configure.in
++++ configure.in
+@@ -724,7 +724,7 @@
+ ;;
+ Linux)
+ dnl force_cpusubtype_ALL not allowed for Linux as
+- CFLAGS="$CFLAGS -faltivec"
++ CFLAGS="$CFLAGS -maltivec"
+ ;;
+ esac
+ fi
diff --git a/media-libs/libmikmod/libmikmod-3.2.0.ebuild b/media-libs/libmikmod/libmikmod-3.2.0.ebuild
new file mode 100644
index 000000000000..7b78d6c1eae1
--- /dev/null
+++ b/media-libs/libmikmod/libmikmod-3.2.0.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils multilib
+
+DESCRIPTION="A library to play a wide range of module formats"
+HOMEPAGE="http://mikmod.shlomifish.org/"
+SRC_URI="http://mikmod.shlomifish.org/files/${P}.tar.gz"
+
+LICENSE="LGPL-2+ LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="+alsa coreaudio oss static-libs"
+
+REQUIRED_USE="|| ( alsa oss coreaudio )"
+
+RDEPEND="alsa? ( media-libs/alsa-lib )
+ !${CATEGORY}/${PN}:2"
+DEPEND="${RDEPEND}
+ oss? ( virtual/os-headers )"
+
+DOCS="AUTHORS NEWS README TODO"
+
+src_prepare() {
+ EPATCH_SOURCE="${FILESDIR}"/${PVR} EPATCH_SUFFIX=patch epatch
+ sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' configure.in || die #468212
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable alsa) \
+ --disable-nas \
+ $(use_enable coreaudio osx) \
+ $(use_enable oss) \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ dohtml docs/*.html
+
+ prune_libtool_files
+ dosym ${PN}$(get_libname 3) /usr/$(get_libdir)/${PN}$(get_libname 2)
+
+ cat <<-EOF > "${T}"/${PN}.pc
+ prefix=/usr
+ exec_prefix=\${prefix}
+ libdir=/usr/$(get_libdir)
+ includedir=\${prefix}/include
+ Name: ${PN}
+ Description: ${DESCRIPTION}
+ Version: ${PV}
+ Libs: -L\${libdir} -lmikmod
+ Libs.private: -ldl -lm
+ Cflags: -I\${includedir} $("${ED}"/usr/bin/libmikmod-config --cflags)
+ EOF
+
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins "${T}"/${PN}.pc
+}
diff --git a/media-libs/libmikmod/libmikmod-3.3.5.ebuild b/media-libs/libmikmod/libmikmod-3.3.5.ebuild
new file mode 100644
index 000000000000..00ab6d4eb135
--- /dev/null
+++ b/media-libs/libmikmod/libmikmod-3.3.5.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils multilib-minimal
+
+DESCRIPTION="A library to play a wide range of module formats"
+HOMEPAGE="http://mikmod.sourceforge.net/"
+SRC_URI="mirror://sourceforge/mikmod/${P}.tar.gz"
+
+LICENSE="LGPL-2+ LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ~ia64 ~mips ppc ~ppc64 ~sh ~sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="+alsa altivec coreaudio debug nas openal oss pulseaudio cpu_flags_x86_sse2 static-libs +threads"
+
+REQUIRED_USE="|| ( alsa oss coreaudio )"
+
+RDEPEND="alsa? ( >=media-libs/alsa-lib-1.0.27.2:=[${MULTILIB_USEDEP}] )
+ nas? ( >=media-libs/nas-1.9.4:=[${MULTILIB_USEDEP}] )
+ openal? ( >=media-libs/openal-1.15.1-r1[${MULTILIB_USEDEP}] )
+ pulseaudio? ( >=media-sound/pulseaudio-5.0[${MULTILIB_USEDEP}] )
+ !${CATEGORY}/${PN}:2
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-soundlibs-20130224-r3
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}
+ oss? ( virtual/os-headers )"
+
+multilib_src_configure() {
+ local mysimd="--disable-simd"
+ if use ppc || use ppc64 || use ppc-macos; then
+ mysimd="$(use_enable altivec simd)"
+ fi
+ if use amd64 || use x86 || use x86-fbsd || use x86-freebsd || use amd64-linux || use x86-linux || use x86-macos; then
+ mysimd="$(use_enable cpu_flags_x86_sse2 simd)"
+ fi
+
+ # sdl, sdl2: missing multilib supported ebuilds, temporarily disabled
+ ECONF_SOURCE=${S} \
+ econf \
+ $(use_enable alsa) \
+ $(use_enable nas) \
+ $(use_enable pulseaudio) \
+ --disable-sdl \
+ --disable-sdl2 \
+ $(use_enable openal) \
+ $(use_enable oss) \
+ $(use_enable coreaudio osx) \
+ $(use_enable debug) \
+ $(use_enable threads) \
+ $(use_enable static-libs static) \
+ --disable-dl \
+ ${mysimd}
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+ dosym ${PN}$(get_libname 3) /usr/$(get_libdir)/${PN}$(get_libname 2)
+}
+
+multilib_src_install_all() {
+ dodoc AUTHORS NEWS README TODO
+ dohtml docs/*.html
+ prune_libtool_files
+}
diff --git a/media-libs/libmikmod/libmikmod-3.3.6-r1.ebuild b/media-libs/libmikmod/libmikmod-3.3.6-r1.ebuild
new file mode 100644
index 000000000000..44bdc9e9c483
--- /dev/null
+++ b/media-libs/libmikmod/libmikmod-3.3.6-r1.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils multilib-minimal
+
+DESCRIPTION="A library to play a wide range of module formats"
+HOMEPAGE="http://mikmod.sourceforge.net/"
+SRC_URI="mirror://sourceforge/mikmod/${P}.tar.gz"
+
+LICENSE="LGPL-2+ LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="+alsa altivec coreaudio debug nas openal oss pulseaudio cpu_flags_x86_sse2 static-libs +threads"
+
+REQUIRED_USE="|| ( alsa coreaudio nas openal oss pulseaudio )"
+
+RDEPEND="alsa? ( >=media-libs/alsa-lib-1.0.27.2:=[${MULTILIB_USEDEP}] )
+ nas? ( >=media-libs/nas-1.9.4:=[${MULTILIB_USEDEP}] )
+ openal? ( >=media-libs/openal-1.15.1-r1[${MULTILIB_USEDEP}] )
+ pulseaudio? ( >=media-sound/pulseaudio-5.0[${MULTILIB_USEDEP}] )
+ !${CATEGORY}/${PN}:2
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-soundlibs-20130224-r3
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}
+ oss? ( virtual/os-headers )"
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/libmikmod-config
+)
+
+multilib_src_configure() {
+ local mysimd="--disable-simd"
+ if use ppc || use ppc64 || use ppc-macos; then
+ mysimd="$(use_enable altivec simd)"
+ fi
+ if use amd64 || use x86 || use x86-fbsd || use x86-freebsd || use amd64-linux || use x86-linux || use x86-macos; then
+ mysimd="$(use_enable cpu_flags_x86_sse2 simd)"
+ fi
+
+ # sdl, sdl2: missing multilib supported ebuilds, temporarily disabled, remember to update REQUIRED_USE
+ ECONF_SOURCE=${S} \
+ econf \
+ $(use_enable alsa) \
+ $(use_enable nas) \
+ $(use_enable pulseaudio) \
+ --disable-sdl \
+ --disable-sdl2 \
+ $(use_enable openal) \
+ $(use_enable oss) \
+ $(use_enable coreaudio osx) \
+ $(use_enable debug) \
+ $(use_enable threads) \
+ $(use_enable static-libs static) \
+ --disable-dl \
+ ${mysimd}
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+ dosym ${PN}$(get_libname 3) /usr/$(get_libdir)/${PN}$(get_libname 2)
+}
+
+multilib_src_install_all() {
+ dodoc AUTHORS NEWS README TODO
+ dohtml docs/*.html
+ prune_libtool_files
+}
diff --git a/media-libs/libmikmod/libmikmod-3.3.7.ebuild b/media-libs/libmikmod/libmikmod-3.3.7.ebuild
new file mode 100644
index 000000000000..0158991114e7
--- /dev/null
+++ b/media-libs/libmikmod/libmikmod-3.3.7.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils multilib-minimal
+
+DESCRIPTION="A library to play a wide range of module formats"
+HOMEPAGE="http://mikmod.sourceforge.net/"
+SRC_URI="mirror://sourceforge/mikmod/${P}.tar.gz"
+
+LICENSE="LGPL-2+ LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ~ia64 ~mips ppc ~ppc64 ~sh sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="+alsa altivec coreaudio debug nas openal oss pulseaudio cpu_flags_x86_sse2 static-libs +threads"
+
+REQUIRED_USE="|| ( alsa coreaudio nas openal oss pulseaudio )"
+
+RDEPEND="alsa? ( >=media-libs/alsa-lib-1.0.27.2:=[${MULTILIB_USEDEP}] )
+ nas? ( >=media-libs/nas-1.9.4:=[${MULTILIB_USEDEP}] )
+ openal? ( >=media-libs/openal-1.15.1-r1[${MULTILIB_USEDEP}] )
+ pulseaudio? ( >=media-sound/pulseaudio-5.0[${MULTILIB_USEDEP}] )
+ !${CATEGORY}/${PN}:2
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-soundlibs-20130224-r3
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}
+ sys-apps/texinfo
+ oss? ( virtual/os-headers )"
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/libmikmod-config
+)
+
+multilib_src_configure() {
+ local mysimd="--disable-simd"
+ if use ppc || use ppc64 || use ppc-macos; then
+ mysimd="$(use_enable altivec simd)"
+ fi
+ if use amd64 || use x86 || use x86-fbsd || use x86-freebsd || use amd64-linux || use x86-linux || use x86-macos; then
+ mysimd="$(use_enable cpu_flags_x86_sse2 simd)"
+ fi
+
+ # sdl, sdl2: missing multilib supported ebuilds, temporarily disabled, remember to update REQUIRED_USE
+ ECONF_SOURCE=${S} \
+ econf \
+ $(use_enable alsa) \
+ $(use_enable nas) \
+ $(use_enable pulseaudio) \
+ --disable-sdl \
+ --disable-sdl2 \
+ $(use_enable openal) \
+ $(use_enable oss) \
+ $(use_enable coreaudio osx) \
+ $(use_enable debug) \
+ $(use_enable threads) \
+ $(use_enable static-libs static) \
+ --disable-dl \
+ ${mysimd}
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+ dosym ${PN}$(get_libname 3) /usr/$(get_libdir)/${PN}$(get_libname 2)
+}
+
+multilib_src_install_all() {
+ dodoc AUTHORS NEWS README TODO
+ dohtml docs/*.html
+ prune_libtool_files
+}
diff --git a/media-libs/libmikmod/metadata.xml b/media-libs/libmikmod/metadata.xml
new file mode 100644
index 000000000000..b86266440788
--- /dev/null
+++ b/media-libs/libmikmod/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>sound</herd>
+ <upstream>
+ <remote-id type="sourceforge">mikmod</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libmimic/Manifest b/media-libs/libmimic/Manifest
new file mode 100644
index 000000000000..2dac852d2f35
--- /dev/null
+++ b/media-libs/libmimic/Manifest
@@ -0,0 +1 @@
+DIST libmimic-1.0.4.tar.gz 331326 SHA256 bd7b9bd52ee7bf25df46f6d3d0ed896d212fc3d96907ac1b01d3d126a48bbb34 SHA512 2754aa7d8dd1bc62a72a03646417c295e0711cd5ceb612ad301147579be3e17efcda504fa4d934969e62a9d2c9bdea7294a9eff751c847616620896264594607 WHIRLPOOL a88e1ccaece257858dee1da94a3d31055b8c3e70a19703c9f26a261db71f90e6ab004fb78a27f84d7394d42f419b7a5f667480c17bcce048712bde6cca4900bd
diff --git a/media-libs/libmimic/libmimic-1.0.4-r2.ebuild b/media-libs/libmimic/libmimic-1.0.4-r2.ebuild
new file mode 100644
index 000000000000..c61fc493283a
--- /dev/null
+++ b/media-libs/libmimic/libmimic-1.0.4-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"
+
+inherit multilib-minimal
+
+DESCRIPTION="Video encoding/decoding library for the codec used by msn"
+HOMEPAGE="http://farsight.sourceforge.net/"
+SRC_URI="mirror://sourceforge/farsight/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd"
+IUSE="doc static-libs"
+
+RDEPEND=">=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}]
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20130224-r8
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+DOCS=( AUTHORS ChangeLog NEWS README )
+
+multilib_src_configure() {
+ local myconf="--disable-doxygen-docs"
+ multilib_is_native_abi && myconf="$(use_enable doc doxygen-docs)"
+
+ ECONF_SOURCE="${S}" econf \
+ $(use_enable static-libs static) \
+ ${myconf}
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+
+ if use doc && multilib_is_native_abi; then
+ dohtml doc/api/html/*
+ fi
+}
diff --git a/media-libs/libmimic/metadata.xml b/media-libs/libmimic/metadata.xml
new file mode 100644
index 000000000000..08a886b03501
--- /dev/null
+++ b/media-libs/libmimic/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">farsight</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libmkv/Manifest b/media-libs/libmkv/Manifest
new file mode 100644
index 000000000000..4ad96aace600
--- /dev/null
+++ b/media-libs/libmkv/Manifest
@@ -0,0 +1 @@
+DIST libmkv-0.6.5.1.tar.gz 32737 SHA256 41f08a08bab354f9834fda1dcdd1dcf4a0c67ad18021eb980f808654464cef00 SHA512 ce8046442d4e72536708b9820559a1b971a557e1eeee11e5974031df8ef24e2f1d0ab2b71933d191454f137a2dc042b771af9b0480633dca0f7977fd5b7b4a55 WHIRLPOOL a1dbf433b65497d9eef82e42345412ae60f429aff6c44902b6ea998024fd583bcc383f752a81852301bfe6f63f1ea4eb2796fcdfa33f0a25d334a3f792830774
diff --git a/media-libs/libmkv/libmkv-0.6.5.1.ebuild b/media-libs/libmkv/libmkv-0.6.5.1.ebuild
new file mode 100644
index 000000000000..e718c193fb97
--- /dev/null
+++ b/media-libs/libmkv/libmkv-0.6.5.1.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit autotools
+
+SRC_URI="https://github.com/saintdev/libmkv/archive/${PV}.tar.gz -> ${P}.tar.gz"
+DESCRIPTION="Lightweight Matroska muxer written for HandBrake"
+HOMEPAGE="https://github.com/saintdev/libmkv"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+
+src_prepare()
+{
+ eautoreconf
+}
diff --git a/media-libs/libmkv/metadata.xml b/media-libs/libmkv/metadata.xml
new file mode 100644
index 000000000000..5814958278f7
--- /dev/null
+++ b/media-libs/libmkv/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>
+ <longdescription>
+ Lightweight Matroska muxer written for HandBrake.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">saintdev/libmkv</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libmms/Manifest b/media-libs/libmms/Manifest
new file mode 100644
index 000000000000..129b381cc966
--- /dev/null
+++ b/media-libs/libmms/Manifest
@@ -0,0 +1,2 @@
+DIST libmms-0.6.2.tar.gz 340230 SHA256 01931b62172d7d7050fc9ef9b1b64162f3b6e9f6cc4415170192a32a0b7ea432 SHA512 c9cf6d30488d5e925eebaec7b23fe42a58144980f64563cf01a9d05bbf25893790a7fd38f215c63650b993621e7ed8173b6ba32b179df8908bcafe66f8bf6031 WHIRLPOOL f3d34e0917d07c8a713d25c4d5bae5a46d69aad5f01909d731792f4be7c24aa52e9c40429c527cc50293c7b1c7136838d897573d9f45feebfcda853376ecf3ff
+DIST libmms-0.6.4.tar.gz 356217 SHA256 3c05e05aebcbfcc044d9e8c2d4646cd8359be39a3f0ba8ce4e72a9094bee704f SHA512 9771c697515f5232eaeaff79e68fe15e34d8aa38aa5d3d68525216357223f314c544d71b5fe18d79a77682f41b1b5d9fb5e7c3c99d0cba5723d2e3de31faec96 WHIRLPOOL c52a51868c1b4fb116c1e59b02878fb3d6300072444f90c91dc5f6bc248f77a15790ae79aafa7bb64eacc45a226496057eb9aaac213a26779624bdf8839ec5e2
diff --git a/media-libs/libmms/libmms-0.6.2-r1.ebuild b/media-libs/libmms/libmms-0.6.2-r1.ebuild
new file mode 100644
index 000000000000..5ab70d05d83e
--- /dev/null
+++ b/media-libs/libmms/libmms-0.6.2-r1.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_PRUNE_LIBTOOL_FILES=all
+
+inherit autotools-multilib
+
+DESCRIPTION="Common library for accessing Microsoft Media Server (MMS) media streaming protocol"
+HOMEPAGE="http://sourceforge.net/projects/libmms/ http://launchpad.net/libmms/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm hppa ~ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux"
+IUSE="static-libs"
+
+RDEPEND=">=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}]
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20130224-r8
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS=( AUTHORS ChangeLog README )
diff --git a/media-libs/libmms/libmms-0.6.2.ebuild b/media-libs/libmms/libmms-0.6.2.ebuild
new file mode 100644
index 000000000000..bc816d27953e
--- /dev/null
+++ b/media-libs/libmms/libmms-0.6.2.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+DESCRIPTION="Common library for accessing Microsoft Media Server (MMS) media streaming protocol"
+HOMEPAGE="http://sourceforge.net/projects/libmms/ http://launchpad.net/libmms/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm hppa ~ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux"
+IUSE="static-libs"
+
+RDEPEND="dev-libs/glib:2"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_configure() {
+ econf \
+ --disable-dependency-tracking \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS ChangeLog README
+ find "${D}" -name '*.la' -exec rm -f '{}' +
+}
diff --git a/media-libs/libmms/libmms-0.6.4.ebuild b/media-libs/libmms/libmms-0.6.4.ebuild
new file mode 100644
index 000000000000..14c3f9542c43
--- /dev/null
+++ b/media-libs/libmms/libmms-0.6.4.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_PRUNE_LIBTOOL_FILES=all
+
+inherit autotools-multilib
+
+DESCRIPTION="Common library for accessing Microsoft Media Server (MMS) media streaming protocol"
+HOMEPAGE="http://sourceforge.net/projects/libmms/ http://launchpad.net/libmms/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux"
+IUSE="static-libs"
+
+RDEPEND="abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-medialibs-20130224-r8
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS=( AUTHORS ChangeLog README )
diff --git a/media-libs/libmms/metadata.xml b/media-libs/libmms/metadata.xml
new file mode 100644
index 000000000000..5ed47c256631
--- /dev/null
+++ b/media-libs/libmms/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>
+ <upstream>
+ <remote-id type="sourceforge">libmms</remote-id>
+ <remote-id type="launchpad">libmms</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libmng/Manifest b/media-libs/libmng/Manifest
new file mode 100644
index 000000000000..79616aaa535f
--- /dev/null
+++ b/media-libs/libmng/Manifest
@@ -0,0 +1,2 @@
+DIST libmng-2.0.2.tar.xz 951844 SHA256 278c04c781e5a679c91df006fee7e71233e6f15557aef513a19fe49cd650bc50 SHA512 76ff107df43297837e075a4b57dac75ece501a57060884720a22518d9514ad0af64d69d22fe12a92d3bce3e50ae8ca3c8081680535743d2bde9ae9fa11e32687 WHIRLPOOL 33d18313d8d317ae299f45c97944f6c6074e0c6fbe16f84950a4b6315235bdb382c4dfd1abec3071ee9b548b357fe63a7ee1697a5461df2a9c38d1fdef085634
+DIST libmng-2.0.3.tar.xz 951808 SHA256 4a462fdd48d4bc82c1d7a21106c8a18b62f8cc0042454323058e6da0dbb57dd3 SHA512 764efd94643c17c449abcb8f676ec2aa750a2461cf46bc961343f8d443a16ac2caa135c27d846deb2351b9f25d6170c42a500d21f63c13276905fdd743b8fec6 WHIRLPOOL b781cd6ac541aeb825f916f7384b1801f162a28b637c80a1950ca10a6daebd88d02f74548a9165c9183ff6dea0e9311f73a77cc2229560fa0c4d4c3b23696c1b
diff --git a/media-libs/libmng/files/libmng-2.0.2-jpeg-9a.patch b/media-libs/libmng/files/libmng-2.0.2-jpeg-9a.patch
new file mode 100644
index 000000000000..adb12c2d4a7f
--- /dev/null
+++ b/media-libs/libmng/files/libmng-2.0.2-jpeg-9a.patch
@@ -0,0 +1,39 @@
+http://bugs.gentoo.org/520906
+
+This kludge is unnecessary with jpeg-9a and is in fact breaking the build...
+
+libmng_jpeg.c:108:10: error: 'FALSE' undeclared (first use in this function)
+libmng_jpeg.c:536:48: error: 'TRUE' undeclared (first use in this function)
+libmng_jpeg_c:890:49: error: 'TRUE' undeclared (first use in this function)
+
+...because jmorecfg.h of jpeg-9a has this:
+
+#ifndef HAVE_BOOLEAN
+#if defined FALSE || defined TRUE || defined QGLOBAL_H
+/* Qt3 defines FALSE and TRUE as "const" variables in qglobal.h */
+typedef int boolean;
+#ifndef FALSE /* in case these macros already exist */
+#define FALSE 0 /* values of boolean */
+#endif
+#ifndef TRUE
+#define TRUE 1
+#endif
+#else
+typedef enum { FALSE = 0, TRUE = 1 } boolean;
+#endif
+#endif
+
+--- libmng_types.h
++++ libmng_types.h
+@@ -199,11 +199,6 @@
+ #undef FAR /* possibly defined by zlib or lcms */
+ #endif
+ #define JPEG_INTERNAL_OPTIONS /* for RGB_PIXELSIZE */
+-/* There has been a change in jpeg-9 : */
+-#ifndef _WIN32
+-#define HAVE_BOOLEAN
+-typedef int boolean;
+-#endif
+ #include <stdio.h>
+ #include <jpeglib.h>
+ #endif /* MNG_INCLUDE_IJG6B */
diff --git a/media-libs/libmng/files/libmng-2.0.2-stdio.patch b/media-libs/libmng/files/libmng-2.0.2-stdio.patch
new file mode 100644
index 000000000000..0a906d4c2f35
--- /dev/null
+++ b/media-libs/libmng/files/libmng-2.0.2-stdio.patch
@@ -0,0 +1,14 @@
+http://bugs.gentoo.org/499480
+
+Patch is from ArchLinux git libmng-2.0.2-3
+
+--- libmng_types.h
++++ libmng_types.h
+@@ -204,6 +204,7 @@
+ #define HAVE_BOOLEAN
+ typedef int boolean;
+ #endif
++#include <stdio.h>
+ #include <jpeglib.h>
+ #endif /* MNG_INCLUDE_IJG6B */
+
diff --git a/media-libs/libmng/libmng-2.0.2-r1.ebuild b/media-libs/libmng/libmng-2.0.2-r1.ebuild
new file mode 100644
index 000000000000..5c685f8e9b43
--- /dev/null
+++ b/media-libs/libmng/libmng-2.0.2-r1.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 autotools-multilib
+
+DESCRIPTION="Multiple Image Networkgraphics lib (animated png's)"
+HOMEPAGE="http://www.libmng.com/"
+SRC_URI="mirror://sourceforge/libmng/${P}.tar.xz"
+
+LICENSE="libmng"
+SLOT="0/2"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="lcms static-libs"
+
+RDEPEND=">=virtual/jpeg-0-r2:0[${MULTILIB_USEDEP}]
+ >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+ lcms? ( >=media-libs/lcms-2.5:2[${MULTILIB_USEDEP}] )
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20131008-r9
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-stdio.patch \
+ "${FILESDIR}"/${P}-jpeg-9a.patch
+ emake distclean
+ autotools-multilib_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable static-libs static)
+ --with-jpeg
+ $(use_with lcms lcms2)
+ --without-lcms
+ )
+
+ autotools-multilib_src_configure
+}
+
+src_install() {
+ autotools-multilib_src_install
+
+ dodoc CHANGES README* doc/{doc.readme,libmng.txt}
+ doman doc/man/*.{3,5}
+}
diff --git a/media-libs/libmng/libmng-2.0.3.ebuild b/media-libs/libmng/libmng-2.0.3.ebuild
new file mode 100644
index 000000000000..d443f3e77dee
--- /dev/null
+++ b/media-libs/libmng/libmng-2.0.3.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools-multilib
+
+DESCRIPTION="Multiple Image Networkgraphics lib (animated png's)"
+HOMEPAGE="http://www.libmng.com/"
+SRC_URI="mirror://sourceforge/libmng/${P}.tar.xz"
+
+LICENSE="libmng"
+SLOT="0/2"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="lcms static-libs"
+
+RDEPEND=">=virtual/jpeg-0-r2:0[static-libs?,${MULTILIB_USEDEP}]
+ >=sys-libs/zlib-1.2.8-r1[static-libs?,${MULTILIB_USEDEP}]
+ lcms? ( >=media-libs/lcms-2.5:2[static-libs?,${MULTILIB_USEDEP}] )
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20131008-r9
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ emake distclean
+ autotools-multilib_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable static-libs static)
+ --with-jpeg
+ $(use_with lcms lcms2)
+ --without-lcms
+ )
+
+ autotools-multilib_src_configure
+}
+
+src_install() {
+ autotools-multilib_src_install
+
+ dodoc CHANGES README* doc/{doc.readme,libmng.txt}
+ doman doc/man/*.{3,5}
+}
diff --git a/media-libs/libmng/metadata.xml b/media-libs/libmng/metadata.xml
new file mode 100644
index 000000000000..e0d457ab7dfb
--- /dev/null
+++ b/media-libs/libmng/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>graphics</herd>
+ <upstream>
+ <remote-id type="sourceforge">libmng</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libmnote/Manifest b/media-libs/libmnote/Manifest
new file mode 100644
index 000000000000..7029a6546633
--- /dev/null
+++ b/media-libs/libmnote/Manifest
@@ -0,0 +1 @@
+DIST libmnote-0.5.6.tar.gz 346540 SHA256 b900827b591d0fa2c93fc5eabe1e54497ac7df98959d4fc3ccf1dd4e4dcd215b
diff --git a/media-libs/libmnote/libmnote-0.5.6.ebuild b/media-libs/libmnote/libmnote-0.5.6.ebuild
new file mode 100644
index 000000000000..e43af48639fe
--- /dev/null
+++ b/media-libs/libmnote/libmnote-0.5.6.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="libmnote is a library for parsing, editing, and saving MakerNote-EXIF-tags"
+HOMEPAGE="http://libexif.sf.net"
+SRC_URI="mirror://sourceforge/libexif/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha ppc ~sparc x86"
+IUSE="nls"
+
+RDEPEND=">=media-libs/libexif-0.5.9"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_compile() {
+ local myconf
+ use nls || myconf="${myconf} --disable-nls"
+ econf ${myconf} || die "econf failed"
+ emake || die
+}
+
+src_install() {
+ dodir /usr/lib
+ dodir /usr/include/libmnote
+ dodir /usr/share/locale
+ dodir /usr/lib/pkgconfig
+ einstall || die
+}
diff --git a/media-libs/libmnote/metadata.xml b/media-libs/libmnote/metadata.xml
new file mode 100644
index 000000000000..744e3f76df28
--- /dev/null
+++ b/media-libs/libmnote/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">libexif</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libmodplug/Manifest b/media-libs/libmodplug/Manifest
new file mode 100644
index 000000000000..26dcefcceead
--- /dev/null
+++ b/media-libs/libmodplug/Manifest
@@ -0,0 +1 @@
+DIST libmodplug-0.8.8.5.tar.gz 546751 SHA256 77462d12ee99476c8645cb5511363e3906b88b33a6b54362b4dbc0f39aa2daad SHA512 aa943b8df5e3fd41b497e55f5d2c493c28a4c90d444d041f74a58ab5f4702eab9bb36f337e4c795561e0006846a5fda0b42bcf96b33e1267b190f6005862b332 WHIRLPOOL 00d88ffde88f9136274737bf63d6eca864935f24409f5f6cbe0679fcc962e890b9a5a68636dd20f0e44e070de71b8a804ef31cca78930d19004fd5148dfd736e
diff --git a/media-libs/libmodplug/files/libmodplug-0.8.4-timidity-patches.patch b/media-libs/libmodplug/files/libmodplug-0.8.4-timidity-patches.patch
new file mode 100644
index 000000000000..87150effb3e9
--- /dev/null
+++ b/media-libs/libmodplug/files/libmodplug-0.8.4-timidity-patches.patch
@@ -0,0 +1,15 @@
+Index: libmodplug-0.8.4/src/load_pat.cpp
+===================================================================
+--- libmodplug-0.8.4.orig/src/load_pat.cpp
++++ libmodplug-0.8.4/src/load_pat.cpp
+@@ -53,8 +53,8 @@ typedef UWORD WORD;
+ #define PATHFORPAT "C:\\TIMIDITY\\INSTRUMENTS"
+ #else
+ #define DIRDELIM '/'
+-#define TIMIDITYCFG "/usr/local/share/timidity/timidity.cfg"
+-#define PATHFORPAT "/usr/local/share/timidity/instruments"
++#define TIMIDITYCFG "/usr/share/timidity/timidity.cfg"
++#define PATHFORPAT "/usr/share/timidity/current"
+ #endif
+
+ #define PAT_ENV_PATH2CFG "MMPAT_PATH_TO_CFG"
diff --git a/media-libs/libmodplug/files/libmodplug-0.8.8.4-no-fast-math.patch b/media-libs/libmodplug/files/libmodplug-0.8.8.4-no-fast-math.patch
new file mode 100644
index 000000000000..3ca9ad1a6fd5
--- /dev/null
+++ b/media-libs/libmodplug/files/libmodplug-0.8.8.4-no-fast-math.patch
@@ -0,0 +1,12 @@
+diff -uNr libmodplug-0.8.8.4.ORIG//configure.in libmodplug-0.8.8.4/configure.in
+--- libmodplug-0.8.8.4.ORIG//configure.in 2011-08-17 12:09:24.843546749 +0100
++++ libmodplug-0.8.8.4/configure.in 2011-08-17 12:10:23.582544651 +0100
+@@ -27,7 +27,7 @@
+ AC_CHECK_HEADERS([inttypes.h stdint.h malloc.h])
+ AC_CHECK_FUNCS(setenv sinf)
+
+-CXXFLAGS="$CXXFLAGS -fno-exceptions -Wall -ffast-math -D_REENTRANT"
++CXXFLAGS="$CXXFLAGS -fno-exceptions -Wall -D_REENTRANT"
+ # CXXFLAGS="-fno-exceptions -g -Wall -ffast-math -D_REENTRANT `glib-config --cflags`"
+
+ AC_CANONICAL_HOST
diff --git a/media-libs/libmodplug/files/libmodplug-0.8.8.5-no-fast-math.patch b/media-libs/libmodplug/files/libmodplug-0.8.8.5-no-fast-math.patch
new file mode 100644
index 000000000000..3f1a7ab71b33
--- /dev/null
+++ b/media-libs/libmodplug/files/libmodplug-0.8.8.5-no-fast-math.patch
@@ -0,0 +1,12 @@
+diff -uNr libmodplug-0.8.8.5.ORIG/configure.ac libmodplug-0.8.8.5/configure.ac
+--- libmodplug-0.8.8.5.ORIG/configure.ac 2014-08-04 22:25:14.741262000 +0100
++++ libmodplug-0.8.8.5/configure.ac 2014-08-04 22:25:45.228263519 +0100
+@@ -29,7 +29,7 @@
+ AC_CHECK_HEADERS([inttypes.h stdint.h malloc.h])
+ AC_CHECK_FUNCS(setenv sinf)
+
+-CXXFLAGS="$CXXFLAGS -fno-exceptions -Wall -ffast-math -D_REENTRANT"
++CXXFLAGS="$CXXFLAGS -fno-exceptions -Wall -D_REENTRANT"
+ # CXXFLAGS="-fno-exceptions -g -Wall -ffast-math -D_REENTRANT `glib-config --cflags`"
+
+ AC_CANONICAL_HOST
diff --git a/media-libs/libmodplug/files/libmodplug-0.8.8.5-psm-omf2097-fixes.patch b/media-libs/libmodplug/files/libmodplug-0.8.8.5-psm-omf2097-fixes.patch
new file mode 100644
index 000000000000..1badfb46af5b
--- /dev/null
+++ b/media-libs/libmodplug/files/libmodplug-0.8.8.5-psm-omf2097-fixes.patch
@@ -0,0 +1,134 @@
+diff -uNr libmodplug-0.8.8.5.ORIG/src/load_psm.cpp libmodplug-0.8.8.5/src/load_psm.cpp
+--- libmodplug-0.8.8.5.ORIG/src/load_psm.cpp 2014-08-04 22:25:14.743262000 +0100
++++ libmodplug-0.8.8.5/src/load_psm.cpp 2014-08-04 22:26:56.907267088 +0100
+@@ -286,66 +286,49 @@
+ if ((Patterns[nPat] = AllocatePattern(nRows, m_nChannels)) == NULL) break;
+ MODCOMMAND *m = Patterns[nPat];
+ BYTE *p = pPsmPat->data;
++ MODCOMMAND *sp, dummy;
+ UINT pos = 0;
+ UINT row = 0;
+- UINT oldch = 0;
+- BOOL bNewRow = FALSE;
++ UINT rowlim;
+ #ifdef PSM_LOG
+ Log("Pattern %d at offset 0x%04X\n", nPat, (DWORD)(p - (BYTE *)lpStream));
+ #endif
++ UINT flags, ch;
++ rowlim = bswapLE16(pPsmPat->reserved1)-2;
+ while ((row < nRows) && (pos+1 < len))
+ {
+- UINT flags = p[pos++];
+- UINT ch = p[pos++];
+-
+- #ifdef PSM_LOG
+- //Log("flags+ch: %02X.%02X\n", flags, ch);
+- #endif
+- if (((flags & 0xf0) == 0x10) && (ch <= oldch) /*&& (!bNewRow)*/)
+- {
+- if ((pos+1<len) && (!(p[pos] & 0x0f)) && (p[pos+1] < m_nChannels))
+- {
+- #ifdef PSM_LOG
+- //if (!nPat) Log("Continuing on new row\n");
+- #endif
+- row++;
+- m += m_nChannels;
+- oldch = ch;
+- continue;
+- }
+- }
+- if ((pos >= len) || (row >= nRows)) break;
+- if (!(flags & 0xf0))
+- {
+- #ifdef PSM_LOG
+- //if (!nPat) Log("EOR(%d): %02X.%02X\n", row, p[pos], p[pos+1]);
+- #endif
+- row++;
++ if ((pos+1) >= rowlim) {
++ pos = rowlim;
++ rowlim = (((int)p[pos+1])<<8)
++ | ((int)p[pos+0]);
+ m += m_nChannels;
+- bNewRow = TRUE;
+- oldch = ch;
+- continue;
+- }
+- bNewRow = FALSE;
+- if (ch >= m_nChannels)
+- {
+- #ifdef PSM_LOG
+- if (!nPat) Log("Invalid channel row=%d (0x%02X.0x%02X)\n", row, flags, ch);
+- #endif
+- ch = 0;
++ row++;
++ rowlim += pos;
++ pos += 2;
+ }
++ flags = p[pos++];
++ ch = p[pos++];
++ if (ch >= m_nChannels) {
++ sp = &dummy;
++ } else {
++ sp = &m[ch];
++ }
+ // Note + Instr
++ if ((flags & 0x80) && (pos+1 < len))
++ {
++ UINT note = p[pos++];
++ note = (note>>4)*12+(note&0x0f)+12+1;
++ if (note > 0x80) note = 0;
++ m[ch].note = note;
++ }
+ if ((flags & 0x40) && (pos+1 < len))
+ {
+- UINT note = p[pos++];
+ UINT nins = p[pos++];
+ #ifdef PSM_LOG
+ //if (!nPat) Log("note+ins: %02X.%02X\n", note, nins);
+ if ((!nPat) && (nins >= m_nSamples)) Log("WARNING: invalid instrument number (%d)\n", nins);
+ #endif
+- if ((note) && (note < 0x80)) note = (note>>4)*12+(note&0x0f)+12+1;
+ m[ch].instr = samplemap[nins];
+- m[ch].note = note;
+ }
+ // Volume
+ if ((flags & 0x20) && (pos < len))
+@@ -362,13 +345,29 @@
+ switch(command)
+ {
+ // 01: fine volslide up
+- case 0x01: command = CMD_VOLUMESLIDE; param |= 0x0f; break;
++ case 0x01: command = CMD_VOLUMESLIDE; param |= 0x0f;
++ if (param == 15) param=31;
++ break;
++ // 02: volslide up
++ case 0x02: command = CMD_VOLUMESLIDE; param>>=1; param<<=4; break;
++ // 03: fine volslide down
++ case 0x03: command = CMD_VOLUMESLIDE; param>>=4; param |= 0xf0;
++ if (param == 240) param=241;
++ break;
+ // 04: fine volslide down
+ case 0x04: command = CMD_VOLUMESLIDE; param>>=4; param |= 0xf0; break;
+ // 0C: portamento up
+ case 0x0C: command = CMD_PORTAMENTOUP; param = (param+1)/2; break;
+ // 0E: portamento down
+ case 0x0E: command = CMD_PORTAMENTODOWN; param = (param+1)/2; break;
++ // 0F: tone portamento
++ case 0x0F: command = CMD_TONEPORTAMENTO; param = param/4; break;
++ // 15: vibrato
++ case 0x15: command = CMD_VIBRATO; break;
++ // 29: sample offset
++ case 0x29: pos += 2; break;
++ // 2A: retrigger note
++ case 0x2A: command = CMD_RETRIG; break;
+ // 33: Position Jump
+ case 0x33: command = CMD_POSITIONJUMP; break;
+ // 34: Pattern break
+@@ -387,7 +386,6 @@
+ m[ch].command = (BYTE)command;
+ m[ch].param = (BYTE)param;
+ }
+- oldch = ch;
+ }
+ #ifdef PSM_LOG
+ if (pos < len)
diff --git a/media-libs/libmodplug/libmodplug-0.8.8.5.ebuild b/media-libs/libmodplug/libmodplug-0.8.8.5.ebuild
new file mode 100644
index 000000000000..b5b6aa192088
--- /dev/null
+++ b/media-libs/libmodplug/libmodplug-0.8.8.5.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+AUTOTOOLS_PRUNE_LIBTOOL_FILES=all
+inherit autotools-multilib
+
+DESCRIPTION="Library for playing MOD-like music files"
+SRC_URI="mirror://sourceforge/modplug-xmms/${P}.tar.gz"
+HOMEPAGE="http://modplug-xmms.sourceforge.net/"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="static-libs"
+
+RDEPEND="abi_x86_32? ( !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)] )"
+DEPEND="virtual/pkgconfig"
+
+DOCS=( AUTHORS ChangeLog NEWS README TODO )
+PATCHES=(
+ "${FILESDIR}/${PN}-0.8.4-timidity-patches.patch"
+ "${FILESDIR}/${P}-no-fast-math.patch"
+ "${FILESDIR}/${P}-psm-omf2097-fixes.patch"
+)
diff --git a/media-libs/libmodplug/metadata.xml b/media-libs/libmodplug/metadata.xml
new file mode 100644
index 000000000000..60a7ab7a3a5b
--- /dev/null
+++ b/media-libs/libmodplug/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>sound</herd>
+ <maintainer>
+ <email>chainsaw@gentoo.org</email>
+ <name>Tony Vroon</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">modplug-xmms</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libmp3splt/Manifest b/media-libs/libmp3splt/Manifest
new file mode 100644
index 000000000000..9d6b9adf2d5e
--- /dev/null
+++ b/media-libs/libmp3splt/Manifest
@@ -0,0 +1,4 @@
+DIST libmp3splt-0.7.3.tar.gz 650741 SHA256 0b43d5a0407bc15db2c5922e3b41c92b8c0bc4e3cfdd5e238f8e8fecf0307163 SHA512 4ad158e47ce03626bf6493575a9adff51c709d5a7827c96cc18a56303cf709e7076081d0c3d2cfc8d22173bfd40e3ea7b750ade44a155f690e2ce0d394a2ebc7 WHIRLPOOL 2f1e09217f28b6835a86190e5f4d368e1f21b02b5751ca7ad2f7be2adb1c54bea2239289aa9396f7967d3cfacaac25e597addeda20d6c23bf0905ae7842378eb
+DIST libmp3splt-0.9.0.tar.gz 686054 SHA256 253352ed668f9454505d02e95c7d02af532b72a152689992e90a7e60bce1b4da SHA512 63624c9982fc2ab88e62fa29f16c5777f7689d19c3eecaceda83e7679cac9a64081e8ad2555403fe3bd0be0af2f7dedc02307254f5923b3f2856accc0f3e585a WHIRLPOOL d2899857310a701bf600c20137ee77b2f984f2c1216552994c2e9d2179b5e829cf1b75d5de80c0d1642b61dfc34537af7046a452d0f70d68ba4a434c01a360c2
+DIST libmp3splt-0.9.1.tar.gz 703040 SHA256 aabbdf3600796bba3591f62a1b9137237e7e90a931b719feccd1b2644c4b599d SHA512 a95f5a5e622baca6ea87e7c8d2c2da3bda8b9c91761506392efea848e433045b8a304b774d12fef5a93c7c75d64c65b5df45a37d936bbbc91c1ddb2f8ac1d670 WHIRLPOOL 3c7ea8ac37443fcaf665fb811107f1a23d31ee07d3f8989fa737a3fa7675cc66feb683c64c365a74608ba734004514f938a8a30fea29f440234d6a4e09cc578e
+DIST libmp3splt-0.9.1a.tar.gz 702948 SHA256 6528f301ad9877be7dc640e2a8aadebeb6c723536f28ac107920c8a96493461c SHA512 07229c048c4f999c7c723ab2f7bb06807d264609c8c1e38f8ff40f11e54285212de71548bbd66ba3100287d563673d80a8704bd384d7ffcd2145a098faabd389 WHIRLPOOL 5656a34bc35ecad1d06bc8eead154ea8b7083d86786345e1222246c781b42390a91780156d4fd71dd5e97ccfce0844d89a00de677e12c2f8e0ece8b5aa75cf6e
diff --git a/media-libs/libmp3splt/files/libmp3splt-0.7-disable-docs.patch b/media-libs/libmp3splt/files/libmp3splt-0.7-disable-docs.patch
new file mode 100644
index 000000000000..fa7b5f588553
--- /dev/null
+++ b/media-libs/libmp3splt/files/libmp3splt-0.7-disable-docs.patch
@@ -0,0 +1,40 @@
+From 12880888a2857f73cc87b9bdf5505fed0cbc6bbe Mon Sep 17 00:00:00 2001
+From: Sebastian Pipping <sebastian@pipping.org>
+Date: Wed, 3 Aug 2011 20:53:22 +0200
+Subject: [PATCH 2/2] Disable documentation
+
+---
+ configure.ac | 17 +++--------------
+ 1 files changed, 3 insertions(+), 14 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 1c564c5..260602d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -269,20 +269,9 @@ echo
+
+ # Check for doxygen, so we can decide if we add it to the "doc"
+ # make target.
+-AC_PATH_PROG([DOXYGEN],[doxygen])
+-AC_ARG_VAR(DOXYGEN,
+- [Location of the 'doxygen' program; if found we can generate documentation for the C code])
+-AM_CONDITIONAL(HAVE_DOXYGEN, [ test "x$DOXYGEN" != "x" ])
+-
+-# Check for dot, the tool that makes the nice little caller graphs for the
+-# doxygen documentation.
+-AC_PATH_PROG([GRAPHVIZ],[dot])
+-AC_ARG_VAR(GRAPHVIZ,
+- [Location of the 'dot' program from the graphviz suite; if found we can generate caller graphs for the documentation of the C code])
+-AM_CONDITIONAL(HAVE_GRAPHVIZ, [ test "x$GRAPHVIZ" != "x" ])
+-if test x$HAVE_DOT = "xfalse"; then
+- AC_MSG_WARN([*** dot from the graphviz package not found, inheritance diagrams will not be generated in code documentation])
+-fi
++AM_CONDITIONAL(HAVE_DOXYGEN, [ false ])
++
++AM_CONDITIONAL(HAVE_GRAPHVIZ, [ false ])
+
+ #################################################
+ # Generate Makefile
+--
+1.7.6
+
diff --git a/media-libs/libmp3splt/files/libmp3splt-0.7-flags.patch b/media-libs/libmp3splt/files/libmp3splt-0.7-flags.patch
new file mode 100644
index 000000000000..0262e5d37318
--- /dev/null
+++ b/media-libs/libmp3splt/files/libmp3splt-0.7-flags.patch
@@ -0,0 +1,25 @@
+From aac2d1b2603c1f1b85759bc1af67f37fb740d9a6 Mon Sep 17 00:00:00 2001
+From: Sebastian Pipping <sebastian@pipping.org>
+Date: Wed, 3 Aug 2011 20:51:26 +0200
+Subject: [PATCH 1/2] Remove debugging flags
+
+---
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index d9a70c3..1c564c5 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -43,7 +43,7 @@ DEBUG_FLAGS="-g"
+ #OPTIMISE_FLAGS="-O2"
+ #WARNING_FLAGS="-Wall -Wextra -Wswitch-enum -Wswitch-default -Wfloat-equal -Wbad-function-cast -Wcast-qual -Wunreachable-code"
+ WARNING_FLAGS="-Wall"
+-CFLAGS="$DEBUG_FLAGS $WARNING_FLAGS $OPTIMISE_FLAGS $CFLAGS"
++CFLAGS="$WARNING_FLAGS $CFLAGS"
+
+ #################################################
+ # Check for programs
+--
+1.7.6
+
diff --git a/media-libs/libmp3splt/files/libmp3splt-0.7-libltdl.patch b/media-libs/libmp3splt/files/libmp3splt-0.7-libltdl.patch
new file mode 100644
index 000000000000..95650f87a078
--- /dev/null
+++ b/media-libs/libmp3splt/files/libmp3splt-0.7-libltdl.patch
@@ -0,0 +1,21 @@
+--- configure.ac 2011-08-07 00:14:06.723806363 +0200
++++ configure.ac 2011-08-07 00:14:02.405860340 +0200
+@@ -68,16 +68,13 @@
+ # Enable libtool, check for libltdl and define @LIBLTDL@ and @INCLTDL@
+ #################################################################
+
+-ifdef([LT_CONFIG_LTDL_DIR],
+- [ LT_CONFIG_LTDL_DIR([libltdl]) ],
+- [])
++AC_SUBST([INCLTDL], [])
++AC_SUBST([LIBLTDL], [-lltdl])
+
+ ifdef([LT_INIT],
+ [ LT_INIT([win32-dll]) ],
+ [ AC_PROG_LIBTOOL ])
+
+-AC_WITH_LTDL
+-
+ #################################################################
+ # Check for the type of the host
+ #################################################################
diff --git a/media-libs/libmp3splt/files/libmp3splt-0.8.2-automake-1.13.patch b/media-libs/libmp3splt/files/libmp3splt-0.8.2-automake-1.13.patch
new file mode 100644
index 000000000000..f64a2f84a09d
--- /dev/null
+++ b/media-libs/libmp3splt/files/libmp3splt-0.8.2-automake-1.13.patch
@@ -0,0 +1,44 @@
+Index: test/Makefile.am
+===================================================================
+--- test/Makefile.am (revision 1325)
++++ test/Makefile.am (revision 1326)
+@@ -32,11 +32,14 @@
+
+ test_tags_handling_la_SOURCES = test_tags_handling.c
+
+-TESTS = $(top_srcdir)/test/run-tests.sh
+-TESTS_ENVIRONMENT = NO_MAKE=yes CUTTER="$(CUTTER)"
++TESTS = run-tests.sh
++TESTS_ENVIRONMENT = NO_MAKE=yes CUTTER="$(CUTTER)" TESTS_DIR="$(top_builddir)/test"
+
+ echo-cutter:
+ @echo $(CUTTER)
+
++echo-tests-dir:
++ @echo $(top_builddir)/test
++
+ endif
+
+Index: test/run-tests.sh
+===================================================================
+--- test/run-tests.sh (revision 1325)
++++ test/run-tests.sh (revision 1326)
+@@ -5,6 +5,11 @@
+
+ if test -z "$NO_MAKE"; then
+ make -C $top_dir > /dev/null || exit 1
++ TESTS_DIR=$BASE_DIR
++else
++ if test -z "$TESTS_DIR"; then
++ TESTS_DIR="`make -s -C $BASE_DIR echo-tests-dir`"
++ fi
+ fi
+
+ if test -z "$CUTTER"; then
+@@ -21,5 +26,5 @@
+ exit 1
+ }
+
+-$CUTTER -s $BASE_DIR "$@" $BASE_DIR
++$CUTTER -s $BASE_DIR "$@" $TESTS_DIR
+
diff --git a/media-libs/libmp3splt/libmp3splt-0.7.3.ebuild b/media-libs/libmp3splt/libmp3splt-0.7.3.ebuild
new file mode 100644
index 000000000000..75622b8a75bf
--- /dev/null
+++ b/media-libs/libmp3splt/libmp3splt-0.7.3.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit versionator autotools eutils multilib
+
+DESCRIPTION="a library for mp3splt to split mp3 and ogg files without decoding"
+HOMEPAGE="http://mp3splt.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN:3}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~hppa ~ppc ~ppc64 sparc x86"
+IUSE="doc pcre"
+
+RDEPEND="media-libs/libmad
+ media-libs/libvorbis
+ media-libs/libogg
+ media-libs/libid3tag
+ pcre? ( dev-libs/libpcre )"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen media-gfx/graphviz )
+ sys-apps/findutils"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.7-libltdl.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-dependency-tracking \
+ --disable-static \
+ $(use_enable pcre) \
+ $(use_enable doc doxygen_doc) \
+ --docdir=/usr/share/doc/${PF} \
+ --disable-cutter # TODO package cutter <http://cutter.sourceforge.net/>
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS ChangeLog LIMITS NEWS README TODO || die
+ find "${D}"/usr -name '*.la' -delete
+}
diff --git a/media-libs/libmp3splt/libmp3splt-0.9.0.ebuild b/media-libs/libmp3splt/libmp3splt-0.9.0.ebuild
new file mode 100644
index 000000000000..24c37a166afa
--- /dev/null
+++ b/media-libs/libmp3splt/libmp3splt-0.9.0.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 versionator autotools eutils multilib
+
+DESCRIPTION="a library for mp3splt to split mp3 and ogg files without decoding"
+HOMEPAGE="http://mp3splt.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN:3}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~hppa ~ppc ~ppc64 sparc x86"
+IUSE="doc flac pcre"
+
+RDEPEND="media-libs/libmad
+ media-libs/libvorbis
+ media-libs/libogg
+ media-libs/libid3tag
+ flac? ( >=media-libs/flac-1.2.1 )
+ pcre? ( dev-libs/libpcre )"
+DEPEND="${RDEPEND}
+ doc? ( >=app-doc/doxygen-1.8.3.1 media-gfx/graphviz )
+ sys-apps/findutils"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.7-libltdl.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-dependency-tracking \
+ --disable-static \
+ $(use_enable pcre) \
+ $(use_enable flac) \
+ $(use_enable doc doxygen_doc) \
+ --docdir=/usr/share/doc/${PF} \
+ --disable-optimise \
+ --disable-cutter # TODO package cutter <http://cutter.sourceforge.net/>
+}
+
+src_install() {
+ default
+ use doc && docompress -x /usr/share/doc/${PF}/doxygen/${PN}_ico.svg
+
+ dodoc AUTHORS ChangeLog LIMITS NEWS README TODO
+
+ find "${D}"/usr -name '*.la' -delete
+}
diff --git a/media-libs/libmp3splt/libmp3splt-0.9.1.ebuild b/media-libs/libmp3splt/libmp3splt-0.9.1.ebuild
new file mode 100644
index 000000000000..ee9bf939f154
--- /dev/null
+++ b/media-libs/libmp3splt/libmp3splt-0.9.1.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 versionator autotools eutils multilib
+
+DESCRIPTION="a library for mp3splt to split mp3 and ogg files without decoding"
+HOMEPAGE="http://mp3splt.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN:3}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc x86"
+IUSE="doc flac pcre"
+
+RDEPEND="media-libs/libmad
+ media-libs/libvorbis
+ media-libs/libogg
+ media-libs/libid3tag
+ flac? ( >=media-libs/flac-1.2.1 )
+ pcre? ( dev-libs/libpcre )"
+DEPEND="${RDEPEND}
+ doc? ( >=app-doc/doxygen-1.8.3.1 media-gfx/graphviz )
+ sys-apps/findutils"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.7-libltdl.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-dependency-tracking \
+ --disable-static \
+ $(use_enable pcre) \
+ $(use_enable flac) \
+ $(use_enable doc doxygen_doc) \
+ --docdir=/usr/share/doc/${PF} \
+ --disable-optimise \
+ --disable-cutter # TODO package cutter <http://cutter.sourceforge.net/>
+}
+
+src_install() {
+ default
+ use doc && docompress -x /usr/share/doc/${PF}/doxygen/${PN}_ico.svg
+
+ dodoc AUTHORS ChangeLog LIMITS NEWS README TODO
+
+ find "${D}"/usr -name '*.la' -delete
+}
diff --git a/media-libs/libmp3splt/libmp3splt-0.9.1a.ebuild b/media-libs/libmp3splt/libmp3splt-0.9.1a.ebuild
new file mode 100644
index 000000000000..6a3f7e604eb2
--- /dev/null
+++ b/media-libs/libmp3splt/libmp3splt-0.9.1a.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit versionator autotools eutils multilib
+
+DESCRIPTION="a library for mp3splt to split mp3 and ogg files without decoding"
+HOMEPAGE="http://mp3splt.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN:3}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~hppa ~ppc ~ppc64 sparc x86"
+IUSE="doc flac pcre"
+
+RDEPEND="media-libs/libmad
+ media-libs/libvorbis
+ media-libs/libogg
+ media-libs/libid3tag
+ flac? ( >=media-libs/flac-1.2.1 )
+ pcre? ( dev-libs/libpcre )"
+DEPEND="${RDEPEND}
+ doc? ( >=app-doc/doxygen-1.8.3.1 media-gfx/graphviz )
+ sys-apps/findutils"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.7-libltdl.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-dependency-tracking \
+ --disable-static \
+ $(use_enable pcre) \
+ $(use_enable flac) \
+ $(use_enable doc doxygen_doc) \
+ --docdir=/usr/share/doc/${PF} \
+ --disable-optimise \
+ --disable-cutter # TODO package cutter <http://cutter.sourceforge.net/>
+}
+
+src_install() {
+ default
+ use doc && docompress -x /usr/share/doc/${PF}/doxygen/${PN}_ico.svg
+
+ dodoc AUTHORS ChangeLog LIMITS NEWS README TODO
+
+ find "${D}"/usr -name '*.la' -delete
+}
diff --git a/media-libs/libmp3splt/metadata.xml b/media-libs/libmp3splt/metadata.xml
new file mode 100644
index 000000000000..ab638f070ef2
--- /dev/null
+++ b/media-libs/libmp3splt/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>sound</herd>
+ <maintainer>
+ <email>sping@gentoo.org</email>
+ <name>Sebastian Pipping</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">mp3splt</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libmp4v2/Manifest b/media-libs/libmp4v2/Manifest
new file mode 100644
index 000000000000..096fd7ba9541
--- /dev/null
+++ b/media-libs/libmp4v2/Manifest
@@ -0,0 +1,2 @@
+DIST mp4v2-1.9.1.tar.bz2 432943 SHA256 5c381caeab2326fc48cfda0fe202bdb8ba0ae624d9c97ad7680a2b07e2c2e3b4 SHA512 28b6f96c1d44a1601980113767c38f5b5b058e1a1fae25c18632163e948c18fc884af9d146bb68e771303ab3c5c8ef9437f4fffa7d770d29157f2d455ee4b1c8 WHIRLPOOL 7ba33598287002d4227bcc4bfc1e8fe71241b95ed7151704b78a250d0f5f7d5c77cabf0195502d368571f5668f775fdecc09700bea12859c827d0d29aa654f5e
+DIST mp4v2-2.0.0.tar.bz2 495672 SHA256 0319b9a60b667cf10ee0ec7505eb7bdc0a2e21ca7a93db96ec5bd758e3428338 SHA512 15eb882f33d72d4209053b54c883b67715f539c33096705a0e7bc79015b93f6f3ac80ae29c65a0ffe9eab1bf0dedf07198bdee23fa6eafcd6ccb34f984484be0 WHIRLPOOL 754e239bd6f209454dc86f4632929b30ee1b5d782ea4e8b495ac5fbfef384b7a503d535294d5ab71e98fa9f5437c50fb5522f0bfac5f8a254690b4c78a8e96e0
diff --git a/media-libs/libmp4v2/libmp4v2-1.9.1-r1.ebuild b/media-libs/libmp4v2/libmp4v2-1.9.1-r1.ebuild
new file mode 100644
index 000000000000..c209d32fb872
--- /dev/null
+++ b/media-libs/libmp4v2/libmp4v2-1.9.1-r1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# this ebuild is only for the libmp4v2.so.1 SONAME for ABI compat
+
+EAPI=4
+inherit libtool multilib
+
+DESCRIPTION="Functions for accessing ISO-IEC:14496-1:2001 MPEG-4 standard"
+HOMEPAGE="http://code.google.com/p/mp4v2/"
+SRC_URI="http://mp4v2.googlecode.com/files/${P/lib}.tar.bz2"
+
+LICENSE="MPL-1.1"
+SLOT="1"
+KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE=""
+
+RESTRICT="test"
+
+RDEPEND="!<=${CATEGORY}/${PN}-1.9.1:0"
+DEPEND="${RDEPEND}
+ sys-apps/sed"
+
+S=${WORKDIR}/${P/lib}
+
+src_prepare() {
+ elibtoolize
+}
+
+src_configure() {
+ econf --disable-gch --disable-util --disable-static
+}
+
+src_compile() {
+ emake ${PN}.la
+}
+
+src_install() {
+ newlib.so .libs/${PN}$(get_libname ${PV}) ${PN}$(get_libname ${PV%.*.*})
+}
diff --git a/media-libs/libmp4v2/libmp4v2-2.0.0.ebuild b/media-libs/libmp4v2/libmp4v2-2.0.0.ebuild
new file mode 100644
index 000000000000..079c26f31df4
--- /dev/null
+++ b/media-libs/libmp4v2/libmp4v2-2.0.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
+inherit libtool
+
+MY_P=${P/lib}
+
+DESCRIPTION="Functions for accessing ISO-IEC:14496-1:2001 MPEG-4 standard"
+HOMEPAGE="http://code.google.com/p/mp4v2/"
+SRC_URI="http://mp4v2.googlecode.com/files/${MY_P}.tar.bz2"
+
+LICENSE="MPL-1.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="static-libs test utils"
+
+RDEPEND=""
+DEPEND="sys-apps/sed
+ utils? ( sys-apps/help2man )
+ test? ( dev-util/dejagnu )"
+
+DOCS="doc/*.txt README"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ elibtoolize
+}
+
+src_configure() {
+ econf \
+ --disable-gch \
+ $(use_enable utils util) \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ find "${ED}" -name '*.la' -exec rm -f {} +
+}
diff --git a/media-libs/libmp4v2/metadata.xml b/media-libs/libmp4v2/metadata.xml
new file mode 100644
index 000000000000..2dbc62f18142
--- /dev/null
+++ b/media-libs/libmp4v2/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>sound</herd>
+ <use>
+ <flag name="utils">Install command-line utilities</flag>
+ </use>
+ <upstream>
+ <remote-id type="google-code">mp4v2</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libmpd/Manifest b/media-libs/libmpd/Manifest
new file mode 100644
index 000000000000..e9cf0fab9216
--- /dev/null
+++ b/media-libs/libmpd/Manifest
@@ -0,0 +1 @@
+DIST libmpd-11.8.17.tar.gz 365015 SHA256 fe20326b0d10641f71c4673fae637bf9222a96e1712f71f170fca2fc34bf7a83 SHA512 ffe2880834a4a39745a5327d628781e16eeb8cd1ec17402dda46ad96ff402bc0d8b4312ba058a39242ad9bb8c3a0bb6feb2c5ea2a30ef9be97652fdb5c02572d WHIRLPOOL b5fe844e7a21229c2c4a50080964e13ee1bc7b69257b604d0a62e476ae24df24b6923bd8cdd9970d2335aa27a84c68f8c33983527304f16e32ccc35d5bcacca2
diff --git a/media-libs/libmpd/files/libmpd-11.8.17-remove-strndup.patch b/media-libs/libmpd/files/libmpd-11.8.17-remove-strndup.patch
new file mode 100644
index 000000000000..ad4fdc02ef3e
--- /dev/null
+++ b/media-libs/libmpd/files/libmpd-11.8.17-remove-strndup.patch
@@ -0,0 +1,15 @@
+diff --git a/src/libmpd-internal.h b/src/libmpd-internal.h
+index c84c3a4..51be441 100644
+--- a/src/libmpd-internal.h
++++ b/src/libmpd-internal.h
+@@ -206,10 +206,6 @@ int mpd_unlock_conn(MpdObj *mi);
+ MpdData * mpd_misc_sort_tag_list(MpdData *data);
+
+
+-#ifndef HAVE_STRNDUP
+-char * strndup (const char *s, size_t n);
+-#endif
+-
+ int mpd_server_get_allowed_commands(MpdObj *mi);
+ typedef enum _MpdSearchType {
+ MPD_SEARCH_TYPE_NONE,
diff --git a/media-libs/libmpd/libmpd-11.8.17-r1.ebuild b/media-libs/libmpd/libmpd-11.8.17-r1.ebuild
new file mode 100644
index 000000000000..bcaa3a52fd2a
--- /dev/null
+++ b/media-libs/libmpd/libmpd-11.8.17-r1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils
+
+DESCRIPTION="A library handling connections to a MPD server"
+HOMEPAGE="http://gmpc.wikia.com/wiki/Libmpd"
+SRC_URI="http://download.sarine.nl/Programs/gmpc/11.8/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ~ppc64 x86 ~x86-interix ~amd64-linux ~x86-linux"
+IUSE="doc static-libs"
+
+RDEPEND=">=dev-libs/glib-2.16:2"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-remove-strndup.patch
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ --docdir="${EPREFIX}"/usr/share/doc/${PF}
+}
+
+src_compile() {
+ emake
+ use doc && emake -C doc doc
+}
+
+src_install() {
+ default
+ use doc && dohtml -r doc/html/*
+ find "${ED}" -name "*.la" -exec rm -rf {} + || die
+ rm "${ED}"/usr/share/doc/${PF}/{README,ChangeLog} || die
+}
diff --git a/media-libs/libmpd/libmpd-11.8.17.ebuild b/media-libs/libmpd/libmpd-11.8.17.ebuild
new file mode 100644
index 000000000000..8dba3c0f5eaa
--- /dev/null
+++ b/media-libs/libmpd/libmpd-11.8.17.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="A library handling connections to a MPD server"
+HOMEPAGE="http://gmpc.wikia.com/wiki/Libmpd"
+SRC_URI="http://download.sarine.nl/Programs/gmpc/11.8/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ~ppc64 x86 ~x86-interix ~amd64-linux ~x86-linux"
+IUSE="doc static-libs"
+
+RDEPEND=">=dev-libs/glib-2.16:2"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ --docdir="${EPREFIX}"/usr/share/doc/${PF}
+}
+
+src_compile() {
+ emake
+ use doc && emake -C doc doc
+}
+
+src_install() {
+ default
+ use doc && dohtml -r doc/html/*
+ find "${ED}" -name "*.la" -exec rm -rf {} + || die
+ rm "${ED}"/usr/share/doc/${PF}/{README,ChangeLog} || die
+}
diff --git a/media-libs/libmpd/metadata.xml b/media-libs/libmpd/metadata.xml
new file mode 100644
index 000000000000..e9f44e438159
--- /dev/null
+++ b/media-libs/libmpd/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>sound</herd>
+<maintainer>
+ <email>angelos@gentoo.org</email>
+ <name>Christoph Mende</name>
+</maintainer>
+<longdescription>A library handling connection to a MPD server.</longdescription>
+</pkgmetadata>
diff --git a/media-libs/libmpdclient/Manifest b/media-libs/libmpdclient/Manifest
new file mode 100644
index 000000000000..4a09055dfaa7
--- /dev/null
+++ b/media-libs/libmpdclient/Manifest
@@ -0,0 +1,2 @@
+DIST libmpdclient-2.10.tar.xz 261792 SHA256 4f08cde82dae70895f8e4532a6e9b54b201efd5591c6b5d6834895807ed2ff82 SHA512 f54fc3501643ece4eee2f63ddbf5f3d676f3843be0859f482d70cc142b6d9dfbdebd511ccc52a9c058a644e3b80c93a680e1de19f6f3ebfc46cb197f0ddddb5b WHIRLPOOL b97f9024f1c18233019d94501e0f60055a03001e5342884a275768ac297ad11a6ab865e0849f6c274067f7952ed22c2f7bb14f6349b94df5643150a883c47840
+DIST libmpdclient-2.9.tar.xz 253992 SHA256 7cc97ba560e91addafe5975f7e7da04b95d6710750e47b3367fa0d8c3b7699ca SHA512 7e6af51e31a3319e6681dfe5199fda1b2c1482f6aa6854af7c7f02c999fbbeae4f369c9b157abf95402c7f022d155109454b243549185ba791df5b2457baaba4 WHIRLPOOL d4d78a83bfa300be8df37e321c3b8ed535bd7342acc1ec371a2aa59a76efde79a9c4531bc8052c5d0c2c423d808f23b2e5d3b92ccf5c9dec4f2a120b615a4992
diff --git a/media-libs/libmpdclient/libmpdclient-2.10.ebuild b/media-libs/libmpdclient/libmpdclient-2.10.ebuild
new file mode 100644
index 000000000000..9e045f0d47d8
--- /dev/null
+++ b/media-libs/libmpdclient/libmpdclient-2.10.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="A library for interfacing Music Player Daemon (media-sound/mpd)"
+HOMEPAGE="http://www.musicpd.org"
+SRC_URI="http://www.musicpd.org/download/${PN}/${PV%.*}/${P}.tar.xz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86"
+IUSE="doc examples static-libs"
+
+RDEPEND=""
+DEPEND="doc? ( app-doc/doxygen )"
+
+src_prepare() {
+ sed -e "s:@top_srcdir@:.:" -i doc/doxygen.conf.in
+}
+
+src_configure() {
+ econf \
+ --docdir="${EPREFIX}"/usr/share/doc/${PF} \
+ $(use_enable static-libs static) \
+ $(use_enable doc documentation)
+}
+
+src_install() {
+ default
+ use examples && dodoc src/example.c
+ use doc || rm -rf "${ED}"/usr/share/doc/${PF}/html
+ find "${ED}" -name "*.la" -exec rm -rf {} + || die "failed to delete .la files"
+}
diff --git a/media-libs/libmpdclient/libmpdclient-2.9.ebuild b/media-libs/libmpdclient/libmpdclient-2.9.ebuild
new file mode 100644
index 000000000000..da08103d786b
--- /dev/null
+++ b/media-libs/libmpdclient/libmpdclient-2.9.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="A library for interfacing Music Player Daemon (media-sound/mpd)"
+HOMEPAGE="http://www.musicpd.org"
+SRC_URI="http://www.musicpd.org/download/${PN}/${PV%.*}/${P}.tar.xz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 arm hppa ppc ppc64 sparc x86"
+IUSE="doc examples static-libs"
+
+RDEPEND=""
+DEPEND="doc? ( app-doc/doxygen )"
+
+src_prepare() {
+ sed -e "s:@top_srcdir@:.:" -i doc/doxygen.conf.in
+}
+
+src_configure() {
+ econf \
+ --docdir="${EPREFIX}"/usr/share/doc/${PF} \
+ $(use_enable static-libs static) \
+ $(use_enable doc documentation)
+}
+
+src_install() {
+ default
+ use examples && dodoc src/example.c
+ use doc || rm -rf "${ED}"/usr/share/doc/${PF}/html
+ find "${ED}" -name "*.la" -exec rm -rf {} + || die "failed to delete .la files"
+}
diff --git a/media-libs/libmpdclient/metadata.xml b/media-libs/libmpdclient/metadata.xml
new file mode 100644
index 000000000000..f939777e6a35
--- /dev/null
+++ b/media-libs/libmpdclient/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>sound</herd>
+ <maintainer>
+ <email>angelos@gentoo.org</email>
+ <name>Christoph Mende</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/media-libs/libmpeg2/Manifest b/media-libs/libmpeg2/Manifest
new file mode 100644
index 000000000000..6c1dd4b0dfea
--- /dev/null
+++ b/media-libs/libmpeg2/Manifest
@@ -0,0 +1 @@
+DIST libmpeg2-0.5.1.tar.gz 524776 SHA256 dee22e893cb5fc2b2b6ebd60b88478ab8556cb3b93f9a0d7ce8f3b61851871d4 SHA512 3648a2b3d7e2056d5adb328acd2fb983a1fa9a05ccb6f9388cc686c819445421811f42e8439418a0491a13080977f074a0d8bf8fa6bc101ff245ddea65a46fbc WHIRLPOOL 2ca188b98ca0119b61c590db88e678f1e1ed7b68a50e18bcbc9ce0e312796845d3d1c6a4e76e98754e2a635f83f1b7800a938290a65456723328db02faf59fe5
diff --git a/media-libs/libmpeg2/files/libmpeg2-0.5.1-altivec.patch b/media-libs/libmpeg2/files/libmpeg2-0.5.1-altivec.patch
new file mode 100644
index 000000000000..617fe7509951
--- /dev/null
+++ b/media-libs/libmpeg2/files/libmpeg2-0.5.1-altivec.patch
@@ -0,0 +1,16 @@
+--- configure.ac.bak 2010-05-25 17:12:14.756245990 +0000
++++ configure.ac 2010-05-25 17:11:51.629581723 +0000
+@@ -79,11 +79,10 @@
+ CFLAGS="$OPT_CFLAGS $TRY_CFLAGS $CFLAGS"
+ AC_MSG_CHECKING([if <altivec.h> is needed])
+ AC_TRY_COMPILE([],
+- [typedef vector int t;
+- vec_ld(0, (unsigned char *)0);],
++ [vector int t; t = vec_add(t,t);],
+ [have_altivec=yes; AC_MSG_RESULT(no)],
+ [AC_TRY_COMPILE([#include <altivec.h>],
+- [typedef vector int t; vec_ld(0, (unsigned char *)0);],
++ [vector int t; t = vec_add(t,t);],
+ [AC_DEFINE([HAVE_ALTIVEC_H],,
+ [Define to 1 if you have the <altivec.h> header.])
+ have_altivec=yes; AC_MSG_RESULT(yes)],
diff --git a/media-libs/libmpeg2/files/libmpeg2-0.5.1-arm-private-symbols.patch b/media-libs/libmpeg2/files/libmpeg2-0.5.1-arm-private-symbols.patch
new file mode 100644
index 000000000000..222ff9954ef4
--- /dev/null
+++ b/media-libs/libmpeg2/files/libmpeg2-0.5.1-arm-private-symbols.patch
@@ -0,0 +1,44 @@
+Set visibility of global symbols used in ARM specific assembly file to internal
+
+--- a/libmpeg2/motion_comp_arm_s.S
++++ b/libmpeg2/motion_comp_arm_s.S
+@@ -23,7 +23,8 @@
+
+ @ ----------------------------------------------------------------
+ .align
+- .global MC_put_o_16_arm
++ .global MC_put_o_16_arm
++ .internal MC_put_o_16_arm
+ MC_put_o_16_arm:
+ @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
+ pld [r1]
+@@ -83,7 +84,8 @@
+
+ @ ----------------------------------------------------------------
+ .align
+- .global MC_put_o_8_arm
++ .global MC_put_o_8_arm
++ .internal MC_put_o_8_arm
+ MC_put_o_8_arm:
+ @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
+ pld [r1]
+@@ -152,7 +154,8 @@
+ .endm
+
+ .align
+- .global MC_put_x_16_arm
++ .global MC_put_x_16_arm
++ .internal MC_put_x_16_arm
+ MC_put_x_16_arm:
+ @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
+ pld [r1]
+@@ -244,7 +247,8 @@
+
+ @ ----------------------------------------------------------------
+ .align
+- .global MC_put_x_8_arm
++ .global MC_put_x_8_arm
++ .internal MC_put_x_8_arm
+ MC_put_x_8_arm:
+ @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
+ pld [r1]
diff --git a/media-libs/libmpeg2/files/libmpeg2-0.5.1-armv4l.patch b/media-libs/libmpeg2/files/libmpeg2-0.5.1-armv4l.patch
new file mode 100644
index 000000000000..bd9561e0c46f
--- /dev/null
+++ b/media-libs/libmpeg2/files/libmpeg2-0.5.1-armv4l.patch
@@ -0,0 +1,20 @@
+diff -urNp libmpeg2.orig/libmpeg2/motion_comp_arm_s.S libmpeg2/libmpeg2/motion_comp_arm_s.S
+--- libmpeg2.orig/libmpeg2/motion_comp_arm_s.S 2008-07-09 21:16:05.000000000 +0200
++++ libmpeg2/libmpeg2/motion_comp_arm_s.S 2009-11-20 19:55:22.000000000 +0100
+@@ -19,6 +19,16 @@
+ @ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
++@ Data preload is supported only by ARM V5TE and above
++
++#if (defined (__ARM_ARCH_2__) || defined (__ARM_ARCH_3__) \
++ || defined (__ARM_ARCH_3M__) || defined (__ARM_ARCH_4__) \
++ || defined (__ARM_ARCH_4T__) || defined (__ARM_ARCH_5__) \
++ || defined (__ARM_ARCH_5T__))
++.macro pld reg
++.endm
++#endif
++
+ .text
+
+ @ ----------------------------------------------------------------
diff --git a/media-libs/libmpeg2/files/libmpeg2-0.5.1-global-symbol-test.patch b/media-libs/libmpeg2/files/libmpeg2-0.5.1-global-symbol-test.patch
new file mode 100644
index 000000000000..1eb01f43f58b
--- /dev/null
+++ b/media-libs/libmpeg2/files/libmpeg2-0.5.1-global-symbol-test.patch
@@ -0,0 +1,60 @@
+Rewrite the public symbol check to verify the shared libraries, to check for
+more things, and to avoid duplication; fixes make check on ARM
+
+--- a/test/globals
++++ b/test/globals
+@@ -1,4 +1,8 @@
+ #!/bin/sh
++# TODO
++# - fix checking of .a libs; problem is that "nm -g --defined-only" lists
++# internal symbols; this can be solved by using objdump, but it's probably
++# good enough to just run the tests on the shared lib
+
+ if test x"$srcdir" != x""; then
+ builddir="." # running from make check, but it does not define that
+@@ -14,22 +18,30 @@
+
+ error=0
+
+-bad_globals=`nm -g --defined-only $builddir/../libmpeg2/*.o |\
+- awk '{if ($3) print $3}' | grep -v '^_\?mpeg2_'`
+-
+-if test x"$bad_globals" != x""; then
+- echo BAD GLOBAL SYMBOLS:
+- for s in $bad_globals; do echo $s; done
++# check_bad_public_symbols <symbol prefix> <lib file> [<lib file>...]
++#
++# checks public symbols in shared libs:
++# - allow prefix_anything
++# - reject _prefixanything
++# - allow _anything
++# - reject anything else
++#
++# NB: skips missing files
++check_bad_public_symbols() {
++ symbols_prefix="$1"
++ shift
++ lib_files=`ls "$@" 2>/dev/null`
++ [ -z "$lib_files" ] && return
++ bad_globals=`nm -g --defined-only $lib_files |
++ awk '{if ($3) print $3}' |
++ sed -n "/^${symbols_prefix}_/ d; /^_${symbols_prefix}/ { p; d }; /^_/ d; p"`
++ [ -z "$bad_globals" ] && return
+ error=1
+-fi
+-
+-bad_globals=`nm -g --defined-only $builddir/../libmpeg2/convert/*.o |\
+- awk '{if ($3) print $3}' | grep -v '^_\?mpeg2convert_'`
++ echo BAD GLOBAL SYMBOLS in $lib_files:
++ echo "$bad_globals"
++}
+
+-if test x"$bad_globals" != x""; then
+- echo BAD GLOBAL SYMBOLS:
+- for s in $bad_globals; do echo $s; done
+- error=1
+-fi
++check_bad_public_symbols mpeg2 $builddir/../libmpeg2/.libs/libmpeg2.so
++check_bad_public_symbols mpeg2convert $builddir/../libmpeg2/convert/.libs/libmpeg2convert.so
+
+ exit $error
diff --git a/media-libs/libmpeg2/libmpeg2-0.5.1-r2.ebuild b/media-libs/libmpeg2/libmpeg2-0.5.1-r2.ebuild
new file mode 100644
index 000000000000..fff928216858
--- /dev/null
+++ b/media-libs/libmpeg2/libmpeg2-0.5.1-r2.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils libtool multilib-minimal
+
+DESCRIPTION="library for decoding mpeg-2 and mpeg-1 video"
+HOMEPAGE="http://libmpeg2.sourceforge.net/"
+SRC_URI="http://libmpeg2.sourceforge.net/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-solaris"
+IUSE="sdl static-libs X"
+
+RDEPEND="sdl? ( media-libs/libsdl )
+ X? ( x11-libs/libXv
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libXt )
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20130224-r9
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}
+ X? ( x11-proto/xextproto )"
+
+DOCS=( AUTHORS ChangeLog NEWS README TODO )
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-arm-private-symbols.patch \
+ "${FILESDIR}"/${P}-global-symbol-test.patch \
+ "${FILESDIR}"/${P}-armv4l.patch
+ elibtoolize
+ ### PowerPC fix for altivec
+ epatch "${FILESDIR}"/${P}-altivec.patch
+ eautoconf
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" \
+ econf \
+ $(use_enable static-libs static) \
+ --enable-shared \
+ $(multilib_native_use_enable sdl) \
+ $(multilib_native_use_with X x)
+
+ # remove useless subdirs
+ if ! multilib_is_native_abi ; then
+ sed -i \
+ -e 's/ libvo src//' \
+ Makefile || die
+ fi
+}
+
+multilib_src_compile() {
+ emake OPT_CFLAGS="${CFLAGS}" \
+ MPEG2DEC_CFLAGS="${CFLAGS}" \
+ LIBMPEG2_CFLAGS=""
+}
+
+multilib_src_install_all() {
+ prune_libtool_files --all
+ einstalldocs
+}
diff --git a/media-libs/libmpeg2/metadata.xml b/media-libs/libmpeg2/metadata.xml
new file mode 100644
index 000000000000..edccfe5754d2
--- /dev/null
+++ b/media-libs/libmpeg2/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-libs/libmpeg3/Manifest b/media-libs/libmpeg3/Manifest
new file mode 100644
index 000000000000..0ac3d6613d6a
--- /dev/null
+++ b/media-libs/libmpeg3/Manifest
@@ -0,0 +1,2 @@
+DIST libmpeg3-1.7-gentoo.tar.bz2 5625 SHA256 6dde60e78776e7a3c761218e35afc6432a9289eb1ae18c4e4e7f85f67d63572d SHA512 9ef94c41ee943e321c9fc14a02659a839f08554aac4f5c5abcb9835e9940f0e5dc4c67c26f8124de960cba78493fa43f6c800748c0426e6dc141aa106e2aabc1 WHIRLPOOL 501aa2767acb06e4fa9cc95315f32ab7f8e9cd0889d5c2aa7f3b9476868b8db865c65ff9e7e5b221361cf1104f725693ec4eaac6a43b1bc3eafa60720e847341
+DIST libmpeg3-1.8-src.tar.bz2 2452350 SHA256 656f50bef752463af06c6b131f67efef30a34978499e1fdee30e97cac1dea3c4 SHA512 e381f07d46d47d391c6db420791a065e3572e17ca63966eb52712560867866683505693f73b25869059319eec66fd1c2f923dbef1fdca5ef9efbe598e217d60e WHIRLPOOL ecbd01be343edb5a115983e28fef1526a37a3f0b67ddc1eb3c8c566be47a3bc1def26d017954fa49795567df2d3ac838ae6868d12d3cf1a8c359e82a07c11e30
diff --git a/media-libs/libmpeg3/files/libmpeg3-1.8-impldecl.patch b/media-libs/libmpeg3/files/libmpeg3-1.8-impldecl.patch
new file mode 100644
index 000000000000..632537b87191
--- /dev/null
+++ b/media-libs/libmpeg3/files/libmpeg3-1.8-impldecl.patch
@@ -0,0 +1,24 @@
+Index: libmpeg3-1.8/audio/ac3.c
+===================================================================
+--- libmpeg3-1.8.orig/audio/ac3.c
++++ libmpeg3-1.8/audio/ac3.c
+@@ -6,6 +6,7 @@
+ #include "mpeg3protos.h"
+
+ #include <string.h>
++#include <stdlib.h>
+
+
+ mpeg3_ac3_t* mpeg3_new_ac3()
+Index: libmpeg3-1.8/audio/layer3.c
+===================================================================
+--- libmpeg3-1.8.orig/audio/layer3.c
++++ libmpeg3-1.8/audio/layer3.c
+@@ -5,6 +5,7 @@
+
+ #include <stdio.h>
+ #include <string.h>
++#include <stdlib.h>
+
+ struct gr_info_s
+ {
diff --git a/media-libs/libmpeg3/libmpeg3-1.8-r1.ebuild b/media-libs/libmpeg3/libmpeg3-1.8-r1.ebuild
new file mode 100644
index 000000000000..c24098091bc3
--- /dev/null
+++ b/media-libs/libmpeg3/libmpeg3-1.8-r1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils autotools toolchain-funcs multilib-minimal
+
+DESCRIPTION="An mpeg library for linux"
+HOMEPAGE="http://heroinewarrior.com/libmpeg3.php"
+SRC_URI="mirror://sourceforge/heroines/${P}-src.tar.bz2
+ mirror://gentoo/${PN}-1.7-gentoo.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 ~sh sparc x86"
+IUSE="cpu_flags_x86_mmx"
+
+RDEPEND="sys-libs/zlib
+ virtual/jpeg
+ media-libs/a52dec"
+DEPEND="${RDEPEND}
+ cpu_flags_x86_mmx? ( dev-lang/nasm )"
+
+src_prepare() {
+ epatch "${WORKDIR}"/${PN}-1.7-mpeg3split.patch
+ epatch "${WORKDIR}"/${PN}-1.7-textrel.patch
+ epatch "${WORKDIR}"/${PN}-1.7-gnustack.patch
+ epatch "${WORKDIR}"/${PN}-1.7-a52.patch
+ epatch "${WORKDIR}"/${PN}-1.7-all_gcc4.patch
+ epatch "${WORKDIR}"/${PN}-1.7-all_pthread.patch
+
+ epatch "${FILESDIR}/${P}-impldecl.patch"
+
+ cp -rf "${WORKDIR}"/1.7/* .
+ eautoreconf
+}
+
+multilib_src_configure() {
+ #disabling css since it's a fake one.
+ #One can find in the sources this message :
+ # Stubs for deCSS which can't be distributed in source form
+
+ ECONF_SOURCE="${S}" econf \
+ $(use_enable cpu_flags_x86_mmx mmx) \
+ --disable-css
+}
+
+multilib_src_install_all() {
+ dohtml -r docs
+ # This is a workaround, it wants to rebuild
+ # everything if the headers have changed
+ # So we patch them after install...
+ cd "${ED}/usr/include/libmpeg3"
+ # This patch patches the .h files that get installed into /usr/include
+ # to show the correct include syntax '<>' instead of '""' This patch
+ # was also generated using info from SF's src.rpm
+ epatch "${WORKDIR}"/gentoo-p2.patch
+
+ find "${ED}" -name '*.la' -exec rm -f '{}' +
+}
diff --git a/media-libs/libmpeg3/libmpeg3-1.8.ebuild b/media-libs/libmpeg3/libmpeg3-1.8.ebuild
new file mode 100644
index 000000000000..52ca5b185cde
--- /dev/null
+++ b/media-libs/libmpeg3/libmpeg3-1.8.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils autotools toolchain-funcs
+
+DESCRIPTION="An mpeg library for linux"
+HOMEPAGE="http://heroinewarrior.com/libmpeg3.php"
+SRC_URI="mirror://sourceforge/heroines/${P}-src.tar.bz2
+ mirror://gentoo/${PN}-1.7-gentoo.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sh sparc x86"
+IUSE="cpu_flags_x86_mmx"
+
+RDEPEND="sys-libs/zlib
+ virtual/jpeg
+ media-libs/a52dec"
+DEPEND="${RDEPEND}
+ cpu_flags_x86_mmx? ( dev-lang/nasm )"
+
+src_prepare() {
+ epatch "${WORKDIR}"/${PN}-1.7-mpeg3split.patch
+ epatch "${WORKDIR}"/${PN}-1.7-textrel.patch
+ epatch "${WORKDIR}"/${PN}-1.7-gnustack.patch
+ epatch "${WORKDIR}"/${PN}-1.7-a52.patch
+ epatch "${WORKDIR}"/${PN}-1.7-all_gcc4.patch
+ epatch "${WORKDIR}"/${PN}-1.7-all_pthread.patch
+
+ cp -rf "${WORKDIR}"/1.7/* .
+ eautoreconf
+}
+
+src_configure() {
+ #disabling css since it's a fake one.
+ #One can find in the sources this message :
+ # Stubs for deCSS which can't be distributed in source form
+
+ econf \
+ $(use_enable cpu_flags_x86_mmx mmx) \
+ --disable-css
+}
+
+src_install() {
+ default
+ dohtml -r docs
+ # This is a workaround, it wants to rebuild
+ # everything if the headers have changed
+ # So we patch them after install...
+ cd "${ED}/usr/include/libmpeg3"
+ # This patch patches the .h files that get installed into /usr/include
+ # to show the correct include syntax '<>' instead of '""' This patch
+ # was also generated using info from SF's src.rpm
+ epatch "${WORKDIR}"/gentoo-p2.patch
+
+ find "${ED}" -name '*.la' -exec rm -f '{}' +
+}
diff --git a/media-libs/libmpeg3/metadata.xml b/media-libs/libmpeg3/metadata.xml
new file mode 100644
index 000000000000..27f31563080f
--- /dev/null
+++ b/media-libs/libmpeg3/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">heroines</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libmpris2client/Manifest b/media-libs/libmpris2client/Manifest
new file mode 100644
index 000000000000..5103d54bb3df
--- /dev/null
+++ b/media-libs/libmpris2client/Manifest
@@ -0,0 +1 @@
+DIST libmpris2client-0.1.0.tar.bz2 287862 SHA256 2f4abd8f1cedb687574bcf1a98c34bf4476b87b088dc0741ca8239f84494e0dd SHA512 29926a60c2da71c78b38154ff39e310785e089abac756a5e1adea71f9f33975028a3110473a07c2cf56271fa978400d1249e5cab44c4bdd440f48ef37775ca44 WHIRLPOOL 9dc3ef783ad36ffdb2ee6a97b66890a3e2c96349494c842d969153367cb0e8cfdf2742bed713849b322e501f2574d5a2b17cd0530ab7a0d2058f68d99a626aa2
diff --git a/media-libs/libmpris2client/libmpris2client-0.1.0.ebuild b/media-libs/libmpris2client/libmpris2client-0.1.0.ebuild
new file mode 100644
index 000000000000..0ba9c3ea2112
--- /dev/null
+++ b/media-libs/libmpris2client/libmpris2client-0.1.0.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 eutils gnome2-utils
+
+DESCRIPTION="An library to control MPRIS2 compatible players"
+HOMEPAGE="http://github.com/matiasdelellis/libmpris2client"
+SRC_URI="http://github.com/matiasdelellis/${PN}/releases/download/V${PV}/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND=">=dev-libs/glib-2
+ x11-libs/gtk+:2"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS="AUTHORS NEWS README TODO"
+
+src_install() {
+ default
+ prune_libtool_files
+}
+
+pkg_preinst() { gnome2_icon_savelist; }
+pkg_postinst() { gnome2_icon_cache_update; }
+pkg_postrm() { gnome2_icon_cache_update; }
diff --git a/media-libs/libmpris2client/metadata.xml b/media-libs/libmpris2client/metadata.xml
new file mode 100644
index 000000000000..ba7d066de61d
--- /dev/null
+++ b/media-libs/libmpris2client/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>
+ <upstream>
+ <remote-id type="github">matiasdelellis/libmpris2client</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libmtp/Manifest b/media-libs/libmtp/Manifest
new file mode 100644
index 000000000000..9c2d733b510a
--- /dev/null
+++ b/media-libs/libmtp/Manifest
@@ -0,0 +1,3 @@
+DIST libmtp-1.1.6.tar.gz 733519 SHA256 3a1c1c83af91de4052eb54feb795c141b4c04a252e0031954ebbf6175970cb0a SHA512 fe6d9bc0621d6ad2325164585ec5f3e20824add5ee763d6d14ba7dbea6d2aacd75afa450627f3a03691c33ffb92675abebce64c3f8e32e8c2db511e814207ab3 WHIRLPOOL 176f2d64241735f2de33da4d84142debb2343aeb3abbd27a2af8e2a1815aa239c5f4ed9f38316bd2a8deb9d8faad4e293a5abae46e54d9137bfe8fcba279b371
+DIST libmtp-1.1.8.tar.gz 757109 SHA256 3f9e87536aa40e560d0c153a505e38096b1df5ea15fad783691e9a8ca4dd2282 SHA512 34952fbe1ae1dcee456f4fc0d6208cf18e3ced22891bb748350927f06ee433f806e8339d6275085e70b6fd09a43eb0f18ac617e564c8d8162671245ecf0b8904 WHIRLPOOL 5ab0df9b566b7fe3193b0a09a0792eb2634d0775a8ee9a9358d13b2aeba4c82816f5ecb5e5d7355ed338d6171259b7a5c9802b4bc8ea2b0de3d4bbbd1aa8050c
+DIST libmtp-1.1.9.tar.gz 760593 SHA256 23f1d3c0b54107388bf2824d56415e9e087c980c86e5d179865652c022b6b189 SHA512 6be9f14602b05830ec01defaeb0f237ac4d021f76f4003d7178eda00d8bf86d7fbbeba0053dc111d2ab9eb32f1603c2dc4f2bc128f4cbe4819228486b9b85513 WHIRLPOOL d357c949907b69f3a40291a79e05cc75790d86abb7fa0ea787c5ef0cd666b7f9888f9441f9893824520345d25799142f70c0ba0b773267fb9b374bb0d8b833e6
diff --git a/media-libs/libmtp/files/libmtp-1.1.6-fbsdlibusb.patch b/media-libs/libmtp/files/libmtp-1.1.6-fbsdlibusb.patch
new file mode 100644
index 000000000000..e0360d879499
--- /dev/null
+++ b/media-libs/libmtp/files/libmtp-1.1.6-fbsdlibusb.patch
@@ -0,0 +1,19 @@
+FreeBSD installs its libusb-1.0 implementation in /usr/include. libmtp uses
+pkg-config to discover it which adds the correct -I flag, so just #include
+libusb.h to make it work with every implementation.
+
+https://sourceforge.net/p/libmtp/patches/52/
+
+Index: libmtp-1.1.6/src/libusb-glue.h
+===================================================================
+--- libmtp-1.1.6.orig/src/libusb-glue.h
++++ libmtp-1.1.6/src/libusb-glue.h
+@@ -32,7 +32,7 @@
+
+ #include "ptp.h"
+ #ifdef HAVE_LIBUSB1
+-#include <libusb-1.0/libusb.h>
++#include <libusb.h>
+ #endif
+ #ifdef HAVE_LIBUSB0
+ #include <usb.h>
diff --git a/media-libs/libmtp/libmtp-1.1.6-r1.ebuild b/media-libs/libmtp/libmtp-1.1.6-r1.ebuild
new file mode 100644
index 000000000000..8e742c813d96
--- /dev/null
+++ b/media-libs/libmtp/libmtp-1.1.6-r1.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 autotools eutils udev user toolchain-funcs
+
+if [[ ${PV} == *9999* ]]; then
+ EGIT_REPO_URI="git://git.code.sf.net/p/libmtp/code"
+ EGIT_PROJECT="libmtp"
+ inherit git-2
+else
+ KEYWORDS="amd64 ~arm hppa ia64 ppc ppc64 x86 ~amd64-fbsd"
+ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+fi
+
+DESCRIPTION="An implementation of Microsoft's Media Transfer Protocol (MTP)"
+HOMEPAGE="http://libmtp.sourceforge.net/"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="+crypt doc examples static-libs"
+
+RDEPEND="virtual/libusb:1
+ crypt? ( dev-libs/libgcrypt:0=
+ dev-libs/libgpg-error )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+DOCS="AUTHORS ChangeLog README TODO"
+
+pkg_setup() {
+ enewgroup plugdev
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-fbsdlibusb.patch
+ if [[ ${PV} == *9999* ]]; then
+ touch config.rpath # This is from upstream autogen.sh
+ eautoreconf
+ fi
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable doc doxygen) \
+ $(use_enable crypt mtpz) \
+ --with-udev="$(get_udevdir)" \
+ --with-udev-group=plugdev \
+ --with-udev-mode=0660
+}
+
+src_install() {
+ default
+ prune_libtool_files
+
+ if use examples; then
+ docinto examples
+ dodoc examples/*.{c,h,sh}
+ fi
+
+ sed -i -e '/^Unable to open/d' "${ED}/$(get_udevdir)"/rules.d/*-libmtp.rules || die #481666
+}
diff --git a/media-libs/libmtp/libmtp-1.1.8.ebuild b/media-libs/libmtp/libmtp-1.1.8.ebuild
new file mode 100644
index 000000000000..d2a84774bdb5
--- /dev/null
+++ b/media-libs/libmtp/libmtp-1.1.8.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+if [[ ${PV} == 9999* ]]; then
+ EGIT_REPO_URI="git://git.code.sf.net/p/${PN}/code"
+ inherit autotools git-r3
+else
+ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+ KEYWORDS="amd64 ~arm hppa ia64 ppc ppc64 x86 ~amd64-fbsd ~x86-fbsd"
+fi
+
+inherit eutils udev user
+
+DESCRIPTION="An implementation of Microsoft's Media Transfer Protocol (MTP)"
+HOMEPAGE="http://libmtp.sourceforge.net/"
+
+LICENSE="LGPL-2.1" # LGPL-2+ and LGPL-2.1+ ?
+SLOT="0/9" # Based on SONAME of libmtp shared library
+IUSE="+crypt doc examples static-libs"
+
+RDEPEND="virtual/libusb:1
+ crypt? ( >=dev-libs/libgcrypt-1.5.4:0= )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+pkg_setup() {
+ DOCS="AUTHORS README TODO"
+ enewgroup plugdev
+}
+
+src_unpack() {
+ [[ ${PV} == 9999* ]] && git-r3_src_unpack
+ default_src_unpack
+}
+
+src_prepare() {
+ # ChangeLog says "RETIRING THIS FILE ..pause.. GIT" (Last entry from start of 2011)
+ rm -f ChangeLog
+
+ if [[ ${PV} == 9999* ]]; then
+ local crpthf=config.rpath
+ local crpthd=/usr/share/gettext/${crpthf}
+ if has_version '>sys-devel/gettext-0.18.3' && [[ -e ${crpthd} ]]; then
+ cp "${crpthd}" .
+ else
+ touch ${crpthf} # This is from upstream autogen.sh
+ fi
+ eautoreconf
+ fi
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable doc doxygen) \
+ $(use_enable crypt mtpz) \
+ --with-udev="$(get_udevdir)" \
+ --with-udev-group=plugdev \
+ --with-udev-mode=0660
+}
+
+src_install() {
+ default
+ prune_libtool_files --all
+
+ if use examples; then
+ docinto examples
+ dodoc examples/*.{c,h,sh}
+ fi
+}
diff --git a/media-libs/libmtp/libmtp-1.1.9.ebuild b/media-libs/libmtp/libmtp-1.1.9.ebuild
new file mode 100644
index 000000000000..9cf6cbc1245b
--- /dev/null
+++ b/media-libs/libmtp/libmtp-1.1.9.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils udev user
+
+if [[ ${PV} == 9999* ]]; then
+ EGIT_REPO_URI="git://git.code.sf.net/p/${PN}/code"
+ inherit autotools git-r3
+else
+ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~x86 ~amd64-fbsd ~x86-fbsd"
+fi
+
+DESCRIPTION="An implementation of Microsoft's Media Transfer Protocol (MTP)"
+HOMEPAGE="http://libmtp.sourceforge.net/"
+
+LICENSE="LGPL-2.1" # LGPL-2+ and LGPL-2.1+ ?
+SLOT="0/9" # Based on SONAME of libmtp shared library
+IUSE="+crypt doc examples static-libs"
+
+RDEPEND="virtual/libusb:1
+ crypt? ( >=dev-libs/libgcrypt-1.5.4:0= )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+pkg_setup() {
+ DOCS="AUTHORS README TODO"
+ enewgroup plugdev
+}
+
+src_prepare() {
+ # ChangeLog says "RETIRING THIS FILE ..pause.. GIT" (Last entry from start of 2011)
+ rm -f ChangeLog
+
+ if [[ ${PV} == 9999* ]]; then
+ local crpthf=config.rpath
+ local crpthd=/usr/share/gettext/${crpthf}
+ if has_version '>sys-devel/gettext-0.18.3' && [[ -e ${crpthd} ]]; then
+ cp "${crpthd}" .
+ else
+ touch ${crpthf} # This is from upstream autogen.sh
+ fi
+ eautoreconf
+ fi
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable doc doxygen) \
+ $(use_enable crypt mtpz) \
+ --with-udev="$(get_udevdir)" \
+ --with-udev-group=plugdev \
+ --with-udev-mode=0660
+}
+
+src_install() {
+ default
+ prune_libtool_files --all
+
+ if use examples; then
+ docinto examples
+ dodoc examples/*.{c,h,sh}
+ fi
+}
diff --git a/media-libs/libmtp/libmtp-9999.ebuild b/media-libs/libmtp/libmtp-9999.ebuild
new file mode 100644
index 000000000000..9cf6cbc1245b
--- /dev/null
+++ b/media-libs/libmtp/libmtp-9999.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils udev user
+
+if [[ ${PV} == 9999* ]]; then
+ EGIT_REPO_URI="git://git.code.sf.net/p/${PN}/code"
+ inherit autotools git-r3
+else
+ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~x86 ~amd64-fbsd ~x86-fbsd"
+fi
+
+DESCRIPTION="An implementation of Microsoft's Media Transfer Protocol (MTP)"
+HOMEPAGE="http://libmtp.sourceforge.net/"
+
+LICENSE="LGPL-2.1" # LGPL-2+ and LGPL-2.1+ ?
+SLOT="0/9" # Based on SONAME of libmtp shared library
+IUSE="+crypt doc examples static-libs"
+
+RDEPEND="virtual/libusb:1
+ crypt? ( >=dev-libs/libgcrypt-1.5.4:0= )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+pkg_setup() {
+ DOCS="AUTHORS README TODO"
+ enewgroup plugdev
+}
+
+src_prepare() {
+ # ChangeLog says "RETIRING THIS FILE ..pause.. GIT" (Last entry from start of 2011)
+ rm -f ChangeLog
+
+ if [[ ${PV} == 9999* ]]; then
+ local crpthf=config.rpath
+ local crpthd=/usr/share/gettext/${crpthf}
+ if has_version '>sys-devel/gettext-0.18.3' && [[ -e ${crpthd} ]]; then
+ cp "${crpthd}" .
+ else
+ touch ${crpthf} # This is from upstream autogen.sh
+ fi
+ eautoreconf
+ fi
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable doc doxygen) \
+ $(use_enable crypt mtpz) \
+ --with-udev="$(get_udevdir)" \
+ --with-udev-group=plugdev \
+ --with-udev-mode=0660
+}
+
+src_install() {
+ default
+ prune_libtool_files --all
+
+ if use examples; then
+ docinto examples
+ dodoc examples/*.{c,h,sh}
+ fi
+}
diff --git a/media-libs/libmtp/metadata.xml b/media-libs/libmtp/metadata.xml
new file mode 100644
index 000000000000..8e741341963f
--- /dev/null
+++ b/media-libs/libmtp/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>sound</herd>
+ <upstream>
+ <remote-id type="sourceforge">libmtp</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libmygpo-qt/Manifest b/media-libs/libmygpo-qt/Manifest
new file mode 100644
index 000000000000..2cd8ed95124c
--- /dev/null
+++ b/media-libs/libmygpo-qt/Manifest
@@ -0,0 +1 @@
+DIST libmygpo-qt-1.0.7.tar.gz 62703 SHA256 43b9c00ae2c206ac64cf725918024b3d0927bbde880196a016f2ee329bac50fd SHA512 b1aad4daa32a41173d060f026245074ff2d11b9747447cb97cea9e3b93ea42e9ce89f67d4ed6396ed2b087db1f149e12543fb0a5d897e74a359c3115a418b45b WHIRLPOOL 5d7bbcf724677bc326060d4c8f79cadddd32caa240b830acdf2bcf0f213f6712dc2082fd1d6ad711edd23addd72e7553fdce1f2f1726cc0f8694ed9d4c4e04ae
diff --git a/media-libs/libmygpo-qt/libmygpo-qt-1.0.7-r1.ebuild b/media-libs/libmygpo-qt/libmygpo-qt-1.0.7-r1.ebuild
new file mode 100644
index 000000000000..b4473608cccf
--- /dev/null
+++ b/media-libs/libmygpo-qt/libmygpo-qt-1.0.7-r1.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 cmake-utils
+
+DESCRIPTION="Qt/C++ library wrapping the gpodder.net webservice"
+HOMEPAGE="http://wiki.gpodder.org/wiki/Libmygpo-qt"
+
+if [[ ${PV} == *9999* ]]; then
+ EGIT_REPO_URI="https://github.com/gpodder/libmygpo-qt.git"
+ KEYWORDS=""
+ SRC_URI=""
+ inherit git-2
+else
+ KEYWORDS="amd64 x86"
+ SRC_URI="https://github.com/gpodder/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+fi
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="test"
+
+RDEPEND="dev-qt/qtcore:4
+ >=dev-libs/qjson-0.5"
+DEPEND="${RDEPEND}
+ dev-qt/qttest:4
+ virtual/pkgconfig
+ test? ( dev-qt/qttest:4 )"
+
+DOCS=( AUTHORS README )
+
+src_prepare() {
+ cmake-utils_src_prepare
+ if ! use test ; then
+ sed -i -e '/find_package/s/QtTest//' CMakeLists.txt || die
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use test MYGPO_BUILD_TESTS)
+ )
+ cmake-utils_src_configure
+}
diff --git a/media-libs/libmygpo-qt/libmygpo-qt-1.0.7.ebuild b/media-libs/libmygpo-qt/libmygpo-qt-1.0.7.ebuild
new file mode 100644
index 000000000000..c6f116dfabf8
--- /dev/null
+++ b/media-libs/libmygpo-qt/libmygpo-qt-1.0.7.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit cmake-utils
+
+DESCRIPTION="Qt/C++ library wrapping the gpodder.net webservice"
+HOMEPAGE="http://wiki.gpodder.org/wiki/Libmygpo-qt"
+
+if [[ ${PV} == *9999* ]]; then
+ EGIT_REPO_URI="https://github.com/gpodder/libmygpo-qt.git"
+ KEYWORDS=""
+ SRC_URI=""
+ inherit git-2
+else
+ KEYWORDS="amd64 x86"
+ SRC_URI="https://github.com/gpodder/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+fi
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE=""
+
+RDEPEND="dev-qt/qtcore:4
+ >=dev-libs/qjson-0.5"
+DEPEND="${RDEPEND}
+ dev-qt/qttest:4
+ virtual/pkgconfig"
+
+DOCS=( AUTHORS README )
diff --git a/media-libs/libmygpo-qt/libmygpo-qt-9999.ebuild b/media-libs/libmygpo-qt/libmygpo-qt-9999.ebuild
new file mode 100644
index 000000000000..b7f2c45af146
--- /dev/null
+++ b/media-libs/libmygpo-qt/libmygpo-qt-9999.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit cmake-utils
+
+DESCRIPTION="Qt/C++ library wrapping the gpodder.net webservice"
+HOMEPAGE="http://wiki.gpodder.org/wiki/Libmygpo-qt"
+
+if [[ ${PV} == *9999* ]]; then
+ EGIT_REPO_URI="https://github.com/gpodder/libmygpo-qt.git"
+ KEYWORDS=""
+ SRC_URI=""
+ inherit git-2
+else
+ KEYWORDS="~amd64 ~x86"
+ SRC_URI="https://github.com/gpodder/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+fi
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="test"
+
+RDEPEND="dev-qt/qtcore:4
+ >=dev-libs/qjson-0.5"
+DEPEND="${RDEPEND}
+ dev-qt/qttest:4
+ virtual/pkgconfig
+ test? ( dev-qt/qttest:4 )"
+
+DOCS=( AUTHORS README )
+
+src_prepare() {
+ cmake-utils_src_prepare
+ if ! use test ; then
+ sed -i -e '/find_package/s/QtTest//' CMakeLists.txt || die
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use test MYGPO_BUILD_TESTS)
+ )
+ cmake-utils_src_configure
+}
diff --git a/media-libs/libmygpo-qt/metadata.xml b/media-libs/libmygpo-qt/metadata.xml
new file mode 100644
index 000000000000..121c9aab0707
--- /dev/null
+++ b/media-libs/libmygpo-qt/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>
+ <herd>sound</herd>
+ <maintainer>
+ <email>nikoli@gmx.us</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">gpodder/libmygpo-qt</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libnjb/Manifest b/media-libs/libnjb/Manifest
new file mode 100644
index 000000000000..163d3ac9f813
--- /dev/null
+++ b/media-libs/libnjb/Manifest
@@ -0,0 +1,2 @@
+DIST libnjb-2.2.6.tar.gz 504329 SHA256 c6eabf1fd3d32af6d3707574e1891919b25c3af35cadfc093456c00bccf3826e
+DIST libnjb-2.2.7.tar.gz 497862 SHA256 ccbcfc870bdc10ad7a144f81a340b61bad74a6f00f77cf08db5866332668d2b6
diff --git a/media-libs/libnjb/files/libnjb.rules b/media-libs/libnjb/files/libnjb.rules
new file mode 100644
index 000000000000..2ad3227d7b27
--- /dev/null
+++ b/media-libs/libnjb/files/libnjb.rules
@@ -0,0 +1,35 @@
+SUBSYSTEM!="usb_device", GOTO="libnjb_rules_end"
+ACTION!="add", GOTO="libnjb_rules_end"
+
+# Creative Nomad Jukebox
+ATTRS{idVendor}=="0471", ATTRS{idProduct}=="0222", GROUP="plugdev", MODE="0660"
+# Creative Nomad Jukebox 2
+ATTRS{idVendor}=="041e", ATTRS{idProduct}=="4100", GROUP="plugdev", MODE="0660"
+# Creative Nomad Jukebox 3
+ATTRS{idVendor}=="041e", ATTRS{idProduct}=="4101", GROUP="plugdev", MODE="0660"
+# Creative Nomad Jukebox Zen
+ATTRS{idVendor}=="041e", ATTRS{idProduct}=="4108", GROUP="plugdev", MODE="0660"
+# Creative Nomad Jukebox Zen USB 2.0
+ATTRS{idVendor}=="041e", ATTRS{idProduct}=="410b", GROUP="plugdev", MODE="0660"
+# Creative Nomad Jukebox Zen NX
+ATTRS{idVendor}=="041e", ATTRS{idProduct}=="4109", GROUP="plugdev", MODE="0660"
+# Creative Nomad Jukebox Zen Xtra
+ATTRS{idVendor}=="041e", ATTRS{idProduct}=="4110", GROUP="plugdev", MODE="0660"
+# Dell Digital Jukebox
+ATTRS{idVendor}=="041e", ATTRS{idProduct}=="4111", GROUP="plugdev", MODE="0660"
+# Creative Nomad Jukebox Zen Touch
+ATTRS{idVendor}=="041e", ATTRS{idProduct}=="411b", GROUP="plugdev", MODE="0660"
+# Creative Zen (Zen Micro variant)
+ATTRS{idVendor}=="041e", ATTRS{idProduct}=="411d", GROUP="plugdev", MODE="0660"
+# Creative Nomad Jukebox Zen Micro
+ATTRS{idVendor}=="041e", ATTRS{idProduct}=="411e", GROUP="plugdev", MODE="0660"
+# Second Generation Dell Digital Jukebox
+ATTRS{idVendor}=="041e", ATTRS{idProduct}=="4126", GROUP="plugdev", MODE="0660"
+# Dell Pocket DJ
+ATTRS{idVendor}=="041e", ATTRS{idProduct}=="4127", GROUP="plugdev", MODE="0660"
+# Creative Zen Sleek
+ATTRS{idVendor}=="041e", ATTRS{idProduct}=="4136", GROUP="plugdev", MODE="0660"
+# Third Generation Dell Digital Jukebox
+ATTRS{idVendor}=="041e", ATTRS{idProduct}=="412f", GROUP="plugdev", MODE="0660"
+
+LABEL="libnjb_rules_end"
diff --git a/media-libs/libnjb/libnjb-2.2.6.ebuild b/media-libs/libnjb/libnjb-2.2.6.ebuild
new file mode 100644
index 000000000000..47d76b9949f9
--- /dev/null
+++ b/media-libs/libnjb/libnjb-2.2.6.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit libtool multilib udev
+
+DESCRIPTION="a C library and API for communicating with the Creative Nomad JukeBox digital audio player"
+HOMEPAGE="http://libnjb.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86 ~x86-fbsd"
+IUSE="static-libs"
+
+RDEPEND="virtual/libusb:0"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ sed -i \
+ -e 's:SUBDIRS = src sample doc:SUBDIRS = src doc:' \
+ Makefile.in || die
+
+ elibtoolize
+}
+
+src_configure() {
+ econf \
+ --disable-dependency-tracking \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+
+ dodoc AUTHORS ChangeLog* FAQ HACKING README
+
+ udev_newrules "${FILESDIR}"/${PN}.rules 80-${PN}.rules
+
+ find "${D}" -name '*.la' -exec rm -f {} +
+}
diff --git a/media-libs/libnjb/libnjb-2.2.7.ebuild b/media-libs/libnjb/libnjb-2.2.7.ebuild
new file mode 100644
index 000000000000..27441704c867
--- /dev/null
+++ b/media-libs/libnjb/libnjb-2.2.7.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit libtool multilib udev
+
+DESCRIPTION="a C library and API for communicating with the Creative Nomad JukeBox digital audio player"
+HOMEPAGE="http://libnjb.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd"
+IUSE="doc static-libs"
+
+RDEPEND="virtual/libusb:0"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )"
+
+DOCS="AUTHORS ChangeLog* FAQ HACKING README"
+
+src_prepare() {
+ sed -i \
+ -e 's:SUBDIRS = src sample doc:SUBDIRS = src doc:' \
+ Makefile.in || die
+
+ elibtoolize
+}
+
+src_configure() {
+ use doc || export ac_cv_prog_HAVE_DOXYGEN=false
+
+ econf \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+
+ udev_newrules "${FILESDIR}"/${PN}.rules 80-${PN}.rules
+
+ find "${ED}" -name '*.la' -exec rm -f {} +
+}
diff --git a/media-libs/libnjb/metadata.xml b/media-libs/libnjb/metadata.xml
new file mode 100644
index 000000000000..6a6641a7fe21
--- /dev/null
+++ b/media-libs/libnjb/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>sound</herd>
+ <upstream>
+ <remote-id type="sourceforge">libnjb</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libnsbmp/Manifest b/media-libs/libnsbmp/Manifest
new file mode 100644
index 000000000000..8e3ffa0a2165
--- /dev/null
+++ b/media-libs/libnsbmp/Manifest
@@ -0,0 +1,4 @@
+DIST libnsbmp-0.1.1-src.tar.gz 202262 SHA256 584046809d3213e5917cd26eafb03068ca94274229f595f0e0520b15fa454f98 SHA512 ebe3f3e3392f09b67dd521dbcf402e99a1dcc9be85ad77c0fa39a64501646a40c5a57bedcd0b486c31fe9707b9eb5df571486f9754a4c10fa80e451a6bcd60f1 WHIRLPOOL 7b6f3b73147fef90ac4eb96348912ead91e3eff7a30fcfb6a10e6c1ee709c523563c4bcb582bc59d948516c824311ba370fb53f022468c43dcc853f38e5eb415
+DIST libnsbmp-0.1.2-src.tar.gz 202303 SHA256 969ba1c4f778b6ecee5fd834a6206c97b49885673389260fef1043dfca2968b1 SHA512 3aa6090a1640ba0d5554d66336c69fc6db8bfeb87b987eef264ec5100bd76d3895f269f5552e87a41f3b126910966118e4a36f7274ee9390882df79aaa204347 WHIRLPOOL e7ed63e2645da3ec4cba5b04d2c39c256447a8404a919391824ba43f8c158433f2abceb6fb1fe6963d1672dbb70cf0c18189c3c23f00d2a356dc15e97ae568ec
+DIST netsurf-buildsystem-1.2.tar.gz 38914 SHA256 3903a4a1551c9c202e1d2047344c4f3598c8d9d6c35ebf8cc2e18874bd0c9d61 SHA512 963e8a5033e8ef70595507f24fea3d9697eefb50ad7f92a6d3c913501c7026f12ec6d48f92b75e352b32f212f6216b8d8455aff25fa8d8d0fc12a3b19a875a1c WHIRLPOOL e56a520ae284089d0f36f06a6891ebb5b208ca847c74340c18581340e457c20ae9365999dc13284f438b965dcd7e85f04b93d1c1f22cadf6f7c1e2cef81d528c
+DIST netsurf-buildsystem-1.3.tar.gz 37906 SHA256 10bbe95ba07476208da6047bd3c74685b6e61ba9904975b5d5c9a2c79a84ac79 SHA512 79ef3e366c4798dbb88021fd05019ba9fe50539b7482bd3d07422f4c0dbf2047b906f39a0b48deebbdf111d84d93a9364d08e5c97f91609363c27641db15e6b5 WHIRLPOOL c8131d0ffb79b208b63bef94606735968584edfff8cb24b4c83cd747c5d65c2811004626840798047ffddf84556ef7d8e23242f60d01a4a046323df3c78b0980
diff --git a/media-libs/libnsbmp/files/libnsbmp-0.1.1-glibc2.20.patch b/media-libs/libnsbmp/files/libnsbmp-0.1.1-glibc2.20.patch
new file mode 100644
index 000000000000..9f912195fd71
--- /dev/null
+++ b/media-libs/libnsbmp/files/libnsbmp-0.1.1-glibc2.20.patch
@@ -0,0 +1,15 @@
+--- libnsbmp-0.1.1/Makefile
++++ libnsbmp-0.1.1/Makefile
+@@ -13,11 +13,7 @@
+ WARNFLAGS := -Wall -W -Wundef -Wpointer-arith -Wcast-align \
+ -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes \
+ -Wmissing-declarations -Wnested-externs -pedantic
+-# BeOS/Haiku standard library headers create warnings
+-ifneq ($(TARGET),beos)
+- WARNFLAGS := $(WARNFLAGS) -Werror
+-endif
+-CFLAGS := -D_BSD_SOURCE -I$(CURDIR)/include/ \
++CFLAGS := -D_DEFAULT_SOURCE -I$(CURDIR)/include/ \
+ -I$(CURDIR)/src $(WARNFLAGS) $(CFLAGS)
+ ifneq ($(GCCVER),2)
+ CFLAGS := $(CFLAGS) -std=c99
diff --git a/media-libs/libnsbmp/files/libnsbmp-0.1.2-glibc2.20.patch b/media-libs/libnsbmp/files/libnsbmp-0.1.2-glibc2.20.patch
new file mode 100644
index 000000000000..5832857f6da8
--- /dev/null
+++ b/media-libs/libnsbmp/files/libnsbmp-0.1.2-glibc2.20.patch
@@ -0,0 +1,14 @@
+--- libnsbmp-0.1.2/Makefile
++++ libnsbmp-0.1.2/Makefile
+@@ -14,10 +14,7 @@
+ -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes \
+ -Wmissing-declarations -Wnested-externs -pedantic
+ # BeOS/Haiku standard library headers create warnings
+-ifneq ($(BUILD),i586-pc-haiku)
+- WARNFLAGS := $(WARNFLAGS) -Werror
+-endif
+-CFLAGS := -D_BSD_SOURCE -I$(CURDIR)/include/ \
++CFLAGS := -D_DEFAULT_SOURCE -I$(CURDIR)/include/ \
+ -I$(CURDIR)/src $(WARNFLAGS) $(CFLAGS)
+ ifneq ($(GCCVER),2)
+ CFLAGS := $(CFLAGS) -std=c99
diff --git a/media-libs/libnsbmp/libnsbmp-0.1.1.ebuild b/media-libs/libnsbmp/libnsbmp-0.1.1.ebuild
new file mode 100644
index 000000000000..d182b334df7c
--- /dev/null
+++ b/media-libs/libnsbmp/libnsbmp-0.1.1.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+NETSURF_BUILDSYSTEM=buildsystem-1.2
+inherit netsurf
+
+DESCRIPTION="decoding library for BMP and ICO image file formats, written in C"
+HOMEPAGE="http://www.netsurf-browser.org/projects/libnsbmp/"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~m68k-mint"
+IUSE=""
+
+RDEPEND=""
+DEPEND="virtual/pkgconfig"
+
+PATCHES=( "${FILESDIR}"/${P}-glibc2.20.patch )
diff --git a/media-libs/libnsbmp/libnsbmp-0.1.2-r1.ebuild b/media-libs/libnsbmp/libnsbmp-0.1.2-r1.ebuild
new file mode 100644
index 000000000000..eb71310e1336
--- /dev/null
+++ b/media-libs/libnsbmp/libnsbmp-0.1.2-r1.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+NETSURF_BUILDSYSTEM=buildsystem-1.3
+inherit netsurf
+
+DESCRIPTION="decoding library for BMP and ICO image file formats, written in C"
+HOMEPAGE="http://www.netsurf-browser.org/projects/libnsbmp/"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~m68k-mint"
+IUSE=""
+
+RDEPEND=""
+DEPEND="virtual/pkgconfig"
+
+PATCHES=( "${FILESDIR}"/${P}-glibc2.20.patch )
diff --git a/media-libs/libnsbmp/metadata.xml b/media-libs/libnsbmp/metadata.xml
new file mode 100644
index 000000000000..59acc2cc580e
--- /dev/null
+++ b/media-libs/libnsbmp/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>xmw@gentoo.org</email>
+<name>Michael Weber</name>
+</maintainer>
+</pkgmetadata>
+
diff --git a/media-libs/libnsgif/Manifest b/media-libs/libnsgif/Manifest
new file mode 100644
index 000000000000..89d9c5524b57
--- /dev/null
+++ b/media-libs/libnsgif/Manifest
@@ -0,0 +1,4 @@
+DIST libnsgif-0.1.1-src.tar.gz 202610 SHA256 d450ea0a9da234486e997248b30a86524f75f1021ca67017b5597423cf6c0a15 SHA512 efa86a52126e85e6a58bb7eb6d8cef37e4096e25db91c40ea48de353a0639473383b6c112d502625d008f542a074555f3c2012dd475818289875a9ca71eb981c WHIRLPOOL 72e75cfa53f482644d91fb8d72938d6b7aa8de6eb821895dc5d44ee7d35a9e1e0b19149ea43c1b25ccad21371585ee3a036c715e29ff9ffe43f249a4a5306f9a
+DIST libnsgif-0.1.2-src.tar.gz 202615 SHA256 dd6948af5c054224489beaa4b4cc13c2c4f695d5bdee7e58ec2370c53cd9faa5 SHA512 0444f762f82e34513a68c3648e7bccc2fabe062e3c36cff21289998fc38a44bfd23ca17a6f3ea639c39465dd595975b6bdd3ffde08fff99f17eee8825c44b2e3 WHIRLPOOL 50c1c7e7ec97cd5d04809bb3f6ab10958914a3787b0e5e00e8fcca4dc6ba16216aebf408c9837f747227de8316d08e3e783c8c22ad4cc1f624bb9fffbe44f7a1
+DIST netsurf-buildsystem-1.2.tar.gz 38914 SHA256 3903a4a1551c9c202e1d2047344c4f3598c8d9d6c35ebf8cc2e18874bd0c9d61 SHA512 963e8a5033e8ef70595507f24fea3d9697eefb50ad7f92a6d3c913501c7026f12ec6d48f92b75e352b32f212f6216b8d8455aff25fa8d8d0fc12a3b19a875a1c WHIRLPOOL e56a520ae284089d0f36f06a6891ebb5b208ca847c74340c18581340e457c20ae9365999dc13284f438b965dcd7e85f04b93d1c1f22cadf6f7c1e2cef81d528c
+DIST netsurf-buildsystem-1.3.tar.gz 37906 SHA256 10bbe95ba07476208da6047bd3c74685b6e61ba9904975b5d5c9a2c79a84ac79 SHA512 79ef3e366c4798dbb88021fd05019ba9fe50539b7482bd3d07422f4c0dbf2047b906f39a0b48deebbdf111d84d93a9364d08e5c97f91609363c27641db15e6b5 WHIRLPOOL c8131d0ffb79b208b63bef94606735968584edfff8cb24b4c83cd747c5d65c2811004626840798047ffddf84556ef7d8e23242f60d01a4a046323df3c78b0980
diff --git a/media-libs/libnsgif/files/libnsgif-0.1.1-glibc2.20.patch b/media-libs/libnsgif/files/libnsgif-0.1.1-glibc2.20.patch
new file mode 100644
index 000000000000..96d9b3c16554
--- /dev/null
+++ b/media-libs/libnsgif/files/libnsgif-0.1.1-glibc2.20.patch
@@ -0,0 +1,15 @@
+--- libnsgif-0.1.1/Makefile
++++ libnsgif-0.1.1/Makefile
+@@ -13,11 +13,7 @@
+ WARNFLAGS := -Wall -W -Wundef -Wpointer-arith -Wcast-align \
+ -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes \
+ -Wmissing-declarations -Wnested-externs -pedantic
+-# BeOS/Haiku standard library headers create warnings
+-ifneq ($(TARGET),beos)
+- WARNFLAGS := $(WARNFLAGS) -Werror
+-endif
+-CFLAGS := -D_BSD_SOURCE -I$(CURDIR)/include/ \
++CFLAGS := -D_DEFAULT_SOURCE -I$(CURDIR)/include/ \
+ -I$(CURDIR)/src $(WARNFLAGS) $(CFLAGS)
+ ifneq ($(GCCVER),2)
+ CFLAGS := $(CFLAGS) -std=c99
diff --git a/media-libs/libnsgif/files/libnsgif-0.1.2-glibc2.20.patch b/media-libs/libnsgif/files/libnsgif-0.1.2-glibc2.20.patch
new file mode 100644
index 000000000000..47e56528d439
--- /dev/null
+++ b/media-libs/libnsgif/files/libnsgif-0.1.2-glibc2.20.patch
@@ -0,0 +1,15 @@
+--- libnsgif-0.1.2/Makefile
++++ libnsgif-0.1.2/Makefile
+@@ -13,11 +13,7 @@
+ WARNFLAGS := -Wall -W -Wundef -Wpointer-arith -Wcast-align \
+ -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes \
+ -Wmissing-declarations -Wnested-externs -pedantic
+-# BeOS/Haiku standard library headers create warnings
+-ifneq ($(BUILD),i586-pc-haiku)
+- WARNFLAGS := $(WARNFLAGS) -Werror
+-endif
+-CFLAGS := -D_BSD_SOURCE -I$(CURDIR)/include/ \
++CFLAGS := -D_DEFAULT_SOURCE -I$(CURDIR)/include/ \
+ -I$(CURDIR)/src $(WARNFLAGS) $(CFLAGS)
+ ifneq ($(GCCVER),2)
+ CFLAGS := $(CFLAGS) -std=c99
diff --git a/media-libs/libnsgif/libnsgif-0.1.1.ebuild b/media-libs/libnsgif/libnsgif-0.1.1.ebuild
new file mode 100644
index 000000000000..8e4476c87923
--- /dev/null
+++ b/media-libs/libnsgif/libnsgif-0.1.1.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+NETSURF_BUILDSYSTEM=buildsystem-1.2
+inherit netsurf
+
+DESCRIPTION="decoding library for the GIF image file format, written in C"
+HOMEPAGE="http://www.netsurf-browser.org/projects/libnsgif/"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~m68k-mint"
+IUSE=""
+
+RDEPEND=""
+DEPEND="virtual/pkgconfig"
+
+PATCHES=( "${FILESDIR}"/${P}-glibc2.20.patch )
diff --git a/media-libs/libnsgif/libnsgif-0.1.2-r1.ebuild b/media-libs/libnsgif/libnsgif-0.1.2-r1.ebuild
new file mode 100644
index 000000000000..5492cd88c4c1
--- /dev/null
+++ b/media-libs/libnsgif/libnsgif-0.1.2-r1.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+NETSURF_BUILDSYSTEM=buildsystem-1.3
+inherit netsurf
+
+DESCRIPTION="decoding library for the GIF image file format, written in C"
+HOMEPAGE="http://www.netsurf-browser.org/projects/libnsgif/"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~m68k-mint"
+IUSE=""
+
+RDEPEND=""
+DEPEND="virtual/pkgconfig"
+
+PATCHES=( "${FILESDIR}"/${P}-glibc2.20.patch )
diff --git a/media-libs/libnsgif/metadata.xml b/media-libs/libnsgif/metadata.xml
new file mode 100644
index 000000000000..59acc2cc580e
--- /dev/null
+++ b/media-libs/libnsgif/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>xmw@gentoo.org</email>
+<name>Michael Weber</name>
+</maintainer>
+</pkgmetadata>
+
diff --git a/media-libs/libnut/Manifest b/media-libs/libnut/Manifest
new file mode 100644
index 000000000000..8358256b2df5
--- /dev/null
+++ b/media-libs/libnut/Manifest
@@ -0,0 +1 @@
+DIST libnut-661.tar.bz2 41997 SHA256 5ec2ad479e1f890305b0de98d38d42d92676f1507e9bcc78fec3ff89ef983ce9
diff --git a/media-libs/libnut/libnut-661.ebuild b/media-libs/libnut/libnut-661.ebuild
new file mode 100644
index 000000000000..1b3b57c0c048
--- /dev/null
+++ b/media-libs/libnut/libnut-661.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit flag-o-matic
+
+DESCRIPTION="Library and tools to create NUT multimedia files"
+HOMEPAGE="http://svn.mplayerhq.hu/nut/
+ http://wiki.multimedia.cx/index.php?title=NUT
+ http://www.nut-container.org/"
+SRC_URI="mirror://gentoo/${P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE=""
+DEPEND=""
+RDEPEND=""
+
+src_install() {
+ emake PREFIX="${D}/usr" install || die "make install died"
+ dodoc README
+ cd "${S}"/nututils
+ dobin nutindex nutmerge nutparse
+}
diff --git a/media-libs/libnut/metadata.xml b/media-libs/libnut/metadata.xml
new file mode 100644
index 000000000000..6e18c685abc2
--- /dev/null
+++ b/media-libs/libnut/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">
+NUT is a container format under construction by MPlayer and FFmpeg developers.
+</longdescription>
+</pkgmetadata>
+
diff --git a/media-libs/libofa/Manifest b/media-libs/libofa/Manifest
new file mode 100644
index 000000000000..b99737bdec44
--- /dev/null
+++ b/media-libs/libofa/Manifest
@@ -0,0 +1 @@
+DIST libofa-0.9.3.tar.gz 384043 SHA256 0216466153e92058c5202dea03390ddc7601d916b983f71ce4f4d034405590a0 SHA512 058fb43ea296325d2f7ad1762e1fd3f2ad772754b5d53dbaa1c5cd91ac5041ef82c7ea9ac580825e2391fa7db6803ff7fd5b24faf319280211a4641516126967 WHIRLPOOL bc9adb3346cbb017e6d50364d4710b03c0dd5c48556ac636484fc2ed663a3fa72f93d86317087a50baf2b04d9c516c02688215df4032db2eb435348c752a5f15
diff --git a/media-libs/libofa/files/libofa-0.9.3-curl-7.21.patch b/media-libs/libofa/files/libofa-0.9.3-curl-7.21.patch
new file mode 100644
index 000000000000..d23351860ddd
--- /dev/null
+++ b/media-libs/libofa/files/libofa-0.9.3-curl-7.21.patch
@@ -0,0 +1,11 @@
+diff -ru libofa-0.9.3.orig//examples/protocol.cpp libofa-0.9.3//examples/protocol.cpp
+--- libofa-0.9.3.orig//examples/protocol.cpp 2006-05-10 20:05:42.000000000 +0200
++++ libofa-0.9.3//examples/protocol.cpp 2011-07-22 19:02:30.687109297 +0200
+@@ -12,7 +12,6 @@
+ #include <map>
+ #include <expat.h>
+ #include <curl/curl.h>
+-#include <curl/types.h>
+ #include <curl/easy.h>
+
+ using namespace std;
diff --git a/media-libs/libofa/files/libofa-0.9.3-gcc-4.3.patch b/media-libs/libofa/files/libofa-0.9.3-gcc-4.3.patch
new file mode 100644
index 000000000000..f68f42bfb129
--- /dev/null
+++ b/media-libs/libofa/files/libofa-0.9.3-gcc-4.3.patch
@@ -0,0 +1,35 @@
+diff -ur libofa-0.9.3.orig/examples/example.cpp libofa-0.9.3/examples/example.cpp
+--- libofa-0.9.3.orig/examples/example.cpp 2006-05-10 21:05:37.000000000 +0300
++++ libofa-0.9.3/examples/example.cpp 2008-04-16 15:51:49.000000000 +0300
+@@ -9,6 +9,8 @@
+
+ #include "protocol.h"
+
++#include <string.h>
++
+ AudioData* loadWaveFile(char *file);
+ AudioData* loadDataUsingLAME(char *file);
+
+Vain hakemistossa libofa-0.9.3/examples: example.cpp.orig
+diff -ur libofa-0.9.3.orig/examples/protocol.cpp libofa-0.9.3/examples/protocol.cpp
+--- libofa-0.9.3.orig/examples/protocol.cpp 2006-05-10 21:05:42.000000000 +0300
++++ libofa-0.9.3/examples/protocol.cpp 2008-04-16 15:51:49.000000000 +0300
+@@ -8,6 +8,7 @@
+ -------------------------------------------------------------------*/
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <cstring>
+ #include <string>
+ #include <map>
+ #include <expat.h>
+diff -ur libofa-0.9.3.orig/lib/signal_op.cpp libofa-0.9.3/lib/signal_op.cpp
+--- libofa-0.9.3.orig/lib/signal_op.cpp 2006-05-10 21:01:12.000000000 +0300
++++ libofa-0.9.3/lib/signal_op.cpp 2008-04-16 15:51:49.000000000 +0300
+@@ -12,6 +12,7 @@
+ // DATE CREATED: 1/12/06
+
+
++#include <cstdlib>
+ #include <math.h>
+ #include "signal_op.h"
+ #include "AFLIB/aflibConverter.h"
diff --git a/media-libs/libofa/files/libofa-0.9.3-gcc-4.4.patch b/media-libs/libofa/files/libofa-0.9.3-gcc-4.4.patch
new file mode 100644
index 000000000000..25cab143d23f
--- /dev/null
+++ b/media-libs/libofa/files/libofa-0.9.3-gcc-4.4.patch
@@ -0,0 +1,10 @@
+--- orig-libofa-0.9.3/examples/example.cpp 2009-04-11 12:22:55.397455430 +0200
++++ libofa-0.9.3/examples/example.cpp 2009-04-11 12:25:21.466456955 +0200
+@@ -9,6 +9,7 @@
+
+ #include "protocol.h"
+
++#include <stdio.h>
+ #include <string.h>
+
+ AudioData* loadWaveFile(char *file);
diff --git a/media-libs/libofa/files/libofa-0.9.3-gcc-4.7.patch b/media-libs/libofa/files/libofa-0.9.3-gcc-4.7.patch
new file mode 100644
index 000000000000..c5ab098767dd
--- /dev/null
+++ b/media-libs/libofa/files/libofa-0.9.3-gcc-4.7.patch
@@ -0,0 +1,22 @@
+diff -up libofa-0.9.3/examples/uselame.cpp.gcc47 libofa-0.9.3/examples/uselame.cpp
+--- libofa-0.9.3/examples/uselame.cpp.gcc47 2012-01-14 09:35:24.343146853 -0600
++++ libofa-0.9.3/examples/uselame.cpp 2012-01-14 09:35:49.956826634 -0600
+@@ -12,6 +12,7 @@
+ #else
+ #include <sys/wait.h>
+ #endif
++#include <unistd.h>
+
+ AudioData *loadWaveFile(char *file);
+
+diff -up libofa-0.9.3/examples/wavefile.cpp.gcc47 libofa-0.9.3/examples/wavefile.cpp
+--- libofa-0.9.3/examples/wavefile.cpp.gcc47 2012-01-14 09:35:24.344146841 -0600
++++ libofa-0.9.3/examples/wavefile.cpp 2012-01-14 16:00:54.414981160 -0600
+@@ -11,6 +11,7 @@
+ #include "io.h"
+ #endif
+ #include <fcntl.h>
++#include <unistd.h>
+
+ static bool readBytes(int fd, unsigned char *buf, int size) {
+ int ct = 0;
diff --git a/media-libs/libofa/files/libofa-0.9.3-gcc-4.patch b/media-libs/libofa/files/libofa-0.9.3-gcc-4.patch
new file mode 100644
index 000000000000..d1059bafa55f
--- /dev/null
+++ b/media-libs/libofa/files/libofa-0.9.3-gcc-4.patch
@@ -0,0 +1,39 @@
+--- lib/JAMA/tnt_math_utils.h.orig 2006-06-17 01:46:22.000000000 +0300
++++ lib/JAMA/tnt_math_utils.h 2006-06-17 01:47:02.000000000 +0300
+@@ -20,11 +20,20 @@
+ namespace TNT
+ {
+ /**
++ @returns the absolute value of a real (no-complex) scalar.
++*/
++template <class Real>
++Real abs(const Real &a)
++{
++ return (a > 0 ? a : -a);
++}
++/**
+ @returns hypotenuse of real (non-complex) scalars a and b by
+ avoiding underflow/overflow
+ using (a * sqrt( 1 + (b/a) * (b/a))), rather than
+ sqrt(a*a + b*b).
+ */
++
+ template <class Real>
+ Real hypot(const Real &a, const Real &b)
+ {
+@@ -56,15 +65,6 @@
+ }
+ */
+
+-/**
+- @returns the absolute value of a real (no-complex) scalar.
+-*/
+-template <class Real>
+-Real abs(const Real &a)
+-{
+- return (a > 0 ? a : -a);
+-}
+-
+ }
+ #endif
+ /* MATH_UTILS_H */
diff --git a/media-libs/libofa/libofa-0.9.3-r1.ebuild b/media-libs/libofa/libofa-0.9.3-r1.ebuild
new file mode 100644
index 000000000000..1c3b1f6bfad2
--- /dev/null
+++ b/media-libs/libofa/libofa-0.9.3-r1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic multilib-minimal
+
+DESCRIPTION="Open Fingerprint Architecture"
+HOMEPAGE="http://code.google.com/p/musicip-libofa/"
+SRC_URI="http://musicip-libofa.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="|| ( APL-1.0 GPL-2 )"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ppc ppc64 sparc x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND="dev-libs/expat
+ net-misc/curl
+ >=sci-libs/fftw-3.3.3-r2[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]"
+RDEPEND="${RDEPEND}
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20140508-r2
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-gcc-4.patch
+ "${FILESDIR}"/${P}-gcc-4.3.patch
+ "${FILESDIR}"/${P}-gcc-4.4.patch
+ "${FILESDIR}"/${P}-gcc-4.7.patch
+)
+
+src_prepare() {
+ # disable building non-installed examples
+ sed -i -e '/SUBDIRS/s:examples::' Makefile.{am,in} || die
+
+ epatch "${PATCHES[@]}"
+ epatch_user
+
+ is-flag -ffast-math && append-flags -fno-fast-math
+}
+
+multilib_src_configure() {
+ # disable dependencies that were used for the noinst_ example only
+
+ ECONF_SOURCE=${S} \
+ econf \
+ ac_cv_lib_expat_XML_ExpatVersion=yes \
+ ac_cv_lib_curl_curl_global_init=yes
+}
+
+multilib_src_install_all() {
+ dodoc AUTHORS README
+}
diff --git a/media-libs/libofa/metadata.xml b/media-libs/libofa/metadata.xml
new file mode 100644
index 000000000000..1f84290ed170
--- /dev/null
+++ b/media-libs/libofa/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>sound</herd>
+ <upstream>
+ <remote-id type="google-code">musicip-libofa</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libogg/Manifest b/media-libs/libogg/Manifest
new file mode 100644
index 000000000000..76e51cd90d21
--- /dev/null
+++ b/media-libs/libogg/Manifest
@@ -0,0 +1,3 @@
+DIST libogg-1.3.0.tar.xz 289384 SHA256 231725029c843492914f24e74085e734bca6f1d6446ac72df39b0c3a9d4bc74b SHA512 d99f7285d1d92940e5e82778f208afe615ff44384b373d81186a57a77d57a8c7f5e3347ea9ad99dc87cd6091e41ed8f47f0c3277e6a113dbb157c6aa6dd0f357 WHIRLPOOL 75954c92b475686f23d3da9d2970f04271865c2617a53e4e0f38336991bcc0a8171ed394b48048b4bf91aff85951381a7360ffb0509158788688666c395a3c6b
+DIST libogg-1.3.1.tar.xz 406840 SHA256 3a5bad78d81afb78908326d11761c0fb1a0662ee7150b6ad587cc586838cdcfa SHA512 980d8916b5d6bf22376105869a9b9d5312cee81f0ff1f6aa9f34359e92a93b7b34555a4c4f124922d87ef7e48a4b9451e35d9b536929b9144fcc22bcf6debbf0 WHIRLPOOL 474dd64231cfe39198a90a3c06ce2075e31fe2eaa72bf924586e34fbd505c3b21e1c57c86f12bc9a2e30f2a124665487592174ca5ffc63e01fd9f65dafff94fa
+DIST libogg-1.3.2.tar.xz 407324 SHA256 3f687ccdd5ac8b52d76328fbbfebc70c459a40ea891dbf3dccb74a210826e79b SHA512 dc9552b15ceccd7e12bff39a6670120ae53af74ce97254d047c28f49ba6a320f55059ed509ec1d8758a972c72514f2866634d829f3cb528c2f595cb056e9bca6 WHIRLPOOL 9ba9408aaac9f1207543383ccc90868c7122bef7137421e84e46eb590c09cb832ec0a18a8aa75258d94529733ae413c472db50d5f1b78a08ded198b26b8748a6
diff --git a/media-libs/libogg/libogg-1.3.0.ebuild b/media-libs/libogg/libogg-1.3.0.ebuild
new file mode 100644
index 000000000000..ffc036d08693
--- /dev/null
+++ b/media-libs/libogg/libogg-1.3.0.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+DESCRIPTION="the Ogg media file format library"
+HOMEPAGE="http://xiph.org/ogg/"
+SRC_URI="http://downloads.xiph.org/releases/ogg/${P}.tar.xz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="static-libs"
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ # docdir, http://trac.xiph.org/ticket/1758
+ emake DESTDIR="${D}" docdir=/usr/share/doc/${PF}/ogg install
+ dodoc AUTHORS CHANGES
+ prune_libtool_files --all
+}
diff --git a/media-libs/libogg/libogg-1.3.1.ebuild b/media-libs/libogg/libogg-1.3.1.ebuild
new file mode 100644
index 000000000000..8278d7b43e0b
--- /dev/null
+++ b/media-libs/libogg/libogg-1.3.1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools-multilib
+
+DESCRIPTION="the Ogg media file format library"
+HOMEPAGE="http://xiph.org/ogg/"
+SRC_URI="http://downloads.xiph.org/releases/ogg/${P}.tar.xz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="static-libs"
+
+RDEPEND="
+ abi_x86_32? ( !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)] )"
+
+AUTOTOOLS_PRUNE_LIBTOOL_FILES=all
+DOCS=( AUTHORS CHANGES )
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/ogg/config_types.h
+)
+
+src_configure() {
+ local myeconfargs=(
+ --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html
+ )
+ autotools-multilib_src_configure
+}
diff --git a/media-libs/libogg/libogg-1.3.2.ebuild b/media-libs/libogg/libogg-1.3.2.ebuild
new file mode 100644
index 000000000000..91c822cdbc67
--- /dev/null
+++ b/media-libs/libogg/libogg-1.3.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 autotools-multilib
+
+DESCRIPTION="the Ogg media file format library"
+HOMEPAGE="http://xiph.org/ogg/"
+SRC_URI="http://downloads.xiph.org/releases/ogg/${P}.tar.xz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="static-libs"
+
+RDEPEND="
+ abi_x86_32? ( !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)] )"
+
+AUTOTOOLS_PRUNE_LIBTOOL_FILES=all
+DOCS=( AUTHORS CHANGES )
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/ogg/config_types.h
+)
+
+src_configure() {
+ local myeconfargs=(
+ --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html
+ )
+ autotools-multilib_src_configure
+}
diff --git a/media-libs/libogg/metadata.xml b/media-libs/libogg/metadata.xml
new file mode 100644
index 000000000000..e1774e3d9ad7
--- /dev/null
+++ b/media-libs/libogg/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>sound</herd>
+</pkgmetadata>
diff --git a/media-libs/liboggz/Manifest b/media-libs/liboggz/Manifest
new file mode 100644
index 000000000000..aadfcef4af77
--- /dev/null
+++ b/media-libs/liboggz/Manifest
@@ -0,0 +1 @@
+DIST liboggz-1.1.1.tar.gz 702261 RMD160 e85073131bc8ec021b1529487ef21802d01b0260 SHA1 3540190c8c9a31d834aa7794ef991bbab699f4de SHA256 6bafadb1e0a9ae4ac83304f38621a5621b8e8e32927889e65a98706d213d415a
diff --git a/media-libs/liboggz/files/liboggz-1.1.1-destdir.patch b/media-libs/liboggz/files/liboggz-1.1.1-destdir.patch
new file mode 100644
index 000000000000..c58a0c960f75
--- /dev/null
+++ b/media-libs/liboggz/files/liboggz-1.1.1-destdir.patch
@@ -0,0 +1,14 @@
+--- src/tools/Makefile.am
++++ src/tools/Makefile.am
+@@ -75,10 +75,7 @@
+ # see http://lists.xiph.org/pipermail/ogg-dev/2008-July/001083.html
+ install-exec-local:
+ for p in dump diff info merge rip ; do \
+- if test -e $(exec_prefix)/bin/oggz$$p ; then \
+- $(RM) $(exec_prefix)/bin/oggz$$p ; \
+- $(LN_S) $(exec_prefix)/bin/oggz-$$p $(exec_prefix)/bin/oggz$$p ; \
+- fi ; \
++ $(LN_S) $(exec_prefix)/bin/oggz-$$p $(DESTDIR)$(exec_prefix)/bin/oggz$$p ; \
+ done
+
+ # On 'make uninstall', remove the deprecated tool -- but only if it is a
diff --git a/media-libs/liboggz/liboggz-1.1.1.ebuild b/media-libs/liboggz/liboggz-1.1.1.ebuild
new file mode 100644
index 000000000000..a06e09cc6f6a
--- /dev/null
+++ b/media-libs/liboggz/liboggz-1.1.1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit autotools eutils
+
+DESCRIPTION="Oggz provides a simple programming interface for reading and writing Ogg files and streams"
+HOMEPAGE="http://www.xiph.org/oggz/"
+SRC_URI="http://downloads.xiph.org/releases/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86"
+IUSE="doc static-libs test"
+
+RDEPEND=">=media-libs/libogg-1.2.0"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )
+ test? ( app-text/docbook-sgml-utils )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-destdir.patch
+
+ if ! use doc; then
+ sed -i -e '/AC_CHECK_PROG/s:doxygen:dIsAbLe&:' configure.ac || die
+ fi
+
+ AT_M4DIR="m4" eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-dependency-tracking \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ emake DESTDIR="${D}" docdir="/usr/share/doc/${PF}" install || die
+ dodoc AUTHORS ChangeLog README TODO
+
+ find "${D}" -name '*.la' -delete
+}
diff --git a/media-libs/liboggz/metadata.xml b/media-libs/liboggz/metadata.xml
new file mode 100644
index 000000000000..e1774e3d9ad7
--- /dev/null
+++ b/media-libs/liboggz/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>sound</herd>
+</pkgmetadata>
diff --git a/media-libs/libomxil-bellagio/Manifest b/media-libs/libomxil-bellagio/Manifest
new file mode 100644
index 000000000000..7118c49e71f2
--- /dev/null
+++ b/media-libs/libomxil-bellagio/Manifest
@@ -0,0 +1,2 @@
+DIST libomxil-bellagio-0.9.3.tar.gz 594952 SHA256 593c0729c8ef8c1467b3bfefcf355ec19a46dd92e31bfc280e17d96b0934d74c SHA512 72b4c8c639f8cf767ba6323fdfc42b90ad4b62f0ece3ba786ae38afc7c5d64cb0ba464b7993a588c1c7fa2daafe2ac773c9c4367a154c32632e87ba0d6341d16 WHIRLPOOL 512ca1553930d4bd3be2321fec986650df64d04e5d8371711fd5fab222b212dc17f74a81a1748d5d15095dce96df4713f6a047b01dc0e7aec4d36ffee18b06bf
+DIST libomxil-bellagio_0.9.3-1ubuntu2.debian.tar.gz 10793 SHA256 2da93b8a3d09edd59f11e698b0fde84494af4f79958fafed7753b3c60c61adb8 SHA512 5f1b4c592d0713fa8a70c1177ca908e76acca508e05ea379bd3569835ab5f7101526998d9d1687f8e849b2391aaf6912276c14cbcaddb1350e4b5f302bd5cc90 WHIRLPOOL 28e833cfafdff59e233f09a5018aae55e12d77c1122caf81adb778593c6b911cc4468a9e6a9384f4d45e182af117ffe089fd122237de11b6d4872f94841eb358
diff --git a/media-libs/libomxil-bellagio/files/libomxil-bellagio-0.9.3-dynamicloader-linking.patch b/media-libs/libomxil-bellagio/files/libomxil-bellagio-0.9.3-dynamicloader-linking.patch
new file mode 100644
index 000000000000..a4d5b1522372
--- /dev/null
+++ b/media-libs/libomxil-bellagio/files/libomxil-bellagio-0.9.3-dynamicloader-linking.patch
@@ -0,0 +1,14 @@
+diff -ur a/src/dynamic_loader/Makefile.am b/src/dynamic_loader/Makefile.am
+--- a/src/dynamic_loader/Makefile.am 2011-05-20 07:28:17.000000000 +0200
++++ b/src/dynamic_loader/Makefile.am 2014-02-12 17:55:26.842794130 +0100
+@@ -3,8 +3,9 @@
+ omxdynamicloader_LTLIBRARIES = libomxdynamicloader.la
+ libomxdynamicloader_la_SOURCES = ste_dynamic_component_loader.c ste_dynamic_component_loader.h
+
+-libomxdynamicloader_la_LDFLAGS =
++libomxdynamicloader_la_LDFLAGS = -lomxil-bellagio -L$(top_builddir)/src/.libs
+ libomxdynamicloader_la_CFLAGS = -I$(top_srcdir)/include \
+ -I$(top_srcdir)/src \
+ -I$(top_srcdir)/src/base \
+ -DOMX_COMPONENT_PATH=\"$(plugindir)\/\"
++libomxdynamicloader_la_DEPENDENCIES = ../libomxil-bellagio.la
diff --git a/media-libs/libomxil-bellagio/files/libomxil-bellagio-0.9.3-parallel-build.patch b/media-libs/libomxil-bellagio/files/libomxil-bellagio-0.9.3-parallel-build.patch
new file mode 100644
index 000000000000..767bbeb2aacf
--- /dev/null
+++ b/media-libs/libomxil-bellagio/files/libomxil-bellagio-0.9.3-parallel-build.patch
@@ -0,0 +1,16 @@
+Fix dependency issue to allow parallel build
+
+Signed-off-by: Qais Yousef <qais.yousef@imgtec.com>
+
+Index: bellagio-0.9.3/src/Makefile.am
+===================================================================
+--- bellagio-0.9.3.orig/src/Makefile.am
++++ bellagio-0.9.3/src/Makefile.am
+@@ -8,6 +8,7 @@ omxregister_bellagio_SOURCES = omxregist
+ omxregister_bellagio_CFLAGS = -DOMXILCOMPONENTSPATH=\"$(plugindir)/\" \
+ -I$(top_srcdir)/include
+ omxregister_bellagio_LDFLAGS = -lomxil-bellagio -L$(builddir)
++omxregister_bellagio_DEPENDENCIES = libomxil-bellagio.la
+
+ lib_LTLIBRARIES = libomxil-bellagio.la
+ libomxil_bellagio_la_SOURCES = component_loader.h \
diff --git a/media-libs/libomxil-bellagio/files/libomxil-bellagio-0.9.3-version.patch b/media-libs/libomxil-bellagio/files/libomxil-bellagio-0.9.3-version.patch
new file mode 100644
index 000000000000..8aa18ac6a993
--- /dev/null
+++ b/media-libs/libomxil-bellagio/files/libomxil-bellagio-0.9.3-version.patch
@@ -0,0 +1,21 @@
+--- include/OMX_Types.h.orig 2011-01-12 08:53:26.000000000 +0100
++++ include/OMX_Types.h 2013-02-25 09:53:55.000000000 +0100
+@@ -314,6 +314,18 @@
+ * platform & operating specific object used to reference the window */
+ typedef void* OMX_NATIVE_WINDOWTYPE;
+
++
++/** Define the OMX IL version that corresponds to this set of header files.
++ * We also define a combined version that can be used to write or compare
++ * values of the 32bit nVersion field, assuming a little endian architecture */
++#define OMX_VERSION_MAJOR 1
++#define OMX_VERSION_MINOR 1
++#define OMX_VERSION_REVISION 2
++#define OMX_VERSION_STEP 0
++
++#define OMX_VERSION ((OMX_VERSION_STEP<<24) | (OMX_VERSION_REVISION<<16) | (OMX_VERSION_MINOR<<8) | OMX_VERSION_MAJOR)
++
++
+ /** The OMX_VERSIONTYPE union is used to specify the version for
+ a structure or component. For a component, the version is entirely
+ specified by the component vendor. Components doing the same function
diff --git a/media-libs/libomxil-bellagio/libomxil-bellagio-0.9.3.ebuild b/media-libs/libomxil-bellagio/libomxil-bellagio-0.9.3.ebuild
new file mode 100644
index 000000000000..53430d7c6e05
--- /dev/null
+++ b/media-libs/libomxil-bellagio/libomxil-bellagio-0.9.3.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+XORG_MULTILIB=yes
+XORG_EAUTORECONF=yes
+
+inherit xorg-2
+
+DESCRIPTION="An Open Source implementation of the OpenMAX Integration Layer"
+HOMEPAGE="http://omxil.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN:3:5}/${P}.tar.gz mirror://ubuntu/pool/universe/${PN:0:4}/${PN}/${PN}_${PV}-1ubuntu2.debian.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="+audioeffects +clocksrc debug doc +videoscheduler"
+
+RDEPEND=""
+DEPEND="doc? ( app-doc/doxygen )
+ ${RDEPEND}"
+
+src_prepare() {
+ PATCHES=(
+ "${WORKDIR}"/debian/patches/*.patch
+ "${FILESDIR}"/${P}-dynamicloader-linking.patch
+ "${FILESDIR}"/${P}-parallel-build.patch
+ "${FILESDIR}"/${P}-version.patch
+ )
+ xorg-2_src_prepare
+}
+
+src_configure() {
+ XORG_CONFIGURE_OPTIONS="
+ --docdir="${EPREFIX}"/usr/share/doc/${PF} \
+ $(use_enable audioeffects) \
+ $(use_enable clocksrc) \
+ $(use_enable debug) \
+ $(use_enable doc) \
+ $(use_enable videoscheduler)
+ "
+ xorg-2_src_configure
+}
diff --git a/media-libs/libomxil-bellagio/metadata.xml b/media-libs/libomxil-bellagio/metadata.xml
new file mode 100644
index 000000000000..81ed2f2df468
--- /dev/null
+++ b/media-libs/libomxil-bellagio/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>x11</herd>
+ <use>
+ <flag name="audioeffects">enable audio volume/mixer effects components</flag>
+ <flag name="clocksrc">enable clock component</flag>
+ <flag name="videoscheduler">enable xvideosink video scheduler</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">omxil</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libopendaap/Manifest b/media-libs/libopendaap/Manifest
new file mode 100644
index 000000000000..c52e12a51332
--- /dev/null
+++ b/media-libs/libopendaap/Manifest
@@ -0,0 +1 @@
+DIST libopendaap-0.4.0.tar.bz2 241953 SHA256 6defc33534b32c7f9bdf057c1593c098cf7b6272ed20100f8b8a28c2d8e42b3c
diff --git a/media-libs/libopendaap/files/libopendaap-0.2.3-types.h b/media-libs/libopendaap/files/libopendaap-0.2.3-types.h
new file mode 100644
index 000000000000..25c25957fd5b
--- /dev/null
+++ b/media-libs/libopendaap/files/libopendaap-0.2.3-types.h
@@ -0,0 +1,14 @@
+diff -Naur libopendaap-0.2.3.orig/mDNS/mDNSClientAPI.h libopendaap-0.2.3/mDNS/mDNSClientAPI.h
+--- libopendaap-0.2.3.orig/mDNS/mDNSClientAPI.h 2004-04-13 00:05:11.000000000 -0700
++++ libopendaap-0.2.3/mDNS/mDNSClientAPI.h 2004-10-05 12:58:19.996946514 -0700
+@@ -483,8 +483,8 @@
+ typedef unsigned char mDNSu8;
+ typedef signed short mDNSs16;
+ typedef unsigned short mDNSu16;
+-typedef signed long mDNSs32;
+-typedef unsigned long mDNSu32;
++typedef signed int mDNSs32;
++typedef unsigned int mDNSu32;
+
+ // To enforce useful type checking, we make mDNSInterfaceID be a pointer to a dummy struct
+ // This way, mDNSInterfaceIDs can be assigned, and compared with each other, but not with other types
diff --git a/media-libs/libopendaap/files/libopendaap-0.3.0-types.h b/media-libs/libopendaap/files/libopendaap-0.3.0-types.h
new file mode 100644
index 000000000000..6973f136d0e0
--- /dev/null
+++ b/media-libs/libopendaap/files/libopendaap-0.3.0-types.h
@@ -0,0 +1,13 @@
+--- libopendaap-0.3.0/mDNS/mDNSClientAPI.h.orig 2005-01-23 15:39:04.834290477 -0800
++++ libopendaap-0.3.0/mDNS/mDNSClientAPI.h 2005-01-23 15:39:41.512250333 -0800
+@@ -483,8 +483,8 @@
+ typedef unsigned char mDNSu8;
+ typedef signed short mDNSs16;
+ typedef unsigned short mDNSu16;
+-typedef signed long mDNSs32;
+-typedef unsigned long mDNSu32;
++typedef signed int mDNSs32;
++typedef unsigned int mDNSu32;
+
+ // To enforce useful type checking, we make mDNSInterfaceID be a pointer to a dummy struct
+ // This way, mDNSInterfaceIDs can be assigned, and compared with each other, but not with other types
diff --git a/media-libs/libopendaap/files/libopendaap-0.4.0-freebsd.patch b/media-libs/libopendaap/files/libopendaap-0.4.0-freebsd.patch
new file mode 100644
index 000000000000..d98569f4db64
--- /dev/null
+++ b/media-libs/libopendaap/files/libopendaap-0.4.0-freebsd.patch
@@ -0,0 +1,10 @@
+--- http_client.c.orig Fri Dec 17 00:27:43 2004
++++ http_client.c Wed Feb 2 21:33:28 2005
+@@ -37,6 +37,7 @@
+ # include <sys/socket.h>
+ # include <sys/select.h>
+ # include <netdb.h>
++# include <netinet/in.h>
+ # include <fcntl.h>
+ #elif defined(SYSTEM_WIN32)
+ # include <winsock2.h>
diff --git a/media-libs/libopendaap/libopendaap-0.4.0.ebuild b/media-libs/libopendaap/libopendaap-0.4.0.ebuild
new file mode 100644
index 000000000000..791160066db1
--- /dev/null
+++ b/media-libs/libopendaap/libopendaap-0.4.0.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+DESCRIPTION="A library which enables applications to discover and connect to iTunes(R) music shares"
+SRC_URI="http://crazney.net/programs/itunes/files/${P}.tar.bz2"
+HOMEPAGE="http://crazney.net/programs/itunes/libopendaap.html"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="alpha amd64 ppc ppc64 sparc x86"
+IUSE=""
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}"/${P}-freebsd.patch
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die
+ dodoc AUTHORS ChangeLog
+}
diff --git a/media-libs/libopendaap/metadata.xml b/media-libs/libopendaap/metadata.xml
new file mode 100644
index 000000000000..aa0f3664825f
--- /dev/null
+++ b/media-libs/libopendaap/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>net-p2p</herd>
+</pkgmetadata>
diff --git a/media-libs/libopenraw/Manifest b/media-libs/libopenraw/Manifest
new file mode 100644
index 000000000000..3acd570a30fc
--- /dev/null
+++ b/media-libs/libopenraw/Manifest
@@ -0,0 +1 @@
+DIST libopenraw-0.0.9.tar.bz2 478687 SHA256 49fd1adf0a0228c7a17a79bf98d8d03664195feae1e50f4ddd1b20162626e18f SHA512 88d475d27719212686a0a5a08da04d6879fd456ec8f7531f401217df97f4f3d4c52dc8c4fb1c6ca88c12d6a67ecd516b151c5e9dceba9cbfcd13150fe81d6db5 WHIRLPOOL 52d407b1d443fe7c38c59274b3267feb4dffeca9114a39cad925c346ae21d1378cbceba4ce1973657073f8890bf50a18c476ba3451d806fe7f50824bb935c559
diff --git a/media-libs/libopenraw/files/libopenraw-0.0.9-jpeg-9a.patch b/media-libs/libopenraw/files/libopenraw-0.0.9-jpeg-9a.patch
new file mode 100644
index 000000000000..bfb99fab9744
--- /dev/null
+++ b/media-libs/libopenraw/files/libopenraw-0.0.9-jpeg-9a.patch
@@ -0,0 +1,23 @@
+http://bugs.gentoo.org/520888
+http://sourceforge.net/p/fink/package-submissions/4336/
+
+--- lib/jfifcontainer.cpp
++++ lib/jfifcontainer.cpp
+@@ -145,7 +145,7 @@
+ {
+ int ret = 0;
+ if (::setjmp(m_jpegjmp) == 0) {
+- ret = JPEG::jpeg_read_header(&m_cinfo, TRUE);
++ ret = JPEG::jpeg_read_header(&m_cinfo, JPEG::TRUE);
+ //Trace(DEBUG1) << "jpeg_read_header " << ret << "\n";
+
+ JPEG::jpeg_calc_output_dimensions(&m_cinfo);
+@@ -181,7 +181,7 @@
+ src->pub.next_input_byte = NULL;
+ src->pub.bytes_in_buffer = 0;
+ }
+- return TRUE;
++ return JPEG::TRUE;
+ }
+
+
diff --git a/media-libs/libopenraw/libopenraw-0.0.9.ebuild b/media-libs/libopenraw/libopenraw-0.0.9.ebuild
new file mode 100644
index 000000000000..de1481577bc5
--- /dev/null
+++ b/media-libs/libopenraw/libopenraw-0.0.9.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 gnome2-utils
+
+DESCRIPTION="A decoding library for RAW image formats"
+HOMEPAGE="http://libopenraw.freedesktop.org/wiki/"
+SRC_URI="http://${PN}.freedesktop.org/download/${P}.tar.bz2"
+
+LICENSE="GPL-3 LGPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-solaris"
+IUSE="gtk static-libs test"
+
+RDEPEND="virtual/jpeg:0
+ dev-libs/libxml2
+ gtk? (
+ >=dev-libs/glib-2
+ >=x11-libs/gdk-pixbuf-2.24.0:2
+ )"
+DEPEND="${RDEPEND}
+ >=dev-libs/boost-1.35
+ virtual/pkgconfig
+ test? ( net-misc/curl )"
+
+DOCS=( AUTHORS ChangeLog NEWS README TODO )
+
+src_prepare() {
+ has_version '>=media-libs/jpeg-9a:0' && epatch "${FILESDIR}"/${P}-jpeg-9a.patch
+}
+
+src_configure() {
+ econf \
+ --with-boost="${EPREFIX}"/usr \
+ $(use_enable static-libs static) \
+ $(use_enable gtk gnome)
+}
+
+src_install() {
+ default
+ prune_libtool_files --all
+}
+
+pkg_preinst() {
+ gnome2_gdk_pixbuf_savelist
+}
+
+pkg_postinst() {
+ gnome2_gdk_pixbuf_update
+}
+
+pkg_postinst() {
+ gnome2_gdk_pixbuf_update
+}
diff --git a/media-libs/libopenraw/metadata.xml b/media-libs/libopenraw/metadata.xml
new file mode 100644
index 000000000000..8c868061b739
--- /dev/null
+++ b/media-libs/libopenraw/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>freedesktop</herd>
+<maintainer>
+<email>freedesktop-bugs@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/media-libs/libpagemaker/Manifest b/media-libs/libpagemaker/Manifest
new file mode 100644
index 000000000000..7380d5533a96
--- /dev/null
+++ b/media-libs/libpagemaker/Manifest
@@ -0,0 +1 @@
+DIST libpagemaker-0.0.2.tar.xz 279396 SHA256 cdbdf86605773339caab6477ff694a95a90aaa4d45bb6cdb59e4a7f76c91ef17 SHA512 70dcac28c862b0d713a356cc27f1da4ab08e91886942e0c2d2265acf9ce1d596266aadd49d5e23f9da4a4d1b3e1a97272aadcc5721af4daa84e38bc499752ac7 WHIRLPOOL 5f6dcb92e8322414c57873a8bbbef4771531cd2135e269afff4478d38f9cf6522dded71ff81928cb3e3ec675aca6fc3b3cdad61c43ed0da5ee2bc1308bf38f38
diff --git a/media-libs/libpagemaker/libpagemaker-0.0.2.ebuild b/media-libs/libpagemaker/libpagemaker-0.0.2.ebuild
new file mode 100644
index 000000000000..f127028c2164
--- /dev/null
+++ b/media-libs/libpagemaker/libpagemaker-0.0.2.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=true
+
+inherit autotools-utils
+
+DESCRIPTION="C++ Library that parses the file format of Aldus/Adobe PageMaker documents."
+HOMEPAGE="https://wiki.documentfoundation.org/DLP/Libraries/${PN}"
+SRC_URI="http://dev-www.libreoffice.org/src/${PN}/${P}.tar.xz"
+
+LICENSE="MPL-2.0"
+SLOT="0"
+KEYWORDS="amd64 ~arm x86 ~amd64-linux ~x86-linux"
+IUSE="debug doc tools static-libs"
+
+RDEPEND="
+ dev-libs/librevenge
+ "
+DEPEND="${RDEPEND}
+ >=dev-libs/boost-1.47
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )
+"
+
+src_prepare() {
+ # fix Oops (commit 585b795c1431fd42d29391d1932bb6745edc2eb1)
+ # remove in >=0.0.3
+ sed \
+ -e "s:no-undefines:no-undefined:g" \
+ -i src/lib/Makefile.am || die
+
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=(
+ --docdir="${EPREFIX}/usr/share/doc/${PF}"
+ --disable-werror
+ $(use_enable tools)
+ $(use_with doc docs)
+ )
+ autotools-utils_src_configure
+}
diff --git a/media-libs/libpagemaker/libpagemaker-9999.ebuild b/media-libs/libpagemaker/libpagemaker-9999.ebuild
new file mode 100644
index 000000000000..7dc3320b06f8
--- /dev/null
+++ b/media-libs/libpagemaker/libpagemaker-9999.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=true
+
+inherit autotools-utils git-r3
+
+DESCRIPTION="C++ Library that parses the file format of Aldus/Adobe PageMaker documents."
+HOMEPAGE="https://wiki.documentfoundation.org/DLP/Libraries/${PN}"
+SRC_URI=""
+EGIT_REPO_URI="git://gerrit.libreoffice.org/${PN}.git"
+
+LICENSE="MPL-2.0"
+SLOT="0"
+KEYWORDS=""
+IUSE="debug doc tools static-libs"
+
+RDEPEND="
+ dev-libs/librevenge
+ "
+DEPEND="${RDEPEND}
+ >=dev-libs/boost-1.47
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )
+"
+
+src_configure() {
+ local myeconfargs=(
+ --docdir="${EPREFIX}/usr/share/doc/${PF}"
+ --disable-werror
+ $(use_enable tools)
+ $(use_with doc docs)
+ )
+ autotools-utils_src_configure
+}
diff --git a/media-libs/libpagemaker/metadata.xml b/media-libs/libpagemaker/metadata.xml
new file mode 100644
index 000000000000..7aa0d0b7ef6a
--- /dev/null
+++ b/media-libs/libpagemaker/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>jlec@gentoo.org</email>
+ <name>Justin Lecher</name>
+ </maintainer>
+ <use>
+ <flag name="tools">Build build tools</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/libpano13/Manifest b/media-libs/libpano13/Manifest
new file mode 100644
index 000000000000..8c411b32547a
--- /dev/null
+++ b/media-libs/libpano13/Manifest
@@ -0,0 +1,2 @@
+DIST libpano13-2.9.18.tar.gz 2723032 SHA256 de5d4e43f15c3430e95c0faa1c50c9503516e1b570d0ec0522f610a578caa172 SHA512 bd8449a8ee01e990fa19784889c1afb0e64f90e25596c872e7470fb700c327aad4fc0c565977576dac34dca4cea55a46aad9dc547d3ee4ab6b353cd8b6656874 WHIRLPOOL d83760702798cf1f17c79c3a1b030d6e04bcb7aa39c3e4dbc6cddaaded42c6f19fa683aa048c97ba91651fc58c8adceb6dec61ff7d820dc925400f7e6a2c663d
+DIST libpano13-2.9.19.tar.gz 3527845 SHA256 037357383978341dea8f572a5d2a0876c5ab0a83dffda431bd393357e91d95a8 SHA512 f9f147426d44d8babac09cb1a1b5111f88b9c2fc079f33df80133492bcf24cbd1edd771e6bec7bed4b0256bf15c700139c0a83119d3adf296ae5c567e006d868 WHIRLPOOL d114ddcc46eb920c1d603665d4d22ed18aa8c92f03c4e02ec2db526ae1236b6aeaa8ff3e6827b4fcb0c6361dbcf290afac5f63d051105eb43427b567d6cbccab
diff --git a/media-libs/libpano13/libpano13-2.9.18.ebuild b/media-libs/libpano13/libpano13-2.9.18.ebuild
new file mode 100644
index 000000000000..3a80d3c04a36
--- /dev/null
+++ b/media-libs/libpano13/libpano13-2.9.18.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit versionator java-pkg-opt-2
+
+DESCRIPTION="Helmut Dersch's panorama toolbox library"
+HOMEPAGE="http://panotools.sourceforge.net/"
+SRC_URI="mirror://sourceforge/panotools/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="java static-libs"
+
+DEPEND="media-libs/libpng
+ media-libs/tiff
+ sys-libs/zlib
+ virtual/jpeg
+ java? ( >=virtual/jdk-1.3 )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}-$(get_version_component_range 1-3)"
+
+src_configure() {
+ LIBS="-lm" econf \
+ $(use_with java java ${JAVA_HOME}) \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc README README.linux AUTHORS NEWS doc/*.txt
+
+ if ! use static-libs ; then
+ find "${D}" -name '*.la' -delete || die
+ fi
+}
+
+pkg_postinst() {
+ ewarn "you should remerge all reverse dependencies (media-gfx/hugin and"
+ ewarn "media-gfx/autopano-sift-C) as they might not work anymore"
+}
diff --git a/media-libs/libpano13/libpano13-2.9.19.ebuild b/media-libs/libpano13/libpano13-2.9.19.ebuild
new file mode 100644
index 000000000000..63fd17234cbf
--- /dev/null
+++ b/media-libs/libpano13/libpano13-2.9.19.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit versionator java-pkg-opt-2 eutils
+
+DESCRIPTION="Helmut Dersch's panorama toolbox library"
+HOMEPAGE="http://panotools.sourceforge.net/"
+SRC_URI="mirror://sourceforge/panotools/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0/3"
+KEYWORDS="amd64 ~ppc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="java static-libs"
+
+DEPEND="media-libs/libpng:0=
+ media-libs/tiff:0
+ sys-libs/zlib
+ virtual/jpeg:0
+ java? ( >=virtual/jdk-1.3 )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}-$(get_version_component_range 1-3)"
+
+src_configure() {
+ LIBS="-lm" econf \
+ $(use_with java java ${JAVA_HOME}) \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc README README.linux AUTHORS NEWS doc/*.txt
+
+ if ! use static-libs ; then
+ prune_libtool_files
+ fi
+}
diff --git a/media-libs/libpano13/metadata.xml b/media-libs/libpano13/metadata.xml
new file mode 100644
index 000000000000..9530e85e3dfd
--- /dev/null
+++ b/media-libs/libpano13/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>graphics</herd>
+ <upstream>
+ <remote-id type="sourceforge">panotools</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libpgf/Manifest b/media-libs/libpgf/Manifest
new file mode 100644
index 000000000000..996e84ce1844
--- /dev/null
+++ b/media-libs/libpgf/Manifest
@@ -0,0 +1,2 @@
+DIST libpgf-6.11.32.tar.bz2 83174 SHA256 b722ef0f60c95aed195a2abc65d066fd815e926936875c912904607f2608fc05 SHA512 2e2a181d01821e8888b0edfd697f0ef8dddc9b4d07b8245dfac22c2c5f1b6f1768ab0de47fce3cb039b788a0c8b115f7e8c45f8ecf9d3f5eeb9c38241134490e WHIRLPOOL 004e63f2beea6ead3ec1b28fb1adf6043e3baba55400201a63cbda842364ecd53796d2e2e30add1eff44d6d62f98b5dffafc66ad4260dee2aa6fdcf86c262008
+DIST libpgf-6.12.27.tar.bz2 1235651 SHA256 d6be17025c99390093f23570cf3759edc0f26faf2a968c796a3849c339046670 SHA512 ad06b34d61219a61d06b87e05a26e8639cd7a93211943217832969c03c4dbc81fbbb287fa2d628b7e087b96e78665a3cbc78920c8ff5828dfb2a7748e04fe42a WHIRLPOOL a552665a4e5f3598c08afd61125892b1fc542508ee9d4f8517883b9398a916fbb928ac67e474459f55a55afea3ca67c9eeaaa9afed09e35815d54aa724b0ef56
diff --git a/media-libs/libpgf/libpgf-6.11.32.ebuild b/media-libs/libpgf/libpgf-6.11.32.ebuild
new file mode 100644
index 000000000000..43530dcc5537
--- /dev/null
+++ b/media-libs/libpgf/libpgf-6.11.32.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit autotools
+
+DESCRIPTION="Library to load, handle and manipulate images in the PGF format"
+HOMEPAGE="http://www.libpgf.org/"
+SRC_URI="http://dev.gentoo.org/~dilfridge/distfiles/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="doc static-libs"
+
+RDEPEND=""
+DEPEND="doc? ( app-doc/doxygen )
+ app-arch/unzip"
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ if ! use doc; then
+ sed -i -e "/HAS_DOXYGEN/{N;N;d}" Makefile.am || die
+ fi
+
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+
+ find "${ED}" -name '*.la' -delete || die
+}
diff --git a/media-libs/libpgf/libpgf-6.12.27.ebuild b/media-libs/libpgf/libpgf-6.12.27.ebuild
new file mode 100644
index 000000000000..ec4650d18935
--- /dev/null
+++ b/media-libs/libpgf/libpgf-6.12.27.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit autotools
+
+DESCRIPTION="Library to load, handle and manipulate images in the PGF format"
+HOMEPAGE="http://www.libpgf.org/"
+SRC_URI="http://dev.gentoo.org/~dilfridge/distfiles/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="doc static-libs"
+
+RDEPEND=""
+DEPEND="doc? ( app-doc/doxygen )
+ app-arch/unzip"
+
+src_prepare() {
+ if ! use doc; then
+ sed -i -e "/HAS_DOXYGEN/{N;N;d}" Makefile.am || die
+ fi
+
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+
+ find "${ED}" -name '*.la' -delete || die
+}
diff --git a/media-libs/libpgf/metadata.xml b/media-libs/libpgf/metadata.xml
new file mode 100644
index 000000000000..9be90a258970
--- /dev/null
+++ b/media-libs/libpgf/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>graphics</herd>
+</pkgmetadata>
diff --git a/media-libs/libpng/Manifest b/media-libs/libpng/Manifest
new file mode 100644
index 000000000000..6d7868269a74
--- /dev/null
+++ b/media-libs/libpng/Manifest
@@ -0,0 +1,13 @@
+DIST libpng-1.2.51.tar.xz 562940 SHA256 c7d7b813b022afd70474f78bcc3655c7bb54edbf28dd4652e5521cbb6da56d4a SHA512 63ba0df5eff78b254d53f6cfd4075d3ea93ee9445e37678fc7d29fa116137b2a7c441eda23851638f9185166e408f42c51d0678c466c8376a1de356c7db760f2 WHIRLPOOL d829b07e950c64a8de37591ac5d40211f8e762feff8ff6f98db35714293997304b3eb063ea69a87064e6c66530a4fa2531dadcb1a0bb412066c558a5ff2f679c
+DIST libpng-1.2.52.tar.xz 566088 SHA256 d4fb0fbf14057ad6d0319034188fc2aecddb493da8e3031b7b072ed28f510ec0 SHA512 5890daec6aaf619e3eab32ee8105182f220ffce9e945a5129148ff6918d3749ddb3e9f60c25d6e8457184d5a2622b07d154640d13afb92f5ce9c48873e956a42 WHIRLPOOL dfa6870e7d5e4ca05ba74bd9cd599bcbc301046c7bde7042cd2d1ec4c706f4754dd40a10bd3d753ab169cc3365152a6c1f0f8fa33bcd0e0812019c670c49194a
+DIST libpng-1.2.53.tar.xz 577220 SHA256 b45e49f689e7451bd576569e6a344f7e0d11c02ecbb797f4da0e431526765c0a SHA512 3fec7c0d673ef4147828aedb8e8ca3cbd270292d8d716fc832d0c546c5d7314ac594af337416f112eaf214aad19d6eeaa25901150880c003b92cdff58d001fe7 WHIRLPOOL cb63625e11f88147f3e22af20d612b4def068a469f683a0507d0b584a75095b86393eea305599cdb548ddf8cc1975aa9e48221bd6305d20d1e47376dd70c8715
+DIST libpng-1.5.21-apng.patch.gz 9511 SHA256 8a4fffa885f1a1a34a7bdcaa2d1b8f1e025f6e1cf9c5bf17224672d2a6948d94 SHA512 b3369d97b19ebeae06e1f2874c2a3cc8f42421fb4be76f913be359630c5483c31cad6643f7c0a4edd3a952406d6acbffdd4a6cbfc9a09df07094bf6c6d9fbe15 WHIRLPOOL 5403fef0c1233c2e82785690d619f0e917d98a0056058064ddba446ed9987d05a4fe608b4883196f035f4b2de2650d858906014d13e5aed4d275d9e5e42ffb3d
+DIST libpng-1.5.21.tar.xz 734356 SHA256 b5151c64bc70489997790a492e1094d106be90a22b2958c43eee25a70dffdba7 SHA512 dd27d250271b72c33b9ea6282b549ad2a7a638334f97a218a00cde3136d97faf37544e304f84b966a064f9117e4681dde4f888ad63ecab41473d176066f3f5b4 WHIRLPOOL 4768c55e4d62a32d490b29285262f2dfb160c7a35afdd0e8f8d14a70348b4020c6f57dd97a9015b912c49c3dd73b660e0905c74df3674c0549fc3add5358899e
+DIST libpng-1.5.23-apng.patch.gz 9589 SHA256 946036ca1331275358489590f6046201c0a7dce363aa1a302cb251b73c3a4be0 SHA512 8b65a96a1111e1c5e6ceb6c610b8e5b9df03e163f5c20718893804392bfecb294677b543dd422147d3b1e5abf27d040d8791ddd3aec3de4ac40588abd3c0660d WHIRLPOOL 1c773a99567189fc0d400facec7817012e1c019081ab0b9093ef868a67a4d7c0b4b6b51b8aa5c07b4f96b64baa57f9a089fd39be7c7a9b9c1007c180d8e9d5ac
+DIST libpng-1.5.23.tar.xz 743548 SHA256 1f2dc3278e9d0c3aba618f9d585c24d744d65cad76cf799c9405085033e41f12 SHA512 c367d6366359c635b2a7c2692a31bbd98bcd6a700995873aeade041a9a0fa411001feb756a3c3643dbfca92011a2724e44a76996963acf34153d7f0039f592c9 WHIRLPOOL 85e1b289d56d7d6a467b980a044547d7072f409c2aa964dc7f0f0158f4dec9d1811a42b275ca61b587ded7f62dd1d507fa1c51b00ec2d830875e3ce236c9dbdb
+DIST libpng-1.6.16-apng.patch.gz 9552 SHA256 07eb4825f6787283aa2c4f77b6fd421875ec7982e2a5b1705c3bea0cdccf5c2d SHA512 85c09090dab312ed9b61eac2d957ce1eda6496d4d66e42b3ce4278d5dd6213fffe1f84c0b94424c389e04a99d0cc08ec5b9a77cb2ac14ad75dc49055bbb45292 WHIRLPOOL b3980311dc81ae83cd42969d797924ebe27da1c8955d0f931e97df5d609d8eb0db46bd418f82d02f1f914910c6a866b8d7b4664a2780a711fefa5c71b749e376
+DIST libpng-1.6.16.tar.xz 907284 SHA256 42f754df633e4e700544e5913cbe2fd4928bbfccdc07708a5cf84e59827fbe60 SHA512 d469a86b8c111be98c15afb1744ead0c7235dbd0b18cf47c5b4b4cfe64c7b1f63897d32e1fc65b0fdd2e01aa6767cad85ea3c0f6aabf9b647696e58803904fa3 WHIRLPOOL dae0248eec827d1462f4e8b9b7c4405fc3c05bc7e9f01ca8ff817a16b010b9aeaf54fa611d223385c0b2af8ee844465eea1b0e8d1125da5213fe2e7f1928f27a
+DIST libpng-1.6.17-apng.patch.gz 9554 SHA256 bc586248bd52faec54e54624df3045630970fffbcb018cbd444c4962b28064d1 SHA512 ba1a6466c81bbe3cf87d4d6687e073640ee870c2771a700bf1d00783369733fd298571b2d5a6e077daf4d3bb6c37c1f8e4bd88793caf963983ea729b23856217 WHIRLPOOL 7ba7cfe21af13194681084d45c94afa6318d44118f11814c3cc79c24857fcdc3362b404acf0f1dbf976f96f56c27410cdffd5726c832d47b2ff5bced2b9f73e6
+DIST libpng-1.6.17.tar.xz 919828 SHA256 98507b55fbe5cd43c51981f2924e4671fd81fe35d52dc53357e20f2c77fa5dfd SHA512 f22a48b355adea197a2d79f90ccc6b3edef2b5e8f6fb17319bd38652959126bbecb9442fd95e5147a894484446e87e535667fbfcf3b1e901b8375e5bb00a3bf3 WHIRLPOOL c82f69b275a860eb545340e0322db425c07467369542c49820d0e1f9e4b6b0ad2c5e7090dbceb2eabe785a74285f40f13b30cfac1a0da1e5a5ceca4322092e6d
+DIST libpng-1.6.18-apng.patch.gz 9940 SHA256 1d595b3b33c09529dddf869ca69f386528dfe1b991d2679377082e2acbca7009 SHA512 ebf8e2d11b18afc0943502be069076fbe07792e8056058551de0b1cf07987a6cf423edaa5de7aefb318115054235d984059a83aad93b06bed1a56002a0b6bd9b WHIRLPOOL d177ef6a4846956e8a2768b5beb5e18a6e9db2d03ef32e6ff21f79994f8274175b8bba01def0f85af4cd6640050173291e7a54c148076cbb8397e886257f83b8
+DIST libpng-1.6.18.tar.xz 932324 SHA256 2e10c13b7949883ac961db6177c516d778184432d440317e9f0391305c360963 SHA512 7ae286f728844da31699c3097cfb2167d4a57f740c749f0251de86ae481824716b3edaafc1b5673116623e729396ccc720a346439d3b20c5b6a7b06e1d129f74 WHIRLPOOL 1f9662073172eb2fa11924f79efd4d7dd0979696359f48f67addf5325148d898982d361879892acaa60441dd4fe42cd38ae68affc08302fa5ffc2b6731731a88
diff --git a/media-libs/libpng/libpng-1.2.51.ebuild b/media-libs/libpng/libpng-1.2.51.ebuild
new file mode 100644
index 000000000000..6ec9bd6c319d
--- /dev/null
+++ b/media-libs/libpng/libpng-1.2.51.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# this ebuild is only for the libpng12.so.0 SONAME for ABI compat
+
+inherit libtool multilib-minimal
+
+DESCRIPTION="Portable Network Graphics library"
+HOMEPAGE="http://www.libpng.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz"
+
+LICENSE="libpng"
+SLOT="1.2"
+KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 m68k ~mips ~ppc64 s390 sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND=">=sys-libs/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}]
+ !=media-libs/libpng-1.2*:0
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r3
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils"
+
+src_prepare() {
+ elibtoolize
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE=${S} econf --disable-static
+}
+
+multilib_src_compile() {
+ emake libpng12.la
+}
+
+multilib_src_install() {
+ newlib.so .libs/libpng12.so.0.* libpng12.so.0
+}
diff --git a/media-libs/libpng/libpng-1.2.52.ebuild b/media-libs/libpng/libpng-1.2.52.ebuild
new file mode 100644
index 000000000000..edcf187d0d5b
--- /dev/null
+++ b/media-libs/libpng/libpng-1.2.52.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# this ebuild is only for the libpng12.so.0 SONAME for ABI compat
+
+inherit libtool multilib-minimal
+
+DESCRIPTION="Portable Network Graphics library"
+HOMEPAGE="http://www.libpng.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz"
+
+LICENSE="libpng"
+SLOT="1.2"
+KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND=">=sys-libs/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}]
+ !=media-libs/libpng-1.2*:0
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r3
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils"
+
+DOCS=""
+
+src_prepare() {
+ elibtoolize
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE=${S} econf --disable-static
+}
+
+multilib_src_compile() {
+ emake libpng12.la
+}
+
+multilib_src_install() {
+ newlib.so .libs/libpng12.so.0.* libpng12.so.0
+}
diff --git a/media-libs/libpng/libpng-1.2.53.ebuild b/media-libs/libpng/libpng-1.2.53.ebuild
new file mode 100644
index 000000000000..db9ef0f39ce9
--- /dev/null
+++ b/media-libs/libpng/libpng-1.2.53.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# this ebuild is only for the libpng12.so.0 SONAME for ABI compat
+
+inherit libtool multilib-minimal
+
+DESCRIPTION="Portable Network Graphics library"
+HOMEPAGE="http://www.libpng.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz"
+
+LICENSE="libpng"
+SLOT="1.2"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND=">=sys-libs/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}]
+ !=media-libs/libpng-1.2*:0
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r3
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils"
+
+DOCS=""
+
+src_prepare() {
+ elibtoolize
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE=${S} econf --disable-static
+}
+
+multilib_src_compile() {
+ emake libpng12.la
+}
+
+multilib_src_install() {
+ newlib.so .libs/libpng12.so.0.* libpng12.so.0
+}
diff --git a/media-libs/libpng/libpng-1.5.21.ebuild b/media-libs/libpng/libpng-1.5.21.ebuild
new file mode 100644
index 000000000000..3d68450c3cb4
--- /dev/null
+++ b/media-libs/libpng/libpng-1.5.21.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# this ebuild is only for the libpng15.so.15 SONAME for ABI compat
+
+inherit eutils libtool multilib-minimal
+
+DESCRIPTION="Portable Network Graphics library"
+HOMEPAGE="http://www.libpng.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz
+ apng? ( mirror://sourceforge/apng/${P}-apng.patch.gz )"
+
+LICENSE="libpng"
+SLOT="1.5"
+KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+IUSE="apng neon"
+
+RDEPEND="sys-libs/zlib:=[${MULTILIB_USEDEP}]
+ !=media-libs/libpng-1.5*:0
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20140406-r4
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils"
+
+DOCS=""
+
+pkg_setup() {
+ local _preserved_lib=${EROOT}/usr/$(get_libdir)/libpng15.so.15
+ [[ -e ${_preserved_lib} ]] && rm -f "${_preserved_lib}"
+}
+
+src_prepare() {
+ if use apng; then
+ epatch "${WORKDIR}"/${PN}-*-apng.patch
+ # Don't execute symbols check with apng patch wrt #378111
+ sed -i -e '/^check/s:scripts/symbols.chk::' Makefile.in || die
+ fi
+ elibtoolize
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" \
+ econf \
+ --disable-static \
+ --enable-arm-neon=$(usex neon)
+}
+
+multilib_src_compile() {
+ emake libpng15.la
+}
+
+multilib_src_install() {
+ newlib.so .libs/libpng15.so.15.* libpng15.so.15
+}
diff --git a/media-libs/libpng/libpng-1.5.23.ebuild b/media-libs/libpng/libpng-1.5.23.ebuild
new file mode 100644
index 000000000000..f0df0eb92c19
--- /dev/null
+++ b/media-libs/libpng/libpng-1.5.23.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# this ebuild is only for the libpng15.so.15 SONAME for ABI compat
+
+inherit eutils libtool multilib-minimal
+
+DESCRIPTION="Portable Network Graphics library"
+HOMEPAGE="http://www.libpng.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz
+ apng? ( mirror://sourceforge/apng/${P}-apng.patch.gz )"
+
+LICENSE="libpng"
+SLOT="1.5"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+IUSE="apng neon"
+
+RDEPEND="sys-libs/zlib:=[${MULTILIB_USEDEP}]
+ !=media-libs/libpng-1.5*:0
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20140406-r4
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils"
+
+DOCS=""
+
+pkg_setup() {
+ local _preserved_lib=${EROOT}/usr/$(get_libdir)/libpng15.so.15
+ [[ -e ${_preserved_lib} ]] && rm -f "${_preserved_lib}"
+}
+
+src_prepare() {
+ if use apng; then
+ # fix windows path in patch file. Please check for each release if this can be removed again.
+ sed 's@scripts\\symbols.def@scripts/symbols.def@' \
+ -i "${WORKDIR}"/${PN}-*-apng.patch || die
+ epatch "${WORKDIR}"/${PN}-*-apng.patch
+ # Don't execute symbols check with apng patch wrt #378111
+ sed -i -e '/^check/s:scripts/symbols.chk::' Makefile.in || die
+ fi
+ elibtoolize
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" \
+ econf \
+ --disable-static \
+ --enable-arm-neon=$(usex neon)
+}
+
+multilib_src_compile() {
+ emake libpng15.la
+}
+
+multilib_src_install() {
+ newlib.so .libs/libpng15.so.15.* libpng15.so.15
+}
diff --git a/media-libs/libpng/libpng-1.6.16.ebuild b/media-libs/libpng/libpng-1.6.16.ebuild
new file mode 100644
index 000000000000..8818a93e8c5d
--- /dev/null
+++ b/media-libs/libpng/libpng-1.6.16.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils libtool multilib-minimal
+
+DESCRIPTION="Portable Network Graphics library"
+HOMEPAGE="http://www.libpng.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz
+ apng? ( mirror://sourceforge/apng/${P}-apng.patch.gz )"
+
+LICENSE="libpng"
+SLOT="0/16"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+IUSE="apng neon static-libs"
+
+RDEPEND=">=sys-libs/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}]
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r1
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils"
+
+src_prepare() {
+ if use apng; then
+ epatch "${WORKDIR}"/${PN}-*-apng.patch
+ # Don't execute symbols check with apng patch wrt #378111
+ sed -i -e '/^check/s:scripts/symbols.chk::' Makefile.in || die
+ fi
+ elibtoolize
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ $(use_enable static-libs static) \
+ --enable-arm-neon=$(usex neon)
+}
+
+multilib_src_install_all() {
+ dodoc ANNOUNCE CHANGES libpng-manual.txt README TODO
+ prune_libtool_files --all
+}
diff --git a/media-libs/libpng/libpng-1.6.17.ebuild b/media-libs/libpng/libpng-1.6.17.ebuild
new file mode 100644
index 000000000000..55f0347a7482
--- /dev/null
+++ b/media-libs/libpng/libpng-1.6.17.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils libtool multilib-minimal
+
+DESCRIPTION="Portable Network Graphics library"
+HOMEPAGE="http://www.libpng.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz
+ apng? ( mirror://sourceforge/apng/${P}-apng.patch.gz )"
+
+LICENSE="libpng"
+SLOT="0/16"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+IUSE="apng neon static-libs"
+
+RDEPEND=">=sys-libs/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}]
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r1
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils"
+
+src_prepare() {
+ if use apng; then
+ epatch "${WORKDIR}"/${PN}-*-apng.patch
+ # Don't execute symbols check with apng patch wrt #378111
+ sed -i -e '/^check/s:scripts/symbols.chk::' Makefile.in || die
+ fi
+ elibtoolize
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ $(use_enable static-libs static) \
+ --enable-arm-neon=$(usex neon)
+}
+
+multilib_src_install_all() {
+ dodoc ANNOUNCE CHANGES libpng-manual.txt README TODO
+ prune_libtool_files --all
+}
diff --git a/media-libs/libpng/libpng-1.6.18.ebuild b/media-libs/libpng/libpng-1.6.18.ebuild
new file mode 100644
index 000000000000..55f0347a7482
--- /dev/null
+++ b/media-libs/libpng/libpng-1.6.18.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils libtool multilib-minimal
+
+DESCRIPTION="Portable Network Graphics library"
+HOMEPAGE="http://www.libpng.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz
+ apng? ( mirror://sourceforge/apng/${P}-apng.patch.gz )"
+
+LICENSE="libpng"
+SLOT="0/16"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+IUSE="apng neon static-libs"
+
+RDEPEND=">=sys-libs/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}]
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r1
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils"
+
+src_prepare() {
+ if use apng; then
+ epatch "${WORKDIR}"/${PN}-*-apng.patch
+ # Don't execute symbols check with apng patch wrt #378111
+ sed -i -e '/^check/s:scripts/symbols.chk::' Makefile.in || die
+ fi
+ elibtoolize
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ $(use_enable static-libs static) \
+ --enable-arm-neon=$(usex neon)
+}
+
+multilib_src_install_all() {
+ dodoc ANNOUNCE CHANGES libpng-manual.txt README TODO
+ prune_libtool_files --all
+}
diff --git a/media-libs/libpng/metadata.xml b/media-libs/libpng/metadata.xml
new file mode 100644
index 000000000000..ead4d1ccd368
--- /dev/null
+++ b/media-libs/libpng/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>base-system</herd>
+ <use>
+ <flag name="apng">support unofficial APNG (Animated PNG) spec</flag>
+ </use>
+ <upstream>
+ <remote-id type="cpe">cpe:/a:libpng:libpng</remote-id>
+ <remote-id type="sourceforge">apng</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libpostproc/Manifest b/media-libs/libpostproc/Manifest
new file mode 100644
index 000000000000..6400b3e968a0
--- /dev/null
+++ b/media-libs/libpostproc/Manifest
@@ -0,0 +1,2 @@
+DIST libpostproc-0.8.0.20121125.tar.xz 65376 SHA256 0af39e91375f76cf8980aea2517666e5d69a113e41d5fdc56aa6ad1b33dee1a6 SHA512 7f1451dbe822d143793c12bb7c18fd9eeb98b5347bbfc54172f0aceb2f18cf31b2c0c888c33a9ce2e9f519b4bbb0a900b729188ce83cda9ad5499a8f6ea2d62a WHIRLPOOL 6e879842dfaf78018ca9a3ee93b5e2b950a72e672fc5dc47381f37593a83f886dccb4416fc30e6cdedf0d3fecbf534942f6664de5890d323362cf228106d8311
+DIST libpostproc-10.20140517.tar.xz 65556 SHA256 e47984fd5c60d56cc57d7e58de92eec9e8fd401e333d4a0841ccfbfb107103ca SHA512 0d6dca077c99ac569d892bc92cd08c6bf3e3a5e30e623ced20227b5bd1bd1aa3ecd150bfc900659accd77b997eb64b4d6f0538f9b6161d190ef6c69dcaf47893 WHIRLPOOL ca305b7ae67d61ecca1b359524c81d7219906078feb55087521454a4ceb8dc8235e20fff3a9b9a21e23d55650179639cc3796084942334930d232df3d21f8e14
diff --git a/media-libs/libpostproc/libpostproc-0.8.0.20121125.ebuild b/media-libs/libpostproc/libpostproc-0.8.0.20121125.ebuild
new file mode 100644
index 000000000000..ac4201ac02bf
--- /dev/null
+++ b/media-libs/libpostproc/libpostproc-0.8.0.20121125.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+SCM=""
+if [ "${PV#9999}" != "${PV}" ] ; then
+ SCM="git-2"
+ EGIT_REPO_URI="git://github.com/dwbuiten/postproc.git"
+fi
+
+inherit eutils flag-o-matic multilib toolchain-funcs ${SCM}
+
+DESCRIPTION="Video post processing library"
+HOMEPAGE="https://github.com/dwbuiten/postproc"
+if [ "${PV#9999}" != "${PV}" ] ; then
+ SRC_URI=""
+elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot
+ SRC_URI="mirror://gentoo/${P}.tar.xz"
+else # Release
+ SRC_URI="http://dev.gentoo.org/~lu_zero/distfiles/${P}.tar.xz"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+if [ "${PV#9999}" = "${PV}" ] ; then
+ KEYWORDS="alpha amd64 arm ~hppa ~ia64 ppc ppc64 ~sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+fi
+IUSE="pic static-libs"
+
+# 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 altivec cpu_flags_x86_mmx:mmx cpu_flags_x86_mmxext:mmxext"
+for i in ${CPU_FEATURES}; do
+ IUSE="${IUSE} ${i%:*}"
+done
+
+DEPEND=">=virtual/ffmpeg-0.10.2-r1"
+RDEPEND="${DEPEND}
+ !<media-video/libav-0.8.2-r2
+ !media-video/ffmpeg:0
+"
+
+src_configure() {
+ local myconf="${EXTRA_LIBPOSTPROC_CONF}"
+ for i in $(get-flag march) $(get-flag mcpu) $(get-flag mtune) ; do
+ [ "${i}" = "native" ] && i="host" # bug #273421
+ myconf="${myconf} --cpu=${i}"
+ break
+ done
+
+ if use pic ; then
+ myconf="${myconf} --enable-pic"
+ # disable asm code if PIC is required
+ # as the provided asm decidedly is not PIC for x86.
+ use x86 && myconf="${myconf} --disable-asm"
+ fi
+
+ # cross compile support
+ if tc-is-cross-compiler ; then
+ myconf="${myconf} --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}-"
+ case ${CHOST} in
+ *freebsd*)
+ myconf="${myconf} --target-os=freebsd"
+ ;;
+ mingw32*)
+ myconf="${myconf} --target-os=mingw32"
+ ;;
+ *linux*)
+ myconf="${myconf} --target-os=linux"
+ ;;
+ esac
+ fi
+
+ cd "${S}"
+ ./configure \
+ --prefix="${EPREFIX}/usr" \
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \
+ --shlibdir="${EPREFIX}/usr/$(get_libdir)" \
+ --enable-shared \
+ --cc="$(tc-getCC)" \
+ --ar="$(tc-getAR)" \
+ --optflags="${CFLAGS}" \
+ --extra-cflags="${CFLAGS}" \
+ $(use_enable static-libs static) \
+ ${myconf} || die
+}
diff --git a/media-libs/libpostproc/libpostproc-10.20140517-r1.ebuild b/media-libs/libpostproc/libpostproc-10.20140517-r1.ebuild
new file mode 100644
index 000000000000..3311ddc3b42f
--- /dev/null
+++ b/media-libs/libpostproc/libpostproc-10.20140517-r1.ebuild
@@ -0,0 +1,89 @@
+# 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-2"
+ EGIT_REPO_URI="git://github.com/lu-zero/postproc.git"
+fi
+
+inherit eutils flag-o-matic multilib multilib-minimal toolchain-funcs ${SCM}
+
+DESCRIPTION="Video post processing library"
+HOMEPAGE="https://github.com/lu-zero/postproc"
+if [ "${PV#9999}" != "${PV}" ] ; then
+ SRC_URI=""
+elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot
+ SRC_URI="mirror://gentoo/${P}.tar.xz"
+else # Release
+ SRC_URI="http://dev.gentoo.org/~lu_zero/distfiles/${P}.tar.xz"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+if [ "${PV#9999}" = "${PV}" ] ; then
+ KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+fi
+IUSE="pic static-libs"
+
+# 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 altivec cpu_flags_x86_mmx:mmx cpu_flags_x86_mmxext:mmxext"
+for i in ${CPU_FEATURES}; do
+ IUSE="${IUSE} ${i%:*}"
+done
+
+RDEPEND="
+ >=media-video/libav-0.8.2-r2:0=
+ !media-video/ffmpeg:0
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )
+"
+DEPEND="${RDEPEND}"
+
+multilib_src_configure() {
+ local myconf=( ${EXTRA_LIBPOSTPROC_CONF} )
+ for i in $(get-flag march) $(get-flag mcpu) $(get-flag mtune) ; do
+ [[ "${i}" = "native" ]] && i="host" # bug #273421
+ myconf+=( --cpu=${i} )
+ break
+ 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
+
+ # 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
+
+ "${S}"/configure \
+ --prefix="${EPREFIX}/usr" \
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \
+ --shlibdir="${EPREFIX}/usr/$(get_libdir)" \
+ --enable-shared \
+ --cc="$(tc-getCC)" \
+ --ar="$(tc-getAR)" \
+ --optflags="${CFLAGS}" \
+ --extra-cflags="${CFLAGS}" \
+ $(use_enable static-libs static) \
+ "${myconf[@]}" || die
+}
diff --git a/media-libs/libpostproc/libpostproc-10.20140517.ebuild b/media-libs/libpostproc/libpostproc-10.20140517.ebuild
new file mode 100644
index 000000000000..04a1aa732112
--- /dev/null
+++ b/media-libs/libpostproc/libpostproc-10.20140517.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+SCM=""
+if [ "${PV#9999}" != "${PV}" ] ; then
+ SCM="git-2"
+ EGIT_REPO_URI="git://github.com/lu-zero/postproc.git"
+fi
+
+inherit eutils flag-o-matic multilib toolchain-funcs ${SCM}
+
+DESCRIPTION="Video post processing library"
+HOMEPAGE="https://github.com/lu-zero/postproc"
+if [ "${PV#9999}" != "${PV}" ] ; then
+ SRC_URI=""
+elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot
+ SRC_URI="mirror://gentoo/${P}.tar.xz"
+else # Release
+ SRC_URI="http://dev.gentoo.org/~lu_zero/distfiles/${P}.tar.xz"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+if [ "${PV#9999}" = "${PV}" ] ; then
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+fi
+IUSE="pic static-libs"
+
+# 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 altivec cpu_flags_x86_mmx:mmx cpu_flags_x86_mmxext:mmxext"
+for i in ${CPU_FEATURES}; do
+ IUSE="${IUSE} ${i%:*}"
+done
+
+DEPEND=">=virtual/ffmpeg-0.10.2-r2"
+RDEPEND="${DEPEND}
+ !<media-video/libav-0.8.2-r2
+ !media-video/ffmpeg:0
+"
+
+src_configure() {
+ local myconf="${EXTRA_LIBPOSTPROC_CONF}"
+ for i in $(get-flag march) $(get-flag mcpu) $(get-flag mtune) ; do
+ [ "${i}" = "native" ] && i="host" # bug #273421
+ myconf="${myconf} --cpu=${i}"
+ break
+ done
+
+ if use pic ; then
+ myconf="${myconf} --enable-pic"
+ # disable asm code if PIC is required
+ # as the provided asm decidedly is not PIC for x86.
+ use x86 && myconf="${myconf} --disable-asm"
+ fi
+
+ # cross compile support
+ if tc-is-cross-compiler ; then
+ myconf="${myconf} --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}-"
+ case ${CHOST} in
+ *freebsd*)
+ myconf="${myconf} --target-os=freebsd"
+ ;;
+ mingw32*)
+ myconf="${myconf} --target-os=mingw32"
+ ;;
+ *linux*)
+ myconf="${myconf} --target-os=linux"
+ ;;
+ esac
+ fi
+
+ cd "${S}"
+ ./configure \
+ --prefix="${EPREFIX}/usr" \
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \
+ --shlibdir="${EPREFIX}/usr/$(get_libdir)" \
+ --enable-shared \
+ --cc="$(tc-getCC)" \
+ --ar="$(tc-getAR)" \
+ --optflags="${CFLAGS}" \
+ --extra-cflags="${CFLAGS}" \
+ $(use_enable static-libs static) \
+ ${myconf} || die
+}
diff --git a/media-libs/libpostproc/libpostproc-9999.ebuild b/media-libs/libpostproc/libpostproc-9999.ebuild
new file mode 100644
index 000000000000..8faca2ca378e
--- /dev/null
+++ b/media-libs/libpostproc/libpostproc-9999.ebuild
@@ -0,0 +1,89 @@
+# 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-2"
+ EGIT_REPO_URI="git://github.com/lu-zero/postproc.git"
+fi
+
+inherit eutils flag-o-matic multilib multilib-minimal toolchain-funcs ${SCM}
+
+DESCRIPTION="Video post processing library"
+HOMEPAGE="https://github.com/lu-zero/postproc"
+if [ "${PV#9999}" != "${PV}" ] ; then
+ SRC_URI=""
+elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot
+ SRC_URI="mirror://gentoo/${P}.tar.xz"
+else # Release
+ SRC_URI="http://dev.gentoo.org/~lu_zero/distfiles/${P}.tar.xz"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+if [ "${PV#9999}" = "${PV}" ] ; then
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+fi
+IUSE="pic static-libs"
+
+# 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 altivec cpu_flags_x86_mmx:mmx cpu_flags_x86_mmxext:mmxext"
+for i in ${CPU_FEATURES}; do
+ IUSE="${IUSE} ${i%:*}"
+done
+
+RDEPEND="
+ >=media-video/libav-0.8.2-r2:0=
+ !media-video/ffmpeg:0
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )
+"
+DEPEND="${RDEPEND}"
+
+multilib_src_configure() {
+ local myconf=( ${EXTRA_LIBPOSTPROC_CONF} )
+ for i in $(get-flag march) $(get-flag mcpu) $(get-flag mtune) ; do
+ [[ "${i}" = "native" ]] && i="host" # bug #273421
+ myconf+=( --cpu=${i} )
+ break
+ 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
+
+ # 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
+
+ "${S}"/configure \
+ --prefix="${EPREFIX}/usr" \
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \
+ --shlibdir="${EPREFIX}/usr/$(get_libdir)" \
+ --enable-shared \
+ --cc="$(tc-getCC)" \
+ --ar="$(tc-getAR)" \
+ --optflags="${CFLAGS}" \
+ --extra-cflags="${CFLAGS}" \
+ $(use_enable static-libs static) \
+ "${myconf[@]}" || die
+}
diff --git a/media-libs/libpostproc/metadata.xml b/media-libs/libpostproc/metadata.xml
new file mode 100644
index 000000000000..4d39c3c2955a
--- /dev/null
+++ b/media-libs/libpostproc/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="pic">Force shared libraries to be built as PIC (this is slower).</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">lu-zero/postproc</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libpqstego/Manifest b/media-libs/libpqstego/Manifest
new file mode 100644
index 000000000000..a08dbb26af1b
--- /dev/null
+++ b/media-libs/libpqstego/Manifest
@@ -0,0 +1 @@
+DIST libpqstego-0.0.1.tar.gz 360725 SHA256 99221da88423af122a5a51638065444439e9a6bfacbc400472558eac81f8724e
diff --git a/media-libs/libpqstego/libpqstego-0.0.1.ebuild b/media-libs/libpqstego/libpqstego-0.0.1.ebuild
new file mode 100644
index 000000000000..1b45d0967eee
--- /dev/null
+++ b/media-libs/libpqstego/libpqstego-0.0.1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+DESCRIPTION="Library for Perturbed Quantization Steganography"
+HOMEPAGE="http://sourceforge.net/projects/pqstego/"
+SRC_URI="mirror://sourceforge/${PN/lib}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="sci-libs/gsl[cblas-external]"
+
+src_configure() {
+ econf \
+ --disable-dependency-tracking \
+ --disable-static
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS CHANGES README TODO
+ find "${D}" -name '*.la' -delete
+}
diff --git a/media-libs/libpqstego/metadata.xml b/media-libs/libpqstego/metadata.xml
new file mode 100644
index 000000000000..6183a8f271b6
--- /dev/null
+++ b/media-libs/libpqstego/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>graphics</herd>
+ <upstream>
+ <remote-id type="sourceforge">pqstego</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libprojectm-qt/Manifest b/media-libs/libprojectm-qt/Manifest
new file mode 100644
index 000000000000..455b2574a179
--- /dev/null
+++ b/media-libs/libprojectm-qt/Manifest
@@ -0,0 +1 @@
+DIST projectM-qt-2.1.0-Source.tar.gz 100928 SHA256 1dbc281f8f96d50380781259fb61a6f3b6b53fc5c07a6866acf89a9d220214b3 SHA512 fe3f88941da763086a20dbb8a32d25081361a39cb98a87467b06a98c87e3d3c05db555b357974c376ee1d0af01efcec4b1522405d8bd5b7c9860ccecdfb4a887 WHIRLPOOL 7d99f0702ca740ccd04c8da08e071e510f2302336efb894fbfbf6d19f0880bee25ad8dbba714828b342382508eba60d24625c241c9bac7c481fef85bcb34ccd8
diff --git a/media-libs/libprojectm-qt/files/libprojectm-qt-2.1.0-multilib.patch b/media-libs/libprojectm-qt/files/libprojectm-qt-2.1.0-multilib.patch
new file mode 100644
index 000000000000..99c5b25068cf
--- /dev/null
+++ b/media-libs/libprojectm-qt/files/libprojectm-qt-2.1.0-multilib.patch
@@ -0,0 +1,14 @@
+diff --git a/src/projectM-qt/CMakeLists.txt b/src/projectM-qt/CMakeLists.txt
+index 750d1ed..ed14840 100644
+--- a/src/projectM-qt/CMakeLists.txt
++++ b/src/projectM-qt/CMakeLists.txt
+@@ -131,6 +131,6 @@ include_directories(${PROJECTM_INCLUDE} ${QT_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR
+ target_link_libraries(projectM-qt projectM GLEW GL ${QT_QTGUI_LIBRARIES} ${QT_QTOPENGL_LIBRARIES} ${QT_QTXML_LIBRARIES} ${QT_LIBRARIES})
+
+ install(FILES qprojectm_mainwindow.hpp DESTINATION include/libprojectM-qt)
+-install(TARGETS projectM-qt DESTINATION lib)
+-install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libprojectM-qt.pc" DESTINATION lib/pkgconfig)
++install(TARGETS projectM-qt DESTINATION lib${LIB_SUFFIX})
++install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libprojectM-qt.pc" DESTINATION lib${LIB_SUFFIX}/pkgconfig)
+ install(FILES "images/icons/prjm16-transparent.svg" DESTINATION ${CMAKE_INSTALL_PREFIX}/share/pixmaps)
+
diff --git a/media-libs/libprojectm-qt/libprojectm-qt-2.1.0-r1.ebuild b/media-libs/libprojectm-qt/libprojectm-qt-2.1.0-r1.ebuild
new file mode 100644
index 000000000000..663c5d9802fd
--- /dev/null
+++ b/media-libs/libprojectm-qt/libprojectm-qt-2.1.0-r1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils
+
+MY_P=${P/m/M}-Source ; MY_P=${MY_P/lib}
+
+DESCRIPTION="A graphical music visualization plugin similar to milkdrop"
+HOMEPAGE="http://projectm.sourceforge.net"
+SRC_URI="mirror://sourceforge/projectm/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug"
+
+RDEPEND=">=media-libs/libprojectm-2.1.0
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ dev-qt/qtopengl:4"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+PATCHES=( "${FILESDIR}/${P}-multilib.patch" )
diff --git a/media-libs/libprojectm-qt/metadata.xml b/media-libs/libprojectm-qt/metadata.xml
new file mode 100644
index 000000000000..2ace5da19108
--- /dev/null
+++ b/media-libs/libprojectm-qt/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>sound</herd>
+ <upstream>
+ <remote-id type="sourceforge">projectm</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libprojectm/Manifest b/media-libs/libprojectm/Manifest
new file mode 100644
index 000000000000..34d3a1dad514
--- /dev/null
+++ b/media-libs/libprojectm/Manifest
@@ -0,0 +1,2 @@
+DIST projectM-2.0.1-Source.tar.gz 865784 SHA256 c305182dfc8b7f87b82a146af6cf50a982e7c9c647877a0559dfef4b11dacb93 SHA512 0edbf487d45983b0004ee67009931da985f3b9909cb10eb32a2c9116eed46f9cf9c7a1c696138d16a30aedd81d43ac5533fb7666c9fba9326c9c89f4e87f88db WHIRLPOOL e69b0130592fe92969a569542d9c4f1bfcb7a365d538e84a64180b48aa88d64b1076d9ad3f071d99348f987149e8e1b012dbc5d41fef7156f57b55512e111d08
+DIST projectM-complete-2.1.0-Source.tar.gz 31130351 SHA256 513204f033006bd3dcdf8aada196d816d6b7187266ddcbb1594d0285cc9406ee SHA512 53f4531208d2594f1c28a7f7842fb5ee3349ca9e48f9f0d999a90b6a62d315c9c0ae9cba1cdfacb8a149eba3e5ddc4517ac406ee2c53718191be8e26ee2cca5f WHIRLPOOL f60ee006dac8465a17e1397a9331bdabd7a3967455f9e16644e1ff5e544ab1662b3aa8a2b428c0258f0b38c91513bfbda3cd29b4419e05e64aa410e61ad03972
diff --git a/media-libs/libprojectm/files/libprojectm-1.2.0-gcc44.patch b/media-libs/libprojectm/files/libprojectm-1.2.0-gcc44.patch
new file mode 100644
index 000000000000..06d916f7c394
--- /dev/null
+++ b/media-libs/libprojectm/files/libprojectm-1.2.0-gcc44.patch
@@ -0,0 +1,9 @@
+diff -ur libprojectM-1.2.0.orig/BuiltinParams.cpp libprojectM-1.2.0/BuiltinParams.cpp
+--- libprojectM-1.2.0.orig/BuiltinParams.cpp 2008-06-12 03:39:28.000000000 +0000
++++ libprojectM-1.2.0/BuiltinParams.cpp 2009-05-07 20:05:54.000000000 +0000
+@@ -1,4 +1,4 @@
+-
++#include <cstdio>
+ #include "fatal.h"
+ #include "BuiltinParams.hpp"
+ #include <cassert>
diff --git a/media-libs/libprojectm/files/libprojectm-2.0.1-pcfix.patch b/media-libs/libprojectm/files/libprojectm-2.0.1-pcfix.patch
new file mode 100644
index 000000000000..c871b78910a1
--- /dev/null
+++ b/media-libs/libprojectm/files/libprojectm-2.0.1-pcfix.patch
@@ -0,0 +1,12 @@
+Index: projectM-2.0.1-Source/libprojectM.pc.in
+===================================================================
+--- projectM-2.0.1-Source.orig/libprojectM.pc.in
++++ projectM-2.0.1-Source/libprojectM.pc.in
+@@ -1,6 +1,6 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+ exec_prefix=@CMAKE_INSTALL_PREFIX@
+-libdir=@LIB_INSTALL_DIR@
++libdir=${exec_prefix}/lib@LIB_SUFFIX@
+ includedir=@CMAKE_INSTALL_PREFIX@/include
+ pkgdatadir=@CMAKE_INSTALL_PREFIX@/@RESOURCE_PREFIX@
+ sysconfdir=@CMAKE_INSTALL_PREFIX@/@RESOURCE_PREFIX@
diff --git a/media-libs/libprojectm/files/libprojectm-2.1.0-multilib.patch b/media-libs/libprojectm/files/libprojectm-2.1.0-multilib.patch
new file mode 100644
index 000000000000..8477a270df89
--- /dev/null
+++ b/media-libs/libprojectm/files/libprojectm-2.1.0-multilib.patch
@@ -0,0 +1,22 @@
+diff -urN projectM-complete-2.1.0-Source/src/libprojectM/CMakeLists.txt projectM-complete-2.1.0-Source.new/src/libprojectM/CMakeLists.txt
+--- projectM-complete-2.1.0-Source/src/libprojectM/CMakeLists.txt 2012-05-20 05:43:26.000000000 +0200
++++ projectM-complete-2.1.0-Source.new/src/libprojectM/CMakeLists.txt 2013-01-21 21:07:49.097541426 +0100
+@@ -35,7 +35,7 @@
+
+ ADD_DEFINITIONS(-DCMAKE_INSTALL_PREFIX="\\\"${CMAKE_INSTALL_PREFIX}\\\"")
+
+-SET(LIB_INSTALL_DIR "\${exec_prefix}/lib"
++SET(LIB_INSTALL_DIR "\${exec_prefix}/lib${LIB_SUFFIX}"
+ CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is /lib)"
+ FORCE)
+
+@@ -234,7 +234,7 @@
+ FILE(GLOB presets "presets/*.milk" "presets/*.prjm" "presets/*.tga")
+ INSTALL(FILES ${presets} DESTINATION ${CMAKE_INSTALL_PREFIX}/share/projectM/presets)
+ INSTALL(FILES ${Renderer_SOURCE_DIR}/projectM.cg ${Renderer_SOURCE_DIR}/blur.cg DESTINATION ${CMAKE_INSTALL_PREFIX}/share/projectM/shaders)
+-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libprojectM.pc DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig)
++INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libprojectM.pc DESTINATION ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/pkgconfig)
+ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/config.inp DESTINATION ${CMAKE_INSTALL_PREFIX}/share/projectM)
+ INSTALL(FILES projectM.hpp event.h dlldefs.h fatal.h PCM.hpp Common.hpp DESTINATION include/libprojectM)
+-INSTALL(TARGETS projectM DESTINATION lib)
++INSTALL(TARGETS projectM DESTINATION lib${LIB_SUFFIX})
diff --git a/media-libs/libprojectm/files/libprojectm-2.1.0-path.patch b/media-libs/libprojectm/files/libprojectm-2.1.0-path.patch
new file mode 100644
index 000000000000..39fa7e35da38
--- /dev/null
+++ b/media-libs/libprojectm/files/libprojectm-2.1.0-path.patch
@@ -0,0 +1,13 @@
+Index: projectM-complete-2.1.0-Source/src/libprojectM/CMakeLists.txt
+===================================================================
+--- projectM-complete-2.1.0-Source.orig/src/libprojectM/CMakeLists.txt
++++ projectM-complete-2.1.0-Source/src/libprojectM/CMakeLists.txt
+@@ -33,7 +33,7 @@ set(PROJECTM_VERSION 2.1.0)
+ set(PROJECTM_ABI_LEVEL 2)
+ #
+
+-ADD_DEFINITIONS(-DCMAKE_INSTALL_PREFIX="\\\"${CMAKE_INSTALL_PREFIX}\\\"")
++ADD_DEFINITIONS(-DCMAKE_INSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}")
+
+ SET(LIB_INSTALL_DIR "\${exec_prefix}/lib${LIB_SUFFIX}"
+ CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is /lib)"
diff --git a/media-libs/libprojectm/libprojectm-2.0.1-r1.ebuild b/media-libs/libprojectm/libprojectm-2.0.1-r1.ebuild
new file mode 100644
index 000000000000..22d0389a52fb
--- /dev/null
+++ b/media-libs/libprojectm/libprojectm-2.0.1-r1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit cmake-utils flag-o-matic eutils toolchain-funcs
+
+MY_P=${P/m/M}-Source ; MY_P=${MY_P/lib}
+
+DESCRIPTION="A graphical music visualization plugin similar to milkdrop"
+HOMEPAGE="http://projectm.sourceforge.net"
+SRC_URI="mirror://sourceforge/projectm/${MY_P}.tar.gz"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="debug openmp video_cards_nvidia"
+
+RDEPEND=">=media-libs/ftgl-2.1.3_rc5
+ media-libs/freetype:2
+ media-libs/mesa
+ media-libs/glew
+ sys-libs/zlib
+ video_cards_nvidia? ( media-gfx/nvidia-cg-toolkit )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+PATCHES=(
+ "${FILESDIR}"/${P}-pcfix.patch
+)
+
+src_configure() {
+ append-ldflags $(no-as-needed)
+
+ if use video_cards_nvidia; then
+ append-ldflags -L/opt/nvidia-cg-toolkit/lib
+ append-flags -I/opt/nvidia-cg-toolkit/include
+ fi
+
+ local mycmakeargs=(
+ $(cmake-utils_use_use video_cards_nvidia CG)
+ "-DUSE_OPENMP=OFF"
+ )
+
+ if use openmp && tc-has-openmp; then
+ mycmakeargs+=(
+ $(cmake-utils_use_use openmp)
+ )
+ fi
+
+ cmake-utils_src_configure
+}
diff --git a/media-libs/libprojectm/libprojectm-2.1.0-r1.ebuild b/media-libs/libprojectm/libprojectm-2.1.0-r1.ebuild
new file mode 100644
index 000000000000..89e9a569562f
--- /dev/null
+++ b/media-libs/libprojectm/libprojectm-2.1.0-r1.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit base cmake-utils flag-o-matic eutils toolchain-funcs multilib
+
+MY_P=${PN/m/M}-complete-${PV}-Source ; MY_P=${MY_P/lib}
+
+DESCRIPTION="A graphical music visualization plugin similar to milkdrop"
+HOMEPAGE="http://projectm.sourceforge.net"
+SRC_URI="mirror://sourceforge/projectm/${MY_P}.tar.gz"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm ~arm64 hppa ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="debug openmp video_cards_nvidia"
+
+RDEPEND="media-fonts/dejavu
+ >=media-libs/ftgl-2.1.3_rc5
+ media-libs/freetype:2
+ media-libs/mesa
+ media-libs/glew
+ sys-libs/zlib
+ video_cards_nvidia? ( media-gfx/nvidia-cg-toolkit )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}/src/libprojectM
+
+PATCHES=(
+ "${FILESDIR}"/${P}-multilib.patch
+ "${FILESDIR}"/${P}-path.patch
+)
+
+src_configure() {
+ if use video_cards_nvidia; then
+ append-ldflags -L/opt/nvidia-cg-toolkit/$(get_libdir)
+ append-ldflags -L/opt/nvidia-cg-toolkit/lib
+ append-cppflags -I/opt/nvidia-cg-toolkit/include
+ fi
+
+ local mycmakeargs=(
+ $(cmake-utils_use_use video_cards_nvidia CG)
+ "-DUSE_OPENMP=OFF"
+ "-DprojectM_FONT_MENU=${EPREFIX}/usr/share/fonts/dejavu/DejaVuSans.ttf"
+ "-DprojectM_FONT_TITLE=${EPREFIX}/usr/share/fonts/dejavu/DejaVuSansMono.ttf"
+ )
+
+ if use openmp && tc-has-openmp; then
+ mycmakeargs+=(
+ $(cmake-utils_use_use openmp)
+ )
+ fi
+
+ cmake-utils_src_configure
+}
diff --git a/media-libs/libprojectm/metadata.xml b/media-libs/libprojectm/metadata.xml
new file mode 100644
index 000000000000..2ace5da19108
--- /dev/null
+++ b/media-libs/libprojectm/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>sound</herd>
+ <upstream>
+ <remote-id type="sourceforge">projectm</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libptp2/Manifest b/media-libs/libptp2/Manifest
new file mode 100644
index 000000000000..93af2d53ccec
--- /dev/null
+++ b/media-libs/libptp2/Manifest
@@ -0,0 +1 @@
+DIST libptp2-1.1.10.tar.gz 380767 SHA256 ce9c0c220a24ffecd4c4a2563de9e78137965bc2118c3de53dbfd928cfd92e74
diff --git a/media-libs/libptp2/files/libptp2-1.1.0-gcc41.patch b/media-libs/libptp2/files/libptp2-1.1.0-gcc41.patch
new file mode 100644
index 000000000000..2837980cca58
--- /dev/null
+++ b/media-libs/libptp2/files/libptp2-1.1.0-gcc41.patch
@@ -0,0 +1,35 @@
+--- libptp2-1.1.0.orig/src/ptp-pack.c 2006-01-07 19:38:52.000000000 -0200
++++ libptp2-1.1.0/src/ptp-pack.c 2006-01-07 19:56:26.000000000 -0200
+@@ -440,7 +440,7 @@
+ case PTP_DTC_STR:
+ {
+ uint8_t len;
+- (char *)(*value)=ptp_unpack_string(params,data,0,&len);
++ (*value)=(char *)ptp_unpack_string(params,data,0,&len);
+ break;
+ }
+ }
+@@ -513,10 +513,10 @@
+ /* XXX: other int types are unimplemented */
+ /* XXX: int arrays are unimplemented also */
+ case PTP_DTC_STR:
+- (char *)dpd->FactoryDefaultValue = ptp_unpack_string
++ dpd->FactoryDefaultValue = (char *)ptp_unpack_string
+ (params,data,PTP_dpd_FactoryDefaultValue,&len);
+ totallen=len*2+1;
+- (char *)dpd->CurrentValue = ptp_unpack_string
++ dpd->CurrentValue = (char *)ptp_unpack_string
+ (params, data, PTP_dpd_FactoryDefaultValue +
+ totallen, &len);
+ totallen+=len*2+1;
+@@ -598,8 +598,8 @@
+ int i;
+ for(i=0;i<N;i++)
+ {
+- (char *)dpd->FORM.Enum.SupportedValue[i]=
+- ptp_unpack_string
++ dpd->FORM.Enum.SupportedValue[i]=
++ (char *)ptp_unpack_string
+ (params,data,PTP_dpd_FactoryDefaultValue
+ +totallen,&len);
+ totallen+=len*2+1;
diff --git a/media-libs/libptp2/files/libptp2-1.1.0-libusbversion.patch b/media-libs/libptp2/files/libptp2-1.1.0-libusbversion.patch
new file mode 100644
index 000000000000..b5d36f05f32b
--- /dev/null
+++ b/media-libs/libptp2/files/libptp2-1.1.0-libusbversion.patch
@@ -0,0 +1,11 @@
+--- libptp2-1.1.0.orig/configure 2006-01-07 19:38:52.000000000 -0200
++++ libptp2-1.1.0/configure 2006-01-07 19:47:30.000000000 -0200
+@@ -21773,7 +21773,7 @@
+ LDFLAGS="$LDFLAGS_save"
+ fi
+
+- if test "$LIBUSB_VER" \< "0.1.08"; then
++ if test "$LIBUSB_VER" \< "0.1.08" && test "$LIBUSB_VER" != "0.1.10a"; then
+ { { echo "$as_me:$LINENO: error:
+ *** You need at least version 0.1.8 of the libusb library to build ptpcam.
+ *** Download and istall it from http://sourceforge.net/projects/libusb/ or
diff --git a/media-libs/libptp2/files/libptp2-1.1.0-parallel.patch b/media-libs/libptp2/files/libptp2-1.1.0-parallel.patch
new file mode 100644
index 000000000000..32ea925fdcae
--- /dev/null
+++ b/media-libs/libptp2/files/libptp2-1.1.0-parallel.patch
@@ -0,0 +1,64 @@
+--- libptp2-1.1.0.orig/src/Makefile.am 2006-01-07 19:38:52.000000000 -0200
++++ libptp2-1.1.0/src/Makefile.am 2006-01-07 20:00:01.000000000 -0200
+@@ -17,7 +17,7 @@
+ else
+ ptpcam_SOURCES = ptpcam.c ptpcam.h
+ endif
+-ptpcam_LDADD = -lptp2 @PTPCAM_LDFLAGS@
++ptpcam_LDADD = libptp2.la @PTPCAM_LDFLAGS@
+ ptpcam_DEPENDANCIES = libptp2.la
+ ptpcam_CFLAGS = @PTPCAM_CFLAGS@
+ endif
+--- libptp2-1.1.0.orig/src/Makefile.in 2006-01-07 19:38:52.000000000 -0200
++++ libptp2-1.1.0/src/Makefile.in 2006-01-07 20:00:48.000000000 -0200
+@@ -1,4 +1,4 @@
+-# Makefile.in generated by automake 1.9.5 from Makefile.am.
++# Makefile.in generated by automake 1.9.6 from Makefile.am.
+ # @configure_input@
+
+ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+@@ -16,8 +16,6 @@
+
+
+
+-SOURCES = $(libptp2_la_SOURCES) $(ptpcam_SOURCES)
+-
+ srcdir = @srcdir@
+ top_srcdir = @top_srcdir@
+ VPATH = @srcdir@
+@@ -45,8 +43,7 @@
+ DIST_COMMON = $(libptp2include_HEADERS) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in
+ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+-am__aclocal_m4_deps = $(top_srcdir)/m4/byteorder.m4 \
+- $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/configure.in
++am__aclocal_m4_deps = $(top_srcdir)/configure.in
+ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+ mkinstalldirs = $(install_sh) -d
+@@ -74,7 +71,7 @@
+ @LINUX_OS_TRUE@@PTPCAM_TRUE@ ptpcam-ptpcam.$(OBJEXT) \
+ @LINUX_OS_TRUE@@PTPCAM_TRUE@ ptpcam-myusb.$(OBJEXT)
+ ptpcam_OBJECTS = $(am_ptpcam_OBJECTS)
+-ptpcam_DEPENDENCIES =
++@PTPCAM_TRUE@ptpcam_DEPENDENCIES = libptp2.la
+ DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+ depcomp = $(SHELL) $(top_srcdir)/depcomp
+ am__depfiles_maybe = depfiles
+@@ -176,7 +173,6 @@
+ build_os = @build_os@
+ build_vendor = @build_vendor@
+ datadir = @datadir@
+-effective_target = @effective_target@
+ exec_prefix = @exec_prefix@
+ host = @host@
+ host_alias = @host_alias@
+@@ -207,7 +203,7 @@
+ DISTCLEANFILES = libptp-stdint.h libptp-endian.h
+ @LINUX_OS_FALSE@@PTPCAM_TRUE@ptpcam_SOURCES = ptpcam.c ptpcam.h
+ @LINUX_OS_TRUE@@PTPCAM_TRUE@ptpcam_SOURCES = ptpcam.c ptpcam.h myusb.c
+-@PTPCAM_TRUE@ptpcam_LDADD = -lptp2 @PTPCAM_LDFLAGS@
++@PTPCAM_TRUE@ptpcam_LDADD = libptp2.la @PTPCAM_LDFLAGS@
+ @PTPCAM_TRUE@ptpcam_DEPENDANCIES = libptp2.la
+ @PTPCAM_TRUE@ptpcam_CFLAGS = @PTPCAM_CFLAGS@
+ all: all-am
diff --git a/media-libs/libptp2/files/libptp2-1.1.10-configure.patch b/media-libs/libptp2/files/libptp2-1.1.10-configure.patch
new file mode 100644
index 000000000000..d8f1260f5e34
--- /dev/null
+++ b/media-libs/libptp2/files/libptp2-1.1.10-configure.patch
@@ -0,0 +1,46 @@
+--- libptp2-1.1.10/configure.in.orig 2007-12-28 10:28:36.000000000 +1100
++++ libptp2-1.1.10/configure.in 2007-12-28 10:36:14.000000000 +1100
+@@ -25,6 +25,10 @@
+
+ # Checks for programs.
+ AC_PROG_CC
++AC_PROG_INSTALL
++AC_PROG_LN_S
++AC_PROG_MAKE_SET
++AC_PROG_RANLIB
+
+ # turn on warnings for gcc
+ if test "$ac_cv_prog_gcc" = "yes"; then
+@@ -36,19 +40,29 @@
+
+ # Checks for header files.
+ AC_HEADER_STDC
+-AC_CHECK_HEADERS([libintl.h stdlib.h string.h])
++AC_CHECK_HEADERS([arpa/inet.h fcntl.h libintl.h stdint.h stdlib.h string.h sys/ioctl.h unistd.h utime.h])
+
+ # Checks for typedefs, structures, and compiler characteristics.
+ AC_C_CONST
+ AC_C_INLINE
++AC_TYPE_INT16_T
++AC_TYPE_INT32_T
++AC_TYPE_INT8_T
+ AC_STRUCT_TM
++AC_TYPE_UINT16_T
++AC_TYPE_UINT32_T
++AC_TYPE_UINT64_T
++AC_TYPE_UINT8_T
+
+ # Checks for library functions.
+-AC_FUNC_ERROR_AT_LINE
++AC_PROG_GCC_TRADITIONAL
+ AC_FUNC_MALLOC
+ AC_FUNC_MKTIME
++AC_FUNC_MMAP
++AC_TYPE_SIGNAL
++AC_FUNC_UTIME_NULL
+ AC_FUNC_VPRINTF
+-AC_CHECK_FUNCS([memset strchr strdup strtol getopt_long])
++AC_CHECK_FUNCS([memset munmap strdup strncasecmp strtol utime])
+
+ hostos=any
+ case $host in
diff --git a/media-libs/libptp2/files/libptp2-1.1.10-makefile.patch b/media-libs/libptp2/files/libptp2-1.1.10-makefile.patch
new file mode 100644
index 000000000000..0e7b5adec8fc
--- /dev/null
+++ b/media-libs/libptp2/files/libptp2-1.1.10-makefile.patch
@@ -0,0 +1,11 @@
+--- libptp2-1.1.10.orig/src/Makefile.am 2005-11-01 02:39:40.000000000 +1100
++++ libptp2-1.1.10/src/Makefile.am 2007-12-28 09:51:01.000000000 +1100
+@@ -17,7 +17,7 @@
+ else
+ ptpcam_SOURCES = ptpcam.c ptpcam.h
+ endif
+-ptpcam_LDADD = -lptp2 @PTPCAM_LDFLAGS@
++ptpcam_LDADD = libptp2.la @PTPCAM_LDFLAGS@
+ ptpcam_DEPENDANCIES = libptp2.la
+ ptpcam_CFLAGS = @PTPCAM_CFLAGS@
+ endif
diff --git a/media-libs/libptp2/libptp2-1.1.10.ebuild b/media-libs/libptp2/libptp2-1.1.10.ebuild
new file mode 100644
index 000000000000..e6ce29ddec0e
--- /dev/null
+++ b/media-libs/libptp2/libptp2-1.1.10.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit autotools eutils
+
+DESCRIPTION="Library and client for communicating with PTP enabled devices (e.g. digital photo cameras)"
+HOMEPAGE="http://sourceforge.net/projects/libptp/"
+SRC_URI="mirror://sourceforge/libptp/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86"
+IUSE=""
+
+RDEPEND="virtual/libusb:0"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-makefile.patch \
+ "${FILESDIR}"/${P}-configure.patch
+
+ AT_M4DIR="m4" eautoreconf
+}
+
+src_test() {
+ env LD_LIBRARY_PATH=./src/.libs/ ./src/ptpcam -l || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+}
diff --git a/media-libs/libptp2/metadata.xml b/media-libs/libptp2/metadata.xml
new file mode 100644
index 000000000000..5747aa45ff94
--- /dev/null
+++ b/media-libs/libptp2/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/>
+ <upstream>
+ <remote-id type="sourceforge">libptp</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libquicktime/Manifest b/media-libs/libquicktime/Manifest
new file mode 100644
index 000000000000..8f4f7515a953
--- /dev/null
+++ b/media-libs/libquicktime/Manifest
@@ -0,0 +1 @@
+DIST libquicktime-1.2.4.tar.gz 1028626 SHA256 1c53359c33b31347b4d7b00d3611463fe5e942cae3ec0fefe0d2fd413fd47368 SHA512 6ab6cd62ae2361bb3ad73725e9e8baa2b03361bc23e9e34b24f90c0e2bec4337de950ed7f30a6a1d2e67ab33e8f0c43538369fd07e417f54b84583a3c331f8dd WHIRLPOOL 8eda1c75d86d728157f4e4c9e07555dd8dfa2a6ad5fc37d022142111993610d8350e54d586fe1c6627402f22ce42a9b9505a3ffb909f9bb530b9ea0f71b6b192
diff --git a/media-libs/libquicktime/files/libquicktime-1.2.4+libav-9.patch b/media-libs/libquicktime/files/libquicktime-1.2.4+libav-9.patch
new file mode 100644
index 000000000000..99a4d39e501a
--- /dev/null
+++ b/media-libs/libquicktime/files/libquicktime-1.2.4+libav-9.patch
@@ -0,0 +1,12 @@
+Index: libquicktime-1.2.4/plugins/ffmpeg/ffmpeg.h
+===================================================================
+--- libquicktime-1.2.4.orig/plugins/ffmpeg/ffmpeg.h
++++ libquicktime-1.2.4/plugins/ffmpeg/ffmpeg.h
+@@ -27,6 +27,7 @@
+
+ #include <quicktime/qtprivate.h>
+ #include AVCODEC_HEADER
++#include <libavutil/mem.h>
+
+ void quicktime_init_video_codec_ffmpeg(quicktime_codec_t * codec,
+ quicktime_video_map_t *vtrack,
diff --git a/media-libs/libquicktime/files/libquicktime-1.2.4-ffmpeg2.patch b/media-libs/libquicktime/files/libquicktime-1.2.4-ffmpeg2.patch
new file mode 100644
index 000000000000..7add44220a2b
--- /dev/null
+++ b/media-libs/libquicktime/files/libquicktime-1.2.4-ffmpeg2.patch
@@ -0,0 +1,98 @@
+Extracted from upstream CVS.
+https://bugs.gentoo.org/show_bug.cgi?id=476498
+
+Index: libquicktime-1.2.4/plugins/ffmpeg/audio.c
+===================================================================
+--- libquicktime-1.2.4.orig/plugins/ffmpeg/audio.c
++++ libquicktime-1.2.4/plugins/ffmpeg/audio.c
+@@ -45,6 +45,11 @@
+ #define ENCODE_AUDIO 1
+ #endif
+
++#ifndef AVCODEC_MAX_AUDIO_FRAME_SIZE
++/* from libavcodec/avcodec.h dated Dec 23 2012 */
++#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio
++#endif
++
+ /* The following code was ported from gmerlin_avdecoder (http://gmerlin.sourceforge.net) */
+
+ /* MPEG Audio header parsing code */
+Index: libquicktime-1.2.4/plugins/ffmpeg/params.c
+===================================================================
+--- libquicktime-1.2.4.orig/plugins/ffmpeg/params.c
++++ libquicktime-1.2.4/plugins/ffmpeg/params.c
+@@ -101,6 +101,17 @@ typedef struct
+ } \
+ }
+
++#define PARAM_DICT_INT(name, dict_name) \
++ { \
++ if(!strcasecmp(name, key)) \
++ { \
++ char buf[128]; \
++ snprintf(buf, sizeof(buf), "%d", *(int*)value); \
++ av_dict_set(options, dict_name, buf, 0); \
++ found = 1; \
++ } \
++ }
++
+ #define PARAM_DICT_FLAG(name, dict_name) \
+ { \
+ if(!strcasecmp(name, key)) \
+@@ -202,8 +213,15 @@ void lqt_ffmpeg_set_parameter(AVCodecCon
+ PARAM_INT("ff_max_b_frames",max_b_frames);
+ PARAM_FLOAT("ff_b_quant_factor",b_quant_factor);
+ PARAM_INT("ff_b_frame_strategy",b_frame_strategy);
++
++#if LIBAVCODEC_VERSION_MAJOR >= 55
++ PARAM_DICT_INT("ff_luma_elim_threshold","luma_elim_threshold");
++ PARAM_DICT_INT("ff_chroma_elim_threshold","chroma_elim_threshold");
++#else
+ PARAM_INT("ff_luma_elim_threshold",luma_elim_threshold);
+ PARAM_INT("ff_chroma_elim_threshold",chroma_elim_threshold);
++#endif
++
+ PARAM_INT("ff_strict_std_compliance",strict_std_compliance);
+ PARAM_QP2LAMBDA("ff_b_quant_offset",b_quant_offset);
+ PARAM_INT("ff_rc_min_rate",rc_min_rate);
+@@ -241,8 +259,15 @@ void lqt_ffmpeg_set_parameter(AVCodecCon
+ PARAM_QP2LAMBDA("ff_lmax", lmax);
+ PARAM_INT("ff_noise_reduction",noise_reduction);
+ PARAM_INT_SCALE("ff_rc_initial_buffer_occupancy",rc_initial_buffer_occupancy,1000);
++
++#if LIBAVCODEC_VERSION_MAJOR >= 55
++ PARAM_DICT_INT("ff_inter_threshold","inter_threshold");
++ PARAM_DICT_INT("ff_quantizer_noise_shaping","quantizer_noise_shaping");
++#else
+ PARAM_INT("ff_inter_threshold",inter_threshold);
+ PARAM_INT("ff_quantizer_noise_shaping",quantizer_noise_shaping);
++#endif
++
+ PARAM_INT("ff_thread_count",thread_count);
+ PARAM_INT("ff_me_threshold",me_threshold);
+ PARAM_INT("ff_mb_threshold",mb_threshold);
+@@ -272,8 +297,16 @@ void lqt_ffmpeg_set_parameter(AVCodecCon
+ PARAM_FLAG("ff_flag_bitexact",CODEC_FLAG_BITEXACT);
+ PARAM_FLAG("ff_flag_ac_pred",CODEC_FLAG_AC_PRED);
+ // PARAM_FLAG("ff_flag_h263p_umv",CODEC_FLAG_H263P_UMV); // Unused
++
++#if LIBAVCODEC_VERSION_MAJOR >= 55
++ PARAM_DICT_FLAG("ff_flag_cbp_rd","cbp_rd");
++ PARAM_DICT_FLAG("ff_flag_qp_rd","qp_rd");
++ PARAM_DICT_FLAG("ff_flag2_strict_gop","strict_gop");
++#else
+ PARAM_FLAG("ff_flag_cbp_rd",CODEC_FLAG_CBP_RD);
+ PARAM_FLAG("ff_flag_qp_rd",CODEC_FLAG_QP_RD);
++ PARAM_FLAG2("ff_flag2_strict_gop",CODEC_FLAG2_STRICT_GOP);
++#endif
+
+ #if LIBAVCODEC_VERSION_MAJOR >= 54
+ PARAM_DICT_FLAG("ff_flag_h263p_aiv", "aiv");
+@@ -288,7 +321,6 @@ void lqt_ffmpeg_set_parameter(AVCodecCon
+ PARAM_FLAG("ff_flag_loop_filter",CODEC_FLAG_LOOP_FILTER);
+ PARAM_FLAG("ff_flag_closed_gop",CODEC_FLAG_CLOSED_GOP);
+ PARAM_FLAG2("ff_flag2_fast",CODEC_FLAG2_FAST);
+- PARAM_FLAG2("ff_flag2_strict_gop",CODEC_FLAG2_STRICT_GOP);
+ PARAM_ENUM("ff_coder_type",coder_type,coder_type);
+
+ }
diff --git a/media-libs/libquicktime/libquicktime-1.2.4-r1.ebuild b/media-libs/libquicktime/libquicktime-1.2.4-r1.ebuild
new file mode 100644
index 000000000000..ebfed851d06f
--- /dev/null
+++ b/media-libs/libquicktime/libquicktime-1.2.4-r1.ebuild
@@ -0,0 +1,115 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit libtool eutils multilib-minimal
+
+DESCRIPTION="An enhanced version of the quicktime4linux library"
+HOMEPAGE="http://libquicktime.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="aac alsa doc dv encode ffmpeg gtk jpeg lame cpu_flags_x86_mmx opengl png schroedinger static-libs vorbis X x264"
+
+RDEPEND=">=virtual/libintl-0-r1[${MULTILIB_USEDEP}]
+ aac? (
+ >=media-libs/faad2-2.7-r3[${MULTILIB_USEDEP}]
+ encode? ( >=media-libs/faac-1.28-r3[${MULTILIB_USEDEP}] )
+ )
+ alsa? ( >=media-libs/alsa-lib-1.0.20 )
+ dv? ( >=media-libs/libdv-1.0.0-r3[${MULTILIB_USEDEP}] )
+ ffmpeg? ( >=virtual/ffmpeg-9-r1[${MULTILIB_USEDEP}] )
+ gtk? ( x11-libs/gtk+:2 )
+ jpeg? ( >=virtual/jpeg-0-r2[${MULTILIB_USEDEP}] )
+ lame? ( >=media-sound/lame-3.99.5-r1[${MULTILIB_USEDEP}] )
+ opengl? ( virtual/opengl )
+ png? ( >=media-libs/libpng-1.6.10:0[${MULTILIB_USEDEP}] )
+ schroedinger? ( >=media-libs/schroedinger-1.0.11-r1[${MULTILIB_USEDEP}] )
+ vorbis? (
+ >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
+ >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}]
+ )
+ X? (
+ x11-libs/libX11
+ x11-libs/libXaw
+ x11-libs/libXext
+ x11-libs/libXt
+ x11-libs/libXv
+ )
+ x264? ( >=media-libs/x264-0.0.20130506[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
+ sys-devel/gettext
+ doc? ( app-doc/doxygen )
+ X? ( >=x11-proto/videoproto-2.3.1-r1[${MULTILIB_USEDEP}] )"
+
+REQUIRED_USE="opengl? ( X )"
+
+DOCS="ChangeLog README TODO"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}+libav-9.patch \
+ "${FILESDIR}"/${P}-ffmpeg2.patch
+
+ for FILE in lqt_ffmpeg.c video.c audio.c ; do
+ sed -i -e "s:CODEC_ID_:AV_&:g" "${S}/plugins/ffmpeg/${FILE}" || die
+ done
+
+ elibtoolize # Required for .so versioning on g/fbsd
+}
+
+multilib_src_configure() {
+ # utils use: alsa, opengl, gtk+, X
+
+ ECONF_SOURCE=${S} \
+ econf \
+ --enable-gpl \
+ $(use_enable static-libs static) \
+ $(use_enable cpu_flags_x86_mmx asm) \
+ $(multilib_native_use_with doc doxygen) \
+ $(use vorbis || echo --without-vorbis) \
+ $(use_with lame) \
+ $(multilib_native_use_with X x) \
+ $(multilib_native_use_with opengl) \
+ $(multilib_native_use_with alsa) \
+ $(multilib_native_use_with gtk) \
+ $(use_with dv libdv) \
+ $(use_with jpeg libjpeg) \
+ $(use_with ffmpeg) \
+ $(use_with png libpng) \
+ $(use_with schroedinger) \
+ $(use_with aac faac) \
+ $(use encode || echo --without-faac) \
+ $(use_with aac faad2) \
+ $(use_with x264) \
+ --without-cpuflags
+
+ if ! multilib_is_native_abi; then
+ # disable building utilities
+ sed -i -e '/SUBDIRS =/s:utils::' Makefile || die
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ prune_libtool_files --all
+
+ # Compatibility with software that uses quicktime prefix, but
+ # don't do that when building for Darwin/MacOS
+ [[ ${CHOST} != *-darwin* ]] && dosym /usr/include/lqt /usr/include/quicktime
+}
+
+pkg_preinst() {
+ if [[ -d /usr/include/quicktime && ! -L /usr/include/quicktime ]]; then
+ elog "For compatibility with other quicktime libraries, ${PN} was"
+ elog "going to create a /usr/include/quicktime symlink, but for some"
+ elog "reason that is a directory on your system."
+
+ elog "Please check that is empty, and remove it, or submit a bug"
+ elog "telling us which package owns the directory."
+ die "/usr/include/quicktime is a directory."
+ fi
+}
diff --git a/media-libs/libquicktime/libquicktime-1.2.4.ebuild b/media-libs/libquicktime/libquicktime-1.2.4.ebuild
new file mode 100644
index 000000000000..c2c47562a4f2
--- /dev/null
+++ b/media-libs/libquicktime/libquicktime-1.2.4.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit libtool eutils
+
+DESCRIPTION="An enchanced version of the quicktime4linux library"
+HOMEPAGE="http://libquicktime.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="aac alsa doc dv encode ffmpeg gtk jpeg lame cpu_flags_x86_mmx opengl png schroedinger static-libs vorbis X x264"
+
+RDEPEND="virtual/libintl
+ aac? (
+ media-libs/faad2
+ encode? ( media-libs/faac )
+ )
+ alsa? ( >=media-libs/alsa-lib-1.0.20 )
+ dv? ( media-libs/libdv )
+ ffmpeg? ( virtual/ffmpeg )
+ gtk? ( x11-libs/gtk+:2 )
+ jpeg? ( virtual/jpeg )
+ lame? ( media-sound/lame )
+ opengl? ( virtual/opengl )
+ png? ( media-libs/libpng:0 )
+ schroedinger? ( >=media-libs/schroedinger-1.0.10 )
+ vorbis? (
+ media-libs/libogg
+ media-libs/libvorbis
+ )
+ X? (
+ x11-libs/libX11
+ x11-libs/libXaw
+ x11-libs/libXext
+ x11-libs/libXt
+ x11-libs/libXv
+ )
+ x264? ( media-libs/x264 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ sys-devel/gettext
+ doc? ( app-doc/doxygen )
+ X? ( x11-proto/videoproto )"
+
+REQUIRED_USE="opengl? ( X )"
+
+DOCS="ChangeLog README TODO"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}+libav-9.patch \
+ "${FILESDIR}"/${P}-ffmpeg2.patch
+ elibtoolize # Required for .so versioning on g/fbsd
+}
+
+src_configure() {
+ econf \
+ --enable-gpl \
+ $(use_enable static-libs static) \
+ $(use_enable cpu_flags_x86_mmx asm) \
+ $(use_with doc doxygen) \
+ $(use vorbis || echo --without-vorbis) \
+ $(use_with lame) \
+ $(use_with X x) \
+ $(use_with opengl) \
+ $(use_with alsa) \
+ $(use_with gtk) \
+ $(use_with dv libdv) \
+ $(use_with jpeg libjpeg) \
+ $(use_with ffmpeg) \
+ $(use_with png libpng) \
+ $(use_with schroedinger) \
+ $(use_with aac faac) \
+ $(use encode || echo --without-faac) \
+ $(use_with aac faad2) \
+ $(use_with x264) \
+ --without-cpuflags
+}
+
+src_install() {
+ default
+ find "${ED}" -name '*.la' -exec rm -f {} +
+
+ # Compatibility with software that uses quicktime prefix, but
+ # don't do that when building for Darwin/MacOS
+ [[ ${CHOST} != *-darwin* ]] && dosym /usr/include/lqt /usr/include/quicktime
+}
+
+pkg_preinst() {
+ if [[ -d /usr/include/quicktime && ! -L /usr/include/quicktime ]]; then
+ elog "For compatibility with other quicktime libraries, ${PN} was"
+ elog "going to create a /usr/include/quicktime symlink, but for some"
+ elog "reason that is a directory on your system."
+
+ elog "Please check that is empty, and remove it, or submit a bug"
+ elog "telling us which package owns the directory."
+ die "/usr/include/quicktime is a directory."
+ fi
+}
diff --git a/media-libs/libquicktime/metadata.xml b/media-libs/libquicktime/metadata.xml
new file mode 100644
index 000000000000..b161cd86186b
--- /dev/null
+++ b/media-libs/libquicktime/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="schroedinger">Enable Dirac video support (an advanced royalty-free video compression format) via libschroedinger (high-speed implementation in C of the Dirac codec)</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">libquicktime</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libquvi-scripts/Manifest b/media-libs/libquvi-scripts/Manifest
new file mode 100644
index 000000000000..add93864712a
--- /dev/null
+++ b/media-libs/libquvi-scripts/Manifest
@@ -0,0 +1,7 @@
+DIST libquvi-scripts-0.4.14.tar.xz 114996 SHA256 b8d17d53895685031cd271cf23e33b545ad38cad1c3bddcf7784571382674c65 SHA512 2e01e85779a314ee92ae302992fecf8ec2b6702d7dc809f1595a409df48da4d815ad395acbf8fc8bbdd33fdf5c2cb1dd534a69ae5bcbcb9f4b21c85cd3807243 WHIRLPOOL 148d79a10ee2a3ade252e7a77a69959940d582c0cc935015d55e914a3ec01acad8c8b07acb0668944bdfaa585c03a2c37e1e0a2d92f4796e6d8f6ee12fa577b6
+DIST libquvi-scripts-0.4.19.tar.xz 118220 SHA256 0681fc601175129f7ff4f87a2f8c76520fc59fb6cdf9572f8a24ed621e47d50f SHA512 bd8e90c811474f9d878255675505e4cb2b6bc1a47e2d566ffb57e65025447d323b60c4c9d13903e2f74276a26b5b6678e8bf9899c96dd1b29308a9794a2857dc WHIRLPOOL 46b45cca25a914dfc18e30651e024e515170d313920c4f9086c7da0478fb5b54cb050aa751b25ead10636f226c5bd3333bf61c6b86942ce64c6957d24696a4cb
+DIST libquvi-scripts-0.4.20.tar.xz 118812 SHA256 7445d5535df4a30ecda9ef1648843e54c7309b3b20a7d8d06596f6035d03bb66 SHA512 a50bff8b4ac2923de18083133efc8b36b356c17d058d7ea65b00d0b1c5fe3d875208b00b4fa7e1f900336ee2921cb55d29b0c30b61f328174495af2c4ea72942 WHIRLPOOL ee9a568c9de0405fd91380fd88cf79187efc2bc148a1d154448693ec9e36b35dba742215202a90a31ac10a5a11c6cdb657fa44ea53a9f7b950f1d0c72fa0c7a7
+DIST libquvi-scripts-0.4.21.tar.xz 121072 SHA256 7c02cc86ac25334892d08bbc31251d78a55ee2a16d57dfa2bda7ac657c8e0f34 SHA512 83a8ba10f688ceb57f37cae871dd71c0173b64f20dda4852b90a413665182aedf88e84ccd57a0f9ffee691760323e38c371aba5787fba17201847d4247c3616e WHIRLPOOL 7c48a6f06f48e216b84705d693b01d81853090b55167e3b4e216c3a3357edc835b661eb8e8ae3f5da6b8a330814fb3e694ed5c3ec910f92c7fbbccdc526b1053
+DIST libquvi-scripts-0.9.20130903.tar.xz 306148 SHA256 41036a3c9c8ab64db33ffe2904df85fb55adea3eae605abe9e626403a398c201 SHA512 32212e6305d70714c17ba27fe52fa51e3835de51d84a9f82b7b6d0c9f2f6d41c6f753699f15c487a7a82e2bdebcb967c1d55ec4c897245cc8b62de427cbc1cd9 WHIRLPOOL 189f10d82565b65881bb2769c44002c8982b874086d7566387374d6ed4a0aebb21e1bcc9d0851df20d64a50952994af631d6e97474b3706d67170b855e07de30
+DIST libquvi-scripts-0.9.20131104.tar.xz 318844 SHA256 b3b2e882b00c85c71cffd7c335042df3384c8942e4512fa3aa85ca653b7e2990 SHA512 48b3cc1e4d0c9e58110333807a3542d5d8f95d3ca1cf512fec850cf491e37fd1c4808ca0f5c88ca73b958ca46859f2e3f39a9173225de23acf76f09b876926dd WHIRLPOOL ef25eaee2dcd5d47f6b5c1b7129f7f01baa72546a2bf74723ad9ef089d7e525b75565a5191cef620d518ea4bbf059cf653c95fd1b2fc1cf9dbb333c009d3bbb2
+DIST libquvi-scripts-0.9.20131130.tar.xz 322080 SHA256 17f21f9fac10cf60af2741f2c86a8ffd8007aa334d1eb78ff6ece130cb3777e3 SHA512 97de4cead30dc181da700cbf3a0ad66ee709fef17f449f75cd43e0376a4aa53c7b2174188130aaa34dcc7ddc578581111f3655cb10f4b0c92df2f75d32c72a02 WHIRLPOOL c73e1ab42b85dd05f16d2b37fe14ecbb04103522b0fb5596deb5ad864cf72967e625e4f8bece8b32a9fbfb95323b60f2b4df1c508a5bf1f1dd8c3eb98c218609
diff --git a/media-libs/libquvi-scripts/libquvi-scripts-0.4.14.ebuild b/media-libs/libquvi-scripts/libquvi-scripts-0.4.14.ebuild
new file mode 100644
index 000000000000..17c4bc528820
--- /dev/null
+++ b/media-libs/libquvi-scripts/libquvi-scripts-0.4.14.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Embedded lua scripts for libquvi"
+HOMEPAGE="http://quvi.sourceforge.net/"
+SRC_URI="mirror://sourceforge/quvi/${PV:0:3}/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm hppa ia64 ppc ppc64 sparc x86"
+IUSE="offensive"
+
+DEPEND="app-arch/xz-utils"
+
+# tests fetch data from live websites, so it's rather normal that they
+# will fail
+RESTRICT="test"
+
+src_configure() {
+ econf \
+ --with-manual \
+ $(use_with offensive nsfw)
+}
diff --git a/media-libs/libquvi-scripts/libquvi-scripts-0.4.19.ebuild b/media-libs/libquvi-scripts/libquvi-scripts-0.4.19.ebuild
new file mode 100644
index 000000000000..a554564b0c44
--- /dev/null
+++ b/media-libs/libquvi-scripts/libquvi-scripts-0.4.19.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Embedded lua scripts for libquvi"
+HOMEPAGE="http://quvi.sourceforge.net/"
+SRC_URI="mirror://sourceforge/quvi/${PV:0:3}/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="offensive"
+
+DEPEND="app-arch/xz-utils"
+
+# tests fetch data from live websites, so it's rather normal that they
+# will fail
+RESTRICT="test"
+
+src_configure() {
+ econf \
+ --with-manual \
+ $(use_with offensive nsfw)
+}
diff --git a/media-libs/libquvi-scripts/libquvi-scripts-0.4.20.ebuild b/media-libs/libquvi-scripts/libquvi-scripts-0.4.20.ebuild
new file mode 100644
index 000000000000..a554564b0c44
--- /dev/null
+++ b/media-libs/libquvi-scripts/libquvi-scripts-0.4.20.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Embedded lua scripts for libquvi"
+HOMEPAGE="http://quvi.sourceforge.net/"
+SRC_URI="mirror://sourceforge/quvi/${PV:0:3}/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="offensive"
+
+DEPEND="app-arch/xz-utils"
+
+# tests fetch data from live websites, so it's rather normal that they
+# will fail
+RESTRICT="test"
+
+src_configure() {
+ econf \
+ --with-manual \
+ $(use_with offensive nsfw)
+}
diff --git a/media-libs/libquvi-scripts/libquvi-scripts-0.4.21-r1.ebuild b/media-libs/libquvi-scripts/libquvi-scripts-0.4.21-r1.ebuild
new file mode 100644
index 000000000000..7b6d3044a01b
--- /dev/null
+++ b/media-libs/libquvi-scripts/libquvi-scripts-0.4.21-r1.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Embedded lua scripts for libquvi"
+HOMEPAGE="http://quvi.sourceforge.net/"
+SRC_URI="mirror://sourceforge/quvi/${PV:0:3}/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0.4"
+KEYWORDS="~alpha amd64 ~arm hppa ~ia64 ~ppc ~ppc64 ~sparc x86"
+IUSE="offensive"
+
+DEPEND="app-arch/xz-utils"
+RDEPEND="!=media-libs/libquvi-scripts-0.4*:0"
+
+# tests fetch data from live websites, so it's rather normal that they
+# will fail
+RESTRICT="test"
+
+src_configure() {
+ econf \
+ --without-manual \
+ $(use_with offensive nsfw)
+}
diff --git a/media-libs/libquvi-scripts/libquvi-scripts-0.4.21-r2.ebuild b/media-libs/libquvi-scripts/libquvi-scripts-0.4.21-r2.ebuild
new file mode 100644
index 000000000000..fe70d479980b
--- /dev/null
+++ b/media-libs/libquvi-scripts/libquvi-scripts-0.4.21-r2.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit multilib-minimal
+
+DESCRIPTION="Embedded lua scripts for libquvi"
+HOMEPAGE="http://quvi.sourceforge.net/"
+SRC_URI="mirror://sourceforge/quvi/${PV:0:3}/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0.4"
+KEYWORDS="~alpha amd64 arm hppa ia64 ppc ppc64 sparc x86"
+IUSE="offensive"
+
+DEPEND="app-arch/xz-utils"
+RDEPEND="!=media-libs/libquvi-scripts-0.4*:0"
+
+# tests fetch data from live websites, so it's rather normal that they
+# will fail
+RESTRICT="test"
+
+multilib_src_configure() {
+ ECONF_SOURCE=${S} \
+ econf \
+ --without-manual \
+ $(use_with offensive nsfw)
+}
diff --git a/media-libs/libquvi-scripts/libquvi-scripts-0.4.21.ebuild b/media-libs/libquvi-scripts/libquvi-scripts-0.4.21.ebuild
new file mode 100644
index 000000000000..a554564b0c44
--- /dev/null
+++ b/media-libs/libquvi-scripts/libquvi-scripts-0.4.21.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Embedded lua scripts for libquvi"
+HOMEPAGE="http://quvi.sourceforge.net/"
+SRC_URI="mirror://sourceforge/quvi/${PV:0:3}/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="offensive"
+
+DEPEND="app-arch/xz-utils"
+
+# tests fetch data from live websites, so it's rather normal that they
+# will fail
+RESTRICT="test"
+
+src_configure() {
+ econf \
+ --with-manual \
+ $(use_with offensive nsfw)
+}
diff --git a/media-libs/libquvi-scripts/libquvi-scripts-0.9.20130903.ebuild b/media-libs/libquvi-scripts/libquvi-scripts-0.9.20130903.ebuild
new file mode 100644
index 000000000000..c5d90ea35ee2
--- /dev/null
+++ b/media-libs/libquvi-scripts/libquvi-scripts-0.9.20130903.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Embedded lua scripts for libquvi"
+HOMEPAGE="http://quvi.sourceforge.net/"
+SRC_URI="mirror://sourceforge/quvi/${P}.tar.xz"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="offensive"
+
+RDEPEND=">=dev-lua/LuaBitOp-1.0.1
+ >=dev-lua/luaexpat-1.2.0
+ >=dev-lua/luajson-1.1.1
+ >=dev-lua/luasocket-2.0.2"
+DEPEND="app-arch/xz-utils
+ virtual/pkgconfig"
+
+# tests fetch data from live websites
+RESTRICT="test"
+
+src_configure() {
+ econf \
+ $(use_with offensive nsfw) \
+ --with-manual
+}
diff --git a/media-libs/libquvi-scripts/libquvi-scripts-0.9.20131104.ebuild b/media-libs/libquvi-scripts/libquvi-scripts-0.9.20131104.ebuild
new file mode 100644
index 000000000000..c5d90ea35ee2
--- /dev/null
+++ b/media-libs/libquvi-scripts/libquvi-scripts-0.9.20131104.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Embedded lua scripts for libquvi"
+HOMEPAGE="http://quvi.sourceforge.net/"
+SRC_URI="mirror://sourceforge/quvi/${P}.tar.xz"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="offensive"
+
+RDEPEND=">=dev-lua/LuaBitOp-1.0.1
+ >=dev-lua/luaexpat-1.2.0
+ >=dev-lua/luajson-1.1.1
+ >=dev-lua/luasocket-2.0.2"
+DEPEND="app-arch/xz-utils
+ virtual/pkgconfig"
+
+# tests fetch data from live websites
+RESTRICT="test"
+
+src_configure() {
+ econf \
+ $(use_with offensive nsfw) \
+ --with-manual
+}
diff --git a/media-libs/libquvi-scripts/libquvi-scripts-0.9.20131130-r1.ebuild b/media-libs/libquvi-scripts/libquvi-scripts-0.9.20131130-r1.ebuild
new file mode 100644
index 000000000000..59f802af3161
--- /dev/null
+++ b/media-libs/libquvi-scripts/libquvi-scripts-0.9.20131130-r1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# note: if pkg-config lands in /usr/share, multilib-build with Lua module
+# RDEPs will be enough.
+inherit multilib-minimal
+
+DESCRIPTION="Embedded lua scripts for libquvi"
+HOMEPAGE="http://quvi.sourceforge.net/"
+SRC_URI="mirror://sourceforge/quvi/${P}.tar.xz"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="amd64 ~arm hppa ~mips ppc ppc64 sparc x86"
+IUSE="offensive"
+
+RDEPEND=">=dev-lua/LuaBitOp-1.0.1-r1[${MULTILIB_USEDEP}]
+ >=dev-lua/luaexpat-1.3.0-r1[${MULTILIB_USEDEP}]
+ >=dev-lua/luajson-1.1.1
+ >=dev-lua/luasocket-3.0_rc1-r2[${MULTILIB_USEDEP}]"
+DEPEND="app-arch/xz-utils
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]"
+
+# tests fetch data from live websites
+RESTRICT="test"
+
+multilib_src_configure() {
+ ECONF_SOURCE=${S} \
+ econf \
+ $(use_with offensive nsfw) \
+ --with-manual
+}
diff --git a/media-libs/libquvi-scripts/libquvi-scripts-0.9.20131130.ebuild b/media-libs/libquvi-scripts/libquvi-scripts-0.9.20131130.ebuild
new file mode 100644
index 000000000000..05b81ab72efe
--- /dev/null
+++ b/media-libs/libquvi-scripts/libquvi-scripts-0.9.20131130.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Embedded lua scripts for libquvi"
+HOMEPAGE="http://quvi.sourceforge.net/"
+SRC_URI="mirror://sourceforge/quvi/${P}.tar.xz"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~hppa ~mips x86"
+IUSE="offensive"
+
+RDEPEND=">=dev-lua/LuaBitOp-1.0.1
+ >=dev-lua/luaexpat-1.2.0
+ >=dev-lua/luajson-1.1.1
+ >=dev-lua/luasocket-2.0.2"
+DEPEND="app-arch/xz-utils
+ virtual/pkgconfig"
+
+# tests fetch data from live websites
+RESTRICT="test"
+
+src_configure() {
+ econf \
+ $(use_with offensive nsfw) \
+ --with-manual
+}
diff --git a/media-libs/libquvi-scripts/metadata.xml b/media-libs/libquvi-scripts/metadata.xml
new file mode 100644
index 000000000000..7c06664547ca
--- /dev/null
+++ b/media-libs/libquvi-scripts/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">quvi</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libquvi/Manifest b/media-libs/libquvi/Manifest
new file mode 100644
index 000000000000..86918447e4a0
--- /dev/null
+++ b/media-libs/libquvi/Manifest
@@ -0,0 +1,3 @@
+DIST libquvi-0.4.1.tar.xz 262740 SHA256 b5862f7e5fa6ed7defd169adb5c7586c6406af86e029671fd09615f6eb7aa903 SHA512 a16b144651a3c7d7cf0a6b8d111fe9822e3d37531f82a2406b9ae5c32fd401301e7a281081be81857c9146d0af2fb4b53026248b2cb49929b36480596a6724dd WHIRLPOOL 4bacf19402c1ae3f5a4dd72e2e2c1170308da9f5fc4888dfc574171a08f8ebe131f532c94a2828c9f9b60d5db876795dfe1c522fe2b0b171f37f35a325dafc2d
+DIST libquvi-0.9.3.tar.xz 372012 SHA256 894182cbc8858bf4dc5ae3f56661967a12d5677a931679730df1fa533af6187b SHA512 3d80ad117a1698dbef49bd510a0d5686fb7562a895f0ba1897a28dbad4237f0249d3db65f3a497f297ba3f4c6084dde71a95b4eb65990e7a063df9d51c34bf26 WHIRLPOOL 82c572b2e0d4142605b832b2f40f12a4c5ed56716239905dfef9fdcec176ba3c399eb7b6314fe4f18cb4d5f3337231c868c83c99890a419f7a2cac46f763ae57
+DIST libquvi-0.9.4.tar.xz 373172 SHA256 2d3fe28954a68ed97587e7b920ada5095c450105e993ceade85606dadf9a81b2 SHA512 287015e370e7b7f98f0f4c3717f5b044c8fcfb8b823c7988cd248e56b5fbbfa1a1aa421fbdafb38d727b79495267ccd4dead71587052117db53f29236268b651 WHIRLPOOL bc7d486a6504c285491413216166dd5063d3a98dea46fa947d2f2ebc2a62a0f6f88295c01cdc93159557d33d7c9b739640d3df3daa137d9056cb2728d90e4d84
diff --git a/media-libs/libquvi/files/libquvi-0.9.1-headers-reinstall.patch b/media-libs/libquvi/files/libquvi-0.9.1-headers-reinstall.patch
new file mode 100644
index 000000000000..d8412875819c
--- /dev/null
+++ b/media-libs/libquvi/files/libquvi-0.9.1-headers-reinstall.patch
@@ -0,0 +1,15 @@
+--- libquvi-0.9.1/src/quvi-0.9/quvi/Makefile.am
++++ libquvi-0.9.1/src/quvi-0.9/quvi/Makefile.am
+@@ -16,12 +16,4 @@
+ qsupp.h\
+ qversion.h
+
+-install-data-local:
+- @if test -f $(libquvisubincludedir)/qfunc.h ; then \
+- echo "** Old headers found in $(libquvisubincludedir). You should" ; \
+- echo "** remove the contents of this directory and type 'make " ; \
+- echo "** install' again." ; \
+- false ; \
+- fi
+-
+ # vim: set ts=2 sw=2 tw=72 expandtab:
diff --git a/media-libs/libquvi/libquvi-0.4.1-r1.ebuild b/media-libs/libquvi/libquvi-0.4.1-r1.ebuild
new file mode 100644
index 000000000000..ddae94959f48
--- /dev/null
+++ b/media-libs/libquvi/libquvi-0.4.1-r1.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 autotools-utils
+
+DESCRIPTION="Library for parsing video download links"
+HOMEPAGE="http://quvi.sourceforge.net/"
+SRC_URI="mirror://sourceforge/quvi/${PV:0:3}/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0.4"
+KEYWORDS="~alpha amd64 ~arm hppa ~ia64 ~ppc ~ppc64 ~sparc x86"
+IUSE="examples static-libs"
+
+RDEPEND=">=net-misc/curl-7.18.2
+ !<media-libs/quvi-0.4.0
+ >=media-libs/libquvi-scripts-0.4.0:0.4
+ >=dev-lang/lua-5.1[deprecated]
+ !=media-libs/libquvi-0.4*:0"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig"
+
+DOCS=( AUTHORS ChangeLog NEWS README )
+
+src_configure() {
+ local myeconfargs=(
+ --without-manual
+ )
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+
+ if use examples ; then
+ docinto examples
+ dodoc examples/*.{c,h}
+ fi
+}
diff --git a/media-libs/libquvi/libquvi-0.4.1-r2.ebuild b/media-libs/libquvi/libquvi-0.4.1-r2.ebuild
new file mode 100644
index 000000000000..7fd3b5685504
--- /dev/null
+++ b/media-libs/libquvi/libquvi-0.4.1-r2.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 autotools-utils multilib-minimal
+
+DESCRIPTION="Library for parsing video download links"
+HOMEPAGE="http://quvi.sourceforge.net/"
+SRC_URI="mirror://sourceforge/quvi/${PV:0:3}/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0.4"
+KEYWORDS="~alpha amd64 arm hppa ia64 ppc ppc64 sparc x86"
+IUSE="examples static-libs"
+
+RDEPEND=">=net-misc/curl-7.36.0[${MULTILIB_USEDEP}]
+ !<media-libs/quvi-0.4.0
+ >=media-libs/libquvi-scripts-0.4.21-r1:0.4[${MULTILIB_USEDEP}]
+ >=dev-lang/lua-5.1.5-r3[deprecated,${MULTILIB_USEDEP}]
+ !=media-libs/libquvi-0.4*:0"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig"
+
+DOCS=( AUTHORS ChangeLog NEWS README )
+
+multilib_src_configure() {
+ local myeconfargs=(
+ --without-manual
+ )
+ autotools-utils_src_configure
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ prune_libtool_files
+
+ if use examples ; then
+ docinto examples
+ dodoc examples/*.{c,h}
+ fi
+}
diff --git a/media-libs/libquvi/libquvi-0.4.1.ebuild b/media-libs/libquvi/libquvi-0.4.1.ebuild
new file mode 100644
index 000000000000..6f2f44dd532d
--- /dev/null
+++ b/media-libs/libquvi/libquvi-0.4.1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools-utils
+
+DESCRIPTION="Library for parsing video download links"
+HOMEPAGE="http://quvi.sourceforge.net/"
+SRC_URI="mirror://sourceforge/quvi/${PV:0:3}/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm hppa ia64 ~mips ppc ppc64 sparc x86"
+IUSE="examples static-libs"
+
+RDEPEND=">=net-misc/curl-7.18.2
+ !<media-libs/quvi-0.4.0
+ >=media-libs/libquvi-scripts-0.4.0
+ >=dev-lang/lua-5.1[deprecated]"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig"
+
+DOCS=( AUTHORS ChangeLog NEWS README )
+
+src_configure() {
+ local myeconfargs=(
+ --with-manual
+ )
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+
+ if use examples ; then
+ docinto examples
+ dodoc examples/*.{c,h}
+ fi
+}
diff --git a/media-libs/libquvi/libquvi-0.9.3.ebuild b/media-libs/libquvi/libquvi-0.9.3.ebuild
new file mode 100644
index 000000000000..cba3c2fbfc28
--- /dev/null
+++ b/media-libs/libquvi/libquvi-0.9.3.ebuild
@@ -0,0 +1,45 @@
+# 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
+
+DESCRIPTION="Library for parsing video download links"
+HOMEPAGE="http://quvi.sourceforge.net/"
+SRC_URI="mirror://sourceforge/quvi/${PV:0:3}/${P}.tar.xz"
+
+LICENSE="AGPL-3"
+SLOT="0/8" # subslot = libquvi soname version
+KEYWORDS="~amd64 ~x86"
+IUSE="examples nls static-libs"
+
+RDEPEND="!<media-libs/quvi-0.4.0
+ >=dev-libs/glib-2.24.2:2
+ >=dev-libs/libgcrypt-1.4.5:0=
+ >=media-libs/libquvi-scripts-0.9
+ >=net-libs/libproxy-0.3.1
+ >=net-misc/curl-7.21.0
+ >=dev-lang/lua-5.1[deprecated]
+ nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )"
+
+PATCHES=( "${FILESDIR}"/${PN}-0.9.1-headers-reinstall.patch )
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable nls)
+ --with-manual
+ )
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+ use examples && dodoc -r examples
+}
diff --git a/media-libs/libquvi/libquvi-0.9.4-r1.ebuild b/media-libs/libquvi/libquvi-0.9.4-r1.ebuild
new file mode 100644
index 000000000000..4fa998d25878
--- /dev/null
+++ b/media-libs/libquvi/libquvi-0.9.4-r1.ebuild
@@ -0,0 +1,47 @@
+# 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 multilib-minimal
+
+DESCRIPTION="Library for parsing video download links"
+HOMEPAGE="http://quvi.sourceforge.net/"
+SRC_URI="mirror://sourceforge/quvi/${PV:0:3}/${P}.tar.xz"
+
+LICENSE="AGPL-3"
+SLOT="0/8" # subslot = libquvi soname version
+KEYWORDS="amd64 ~arm hppa ppc ppc64 sparc x86"
+IUSE="examples nls static-libs"
+
+RDEPEND="!<media-libs/quvi-0.4.0
+ >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}]
+ >=dev-libs/libgcrypt-1.5.3:0=[${MULTILIB_USEDEP}]
+ >=media-libs/libquvi-scripts-0.9.20130903[${MULTILIB_USEDEP}]
+ >=net-libs/libproxy-0.4.11-r1[${MULTILIB_USEDEP}]
+ >=net-misc/curl-7.36.0[${MULTILIB_USEDEP}]
+ >=dev-lang/lua-5.1.5-r3[deprecated,${MULTILIB_USEDEP}]
+ nls? ( >=virtual/libintl-0-r1[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
+ nls? ( sys-devel/gettext )"
+
+PATCHES=( "${FILESDIR}"/${PN}-0.9.1-headers-reinstall.patch )
+
+multilib_src_configure() {
+ local myeconfargs=(
+ $(use_enable nls)
+ --with-manual
+ )
+ autotools-utils_src_configure
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ prune_libtool_files
+
+ use examples && dodoc -r examples
+}
diff --git a/media-libs/libquvi/libquvi-0.9.4.ebuild b/media-libs/libquvi/libquvi-0.9.4.ebuild
new file mode 100644
index 000000000000..90fb6dd36e5c
--- /dev/null
+++ b/media-libs/libquvi/libquvi-0.9.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
+AUTOTOOLS_AUTORECONF=1
+
+inherit autotools-utils
+
+DESCRIPTION="Library for parsing video download links"
+HOMEPAGE="http://quvi.sourceforge.net/"
+SRC_URI="mirror://sourceforge/quvi/${PV:0:3}/${P}.tar.xz"
+
+LICENSE="AGPL-3"
+SLOT="0/8" # subslot = libquvi soname version
+KEYWORDS="amd64 ~arm ~hppa x86"
+IUSE="examples nls static-libs"
+
+RDEPEND="!<media-libs/quvi-0.4.0
+ >=dev-libs/glib-2.24.2:2
+ >=dev-libs/libgcrypt-1.4.5:0=
+ >=media-libs/libquvi-scripts-0.9
+ >=net-libs/libproxy-0.3.1
+ >=net-misc/curl-7.21.0
+ >=dev-lang/lua-5.1[deprecated]
+ nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )"
+
+PATCHES=( "${FILESDIR}"/${PN}-0.9.1-headers-reinstall.patch )
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable nls)
+ --with-manual
+ )
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+ use examples && dodoc -r examples
+}
diff --git a/media-libs/libquvi/metadata.xml b/media-libs/libquvi/metadata.xml
new file mode 100644
index 000000000000..7c06664547ca
--- /dev/null
+++ b/media-libs/libquvi/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">quvi</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libraw/Manifest b/media-libs/libraw/Manifest
new file mode 100644
index 000000000000..305fa3d32d6d
--- /dev/null
+++ b/media-libs/libraw/Manifest
@@ -0,0 +1,9 @@
+DIST LibRaw-0.16.0.tar.gz 1472935 SHA256 71f43871ec2535345c5c9b748f07813e49915170f9510b721a2be6478426cf96 SHA512 192e0e78e8f32235618007d6917f92153e7cb8a2d83ca0933f21d4fce3d550c507f5410ba18d86b0f0a16b0ac81ba8cc4cf788fa217080507ac0b3c39e51a9ef WHIRLPOOL 0a74ea969ba77f1b9509c5a576a05c1fb50aabc1f1650e25e84b023bbd56581b1b16024e138a2587fe1210c34b086a66d69c77ee13163ca43bb4310c6ca2b4be
+DIST LibRaw-0.16.2.tar.gz 1476575 SHA256 6344e355f7c23f13e266844b36265d5f624237ba5a62dc901c7b91b510a84187 SHA512 c8fa974b72c1e2d255254527ca241a059b9a2e0943044c1b3c85257f987d451305fe94b4b901e9efd90ebab71ff602d442686a710c205d51862e88b2dfd13855 WHIRLPOOL 94f5fa4eb100a478d965516dd3c9048ca47bc0253bfd0482ebe3f410269e863a0f484c18bd2e07d44c324dbdbd84c1fd1768466b2b23e6909bc7d534f2a1f9fe
+DIST LibRaw-0.17.0-Beta2.tar.gz 1426119 SHA256 6acb8fdc9eeb526297c913636d86ebcd2b3066d0cbee1eecface081c6cea50f1 SHA512 17e3436ad65c2fe3b748bdb95c3974981702a07f42f8457aa1042b911b400ac29f89e490d84e1da577cf5cb8e1944fbc3e11e31767dc196a3a392f681a417046 WHIRLPOOL 6b705c248707c45a541d78b79665f798095d8f610a328c116792f311c1057be8434cf04cb3ad3e6343092589165070602cc1ec4e1cf9115121ee4dc0989f8488
+DIST LibRaw-demosaic-pack-GPL2-0.16.0.tar.gz 31663 SHA256 749d49694ce729166ec7a1faf7580780687ef190c756931bb075455ee8ed6697 SHA512 807063cfe292f19a0f7f7c2be532983843480ed43768f97753aa474bd64335989b1816b370fb43b3be2e265b5fa9ab9a27639b3cfc9919e81311b1d260f09d03 WHIRLPOOL ae1ec29b74a7a67ad1bd12dd3b9a4c5f26a97cb5483b975e3f0acdba0caafa809fbb5209a0289520558d611e5b1e7fe54806898f0d94b26c285862cac2257bae
+DIST LibRaw-demosaic-pack-GPL2-0.16.2.tar.gz 32652 SHA256 2218f08d59866e7852938356c197b96a6f47d0b9221a261280e010540477e77b SHA512 e41574f48bd3cda5755503b2693859de47b98064611771b9d950a198ad8f197c929c959de18599033c91fc7200d883074900e74ab154a4354d198af98a460903 WHIRLPOOL 56db7577a9a77347ea1f14a52e02925ef6191de1b1a98d7b870bf9e2fb49ffa460255ae5c662f01ef138346d23720333976d5029ddf91ccd99c13ba8cda260c3
+DIST LibRaw-demosaic-pack-GPL2-0.17.0-Beta2.tar.gz 30138 SHA256 e27783b80cea45f6173102c995481a6f9762f118b818bc9127024bc2d81aeae8 SHA512 269b726a40f1fbc955677c43d11d697bd0b1b73bd8b992cf4021b568e74d03999223ae19807f922433ce1b7a9c2941b3b855061c172da541028d379d58b400af WHIRLPOOL e97bfb986f381bdfcbaff33f19f5f3e4cafb9004004f7892a3076c2668db2686d5ec7c2dd4e36b6012d876d042bd2ceccbae79062b993a7586a20f3a57564cb7
+DIST LibRaw-demosaic-pack-GPL3-0.16.0.tar.gz 38791 SHA256 f2e904f9baa7d173b5ade163c795f26e110255a758e31bd213086a5a61500b5c SHA512 c01b9dfc6fec2a85cbab0bf2b45a7de93e378bc1fd1e15381f8ce9ed27423da0f5230568143d87d442b137d0d2f4e20241fe7084274b1c40c515086e0425bcc8 WHIRLPOOL 62d7ee33e406d6bf32aa28b424e717fa37d892603396cbada95449e1e834253390c76a8f273ddd3dd8d54f4a2517e186ef33db8abe5f3d3aae64d475fd8625ae
+DIST LibRaw-demosaic-pack-GPL3-0.16.2.tar.gz 39457 SHA256 749b5baa3a4f1f5c4ea4169b9293b02b0d2a0714aa01729327f23f82621c9735 SHA512 1cc1ea98f544ac485a797718448e138d3aeab7d4bfce77706161b42ec1edf265e177437ecff2a58c452048102359088a326b0bb4aa63b3d79e76c6156c9374d2 WHIRLPOOL 470a3a673671af6057e4baf268e63742192c3cce88a7dd1cdf7b793d51da2dcf641a6c9b11059b13d82507ab726355c84635eb926a634822b344454ba40e5e65
+DIST LibRaw-demosaic-pack-GPL3-0.17.0-Beta2.tar.gz 38634 SHA256 ed66f45cb58c4e2ebb2cec79b6a689eebd4e2c620b2db7493c8123b46d982030 SHA512 a0ce5bb0ff71b36699303af7dc38ca517604fc04ae7bf3bc4843e7cf02e715147f5bab9719690919882940d7e1f974022dc4784a7ac9e0894263723a307ce7c2 WHIRLPOOL f2259797132facbe03fb01805c69691be2129306641ae3af73b348a11a647dbf1ff41c02afc71b2188e8fefca1b19dd3420a5daa7aa01395873f7f2a5d933f01
diff --git a/media-libs/libraw/files/libraw-0.16.0-pc.patch b/media-libs/libraw/files/libraw-0.16.0-pc.patch
new file mode 100644
index 000000000000..cdf6e0f7130b
--- /dev/null
+++ b/media-libs/libraw/files/libraw-0.16.0-pc.patch
@@ -0,0 +1,36 @@
+diff -ruN LibRaw-0.16.0.orig/cmake/data/libraw.pc.cmake LibRaw-0.16.0/cmake/data/libraw.pc.cmake
+--- LibRaw-0.16.0.orig/cmake/data/libraw.pc.cmake 2014-01-17 14:38:31.000000000 +0100
++++ LibRaw-0.16.0/cmake/data/libraw.pc.cmake 2014-11-29 19:20:50.550486840 +0100
+@@ -9,4 +9,4 @@
+ Requires:
+ Version: @RAW_LIB_VERSION_STRING@
+ Libs: -L${libdir} -lraw
+-Cflags: -I${includedir}/libraw
++Cflags: -I${includedir}
+diff -ruN LibRaw-0.16.0.orig/cmake/data/libraw_r.pc.cmake LibRaw-0.16.0/cmake/data/libraw_r.pc.cmake
+--- LibRaw-0.16.0.orig/cmake/data/libraw_r.pc.cmake 2014-01-17 14:38:31.000000000 +0100
++++ LibRaw-0.16.0/cmake/data/libraw_r.pc.cmake 2014-11-29 19:21:00.456487394 +0100
+@@ -9,4 +9,4 @@
+ Requires:
+ Version: @RAW_LIB_VERSION_STRING@
+ Libs: -L${libdir} -lraw_r
+-Cflags: -I${includedir}/libraw
++Cflags: -I${includedir}
+diff -ruN LibRaw-0.16.0.orig/libraw.pc.in LibRaw-0.16.0/libraw.pc.in
+--- LibRaw-0.16.0.orig/libraw.pc.in 2014-01-17 14:38:31.000000000 +0100
++++ LibRaw-0.16.0/libraw.pc.in 2014-11-29 19:20:24.301485373 +0100
+@@ -8,4 +8,4 @@
+ Requires: @PACKAGE_REQUIRES@
+ Version: @PACKAGE_VERSION@
+ Libs: -L${libdir} -lraw -lstdc++@PC_OPENMP@
+-Cflags: -I${includedir}/libraw
++Cflags: -I${includedir}
+diff -ruN LibRaw-0.16.0.orig/libraw_r.pc.in LibRaw-0.16.0/libraw_r.pc.in
+--- LibRaw-0.16.0.orig/libraw_r.pc.in 2014-01-17 14:38:31.000000000 +0100
++++ LibRaw-0.16.0/libraw_r.pc.in 2014-11-29 19:20:32.439485828 +0100
+@@ -8,4 +8,4 @@
+ Requires: @PACKAGE_REQUIRES@
+ Version: @PACKAGE_VERSION@
+ Libs: -L${libdir} -lraw_r -lstdc++@PC_OPENMP@
+-Cflags: -I${includedir}/libraw
++Cflags: -I${includedir}
diff --git a/media-libs/libraw/files/libraw-0.16.0_alpha2-automagic-jasper.patch b/media-libs/libraw/files/libraw-0.16.0_alpha2-automagic-jasper.patch
new file mode 100644
index 000000000000..ed27bb5312c0
--- /dev/null
+++ b/media-libs/libraw/files/libraw-0.16.0_alpha2-automagic-jasper.patch
@@ -0,0 +1,32 @@
+--- LibRaw-0.16.0-Alpha2/CMakeLists.txt
++++ LibRaw-0.16.0-Alpha2/CMakeLists.txt
+@@ -65,6 +65,7 @@
+ # Project Options
+
+ OPTION(ENABLE_OPENMP "Build library with OpenMP support (default=ON)" ON)
++OPTION(ENABLE_JASPER "Build library with RedCine codec support (default=ON)" ON)
+ OPTION(ENABLE_LCMS "Build library with LCMS support (default=ON)" ON)
+ OPTION(ENABLE_EXAMPLES "Build library with sample command-line programs (default=ON)" ON)
+ OPTION(ENABLE_RAWSPEED "Build library with extra RawSpeed codec support (default=OFF)" OFF)
+@@ -207,12 +208,16 @@
+
+ # Jasper library check
+
+-FIND_PACKAGE(Jasper)
++SET(JASPER_FOUND false)
+
+-# Flag to use libjasper with LibRaw RedCine codec
+-IF(JASPER_FOUND)
+- ADD_DEFINITIONS(-DUSE_JASPER)
+- INCLUDE_DIRECTORIES(${JASPER_INCLUDE_DIR})
++IF(ENABLE_JASPER)
++ FIND_PACKAGE(Jasper)
++
++ # Flag to use libjasper with LibRaw RedCine codec
++ IF(JASPER_FOUND)
++ ADD_DEFINITIONS(-DUSE_JASPER)
++ INCLUDE_DIRECTORIES(${JASPER_INCLUDE_DIR})
++ ENDIF()
+ ENDIF()
+
+ # For registration to libraw_config.h
diff --git a/media-libs/libraw/files/libraw-0.16.0_alpha2-custom-demosaic-paths.patch b/media-libs/libraw/files/libraw-0.16.0_alpha2-custom-demosaic-paths.patch
new file mode 100644
index 000000000000..85a1df495947
--- /dev/null
+++ b/media-libs/libraw/files/libraw-0.16.0_alpha2-custom-demosaic-paths.patch
@@ -0,0 +1,23 @@
+Use externally defined paths for demosaic packs and rawspeed before falling back to defaults.
+
+--- LibRaw-0.16.0-Alpha2/CMakeLists.txt
++++ LibRaw-0.16.0-Alpha2/CMakeLists.txt
+@@ -81,9 +81,15 @@
+ SET(RAWSPEED_RPATH "RawSpeed" CACHE STRING
+ "Relavive path to extra RawSpeed codec (default=RawSpeed)")
+
+-SET(DEMOSAIC_PACK_GPL2_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${DEMOSAIC_PACK_GPL2_RPATH}")
+-SET(DEMOSAIC_PACK_GPL3_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${DEMOSAIC_PACK_GPL3_RPATH}")
+-SET(RAWSPEED_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${RAWSPEED_RPATH}")
++IF(NOT DEMOSAIC_PACK_GPL2_PATH)
++ SET(DEMOSAIC_PACK_GPL2_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${DEMOSAIC_PACK_GPL2_RPATH}")
++ENDIF()
++IF(NOT DEMOSAIC_PACK_GPL3_PATH)
++ SET(DEMOSAIC_PACK_GPL3_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${DEMOSAIC_PACK_GPL3_RPATH}")
++ENDIF()
++IF(NOT RAWSPEED_PATH)
++ SET(RAWSPEED_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${RAWSPEED_RPATH}")
++ENDIF()
+
+ # ==================================================================================================
+ # General definitions rules
diff --git a/media-libs/libraw/files/libraw-0.16.0_alpha2-docs.patch b/media-libs/libraw/files/libraw-0.16.0_alpha2-docs.patch
new file mode 100644
index 000000000000..442bfdc5471e
--- /dev/null
+++ b/media-libs/libraw/files/libraw-0.16.0_alpha2-docs.patch
@@ -0,0 +1,21 @@
+--- LibRaw-0.16.0-Alpha2/CMakeLists.txt
++++ LibRaw-0.16.0-Alpha2/CMakeLists.txt
+@@ -579,18 +579,6 @@
+ INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/FindLibRaw.cmake
+ DESTINATION ${CMAKE_ROOT}/Modules)
+
+-# Install doc data files.
+-IF(NOT WIN32)
+- INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/COPYRIGHT
+- ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.CDDL
+- ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.LGPL
+- ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.LibRaw.pdf
+- ${CMAKE_CURRENT_SOURCE_DIR}/Changelog.txt
+- DESTINATION share/libraw
+- COMPONENT main
+- )
+-ENDIF()
+-
+ # Uninstall rules
+ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/Uninstall.cmake ${CMAKE_BINARY_DIR}/cmake_uninstall.cmake COPYONLY)
+ ADD_CUSTOM_TARGET(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_BINARY_DIR}/cmake_uninstall.cmake")
diff --git a/media-libs/libraw/files/libraw-0.16.0_alpha2-lcms2-first.patch b/media-libs/libraw/files/libraw-0.16.0_alpha2-lcms2-first.patch
new file mode 100644
index 000000000000..a9a514972d34
--- /dev/null
+++ b/media-libs/libraw/files/libraw-0.16.0_alpha2-lcms2-first.patch
@@ -0,0 +1,47 @@
+--- LibRaw-0.16.0-Alpha2/CMakeLists.txt
++++ LibRaw-0.16.0-Alpha2/CMakeLists.txt
+@@ -119,26 +119,26 @@
+ SET(LCMS_SUPPORT_CAN_BE_COMPILED false)
+
+ IF (ENABLE_LCMS)
+- MESSAGE(STATUS "Check for LCMS1 availability...")
+- FIND_PACKAGE(LCMS)
+- IF (LCMS_FOUND)
+- MESSAGE(STATUS "Found LCMS1: ${LCMS_LIBRARIES} ${LCMS_INCLUDE_DIR}")
+- INCLUDE_DIRECTORIES(${LCMS_INCLUDE_DIR})
+- MACRO_LOG_FEATURE(LCMS_FOUND "LCMS1" "A small-footprint color management engine" "http://www.littlecms.com" TRUE "" "Needed by libkdcraw")
+- # Flag to compile Little CMS version 1 with LibRaw
+- ADD_DEFINITIONS(-DUSE_LCMS)
+- # For compatibility
+- SET(LCMS2_LIBRARIES ${LCMS_LIBRARIES})
++ MESSAGE(STATUS "Check for LCMS2 availability...")
++ FIND_PACKAGE(LCMS2)
++ IF (LCMS2_FOUND AND (LCMS2_VERSION VERSION_EQUAL 2.1 OR LCMS2_VERSION VERSION_GREATER 2.1))
++ MESSAGE(STATUS "Found LCMS2: ${LCMS2_LIBRARIES} ${LCMS2_INCLUDE_DIR}")
++ INCLUDE_DIRECTORIES(${LCMS2_INCLUDE_DIR})
++ MACRO_LOG_FEATURE(LCMS2_FOUND "LCMS2" "A small-footprint color management engine" "http://www.littlecms.com" FALSE "" "Needed by libkdcraw")
++ # Flag to compile Little CMS version 2 with LibRaw
++ ADD_DEFINITIONS(-DUSE_LCMS2)
+ SET(LCMS_SUPPORT_CAN_BE_COMPILED true)
+ ELSE ()
+- MESSAGE(STATUS "Check for LCMS2 availability instead LCMS1...")
+- FIND_PACKAGE(LCMS2)
+- IF (LCMS2_FOUND AND (LCMS2_VERSION VERSION_EQUAL 2.1 OR LCMS2_VERSION VERSION_GREATER 2.1))
+- MESSAGE(STATUS "Found LCMS2 instead LCMS1: ${LCMS2_LIBRARIES} ${LCMS2_INCLUDE_DIR}")
+- INCLUDE_DIRECTORIES(${LCMS2_INCLUDE_DIR})
+- MACRO_LOG_FEATURE(LCMS2_FOUND "LCMS2" "A small-footprint color management engine" "http://www.littlecms.com" FALSE "" "Needed by libkdcraw")
+- # Flag to compile Little CMS version 2 with LibRaw
+- ADD_DEFINITIONS(-DUSE_LCMS2)
++ MESSAGE(STATUS "Check for LCMS1 availability...")
++ FIND_PACKAGE(LCMS)
++ IF (LCMS_FOUND)
++ MESSAGE(STATUS "Found LCMS1: ${LCMS_LIBRARIES} ${LCMS_INCLUDE_DIR}")
++ INCLUDE_DIRECTORIES(${LCMS_INCLUDE_DIR})
++ MACRO_LOG_FEATURE(LCMS_FOUND "LCMS1" "A small-footprint color management engine" "http://www.littlecms.com" TRUE "" "Needed by libkdcraw")
++ # Flag to compile Little CMS version 1 with LibRaw
++ ADD_DEFINITIONS(-DUSE_LCMS)
++ # For compatibility
++ SET(LCMS2_LIBRARIES ${LCMS_LIBRARIES})
+ SET(LCMS_SUPPORT_CAN_BE_COMPILED true)
+ ENDIF ()
+ ENDIF ()
diff --git a/media-libs/libraw/files/libraw-0.16.0_alpha2-libdir.patch b/media-libs/libraw/files/libraw-0.16.0_alpha2-libdir.patch
new file mode 100644
index 000000000000..ae21f625c44b
--- /dev/null
+++ b/media-libs/libraw/files/libraw-0.16.0_alpha2-libdir.patch
@@ -0,0 +1,32 @@
+--- LibRaw-0.16.0-Alpha2/CMakeLists.txt
++++ LibRaw-0.16.0-Alpha2/CMakeLists.txt
+@@ -565,14 +565,14 @@
+ # Install Shared binary files.
+ INSTALL(TARGETS raw
+ RUNTIME DESTINATION bin
+- LIBRARY DESTINATION lib
+- ARCHIVE DESTINATION lib
++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ )
+
+ INSTALL(TARGETS raw_r
+ RUNTIME DESTINATION bin
+- LIBRARY DESTINATION lib
+- ARCHIVE DESTINATION lib
++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ )
+
+ # Install find cmake script to the system for client applications.
+@@ -626,8 +626,8 @@
+
+ INSTALL(TARGETS ${_target}
+ RUNTIME DESTINATION bin
+- LIBRARY DESTINATION lib
+- ARCHIVE DESTINATION lib)
++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+
+ ENDMACRO(LIBRAW_BUILD_SAMPLES)
+
diff --git a/media-libs/libraw/files/libraw-0.16.0_beta1-include.patch b/media-libs/libraw/files/libraw-0.16.0_beta1-include.patch
new file mode 100644
index 000000000000..d0d2355d4981
--- /dev/null
+++ b/media-libs/libraw/files/libraw-0.16.0_beta1-include.patch
@@ -0,0 +1,20 @@
+diff --git a/cmake/data/libraw.pc.cmake b/cmake/data/libraw.pc.cmake
+index abe6c03..aede5f2 100644
+--- a/cmake/data/libraw.pc.cmake
++++ b/cmake/data/libraw.pc.cmake
+@@ -9,4 +9,4 @@ URL: http://www.libraw.org
+ Requires:
+ Version: @RAW_LIB_VERSION_STRING@
+ Libs: -L${libdir} -lraw
+-Cflags: -I${includedir}/libraw
++Cflags: -I${includedir}
+diff --git a/cmake/data/libraw_r.pc.cmake b/cmake/data/libraw_r.pc.cmake
+index d74e49a..16134e8 100644
+--- a/cmake/data/libraw_r.pc.cmake
++++ b/cmake/data/libraw_r.pc.cmake
+@@ -9,4 +9,4 @@ URL: http://www.libraw.org
+ Requires:
+ Version: @RAW_LIB_VERSION_STRING@
+ Libs: -L${libdir} -lraw_r
+-Cflags: -I${includedir}/libraw
++Cflags: -I${includedir}
diff --git a/media-libs/libraw/files/libraw-0.16.0_beta1-libsuffix.patch b/media-libs/libraw/files/libraw-0.16.0_beta1-libsuffix.patch
new file mode 100644
index 000000000000..aa2a813051f9
--- /dev/null
+++ b/media-libs/libraw/files/libraw-0.16.0_beta1-libsuffix.patch
@@ -0,0 +1,64 @@
+Backport of
+From ce720038ed40e4c4554e0d8c0e4e003834ed1652 Mon Sep 17 00:00:00 2001
+From: Heiko Becker <heirecka@exherbo.org>
+Date: Fri, 29 Nov 2013 20:53:46 +0100
+Subject: [PATCH] Allow specifying a suffix of the libdir
+To allow installing to lib32/64 e.g.
+
+
+diff -ruN LibRaw-0.16.0-Beta1.orig/CMakeLists.txt LibRaw-0.16.0-Beta1/CMakeLists.txt
+--- LibRaw-0.16.0-Beta1.orig/CMakeLists.txt 2013-12-23 14:36:05.569116564 +0100
++++ LibRaw-0.16.0-Beta1/CMakeLists.txt 2013-12-23 14:39:37.716121606 +0100
+@@ -95,6 +95,8 @@
+ # ==================================================================================================
+ # General definitions rules
+
++SET(LIB_SUFFIX "" CACHE STRING "Define suffix of lib directory name (32/64)" )
++
+ # To prevent warnings from M$ compiler
+ IF(WIN32 AND MSVC)
+ ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS)
+@@ -560,10 +562,10 @@
+ # Configure and install data file for packaging.
+ IF(NOT WIN32)
+ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/data/libraw.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libraw.pc @ONLY)
+- INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libraw.pc DESTINATION lib/pkgconfig)
++ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libraw.pc DESTINATION lib${LIB_SUFFIX}/pkgconfig)
+
+ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/data/libraw_r.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libraw_r.pc @ONLY)
+- INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libraw_r.pc DESTINATION lib/pkgconfig)
++ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libraw_r.pc DESTINATION lib${LIB_SUFFIX}/pkgconfig)
+
+ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/data/libraw.lsm.cmake ${CMAKE_CURRENT_BINARY_DIR}/libraw.lsm)
+ ENDIF()
+@@ -584,14 +586,14 @@
+ # Install Shared binary files.
+ INSTALL(TARGETS raw
+ RUNTIME DESTINATION bin
+- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
++ LIBRARY DESTINATION lib${LIB_SUFFIX}
++ ARCHIVE DESTINATION lib${LIB_SUFFIX}
+ )
+
+ INSTALL(TARGETS raw_r
+ RUNTIME DESTINATION bin
+- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
++ LIBRARY DESTINATION lib${LIB_SUFFIX}
++ ARCHIVE DESTINATION lib${LIB_SUFFIX}
+ )
+
+ # Install find cmake script to the system for client applications.
+@@ -633,8 +635,9 @@
+
+ INSTALL(TARGETS ${_target}
+ RUNTIME DESTINATION bin
+- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
++ LIBRARY DESTINATION lib${LIB_SUFFIX}
++ ARCHIVE DESTINATION lib${LIB_SUFFIX}
++ )
+
+ ENDMACRO(LIBRAW_BUILD_SAMPLES)
+
diff --git a/media-libs/libraw/files/libraw-0.16.0_beta1-libsuffixpc.patch b/media-libs/libraw/files/libraw-0.16.0_beta1-libsuffixpc.patch
new file mode 100644
index 000000000000..7d140c713c73
--- /dev/null
+++ b/media-libs/libraw/files/libraw-0.16.0_beta1-libsuffixpc.patch
@@ -0,0 +1,24 @@
+diff --git a/cmake/data/libraw.pc.cmake b/cmake/data/libraw.pc.cmake
+index 9d34612..abe6c03 100644
+--- a/cmake/data/libraw.pc.cmake
++++ b/cmake/data/libraw.pc.cmake
+@@ -1,6 +1,6 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+ exec_prefix=${prefix}
+-libdir=${prefix}/lib
++libdir=${prefix}/lib@LIB_SUFFIX@
+ includedir=${prefix}/include/libraw
+
+ Name: @PROJECT_NAME@
+diff --git a/cmake/data/libraw_r.pc.cmake b/cmake/data/libraw_r.pc.cmake
+index bf779d9..d74e49a 100644
+--- a/cmake/data/libraw_r.pc.cmake
++++ b/cmake/data/libraw_r.pc.cmake
+@@ -1,6 +1,6 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+ exec_prefix=${prefix}
+-libdir=${prefix}/lib
++libdir=${prefix}/lib@LIB_SUFFIX@
+ includedir=${prefix}/include/libraw
+
+ Name: @PROJECT_NAME@
diff --git a/media-libs/libraw/libraw-0.16.0-r1.ebuild b/media-libs/libraw/libraw-0.16.0-r1.ebuild
new file mode 100644
index 000000000000..e22e6263fb93
--- /dev/null
+++ b/media-libs/libraw/libraw-0.16.0-r1.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-multilib toolchain-funcs
+
+MY_PN=LibRaw
+MY_PV=${PV/_b/-B}
+MY_P=${MY_PN}-${MY_PV}
+
+DESCRIPTION="LibRaw is a library for reading RAW files obtained from digital photo cameras"
+HOMEPAGE="http://www.libraw.org/"
+SRC_URI="http://www.libraw.org/data/${MY_P}.tar.gz
+ demosaic? (
+ http://www.libraw.org/data/LibRaw-demosaic-pack-GPL2-${MY_PV}.tar.gz
+ http://www.libraw.org/data/LibRaw-demosaic-pack-GPL3-${MY_PV}.tar.gz
+ )"
+
+# Libraw also has it's own license, which is a pdf file and
+# can be obtained from here:
+# http://www.libraw.org/data/LICENSE.LibRaw.pdf
+LICENSE="LGPL-2.1 CDDL GPL-2 GPL-3"
+SLOT="0/10" # subslot = libraw soname version
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux"
+IUSE="demosaic examples jpeg jpeg2k +lcms openmp"
+
+RDEPEND="jpeg? ( >=virtual/jpeg-0-r2:0[${MULTILIB_USEDEP}] )
+ jpeg2k? ( >=media-libs/jasper-1.900.1-r6[${MULTILIB_USEDEP}] )
+ lcms? ( >=media-libs/lcms-2.5:2[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+DOCS=( Changelog.txt README )
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.16.0_alpha2-docs.patch
+ "${FILESDIR}"/${PN}-0.16.0_alpha2-automagic-jasper.patch
+ "${FILESDIR}"/${PN}-0.16.0_alpha2-lcms2-first.patch
+ "${FILESDIR}"/${PN}-0.16.0_alpha2-custom-demosaic-paths.patch
+ "${FILESDIR}"/${PN}-0.16.0-pc.patch
+)
+
+pkg_pretend() {
+ if use openmp ; then
+ tc-has-openmp || die "Please switch to an openmp compatible compiler"
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_enable openmp OPENMP)
+ $(cmake-utils_use_enable jpeg JPEG)
+ $(cmake-utils_use_enable jpeg2k JASPER)
+ $(cmake-utils_use_enable lcms LCMS)
+ $(cmake-utils_use_enable examples EXAMPLES)
+ $(cmake-utils_use_enable demosaic DEMOSAIC_PACK_GPL2)
+ $(cmake-utils_use_enable demosaic DEMOSAIC_PACK_GPL3)
+ -DDEMOSAIC_PACK_GPL2_PATH="${WORKDIR}/${MY_PN}-demosaic-pack-GPL2-${MY_PV}"
+ -DDEMOSAIC_PACK_GPL3_PATH="${WORKDIR}/${MY_PN}-demosaic-pack-GPL3-${MY_PV}"
+ )
+ cmake-multilib_src_configure
+}
diff --git a/media-libs/libraw/libraw-0.16.2.ebuild b/media-libs/libraw/libraw-0.16.2.ebuild
new file mode 100644
index 000000000000..e24d137ecbad
--- /dev/null
+++ b/media-libs/libraw/libraw-0.16.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
+
+inherit cmake-multilib toolchain-funcs
+
+MY_PN=LibRaw
+MY_PV=${PV/_b/-B}
+MY_P=${MY_PN}-${MY_PV}
+
+DESCRIPTION="LibRaw is a library for reading RAW files obtained from digital photo cameras"
+HOMEPAGE="http://www.libraw.org/"
+SRC_URI="http://www.libraw.org/data/${MY_P}.tar.gz
+ demosaic? (
+ http://www.libraw.org/data/LibRaw-demosaic-pack-GPL2-${MY_PV}.tar.gz
+ http://www.libraw.org/data/LibRaw-demosaic-pack-GPL3-${MY_PV}.tar.gz
+ )"
+
+# Libraw also has it's own license, which is a pdf file and
+# can be obtained from here:
+# http://www.libraw.org/data/LICENSE.LibRaw.pdf
+LICENSE="LGPL-2.1 CDDL GPL-2 GPL-3"
+SLOT="0/10" # subslot = libraw soname version
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="demosaic examples jpeg jpeg2k +lcms openmp"
+
+RDEPEND="jpeg? ( >=virtual/jpeg-0-r2:0[${MULTILIB_USEDEP}] )
+ jpeg2k? ( >=media-libs/jasper-1.900.1-r6[${MULTILIB_USEDEP}] )
+ lcms? ( >=media-libs/lcms-2.5:2[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+DOCS=( Changelog.txt README )
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.16.0_alpha2-docs.patch
+ "${FILESDIR}"/${PN}-0.16.0_alpha2-automagic-jasper.patch
+ "${FILESDIR}"/${PN}-0.16.0_alpha2-lcms2-first.patch
+ "${FILESDIR}"/${PN}-0.16.0_alpha2-custom-demosaic-paths.patch
+ "${FILESDIR}"/${PN}-0.16.0-pc.patch
+)
+
+pkg_pretend() {
+ if use openmp ; then
+ tc-has-openmp || die "Please switch to an openmp compatible compiler"
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_enable openmp OPENMP)
+ $(cmake-utils_use_enable jpeg JPEG)
+ $(cmake-utils_use_enable jpeg2k JASPER)
+ $(cmake-utils_use_enable lcms LCMS)
+ $(cmake-utils_use_enable examples EXAMPLES)
+ $(cmake-utils_use_enable demosaic DEMOSAIC_PACK_GPL2)
+ $(cmake-utils_use_enable demosaic DEMOSAIC_PACK_GPL3)
+ -DDEMOSAIC_PACK_GPL2_PATH="${WORKDIR}/${MY_PN}-demosaic-pack-GPL2-${MY_PV}"
+ -DDEMOSAIC_PACK_GPL3_PATH="${WORKDIR}/${MY_PN}-demosaic-pack-GPL3-${MY_PV}"
+ )
+ cmake-multilib_src_configure
+}
diff --git a/media-libs/libraw/libraw-0.17.0_beta2.ebuild b/media-libs/libraw/libraw-0.17.0_beta2.ebuild
new file mode 100644
index 000000000000..d53a8e2aac4d
--- /dev/null
+++ b/media-libs/libraw/libraw-0.17.0_beta2.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools-multilib toolchain-funcs
+
+MY_PN=LibRaw
+MY_PV=${PV/_b/-B}
+MY_P=${MY_PN}-${MY_PV}
+
+DESCRIPTION="LibRaw is a library for reading RAW files obtained from digital photo cameras"
+HOMEPAGE="http://www.libraw.org/"
+SRC_URI="http://www.libraw.org/data/${MY_P}.tar.gz
+ demosaic? (
+ http://www.libraw.org/data/LibRaw-demosaic-pack-GPL2-${MY_PV}.tar.gz
+ http://www.libraw.org/data/LibRaw-demosaic-pack-GPL3-${MY_PV}.tar.gz
+ )"
+
+# Libraw also has it's own license, which is a pdf file and
+# can be obtained from here:
+# http://www.libraw.org/data/LICENSE.LibRaw.pdf
+LICENSE="LGPL-2.1 CDDL GPL-2 GPL-3"
+SLOT="0/13" # subslot = libraw soname version
+#KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="demosaic examples jpeg jpeg2k +lcms openmp"
+
+RDEPEND="jpeg? ( >=virtual/jpeg-0-r2:0[${MULTILIB_USEDEP}] )
+ jpeg2k? ( >=media-libs/jasper-1.900.1-r6[${MULTILIB_USEDEP}] )
+ lcms? ( >=media-libs/lcms-2.5:2[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+DOCS=( Changelog.txt README )
+
+pkg_pretend() {
+ if use openmp ; then
+ tc-has-openmp || die "Please switch to an openmp compatible compiler"
+ fi
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable demosaic demosaic-pack-gpl2)
+ $(use_enable demosaic demosaic-pack-gpl3)
+ $(use_enable examples)
+ $(use_enable jpeg)
+ $(use_enable jpeg2k jasper)
+ $(use_enable lcms)
+ $(use_enable openmp)
+ )
+ autotools-multilib_src_configure
+}
diff --git a/media-libs/libraw/metadata.xml b/media-libs/libraw/metadata.xml
new file mode 100644
index 000000000000..d66c6b2beced
--- /dev/null
+++ b/media-libs/libraw/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>graphics</herd>
+ <use>
+ <flag name="demosaic">Enable support for external interpolation algorithms</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/libreplaygain/Manifest b/media-libs/libreplaygain/Manifest
new file mode 100644
index 000000000000..4f85c75059fb
--- /dev/null
+++ b/media-libs/libreplaygain/Manifest
@@ -0,0 +1 @@
+DIST libreplaygain-477.tar.xz 8272 SHA256 b7fe1b28950512014e561e7fbcae2a075148ac70aa356002ca6ee806bc6934bf SHA512 9e81deb237e35e63d67efabcbfe40f5a6fd34f4a6b0239a21e6ab8ba3c9ca172297cf323fbc4ada749dcfcdf0b711c354e39f12af9a9576900384c441657ff8e WHIRLPOOL c5ad7ab500521c8ede792282429627037a2e9d9805d727450c3eeea9ed801d27fe2e5f075aa17d0bd3425ea6edde06eb0d99a784bbeae00c80b6cc1b46b6e791
diff --git a/media-libs/libreplaygain/libreplaygain-477-r1.ebuild b/media-libs/libreplaygain/libreplaygain-477-r1.ebuild
new file mode 100644
index 000000000000..591d18a81358
--- /dev/null
+++ b/media-libs/libreplaygain/libreplaygain-477-r1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit cmake-multilib
+
+# svn export http://svn.musepack.net/libreplaygain libreplaygain-${PV}
+# tar -cJf libreplaygain-${PV}.tar.xz libreplaygain-${PV}
+
+DESCRIPTION="Replay Gain library from Musepack"
+HOMEPAGE="http://www.musepack.net/"
+SRC_URI="http://dev.gentoo.org/~ssuominen/${P}.tar.xz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm hppa ~ia64 ppc ppc64 ~sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE=""
+RDEPEND="abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20130224-r2
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+
+src_prepare() {
+ sed -i -e '/CMAKE_C_FLAGS/d' CMakeLists.txt || die
+}
+
+src_install() {
+ cmake-multilib_src_install
+ insinto /usr/include
+ doins -r include/replaygain
+}
diff --git a/media-libs/libreplaygain/libreplaygain-477.ebuild b/media-libs/libreplaygain/libreplaygain-477.ebuild
new file mode 100644
index 000000000000..628b9a7fdfce
--- /dev/null
+++ b/media-libs/libreplaygain/libreplaygain-477.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit cmake-utils
+
+# svn export http://svn.musepack.net/libreplaygain libreplaygain-${PV}
+# tar -cJf libreplaygain-${PV}.tar.xz libreplaygain-${PV}
+
+DESCRIPTION="Replay Gain library from Musepack"
+HOMEPAGE="http://www.musepack.net/"
+SRC_URI="http://dev.gentoo.org/~ssuominen/${P}.tar.xz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm hppa ~ia64 ppc ppc64 ~sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE=""
+
+src_prepare() {
+ sed -i -e '/CMAKE_C_FLAGS/d' CMakeLists.txt || die
+}
+
+src_install() {
+ cmake-utils_src_install
+ insinto /usr/include
+ doins -r include/replaygain
+}
diff --git a/media-libs/libreplaygain/metadata.xml b/media-libs/libreplaygain/metadata.xml
new file mode 100644
index 000000000000..ae573a60407f
--- /dev/null
+++ b/media-libs/libreplaygain/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>sound</herd>
+</pkgmetadata>
diff --git a/media-libs/librosprite/Manifest b/media-libs/librosprite/Manifest
new file mode 100644
index 000000000000..978e1e0394c6
--- /dev/null
+++ b/media-libs/librosprite/Manifest
@@ -0,0 +1,4 @@
+DIST librosprite-0.1.1-src.tar.gz 31143 SHA256 d06d151d0e609cb97f272958e927e6693e2b1c57dbf957b834428e5716934096 SHA512 71379e0a7a9ad12eb28e2823ab0fd65274ea3ff2413402d978f9f2a26d6ab258383d5ad3d83434670baddad0288b48d3339f295d5c5c2959ae58472aeac35c56 WHIRLPOOL c99a28fb90535f43bf823e945dbf47a969201c04c3b16475576f8a3af9093b5aca1a6deb2a4b4241ae39a6563875d195497c55ec7bd2f8783fbad8b056e2150e
+DIST librosprite-0.1.2-src.tar.gz 31146 SHA256 9d68833ff48cb9f5ad106106607887c3e70035e60417617a6e23d362b4f5eec4 SHA512 7b668ba618e78604ff6137b202feeb5e191aed11e0781e10cee4d70a218d894ec5d95ac3a2bd0bf3517d0bc1096d2e8e8d021246596ffbe7ab8ad0cebd92eb6c WHIRLPOOL 54780e9df15fc72f4ad32ce11764e5d0b60bfb72ecd896017125d2eb67dfd23b3362044a5dad75f33135e0b6fd2d8bd4c20344b1da0be77b29e095419031f214
+DIST netsurf-buildsystem-1.2.tar.gz 38914 SHA256 3903a4a1551c9c202e1d2047344c4f3598c8d9d6c35ebf8cc2e18874bd0c9d61 SHA512 963e8a5033e8ef70595507f24fea3d9697eefb50ad7f92a6d3c913501c7026f12ec6d48f92b75e352b32f212f6216b8d8455aff25fa8d8d0fc12a3b19a875a1c WHIRLPOOL e56a520ae284089d0f36f06a6891ebb5b208ca847c74340c18581340e457c20ae9365999dc13284f438b965dcd7e85f04b93d1c1f22cadf6f7c1e2cef81d528c
+DIST netsurf-buildsystem-1.3.tar.gz 37906 SHA256 10bbe95ba07476208da6047bd3c74685b6e61ba9904975b5d5c9a2c79a84ac79 SHA512 79ef3e366c4798dbb88021fd05019ba9fe50539b7482bd3d07422f4c0dbf2047b906f39a0b48deebbdf111d84d93a9364d08e5c97f91609363c27641db15e6b5 WHIRLPOOL c8131d0ffb79b208b63bef94606735968584edfff8cb24b4c83cd747c5d65c2811004626840798047ffddf84556ef7d8e23242f60d01a4a046323df3c78b0980
diff --git a/media-libs/librosprite/files/librosprite-0.1.1-Werror.patch b/media-libs/librosprite/files/librosprite-0.1.1-Werror.patch
new file mode 100644
index 000000000000..cd01638b0fd1
--- /dev/null
+++ b/media-libs/librosprite/files/librosprite-0.1.1-Werror.patch
@@ -0,0 +1,14 @@
+--- librosprite-0.1.1/Makefile
++++ librosprite-0.1.1/Makefile
+@@ -22,11 +22,6 @@
+ -Wformat=2 -Werror-implicit-function-declaration \
+ -Wmissing-declarations -Wmissing-prototypes
+
+-# BeOS/Haiku standard library headers create warnings
+-ifneq ($(TARGET),beos)
+- WARNFLAGS := $(WARNFLAGS) -Werror
+-endif
+-
+ CFLAGS := -I$(CURDIR)/include/ $(WARNFLAGS) $(CFLAGS)
+
+ ifneq ($(GCCVER),2)
diff --git a/media-libs/librosprite/files/librosprite-0.1.2-Werror.patch b/media-libs/librosprite/files/librosprite-0.1.2-Werror.patch
new file mode 100644
index 000000000000..e842e762a736
--- /dev/null
+++ b/media-libs/librosprite/files/librosprite-0.1.2-Werror.patch
@@ -0,0 +1,14 @@
+--- librosprite-0.1.2/Makefile
++++ librosprite-0.1.2/Makefile
+@@ -22,11 +22,6 @@
+ -Wformat=2 -Werror-implicit-function-declaration \
+ -Wmissing-declarations -Wmissing-prototypes
+
+-# BeOS/Haiku standard library headers create warnings
+-ifneq ($(BUILD),i586-pc-haiku)
+- WARNFLAGS := $(WARNFLAGS) -Werror
+-endif
+-
+ CFLAGS := -I$(CURDIR)/include/ $(WARNFLAGS) $(CFLAGS)
+
+ ifneq ($(GCCVER),2)
diff --git a/media-libs/librosprite/librosprite-0.1.1.ebuild b/media-libs/librosprite/librosprite-0.1.1.ebuild
new file mode 100644
index 000000000000..9b2e40f46e5a
--- /dev/null
+++ b/media-libs/librosprite/librosprite-0.1.1.ebuild
@@ -0,0 +1,18 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+NETSURF_BUILDSYSTEM=buildsystem-1.2
+inherit netsurf
+
+DESCRIPTION="framebuffer abstraction library, written in C"
+HOMEPAGE="http://www.netsurf-browser.org/projects/librosprite/"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~m68k-mint"
+IUSE=""
+
+PATCHES=( "${FILESDIR}"/${P}-Werror.patch )
diff --git a/media-libs/librosprite/librosprite-0.1.2-r1.ebuild b/media-libs/librosprite/librosprite-0.1.2-r1.ebuild
new file mode 100644
index 000000000000..4939644ddb4d
--- /dev/null
+++ b/media-libs/librosprite/librosprite-0.1.2-r1.ebuild
@@ -0,0 +1,18 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+NETSURF_BUILDSYSTEM=buildsystem-1.3
+inherit netsurf
+
+DESCRIPTION="framebuffer abstraction library, written in C"
+HOMEPAGE="http://www.netsurf-browser.org/projects/librosprite/"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~m68k-mint"
+IUSE=""
+
+PATCHES=( "${FILESDIR}"/${P}-Werror.patch )
diff --git a/media-libs/librosprite/metadata.xml b/media-libs/librosprite/metadata.xml
new file mode 100644
index 000000000000..59acc2cc580e
--- /dev/null
+++ b/media-libs/librosprite/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>xmw@gentoo.org</email>
+<name>Michael Weber</name>
+</maintainer>
+</pkgmetadata>
+
diff --git a/media-libs/libsamplerate/Manifest b/media-libs/libsamplerate/Manifest
new file mode 100644
index 000000000000..3575a6b0f5cb
--- /dev/null
+++ b/media-libs/libsamplerate/Manifest
@@ -0,0 +1 @@
+DIST libsamplerate-0.1.8.tar.gz 4303330 SHA256 93b54bdf46d5e6d2354b7034395fe329c222a966790de34520702bb9642f1c06 SHA512 85d93df24d9d62e7803a5d0ac5d268b2085214adcb160e32fac316b12ee8a0ce36ccfb433a3c0a08f6e3ec418a5962bdb84f8a11262286a9b347436983029a7d WHIRLPOOL 5aff2290372570178752fedb5cafe1cb8d30cd8aa0910f8f7a2333d41746ac7a88e5cc7f7228eb8ba60aa2908fad0242214ac3e29346db04cc1e9cc66386eddf
diff --git a/media-libs/libsamplerate/files/libsamplerate-0.1.3-dontbuild-tests-examples.patch b/media-libs/libsamplerate/files/libsamplerate-0.1.3-dontbuild-tests-examples.patch
new file mode 100644
index 000000000000..23cf5897a59e
--- /dev/null
+++ b/media-libs/libsamplerate/files/libsamplerate-0.1.3-dontbuild-tests-examples.patch
@@ -0,0 +1,32 @@
+Index: libsamplerate-0.1.3/examples/Makefile.am
+===================================================================
+--- libsamplerate-0.1.3.orig/examples/Makefile.am
++++ libsamplerate-0.1.3/examples/Makefile.am
+@@ -3,7 +3,7 @@
+
+ bin_PROGRAMS = sndfile-resample
+
+-noinst_PROGRAMS = varispeed-play timewarp-file
++EXTRA_PROGRAMS = varispeed-play timewarp-file
+
+ SAMPLERATEDIR =../src
+ INCLUDES = -I$(srcdir)/$(SAMPLERATEDIR) @OS_SPECIFIC_INCLUDES@
+Index: libsamplerate-0.1.3/tests/Makefile.am
+===================================================================
+--- libsamplerate-0.1.3.orig/tests/Makefile.am
++++ libsamplerate-0.1.3/tests/Makefile.am
+@@ -1,4 +1,4 @@
+-noinst_PROGRAMS = misc_test termination_test simple_test callback_test \
++EXTRA_PROGRAMS = misc_test termination_test simple_test callback_test \
+ reset_test multi_channel_test snr_bw_test \
+ float_short_test varispeed_test callback_hang_test \
+ src-evaluate throughput_test
+@@ -55,7 +55,7 @@ throughput_test_LDADD = $(SAMPLRATEDIR)
+
+ #===============================================================================
+
+-check: $(noinst_PROGRAMS)
++check: $(EXTRA_PROGRAMS)
+ date
+ uname -a
+ ./misc_test
diff --git a/media-libs/libsamplerate/files/libsamplerate-0.1.8-lm.patch b/media-libs/libsamplerate/files/libsamplerate-0.1.8-lm.patch
new file mode 100644
index 000000000000..bfaa87bf976f
--- /dev/null
+++ b/media-libs/libsamplerate/files/libsamplerate-0.1.8-lm.patch
@@ -0,0 +1,8 @@
+--- libsamplerate-0.1.8/samplerate.pc.in.orig
++++ libsamplerate-0.1.8/samplerate.pc.in
+@@ -8,4 +8,5 @@
+ Requires:
+ Version: @VERSION@
+ Libs: -L${libdir} -lsamplerate
++Libs.private: @LIBS@
+ Cflags: -I${includedir}
diff --git a/media-libs/libsamplerate/libsamplerate-0.1.8-r1.ebuild b/media-libs/libsamplerate/libsamplerate-0.1.8-r1.ebuild
new file mode 100644
index 000000000000..94152857bfc9
--- /dev/null
+++ b/media-libs/libsamplerate/libsamplerate-0.1.8-r1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+AUTOTOOLS_PRUNE_LIBTOOL_FILES=all
+inherit autotools-multilib
+
+DESCRIPTION="Secret Rabbit Code (aka libsamplerate) is a Sample Rate Converter for audio"
+HOMEPAGE="http://www.mega-nerd.com/SRC/"
+SRC_URI="http://www.mega-nerd.com/SRC/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="sndfile static-libs"
+
+RDEPEND="sndfile? ( >=media-libs/libsndfile-1.0.2 )
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-soundlibs-20130224-r6
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS=( AUTHORS ChangeLog NEWS README )
+
+src_prepare() {
+ local PATCHES=(
+ "${FILESDIR}/${PN}-0.1.3-dontbuild-tests-examples.patch"
+ "${FILESDIR}/${P}-lm.patch"
+ )
+
+ AT_M4DIR="M4" \
+ autotools-multilib_src_prepare
+}
+
+src_configure() {
+ my_configure() {
+ local myeconfargs=(
+ --disable-fftw
+ )
+
+ if [ "${ABI}" = "${DEFAULT_ABI}" ] ; then
+ myeconfargs+=( $(use_enable sndfile) )
+ else
+ myeconfargs+=( --disable-sndfile )
+ fi
+
+ autotools-utils_src_configure
+
+ if [ "${ABI}" != "${DEFAULT_ABI}" ] ; then
+ sed -i -e "s/ doc examples//" "${BUILD_DIR}/Makefile" || die
+ fi
+ }
+ multilib_parallel_foreach_abi my_configure
+}
+
+src_install() {
+ autotools-multilib_src_install \
+ htmldocdir="${EPREFIX}/usr/share/doc/${PF}/html"
+}
diff --git a/media-libs/libsamplerate/metadata.xml b/media-libs/libsamplerate/metadata.xml
new file mode 100644
index 000000000000..e1774e3d9ad7
--- /dev/null
+++ b/media-libs/libsamplerate/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>sound</herd>
+</pkgmetadata>
diff --git a/media-libs/libsbsms/Manifest b/media-libs/libsbsms/Manifest
new file mode 100644
index 000000000000..2a6b1c88ffe6
--- /dev/null
+++ b/media-libs/libsbsms/Manifest
@@ -0,0 +1,3 @@
+DIST libsbsms-2.0.0.tar.gz 832881 SHA256 960c7bf4bd0f5024f96be6ff8891118bd5d029f55525d1a43d8d01c8430c88d9 SHA512 c3047310c5e5080eb437f426ac679fda3cd18ccf06e287667701aa9ef50e47285df4cc29e5d1dd82e9bdd1e668bf33ee437d9bc8499ba1687b172ac904d80d92 WHIRLPOOL ae519fc74e9145a309c0fcdf7eb84335fb8c0b4d5ea5863ab14fe447dc8100fa7cb98c3dbd8ddbb0ddc07b609404f49405f2d96e7c68d1e8f98bcbfc9563da5a
+DIST libsbsms-2.0.1.tar.gz 741474 SHA256 1012201f3d982960ca29142e3adab79f3668932b23cc38a9f9088ca9a2588b25 SHA512 62d5b3bc58069d697f0cf9505f2da22555a1fa8c966191cdd369161d56266069ae47a41100103439dc58b7dd01bbc3b11279400a2d0c161b2b4b9c854199ae45 WHIRLPOOL a01fa860088e4b386184f36ddc8c19522ce5f850f76cebf8f2800aa6f21715112fc03457653842b581b4cb16c7d064a9f2babe54149ca4c652a497ea31fdce93
+DIST libsbsms-2.0.2.tar.gz 450170 SHA256 ceab3d970664b337057b46bcf55283d50d329da636bf83d0ee7c36e22341aeee SHA512 8aaab3e191f3e10e559683ab4ebdcb8d951cf0e776390234f25675a98640d60d20aed872061ba72fdc3bd7827b7d46bc27225fe947cdd7fa4312f75cbdd78e6c WHIRLPOOL 4cf6c0564a1e270ad46b90f07e1ab36c642384994ad1224c0f4c56dfdeafa5afbaadecbf8151a9767a39203e661443964b823b21c45d3a7b29fcf121cb7910e6
diff --git a/media-libs/libsbsms/files/libsbsms-2.0.0-cflags.patch b/media-libs/libsbsms/files/libsbsms-2.0.0-cflags.patch
new file mode 100644
index 000000000000..63de676beb66
--- /dev/null
+++ b/media-libs/libsbsms/files/libsbsms-2.0.0-cflags.patch
@@ -0,0 +1,24 @@
+--- libsbsms-2.0.0/configure.in
++++ libsbsms-2.0.0/configure.in
+@@ -69,8 +69,6 @@
+
+ AC_ARG_ENABLE(universal_binary,[ --enable-universal_binary enable universal binary build: (default: disable)],[enable_universal_binary=$enableval],[enable_universal_binary=no])
+
+-SBSMS_CFLAGS="-ffast-math -funroll-loops"
+-
+ if test x$enable_static = xno; then
+ case "$target_os" in
+ darwin*)
+@@ -81,12 +79,6 @@
+ esac
+ fi
+
+-if test x$enable_debug = xyes; then
+- SBSMS_CFLAGS="$SBSMS_CFLAGS -g -O3"
+-else
+- SBSMS_CFLAGS="$SBSMS_CFLAGS -O3 -fomit-frame-pointer"
+-fi
+-
+ if test x$enable_multithreaded = xyes; then
+ AC_DEFINE(MULTITHREADED,1,[Define to compile multithreaded sbsms])
+ fi
diff --git a/media-libs/libsbsms/files/libsbsms-2.0.1-includes.patch b/media-libs/libsbsms/files/libsbsms-2.0.1-includes.patch
new file mode 100644
index 000000000000..63937fa6157d
--- /dev/null
+++ b/media-libs/libsbsms/files/libsbsms-2.0.1-includes.patch
@@ -0,0 +1,11 @@
+diff -urN libsbsms-2.0.1.old/src/buffer.h libsbsms-2.0.1/src/buffer.h
+--- libsbsms-2.0.1.old/src/buffer.h 2012-12-08 18:43:46.772667486 +0100
++++ libsbsms-2.0.1/src/buffer.h 2012-12-08 18:44:04.677668212 +0100
+@@ -2,6 +2,7 @@
+ #ifndef BUFFER_H
+ #define BUFFER_H
+
++#include <stdlib.h>
+ #include "sbsms.h"
+ #include "grain.h"
+ #include <list>
diff --git a/media-libs/libsbsms/files/libsbsms-2.0.2-cflags.patch b/media-libs/libsbsms/files/libsbsms-2.0.2-cflags.patch
new file mode 100644
index 000000000000..929135baa0ec
--- /dev/null
+++ b/media-libs/libsbsms/files/libsbsms-2.0.2-cflags.patch
@@ -0,0 +1,24 @@
+--- libsbsms-2.0.2/configure.ac
++++ libsbsms-2.0.2/configure.ac
+@@ -69,8 +69,6 @@
+
+ AC_ARG_ENABLE(universal_binary,[ --enable-universal_binary enable universal binary build: (default: disable)],[enable_universal_binary=$enableval],[enable_universal_binary=no])
+
+-SBSMS_CFLAGS="-ffast-math -funroll-loops"
+-
+ if test x$enable_static = xno; then
+ case "$target_os" in
+ darwin*)
+@@ -81,12 +79,6 @@
+ esac
+ fi
+
+-if test x$enable_debug = xyes; then
+- SBSMS_CFLAGS="$SBSMS_CFLAGS -g -O3"
+-else
+- SBSMS_CFLAGS="$SBSMS_CFLAGS -O3 -fomit-frame-pointer"
+-fi
+-
+ if test x$enable_multithreaded = xyes; then
+ AC_DEFINE(MULTITHREADED,1,[Define to compile multithreaded sbsms])
+ fi
diff --git a/media-libs/libsbsms/libsbsms-2.0.0.ebuild b/media-libs/libsbsms/libsbsms-2.0.0.ebuild
new file mode 100644
index 000000000000..2765261b478f
--- /dev/null
+++ b/media-libs/libsbsms/libsbsms-2.0.0.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils autotools
+
+DESCRIPTION="A library for high quality time and pitch scale modification"
+HOMEPAGE="http://sbsms.sourceforge.net/"
+SRC_URI="mirror://sourceforge/sbsms/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="cpu_flags_x86_sse static-libs"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-cflags.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --enable-shared \
+ $(use_enable static-libs static) \
+ $(use_enable cpu_flags_x86_sse sse) \
+ --disable-multithreaded
+ # threaded version causes segfaults
+}
+
+src_install() {
+ default
+ prune_libtool_files
+}
diff --git a/media-libs/libsbsms/libsbsms-2.0.1.ebuild b/media-libs/libsbsms/libsbsms-2.0.1.ebuild
new file mode 100644
index 000000000000..d1a844c3ccd2
--- /dev/null
+++ b/media-libs/libsbsms/libsbsms-2.0.1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils autotools
+
+DESCRIPTION="A library for high quality time and pitch scale modification"
+HOMEPAGE="http://sbsms.sourceforge.net/"
+SRC_URI="mirror://sourceforge/sbsms/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~mips ppc ppc64 x86"
+IUSE="cpu_flags_x86_sse static-libs"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-2.0.0-cflags.patch \
+ "${FILESDIR}"/${PN}-2.0.1-includes.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --enable-shared \
+ $(use_enable static-libs static) \
+ $(use_enable cpu_flags_x86_sse sse) \
+ --disable-multithreaded
+ # threaded version causes segfaults
+}
+
+src_install() {
+ default
+ prune_libtool_files
+}
diff --git a/media-libs/libsbsms/libsbsms-2.0.2.ebuild b/media-libs/libsbsms/libsbsms-2.0.2.ebuild
new file mode 100644
index 000000000000..71f0accd2ed7
--- /dev/null
+++ b/media-libs/libsbsms/libsbsms-2.0.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
+
+inherit eutils autotools
+
+DESCRIPTION="A library for high quality time and pitch scale modification"
+HOMEPAGE="http://sbsms.sourceforge.net/"
+SRC_URI="mirror://sourceforge/sbsms/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~mips ppc ~ppc64 x86"
+IUSE="cpu_flags_x86_sse static-libs"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-cflags.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --enable-shared \
+ $(use_enable static-libs static) \
+ $(use_enable cpu_flags_x86_sse sse) \
+ --disable-multithreaded
+ # threaded version causes segfaults
+}
+
+src_install() {
+ default
+ prune_libtool_files
+}
diff --git a/media-libs/libsbsms/metadata.xml b/media-libs/libsbsms/metadata.xml
new file mode 100644
index 000000000000..8b48dd28506f
--- /dev/null
+++ b/media-libs/libsbsms/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>proaudio</herd>
+ <upstream>
+ <remote-id type="sourceforge">sbsms</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libsdl/Manifest b/media-libs/libsdl/Manifest
new file mode 100644
index 000000000000..939d75289880
--- /dev/null
+++ b/media-libs/libsdl/Manifest
@@ -0,0 +1 @@
+DIST SDL-1.2.15.tar.gz 3920622 SHA256 d6d316a793e5e348155f0dd93b979798933fb98aa1edebcc108829d6474aad00 SHA512 ac392d916e6953b0925a7cbb0f232affea33339ef69b47a0a7898492afb9784b93138986df53d6da6d3e2ad79af1e9482df565ecca30f89428be0ae6851b1adc WHIRLPOOL 21b9aadb7b00002a6f3760902cd40aeb1b145228348b887049b40a435c2b9a1a3679a83100421e9634178b9da32d524371d6912c190a75e83ef3170ad45bc159
diff --git a/media-libs/libsdl/files/libsdl-1.2.15-SDL_EnableUNICODE.patch b/media-libs/libsdl/files/libsdl-1.2.15-SDL_EnableUNICODE.patch
new file mode 100644
index 000000000000..bf68b2e44f44
--- /dev/null
+++ b/media-libs/libsdl/files/libsdl-1.2.15-SDL_EnableUNICODE.patch
@@ -0,0 +1,47 @@
+
+diff -r 22a7f096bb9d -r 0aade9c0203f src/video/x11/SDL_x11events.c
+--- a/src/video/x11/SDL_x11events.c Sun Dec 01 00:00:17 2013 -0500
++++ b/src/video/x11/SDL_x11events.c Thu Apr 17 22:36:14 2014 -0700
+@@ -395,6 +395,8 @@
+ {
+ int posted;
+ XEvent xevent;
++ int orig_event_type;
++ KeyCode orig_keycode;
+
+ SDL_memset(&xevent, '\0', sizeof (XEvent)); /* valgrind fix. --ryan. */
+ XNextEvent(SDL_Display, &xevent);
+@@ -410,9 +412,29 @@
+ #ifdef X_HAVE_UTF8_STRING
+ /* If we are translating with IM, we need to pass all events
+ to XFilterEvent, and discard those filtered events immediately. */
++ orig_event_type = xevent.type;
++ if (orig_event_type == KeyPress || orig_event_type == KeyRelease) {
++ orig_keycode = xevent.xkey.keycode;
++ } else {
++ orig_keycode = 0;
++ }
+ if ( SDL_TranslateUNICODE
+ && SDL_IM != NULL
+ && XFilterEvent(&xevent, None) ) {
++ if (orig_keycode) {
++ SDL_keysym keysym;
++ static XComposeStatus state;
++ char keybuf[32];
++
++ keysym.scancode = xevent.xkey.keycode;
++ keysym.sym = X11_TranslateKeycode(SDL_Display, xevent.xkey.keycode);
++ keysym.mod = KMOD_NONE;
++ keysym.unicode = 0;
++ if (orig_event_type == KeyPress && XLookupString(&xevent.xkey, keybuf, sizeof(keybuf), NULL, &state))
++ keysym.unicode = (Uint8)keybuf[0];
++
++ SDL_PrivateKeyboard(orig_event_type == KeyPress ? SDL_PRESSED : SDL_RELEASED, &keysym);
++ }
+ return 0;
+ }
+ #endif
+
+
+
+
diff --git a/media-libs/libsdl/files/libsdl-1.2.15-bsd-joystick.patch b/media-libs/libsdl/files/libsdl-1.2.15-bsd-joystick.patch
new file mode 100644
index 000000000000..0f3542529ba6
--- /dev/null
+++ b/media-libs/libsdl/files/libsdl-1.2.15-bsd-joystick.patch
@@ -0,0 +1,28 @@
+
+# HG changeset patch
+# User Sam Lantinga <slouken@libsdl.org>
+# Date 1329357968 18000
+# Node ID 62ff1c0a103f685774450be2e5338824a22078bd
+# Parent 8e98c714bb2ab96de4100a335dacf042963d5068
+FreeBSD compile fix
+
+Robert Millan
+
+src/joystick/bsd/SDL_sysjoystick.c makes the invalid assumption that
+__FreeBSD_kernel__ implies presence of "ucr_data" struct member. This
+breaks recent versions of FreeBSD 10-CURRENT, FreeBSD 9-STABLE and
+Debian GNU/kFreeBSD "wheezy/sid".
+
+diff -r 8e98c714bb2a -r 62ff1c0a103f src/joystick/bsd/SDL_sysjoystick.c
+--- a/src/joystick/bsd/SDL_sysjoystick.c Sat Feb 04 18:12:20 2012 -0500
++++ b/src/joystick/bsd/SDL_sysjoystick.c Wed Feb 15 21:06:08 2012 -0500
+@@ -148,7 +148,7 @@
+ static int report_alloc(struct report *, struct report_desc *, int);
+ static void report_free(struct report *);
+
+-#if defined(USBHID_UCR_DATA) || defined(__FreeBSD_kernel__)
++#if defined(USBHID_UCR_DATA)
+ #define REP_BUF_DATA(rep) ((rep)->buf->ucr_data)
+ #elif (defined(__FREEBSD__) && (__FreeBSD_kernel_version > 800063))
+ #define REP_BUF_DATA(rep) ((rep)->buf->ugd_data)
+
diff --git a/media-libs/libsdl/files/libsdl-1.2.15-caca.patch b/media-libs/libsdl/files/libsdl-1.2.15-caca.patch
new file mode 100644
index 000000000000..faf5ae132a96
--- /dev/null
+++ b/media-libs/libsdl/files/libsdl-1.2.15-caca.patch
@@ -0,0 +1,26 @@
+--- SDL-1.2.15/configure.in
++++ SDL-1.2.15/configure.in
+@@ -1507,11 +1507,10 @@
+ , enable_video_caca=no)
+ if test x$enable_video = xyes -a x$enable_video_caca = xyes; then
+ video_caca=no
+- AC_PATH_PROG(CACACONFIG, caca-config, no)
+- if test x$CACACONFIG != xno; then
++ PKG_PROG_PKG_CONFIG([0.20])
++ PKG_CHECK_MODULES(CACA, caca, has_caca_pc=yes, has_caca_pc=no])
++ if test x$has_caca_pc == xyes; then
+ AC_MSG_CHECKING(for libcaca support)
+- CACA_CFLAGS=`$CACACONFIG --cflags`
+- CACA_LDFLAGS=`$CACACONFIG --libs`
+ save_CFLAGS="$CFLAGS"
+ AC_TRY_COMPILE([
+ #include <caca.h>
+@@ -1524,7 +1523,7 @@
+ if test x$video_caca = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_CACA)
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $CACA_CFLAGS"
+- EXTRA_LDFLAGS="$EXTRA_LDFLAGS $CACA_LDFLAGS"
++ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $CACA_LIBS"
+ SOURCES="$SOURCES $srcdir/src/video/caca/*.c"
+ fi
+ fi
diff --git a/media-libs/libsdl/files/libsdl-1.2.15-const-xdata32.patch b/media-libs/libsdl/files/libsdl-1.2.15-const-xdata32.patch
new file mode 100644
index 000000000000..ffe55348a6c6
--- /dev/null
+++ b/media-libs/libsdl/files/libsdl-1.2.15-const-xdata32.patch
@@ -0,0 +1,58 @@
+# HG changeset patch
+# User Azamat H. Hackimov <azamat.hackimov@gmail.com>
+# Date 1370184533 -21600
+# Branch SDL-1.2
+# Node ID 91ad7b43317a6387e115ecdf63a49137f47e42c8
+# Parent f7fd5c3951b9ed922fdf696f7182e71b58a13268
+Fix compilation with libX11 >= 1.5.99.902.
+
+These changes fixes bug #1769 for SDL 1.2
+(http://bugzilla.libsdl.org/show_bug.cgi?id=1769).
+
+diff -r f7fd5c3951b9 -r 91ad7b43317a configure.in
+--- a/configure.in Wed Apr 17 00:56:53 2013 -0700
++++ b/configure.in Sun Jun 02 20:48:53 2013 +0600
+@@ -1169,6 +1169,17 @@
+ if test x$definitely_enable_video_x11_xrandr = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_X11_XRANDR)
+ fi
++ AC_MSG_CHECKING(for const parameter to _XData32)
++ have_const_param_xdata32=no
++ AC_TRY_COMPILE([
++ #include <X11/Xlibint.h>
++ extern int _XData32(Display *dpy,register _Xconst long *data,unsigned len);
++ ],[
++ ],[
++ have_const_param_xdata32=yes
++ AC_DEFINE(SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32)
++ ])
++ AC_MSG_RESULT($have_const_param_xdata32)
+ fi
+ fi
+ }
+diff -r f7fd5c3951b9 -r 91ad7b43317a include/SDL_config.h.in
+--- a/include/SDL_config.h.in Wed Apr 17 00:56:53 2013 -0700
++++ b/include/SDL_config.h.in Sun Jun 02 20:48:53 2013 +0600
+@@ -283,6 +283,7 @@
+ #undef SDL_VIDEO_DRIVER_WINDIB
+ #undef SDL_VIDEO_DRIVER_WSCONS
+ #undef SDL_VIDEO_DRIVER_X11
++#undef SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32
+ #undef SDL_VIDEO_DRIVER_X11_DGAMOUSE
+ #undef SDL_VIDEO_DRIVER_X11_DYNAMIC
+ #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT
+diff -r f7fd5c3951b9 -r 91ad7b43317a src/video/x11/SDL_x11sym.h
+--- a/src/video/x11/SDL_x11sym.h Wed Apr 17 00:56:53 2013 -0700
++++ b/src/video/x11/SDL_x11sym.h Sun Jun 02 20:48:53 2013 +0600
+@@ -165,7 +165,11 @@
+ */
+ #ifdef LONG64
+ SDL_X11_MODULE(IO_32BIT)
++#if SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32
++SDL_X11_SYM(int,_XData32,(Display *dpy,register _Xconst long *data,unsigned len),(dpy,data,len),return)
++#else
+ SDL_X11_SYM(int,_XData32,(Display *dpy,register long *data,unsigned len),(dpy,data,len),return)
++#endif
+ SDL_X11_SYM(void,_XRead32,(Display *dpy,register long *data,long len),(dpy,data,len),)
+ #endif
+
diff --git a/media-libs/libsdl/files/libsdl-1.2.15-gamma.patch b/media-libs/libsdl/files/libsdl-1.2.15-gamma.patch
new file mode 100644
index 000000000000..a0582da9cecd
--- /dev/null
+++ b/media-libs/libsdl/files/libsdl-1.2.15-gamma.patch
@@ -0,0 +1,42 @@
+From 4b56fa058a45b7c804d1a5fcaf7a70db0bd0581c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <petr.pisar@atlas.cz>
+Date: Tue, 1 Jan 2013 21:25:15 +0100
+Subject: [PATCH] x11: Bypass SetGammaRamp when changing gamma
+
+Recent Xorg has broken dynamic colors setting, so calling SDL_SetGamme()
+does not have any effect here. Recent means xorg-server >= 1.7, since 2010.
+See <https://bugs.freedesktop.org/show_bug.cgi?id=27222>.
+---
+ src/video/SDL_gamma.c | 15 ++-------------
+ 1 files changed, 2 insertions(+), 13 deletions(-)
+
+--- a/src/video/SDL_gamma.c
++++ b/src/video/SDL_gamma.c
+@@ -92,22 +92,11 @@ static void CalculateGammaFromRamp(float *gamma, Uint16 *ramp)
+
+ int SDL_SetGamma(float red, float green, float blue)
+ {
+- int succeeded;
++ int succeeded = -1;
+ SDL_VideoDevice *video = current_video;
+ SDL_VideoDevice *this = current_video;
+
+- succeeded = -1;
+- /* Prefer using SetGammaRamp(), as it's more flexible */
+- {
+- Uint16 ramp[3][256];
+-
+- CalculateGammaRamp(red, ramp[0]);
+- CalculateGammaRamp(green, ramp[1]);
+- CalculateGammaRamp(blue, ramp[2]);
+- succeeded = SDL_SetGammaRamp(ramp[0], ramp[1], ramp[2]);
+- }
+- if ( (succeeded < 0) && video->SetGamma ) {
+- SDL_ClearError();
++ if ( video->SetGamma ) {
+ succeeded = video->SetGamma(this, red, green, blue);
+ }
+ return succeeded;
+--
+1.7.8.6
+
diff --git a/media-libs/libsdl/files/libsdl-1.2.15-joystick.patch b/media-libs/libsdl/files/libsdl-1.2.15-joystick.patch
new file mode 100644
index 000000000000..70e585e50132
--- /dev/null
+++ b/media-libs/libsdl/files/libsdl-1.2.15-joystick.patch
@@ -0,0 +1,13 @@
+--- src/joystick/linux/SDL_sysjoystick.c.org
++++ src/joystick/linux/SDL_sysjoystick.c
+@@ -1106,6 +1106,10 @@ static __inline__ void EV_HandleEvents(S
+ }
+ break;
+ case EV_ABS:
++ if (code >= ABS_MISC) {
++ break;
++ }
++
+ switch (code) {
+ case ABS_HAT0X:
+ case ABS_HAT0Y:
diff --git a/media-libs/libsdl/files/libsdl-1.2.15-resizing.patch b/media-libs/libsdl/files/libsdl-1.2.15-resizing.patch
new file mode 100644
index 000000000000..5112137a5a17
--- /dev/null
+++ b/media-libs/libsdl/files/libsdl-1.2.15-resizing.patch
@@ -0,0 +1,60 @@
+Description: Revert change that breaks window corner resizing
+ http://bugzilla.libsdl.org/show_bug.cgi?id=1430
+Author: Andrew Caudwell <acaudwell@gmail.com>
+Last-Update: 2012-04-10
+Bug-Debian: http://bugs.debian.org/665779
+
+--- a/src/video/x11/SDL_x11events.c
++++ b/src/video/x11/SDL_x11events.c
+@@ -57,12 +57,6 @@
+ static SDLKey MISC_keymap[256];
+ SDLKey X11_TranslateKeycode(Display *display, KeyCode kc);
+
+-/*
+- Pending resize target for ConfigureNotify (so outdated events don't
+- cause inappropriate resize events)
+-*/
+-int X11_PendingConfigureNotifyWidth = -1;
+-int X11_PendingConfigureNotifyHeight = -1;
+
+ #ifdef X_HAVE_UTF8_STRING
+ Uint32 Utf8ToUcs4(const Uint8 *utf8)
+@@ -825,16 +819,6 @@
+ #ifdef DEBUG_XEVENTS
+ printf("ConfigureNotify! (resize: %dx%d)\n", xevent.xconfigure.width, xevent.xconfigure.height);
+ #endif
+- if ((X11_PendingConfigureNotifyWidth != -1) &&
+- (X11_PendingConfigureNotifyHeight != -1)) {
+- if ((xevent.xconfigure.width != X11_PendingConfigureNotifyWidth) &&
+- (xevent.xconfigure.height != X11_PendingConfigureNotifyHeight)) {
+- /* Event is from before the resize, so ignore. */
+- break;
+- }
+- X11_PendingConfigureNotifyWidth = -1;
+- X11_PendingConfigureNotifyHeight = -1;
+- }
+ if ( SDL_VideoSurface ) {
+ if ((xevent.xconfigure.width != SDL_VideoSurface->w) ||
+ (xevent.xconfigure.height != SDL_VideoSurface->h)) {
+--- a/src/video/x11/SDL_x11events_c.h
++++ b/src/video/x11/SDL_x11events_c.h
+@@ -27,8 +27,3 @@
+ extern void X11_InitOSKeymap(_THIS);
+ extern void X11_PumpEvents(_THIS);
+ extern void X11_SetKeyboardState(Display *display, const char *key_vec);
+-
+-/* Variables to be exported */
+-extern int X11_PendingConfigureNotifyWidth;
+-extern int X11_PendingConfigureNotifyHeight;
+-
+--- a/src/video/x11/SDL_x11video.c
++++ b/src/video/x11/SDL_x11video.c
+@@ -1182,8 +1182,6 @@
+ current = NULL;
+ goto done;
+ }
+- X11_PendingConfigureNotifyWidth = width;
+- X11_PendingConfigureNotifyHeight = height;
+ } else {
+ if (X11_CreateWindow(this,current,width,height,bpp,flags) < 0) {
+ current = NULL;
diff --git a/media-libs/libsdl/files/libsdl-1.2.15-sdl-config.patch b/media-libs/libsdl/files/libsdl-1.2.15-sdl-config.patch
new file mode 100644
index 000000000000..f430428e6e90
--- /dev/null
+++ b/media-libs/libsdl/files/libsdl-1.2.15-sdl-config.patch
@@ -0,0 +1,20 @@
+Only output -L -rpath cruft if using a non-standard install location.
+
+Makes ABI / cross-compiling easier on the soul.
+
+--- sdl-config.in
++++ sdl-config.in
+@@ -44,7 +44,12 @@
+ echo -I@includedir@/SDL @SDL_CFLAGS@
+ ;;
+ @ENABLE_SHARED_TRUE@ --libs)
+-@ENABLE_SHARED_TRUE@ echo -L@libdir@ @SDL_RLD_FLAGS@ @SDL_LIBS@
++@ENABLE_SHARED_TRUE@ if test x"${prefix}" != x"/usr" ; then
++@ENABLE_SHARED_TRUE@ libdirs="-L@libdir@"
++@ENABLE_SHARED_TRUE@ else
++@ENABLE_SHARED_TRUE@ libdirs=""
++@ENABLE_SHARED_TRUE@ fi
++@ENABLE_SHARED_TRUE@ echo $libdirs @SDL_RLD_FLAGS@ @SDL_LIBS@
+ @ENABLE_SHARED_TRUE@ ;;
+ @ENABLE_STATIC_TRUE@@ENABLE_SHARED_TRUE@ --static-libs)
+ @ENABLE_STATIC_TRUE@@ENABLE_SHARED_FALSE@ --libs|--static-libs)
diff --git a/media-libs/libsdl/libsdl-1.2.15-r8.ebuild b/media-libs/libsdl/libsdl-1.2.15-r8.ebuild
new file mode 100644
index 000000000000..72a40da1db02
--- /dev/null
+++ b/media-libs/libsdl/libsdl-1.2.15-r8.ebuild
@@ -0,0 +1,142 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools flag-o-matic multilib toolchain-funcs eutils multilib-minimal
+
+DESCRIPTION="Simple Direct Media Layer"
+HOMEPAGE="http://www.libsdl.org/"
+SRC_URI="http://www.libsdl.org/release/SDL-${PV}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd"
+# WARNING:
+# If you turn on the custom-cflags use flag in USE and something breaks,
+# you pick up the pieces. Be prepared for bug reports to be marked INVALID.
+IUSE="oss alsa nas X dga xv xinerama fbcon tslib aalib opengl libcaca +sound +video +joystick custom-cflags pulseaudio static-libs"
+
+RDEPEND="
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ !<=app-emulation/emul-linux-x86-sdl-20140406
+ )
+ sound? ( >=media-libs/audiofile-0.3.5[${MULTILIB_USEDEP}] )
+ alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
+ nas? (
+ >=media-libs/nas-1.9.4[${MULTILIB_USEDEP}]
+ >=x11-libs/libXt-1.1.4[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ )
+ X? (
+ >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXrandr-1.4.2[${MULTILIB_USEDEP}]
+ )
+ aalib? ( >=media-libs/aalib-1.4_rc5-r6[${MULTILIB_USEDEP}] )
+ libcaca? ( >=media-libs/libcaca-0.99_beta18-r1[${MULTILIB_USEDEP}] )
+ opengl? (
+ >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}]
+ >=virtual/glu-9.0-r1[${MULTILIB_USEDEP}]
+ )
+ tslib? ( >=x11-libs/tslib-1.0-r3[${MULTILIB_USEDEP}] )
+ pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ nas? (
+ >=x11-proto/xextproto-7.2.1-r1[${MULTILIB_USEDEP}]
+ >=x11-proto/xproto-7.0.24[${MULTILIB_USEDEP}]
+ )
+ X? (
+ >=x11-proto/xextproto-7.2.1-r1[${MULTILIB_USEDEP}]
+ >=x11-proto/xproto-7.0.24[${MULTILIB_USEDEP}]
+ )
+ x86? ( || ( >=dev-lang/yasm-0.6.0 >=dev-lang/nasm-0.98.39-r3 ) )"
+
+S=${WORKDIR}/SDL-${PV}
+
+pkg_setup() {
+ if use custom-cflags ; then
+ ewarn "Since you've chosen to use possibly unsafe CFLAGS,"
+ ewarn "don't bother filing libsdl-related bugs until trying to remerge"
+ ewarn "libsdl without the custom-cflags use flag in USE."
+ fi
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-sdl-config.patch \
+ "${FILESDIR}"/${P}-resizing.patch \
+ "${FILESDIR}"/${P}-joystick.patch \
+ "${FILESDIR}"/${P}-bsd-joystick.patch \
+ "${FILESDIR}"/${P}-gamma.patch \
+ "${FILESDIR}"/${P}-const-xdata32.patch \
+ "${FILESDIR}"/${P}-caca.patch
+ AT_M4DIR="/usr/share/aclocal acinclude" eautoreconf
+}
+
+multilib_src_configure() {
+ local myconf=
+ if use !x86 ; then
+ myconf="${myconf} --disable-nasm"
+ else
+ myconf="${myconf} --enable-nasm"
+ fi
+ use custom-cflags || strip-flags
+ use sound || myconf="${myconf} --disable-audio"
+ use video \
+ && myconf="${myconf} --enable-video-dummy" \
+ || myconf="${myconf} --disable-video"
+ use joystick || myconf="${myconf} --disable-joystick"
+
+ ECONF_SOURCE="${S}" econf \
+ --disable-rpath \
+ --disable-arts \
+ --disable-esd \
+ --enable-events \
+ --enable-cdrom \
+ --enable-threads \
+ --enable-timers \
+ --enable-file \
+ --enable-cpuinfo \
+ --disable-alsa-shared \
+ --disable-esd-shared \
+ --disable-pulseaudio-shared \
+ --disable-arts-shared \
+ --disable-nas-shared \
+ --disable-osmesa-shared \
+ $(use_enable oss) \
+ $(use_enable alsa) \
+ $(use_enable pulseaudio) \
+ $(use_enable nas) \
+ $(use_enable X video-x11) \
+ $(use_enable dga) \
+ $(use_enable xv video-x11-xv) \
+ $(use_enable xinerama video-x11-xinerama) \
+ $(use_enable X video-x11-xrandr) \
+ $(use_enable dga video-dga) \
+ $(use_enable fbcon video-fbcon) \
+ --disable-video-ggi \
+ --disable-video-svga \
+ $(use_enable aalib video-aalib) \
+ $(use_enable libcaca video-caca) \
+ $(use_enable opengl video-opengl) \
+ --disable-video-ps3 \
+ $(use_enable tslib input-tslib) \
+ $(use_with X x) \
+ $(use_enable static-libs static) \
+ --disable-video-x11-xme \
+ --disable-video-directfb \
+ ${myconf}
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+}
+
+multilib_src_install_all() {
+ use static-libs || prune_libtool_files --all
+ dodoc BUGS CREDITS README README-SDL.txt README.HG TODO WhatsNew
+ dohtml -r ./
+}
diff --git a/media-libs/libsdl/libsdl-1.2.15-r9.ebuild b/media-libs/libsdl/libsdl-1.2.15-r9.ebuild
new file mode 100644
index 000000000000..3f44c27b2ae2
--- /dev/null
+++ b/media-libs/libsdl/libsdl-1.2.15-r9.ebuild
@@ -0,0 +1,143 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools flag-o-matic multilib toolchain-funcs eutils multilib-minimal
+
+DESCRIPTION="Simple Direct Media Layer"
+HOMEPAGE="http://www.libsdl.org/"
+SRC_URI="http://www.libsdl.org/release/SDL-${PV}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+# WARNING:
+# If you turn on the custom-cflags use flag in USE and something breaks,
+# you pick up the pieces. Be prepared for bug reports to be marked INVALID.
+IUSE="oss alsa nas X dga xv xinerama fbcon tslib aalib opengl libcaca +sound +video +joystick custom-cflags pulseaudio static-libs"
+
+RDEPEND="
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ !<=app-emulation/emul-linux-x86-sdl-20140406
+ )
+ sound? ( >=media-libs/audiofile-0.3.5[${MULTILIB_USEDEP}] )
+ alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
+ nas? (
+ >=media-libs/nas-1.9.4[${MULTILIB_USEDEP}]
+ >=x11-libs/libXt-1.1.4[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ )
+ X? (
+ >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXrandr-1.4.2[${MULTILIB_USEDEP}]
+ )
+ aalib? ( >=media-libs/aalib-1.4_rc5-r6[${MULTILIB_USEDEP}] )
+ libcaca? ( >=media-libs/libcaca-0.99_beta18-r1[${MULTILIB_USEDEP}] )
+ opengl? (
+ >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}]
+ >=virtual/glu-9.0-r1[${MULTILIB_USEDEP}]
+ )
+ tslib? ( >=x11-libs/tslib-1.0-r3[${MULTILIB_USEDEP}] )
+ pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ nas? (
+ >=x11-proto/xextproto-7.2.1-r1[${MULTILIB_USEDEP}]
+ >=x11-proto/xproto-7.0.24[${MULTILIB_USEDEP}]
+ )
+ X? (
+ >=x11-proto/xextproto-7.2.1-r1[${MULTILIB_USEDEP}]
+ >=x11-proto/xproto-7.0.24[${MULTILIB_USEDEP}]
+ )
+ x86? ( || ( >=dev-lang/yasm-0.6.0 >=dev-lang/nasm-0.98.39-r3 ) )"
+
+S=${WORKDIR}/SDL-${PV}
+
+pkg_setup() {
+ if use custom-cflags ; then
+ ewarn "Since you've chosen to use possibly unsafe CFLAGS,"
+ ewarn "don't bother filing libsdl-related bugs until trying to remerge"
+ ewarn "libsdl without the custom-cflags use flag in USE."
+ fi
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-sdl-config.patch \
+ "${FILESDIR}"/${P}-resizing.patch \
+ "${FILESDIR}"/${P}-joystick.patch \
+ "${FILESDIR}"/${P}-bsd-joystick.patch \
+ "${FILESDIR}"/${P}-gamma.patch \
+ "${FILESDIR}"/${P}-const-xdata32.patch \
+ "${FILESDIR}"/${P}-caca.patch \
+ "${FILESDIR}"/${P}-SDL_EnableUNICODE.patch
+ AT_M4DIR="/usr/share/aclocal acinclude" eautoreconf
+}
+
+multilib_src_configure() {
+ local myconf=
+ if use !x86 ; then
+ myconf="${myconf} --disable-nasm"
+ else
+ myconf="${myconf} --enable-nasm"
+ fi
+ use custom-cflags || strip-flags
+ use sound || myconf="${myconf} --disable-audio"
+ use video \
+ && myconf="${myconf} --enable-video-dummy" \
+ || myconf="${myconf} --disable-video"
+ use joystick || myconf="${myconf} --disable-joystick"
+
+ ECONF_SOURCE="${S}" econf \
+ --disable-rpath \
+ --disable-arts \
+ --disable-esd \
+ --enable-events \
+ --enable-cdrom \
+ --enable-threads \
+ --enable-timers \
+ --enable-file \
+ --enable-cpuinfo \
+ --disable-alsa-shared \
+ --disable-esd-shared \
+ --disable-pulseaudio-shared \
+ --disable-arts-shared \
+ --disable-nas-shared \
+ --disable-osmesa-shared \
+ $(use_enable oss) \
+ $(use_enable alsa) \
+ $(use_enable pulseaudio) \
+ $(use_enable nas) \
+ $(use_enable X video-x11) \
+ $(use_enable dga) \
+ $(use_enable xv video-x11-xv) \
+ $(use_enable xinerama video-x11-xinerama) \
+ $(use_enable X video-x11-xrandr) \
+ $(use_enable dga video-dga) \
+ $(use_enable fbcon video-fbcon) \
+ --disable-video-ggi \
+ --disable-video-svga \
+ $(use_enable aalib video-aalib) \
+ $(use_enable libcaca video-caca) \
+ $(use_enable opengl video-opengl) \
+ --disable-video-ps3 \
+ $(use_enable tslib input-tslib) \
+ $(use_with X x) \
+ $(use_enable static-libs static) \
+ --disable-video-x11-xme \
+ --disable-video-directfb \
+ ${myconf}
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+}
+
+multilib_src_install_all() {
+ use static-libs || prune_libtool_files --all
+ dodoc BUGS CREDITS README README-SDL.txt README.HG TODO WhatsNew
+ dohtml -r ./
+}
diff --git a/media-libs/libsdl/metadata.xml b/media-libs/libsdl/metadata.xml
new file mode 100644
index 000000000000..32c5821fcc2f
--- /dev/null
+++ b/media-libs/libsdl/metadata.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <longdescription>
+Simple DirectMedia Layer is a cross-platform multimedia library designed
+to provide low level access to audio, keyboard, mouse, joystick, 3D
+hardware via OpenGL, and 2D video framebuffer. It is used by MPEG
+playback software, emulators, and many popular games, including the
+award winning Linux port of "Civilization: Call To Power."
+
+Simple DirectMedia Layer supports Linux, Windows, BeOS, MacOS Classic,
+MacOS X, FreeBSD, OpenBSD, BSD/OS, Solaris, IRIX, and QNX. There is also
+code, but no official support, for Windows CE, AmigaOS, Dreamcast,
+Atari, NetBSD, AIX, OSF/Tru64, RISC OS, and SymbianOS.
+
+SDL is written in C, but works with C++ natively, and has bindings to
+several other languages, including Ada, Eiffel, Java, Lua, ML, Perl,
+PHP, Pike, Python, and Ruby.
+</longdescription>
+ <use>
+ <flag name="joystick">Control joystick support (disable at your own risk)</flag>
+ <flag name="sound">Control audio support (disable at your own risk)</flag>
+ <flag name="tslib">Build with tslib support for touchscreen devices</flag>
+ <flag name="video">Control video support (disable at your own risk)</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/libsdl2/Manifest b/media-libs/libsdl2/Manifest
new file mode 100644
index 000000000000..0cc148166190
--- /dev/null
+++ b/media-libs/libsdl2/Manifest
@@ -0,0 +1 @@
+DIST SDL2-2.0.3.tar.gz 3871267 SHA256 a5a69a6abf80bcce713fa873607735fe712f44276a7f048d60a61bb2f6b3c90c SHA512 b6d2485154fbc07ab86a4305485e116d35fac25a97033b9e1c65ee0eb8251a18209cb1de3a914d9c0ddc53aa1ffac66c865b111d218e79eb5a10ed00dfec7540 WHIRLPOOL d88658953cb668b8d4167b799b4a2e9b90a426fddd0cdddb4914420063e5768c609c2b4a954b50c14cbc5728894646db6bad0e5244ef6a563d4e2ec3da26298b
diff --git a/media-libs/libsdl2/files/libsdl2-2.0.3-gles-wayland.patch b/media-libs/libsdl2/files/libsdl2-2.0.3-gles-wayland.patch
new file mode 100644
index 000000000000..e71f46533831
--- /dev/null
+++ b/media-libs/libsdl2/files/libsdl2-2.0.3-gles-wayland.patch
@@ -0,0 +1,59 @@
+# HG changeset patch
+# User Gabriel Jacobo <gabomdq@gmail.com>
+# Date 1400020960 10800
+# Node ID 3e2b3019a879f2efd846a6c04b55c20fc2752238
+# Parent 83077b1f989a44670a69286848034d7f4999b8fe
+Fixes #2541, build failure with Wayland enabled, OpenGL ES disabled
+
+Also includes an attempt at fixing building SDL on Ubuntu 13.10, which hopefully
+won't break 14.04
+
+diff -r 83077b1f989a -r 3e2b3019a879 configure.in
+--- a/configure.in Tue May 13 12:10:37 2014 -0700
++++ b/configure.in Tue May 13 19:42:40 2014 -0300
+@@ -1174,7 +1174,9 @@
+ AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+ AC_MSG_CHECKING(for Wayland support)
+ video_wayland=no
+- if test x$PKG_CONFIG != xno; then
++ if test x$PKG_CONFIG != xno && \
++ test x$video_opengl_egl = xyes && \
++ test x$video_opengles_v2 = xyes; then
+ if $PKG_CONFIG --exists wayland-client wayland-egl wayland-cursor egl xkbcommon ; then
+ WAYLAND_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl wayland-cursor xkbcommon`
+ WAYLAND_LIBS=`$PKG_CONFIG --libs wayland-client wayland-egl wayland-cursor xkbcommon`
+@@ -1256,7 +1258,18 @@
+ if $PKG_CONFIG --exists mirclient egl xkbcommon ; then
+ MIR_CFLAGS=`$PKG_CONFIG --cflags mirclient egl xkbcommon`
+ MIR_LIBS=`$PKG_CONFIG --libs mirclient egl xkbcommon`
++ save_CFLAGS="$CFLAGS"
++ CFLAGS="$save_CFLAGS $MIR_CFLAGS"
++
++ dnl This will disable Mir on Ubuntu < 14.04
++ AC_TRY_COMPILE([
++ #include <mir_toolkit/mir_client_library.h>
++ ],[
++ MirMotionToolType tool = mir_motion_tool_type_mouse;
++ ],[
+ video_mir=yes
++ ])
++ CFLAGS="$save_CFLAGS"
+ fi
+ fi
+ AC_MSG_RESULT($video_mir)
+@@ -2691,12 +2704,12 @@
+ CheckNAS
+ CheckSNDIO
+ CheckX11
+- CheckWayland
+- CheckMir
+ CheckDirectFB
+ CheckFusionSound
+ CheckOpenGLX11
+ CheckOpenGLESX11
++ CheckMir
++ CheckWayland
+ CheckLibUDev
+ CheckDBus
+ CheckInputEvents
+
diff --git a/media-libs/libsdl2/files/libsdl2-2.0.3-static-libs.patch b/media-libs/libsdl2/files/libsdl2-2.0.3-static-libs.patch
new file mode 100644
index 000000000000..e4823e1b0531
--- /dev/null
+++ b/media-libs/libsdl2/files/libsdl2-2.0.3-static-libs.patch
@@ -0,0 +1,89 @@
+--- SDL2-2.0.2.orig/Makefile.in
++++ SDL2-2.0.2/Makefile.in
+@@ -33,10 +33,10 @@
+ OBJECTS = @OBJECTS@
+ VERSION_OBJECTS = @VERSION_OBJECTS@
+
+-SDLMAIN_TARGET = libSDL2main.a
++SDLMAIN_TARGET = libSDL2main.la
+ SDLMAIN_OBJECTS = @SDLMAIN_OBJECTS@
+
+-SDLTEST_TARGET = libSDL2_test.a
++SDLTEST_TARGET = libSDL2_test.la
+ SDLTEST_OBJECTS = @SDLTEST_OBJECTS@
+
+ SRC_DIST = *.txt acinclude Android.mk autogen.sh android-project build-scripts cmake configure configure.in debian include Makefile.* sdl2-config.in sdl2.m4 sdl2.pc.in SDL2.spec.in src test VisualC.html VisualC Xcode Xcode-iOS
+@@ -123,15 +123,13 @@
+ .PHONY: all update-revision install install-bin install-hdrs install-lib install-data uninstall uninstall-bin uninstall-hdrs uninstall-lib uninstall-data clean distclean dist $(OBJECTS:.lo=.d)
+
+ $(objects)/$(TARGET): $(OBJECTS) $(VERSION_OBJECTS)
+- $(LIBTOOL) --mode=link $(CC) -o $@ $(OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
++ $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
+
+ $(objects)/$(SDLMAIN_TARGET): $(SDLMAIN_OBJECTS)
+- $(AR) cru $@ $(SDLMAIN_OBJECTS)
+- $(RANLIB) $@
++ $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS) -all-static
+
+ $(objects)/$(SDLTEST_TARGET): $(SDLTEST_OBJECTS)
+- $(AR) cru $@ $(SDLTEST_OBJECTS)
+- $(RANLIB) $@
++ $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS) -all-static
+
+ install: all install-bin install-hdrs install-lib install-data
+ install-bin:
+@@ -152,10 +150,8 @@
+ install-lib: $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLTEST_TARGET)
+ $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)
+ $(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(TARGET) $(DESTDIR)$(libdir)/$(TARGET)
+- $(INSTALL) -m 644 $(objects)/$(SDLMAIN_TARGET) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
+- $(RANLIB) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
+- $(INSTALL) -m 644 $(objects)/$(SDLTEST_TARGET) $(DESTDIR)$(libdir)/$(SDLTEST_TARGET)
+- $(RANLIB) $(DESTDIR)$(libdir)/$(SDLTEST_TARGET)
++ $(LIBTOOL) --mode=install $(INSTALL) -m 644 $(objects)/$(SDLMAIN_TARGET) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
++ $(LIBTOOL) --mode=install $(INSTALL) -m 644 $(objects)/$(SDLTEST_TARGET) $(DESTDIR)$(libdir)/$(SDLTEST_TARGET)
+ install-data:
+ $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(datadir)/aclocal
+ $(INSTALL) -m 644 $(srcdir)/sdl2.m4 $(DESTDIR)$(datadir)/aclocal/sdl2.m4
+--- SDL2-2.0.2.orig/configure.in
++++ SDL2-2.0.2/configure.in
+@@ -2858,7 +2858,7 @@
+ if test -f /lib/w32api/libuuid.a; then
+ LIBUUID=/lib/w32api/libuuid.a
+ else
+- LIBUUID=-luuid
++ LIBUUID=-Wl,-luuid
+ fi
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lversion $LIBUUID -XCClinker -static-libgcc"
+ # The Windows platform requires special setup
+@@ -3132,23 +3132,23 @@
+
+ VERSION_OBJECTS=`echo $VERSION_SOURCES`
+ VERSION_DEPENDS=`echo $VERSION_SOURCES`
+-VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.rc,$(objects)/\1.o,g'`
++VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.rc,$(objects)/\1.lo,g'`
+ VERSION_DEPENDS=`echo "$VERSION_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.rc,\\\\
+-\\$(objects)/\\2.o: \\1/\\2.rc\\\\
+- \\$(WINDRES) \\$< \\$@,g"`
++\\$(objects)/\\2.lo: \\1/\\2.rc\\\\
++ \\$(LIBTOOL) --mode=compile --tag=RC \\$(WINDRES) -i \\$< -o \\$@,g"`
+
+ SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES`
+ SDLMAIN_DEPENDS=`echo $SDLMAIN_SOURCES`
+-SDLMAIN_OBJECTS=`echo "$SDLMAIN_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.o,g'`
++SDLMAIN_OBJECTS=`echo "$SDLMAIN_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'`
+ SDLMAIN_DEPENDS=`echo "$SDLMAIN_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.c,\\\\
+-\\$(objects)/\\2.o: \\1/\\2.c\\\\
++\\$(objects)/\\2.lo: \\1/\\2.c\\\\
+ \\$(LIBTOOL) --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
+
+ SDLTEST_OBJECTS=`echo $SDLTEST_SOURCES`
+ SDLTEST_DEPENDS=`echo $SDLTEST_SOURCES`
+-SDLTEST_OBJECTS=`echo "$SDLTEST_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.o,g'`
++SDLTEST_OBJECTS=`echo "$SDLTEST_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'`
+ SDLTEST_DEPENDS=`echo "$SDLTEST_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.c,\\\\
+-\\$(objects)/\\2.o: \\1/\\2.c\\\\
++\\$(objects)/\\2.lo: \\1/\\2.c\\\\
+ \\$(LIBTOOL) --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
+
+ # Set runtime shared library paths as needed
diff --git a/media-libs/libsdl2/libsdl2-2.0.3-r200.ebuild b/media-libs/libsdl2/libsdl2-2.0.3-r200.ebuild
new file mode 100644
index 000000000000..42b779d965aa
--- /dev/null
+++ b/media-libs/libsdl2/libsdl2-2.0.3-r200.ebuild
@@ -0,0 +1,148 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# TODO: convert FusionSound #484250
+
+EAPI=5
+inherit autotools flag-o-matic toolchain-funcs eutils multilib-minimal
+
+MY_P=SDL2-${PV}
+DESCRIPTION="Simple Direct Media Layer"
+HOMEPAGE="http://www.libsdl.org"
+SRC_URI="http://www.libsdl.org/release/${MY_P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm ~hppa ~ppc64 x86"
+
+IUSE="cpu_flags_x86_3dnow alsa altivec custom-cflags dbus fusionsound gles haptic +joystick cpu_flags_x86_mmx nas opengl oss pulseaudio +sound cpu_flags_x86_sse cpu_flags_x86_sse2 static-libs +threads tslib udev +video wayland X xinerama xscreensaver"
+REQUIRED_USE="
+ alsa? ( sound )
+ fusionsound? ( sound )
+ gles? ( video )
+ nas? ( sound )
+ opengl? ( video )
+ pulseaudio? ( sound )
+ xinerama? ( X )
+ xscreensaver? ( X )"
+
+RDEPEND="
+ alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
+ dbus? ( >=sys-apps/dbus-1.6.18-r1[${MULTILIB_USEDEP}] )
+ fusionsound? ( || ( >=media-libs/FusionSound-1.1.1 >=dev-libs/DirectFB-1.7.1[fusionsound] ) )
+ gles? ( >=media-libs/mesa-9.1.6[${MULTILIB_USEDEP},gles2] )
+ nas? ( >=media-libs/nas-1.9.4[${MULTILIB_USEDEP}] )
+ opengl? (
+ >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}]
+ >=virtual/glu-9.0-r1[${MULTILIB_USEDEP}]
+ )
+ pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] )
+ tslib? ( >=x11-libs/tslib-1.0-r3[${MULTILIB_USEDEP}] )
+ udev? ( >=virtual/libudev-208:=[${MULTILIB_USEDEP}] )
+ wayland? (
+ >=dev-libs/wayland-1.0.6[${MULTILIB_USEDEP}]
+ >=media-libs/mesa-9.1.6[${MULTILIB_USEDEP},wayland]
+ >=x11-libs/libxkbcommon-0.2.0[${MULTILIB_USEDEP}]
+ )
+ X? (
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXcursor-1.1.14[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXi-1.7.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXrandr-1.4.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXt-1.1.4[${MULTILIB_USEDEP}]
+ >=x11-libs/libXxf86vm-1.1.3[${MULTILIB_USEDEP}]
+ xinerama? ( >=x11-libs/libXinerama-1.1.3[${MULTILIB_USEDEP}] )
+ xscreensaver? ( >=x11-libs/libXScrnSaver-1.2.2-r1[${MULTILIB_USEDEP}] )
+ )"
+DEPEND="${RDEPEND}
+ X? (
+ >=x11-proto/xextproto-7.2.1-r1[${MULTILIB_USEDEP}]
+ >=x11-proto/xproto-7.0.24[${MULTILIB_USEDEP}]
+ )
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ # https://bugzilla.libsdl.org/show_bug.cgi?id=1431
+ epatch "${FILESDIR}"/${P}-static-libs.patch \
+ "${FILESDIR}"/${P}-gles-wayland.patch
+ AT_M4DIR="/usr/share/aclocal acinclude" eautoreconf
+}
+
+multilib_src_configure() {
+ use custom-cflags || strip-flags
+
+ # sorted by `./configure --help`
+ ECONF_SOURCE="${S}" econf \
+ $(use_enable static-libs static) \
+ $(use_enable sound audio) \
+ $(use_enable video) \
+ --enable-render \
+ --enable-events \
+ $(use_enable joystick) \
+ $(use_enable haptic) \
+ --enable-power \
+ $(use_enable threads) \
+ --enable-timers \
+ --enable-file \
+ --disable-loadso \
+ --enable-cpuinfo \
+ --enable-atomic \
+ --enable-assembly \
+ $(use_enable cpu_flags_x86_sse ssemath) \
+ $(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 oss) \
+ $(use_enable alsa) \
+ --disable-alsa-shared \
+ --disable-esd \
+ $(use_enable pulseaudio) \
+ --disable-pulseaudio-shared \
+ --disable-arts \
+ $(use_enable nas) \
+ --disable-nas-shared \
+ --disable-sndio \
+ --disable-sndio-shared \
+ $(use_enable sound diskaudio) \
+ $(use_enable sound dummyaudio) \
+ $(use_enable X video-x11) \
+ --disable-x11-shared \
+ $(use_enable wayland video-wayland) \
+ --disable-wayland-shared \
+ $(use_enable X video-x11-xcursor) \
+ $(use_enable xinerama video-x11-xinerama) \
+ $(use_enable X video-x11-xinput) \
+ $(use_enable X video-x11-xrandr) \
+ $(use_enable xscreensaver video-x11-scrnsaver) \
+ $(use_enable X video-x11-xshape) \
+ $(use_enable X video-x11-vm) \
+ --disable-video-cocoa \
+ --disable-video-directfb \
+ $(multilib_native_use_enable fusionsound) \
+ --disable-fusionsound-shared \
+ $(use_enable video video-dummy) \
+ $(use_enable opengl video-opengl) \
+ $(use_enable gles video-opengles) \
+ $(use_enable udev libudev) \
+ $(use_enable dbus) \
+ $(use_enable tslib input-tslib) \
+ --disable-directx \
+ --disable-rpath \
+ --disable-render-d3d \
+ $(use_with X x)
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+}
+
+multilib_src_install_all() {
+ use static-libs || prune_libtool_files
+ dodoc {BUGS,CREDITS,README,README-SDL,README-hg,TODO,WhatsNew}.txt
+}
diff --git a/media-libs/libsdl2/metadata.xml b/media-libs/libsdl2/metadata.xml
new file mode 100644
index 000000000000..008e512a52c7
--- /dev/null
+++ b/media-libs/libsdl2/metadata.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <longdescription>
+ Simple DirectMedia Layer is a cross-platform multimedia library
+ designed to provide low level access to audio, keyboard, mouse,
+ joystick, 3D hardware via OpenGL, and 2D video framebuffer. It is
+ used by MPEG playback software, emulators, and many popular games,
+ including the award winning Linux port of "Civilization: Call To
+ Power."
+
+ Simple DirectMedia Layer supports Linux, Windows, BeOS, MacOS
+ Classic, MacOS X, FreeBSD, OpenBSD, BSD/OS, Solaris, IRIX, and QNX.
+ There is also code, but no official support, for Windows CE,
+ AmigaOS, Dreamcast, Atari, NetBSD, AIX, OSF/Tru64, RISC OS, and
+ SymbianOS.
+
+ SDL is written in C, but works with C++ natively, and has bindings
+ to several other languages, including Ada, Eiffel, Java, Lua, ML,
+ Perl, PHP, Pike, Python, and Ruby.
+ </longdescription>
+ <use>
+ <flag name="fusionsound">use FusionSound audio driver</flag>
+ <flag name="gles">include OpenGL ES support</flag>
+ <flag name="haptic">Enable the haptic (force feedback) subsystem
+ </flag>
+ <flag name="joystick">Control joystick support
+ (disable at your own risk)</flag>
+ <flag name="sound">Control audio support (disable at your own risk)
+ </flag>
+ <flag name="tslib">Build with tslib support for touchscreen devices
+ </flag>
+ <flag name="video">Control video support (disable at your own risk)
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/libsfml/Manifest b/media-libs/libsfml/Manifest
new file mode 100644
index 000000000000..1fdea152c9e7
--- /dev/null
+++ b/media-libs/libsfml/Manifest
@@ -0,0 +1,2 @@
+DIST SFML-1.6-sdk-linux-32.tar.gz 12937755 SHA256 b1c18f9b99c54ebb4cd433792f33ed2b85c846cca28eb871a12b3191dc1532f8 SHA512 518121bf05ab8b1f4ad917eaca72951ff870e992f79e2b3da94baad762e7de63ce331cf4cade172e285015fb6fec501e25039c633be2f7b77d77b171dc29cb0a WHIRLPOOL fee6692123c394b4d67d1937756315daf7386bf8d0292bbeb94ba7db53552010e8f92187496ce9b72f6aad4922e5ea5da191ddaf9baf0f96a7b741a1d1d17f2e
+DIST libsfml-2.2.tar.gz 17614806 SHA256 543458923e35868c16ac70e5f4c3bf172e136af9820d7b546b52afc7f1fc77f5 SHA512 cf30d431afc19d0f0126f2879dcb4c81ff4f689ce1e7aab5c3f156e8a88cdd54574e60de6230a9a5f7793a6c41ac81d811c68a9f1971ce079dada8d281ca34a3 WHIRLPOOL 8ba9c968840839295707e92281ecbc5d88b8900bab85dac0e1a4d66a0b8521bca0d5c6b0d1d330a1191aedf073f9633c7ce8f6dcbef9f84e3fac8c61d9c7c96e
diff --git a/media-libs/libsfml/files/libsfml-1.6-deps-and-flags.patch b/media-libs/libsfml/files/libsfml-1.6-deps-and-flags.patch
new file mode 100644
index 000000000000..bd24ce5f9123
--- /dev/null
+++ b/media-libs/libsfml/files/libsfml-1.6-deps-and-flags.patch
@@ -0,0 +1,111 @@
+--- SFML-1.6/src/SFML/Audio/Makefile
++++ SFML-1.6/src/SFML/Audio/Makefile
+@@ -25,7 +25,7 @@
+ $(CPP) -o $@ -c $< $(CFLAGS)
+
+ $(OBJVORBIS): %.o: %.c
+- $(CC) -o $@ -c $< $(CFLAGSEXT)
++ $(CC) -o $@ -c $< $(CFLAGS)
+
+ .PHONY: clean mrproper
+
+--- SFML-1.6/src/SFML/Graphics/GraphicsContext.hpp
++++ SFML-1.6/src/SFML/Graphics/GraphicsContext.hpp
+@@ -30,7 +30,7 @@
+ ////////////////////////////////////////////////////////////
+ #include <SFML/Config.hpp>
+ #include <SFML/System/NonCopyable.hpp>
+-#include <SFML/Graphics/GLEW/glew.h>
++#include <GL/glew.h>
+ #include <iostream>
+ #include <string>
+
+--- SFML-1.6/src/SFML/Graphics/ImageLoader.cpp
++++ SFML-1.6/src/SFML/Graphics/ImageLoader.cpp
+@@ -28,11 +28,12 @@
+ #include <SFML/Graphics/ImageLoader.hpp>
+ extern "C"
+ {
+- #include <SFML/Graphics/libjpeg/jpeglib.h>
+- #include <SFML/Graphics/libjpeg/jerror.h>
++ #include <jpeglib.h>
++ #include <jerror.h>
+ }
+-#include <SFML/Graphics/libpng/png.h>
+ #include <SFML/Graphics/SOIL/SOIL.h>
++#include <png.h>
++#include <string.h>
+ #include <iostream>
+
+
+--- SFML-1.6/src/SFML/Graphics/Makefile
++++ SFML-1.6/src/SFML/Graphics/Makefile
+@@ -1,15 +1,7 @@
+ SRC = $(wildcard *.cpp)
+-SRCGLEW = $(wildcard ./GLEW/*.c)
+-SRCJPEG = $(wildcard ./libjpeg/*.c)
+-SRCPNG = $(wildcard ./libpng/*.c)
+ SRCSOIL = $(wildcard ./SOIL/*.c)
+-SRCZLIB = $(wildcard ./zlib/*.c)
+ OBJ = $(SRC:.cpp=.o)
+-OBJGLEW = $(SRCGLEW:.c=.o)
+-OBJJPEG = $(SRCJPEG:.c=.o)
+-OBJPNG = $(SRCPNG:.c=.o)
+ OBJSOIL = $(SRCSOIL:.c=.o)
+-OBJZLIB = $(SRCZLIB:.c=.o)
+
+ ifeq ($(STATIC), yes)
+ LIB = libsfml-graphics-s.a
+@@ -23,22 +15,22 @@
+
+ all: $(LIB)
+
+-libsfml-graphics-s.a: $(OBJ) $(OBJGLEW) $(OBJJPEG) $(OBJPNG) $(OBJSOIL) $(OBJZLIB)
+- $(AR) $(ARFLAGS) $(LIBNAME) $(OBJ) $(OBJGLEW) $(OBJJPEG) $(OBJPNG) $(OBJSOIL) $(OBJZLIB)
++libsfml-graphics-s.a: $(OBJ) $(OBJSOIL)
++ $(AR) $(ARFLAGS) $(LIBNAME) $(OBJ) $(OBJSOIL)
+
+-libsfml-graphics.so: $(OBJ) $(OBJGLEW) $(OBJJPEG) $(OBJPNG) $(OBJSOIL) $(OBJZLIB)
+- $(CPP) $(LDFLAGS) -Wl,-soname,$(LIB).$(VERSION) -o $(LIBNAME) $(OBJ) $(OBJGLEW) $(OBJJPEG) $(OBJPNG) $(OBJSOIL) $(OBJZLIB) -lfreetype -lX11 -lGL
++libsfml-graphics.so: $(OBJ) $(OBJSOIL)
++ $(CPP) $(LDFLAGS) -Wl,-soname,$(LIB).$(VERSION) -o $(LIBNAME) $(OBJ) $(OBJSOIL) -lGLEW -ljpeg -lpng -lz -lfreetype -lX11 -lGL
+
+ $(OBJ): %.o: %.cpp
+ $(CPP) -o $@ -c $< $(CFLAGS) -I/usr/include/freetype2
+
+-$(OBJGLEW) $(OBJJPEG) $(OBJPNG) $(OBJSOIL) $(OBJZLIB): %.o: %.c
+- $(CC) -o $@ -c $< $(CFLAGSEXT) -DSTBI_FAILURE_USERMSG
++$(OBJSOIL): %.o: %.c
++ $(CC) -o $@ -c $< $(CFLAGS) -DSTBI_FAILURE_USERMSG
+
+ .PHONY: clean mrproper
+
+ clean:
+- @rm -rf $(OBJ) $(OBJGLEW) $(OBJJPEG) $(OBJPNG) $(OBJSOIL) $(OBJZLIB)
++ @rm -rf $(OBJ) $(OBJSOIL)
+
+ mrproper: clean
+ @rm -rf $(LIBNAME)
+--- SFML-1.6/src/SFML/Makefile
++++ SFML-1.6/src/SFML/Makefile
+@@ -4,7 +4,7 @@
+ ifeq ($(DEBUGBUILD), yes)
+ DEBUGFLAGS = -g -DDEBUG
+ else
+- DEBUGFLAGS = -O2 -DNDEBUG
++ DEBUGFLAGS = -DNDEBUG
+ endif
+
+ ifeq ($(STATIC), no)
+@@ -17,9 +17,8 @@
+
+ export CC = gcc
+ export CPP = g++
+-export CFLAGS = -W -Wall -pedantic -I../../../include -I../../ $(DEBUGFLAGS) $(BUILDFLAGS)
+-export CFLAGSEXT = -I../../../include -I../.. $(DEBUGFLAGS) $(BUILDFLAGS)
+-export LDFLAGS = $(LINKFLAGS)
++export CFLAGS += -W -Wall -pedantic -I../../../include -I../../ $(DEBUGFLAGS) $(BUILDFLAGS)
++export LDFLAGS += $(LINKFLAGS)
+ export LIBPATH = ../../../lib
+ export VERSION = 1.6
+ export CP = cp
diff --git a/media-libs/libsfml/files/libsfml-1.6-destdir.patch b/media-libs/libsfml/files/libsfml-1.6-destdir.patch
new file mode 100644
index 000000000000..33a6f91bb6b6
--- /dev/null
+++ b/media-libs/libsfml/files/libsfml-1.6-destdir.patch
@@ -0,0 +1,112 @@
+--- SFML-1.6.orig/src/SFML/Audio/Makefile
++++ SFML-1.6/src/SFML/Audio/Makefile
+@@ -10,7 +10,7 @@
+ else
+ LIB = libsfml-audio.so
+ LIBNAME = $(LIBPATH)/$(LIB).$(VERSION)
+- INSTALL = && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB)
++ INSTALL = && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTDIR)/$(libdir)/$(LIB)
+ endif
+
+ all: $(LIB)
+@@ -36,4 +36,4 @@
+ @rm -rf $(LIBNAME)
+
+ install:
+- @($(CP) $(LIBNAME) $(DESTLIBDIR) $(INSTALL))
++ @($(CP) $(LIBNAME) $(DESTDIR)/$(libdir) $(INSTALL))
+--- SFML-1.6.orig/src/SFML/Graphics/Makefile
++++ SFML-1.6/src/SFML/Graphics/Makefile
+@@ -18,7 +18,7 @@
+ else
+ LIB = libsfml-graphics.so
+ LIBNAME = $(LIBPATH)/$(LIB).$(VERSION)
+- INSTALL = && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB)
++ INSTALL = && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTDIR)/$(libdir)/$(LIB)
+ endif
+
+ all: $(LIB)
+@@ -44,4 +44,4 @@
+ @rm -rf $(LIBNAME)
+
+ install:
+- @($(CP) $(LIBNAME) $(DESTLIBDIR) $(INSTALL))
++ @($(CP) $(LIBNAME) $(DESTDIR)/$(libdir) $(INSTALL))
+--- SFML-1.6.orig/src/SFML/Makefile
++++ SFML-1.6/src/SFML/Makefile
+@@ -28,8 +28,11 @@
+ export AR = ar
+ export ARFLAGS = rcs
+-export DESTDIR = /usr/local
+-export DESTLIBDIR = $(DESTDIR)/lib
+-export DESTINCDIR = $(DESTDIR)/include
++export DESTDIR =
++ifeq ($(origin prefix), undefined)
++ export prefix = /usr/local
++endif
++export libdir = $(prefix)/lib
++export includedir = $(prefix)/include
+
+ all: sfml-system sfml-window sfml-network sfml-graphics sfml-audio
+
+@@ -62,6 +66,6 @@
+ @(cd ./System && $(MAKE) $@ && cd ../Window && $(MAKE) $@ && cd ../Network && $(MAKE) $@ && cd ../Graphics && $(MAKE) $@ && cd ../Audio && $(MAKE) $@)
+
+ install:
+- @(mkdir -p $(DESTLIBDIR))
+- @(mkdir -p $(DESTINCDIR))
+- @(cd ./System && $(MAKE) $@ && cd ../Window && $(MAKE) $@ && cd ../Network && $(MAKE) $@ && cd ../Graphics && $(MAKE) $@ && cd ../Audio && $(MAKE) $@ && $(CP) -r ../../../include/SFML/ $(DESTINCDIR)/)
++ @(mkdir -p $(DESTDIR)/$(libdir))
++ @(mkdir -p $(DESTDIR)/$(includedir))
++ @(cd ./System && $(MAKE) $@ && cd ../Window && $(MAKE) $@ && cd ../Network && $(MAKE) $@ && cd ../Graphics && $(MAKE) $@ && cd ../Audio && $(MAKE) $@ && $(CP) -r ../../../include/SFML/ $(DESTDIR)/$(includedir)/)
+--- SFML-1.6.orig/src/SFML/Network/Makefile
++++ SFML-1.6/src/SFML/Network/Makefile
+@@ -8,7 +8,7 @@
+ else
+ LIB = libsfml-network.so
+ LIBNAME = $(LIBPATH)/$(LIB).$(VERSION)
+- INSTALL = && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB)
++ INSTALL = && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTDIR)/$(libdir)/$(LIB)
+ endif
+
+ all: $(LIB)
+@@ -31,4 +31,4 @@
+ @rm -rf $(LIBNAME)
+
+ install:
+- @($(CP) $(LIBNAME) $(DESTLIBDIR) $(INSTALL))
++ @($(CP) $(LIBNAME) $(DESTDIR)/$(libdir) $(INSTALL))
+--- SFML-1.6.orig/src/SFML/System/Makefile
++++ SFML-1.6/src/SFML/System/Makefile
+@@ -8,7 +8,7 @@
+ else
+ LIB = libsfml-system.so
+ LIBNAME = $(LIBPATH)/$(LIB).$(VERSION)
+- INSTALL = && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB)
++ INSTALL = && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTDIR)/$(libdir)/$(LIB)
+ endif
+
+ all: $(LIB)
+@@ -31,4 +31,4 @@
+ @rm -rf $(LIBNAME)
+
+ install:
+- @($(CP) $(LIBNAME) $(DESTLIBDIR) $(INSTALL))
++ @($(CP) $(LIBNAME) $(DESTDIR)/$(libdir) $(INSTALL))
+--- SFML-1.6.orig/src/SFML/Window/Makefile
++++ SFML-1.6/src/SFML/Window/Makefile
+@@ -9,7 +9,7 @@
+ else
+ LIB = libsfml-window.so
+ LIBNAME = $(LIBPATH)/$(LIB).$(VERSION)
+- INSTALL = && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB)
++ INSTALL = && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTDIR)/$(libdir)/$(LIB)
+ endif
+
+ all: $(LIB)
+@@ -32,4 +32,4 @@
+ @rm -rf $(LIBNAME)
+
+ install:
+- @($(CP) $(LIBNAME) $(DESTLIBDIR) $(INSTALL))
++ @($(CP) $(LIBNAME) $(DESTDIR)/$(libdir) $(INSTALL))
diff --git a/media-libs/libsfml/files/libsfml-1.6-gcc46.patch b/media-libs/libsfml/files/libsfml-1.6-gcc46.patch
new file mode 100644
index 000000000000..9b31d1b0e409
--- /dev/null
+++ b/media-libs/libsfml/files/libsfml-1.6-gcc46.patch
@@ -0,0 +1,11 @@
+--- SFML-1.6.old/include/SFML/System/Resource.hpp
++++ SFML-1.6/include/SFML/System/Resource.hpp
+@@ -29,7 +29,7 @@
+ // Headers
+ ////////////////////////////////////////////////////////////
+ #include <set>
+-
++#include <cstddef>
+
+ namespace sf
+ {
diff --git a/media-libs/libsfml/files/libsfml-1.6-gcc47.patch b/media-libs/libsfml/files/libsfml-1.6-gcc47.patch
new file mode 100644
index 000000000000..8608cf538d56
--- /dev/null
+++ b/media-libs/libsfml/files/libsfml-1.6-gcc47.patch
@@ -0,0 +1,11 @@
+--- SFML-1.6/src/SFML/Window/Linux/Joystick.cpp
++++ SFML-1.6/src/SFML/Window/Linux/Joystick.cpp
+@@ -27,7 +27,7 @@
+ ////////////////////////////////////////////////////////////
+ #include <SFML/Window/Joystick.hpp>
+ #include <sstream>
+-
++#include <unistd.h>
+
+ namespace sf
+ {
diff --git a/media-libs/libsfml/files/libsfml-1.6-libpng15.patch b/media-libs/libsfml/files/libsfml-1.6-libpng15.patch
new file mode 100644
index 000000000000..46be00ebd0e0
--- /dev/null
+++ b/media-libs/libsfml/files/libsfml-1.6-libpng15.patch
@@ -0,0 +1,20 @@
+--- src/SFML/Graphics/ImageLoader.cpp
++++ src/SFML/Graphics/ImageLoader.cpp
+@@ -44,7 +44,7 @@
+ void PngErrorHandler(png_structp Png, png_const_charp Message)
+ {
+ std::cerr << "Failed to write PNG image. Reason : " << Message << std::endl;
+- longjmp(Png->jmpbuf, 1);
++ longjmp(png_jmpbuf(Png), 1);
+ }
+ }
+
+@@ -289,7 +289,7 @@
+ }
+
+ // For proper error handling...
+- if (setjmp(Png->jmpbuf))
++ if (setjmp(png_jmpbuf(Png)))
+ {
+ png_destroy_write_struct(&Png, &PngInfo);
+ return false;
diff --git a/media-libs/libsfml/files/libsfml-2.2-no-docs.patch b/media-libs/libsfml/files/libsfml-2.2-no-docs.patch
new file mode 100644
index 000000000000..ef69107c56f4
--- /dev/null
+++ b/media-libs/libsfml/files/libsfml-2.2-no-docs.patch
@@ -0,0 +1,15 @@
+--- SFML-2.2/CMakeLists.txt
++++ SFML-2.2/CMakeLists.txt
+@@ -239,12 +239,6 @@
+ COMPONENT devel)
+ endif()
+
+-install(FILES license.txt DESTINATION ${INSTALL_MISC_DIR})
+-install(FILES readme.txt DESTINATION ${INSTALL_MISC_DIR})
+-if(NOT SFML_OS_ANDROID)
+- install(FILES cmake/Modules/FindSFML.cmake DESTINATION ${INSTALL_MISC_DIR}/cmake/Modules)
+-endif()
+-
+ # install 3rd-party libraries and tools
+ if(SFML_OS_WINDOWS)
+
diff --git a/media-libs/libsfml/files/libsfml-2.2-shared-glew.patch b/media-libs/libsfml/files/libsfml-2.2-shared-glew.patch
new file mode 100644
index 000000000000..42c701e751cb
--- /dev/null
+++ b/media-libs/libsfml/files/libsfml-2.2-shared-glew.patch
@@ -0,0 +1,12 @@
+--- SFML-2.2/src/SFML/Graphics/CMakeLists.txt
++++ SFML-2.2/src/SFML/Graphics/CMakeLists.txt
+@@ -150,9 +150,6 @@
+ list(APPEND GRAPHICS_EXT_LIBS ${FREETYPE_LIBRARY} ${JPEG_LIBRARY})
+
+ # add preprocessor symbols
+-if(NOT SFML_OPENGL_ES)
+- add_definitions(-DGLEW_STATIC)
+-endif()
+ add_definitions(-DSTBI_FAILURE_USERMSG)
+
+ # ImageLoader.cpp must be compiled with the -fno-strict-aliasing
diff --git a/media-libs/libsfml/libsfml-1.6-r1.ebuild b/media-libs/libsfml/libsfml-1.6-r1.ebuild
new file mode 100644
index 000000000000..fc3cfb6d930c
--- /dev/null
+++ b/media-libs/libsfml/libsfml-1.6-r1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils multilib toolchain-funcs
+
+MY_P="SFML-${PV}"
+DESCRIPTION="Simple and Fast Multimedia Library (SFML)"
+HOMEPAGE="http://www.sfml-dev.org/"
+SRC_URI="mirror://sourceforge/sfml/${MY_P}-sdk-linux-32.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc examples static-libs"
+
+DEPEND="media-libs/freetype:2
+ media-libs/glew
+ >=media-libs/libpng-1.4
+ media-libs/libsndfile
+ media-libs/mesa
+ media-libs/openal
+ sys-libs/zlib
+ virtual/jpeg
+ x11-libs/libX11
+ x11-libs/libXrandr"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-destdir.patch \
+ "${FILESDIR}"/${P}-deps-and-flags.patch \
+ "${FILESDIR}"/${P}-gcc46.patch \
+ "${FILESDIR}"/${P}-gcc47.patch \
+ "${FILESDIR}"/${P}-libpng15.patch
+}
+
+src_compile() {
+ local myconf
+ use debug && myconf="$myconf DEBUGBUILD=yes"
+
+ emake $myconf CPP=$(tc-getCXX) CC=$(tc-getCC)
+ use static-libs && emake $myconf STATIC=yes CPP=$(tc-getCXX) CC=$(tc-getCC)
+}
+
+src_install() {
+ emake DESTDIR="${D}" prefix=/usr libdir=/usr/$(get_libdir) install
+
+ use static-libs && dolib.a lib/*.a
+ use doc && dohtml doc/html/*
+
+ if use examples ; then
+ docompress -x /usr/share/doc/${PF}/examples
+ local i
+ for i in ftp opengl pong post-fx qt sockets sound sound_capture voip window wxwidgets X11 ; do
+ insinto /usr/share/doc/${PF}/examples/$i
+ doins samples/$i/*
+ done
+ fi
+}
diff --git a/media-libs/libsfml/libsfml-2.2.ebuild b/media-libs/libsfml/libsfml-2.2.ebuild
new file mode 100644
index 000000000000..efc8506066d8
--- /dev/null
+++ b/media-libs/libsfml/libsfml-2.2.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils eutils
+
+MY_P=SFML-${PV}
+
+DESCRIPTION="Simple and Fast Multimedia Library (SFML)"
+HOMEPAGE="http://www.sfml-dev.org/ https://github.com/LaurentGomila/SFML"
+SRC_URI="https://github.com/LaurentGomila/SFML/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc examples"
+
+RDEPEND="media-libs/freetype:2
+ media-libs/glew:=
+ media-libs/libpng:0=
+ media-libs/libsndfile
+ media-libs/mesa
+ media-libs/openal
+ sys-libs/zlib
+ virtual/jpeg
+ virtual/udev
+ x11-libs/libX11
+ x11-libs/libXrandr"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )"
+
+DOCS="changelog.txt readme.txt"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-no-docs.patch
+ epatch "${FILESDIR}"/${P}-shared-glew.patch
+
+ sed -i "s:DESTINATION .*:DESTINATION /usr/share/doc/${PF}:" \
+ doc/CMakeLists.txt || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use doc SFML_BUILD_DOC)
+ -DSFML_INSTALL_PKGCONFIG_FILES=TRUE
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ insinto /usr/share/cmake/Modules
+ doins cmake/Modules/FindSFML.cmake
+
+ if use examples ; then
+ docompress -x /usr/share/doc/${PF}/examples
+ dodoc -r examples
+ find "${ED}"/usr/share/doc/${PF}/examples -name CMakeLists.txt -delete
+ fi
+}
diff --git a/media-libs/libsfml/metadata.xml b/media-libs/libsfml/metadata.xml
new file mode 100644
index 000000000000..c2d27e05d858
--- /dev/null
+++ b/media-libs/libsfml/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>radhermit@gentoo.org</email>
+ <name>Tim Harder</name>
+ </maintainer>
+ <longdescription lang="en">
+ The Simple and Fast Multimedia Library (SFML) is a portable and easy to use
+ multimedia API written in C++. You can see it as a modern, object-oriented
+ alternative to SDL. SFML is composed of several packages to suit your needs.
+ You can use SFML as a minimal windowing system to interface with OpenGL, or
+ as a fully-featured multimedia library for building games or interactive
+ programs.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">LaurentGomila/SFML</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libshout/Manifest b/media-libs/libshout/Manifest
new file mode 100644
index 000000000000..e80f9bde7aa2
--- /dev/null
+++ b/media-libs/libshout/Manifest
@@ -0,0 +1 @@
+DIST libshout-2.3.1.tar.gz 464229 SHA256 cf3c5f6b4a5e3fcfbe09fb7024aa88ad4099a9945f7cb037ec06bcee7a23926e SHA512 19c1421e654310ddbc25f343d205d921b7c3f1c9c97f028207deaf1a46150b7f6c8069d52b7a3c9ed72dda276b52237cf1208292fbfa09aa7d09f85072c46a7b WHIRLPOOL 7060612fc19735030d8da4ef340eb51ef6d3cbb44502a64ba68f87cc4031918e304bd1f317dfe5796937ef0eeed2dad13abaa622bdca774d65e23f5ae2a061fa
diff --git a/media-libs/libshout/files/libshout-2.3.1-underlinking.patch b/media-libs/libshout/files/libshout-2.3.1-underlinking.patch
new file mode 100644
index 000000000000..e9bb73678ae4
--- /dev/null
+++ b/media-libs/libshout/files/libshout-2.3.1-underlinking.patch
@@ -0,0 +1,13 @@
+http://bugs.gentoo.org/499458
+
+--- src/Makefile.am
++++ src/Makefile.am
+@@ -26,7 +26,7 @@
+ AM_CFLAGS = @XIPH_CFLAGS@
+
+ libshout_la_LIBADD = net/libicenet.la timing/libicetiming.la avl/libiceavl.la\
+- httpp/libicehttpp.la $(MAYBE_THREAD_LIB) $(THEORA_LIBS) $(VORBIS_LIBS) $(SPEEX_LIBS)
++ httpp/libicehttpp.la $(MAYBE_THREAD_LIB) $(OGG_LIBS) $(VORBIS_LIBS) $(THEORA_LIBS) $(SPEEX_LIBS)
+
+ INCLUDES = -I$(top_builddir)/include
+
diff --git a/media-libs/libshout/libshout-2.3.1-r1.ebuild b/media-libs/libshout/libshout-2.3.1-r1.ebuild
new file mode 100644
index 000000000000..8faf502dfc11
--- /dev/null
+++ b/media-libs/libshout/libshout-2.3.1-r1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils multilib-minimal
+
+DESCRIPTION="library for connecting and sending data to icecast servers"
+HOMEPAGE="http://www.icecast.org/"
+SRC_URI="http://downloads.xiph.org/releases/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="speex static-libs theora"
+
+RDEPEND=">=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
+ >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}]
+ speex? ( >=media-libs/speex-1.2_rc1-r1[${MULTILIB_USEDEP}] )
+ theora? ( >=media-libs/libtheora-1.1.1[${MULTILIB_USEDEP}] )
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20130224-r6
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-underlinking.patch
+ eautoreconf
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ $(use_enable static-libs static) \
+ $(use_enable theora) \
+ $(use_enable speex)
+}
+
+multilib_src_install_all() {
+ dodoc README examples/example.c
+ rm -rf "${ED}"/usr/share/doc/${PN}
+ prune_libtool_files
+}
diff --git a/media-libs/libshout/libshout-2.3.1.ebuild b/media-libs/libshout/libshout-2.3.1.ebuild
new file mode 100644
index 000000000000..71b078836a60
--- /dev/null
+++ b/media-libs/libshout/libshout-2.3.1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils
+
+DESCRIPTION="library for connecting and sending data to icecast servers"
+HOMEPAGE="http://www.icecast.org/"
+SRC_URI="http://downloads.xiph.org/releases/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sh sparc x86 ~x86-fbsd"
+IUSE="speex static-libs theora"
+
+RDEPEND="media-libs/libogg
+ media-libs/libvorbis
+ speex? ( media-libs/speex )
+ theora? ( media-libs/libtheora )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable theora) \
+ $(use_enable speex)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc README examples/example.c
+ rm -rf "${ED}"/usr/share/doc/${PN}
+ prune_libtool_files
+}
diff --git a/media-libs/libshout/metadata.xml b/media-libs/libshout/metadata.xml
new file mode 100644
index 000000000000..e1774e3d9ad7
--- /dev/null
+++ b/media-libs/libshout/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>sound</herd>
+</pkgmetadata>
diff --git a/media-libs/libsidplay/Manifest b/media-libs/libsidplay/Manifest
new file mode 100644
index 000000000000..7bb1714673f3
--- /dev/null
+++ b/media-libs/libsidplay/Manifest
@@ -0,0 +1,2 @@
+DIST libsidplay-1.36.59.tgz 390097 SHA256 3da9b38d4eb5bf9e936b9604ba92da0594ef38047d50cf806a8e11c400008024 SHA512 e7b0859e1389683d3e6aad7040b78ba37bb0a393c85f68ddb8a064371f978b34cc2e951ec564fa1117d12885cd976d10b02937e132d9a11badecd8652cf4d410 WHIRLPOOL 121e985c861454c8755c4c6fe8066936bc0149c89ca9197ee23d03657f4e87b48e8f1e2c9e26202b04a1291746782be62cff86f16384ce9a9a50f885af9f4279
+DIST sidplay-libs-2.1.1.tar.gz 1900252 SHA256 e9a24ada48215a46d2c232a70c5601bc9505e997f120e8f2ba3713e09e28d1f9 SHA512 754cd41f3d2d76754049522c395022bc090f99ea838e6d1ffb8d7689f3aedad9b3879be0312d0af49ba108563296c1176d1e533d1151d5b33368bfda0a1910e3 WHIRLPOOL 53b4bd66bbac0bfc29514981f34e19fac41bae356d06e727f3a0f2ad2bedcb1cd815d22656bcf06460e9d908a91433bbdea029805af43b1cd97310f230f1c89c
diff --git a/media-libs/libsidplay/files/65resid b/media-libs/libsidplay/files/65resid
new file mode 100644
index 000000000000..d534fb9286ec
--- /dev/null
+++ b/media-libs/libsidplay/files/65resid
@@ -0,0 +1 @@
+LDPATH="/usr/lib64/sidplay/builders:/usr/lib/sidplay/builders"
diff --git a/media-libs/libsidplay/files/libsidplay-1.36.59-gcc43.patch b/media-libs/libsidplay/files/libsidplay-1.36.59-gcc43.patch
new file mode 100644
index 000000000000..cc6810193b98
--- /dev/null
+++ b/media-libs/libsidplay/files/libsidplay-1.36.59-gcc43.patch
@@ -0,0 +1,38 @@
+--- src/sidtune.cpp
++++ src/sidtune.cpp
+@@ -306,11 +306,7 @@ udword sidTune::loadFile(const char* fileName, ubyte** bufferRef)
+ return 0;
+ }
+ // Open binary input file stream at end of file.
+-#if defined(SID_HAVE_IOS_BIN)
+- ifstream myIn( fileName, ios::in|ios::bin|ios::ate );
+-#else
+ ifstream myIn( fileName, ios::in|ios::binary|ios::ate );
+-#endif
+ // As a replacement for !is_open(), bad() and the NOT-operator
+ // don't seem to work on all systems.
+ #if defined(SID_DONT_HAVE_IS_OPEN)
+@@ -972,11 +968,7 @@ bool sidTune::saveC64dataFile( const char* fileName, bool overWriteFlag )
+ }
+ // Open binary output file stream.
+ else
+-#if defined(SID_HAVE_IOS_BIN)
+- fMyOut.open( fileName, ios::out|ios::bin|ios::trunc );
+-#else
+ fMyOut.open( fileName, ios::out|ios::binary|ios::trunc );
+-#endif
+ if ( !fMyOut )
+ {
+ info.statusString = text_cantCreateFile;
+@@ -1061,11 +1053,7 @@ bool sidTune::savePSIDfile( const char* fileName, bool overWriteFlag )
+ }
+ // Open binary output file stream.
+ else
+-#if defined(SID_HAVE_IOS_BIN)
+- fMyOut.open( fileName, ios::out|ios::bin|ios::trunc );
+-#else
+ fMyOut.open( fileName, ios::out|ios::binary|ios::trunc );
+-#endif
+ if ( !fMyOut )
+ {
+ info.statusString = text_cantCreateFile;
diff --git a/media-libs/libsidplay/files/libsidplay-2.1.1-fbsd.patch b/media-libs/libsidplay/files/libsidplay-2.1.1-fbsd.patch
new file mode 100644
index 000000000000..b2f4acd41a7c
--- /dev/null
+++ b/media-libs/libsidplay/files/libsidplay-2.1.1-fbsd.patch
@@ -0,0 +1,11 @@
+--- libsidutils/src/ini/ini.cpp
++++ libsidutils/src/ini/ini.cpp
+@@ -100,7 +100,7 @@
+ //*******************************************************************************************************************
+ #include <assert.h>
+ #include <ctype.h>
+-#include <malloc.h>
++#include <stdlib.h>
+ #include <stdio.h>
+ #include <string.h>
+
diff --git a/media-libs/libsidplay/files/libsidplay-2.1.1-gcc43.patch b/media-libs/libsidplay/files/libsidplay-2.1.1-gcc43.patch
new file mode 100644
index 000000000000..857a29750d11
--- /dev/null
+++ b/media-libs/libsidplay/files/libsidplay-2.1.1-gcc43.patch
@@ -0,0 +1,69 @@
+--- builders/resid-builder/src/resid.cpp
++++ builders/resid-builder/src/resid.cpp
+@@ -16,6 +16,8 @@
+ * *
+ ***************************************************************************/
+
++#include <cstring>
++
+ #include "config.h"
+
+ #ifdef HAVE_EXCEPTIONS
+--- builders/resid-builder/src/resid-builder.cpp
++++ builders/resid-builder/src/resid-builder.cpp
+@@ -37,6 +37,7 @@
+ ***************************************************************************/
+
+ #include <stdio.h>
++#include <cstring>
+
+ #include "config.h"
+ #ifdef HAVE_EXCEPTIONS
+--- builders/hardsid-builder/src/hardsid-builder.cpp
++++ builders/hardsid-builder/src/hardsid-builder.cpp
+@@ -47,6 +47,7 @@
+ ***************************************************************************/
+
+ #include <stdio.h>
++#include <cstring>
+ #include "config.h"
+
+ #ifdef HAVE_EXCEPTIONS
+--- libsidplay/src/sidtune/SidTune.cpp
++++ libsidplay/src/sidtune/SidTune.cpp
+@@ -283,7 +283,7 @@
+ uint_least32_t fileLen = 0;
+
+ // This sucks big time
+- openmode createAtrr = std::ios::in;
++ std::_Ios_Openmode createAtrr = std::ios::in;
+ #ifdef HAVE_IOS_NOCREATE
+ createAtrr |= std::ios::nocreate;
+ #endif
+@@ -952,7 +952,7 @@
+ if ( status )
+ {
+ // Open binary output file stream.
+- openmode createAttr = std::ios::out;
++ std::_Ios_Openmode createAttr = std::ios::out;
+ #if defined(HAVE_IOS_BIN)
+ createAttr |= std::ios::bin;
+ #else
+@@ -1002,7 +1002,7 @@
+ if ( status )
+ {
+ // Open ASCII output file stream.
+- openmode createAttr = std::ios::out;
++ std::_Ios_Openmode createAttr = std::ios::out;
+ if ( overWriteFlag )
+ createAttr |= std::ios::trunc;
+ else
+@@ -1036,7 +1036,7 @@
+ if ( status )
+ {
+ // Open binary output file stream.
+- openmode createAttr = std::ios::out;
++ std::_Ios_Openmode createAttr = std::ios::out;
+ #if defined(HAVE_IOS_BIN)
+ createAttr |= std::ios::bin;
+ #else
diff --git a/media-libs/libsidplay/files/libsidplay-2.1.1-no_libtool_reference.patch b/media-libs/libsidplay/files/libsidplay-2.1.1-no_libtool_reference.patch
new file mode 100644
index 000000000000..ee0564306a66
--- /dev/null
+++ b/media-libs/libsidplay/files/libsidplay-2.1.1-no_libtool_reference.patch
@@ -0,0 +1,18 @@
+--- libsidplay/unix/libsidplay2.pc.in
++++ libsidplay/unix/libsidplay2.pc.in
+@@ -7,5 +7,5 @@
+ Name: @PACKAGE@
+ Description: C64 cycle exact stereo sidplayer library.
+ Version: @VERSION@
+-Libs: ${libdir}/libsidplay2.la
++Libs: -lsidplay2
+ Cflags: -DHAVE_UNIX -I${includedir}
+--- libsidutils/unix/libsidutils.pc.in
++++ libsidutils/unix/libsidutils.pc.in
+@@ -6,5 +6,5 @@
+ Name: @PACKAGE@
+ Description: Utils for supporting the libsidplay2 library.
+ Version: @VERSION@
+-Libs: ${libdir}/libsidutils.la
++Libs: -lsidutils
+ Cflags: -DHAVE_UNIX -I${includedir}
diff --git a/media-libs/libsidplay/files/libsidplay-gcc34.patch b/media-libs/libsidplay/files/libsidplay-gcc34.patch
new file mode 100644
index 000000000000..bf59fc9c42b7
--- /dev/null
+++ b/media-libs/libsidplay/files/libsidplay-gcc34.patch
@@ -0,0 +1,26 @@
+--- src/smart.h
++++ src/smart.h
+@@ -207,16 +207,16 @@
+ {
+ if ( bufferLen >= 1 )
+ {
+- pBufCurrent = ( bufBegin = buffer );
+- bufEnd = bufBegin + bufferLen;
+- bufLen = bufferLen;
+- status = true;
++ this->pBufCurrent = ( this->bufBegin = buffer );
++ this->bufEnd = this->bufBegin + bufferLen;
++ this->bufLen = bufferLen;
++ this->status = true;
+ }
+ else
+ {
+- pBufCurrent = bufBegin = bufEnd = 0;
+- bufLen = 0;
+- status = false;
++ this->pBufCurrent = this->bufBegin = this->bufEnd = 0;
++ this->bufLen = 0;
++ this->status = false;
+ }
+ }
+ };
diff --git a/media-libs/libsidplay/files/libsidplay2-gcc41.patch b/media-libs/libsidplay/files/libsidplay2-gcc41.patch
new file mode 100644
index 000000000000..f2e3b314d493
--- /dev/null
+++ b/media-libs/libsidplay/files/libsidplay2-gcc41.patch
@@ -0,0 +1,37 @@
+--- libsidplay/include/sidplay/SmartPtr.h
++++ libsidplay/include/sidplay/SmartPtr.h
+@@ -211,16 +211,16 @@
+ {
+ if ( bufferLen >= 1 )
+ {
+- pBufCurrent = ( bufBegin = buffer );
+- bufEnd = bufBegin + bufferLen;
+- bufLen = bufferLen;
+- status = true;
++ this->pBufCurrent = ( this->bufBegin = buffer );
++ this->bufEnd = this->bufBegin + bufferLen;
++ this->bufLen = bufferLen;
++ this->status = true;
+ }
+ else
+ {
+- pBufCurrent = bufBegin = bufEnd = 0;
+- bufLen = 0;
+- status = false;
++ this->pBufCurrent = this->bufBegin = this->bufEnd = 0;
++ this->bufLen = 0;
++ this->status = false;
+ }
+ }
+ };
+--- libsidutils/include/sidplay/utils/SidUsage.h
++++ libsidutils/include/sidplay/utils/SidUsage.h
+@@ -33,7 +33,7 @@
+ uint_least16_t length; // usage scan length
+
+ // Copy common parts of basic usage to extended usage.
+- sid2_usage_t &sid2_usage_t::operator= (const sid_usage_t &usage)
++ sid2_usage_t &operator= (const sid_usage_t &usage)
+ {
+ *((sid_usage_t *) this) = usage;
+ return *this;
diff --git a/media-libs/libsidplay/libsidplay-1.36.59-r1.ebuild b/media-libs/libsidplay/libsidplay-1.36.59-r1.ebuild
new file mode 100644
index 000000000000..8b062da32058
--- /dev/null
+++ b/media-libs/libsidplay/libsidplay-1.36.59-r1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils libtool multilib-minimal
+
+DESCRIPTION="C64 SID player library"
+HOMEPAGE="http://critical.ch/distfiles/"
+SRC_URI="http://critical.ch/distfiles/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="1"
+KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd"
+IUSE="static-libs"
+RDEPEND="abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20130224-r6
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+
+DOCS=( AUTHORS DEVELOPER )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gcc43.patch
+ elibtoolize # required for fbsd .so versioning
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" \
+ econf $(use_enable static-libs static)
+}
+
+multilib_src_install_all() {
+ prune_libtool_files --all
+ einstalldocs
+}
diff --git a/media-libs/libsidplay/libsidplay-1.36.59.ebuild b/media-libs/libsidplay/libsidplay-1.36.59.ebuild
new file mode 100644
index 000000000000..770695cb0563
--- /dev/null
+++ b/media-libs/libsidplay/libsidplay-1.36.59.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils libtool
+
+DESCRIPTION="C64 SID player library"
+HOMEPAGE="http://critical.ch/distfiles/"
+SRC_URI="http://critical.ch/distfiles/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="1"
+KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd"
+IUSE="static-libs"
+
+DOCS="AUTHORS DEVELOPER"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gcc43.patch
+ elibtoolize # required for fbsd .so versioning
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ rm -f "${ED}"/usr/lib*/${PN}.la
+}
diff --git a/media-libs/libsidplay/libsidplay-2.1.1-r2.ebuild b/media-libs/libsidplay/libsidplay-2.1.1-r2.ebuild
new file mode 100644
index 000000000000..9f25f74ab914
--- /dev/null
+++ b/media-libs/libsidplay/libsidplay-2.1.1-r2.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils libtool
+
+MY_P=sidplay-libs-${PV}
+
+DESCRIPTION="C64 SID player library"
+HOMEPAGE="http://sidplay2.sourceforge.net/"
+SRC_URI="mirror://sourceforge/sidplay2/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="2"
+KEYWORDS="alpha amd64 hppa ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd"
+IUSE="static-libs"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}2-gcc41.patch \
+ "${FILESDIR}"/${P}-fbsd.patch \
+ "${FILESDIR}"/${P}-gcc43.patch
+
+ elibtoolize
+}
+
+src_configure() {
+ econf \
+ --enable-shared \
+ $(use_enable static-libs static) \
+ --with-pic
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ docinto libsidplay
+ dodoc libsidplay/{AUTHORS,ChangeLog,README,TODO}
+
+ docinto libsidutils
+ dodoc libsidutils/{AUTHORS,ChangeLog,README,TODO}
+
+ docinto resid
+ dodoc resid/{AUTHORS,ChangeLog,NEWS,README,THANKS,TODO}
+
+ doenvd "${FILESDIR}"/65resid
+
+ # Libs: -line of libsidutils.pc and libsidplay2.pc reference .la files!
+ # find "${ED}" -name '*.la' -exec rm -f {} +
+}
diff --git a/media-libs/libsidplay/libsidplay-2.1.1-r3.ebuild b/media-libs/libsidplay/libsidplay-2.1.1-r3.ebuild
new file mode 100644
index 000000000000..e5258364594c
--- /dev/null
+++ b/media-libs/libsidplay/libsidplay-2.1.1-r3.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils libtool
+
+MY_P=sidplay-libs-${PV}
+
+DESCRIPTION="C64 SID player library"
+HOMEPAGE="http://sidplay2.sourceforge.net/"
+SRC_URI="mirror://sourceforge/sidplay2/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="2"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="static-libs"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}2-gcc41.patch \
+ "${FILESDIR}"/${P}-fbsd.patch \
+ "${FILESDIR}"/${P}-gcc43.patch \
+ "${FILESDIR}"/${P}-no_libtool_reference.patch
+
+ elibtoolize
+}
+
+src_configure() {
+ econf \
+ --enable-shared \
+ $(use_enable static-libs static) \
+ --with-pic
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ docinto libsidplay
+ dodoc libsidplay/{AUTHORS,ChangeLog,README,TODO}
+
+ docinto libsidutils
+ dodoc libsidutils/{AUTHORS,ChangeLog,README,TODO}
+
+ docinto resid
+ dodoc resid/{AUTHORS,ChangeLog,NEWS,README,THANKS,TODO}
+
+ doenvd "${FILESDIR}"/65resid
+
+ find "${ED}" -name '*.la' -exec rm -f {} +
+}
diff --git a/media-libs/libsidplay/libsidplay-2.1.1-r4.ebuild b/media-libs/libsidplay/libsidplay-2.1.1-r4.ebuild
new file mode 100644
index 000000000000..99e72b3517a9
--- /dev/null
+++ b/media-libs/libsidplay/libsidplay-2.1.1-r4.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils libtool multilib-minimal
+
+MY_P=sidplay-libs-${PV}
+
+DESCRIPTION="C64 SID player library"
+HOMEPAGE="http://sidplay2.sourceforge.net/"
+SRC_URI="mirror://sourceforge/sidplay2/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="2"
+KEYWORDS="alpha amd64 ~arm hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="static-libs"
+RDEPEND="abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20130224-r6
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+
+S=${WORKDIR}/${MY_P}
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/sidplay/sidconfig.h
+)
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}2-gcc41.patch \
+ "${FILESDIR}"/${P}-fbsd.patch \
+ "${FILESDIR}"/${P}-gcc43.patch \
+ "${FILESDIR}"/${P}-no_libtool_reference.patch
+
+ elibtoolize
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ econf \
+ --enable-shared \
+ $(use_enable static-libs static) \
+ --with-pic
+}
+
+multilib_src_install_all() {
+ docinto libsidplay
+ dodoc libsidplay/{AUTHORS,ChangeLog,README,TODO}
+
+ docinto libsidutils
+ dodoc libsidutils/{AUTHORS,ChangeLog,README,TODO}
+
+ docinto resid
+ dodoc resid/{AUTHORS,ChangeLog,NEWS,README,THANKS,TODO}
+
+ doenvd "${FILESDIR}"/65resid
+
+ prune_libtool_files --all
+}
diff --git a/media-libs/libsidplay/metadata.xml b/media-libs/libsidplay/metadata.xml
new file mode 100644
index 000000000000..d58dafc788eb
--- /dev/null
+++ b/media-libs/libsidplay/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>hanno@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">sidplay2</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libsidplayfp/Manifest b/media-libs/libsidplayfp/Manifest
new file mode 100644
index 000000000000..09a8c50fea09
--- /dev/null
+++ b/media-libs/libsidplayfp/Manifest
@@ -0,0 +1,3 @@
+DIST libsidplayfp-0.3.8.tar.gz 682303 SHA256 5597a40b87c8b5adb23480f71fb15097e3d63be341c45029245a8ed50e0ecb30 SHA512 5a4cae8e7ca6c9ae514b7018b27c125e17dc6773db036dca7140e51d3021a4274348b791d72e6e277ac0d1fa3b20ba2b3a04bbccf574db178b1b28428f2099cc WHIRLPOOL 413b4baefcb45fb3911d9428b2cd154ca11f0a33ad91725cf2410b2d4e5b8d5ae24de9721e90fe41d60916477d59fc7b41538f17b7e183c721808c62db49c298
+DIST libsidplayfp-1.1.0.tar.gz 620228 SHA256 d1fa1ec68a1b4f1c8b5b27073e699a6a9d5484586a246b1cf706e9fc2d6d8e1f SHA512 fb0ce00d220772aaf97fc88b7ba3e764f1c94439c9d35713743726872cf6bc6524893489c5909be538f0630896bd328560c6b189d6d2d09932457671080ed76f WHIRLPOOL f3625612dcabe6e3f7f6e46203d56497fb6abdc2661acf05e99ca548332c412632c436a5533cb7fb8e39a5adfa9772d2858283279557fd8dc1c64b0bb1512ab1
+DIST libsidplayfp-1.8.0.tar.gz 669469 SHA256 86438034002384c3dfff2698db0c8c75b29df55a10eb28a33b38663433bc9fe7 SHA512 37af2e0f2a4b635797ce289cba33e0bbe9dea0ec2378da8b4e886f94a34fe09d2941c9deda9568e5325f7da6423f4a9820c814ec8d2970987f3cd03965147c52 WHIRLPOOL 55db147d1cd1f35f0781b9d0f3c6e34fb52cd8aa592a81c8f3121de7c2310d2ace2baa50179d9e5087196c0eaacba449155ff3b75b0a04abad570e6b3eab5396
diff --git a/media-libs/libsidplayfp/libsidplayfp-0.3.8.ebuild b/media-libs/libsidplayfp/libsidplayfp-0.3.8.ebuild
new file mode 100644
index 000000000000..051dd631407d
--- /dev/null
+++ b/media-libs/libsidplayfp/libsidplayfp-0.3.8.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+DESCRIPTION="A library for the sidplay2 fork with resid-fp"
+HOMEPAGE="http://sourceforge.net/projects/sidplay-residfp/"
+SRC_URI="mirror://sourceforge/sidplay-residfp/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static-libs"
+
+DOCS=( AUTHORS NEWS README TODO )
+
+src_prepare() {
+ # fix automagic. warning: modifying .ac triggers maintainer mode.
+ sed -i -e 's:doxygen:dIsAbLe&:' configure || die
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ prune_libtool_files
+}
diff --git a/media-libs/libsidplayfp/libsidplayfp-1.1.0.ebuild b/media-libs/libsidplayfp/libsidplayfp-1.1.0.ebuild
new file mode 100644
index 000000000000..9d02e8c78565
--- /dev/null
+++ b/media-libs/libsidplayfp/libsidplayfp-1.1.0.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="A library for the sidplay2 fork with resid-fp"
+HOMEPAGE="http://sourceforge.net/projects/sidplay-residfp/"
+SRC_URI="mirror://sourceforge/sidplay-residfp/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~hppa x86"
+IUSE="cpu_flags_x86_mmx static-libs"
+
+DOCS=( AUTHORS NEWS README TODO )
+
+src_prepare() {
+ # fix automagic. warning: modifying .ac triggers maintainer mode.
+ sed -i -e 's:doxygen:dIsAbLe&:' configure || die
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable cpu_flags_x86_mmx mmx)
+}
+
+src_install() {
+ default
+ prune_libtool_files
+}
diff --git a/media-libs/libsidplayfp/libsidplayfp-1.8.0.ebuild b/media-libs/libsidplayfp/libsidplayfp-1.8.0.ebuild
new file mode 100644
index 000000000000..99dd164426de
--- /dev/null
+++ b/media-libs/libsidplayfp/libsidplayfp-1.8.0.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 versionator
+
+DESCRIPTION="A library for the sidplay2 fork with resid-fp"
+HOMEPAGE="http://sourceforge.net/projects/sidplay-residfp/"
+SRC_URI="mirror://sourceforge/sidplay-residfp/${PN}/$(get_version_component_range 1-2)/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~x86"
+IUSE="cpu_flags_x86_mmx static-libs"
+
+DOCS=( AUTHORS NEWS README TODO )
+
+src_prepare() {
+ # fix automagic. warning: modifying .ac triggers maintainer mode.
+ sed -i -e 's:doxygen:dIsAbLe&:' configure || die
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable cpu_flags_x86_mmx mmx)
+}
+
+src_install() {
+ default
+ prune_libtool_files
+}
diff --git a/media-libs/libsidplayfp/metadata.xml b/media-libs/libsidplayfp/metadata.xml
new file mode 100644
index 000000000000..8c08b7258eec
--- /dev/null
+++ b/media-libs/libsidplayfp/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>sound</herd>
+ <upstream>
+ <remote-id type="sourceforge">sidplay-residfp</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libsixel/Manifest b/media-libs/libsixel/Manifest
new file mode 100644
index 000000000000..f9e751b0e15a
--- /dev/null
+++ b/media-libs/libsixel/Manifest
@@ -0,0 +1,2 @@
+DIST libsixel-1.4.12.tar.gz 4060158 SHA256 79ba3ed747aa5c02b28d16540bd399e9dfa897b824731584b664c6f9f3ef7148 SHA512 e210bff8a1944bdb0baa33e5cce402965bc82d776ed4e1a92ecc78063e9174ffa418ac7852560ccdddfdbca1fe215f34257efb42f36b5954ffa1d5f87c6d85fc WHIRLPOOL 396472c753b6fccdd69f62e95d5ba0d6d5c4eaf5f1e946f9142649ea8f222a71611250e4ce36cd5745f3a7ceddfaae2750cf0cb507e4ce5bc5225c4baeaea764
+DIST libsixel-1.4.13.tar.gz 4061302 SHA256 9f69097ee798807038c39345c5f596b2d12a22cef16690e701a0fab77cab7b63 SHA512 668ed894986473d63386f2c867029fa74e4f56b57a9ab993d93340a802aab1842359d7600950d95d11e47e41725c1e04284d6b5142e1263e8c7285dcbf344336 WHIRLPOOL 882a5b9280092d16940a6b0b85df8ea87e8fef87b773ce066555ae32b63ac68d991a1912d8311ce254c1f66ce4ca359b904e6c56c3c9a5df5bd955f07ab564a1
diff --git a/media-libs/libsixel/libsixel-1.4.12.ebuild b/media-libs/libsixel/libsixel-1.4.12.ebuild
new file mode 100644
index 000000000000..a002b935ad70
--- /dev/null
+++ b/media-libs/libsixel/libsixel-1.4.12.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit bash-completion-r1
+
+DESCRIPTION="A lightweight, fast implementation of DEC SIXEL graphics codec"
+HOMEPAGE="https://github.com/saitoha/libsixel"
+SRC_URI="https://github.com/saitoha/libsixel/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="curl gd gtk jpeg png"
+
+RDEPEND="curl? ( net-misc/curl )
+ gd? ( media-libs/gd )
+ gtk? ( x11-libs/gdk-pixbuf:2 )
+ jpeg? ( virtual/jpeg:0 )
+ png? ( media-libs/libpng:0 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_configure() {
+ econf \
+ --with-bashcompletiondir=$(get_bashcompdir) \
+ $(use_with curl libcurl) \
+ $(use_with gd) \
+ $(use_with gtk gdk-pixbuf2) \
+ $(use_with jpeg) \
+ $(use_with png)
+}
+
+src_test() {
+ emake test
+}
+
+src_install() {
+ default
+
+ docompress -x /usr/share/doc/${PF}/images
+ dodoc -r images
+}
diff --git a/media-libs/libsixel/libsixel-1.4.13.ebuild b/media-libs/libsixel/libsixel-1.4.13.ebuild
new file mode 100644
index 000000000000..6358dc9ccd95
--- /dev/null
+++ b/media-libs/libsixel/libsixel-1.4.13.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit bash-completion-r1
+
+DESCRIPTION="A lightweight, fast implementation of DEC SIXEL graphics codec"
+HOMEPAGE="https://github.com/saitoha/libsixel"
+SRC_URI="https://github.com/saitoha/libsixel/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ~ia64 ~x86"
+IUSE="curl gd gtk jpeg png"
+
+RDEPEND="curl? ( net-misc/curl )
+ gd? ( media-libs/gd )
+ gtk? ( x11-libs/gdk-pixbuf:2 )
+ jpeg? ( virtual/jpeg:0 )
+ png? ( media-libs/libpng:0 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_configure() {
+ econf \
+ --with-bashcompletiondir=$(get_bashcompdir) \
+ $(use_with curl libcurl) \
+ $(use_with gd) \
+ $(use_with gtk gdk-pixbuf2) \
+ $(use_with jpeg) \
+ $(use_with png)
+}
+
+src_test() {
+ emake test
+}
+
+src_install() {
+ default
+
+ docompress -x /usr/share/doc/${PF}/images
+ dodoc -r images
+}
diff --git a/media-libs/libsixel/metadata.xml b/media-libs/libsixel/metadata.xml
new file mode 100644
index 000000000000..3e259b9d2149
--- /dev/null
+++ b/media-libs/libsixel/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>hattya@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">saitoha/libsixel</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libsmf/Manifest b/media-libs/libsmf/Manifest
new file mode 100644
index 000000000000..4f3d1f9dfedc
--- /dev/null
+++ b/media-libs/libsmf/Manifest
@@ -0,0 +1 @@
+DIST libsmf-1.3.tar.gz 545850 SHA256 d3549f15de94ac8905ad365639ac6a2689cb1b51fdfa02d77fa6640001b18099 SHA512 3c383ec8f2fbe48ddab1008b3ecfe6941c38e33cfd963eabdf07f09c8c04c1b8758c8774b25672f70c29b570f2c250c795979d19b39c5027810b54b07035497d WHIRLPOOL 3ab67c19ce566afe0cd49ce8242f5a3126493f656da84818384e63d13853e2cfd2d0ed80314a6f0e62659299cd9baa6057ae000e481f1b8515e5c3e537b48a2c
diff --git a/media-libs/libsmf/libsmf-1.3.ebuild b/media-libs/libsmf/libsmf-1.3.ebuild
new file mode 100644
index 000000000000..5f9b4081449c
--- /dev/null
+++ b/media-libs/libsmf/libsmf-1.3.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit autotools-utils
+
+DESCRIPTION="Standard MIDI File format library"
+HOMEPAGE="http://libsmf.sourceforge.net/api/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ~arm ppc ppc64 x86"
+IUSE="doc readline static-libs"
+
+RDEPEND=">=dev-libs/glib-2.2:2
+ readline? ( sys-libs/readline )"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )
+ virtual/pkgconfig"
+
+DOCS=( NEWS TODO )
+
+src_configure() {
+ local myeconfargs=(
+ $(use_with readline)
+ )
+ autotools-utils_src_configure
+}
+
+src_compile() {
+ autotools-utils_src_compile
+
+ if use doc ; then
+ doxygen doxygen.cfg || die
+ fi
+}
+
+src_install() {
+ autotools-utils_src_install
+ use doc && dohtml -r api
+}
diff --git a/media-libs/libsmf/metadata.xml b/media-libs/libsmf/metadata.xml
new file mode 100644
index 000000000000..d3093c51f3e9
--- /dev/null
+++ b/media-libs/libsmf/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>sound</herd>
+ <upstream>
+ <remote-id type="sourceforge">libsmf</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libsndfile/Manifest b/media-libs/libsndfile/Manifest
new file mode 100644
index 000000000000..ccde3aa18d71
--- /dev/null
+++ b/media-libs/libsndfile/Manifest
@@ -0,0 +1 @@
+DIST libsndfile-1.0.25.tar.gz 1060692 SHA256 59016dbd326abe7e2366ded5c344c853829bebfd1702ef26a07ef662d6aa4882 SHA512 4ca9780ed0a915aca8a10ef91bf4bf48b05ecb85285c2c3fe7eef1d46d3e0747e61416b6bddbef369bd69adf4b796ff5f61380e0bc998906b170a93341ba6f78 WHIRLPOOL 37ef0a66f11d3f60741fe40bce2b255f44284cf78f7c762542def2aab0eefed1360181bb7f29b9850c11e8672a78bc5a687bc04f2cc349e45dfd24721bea8f29
diff --git a/media-libs/libsndfile/files/libsndfile-1.0.17-regtests-need-sqlite.patch b/media-libs/libsndfile/files/libsndfile-1.0.17-regtests-need-sqlite.patch
new file mode 100644
index 000000000000..85d628000f96
--- /dev/null
+++ b/media-libs/libsndfile/files/libsndfile-1.0.17-regtests-need-sqlite.patch
@@ -0,0 +1,25 @@
+Index: libsndfile-1.0.17/configure.ac
+===================================================================
+--- libsndfile-1.0.17.orig/configure.ac
++++ libsndfile-1.0.17/configure.ac
+@@ -268,6 +268,7 @@ else
+ fi
+
+ AC_DEFINE_UNQUOTED([HAVE_SQLITE3],$HAVE_SQLITE3,[Set to 1 if you have libsqlite3.])
++AM_CONDITIONAL(HAVE_SQLITE3, [test "x$ac_cv_sqlite3" = "xyes"])
+
+ #====================================================================================
+ # Determine if the processor can do clipping on float to int conversions.
+Index: libsndfile-1.0.17/regtest/Makefile.am
+===================================================================
+--- libsndfile-1.0.17.orig/regtest/Makefile.am
++++ libsndfile-1.0.17/regtest/Makefile.am
+@@ -1,6 +1,8 @@
+ ## Process this file with automake to produce Makefile.in
+
++if HAVE_SQLITE3
+ bin_PROGRAMS = sndfile-regtest
++endif
+
+ noinst_HEADERS = regtest.h
+
diff --git a/media-libs/libsndfile/files/libsndfile-1.0.25-make.patch b/media-libs/libsndfile/files/libsndfile-1.0.25-make.patch
new file mode 100644
index 000000000000..70cc4e2e4b4b
--- /dev/null
+++ b/media-libs/libsndfile/files/libsndfile-1.0.25-make.patch
@@ -0,0 +1,14 @@
+Honour MAKE variable for systems with make != GNU make (eg fbsd)
+
+Index: libsndfile-1.0.25/configure.ac
+===================================================================
+--- libsndfile-1.0.25.orig/configure.ac
++++ libsndfile-1.0.25/configure.ac
+@@ -701,5 +701,5 @@ if test x$prefix != "x/usr" ; then
+ echo
+ fi
+
+-(cd src && make genfiles)
+-(cd tests && make genfiles)
++(cd src && ${MAKE-make} genfiles)
++(cd tests && ${MAKE-make} genfiles)
diff --git a/media-libs/libsndfile/libsndfile-1.0.25-r1.ebuild b/media-libs/libsndfile/libsndfile-1.0.25-r1.ebuild
new file mode 100644
index 000000000000..4d716dc87e03
--- /dev/null
+++ b/media-libs/libsndfile/libsndfile-1.0.25-r1.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_PRUNE_LIBTOOL_FILES=all
+PYTHON_COMPAT=( python2_7 pypy )
+inherit autotools-multilib flag-o-matic python-any-r1
+
+MY_P=${P/_pre/pre}
+
+DESCRIPTION="A C library for reading and writing files containing sampled sound"
+HOMEPAGE="http://www.mega-nerd.com/libsndfile"
+if [[ "${MY_P}" == "${P}" ]]; then
+ SRC_URI="http://www.mega-nerd.com/libsndfile/files/${P}.tar.gz"
+else
+ SRC_URI="http://www.mega-nerd.com/tmp/${MY_P}b.tar.gz"
+fi
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="alsa minimal sqlite static-libs test"
+
+RDEPEND="
+ !minimal? ( >=media-libs/flac-1.2.1-r5[${MULTILIB_USEDEP}]
+ >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
+ >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}] )
+ alsa? ( media-libs/alsa-lib )
+ sqlite? ( >=dev-db/sqlite-3.2 )
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-soundlibs-20130224-r6
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ test? ( ${PYTHON_DEPS} )"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ # fix adding largefile flags on amd64 multilib
+ # https://github.com/erikd/libsndfile/commit/d464da7dba4d5
+ sed -i -e 's:AC_SYS_EXTRA_LARGEFILE:AC_SYS_LARGEFILE:' configure.ac || die
+ sed -i -e 's:noinst_PROGRAMS:check_PROGRAMS:' {examples,tests}/Makefile.am || die
+
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-1.0.17-regtests-need-sqlite.patch
+ "${FILESDIR}"/${PN}-1.0.25-make.patch
+ )
+
+ AT_M4DIR=M4 \
+ autotools-multilib_src_prepare
+ epunt_cxx
+}
+
+src_configure() {
+ my_configure() {
+ local myeconfargs=(
+ --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html
+ $(use_enable static-libs static)
+ $(use_enable !minimal external-libs)
+ --disable-octave
+ --disable-gcc-werror
+ --disable-gcc-pipe
+ )
+
+ if [ "${ABI}" = "${DEFAULT_ABI}" ] ; then
+ myeconfargs+=(
+ $(use_enable alsa)
+ $(use_enable sqlite)
+ )
+ else
+ myeconfargs+=(
+ --disable-alsa
+ --disable-sqlite
+ )
+ fi
+
+ autotools-utils_src_configure
+
+ if [ "${ABI}" != "${DEFAULT_ABI}" ] ; then
+ # Do not build useless stuff.
+ for i in man doc examples regtest programs ; do
+ sed -i -e "s/ ${i}//" "${BUILD_DIR}/Makefile" || die
+ done
+ fi
+ }
+
+ multilib_parallel_foreach_abi my_configure
+}
+
+src_install() {
+ # note: --htmldir support fixed upstream already,
+ # next version should pass --htmldir to configure instead
+ autotools-multilib_src_install \
+ htmldocdir="${EPREFIX}/usr/share/doc/${PF}/html"
+}
diff --git a/media-libs/libsndfile/libsndfile-1.0.25.ebuild b/media-libs/libsndfile/libsndfile-1.0.25.ebuild
new file mode 100644
index 000000000000..d6dc8d087dda
--- /dev/null
+++ b/media-libs/libsndfile/libsndfile-1.0.25.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils flag-o-matic multilib
+
+MY_P=${P/_pre/pre}
+
+DESCRIPTION="A C library for reading and writing files containing sampled sound"
+HOMEPAGE="http://www.mega-nerd.com/libsndfile"
+if [[ "${MY_P}" == "${P}" ]]; then
+ SRC_URI="http://www.mega-nerd.com/libsndfile/files/${P}.tar.gz"
+else
+ SRC_URI="http://www.mega-nerd.com/tmp/${MY_P}b.tar.gz"
+fi
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="alsa minimal sqlite static-libs"
+
+RDEPEND="!minimal? ( >=media-libs/flac-1.2.1
+ >=media-libs/libogg-1.1.3
+ >=media-libs/libvorbis-1.2.3 )
+ alsa? ( media-libs/alsa-lib )
+ sqlite? ( >=dev-db/sqlite-3.2 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+# Keep this function synced with x11-libs/pango ebuild!
+function multilib_enabled() {
+ has_multilib_profile || ( use x86 && [ "$(get_libdir)" = "lib32" ] )
+}
+
+src_prepare() {
+ sed -i -e 's:noinst_PROGRAMS:check_PROGRAMS:' {examples,tests}/Makefile.am || die
+
+ epatch "${FILESDIR}"/${PN}-1.0.17-regtests-need-sqlite.patch
+
+ AT_M4DIR=M4 eautoreconf
+ epunt_cxx
+}
+
+src_configure() {
+ multilib_enabled && append-lfs-flags #313259
+
+ econf \
+ $(use_enable sqlite) \
+ $(use_enable static-libs static) \
+ $(use_enable alsa) \
+ $(use_enable !minimal external-libs) \
+ htmldocdir="${EPREFIX}"/usr/share/doc/${PF}/html \
+ --disable-octave \
+ --disable-gcc-werror \
+ --disable-gcc-pipe
+}
+
+src_install() {
+ emake DESTDIR="${D}" htmldocdir="${EPREFIX}/usr/share/doc/${PF}/html" install
+ dodoc AUTHORS ChangeLog NEWS README
+}
diff --git a/media-libs/libsndfile/metadata.xml b/media-libs/libsndfile/metadata.xml
new file mode 100644
index 000000000000..3bf6bcfeb512
--- /dev/null
+++ b/media-libs/libsndfile/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>sound</herd>
+</pkgmetadata>
diff --git a/media-libs/libsoundtouch/Manifest b/media-libs/libsoundtouch/Manifest
new file mode 100644
index 000000000000..61a954156eb6
--- /dev/null
+++ b/media-libs/libsoundtouch/Manifest
@@ -0,0 +1,3 @@
+DIST soundtouch-1.7.1.tar.gz 101274 SHA256 385eafa438a9d31ddf84b8d2f713097a3f1fc93d7abdb2fc54c484b777ee0267 SHA512 92a9e2fb5e47f573771620f329e9193f559ff25ce21f16917479ff94e2aac1e3ebb79cb0fe1ae55d6505b40f694792e493b388470987fbe7a85505fd88e947cc WHIRLPOOL 0f36e93236747bbcdb3c4557791db55811c00f3171db2a386cbfb7d6f4a1657957f27378bbf22018931ce6c856d19da9db411fb8a190d46e4599db7ca6d9d0e1
+DIST soundtouch-1.8.0.tar.gz 106229 SHA256 3d4161d74ca25c5a98c69dbb8ea10fd2be409ba1a3a0bf81db407c4c261f166b SHA512 724e6ecc1727ee4c4f2503d183717dc1503ee2017b176677da6f0268e82254a7cca3ff9a27dbb9cab59e32d002797eec1b39d2b729f741e5f2ea77a147af4d39 WHIRLPOOL e4abc67aa23448a6ef8230794d1e6b9d3f4c33db1fc4fd7c784ab60953d6b79fd850b3cfbdb8ce983b238e7dc249ee96824160bb6e4683b17fd521a4b12b1b1c
+DIST soundtouch-1.9.0.tar.gz 169038 SHA256 1fe4fc03cbfe696c1281fd623d089baffe1b70265acc60eac7a6d9b5742971ad SHA512 383e6f8d1441a5d0676607d78e97a4906abe5b285a1d55f9145d8646e7c65b4d4c552250b6e5ca8e1bb74a4ba432f0370e8df666016aa3fdbf6642337d3e6110 WHIRLPOOL 4ba8f638b009c89cbe9b0320602297aff4db292f32c9a5c1494db05ef0b278f574163b6b256b77daebbaf4b673f00053833b3cfbe536ccba7fbbd3d380d06745
diff --git a/media-libs/libsoundtouch/files/libsoundtouch-1.7.0-flags.patch b/media-libs/libsoundtouch/files/libsoundtouch-1.7.0-flags.patch
new file mode 100644
index 000000000000..2b1e1ac80958
--- /dev/null
+++ b/media-libs/libsoundtouch/files/libsoundtouch-1.7.0-flags.patch
@@ -0,0 +1,22 @@
+--- soundtouch/source/SoundStretch/Makefile.am
++++ soundtouch/source/SoundStretch/Makefile.am
+@@ -48,7 +48,7 @@
+ # soundstretch_LDFLAGS=-s
+
+ ## additional compiler flags
+-soundstretch_CXXFLAGS=-O3
++#soundstretch_CXXFLAGS=-O3
+
+ #clean-local:
+ # -rm -f additional-files-to-remove-on-make-clean
+--- soundtouch/source/SoundTouch/Makefile.am
++++ soundtouch/source/SoundTouch/Makefile.am
+@@ -32,7 +32,7 @@
+
+
+ # Compiler flags
+-AM_CXXFLAGS=-O3 -fcheck-new -I../../include
++AM_CXXFLAGS=-fcheck-new -I../../include
+
+ # Compile the files that need MMX and SSE individually.
+ libSoundTouch_la_LIBADD=libSoundTouchMMX.la libSoundTouchSSE.la
diff --git a/media-libs/libsoundtouch/libsoundtouch-1.7.1.ebuild b/media-libs/libsoundtouch/libsoundtouch-1.7.1.ebuild
new file mode 100644
index 000000000000..7ed31b0824e7
--- /dev/null
+++ b/media-libs/libsoundtouch/libsoundtouch-1.7.1.ebuild
@@ -0,0 +1,45 @@
+# 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
+
+MY_PN=${PN/lib}
+
+DESCRIPTION="Audio processing library for changing tempo, pitch and playback rates"
+HOMEPAGE="http://www.surina.net/soundtouch/"
+SRC_URI="http://www.surina.net/soundtouch/${P/lib}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ~arm hppa ~mips ppc ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-solaris"
+IUSE="cpu_flags_x86_sse2 static-libs"
+
+DEPEND="virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_PN}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.7.0-flags.patch
+ sed -i "s:^\(pkgdoc_DATA=\)COPYING.TXT :\1:" Makefile.am || die
+ sed -i 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:g' configure.ac || die
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --enable-shared \
+ --disable-integer-samples \
+ --enable-x86-optimizations=$(usex cpu_flags_x86_sse2 sse2) \
+ $(use_enable static-libs static)
+}
+
+src_compile() {
+ emake CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" pkgdocdir="${EPREFIX}"/usr/share/doc/${PF}/html install
+ prune_libtool_files
+}
diff --git a/media-libs/libsoundtouch/libsoundtouch-1.8.0-r1.ebuild b/media-libs/libsoundtouch/libsoundtouch-1.8.0-r1.ebuild
new file mode 100644
index 000000000000..98ba6ac65a9f
--- /dev/null
+++ b/media-libs/libsoundtouch/libsoundtouch-1.8.0-r1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils flag-o-matic multilib-minimal
+
+MY_PN=${PN/lib}
+
+DESCRIPTION="Audio processing library for changing tempo, pitch and playback rates"
+HOMEPAGE="http://www.surina.net/soundtouch/"
+SRC_URI="http://www.surina.net/soundtouch/${P/lib}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ~arm hppa ~mips ppc ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-solaris"
+IUSE="cpu_flags_x86_sse2 static-libs"
+
+DEPEND=">=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]"
+
+S=${WORKDIR}/${MY_PN}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.7.0-flags.patch
+ sed -i "s:^\(pkgdoc_DATA=\)COPYING.TXT :\1:" Makefile.am || die
+ sed -i 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:g' configure.ac || die
+ eautoreconf
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE=${S} \
+ econf \
+ --enable-shared \
+ --disable-integer-samples \
+ --enable-x86-optimizations=$(usex cpu_flags_x86_sse2 sse2) \
+ $(use_enable static-libs static)
+}
+
+multilib_src_compile() {
+ emake CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}"
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" pkgdocdir="${EPREFIX}"/usr/share/doc/${PF}/html install
+}
+
+multilib_src_install_all() {
+ prune_libtool_files
+}
diff --git a/media-libs/libsoundtouch/libsoundtouch-1.8.0.ebuild b/media-libs/libsoundtouch/libsoundtouch-1.8.0.ebuild
new file mode 100644
index 000000000000..7ed31b0824e7
--- /dev/null
+++ b/media-libs/libsoundtouch/libsoundtouch-1.8.0.ebuild
@@ -0,0 +1,45 @@
+# 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
+
+MY_PN=${PN/lib}
+
+DESCRIPTION="Audio processing library for changing tempo, pitch and playback rates"
+HOMEPAGE="http://www.surina.net/soundtouch/"
+SRC_URI="http://www.surina.net/soundtouch/${P/lib}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ~arm hppa ~mips ppc ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-solaris"
+IUSE="cpu_flags_x86_sse2 static-libs"
+
+DEPEND="virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_PN}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.7.0-flags.patch
+ sed -i "s:^\(pkgdoc_DATA=\)COPYING.TXT :\1:" Makefile.am || die
+ sed -i 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:g' configure.ac || die
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --enable-shared \
+ --disable-integer-samples \
+ --enable-x86-optimizations=$(usex cpu_flags_x86_sse2 sse2) \
+ $(use_enable static-libs static)
+}
+
+src_compile() {
+ emake CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" pkgdocdir="${EPREFIX}"/usr/share/doc/${PF}/html install
+ prune_libtool_files
+}
diff --git a/media-libs/libsoundtouch/libsoundtouch-1.9.0.ebuild b/media-libs/libsoundtouch/libsoundtouch-1.9.0.ebuild
new file mode 100644
index 000000000000..53670b333318
--- /dev/null
+++ b/media-libs/libsoundtouch/libsoundtouch-1.9.0.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 eutils flag-o-matic multilib-minimal
+
+MY_PN=${PN/lib}
+
+DESCRIPTION="Audio processing library for changing tempo, pitch and playback rates"
+HOMEPAGE="http://www.surina.net/soundtouch/"
+SRC_URI="http://www.surina.net/soundtouch/${P/lib}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-solaris"
+IUSE="cpu_flags_x86_sse openmp static-libs"
+
+DEPEND=">=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]"
+
+S=${WORKDIR}/${MY_PN}
+
+src_prepare() {
+ use openmp && { tc-has-openmp || die "Please switch to an openmp compatible compiler"; }
+ sed -i "s:^\(pkgdoc_DATA=\)COPYING.TXT :\1:" Makefile.am || die
+ sed -i 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:g' configure.ac || die
+ eautoreconf
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE=${S} \
+ econf \
+ --enable-shared \
+ --disable-integer-samples \
+ $(use_enable cpu_flags_x86_sse x86-optimizations) \
+ $(use_enable openmp) \
+ $(use_enable static-libs static)
+}
+
+multilib_src_compile() {
+ emake CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}"
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" pkgdocdir="${EPREFIX}"/usr/share/doc/${PF}/html install
+}
+
+multilib_src_install_all() {
+ prune_libtool_files
+}
diff --git a/media-libs/libsoundtouch/metadata.xml b/media-libs/libsoundtouch/metadata.xml
new file mode 100644
index 000000000000..ae573a60407f
--- /dev/null
+++ b/media-libs/libsoundtouch/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>sound</herd>
+</pkgmetadata>
diff --git a/media-libs/libsvg/Manifest b/media-libs/libsvg/Manifest
new file mode 100644
index 000000000000..83893696a679
--- /dev/null
+++ b/media-libs/libsvg/Manifest
@@ -0,0 +1 @@
+DIST libsvg-0.1.4.tar.gz 366688 RMD160 7e324f88313c3963bac1d57e3b77d7827b2c65e0 SHA1 2198e65833eed905d93be70f3db4f0d32a2eaf57 SHA256 4c3bf9292e676a72b12338691be64d0f38cd7f2ea5e8b67fbbf45f1ed404bc8f
diff --git a/media-libs/libsvg/files/libsvg-0.1.4-asneeded.patch b/media-libs/libsvg/files/libsvg-0.1.4-asneeded.patch
new file mode 100644
index 000000000000..35445356ae54
--- /dev/null
+++ b/media-libs/libsvg/files/libsvg-0.1.4-asneeded.patch
@@ -0,0 +1,10 @@
+--- configure.in.orig 2009-01-04 16:26:45.836984083 +0100
++++ configure.in 2009-01-04 16:26:30.409983868 +0100
+@@ -55,6 +55,7 @@
+ LIBSVG_PARSER_BACKEND="libxml"
+ LIBSVG_REQUIRES="libxml-2.0"
+ fi
++AC_SEARCH_LIBS([jpeg_stdio_src], [jpeg])
+ AC_SUBST(LIBSVG_CFLAGS)
+ AC_SUBST(LIBSVG_LIBS)
+ AC_SUBST(LIBSVG_REQUIRES)
diff --git a/media-libs/libsvg/libsvg-0.1.4-r1.ebuild b/media-libs/libsvg/libsvg-0.1.4-r1.ebuild
new file mode 100644
index 000000000000..671d907bba2e
--- /dev/null
+++ b/media-libs/libsvg/libsvg-0.1.4-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit autotools eutils libtool
+
+DESCRIPTION="A parser for SVG content in files or buffers"
+HOMEPAGE="http://cairographics.org"
+SRC_URI="http://cairographics.org/snapshots/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-solaris"
+IUSE=""
+
+RDEPEND="dev-libs/libxml2
+ media-libs/libpng
+ virtual/jpeg"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ sed -i \
+ -e 's:png_set_gray_1_2_4_to_8:png_set_expand_gray_1_2_4_to_8:' \
+ src/svg_image.c || die
+ epatch "${FILESDIR}"/${P}-asneeded.patch
+ elibtoolize
+ eautoconf
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed."
+ dodoc AUTHORS ChangeLog NEWS README TODO
+}
diff --git a/media-libs/libsvg/metadata.xml b/media-libs/libsvg/metadata.xml
new file mode 100644
index 000000000000..9be90a258970
--- /dev/null
+++ b/media-libs/libsvg/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>graphics</herd>
+</pkgmetadata>
diff --git a/media-libs/libsvgtiny/Manifest b/media-libs/libsvgtiny/Manifest
new file mode 100644
index 000000000000..a319278de9be
--- /dev/null
+++ b/media-libs/libsvgtiny/Manifest
@@ -0,0 +1,4 @@
+DIST libsvgtiny-0.1.2-src.tar.gz 56077 SHA256 a5ad4ba467e2ba10ac13fb881937655c5d0ef8e9582ede6a2c73447c87d06e90 SHA512 916315b23a8c5a430d9daa727280baeed64b3fd03318f0ee88fa9c6c9b202d6417dc6096ac0554b95f6573904c13be6277b3c79289ddb1ab8cabfb282896e6ce WHIRLPOOL ec277eb453d839c6cac5c6dfea9aae7dd2b1c83cca66d6b5b4a393b698db33f4902f361f6cd5b5de1b14346289ddf183804990eb8395e2cdeacc5af5a449b4de
+DIST libsvgtiny-0.1.3-src.tar.gz 57751 SHA256 cbdc024743a56ccacbfa6d6bbce135ab6d701d38609f4a1ac56c2842457e5dff SHA512 5735449b6ad5ea76fd0a87ee0e9a0a1a1141ff9b7f392dd234bd7aae5761e3e3c62cee463b4949d713d1e675a9f3e3dd66aff67eb296180d2db6068323c5fe19 WHIRLPOOL 78072ca27bb55ddec56c04cdf45bd461c86abf4b2ac11bfde286bf8c2e11b4942dcc3879ecfe04d422a97cca60f18cdbdb440b7e1994359e3c3d7727dd236787
+DIST netsurf-buildsystem-1.2.tar.gz 38914 SHA256 3903a4a1551c9c202e1d2047344c4f3598c8d9d6c35ebf8cc2e18874bd0c9d61 SHA512 963e8a5033e8ef70595507f24fea3d9697eefb50ad7f92a6d3c913501c7026f12ec6d48f92b75e352b32f212f6216b8d8455aff25fa8d8d0fc12a3b19a875a1c WHIRLPOOL e56a520ae284089d0f36f06a6891ebb5b208ca847c74340c18581340e457c20ae9365999dc13284f438b965dcd7e85f04b93d1c1f22cadf6f7c1e2cef81d528c
+DIST netsurf-buildsystem-1.3.tar.gz 37906 SHA256 10bbe95ba07476208da6047bd3c74685b6e61ba9904975b5d5c9a2c79a84ac79 SHA512 79ef3e366c4798dbb88021fd05019ba9fe50539b7482bd3d07422f4c0dbf2047b906f39a0b48deebbdf111d84d93a9364d08e5c97f91609363c27641db15e6b5 WHIRLPOOL c8131d0ffb79b208b63bef94606735968584edfff8cb24b4c83cd747c5d65c2811004626840798047ffddf84556ef7d8e23242f60d01a4a046323df3c78b0980
diff --git a/media-libs/libsvgtiny/files/libsvgtiny-0.1.2-glibc2.20.patch b/media-libs/libsvgtiny/files/libsvgtiny-0.1.2-glibc2.20.patch
new file mode 100644
index 000000000000..3f5430248fb7
--- /dev/null
+++ b/media-libs/libsvgtiny/files/libsvgtiny-0.1.2-glibc2.20.patch
@@ -0,0 +1,18 @@
+--- libsvgtiny-0.1.2/Makefile
++++ libsvgtiny-0.1.2/Makefile
+@@ -15,14 +15,8 @@
+ WARNFLAGS := -Wall -W -Wundef -Wpointer-arith -Wcast-align \
+ -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes \
+ -Wmissing-declarations -Wnested-externs -pedantic
+-# BeOS/Haiku/AmigaOS standard library headers create warnings
+-ifneq ($(TARGET),beos)
+- ifneq ($(TARGET),amiga)
+- WARNFLAGS := $(WARNFLAGS) -Werror
+- endif
+-endif
+
+-CFLAGS := -D_BSD_SOURCE -I$(CURDIR)/include/ \
++CFLAGS := -D_DEFAULT_SOURCE -I$(CURDIR)/include/ \
+ -I$(CURDIR)/src $(WARNFLAGS) $(CFLAGS)
+ ifneq ($(GCCVER),2)
+ CFLAGS := $(CFLAGS) -std=c99
diff --git a/media-libs/libsvgtiny/files/libsvgtiny-0.1.3-glibc2.20.patch b/media-libs/libsvgtiny/files/libsvgtiny-0.1.3-glibc2.20.patch
new file mode 100644
index 000000000000..e04867fb35af
--- /dev/null
+++ b/media-libs/libsvgtiny/files/libsvgtiny-0.1.3-glibc2.20.patch
@@ -0,0 +1,18 @@
+--- libsvgtiny-0.1.3/Makefile
++++ libsvgtiny-0.1.3/Makefile
+@@ -15,14 +15,8 @@
+ WARNFLAGS := -Wall -W -Wundef -Wpointer-arith -Wcast-align \
+ -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes \
+ -Wmissing-declarations -Wnested-externs -pedantic
+-# BeOS/Haiku/AmigaOS standard library headers create warnings
+-ifneq ($(BUILD),i586-pc-haiku)
+- ifneq ($(findstring amigaos,$(BUILD)),amigaos)
+- WARNFLAGS := $(WARNFLAGS) -Werror
+- endif
+-endif
+
+-CFLAGS := -D_BSD_SOURCE -I$(CURDIR)/include/ \
++CFLAGS := -D_DEFAULT_SOURCE -I$(CURDIR)/include/ \
+ -I$(CURDIR)/src $(WARNFLAGS) $(CFLAGS)
+ ifneq ($(GCCVER),2)
+ CFLAGS := $(CFLAGS) -std=c99
diff --git a/media-libs/libsvgtiny/files/libsvgtiny-0.1.3-parallel-build.patch b/media-libs/libsvgtiny/files/libsvgtiny-0.1.3-parallel-build.patch
new file mode 100644
index 000000000000..f647b155b3a9
--- /dev/null
+++ b/media-libs/libsvgtiny/files/libsvgtiny-0.1.3-parallel-build.patch
@@ -0,0 +1,10 @@
+--- libsvgtiny-0.1.3/src/Makefile
++++ libsvgtiny-0.1.3/src/Makefile
+@@ -5,6 +5,7 @@
+
+ $(BUILDDIR)/src_colors.c: src/colors.gperf
+ $(VQ)$(ECHO) " GPERF: $<"
++ mkdir -p $(@D)
+ $(Q)gperf --output-file=$@.tmp $<
+ # Hack for GCC 4.2 compatibility (gperf 3.0.4 solves this properly)
+ $(Q)$(SED) -e 's/#ifdef __GNUC_STDC_INLINE__/#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__/' $@.tmp >$@
diff --git a/media-libs/libsvgtiny/libsvgtiny-0.1.2.ebuild b/media-libs/libsvgtiny/libsvgtiny-0.1.2.ebuild
new file mode 100644
index 000000000000..ba2502ec3eaa
--- /dev/null
+++ b/media-libs/libsvgtiny/libsvgtiny-0.1.2.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+NETSURF_BUILDSYSTEM=buildsystem-1.2
+inherit netsurf
+
+DESCRIPTION="framebuffer abstraction library, written in C"
+HOMEPAGE="http://www.netsurf-browser.org/projects/libsvgtiny/"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~m68k-mint"
+IUSE=""
+
+RDEPEND=">=net-libs/libdom-0.1.1[xml,static-libs?,${MULTILIB_USEDEP}]
+ >=dev-libs/libwapcaplet-0.2.1-r1[static-libs?,${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}
+ dev-util/gperf
+ virtual/pkgconfig"
+
+PATCHES=( "${FILESDIR}"/${P}-glibc2.20.patch )
diff --git a/media-libs/libsvgtiny/libsvgtiny-0.1.3-r1.ebuild b/media-libs/libsvgtiny/libsvgtiny-0.1.3-r1.ebuild
new file mode 100644
index 000000000000..083de2a50073
--- /dev/null
+++ b/media-libs/libsvgtiny/libsvgtiny-0.1.3-r1.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+NETSURF_BUILDSYSTEM=buildsystem-1.3
+inherit netsurf
+
+DESCRIPTION="framebuffer abstraction library, written in C"
+HOMEPAGE="http://www.netsurf-browser.org/projects/libsvgtiny/"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~m68k-mint"
+IUSE=""
+
+RDEPEND=">=net-libs/libdom-0.1.2-r1[xml,static-libs?,${MULTILIB_USEDEP}]
+ >=dev-libs/libwapcaplet-0.2.2-r1[static-libs?,${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}
+ dev-util/gperf
+ virtual/pkgconfig"
+
+PATCHES=( "${FILESDIR}"/${P}-glibc2.20.patch
+ "${FILESDIR}"/${P}-parallel-build.patch )
diff --git a/media-libs/libsvgtiny/metadata.xml b/media-libs/libsvgtiny/metadata.xml
new file mode 100644
index 000000000000..59acc2cc580e
--- /dev/null
+++ b/media-libs/libsvgtiny/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>xmw@gentoo.org</email>
+<name>Michael Weber</name>
+</maintainer>
+</pkgmetadata>
+
diff --git a/media-libs/libtaginfo/Manifest b/media-libs/libtaginfo/Manifest
new file mode 100644
index 000000000000..11d2fc6e4b20
--- /dev/null
+++ b/media-libs/libtaginfo/Manifest
@@ -0,0 +1,3 @@
+DIST libtaginfo-0.1.6.tar.gz 1897085 SHA256 7473b7dd52471fa1c40766b71ecce7cd12e9641491ec59c4eb9b977b5d796345 SHA512 520e7c5886c8de5d4b5f86ace33504473aa479e04779bd88762c13a3d77a1aef26c7aa69b6cfa92ed044d930ab2befa835cf4c3384754fa916fe431443273bb5 WHIRLPOOL e8709c7679fcb9e816bd3a72d22a4a95a13a3d9ca9ae52871ce1782b3ba9bef266078aed905afb3d07f1c400503176f1402309d7a3221185ae1a7ba6da921a31
+DIST libtaginfo-0.2.0.tar.gz 2074904 SHA256 7a2ef1c74fa4bd054e589582ff8ad6ff0519490777df32304580911d332d8313 SHA512 0c382304e73aeccc6820456cb94ad295d825860d2c2e35e248b52c6fb75ca16f387c7c6a93b8f38988fc31011184fd7a44ff9489d22adc34b5c0d4861dd7a0a2 WHIRLPOOL 7d29163405635942a4722c4e6745a4cf925666d4f6ebe6ca32c5c3ce0ffe48ce5dde0d48a43b0ab59e5ffdaebd62143df619ff5025b5977d608659897a162d88
+DIST libtaginfo-0.2.1.tar.gz 2093070 SHA256 9ca2f67ef5934b90e659436218c7cb0bb6aa573d14acf544493d7e969d14369f SHA512 f1a79b1f7ea12bce10c82c0a4106f855c95b6efeef25e7548fc629d4f8977f50fe62637426a53ec0333902d5e2a81980c189719d030d7f85897ecfa8cbb1ba41 WHIRLPOOL d1c49f6e41a85a0cc615951bff4d8ce21ff0988728b0b3448e3490b62b3eeaa0d0fd11af783ef976e598ee600c802479a8cffdf530fad42d86ee6353f805d6dd
diff --git a/media-libs/libtaginfo/libtaginfo-0.1.6.ebuild b/media-libs/libtaginfo/libtaginfo-0.1.6.ebuild
new file mode 100644
index 000000000000..114bf0a716a3
--- /dev/null
+++ b/media-libs/libtaginfo/libtaginfo-0.1.6.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="a library for reading media metadata"
+HOMEPAGE="https://bitbucket.org/shuerhaaken/libtaginfo"
+SRC_URI="https://www.bitbucket.org/shuerhaaken/${PN}/downloads/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="media-libs/taglib
+ !<media-sound/xnoise-0.2.16"
+DEPEND="${DEPEND}
+ virtual/pkgconfig"
+
+DOCS=( AUTHORS README TODO )
diff --git a/media-libs/libtaginfo/libtaginfo-0.2.0.ebuild b/media-libs/libtaginfo/libtaginfo-0.2.0.ebuild
new file mode 100644
index 000000000000..114bf0a716a3
--- /dev/null
+++ b/media-libs/libtaginfo/libtaginfo-0.2.0.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="a library for reading media metadata"
+HOMEPAGE="https://bitbucket.org/shuerhaaken/libtaginfo"
+SRC_URI="https://www.bitbucket.org/shuerhaaken/${PN}/downloads/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="media-libs/taglib
+ !<media-sound/xnoise-0.2.16"
+DEPEND="${DEPEND}
+ virtual/pkgconfig"
+
+DOCS=( AUTHORS README TODO )
diff --git a/media-libs/libtaginfo/libtaginfo-0.2.1.ebuild b/media-libs/libtaginfo/libtaginfo-0.2.1.ebuild
new file mode 100644
index 000000000000..f51c3a284f78
--- /dev/null
+++ b/media-libs/libtaginfo/libtaginfo-0.2.1.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+AUTOTOOLS_IN_SOURCE_BUILD=1
+
+inherit autotools-utils
+
+DESCRIPTION="a library for reading media metadata"
+HOMEPAGE="https://bitbucket.org/shuerhaaken/libtaginfo"
+SRC_URI="https://www.bitbucket.org/shuerhaaken/${PN}/downloads/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="media-libs/taglib
+ !<media-sound/xnoise-0.2.16"
+DEPEND="${DEPEND}
+ virtual/pkgconfig"
+
+DOCS=( AUTHORS README TODO )
diff --git a/media-libs/libtaginfo/metadata.xml b/media-libs/libtaginfo/metadata.xml
new file mode 100644
index 000000000000..2b3b4e4e3fad
--- /dev/null
+++ b/media-libs/libtaginfo/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>sound</herd>
+ <maintainer>
+ <email>angelos@gentoo.org</email>
+ <name>Christoph Mende</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="bitbucket">shuerhaaken/libtaginfo</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libtheora/Manifest b/media-libs/libtheora/Manifest
new file mode 100644
index 000000000000..4c55ef94070b
--- /dev/null
+++ b/media-libs/libtheora/Manifest
@@ -0,0 +1 @@
+DIST libtheora-1.1.1.tar.bz2 1903175 SHA256 b6ae1ee2fa3d42ac489287d3ec34c5885730b1296f0801ae577a35193d3affbc SHA512 9ab9b3af1c35d16a7d6d84f61f59ef3180132e30c27bdd7c0fa2683e0d00e2c791accbc7fd2c90718cc947d8bd10ee4a5940fb55f90f1fd7b0ed30583a47dbbd WHIRLPOOL deeb71454da7b32e3561ef31925e685170123bb18b0b4963db18cad8c422ede3a8e0a29662dbd45edce51ceca12c7ad5d2fe70f33db0c3a9b1cabe84fb37376b
diff --git a/media-libs/libtheora/files/libtheora-1.0_beta2-flags.patch b/media-libs/libtheora/files/libtheora-1.0_beta2-flags.patch
new file mode 100644
index 000000000000..a47cc5771680
--- /dev/null
+++ b/media-libs/libtheora/files/libtheora-1.0_beta2-flags.patch
@@ -0,0 +1,14 @@
+diff -ur libtheora-1.0beta2.orig/configure.ac libtheora-1.0beta2/configure.ac
+--- libtheora-1.0beta2.orig/configure.ac 2007-10-13 00:01:38.000000000 +0300
++++ libtheora-1.0beta2/configure.ac 2007-11-25 22:44:49.000000000 +0200
+@@ -102,8 +102,8 @@
+ case $host in
+ *)
+ DEBUG="-g -Wall -Wno-parentheses -DDEBUG -D__NO_MATH_INLINES"
+- CFLAGS="-Wall -Wno-parentheses -O3 -fforce-addr -fomit-frame-pointer -finline-functions -funroll-loops"
+- PROFILE="-Wall -Wno-parentheses -pg -g -O3 -fno-inline-functions -DDEBUG";;
++ CFLAGS="-Wall -Wno-parentheses"
++ PROFILE="-Wall -Wno-parentheses -pg -g -fno-inline-functions -DDEBUG";;
+ esac
+ fi
+ CFLAGS="$CFLAGS $cflags_save"
diff --git a/media-libs/libtheora/files/libtheora-1.1.1-libpng16.patch b/media-libs/libtheora/files/libtheora-1.1.1-libpng16.patch
new file mode 100644
index 000000000000..93da700c4d7a
--- /dev/null
+++ b/media-libs/libtheora/files/libtheora-1.1.1-libpng16.patch
@@ -0,0 +1,17 @@
+http://bugs.gentoo.org/465450
+http://trac.xiph.org/ticket/1947
+
+--- examples/png2theora.c
++++ examples/png2theora.c
+@@ -462,9 +462,9 @@
+ png_set_strip_alpha(png_ptr);
+
+ row_data = (png_bytep)png_malloc(png_ptr,
+- 3*height*width*png_sizeof(*row_data));
++ 3*height*width*sizeof(*row_data));
+ row_pointers = (png_bytep *)png_malloc(png_ptr,
+- height*png_sizeof(*row_pointers));
++ height*sizeof(*row_pointers));
+ for(y = 0; y < height; y++) {
+ row_pointers[y] = row_data + y*(3*width);
+ }
diff --git a/media-libs/libtheora/files/libtheora-1.1.1-underlinking.patch b/media-libs/libtheora/files/libtheora-1.1.1-underlinking.patch
new file mode 100644
index 000000000000..b45a368ebd76
--- /dev/null
+++ b/media-libs/libtheora/files/libtheora-1.1.1-underlinking.patch
@@ -0,0 +1,14 @@
+http://bugs.gentoo.org/504270
+
+--- examples/Makefile.am
++++ examples/Makefile.am
+@@ -22,7 +22,7 @@
+
+ player_example_SOURCES = player_example.c
+ player_example_CFLAGS = $(SDL_CFLAGS) $(OGG_CFLAGS) $(VORBIS_CFLAGS)
+-player_example_LDADD = $(LDADDDEC) $(SDL_LIBS) $(VORBIS_LIBS) $(OSS_LIBS)
++player_example_LDADD = $(LDADDDEC) $(SDL_LIBS) $(VORBIS_LIBS) $(OSS_LIBS) -lm
+
+ encoder_example_SOURCES = encoder_example.c
+ EXTRA_encoder_example_SOURCES = getopt.c getopt1.c getopt.h
+
diff --git a/media-libs/libtheora/libtheora-1.1.1-r1.ebuild b/media-libs/libtheora/libtheora-1.1.1-r1.ebuild
new file mode 100644
index 000000000000..91c24a15693b
--- /dev/null
+++ b/media-libs/libtheora/libtheora-1.1.1-r1.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils flag-o-matic multilib-minimal
+
+DESCRIPTION="The Theora Video Compression Codec"
+HOMEPAGE="http://www.theora.org"
+SRC_URI="http://downloads.xiph.org/releases/theora/${P/_}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="doc +encode examples static-libs"
+
+RDEPEND=">=media-libs/libogg-1.3.0:=[${MULTILIB_USEDEP}]
+ encode? ( >=media-libs/libvorbis-1.3.3-r1:=[${MULTILIB_USEDEP}] )
+ examples? (
+ media-libs/libpng:0=
+ >=media-libs/libsdl-0.11.0
+ media-libs/libvorbis:=
+ )
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20130224-r1
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )
+ virtual/pkgconfig"
+REQUIRED_USE="examples? ( encode )" #285895
+
+S=${WORKDIR}/${P/_}
+
+VARTEXFONTS=${T}/fonts
+
+DOCS=( AUTHORS CHANGES README )
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-1.0_beta2-flags.patch \
+ "${FILESDIR}"/${P}-underlinking.patch \
+ "${FILESDIR}"/${P}-libpng16.patch #465450
+
+ # bug 467006
+ sed -i "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/" configure.ac || die
+
+ AT_M4DIR=m4 eautoreconf
+}
+
+multilib_src_configure() {
+ use x86 && filter-flags -fforce-addr -frename-registers #200549
+ use doc || export ac_cv_prog_HAVE_DOXYGEN=false
+
+ local myconf
+ if [ "${ABI}" = "${DEFAULT_ABI}" ] ; then
+ myconf=" $(use_enable examples)"
+ else
+ # those will be overwritten anyway
+ myconf=" --disable-examples"
+ fi
+
+ # --disable-spec because LaTeX documentation has been prebuilt
+ ECONF_SOURCE="${S}" econf \
+ $(use_enable static-libs static) \
+ --disable-spec \
+ $(use_enable encode) \
+ ${myconf}
+}
+
+multilib_src_install() {
+ emake \
+ DESTDIR="${D}" \
+ docdir="${EPREFIX}"/usr/share/doc/${PF} \
+ install
+
+ if use examples && [ "${ABI}" = "${DEFAULT_ABI}" ]; then
+ dobin examples/.libs/png2theora
+ for bin in dump_{psnr,video} {encoder,player}_example; do
+ newbin examples/.libs/${bin} theora_${bin}
+ done
+ fi
+}
+
+multilib_src_install_all() {
+ prune_libtool_files
+ einstalldocs
+
+ if use examples && use doc; then
+ docinto examples
+ dodoc examples/*.[ch]
+ docompress -x /usr/share/doc/${PF}/examples
+ docinto .
+ fi
+}
diff --git a/media-libs/libtheora/libtheora-1.1.1.ebuild b/media-libs/libtheora/libtheora-1.1.1.ebuild
new file mode 100644
index 000000000000..ddac4368c998
--- /dev/null
+++ b/media-libs/libtheora/libtheora-1.1.1.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils flag-o-matic
+
+DESCRIPTION="The Theora Video Compression Codec"
+HOMEPAGE="http://www.theora.org"
+SRC_URI="http://downloads.xiph.org/releases/theora/${P/_}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-aix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="doc +encode examples static-libs"
+
+RDEPEND="media-libs/libogg:=
+ encode? ( media-libs/libvorbis:= )
+ examples? (
+ media-libs/libpng:0=
+ >=media-libs/libsdl-0.11.0
+ media-libs/libvorbis:=
+ )"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )
+ virtual/pkgconfig"
+REQUIRED_USE="examples? ( encode )" #285895
+
+S=${WORKDIR}/${P/_}
+
+VARTEXFONTS=${T}/fonts
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-1.0_beta2-flags.patch \
+ "${FILESDIR}"/${P}-libpng16.patch #465450
+
+ # bug 467006
+ sed -i "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/" configure.ac || die
+
+ AT_M4DIR=m4 eautoreconf
+}
+
+src_configure() {
+ use x86 && filter-flags -fforce-addr -frename-registers #200549
+ use doc || export ac_cv_prog_HAVE_DOXYGEN=false
+
+ # --disable-spec because LaTeX documentation has been prebuilt
+ econf \
+ $(use_enable static-libs static) \
+ --disable-spec \
+ $(use_enable encode) \
+ $(use_enable examples)
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ docdir="${EPREFIX}"/usr/share/doc/${PF} \
+ install
+
+ dodoc AUTHORS CHANGES README
+
+ if use examples; then
+ if use doc; then
+ insinto /usr/share/doc/${PF}/examples
+ doins examples/*.[ch]
+ fi
+
+ dobin examples/.libs/png2theora
+ for bin in dump_{psnr,video} {encoder,player}_example; do
+ newbin examples/.libs/${bin} theora_${bin}
+ done
+ fi
+
+ prune_libtool_files
+}
diff --git a/media-libs/libtheora/metadata.xml b/media-libs/libtheora/metadata.xml
new file mode 100644
index 000000000000..1cadc2e4ec21
--- /dev/null
+++ b/media-libs/libtheora/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-libs/libtiger/Manifest b/media-libs/libtiger/Manifest
new file mode 100644
index 000000000000..872c1b975d09
--- /dev/null
+++ b/media-libs/libtiger/Manifest
@@ -0,0 +1 @@
+DIST libtiger-0.3.4.tar.gz 383685 SHA256 7342b255fb476d75b08dd4c56d5ce580f39b1c71c42e99fb7af9d999725d4166 SHA512 559e522b5127f32fdd08d62c40dfb493dc2db1efd1e21707d723ef27cbe03e7e38fb04d40856d824ed0c3c94a223ed1a0358fc11ecb30446b5ee5c7a3b802e6d WHIRLPOOL 8b5234d35c8ed882b52395883ecbbcfba2bf4f92b8d85e274476837b515615847deaaa55a3f617b630413bc6c6baf613030c9ec194394a73836f1cb3498b2a2a
diff --git a/media-libs/libtiger/files/libtiger-0.3.3-check.patch b/media-libs/libtiger/files/libtiger-0.3.3-check.patch
new file mode 100644
index 000000000000..bcb32b683096
--- /dev/null
+++ b/media-libs/libtiger/files/libtiger-0.3.3-check.patch
@@ -0,0 +1,17 @@
+http://git.xiph.org/?p=users/oggk/tiger.git;a=commitdiff;h=3233686e501163f38cc28425827b901e258bfcc3
+fixes tests on eg arm.
+
+Index: libtiger-0.3.3/Makefile.in
+===================================================================
+--- libtiger-0.3.3.orig/Makefile.in
++++ libtiger-0.3.3/Makefile.in
+@@ -991,8 +991,7 @@ check-local:
+ @echo " Checking Tiger namespace"
+ @! @NM@ -B lib/.libs/*.a lib/.libs/*.so \
+ | $(GREP) "^[0-9a-z]\{8\} [A-MO-Z] [^\.]" \
+- | $(GREP) -vE " (_DYNAMIC|_init|_fini|_edata|_end|__bss_start)$$" \
+- | $(GREP) -vE " _(rest|save)[fg]pr_[0-9]*(|_x)$$" \
++ | $(GREP) -v "^.\{11\}_" \
+ | $(GREP) -v "^.\{11\}tiger_"
+ @echo " Checking memory allocation routines"
+ @! $(GREP) -EHn '[^_](malloc|realloc|free|calloc|memalign)\(' \
diff --git a/media-libs/libtiger/libtiger-0.3.4.ebuild b/media-libs/libtiger/libtiger-0.3.4.ebuild
new file mode 100644
index 000000000000..7724b3350499
--- /dev/null
+++ b/media-libs/libtiger/libtiger-0.3.4.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 libtool
+
+DESCRIPTION="A rendering library for Kate streams using Pango and Cairo"
+HOMEPAGE="http://code.google.com/p/libtiger/"
+SRC_URI="http://libtiger.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="doc"
+
+RDEPEND="x11-libs/pango
+ >=media-libs/libkate-0.2.0
+ x11-libs/cairo"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+src_prepare() {
+ elibtoolize
+}
+
+src_configure() {
+ econf $(use_enable doc) --docdir=/usr/share/doc/${PF}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc THANKS README ChangeLog AUTHORS
+ find "${ED}" -name '*.la' -exec rm -f {} +
+}
diff --git a/media-libs/libtiger/metadata.xml b/media-libs/libtiger/metadata.xml
new file mode 100644
index 000000000000..f8d4166ac6fd
--- /dev/null
+++ b/media-libs/libtiger/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">libtiger is a rendering library for Kate streams using Pango and Cairo.
+ More information about Kate streams may be found at
+ http://wiki.xiph.org/index.php/OggKate</longdescription>
+ <upstream>
+ <remote-id type="google-code">libtiger</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libtimidity/Manifest b/media-libs/libtimidity/Manifest
new file mode 100644
index 000000000000..a1b3ba919bed
--- /dev/null
+++ b/media-libs/libtimidity/Manifest
@@ -0,0 +1 @@
+DIST libtimidity-0.1.0.tar.bz2 273410 SHA256 52c6de6608ba640b4678041c01320290790a1f18c901ef03575fbf47807350bf SHA512 7401e9b85c7e93c17871a9d767dfa9434808bf90d7d693522862c5f534f56dcac6c39fe24fc38b097505df349dad9f57e7ea2c6ae2deb9adce7d2ec861184ed1 WHIRLPOOL 380075ba9b84a14f7ad36a7f974d74d94a221f375c2d59bf3afcfa4fb616f01945f1c9c8d0a940763d558243d9213b252850b81003b00174e31a47ea0b35e4f6
diff --git a/media-libs/libtimidity/files/libtimidity-0.1.0-automagic.patch b/media-libs/libtimidity/files/libtimidity-0.1.0-automagic.patch
new file mode 100644
index 000000000000..ead93ffd32dd
--- /dev/null
+++ b/media-libs/libtimidity/files/libtimidity-0.1.0-automagic.patch
@@ -0,0 +1,30 @@
+diff -ur libtimidity-0.1.0.orig/configure.ac libtimidity-0.1.0/configure.ac
+--- libtimidity-0.1.0.orig/configure.ac 2004-11-23 06:30:46.000000000 +0200
++++ libtimidity-0.1.0/configure.ac 2007-08-02 15:51:47.000000000 +0300
+@@ -39,9 +39,24 @@
+ # Checks for libraries.
+ LIBTIMIDITY_LIBS=""
+ AC_CHECK_LIB([m], [pow], [LIBTIMIDITY_LIBS="$TIMIDITY_LIBS -lm"])
+-have_ao=no
+-XIPH_PATH_AO([have_ao=yes])
++
++AC_ARG_ENABLE([ao],
++ [AS_HELP_STRING([--enable-ao], [Enable libao (default=disabled)])],
++ [have_ao="$enableval"],
++ [have_ao="no"]
++)
++
++if test "$have_ao" = "yes"; then
++ PKG_CHECK_MODULES([AO], [ao >= 0.8.5])
++ AC_DEFINE([AO], [], [Define when building with ao])
++ HAVE_AO="true"
++else
++ HAVE_AO="false"
++fi
++
++AC_SUBST([ENABLE_AO])
+ AM_CONDITIONAL([HAVE_AO], [test $have_ao = yes])
++AC_SUBST(AO_LIBS)
+
+ # Checks for header files.
+ AC_HEADER_STDC
diff --git a/media-libs/libtimidity/files/libtimidity-0.1.0-newlen-overflow.patch b/media-libs/libtimidity/files/libtimidity-0.1.0-newlen-overflow.patch
new file mode 100644
index 000000000000..22952a5ebba1
--- /dev/null
+++ b/media-libs/libtimidity/files/libtimidity-0.1.0-newlen-overflow.patch
@@ -0,0 +1,22 @@
+diff -Naur libtimidity-0.1.0/src/resample.c libtimidity-0.1.0-r1/src/resample.c
+--- libtimidity-0.1.0/src/resample.c 2004-11-21 23:02:53.000000000 +0100
++++ libtimidity-0.1.0-r1/src/resample.c 2008-02-24 18:46:36.000000000 +0100
+@@ -545,7 +545,8 @@
+ void pre_resample(MidSong *song, MidSample *sp)
+ {
+ double a, xdiff;
+- sint32 incr, ofs, newlen, count;
++ sint32 incr, ofs, count;
++ unsigned int newlen;
+ sint16 *newdata, *dest, *src = (sint16 *) sp->data;
+ sint16 v1, v2, v3, v4, *vptr;
+ #ifdef DEBUG_CHATTER
+@@ -561,7 +562,7 @@
+
+ a = ((double) (sp->sample_rate) * freq_table[(int) (sp->note_to_use)]) /
+ ((double) (sp->root_freq) * song->rate);
+- newlen = (sint32)(sp->data_length / a);
++ newlen = (unsigned int)(sp->data_length / a);
+ dest = newdata = safe_malloc(newlen >> (FRACTION_BITS - 1));
+
+ count = (newlen >> FRACTION_BITS) - 1;
diff --git a/media-libs/libtimidity/libtimidity-0.1.0-r2.ebuild b/media-libs/libtimidity/libtimidity-0.1.0-r2.ebuild
new file mode 100644
index 000000000000..c3ad5d9d9e39
--- /dev/null
+++ b/media-libs/libtimidity/libtimidity-0.1.0-r2.ebuild
@@ -0,0 +1,35 @@
+# 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="MIDI to WAVE converter library"
+HOMEPAGE="http://libtimidity.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 hppa ppc ppc64 sparc x86"
+IUSE="ao debug"
+
+RDEPEND="ao? ( >=media-libs/libao-1.1.0-r2[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+RESTRICT="test"
+DOCS="AUTHORS ChangeLog CHANGES NEWS TODO README*"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-newlen-overflow.patch \
+ "${FILESDIR}"/${P}-automagic.patch
+ eautoreconf
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ --disable-static \
+ $(use_enable ao) \
+ $(use_enable debug)
+}
diff --git a/media-libs/libtimidity/metadata.xml b/media-libs/libtimidity/metadata.xml
new file mode 100644
index 000000000000..9ec4f8c12dbb
--- /dev/null
+++ b/media-libs/libtimidity/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>sound</herd>
+ <upstream>
+ <remote-id type="sourceforge">libtimidity</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libtxc_dxtn/Manifest b/media-libs/libtxc_dxtn/Manifest
new file mode 100644
index 000000000000..a2d4513361f9
--- /dev/null
+++ b/media-libs/libtxc_dxtn/Manifest
@@ -0,0 +1 @@
+DIST libtxc_dxtn-1.0.1.tar.bz2 214038 SHA256 45290d12cdca529a3f41e7fc35c4250fc1b6d2fc16b56680f8401f6aa792ae60 SHA512 56714a8c947d9b1f47e3ccb23cff9e4e57bd131907a82968de521d094a000275b3aaeecff28e9184bcc4f3932baa1a8bfbbefbc970fcd034ff953d0617148479 WHIRLPOOL 387c4f2a6d807e18f38d9c4d90037d4abbe1dd328760ecae6dfffd9cd87a4ceb5dd61e24fc25433aa9853e4a189ff478c0d260fe71debb3f3daf42876e4e117d
diff --git a/media-libs/libtxc_dxtn/libtxc_dxtn-1.0.1-r1.ebuild b/media-libs/libtxc_dxtn/libtxc_dxtn-1.0.1-r1.ebuild
new file mode 100644
index 000000000000..2b7e624fbb18
--- /dev/null
+++ b/media-libs/libtxc_dxtn/libtxc_dxtn-1.0.1-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools-multilib
+
+DESCRIPTION="Helper library for S3TC texture (de)compression"
+HOMEPAGE="http://cgit.freedesktop.org/~mareko/libtxc_dxtn/"
+SRC_URI="http://people.freedesktop.org/~cbrill/${PN}/${P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~ppc64 x86"
+IUSE=""
+
+RDEPEND="media-libs/mesa"
+DEPEND="${RDEPEND}"
+
+RESTRICT="bindist"
+
+src_install() {
+ autotools-multilib_src_install
+
+ # libtxc_dxtn is installed as a module (plugin)
+ prune_libtool_files --all
+}
+
+pkg_postinst() {
+ ewarn "Depending on where you live, you might need a valid license for s3tc"
+ ewarn "in order to be legally allowed to use the external library."
+ ewarn "Redistribution in binary form might also be problematic."
+ ewarn
+ ewarn "You have been warned. Have a nice day."
+}
diff --git a/media-libs/libtxc_dxtn/libtxc_dxtn-1.0.1.ebuild b/media-libs/libtxc_dxtn/libtxc_dxtn-1.0.1.ebuild
new file mode 100644
index 000000000000..bb7a7fd6f7c1
--- /dev/null
+++ b/media-libs/libtxc_dxtn/libtxc_dxtn-1.0.1.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit autotools-utils multilib
+
+DESCRIPTION="Helper library for S3TC texture (de)compression"
+HOMEPAGE="http://cgit.freedesktop.org/~mareko/libtxc_dxtn/"
+SRC_URI="http://people.freedesktop.org/~cbrill/${PN}/${P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~ppc64 x86"
+IUSE="multilib"
+
+RDEPEND="media-libs/mesa"
+DEPEND="${RDEPEND}"
+
+RESTRICT="bindist"
+
+foreachabi() {
+ if use multilib; then
+ local ABI
+ for ABI in $(get_all_abis); do
+ multilib_toolchain_setup ${ABI}
+ AUTOTOOLS_BUILD_DIR=${WORKDIR}/${ABI} "${@}"
+ done
+ else
+ "${@}"
+ fi
+}
+
+src_configure() {
+ foreachabi autotools-utils_src_configure
+}
+
+src_compile() {
+ foreachabi autotools-utils_src_compile
+}
+
+src_install() {
+ foreachabi autotools-utils_src_install
+ find "${ED}" -name '*.la' -exec rm -f {} +
+}
+
+src_test() {
+ :;
+}
+
+pkg_postinst() {
+ ewarn "Depending on where you live, you might need a valid license for s3tc"
+ ewarn "in order to be legally allowed to use the external library."
+ ewarn "Redistribution in binary form might also be problematic."
+ ewarn
+ ewarn "You have been warned. Have a nice day."
+}
diff --git a/media-libs/libtxc_dxtn/metadata.xml b/media-libs/libtxc_dxtn/metadata.xml
new file mode 100644
index 000000000000..01c4c004e735
--- /dev/null
+++ b/media-libs/libtxc_dxtn/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>x11</herd>
+</pkgmetadata>
diff --git a/media-libs/libuninameslist/Manifest b/media-libs/libuninameslist/Manifest
new file mode 100644
index 000000000000..4da3a133c903
--- /dev/null
+++ b/media-libs/libuninameslist/Manifest
@@ -0,0 +1 @@
+DIST libuninameslist-20091231.tar.bz2 568820 SHA256 ea401c625d849a0b554abf9800289ad38eb63817fafc277fe7301e454ab3fec7 SHA512 3780759428ef2bf2fd808de6ea87a44cf85952f926240ea355d692ef08b5e50c1cf068a2ee05b00cf0fc6b725d71142306aae01e9d6e5144291f6e5dc4505bc2 WHIRLPOOL e5b4ec255048745b8101c661a4f8e39a02ca8eb014e41dd63ff372fbd0de09b049e611c1ca823fab2add449d8180e6442bb0c45c5a1fadb3c07146cc946a41f9
diff --git a/media-libs/libuninameslist/libuninameslist-20091231.ebuild b/media-libs/libuninameslist/libuninameslist-20091231.ebuild
new file mode 100644
index 000000000000..c58bb3d4bb7b
--- /dev/null
+++ b/media-libs/libuninameslist/libuninameslist-20091231.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="Library of unicode annotation data"
+HOMEPAGE="http://libuninameslist.sourceforge.net/"
+SRC_URI="mirror://sourceforge/libuninameslist/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-solaris"
+IUSE=""
+
+S=${WORKDIR}/${PN}
+
+src_configure() {
+ econf \
+ --disable-static
+}
+
+src_install() {
+ default
+ find "${ED}" -name '*.la' -exec rm -f {} +
+}
diff --git a/media-libs/libuninameslist/metadata.xml b/media-libs/libuninameslist/metadata.xml
new file mode 100644
index 000000000000..d7c7c86a9ef4
--- /dev/null
+++ b/media-libs/libuninameslist/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>cjk</herd>
+ <herd>fonts</herd>
+ <upstream>
+ <remote-id type="sourceforge">libuninameslist</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libv4l/Manifest b/media-libs/libv4l/Manifest
new file mode 100644
index 000000000000..34e8f969eed6
--- /dev/null
+++ b/media-libs/libv4l/Manifest
@@ -0,0 +1,6 @@
+DIST v4l-utils-0.8.9.tar.bz2 460681 SHA256 3e5511c252b3c320d0b03418f7ee19b42d00ed0871c6b525779007416e46d08e SHA512 3778dbd4d0bb44c6f4762a8551625c1f5bfcf7a10de33c71c2442483d496bc177aef979b747b327f4eca3229fc22eec484de7308588acf9fc48ae6d1d5edee40 WHIRLPOOL 346d2c23c5e8b8ac3128100cf660b1f4880ec5fffd3fa107accf7f536adeacc945cb9aadd61f2f99a6fd32bd7a44912680d2cf867f0a84f28c949707634c676f
+DIST v4l-utils-0.9.5.tar.bz2 975311 SHA256 6c9f1be981d5763069e0969ebe426c39da5a7d738865367e390e3b486f1b502c SHA512 219a789907279ce4532d53989f1efe5cac7bbf0971a215c4e6e42228510c88f52ed2d7a4ce80d2f6673af9c0e5acd99160b6b3e6475f7a7a80534ce867a52a63 WHIRLPOOL 716e7a8ff82b899ea18772a36d5520c5242effbff819bf30e73c7b29d087f0ed055a013fb20c469660317acf1f2df826255ce564ed318468cb0f72af39ebf47a
+DIST v4l-utils-1.0.0.tar.bz2 963427 SHA256 1de3882099e04e89e354675ee408b82c8ac8afd3ca6ab27ea321771901285f30 SHA512 19e31167015623f50f93dc27becb8f053ca7488ffc41e275c195cb46af63671a0cec6cecea71d90a43b3b01b47f6e6cc2f44517dddd3c2c376bb1d82f770117e WHIRLPOOL 133d85232457545a828e783ca503d368a5da814ab51d70648ef9a727947a21a07bf82e8ebdcbc48b4fc9a139bdff22c73f0dd1ad666cf8f8a051f7df93e4f2fe
+DIST v4l-utils-1.2.1.tar.bz2 1042071 SHA256 9b658fbcaaf8127115316e07fea314aebc21dd6dc3491cd8753a768521c4b9af SHA512 d70f2ea53b7e687aaafb3d59ba5d4d045ecbac731926f37cdd40f1d9d41ac14250055d1caa55dd2602bf86b2b80210ab63cc44208cc94570ebbcb48a70e067a5 WHIRLPOOL 99ca9702062e173ab2180cc99334881735ace042a621adc7acb7b6093b5a66bf79c51a073b550eea2e5c02f36e414a48b6138f0b2185bfe8de1b4667dceeaf5b
+DIST v4l-utils-1.6.0.tar.bz2 1146003 SHA256 6054d3120c67a1524993e699b3b02036c817bb000b742c332682163966dc7605 SHA512 328d771a58fd8aa5378a7bd96c4e1d9fa805f0fa2331f9446f3311951f0a9df1441d344abe485cf144e92b0fdf4f9505eb812c7b99410941f2fc543f8cb2ee20 WHIRLPOOL 26ee7e63c6624f4da59e0ac5b4f8e78cce918528595caae63111a4909efbf7be955d6be3d5752cb5628353fce5dbc4e49ac8a7d94f5de0cf49e545035608e500
+DIST v4l-utils-1.6.2.tar.bz2 1148309 SHA256 d3d6eb1f0204fb11f3d318bfca35d5f73cc077f88fac7665a47856a16496be7d SHA512 e14442e1b3660d0cb0844f1a5a88f855bc8532df9e72e1b2afd348a7c077ad25657f832d0fd47d3f567bfd399fd82c5a749d075ac9ecb911ea462685e31aa0b2 WHIRLPOOL bd1b825354ca52e62e8c5f83d43bfd2cec63611c65d6b2709a7274fd15ae0fa21345d2b95a073c0b3a33b7c94b304562f1efcf112e1357a58515bd0d6f37f396
diff --git a/media-libs/libv4l/files/libv4l-0.8.8-drop-Wp-flags.patch b/media-libs/libv4l/files/libv4l-0.8.8-drop-Wp-flags.patch
new file mode 100644
index 000000000000..9146f0480e0d
--- /dev/null
+++ b/media-libs/libv4l/files/libv4l-0.8.8-drop-Wp-flags.patch
@@ -0,0 +1,22 @@
+don't bother generating dependency information:
+ - we don't use/care because we aren't doing rebuilds
+ - it uses the -Wp flag which is gcc specific for no good reason
+
+upstream has rewritten things to use autotools, so this will go away
+once they release another version
+
+--- a/Make.rules
++++ b/Make.rules
+@@ -23,10 +23,10 @@ LIB_RELEASE = 0
+ # And last various rules
+
+ %.o: %.c
+- $(CC) -Wp,-MMD,"$*.d",-MQ,"$@",-MP -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
++ $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
+
+ %.o: %.cpp
+- $(CXX) -Wp,-MMD,"$*.d",-MQ,"$@",-MP -c $(CPPFLAGS) $(CXXFLAGS) -o $@ $<
++ $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) -o $@ $<
+
+ %.so:
+ $(CC) -shared $(LDFLAGS) -Wl,-soname,$@.$(LIB_RELEASE) -o $@.$(LIB_RELEASE) $^ $(LIBS_$*)
diff --git a/media-libs/libv4l/libv4l-0.8.9.ebuild b/media-libs/libv4l/libv4l-0.8.9.ebuild
new file mode 100644
index 000000000000..56c390a4cc15
--- /dev/null
+++ b/media-libs/libv4l/libv4l-0.8.9.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils linux-info multilib toolchain-funcs
+
+MY_P=v4l-utils-${PV}
+
+DESCRIPTION="Separate libraries ebuild from upstream v4l-utils package"
+HOMEPAGE="http://git.linuxtv.org/v4l-utils.git"
+SRC_URI="http://linuxtv.org/downloads/v4l-utils/${MY_P}.tar.bz2"
+
+LICENSE="LGPL-2.1+"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND="virtual/jpeg"
+DEPEND="${RDEPEND}
+ >=sys-kernel/linux-headers-2.6.30-r1"
+
+S=${WORKDIR}/${MY_P}
+
+CONFIG_CHECK="~SHMEM"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.8.8-drop-Wp-flags.patch
+ sed -i \
+ -e "/^PREFIX =/s:=.*:= ${EPREFIX}/usr:" \
+ -e "/^LIBDIR =/s:/lib:/$(get_libdir):" \
+ -e "/^CFLAGS :=/d" \
+ Make.rules || die
+ tc-export CC
+}
+
+src_compile() {
+ emake -C lib
+}
+
+src_install() {
+ emake -C lib DESTDIR="${D}" install
+ dodoc ChangeLog README.lib* TODO
+}
diff --git a/media-libs/libv4l/libv4l-0.9.5-r1.ebuild b/media-libs/libv4l/libv4l-0.9.5-r1.ebuild
new file mode 100644
index 000000000000..baa8ddb88ae3
--- /dev/null
+++ b/media-libs/libv4l/libv4l-0.9.5-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 linux-info udev multilib-minimal
+
+MY_P=v4l-utils-${PV}
+
+DESCRIPTION="Separate libraries ebuild from upstream v4l-utils package"
+HOMEPAGE="http://git.linuxtv.org/v4l-utils.git"
+SRC_URI="http://linuxtv.org/downloads/v4l-utils/${MY_P}.tar.bz2"
+
+LICENSE="LGPL-2.1+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+# The libraries only link to -ljpeg, therefore multilib depend only for virtual/jpeg.
+RDEPEND=">=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}]
+ virtual/glu
+ virtual/opengl
+ x11-libs/libX11:=
+ !media-tv/v4l2-ctl
+ !<media-tv/ivtv-utils-1.4.0-r2
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20130224-r5
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ virtual/os-headers
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ CONFIG_CHECK="~SHMEM"
+ linux-info_pkg_setup
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE=${S} \
+ econf \
+ --disable-static \
+ --disable-qv4l2 \
+ --disable-v4l-utils \
+ --with-udevdir="$(get_udevdir)"
+}
+
+multilib_src_compile() {
+ emake -C lib
+}
+
+multilib_src_install() {
+ emake -j1 -C lib DESTDIR="${D}" install
+}
+
+multilib_src_install_all() {
+ dodoc ChangeLog README.lib* TODO
+ prune_libtool_files --all
+}
diff --git a/media-libs/libv4l/libv4l-0.9.5.ebuild b/media-libs/libv4l/libv4l-0.9.5.ebuild
new file mode 100644
index 000000000000..142159324a5e
--- /dev/null
+++ b/media-libs/libv4l/libv4l-0.9.5.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils linux-info udev
+
+MY_P=v4l-utils-${PV}
+
+DESCRIPTION="Separate libraries ebuild from upstream v4l-utils package"
+HOMEPAGE="http://git.linuxtv.org/v4l-utils.git"
+SRC_URI="http://linuxtv.org/downloads/v4l-utils/${MY_P}.tar.bz2"
+
+LICENSE="LGPL-2.1+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND="virtual/jpeg:0=
+ virtual/glu
+ virtual/opengl
+ x11-libs/libX11:=
+ !media-tv/v4l2-ctl
+ !<media-tv/ivtv-utils-1.4.0-r2"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ virtual/os-headers
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ CONFIG_CHECK="~SHMEM"
+ linux-info_pkg_setup
+}
+
+src_configure() {
+ econf \
+ --disable-static \
+ --disable-qv4l2 \
+ --disable-v4l-utils \
+ --with-udevdir="$(get_udevdir)"
+}
+
+src_compile() {
+ emake -C lib
+}
+
+src_install() {
+ emake -j1 -C lib DESTDIR="${D}" install
+ dodoc ChangeLog README.lib* TODO
+ prune_libtool_files --all
+}
diff --git a/media-libs/libv4l/libv4l-1.0.0.ebuild b/media-libs/libv4l/libv4l-1.0.0.ebuild
new file mode 100644
index 000000000000..e10ebbeedf49
--- /dev/null
+++ b/media-libs/libv4l/libv4l-1.0.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
+inherit eutils linux-info udev multilib-minimal
+
+MY_P=v4l-utils-${PV}
+
+DESCRIPTION="Separate libraries ebuild from upstream v4l-utils package"
+HOMEPAGE="http://git.linuxtv.org/v4l-utils.git"
+SRC_URI="http://linuxtv.org/downloads/v4l-utils/${MY_P}.tar.bz2"
+
+LICENSE="LGPL-2.1+"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+# The libraries only link to -ljpeg, therefore multilib depend only for virtual/jpeg.
+RDEPEND=">=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}]
+ virtual/glu
+ virtual/opengl
+ x11-libs/libX11:=
+ !media-tv/v4l2-ctl
+ !<media-tv/ivtv-utils-1.4.0-r2
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20130224-r5
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ virtual/os-headers
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ CONFIG_CHECK="~SHMEM"
+ linux-info_pkg_setup
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE=${S} \
+ econf \
+ --disable-static \
+ --disable-qv4l2 \
+ --disable-v4l-utils \
+ --with-udevdir="$(get_udevdir)"
+}
+
+multilib_src_compile() {
+ emake -C lib
+}
+
+multilib_src_install() {
+ emake -j1 -C lib DESTDIR="${D}" install
+}
+
+multilib_src_install_all() {
+ dodoc ChangeLog README.lib* TODO
+ prune_libtool_files --all
+}
diff --git a/media-libs/libv4l/libv4l-1.2.1.ebuild b/media-libs/libv4l/libv4l-1.2.1.ebuild
new file mode 100644
index 000000000000..baa8ddb88ae3
--- /dev/null
+++ b/media-libs/libv4l/libv4l-1.2.1.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 linux-info udev multilib-minimal
+
+MY_P=v4l-utils-${PV}
+
+DESCRIPTION="Separate libraries ebuild from upstream v4l-utils package"
+HOMEPAGE="http://git.linuxtv.org/v4l-utils.git"
+SRC_URI="http://linuxtv.org/downloads/v4l-utils/${MY_P}.tar.bz2"
+
+LICENSE="LGPL-2.1+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+# The libraries only link to -ljpeg, therefore multilib depend only for virtual/jpeg.
+RDEPEND=">=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}]
+ virtual/glu
+ virtual/opengl
+ x11-libs/libX11:=
+ !media-tv/v4l2-ctl
+ !<media-tv/ivtv-utils-1.4.0-r2
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20130224-r5
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ virtual/os-headers
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ CONFIG_CHECK="~SHMEM"
+ linux-info_pkg_setup
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE=${S} \
+ econf \
+ --disable-static \
+ --disable-qv4l2 \
+ --disable-v4l-utils \
+ --with-udevdir="$(get_udevdir)"
+}
+
+multilib_src_compile() {
+ emake -C lib
+}
+
+multilib_src_install() {
+ emake -j1 -C lib DESTDIR="${D}" install
+}
+
+multilib_src_install_all() {
+ dodoc ChangeLog README.lib* TODO
+ prune_libtool_files --all
+}
diff --git a/media-libs/libv4l/libv4l-1.6.0-r1.ebuild b/media-libs/libv4l/libv4l-1.6.0-r1.ebuild
new file mode 100644
index 000000000000..79ab2f0c6ee2
--- /dev/null
+++ b/media-libs/libv4l/libv4l-1.6.0-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 linux-info multilib-minimal
+
+MY_P=v4l-utils-${PV}
+
+DESCRIPTION="Separate libraries ebuild from upstream v4l-utils package"
+HOMEPAGE="http://git.linuxtv.org/v4l-utils.git"
+SRC_URI="http://linuxtv.org/downloads/v4l-utils/${MY_P}.tar.bz2"
+
+LICENSE="LGPL-2.1+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="jpeg"
+
+# The libraries only link to -ljpeg, therefore multilib depend only for virtual/jpeg.
+RDEPEND="jpeg? ( >=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}] )
+ !media-tv/v4l2-ctl
+ !<media-tv/ivtv-utils-1.4.0-r2
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-medialibs-20130224-r5
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ )"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ virtual/os-headers
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ CONFIG_CHECK="~SHMEM"
+ linux-info_pkg_setup
+}
+
+multilib_src_configure() {
+ # Hard disable the flags that apply only to the utils.
+ ECONF_SOURCE=${S} \
+ econf \
+ --disable-static \
+ --disable-qv4l2 \
+ --disable-v4l-utils \
+ --without-libudev \
+ $(use_with jpeg)
+}
+
+multilib_src_compile() {
+ emake -C lib
+}
+
+multilib_src_install() {
+ emake -j1 -C lib DESTDIR="${D}" install
+}
+
+multilib_src_install_all() {
+ dodoc ChangeLog README.lib* TODO
+ prune_libtool_files --all
+}
diff --git a/media-libs/libv4l/libv4l-1.6.0.ebuild b/media-libs/libv4l/libv4l-1.6.0.ebuild
new file mode 100644
index 000000000000..e538920f09ff
--- /dev/null
+++ b/media-libs/libv4l/libv4l-1.6.0.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils linux-info udev multilib-minimal
+
+MY_P=v4l-utils-${PV}
+
+DESCRIPTION="Separate libraries ebuild from upstream v4l-utils package"
+HOMEPAGE="http://git.linuxtv.org/v4l-utils.git"
+SRC_URI="http://linuxtv.org/downloads/v4l-utils/${MY_P}.tar.bz2"
+
+LICENSE="LGPL-2.1+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+# The libraries only link to -ljpeg, therefore multilib depend only for virtual/jpeg.
+RDEPEND=">=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}]
+ virtual/glu
+ virtual/opengl
+ x11-libs/libX11:=
+ !media-tv/v4l2-ctl
+ !<media-tv/ivtv-utils-1.4.0-r2
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-medialibs-20130224-r5
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ )"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ virtual/os-headers
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ CONFIG_CHECK="~SHMEM"
+ linux-info_pkg_setup
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE=${S} \
+ econf \
+ --disable-static \
+ --disable-qv4l2 \
+ --disable-v4l-utils \
+ --with-udevdir="$(get_udevdir)"
+}
+
+multilib_src_compile() {
+ emake -C lib
+}
+
+multilib_src_install() {
+ emake -j1 -C lib DESTDIR="${D}" install
+}
+
+multilib_src_install_all() {
+ dodoc ChangeLog README.lib* TODO
+ prune_libtool_files --all
+}
diff --git a/media-libs/libv4l/libv4l-1.6.2.ebuild b/media-libs/libv4l/libv4l-1.6.2.ebuild
new file mode 100644
index 000000000000..fa076f2302c7
--- /dev/null
+++ b/media-libs/libv4l/libv4l-1.6.2.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils linux-info multilib-minimal
+
+MY_P=v4l-utils-${PV}
+
+DESCRIPTION="Separate libraries ebuild from upstream v4l-utils package"
+HOMEPAGE="http://git.linuxtv.org/v4l-utils.git"
+SRC_URI="http://linuxtv.org/downloads/v4l-utils/${MY_P}.tar.bz2"
+
+LICENSE="LGPL-2.1+"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-linux ~x86-linux"
+IUSE="jpeg"
+
+# The libraries only link to -ljpeg, therefore multilib depend only for virtual/jpeg.
+RDEPEND="jpeg? ( >=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}] )
+ !media-tv/v4l2-ctl
+ !<media-tv/ivtv-utils-1.4.0-r2
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-medialibs-20130224-r5
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ )"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ virtual/os-headers
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ CONFIG_CHECK="~SHMEM"
+ linux-info_pkg_setup
+}
+
+multilib_src_configure() {
+ # Hard disable the flags that apply only to the utils.
+ ECONF_SOURCE=${S} \
+ econf \
+ --disable-static \
+ --disable-qv4l2 \
+ --disable-v4l-utils \
+ --without-libudev \
+ $(use_with jpeg)
+}
+
+multilib_src_compile() {
+ emake -C lib
+}
+
+multilib_src_install() {
+ emake -j1 -C lib DESTDIR="${D}" install
+}
+
+multilib_src_install_all() {
+ dodoc ChangeLog README.lib* TODO
+ prune_libtool_files --all
+}
diff --git a/media-libs/libv4l/metadata.xml b/media-libs/libv4l/metadata.xml
new file mode 100644
index 000000000000..1e04bfc393c8
--- /dev/null
+++ b/media-libs/libv4l/metadata.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>media-tv</herd>
+ <maintainer>
+ <email>tetromino@gentoo.org</email>
+ <name>Alexandre Rostovtsev</name>
+ </maintainer>
+ <longdescription lang="en">
+ libv4l is a collection of libraries which adds a thin abstraction layer on
+ top of video4linux2 devices. The purpose of this (thin) layer is to make it
+ easy for application writers to support a wide variety of devices without
+ having to write separate code for different devices in the same class.
+
+ libv4l consists of 3 different libraries: libv4lconvert, libv4l1 and libv4l2.
+
+ libv4lconvert offers functions to convert from any (known) pixelformat
+ to V4l2_PIX_FMT_BGR24 or V4l2_PIX_FMT_YUV420.
+
+ libv4l1 offers the (deprecated) v4l1 API on top of v4l2 devices, independent
+ of the drivers for those devices supporting v4l1 compatibility (which many
+ v4l2 drivers do not).
+
+ libv4l2 offers the v4l2 API on top of v4l2 devices, while adding for the
+ application transparent libv4lconvert conversion where necessary.
+ </longdescription>
+</pkgmetadata>
+
diff --git a/media-libs/libvisio/Manifest b/media-libs/libvisio/Manifest
new file mode 100644
index 000000000000..88298e9c2a20
--- /dev/null
+++ b/media-libs/libvisio/Manifest
@@ -0,0 +1,3 @@
+DIST libvisio-0.0.30.tar.xz 384508 SHA256 e7be89fdef23483deea53a557fe023c9f6b59e0f7bb5ba4f42b5909c86cc11f9 SHA512 d0261f30ca9065873aa498f7594a638d0a90dadd4df609a91e746579d14b5f1f18aa4e4812d25870b390f2df59ffa8f8a4d76618c6e71539023b7610044c9d21 WHIRLPOOL 1e328569f3e810c6cc1399015b7fb5b4aa206e0127109efaad23163fba8d45a4a74945ff6cca3dcc883dcd1248be69149383a2d9f44fb5be213ebfcd2574a92e
+DIST libvisio-0.1.1.tar.xz 412752 SHA256 4b510168d1465516fdf6e57c01e2f9eae1fc0ae232c74e44e70693bbc49227f1 SHA512 c17c3a94985bd4c6fb10fc27d1b61ac812d5b663d123d2a5a5089f9297d39c53befffd563e6367aa024df7f69c03a1cfa41edef71c824cf03e26e3b01987dd38 WHIRLPOOL 47b81e6f4ad9f6267113d259f3d9514751fd73a731ded9b265dddbaa918bee5be1a1580ced9ceb287822ee8a67841f15ca06e04d300212301ae5549625589cfa
+DIST libvisio-0.1.3.tar.xz 479592 SHA256 943e03b1e6c969af4c2133a6671c9630adf3aaf8d460156744a28f58c9f47cd8 SHA512 aa7ea66d30b54e70acd6684a861923dd5979025e5fda12e1e777c6e7a461f9691f2df1dd67ea4599dbb7e0293df0eee9dc9848f79067c4058afb090717489d35 WHIRLPOOL db483c052f69d1874681d36bac98bb7d65f6fd1cd2e8650fc2be0be1705b51dc43a79ad306eafacf11f4463e2e1a18776c3b5e5b0aefc7f92f5eb718aee50e04
diff --git a/media-libs/libvisio/libvisio-0.0.30.ebuild b/media-libs/libvisio/libvisio-0.0.30.ebuild
new file mode 100644
index 000000000000..3ed8b0cf03c4
--- /dev/null
+++ b/media-libs/libvisio/libvisio-0.0.30.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI="git://anongit.freedesktop.org/git/libreoffice/contrib/libvisio/"
+inherit base eutils
+[[ ${PV} == 9999 ]] && inherit autotools git-2
+
+DESCRIPTION="Library parsing the visio documents"
+HOMEPAGE="http://www.freedesktop.org/wiki/Software/libvisio"
+[[ ${PV} == 9999 ]] || SRC_URI="http://dev-www.libreoffice.org/src/${P}.tar.xz"
+
+LICENSE="|| ( GPL-2+ LGPL-2.1 MPL-1.1 )"
+SLOT="0"
+[[ ${PV} == 9999 ]] || \
+KEYWORDS="amd64 ~arm ppc x86"
+IUSE="doc static-libs"
+
+RDEPEND="
+ app-text/libwpd:0.9
+ app-text/libwpg:0.2
+ dev-libs/icu:=
+ dev-libs/libxml2
+ sys-libs/zlib
+"
+DEPEND="${RDEPEND}
+ >=dev-libs/boost-1.46
+ dev-util/gperf
+ sys-devel/libtool
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )
+"
+
+src_prepare() {
+ [[ -d m4 ]] || mkdir "m4"
+ base_src_prepare
+ [[ ${PV} == 9999 ]] && eautoreconf
+}
+
+src_configure() {
+ econf \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ $(use_enable static-libs static) \
+ --disable-werror \
+ $(use_with doc docs)
+}
+
+src_install() {
+ default
+ prune_libtool_files --all
+}
diff --git a/media-libs/libvisio/libvisio-0.1.1.ebuild b/media-libs/libvisio/libvisio-0.1.1.ebuild
new file mode 100644
index 000000000000..729741b838b5
--- /dev/null
+++ b/media-libs/libvisio/libvisio-0.1.1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI="git://anongit.freedesktop.org/git/libreoffice/libvisio/"
+inherit base eutils
+[[ ${PV} == 9999 ]] && inherit autotools git-2
+
+DESCRIPTION="Library parsing the visio documents"
+HOMEPAGE="https://wiki.documentfoundation.org/DLP/Libraries/libvisio"
+[[ ${PV} == 9999 ]] || SRC_URI="http://dev-www.libreoffice.org/src/${PN}/${P}.tar.xz"
+
+LICENSE="|| ( GPL-2+ LGPL-2.1 MPL-1.1 )"
+SLOT="0"
+[[ ${PV} == 9999 ]] || \
+KEYWORDS="amd64 ~arm ~hppa ~ppc64 x86"
+IUSE="doc static-libs test"
+
+RDEPEND="
+ dev-libs/icu:=
+ dev-libs/librevenge
+ dev-libs/libxml2
+ sys-libs/zlib
+"
+DEPEND="${RDEPEND}
+ >=dev-libs/boost-1.46
+ dev-util/gperf
+ sys-devel/libtool
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )
+ test? ( dev-util/cppunit )
+"
+
+src_prepare() {
+ [[ -d m4 ]] || mkdir "m4"
+ base_src_prepare
+ [[ ${PV} == 9999 ]] && eautoreconf
+}
+
+src_configure() {
+ econf \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ $(use_enable static-libs static) \
+ --disable-werror \
+ $(use_with doc docs) \
+ $(use_enable test tests)
+}
+
+src_install() {
+ default
+ prune_libtool_files --all
+}
diff --git a/media-libs/libvisio/libvisio-0.1.3.ebuild b/media-libs/libvisio/libvisio-0.1.3.ebuild
new file mode 100644
index 000000000000..591d1b34eb80
--- /dev/null
+++ b/media-libs/libvisio/libvisio-0.1.3.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI="git://anongit.freedesktop.org/git/libreoffice/libvisio/"
+inherit base eutils
+[[ ${PV} == 9999 ]] && inherit autotools git-r3
+
+DESCRIPTION="Library parsing the visio documents"
+HOMEPAGE="https://wiki.documentfoundation.org/DLP/Libraries/libvisio"
+[[ ${PV} == 9999 ]] || SRC_URI="http://dev-www.libreoffice.org/src/${PN}/${P}.tar.xz"
+
+LICENSE="|| ( GPL-2+ LGPL-2.1 MPL-1.1 )"
+SLOT="0"
+[[ ${PV} == 9999 ]] || \
+KEYWORDS="~amd64 ~arm ~hppa ~ppc64 ~x86"
+IUSE="doc static-libs test tools"
+
+RDEPEND="
+ dev-libs/icu:=
+ dev-libs/librevenge
+ dev-libs/libxml2
+ sys-libs/zlib
+"
+DEPEND="${RDEPEND}
+ >=dev-libs/boost-1.46
+ dev-util/gperf
+ sys-devel/libtool
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )
+ test? ( dev-util/cppunit )
+"
+
+src_prepare() {
+ [[ -d m4 ]] || mkdir "m4"
+ base_src_prepare
+ [[ ${PV} == 9999 ]] && eautoreconf
+}
+
+src_configure() {
+ econf \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ $(use_enable static-libs static) \
+ --disable-werror \
+ $(use_with doc docs) \
+ $(use_enable test tests) \
+ $(use_enable tools)
+}
+
+src_install() {
+ default
+ prune_libtool_files --all
+}
diff --git a/media-libs/libvisio/libvisio-9999.ebuild b/media-libs/libvisio/libvisio-9999.ebuild
new file mode 100644
index 000000000000..591d1b34eb80
--- /dev/null
+++ b/media-libs/libvisio/libvisio-9999.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI="git://anongit.freedesktop.org/git/libreoffice/libvisio/"
+inherit base eutils
+[[ ${PV} == 9999 ]] && inherit autotools git-r3
+
+DESCRIPTION="Library parsing the visio documents"
+HOMEPAGE="https://wiki.documentfoundation.org/DLP/Libraries/libvisio"
+[[ ${PV} == 9999 ]] || SRC_URI="http://dev-www.libreoffice.org/src/${PN}/${P}.tar.xz"
+
+LICENSE="|| ( GPL-2+ LGPL-2.1 MPL-1.1 )"
+SLOT="0"
+[[ ${PV} == 9999 ]] || \
+KEYWORDS="~amd64 ~arm ~hppa ~ppc64 ~x86"
+IUSE="doc static-libs test tools"
+
+RDEPEND="
+ dev-libs/icu:=
+ dev-libs/librevenge
+ dev-libs/libxml2
+ sys-libs/zlib
+"
+DEPEND="${RDEPEND}
+ >=dev-libs/boost-1.46
+ dev-util/gperf
+ sys-devel/libtool
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )
+ test? ( dev-util/cppunit )
+"
+
+src_prepare() {
+ [[ -d m4 ]] || mkdir "m4"
+ base_src_prepare
+ [[ ${PV} == 9999 ]] && eautoreconf
+}
+
+src_configure() {
+ econf \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ $(use_enable static-libs static) \
+ --disable-werror \
+ $(use_with doc docs) \
+ $(use_enable test tests) \
+ $(use_enable tools)
+}
+
+src_install() {
+ default
+ prune_libtool_files --all
+}
diff --git a/media-libs/libvisio/metadata.xml b/media-libs/libvisio/metadata.xml
new file mode 100644
index 000000000000..96e7f4f60d1e
--- /dev/null
+++ b/media-libs/libvisio/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>openoffice</herd>
+ <use>
+ <flag name="tools">Build conversion tools</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/libvisual/Manifest b/media-libs/libvisual/Manifest
new file mode 100644
index 000000000000..64b8432353ef
--- /dev/null
+++ b/media-libs/libvisual/Manifest
@@ -0,0 +1 @@
+DIST libvisual-0.4.0.tar.gz 583386 SHA256 0b4dfdb87125e129567752089e3c8b54cefed601eef169d2533d8659da8dc1d7 SHA512 ab2286de30d33582a92f16e46436fcbc44b74649952df6e94d96aedc2cabb18d3361496c0b8ab6f52f7178214bf735673c8f1820c3d149304787ba8407201b95 WHIRLPOOL fe47914f3d252292b6ae08ecb176c6f09b0709f9bfaf61806bb7bb0e5f06b78d0705c0616c66b74bcf24e12846d6d44033187b1a5482bb9a9d5d5f20ba60212c
diff --git a/media-libs/libvisual/files/libvisual-0.4.0-better-altivec-detection.patch b/media-libs/libvisual/files/libvisual-0.4.0-better-altivec-detection.patch
new file mode 100644
index 000000000000..19aa579aa110
--- /dev/null
+++ b/media-libs/libvisual/files/libvisual-0.4.0-better-altivec-detection.patch
@@ -0,0 +1,71 @@
+http://pkgs.fedoraproject.org/gitweb/?p=libvisual.git;a=tree
+
+--- libvisual/lv_cpu.c
++++ libvisual/lv_cpu.c
+@@ -50,8 +50,19 @@
+ #endif
+
+ #if defined(VISUAL_OS_LINUX)
++#if defined(VISUAL_ARCH_POWERPC)
++#include <sys/types.h>
++#include <sys/stat.h>
++#include <fcntl.h>
++#include <unistd.h>
++#include <stdio.h>
++
++#include <linux/auxvec.h>
++#include <asm/cputable.h>
++#else /* VISUAL_ARCH_POWERPC */
+ #include <signal.h>
+ #endif
++#endif
+
+ #if defined(VISUAL_OS_WIN32)
+ #include <windows.h>
+@@ -154,6 +165,46 @@ static void check_os_altivec_support( vo
+ if (err == 0)
+ if (has_vu != 0)
+ __lv_cpu_caps.hasAltiVec = 1;
++#elif defined (VISUAL_OS_LINUX)
++ static int available = -1;
++ int new_avail = 0;
++ char fname[64];
++ unsigned long buf[64];
++ ssize_t count;
++ pid_t pid;
++ int fd, i;
++
++ if (available != -1)
++ return;
++
++ pid = getpid();
++ snprintf(fname, sizeof(fname)-1, "/proc/%d/auxv", pid);
++
++ fd = open(fname, O_RDONLY);
++ if (fd < 0)
++ goto out;
++more:
++ count = read(fd, buf, sizeof(buf));
++ if (count < 0)
++ goto out_close;
++
++ for (i=0; i < (count / sizeof(unsigned long)); i += 2) {
++ if (buf[i] == AT_HWCAP) {
++ new_avail = !!(buf[i+1] & PPC_FEATURE_HAS_ALTIVEC);
++ goto out_close;
++ } else if (buf[i] == AT_NULL) {
++ goto out_close;
++ }
++ }
++
++ if (count == sizeof(buf))
++ goto more;
++out_close:
++ close(fd);
++out:
++ available = new_avail;
++ if (available)
++ __lv_cpu_caps.hasAltiVec = 1;
+ #else /* !VISUAL_OS_DARWIN */
+ /* no Darwin, do it the brute-force way */
+ /* this is borrowed from the libmpeg2 library */
diff --git a/media-libs/libvisual/files/libvisual-0.4.0-cond.patch b/media-libs/libvisual/files/libvisual-0.4.0-cond.patch
new file mode 100644
index 000000000000..e1a3efd47418
--- /dev/null
+++ b/media-libs/libvisual/files/libvisual-0.4.0-cond.patch
@@ -0,0 +1,15 @@
+Broken --enable/disable condition.
+
+Index: libvisual-0.4.0/configure.ac
+===================================================================
+--- libvisual-0.4.0.orig/configure.ac
++++ libvisual-0.4.0/configure.ac
+@@ -191,7 +191,7 @@ AIX_COMPILE_INFO="AIX's C compiler needs
+ with the right compiler. Ususally just '_r' is appended
+ to the compiler name."
+
+-AC_ARG_ENABLE([enable_threads],
++AC_ARG_ENABLE([threads],
+ AC_HELP_STRING([--enable-threads],
+ [Turn on basic thread support @<:@default=enabled@:>@]),
+ [enable_threads=$enableval],
diff --git a/media-libs/libvisual/files/libvisual-0.4.0-conditions.patch b/media-libs/libvisual/files/libvisual-0.4.0-conditions.patch
new file mode 100644
index 000000000000..1520db2eac5e
--- /dev/null
+++ b/media-libs/libvisual/files/libvisual-0.4.0-conditions.patch
@@ -0,0 +1,24 @@
+https://bugs.gentoo.org/show_bug.cgi?id=431066
+http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=456856
+
+diff -u libvisual-0.4.0/libvisual/lv_cpu.c libvisual-0.4.0/libvisual/lv_cpu.c
+--- libvisual-0.4.0/libvisual/lv_cpu.c
++++ libvisual-0.4.0/libvisual/lv_cpu.c
+@@ -76,7 +76,7 @@
+
+ /* The sigill handlers */
+ #if defined(VISUAL_ARCH_X86) //x86 (linux katmai handler check thing)
+-#if defined(VISUAL_OS_LINUX) && defined(_POSIX_SOURCE) && defined(X86_FXSR_MAGIC)
++#if defined(VISUAL_OS_LINUX) && defined(_POSIX_SOURCE)
+ static void sigill_handler_sse( int signal, struct sigcontext sc )
+ {
+ /* Both the "xorps %%xmm0,%%xmm0" and "divps %xmm0,%%xmm1"
+@@ -109,7 +109,7 @@
+ }
+ }
+ #endif
+-#endif /* VISUAL_OS_LINUX && _POSIX_SOURCE && X86_FXSR_MAGIC */
++#endif /* VISUAL_OS_LINUX && _POSIX_SOURCE */
+
+ #if defined(VISUAL_OS_WIN32)
+ LONG CALLBACK win32_sig_handler_sse(EXCEPTION_POINTERS* ep)
diff --git a/media-libs/libvisual/files/libvisual-0.4.0-detect_amd64.patch b/media-libs/libvisual/files/libvisual-0.4.0-detect_amd64.patch
new file mode 100644
index 000000000000..a796acce3b07
--- /dev/null
+++ b/media-libs/libvisual/files/libvisual-0.4.0-detect_amd64.patch
@@ -0,0 +1,14 @@
+Needed so that lvconfig.h gets the correct define for amd64.
+
+Index: libvisual-0.4.0/configure.ac
+===================================================================
+--- libvisual-0.4.0.orig/configure.ac
++++ libvisual-0.4.0/configure.ac
+@@ -780,6 +780,7 @@ echo >>$outfile
+ lv_alpha=$lv_alpha
+ lv_sparc=$lv_sparc
+ lv_ix86=$lv_ix86
++ lv_x86_64=$lv_x86_64
+ lv_powerpc=$lv_powerpc
+ lv_arch_unknown=$lv_arch_unknown
+
diff --git a/media-libs/libvisual/files/libvisual-0.4.0-inlinedefineconflict.patch b/media-libs/libvisual/files/libvisual-0.4.0-inlinedefineconflict.patch
new file mode 100644
index 000000000000..5d04f30335a4
--- /dev/null
+++ b/media-libs/libvisual/files/libvisual-0.4.0-inlinedefineconflict.patch
@@ -0,0 +1,60 @@
+http://pkgs.fedoraproject.org/gitweb/?p=libvisual.git;a=tree
+
+--- libvisual/lv_cache.c
++++ libvisual/lv_cache.c
+@@ -32,7 +32,7 @@
+ static int cache_dtor (VisObject *object);
+ static int cache_remove_list_entry (VisCache *cache, VisListEntry **le);
+
+-static inline void handle_request_reset (VisCache *cache, VisListEntry *le);
++static lv_inline void handle_request_reset (VisCache *cache, VisListEntry *le);
+
+ static int cache_dtor (VisObject *object)
+ {
+@@ -74,7 +74,7 @@
+ }
+
+
+-static inline void handle_request_reset (VisCache *cache, VisListEntry *le)
++static lv_inline void handle_request_reset (VisCache *cache, VisListEntry *le)
+ {
+ VisCacheEntry *centry;
+
+--- libvisual/lv_defines.h
++++ libvisual/lv_defines.h
+@@ -63,13 +63,13 @@
+
+ /* Compiler specific optimalization macros */
+ #if __GNUC__ >= 3
+-# define inline inline __attribute__ ((always_inline))
++# define lv_inline inline __attribute__ ((always_inline))
+ # define __malloc __attribute__ ((malloc))
+ # define __packed __attribute__ ((packed))
+ # define VIS_LIKELY(x) __builtin_expect (!!(x), 1)
+ # define VIS_UNLIKELY(x) __builtin_expect (!!(x), 0)
+ #else
+-# define inline /* no inline */
++# define lv_inline /* no inline */
+ # define __malloc /* no malloc */
+ # define __packed /* no packed */
+ # define VIS_LIKELY(x) (x)
+--- libvisual/lv_time.h
++++ libvisual/lv_time.h
+@@ -101,7 +101,7 @@
+ *
+ * @return Nothing.
+ */
+-static inline void visual_timer_tsc_get (uint32_t *lo, uint32_t *hi)
++static lv_inline void visual_timer_tsc_get (uint32_t *lo, uint32_t *hi)
+ {
+ #if defined(VISUAL_ARCH_X86) || defined(VISUAL_ARCH_X86_64)
+ __asm __volatile
+@@ -115,7 +115,7 @@
+ }
+
+ /* FIXME use uint64_t here, make sure type exists */
+-static inline unsigned long long visual_timer_tsc_get_returned ()
++static lv_inline unsigned long long visual_timer_tsc_get_returned ()
+ {
+ uint32_t lo, hi;
+
diff --git a/media-libs/libvisual/libvisual-0.4.0-r3.ebuild b/media-libs/libvisual/libvisual-0.4.0-r3.ebuild
new file mode 100644
index 000000000000..5ec91eca3d84
--- /dev/null
+++ b/media-libs/libvisual/libvisual-0.4.0-r3.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_PRUNE_LIBTOOL_FILES=all
+AUTOTOOLS_AUTORECONF=1
+
+inherit autotools-multilib
+
+DESCRIPTION="Libvisual is an abstraction library that comes between applications and audio visualisation plugins"
+HOMEPAGE="http://libvisual.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0.4"
+KEYWORDS="~alpha amd64 arm hppa ~ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="debug nls static-libs threads"
+
+RDEPEND="abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20130224-r9
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )
+ virtual/pkgconfig"
+
+DOCS=( AUTHORS ChangeLog NEWS README TODO )
+
+PATCHES=(
+ "${FILESDIR}"/${P}-better-altivec-detection.patch
+ "${FILESDIR}"/${P}-inlinedefineconflict.patch
+ "${FILESDIR}"/${P}-conditions.patch
+ "${FILESDIR}"/${P}-detect_amd64.patch
+ "${FILESDIR}"/${P}-cond.patch
+ )
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/libvisual-0.4/libvisual/lvconfig.h
+)
+
+src_prepare() {
+ autotools-multilib_src_prepare
+ # autogenerated, causes problems for out of tree builds
+ rm -f libvisual/lvconfig.h || die
+}
+
+src_configure() {
+ local myeconfargs=(
+ --enable-shared
+ $(use_enable nls)
+ $(use_enable threads)
+ $(use_enable debug)
+ )
+ autotools-multilib_src_configure
+}
diff --git a/media-libs/libvisual/metadata.xml b/media-libs/libvisual/metadata.xml
new file mode 100644
index 000000000000..1c16bbf70ae0
--- /dev/null
+++ b/media-libs/libvisual/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>sound</herd>
+ <upstream>
+ <remote-id type="sourceforge">libvisual</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libvorbis/Manifest b/media-libs/libvorbis/Manifest
new file mode 100644
index 000000000000..12360097f0c0
--- /dev/null
+++ b/media-libs/libvorbis/Manifest
@@ -0,0 +1,3 @@
+DIST libvorbis-1.3.3.tar.xz 1087888 SHA256 834c7d35a5ebf4e7b8ab60b0979f2b7f204ca66ff6829728e9d2a67f15347ebd SHA512 6b579517b9caba293ccf88c8806689076ef9c122e5424c704a81a4c461dbc67147dadee1b9a7a678a75c95ab9ed17b98ac1a5da6e2bcd6f7eab19c17616d529f WHIRLPOOL c571a2ace83dbe78f5b7d12d14bc1caba185d1cda67695ee39f73cb6de6eb372e55377675779024086f3a77ebb3be3f9627b0f329b2f540cc944236715608c65
+DIST libvorbis-1.3.4.tar.xz 1091376 SHA256 2f05497d29195dc23ee952a24ee3973a74e6277569c4c2eca0ec5968e541f372 SHA512 f705c7740bec2dc6584ab8f103491a9d462136e3fa76454bde47e2ba04466b896ef066f7f925ad0a44d4c659c962717bc9099b3cecc20f12270d0ad53369ad53 WHIRLPOOL 4049498a24b8d3fb07ae9b4e2f68878c44aa6bc1d648b9f67bb770d9d1bc80696505c60054f71ea01b83f87c5119239d05ee5fa69fe7de1a2d570b2b2f7d0711
+DIST libvorbis-1.3.5.tar.xz 1193144 SHA256 54f94a9527ff0a88477be0a71c0bab09a4c3febe0ed878b24824906cd4b0e1d1 SHA512 f18f32edc43f65fea2dd4133e2828a0ced9e5b0797c4569bd26989fc1409ad599359e7c796bffc082ad36189f9722c7b38837384cea66d217beac8b425299ef8 WHIRLPOOL e179e8b52eadcf19d8b93816778c650a0b595846c5bf9593a9ee8b2e06a702cfee64d8e0c6cd82eb1c48211d7f0f34103ad6855033376eb664b34f73aeb01b62
diff --git a/media-libs/libvorbis/libvorbis-1.3.3-r1.ebuild b/media-libs/libvorbis/libvorbis-1.3.3-r1.ebuild
new file mode 100644
index 000000000000..da353a77d7d5
--- /dev/null
+++ b/media-libs/libvorbis/libvorbis-1.3.3-r1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+AUTOTOOLS_AUTORECONF=1
+inherit autotools-multilib
+
+DESCRIPTION="The Ogg Vorbis sound file format library"
+HOMEPAGE="http://xiph.org/vorbis"
+SRC_URI="http://downloads.xiph.org/releases/vorbis/${P}.tar.xz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="static-libs"
+
+RDEPEND=">=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
+ abi_x86_32? ( !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig"
+
+AUTOTOOLS_PRUNE_LIBTOOL_FILES=all
+
+src_prepare() {
+ sed -i \
+ -e '/CFLAGS/s:-O20::' \
+ -e '/CFLAGS/s:-mcpu=750::' \
+ -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' \
+ configure.ac || die
+
+ # Un-hack docdir redefinition.
+ find -name 'Makefile.am' \
+ -exec sed -i \
+ -e 's:$(datadir)/doc/$(PACKAGE)-$(VERSION):@docdir@/html:' \
+ {} + || die
+
+ AT_M4DIR="m4" \
+ autotools-multilib_src_prepare
+}
diff --git a/media-libs/libvorbis/libvorbis-1.3.3.ebuild b/media-libs/libvorbis/libvorbis-1.3.3.ebuild
new file mode 100644
index 000000000000..fe0df2a1720c
--- /dev/null
+++ b/media-libs/libvorbis/libvorbis-1.3.3.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit autotools
+
+DESCRIPTION="The Ogg Vorbis sound file format library"
+HOMEPAGE="http://xiph.org/vorbis"
+SRC_URI="http://downloads.xiph.org/releases/vorbis/${P}.tar.xz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="static-libs"
+
+RDEPEND="media-libs/libogg"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig"
+
+src_prepare() {
+ sed -i \
+ -e '/CFLAGS/s:-O20::' \
+ -e '/CFLAGS/s:-mcpu=750::' \
+ -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' \
+ configure.ac || die
+
+ AT_M4DIR="m4" eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ find "${ED}" -name '*.la' -exec rm -f {} +
+}
diff --git a/media-libs/libvorbis/libvorbis-1.3.4.ebuild b/media-libs/libvorbis/libvorbis-1.3.4.ebuild
new file mode 100644
index 000000000000..257009d28ba5
--- /dev/null
+++ b/media-libs/libvorbis/libvorbis-1.3.4.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+AUTOTOOLS_AUTORECONF=1
+inherit autotools-multilib
+
+DESCRIPTION="The Ogg Vorbis sound file format library"
+HOMEPAGE="http://xiph.org/vorbis"
+SRC_URI="http://downloads.xiph.org/releases/vorbis/${P}.tar.xz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="static-libs"
+
+RDEPEND=">=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
+ abi_x86_32? ( !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig"
+
+AUTOTOOLS_PRUNE_LIBTOOL_FILES=all
+
+src_prepare() {
+ sed -i \
+ -e '/CFLAGS/s:-O20::' \
+ -e '/CFLAGS/s:-mcpu=750::' \
+ configure.ac || die
+
+ # Un-hack docdir redefinition.
+ find -name 'Makefile.am' \
+ -exec sed -i \
+ -e 's:$(datadir)/doc/$(PACKAGE)-$(VERSION):@docdir@/html:' \
+ {} + || die
+
+ AT_M4DIR="m4" \
+ autotools-multilib_src_prepare
+}
diff --git a/media-libs/libvorbis/libvorbis-1.3.5.ebuild b/media-libs/libvorbis/libvorbis-1.3.5.ebuild
new file mode 100644
index 000000000000..af171b707f52
--- /dev/null
+++ b/media-libs/libvorbis/libvorbis-1.3.5.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+AUTOTOOLS_AUTORECONF=1
+inherit autotools-multilib
+
+DESCRIPTION="The Ogg Vorbis sound file format library"
+HOMEPAGE="http://xiph.org/vorbis"
+SRC_URI="http://downloads.xiph.org/releases/vorbis/${P}.tar.xz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="static-libs"
+
+RDEPEND=">=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
+ abi_x86_32? ( !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig"
+
+AUTOTOOLS_PRUNE_LIBTOOL_FILES=all
+
+src_prepare() {
+ sed -i \
+ -e '/CFLAGS/s:-O20::' \
+ -e '/CFLAGS/s:-mcpu=750::' \
+ configure.ac || die
+
+ # Un-hack docdir redefinition.
+ find -name 'Makefile.am' \
+ -exec sed -i \
+ -e 's:$(datadir)/doc/$(PACKAGE)-$(VERSION):@docdir@/html:' \
+ {} + || die
+
+ AT_M4DIR="m4" \
+ autotools-multilib_src_prepare
+}
diff --git a/media-libs/libvorbis/metadata.xml b/media-libs/libvorbis/metadata.xml
new file mode 100644
index 000000000000..e1774e3d9ad7
--- /dev/null
+++ b/media-libs/libvorbis/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>sound</herd>
+</pkgmetadata>
diff --git a/media-libs/libvpx/Manifest b/media-libs/libvpx/Manifest
new file mode 100644
index 000000000000..4e2d915d5188
--- /dev/null
+++ b/media-libs/libvpx/Manifest
@@ -0,0 +1,7 @@
+DIST libvpx-1.2.0_pre20130625.tar.bz2 1726341 SHA256 61e7a3b0e0587ed899fb5cc8240324a4f578489abf06c8916abcb59d322f6b58 SHA512 198575c2adec26e7772f59eb4915dda2fb0de04ca5980b51057557ba6a15f0fb6ca9a0db583866fcbe2585939b8cc09500642a0aea46ac2b696ec1ae54cf6c7f WHIRLPOOL 194df8c550a302e678aaf0959ea395185aea004206d24b969263ffedf77adfc76f04f5bc89cbbd66e9d7d925e07cedceb698507c92afba8d4096839b6575ae1f
+DIST libvpx-1.4.0.tar.bz2 1807989 SHA256 f582d9b2d60a592a4a3d8c32965ca2d2167e9ade38c6c30bac8801ff66a118e4 SHA512 70234220e0ed64db000689ec8bea02dadef938a4f4dea96e5781d361c15245456212c1b6aec2b698d32ed423e73917d2303009e49224a2237669cab416dd6984 WHIRLPOOL 309055669aea96f8ed051ae33d2b86c4aac2096be43ac7140812d2b42e0b1b6e609d86206a01268137f18769f967cbd074beb75fe5b059ced71a1caefb8dcb05
+DIST libvpx-testdata-1.2.0.tar.bz2 43521881 SHA256 41dc3eb8ad0b24177ccc43f7dd6ec7946f78e6aaa5ff94d0883487e02eb4da2c SHA512 77d909435137965d2d13d5bbd053e658664caa035dfc60b2ba91d075a37624ed27d75cac53f013c8043624fc9b56219ad0b0dd20dd4eecc471935b2757110637 WHIRLPOOL 19c3d8d27e03407098f9e9f3120c242b25bea442aa1fb1755b63fce875662ec00942949af3c5e499f6e18ccfef67f18e1403c226b288e925786ef6fc64e112e0
+DIST libvpx-testdata-1.3.0.tar.bz2 45380954 SHA256 0956429f629f068b734d760f6af49bbb679ee65f8d860bbf2cb4e2c574c03550 SHA512 fe96c16c8aea352dd145ee73058404024b13b9bee1d3431ac2513e3636d13880d1fa0eb9eeaea2805fbc2ec8dc6e2be381c6d50baac472a0de835b0563d63c94 WHIRLPOOL 0cc5a39405a0de6238beb7f3da5b01845e4bc39a3b9858b13c73dd69bed275964c13d62468c7fb3a1af33fb7bc5d65ddc5abfe87a71b21c5d3575924e29734da
+DIST libvpx-testdata-1.4.0.tar.bz2 113132379 SHA256 8458297dfe6ecc168a6bb3b41260aeef5c35296b99ced888767f70af40a50046 SHA512 5a0402ce1943fcd1a0e954a42728a409a512c9382883c227adea399f4ca4ff8b7d72d0247dce842c3e929dce86ca2bdad935fc82d3ee58ea72291c8fcdeca393 WHIRLPOOL b4b451be2074a1af1e36c757ac14dc41c764a32eeb4b4fed2bbb38030e51a18d0c37afd71db3118dc4af4546e212946fabc6e1cf453ebee88e66a43045c938be
+DIST libvpx-v1.1.0.tar.bz2 1653485 SHA256 9ce074cf4b3bcd9a49ff93e05485b71c273bfc3685a305e55a0e7fa51beb72c5 SHA512 5c165a1a171143f7c406ef899914a353d35f6dec0e3c49eec9a4f3311fd4072dea2e0da8ceb80651ad23e24cdbf2d6da328805bda8be042bbea2c65c9e53eaaa WHIRLPOOL 2dc8164e3f812903a1b52901438857bcdf172cb1d979f1ced45933fc12ffbb0c49e2a6c02b0c6f3360f48b146e1e5c6ea25c1613abafc3089030f6c1e7af92ed
+DIST libvpx-v1.3.0.tar.bz2 2084229 SHA256 d3dcc8d84af51c6c382b214397c62402e37a799e8ebcda6f4217aef0010451a9 SHA512 af26766a3336155c5bc7b8cce7c23228de054287b990f9cacdc35273384a7af4999c01bb623d12143f40107036308a8b3207081efe67936748503c30c985fd6b WHIRLPOOL 03de78d6701daab8847c453317d8cc0a22e4a332994b7e1f55c5d6953b7f3acf94f3c623943dd8588bb1a174df4f7d9a8b8bc889f50823d92767c40c96fc5e68
diff --git a/media-libs/libvpx/files/libvpx-1.1.0-arm.patch b/media-libs/libvpx/files/libvpx-1.1.0-arm.patch
new file mode 100644
index 000000000000..698e65a2dba5
--- /dev/null
+++ b/media-libs/libvpx/files/libvpx-1.1.0-arm.patch
@@ -0,0 +1,38 @@
+From 2b59e14a0023be9d084349d58ee156a49cc674bb Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@chromium.org>
+Date: Wed, 15 Aug 2012 11:55:31 -0400
+Subject: [PATCH] Parse out arm isa targets from dumpmachine
+
+The current parsing logic of the dumpmachine tuple lacks any arm
+cases which means tgt_isa never gets set, so for all arm targets,
+we get detected as generic-gnu. Add some basic arm checks here
+so the automatic detection logic works.
+
+Change-Id: Ie5e98142876025c6708604236bc519c0bdb09319
+---
+ build/make/configure.sh | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/build/make/configure.sh b/build/make/configure.sh
+index 26eb864..eeb959a 100755
+--- a/build/make/configure.sh
++++ b/build/make/configure.sh
+@@ -593,6 +593,15 @@ process_common_toolchain() {
+
+ # detect tgt_isa
+ case "$gcctarget" in
++ armv6*)
++ tgt_isa=armv6
++ ;;
++ armv7*)
++ tgt_isa=armv7
++ ;;
++ armv5te*)
++ tgt_isa=armv5te
++ ;;
+ *x86_64*|*amd64*)
+ tgt_isa=x86_64
+ ;;
+--
+1.7.9.7
+
diff --git a/media-libs/libvpx/files/libvpx-1.1.0-chost.patch b/media-libs/libvpx/files/libvpx-1.1.0-chost.patch
new file mode 100644
index 000000000000..eb6b286cd66b
--- /dev/null
+++ b/media-libs/libvpx/files/libvpx-1.1.0-chost.patch
@@ -0,0 +1,36 @@
+commit 871bd23e4c41bb0fb94b72832b270766de540dea
+Author: Alexis Ballier <alexis.ballier@gmail.com>
+Date: Sat May 12 15:45:13 2012 -0400
+
+ Allow target autodetection to work when cross-compiling.
+
+ Allow CHOST to override the gcc -dumpmachine output. This allows to
+ use the target autodetection code when cross compiling by setting the
+ CHOST variable.
+
+ On Gentoo, we would like to support easy cross-compilation, and for
+ libvpx this would basically mean copying the code in
+ build/make/configure.sh to setup the right --target option. It seems a
+ lot easier to let it guess by itself.
+
+ Another option I considered was using CROSS-gcc instead but this would
+ not work for our multilib setups: They use gcc -m32 to build 32bits
+ binaries and gcc -m32 -dumpmachine will output the 64bits version,
+ which would then make libvpx wrongly believe it is building for a
+ 64bits architecture.
+
+ Change-Id: I05a19be402228f749e23be7473ca53ae74fd2186
+
+diff --git a/build/make/configure.sh b/build/make/configure.sh
+index 3c772e5..3118c0a 100755
+--- a/build/make/configure.sh
++++ b/build/make/configure.sh
+@@ -549,7 +549,7 @@ setup_gnu_toolchain() {
+
+ process_common_toolchain() {
+ if [ -z "$toolchain" ]; then
+- gcctarget="$(gcc -dumpmachine 2> /dev/null)"
++ gcctarget="${CHOST:-$(gcc -dumpmachine 2> /dev/null)}"
+
+ # detect tgt_isa
+ case "$gcctarget" in
diff --git a/media-libs/libvpx/files/libvpx-1.1.0-generic-gnu-shared.patch b/media-libs/libvpx/files/libvpx-1.1.0-generic-gnu-shared.patch
new file mode 100644
index 000000000000..84d536f5054c
--- /dev/null
+++ b/media-libs/libvpx/files/libvpx-1.1.0-generic-gnu-shared.patch
@@ -0,0 +1,39 @@
+From b4ab43f12cc44a24e8161eb2d0857b78c756b18c Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@chromium.org>
+Date: Tue, 14 Aug 2012 14:24:28 -0400
+Subject: [PATCH] do not error out on generic-gnu + --enable-shared
+
+If you build with --enabled-shared on a Linux arch not explicitly
+listed, the configure script will abort because it didn't detect
+"linux" in the fallback generic-gnu tuple.
+
+Since this is the fallback tuple and people are passing
+--enable-shared, assume the user knows what they're in for.
+
+Change-Id: Ia35b657e7247c8855e3a94fca424c9884d4241e3
+---
+ configure | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/configure b/configure
+index 2e19e5b..dde215f 100755
+--- a/configure
++++ b/configure
+@@ -454,7 +454,13 @@ process_detect() {
+ # Can only build shared libs on a subset of platforms. Doing this check
+ # here rather than at option parse time because the target auto-detect
+ # magic happens after the command line has been parsed.
+- enabled linux || die "--enable-shared only supported on ELF for now"
++ if ! enabled linux; then
++ if enabled gnu; then
++ echo "--enable-shared is only supported on ELF; assuming this is OK"
++ else
++ die "--enable-shared only supported on ELF for now"
++ fi
++ fi
+ fi
+ if [ -z "$CC" ]; then
+ echo "Bypassing toolchain for environment detection."
+--
+1.7.9.7
+
diff --git a/media-libs/libvpx/files/libvpx-1.1.0-x32.patch b/media-libs/libvpx/files/libvpx-1.1.0-x32.patch
new file mode 100644
index 000000000000..bcacdbf4c79d
--- /dev/null
+++ b/media-libs/libvpx/files/libvpx-1.1.0-x32.patch
@@ -0,0 +1,64 @@
+https://bugs.gentoo.org/426248
+
+From c769945318b84b5c823091213634a4db0cdc5be5 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Tue, 25 Sep 2012 00:37:11 -0400
+Subject: [PATCH] check for x32 targets
+
+Add configure detection of the new x32 ABI.
+---
+ build/make/configure.sh | 5 +++++
+ vpx_ports/x86_abi_support.asm | 10 ++++++++++
+ 2 files changed, 15 insertions(+)
+
+diff --git a/build/make/configure.sh b/build/make/configure.sh
+index eeb959a..05bbabe 100755
+--- a/build/make/configure.sh
++++ b/build/make/configure.sh
+@@ -989,6 +989,11 @@ process_common_toolchain() {
+ x86*)
+ bits=32
+ enabled x86_64 && bits=64
++ check_cpp <<EOF && bits=x32
++#ifndef __ILP32__
++#error "not x32"
++#endif
++EOF
+ soft_enable runtime_cpu_detect
+ soft_enable mmx
+ soft_enable sse
+diff --git a/vpx_ports/x86_abi_support.asm b/vpx_ports/x86_abi_support.asm
+index e1a540c..0c9fe37 100644
+--- a/vpx_ports/x86_abi_support.asm
++++ b/vpx_ports/x86_abi_support.asm
+@@ -88,6 +88,8 @@
+ %define sym(x) x
+ %elifidn __OUTPUT_FORMAT__,elf64
+ %define sym(x) x
++%elifidn __OUTPUT_FORMAT__,elfx32
++%define sym(x) x
+ %elifidn __OUTPUT_FORMAT__,x64
+ %define sym(x) x
+ %else
+@@ -223,6 +227,9 @@
+ %ifidn __OUTPUT_FORMAT__,elf64
+ %define WRT_PLT wrt ..plt
+ %define HIDDEN_DATA(x) x:data hidden
++ %elifidn __OUTPUT_FORMAT__,elfx32
++ %define WRT_PLT wrt ..plt
++ %define HIDDEN_DATA(x) x:data hidden
+ %else
+ %define HIDDEN_DATA(x) x
+ %endif
+@@ -364,5 +371,8 @@ section .text
+ %elifidn __OUTPUT_FORMAT__,elf64
+ section .note.GNU-stack noalloc noexec nowrite progbits
+ section .text
++%elifidn __OUTPUT_FORMAT__,elfx32
++section .note.GNU-stack noalloc noexec nowrite progbits
++section .text
+ %endif
+
+--
+1.7.12
+
diff --git a/media-libs/libvpx/files/libvpx-1.2.0_pre20130625-armv7.patch b/media-libs/libvpx/files/libvpx-1.2.0_pre20130625-armv7.patch
new file mode 100644
index 000000000000..6e8eba908faf
--- /dev/null
+++ b/media-libs/libvpx/files/libvpx-1.2.0_pre20130625-armv7.patch
@@ -0,0 +1,41 @@
+commit af9dd50e42e0a7558d0d555ee12a1eb60e87a458
+Author: Luca Barbato <lu_zero@gentoo.org>
+Date: Thu Jan 10 05:13:57 2013 +0100
+
+ configure: support hardfloat armv7 CHOSTS
+
+ Many linux distribution for arm switched to armhf/hardfloat, support
+ them.
+
+ Change-Id: I8ab39d34782b4f24b7028ac76342118166fd5905
+
+diff --git a/build/make/configure.sh b/build/make/configure.sh
+index e27af96..f69b6d7 100755
+--- a/build/make/configure.sh
++++ b/build/make/configure.sh
+@@ -597,8 +597,13 @@ process_common_toolchain() {
+ armv6*)
+ tgt_isa=armv6
+ ;;
++ armv7*-hardfloat*)
++ tgt_isa=armv7
++ float_abi=hard
++ ;;
+ armv7*)
+ tgt_isa=armv7
++ float_abi=softfp
+ ;;
+ armv5te*)
+ tgt_isa=armv5te
+@@ -784,8 +789,9 @@ process_common_toolchain() {
+ check_add_asflags --defsym ARCHITECTURE=${arch_int}
+ tune_cflags="-mtune="
+ if [ ${tgt_isa} == "armv7" ]; then
+- check_add_cflags -march=armv7-a -mfloat-abi=softfp
+- check_add_asflags -march=armv7-a -mfloat-abi=softfp
++ [ -z "${float_abi}" ] && float_abi=softfp
++ check_add_cflags -march=armv7-a -mfloat-abi=${float_abi}
++ check_add_asflags -march=armv7-a -mfloat-abi=${float_abi}
+
+ if enabled neon
+ then
diff --git a/media-libs/libvpx/files/libvpx-1.3.0-dash.patch b/media-libs/libvpx/files/libvpx-1.3.0-dash.patch
new file mode 100644
index 000000000000..fa021b659a06
--- /dev/null
+++ b/media-libs/libvpx/files/libvpx-1.3.0-dash.patch
@@ -0,0 +1,16 @@
+dash compat
+https://bugs.gentoo.org/show_bug.cgi?id=498136
+
+--- a/build/make/configure.sh
++++ b/build/make/configure.sh
+@@ -405,8 +405,8 @@
+ }
+
+ write_common_target_config_mk() {
+- local CC=${CC}
+- local CXX=${CXX}
++ local CC="${CC}"
++ local CXX="${CXX}"
+ enabled ccache && CC="ccache ${CC}"
+ enabled ccache && CXX="ccache ${CXX}"
+ print_webm_license $1 "##" ""
diff --git a/media-libs/libvpx/files/libvpx-1.3.0-sparc-configure.patch b/media-libs/libvpx/files/libvpx-1.3.0-sparc-configure.patch
new file mode 100644
index 000000000000..dc3f6c9387c7
--- /dev/null
+++ b/media-libs/libvpx/files/libvpx-1.3.0-sparc-configure.patch
@@ -0,0 +1,10 @@
+--- configure~ 2014-01-10 21:12:42.000000000 +0100
++++ configure 2014-04-05 12:51:51.794638686 +0200
+@@ -109,6 +109,7 @@
+ all_platforms="${all_platforms} ppc64-darwin9-gcc"
+ all_platforms="${all_platforms} ppc64-linux-gcc"
+ all_platforms="${all_platforms} sparc-solaris-gcc"
++all_platforms="${all_platforms} sparc-linux-gcc"
+ all_platforms="${all_platforms} x86-android-gcc"
+ all_platforms="${all_platforms} x86-darwin8-gcc"
+ all_platforms="${all_platforms} x86-darwin8-icc"
diff --git a/media-libs/libvpx/libvpx-1.1.0.ebuild b/media-libs/libvpx/libvpx-1.1.0.ebuild
new file mode 100644
index 000000000000..20676d2e567d
--- /dev/null
+++ b/media-libs/libvpx/libvpx-1.1.0.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit multilib toolchain-funcs base flag-o-matic
+
+if [[ ${PV} == *9999* ]]; then
+ inherit git-2
+ EGIT_REPO_URI="https://chromium.googlesource.com/webm/${PN}.git"
+elif [[ ${PV} == *pre* ]]; then
+ SRC_URI="mirror://gentoo/${P}.tar.bz2"
+ KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 ~sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+else
+ SRC_URI="http://webm.googlecode.com/files/${PN}-v${PV}.tar.bz2"
+ KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 ~sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+ S="${WORKDIR}/${PN}-v${PV}"
+fi
+
+DESCRIPTION="WebM VP8 Codec SDK"
+HOMEPAGE="http://www.webmproject.org"
+
+LICENSE="BSD"
+SLOT="0"
+IUSE="altivec debug doc cpu_flags_x86_mmx postproc cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse3 cpu_flags_x86_ssse3 cpu_flags_x86_sse4_1 static-libs +threads"
+
+RDEPEND=""
+DEPEND="amd64? ( dev-lang/yasm )
+ x86? ( dev-lang/yasm )
+ x86-fbsd? ( dev-lang/yasm )
+ doc? (
+ app-doc/doxygen
+ dev-lang/php
+ )
+"
+
+REQUIRED_USE="
+ cpu_flags_x86_sse2? ( cpu_flags_x86_mmx )
+"
+
+PATCHES=(
+ "${FILESDIR}/${P}-chost.patch"
+ "${FILESDIR}/${P}-generic-gnu-shared.patch"
+ "${FILESDIR}/${P}-arm.patch"
+ "${FILESDIR}/${P}-x32.patch"
+)
+
+src_configure() {
+ replace-flags -ggdb3 -g #402825
+
+ unset CODECS #357487
+
+ # let the build system decide which AS to use (it honours $AS but
+ # then feeds it with yasm flags without checking...) #345161
+ local a
+ tc-export AS
+ for a in {amd64,x86}{,-{fbsd,linux}} ; do
+ use ${a} && unset AS
+ done
+
+ # build verbose by default
+ MAKEOPTS="${MAKEOPTS} verbose=yes"
+
+ # http://bugs.gentoo.org/show_bug.cgi?id=384585
+ # https://bugs.gentoo.org/show_bug.cgi?id=465988
+ # copied from php-pear-r1.eclass
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/
+ addpredict /var/lib/net-snmp/mib_indexes
+ addpredict /session_mm_cli0.sem
+
+ # Build with correct toolchain.
+ tc-export CC AR NM
+ # Link with gcc by default, the build system should override this if needed.
+ export LD="${CC}"
+
+ set -- \
+ ./configure \
+ --prefix="${EPREFIX}"/usr \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --enable-pic \
+ --enable-vp8 \
+ --enable-shared \
+ --extra-cflags="${CFLAGS}" \
+ $(use_enable altivec) \
+ $(use_enable debug debug-libs) \
+ $(use_enable debug) \
+ $(use_enable doc install-docs) \
+ $(use_enable cpu_flags_x86_mmx mmx) \
+ $(use_enable postproc) \
+ $(use_enable cpu_flags_x86_sse sse) \
+ $(use_enable cpu_flags_x86_sse2 sse2) \
+ $(use_enable cpu_flags_x86_sse3 sse3) \
+ $(use_enable cpu_flags_x86_sse4_1 sse4_1) \
+ $(use_enable cpu_flags_x86_ssse3 ssse3) \
+ $(use_enable static-libs static ) \
+ $(use_enable threads multithread)
+ echo "$@"
+ "$@" || die
+}
+
+src_install() {
+ # Override base.eclass's src_install.
+ default
+}
diff --git a/media-libs/libvpx/libvpx-1.2.0_pre20130625.ebuild b/media-libs/libvpx/libvpx-1.2.0_pre20130625.ebuild
new file mode 100644
index 000000000000..7850bf52135a
--- /dev/null
+++ b/media-libs/libvpx/libvpx-1.2.0_pre20130625.ebuild
@@ -0,0 +1,120 @@
+# 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 eutils
+
+LIBVPX_TESTDATA_VER=1.2.0
+
+if [[ ${PV} == *9999* ]]; then
+ inherit git-2
+ EGIT_REPO_URI="https://chromium.googlesource.com/webm/${PN}.git"
+elif [[ ${PV} == *pre* ]]; then
+ SRC_URI="mirror://gentoo/${P}.tar.bz2"
+ KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+else
+ SRC_URI="http://webm.googlecode.com/files/${PN}-v${PV}.tar.bz2"
+ KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+ S="${WORKDIR}/${PN}-v${PV}"
+fi
+# generated by: make LIBVPX_TEST_DATA_PATH=libvpx-testdata testdata + tar'ing
+# it.
+SRC_URI="${SRC_URI}
+ test? ( mirror://gentoo/${PN}-testdata-${LIBVPX_TESTDATA_VER}.tar.bz2 )"
+
+DESCRIPTION="WebM VP8 Codec SDK"
+HOMEPAGE="http://www.webmproject.org"
+
+LICENSE="BSD"
+SLOT="0"
+IUSE="altivec doc cpu_flags_x86_mmx postproc cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse3 cpu_flags_x86_ssse3 cpu_flags_x86_sse4_1 static-libs test +threads"
+
+RDEPEND="abi_x86_32? ( !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+DEPEND="abi_x86_32? ( dev-lang/yasm )
+ abi_x86_64? ( dev-lang/yasm )
+ x86-fbsd? ( dev-lang/yasm )
+ amd64-fbsd? ( dev-lang/yasm )
+ doc? (
+ app-doc/doxygen
+ dev-lang/php
+ )
+"
+
+REQUIRED_USE="
+ cpu_flags_x86_sse2? ( cpu_flags_x86_mmx )
+ cpu_flags_x86_ssse3? ( cpu_flags_x86_sse2 )
+"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-armv7.patch"
+}
+
+multilib_src_configure() {
+ unset CODECS #357487
+
+ # let the build system decide which AS to use (it honours $AS but
+ # then feeds it with yasm flags without checking...) #345161
+ tc-export AS
+ case "${CHOST}" in
+ i?86*) export AS=yasm;;
+ x86_64*) export AS=yasm;;
+ esac
+
+ # http://bugs.gentoo.org/show_bug.cgi?id=384585
+ # https://bugs.gentoo.org/show_bug.cgi?id=465988
+ # copied from php-pear-r1.eclass
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/
+ addpredict /var/lib/net-snmp/mib_indexes
+ addpredict /session_mm_cli0.sem
+
+ # Build with correct toolchain.
+ tc-export CC CXX AR NM
+ # Link with gcc by default, the build system should override this if needed.
+ export LD="${CC}"
+
+ local myconf
+ if [ "${ABI}" = "${DEFAULT_ABI}" ] ; then
+ myconf+=" $(use_enable doc install-docs) $(use_enable doc docs)"
+ else
+ # not needed for multilib and will be overwritten anyway.
+ myconf+=" --disable-examples --disable-install-docs --disable-docs"
+ fi
+
+ "${S}/configure" \
+ --prefix="${EPREFIX}"/usr \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --enable-pic \
+ --enable-vp8 \
+ --enable-shared \
+ --extra-cflags="${CFLAGS}" \
+ $(use_enable altivec) \
+ $(use_enable cpu_flags_x86_mmx mmx) \
+ $(use_enable postproc) \
+ $(use_enable cpu_flags_x86_sse sse) \
+ $(use_enable cpu_flags_x86_sse2 sse2) \
+ $(use_enable cpu_flags_x86_sse3 sse3) \
+ $(use_enable cpu_flags_x86_sse4_1 sse4_1) \
+ $(use_enable cpu_flags_x86_ssse3 ssse3) \
+ $(use_enable static-libs static) \
+ $(use_enable test unit-tests) \
+ $(use_enable threads multithread) \
+ ${myconf} \
+ || die
+}
+
+multilib_src_compile() {
+ # build verbose by default and do not build examples that will not be installed
+ emake verbose=yes GEN_EXAMPLES=
+}
+
+multilib_src_test() {
+ LD_LIBRARY_PATH="${BUILD_DIR}:${LD_LIBRARY_PATH}" \
+ emake verbose=yes GEN_EXAMPLES= LIBVPX_TEST_DATA_PATH="${WORKDIR}/${PN}-testdata" test
+}
+
+multilib_src_install() {
+ emake verbose=yes GEN_EXAMPLES= DESTDIR="${D}" install
+ [ "${ABI}" = "${DEFAULT_ABI}" ] && use doc && dohtml docs/html/*
+}
diff --git a/media-libs/libvpx/libvpx-1.3.0.ebuild b/media-libs/libvpx/libvpx-1.3.0.ebuild
new file mode 100644
index 000000000000..49244cbcb881
--- /dev/null
+++ b/media-libs/libvpx/libvpx-1.3.0.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils multilib toolchain-funcs multilib-minimal
+
+LIBVPX_TESTDATA_VER=1.3.0
+
+if [[ ${PV} == *9999* ]]; then
+ inherit git-2
+ EGIT_REPO_URI="https://chromium.googlesource.com/webm/${PN}.git"
+elif [[ ${PV} == *pre* ]]; then
+ SRC_URI="mirror://gentoo/${P}.tar.bz2"
+ KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+else
+ SRC_URI="http://webm.googlecode.com/files/${PN}-v${PV}.tar.bz2"
+ KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+ S="${WORKDIR}/${PN}-v${PV}"
+fi
+# generated by: make LIBVPX_TEST_DATA_PATH=libvpx-testdata testdata + tar'ing
+# it.
+SRC_URI="${SRC_URI}
+ test? ( mirror://gentoo/${PN}-testdata-${LIBVPX_TESTDATA_VER}.tar.bz2 )"
+
+DESCRIPTION="WebM VP8 Codec SDK"
+HOMEPAGE="http://www.webmproject.org"
+
+LICENSE="BSD"
+SLOT="0"
+IUSE="altivec cpu_flags_x86_avx cpu_flags_x86_avx2 doc cpu_flags_x86_mmx postproc cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse3 cpu_flags_x86_ssse3 cpu_flags_x86_sse4_1 static-libs test +threads"
+
+RDEPEND="abi_x86_32? ( !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+DEPEND="abi_x86_32? ( dev-lang/yasm )
+ abi_x86_64? ( dev-lang/yasm )
+ x86-fbsd? ( dev-lang/yasm )
+ amd64-fbsd? ( dev-lang/yasm )
+ doc? (
+ app-doc/doxygen
+ dev-lang/php
+ )
+"
+
+REQUIRED_USE="
+ cpu_flags_x86_sse2? ( cpu_flags_x86_mmx )
+ cpu_flags_x86_ssse3? ( cpu_flags_x86_sse2 )
+"
+
+src_prepare() {
+ epatch "${FILESDIR}/libvpx-1.3.0-dash.patch"
+ epatch "${FILESDIR}/libvpx-1.3.0-sparc-configure.patch" # 501010
+}
+
+multilib_src_configure() {
+ unset CODECS #357487
+
+ # let the build system decide which AS to use (it honours $AS but
+ # then feeds it with yasm flags without checking...) #345161
+ tc-export AS
+ case "${CHOST}" in
+ i?86*) export AS=yasm;;
+ x86_64*) export AS=yasm;;
+ esac
+
+ # http://bugs.gentoo.org/show_bug.cgi?id=384585
+ # https://bugs.gentoo.org/show_bug.cgi?id=465988
+ # copied from php-pear-r1.eclass
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/
+ addpredict /var/lib/net-snmp/mib_indexes
+ addpredict /session_mm_cli0.sem
+
+ # Build with correct toolchain.
+ tc-export CC CXX AR NM
+ # Link with gcc by default, the build system should override this if needed.
+ export LD="${CC}"
+
+ local myconf
+ if [ "${ABI}" = "${DEFAULT_ABI}" ] ; then
+ myconf+=" $(use_enable doc install-docs) $(use_enable doc docs)"
+ else
+ # not needed for multilib and will be overwritten anyway.
+ myconf+=" --disable-examples --disable-install-docs --disable-docs"
+ fi
+
+ # #498364: sse doesn't work without sse2 enabled,
+ "${S}/configure" \
+ --prefix="${EPREFIX}"/usr \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --enable-pic \
+ --enable-vp8 \
+ --enable-shared \
+ --extra-cflags="${CFLAGS}" \
+ $(use_enable altivec) \
+ $(use_enable cpu_flags_x86_avx avx) \
+ $(use_enable cpu_flags_x86_avx2 avx2) \
+ $(use_enable cpu_flags_x86_mmx mmx) \
+ $(use_enable postproc) \
+ $(use cpu_flags_x86_sse2 && use_enable cpu_flags_x86_sse sse || echo --disable-sse) \
+ $(use_enable cpu_flags_x86_sse2 sse2) \
+ $(use_enable cpu_flags_x86_sse3 sse3) \
+ $(use_enable cpu_flags_x86_sse4_1 sse4_1) \
+ $(use_enable cpu_flags_x86_ssse3 ssse3) \
+ $(use_enable static-libs static) \
+ $(use_enable test unit-tests) \
+ $(use_enable threads multithread) \
+ ${myconf} \
+ || die
+}
+
+multilib_src_compile() {
+ # build verbose by default and do not build examples that will not be installed
+ emake verbose=yes GEN_EXAMPLES=
+}
+
+multilib_src_test() {
+ LD_LIBRARY_PATH="${BUILD_DIR}:${LD_LIBRARY_PATH}" \
+ emake verbose=yes GEN_EXAMPLES= LIBVPX_TEST_DATA_PATH="${WORKDIR}/${PN}-testdata" test
+}
+
+multilib_src_install() {
+ emake verbose=yes GEN_EXAMPLES= DESTDIR="${D}" install
+ [ "${ABI}" = "${DEFAULT_ABI}" ] && use doc && dohtml docs/html/*
+}
diff --git a/media-libs/libvpx/libvpx-1.4.0.ebuild b/media-libs/libvpx/libvpx-1.4.0.ebuild
new file mode 100644
index 000000000000..e142ee2f4e35
--- /dev/null
+++ b/media-libs/libvpx/libvpx-1.4.0.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils multilib toolchain-funcs multilib-minimal
+
+LIBVPX_TESTDATA_VER=1.4.0
+
+if [[ ${PV} == *9999* ]]; then
+ inherit git-2
+ EGIT_REPO_URI="https://chromium.googlesource.com/webm/${PN}.git"
+elif [[ ${PV} == *pre* ]]; then
+ SRC_URI="mirror://gentoo/${P}.tar.bz2"
+ KEYWORDS="~alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+else
+ SRC_URI="http://storage.googleapis.com/downloads.webmproject.org/releases/webm/${P}.tar.bz2"
+ KEYWORDS="~alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+fi
+# generated by: make LIBVPX_TEST_DATA_PATH=libvpx-testdata testdata + tar'ing
+# it.
+SRC_URI="${SRC_URI}
+ test? ( mirror://gentoo/${PN}-testdata-${LIBVPX_TESTDATA_VER}.tar.bz2 )"
+
+DESCRIPTION="WebM VP8 Codec SDK"
+HOMEPAGE="http://www.webmproject.org"
+
+LICENSE="BSD"
+SLOT="0/2"
+IUSE="altivec cpu_flags_x86_avx cpu_flags_x86_avx2 doc cpu_flags_x86_mmx postproc cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse3 cpu_flags_x86_ssse3 cpu_flags_x86_sse4_1 static-libs test +threads"
+
+RDEPEND="abi_x86_32? ( !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+DEPEND="abi_x86_32? ( dev-lang/yasm )
+ abi_x86_64? ( dev-lang/yasm )
+ x86-fbsd? ( dev-lang/yasm )
+ amd64-fbsd? ( dev-lang/yasm )
+ doc? (
+ app-doc/doxygen
+ dev-lang/php
+ )
+"
+
+REQUIRED_USE="
+ cpu_flags_x86_sse2? ( cpu_flags_x86_mmx )
+ cpu_flags_x86_ssse3? ( cpu_flags_x86_sse2 )
+"
+
+src_prepare() {
+ epatch "${FILESDIR}/libvpx-1.3.0-sparc-configure.patch" # 501010
+}
+
+multilib_src_configure() {
+ unset CODECS #357487
+
+ # let the build system decide which AS to use (it honours $AS but
+ # then feeds it with yasm flags without checking...) #345161
+ tc-export AS
+ case "${CHOST}" in
+ i?86*) export AS=yasm;;
+ x86_64*) export AS=yasm;;
+ esac
+
+ # http://bugs.gentoo.org/show_bug.cgi?id=384585
+ # https://bugs.gentoo.org/show_bug.cgi?id=465988
+ # copied from php-pear-r1.eclass
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/
+ addpredict /var/lib/net-snmp/mib_indexes
+ addpredict /session_mm_cli0.sem
+
+ # Build with correct toolchain.
+ tc-export CC CXX AR NM
+ # Link with gcc by default, the build system should override this if needed.
+ export LD="${CC}"
+
+ local myconf
+ if [ "${ABI}" = "${DEFAULT_ABI}" ] ; then
+ myconf+=" $(use_enable doc install-docs) $(use_enable doc docs)"
+ else
+ # not needed for multilib and will be overwritten anyway.
+ myconf+=" --disable-examples --disable-install-docs --disable-docs"
+ fi
+
+ # #498364: sse doesn't work without sse2 enabled,
+ "${S}/configure" \
+ --prefix="${EPREFIX}"/usr \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --enable-pic \
+ --enable-vp8 \
+ --enable-shared \
+ --extra-cflags="${CFLAGS}" \
+ $(use_enable altivec) \
+ $(use_enable cpu_flags_x86_avx avx) \
+ $(use_enable cpu_flags_x86_avx2 avx2) \
+ $(use_enable cpu_flags_x86_mmx mmx) \
+ $(use_enable postproc) \
+ $(use cpu_flags_x86_sse2 && use_enable cpu_flags_x86_sse sse || echo --disable-sse) \
+ $(use_enable cpu_flags_x86_sse2 sse2) \
+ $(use_enable cpu_flags_x86_sse3 sse3) \
+ $(use_enable cpu_flags_x86_sse4_1 sse4_1) \
+ $(use_enable cpu_flags_x86_ssse3 ssse3) \
+ $(use_enable static-libs static) \
+ $(use_enable test unit-tests) \
+ $(use_enable threads multithread) \
+ ${myconf} \
+ || die
+}
+
+multilib_src_compile() {
+ # build verbose by default and do not build examples that will not be installed
+ emake verbose=yes GEN_EXAMPLES=
+}
+
+multilib_src_test() {
+ LD_LIBRARY_PATH="${BUILD_DIR}:${LD_LIBRARY_PATH}" \
+ emake verbose=yes GEN_EXAMPLES= LIBVPX_TEST_DATA_PATH="${WORKDIR}/${PN}-testdata" test
+}
+
+multilib_src_install() {
+ emake verbose=yes GEN_EXAMPLES= DESTDIR="${D}" install
+ [ "${ABI}" = "${DEFAULT_ABI}" ] && use doc && dohtml docs/html/*
+}
diff --git a/media-libs/libvpx/metadata.xml b/media-libs/libvpx/metadata.xml
new file mode 100644
index 000000000000..7f147f9aef7b
--- /dev/null
+++ b/media-libs/libvpx/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>chromium</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="postproc">Enable additional post processing filters</flag>
+ </use>
+ <upstream>
+ <remote-id type="google-code">webm</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libwebp/Manifest b/media-libs/libwebp/Manifest
new file mode 100644
index 000000000000..f2f2b904baa7
--- /dev/null
+++ b/media-libs/libwebp/Manifest
@@ -0,0 +1,5 @@
+DIST libwebp-0.2.1.tar.gz 705230 SHA256 894e08b8b0043cf007cc1ca893f33d73784565a6e64b0e7aefb201a687392314 SHA512 fffaf0f81d6062b68443ffa30412384bc914cd032d11f5ad9e1dcd56c3a04bf40a56649bcc422f7496ef75a200952aacb20e6fb38f8313be6f5d53720f9e85fd WHIRLPOOL 081d57d49dc470bd5c19856ede00e49eab23a8db182c5145b336e79d838ced950c57a7c47aa532fb2fd5d55a79b10bee1290484917e0cd98dd812ce33a93c15b
+DIST libwebp-0.3.0.tar.gz 800793 SHA256 8903fca40ece603b9cb20d32105168da7e2a33bebbd4d89001a3c8741ef03ddb SHA512 8218abb5e994ab5c89c9d3360efb7c8bf448879caed581bdc3ed7febb65f9eaf597059efcd130352f7e38c25af9508f850e09a7490270e903e228355148c2c30 WHIRLPOOL 68764e957aca26211fea5e663a7a0d377b87be9a218377636e88641c3245f3413097713104da913d80827e3c0043bbaa07b5c91e14fb3dd84bbc5738846c57e6
+DIST libwebp-0.3.1.tar.gz 844799 SHA256 b37932c625322a69fe4e9b88884b5c7aed2b3eaf9fd5e5b480aee339a92e6ee7 SHA512 9b962ce8ce696eb1cc78de624abe0371f9143449cbc8978eb6327e40afe95b31c1b4c9aa97e9c3f4ada46c2f2b70d7b1ca59e46046ddbb3546ecb8e3e766922f WHIRLPOOL ce1fc294b951f75b5a9ca3048f73a9eff8f9e7f413370b36f9c6ceda8d11fad8bb4ff621d55ad4e3c8b6c829eceecf79f3892d464971e76aa2c0edc8fa32f2f6
+DIST libwebp-0.4.0.tar.gz 887880 SHA256 31913577e96386556855b41d210736449445fe96cfbe9289014e9b8afa944d69 SHA512 b0229bcbdf04f667cb0957738a199e08a1340d936c88ef69ad6436da7280a337a94579f4f315b478b74a72a49c126be4222c36c5e2184d429750b9ddc76ff2d6 WHIRLPOOL 8e9edfc589b41d8c076b56cf81d5a21976ad4d1b5aad9b39ed8cadd5fd520bab5fc7b6b3d036c7d7e265218b3eb3adcd1fac4bef180e2c096bac663e55489808
+DIST libwebp-0.4.2.tar.gz 977801 SHA256 14d825d7c2ef7d49621bcb6b83466be455585e671ae0a2ebc1f2e07775a1722d SHA512 0213f92cc9a4303b9ae51ffbc72c083880bcd5c1d8b2f92fe514e0a11167925934d01155f89dc9e571dee51293ea26f8b8b486c5b980db20e921d653320a4d13 WHIRLPOOL be219a80a6a427f19c2ad2943a37e51b7e9c6b5509ad910bfe58ced386cb1d12e78e059ac7028987ee2942d5bdfc9d52e0051e13f14de2aea0088f6abb92a6ef
diff --git a/media-libs/libwebp/libwebp-0.2.1.ebuild b/media-libs/libwebp/libwebp-0.2.1.ebuild
new file mode 100644
index 000000000000..4a6110ca9f70
--- /dev/null
+++ b/media-libs/libwebp/libwebp-0.2.1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils
+
+DESCRIPTION="A lossy image compression format"
+HOMEPAGE="http://code.google.com/p/webp/"
+SRC_URI="http://webp.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 x86 ~amd64-fbsd ~amd64-linux ~x86-linux"
+IUSE="experimental static-libs"
+
+RDEPEND="media-libs/libpng:0
+ media-libs/tiff:0
+ virtual/jpeg"
+DEPEND="${RDEPEND}"
+
+DOCS="AUTHORS ChangeLog doc/*.txt NEWS README*"
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ --disable-silent-rules \
+ $(use_enable experimental) \
+ --enable-experimental-libwebpmux
+}
+
+src_install() {
+ default
+ prune_libtool_files
+}
diff --git a/media-libs/libwebp/libwebp-0.3.0.ebuild b/media-libs/libwebp/libwebp-0.3.0.ebuild
new file mode 100644
index 000000000000..07b0f51eb356
--- /dev/null
+++ b/media-libs/libwebp/libwebp-0.3.0.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils multilib-minimal
+
+DESCRIPTION="A lossy image compression format"
+HOMEPAGE="http://code.google.com/p/webp/"
+SRC_URI="http://webp.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux"
+IUSE="experimental gif +jpeg +png static-libs swap-16bit-csp tiff"
+
+RDEPEND="gif? ( media-libs/giflib )
+ jpeg? ( virtual/jpeg )
+ png? ( media-libs/libpng:0= )
+ tiff? ( media-libs/tiff:0= )"
+DEPEND="${RDEPEND}"
+
+ECONF_SOURCE=${S}
+
+multilib_src_configure() {
+ ac_cv_header_gif_lib_h=$(usex gif) \
+ ac_cv_header_jpeglib_h=$(usex jpeg) \
+ ac_cv_header_png_h=$(usex png) \
+ ac_cv_header_tiffio_h=$(usex tiff) \
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable swap-16bit-csp) \
+ $(use_enable experimental) \
+ --enable-libwebpmux \
+ --enable-libwebpdemux \
+ --enable-libwebpdecoder
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+}
+
+multilib_src_install_all() {
+ prune_libtool_files
+ dodoc AUTHORS ChangeLog doc/*.txt NEWS README{,.mux}
+}
diff --git a/media-libs/libwebp/libwebp-0.3.1.ebuild b/media-libs/libwebp/libwebp-0.3.1.ebuild
new file mode 100644
index 000000000000..1ba75ba30127
--- /dev/null
+++ b/media-libs/libwebp/libwebp-0.3.1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils multilib-minimal
+
+DESCRIPTION="A lossy image compression format"
+HOMEPAGE="http://code.google.com/p/webp/"
+SRC_URI="http://webp.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-fbsd ~amd64-linux ~x86-linux ~x64-macos"
+IUSE="experimental gif +jpeg opengl +png static-libs swap-16bit-csp tiff"
+
+# TODO: dev-lang/swig bindings in swig/ subdirectory
+RDEPEND="gif? ( media-libs/giflib:= )
+ jpeg? ( virtual/jpeg:0= )
+ opengl? (
+ media-libs/freeglut
+ virtual/opengl
+ )
+ png? ( media-libs/libpng:0= )
+ tiff? ( media-libs/tiff:0= )"
+DEPEND="${RDEPEND}"
+
+ECONF_SOURCE=${S}
+
+src_prepare() {
+ # This is conflicting with `usex` later on, upstream is using ac_cv_ wrong
+ # If modifying configure.ac, eautoreconf is required because of "Maintainer mode"
+ sed -i -e '/unset ac_cv_header_GL_glut_h/d' configure || die
+}
+
+multilib_src_configure() {
+ # Only used for gif2webp binary wrt #486646
+ local build_gif2webp=$(usex gif)
+ multilib_is_native_abi || build_gif2webp=no
+
+ ac_cv_header_gif_lib_h=${build_gif2webp} \
+ ac_cv_header_jpeglib_h=$(usex jpeg) \
+ ac_cv_header_png_h=$(usex png) \
+ ac_cv_header_GL_glut_h=$(usex opengl) \
+ ac_cv_header_tiffio_h=$(usex tiff) \
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable swap-16bit-csp) \
+ $(use_enable experimental) \
+ --enable-libwebpmux \
+ --enable-libwebpdemux \
+ --enable-libwebpdecoder
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+}
+
+multilib_src_install_all() {
+ prune_libtool_files
+ dodoc AUTHORS ChangeLog doc/*.txt NEWS README{,.mux}
+}
diff --git a/media-libs/libwebp/libwebp-0.4.0.ebuild b/media-libs/libwebp/libwebp-0.4.0.ebuild
new file mode 100644
index 000000000000..ba40ca057a3f
--- /dev/null
+++ b/media-libs/libwebp/libwebp-0.4.0.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 libtool multilib-minimal
+
+DESCRIPTION="A lossy image compression format"
+HOMEPAGE="http://code.google.com/p/webp/"
+SRC_URI="http://webp.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/5" # subslot = libwebp soname version
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~m68k-mint"
+IUSE="experimental gif +jpeg opengl +png static-libs swap-16bit-csp tiff"
+
+# TODO: dev-lang/swig bindings in swig/ subdirectory
+RDEPEND="gif? ( media-libs/giflib:= )
+ jpeg? ( virtual/jpeg:0= )
+ opengl? (
+ media-libs/freeglut
+ virtual/opengl
+ )
+ png? ( media-libs/libpng:0= )
+ tiff? ( media-libs/tiff:0= )"
+DEPEND="${RDEPEND}"
+
+ECONF_SOURCE=${S}
+
+src_prepare() {
+ # This is conflicting with `usex` later on, upstream is using ac_cv_ wrong
+ # If modifying configure.ac, eautoreconf is required because of "Maintainer mode"
+ sed -i -e '/unset ac_cv_header_GL_glut_h/d' configure || die
+
+ # Fix libtool relinking, bug 499270.
+ elibtoolize
+}
+
+multilib_src_configure() {
+ # Only used for gif2webp binary wrt #486646
+ local build_gif2webp=$(usex gif)
+ multilib_is_native_abi || build_gif2webp=no
+
+ ac_cv_header_gif_lib_h=${build_gif2webp} \
+ ac_cv_header_jpeglib_h=$(usex jpeg) \
+ ac_cv_header_png_h=$(usex png) \
+ ac_cv_header_GL_glut_h=$(usex opengl) \
+ ac_cv_header_tiffio_h=$(usex tiff) \
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable swap-16bit-csp) \
+ $(use_enable experimental) \
+ --enable-libwebpmux \
+ --enable-libwebpdemux \
+ --enable-libwebpdecoder
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+}
+
+multilib_src_install_all() {
+ prune_libtool_files
+ dodoc AUTHORS ChangeLog doc/*.txt NEWS README{,.mux}
+}
diff --git a/media-libs/libwebp/libwebp-0.4.2.ebuild b/media-libs/libwebp/libwebp-0.4.2.ebuild
new file mode 100644
index 000000000000..9d71c48c5971
--- /dev/null
+++ b/media-libs/libwebp/libwebp-0.4.2.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils libtool multilib-minimal
+
+DESCRIPTION="A lossy image compression format"
+HOMEPAGE="http://code.google.com/p/webp/"
+SRC_URI="http://downloads.webmproject.org/releases/webp/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/5" # subslot = libwebp soname version
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~m68k-mint"
+IUSE="experimental gif +jpeg opengl +png static-libs swap-16bit-csp tiff"
+
+# TODO: dev-lang/swig bindings in swig/ subdirectory
+RDEPEND="gif? ( media-libs/giflib:= )
+ jpeg? ( virtual/jpeg:0= )
+ opengl? (
+ media-libs/freeglut
+ virtual/opengl
+ )
+ png? ( media-libs/libpng:0= )
+ tiff? ( media-libs/tiff:0= )"
+DEPEND="${RDEPEND}"
+
+ECONF_SOURCE=${S}
+
+src_prepare() {
+ # This is conflicting with `usex` later on, upstream is using ac_cv_ wrong
+ # If modifying configure.ac, eautoreconf is required because of "Maintainer mode"
+ sed -i -e '/unset ac_cv_header_GL_glut_h/d' configure || die
+
+ # Fix libtool relinking, bug 499270.
+ elibtoolize
+}
+
+multilib_src_configure() {
+ # Only used for gif2webp binary wrt #486646
+ local build_gif2webp=$(usex gif)
+ multilib_is_native_abi || build_gif2webp=no
+
+ ac_cv_header_gif_lib_h=${build_gif2webp} \
+ ac_cv_header_jpeglib_h=$(usex jpeg) \
+ ac_cv_header_png_h=$(usex png) \
+ ac_cv_header_GL_glut_h=$(usex opengl) \
+ ac_cv_header_tiffio_h=$(usex tiff) \
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable swap-16bit-csp) \
+ $(use_enable experimental) \
+ --enable-libwebpmux \
+ --enable-libwebpdemux \
+ --enable-libwebpdecoder
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+}
+
+multilib_src_install_all() {
+ prune_libtool_files
+ dodoc AUTHORS ChangeLog doc/*.txt NEWS README{,.mux}
+}
diff --git a/media-libs/libwebp/metadata.xml b/media-libs/libwebp/metadata.xml
new file mode 100644
index 000000000000..1e4704acadf5
--- /dev/null
+++ b/media-libs/libwebp/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>graphics</herd>
+ <herd>chromium</herd>
+ <use>
+ <flag name='experimental'>Build with -DWEBP_EXPERIMENTAL_FEATURES</flag>
+ <flag name='swap-16bit-csp'>Enable byte swapping for 16 bit colorspace</flag>
+ </use>
+ <upstream>
+ <remote-id type="google-code">webp</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libwmf/Manifest b/media-libs/libwmf/Manifest
new file mode 100644
index 000000000000..6a2799337b3d
--- /dev/null
+++ b/media-libs/libwmf/Manifest
@@ -0,0 +1 @@
+DIST libwmf-0.2.8.4.tar.gz 2169375 SHA256 5b345c69220545d003ad52bfd035d5d6f4f075e65204114a9e875e84895a7cf8 SHA512 d98df8e76a52245487b13e5ab3d2fbba9d246f97ee04a7344c0e5861bb2d0f990fc6d662dbd849ce621768b06eaebd4270fb34bec4ee004334a98b14ba6044a5 WHIRLPOOL e6f9378fcb3363d62eb7bb12dca93a496954971a4c17359b8276c675557f892dee19843598c9d21987bf50ecc42083e7cec420e95e7052974a5843696ae0fd1e
diff --git a/media-libs/libwmf/files/libwmf-0.2.8.4-build.patch b/media-libs/libwmf/files/libwmf-0.2.8.4-build.patch
new file mode 100644
index 000000000000..8814046e889c
--- /dev/null
+++ b/media-libs/libwmf/files/libwmf-0.2.8.4-build.patch
@@ -0,0 +1,54 @@
+--- libwmf-0.2.8.4/src/convert/Makefile.am
++++ libwmf-0.2.8.4/src/convert/Makefile.am
+@@ -1,6 +1,6 @@
+-CFLAGS = @CFLAGS@ @WMF_CFLAGS@
++AM_CFLAGS = @WMF_CFLAGS@
+
+-LDFLAGS = -L$(top_builddir)/src/.libs @WMF_LIBFLAGS@ @LDFLAGS@
++LDADD = -L$(top_builddir)/src/.libs @WMF_LIBFLAGS@ @LDFLAGS@
+
+ DEFS = @DEFS@ @WMF_DEFS@ \
+ -DPACKAGE=\"@PACKAGE@\" \
+--- libwmf-0.2.8.4/src/extra/gd/Makefile.am
++++ libwmf-0.2.8.4/src/extra/gd/Makefile.am
+@@ -1,8 +1,6 @@
+ INCLUDES = -I$(srcdir)
+
+-CFLAGS = @CFLAGS@ @WMF_CFLAGS@
+-
+-LDFLAGS = @LDFLAGS@
++AM_CFLAGS = @WMF_CFLAGS@
+
+ DEFS = @DEFS@ @GD_DEFS@
+
+--- libwmf-0.2.8.4/src/extra/trio/Makefile.am
++++ libwmf-0.2.8.4/src/extra/trio/Makefile.am
+@@ -1,6 +1,4 @@
+-CFLAGS = @CFLAGS@ @WMF_CFLAGS@
+-
+-LDFLAGS = @LDFLAGS@
++AM_CFLAGS = @WMF_CFLAGS@
+
+ DEFS = @DEFS@ @WMF_DEFS@
+
+--- libwmf-0.2.8.4/src/ipa/Makefile.am
++++ libwmf-0.2.8.4/src/ipa/Makefile.am
+@@ -1,6 +1,4 @@
+-CFLAGS = @CFLAGS@ @WMF_CFLAGS@
+-
+-LDFLAGS = @LDFLAGS@
++AM_CFLAGS = @WMF_CFLAGS@
+
+ DEFS = @DEFS@ @WMF_DEFS@ \
+ -DPACKAGE=\"@PACKAGE@\" \
+--- libwmf-0.2.8.4/src/Makefile.am
++++ libwmf-0.2.8.4/src/Makefile.am
+@@ -20,7 +20,7 @@
+
+ SUBDIRS = $(DIRHEAVY)
+
+-CFLAGS = @CFLAGS@ @WMF_CFLAGS@ @GDK_PIXBUF_CFLAGS@
++AM_CFLAGS = @WMF_CFLAGS@ @GDK_PIXBUF_CFLAGS@
+
+ DEFS = @DEFS@ @WMF_DEFS@ $(DEFHEAVY) $(GDK_PIXBUF_DEFS) \
+ -DPACKAGE=\"@PACKAGE@\" \
diff --git a/media-libs/libwmf/files/libwmf-0.2.8.4-gdk-pixbuf.patch b/media-libs/libwmf/files/libwmf-0.2.8.4-gdk-pixbuf.patch
new file mode 100644
index 000000000000..83a9ce7f3635
--- /dev/null
+++ b/media-libs/libwmf/files/libwmf-0.2.8.4-gdk-pixbuf.patch
@@ -0,0 +1,25 @@
+diff -urN libwmf-0.2.8.4.old/configure.ac libwmf-0.2.8.4/configure.ac
+--- libwmf-0.2.8.4.old/configure.ac 2011-07-01 22:37:57.000000000 +0200
++++ libwmf-0.2.8.4/configure.ac 2011-07-01 22:41:38.000000000 +0200
+@@ -744,8 +744,7 @@
+
+ if test $LIBWMF_BUILDSTYLE != lite; then
+ PKG_CHECK_MODULES(GDK_PIXBUF,gdk-pixbuf-2.0 >= 2.1.2,[
+- GTK_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-2.0`
+- GDK_PIXBUF_DIR="gtk-2.0/$GTK_VERSION/loaders"
++ GDK_PIXBUF_DIR=`$PKG_CONFIG --variable=gdk_pixbuf_moduledir gdk-pixbuf-2.0`
+ wmf_gdk_pixbuf=yes
+ ],[ wmf_gdk_pixbuf=no
+ ])
+diff -urN libwmf-0.2.8.4.old/src/Makefile.am libwmf-0.2.8.4/src/Makefile.am
+--- libwmf-0.2.8.4.old/src/Makefile.am 2011-07-01 22:37:57.000000000 +0200
++++ libwmf-0.2.8.4/src/Makefile.am 2011-07-01 22:40:41.000000000 +0200
+@@ -63,7 +63,7 @@
+ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
+ -release $(LT_RELEASE) -export-dynamic
+
+-loaderdir = $(libdir)/$(GDK_PIXBUF_DIR)
++loaderdir = $(GDK_PIXBUF_DIR)
+
+ loader_LTLIBRARIES = $(GDK_PIXBUF_PLUGIN)
+
diff --git a/media-libs/libwmf/files/libwmf-0.2.8.4-intoverflow.patch b/media-libs/libwmf/files/libwmf-0.2.8.4-intoverflow.patch
new file mode 100644
index 000000000000..507fe66223ce
--- /dev/null
+++ b/media-libs/libwmf/files/libwmf-0.2.8.4-intoverflow.patch
@@ -0,0 +1,27 @@
+--- libwmf-0.2.8.4.orig/src/player.c 2002-12-10 19:30:26.000000000 +0000
++++ libwmf-0.2.8.4/src/player.c 2006-07-12 15:12:52.000000000 +0100
+@@ -42,6 +42,7 @@
+ #include "player/defaults.h" /* Provides: default settings */
+ #include "player/record.h" /* Provides: parameter mechanism */
+ #include "player/meta.h" /* Provides: record interpreters */
++#include <stdint.h>
+
+ /**
+ * @internal
+@@ -132,8 +134,14 @@
+ }
+ }
+
+-/* P->Parameters = (unsigned char*) wmf_malloc (API,(MAX_REC_SIZE(API)-3) * 2 * sizeof (unsigned char));
+- */ P->Parameters = (unsigned char*) wmf_malloc (API,(MAX_REC_SIZE(API) ) * 2 * sizeof (unsigned char));
++ if (MAX_REC_SIZE(API) > UINT32_MAX / 2)
++ {
++ API->err = wmf_E_InsMem;
++ WMF_DEBUG (API,"bailing...");
++ return (API->err);
++ }
++
++ P->Parameters = (unsigned char*) wmf_malloc (API,(MAX_REC_SIZE(API) ) * 2 * sizeof (unsigned char));
+
+ if (ERR (API))
+ { WMF_DEBUG (API,"bailing...");
diff --git a/media-libs/libwmf/files/libwmf-0.2.8.4-libpng-1.5.patch b/media-libs/libwmf/files/libwmf-0.2.8.4-libpng-1.5.patch
new file mode 100644
index 000000000000..3528c74ebd8d
--- /dev/null
+++ b/media-libs/libwmf/files/libwmf-0.2.8.4-libpng-1.5.patch
@@ -0,0 +1,12 @@
+diff -urN libwmf-0.2.8.4.old/src/ipa/ipa/bmp.h libwmf-0.2.8.4/src/ipa/ipa/bmp.h
+--- libwmf-0.2.8.4.old/src/ipa/ipa/bmp.h 2011-05-23 19:14:23.000000000 +0200
++++ libwmf-0.2.8.4/src/ipa/ipa/bmp.h 2011-05-23 19:15:11.000000000 +0200
+@@ -66,7 +66,7 @@
+ return;
+ }
+
+- if (setjmp (png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(png_ptr)))
+ { WMF_DEBUG (API,"Failed to write bitmap as PNG! (setjmp failed)");
+ png_destroy_write_struct (&png_ptr,&info_ptr);
+ wmf_free (API,buffer);
diff --git a/media-libs/libwmf/files/libwmf-0.2.8.4-pngfix.patch b/media-libs/libwmf/files/libwmf-0.2.8.4-pngfix.patch
new file mode 100644
index 000000000000..52717735a26e
--- /dev/null
+++ b/media-libs/libwmf/files/libwmf-0.2.8.4-pngfix.patch
@@ -0,0 +1,20 @@
+diff -NrU5 libwmf-0.2.8.4.orig/src/ipa/ipa.c libwmf-0.2.8.4/src/ipa/ipa.c
+--- libwmf-0.2.8.4.orig/src/ipa/ipa.c 2009-05-10 23:41:17.000000000 +0200
++++ libwmf-0.2.8.4/src/ipa/ipa.c 2009-05-11 00:07:43.000000000 +0200
+@@ -33,10 +33,16 @@
+
+ /* Define WMF_API if this is module so that ipa headers are included via "wmfdefs.h" first
+ */
+ #define WMF_IPA 1
+
++#ifndef HAVE_GD
++#ifdef HAVE_LIBPNG
++#include <png.h>
++#endif /* HAVE_LIBPNG */
++#endif /* HAVE_GD */
++
+ #include "wmfdefs.h"
+
+ #include "ipa/ipa.h"
+ #include "ipa/ipa/bmp.h" /* Provides default bitmap functionality */
+
diff --git a/media-libs/libwmf/files/libwmf-0.2.8.4-use-system-fonts.patch b/media-libs/libwmf/files/libwmf-0.2.8.4-use-system-fonts.patch
new file mode 100644
index 000000000000..2f7465c33cd0
--- /dev/null
+++ b/media-libs/libwmf/files/libwmf-0.2.8.4-use-system-fonts.patch
@@ -0,0 +1,39 @@
+diff -urN libwmf-0.2.8.4.old/fonts/Makefile.am libwmf-0.2.8.4/fonts/Makefile.am
+--- libwmf-0.2.8.4.old/fonts/Makefile.am 2011-07-01 22:37:57.000000000 +0200
++++ libwmf-0.2.8.4/fonts/Makefile.am 2011-07-01 22:38:37.000000000 +0200
+@@ -1,35 +1,3 @@
+ fontdir = @WMF_FONTDIR@
+
+ bin_SCRIPTS = libwmf-fontmap
+-
+-FONTS = \
+- n019003l.afm \
+- n019003l.pfb \
+- n019004l.afm \
+- n019004l.pfb \
+- n019023l.afm \
+- n019023l.pfb \
+- n019024l.afm \
+- n019024l.pfb \
+- n021003l.afm \
+- n021003l.pfb \
+- n021004l.afm \
+- n021004l.pfb \
+- n021023l.afm \
+- n021023l.pfb \
+- n021024l.afm \
+- n021024l.pfb \
+- n022003l.afm \
+- n022003l.pfb \
+- n022004l.afm \
+- n022004l.pfb \
+- n022023l.afm \
+- n022023l.pfb \
+- n022024l.afm \
+- n022024l.pfb \
+- s050000l.afm \
+- s050000l.pfb
+-
+-font_DATA = $(FONTS) fontmap
+-
+-EXTRA_DIST = libwmf-fontmap.in LICENSE $(FONTS)
diff --git a/media-libs/libwmf/libwmf-0.2.8.4-r5.ebuild b/media-libs/libwmf/libwmf-0.2.8.4-r5.ebuild
new file mode 100644
index 000000000000..3b4e294209d8
--- /dev/null
+++ b/media-libs/libwmf/libwmf-0.2.8.4-r5.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=true
+
+inherit autotools-utils gnome2-utils
+
+#The configure script finds the 5.50 ghostscript Fontmap file while run.
+#This will probably work, especially since the real one (6.50) in this case
+#is empty. However beware in case there is any trouble
+
+DESCRIPTION="library for converting WMF files"
+HOMEPAGE="http://wvware.sourceforge.net/"
+SRC_URI="mirror://sourceforge/wvware/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris"
+IUSE="X debug doc expat xml"
+
+RDEPEND="
+ app-text/ghostscript-gpl
+ media-fonts/urw-fonts
+ >=media-libs/freetype-2.0.1
+ >=media-libs/libpng-1.4
+ sys-libs/zlib
+ x11-libs/gdk-pixbuf:2[X?]
+ virtual/jpeg
+ xml? (
+ expat? ( dev-libs/expat )
+ !expat? ( dev-libs/libxml2 )
+ )
+ X? ( x11-libs/libX11 )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ X? (
+ x11-libs/libXt
+ x11-libs/libXpm
+ )"
+# plotutils are not really supported yet, so looks like that's it
+
+REQUIRED_USE="expat? ( xml )"
+
+DOCS=( README AUTHORS CREDITS ChangeLog NEWS TODO )
+
+PATCHES=(
+ "${FILESDIR}"/${P}-intoverflow.patch
+ "${FILESDIR}"/${P}-build.patch
+ "${FILESDIR}"/${P}-pngfix.patch
+ "${FILESDIR}"/${P}-libpng-1.5.patch
+ "${FILESDIR}"/${P}-use-system-fonts.patch
+ "${FILESDIR}"/${P}-gdk-pixbuf.patch
+ )
+
+AUTOTOOLS_PRUNE_LIBTOOL_FILES='modules'
+
+src_prepare() {
+ if ! use doc ; then
+ sed -e 's:doc::' -i Makefile.am || die
+ fi
+ sed -i 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/g' configure.ac || die
+
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=()
+ # NOTE: The gd that is included is gd-2.0.0. Even with --with-sys-gd, that gd is built
+ # and included in libwmf. Since nothing in-tree seems to use media-libs/libwmf[gd],
+ # we're explicitly disabling gd use w.r.t. bug 268161
+ if use expat; then
+ myeconfargs+=( --without-libxml2 )
+ else
+ myeconfargs+=( $(use_with xml libxml2) )
+ fi
+
+ myeconfargs+=(
+ --disable-static
+ $(use_enable debug)
+ $(use_with X x)
+ $(use_with expat)
+ --disable-gd
+ --with-sys-gd
+ --with-gsfontdir="${EPREFIX}"/usr/share/ghostscript/fonts
+ --with-fontdir="${EPREFIX}"/usr/share/fonts/urw-fonts/
+ --with-docdir="${EPREFIX}"/usr/share/doc/${PF}
+ )
+ autotools-utils_src_configure
+}
+
+src_install() {
+ MAKEOPTS+=" -j1"
+ autotools-utils_src_install
+}
+
+pkg_preinst() {
+ gnome2_gdk_pixbuf_savelist
+}
+
+pkg_postinst() {
+ gnome2_gdk_pixbuf_update
+}
+
+pkg_postrm() {
+ gnome2_gdk_pixbuf_update
+}
diff --git a/media-libs/libwmf/metadata.xml b/media-libs/libwmf/metadata.xml
new file mode 100644
index 000000000000..2e50829c1d2b
--- /dev/null
+++ b/media-libs/libwmf/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">wvware</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libxmi/Manifest b/media-libs/libxmi/Manifest
new file mode 100644
index 000000000000..18d11fdbbed9
--- /dev/null
+++ b/media-libs/libxmi/Manifest
@@ -0,0 +1,2 @@
+DIST libxmi-1.2.tar.gz 302662 SHA256 9d56af6d6c41468ca658eb6c4ba33ff7967a388b606dc503cd68d024e08ca40d SHA512 55cf86064496cb1f551fb1a208f9fe1ee8d826e0e1d7ddc2898bef7316c0ac51b34f5f28840626b901b0720264e08fa95f7ab18b57b12c3f64d8a8d48d83e93a WHIRLPOOL 3d5810219678270ad87479f143f2137fd4dd54fc371a856be38713e0a41c5b4d39e6d75e6c858cd3b23b31c0f59845d25c3cbdce991ea48ab3e6531605c11256
+DIST libxmi-1.3.tar.xz 258672 SHA256 86f2aed4a89ab1378d4dd32fb8f0e158e4a21e647847471dbff546311194d712 SHA512 f54b0925e2b848f7cfb31bd0f9eed27df6fd6e704ffeeb58eb490d49e7ca76f46e03eee6ed89d6644f6a3bad05c7b0b986f9634d0cd23c49f31ee80f23ff8262 WHIRLPOOL cf102a8a2f97571f1c5a05467dcc8feeb4c156eadab034769078d83f8f66c9af164f59b9de625c107bb7e75d3ce764b3796c9055f7e000578b1c6f1108f36db4
diff --git a/media-libs/libxmi/libxmi-1.2.ebuild b/media-libs/libxmi/libxmi-1.2.ebuild
new file mode 100644
index 000000000000..f3335e27e690
--- /dev/null
+++ b/media-libs/libxmi/libxmi-1.2.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=true
+
+inherit autotools-utils
+
+DESCRIPTION="C/C++ function library for rasterizing 2-D vector graphics"
+HOMEPAGE="http://www.gnu.org/software/libxmi/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="static-libs"
+
+DEPEND="!<=media-libs/plotutils-2.6"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ sed \
+ -e 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/g' \
+ -i configure.in || die
+ autotools-utils_src_prepare
+}
diff --git a/media-libs/libxmi/libxmi-1.3.ebuild b/media-libs/libxmi/libxmi-1.3.ebuild
new file mode 100644
index 000000000000..aac21ffc736c
--- /dev/null
+++ b/media-libs/libxmi/libxmi-1.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
+
+AUTOTOOLS_AUTORECONF=true
+
+inherit autotools-utils
+
+DESCRIPTION="C/C++ function library for rasterizing 2-D vector graphics"
+HOMEPAGE="http://www.gnu.org/software/libxmi/"
+SRC_URI="http://dev.gentoo.org/~jlec/distfiles/${P}.tar.xz"
+#mirror://gnu/${PN}/${P}.tar.gz"
+# Version unbundled from plotutils
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="static-libs"
+
+DEPEND="!<=media-libs/plotutils-2.6"
+RDEPEND="${DEPEND}"
diff --git a/media-libs/libxmi/metadata.xml b/media-libs/libxmi/metadata.xml
new file mode 100644
index 000000000000..f75eebabbe18
--- /dev/null
+++ b/media-libs/libxmi/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>printing</herd>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ </maintainer>
+ <longdescription>
+GNU libxmi is a C/C++ function library for rasterizing 2-D vector graphics. It
+can draw 2-D graphical primitives, including wide polygonal lines and circular
+and elliptical arcs, into a user-supplied matrix of pixels. Sophisticated line
+styles, such as multicolored dashing patterns, can be specified. There is also
+support for filling and texturing polygons.
+
+It can be used as a drop-in rendering module in any application that needs to
+scan-convert 2-D vector graphics. It is highly customizable. For example, the
+`pixel' datatype can be redefined at compile time. The algorithm used for
+compositing pixels can be redefined too. By default, libxmi uses the
+Painter's Algorithm (a new pixel value replaces an old one). But it would be
+trivial to install it so that it uses alpha compositing instead. The package,
+and its header file xmi.h, include full documentation.
+</longdescription>
+</pkgmetadata>
diff --git a/media-libs/libxspf/Manifest b/media-libs/libxspf/Manifest
new file mode 100644
index 000000000000..293bd079bab9
--- /dev/null
+++ b/media-libs/libxspf/Manifest
@@ -0,0 +1 @@
+DIST libxspf-1.2.0.tar.bz2 372483 SHA256 ba9e93a0066469b074b4022b480004651ad3aa5b4313187fd407d833f79b43a5 SHA512 56667b6df89e30517e2e388e2e3b1c083b19d98d69b4ee328d2784bba57a8d50c6b6ae1876cf17e6f9eb1ff872680c8f33b84b826d1290b890ac173c76bea491 WHIRLPOOL 4a518c505d2d685989923fa995547152e1d48ea903834a2a8c8fca938a79973850c2c589e9ad47f680f7f257b3d4b2bea12202f334a96fc8c04b68186a235684
diff --git a/media-libs/libxspf/files/libxspf-1.2.0-gcc44.patch b/media-libs/libxspf/files/libxspf-1.2.0-gcc44.patch
new file mode 100644
index 000000000000..fa16b589df30
--- /dev/null
+++ b/media-libs/libxspf/files/libxspf-1.2.0-gcc44.patch
@@ -0,0 +1,22 @@
+http://bugs.gentoo.org/261604
+
+--- test/OfficialSuite.cpp
++++ test/OfficialSuite.cpp
+@@ -21,6 +21,7 @@
+ * Sebastian Pipping, sping@xiph.org
+ */
+
++#include <cstdio>
+ #include "OfficialSuite.h"
+ #include <xspf/XspfReaderCallback.h>
+ using namespace Xspf;
+--- test/ProjectOpus/ProjectOpusSuite.cpp
++++ test/ProjectOpus/ProjectOpusSuite.cpp
+@@ -21,6 +21,7 @@
+ * Sebastian Pipping, sping@xiph.org
+ */
+
++#include <cstdio>
+ #include "ProjectOpusSuite.h"
+ #include <xspf/XspfReader.h>
+ #include <xspf/XspfTrack.h>
diff --git a/media-libs/libxspf/files/libxspf-1.2.0-gcc47.patch b/media-libs/libxspf/files/libxspf-1.2.0-gcc47.patch
new file mode 100644
index 000000000000..b408416e7ef7
--- /dev/null
+++ b/media-libs/libxspf/files/libxspf-1.2.0-gcc47.patch
@@ -0,0 +1,12 @@
+http://bugs.gentoo.org/421745
+
+--- examples/read/read.cpp
++++ examples/read/read.cpp
+@@ -43,6 +43,7 @@
+ #include <cstdio>
+ #include <cstdlib> // MAX_PATH
+ #include <climits> // PATH_MAX
++#include <unistd.h> // getcwd
+
+
+ #if defined(__WIN32__) || defined(WIN32)
diff --git a/media-libs/libxspf/libxspf-1.2.0.ebuild b/media-libs/libxspf/libxspf-1.2.0.ebuild
new file mode 100644
index 000000000000..edee2c183d02
--- /dev/null
+++ b/media-libs/libxspf/libxspf-1.2.0.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils
+
+DESCRIPTION="Playlist handling library"
+HOMEPAGE="http://libspiff.sourceforge.net/"
+SRC_URI="mirror://sourceforge/libspiff/${P}.tar.bz2"
+
+LICENSE="BSD LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris"
+IUSE="doc static-libs test"
+
+RDEPEND=">=dev-libs/expat-2
+ >=dev-libs/uriparser-0.7.5"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? (
+ >=app-doc/doxygen-1.5.8
+ media-gfx/graphviz
+ dev-qt/qthelp:4
+ )
+ test? ( >=dev-util/cpptest-1.1 )"
+
+DOCS="AUTHORS ChangeLog NEWS README THANKS"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-gcc44.patch \
+ "${FILESDIR}"/${P}-gcc47.patch
+}
+
+src_configure() {
+ export XDG_CONFIG_HOME="${T}" #398881#c2
+
+ econf \
+ --docdir="${EPREFIX}"/usr/share/doc/${PF} \
+ $(use_enable static-libs static) \
+ $(use_enable test) \
+ $(use_enable doc)
+}
+
+src_install() {
+ default
+ prune_libtool_files
+}
diff --git a/media-libs/libxspf/metadata.xml b/media-libs/libxspf/metadata.xml
new file mode 100644
index 000000000000..57004d18bdda
--- /dev/null
+++ b/media-libs/libxspf/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>sound</herd>
+ <longdescription lang="en">
+ libxspf brings XSPF playlist reading and writing support to your C++
+ application. XSPF is an open XML format for sharing playlists.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">libspiff</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libxtract/Manifest b/media-libs/libxtract/Manifest
new file mode 100644
index 000000000000..16d8ca2fcb55
--- /dev/null
+++ b/media-libs/libxtract/Manifest
@@ -0,0 +1 @@
+DIST libxtract-0.6.6.tar.gz 479376 SHA256 458ecb2dd7f883cf160b740ed01829c5d3311db8dad680bdcdbdbb0cf850e393 SHA512 67dc1ac227ffaf3b78b21d14598e6510016a985558b7242ae28d1be7aa4502e841f186eefa71958c4d989ec4ac395dd5659e611c4284969090a9948a5f99a0d5 WHIRLPOOL 105f23b97779ed209185c85773f4fbd153538f5279a5dfba7a23511ba5041fa43ae3b260761338e486c3c44e79f2fae17fd9a31d397e8fcc2fe88db9af25f203
diff --git a/media-libs/libxtract/libxtract-0.6.6.ebuild b/media-libs/libxtract/libxtract-0.6.6.ebuild
new file mode 100644
index 000000000000..429ffb0703ec
--- /dev/null
+++ b/media-libs/libxtract/libxtract-0.6.6.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="A simple, portable, lightweight library of audio feature extraction functions"
+HOMEPAGE="http://github.com/jamiebullock/LibXtract"
+SRC_URI="http://github.com/downloads/jamiebullock/LibXtract/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ppc64 x86"
+IUSE="doc fftw static-libs"
+
+RDEPEND="fftw? ( sci-libs/fftw:3.0 )"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )"
+
+src_configure() {
+ econf \
+ $(use_enable fftw fft) \
+ $(use_enable static-libs static)
+ # Prevent doc from being generated automagically
+ use doc || touch doc/doxygen-build.stamp
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ find "${ED}" -name "*.la" -delete
+ dodoc README.md TODO AUTHORS
+ use doc && dohtml doc/html/*
+}
diff --git a/media-libs/libxtract/metadata.xml b/media-libs/libxtract/metadata.xml
new file mode 100644
index 000000000000..53685ee65c8f
--- /dev/null
+++ b/media-libs/libxtract/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>proaudio</herd>
+ <upstream>
+ <remote-id type="github">downloads/jamiebullock</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/libzen/Manifest b/media-libs/libzen/Manifest
new file mode 100644
index 000000000000..87932e34653e
--- /dev/null
+++ b/media-libs/libzen/Manifest
@@ -0,0 +1,4 @@
+DIST libzen_0.4.28.tar.bz2 103380 SHA256 0649c10e1657f5a0c5447301c0c3c367343069159b3bb5452ae7ef344dc63805 SHA512 4dcf7a60bca9a90c6a0342af416d6fc9cac595b6952a0827a29b4a225359097a03ce36c4ace82363bea1a72ec69f8bff545755ff7c53ff4cca4c47ccad11ea76 WHIRLPOOL ccd27f968a3e5495ee0c006935d51a2a33d698737d968a7e61b68b22ae5636bd91746fbe392d68c51f67df1bb1fbd19361415aa58001b79ed4bfa9da55f4ffa9
+DIST libzen_0.4.29.tar.bz2 101647 SHA256 5cfe8b460928239e6840bb547fa140149f47486fe71db93062fcfbca4b753e00 SHA512 1900c714c48423fcc4fc1bb6810cbafc61f42170ad7c6d81ccc9b8353709f93c003f68c79134c58fb3e7e4afd3f3ba9e46c8ed2f54fb4ffc01546bd32f33efef WHIRLPOOL 3cff851d0a6a4f4e0f13fe0742201e05c5eafdef916c63326c7caf0ae897fb65c245dd20680f7983b4f070ccec4007528159ac4fb400a0c2e28d0d818b33d891
+DIST libzen_0.4.30.tar.bz2 105608 SHA256 c4f8bcbeb64b0587b51225e6ceed343f2f759d7c72562445b78953f1bfdf37e6 SHA512 6bd3b8354e19b02048f9c9dc890cad9d87e4c9fb2076ce27732428439790527745c9183c17c1a5a9f8667a47ba4922d073d1079d384085f140bbc6b525609bcf WHIRLPOOL 8dfaaf3ca81585d9363eb35bc7b52f415449240bdfdb3752efe6e2ae3aa490997f86f5f5b228d2c3403c1d7486587204cc1174396b36402222c2eeca9c29c2b2
+DIST libzen_0.4.31.tar.bz2 107694 SHA256 9fd0ed1861986c59d00e9674efc3afab487172c16e85384d7037b6608a5da4b4 SHA512 ab881b0bf6932c6198649898b03634cdb0c133b4b8cbbb29fd6273b858f7b548cac70a7866622b5b3b5d67f28f9cf4856c95a1cca98bbecdf44291c59fe79765 WHIRLPOOL c77abe694e2d8e1bd5577994bea2df207f70266402f01af085e4722ce612e7b674e090398d01e61c26181efb225623cc3a1d125f531f2654fe23216c84de78b9
diff --git a/media-libs/libzen/libzen-0.4.28.ebuild b/media-libs/libzen/libzen-0.4.28.ebuild
new file mode 100644
index 000000000000..b000c851733e
--- /dev/null
+++ b/media-libs/libzen/libzen-0.4.28.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit autotools multilib eutils
+
+MY_PN="ZenLib"
+DESCRIPTION="Shared library for libmediainfo and mediainfo"
+HOMEPAGE="http://sourceforge.net/projects/zenlib"
+SRC_URI="mirror://sourceforge/zenlib/${MY_PN}%20-%20Sources/${PV}/${PN}_${PV}.tar.bz2"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="doc static-libs"
+
+DEPEND="virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+S=${WORKDIR}/${MY_PN}/Project/GNU/Library
+
+src_prepare() {
+ sed -i -e "s:-O2::" configure.ac
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --enable-unicode \
+ --enable-shared \
+ $(use_enable static-libs static)
+}
+
+src_compile() {
+ default
+
+ if use doc ; then
+ cd "${WORKDIR}"/${MY_PN}/Source/Doc
+ doxygen Doxyfile || die
+ fi
+}
+
+src_install() {
+ default
+
+ # remove since the pkgconfig file should be used instead
+ rm "${D}"/usr/bin/libzen-config
+
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins ${PN}.pc
+
+ for x in ./ Format/Html Format/Http HTTP_Client ; do
+ insinto /usr/include/${MY_PN}/${x}
+ doins "${WORKDIR}"/${MY_PN}/Source/${MY_PN}/${x}/*.h
+ done
+
+ dodoc "${WORKDIR}"/${MY_PN}/History.txt
+ if use doc ; then
+ dohtml "${WORKDIR}"/${MY_PN}/Doc/*
+ fi
+
+ prune_libtool_files
+}
diff --git a/media-libs/libzen/libzen-0.4.29.ebuild b/media-libs/libzen/libzen-0.4.29.ebuild
new file mode 100644
index 000000000000..5efb9bed5bd0
--- /dev/null
+++ b/media-libs/libzen/libzen-0.4.29.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit autotools multilib eutils
+
+MY_PN="ZenLib"
+DESCRIPTION="Shared library for libmediainfo and mediainfo"
+HOMEPAGE="http://sourceforge.net/projects/zenlib"
+SRC_URI="mirror://sourceforge/zenlib/${PN}_${PV}.tar.bz2"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="doc static-libs"
+
+DEPEND="virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+S=${WORKDIR}/${MY_PN}/Project/GNU/Library
+
+src_prepare() {
+ sed -i 's:-O2::' configure.ac || die
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --enable-unicode \
+ --enable-shared \
+ $(use_enable static-libs static)
+}
+
+src_compile() {
+ default
+
+ if use doc ; then
+ cd "${WORKDIR}"/${MY_PN}/Source/Doc
+ doxygen Doxyfile || die
+ fi
+}
+
+src_install() {
+ default
+
+ # remove since the pkgconfig file should be used instead
+ rm "${D}"/usr/bin/libzen-config
+
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins ${PN}.pc
+
+ for x in ./ Format/Html Format/Http HTTP_Client ; do
+ insinto /usr/include/${MY_PN}/${x}
+ doins "${WORKDIR}"/${MY_PN}/Source/${MY_PN}/${x}/*.h
+ done
+
+ dodoc "${WORKDIR}"/${MY_PN}/History.txt
+ if use doc ; then
+ dohtml "${WORKDIR}"/${MY_PN}/Doc/*
+ fi
+
+ prune_libtool_files
+}
diff --git a/media-libs/libzen/libzen-0.4.30.ebuild b/media-libs/libzen/libzen-0.4.30.ebuild
new file mode 100644
index 000000000000..ed8149a66217
--- /dev/null
+++ b/media-libs/libzen/libzen-0.4.30.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools multilib eutils
+
+MY_PN="ZenLib"
+DESCRIPTION="Shared library for libmediainfo and mediainfo"
+HOMEPAGE="http://sourceforge.net/projects/zenlib"
+SRC_URI="mirror://sourceforge/zenlib/${PN}_${PV}.tar.bz2"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="doc static-libs"
+
+DEPEND="virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+S=${WORKDIR}/${MY_PN}/Project/GNU/Library
+
+src_prepare() {
+ sed -i 's:-O2::' configure.ac || die
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --enable-unicode \
+ --enable-shared \
+ $(use_enable static-libs static)
+}
+
+src_compile() {
+ default
+
+ if use doc ; then
+ cd "${WORKDIR}"/${MY_PN}/Source/Doc
+ doxygen Doxyfile || die
+ fi
+}
+
+src_install() {
+ default
+
+ # remove since the pkgconfig file should be used instead
+ rm "${D}"/usr/bin/libzen-config
+
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins ${PN}.pc
+
+ for x in ./ Format/Html Format/Http HTTP_Client ; do
+ insinto /usr/include/${MY_PN}/${x}
+ doins "${WORKDIR}"/${MY_PN}/Source/${MY_PN}/${x}/*.h
+ done
+
+ dodoc "${WORKDIR}"/${MY_PN}/History.txt
+ if use doc ; then
+ dohtml "${WORKDIR}"/${MY_PN}/Doc/*
+ fi
+
+ prune_libtool_files
+}
diff --git a/media-libs/libzen/libzen-0.4.31.ebuild b/media-libs/libzen/libzen-0.4.31.ebuild
new file mode 100644
index 000000000000..85a17e2de020
--- /dev/null
+++ b/media-libs/libzen/libzen-0.4.31.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools multilib eutils
+
+MY_PN="ZenLib"
+DESCRIPTION="Shared library for libmediainfo and mediainfo"
+HOMEPAGE="http://sourceforge.net/projects/zenlib"
+SRC_URI="mirror://sourceforge/zenlib/${PN}_${PV}.tar.bz2"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc static-libs"
+
+DEPEND="virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+S=${WORKDIR}/${MY_PN}/Project/GNU/Library
+
+src_prepare() {
+ sed -i 's:-O2::' configure.ac || die
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --enable-unicode \
+ --enable-shared \
+ $(use_enable static-libs static)
+}
+
+src_compile() {
+ default
+
+ if use doc ; then
+ cd "${WORKDIR}"/${MY_PN}/Source/Doc
+ doxygen Doxyfile || die
+ fi
+}
+
+src_install() {
+ default
+
+ # remove since the pkgconfig file should be used instead
+ rm "${D}"/usr/bin/libzen-config
+
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins ${PN}.pc
+
+ for x in ./ Format/Html Format/Http HTTP_Client ; do
+ insinto /usr/include/${MY_PN}/${x}
+ doins "${WORKDIR}"/${MY_PN}/Source/${MY_PN}/${x}/*.h
+ done
+
+ dodoc "${WORKDIR}"/${MY_PN}/History.txt
+ if use doc ; then
+ dohtml "${WORKDIR}"/${MY_PN}/Doc/*
+ fi
+
+ prune_libtool_files
+}
diff --git a/media-libs/libzen/metadata.xml b/media-libs/libzen/metadata.xml
new file mode 100644
index 000000000000..e1410a9cfab9
--- /dev/null
+++ b/media-libs/libzen/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">zenlib</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/lilv/Manifest b/media-libs/lilv/Manifest
new file mode 100644
index 000000000000..54e92e238595
--- /dev/null
+++ b/media-libs/lilv/Manifest
@@ -0,0 +1,2 @@
+DIST lilv-0.18.0.tar.bz2 201334 SHA256 55995dd966df233337d80ff59c7b2a7ed0df56e82ec06d179feb518f00733ccd SHA512 a4892446220f642fb555eed39ce50a8235546c4415e979fe7f54acdc89fca6e437632b714e179806f3cbb80c81c0988978b8e1bcaa904c5e23ca789f6cb39206 WHIRLPOOL b36bbf7ce471e5cac4da7cb3fee3eea59dc85d494f745aec1a2fd8cc34289bd24c4c77302ea2613292847a65c4d84440b1a4780b4f45b6fac9585ceb005716ad
+DIST lilv-0.20.0.tar.bz2 207948 SHA256 428a39f1265d44c55f2604829a12ade0ea13e1a1022ff937ca2a9ad227bd422a SHA512 bbc8b9154339cd145a61c5e4613fd31a2e457df8242c55371f3245564d3b23d028a0bc0ffafac393119bb47171b7c735f0c3a55cf5bffc6920ae89aa877240e5 WHIRLPOOL 1e71e553f1b969d40042633c9eb63b96ef1f9d72d8087326414f840ffe8ee38094f63cabf0efc57dece04471e7d4897140fbb886bad21f11a6282d420530d51c
diff --git a/media-libs/lilv/lilv-0.18.0.ebuild b/media-libs/lilv/lilv-0.18.0.ebuild
new file mode 100644
index 000000000000..84af93ada231
--- /dev/null
+++ b/media-libs/lilv/lilv-0.18.0.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+PYTHON_REQ_USE='threads(+)'
+
+inherit base python-any-r1 waf-utils bash-completion-r1
+
+DESCRIPTION="Library to make the use of LV2 plugins as simple as possible for applications"
+HOMEPAGE="http://drobilla.net/software/lilv/"
+SRC_URI="http://download.drobilla.net/${P}.tar.bz2"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="doc +dyn-manifest static-libs test"
+
+RDEPEND="media-libs/lv2
+ >=media-libs/sratom-0.4.0
+ >=dev-libs/serd-0.14.0
+ >=dev-libs/sord-0.12.0"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ doc? ( app-doc/doxygen )
+ virtual/pkgconfig"
+
+DOCS=( "AUTHORS" "NEWS" "README" )
+
+src_prepare() {
+ sed -i -e 's/^.*run_ldconfig/#\0/' wscript || die
+}
+
+src_configure() {
+ waf-utils_src_configure \
+ --docdir="${EPREFIX}"/usr/share/doc/${PF} \
+ --no-bash-completion \
+ $(use test && echo "--test") \
+ $(use doc && echo "--docs") \
+ $(use static-libs && echo "--static") \
+ $(use dyn-manifest && echo "--dyn-manifest")
+}
+
+src_test() {
+ ./waf test || die
+}
+
+src_install() {
+ waf-utils_src_install
+ newbashcomp utils/lilv.bash_completion ${PN}
+}
diff --git a/media-libs/lilv/lilv-0.20.0.ebuild b/media-libs/lilv/lilv-0.20.0.ebuild
new file mode 100644
index 000000000000..84af93ada231
--- /dev/null
+++ b/media-libs/lilv/lilv-0.20.0.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+PYTHON_REQ_USE='threads(+)'
+
+inherit base python-any-r1 waf-utils bash-completion-r1
+
+DESCRIPTION="Library to make the use of LV2 plugins as simple as possible for applications"
+HOMEPAGE="http://drobilla.net/software/lilv/"
+SRC_URI="http://download.drobilla.net/${P}.tar.bz2"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="doc +dyn-manifest static-libs test"
+
+RDEPEND="media-libs/lv2
+ >=media-libs/sratom-0.4.0
+ >=dev-libs/serd-0.14.0
+ >=dev-libs/sord-0.12.0"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ doc? ( app-doc/doxygen )
+ virtual/pkgconfig"
+
+DOCS=( "AUTHORS" "NEWS" "README" )
+
+src_prepare() {
+ sed -i -e 's/^.*run_ldconfig/#\0/' wscript || die
+}
+
+src_configure() {
+ waf-utils_src_configure \
+ --docdir="${EPREFIX}"/usr/share/doc/${PF} \
+ --no-bash-completion \
+ $(use test && echo "--test") \
+ $(use doc && echo "--docs") \
+ $(use static-libs && echo "--static") \
+ $(use dyn-manifest && echo "--dyn-manifest")
+}
+
+src_test() {
+ ./waf test || die
+}
+
+src_install() {
+ waf-utils_src_install
+ newbashcomp utils/lilv.bash_completion ${PN}
+}
diff --git a/media-libs/lilv/metadata.xml b/media-libs/lilv/metadata.xml
new file mode 100644
index 000000000000..3d40c7743f80
--- /dev/null
+++ b/media-libs/lilv/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>proaudio</herd>
+<longdescription lang="en">
+ Lilv is a library to make the use of LV2 plugins as simple as possible for applications. Lilv is the successor to SLV2, rewritten to be significantly faster and have minimal dependencies.
+</longdescription>
+ <use>
+ <flag name="dyn-manifest">Add LV2 Dynamic Manifest support. See http://lv2plug.in/ns/ext/dynmanifest/</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/lv2-ui/Manifest b/media-libs/lv2-ui/Manifest
new file mode 100644
index 000000000000..b66418503b17
--- /dev/null
+++ b/media-libs/lv2-ui/Manifest
@@ -0,0 +1 @@
+DIST lv2-ui-2.4.tar.bz2 101001 SHA256 0175ff907293eec928d3543612d179359d9d515f8bf6bd032054e36f761f7bdd SHA512 55c6c1ae24045ff6e088408975d8555285404e9d2a3f06fbd5d6711b79fbf90b29f4b7e414b26727bd596814f86c643b4d27b2be8b7645e0b63af189b62d1278 WHIRLPOOL f7179aa9a53cae6c8d79d4d2e5feeacfa093e8b950c157ac49d6dd1317a0fc5aa21efb789da4bb6d33404f27e100b8daa3768e466d53972302df681989362c25
diff --git a/media-libs/lv2-ui/lv2-ui-2.4-r1.ebuild b/media-libs/lv2-ui/lv2-ui-2.4-r1.ebuild
new file mode 100644
index 000000000000..92be57cafb86
--- /dev/null
+++ b/media-libs/lv2-ui/lv2-ui-2.4-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
+
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+PYTHON_REQ_USE='threads'
+
+inherit python-any-r1 waf-utils
+
+DESCRIPTION="Generic UI interface for LV2 plugins"
+HOMEPAGE="http://lv2plug.in/ns/extensions/ui"
+SRC_URI="http://lv2plug.in/spec/${P}.tar.bz2"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="${PYTHON_DEPS}"
+RDEPEND=">=media-libs/lv2core-6.0"
+
+DOCS=( "NEWS" )
diff --git a/media-libs/lv2-ui/metadata.xml b/media-libs/lv2-ui/metadata.xml
new file mode 100644
index 000000000000..630499147bb2
--- /dev/null
+++ b/media-libs/lv2-ui/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>proaudio</herd>
+ <longdescription lang="en">
+ This extension defines an interface that can be used in LV2 plugins and hosts to create UIs for plugins. The UIs are similar to plugins and reside in shared object files in an LV2 bundle.
+</longdescription>
+</pkgmetadata>
diff --git a/media-libs/lv2/Manifest b/media-libs/lv2/Manifest
new file mode 100644
index 000000000000..b7a8e7156494
--- /dev/null
+++ b/media-libs/lv2/Manifest
@@ -0,0 +1,3 @@
+DIST lv2-1.10.0.tar.bz2 422018 SHA256 e80c8e4b45d4de3b09f26d76e39d454739b6aff3f444ea1dabe466ab530fa4d5 SHA512 e7704101a3ef95a235e76fde862c94c605769c862e4ffd059e4059245f1a1402e4c2b0e7265797fefb5cfc67d3724c815acf6ef3a31d5eab52162a62a303ee5c WHIRLPOOL 50e1bf06c294391fbab85d0ba276730900e5758b0056a210438c785f387648921093f82dc25081aef09378098166b318600eedd8d1a551bc985f71e60bdd4d62
+DIST lv2-1.12.0.tar.bz2 399666 SHA256 7a4a53138f10ed997174c8bc5a8573d5f5a5d8441aaac2de6cf2178ff90658e9 SHA512 acc5e05eeeb5291fe5b64e30b5c00a6ef7136922fab7846efc05ccacdeff4d7714f705e632d5b3f6a5314cb3a7b847528fd717fc9ebb5d6f39653c53ac261f85 WHIRLPOOL 063b0c6b7d42f010bc6b6914902c00b7e79f534a2dd8100b88010460cee88bb61d10820f537fa035fb358e60ae760de2a66b32bd9de4b34cbda35ace229fdde6
+DIST lv2-1.8.0.tar.bz2 439609 SHA256 a4c90e8f4a8df58c2dd7bc3b9e1a0df94e3c1cc70c95a10da72a40a9deb9b3d7 SHA512 11c80a5c1f81dfa4e43b34859c77b41182f828a27a9f7e539a57320b193f1db6560ee88497051e0f5382bbe77fd496be359c346c5d2534e51c2bdb13737c1845 WHIRLPOOL 3edd51a7f77bf09ec6c0f7287122caee6c6274089fc3ffe804a08a69ba2c7b7177eb741a3cb8eabdd103d79df6de74e61acf363dd7c50043377c07beea4e7b7f
diff --git a/media-libs/lv2/lv2-1.10.0-r1.ebuild b/media-libs/lv2/lv2-1.10.0-r1.ebuild
new file mode 100644
index 000000000000..2e326379fc8c
--- /dev/null
+++ b/media-libs/lv2/lv2-1.10.0-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
+
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+PYTHON_REQ_USE='threads(+)'
+inherit python-single-r1 waf-utils
+
+DESCRIPTION="LV2 is a simple but extensible successor of LADSPA"
+HOMEPAGE="http://lv2plug.in/"
+SRC_URI="http://lv2plug.in/spec/${P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~ppc64 x86"
+IUSE="doc plugins"
+
+DEPEND="plugins? ( x11-libs/gtk+:2 media-libs/libsndfile )"
+RDEPEND="${DEPEND}
+ dev-python/lxml[${PYTHON_USEDEP}]
+ dev-python/pygments[${PYTHON_USEDEP}]
+ dev-python/rdflib[${PYTHON_USEDEP}]
+ !<media-libs/slv2-0.4.2
+ !media-libs/lv2core
+ !media-libs/lv2-ui"
+DEPEND="${DEPEND}
+ plugins? ( virtual/pkgconfig )
+ doc? ( app-doc/doxygen dev-python/rdflib )"
+DOCS=( "README" "NEWS" )
+
+src_configure() {
+ waf-utils_src_configure \
+ --docdir="${EPREFIX}"/usr/share/doc/${PF} \
+ $(use plugins || echo " --no-plugins") \
+ $(use doc && echo " --docs" )
+}
+
+src_install() {
+ waf-utils_src_install
+
+ python_fix_shebang "${D}"
+}
diff --git a/media-libs/lv2/lv2-1.10.0.ebuild b/media-libs/lv2/lv2-1.10.0.ebuild
new file mode 100644
index 000000000000..1db4e5ad4d58
--- /dev/null
+++ b/media-libs/lv2/lv2-1.10.0.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+PYTHON_REQ_USE='threads(+)'
+inherit python-single-r1 waf-utils
+
+DESCRIPTION="LV2 is a simple but extensible successor of LADSPA"
+HOMEPAGE="http://lv2plug.in/"
+SRC_URI="http://lv2plug.in/spec/${P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="doc plugins"
+
+DEPEND="plugins? ( x11-libs/gtk+:2 media-libs/libsndfile )"
+RDEPEND="${DEPEND}
+ dev-python/lxml[${PYTHON_USEDEP}]
+ dev-python/pygments[${PYTHON_USEDEP}]
+ dev-python/rdflib[${PYTHON_USEDEP}]
+ !<media-libs/slv2-0.4.2
+ !media-libs/lv2core
+ !media-libs/lv2-ui"
+DEPEND="${DEPEND}
+ plugins? ( virtual/pkgconfig )
+ doc? ( app-doc/doxygen dev-python/rdflib )"
+DOCS=( "README" "NEWS" )
+
+src_configure() {
+ waf-utils_src_configure \
+ --docdir="${EPREFIX}"/usr/share/doc/${PF} \
+ $(use plugins || echo " --no-plugins") \
+ $(use doc && echo " --docs" )
+}
+
+src_install() {
+ waf-utils_src_install
+
+ python_fix_shebang "${D}"
+}
diff --git a/media-libs/lv2/lv2-1.12.0.ebuild b/media-libs/lv2/lv2-1.12.0.ebuild
new file mode 100644
index 000000000000..bf3b5f2a9920
--- /dev/null
+++ b/media-libs/lv2/lv2-1.12.0.ebuild
@@ -0,0 +1,44 @@
+# 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 python-single-r1 waf-utils multilib
+
+DESCRIPTION="A simple but extensible successor of LADSPA"
+HOMEPAGE="http://lv2plug.in/"
+SRC_URI="http://lv2plug.in/spec/${P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE="doc plugins"
+
+DEPEND="plugins? ( x11-libs/gtk+:2 media-libs/libsndfile )"
+RDEPEND="${DEPEND}
+ dev-python/lxml[${PYTHON_USEDEP}]
+ dev-python/pygments[${PYTHON_USEDEP}]
+ dev-python/rdflib[${PYTHON_USEDEP}]
+ !<media-libs/slv2-0.4.2
+ !media-libs/lv2core
+ !media-libs/lv2-ui"
+DEPEND="${DEPEND}
+ plugins? ( virtual/pkgconfig )
+ doc? ( app-doc/doxygen dev-python/rdflib )"
+DOCS=( "README.md" "NEWS" )
+
+src_configure() {
+ waf-utils_src_configure \
+ --docdir="${EPREFIX}"/usr/share/doc/${PF} \
+ --lv2dir="${EPREFIX}"/usr/$(get_libdir)/lv2 \
+ $(use plugins || echo " --no-plugins") \
+ $(use doc && echo " --docs" )
+}
+
+src_install() {
+ waf-utils_src_install
+
+ python_fix_shebang "${D}"
+}
diff --git a/media-libs/lv2/lv2-1.8.0.ebuild b/media-libs/lv2/lv2-1.8.0.ebuild
new file mode 100644
index 000000000000..1db4e5ad4d58
--- /dev/null
+++ b/media-libs/lv2/lv2-1.8.0.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+PYTHON_REQ_USE='threads(+)'
+inherit python-single-r1 waf-utils
+
+DESCRIPTION="LV2 is a simple but extensible successor of LADSPA"
+HOMEPAGE="http://lv2plug.in/"
+SRC_URI="http://lv2plug.in/spec/${P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="doc plugins"
+
+DEPEND="plugins? ( x11-libs/gtk+:2 media-libs/libsndfile )"
+RDEPEND="${DEPEND}
+ dev-python/lxml[${PYTHON_USEDEP}]
+ dev-python/pygments[${PYTHON_USEDEP}]
+ dev-python/rdflib[${PYTHON_USEDEP}]
+ !<media-libs/slv2-0.4.2
+ !media-libs/lv2core
+ !media-libs/lv2-ui"
+DEPEND="${DEPEND}
+ plugins? ( virtual/pkgconfig )
+ doc? ( app-doc/doxygen dev-python/rdflib )"
+DOCS=( "README" "NEWS" )
+
+src_configure() {
+ waf-utils_src_configure \
+ --docdir="${EPREFIX}"/usr/share/doc/${PF} \
+ $(use plugins || echo " --no-plugins") \
+ $(use doc && echo " --docs" )
+}
+
+src_install() {
+ waf-utils_src_install
+
+ python_fix_shebang "${D}"
+}
diff --git a/media-libs/lv2/metadata.xml b/media-libs/lv2/metadata.xml
new file mode 100644
index 000000000000..17306fa7a5a8
--- /dev/null
+++ b/media-libs/lv2/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>proaudio</herd>
+ <use>
+ <flag name="plugins">Enables examples plugins.</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/lv2core/Manifest b/media-libs/lv2core/Manifest
new file mode 100644
index 000000000000..6cb05d7cc2f1
--- /dev/null
+++ b/media-libs/lv2core/Manifest
@@ -0,0 +1,3 @@
+DIST lv2core-3.0.tar.bz2 104167 SHA256 7b209b6d5f8a9a597dae0c76f077be19db0fd2f764e9970cfbf87f3406c50172
+DIST lv2core-4.0.tar.gz 129749 SHA256 a37c6b915c4f6ef8414f83ac356a1f802ab97badf3b58cd469ad9d1f7583d08f
+DIST lv2core-6.0.tar.bz2 106475 SHA256 b05429f1cade75ad559a72d65d78a927f9718e074e3aeb9698510403a4e52309 SHA512 3782459a3684a8cb1825ade13adfbd69d496adaeffca026dd47f0405e5d09f8a125726760506890595664cba3ec18ebaaaac681e08e73acbee9cb4377ad2db9c WHIRLPOOL e8a66ba2ad051230391e972a76935e00761afd9acc99ee2556fb6e7966780e8838025bbedda76a3b2c9d09649eab71b9125f9b9efcea03f106c0a31f38761ac2
diff --git a/media-libs/lv2core/lv2core-3.0.ebuild b/media-libs/lv2core/lv2core-3.0.ebuild
new file mode 100644
index 000000000000..4844896110f1
--- /dev/null
+++ b/media-libs/lv2core/lv2core-3.0.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit multilib toolchain-funcs
+
+DESCRIPTION="LV2 is a simple but extensible successor of LADSPA"
+HOMEPAGE="http://lv2plug.in/"
+SRC_URI="http://lv2plug.in/spec/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1 MIT"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="!<media-libs/slv2-0.4.2"
+
+src_configure() {
+ tc-export CC CXX CPP AR RANLIB
+ ./waf configure --prefix=/usr --libdir=/usr/$(get_libdir)/ || die "failed to configure"
+}
+
+src_compile() {
+ ./waf || die "failed to build"
+}
+
+src_install() {
+ ./waf --destdir="${D}" install || die "install failed"
+ dodoc AUTHORS README ChangeLog
+}
diff --git a/media-libs/lv2core/lv2core-4.0.ebuild b/media-libs/lv2core/lv2core-4.0.ebuild
new file mode 100644
index 000000000000..6fc121b29666
--- /dev/null
+++ b/media-libs/lv2core/lv2core-4.0.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit multilib toolchain-funcs
+
+DESCRIPTION="LV2 is a simple but extensible successor of LADSPA"
+HOMEPAGE="http://lv2plug.in/"
+SRC_URI="http://lv2plug.in/spec/${P}.tar.gz"
+
+LICENSE="LGPL-2.1 MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="!<media-libs/slv2-0.4.2"
+
+src_configure() {
+ tc-export CC CXX CPP AR RANLIB
+ ./waf configure --prefix=/usr --libdir=/usr/$(get_libdir) || die "failed to configure"
+}
+
+src_compile() {
+ ./waf || die "failed to build"
+}
+
+src_install() {
+ ./waf --destdir="${D}" install || die "install failed"
+ dodoc AUTHORS README ChangeLog
+}
diff --git a/media-libs/lv2core/lv2core-6.0.ebuild b/media-libs/lv2core/lv2core-6.0.ebuild
new file mode 100644
index 000000000000..b2d6ffa8df80
--- /dev/null
+++ b/media-libs/lv2core/lv2core-6.0.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+PYTHON_REQ_USE='threads(+)'
+
+inherit python-any-r1 waf-utils
+
+DESCRIPTION="LV2 is a simple but extensible successor of LADSPA"
+HOMEPAGE="http://lv2plug.in/"
+SRC_URI="http://lv2plug.in/spec/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1 MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+DEPEND="${PYTHON_DEPS}"
+RDEPEND="!<media-libs/slv2-0.4.2"
+DOCS=( "AUTHORS" "README" "NEWS" )
diff --git a/media-libs/lv2core/metadata.xml b/media-libs/lv2core/metadata.xml
new file mode 100644
index 000000000000..0dc3775f83d7
--- /dev/null
+++ b/media-libs/lv2core/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>proaudio</herd>
+</pkgmetadata>
diff --git a/media-libs/lvtk/Manifest b/media-libs/lvtk/Manifest
new file mode 100644
index 000000000000..4dbf21936fd5
--- /dev/null
+++ b/media-libs/lvtk/Manifest
@@ -0,0 +1 @@
+DIST lvtk-1.2.0.tar.gz 201146 SHA256 4dda4c26a16fc3f216ff77f5bb308f05667640e54fc80f0ae4984e869990cb0e SHA512 f193ec28103cb2f6353ff0f96f8790041baf1ae99472c5d04017c23b42d0179b1f5e1de6722e17080410311d0e7e1de4ca0ae9ab76fb3bf8a02d9dc1451d8db7 WHIRLPOOL c7a70d033a2a02b02f890cc68789b376e7e4e53231290dbaa5bb85abf0d3b53cb64afe352bab6d71ddcd77a5f4d002073564ebc398d6f35d7cc75bc1b49728e2
diff --git a/media-libs/lvtk/lvtk-1.2.0.ebuild b/media-libs/lvtk/lvtk-1.2.0.ebuild
new file mode 100644
index 000000000000..b5a3bb13143f
--- /dev/null
+++ b/media-libs/lvtk/lvtk-1.2.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
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="threads(+)"
+inherit python-single-r1 waf-utils
+
+DESCRIPTION="A set of C++ wrappers around the LV2 C API"
+HOMEPAGE="http://lvtoolkit.org/"
+SRC_URI="https://github.com/lvtk/lvtk/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc examples +gtk2 +tools"
+
+RDEPEND="media-libs/lv2
+ >=dev-libs/boost-1.40.0
+ gtk2? ( dev-cpp/gtkmm:2.4 )"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ doc? ( app-doc/doxygen
+ media-gfx/graphviz )
+ virtual/pkgconfig"
+
+DOCS=( AUTHORS ChangeLog README )
+
+src_configure() {
+ local mywafconfargs=(
+ "--docdir=${EPREFIX}/usr/share/doc/${PF}"
+ "--lv2dir=${EPREFIX}/usr/$(get_libdir)/lv2"
+ )
+ use debug && mywafconfargs+=( "--debug" )
+ use doc && mywafconfargs+=( "--docs" )
+ use examples || mywafconfargs+=( "--disable-examples" )
+ use tools || mywafconfargs+=( "--disable-tools" )
+ use gtk2 || mywafconfargs+=( "--disable-ui" )
+ waf-utils_src_configure ${mywafconfargs[@]}
+}
+
+src_install() {
+ waf-utils_src_install
+
+ # It does not respect docdir properly, reported upstream
+ if use doc; then
+ mv "${ED}/usr/share/doc/${PF}/lvtk-1.0/html" "${ED}/usr/share/doc/${PF}/html"
+ rmdir "${ED}/usr/share/doc/${PF}/lvtk-1.0"
+ fi
+}
diff --git a/media-libs/lvtk/metadata.xml b/media-libs/lvtk/metadata.xml
new file mode 100644
index 000000000000..5a7d94e97b70
--- /dev/null
+++ b/media-libs/lvtk/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>proaudio</herd>
+ <use>
+ <flag name="gtk2">Enable <pkg>x11-libs/gtk+:2</pkg> based GUI support</flag>
+ <flag name="tools">Compile and install ttl2c tool</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">lvtk/lvtk</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/mash/Manifest b/media-libs/mash/Manifest
new file mode 100644
index 000000000000..c193e2f15cef
--- /dev/null
+++ b/media-libs/mash/Manifest
@@ -0,0 +1 @@
+DIST mash-0.2.0.tar.xz 288844 SHA256 fd4089e2974a1a57f9ba209a0a47924ed157da9fc9a3d65f68a6b9fdca353ccc
diff --git a/media-libs/mash/mash-0.2.0-r1.ebuild b/media-libs/mash/mash-0.2.0-r1.ebuild
new file mode 100644
index 000000000000..9a0b6e368599
--- /dev/null
+++ b/media-libs/mash/mash-0.2.0-r1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+GCONF_DEBUG="no"
+GNOME2_LA_PUNT="yes"
+
+# clutter.eclass does not support .xz tarballs
+inherit gnome2 versionator
+RV=($(get_version_components))
+SRC_URI="http://source.clutter-project.org/sources/${PN}/${RV[0]}.${RV[1]}/${P}.tar.xz"
+
+DESCRIPTION="A library for rendering 3D models with Clutter"
+HOMEPAGE="http://wiki.clutter-project.org/wiki/Mash"
+
+LICENSE="LGPL-2.1"
+SLOT="0.2"
+IUSE="doc examples +introspection"
+KEYWORDS="~alpha amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc x86"
+
+# Automagically detects x11-libs/mx, but only uses it for building examples.
+# Note: mash is using a bundled copy of rply because mash developers have
+# modified its API by adding extra arguments to various functions.
+RDEPEND=">=dev-libs/glib-2.16:2
+ >=media-libs/clutter-1.5.10:1.0[introspection?]
+ virtual/opengl
+
+ introspection? ( >=dev-libs/gobject-introspection-0.6.1 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( >=dev-util/gtk-doc-1.14 )"
+
+pkg_setup() {
+ DOCS="AUTHORS NEWS README"
+ G2CONF="${G2CONF}
+ --disable-static
+ $(use_enable introspection)"
+}
+
+src_install() {
+ gnome2_src_install
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins example/{*.c,*.ply}
+ fi
+}
diff --git a/media-libs/mash/metadata.xml b/media-libs/mash/metadata.xml
new file mode 100644
index 000000000000..b4df7ab52805
--- /dev/null
+++ b/media-libs/mash/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>gnome</herd>
+<use>
+ <flag name="introspection">Use <pkg>dev-libs/gobject-introspection</pkg>
+ for introspection</flag>
+</use>
+</pkgmetadata>
diff --git a/media-libs/mediastreamer/Manifest b/media-libs/mediastreamer/Manifest
new file mode 100644
index 000000000000..9d6af71e067a
--- /dev/null
+++ b/media-libs/mediastreamer/Manifest
@@ -0,0 +1,3 @@
+DIST mediastreamer-2.7.3.tar.gz 758146 SHA256 c3cbea285f1e85259b2ac06d3f1730b4258e280011598b91f5b90b8432bf1dc0 SHA512 f9ebfa12b1c760b5c24b5496466d92148a170ee2d522d9085db3fb72cc93f8e3e71ba1ae14f57d94a33b752450555c7d3ebf59267447203861247a8685e18259 WHIRLPOOL c1528bcca27c979ac29d6ccb6e32eac53ddd9e69d3f034056ad579d5ff6cd295c9224db6b841d6aa708e2c60251b192e85d6843342c14f8ead75d9f137c8d818
+DIST mediastreamer-2.8.2.tar.gz 882966 SHA256 a62ebb008913db6e03e27bd1ec30bb560ae4219da5255c0e91853b5e894a4f33 SHA512 2041d9fbba0f831aea6bdd3259b21742a37cfdbdf473b0bc4f20bd730371395ddf2866804ae496e9864adf5fcd0d24e03193d5d8feadd54e6ff0b3adda01ff60 WHIRLPOOL cecd47766dff3df76271b3209f7f967a00165861283c34633361a07bf8a416e63d5c5c6dd364a1558f1f865803eaf4a1888bd3bcf42cb0e159b12107045b61ab
+DIST mediastreamer-2.9.0.tar.gz 3578877 SHA256 c245b9444c2abb4c84433606e01f0b3ce29ce78de0afe1e191f4f3c62656acd5 SHA512 8c31ab07c659dce84c410dfb5814b6cdf3defcd4055814922f58e2886bfeecfd5bab294c408858a29e72fcf53f35a1f7748113e1f2863baa329daedae07ef2f0 WHIRLPOOL 9e425ff2e461ceb6dae3890e6bd8035de65f5b3fd0590e01b75259c0d27dd54cfd37cb88d43752c2903c954ac44e353e4ed63588d3f08ec690da77293a31ba68
diff --git a/media-libs/mediastreamer/files/mediastreamer-2.7.3-ffmpeg-0.11.patch b/media-libs/mediastreamer/files/mediastreamer-2.7.3-ffmpeg-0.11.patch
new file mode 100644
index 000000000000..c242b5fe139c
--- /dev/null
+++ b/media-libs/mediastreamer/files/mediastreamer-2.7.3-ffmpeg-0.11.patch
@@ -0,0 +1,94 @@
+Fix build with recent ffmpeg releases.
+https://bugs.gentoo.org/show_bug.cgi?id=419453
+
+Index: mediastreamer-2.7.3/src/videoenc.c
+===================================================================
+--- mediastreamer-2.7.3.orig/src/videoenc.c
++++ mediastreamer-2.7.3/src/videoenc.c
+@@ -53,7 +53,6 @@ void ms_ffmpeg_log_callback(void* ptr, i
+
+ void ms_ffmpeg_check_init(){
+ if(!avcodec_initialized){
+- avcodec_init();
+ avcodec_register_all();
+ avcodec_initialized=TRUE;
+ #ifdef ENABLE_LOG_FFMPEG
+@@ -107,6 +106,7 @@ typedef struct EncState{
+ uint32_t framenum;
+ VideoStarter starter;
+ bool_t req_vfu;
++ AVDictionary * ff_opts;
+ }EncState;
+
+ static int enc_set_fps(MSFilter *f, void *arg){
+@@ -214,6 +214,7 @@ static void enc_init(MSFilter *f, enum C
+ s->req_vfu=FALSE;
+ s->framenum=0;
+ s->av_context.codec=NULL;
++ s->ff_opts = NULL;
+ }
+
+ static void enc_h263_init(MSFilter *f){
+@@ -300,9 +301,9 @@ static void prepare_h263(EncState *s){
+ if (s->profile==0){
+ s->codec=CODEC_ID_H263;
+ }else{
+- c->flags|=CODEC_FLAG_H263P_UMV;
++ av_dict_set(&(s->ff_opts), "umv", "1", 0);
+ c->flags|=CODEC_FLAG_AC_PRED;
+- c->flags|=CODEC_FLAG_H263P_SLICE_STRUCT;
++ av_dict_set(&(s->ff_opts), "structured_slices", "1", 0);
+ /*
+ c->flags|=CODEC_FLAG_OBMC;
+ c->flags|=CODEC_FLAG_AC_PRED;
+@@ -342,9 +343,9 @@ static void enc_preprocess(MSFilter *f){
+ ms_error("could not find encoder for codec id %i",s->codec);
+ return;
+ }
+- error=avcodec_open(&s->av_context, s->av_codec);
++ error=avcodec_open2(&s->av_context, s->av_codec, &(s->ff_opts));
+ if (error!=0) {
+- ms_error("avcodec_open() failed: %i",error);
++ ms_error("avcodec_open2() failed: %i",error);
+ return;
+ }
+ video_starter_init(&s->starter);
+@@ -372,7 +373,7 @@ static void add_rfc2190_header(mblk_t **
+ // assume video size is CIF or QCIF
+ if (context->width == 352 && context->height == 288) header->b_wptr[1] = 0x60;
+ else header->b_wptr[1] = 0x40;
+- if (context->coded_frame->pict_type != FF_I_TYPE) header->b_wptr[1] |= 0x10;
++ if (context->coded_frame->pict_type != AV_PICTURE_TYPE_I) header->b_wptr[1] |= 0x10;
+ header->b_wptr += 4;
+ header->b_cont = *packet;
+ *packet = header;
+@@ -779,7 +780,7 @@ static void process_frame(MSFilter *f, m
+ s->req_vfu=TRUE;
+ }
+ if (s->req_vfu){
+- pict.pict_type=FF_I_TYPE;
++ pict.pict_type=AV_PICTURE_TYPE_I;
+ s->req_vfu=FALSE;
+ }
+ comp_buf->b_rptr=comp_buf->b_wptr=comp_buf->b_datap->db_base;
+@@ -799,7 +800,7 @@ static void process_frame(MSFilter *f, m
+ if (s->framenum==1){
+ video_starter_first_frame (&s->starter,f->ticker->time);
+ }
+- if (c->coded_frame->pict_type==FF_I_TYPE){
++ if (c->coded_frame->pict_type==AV_PICTURE_TYPE_I){
+ ms_message("Emitting I-frame");
+ }
+ comp_buf->b_wptr+=error;
+Index: mediastreamer-2.7.3/src/h264dec.c
+===================================================================
+--- mediastreamer-2.7.3.orig/src/h264dec.c
++++ mediastreamer-2.7.3/src/h264dec.c
+@@ -46,7 +46,6 @@ typedef struct _DecData{
+ static void ffmpeg_init(){
+ static bool_t done=FALSE;
+ if (!done){
+- avcodec_init();
+ avcodec_register_all();
+ done=TRUE;
+ }
diff --git a/media-libs/mediastreamer/files/mediastreamer-2.7.3-sdl-build.patch b/media-libs/mediastreamer/files/mediastreamer-2.7.3-sdl-build.patch
new file mode 100644
index 000000000000..2f7207e27ab0
--- /dev/null
+++ b/media-libs/mediastreamer/files/mediastreamer-2.7.3-sdl-build.patch
@@ -0,0 +1,220 @@
+commit c0ae6c3f9f78ae9e9e4c7030e7054dc5c0267e2c
+Author: Simon Morlat <simon.morlat@linphone.org>
+Date: Mon Apr 11 22:46:37 2011 +0200
+
+ fix SDL output that wasn't compiling anymore and bugfix videodisplay test program
+
+diff --git a/src/msfilter.c b/src/msfilter.c
+index d8d84f3..4b84b8b 100644
+--- a/src/msfilter.c
++++ b/src/msfilter.c
+@@ -169,9 +169,7 @@ int ms_filter_link(MSFilter *f1, int pin1, MSFilter *f2, int pin2){
+
+ int ms_filter_unlink(MSFilter *f1, int pin1, MSFilter *f2, int pin2){
+ MSQueue *q;
+- ms_return_val_if_fail(f1, -1);
+- ms_return_val_if_fail(f2, -1);
+- ms_message("ms_filter_unlink: %s:%p,%i-->%s:%p,%i",f1->desc->name,f1,pin1,f2->desc->name,f2,pin2);
++ ms_message("ms_filter_unlink: %s:%p,%i-->%s:%p,%i",f1 ? f1->desc->name : "!NULL!",f1,pin1,f2 ? f2->desc->name : "!NULL!",f2,pin2);
+ ms_return_val_if_fail(pin1<f1->desc->noutputs, -1);
+ ms_return_val_if_fail(pin2<f2->desc->ninputs, -1);
+ ms_return_val_if_fail(f1->outputs[pin1]!=NULL,-1);
+diff --git a/src/videoout.c b/src/videoout.c
+index ca36b0f..5bdc6dd 100644
+--- a/src/videoout.c
++++ b/src/videoout.c
+@@ -114,8 +114,6 @@ void ms_display_destroy(MSDisplay *d);
+ }
+ #endif
+
+-#include "ffmpeg-priv.h"
+-
+ #define SCALE_FACTOR 4.0f
+ #define SELVIEW_POS_INACTIVE -100.0
+
+@@ -462,7 +460,7 @@ void ms_display_desc_set_default_window_id(MSDisplayDesc *desc, long id){
+
+ typedef struct VideoOut
+ {
+- AVRational ratio;
++ struct Rational {int num; int den;} ratio;
+ MSPicture fbuf;
+ MSPicture fbuf_selfview;
+ MSPicture local_pic;
+@@ -474,8 +472,8 @@ typedef struct VideoOut
+ float sv_posx,sv_posy;
+ int background_color[3];
+
+- struct ms_SwsContext *sws1;
+- struct ms_SwsContext *sws2;
++ MSScalerContext *sws1;
++ MSScalerContext *sws2;
+ MSDisplay *display;
+ bool_t own_display;
+ bool_t ready;
+@@ -552,11 +550,11 @@ static void video_out_uninit(MSFilter *f){
+ if (obj->display!=NULL && obj->own_display)
+ ms_display_destroy(obj->display);
+ if (obj->sws1!=NULL){
+- ms_sws_freeContext(obj->sws1);
++ ms_scaler_context_free(obj->sws1);
+ obj->sws1=NULL;
+ }
+ if (obj->sws2!=NULL){
+- ms_sws_freeContext(obj->sws2);
++ ms_scaler_context_free(obj->sws2);
+ obj->sws2=NULL;
+ }
+ if (obj->local_msg!=NULL) {
+@@ -581,11 +579,11 @@ static void video_out_prepare(MSFilter *f){
+ obj->display=NULL;
+ }
+ if (obj->sws1!=NULL){
+- ms_sws_freeContext(obj->sws1);
++ ms_scaler_context_free(obj->sws1);
+ obj->sws1=NULL;
+ }
+ if (obj->sws2!=NULL){
+- ms_sws_freeContext(obj->sws2);
++ ms_scaler_context_free(obj->sws2);
+ obj->sws2=NULL;
+ }
+ if (obj->local_msg!=NULL) {
+@@ -665,13 +663,12 @@ static void video_out_process(MSFilter *f){
+ if (ms_yuv_buf_init_from_mblk(&src,inm)==0){
+
+ if (obj->sws2==NULL){
+- obj->sws2=ms_sws_getContext(src.w,src.h,PIX_FMT_YUV420P,
+- obj->fbuf_selfview.w,obj->fbuf_selfview.h,PIX_FMT_YUV420P,
+- SWS_FAST_BILINEAR, NULL, NULL, NULL);
++ obj->sws2=ms_scaler_create_context(src.w,src.h,MS_YUV420P,
++ obj->fbuf_selfview.w,obj->fbuf_selfview.h,MS_YUV420P,
++ MS_SCALER_METHOD_BILINEAR);
+ }
+ ms_display_lock(obj->display);
+- if (ms_sws_scale(obj->sws2,src.planes,src.strides, 0,
+- src.h, obj->fbuf_selfview.planes, obj->fbuf_selfview.strides)<0){
++ if (ms_scaler_process(obj->sws2,src.planes,src.strides,obj->fbuf_selfview.planes, obj->fbuf_selfview.strides)<0){
+ ms_error("Error in ms_sws_scale().");
+ }
+ if (!mblk_get_precious_flag(inm)) ms_yuv_buf_mirror(&obj->fbuf_selfview);
+@@ -683,9 +680,9 @@ static void video_out_process(MSFilter *f){
+ if (ms_yuv_buf_init_from_mblk(&src,inm)==0){
+
+ if (obj->sws2==NULL){
+- obj->sws2=ms_sws_getContext(src.w,src.h,PIX_FMT_YUV420P,
+- obj->local_pic.w,obj->local_pic.h,PIX_FMT_YUV420P,
+- SWS_FAST_BILINEAR, NULL, NULL, NULL);
++ obj->sws2=ms_scaler_create_context(src.w,src.h,MS_YUV420P,
++ obj->local_pic.w,obj->local_pic.h,MS_YUV420P,
++ MS_SCALER_METHOD_BILINEAR);
+ }
+ if (obj->local_msg==NULL){
+ obj->local_msg=ms_yuv_buf_alloc(&obj->local_pic,
+@@ -693,8 +690,7 @@ static void video_out_process(MSFilter *f){
+ }
+ if (obj->local_pic.planes[0]!=NULL)
+ {
+- if (ms_sws_scale(obj->sws2,src.planes,src.strides, 0,
+- src.h, obj->local_pic.planes, obj->local_pic.strides)<0){
++ if (ms_scaler_process(obj->sws2,src.planes,src.strides,obj->local_pic.planes, obj->local_pic.strides)<0){
+ ms_error("Error in ms_sws_scale().");
+ }
+ if (!mblk_get_precious_flag(inm)) ms_yuv_buf_mirror(&obj->local_pic);
+@@ -731,13 +727,12 @@ static void video_out_process(MSFilter *f){
+ }
+ }
+ if (obj->sws1==NULL){
+- obj->sws1=ms_sws_getContext(src.w,src.h,PIX_FMT_YUV420P,
+- obj->fbuf.w,obj->fbuf.h,PIX_FMT_YUV420P,
+- SWS_FAST_BILINEAR, NULL, NULL, NULL);
++ obj->sws1=ms_scaler_create_context(src.w,src.h,MS_YUV420P,
++ obj->fbuf.w,obj->fbuf.h,MS_YUV420P,
++ MS_SCALER_METHOD_BILINEAR);
+ }
+ ms_display_lock(obj->display);
+- if (ms_sws_scale(obj->sws1,src.planes,src.strides, 0,
+- src.h, obj->fbuf.planes, obj->fbuf.strides)<0){
++ if (ms_scaler_process(obj->sws1,src.planes,src.strides,obj->fbuf.planes, obj->fbuf.strides)<0){
+ ms_error("Error in ms_sws_scale().");
+ }
+ if (obj->mirror && !mblk_get_precious_flag(inm)) ms_yuv_buf_mirror(&obj->fbuf);
+@@ -943,3 +938,4 @@ MSFilterDesc ms_video_out_desc={
+
+
+ MS_FILTER_DESC_EXPORT(ms_video_out_desc)
++
+diff --git a/tests/videodisplay.c b/tests/videodisplay.c
+index 76f67a5..0828c6a 100644
+--- a/tests/videodisplay.c
++++ b/tests/videodisplay.c
+@@ -52,6 +52,7 @@ int main(int argc, char *argv[]){
+ for(i=0;i<1;++i){
+ int n;
+ vs=video_preview_new();
++ /*video_preview_set_display_filter_name(vs,"MSVideoOut");*/
+ video_preview_set_size(vs,vsize);
+ video_preview_start(vs, cam);
+
+@@ -79,11 +80,11 @@ int main(int argc, char *argv[]){
+
+ vs->tee = ms_filter_new(MS_TEE_ID);
+
+- ms_filter_unlink(vs->pixconv,0, vs->output,0);
++ ms_filter_unlink(vs->pixconv,0, vs->output2,0);
+
+ ms_filter_link(vs->pixconv,0,vs->tee,0);
+- ms_filter_link(vs->tee,0,vs->output,0);
+- ms_filter_link(vs->tee,1,vs->output,1);
++ ms_filter_link(vs->tee,0,vs->output2,0);
++ ms_filter_link(vs->tee,1,vs->output2,1);
+
+ //ms_filter_unlink(vs->tee,0,vs->output,0);
+ ms_ticker_attach (vs->ticker, vs->source);
+@@ -92,34 +93,34 @@ int main(int argc, char *argv[]){
+ if (n==500)
+ {
+ int corner=1;
+- ms_filter_call_method(vs->output,MS_VIDEO_DISPLAY_SET_LOCAL_VIEW_MODE,&corner);
++ ms_filter_call_method(vs->output2,MS_VIDEO_DISPLAY_SET_LOCAL_VIEW_MODE,&corner);
+ }
+ if (n==600)
+ {
+ int corner=2;
+- ms_filter_call_method(vs->output,MS_VIDEO_DISPLAY_SET_LOCAL_VIEW_MODE,&corner);
++ ms_filter_call_method(vs->output2,MS_VIDEO_DISPLAY_SET_LOCAL_VIEW_MODE,&corner);
+ }
+ if (n==700)
+ {
+ int corner=3;
+- ms_filter_call_method(vs->output,MS_VIDEO_DISPLAY_SET_LOCAL_VIEW_MODE,&corner);
++ ms_filter_call_method(vs->output2,MS_VIDEO_DISPLAY_SET_LOCAL_VIEW_MODE,&corner);
+ }
+ if (n==800)
+ {
+ int corner=-1;
+- ms_filter_call_method(vs->output,MS_VIDEO_DISPLAY_SET_LOCAL_VIEW_MODE,&corner);
++ ms_filter_call_method(vs->output2,MS_VIDEO_DISPLAY_SET_LOCAL_VIEW_MODE,&corner);
+ }
+ if (n==900)
+ {
+ ms_ticker_detach (vs->ticker, vs->source);
+
+ ms_filter_unlink(vs->pixconv,0,vs->tee,0);
+- ms_filter_unlink(vs->tee,0,vs->output,0);
+- ms_filter_unlink(vs->tee,1,vs->output,1);
++ ms_filter_unlink(vs->tee,0,vs->output2,0);
++ ms_filter_unlink(vs->tee,1,vs->output2,1);
+ ms_filter_destroy(vs->tee);
+ vs->tee=NULL;
+
+- ms_filter_link(vs->pixconv,0, vs->output,0);
++ ms_filter_link(vs->pixconv,0, vs->output2,0);
+
+
+ ms_ticker_attach (vs->ticker, vs->source);
+@@ -129,3 +130,4 @@ int main(int argc, char *argv[]){
+ }
+ return 0;
+ }
++
diff --git a/media-libs/mediastreamer/files/mediastreamer-2.7.3-v4l-automagic.patch b/media-libs/mediastreamer/files/mediastreamer-2.7.3-v4l-automagic.patch
new file mode 100644
index 000000000000..d103a07fd9af
--- /dev/null
+++ b/media-libs/mediastreamer/files/mediastreamer-2.7.3-v4l-automagic.patch
@@ -0,0 +1,40 @@
+=== modified file 'configure.ac'
+--- configure.ac 2011-04-09 08:17:33 +0000
++++ configure.ac 2011-04-09 08:31:18 +0000
+@@ -590,6 +590,15 @@
+ AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${package_prefix}/share" ,[path of data])
+ AC_SUBST(PACKAGE_DATA_DIR)
+
++AC_ARG_ENABLE(v4l,
++ [ --disable-v4l Disable usage of v4l],
++ [case "${enableval}" in
++ yes) v4l=yes ;;
++ no) v4l=no ;;
++ *) AC_MSG_ERROR(bad value ${enableval} for --disable-v4l) ;;
++ esac],[v4l=yes])
++
++if test "$v4l" = "yes" ; then
+ dnl check for video4linux headers
+ AC_CHECK_HEADERS(linux/videodev.h linux/videodev2.h)
+ if test "${ac_cv_header_linux_videodev_h}" = "yes" || \
+@@ -599,8 +608,6 @@
+ found_v4l=no
+ fi
+
+-AM_CONDITIONAL(BUILD_V4L, test x$found_v4l = xyes )
+-
+ AC_ARG_ENABLE(libv4l,
+ [ --disable-libv4l Disable usage of libv4l, really discouraged],
+ [case "${enableval}" in
+@@ -632,6 +639,10 @@
+ ])
+ fi
+ fi
++fi
++
++AM_CONDITIONAL(BUILD_V4L, test x$found_v4l = xyes )
++
+
+ dnl ##################################################
+ dnl # Check for doxygen
+
diff --git a/media-libs/mediastreamer/files/mediastreamer-2.7.3-videoenc_282.patch b/media-libs/mediastreamer/files/mediastreamer-2.7.3-videoenc_282.patch
new file mode 100644
index 000000000000..66d055ede084
--- /dev/null
+++ b/media-libs/mediastreamer/files/mediastreamer-2.7.3-videoenc_282.patch
@@ -0,0 +1,130 @@
+Update videoenc.c to the 2.8.2 version. Fixes some but not all problems with
+ffmpeg.
+
+
+--- mediastreamer-2.7.3/src/videoenc.c 2010-12-17 05:59:50.000000000 -0300
++++ mediastreamer-2.8.2/src/videoenc.c 2012-02-17 06:16:20.000000000 -0300
+@@ -164,6 +164,7 @@
+ }else{
+ ms_warning("unsupported video size %s",tmp);
+ ret=FALSE;
++ goto end;
+ }
+ divider=atoi(equal+1);
+ if (divider!=0){
+@@ -174,6 +175,8 @@
+ ret=FALSE;
+ }
+ }else ret=FALSE;
++
++end:
+ ms_free(tmp);
+ return ret;
+ }
+@@ -231,11 +234,7 @@
+
+ static void prepare(EncState *s){
+ AVCodecContext *c=&s->av_context;
+-#ifdef ANDROID
+ const int max_br_vbv=128000;
+-#else
+- const int max_br_vbv=256000;
+-#endif
+
+ avcodec_get_context_defaults(c);
+ if (s->codec==CODEC_ID_MJPEG)
+@@ -315,13 +314,6 @@
+ static void prepare_mpeg4(EncState *s){
+ AVCodecContext *c=&s->av_context;
+ c->max_b_frames=0; /*don't use b frames*/
+- c->flags|=CODEC_FLAG_AC_PRED;
+- c->flags|=CODEC_FLAG_H263P_UMV;
+- /*c->flags|=CODEC_FLAG_QPEL;*/ /*don't enable this one: this forces profile_level to advanced simple profile */
+- c->flags|=CODEC_FLAG_4MV;
+- c->flags|=CODEC_FLAG_GMC;
+- c->flags|=CODEC_FLAG_LOOP_FILTER;
+- c->flags|=CODEC_FLAG_H263P_SLICE_STRUCT;
+ }
+
+ static void enc_uninit(MSFilter *f){
+@@ -681,7 +673,7 @@
+ uint8_t *pbuf_ptr=full_frame->b_rptr;
+ uint8_t *buf_end=full_frame->b_wptr;
+
+- ms_message("image size: %i)", buf_end-pbuf_ptr);
++ ms_message("image size: %li)", (long)(buf_end-pbuf_ptr));
+
+ *lqt=NULL;
+ *cqt=NULL;
+@@ -689,7 +681,7 @@
+ err = find_marker(&pbuf_ptr, buf_end);
+ while (err!=-1)
+ {
+- ms_message("marker found: %x (offset from beginning%i)", err, pbuf_ptr-full_frame->b_rptr);
++ ms_message("marker found: %x (offset from beginning %li)", err, (long)(pbuf_ptr-full_frame->b_rptr));
+ if (err==0xdb)
+ {
+ /* copy DQT table */
+@@ -772,10 +764,12 @@
+ int error;
+ mblk_t *comp_buf=s->comp_buf;
+ int comp_buf_sz=comp_buf->b_datap->db_lim-comp_buf->b_datap->db_base;
++ YuvBuf yuv;
+
++ ms_yuv_buf_init_from_mblk(&yuv, inm);
+ /* convert image if necessary */
+ avcodec_get_frame_defaults(&pict);
+- avpicture_fill((AVPicture*)&pict,(uint8_t*)inm->b_rptr,c->pix_fmt,c->width,c->height);
++ avpicture_fill((AVPicture*)&pict,yuv.planes[0],c->pix_fmt,c->width,c->height);
+
+ /* timestamp used by ffmpeg, unset here */
+ pict.pts=AV_NOPTS_VALUE;
+@@ -796,7 +790,9 @@
+ comp_buf->b_wptr+=4;
+ comp_buf_sz-=4;
+ }
++
+ error=avcodec_encode_video(c, (uint8_t*)comp_buf->b_wptr,comp_buf_sz, &pict);
++
+ if (error<=0) ms_warning("ms_AVencoder_process: error %i.",error);
+ else{
+ s->framenum++;
+@@ -837,6 +833,14 @@
+ EncState *s=(EncState*)f->data;
+ bool_t snow=s->codec==CODEC_ID_SNOW;
+ s->maxbr=*(int*)arg;
++ if (s->av_context.codec!=NULL){
++ /*when we are processing, apply new settings immediately*/
++ ms_filter_lock(f);
++ enc_postprocess(f);
++ enc_preprocess(f);
++ ms_filter_unlock(f);
++ return 0;
++ }
+ if (s->maxbr>=1024000 && s->codec!=CODEC_ID_H263P){
+ s->vsize.width = MS_VIDEO_SIZE_SVGA_W;
+ s->vsize.height = MS_VIDEO_SIZE_SVGA_H;
+@@ -854,7 +858,7 @@
+ s->vsize.height=MS_VIDEO_SIZE_CIF_H;
+ s->fps=17;
+ s->qmin=3;
+- }else if (s->maxbr>=170000){
++ }else if (s->maxbr>=170000 && s->codec!=CODEC_ID_H263P && s->codec!=CODEC_ID_H263){
+ s->vsize.width=MS_VIDEO_SIZE_QVGA_W;
+ s->vsize.height=MS_VIDEO_SIZE_QVGA_H;
+ s->fps=15;
+@@ -875,14 +879,6 @@
+ s->fps=5;
+ s->qmin=5;
+ }
+-
+- if (s->av_context.codec!=NULL){
+- /*apply new settings dynamically*/
+- ms_filter_lock(f);
+- enc_postprocess(f);
+- enc_preprocess(f);
+- ms_filter_unlock(f);
+- }
+ return 0;
+ }
+
diff --git a/media-libs/mediastreamer/files/mediastreamer-2.8.2-autopoint.patch b/media-libs/mediastreamer/files/mediastreamer-2.8.2-autopoint.patch
new file mode 100644
index 000000000000..5704234af060
--- /dev/null
+++ b/media-libs/mediastreamer/files/mediastreamer-2.8.2-autopoint.patch
@@ -0,0 +1,17 @@
+--- mediastreamer-2.8.2/configure.ac.orig 2012-06-01 16:31:34.000000000 +0400
++++ mediastreamer-2.8.2/configure.ac 2012-06-01 16:36:08.586809086 +0400
+@@ -191,13 +191,13 @@
+ if test "$mingw_found" != "yes" ; then
+ dnl gettext macro does not work properly under mingw. And we want to use the one provided by GTK.
+ AM_GNU_GETTEXT([external])
+- AM_GNU_GETTEXT_VERSION([0.18])
+ LIBS="$LIBS $LIBINTL"
+ else
+ AC_DEFINE(ENABLE_NLS,1,[Tells whether localisation is possible])
+ AC_DEFINE(HAVE_GETTEXT,1,[Tells wheter localisation is possible])
+ LIBS="$LIBS -lintl"
+ fi
++AM_GNU_GETTEXT_VERSION([0.18])
+
+ AM_CONDITIONAL(BUILD_MACOSX, test x$macosx_found = xyes)
+ AM_CONDITIONAL(BUILD_IOS, test x$ios_found = xyes)
diff --git a/media-libs/mediastreamer/files/mediastreamer-2.8.2-ffmpeg-1.0.patch b/media-libs/mediastreamer/files/mediastreamer-2.8.2-ffmpeg-1.0.patch
new file mode 100644
index 000000000000..293e6e78dcab
--- /dev/null
+++ b/media-libs/mediastreamer/files/mediastreamer-2.8.2-ffmpeg-1.0.patch
@@ -0,0 +1,59 @@
+https://bugs.gentoo.org/show_bug.cgi?id=445168
+
+commit f586917ea4d66f9ba8910f0967a8830e54d50784
+Author: Yann Diorcet <yann.diorcet@belledonne-communications.com>
+Date: Tue Jun 5 11:07:48 2012 +0200
+
+ Fixes for new versions of ffmpeg
+
+diff --git a/src/h264dec.c b/src/h264dec.c
+index c4a84ee..5229b5e 100644
+--- a/src/h264dec.c
++++ b/src/h264dec.c
+@@ -45,7 +45,9 @@ typedef struct _DecData{
+ static void ffmpeg_init(){
+ static bool_t done=FALSE;
+ if (!done){
++#ifdef FF_API_AVCODEC_INIT
+ avcodec_init();
++#endif
+ avcodec_register_all();
+ done=TRUE;
+ }
+diff --git a/src/videoenc.c b/src/videoenc.c
+index 21d016f..fb35760 100644
+--- a/src/videoenc.c
++++ b/src/videoenc.c
+@@ -39,6 +39,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ static bool_t avcodec_initialized=FALSE;
+
++#ifndef FF_I_TYPE
++#define FF_I_TYPE AV_PICTURE_TYPE_I
++#endif
++
+ #ifdef ENABLE_LOG_FFMPEG
+
+ void ms_ffmpeg_log_callback(void* ptr, int level, const char* fmt, va_list vl)
+@@ -53,7 +57,9 @@ void ms_ffmpeg_log_callback(void* ptr, int level, const char* fmt, va_list vl)
+
+ void ms_ffmpeg_check_init(){
+ if(!avcodec_initialized){
++#ifdef FF_API_AVCODEC_INIT
+ avcodec_init();
++#endif
+ avcodec_register_all();
+ avcodec_initialized=TRUE;
+ #ifdef ENABLE_LOG_FFMPEG
+@@ -300,10 +306,10 @@ static void prepare_h263(EncState *s){
+ if (s->profile==0){
+ s->codec=CODEC_ID_H263;
+ }else{
++ /*
+ c->flags|=CODEC_FLAG_H263P_UMV;
+ c->flags|=CODEC_FLAG_AC_PRED;
+ c->flags|=CODEC_FLAG_H263P_SLICE_STRUCT;
+- /*
+ c->flags|=CODEC_FLAG_OBMC;
+ c->flags|=CODEC_FLAG_AC_PRED;
+ */
diff --git a/media-libs/mediastreamer/files/mediastreamer-2.8.2-libav9.patch b/media-libs/mediastreamer/files/mediastreamer-2.8.2-libav9.patch
new file mode 100644
index 000000000000..0b335e282cfd
--- /dev/null
+++ b/media-libs/mediastreamer/files/mediastreamer-2.8.2-libav9.patch
@@ -0,0 +1,115 @@
+diff -urb mediastreamer-2.8.2.old/src/h264dec.c mediastreamer-2.8.2/src/h264dec.c
+--- mediastreamer-2.8.2.old/src/h264dec.c 2013-06-22 19:13:24.649838347 +0200
++++ mediastreamer-2.8.2/src/h264dec.c 2013-06-22 19:20:52.044822431 +0200
+@@ -55,10 +55,10 @@
+ int error;
+ codec=avcodec_find_decoder(CODEC_ID_H264);
+ if (codec==NULL) ms_fatal("Could not find H264 decoder in ffmpeg.");
+- avcodec_get_context_defaults(&d->av_context);
+- error=avcodec_open(&d->av_context,codec);
++ avcodec_get_context_defaults3(&d->av_context, NULL);
++ error=avcodec_open2(&d->av_context,codec, NULL);
+ if (error!=0){
+- ms_fatal("avcodec_open() failed.");
++ ms_fatal("avcodec_open2() failed.");
+ }
+ }
+
+diff -urb mediastreamer-2.8.2.old/src/jpegwriter.c mediastreamer-2.8.2/src/jpegwriter.c
+--- mediastreamer-2.8.2.old/src/jpegwriter.c 2013-06-22 19:13:24.649838347 +0200
++++ mediastreamer-2.8.2/src/jpegwriter.c 2013-06-22 19:17:57.087828655 +0200
+@@ -90,7 +90,7 @@
+ mblk_t *jpegm;
+ struct SwsContext *sws_ctx;
+
+- AVCodecContext *avctx=avcodec_alloc_context();
++ AVCodecContext *avctx=avcodec_alloc_context3(NULL);
+
+ avctx->width=yuvbuf.w;
+ avctx->height=yuvbuf.h;
+@@ -98,9 +98,9 @@
+ avctx->time_base.den =1;
+ avctx->pix_fmt=PIX_FMT_YUVJ420P;
+
+- error=avcodec_open(avctx,s->codec);
++ error=avcodec_open2(avctx,s->codec,NULL);
+ if (error!=0) {
+- ms_error("avcodec_open() failed: %i",error);
++ ms_error("avcodec_open2() failed: %i",error);
+ cleanup(s,NULL);
+ av_free(avctx);
+ return;
+diff -urb mediastreamer-2.8.2.old/src/nowebcam.c mediastreamer-2.8.2/src/nowebcam.c
+--- mediastreamer-2.8.2.old/src/nowebcam.c 2013-06-22 19:13:24.652838347 +0200
++++ mediastreamer-2.8.2/src/nowebcam.c 2013-06-22 19:20:43.198822745 +0200
+@@ -68,9 +68,9 @@
+ return NULL;
+ }
+
+- avcodec_get_context_defaults(&av_context);
+- if (avcodec_open(&av_context,codec)<0){
+- ms_error("jpeg2yuv: avcodec_open failed");
++ avcodec_get_context_defaults3(&av_context, NULL);
++ if (avcodec_open2(&av_context,codec,NULL)<0){
++ ms_error("jpeg2yuv: avcodec_open2 failed");
+ return NULL;
+ }
+ av_init_packet(&pkt);
+diff -urb mediastreamer-2.8.2.old/src/videodec.c mediastreamer-2.8.2/src/videodec.c
+--- mediastreamer-2.8.2.old/src/videodec.c 2013-06-22 19:13:24.654838347 +0200
++++ mediastreamer-2.8.2/src/videodec.c 2013-06-22 19:28:58.436805127 +0200
+@@ -52,7 +52,7 @@
+ DecState *s=(DecState *)ms_new0(DecState,1);
+ ms_ffmpeg_check_init();
+
+- avcodec_get_context_defaults(&s->av_context);
++ avcodec_get_context_defaults3(&s->av_context, NULL);
+ s->av_codec=NULL;
+ s->codec=cid;
+ s->input=NULL;
+@@ -133,8 +133,8 @@
+ if (s->av_context.codec==NULL){
+ /* we must know picture size before initializing snow decoder*/
+ if (s->codec!=CODEC_ID_SNOW){
+- error=avcodec_open(&s->av_context, s->av_codec);
+- if (error!=0) ms_error("avcodec_open() failed: %i",error);
++ error=avcodec_open2(&s->av_context, s->av_codec,NULL);
++ if (error!=0) ms_error("avcodec_open2() failed: %i",error);
+ if (s->codec==CODEC_ID_MPEG4 && s->dci_size>0){
+ s->av_context.extradata=s->dci;
+ s->av_context.extradata_size=s->dci_size;
+@@ -223,8 +223,8 @@
+ int error;
+ s->av_context.width=h>>16;
+ s->av_context.height=h&0xffff;
+- error=avcodec_open(&s->av_context, s->av_codec);
+- if (error!=0) ms_error("avcodec_open() failed for snow: %i",error);
++ error=avcodec_open2(&s->av_context, s->av_codec, NULL);
++ if (error!=0) ms_error("avcodec_open2() failed for snow: %i",error);
+ else {
+ s->snow_initialized=TRUE;
+ ms_message("Snow decoder initialized,size=%ix%i",
+diff -urb mediastreamer-2.8.2.old/src/videoenc.c mediastreamer-2.8.2/src/videoenc.c
+--- mediastreamer-2.8.2.old/src/videoenc.c 2013-06-22 19:13:24.654838347 +0200
++++ mediastreamer-2.8.2/src/videoenc.c 2013-06-22 19:20:19.732823580 +0200
+@@ -236,7 +236,7 @@
+ AVCodecContext *c=&s->av_context;
+ const int max_br_vbv=128000;
+
+- avcodec_get_context_defaults(c);
++ avcodec_get_context_defaults3(c, NULL);
+ if (s->codec==CODEC_ID_MJPEG)
+ {
+ ms_message("Codec bitrate set to %i",c->bit_rate);
+@@ -342,9 +342,9 @@
+ ms_error("could not find encoder for codec id %i",s->codec);
+ return;
+ }
+- error=avcodec_open(&s->av_context, s->av_codec);
++ error=avcodec_open2(&s->av_context, s->av_codec, NULL);
+ if (error!=0) {
+- ms_error("avcodec_open() failed: %i",error);
++ ms_error("avcodec_open2() failed: %i",error);
+ return;
+ }
+ video_starter_init(&s->starter);
diff --git a/media-libs/mediastreamer/files/mediastreamer-2.8.2-v4l-automagic.patch b/media-libs/mediastreamer/files/mediastreamer-2.8.2-v4l-automagic.patch
new file mode 100644
index 000000000000..f35660ea8c0c
--- /dev/null
+++ b/media-libs/mediastreamer/files/mediastreamer-2.8.2-v4l-automagic.patch
@@ -0,0 +1,54 @@
+From 93362c849d4a3ba1748d033369f76e93557f1c06 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Thu, 22 Nov 2012 15:02:21 +0100
+Subject: [PATCH] Support disabling V4L support completely.
+
+---
+ mediastreamer-2.8.2/configure.ac | 17 ++++++++++++++---
+ 1 file changed, 14 insertions(+), 3 deletions(-)
+
+diff --git a/mediastreamer-2.8.2/configure.ac b/mediastreamer-2.8.2/configure.ac
+index d5be955..86703a0 100644
+--- a/mediastreamer-2.8.2/configure.ac
++++ b/mediastreamer-2.8.2/configure.ac
+@@ -624,6 +624,16 @@ PACKAGE_DATA_DIR="$prefix/share"
+ AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${package_prefix}/share" ,[path of data])
+ AC_SUBST(PACKAGE_DATA_DIR)
+
++AC_ARG_ENABLE(v4l,
++ [ --disable-v4l Disable usage of v4l],
++ [case "${enableval}" in
++ yes) v4l=yes ;;
++ no) v4l=no ;;
++ *) AC_MSG_ERROR(bad value ${enableval} for --disable-v4l) ;;
++ esac],[v4l=yes])
++
++if test "$v4l" = "yes" ; then
++
+ dnl check for video4linux headers
+ AC_CHECK_HEADERS(linux/videodev.h linux/videodev2.h)
+ if test "${ac_cv_header_linux_videodev_h}" = "yes" ; then
+@@ -637,9 +647,6 @@ else
+ found_v4l2=no
+ fi
+
+-AM_CONDITIONAL(BUILD_V4L1, test x$found_v4l1 = xyes )
+-AM_CONDITIONAL(BUILD_V4L2, test x$found_v4l2 = xyes )
+-
+ AC_ARG_ENABLE(libv4l1,
+ [ --disable-libv4l1 Disable usage of libv4l1, really discouraged],
+ [case "${enableval}" in
+@@ -680,6 +687,10 @@ this check.
+ fi
+ fi
+
++fi
++
++AM_CONDITIONAL(BUILD_V4L1, test x$found_v4l1 = xyes )
++AM_CONDITIONAL(BUILD_V4L2, test x$found_v4l2 = xyes )
+
+ AC_ARG_ENABLE(tests,
+ [ --enable-tests Disable compilation of tests],
+--
+1.8.0
+
diff --git a/media-libs/mediastreamer/files/mediastreamer-2.9.0-libav9.patch b/media-libs/mediastreamer/files/mediastreamer-2.9.0-libav9.patch
new file mode 100644
index 000000000000..078f360b3382
--- /dev/null
+++ b/media-libs/mediastreamer/files/mediastreamer-2.9.0-libav9.patch
@@ -0,0 +1,120 @@
+diff --git a/src/videofilters/h264dec.c b/src/videofilters/h264dec.c
+index 38881c1..f306723 100644
+--- a/src/videofilters/h264dec.c
++++ b/src/videofilters/h264dec.c
+@@ -58,10 +58,10 @@ static void dec_open(DecData *d){
+ int error;
+ codec=avcodec_find_decoder(CODEC_ID_H264);
+ if (codec==NULL) ms_fatal("Could not find H264 decoder in ffmpeg.");
+- avcodec_get_context_defaults(&d->av_context);
+- error=avcodec_open(&d->av_context,codec);
++ avcodec_get_context_defaults3(&d->av_context, NULL);
++ error=avcodec_open2(&d->av_context,codec, NULL);
+ if (error!=0){
+- ms_fatal("avcodec_open() failed.");
++ ms_fatal("avcodec_open2() failed.");
+ }
+ }
+
+diff --git a/src/videofilters/jpegwriter.c b/src/videofilters/jpegwriter.c
+index 891f618..96f5d7f 100644
+--- a/src/videofilters/jpegwriter.c
++++ b/src/videofilters/jpegwriter.c
+@@ -90,7 +90,7 @@ static void jpg_process(MSFilter *f){
+ mblk_t *jpegm;
+ struct SwsContext *sws_ctx;
+
+- AVCodecContext *avctx=avcodec_alloc_context();
++ AVCodecContext *avctx=avcodec_alloc_context3(NULL);
+
+ avctx->width=yuvbuf.w;
+ avctx->height=yuvbuf.h;
+@@ -98,9 +98,9 @@ static void jpg_process(MSFilter *f){
+ avctx->time_base.den =1;
+ avctx->pix_fmt=PIX_FMT_YUVJ420P;
+
+- error=avcodec_open(avctx,s->codec);
++ error=avcodec_open2(avctx,s->codec,NULL);
+ if (error!=0) {
+- ms_error("avcodec_open() failed: %i",error);
++ ms_error("avcodec_open2() failed: %i",error);
+ cleanup(s,NULL);
+ av_free(avctx);
+ return;
+diff --git a/src/videofilters/nowebcam.c b/src/videofilters/nowebcam.c
+index 60e3853..329c453 100644
+--- a/src/videofilters/nowebcam.c
++++ b/src/videofilters/nowebcam.c
+@@ -68,9 +68,9 @@ static mblk_t *jpeg2yuv(uint8_t *jpgbuf, int bufsize, MSVideoSize *reqsize){
+ return NULL;
+ }
+
+- avcodec_get_context_defaults(&av_context);
+- if (avcodec_open(&av_context,codec)<0){
+- ms_error("jpeg2yuv: avcodec_open failed");
++ avcodec_get_context_defaults3(&av_context, NULL);
++ if (avcodec_open2(&av_context,codec,NULL)<0){
++ ms_error("jpeg2yuv: avcodec_open2 failed");
+ return NULL;
+ }
+ av_init_packet(&pkt);
+diff --git a/src/videofilters/videodec.c b/src/videofilters/videodec.c
+index 494debf..c52e207 100644
+--- a/src/videofilters/videodec.c
++++ b/src/videofilters/videodec.c
+@@ -53,7 +53,7 @@ static void dec_init(MSFilter *f, enum CodecID cid){
+ DecState *s=(DecState *)ms_new0(DecState,1);
+ ms_ffmpeg_check_init();
+
+- avcodec_get_context_defaults(&s->av_context);
++ avcodec_get_context_defaults3(&s->av_context, NULL);
+ s->av_codec=NULL;
+ s->codec=cid;
+ s->input=NULL;
+@@ -135,8 +135,8 @@ static void dec_preprocess(MSFilter *f){
+ if (s->av_context.codec==NULL){
+ /* we must know picture size before initializing snow decoder*/
+ if (s->codec!=CODEC_ID_SNOW){
+- error=avcodec_open(&s->av_context, s->av_codec);
+- if (error!=0) ms_error("avcodec_open() failed: %i",error);
++ error=avcodec_open2(&s->av_context, s->av_codec,NULL);
++ if (error!=0) ms_error("avcodec_open2() failed: %i",error);
+ if (s->codec==CODEC_ID_MPEG4 && s->dci_size>0){
+ s->av_context.extradata=s->dci;
+ s->av_context.extradata_size=s->dci_size;
+@@ -225,8 +225,8 @@ static mblk_t * parse_snow_header(DecState *s,mblk_t *inm){
+ int error;
+ s->av_context.width=h>>16;
+ s->av_context.height=h&0xffff;
+- error=avcodec_open(&s->av_context, s->av_codec);
+- if (error!=0) ms_error("avcodec_open() failed for snow: %i",error);
++ error=avcodec_open2(&s->av_context, s->av_codec, NULL);
++ if (error!=0) ms_error("avcodec_open2() failed for snow: %i",error);
+ else {
+ s->snow_initialized=TRUE;
+ ms_message("Snow decoder initialized,size=%ix%i",
+diff --git a/src/videofilters/videoenc.c b/src/videofilters/videoenc.c
+index da35592..09dcc9d 100644
+--- a/src/videofilters/videoenc.c
++++ b/src/videofilters/videoenc.c
+@@ -242,7 +242,7 @@ static void prepare(EncState *s){
+ AVCodecContext *c=&s->av_context;
+ const int max_br_vbv=128000;
+
+- avcodec_get_context_defaults(c);
++ avcodec_get_context_defaults3(c, NULL);
+ if (s->codec==CODEC_ID_MJPEG)
+ {
+ ms_message("Codec bitrate set to %i",c->bit_rate);
+@@ -348,9 +348,9 @@ static void enc_preprocess(MSFilter *f){
+ ms_error("could not find encoder for codec id %i",s->codec);
+ return;
+ }
+- error=avcodec_open(&s->av_context, s->av_codec);
++ error=avcodec_open2(&s->av_context, s->av_codec, NULL);
+ if (error!=0) {
+- ms_error("avcodec_open() failed: %i",error);
++ ms_error("avcodec_open2() failed: %i",error);
+ return;
+ }
+ video_starter_init(&s->starter);
diff --git a/media-libs/mediastreamer/files/mediastreamer-2.9.0-tests.patch b/media-libs/mediastreamer/files/mediastreamer-2.9.0-tests.patch
new file mode 100644
index 000000000000..3bcb8bd36618
--- /dev/null
+++ b/media-libs/mediastreamer/files/mediastreamer-2.9.0-tests.patch
@@ -0,0 +1,26 @@
+From d9f448013bd5ea92ce42c99ef3338932ec694b62 Mon Sep 17 00:00:00 2001
+From: hasufell <hasufell@gentoo.org>
+Date: Wed, 9 Oct 2013 21:18:28 +0200
+Subject: [PATCH] fix tests
+
+---
+ configure.ac | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 4b923a9..4aec221 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -873,6 +873,9 @@ case "$target_os" in
+ #hack for macport
+ CUNIT_LIBS+=" -lncurses"
+ ;;
++ *linux*)
++ CUNIT_LIBS+=" -lncurses"
++ ;;
+ *mingw*)
+ CPPFLAGS="$CPPFLAGS -D_WIN32_WINNT=0x0501"
+ LIBS="$LIBS -lws2_32 -liphlpapi"
+--
+1.8.3.2
+
diff --git a/media-libs/mediastreamer/files/mediastreamer-2.9.0-underlinking.patch b/media-libs/mediastreamer/files/mediastreamer-2.9.0-underlinking.patch
new file mode 100644
index 000000000000..19d6af803c2c
--- /dev/null
+++ b/media-libs/mediastreamer/files/mediastreamer-2.9.0-underlinking.patch
@@ -0,0 +1,57 @@
+From 497ad9c27385c02f4f038b6e787ada9c7b6f8373 Mon Sep 17 00:00:00 2001
+From: hasufell <hasufell@gentoo.org>
+Date: Wed, 9 Oct 2013 18:24:28 +0200
+Subject: [PATCH] fix underlinking
+
+---
+ configure.ac | 20 ++++++++++++++++++++
+ src/Makefile.am | 2 +-
+ 2 files changed, 21 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 9f402bd..4b923a9 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -893,6 +893,26 @@ fi
+
+ AM_CONDITIONAL(BUILD_TESTS,test x$found_cunit = xyes)
+
++dnl Check for clock_gettime, in libc for FreeBSD, in rt for linux,
++dnl in rt for Solaris 7, in posix4 for Solaris 2.5.1
++LIB_CLOCK_GETTIME=
++clk_saved_libs=$LIBS
++AC_SEARCH_LIBS([clock_gettime], [rt posix4],
++ [test "$ac_cv_search_clock_gettime" = "none required" ||
++ LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime])
++AC_SUBST([LIB_CLOCK_GETTIME])
++
++AC_MSG_CHECKING([for working clock_gettime])
++AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]],
++ [[clock_gettime(CLOCK_REALTIME, 0);]])], [gnupg_cv_clock_gettime=yes], [gnupg_cv_clock_gettime=no])
++AC_MSG_RESULT($gnupg_cv_clock_gettime)
++
++if test x"$gnupg_cv_clock_gettime" = xyes; then
++ AC_DEFINE([HAVE_CLOCK_GETTIME], 1,
++ [Define to 1 if you have the `clock_gettime' function.])
++fi
++LIBS=$clk_saved_libs
++
+
+ dnl ##################################################
+ dnl # Check for doxygen
+diff --git a/src/Makefile.am b/src/Makefile.am
+index a315e92..a5e144c 100755
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -266,7 +266,7 @@ voipdescs.h: Makefile $(libmediastreamer_voip_la_SOURCES)
+ awk 'BEGIN { print("MSFilterDesc * ms_voip_filter_descs[]={") } { printf("&%s,\n",$$1) } END{ print("NULL\n};\n") } ' $$builddir/voipdescs.txt >> $$builddir/$@
+
+
+-libmediastreamer_base_la_LIBADD= $(ORTP_LIBS)
++libmediastreamer_base_la_LIBADD= $(ORTP_LIBS) @LIB_CLOCK_GETTIME@
+ libmediastreamer_base_la_LDFLAGS= -no-undefined -version-info $(LIBMEDIASTREAMER_SO_VERSION)
+
+ if !BUILD_WIN32
+--
+1.8.3.2
+
diff --git a/media-libs/mediastreamer/files/mediastreamer-2.9.0-v4l-automagic.patch b/media-libs/mediastreamer/files/mediastreamer-2.9.0-v4l-automagic.patch
new file mode 100644
index 000000000000..c590aef3b713
--- /dev/null
+++ b/media-libs/mediastreamer/files/mediastreamer-2.9.0-v4l-automagic.patch
@@ -0,0 +1,55 @@
+From b99ddff6f322c8b466f3cdfd71b0d629cea33aac Mon Sep 17 00:00:00 2001
+From: hasufell <hasufell@gentoo.org>
+Date: Wed, 9 Oct 2013 18:12:46 +0200
+Subject: [PATCH] Support disabling V4L support completely
+
+---
+ configure.ac | 18 +++++++++++++++---
+ 1 file changed, 15 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 94b6f18..9f402bd 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -746,6 +746,16 @@ PACKAGE_DATA_DIR="$prefix/share"
+ AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${package_prefix}/share" ,[path of data])
+ AC_SUBST(PACKAGE_DATA_DIR)
+
++AC_ARG_ENABLE(v4l,
++ [ --disable-v4l Disable usage of v4l],
++ [case "${enableval}" in
++ yes) v4l=yes ;;
++ no) v4l=no ;;
++ *) AC_MSG_ERROR(bad value ${enableval} for --disable-v4l) ;;
++ esac],[v4l=yes])
++
++if test "$v4l" = "yes" ; then
++
+ dnl check for video4linux headers
+ AC_CHECK_HEADERS(linux/videodev.h linux/videodev2.h)
+ if test "${ac_cv_header_linux_videodev_h}" = "yes" ; then
+@@ -759,9 +769,6 @@ else
+ found_v4l2=no
+ fi
+
+-AM_CONDITIONAL(BUILD_V4L1, test x$found_v4l1 = xyes )
+-AM_CONDITIONAL(BUILD_V4L2, test x$found_v4l2 = xyes )
+-
+ AC_ARG_ENABLE(libv4l1,
+ [AS_HELP_STRING([--disable-libv4l1], [Disable usage of libv4l1, really discouraged])],
+ [case "${enableval}" in
+@@ -805,6 +812,11 @@ this check.
+ fi
+ fi
+
++fi
++
++AM_CONDITIONAL(BUILD_V4L1, test x$found_v4l1 = xyes )
++AM_CONDITIONAL(BUILD_V4L2, test x$found_v4l2 = xyes )
++
+
+ AC_PATH_PROG(PCAP,pcap-config,false)
+ AM_CONDITIONAL(HAVE_PCAP, test $PCAP != false)
+--
+1.8.3.2
+
diff --git a/media-libs/mediastreamer/files/mediastreamer-2.9.0-xxd.patch b/media-libs/mediastreamer/files/mediastreamer-2.9.0-xxd.patch
new file mode 100644
index 000000000000..2337e1343002
--- /dev/null
+++ b/media-libs/mediastreamer/files/mediastreamer-2.9.0-xxd.patch
@@ -0,0 +1,18 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Fri Oct 11 11:37:19 UTC 2013
+Subject: avoid dependency on vim-core
+
+--- mediastreamer-2.9.0/src/Makefile.am
++++ mediastreamer-2.9.0/src/Makefile.am
+@@ -385,9 +385,9 @@
+ yuv2rgb.fs.h: yuv2rgb.fs
+ builddir=`pwd` && \
+ cd $(top_srcdir)/src && \
+- xxd -i yuv2rgb.fs | sed s/}\;/,0x00}\;/ > $$builddir/yuv2rgb.fs.h
++ xxdi.pl yuv2rgb.fs | sed s/}\;/0x00}\;/ > $$builddir/yuv2rgb.fs.h
+
+ yuv2rgb.vs.h: yuv2rgb.vs
+ builddir=`pwd` && \
+ cd $(top_srcdir)/src && \
+- xxd -i yuv2rgb.vs | sed s/}\;/,0x00}\;/ > $$builddir/yuv2rgb.vs.h
++ xxdi.pl yuv2rgb.vs | sed s/}\;/0x00}\;/ > $$builddir/yuv2rgb.vs.h
diff --git a/media-libs/mediastreamer/mediastreamer-2.7.3-r3.ebuild b/media-libs/mediastreamer/mediastreamer-2.7.3-r3.ebuild
new file mode 100644
index 000000000000..6fc51e252981
--- /dev/null
+++ b/media-libs/mediastreamer/mediastreamer-2.7.3-r3.ebuild
@@ -0,0 +1,130 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils autotools multilib
+
+DESCRIPTION="Mediastreaming library for telephony application"
+HOMEPAGE="http://www.linphone.org/"
+SRC_URI="mirror://nongnu/linphone/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86 ~x64-macos ~x86-macos"
+# Many cameras will not work or will crash an application if mediastreamer2 is
+# not built with v4l2 support (taken from configure.ac)
+# TODO: run-time test for ipv6: does it really need ortp[ipv6] ?
+IUSE="+alsa amr bindist coreaudio debug examples gsm ilbc ipv6 jack oss portaudio
+pulseaudio sdl +speex static-libs theora v4l video x264 X"
+REQUIRED_USE="|| ( oss alsa jack portaudio coreaudio pulseaudio )
+ video? ( || ( sdl X ) )
+ theora? ( video )
+ X? ( video )
+ v4l? ( video )"
+
+RDEPEND=">=net-libs/ortp-0.16.2[ipv6?]
+ alsa? ( media-libs/alsa-lib )
+ gsm? ( media-sound/gsm )
+ jack? ( >=media-libs/libsamplerate-0.0.13
+ media-sound/jack-audio-connection-kit )
+ portaudio? ( media-libs/portaudio )
+ pulseaudio? ( >=media-sound/pulseaudio-0.9.21 )
+ speex? ( >=media-libs/speex-1.2_beta3 )
+ video? (
+ virtual/ffmpeg
+ v4l? ( media-libs/libv4l
+ sys-kernel/linux-headers )
+ theora? ( media-libs/libtheora )
+ sdl? ( media-libs/libsdl[video,X] )
+ X? ( x11-libs/libX11
+ x11-libs/libXv ) )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ x11-proto/videoproto"
+
+PDEPEND="amr? ( !bindist? ( media-plugins/mediastreamer-amr ) )
+ ilbc? ( media-plugins/mediastreamer-ilbc )
+ video? ( x264? ( media-plugins/mediastreamer-x264 ) )"
+
+DOCS=( AUTHORS ChangeLog NEWS README )
+
+src_prepare() {
+ # respect user's CFLAGS
+ sed -i -e "s:-O2::;s: -g::" configure.ac || die "patching configure.ac failed"
+
+ # change default paths
+ sed -i -e "s:\(\${prefix}/\)lib:\1$(get_libdir):" \
+ -e "s:\(prefix/share\):\1/${PN}:" configure.ac \
+ || die "patching configure.ac failed"
+
+ # fix html doc installation dir
+ sed -i -e "s:\$(pkgdocdir):\$(docdir):" help/Makefile.am \
+ || die "patching help/Makefile.am failed"
+ sed -i -e "s:\(doc_htmldir=\).*:\1\$(htmldir):" help/Makefile.am \
+ || die "patching help/Makefile.am failed"
+
+ epatch "${FILESDIR}/${PN}-2.7.3-v4l-automagic.patch"
+ epatch "${FILESDIR}/${P}-sdl-build.patch"
+ epatch "${FILESDIR}/${P}-videoenc_282.patch"
+ epatch "${FILESDIR}/${P}-ffmpeg-0.11.patch"
+
+ # linux/videodev.h dropped in 2.6.38
+ sed -i -e 's:msv4l.c::' src/Makefile.am || die
+ sed -i -e 's:linux/videodev.h ::' configure.ac || die
+ eautoreconf
+
+ # don't build examples in tests/
+ sed -i -e "s:\(SUBDIRS = .*\) tests \(.*\):\1 \2:" Makefile.in \
+ || die "patching Makefile.in failed"
+}
+
+src_configure() {
+ # Mac OS X Audio Queue is an audio recording facility, available on
+ # 10.5 (Leopard, Darwin9) and onward
+ local macaqsnd="--disable-macaqsnd"
+ if use coreaudio && [[ ${CHOST} == *-darwin* && ${CHOST##*-darwin} -ge 9 ]];
+ then
+ macaqsnd="--enable-macaqsnd"
+ fi
+
+ # strict: don't want -Werror
+ # external-ortp: don't use bundled libs
+ # arts: arts is deprecated
+ econf \
+ --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
+ --datadir="${EPREFIX}"/usr/share/${PN} \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --disable-strict \
+ --enable-external-ortp \
+ --disable-artsc \
+ $(use_enable alsa) \
+ $(use_enable pulseaudio) \
+ $(use_enable coreaudio macsnd) ${macaqsnd} \
+ $(use_enable debug) \
+ $(use_enable gsm) \
+ $(use_enable ipv6) \
+ $(use_enable jack) \
+ $(use_enable oss) \
+ $(use_enable portaudio) \
+ $(use_enable speex) \
+ $(use_enable static-libs static) \
+ $(use_enable theora) \
+ $(use_enable video) \
+ $(use_enable v4l) \
+ $(use_enable v4l libv4l) \
+ $(use_enable sdl) \
+ $(use_enable X x11) \
+ $(use_enable X xv)
+}
+
+src_install() {
+ default
+ find "${ED}" -name '*.la' -exec rm -f {} +
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins tests/*.c
+ fi
+}
diff --git a/media-libs/mediastreamer/mediastreamer-2.8.2.ebuild b/media-libs/mediastreamer/mediastreamer-2.8.2.ebuild
new file mode 100644
index 000000000000..871398ead990
--- /dev/null
+++ b/media-libs/mediastreamer/mediastreamer-2.8.2.ebuild
@@ -0,0 +1,138 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit autotools eutils multilib
+
+DESCRIPTION="Mediastreaming library for telephony application"
+HOMEPAGE="http://www.linphone.org/"
+SRC_URI="mirror://nongnu/linphone/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86"
+# Many cameras will not work or will crash an application if mediastreamer2 is
+# not built with v4l2 support (taken from configure.ac)
+# TODO: run-time test for ipv6: does it really need ortp[ipv6] ?
+IUSE="+alsa amr bindist coreaudio debug doc examples g726 g729 gsm ilbc
+ ipv6 oss portaudio pulseaudio sdl silk +speex static-libs theora v4l
+ video x264 X"
+
+REQUIRED_USE="|| ( oss alsa portaudio coreaudio pulseaudio )
+ video? ( || ( sdl X ) )
+ theora? ( video )
+ X? ( video )
+ v4l? ( video )"
+
+RDEPEND=">=net-libs/ortp-0.17[ipv6?]
+ alsa? ( media-libs/alsa-lib )
+ g726? ( >=media-libs/spandsp-0.0.6_pre1 )
+ gsm? ( media-sound/gsm )
+ portaudio? ( media-libs/portaudio )
+ pulseaudio? ( >=media-sound/pulseaudio-0.9.21 )
+ speex? ( >=media-libs/speex-1.2_beta3 )
+ video? (
+ virtual/ffmpeg
+ v4l? ( media-libs/libv4l
+ sys-kernel/linux-headers )
+ theora? ( media-libs/libtheora )
+ sdl? ( media-libs/libsdl[video,X] )
+ X? ( x11-libs/libX11
+ x11-libs/libXv ) )"
+DEPEND="${RDEPEND}
+ dev-util/intltool
+ virtual/pkgconfig
+ x11-proto/videoproto
+ doc? ( app-doc/doxygen )"
+
+PDEPEND="amr? ( !bindist? ( media-plugins/mediastreamer-amr ) )
+ g729? ( !bindist? ( media-plugins/mediastreamer-bcg729 ) )
+ ilbc? ( media-plugins/mediastreamer-ilbc )
+ video? ( x264? ( media-plugins/mediastreamer-x264 ) )
+ silk? ( !bindist? ( media-plugins/mediastreamer-silk ) )"
+
+src_prepare() {
+ # respect user's CFLAGS
+ sed -i -e "s:-O2::;s: -g::" configure.ac || die "patching configure.ac failed"
+
+ # change default paths
+ sed -i -e "s:\(\${prefix}/\)lib:\1$(get_libdir):" \
+ -e "s:\(prefix/share\):\1/${PN}:" configure.ac \
+ || die "patching configure.ac failed"
+
+ # fix html doc installation dir
+ sed -i -e "s:\$(pkgdocdir):\$(docdir):" help/Makefile.am \
+ || die "patching help/Makefile.am failed"
+ sed -i -e "s:\(doc_htmldir=\).*:\1\$(htmldir):" help/Makefile.am \
+ || die "patching help/Makefile.am failed"
+
+ epatch "${FILESDIR}/${P}-v4l-automagic.patch" \
+ "${FILESDIR}/${P}-autopoint.patch" \
+ "${FILESDIR}/${P}-ffmpeg-1.0.patch" \
+ "${FILESDIR}/${P}-libav9.patch"
+
+ # linux/videodev.h dropped in 2.6.38
+ sed -i -e 's:linux/videodev.h ::' configure.ac || die
+
+ # don't build examples in tests/
+ sed -i -e "/SUBDIRS/s/ tests//" Makefile.in || die
+
+ eautoreconf
+}
+
+src_configure() {
+ local myeconfargs=(
+ --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html
+ --datadir="${EPREFIX}"/usr/share/${PN}
+ # arts is deprecated
+ --disable-artsc
+ # don't want -Werror
+ --disable-strict
+ --disable-libv4l1
+ # don't use bundled libs
+ --enable-external-ortp
+ $(use_enable alsa)
+ $(use_enable pulseaudio)
+ $(use_enable coreaudio macsnd)
+ $(use_enable debug)
+ $(use_enable g726 spandsp )
+ $(use_enable gsm)
+ $(use_enable ipv6)
+ $(use_enable oss)
+ $(use_enable portaudio)
+ $(use_enable speex)
+ $(use_enable static-libs static)
+ $(use_enable theora)
+ $(use_enable video)
+ $(use_enable v4l)
+ $(use_enable v4l libv4l2)
+ $(use_enable sdl)
+ $(use_enable X x11)
+ $(use_enable X xv)
+
+ $(use doc || echo ac_cv_path_DOXYGEN=false)
+ )
+
+ # Mac OS X Audio Queue is an audio recording facility, available on
+ # 10.5 (Leopard, Darwin9) and onward
+ if use coreaudio && [[ ${CHOST} == *-darwin* && ${CHOST##*-darwin} -ge 9 ]]
+ then
+ myeconfargs+=( --enable-macaqsnd )
+ else
+ myeconfargs+=( --disable-macaqsnd )
+ fi
+
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ default
+ prune_libtool_files
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins tests/*.c
+ fi
+}
diff --git a/media-libs/mediastreamer/mediastreamer-2.9.0-r1.ebuild b/media-libs/mediastreamer/mediastreamer-2.9.0-r1.ebuild
new file mode 100644
index 000000000000..71a94d12beb3
--- /dev/null
+++ b/media-libs/mediastreamer/mediastreamer-2.9.0-r1.ebuild
@@ -0,0 +1,174 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils
+
+DESCRIPTION="Mediastreaming library for telephony application"
+HOMEPAGE="http://www.linphone.org/"
+SRC_URI="mirror://nongnu/linphone/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0/3"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+# Many cameras will not work or will crash an application if mediastreamer2 is
+# not built with v4l2 support (taken from configure.ac)
+# TODO: run-time test for ipv6: does it really need ortp[ipv6] ?
+IUSE="+alsa amr bindist coreaudio debug doc examples +filters g726 g729 gsm ilbc
+ ipv6 libav ntp-timestamp opengl opus +ortp oss pcap portaudio pulseaudio sdl
+ silk +speex static-libs test theora upnp v4l video x264 X"
+
+REQUIRED_USE="|| ( oss alsa portaudio coreaudio pulseaudio )
+ video? ( || ( opengl sdl X ) )
+ theora? ( video )
+ X? ( video )
+ v4l? ( video )
+ opengl? ( video )"
+
+RDEPEND="alsa? ( media-libs/alsa-lib )
+ g726? ( >=media-libs/spandsp-0.0.6_pre1 )
+ gsm? ( media-sound/gsm )
+ opus? ( media-libs/opus )
+ ortp? ( >=net-libs/ortp-0.21.0[ipv6?] )
+ pcap? ( sys-libs/libcap )
+ portaudio? ( media-libs/portaudio )
+ pulseaudio? ( >=media-sound/pulseaudio-0.9.21 )
+ speex? ( >=media-libs/speex-1.2_beta3 )
+ upnp? ( net-libs/libupnp )
+ video? (
+ libav? ( >=media-video/libav-9.12:0= )
+ !libav? ( >=media-video/ffmpeg-1.2.6-r1:0= )
+
+ opengl? ( media-libs/glew
+ virtual/opengl
+ x11-libs/libX11 )
+ v4l? ( media-libs/libv4l
+ sys-kernel/linux-headers )
+ theora? ( media-libs/libtheora )
+ sdl? ( media-libs/libsdl[video,X] )
+ X? ( x11-libs/libX11
+ x11-libs/libXv ) )"
+DEPEND="${RDEPEND}
+ dev-util/intltool
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )
+ opengl? ( dev-util/xxdi )
+ test? ( >=dev-util/cunit-2.1_p2[ncurses] )
+ X? ( x11-proto/videoproto )"
+
+PDEPEND="amr? ( !bindist? ( media-plugins/mediastreamer-amr ) )
+ g729? ( !bindist? ( media-plugins/mediastreamer-bcg729 ) )
+ ilbc? ( media-plugins/mediastreamer-ilbc )
+ video? ( x264? ( media-plugins/mediastreamer-x264 ) )
+ silk? ( !bindist? ( media-plugins/mediastreamer-silk ) )"
+
+src_prepare() {
+ # variable causes "command not found" warning and is not
+ # needed anyway
+ sed -i \
+ -e 's/$(ACLOCAL_MACOS_FLAGS)//' \
+ Makefile.am || die
+
+ # respect user's CFLAGS
+ sed -i \
+ -e "s:-O2::;s: -g::" \
+ configure.ac || die "patching configure.ac failed"
+
+ # change default paths
+ sed -i \
+ -e "s:\(prefix/share\):\1/${PN}:" \
+ configure.ac || die "patching configure.ac failed"
+
+ # fix doc installation dir
+ sed -i \
+ -e "s:\$(pkgdocdir):\$(docdir):" \
+ help/Makefile.am || die "patching help/Makefile.am failed"
+
+ # fix html installation dir
+ sed -i \
+ -e "s:\(doc_htmldir=\).*:\1\$(htmldir):" \
+ help/Makefile.am || die "patching help/Makefile.am failed"
+
+ # linux/videodev.h dropped in 2.6.38
+ sed -i \
+ -e 's:linux/videodev.h ::' \
+ configure.ac || die
+
+ epatch "${FILESDIR}/${P}-v4l-automagic.patch" \
+ "${FILESDIR}/${P}-libav9.patch" \
+ "${FILESDIR}/${P}-underlinking.patch" \
+ "${FILESDIR}/${P}-tests.patch" \
+ "${FILESDIR}/${P}-xxd.patch"
+
+ eautoreconf
+}
+
+src_configure() {
+ local myeconfargs=(
+ --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html
+ --datadir="${EPREFIX}"/usr/share/${PN}
+ # arts is deprecated
+ --disable-artsc
+ # don't want -Werror
+ --disable-strict
+ --disable-libv4l1
+ # don't use bundled libs
+ --enable-external-ortp
+ $(use_enable alsa)
+ $(use_enable pulseaudio)
+ $(use_enable coreaudio macsnd)
+ $(use_enable debug)
+ $(use_enable filters)
+ $(use_enable g726 spandsp)
+ $(use_enable gsm)
+ $(use_enable ipv6)
+ $(use_enable ntp-timestamp)
+ $(use_enable opengl glx)
+ $(use_enable opus)
+ $(use_enable ortp)
+ $(use_enable oss)
+ $(use_enable pcap)
+ $(use_enable portaudio)
+ $(use_enable speex)
+ $(use_enable static-libs static)
+ $(use_enable theora)
+ $(use_enable upnp)
+ $(use_enable video)
+ $(use_enable v4l)
+ $(use_enable v4l libv4l2)
+ $(use_enable sdl)
+ $(use_enable X x11)
+ $(use_enable X xv)
+
+ $(use doc || echo ac_cv_path_DOXYGEN=false)
+ )
+
+ # Mac OS X Audio Queue is an audio recording facility, available on
+ # 10.5 (Leopard, Darwin9) and onward
+ if use coreaudio && [[ ${CHOST} == *-darwin* && ${CHOST##*-darwin} -ge 9 ]]
+ then
+ myeconfargs+=( --enable-macaqsnd )
+ else
+ myeconfargs+=( --disable-macaqsnd )
+ fi
+
+ econf "${myeconfargs[@]}"
+}
+
+src_test() {
+ default
+ cd tester || die
+ ./mediastreamer2_tester || die
+}
+
+src_install() {
+ default
+ prune_libtool_files
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins tester/*.c
+ fi
+}
diff --git a/media-libs/mediastreamer/mediastreamer-2.9.0.ebuild b/media-libs/mediastreamer/mediastreamer-2.9.0.ebuild
new file mode 100644
index 000000000000..a3b912bfd728
--- /dev/null
+++ b/media-libs/mediastreamer/mediastreamer-2.9.0.ebuild
@@ -0,0 +1,172 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils
+
+DESCRIPTION="Mediastreaming library for telephony application"
+HOMEPAGE="http://www.linphone.org/"
+SRC_URI="mirror://nongnu/linphone/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0/3"
+KEYWORDS="amd64 ppc ppc64 x86"
+# Many cameras will not work or will crash an application if mediastreamer2 is
+# not built with v4l2 support (taken from configure.ac)
+# TODO: run-time test for ipv6: does it really need ortp[ipv6] ?
+IUSE="+alsa amr bindist coreaudio debug doc examples +filters g726 g729 gsm ilbc
+ ipv6 ntp-timestamp opengl opus +ortp oss pcap portaudio pulseaudio sdl silk +speex
+ static-libs test theora upnp v4l video x264 X"
+
+REQUIRED_USE="|| ( oss alsa portaudio coreaudio pulseaudio )
+ video? ( || ( opengl sdl X ) )
+ theora? ( video )
+ X? ( video )
+ v4l? ( video )
+ opengl? ( video )"
+
+RDEPEND="alsa? ( media-libs/alsa-lib )
+ g726? ( >=media-libs/spandsp-0.0.6_pre1 )
+ gsm? ( media-sound/gsm )
+ opus? ( media-libs/opus )
+ ortp? ( >=net-libs/ortp-0.21.0[ipv6?] )
+ pcap? ( sys-libs/libcap )
+ portaudio? ( media-libs/portaudio )
+ pulseaudio? ( >=media-sound/pulseaudio-0.9.21 )
+ speex? ( >=media-libs/speex-1.2_beta3 )
+ upnp? ( net-libs/libupnp )
+ video? (
+ virtual/ffmpeg
+ opengl? ( media-libs/glew
+ virtual/opengl
+ x11-libs/libX11 )
+ v4l? ( media-libs/libv4l
+ sys-kernel/linux-headers )
+ theora? ( media-libs/libtheora )
+ sdl? ( media-libs/libsdl[video,X] )
+ X? ( x11-libs/libX11
+ x11-libs/libXv ) )"
+DEPEND="${RDEPEND}
+ dev-util/intltool
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )
+ opengl? ( dev-util/xxdi )
+ test? ( >=dev-util/cunit-2.1_p2[ncurses] )
+ X? ( x11-proto/videoproto )"
+
+PDEPEND="amr? ( !bindist? ( media-plugins/mediastreamer-amr ) )
+ g729? ( !bindist? ( media-plugins/mediastreamer-bcg729 ) )
+ ilbc? ( media-plugins/mediastreamer-ilbc )
+ video? ( x264? ( media-plugins/mediastreamer-x264 ) )
+ silk? ( !bindist? ( media-plugins/mediastreamer-silk ) )"
+
+src_prepare() {
+ # variable causes "command not found" warning and is not
+ # needed anyway
+ sed -i \
+ -e 's/$(ACLOCAL_MACOS_FLAGS)//' \
+ Makefile.am || die
+
+ # respect user's CFLAGS
+ sed -i \
+ -e "s:-O2::;s: -g::" \
+ configure.ac || die "patching configure.ac failed"
+
+ # change default paths
+ sed -i \
+ -e "s:\(prefix/share\):\1/${PN}:" \
+ configure.ac || die "patching configure.ac failed"
+
+ # fix doc installation dir
+ sed -i \
+ -e "s:\$(pkgdocdir):\$(docdir):" \
+ help/Makefile.am || die "patching help/Makefile.am failed"
+
+ # fix html installation dir
+ sed -i \
+ -e "s:\(doc_htmldir=\).*:\1\$(htmldir):" \
+ help/Makefile.am || die "patching help/Makefile.am failed"
+
+ # linux/videodev.h dropped in 2.6.38
+ sed -i \
+ -e 's:linux/videodev.h ::' \
+ configure.ac || die
+
+ epatch "${FILESDIR}/${P}-v4l-automagic.patch" \
+ "${FILESDIR}/${P}-libav9.patch" \
+ "${FILESDIR}/${P}-underlinking.patch" \
+ "${FILESDIR}/${P}-tests.patch" \
+ "${FILESDIR}/${P}-xxd.patch"
+
+ eautoreconf
+}
+
+src_configure() {
+ local myeconfargs=(
+ --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html
+ --datadir="${EPREFIX}"/usr/share/${PN}
+ # arts is deprecated
+ --disable-artsc
+ # don't want -Werror
+ --disable-strict
+ --disable-libv4l1
+ # don't use bundled libs
+ --enable-external-ortp
+ $(use_enable alsa)
+ $(use_enable pulseaudio)
+ $(use_enable coreaudio macsnd)
+ $(use_enable debug)
+ $(use_enable filters)
+ $(use_enable g726 spandsp)
+ $(use_enable gsm)
+ $(use_enable ipv6)
+ $(use_enable ntp-timestamp)
+ $(use_enable opengl glx)
+ $(use_enable opus)
+ $(use_enable ortp)
+ $(use_enable oss)
+ $(use_enable pcap)
+ $(use_enable portaudio)
+ $(use_enable speex)
+ $(use_enable static-libs static)
+ $(use_enable theora)
+ $(use_enable upnp)
+ $(use_enable video)
+ $(use_enable v4l)
+ $(use_enable v4l libv4l2)
+ $(use_enable sdl)
+ $(use_enable X x11)
+ $(use_enable X xv)
+
+ $(use doc || echo ac_cv_path_DOXYGEN=false)
+ )
+
+ # Mac OS X Audio Queue is an audio recording facility, available on
+ # 10.5 (Leopard, Darwin9) and onward
+ if use coreaudio && [[ ${CHOST} == *-darwin* && ${CHOST##*-darwin} -ge 9 ]]
+ then
+ myeconfargs+=( --enable-macaqsnd )
+ else
+ myeconfargs+=( --disable-macaqsnd )
+ fi
+
+ econf "${myeconfargs[@]}"
+}
+
+src_test() {
+ default
+ cd tester || die
+ ./mediastreamer2_tester || die
+}
+
+src_install() {
+ default
+ prune_libtool_files
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins tester/*.c
+ fi
+}
diff --git a/media-libs/mediastreamer/metadata.xml b/media-libs/mediastreamer/metadata.xml
new file mode 100644
index 000000000000..1375784b247f
--- /dev/null
+++ b/media-libs/mediastreamer/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>bircoph@gentoo.org</email>
+ <name>Andrew Savchenko</name>
+ </maintainer>
+ <use>
+ <flag name="amr">Use of AMR Narrow Band codec plugin</flag>
+ <flag name="filters">Enable compilation of filters</flag>
+ <flag name="g726">Support g726 codec</flag>
+ <flag name="g729">Use g726 codec plugin</flag>
+ <flag name="ilbc">Use of iLBC (RFC3951) codec plugin</flag>
+ <flag name="ntp-timestamp">Turn on NTP timestamping on received
+ packet</flag>
+ <flag name="opus">Enable opus codec support</flag>
+ <flag name="ortp">Enable usage of <pkg>net-libs/ortp</pkg></flag>
+ <flag name="pcap">Enable usage of <pkg>net-libs/libpcap</pkg></flag>
+ <flag name="silk">Use silk (skype protocol) codec plugin</flag>
+ <flag name="video">Enable video support</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/memphis/Manifest b/media-libs/memphis/Manifest
new file mode 100644
index 000000000000..140f7151597d
--- /dev/null
+++ b/media-libs/memphis/Manifest
@@ -0,0 +1 @@
+DIST memphis-0.2.3.tar.gz 459423 SHA256 c1cc050938ee34400197489bc9c110cc4c7c03c73780087b8cdd83a148b0e69b SHA512 effac6efbf6e8fb8c3c436013447a27f4bcbea661268e2e6b5ec69cd93b117cee6c56f78a557223c7dd45020a27e51807a4e2682d6d311b319c783e714064b01 WHIRLPOOL bbdbf6b007f4928caf069072c2e6097b28bbbf99e8c3806bb106abbede49ccce9c9f0ab83dc26a05fb17abd6da8288b6a9a9562f1ddb9b1305503220da5ca7c5
diff --git a/media-libs/memphis/files/memphis-0.2.3-demos.patch b/media-libs/memphis/files/memphis-0.2.3-demos.patch
new file mode 100644
index 000000000000..2d9510efdc5f
--- /dev/null
+++ b/media-libs/memphis/files/memphis-0.2.3-demos.patch
@@ -0,0 +1,13 @@
+diff --git a/configure.ac b/configure.ac
+index d1a063d..68218b5 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -95,7 +95,7 @@ if test x$enable_vala = xyes; then
+ AC_SUBST(VALA_EXAMPLE_PACKAGES)
+ fi
+
+-AM_CONDITIONAL(ENABLE_VALA, test x${VALAC} != x"")
++AM_CONDITIONAL(ENABLE_VALA, test x$enable_vala = xyes"")
+
+ # -----------------------------------------------------------
+ AC_CONFIG_FILES([Makefile
diff --git a/media-libs/memphis/files/memphis-0.2.3-link_gobject.patch b/media-libs/memphis/files/memphis-0.2.3-link_gobject.patch
new file mode 100644
index 000000000000..231c834b82c9
--- /dev/null
+++ b/media-libs/memphis/files/memphis-0.2.3-link_gobject.patch
@@ -0,0 +1,11 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -89,7 +89,7 @@
+ exit 0;
+ fi
+ VALA_EXAMPLE_PACKAGES="--pkg cairo --pkg memphis-0.2"
+- PKG_CHECK_MODULES(VALA_EXAMPLE, [glib-2.0, cairo])
++ PKG_CHECK_MODULES(VALA_EXAMPLE, [glib-2.0 gobject-2.0 cairo])
+ AC_SUBST(VALA_EXAMPLE_CFLAGS)
+ AC_SUBST(VALA_EXAMPLE_LIBS)
+ AC_SUBST(VALA_EXAMPLE_PACKAGES)
diff --git a/media-libs/memphis/memphis-0.2.3.ebuild b/media-libs/memphis/memphis-0.2.3.ebuild
new file mode 100644
index 000000000000..50e92e8a4931
--- /dev/null
+++ b/media-libs/memphis/memphis-0.2.3.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+WANT_AUTOMAKE=1.11
+
+AUTOTOOLS_AUTORECONF=true
+VALA_MIN_API_VERSION=0.12
+
+inherit autotools-utils vala
+
+DESCRIPTION="A map-rendering application and a library for OpenStreetMap"
+HOMEPAGE="http://trac.openstreetmap.ch/trac/memphis/"
+SRC_URI="http://wenner.ch/files/public/mirror/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0.2"
+KEYWORDS="alpha amd64 arm ia64 ppc ppc64 sparc x86"
+IUSE="debug doc +introspection vala static-libs"
+
+RDEPEND="
+ dev-libs/expat
+ dev-libs/glib:2
+ x11-libs/cairo
+ introspection? ( dev-libs/gobject-introspection )"
+DEPEND="${RDEPEND}
+ doc? ( dev-util/gtk-doc )
+ vala? ( $(vala_depend) )"
+
+AUTOTOOLS_IN_SOURCE_BUILD=1
+
+DOCS=( AUTHORS ChangeLog NEWS README )
+
+PATCHES=( "${FILESDIR}"/${P}-link_gobject.patch )
+
+src_prepare() {
+ unset VALAC
+ use vala && vala_src_prepare
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable debug)
+ $(use_enable doc gtk-doc)
+ $(use_enable introspection)
+ $(use_enable vala)
+ )
+ CFLAGS="${CFLAGS}" \
+ autotools-utils_src_configure
+}
diff --git a/media-libs/memphis/metadata.xml b/media-libs/memphis/metadata.xml
new file mode 100644
index 000000000000..87b4de1d7c1a
--- /dev/null
+++ b/media-libs/memphis/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>jlec@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="introspection">Use dev-libs/gobject-introspection for introspection</flag>
+ <flag name="vala">Add support for Vala</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
new file mode 100644
index 000000000000..cbcaeedbadff
--- /dev/null
+++ b/media-libs/mesa/Manifest
@@ -0,0 +1,9 @@
+DIST MesaLib-10.2.8.tar.bz2 7113716 SHA256 1ef9ad3f241788d454f2ff8c9d65b6849dfc31c8fe91f70fd2930b81c8af1398 SHA512 dc0e3ece2195be22b3d0e062fd541b049aac190b5cad36dd1ccf745148d2e958cdb7c99ea5280859169ad46624aee0bedeb585bde8d93f52dd9236fec5c1250b WHIRLPOOL b54cddecbea167bd501f75c3590050d1cddf44b5a3caa9ce9b8565c6dfc10ce6ba9cae58ff8155e9d1e2aed1656dc596d62a5a026dc11d27ce962c9fd1d9d13e
+DIST MesaLib-10.3.7.tar.bz2 7287153 SHA256 43c6ced15e237cbb21b3082d7c0b42777c50c1f731d0d4b5efb5231063fb6a5b SHA512 bbc027c4146c42aaa160990f5281c71a342d32c10ba56f91da1a60dd4cb7d620ff49b72553d24bc1d87470e2baf9be81b5bdee9abe49d6acc57902fccb9e2e5f WHIRLPOOL 7fa32e70c6aabb84a06f2f852f77eac839aea08726c442742b3d3abdb94a0fd9f033439ab0cb16865f4ee14e1538cb86937856bbdfd1f9090e8e7c43eac52e03
+DIST MesaLib-10.4.6.tar.bz2 7520024 SHA256 d8baedd20e79ccd98a5a7b05e23d59a30892e68de1fcc057ca6873dafca02735 SHA512 1a379de8471f9154aa1348c15d24a56788e42b666094d63aa5dc8bffd1ed87c1ab50fb95adac010a92d832be4ec1be60b712179ad1ec99869ee653ccb576f50e WHIRLPOOL 45ff4f46a9c165c2cd3f49696f9d972216fdbc27051287d4eea4210f25631fb1faca517a714cc50229c463be1628dfbf71ba689d02ed3b3d52bfc71683fe667e
+DIST MesaLib-7.10.3.tar.bz2 6056837 SHA256 1e701fc839b872677ddca9ed8784d754c9da1fbeda98173980e06aa7df0e85c0 SHA512 aa1f5f068b305fae5519e11cad2db9c6dc647d3122252bbcb210f13ac6ef1b667ae750344898bca7c5bfae94934db05eff915cb7417a59590e6d3ba230817aa8 WHIRLPOOL 5c2adda647936ed4163a4e4d5afad8344eb576712f9432f697aa0fc22ca17d7aaf0aeb6ad2d4e7e0825dc27cae570660332450778f8091e9b27aad2865c9b5fc
+DIST mesa-10.5.8.tar.xz 6993084 SHA256 2866b855c5299a4aed066338c77ff6467c389b2c30ada7647be8758663da2b54 SHA512 d7fc441b4cdad8a2905f03091af26ca7b01573bf4d0d928e950270981e4c6e7d20dba6aa97a60500b9a335a3c5cabc7f388a5338d43d391eed3f09dea60b77b2 WHIRLPOOL 68cc3d8490da9759b9d790053c70429be4c529c63b114f65f411112f76cd4daccc3490120a85a84d01cdcb989c0a0e58016b4d80f2238f2320b1caff797f3390
+DIST mesa-10.6.1.tar.xz 7035216 SHA256 6c80a2b647e57c85dc36e609d9aed17f878f0d8e0cf9ace86d14cf604101e1eb SHA512 7ba5f4a7e421e6f198c4e80c1f0259071e1115aecdbe2846a7986bcfe1503a6f4a1806126295e3d9f4b6aee63dd107e82c3972ccb8079b9b5baf1f65246d21ab WHIRLPOOL 1e72a397e30e0f02afc18d864aea004f13cc95a925b66538ac1e368dea9f4737168dcf6b6af715ae04331b0626b3bda7aa2affae95575c56edbeaf0177bc3117
+DIST mesa-10.6.2.tar.xz 7033344 SHA256 05753d3db4212900927b9894221a1669a10f56786e86a7e818b6e18a0817dca9 SHA512 feaca60b7cc8310a613bd89d0008fb7807de403ce6782e0e62e47ecba040d3728602778f47c704751cb49f8e2d950de03153b84b66d28203e29a70987b96340b WHIRLPOOL 8b148e7bb36fdcc7c25bb02561489b796f01f82bc74ce1d927987eeeaed5f602647d435c046142f5384aa4fb0369bb4a288281b51a03be712b4af8ed7111bf23
+DIST mesa-10.6.3.tar.xz 7036480 SHA256 58592e07c350cd2e8969b73fa83048c657a39fe2f13f3b88f5e5818fe2e4676d SHA512 4474e089c0b618d0b0469e31c213d84530f9dd22d4280612f34370578a7e7dfdfd1ac499feae470f032e462f5d7532aafa4416a7dd97d0cd6d9332aec5b44446 WHIRLPOOL 13f44d38e34b6b03919393918a65d2f47ef20de2b31a27ffb3b74c969414d40b01840652829a749924aa3ae548f2cf0abce8c830bcad6a4365ceedd4908e06cb
+DIST mesa-7.10.1-gentoo-patches-01.tar.bz2 5488 SHA256 31cd4f6d1a0a70249c40452919074856d120cd473a01a8457e3dc147a1b622d8 SHA512 c62b45b32e396e67f629003fc5242b7b4df054b8e20b5237489212bc4f0171534915a02fc9efa68965068121d10660b5cd92a419efabe33fd4596a97a39249c2 WHIRLPOOL 5f171959e3a31f5c38438b4806ce371bb8fdf1c7a87501865e4ed5d5ab284cda9568b7773005997d7a1cff151f95e64c027b36c0be48a4dd288a7ab8b5f69b97
diff --git a/media-libs/mesa/files/eselect-mesa.conf.7.10 b/media-libs/mesa/files/eselect-mesa.conf.7.10
new file mode 100644
index 000000000000..ac8bc1a1c490
--- /dev/null
+++ b/media-libs/mesa/files/eselect-mesa.conf.7.10
@@ -0,0 +1,39 @@
+# mesa classic/gallium implementations in this release
+
+# Syntax description:
+# * MESA_IMPLEMENTATIONS contains a space-delimited list of switchable
+# classic/gallium implementations.
+# * MESA_DRIVERS is an associative array, for each member "foo" of
+# MESA_IMPLEMENTATIONS it contains the following elements:
+# foo,description - Human-readable description of the driver
+# foo,classicdriver - Filename of the classic driver
+# foo,galliumdriver - Filename of the gallium driver
+# foo,default - which of classic or gallium is chosen by default
+
+MESA_IMPLEMENTATIONS="i915 i965 r300 r600 sw"
+declare -A MESA_DRIVERS || die "MESA_DRIVERS already in environment and not associative."
+
+MESA_DRIVERS[i915,description]="i915 (Intel 915, 945)"
+MESA_DRIVERS[i915,classicdriver]="i915_dri.so"
+MESA_DRIVERS[i915,galliumdriver]="i915g_dri.so"
+MESA_DRIVERS[i915,default]="classic"
+
+MESA_DRIVERS[i965,description]="i965 (Intel 965, G/Q3x, G/Q4x)"
+MESA_DRIVERS[i965,classicdriver]="i965_dri.so"
+MESA_DRIVERS[i965,galliumdriver]="i965g_dri.so"
+MESA_DRIVERS[i965,default]="classic"
+
+MESA_DRIVERS[r300,description]="r300 (Radeon R300-R500)"
+MESA_DRIVERS[r300,classicdriver]="r300_dri.so"
+MESA_DRIVERS[r300,galliumdriver]="r300g_dri.so"
+MESA_DRIVERS[r300,default]="gallium"
+
+MESA_DRIVERS[r600,description]="r600 (Radeon R600-R700, Evergreen, Northern Islands)"
+MESA_DRIVERS[r600,classicdriver]="r600_dri.so"
+MESA_DRIVERS[r600,galliumdriver]="r600g_dri.so"
+MESA_DRIVERS[r600,default]="classic"
+
+MESA_DRIVERS[sw,description]="sw (Software renderer)"
+MESA_DRIVERS[sw,classicdriver]="swrast_dri.so"
+MESA_DRIVERS[sw,galliumdriver]="swrastg_dri.so"
+MESA_DRIVERS[sw,default]="gallium"
diff --git a/media-libs/mesa/files/eselect-mesa.conf.9.2 b/media-libs/mesa/files/eselect-mesa.conf.9.2
new file mode 100644
index 000000000000..ff590f590fa3
--- /dev/null
+++ b/media-libs/mesa/files/eselect-mesa.conf.9.2
@@ -0,0 +1,39 @@
+# mesa classic/gallium implementations in this release
+
+# Syntax description:
+# * MESA_IMPLEMENTATIONS contains a space-delimited list of switchable
+# classic/gallium implementations.
+# * MESA_DRIVERS is an associative array, for each member "foo" of
+# MESA_IMPLEMENTATIONS it contains the following elements:
+# foo,description - Human-readable description of the driver
+# foo,classicdriver - Filename of the classic driver
+# foo,galliumdriver - Filename of the gallium driver
+# foo,default - which of classic or gallium is chosen by default
+
+MESA_IMPLEMENTATIONS="i915 i965 r300 r600 sw"
+declare -A MESA_DRIVERS || die "MESA_DRIVERS already in environment and not associative."
+
+MESA_DRIVERS[i915,description]="i915 (Intel 915, 945)"
+MESA_DRIVERS[i915,classicdriver]="i915_dri.so"
+MESA_DRIVERS[i915,galliumdriver]="i915g_dri.so"
+MESA_DRIVERS[i915,default]="gallium"
+
+MESA_DRIVERS[i965,description]="i965 (Intel GMA 965, G/Q3x, G/Q4x, HD)"
+MESA_DRIVERS[i965,classicdriver]="i965_dri.so"
+MESA_DRIVERS[i965,galliumdriver]="ilo_dri.so"
+MESA_DRIVERS[i965,default]="classic"
+
+MESA_DRIVERS[r300,description]="r300 (Radeon R300-R500)"
+MESA_DRIVERS[r300,classicdriver]="r300_dri.so"
+MESA_DRIVERS[r300,galliumdriver]="r300g_dri.so"
+MESA_DRIVERS[r300,default]="gallium"
+
+MESA_DRIVERS[r600,description]="r600 (Radeon R600-R700, Evergreen, Northern Islands)"
+MESA_DRIVERS[r600,classicdriver]="r600_dri.so"
+MESA_DRIVERS[r600,galliumdriver]="r600g_dri.so"
+MESA_DRIVERS[r600,default]="gallium"
+
+MESA_DRIVERS[sw,description]="sw (Software renderer)"
+MESA_DRIVERS[sw,classicdriver]="swrast_dri.so"
+MESA_DRIVERS[sw,galliumdriver]="swrastg_dri.so"
+MESA_DRIVERS[sw,default]="gallium"
diff --git a/media-libs/mesa/files/glx_ro_text_segm.patch b/media-libs/mesa/files/glx_ro_text_segm.patch
new file mode 100644
index 000000000000..495b7dc4ac56
--- /dev/null
+++ b/media-libs/mesa/files/glx_ro_text_segm.patch
@@ -0,0 +1,28 @@
+2011-02-09 Jeremy Huddleston <jeremyhu@freedesktop.org
+
+ #240956
+ * configure.ac add support to enable readonly test segment on x86
+
+--- configure.ac.orig 2008-11-17 23:19:38.000000000 +0100
++++ configure.ac 2008-11-17 23:20:17.000000000 +0100
+@@ -499,6 +499,20 @@
+ enable_xcb=no
+ fi
+
++
++dnl readonly text segment on x86 hardened platforms
++AC_ARG_ENABLE([glx_rts],
++ [AS_HELP_STRING([--enable-glx-rts],
++ [on x86, use a readonly text segment for libGL @<:@default=disabled@:>@])],
++ [enable_glx_rts="$enableval"],
++ [enable_glx_rts=no])
++if test "x$enable_glx_rts" = xyes; then
++ DEFINES="$DEFINES -DGLX_X86_READONLY_TEXT"
++else
++ enable_glx_rts=no
++fi
++
++
+ dnl
+ dnl libGL configuration per driver
+ dnl
diff --git a/media-libs/mesa/files/mesa-10.2-dont-require-llvm-for-r300.patch b/media-libs/mesa/files/mesa-10.2-dont-require-llvm-for-r300.patch
new file mode 100644
index 000000000000..a85a3c10f19d
--- /dev/null
+++ b/media-libs/mesa/files/mesa-10.2-dont-require-llvm-for-r300.patch
@@ -0,0 +1,11 @@
+diff -Naur a/configure.ac b/configure.ac
+--- a/configure.ac 2014-03-03 04:05:33.110522943 +0100
++++ b/configure.ac 2014-03-03 04:06:44.165518094 +0100
+@@ -1774,7 +1774,6 @@
+ HAVE_GALLIUM_R300=yes
+ PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED])
+ gallium_require_drm_loader
+- gallium_require_llvm "Gallium R300"
+ GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r300"
+ gallium_check_st "radeon/drm" "r300/dri" "" "" ""
+ DRICOMMON_NEED_LIBDRM=yes
diff --git a/media-libs/mesa/files/mesa-10.2-sysfs-instead-of-libudev.patch b/media-libs/mesa/files/mesa-10.2-sysfs-instead-of-libudev.patch
new file mode 100644
index 000000000000..6eed6acbe792
--- /dev/null
+++ b/media-libs/mesa/files/mesa-10.2-sysfs-instead-of-libudev.patch
@@ -0,0 +1,378 @@
+From 85b6f36ca5238dd3fec7c5fcacb8b7074ce53c8e Mon Sep 17 00:00:00 2001
+From: Gary Wong <gtw@gnu.org>
+Date: Wed, 21 May 2014 21:07:42 -0600
+Subject: loader: add optional /sys filesystem method for PCI identification.
+
+Introduce a simple PCI identification method of looking up the answer
+the /sys filesystem (available on Linux). Attempted after libudev, but
+before DRM.
+
+Disabled by default (available only when the --enable-sysfs configure
+option is specified).
+
+Signed-off-by: Gary Wong <gtw@gnu.org>
+Acked-by: Emil Velikov <emil.l.velikov@gmail.com>
+
+Backported to mesa-10.2.8 by Ian Stakenvicius <axs@gentoo.org>
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -870,14 +870,21 @@ fi
+
+ case "$host_os" in
+ linux*)
+- need_libudev=yes ;;
++ need_pci_id=yes ;;
+ *)
+- need_libudev=no ;;
++ need_pci_id=no ;;
+ esac
+
+ PKG_CHECK_MODULES([LIBUDEV], [libudev >= $LIBUDEV_REQUIRED],
+ have_libudev=yes, have_libudev=no)
+
++AC_ARG_ENABLE([sysfs],
++ [AS_HELP_STRING([--enable-sysfs],
++ [enable /sys PCI identification @<:@default=disabled@:>@])],
++ [have_sysfs="$enableval"],
++ [have_sysfs=no]
++)
++
+ if test "x$enable_dri" = xyes; then
+ if test "$enable_static" = yes; then
+ AC_MSG_ERROR([Cannot use static libraries for DRI drivers])
+@@ -973,8 +980,15 @@ xyesno)
+ ;;
+ esac
+
++have_pci_id=no
+ if test "$have_libudev" = yes; then
+ DEFINES="$DEFINES -DHAVE_LIBUDEV"
++ have_pci_id=yes
++fi
++
++if test "$have_sysfs" = yes; then
++ DEFINES="$DEFINES -DHAVE_SYSFS"
++ have_pci_id=yes
+ fi
+
+ # This is outside the case (above) so that it is invoked even for non-GLX
+@@ -1076,8 +1090,8 @@ if test "x$enable_dri" = xyes; then
+ DEFINES="$DEFINES -DHAVE_DRI3"
+ fi
+
+- if test "x$have_libudev" != xyes; then
+- AC_MSG_ERROR([libudev-dev required for building DRI])
++ if test "x$have_pci_id" != xyes; then
++ AC_MSG_ERROR([libudev-dev or sysfs required for building DRI])
+ fi
+
+ case "$host_cpu" in
+@@ -1252,8 +1266,8 @@ if test "x$enable_gbm" = xauto; then
+ esac
+ fi
+ if test "x$enable_gbm" = xyes; then
+- if test "x$need_libudev$have_libudev" = xyesno; then
+- AC_MSG_ERROR([gbm requires udev >= $LIBUDEV_REQUIRED])
++ if test "x$need_pci_id$have_pci_id" = xyesno; then
++ AC_MSG_ERROR([gbm requires udev >= $LIBUDEV_REQUIRED or sysfs])
+ fi
+
+ if test "x$enable_dri" = xyes; then
+@@ -1271,7 +1285,7 @@ if test "x$enable_gbm" = xyes; then
+ fi
+ fi
+ AM_CONDITIONAL(HAVE_GBM, test "x$enable_gbm" = xyes)
+-if test "x$need_libudev" = xyes; then
++if test "x$need_pci_id$have_libudev" = xyesyes; then
+ GBM_PC_REQ_PRIV="libudev >= $LIBUDEV_REQUIRED"
+ else
+ GBM_PC_REQ_PRIV=""
+@@ -1560,9 +1574,9 @@ for plat in $egl_platforms; do
+ ;;
+ esac
+
+- case "$plat$need_libudev$have_libudev" in
++ case "$plat$need_pci_id$have_pci_id" in
+ waylandyesno|drmyesno)
+- AC_MSG_ERROR([cannot build $plat platform without udev >= $LIBUDEV_REQUIRED]) ;;
++ AC_MSG_ERROR([cannot build $plat platform without udev >= $LIBUDEV_REQUIRED or sysfs]) ;;
+ esac
+ done
+
+@@ -1843,8 +1857,8 @@ gallium_require_llvm() {
+
+ gallium_require_drm_loader() {
+ if test "x$enable_gallium_loader" = xyes; then
+- if test "x$need_libudev$have_libudev" = xyesno; then
+- AC_MSG_ERROR([Gallium drm loader requires libudev >= $LIBUDEV_REQUIRED])
++ if test "x$need_pci_id$have_pci_id" = xyesno; then
++ AC_MSG_ERROR([Gallium drm loader requires libudev >= $LIBUDEV_REQUIRED or sysfs])
+ fi
+ if test "x$have_libdrm" != xyes; then
+ AC_MSG_ERROR([Gallium drm loader requires libdrm >= $LIBDRM_REQUIRED])
+--- a/src/loader/loader.c 2014-09-19 13:03:22.000000000 -0400
++++ b/src/loader/loader.c 2014-11-25 12:46:51.412249717 -0500
+@@ -71,6 +71,10 @@
+ #include <assert.h>
+ #include <dlfcn.h>
+ #endif
++#ifdef HAVE_SYSFS
++#include <sys/stat.h>
++#include <sys/types.h>
++#endif
+ #include "loader.h"
+
+ #ifndef __NOT_HAVE_DRM_H
+@@ -113,8 +117,8 @@
+ udev_handle = dlopen("libudev.so.0", RTLD_LOCAL | RTLD_LAZY);
+
+ if (!udev_handle) {
+- log_(_LOADER_FATAL, "Couldn't dlopen libudev.so.1 or libudev.so.0, "
+- "driver detection may be broken.\n");
++ log_(_LOADER_WARNING, "Couldn't dlopen libudev.so.1 or "
++ "libudev.so.0, driver detection may be broken.\n");
+ }
+ }
+ }
+@@ -122,16 +126,19 @@
+ return udev_handle;
+ }
+
++static int dlsym_failed = 0;
++
+ static void *
+-asserted_dlsym(void *dlopen_handle, const char *name)
++checked_dlsym(void *dlopen_handle, const char *name)
+ {
+ void *result = dlsym(dlopen_handle, name);
+- assert(result);
++ if (!result)
++ dlsym_failed = 1;
+ return result;
+ }
+
+ #define UDEV_SYMBOL(ret, name, args) \
+- ret (*name) args = asserted_dlsym(udev_dlopen_handle(), #name);
++ ret (*name) args = checked_dlsym(udev_dlopen_handle(), #name);
+
+
+ static inline struct udev_device *
+@@ -142,6 +149,9 @@
+ UDEV_SYMBOL(struct udev_device *, udev_device_new_from_devnum,
+ (struct udev *udev, char type, dev_t devnum));
+
++ if (dlsym_failed)
++ return NULL;
++
+ if (fstat(fd, &buf) < 0) {
+ log_(_LOADER_WARNING, "MESA-LOADER: failed to stat fd %d\n", fd);
+ return NULL;
+@@ -157,8 +167,8 @@
+ return device;
+ }
+
+-int
+-loader_get_pci_id_for_fd(int fd, int *vendor_id, int *chip_id)
++static int
++libudev_get_pci_id_for_fd(int fd, int *vendor_id, int *chip_id)
+ {
+ struct udev *udev = NULL;
+ struct udev_device *device = NULL, *parent;
+@@ -174,6 +184,9 @@
+
+ *chip_id = -1;
+
++ if (dlsym_failed)
++ return 0;
++
+ udev = udev_new();
+ device = udev_device_new_from_fd(udev, fd);
+ if (!device)
+@@ -201,16 +214,76 @@
+
+ return (*chip_id >= 0);
+ }
++#endif
++
++#if defined(HAVE_SYSFS)
++static int
++dev_node_from_fd(int fd, unsigned int *maj, unsigned int *min)
++{
++ struct stat buf;
++
++ if (fstat(fd, &buf) < 0) {
++ log_(_LOADER_WARNING, "MESA-LOADER: failed to stat fd %d\n", fd);
++ return -1;
++ }
++
++ if (!S_ISCHR(buf.st_mode)) {
++ log_(_LOADER_WARNING, "MESA-LOADER: fd %d not a character device\n", fd);
++ return -1;
++ }
++
++ *maj = major(buf.st_rdev);
++ *min = minor(buf.st_rdev);
++
++ return 0;
++}
++
++static int
++sysfs_get_pci_id_for_fd(int fd, int *vendor_id, int *chip_id)
++{
++ unsigned int maj, min;
++ FILE *f;
++ char buf[0x40];
+
+-#elif !defined(__NOT_HAVE_DRM_H)
++ if (dev_node_from_fd(fd, &maj, &min) < 0) {
++ *chip_id = -1;
++ return 0;
++ }
+
++ snprintf(buf, sizeof(buf), "/sys/dev/char/%d:%d/device/vendor", maj, min);
++ if (!(f = fopen(buf, "r"))) {
++ *chip_id = -1;
++ return 0;
++ }
++ if (fscanf(f, "%x", vendor_id) != 1) {
++ *chip_id = -1;
++ fclose(f);
++ return 0;
++ }
++ fclose(f);
++ snprintf(buf, sizeof(buf), "/sys/dev/char/%d:%d/device/device", maj, min);
++ if (!(f = fopen(buf, "r"))) {
++ *chip_id = -1;
++ return 0;
++ }
++ if (fscanf(f, "%x", chip_id) != 1) {
++ *chip_id = -1;
++ fclose(f);
++ return 0;
++ }
++ fclose(f);
++ return 1;
++}
++#endif
++
++#if !defined(__NOT_HAVE_DRM_H)
+ /* for i915 */
+ #include <i915_drm.h>
+ /* for radeon */
+ #include <radeon_drm.h>
+
+-int
+-loader_get_pci_id_for_fd(int fd, int *vendor_id, int *chip_id)
++static int
++drm_get_pci_id_for_fd(int fd, int *vendor_id, int *chip_id)
+ {
+ drmVersionPtr version;
+
+@@ -272,23 +345,33 @@
+
+ return (*chip_id >= 0);
+ }
++#endif
+
+-#else
+
+ int
+ loader_get_pci_id_for_fd(int fd, int *vendor_id, int *chip_id)
+ {
++#if HAVE_LIBUDEV
++ if (libudev_get_pci_id_for_fd(fd, vendor_id, chip_id))
++ return 1;
++#endif
++#if HAVE_SYSFS
++ if (sysfs_get_pci_id_for_fd(fd, vendor_id, chip_id))
++ return 1;
++#endif
++#if !defined(__NOT_HAVE_DRM_H)
++ if (drm_get_pci_id_for_fd(fd, vendor_id, chip_id))
++ return 1;
++#endif
+ return 0;
+ }
+
+-#endif
+-
+
+-char *
+-loader_get_device_name_for_fd(int fd)
++#ifdef HAVE_LIBUDEV
++static char *
++libudev_get_device_name_for_fd(int fd)
+ {
+ char *device_name = NULL;
+-#ifdef HAVE_LIBUDEV
+ struct udev *udev;
+ struct udev_device *device;
+ const char *const_device_name;
+@@ -312,9 +395,66 @@
+ out:
+ udev_device_unref(device);
+ udev_unref(udev);
++ return device_name;
++}
+ #endif
++
++
++#if HAVE_SYSFS
++static char *
++sysfs_get_device_name_for_fd(int fd)
++{
++ char *device_name = NULL;
++ unsigned int maj, min;
++ FILE *f;
++ char buf[0x40];
++ static const char match[9] = "\0DEVNAME=";
++ int expected = 1;
++
++ if (dev_node_from_fd(fd, &maj, &min) < 0)
++ return NULL;
++
++ snprintf(buf, sizeof(buf), "/sys/dev/char/%d:%d/uevent", maj, min);
++ if (!(f = fopen(buf, "r")))
++ return NULL;
++
++ while (expected < sizeof(match)) {
++ int c = getc(f);
++
++ if (c == EOF) {
++ fclose(f);
++ return NULL;
++ } else if (c == match[expected] )
++ expected++;
++ else
++ expected = 0;
++ }
++
++ strcpy(buf, "/dev/");
++ if (fgets(buf + 5, sizeof(buf) - 5, f))
++ device_name = strdup(buf);
++
++ fclose(f);
+ return device_name;
+ }
++#endif
++
++
++char *
++loader_get_device_name_for_fd(int fd)
++{
++ char *result = NULL;
++
++#if HAVE_LIBUDEV
++ if ((result = libudev_get_device_name_for_fd(fd)))
++ return result;
++#endif
++#if HAVE_SYSFS
++ if ((result = sysfs_get_device_name_for_fd(fd)))
++ return result;
++#endif
++ return result;
++}
+
+ char *
+ loader_get_driver_for_fd(int fd, unsigned driver_types)
diff --git a/media-libs/mesa/files/mesa-10.3.7-dont-use-clrsb.patch b/media-libs/mesa/files/mesa-10.3.7-dont-use-clrsb.patch
new file mode 100644
index 000000000000..c38757dca42a
--- /dev/null
+++ b/media-libs/mesa/files/mesa-10.3.7-dont-use-clrsb.patch
@@ -0,0 +1,36 @@
+From 32e98e8ef06f0bb6ad55f9fb5858be77c03367b0 Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88@gmail.com>
+Date: Mon, 2 Feb 2015 17:26:49 -0800
+Subject: [PATCH] gallium/util: Don't use __builtin_clrsb in util_last_bit().
+
+Unclear circumstances lead to undefined symbols on x86.
+
+Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=536916
+Cc: mesa-stable@lists.freedesktop.org
+Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
+---
+ src/gallium/auxiliary/util/u_math.h | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/src/gallium/auxiliary/util/u_math.h b/src/gallium/auxiliary/util/u_math.h
+index 19c7343..ca6d0f1 100644
+--- a/src/gallium/auxiliary/util/u_math.h
++++ b/src/gallium/auxiliary/util/u_math.h
+@@ -561,14 +561,10 @@ util_last_bit(unsigned u)
+ static INLINE unsigned
+ util_last_bit_signed(int i)
+ {
+-#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 407) && !defined(__INTEL_COMPILER)
+- return 31 - __builtin_clrsb(i);
+-#else
+ if (i >= 0)
+ return util_last_bit(i);
+ else
+ return util_last_bit(~(unsigned)i);
+-#endif
+ }
+
+ /* Destructively loop over all of the bits in a mask as in:
+--
+2.0.4
+
diff --git a/media-libs/mesa/files/mesa-10.3.7-format_utils.c.patch b/media-libs/mesa/files/mesa-10.3.7-format_utils.c.patch
new file mode 100644
index 000000000000..e1fba03432f3
--- /dev/null
+++ b/media-libs/mesa/files/mesa-10.3.7-format_utils.c.patch
@@ -0,0 +1,1089 @@
+From cfeb394224f2daeb2139cf4ec489a4dd8297a44d Mon Sep 17 00:00:00 2001
+From: Brian Paul <brianp@vmware.com>
+Date: Fri, 12 Sep 2014 08:31:15 -0600
+Subject: [PATCH] mesa: break up _mesa_swizzle_and_convert() to reduce compile
+ time
+
+This reduces gcc -O3 compile time to 1/4 of what it was on my system.
+Reduces MSVC release build time too.
+
+Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
+---
+ src/mesa/main/format_utils.c | 1030 ++++++++++++++++++++++--------------------
+ 1 file changed, 550 insertions(+), 480 deletions(-)
+
+diff --git a/src/mesa/main/format_utils.c b/src/mesa/main/format_utils.c
+index 240e3bc..29d779a 100644
+--- a/src/mesa/main/format_utils.c
++++ b/src/mesa/main/format_utils.c
+@@ -352,9 +352,14 @@ swizzle_convert_try_memcpy(void *dst, GLenum dst_type, int num_dst_channels,
+ */
+ #define SWIZZLE_CONVERT(DST_TYPE, SRC_TYPE, CONV) \
+ do { \
++ const uint8_t swizzle_x = swizzle[0]; \
++ const uint8_t swizzle_y = swizzle[1]; \
++ const uint8_t swizzle_z = swizzle[2]; \
++ const uint8_t swizzle_w = swizzle[3]; \
+ const SRC_TYPE *typed_src = void_src; \
+ DST_TYPE *typed_dst = void_dst; \
+ DST_TYPE tmp[7]; \
++ int s, j; \
+ tmp[4] = 0; \
+ tmp[5] = one; \
+ switch (num_dst_channels) { \
+@@ -423,7 +428,527 @@ swizzle_convert_try_memcpy(void *dst, GLenum dst_type, int num_dst_channels,
+ } \
+ break; \
+ } \
+- } while (0);
++ } while (0)
++
++
++static void
++convert_float(void *void_dst, int num_dst_channels,
++ const void *void_src, GLenum src_type, int num_src_channels,
++ const uint8_t swizzle[4], bool normalized, int count)
++{
++ const float one = 1.0f;
++
++ switch (src_type) {
++ case GL_FLOAT:
++ SWIZZLE_CONVERT(float, float, src);
++ break;
++ case GL_HALF_FLOAT:
++ SWIZZLE_CONVERT(float, uint16_t, _mesa_half_to_float(src));
++ break;
++ case GL_UNSIGNED_BYTE:
++ if (normalized) {
++ SWIZZLE_CONVERT(float, uint8_t, unorm_to_float(src, 8));
++ } else {
++ SWIZZLE_CONVERT(float, uint8_t, src);
++ }
++ break;
++ case GL_BYTE:
++ if (normalized) {
++ SWIZZLE_CONVERT(float, int8_t, snorm_to_float(src, 8));
++ } else {
++ SWIZZLE_CONVERT(float, int8_t, src);
++ }
++ break;
++ case GL_UNSIGNED_SHORT:
++ if (normalized) {
++ SWIZZLE_CONVERT(float, uint16_t, unorm_to_float(src, 16));
++ } else {
++ SWIZZLE_CONVERT(float, uint16_t, src);
++ }
++ break;
++ case GL_SHORT:
++ if (normalized) {
++ SWIZZLE_CONVERT(float, int16_t, snorm_to_float(src, 16));
++ } else {
++ SWIZZLE_CONVERT(float, int16_t, src);
++ }
++ break;
++ case GL_UNSIGNED_INT:
++ if (normalized) {
++ SWIZZLE_CONVERT(float, uint32_t, unorm_to_float(src, 32));
++ } else {
++ SWIZZLE_CONVERT(float, uint32_t, src);
++ }
++ break;
++ case GL_INT:
++ if (normalized) {
++ SWIZZLE_CONVERT(float, int32_t, snorm_to_float(src, 32));
++ } else {
++ SWIZZLE_CONVERT(float, int32_t, src);
++ }
++ break;
++ default:
++ assert(!"Invalid channel type combination");
++ }
++}
++
++
++static void
++convert_half_float(void *void_dst, int num_dst_channels,
++ const void *void_src, GLenum src_type, int num_src_channels,
++ const uint8_t swizzle[4], bool normalized, int count)
++{
++ const uint16_t one = _mesa_float_to_half(1.0f);
++
++ switch (src_type) {
++ case GL_FLOAT:
++ SWIZZLE_CONVERT(uint16_t, float, _mesa_float_to_half(src));
++ break;
++ case GL_HALF_FLOAT:
++ SWIZZLE_CONVERT(uint16_t, uint16_t, src);
++ break;
++ case GL_UNSIGNED_BYTE:
++ if (normalized) {
++ SWIZZLE_CONVERT(uint16_t, uint8_t, unorm_to_half(src, 8));
++ } else {
++ SWIZZLE_CONVERT(uint16_t, uint8_t, _mesa_float_to_half(src));
++ }
++ break;
++ case GL_BYTE:
++ if (normalized) {
++ SWIZZLE_CONVERT(uint16_t, int8_t, snorm_to_half(src, 8));
++ } else {
++ SWIZZLE_CONVERT(uint16_t, int8_t, _mesa_float_to_half(src));
++ }
++ break;
++ case GL_UNSIGNED_SHORT:
++ if (normalized) {
++ SWIZZLE_CONVERT(uint16_t, uint16_t, unorm_to_half(src, 16));
++ } else {
++ SWIZZLE_CONVERT(uint16_t, uint16_t, _mesa_float_to_half(src));
++ }
++ break;
++ case GL_SHORT:
++ if (normalized) {
++ SWIZZLE_CONVERT(uint16_t, int16_t, snorm_to_half(src, 16));
++ } else {
++ SWIZZLE_CONVERT(uint16_t, int16_t, _mesa_float_to_half(src));
++ }
++ break;
++ case GL_UNSIGNED_INT:
++ if (normalized) {
++ SWIZZLE_CONVERT(uint16_t, uint32_t, unorm_to_half(src, 32));
++ } else {
++ SWIZZLE_CONVERT(uint16_t, uint32_t, _mesa_float_to_half(src));
++ }
++ break;
++ case GL_INT:
++ if (normalized) {
++ SWIZZLE_CONVERT(uint16_t, int32_t, snorm_to_half(src, 32));
++ } else {
++ SWIZZLE_CONVERT(uint16_t, int32_t, _mesa_float_to_half(src));
++ }
++ break;
++ default:
++ assert(!"Invalid channel type combination");
++ }
++}
++
++
++static void
++convert_ubyte(void *void_dst, int num_dst_channels,
++ const void *void_src, GLenum src_type, int num_src_channels,
++ const uint8_t swizzle[4], bool normalized, int count)
++{
++ const uint8_t one = normalized ? UINT8_MAX : 1;
++
++ switch (src_type) {
++ case GL_FLOAT:
++ if (normalized) {
++ SWIZZLE_CONVERT(uint8_t, float, float_to_unorm(src, 8));
++ } else {
++ SWIZZLE_CONVERT(uint8_t, float, (src < 0) ? 0 : src);
++ }
++ break;
++ case GL_HALF_FLOAT:
++ if (normalized) {
++ SWIZZLE_CONVERT(uint8_t, uint16_t, half_to_unorm(src, 8));
++ } else {
++ SWIZZLE_CONVERT(uint8_t, uint16_t, half_to_uint(src));
++ }
++ break;
++ case GL_UNSIGNED_BYTE:
++ SWIZZLE_CONVERT(uint8_t, uint8_t, src);
++ break;
++ case GL_BYTE:
++ if (normalized) {
++ SWIZZLE_CONVERT(uint8_t, int8_t, snorm_to_unorm(src, 8, 8));
++ } else {
++ SWIZZLE_CONVERT(uint8_t, int8_t, (src < 0) ? 0 : src);
++ }
++ break;
++ case GL_UNSIGNED_SHORT:
++ if (normalized) {
++ SWIZZLE_CONVERT(uint8_t, uint16_t, unorm_to_unorm(src, 16, 8));
++ } else {
++ SWIZZLE_CONVERT(uint8_t, uint16_t, src);
++ }
++ break;
++ case GL_SHORT:
++ if (normalized) {
++ SWIZZLE_CONVERT(uint8_t, int16_t, snorm_to_unorm(src, 16, 8));
++ } else {
++ SWIZZLE_CONVERT(uint8_t, int16_t, (src < 0) ? 0 : src);
++ }
++ break;
++ case GL_UNSIGNED_INT:
++ if (normalized) {
++ SWIZZLE_CONVERT(uint8_t, uint32_t, unorm_to_unorm(src, 32, 8));
++ } else {
++ SWIZZLE_CONVERT(uint8_t, uint32_t, src);
++ }
++ break;
++ case GL_INT:
++ if (normalized) {
++ SWIZZLE_CONVERT(uint8_t, int32_t, snorm_to_unorm(src, 32, 8));
++ } else {
++ SWIZZLE_CONVERT(uint8_t, int32_t, (src < 0) ? 0 : src);
++ }
++ break;
++ default:
++ assert(!"Invalid channel type combination");
++ }
++}
++
++
++static void
++convert_byte(void *void_dst, int num_dst_channels,
++ const void *void_src, GLenum src_type, int num_src_channels,
++ const uint8_t swizzle[4], bool normalized, int count)
++{
++ const int8_t one = normalized ? INT8_MAX : 1;
++
++ switch (src_type) {
++ case GL_FLOAT:
++ if (normalized) {
++ SWIZZLE_CONVERT(uint8_t, float, float_to_snorm(src, 8));
++ } else {
++ SWIZZLE_CONVERT(uint8_t, float, src);
++ }
++ break;
++ case GL_HALF_FLOAT:
++ if (normalized) {
++ SWIZZLE_CONVERT(uint8_t, uint16_t, half_to_snorm(src, 8));
++ } else {
++ SWIZZLE_CONVERT(uint8_t, uint16_t, _mesa_half_to_float(src));
++ }
++ break;
++ case GL_UNSIGNED_BYTE:
++ if (normalized) {
++ SWIZZLE_CONVERT(int8_t, uint8_t, unorm_to_snorm(src, 8, 8));
++ } else {
++ SWIZZLE_CONVERT(int8_t, uint8_t, src);
++ }
++ break;
++ case GL_BYTE:
++ SWIZZLE_CONVERT(int8_t, int8_t, src);
++ break;
++ case GL_UNSIGNED_SHORT:
++ if (normalized) {
++ SWIZZLE_CONVERT(int8_t, uint16_t, unorm_to_snorm(src, 16, 8));
++ } else {
++ SWIZZLE_CONVERT(int8_t, uint16_t, src);
++ }
++ break;
++ case GL_SHORT:
++ if (normalized) {
++ SWIZZLE_CONVERT(int8_t, int16_t, snorm_to_snorm(src, 16, 8));
++ } else {
++ SWIZZLE_CONVERT(int8_t, int16_t, src);
++ }
++ break;
++ case GL_UNSIGNED_INT:
++ if (normalized) {
++ SWIZZLE_CONVERT(int8_t, uint32_t, unorm_to_snorm(src, 32, 8));
++ } else {
++ SWIZZLE_CONVERT(int8_t, uint32_t, src);
++ }
++ break;
++ case GL_INT:
++ if (normalized) {
++ SWIZZLE_CONVERT(int8_t, int32_t, snorm_to_snorm(src, 32, 8));
++ } else {
++ SWIZZLE_CONVERT(int8_t, int32_t, src);
++ }
++ break;
++ default:
++ assert(!"Invalid channel type combination");
++ }
++}
++
++
++static void
++convert_ushort(void *void_dst, int num_dst_channels,
++ const void *void_src, GLenum src_type, int num_src_channels,
++ const uint8_t swizzle[4], bool normalized, int count)
++{
++ const uint16_t one = normalized ? UINT16_MAX : 1;
++
++ switch (src_type) {
++ case GL_FLOAT:
++ if (normalized) {
++ SWIZZLE_CONVERT(uint16_t, float, float_to_unorm(src, 16));
++ } else {
++ SWIZZLE_CONVERT(uint16_t, float, (src < 0) ? 0 : src);
++ }
++ break;
++ case GL_HALF_FLOAT:
++ if (normalized) {
++ SWIZZLE_CONVERT(uint16_t, uint16_t, half_to_unorm(src, 16));
++ } else {
++ SWIZZLE_CONVERT(uint16_t, uint16_t, half_to_uint(src));
++ }
++ break;
++ case GL_UNSIGNED_BYTE:
++ if (normalized) {
++ SWIZZLE_CONVERT(uint16_t, uint8_t, unorm_to_unorm(src, 8, 16));
++ } else {
++ SWIZZLE_CONVERT(uint16_t, uint8_t, src);
++ }
++ break;
++ case GL_BYTE:
++ if (normalized) {
++ SWIZZLE_CONVERT(uint16_t, int8_t, snorm_to_unorm(src, 8, 16));
++ } else {
++ SWIZZLE_CONVERT(uint16_t, int8_t, (src < 0) ? 0 : src);
++ }
++ break;
++ case GL_UNSIGNED_SHORT:
++ SWIZZLE_CONVERT(uint16_t, uint16_t, src);
++ break;
++ case GL_SHORT:
++ if (normalized) {
++ SWIZZLE_CONVERT(uint16_t, int16_t, snorm_to_unorm(src, 16, 16));
++ } else {
++ SWIZZLE_CONVERT(uint16_t, int16_t, (src < 0) ? 0 : src);
++ }
++ break;
++ case GL_UNSIGNED_INT:
++ if (normalized) {
++ SWIZZLE_CONVERT(uint16_t, uint32_t, unorm_to_unorm(src, 32, 16));
++ } else {
++ SWIZZLE_CONVERT(uint16_t, uint32_t, src);
++ }
++ break;
++ case GL_INT:
++ if (normalized) {
++ SWIZZLE_CONVERT(uint16_t, int32_t, snorm_to_unorm(src, 32, 16));
++ } else {
++ SWIZZLE_CONVERT(uint16_t, int32_t, (src < 0) ? 0 : src);
++ }
++ break;
++ default:
++ assert(!"Invalid channel type combination");
++ }
++}
++
++
++static void
++convert_short(void *void_dst, int num_dst_channels,
++ const void *void_src, GLenum src_type, int num_src_channels,
++ const uint8_t swizzle[4], bool normalized, int count)
++{
++ const int16_t one = normalized ? INT16_MAX : 1;
++
++ switch (src_type) {
++ case GL_FLOAT:
++ if (normalized) {
++ SWIZZLE_CONVERT(uint16_t, float, float_to_snorm(src, 16));
++ } else {
++ SWIZZLE_CONVERT(uint16_t, float, src);
++ }
++ break;
++ case GL_HALF_FLOAT:
++ if (normalized) {
++ SWIZZLE_CONVERT(uint16_t, uint16_t, half_to_snorm(src, 16));
++ } else {
++ SWIZZLE_CONVERT(uint16_t, uint16_t, _mesa_half_to_float(src));
++ }
++ break;
++ case GL_UNSIGNED_BYTE:
++ if (normalized) {
++ SWIZZLE_CONVERT(int16_t, uint8_t, unorm_to_snorm(src, 8, 16));
++ } else {
++ SWIZZLE_CONVERT(int16_t, uint8_t, src);
++ }
++ break;
++ case GL_BYTE:
++ if (normalized) {
++ SWIZZLE_CONVERT(int16_t, int8_t, snorm_to_snorm(src, 8, 16));
++ } else {
++ SWIZZLE_CONVERT(int16_t, int8_t, src);
++ }
++ break;
++ case GL_UNSIGNED_SHORT:
++ if (normalized) {
++ SWIZZLE_CONVERT(int16_t, uint16_t, unorm_to_snorm(src, 16, 16));
++ } else {
++ SWIZZLE_CONVERT(int16_t, uint16_t, src);
++ }
++ break;
++ case GL_SHORT:
++ SWIZZLE_CONVERT(int16_t, int16_t, src);
++ break;
++ case GL_UNSIGNED_INT:
++ if (normalized) {
++ SWIZZLE_CONVERT(int16_t, uint32_t, unorm_to_snorm(src, 32, 16));
++ } else {
++ SWIZZLE_CONVERT(int16_t, uint32_t, src);
++ }
++ break;
++ case GL_INT:
++ if (normalized) {
++ SWIZZLE_CONVERT(int16_t, int32_t, snorm_to_snorm(src, 32, 16));
++ } else {
++ SWIZZLE_CONVERT(int16_t, int32_t, src);
++ }
++ break;
++ default:
++ assert(!"Invalid channel type combination");
++ }
++}
++
++static void
++convert_uint(void *void_dst, int num_dst_channels,
++ const void *void_src, GLenum src_type, int num_src_channels,
++ const uint8_t swizzle[4], bool normalized, int count)
++{
++ const uint32_t one = normalized ? UINT32_MAX : 1;
++
++ switch (src_type) {
++ case GL_FLOAT:
++ if (normalized) {
++ SWIZZLE_CONVERT(uint32_t, float, float_to_unorm(src, 32));
++ } else {
++ SWIZZLE_CONVERT(uint32_t, float, (src < 0) ? 0 : src);
++ }
++ break;
++ case GL_HALF_FLOAT:
++ if (normalized) {
++ SWIZZLE_CONVERT(uint32_t, uint16_t, half_to_unorm(src, 32));
++ } else {
++ SWIZZLE_CONVERT(uint32_t, uint16_t, half_to_uint(src));
++ }
++ break;
++ case GL_UNSIGNED_BYTE:
++ if (normalized) {
++ SWIZZLE_CONVERT(uint32_t, uint8_t, unorm_to_unorm(src, 8, 32));
++ } else {
++ SWIZZLE_CONVERT(uint32_t, uint8_t, src);
++ }
++ break;
++ case GL_BYTE:
++ if (normalized) {
++ SWIZZLE_CONVERT(uint32_t, int8_t, snorm_to_unorm(src, 8, 32));
++ } else {
++ SWIZZLE_CONVERT(uint32_t, int8_t, (src < 0) ? 0 : src);
++ }
++ break;
++ case GL_UNSIGNED_SHORT:
++ if (normalized) {
++ SWIZZLE_CONVERT(uint32_t, uint16_t, unorm_to_unorm(src, 16, 32));
++ } else {
++ SWIZZLE_CONVERT(uint32_t, uint16_t, src);
++ }
++ break;
++ case GL_SHORT:
++ if (normalized) {
++ SWIZZLE_CONVERT(uint32_t, int16_t, snorm_to_unorm(src, 16, 32));
++ } else {
++ SWIZZLE_CONVERT(uint32_t, int16_t, (src < 0) ? 0 : src);
++ }
++ break;
++ case GL_UNSIGNED_INT:
++ SWIZZLE_CONVERT(uint32_t, uint32_t, src);
++ break;
++ case GL_INT:
++ if (normalized) {
++ SWIZZLE_CONVERT(uint32_t, int32_t, snorm_to_unorm(src, 32, 32));
++ } else {
++ SWIZZLE_CONVERT(uint32_t, int32_t, (src < 0) ? 0 : src);
++ }
++ break;
++ default:
++ assert(!"Invalid channel type combination");
++ }
++}
++
++
++static void
++convert_int(void *void_dst, int num_dst_channels,
++ const void *void_src, GLenum src_type, int num_src_channels,
++ const uint8_t swizzle[4], bool normalized, int count)
++{
++ const int32_t one = normalized ? INT32_MAX : 12;
++
++ switch (src_type) {
++ case GL_FLOAT:
++ if (normalized) {
++ SWIZZLE_CONVERT(uint32_t, float, float_to_snorm(src, 32));
++ } else {
++ SWIZZLE_CONVERT(uint32_t, float, src);
++ }
++ break;
++ case GL_HALF_FLOAT:
++ if (normalized) {
++ SWIZZLE_CONVERT(uint32_t, uint16_t, half_to_snorm(src, 32));
++ } else {
++ SWIZZLE_CONVERT(uint32_t, uint16_t, _mesa_half_to_float(src));
++ }
++ break;
++ case GL_UNSIGNED_BYTE:
++ if (normalized) {
++ SWIZZLE_CONVERT(int32_t, uint8_t, unorm_to_snorm(src, 8, 32));
++ } else {
++ SWIZZLE_CONVERT(int32_t, uint8_t, src);
++ }
++ break;
++ case GL_BYTE:
++ if (normalized) {
++ SWIZZLE_CONVERT(int32_t, int8_t, snorm_to_snorm(src, 8, 32));
++ } else {
++ SWIZZLE_CONVERT(int32_t, int8_t, src);
++ }
++ break;
++ case GL_UNSIGNED_SHORT:
++ if (normalized) {
++ SWIZZLE_CONVERT(int32_t, uint16_t, unorm_to_snorm(src, 16, 32));
++ } else {
++ SWIZZLE_CONVERT(int32_t, uint16_t, src);
++ }
++ break;
++ case GL_SHORT:
++ if (normalized) {
++ SWIZZLE_CONVERT(int32_t, int16_t, snorm_to_snorm(src, 16, 32));
++ } else {
++ SWIZZLE_CONVERT(int32_t, int16_t, src);
++ }
++ break;
++ case GL_UNSIGNED_INT:
++ if (normalized) {
++ SWIZZLE_CONVERT(int32_t, uint32_t, unorm_to_snorm(src, 32, 32));
++ } else {
++ SWIZZLE_CONVERT(int32_t, uint32_t, src);
++ }
++ break;
++ case GL_INT:
++ SWIZZLE_CONVERT(int32_t, int32_t, src);
++ break;
++ default:
++ assert(!"Invalid channel type combination");
++ }
++}
++
+
+ /**
+ * Convert between array-based color formats.
+@@ -478,499 +1003,44 @@ _mesa_swizzle_and_convert(void *void_dst, GLenum dst_type, int num_dst_channels,
+ const void *void_src, GLenum src_type, int num_src_channels,
+ const uint8_t swizzle[4], bool normalized, int count)
+ {
+- int s, j;
+- register uint8_t swizzle_x, swizzle_y, swizzle_z, swizzle_w;
+-
+ if (swizzle_convert_try_memcpy(void_dst, dst_type, num_dst_channels,
+ void_src, src_type, num_src_channels,
+ swizzle, normalized, count))
+ return;
+
+- swizzle_x = swizzle[0];
+- swizzle_y = swizzle[1];
+- swizzle_z = swizzle[2];
+- swizzle_w = swizzle[3];
+-
+ switch (dst_type) {
+ case GL_FLOAT:
+- {
+- const float one = 1.0f;
+- switch (src_type) {
+- case GL_FLOAT:
+- SWIZZLE_CONVERT(float, float, src)
+- break;
+- case GL_HALF_FLOAT:
+- SWIZZLE_CONVERT(float, uint16_t, _mesa_half_to_float(src))
+- break;
+- case GL_UNSIGNED_BYTE:
+- if (normalized) {
+- SWIZZLE_CONVERT(float, uint8_t, unorm_to_float(src, 8))
+- } else {
+- SWIZZLE_CONVERT(float, uint8_t, src)
+- }
+- break;
+- case GL_BYTE:
+- if (normalized) {
+- SWIZZLE_CONVERT(float, int8_t, snorm_to_float(src, 8))
+- } else {
+- SWIZZLE_CONVERT(float, int8_t, src)
+- }
+- break;
+- case GL_UNSIGNED_SHORT:
+- if (normalized) {
+- SWIZZLE_CONVERT(float, uint16_t, unorm_to_float(src, 16))
+- } else {
+- SWIZZLE_CONVERT(float, uint16_t, src)
+- }
+- break;
+- case GL_SHORT:
+- if (normalized) {
+- SWIZZLE_CONVERT(float, int16_t, snorm_to_float(src, 16))
+- } else {
+- SWIZZLE_CONVERT(float, int16_t, src)
+- }
+- break;
+- case GL_UNSIGNED_INT:
+- if (normalized) {
+- SWIZZLE_CONVERT(float, uint32_t, unorm_to_float(src, 32))
+- } else {
+- SWIZZLE_CONVERT(float, uint32_t, src)
+- }
+- break;
+- case GL_INT:
+- if (normalized) {
+- SWIZZLE_CONVERT(float, int32_t, snorm_to_float(src, 32))
+- } else {
+- SWIZZLE_CONVERT(float, int32_t, src)
+- }
+- break;
+- default:
+- assert(!"Invalid channel type combination");
+- }
+- }
+- break;
++ convert_float(void_dst, num_dst_channels, void_src, src_type,
++ num_src_channels, swizzle, normalized, count);
++ break;
+ case GL_HALF_FLOAT:
+- {
+- const uint16_t one = _mesa_float_to_half(1.0f);
+- switch (src_type) {
+- case GL_FLOAT:
+- SWIZZLE_CONVERT(uint16_t, float, _mesa_float_to_half(src))
+- break;
+- case GL_HALF_FLOAT:
+- SWIZZLE_CONVERT(uint16_t, uint16_t, src)
+- break;
+- case GL_UNSIGNED_BYTE:
+- if (normalized) {
+- SWIZZLE_CONVERT(uint16_t, uint8_t, unorm_to_half(src, 8))
+- } else {
+- SWIZZLE_CONVERT(uint16_t, uint8_t, _mesa_float_to_half(src))
+- }
+- break;
+- case GL_BYTE:
+- if (normalized) {
+- SWIZZLE_CONVERT(uint16_t, int8_t, snorm_to_half(src, 8))
+- } else {
+- SWIZZLE_CONVERT(uint16_t, int8_t, _mesa_float_to_half(src))
+- }
+- break;
+- case GL_UNSIGNED_SHORT:
+- if (normalized) {
+- SWIZZLE_CONVERT(uint16_t, uint16_t, unorm_to_half(src, 16))
+- } else {
+- SWIZZLE_CONVERT(uint16_t, uint16_t, _mesa_float_to_half(src))
+- }
+- break;
+- case GL_SHORT:
+- if (normalized) {
+- SWIZZLE_CONVERT(uint16_t, int16_t, snorm_to_half(src, 16))
+- } else {
+- SWIZZLE_CONVERT(uint16_t, int16_t, _mesa_float_to_half(src))
+- }
+- break;
+- case GL_UNSIGNED_INT:
+- if (normalized) {
+- SWIZZLE_CONVERT(uint16_t, uint32_t, unorm_to_half(src, 32))
+- } else {
+- SWIZZLE_CONVERT(uint16_t, uint32_t, _mesa_float_to_half(src))
+- }
+- break;
+- case GL_INT:
+- if (normalized) {
+- SWIZZLE_CONVERT(uint16_t, int32_t, snorm_to_half(src, 32))
+- } else {
+- SWIZZLE_CONVERT(uint16_t, int32_t, _mesa_float_to_half(src))
+- }
+- break;
+- default:
+- assert(!"Invalid channel type combination");
+- }
+- }
+- break;
++ convert_half_float(void_dst, num_dst_channels, void_src, src_type,
++ num_src_channels, swizzle, normalized, count);
++ break;
+ case GL_UNSIGNED_BYTE:
+- {
+- const uint8_t one = normalized ? UINT8_MAX : 1;
+- switch (src_type) {
+- case GL_FLOAT:
+- if (normalized) {
+- SWIZZLE_CONVERT(uint8_t, float, float_to_unorm(src, 8))
+- } else {
+- SWIZZLE_CONVERT(uint8_t, float, (src < 0) ? 0 : src)
+- }
+- break;
+- case GL_HALF_FLOAT:
+- if (normalized) {
+- SWIZZLE_CONVERT(uint8_t, uint16_t, half_to_unorm(src, 8))
+- } else {
+- SWIZZLE_CONVERT(uint8_t, uint16_t, half_to_uint(src))
+- }
+- break;
+- case GL_UNSIGNED_BYTE:
+- SWIZZLE_CONVERT(uint8_t, uint8_t, src)
+- break;
+- case GL_BYTE:
+- if (normalized) {
+- SWIZZLE_CONVERT(uint8_t, int8_t, snorm_to_unorm(src, 8, 8))
+- } else {
+- SWIZZLE_CONVERT(uint8_t, int8_t, (src < 0) ? 0 : src)
+- }
+- break;
+- case GL_UNSIGNED_SHORT:
+- if (normalized) {
+- SWIZZLE_CONVERT(uint8_t, uint16_t, unorm_to_unorm(src, 16, 8))
+- } else {
+- SWIZZLE_CONVERT(uint8_t, uint16_t, src)
+- }
+- break;
+- case GL_SHORT:
+- if (normalized) {
+- SWIZZLE_CONVERT(uint8_t, int16_t, snorm_to_unorm(src, 16, 8))
+- } else {
+- SWIZZLE_CONVERT(uint8_t, int16_t, (src < 0) ? 0 : src)
+- }
+- break;
+- case GL_UNSIGNED_INT:
+- if (normalized) {
+- SWIZZLE_CONVERT(uint8_t, uint32_t, unorm_to_unorm(src, 32, 8))
+- } else {
+- SWIZZLE_CONVERT(uint8_t, uint32_t, src)
+- }
+- break;
+- case GL_INT:
+- if (normalized) {
+- SWIZZLE_CONVERT(uint8_t, int32_t, snorm_to_unorm(src, 32, 8))
+- } else {
+- SWIZZLE_CONVERT(uint8_t, int32_t, (src < 0) ? 0 : src)
+- }
+- break;
+- default:
+- assert(!"Invalid channel type combination");
+- }
+- }
+- break;
++ convert_ubyte(void_dst, num_dst_channels, void_src, src_type,
++ num_src_channels, swizzle, normalized, count);
++ break;
+ case GL_BYTE:
+- {
+- const int8_t one = normalized ? INT8_MAX : 1;
+- switch (src_type) {
+- case GL_FLOAT:
+- if (normalized) {
+- SWIZZLE_CONVERT(uint8_t, float, float_to_snorm(src, 8))
+- } else {
+- SWIZZLE_CONVERT(uint8_t, float, src)
+- }
+- break;
+- case GL_HALF_FLOAT:
+- if (normalized) {
+- SWIZZLE_CONVERT(uint8_t, uint16_t, half_to_snorm(src, 8))
+- } else {
+- SWIZZLE_CONVERT(uint8_t, uint16_t, _mesa_half_to_float(src))
+- }
+- break;
+- case GL_UNSIGNED_BYTE:
+- if (normalized) {
+- SWIZZLE_CONVERT(int8_t, uint8_t, unorm_to_snorm(src, 8, 8))
+- } else {
+- SWIZZLE_CONVERT(int8_t, uint8_t, src)
+- }
+- break;
+- case GL_BYTE:
+- SWIZZLE_CONVERT(int8_t, int8_t, src)
+- break;
+- case GL_UNSIGNED_SHORT:
+- if (normalized) {
+- SWIZZLE_CONVERT(int8_t, uint16_t, unorm_to_snorm(src, 16, 8))
+- } else {
+- SWIZZLE_CONVERT(int8_t, uint16_t, src)
+- }
+- break;
+- case GL_SHORT:
+- if (normalized) {
+- SWIZZLE_CONVERT(int8_t, int16_t, snorm_to_snorm(src, 16, 8))
+- } else {
+- SWIZZLE_CONVERT(int8_t, int16_t, src)
+- }
+- break;
+- case GL_UNSIGNED_INT:
+- if (normalized) {
+- SWIZZLE_CONVERT(int8_t, uint32_t, unorm_to_snorm(src, 32, 8))
+- } else {
+- SWIZZLE_CONVERT(int8_t, uint32_t, src)
+- }
+- break;
+- case GL_INT:
+- if (normalized) {
+- SWIZZLE_CONVERT(int8_t, int32_t, snorm_to_snorm(src, 32, 8))
+- } else {
+- SWIZZLE_CONVERT(int8_t, int32_t, src)
+- }
+- break;
+- default:
+- assert(!"Invalid channel type combination");
+- }
+- }
+- break;
++ convert_byte(void_dst, num_dst_channels, void_src, src_type,
++ num_src_channels, swizzle, normalized, count);
++ break;
+ case GL_UNSIGNED_SHORT:
+- {
+- const uint16_t one = normalized ? UINT16_MAX : 1;
+- switch (src_type) {
+- case GL_FLOAT:
+- if (normalized) {
+- SWIZZLE_CONVERT(uint16_t, float, float_to_unorm(src, 16))
+- } else {
+- SWIZZLE_CONVERT(uint16_t, float, (src < 0) ? 0 : src)
+- }
+- break;
+- case GL_HALF_FLOAT:
+- if (normalized) {
+- SWIZZLE_CONVERT(uint16_t, uint16_t, half_to_unorm(src, 16))
+- } else {
+- SWIZZLE_CONVERT(uint16_t, uint16_t, half_to_uint(src))
+- }
+- break;
+- case GL_UNSIGNED_BYTE:
+- if (normalized) {
+- SWIZZLE_CONVERT(uint16_t, uint8_t, unorm_to_unorm(src, 8, 16))
+- } else {
+- SWIZZLE_CONVERT(uint16_t, uint8_t, src)
+- }
+- break;
+- case GL_BYTE:
+- if (normalized) {
+- SWIZZLE_CONVERT(uint16_t, int8_t, snorm_to_unorm(src, 8, 16))
+- } else {
+- SWIZZLE_CONVERT(uint16_t, int8_t, (src < 0) ? 0 : src)
+- }
+- break;
+- case GL_UNSIGNED_SHORT:
+- SWIZZLE_CONVERT(uint16_t, uint16_t, src)
+- break;
+- case GL_SHORT:
+- if (normalized) {
+- SWIZZLE_CONVERT(uint16_t, int16_t, snorm_to_unorm(src, 16, 16))
+- } else {
+- SWIZZLE_CONVERT(uint16_t, int16_t, (src < 0) ? 0 : src)
+- }
+- break;
+- case GL_UNSIGNED_INT:
+- if (normalized) {
+- SWIZZLE_CONVERT(uint16_t, uint32_t, unorm_to_unorm(src, 32, 16))
+- } else {
+- SWIZZLE_CONVERT(uint16_t, uint32_t, src)
+- }
+- break;
+- case GL_INT:
+- if (normalized) {
+- SWIZZLE_CONVERT(uint16_t, int32_t, snorm_to_unorm(src, 32, 16))
+- } else {
+- SWIZZLE_CONVERT(uint16_t, int32_t, (src < 0) ? 0 : src)
+- }
+- break;
+- default:
+- assert(!"Invalid channel type combination");
+- }
+- }
+- break;
++ convert_ushort(void_dst, num_dst_channels, void_src, src_type,
++ num_src_channels, swizzle, normalized, count);
++ break;
+ case GL_SHORT:
+- {
+- const int16_t one = normalized ? INT16_MAX : 1;
+- switch (src_type) {
+- case GL_FLOAT:
+- if (normalized) {
+- SWIZZLE_CONVERT(uint16_t, float, float_to_snorm(src, 16))
+- } else {
+- SWIZZLE_CONVERT(uint16_t, float, src)
+- }
+- break;
+- case GL_HALF_FLOAT:
+- if (normalized) {
+- SWIZZLE_CONVERT(uint16_t, uint16_t, half_to_snorm(src, 16))
+- } else {
+- SWIZZLE_CONVERT(uint16_t, uint16_t, _mesa_half_to_float(src))
+- }
+- break;
+- case GL_UNSIGNED_BYTE:
+- if (normalized) {
+- SWIZZLE_CONVERT(int16_t, uint8_t, unorm_to_snorm(src, 8, 16))
+- } else {
+- SWIZZLE_CONVERT(int16_t, uint8_t, src)
+- }
+- break;
+- case GL_BYTE:
+- if (normalized) {
+- SWIZZLE_CONVERT(int16_t, int8_t, snorm_to_snorm(src, 8, 16))
+- } else {
+- SWIZZLE_CONVERT(int16_t, int8_t, src)
+- }
+- break;
+- case GL_UNSIGNED_SHORT:
+- if (normalized) {
+- SWIZZLE_CONVERT(int16_t, uint16_t, unorm_to_snorm(src, 16, 16))
+- } else {
+- SWIZZLE_CONVERT(int16_t, uint16_t, src)
+- }
+- break;
+- case GL_SHORT:
+- SWIZZLE_CONVERT(int16_t, int16_t, src)
+- break;
+- case GL_UNSIGNED_INT:
+- if (normalized) {
+- SWIZZLE_CONVERT(int16_t, uint32_t, unorm_to_snorm(src, 32, 16))
+- } else {
+- SWIZZLE_CONVERT(int16_t, uint32_t, src)
+- }
+- break;
+- case GL_INT:
+- if (normalized) {
+- SWIZZLE_CONVERT(int16_t, int32_t, snorm_to_snorm(src, 32, 16))
+- } else {
+- SWIZZLE_CONVERT(int16_t, int32_t, src)
+- }
+- break;
+- default:
+- assert(!"Invalid channel type combination");
+- }
+- }
+- break;
++ convert_short(void_dst, num_dst_channels, void_src, src_type,
++ num_src_channels, swizzle, normalized, count);
++ break;
+ case GL_UNSIGNED_INT:
+- {
+- const uint32_t one = normalized ? UINT32_MAX : 1;
+- switch (src_type) { case GL_FLOAT:
+- if (normalized) {
+- SWIZZLE_CONVERT(uint32_t, float, float_to_unorm(src, 32))
+- } else {
+- SWIZZLE_CONVERT(uint32_t, float, (src < 0) ? 0 : src)
+- }
+- break;
+- case GL_HALF_FLOAT:
+- if (normalized) {
+- SWIZZLE_CONVERT(uint32_t, uint16_t, half_to_unorm(src, 32))
+- } else {
+- SWIZZLE_CONVERT(uint32_t, uint16_t, half_to_uint(src))
+- }
+- break;
+- case GL_UNSIGNED_BYTE:
+- if (normalized) {
+- SWIZZLE_CONVERT(uint32_t, uint8_t, unorm_to_unorm(src, 8, 32))
+- } else {
+- SWIZZLE_CONVERT(uint32_t, uint8_t, src)
+- }
+- break;
+- case GL_BYTE:
+- if (normalized) {
+- SWIZZLE_CONVERT(uint32_t, int8_t, snorm_to_unorm(src, 8, 32))
+- } else {
+- SWIZZLE_CONVERT(uint32_t, int8_t, (src < 0) ? 0 : src)
+- }
+- break;
+- case GL_UNSIGNED_SHORT:
+- if (normalized) {
+- SWIZZLE_CONVERT(uint32_t, uint16_t, unorm_to_unorm(src, 16, 32))
+- } else {
+- SWIZZLE_CONVERT(uint32_t, uint16_t, src)
+- }
+- break;
+- case GL_SHORT:
+- if (normalized) {
+- SWIZZLE_CONVERT(uint32_t, int16_t, snorm_to_unorm(src, 16, 32))
+- } else {
+- SWIZZLE_CONVERT(uint32_t, int16_t, (src < 0) ? 0 : src)
+- }
+- break;
+- case GL_UNSIGNED_INT:
+- SWIZZLE_CONVERT(uint32_t, uint32_t, src)
+- break;
+- case GL_INT:
+- if (normalized) {
+- SWIZZLE_CONVERT(uint32_t, int32_t, snorm_to_unorm(src, 32, 32))
+- } else {
+- SWIZZLE_CONVERT(uint32_t, int32_t, (src < 0) ? 0 : src)
+- }
+- break;
+- default:
+- assert(!"Invalid channel type combination");
+- }
+- }
+- break;
++ convert_uint(void_dst, num_dst_channels, void_src, src_type,
++ num_src_channels, swizzle, normalized, count);
++ break;
+ case GL_INT:
+- {
+- const int32_t one = normalized ? INT32_MAX : 1;
+- switch (src_type) {
+- case GL_FLOAT:
+- if (normalized) {
+- SWIZZLE_CONVERT(uint32_t, float, float_to_snorm(src, 32))
+- } else {
+- SWIZZLE_CONVERT(uint32_t, float, src)
+- }
+- break;
+- case GL_HALF_FLOAT:
+- if (normalized) {
+- SWIZZLE_CONVERT(uint32_t, uint16_t, half_to_snorm(src, 32))
+- } else {
+- SWIZZLE_CONVERT(uint32_t, uint16_t, _mesa_half_to_float(src))
+- }
+- break;
+- case GL_UNSIGNED_BYTE:
+- if (normalized) {
+- SWIZZLE_CONVERT(int32_t, uint8_t, unorm_to_snorm(src, 8, 32))
+- } else {
+- SWIZZLE_CONVERT(int32_t, uint8_t, src)
+- }
+- break;
+- case GL_BYTE:
+- if (normalized) {
+- SWIZZLE_CONVERT(int32_t, int8_t, snorm_to_snorm(src, 8, 32))
+- } else {
+- SWIZZLE_CONVERT(int32_t, int8_t, src)
+- }
+- break;
+- case GL_UNSIGNED_SHORT:
+- if (normalized) {
+- SWIZZLE_CONVERT(int32_t, uint16_t, unorm_to_snorm(src, 16, 32))
+- } else {
+- SWIZZLE_CONVERT(int32_t, uint16_t, src)
+- }
+- break;
+- case GL_SHORT:
+- if (normalized) {
+- SWIZZLE_CONVERT(int32_t, int16_t, snorm_to_snorm(src, 16, 32))
+- } else {
+- SWIZZLE_CONVERT(int32_t, int16_t, src)
+- }
+- break;
+- case GL_UNSIGNED_INT:
+- if (normalized) {
+- SWIZZLE_CONVERT(int32_t, uint32_t, unorm_to_snorm(src, 32, 32))
+- } else {
+- SWIZZLE_CONVERT(int32_t, uint32_t, src)
+- }
+- break;
+- case GL_INT:
+- SWIZZLE_CONVERT(int32_t, int32_t, src)
+- break;
+- default:
+- assert(!"Invalid channel type combination");
+- }
+- }
+- break;
++ convert_int(void_dst, num_dst_channels, void_src, src_type,
++ num_src_channels, swizzle, normalized, count);
++ break;
+ default:
+ assert(!"Invalid channel type");
+ }
+--
+2.0.5
+
diff --git a/media-libs/mesa/files/mesa-10.5.1-fstat-include.patch b/media-libs/mesa/files/mesa-10.5.1-fstat-include.patch
new file mode 100644
index 000000000000..212d00db87cc
--- /dev/null
+++ b/media-libs/mesa/files/mesa-10.5.1-fstat-include.patch
@@ -0,0 +1,37 @@
+From 771cd266b9d00bdcf2cf7acaa3c8363c358d7478 Mon Sep 17 00:00:00 2001
+From: Emil Velikov <emil.l.velikov@gmail.com>
+Date: Wed, 11 Mar 2015 19:12:35 +0000
+Subject: loader: include <sys/stat.h> for non-sysfs builds
+
+Required by fstat(), otherwise we'll error out due to implicit function
+declaration.
+
+Cc: "10.4 10.5" <mesa-stable@lists.freedesktop.org>
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89530
+Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
+Reported-by: Vadim Rutkovsky <vrutkovs@redhat.com>
+Tested-by: Vadim Rutkovsky <vrutkovs@redhat.com>
+
+diff --git a/src/loader/loader.c b/src/loader/loader.c
+index 9ff5115..17bf133 100644
+--- a/src/loader/loader.c
++++ b/src/loader/loader.c
+@@ -64,6 +64,7 @@
+ * Rob Clark <robclark@freedesktop.org>
+ */
+
++#include <sys/stat.h>
+ #include <stdarg.h>
+ #include <stdio.h>
+ #include <string.h>
+@@ -80,7 +81,6 @@
+ #endif
+ #endif
+ #ifdef HAVE_SYSFS
+-#include <sys/stat.h>
+ #include <sys/types.h>
+ #endif
+ #include "loader.h"
+--
+cgit v0.10.2
+
diff --git a/media-libs/mesa/mesa-10.2.8.ebuild b/media-libs/mesa/mesa-10.2.8.ebuild
new file mode 100644
index 000000000000..bd390303c656
--- /dev/null
+++ b/media-libs/mesa/mesa-10.2.8.ebuild
@@ -0,0 +1,530 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI="git://anongit.freedesktop.org/mesa/mesa"
+
+if [[ ${PV} = 9999* ]]; then
+ GIT_ECLASS="git-r3"
+ EXPERIMENTAL="true"
+fi
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit base autotools multilib multilib-minimal flag-o-matic \
+ python-any-r1 toolchain-funcs pax-utils ${GIT_ECLASS}
+
+OPENGL_DIR="xorg-x11"
+
+MY_PN="${PN/m/M}"
+MY_P="${MY_PN}-${PV/_/-}"
+MY_SRC_P="${MY_PN}Lib-${PV/_/-}"
+
+FOLDER="${PV/.0_rc*/}"
+
+DESCRIPTION="OpenGL-like graphic library for Linux"
+HOMEPAGE="http://mesa3d.sourceforge.net/"
+
+#SRC_PATCHES="mirror://gentoo/${P}-gentoo-patches-01.tar.bz2"
+if [[ $PV = 9999* ]]; then
+ SRC_URI="${SRC_PATCHES}"
+else
+ SRC_URI="ftp://ftp.freedesktop.org/pub/mesa/${FOLDER}/${MY_SRC_P}.tar.bz2
+ ${SRC_PATCHES}"
+fi
+
+# The code is MIT/X11.
+# GLES[2]/gl[2]{,ext,platform}.h are SGI-B-2.0
+LICENSE="MIT SGI-B-2.0"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
+RESTRICT="!bindist? ( bindist )"
+
+INTEL_CARDS="i915 i965 ilo intel"
+RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
+VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} freedreno nouveau vmware"
+for card in ${VIDEO_CARDS}; do
+ IUSE_VIDEO_CARDS+=" video_cards_${card}"
+done
+
+IUSE="${IUSE_VIDEO_CARDS}
+ bindist +classic debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm +nptl
+ opencl openvg osmesa pax_kernel openmax pic selinux
+ +udev vdpau wayland xvmc xa kernel_FreeBSD kernel_linux"
+
+REQUIRED_USE="
+ llvm? ( gallium )
+ openvg? ( egl gallium )
+ opencl? (
+ gallium
+ llvm
+ )
+ openmax? ( gallium )
+ gles1? ( egl )
+ gles2? ( egl )
+ wayland? ( egl gbm )
+ xa? ( gallium )
+ video_cards_freedreno? ( gallium )
+ video_cards_intel? ( || ( classic gallium ) )
+ video_cards_i915? ( || ( classic gallium ) )
+ video_cards_i965? ( classic )
+ video_cards_ilo? ( gallium )
+ video_cards_nouveau? ( || ( classic gallium ) )
+ video_cards_radeon? ( || ( classic gallium ) )
+ video_cards_r100? ( classic )
+ video_cards_r200? ( classic )
+ video_cards_r300? ( gallium )
+ video_cards_r600? ( gallium )
+ video_cards_radeonsi? ( gallium llvm )
+ video_cards_vmware? ( gallium )
+ ${PYTHON_REQUIRED_USE}
+"
+
+LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.54"
+# keep correct libdrm and dri2proto dep
+# keep blocks in rdepend for binpkg
+RDEPEND="
+ !<x11-base/xorg-server-1.7
+ !<=x11-proto/xf86driproto-2.0.3
+ abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] )
+ classic? ( app-eselect/eselect-mesa )
+ gallium? ( app-eselect/eselect-mesa )
+ >=app-eselect/eselect-opengl-1.2.7
+ udev? ( kernel_linux? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] ) )
+ >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}]
+ llvm? (
+ video_cards_radeonsi? ( || (
+ >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
+ >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
+ ) )
+ video_cards_r600? ( || (
+ >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
+ >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
+ ) )
+ !video_cards_r600? (
+ video_cards_radeon? ( || (
+ >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
+ >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
+ ) )
+ )
+ >=sys-devel/llvm-3.3-r3:=[${MULTILIB_USEDEP}]
+ <sys-devel/llvm-3.6
+ )
+ opencl? (
+ app-eselect/eselect-opencl
+ dev-libs/libclc
+ )
+ openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] )
+ vdpau? ( >=x11-libs/libvdpau-0.7:=[${MULTILIB_USEDEP}] )
+ wayland? ( >=dev-libs/wayland-1.2.0:=[${MULTILIB_USEDEP}] )
+ xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
+ ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vmware?,${MULTILIB_USEDEP}]
+"
+for card in ${INTEL_CARDS}; do
+ RDEPEND="${RDEPEND}
+ video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
+ "
+done
+
+for card in ${RADEON_CARDS}; do
+ RDEPEND="${RDEPEND}
+ video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
+ "
+done
+
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ llvm? (
+ video_cards_radeonsi? ( sys-devel/llvm[video_cards_radeon] )
+ )
+ opencl? (
+ >=sys-devel/llvm-3.3-r3:=[${MULTILIB_USEDEP}]
+ >=sys-devel/clang-3.3:=[${MULTILIB_USEDEP}]
+ >=sys-devel/gcc-4.6
+ )
+ sys-devel/bison
+ sys-devel/flex
+ sys-devel/gettext
+ virtual/pkgconfig
+ >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}]
+ dri3? (
+ >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}]
+ >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}]
+ )
+ >=x11-proto/glproto-1.4.16-r1:=[${MULTILIB_USEDEP}]
+ >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}]
+ >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}]
+ >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}]
+"
+
+S="${WORKDIR}/${MY_P}"
+EGIT_CHECKOUT_DIR=${S}
+
+# It is slow without texrels, if someone wants slow
+# mesa without texrels +pic use is worth the shot
+QA_EXECSTACK="usr/lib*/opengl/xorg-x11/lib/libGL.so*"
+QA_WX_LOAD="usr/lib*/opengl/xorg-x11/lib/libGL.so*"
+
+# Think about: ggi, fbcon, no-X configs
+
+pkg_setup() {
+ # workaround toc-issue wrt #386545
+ use ppc64 && append-flags -mminimal-toc
+
+ # warning message for bug 459306
+ if use llvm && has_version sys-devel/llvm[!debug=]; then
+ ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
+ ewarn "detected! This can cause problems. For details, see bug 459306."
+ fi
+
+ python-any-r1_pkg_setup
+}
+
+src_unpack() {
+ default
+ [[ $PV = 9999* ]] && git-r3_src_unpack
+}
+
+src_prepare() {
+ # apply patches
+ if [[ ${PV} != 9999* && -n ${SRC_PATCHES} ]]; then
+ EPATCH_FORCE="yes" \
+ EPATCH_SOURCE="${WORKDIR}/patches" \
+ EPATCH_SUFFIX="patch" \
+ epatch
+ fi
+
+ # relax the requirement that r300 must have llvm, bug 380303
+ epatch "${FILESDIR}"/${PN}-10.2-dont-require-llvm-for-r300.patch
+
+ # allow sysfs to serve pci ids instead of libudev
+ epatch "${FILESDIR}"/${PN}-10.2-sysfs-instead-of-libudev.patch
+
+ # fix for hardened pax_kernel, bug 240956
+ [[ ${PV} != 9999* ]] && epatch "${FILESDIR}"/glx_ro_text_segm.patch
+
+ # Solaris needs some recent POSIX stuff in our case
+ if [[ ${CHOST} == *-solaris* ]] ; then
+ sed -i -e "s/-DSVR4/-D_POSIX_C_SOURCE=200112L/" configure.ac || die
+ fi
+
+ base_src_prepare
+
+ eautoreconf
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ local myconf
+
+ if use classic; then
+ # Configurable DRI drivers
+ driver_enable swrast
+
+ # Intel code
+ driver_enable video_cards_i915 i915
+ driver_enable video_cards_i965 i965
+ if ! use video_cards_i915 && \
+ ! use video_cards_i965; then
+ driver_enable video_cards_intel i915 i965
+ fi
+
+ # Nouveau code
+ driver_enable video_cards_nouveau nouveau
+
+ # ATI code
+ driver_enable video_cards_r100 radeon
+ driver_enable video_cards_r200 r200
+ if ! use video_cards_r100 && \
+ ! use video_cards_r200; then
+ driver_enable video_cards_radeon radeon r200
+ fi
+ fi
+
+ if use egl; then
+ myconf+="--with-egl-platforms=x11$(use wayland && echo ",wayland")$(use gbm && echo ",drm") "
+ fi
+
+ if use gallium; then
+ myconf+="
+ $(use_enable llvm gallium-llvm)
+ $(use_enable openvg)
+ $(use_enable openvg gallium-egl)
+ $(use_enable openmax omx)
+ $(use_enable vdpau)
+ $(use_enable xa)
+ $(use_enable xvmc)
+ "
+ gallium_enable swrast
+ gallium_enable video_cards_vmware svga
+ gallium_enable video_cards_nouveau nouveau
+ gallium_enable video_cards_i915 i915
+ gallium_enable video_cards_ilo ilo
+ if ! use video_cards_i915 && \
+ ! use video_cards_i965; then
+ gallium_enable video_cards_intel i915
+ fi
+
+ gallium_enable video_cards_r300 r300
+ gallium_enable video_cards_r600 r600
+ gallium_enable video_cards_radeonsi radeonsi
+ if ! use video_cards_r300 && \
+ ! use video_cards_r600; then
+ gallium_enable video_cards_radeon r300 r600
+ fi
+
+ gallium_enable video_cards_freedreno freedreno
+ # opencl stuff
+ if use opencl; then
+ myconf+="
+ $(use_enable opencl)
+ --with-opencl-libdir="${EPREFIX}/usr/$(get_libdir)/OpenCL/vendors/mesa"
+ --with-clang-libdir="${EPREFIX}/usr/lib"
+ "
+ fi
+ fi
+
+ # x86 hardened pax_kernel needs glx-rts, bug 240956
+ if use pax_kernel; then
+ myconf+="
+ $(use_enable x86 glx-rts)
+ "
+ fi
+
+ # on abi_x86_32 hardened we need to have asm disable
+ if [[ ${ABI} == x86* ]] && use pic; then
+ myconf+=" --disable-asm"
+ fi
+
+ # build fails with BSD indent, bug #428112
+ use userland_GNU || export INDENT=cat
+
+ econf \
+ --enable-dri \
+ --enable-glx \
+ --enable-shared-glapi \
+ $(use_enable !bindist texture-float) \
+ $(use_enable debug) \
+ $(use_enable dri3) \
+ $(use_enable egl) \
+ $(use_enable gbm) \
+ $(use_enable gles1) \
+ $(use_enable gles2) \
+ $(use_enable nptl glx-tls) \
+ $(use_enable osmesa) \
+ $(use_enable !udev sysfs) \
+ --enable-llvm-shared-libs \
+ --with-dri-drivers=${DRI_DRIVERS} \
+ --with-gallium-drivers=${GALLIUM_DRIVERS} \
+ PYTHON2="${PYTHON}" \
+ ${myconf}
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}"
+
+ # Move libGL and others from /usr/lib to /usr/lib/opengl/blah/lib
+ # because user can eselect desired GL provider.
+ ebegin "Moving libGL and friends for dynamic switching"
+ local x
+ local gl_dir="/usr/$(get_libdir)/opengl/${OPENGL_DIR}/"
+ dodir ${gl_dir}/{lib,extensions,include/GL}
+ for x in "${ED}"/usr/$(get_libdir)/lib{EGL,GL*,OpenVG}.{la,a,so*}; do
+ if [ -f ${x} -o -L ${x} ]; then
+ mv -f "${x}" "${ED}${gl_dir}"/lib \
+ || die "Failed to move ${x}"
+ fi
+ done
+ for x in "${ED}"/usr/include/GL/{gl.h,glx.h,glext.h,glxext.h}; do
+ if [ -f ${x} -o -L ${x} ]; then
+ mv -f "${x}" "${ED}${gl_dir}"/include/GL \
+ || die "Failed to move ${x}"
+ fi
+ done
+ for x in "${ED}"/usr/include/{EGL,GLES*,VG,KHR}; do
+ if [ -d ${x} ]; then
+ mv -f "${x}" "${ED}${gl_dir}"/include \
+ || die "Failed to move ${x}"
+ fi
+ done
+ eend $?
+
+ if use classic || use gallium; then
+ ebegin "Moving DRI/Gallium drivers for dynamic switching"
+ local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
+ keepdir /usr/$(get_libdir)/dri
+ dodir /usr/$(get_libdir)/mesa
+ for x in ${gallium_drivers[@]}; do
+ if [ -f "$(get_libdir)/gallium/${x}" ]; then
+ mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
+ || die "Failed to move ${x}"
+ fi
+ done
+ if use classic; then
+ emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install
+ fi
+ for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
+ if [ -f ${x} -o -L ${x} ]; then
+ mv -f "${x}" "${x/dri/mesa}" \
+ || die "Failed to move ${x}"
+ fi
+ done
+ pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
+ ln -s ../mesa/*.so . || die "Creating symlink failed"
+ # remove symlinks to drivers known to eselect
+ for x in ${gallium_drivers[@]}; do
+ if [ -f ${x} -o -L ${x} ]; then
+ rm "${x}" || die "Failed to remove ${x}"
+ fi
+ done
+ popd
+ eend $?
+ fi
+ if use opencl; then
+ ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
+ local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
+ dodir ${cl_dir}/{lib,include}
+ if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
+ mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
+ "${ED}"${cl_dir}
+ fi
+ if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
+ mv -f "${ED}"/usr/include/CL \
+ "${ED}"${cl_dir}/include
+ fi
+ eend $?
+ fi
+
+ if use openmax; then
+ echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
+ doenvd "${T}"/99mesaxdgomx
+ keepdir /usr/share/mesa/xdg
+ fi
+}
+
+multilib_src_install_all() {
+ prune_libtool_files --all
+ einstalldocs
+
+ if use !bindist; then
+ dodoc docs/patents.txt
+ fi
+
+ # Install config file for eselect mesa
+ insinto /usr/share/mesa
+ newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
+}
+
+multilib_src_test() {
+ if use llvm; then
+ local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf'
+ pushd src/gallium/drivers/llvmpipe >/dev/null || die
+ emake ${llvm_tests}
+ pax-mark m ${llvm_tests}
+ popd >/dev/null || die
+ fi
+ emake check
+}
+
+pkg_postinst() {
+ # Switch to the xorg implementation.
+ echo
+ eselect opengl set --use-old ${OPENGL_DIR}
+
+ # switch to xorg-x11 and back if necessary, bug #374647 comment 11
+ OLD_IMPLEM="$(eselect opengl show)"
+ if [[ ${OPENGL_DIR}x != ${OLD_IMPLEM}x ]]; then
+ eselect opengl set ${OPENGL_DIR}
+ eselect opengl set ${OLD_IMPLEM}
+ fi
+
+ # Select classic/gallium drivers
+ if use classic || use gallium; then
+ eselect mesa set --auto
+ fi
+
+ # Switch to mesa opencl
+ if use opencl; then
+ eselect opencl set --use-old ${PN}
+ fi
+
+ # run omxregister-bellagio to make the OpenMAX drivers known system-wide
+ if use openmax; then
+ ebegin "Registering OpenMAX drivers"
+ BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
+ OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
+ omxregister-bellagio
+ eend $?
+ fi
+
+ # warn about patent encumbered texture-float
+ if use !bindist; then
+ elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
+ elog "enabled. Please see patents.txt for an explanation."
+ fi
+
+ local using_radeon r_flag
+ for r_flag in ${RADEON_CARDS}; do
+ if use video_cards_${r_flag}; then
+ using_radeon=1
+ break
+ fi
+ done
+
+ if [[ ${using_radeon} = 1 ]] && ! has_version media-libs/libtxc_dxtn; then
+ elog "Note that in order to have full S3TC support, it is necessary to install"
+ elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice"
+ elog "textures in some apps, and some others even require this to run."
+ fi
+}
+
+pkg_prerm() {
+ if use openmax; then
+ rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
+ fi
+}
+
+# $1 - VIDEO_CARDS flag
+# other args - names of DRI drivers to enable
+# TODO: avoid code duplication for a more elegant implementation
+driver_enable() {
+ case $# in
+ # for enabling unconditionally
+ 1)
+ DRI_DRIVERS+=",$1"
+ ;;
+ *)
+ if use $1; then
+ shift
+ for i in $@; do
+ DRI_DRIVERS+=",${i}"
+ done
+ fi
+ ;;
+ esac
+}
+
+gallium_enable() {
+ case $# in
+ # for enabling unconditionally
+ 1)
+ GALLIUM_DRIVERS+=",$1"
+ ;;
+ *)
+ if use $1; then
+ shift
+ for i in $@; do
+ GALLIUM_DRIVERS+=",${i}"
+ done
+ fi
+ ;;
+ esac
+}
diff --git a/media-libs/mesa/mesa-10.3.7-r1.ebuild b/media-libs/mesa/mesa-10.3.7-r1.ebuild
new file mode 100644
index 000000000000..9ca786846d92
--- /dev/null
+++ b/media-libs/mesa/mesa-10.3.7-r1.ebuild
@@ -0,0 +1,532 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI="git://anongit.freedesktop.org/mesa/mesa"
+
+if [[ ${PV} = 9999* ]]; then
+ GIT_ECLASS="git-r3"
+ EXPERIMENTAL="true"
+fi
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit base autotools multilib multilib-minimal flag-o-matic \
+ python-any-r1 toolchain-funcs pax-utils ${GIT_ECLASS}
+
+OPENGL_DIR="xorg-x11"
+
+MY_PN="${PN/m/M}"
+MY_P="${MY_PN}-${PV/_/-}"
+MY_SRC_P="${MY_PN}Lib-${PV/_/-}"
+
+FOLDER="${PV/.0/}"
+
+DESCRIPTION="OpenGL-like graphic library for Linux"
+HOMEPAGE="http://mesa3d.sourceforge.net/"
+
+#SRC_PATCHES="mirror://gentoo/${P}-gentoo-patches-01.tar.bz2"
+if [[ $PV = 9999* ]]; then
+ SRC_URI="${SRC_PATCHES}"
+else
+ SRC_URI="ftp://ftp.freedesktop.org/pub/mesa/${FOLDER}/${MY_SRC_P}.tar.bz2
+ ${SRC_PATCHES}"
+fi
+
+# The code is MIT/X11.
+# GLES[2]/gl[2]{,ext,platform}.h are SGI-B-2.0
+LICENSE="MIT SGI-B-2.0"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
+RESTRICT="!bindist? ( bindist )"
+
+INTEL_CARDS="i915 i965 ilo intel"
+RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
+VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} freedreno nouveau vmware"
+for card in ${VIDEO_CARDS}; do
+ IUSE_VIDEO_CARDS+=" video_cards_${card}"
+done
+
+IUSE="${IUSE_VIDEO_CARDS}
+ bindist +classic debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm +nptl
+ opencl openvg osmesa pax_kernel openmax pic selinux
+ +udev vdpau wayland xvmc xa kernel_FreeBSD kernel_linux"
+
+REQUIRED_USE="
+ llvm? ( gallium )
+ openvg? ( egl gallium )
+ opencl? (
+ gallium
+ llvm
+ )
+ openmax? ( gallium )
+ gles1? ( egl )
+ gles2? ( egl )
+ wayland? ( egl gbm )
+ xa? ( gallium )
+ video_cards_freedreno? ( gallium )
+ video_cards_intel? ( || ( classic gallium ) )
+ video_cards_i915? ( || ( classic gallium ) )
+ video_cards_i965? ( classic )
+ video_cards_ilo? ( gallium )
+ video_cards_nouveau? ( || ( classic gallium ) )
+ video_cards_radeon? ( || ( classic gallium ) )
+ video_cards_r100? ( classic )
+ video_cards_r200? ( classic )
+ video_cards_r300? ( gallium )
+ video_cards_r600? ( gallium )
+ video_cards_radeonsi? ( gallium llvm )
+ video_cards_vmware? ( gallium )
+ ${PYTHON_REQUIRED_USE}
+"
+
+LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.56"
+# keep correct libdrm and dri2proto dep
+# keep blocks in rdepend for binpkg
+RDEPEND="
+ !<x11-base/xorg-server-1.7
+ !<=x11-proto/xf86driproto-2.0.3
+ abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] )
+ classic? ( app-eselect/eselect-mesa )
+ gallium? ( app-eselect/eselect-mesa )
+ >=app-eselect/eselect-opengl-1.2.7
+ udev? ( kernel_linux? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] ) )
+ >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}]
+ llvm? (
+ video_cards_radeonsi? ( || (
+ >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
+ >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
+ ) )
+ video_cards_r600? ( || (
+ >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
+ >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
+ ) )
+ !video_cards_r600? (
+ video_cards_radeon? ( || (
+ >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
+ >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
+ ) )
+ )
+ >=sys-devel/llvm-3.3-r3:=[${MULTILIB_USEDEP}]
+ <sys-devel/llvm-3.6
+ video_cards_radeonsi? ( >=sys-devel/llvm-3.4.2:=[${MULTILIB_USEDEP}] )
+ )
+ opencl? (
+ app-eselect/eselect-opencl
+ dev-libs/libclc
+ )
+ openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] )
+ vdpau? ( >=x11-libs/libvdpau-0.7:=[${MULTILIB_USEDEP}] )
+ wayland? ( >=dev-libs/wayland-1.2.0:=[${MULTILIB_USEDEP}] )
+ xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
+ ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vmware?,${MULTILIB_USEDEP}]
+"
+for card in ${INTEL_CARDS}; do
+ RDEPEND="${RDEPEND}
+ video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
+ "
+done
+
+for card in ${RADEON_CARDS}; do
+ RDEPEND="${RDEPEND}
+ video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
+ "
+done
+
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ llvm? (
+ video_cards_radeonsi? ( sys-devel/llvm[video_cards_radeon] )
+ )
+ opencl? (
+ >=sys-devel/llvm-3.4.2:=[${MULTILIB_USEDEP}]
+ >=sys-devel/clang-3.4.2:=[${MULTILIB_USEDEP}]
+ >=sys-devel/gcc-4.6
+ )
+ sys-devel/bison
+ sys-devel/flex
+ sys-devel/gettext
+ virtual/pkgconfig
+ >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}]
+ dri3? (
+ >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}]
+ >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}]
+ )
+ >=x11-proto/glproto-1.4.16-r1:=[${MULTILIB_USEDEP}]
+ >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}]
+ >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}]
+ >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}]
+"
+
+S="${WORKDIR}/${MY_P}"
+EGIT_CHECKOUT_DIR=${S}
+
+# It is slow without texrels, if someone wants slow
+# mesa without texrels +pic use is worth the shot
+QA_EXECSTACK="usr/lib*/opengl/xorg-x11/lib/libGL.so*"
+QA_WX_LOAD="usr/lib*/opengl/xorg-x11/lib/libGL.so*"
+
+# Think about: ggi, fbcon, no-X configs
+
+pkg_setup() {
+ # workaround toc-issue wrt #386545
+ use ppc64 && append-flags -mminimal-toc
+
+ # warning message for bug 459306
+ if use llvm && has_version sys-devel/llvm[!debug=]; then
+ ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
+ ewarn "detected! This can cause problems. For details, see bug 459306."
+ fi
+
+ python-any-r1_pkg_setup
+}
+
+src_unpack() {
+ default
+ [[ $PV = 9999* ]] && git-r3_src_unpack
+}
+
+src_prepare() {
+ # apply patches
+ if [[ ${PV} != 9999* && -n ${SRC_PATCHES} ]]; then
+ EPATCH_FORCE="yes" \
+ EPATCH_SOURCE="${WORKDIR}/patches" \
+ EPATCH_SUFFIX="patch" \
+ epatch
+ fi
+
+ epatch "${FILESDIR}"/${PN}-10.3.7-dont-use-clrsb.patch
+ epatch "${FILESDIR}"/${PN}-10.3.7-format_utils.c.patch
+ epatch "${FILESDIR}"/${PN}-10.5.1-fstat-include.patch
+
+ # relax the requirement that r300 must have llvm, bug 380303
+ epatch "${FILESDIR}"/${PN}-10.2-dont-require-llvm-for-r300.patch
+
+ # fix for hardened pax_kernel, bug 240956
+ [[ ${PV} != 9999* ]] && epatch "${FILESDIR}"/glx_ro_text_segm.patch
+
+ # Solaris needs some recent POSIX stuff in our case
+ if [[ ${CHOST} == *-solaris* ]] ; then
+ sed -i -e "s/-DSVR4/-D_POSIX_C_SOURCE=200112L/" configure.ac || die
+ fi
+
+ base_src_prepare
+
+ eautoreconf
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ local myconf
+
+ if use classic; then
+ # Configurable DRI drivers
+ driver_enable swrast
+
+ # Intel code
+ driver_enable video_cards_i915 i915
+ driver_enable video_cards_i965 i965
+ if ! use video_cards_i915 && \
+ ! use video_cards_i965; then
+ driver_enable video_cards_intel i915 i965
+ fi
+
+ # Nouveau code
+ driver_enable video_cards_nouveau nouveau
+
+ # ATI code
+ driver_enable video_cards_r100 radeon
+ driver_enable video_cards_r200 r200
+ if ! use video_cards_r100 && \
+ ! use video_cards_r200; then
+ driver_enable video_cards_radeon radeon r200
+ fi
+ fi
+
+ if use egl; then
+ myconf+="--with-egl-platforms=x11$(use wayland && echo ",wayland")$(use gbm && echo ",drm") "
+ fi
+
+ if use gallium; then
+ myconf+="
+ $(use_enable llvm gallium-llvm)
+ $(use_enable openvg)
+ $(use_enable openvg gallium-egl)
+ $(use_enable openmax omx)
+ $(use_enable vdpau)
+ $(use_enable xa)
+ $(use_enable xvmc)
+ "
+ gallium_enable swrast
+ gallium_enable video_cards_vmware svga
+ gallium_enable video_cards_nouveau nouveau
+ gallium_enable video_cards_i915 i915
+ gallium_enable video_cards_ilo ilo
+ if ! use video_cards_i915 && \
+ ! use video_cards_i965; then
+ gallium_enable video_cards_intel i915
+ fi
+
+ gallium_enable video_cards_r300 r300
+ gallium_enable video_cards_r600 r600
+ gallium_enable video_cards_radeonsi radeonsi
+ if ! use video_cards_r300 && \
+ ! use video_cards_r600; then
+ gallium_enable video_cards_radeon r300 r600
+ fi
+
+ gallium_enable video_cards_freedreno freedreno
+ # opencl stuff
+ if use opencl; then
+ myconf+="
+ $(use_enable opencl)
+ --with-opencl-libdir="${EPREFIX}/usr/$(get_libdir)/OpenCL/vendors/mesa"
+ --with-clang-libdir="${EPREFIX}/usr/lib"
+ "
+ fi
+ fi
+
+ # x86 hardened pax_kernel needs glx-rts, bug 240956
+ if use pax_kernel; then
+ myconf+="
+ $(use_enable x86 glx-rts)
+ "
+ fi
+
+ # on abi_x86_32 hardened we need to have asm disable
+ if [[ ${ABI} == x86* ]] && use pic; then
+ myconf+=" --disable-asm"
+ fi
+
+ # build fails with BSD indent, bug #428112
+ use userland_GNU || export INDENT=cat
+
+ econf \
+ --enable-dri \
+ --enable-glx \
+ --enable-shared-glapi \
+ $(use_enable !bindist texture-float) \
+ $(use_enable debug) \
+ $(use_enable dri3) \
+ $(use_enable egl) \
+ $(use_enable gbm) \
+ $(use_enable gles1) \
+ $(use_enable gles2) \
+ $(use_enable nptl glx-tls) \
+ $(use_enable osmesa) \
+ $(use_enable !udev sysfs) \
+ --enable-llvm-shared-libs \
+ --with-dri-drivers=${DRI_DRIVERS} \
+ --with-gallium-drivers=${GALLIUM_DRIVERS} \
+ PYTHON2="${PYTHON}" \
+ ${myconf}
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}"
+
+ # Move libGL and others from /usr/lib to /usr/lib/opengl/blah/lib
+ # because user can eselect desired GL provider.
+ ebegin "Moving libGL and friends for dynamic switching"
+ local x
+ local gl_dir="/usr/$(get_libdir)/opengl/${OPENGL_DIR}/"
+ dodir ${gl_dir}/{lib,extensions,include/GL}
+ for x in "${ED}"/usr/$(get_libdir)/lib{EGL,GL*,OpenVG}.{la,a,so*}; do
+ if [ -f ${x} -o -L ${x} ]; then
+ mv -f "${x}" "${ED}${gl_dir}"/lib \
+ || die "Failed to move ${x}"
+ fi
+ done
+ for x in "${ED}"/usr/include/GL/{gl.h,glx.h,glext.h,glxext.h}; do
+ if [ -f ${x} -o -L ${x} ]; then
+ mv -f "${x}" "${ED}${gl_dir}"/include/GL \
+ || die "Failed to move ${x}"
+ fi
+ done
+ for x in "${ED}"/usr/include/{EGL,GLES*,VG,KHR}; do
+ if [ -d ${x} ]; then
+ mv -f "${x}" "${ED}${gl_dir}"/include \
+ || die "Failed to move ${x}"
+ fi
+ done
+ eend $?
+
+ if use classic || use gallium; then
+ ebegin "Moving DRI/Gallium drivers for dynamic switching"
+ local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
+ keepdir /usr/$(get_libdir)/dri
+ dodir /usr/$(get_libdir)/mesa
+ for x in ${gallium_drivers[@]}; do
+ if [ -f "$(get_libdir)/gallium/${x}" ]; then
+ mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
+ || die "Failed to move ${x}"
+ fi
+ done
+ if use classic; then
+ emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install
+ fi
+ for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
+ if [ -f ${x} -o -L ${x} ]; then
+ mv -f "${x}" "${x/dri/mesa}" \
+ || die "Failed to move ${x}"
+ fi
+ done
+ pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
+ ln -s ../mesa/*.so . || die "Creating symlink failed"
+ # remove symlinks to drivers known to eselect
+ for x in ${gallium_drivers[@]}; do
+ if [ -f ${x} -o -L ${x} ]; then
+ rm "${x}" || die "Failed to remove ${x}"
+ fi
+ done
+ popd
+ eend $?
+ fi
+ if use opencl; then
+ ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
+ local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
+ dodir ${cl_dir}/{lib,include}
+ if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
+ mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
+ "${ED}"${cl_dir}
+ fi
+ if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
+ mv -f "${ED}"/usr/include/CL \
+ "${ED}"${cl_dir}/include
+ fi
+ eend $?
+ fi
+
+ if use openmax; then
+ echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
+ doenvd "${T}"/99mesaxdgomx
+ keepdir /usr/share/mesa/xdg
+ fi
+}
+
+multilib_src_install_all() {
+ prune_libtool_files --all
+ einstalldocs
+
+ if use !bindist; then
+ dodoc docs/patents.txt
+ fi
+
+ # Install config file for eselect mesa
+ insinto /usr/share/mesa
+ newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
+}
+
+multilib_src_test() {
+ if use llvm; then
+ local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf'
+ pushd src/gallium/drivers/llvmpipe >/dev/null || die
+ emake ${llvm_tests}
+ pax-mark m ${llvm_tests}
+ popd >/dev/null || die
+ fi
+ emake check
+}
+
+pkg_postinst() {
+ # Switch to the xorg implementation.
+ echo
+ eselect opengl set --use-old ${OPENGL_DIR}
+
+ # switch to xorg-x11 and back if necessary, bug #374647 comment 11
+ OLD_IMPLEM="$(eselect opengl show)"
+ if [[ ${OPENGL_DIR}x != ${OLD_IMPLEM}x ]]; then
+ eselect opengl set ${OPENGL_DIR}
+ eselect opengl set ${OLD_IMPLEM}
+ fi
+
+ # Select classic/gallium drivers
+ if use classic || use gallium; then
+ eselect mesa set --auto
+ fi
+
+ # Switch to mesa opencl
+ if use opencl; then
+ eselect opencl set --use-old ${PN}
+ fi
+
+ # run omxregister-bellagio to make the OpenMAX drivers known system-wide
+ if use openmax; then
+ ebegin "Registering OpenMAX drivers"
+ BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
+ OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
+ omxregister-bellagio
+ eend $?
+ fi
+
+ # warn about patent encumbered texture-float
+ if use !bindist; then
+ elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
+ elog "enabled. Please see patents.txt for an explanation."
+ fi
+
+ local using_radeon r_flag
+ for r_flag in ${RADEON_CARDS}; do
+ if use video_cards_${r_flag}; then
+ using_radeon=1
+ break
+ fi
+ done
+
+ if [[ ${using_radeon} = 1 ]] && ! has_version media-libs/libtxc_dxtn; then
+ elog "Note that in order to have full S3TC support, it is necessary to install"
+ elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice"
+ elog "textures in some apps, and some others even require this to run."
+ fi
+}
+
+pkg_prerm() {
+ if use openmax; then
+ rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
+ fi
+}
+
+# $1 - VIDEO_CARDS flag
+# other args - names of DRI drivers to enable
+# TODO: avoid code duplication for a more elegant implementation
+driver_enable() {
+ case $# in
+ # for enabling unconditionally
+ 1)
+ DRI_DRIVERS+=",$1"
+ ;;
+ *)
+ if use $1; then
+ shift
+ for i in $@; do
+ DRI_DRIVERS+=",${i}"
+ done
+ fi
+ ;;
+ esac
+}
+
+gallium_enable() {
+ case $# in
+ # for enabling unconditionally
+ 1)
+ GALLIUM_DRIVERS+=",$1"
+ ;;
+ *)
+ if use $1; then
+ shift
+ for i in $@; do
+ GALLIUM_DRIVERS+=",${i}"
+ done
+ fi
+ ;;
+ esac
+}
diff --git a/media-libs/mesa/mesa-10.3.7-r2.ebuild b/media-libs/mesa/mesa-10.3.7-r2.ebuild
new file mode 100644
index 000000000000..ab688ae9b48f
--- /dev/null
+++ b/media-libs/mesa/mesa-10.3.7-r2.ebuild
@@ -0,0 +1,498 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI="git://anongit.freedesktop.org/mesa/mesa"
+
+if [[ ${PV} = 9999* ]]; then
+ GIT_ECLASS="git-r3"
+ EXPERIMENTAL="true"
+fi
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit base autotools multilib multilib-minimal flag-o-matic \
+ python-any-r1 toolchain-funcs pax-utils ${GIT_ECLASS}
+
+OPENGL_DIR="xorg-x11"
+
+MY_PN="${PN/m/M}"
+MY_P="${MY_PN}-${PV/_/-}"
+MY_SRC_P="${MY_PN}Lib-${PV/_/-}"
+
+FOLDER="${PV/.0/}"
+
+DESCRIPTION="OpenGL-like graphic library for Linux"
+HOMEPAGE="http://mesa3d.sourceforge.net/"
+
+#SRC_PATCHES="mirror://gentoo/${P}-gentoo-patches-01.tar.bz2"
+if [[ $PV = 9999* ]]; then
+ SRC_URI="${SRC_PATCHES}"
+else
+ SRC_URI="ftp://ftp.freedesktop.org/pub/mesa/${FOLDER}/${MY_SRC_P}.tar.bz2
+ ${SRC_PATCHES}"
+fi
+
+# The code is MIT/X11.
+# GLES[2]/gl[2]{,ext,platform}.h are SGI-B-2.0
+LICENSE="MIT SGI-B-2.0"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
+RESTRICT="!bindist? ( bindist )"
+
+INTEL_CARDS="i915 i965 ilo intel"
+RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
+VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} freedreno nouveau vmware"
+for card in ${VIDEO_CARDS}; do
+ IUSE_VIDEO_CARDS+=" video_cards_${card}"
+done
+
+IUSE="${IUSE_VIDEO_CARDS}
+ bindist +classic debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm +nptl
+ opencl openvg osmesa pax_kernel openmax pic selinux
+ +udev vdpau wayland xvmc xa kernel_FreeBSD kernel_linux"
+
+REQUIRED_USE="
+ llvm? ( gallium )
+ openvg? ( egl gallium )
+ opencl? (
+ gallium
+ llvm
+ )
+ openmax? ( gallium )
+ gles1? ( egl )
+ gles2? ( egl )
+ wayland? ( egl gbm )
+ xa? ( gallium )
+ video_cards_freedreno? ( gallium )
+ video_cards_intel? ( || ( classic gallium ) )
+ video_cards_i915? ( || ( classic gallium ) )
+ video_cards_i965? ( classic )
+ video_cards_ilo? ( gallium )
+ video_cards_nouveau? ( || ( classic gallium ) )
+ video_cards_radeon? ( || ( classic gallium ) )
+ video_cards_r100? ( classic )
+ video_cards_r200? ( classic )
+ video_cards_r300? ( gallium )
+ video_cards_r600? ( gallium )
+ video_cards_radeonsi? ( gallium llvm )
+ video_cards_vmware? ( gallium )
+ ${PYTHON_REQUIRED_USE}
+"
+
+LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.56"
+# keep correct libdrm and dri2proto dep
+# keep blocks in rdepend for binpkg
+RDEPEND="
+ !<x11-base/xorg-server-1.7
+ !<=x11-proto/xf86driproto-2.0.3
+ abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] )
+ classic? ( app-eselect/eselect-mesa )
+ gallium? ( app-eselect/eselect-mesa )
+ >=app-eselect/eselect-opengl-1.3.0
+ udev? ( kernel_linux? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] ) )
+ >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}]
+ llvm? (
+ video_cards_radeonsi? ( || (
+ >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
+ >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
+ ) )
+ video_cards_r600? ( || (
+ >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
+ >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
+ ) )
+ !video_cards_r600? (
+ video_cards_radeon? ( || (
+ >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
+ >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
+ ) )
+ )
+ >=sys-devel/llvm-3.3-r3:=[${MULTILIB_USEDEP}]
+ <sys-devel/llvm-3.6
+ video_cards_radeonsi? ( >=sys-devel/llvm-3.4.2:=[${MULTILIB_USEDEP}] )
+ )
+ opencl? (
+ app-eselect/eselect-opencl
+ dev-libs/libclc
+ )
+ openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] )
+ vdpau? ( >=x11-libs/libvdpau-0.7:=[${MULTILIB_USEDEP}] )
+ wayland? ( >=dev-libs/wayland-1.2.0:=[${MULTILIB_USEDEP}] )
+ xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
+ ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vmware?,${MULTILIB_USEDEP}]
+"
+for card in ${INTEL_CARDS}; do
+ RDEPEND="${RDEPEND}
+ video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
+ "
+done
+
+for card in ${RADEON_CARDS}; do
+ RDEPEND="${RDEPEND}
+ video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
+ "
+done
+
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ llvm? (
+ video_cards_radeonsi? ( sys-devel/llvm[video_cards_radeon] )
+ )
+ opencl? (
+ >=sys-devel/llvm-3.4.2:=[${MULTILIB_USEDEP}]
+ >=sys-devel/clang-3.4.2:=[${MULTILIB_USEDEP}]
+ >=sys-devel/gcc-4.6
+ )
+ sys-devel/bison
+ sys-devel/flex
+ sys-devel/gettext
+ virtual/pkgconfig
+ >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}]
+ dri3? (
+ >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}]
+ >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}]
+ )
+ >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}]
+ >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}]
+ >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}]
+ >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}]
+"
+
+S="${WORKDIR}/${MY_P}"
+EGIT_CHECKOUT_DIR=${S}
+
+# It is slow without texrels, if someone wants slow
+# mesa without texrels +pic use is worth the shot
+QA_EXECSTACK="usr/lib*/libGL.so*"
+QA_WX_LOAD="usr/lib*/libGL.so*"
+
+# Think about: ggi, fbcon, no-X configs
+
+pkg_setup() {
+ # workaround toc-issue wrt #386545
+ use ppc64 && append-flags -mminimal-toc
+
+ # warning message for bug 459306
+ if use llvm && has_version sys-devel/llvm[!debug=]; then
+ ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
+ ewarn "detected! This can cause problems. For details, see bug 459306."
+ fi
+
+ python-any-r1_pkg_setup
+}
+
+src_unpack() {
+ default
+ [[ $PV = 9999* ]] && git-r3_src_unpack
+}
+
+src_prepare() {
+ # apply patches
+ if [[ ${PV} != 9999* && -n ${SRC_PATCHES} ]]; then
+ EPATCH_FORCE="yes" \
+ EPATCH_SOURCE="${WORKDIR}/patches" \
+ EPATCH_SUFFIX="patch" \
+ epatch
+ fi
+
+ epatch "${FILESDIR}"/${PN}-10.3.7-dont-use-clrsb.patch
+ epatch "${FILESDIR}"/${PN}-10.3.7-format_utils.c.patch
+
+ # relax the requirement that r300 must have llvm, bug 380303
+ epatch "${FILESDIR}"/${PN}-10.2-dont-require-llvm-for-r300.patch
+
+ # fix for hardened pax_kernel, bug 240956
+ [[ ${PV} != 9999* ]] && epatch "${FILESDIR}"/glx_ro_text_segm.patch
+
+ # Solaris needs some recent POSIX stuff in our case
+ if [[ ${CHOST} == *-solaris* ]] ; then
+ sed -i -e "s/-DSVR4/-D_POSIX_C_SOURCE=200112L/" configure.ac || die
+ fi
+
+ base_src_prepare
+
+ eautoreconf
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ local myconf
+
+ if use classic; then
+ # Configurable DRI drivers
+ driver_enable swrast
+
+ # Intel code
+ driver_enable video_cards_i915 i915
+ driver_enable video_cards_i965 i965
+ if ! use video_cards_i915 && \
+ ! use video_cards_i965; then
+ driver_enable video_cards_intel i915 i965
+ fi
+
+ # Nouveau code
+ driver_enable video_cards_nouveau nouveau
+
+ # ATI code
+ driver_enable video_cards_r100 radeon
+ driver_enable video_cards_r200 r200
+ if ! use video_cards_r100 && \
+ ! use video_cards_r200; then
+ driver_enable video_cards_radeon radeon r200
+ fi
+ fi
+
+ if use egl; then
+ myconf+="--with-egl-platforms=x11$(use wayland && echo ",wayland")$(use gbm && echo ",drm") "
+ fi
+
+ if use gallium; then
+ myconf+="
+ $(use_enable llvm gallium-llvm)
+ $(use_enable openvg)
+ $(use_enable openvg gallium-egl)
+ $(use_enable openmax omx)
+ $(use_enable vdpau)
+ $(use_enable xa)
+ $(use_enable xvmc)
+ "
+ gallium_enable swrast
+ gallium_enable video_cards_vmware svga
+ gallium_enable video_cards_nouveau nouveau
+ gallium_enable video_cards_i915 i915
+ gallium_enable video_cards_ilo ilo
+ if ! use video_cards_i915 && \
+ ! use video_cards_i965; then
+ gallium_enable video_cards_intel i915
+ fi
+
+ gallium_enable video_cards_r300 r300
+ gallium_enable video_cards_r600 r600
+ gallium_enable video_cards_radeonsi radeonsi
+ if ! use video_cards_r300 && \
+ ! use video_cards_r600; then
+ gallium_enable video_cards_radeon r300 r600
+ fi
+
+ gallium_enable video_cards_freedreno freedreno
+ # opencl stuff
+ if use opencl; then
+ myconf+="
+ $(use_enable opencl)
+ --with-opencl-libdir="${EPREFIX}/usr/$(get_libdir)/OpenCL/vendors/mesa"
+ --with-clang-libdir="${EPREFIX}/usr/lib"
+ "
+ fi
+ fi
+
+ # x86 hardened pax_kernel needs glx-rts, bug 240956
+ if use pax_kernel; then
+ myconf+="
+ $(use_enable x86 glx-rts)
+ "
+ fi
+
+ # on abi_x86_32 hardened we need to have asm disable
+ if [[ ${ABI} == x86* ]] && use pic; then
+ myconf+=" --disable-asm"
+ fi
+
+ # build fails with BSD indent, bug #428112
+ use userland_GNU || export INDENT=cat
+
+ econf \
+ --enable-dri \
+ --enable-glx \
+ --enable-shared-glapi \
+ $(use_enable !bindist texture-float) \
+ $(use_enable debug) \
+ $(use_enable dri3) \
+ $(use_enable egl) \
+ $(use_enable gbm) \
+ $(use_enable gles1) \
+ $(use_enable gles2) \
+ $(use_enable nptl glx-tls) \
+ $(use_enable osmesa) \
+ $(use_enable !udev sysfs) \
+ --enable-llvm-shared-libs \
+ --with-dri-drivers=${DRI_DRIVERS} \
+ --with-gallium-drivers=${GALLIUM_DRIVERS} \
+ PYTHON2="${PYTHON}" \
+ ${myconf}
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}"
+
+ if use classic || use gallium; then
+ ebegin "Moving DRI/Gallium drivers for dynamic switching"
+ local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
+ keepdir /usr/$(get_libdir)/dri
+ dodir /usr/$(get_libdir)/mesa
+ for x in ${gallium_drivers[@]}; do
+ if [ -f "$(get_libdir)/gallium/${x}" ]; then
+ mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
+ || die "Failed to move ${x}"
+ fi
+ done
+ if use classic; then
+ emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install
+ fi
+ for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
+ if [ -f ${x} -o -L ${x} ]; then
+ mv -f "${x}" "${x/dri/mesa}" \
+ || die "Failed to move ${x}"
+ fi
+ done
+ pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
+ ln -s ../mesa/*.so . || die "Creating symlink failed"
+ # remove symlinks to drivers known to eselect
+ for x in ${gallium_drivers[@]}; do
+ if [ -f ${x} -o -L ${x} ]; then
+ rm "${x}" || die "Failed to remove ${x}"
+ fi
+ done
+ popd
+ eend $?
+ fi
+ if use opencl; then
+ ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
+ local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
+ dodir ${cl_dir}/{lib,include}
+ if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
+ mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
+ "${ED}"${cl_dir}
+ fi
+ if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
+ mv -f "${ED}"/usr/include/CL \
+ "${ED}"${cl_dir}/include
+ fi
+ eend $?
+ fi
+
+ if use openmax; then
+ echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
+ doenvd "${T}"/99mesaxdgomx
+ keepdir /usr/share/mesa/xdg
+ fi
+}
+
+multilib_src_install_all() {
+ prune_libtool_files --all
+ einstalldocs
+
+ if use !bindist; then
+ dodoc docs/patents.txt
+ fi
+
+ # Install config file for eselect mesa
+ insinto /usr/share/mesa
+ newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
+}
+
+multilib_src_test() {
+ if use llvm; then
+ local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf'
+ pushd src/gallium/drivers/llvmpipe >/dev/null || die
+ emake ${llvm_tests}
+ pax-mark m ${llvm_tests}
+ popd >/dev/null || die
+ fi
+ emake check
+}
+
+pkg_postinst() {
+ # Switch to the xorg implementation.
+ echo
+ eselect opengl set --use-old ${OPENGL_DIR}
+
+ # Select classic/gallium drivers
+ if use classic || use gallium; then
+ eselect mesa set --auto
+ fi
+
+ # Switch to mesa opencl
+ if use opencl; then
+ eselect opencl set --use-old ${PN}
+ fi
+
+ # run omxregister-bellagio to make the OpenMAX drivers known system-wide
+ if use openmax; then
+ ebegin "Registering OpenMAX drivers"
+ BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
+ OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
+ omxregister-bellagio
+ eend $?
+ fi
+
+ # warn about patent encumbered texture-float
+ if use !bindist; then
+ elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
+ elog "enabled. Please see patents.txt for an explanation."
+ fi
+
+ local using_radeon r_flag
+ for r_flag in ${RADEON_CARDS}; do
+ if use video_cards_${r_flag}; then
+ using_radeon=1
+ break
+ fi
+ done
+
+ if [[ ${using_radeon} = 1 ]] && ! has_version media-libs/libtxc_dxtn; then
+ elog "Note that in order to have full S3TC support, it is necessary to install"
+ elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice"
+ elog "textures in some apps, and some others even require this to run."
+ fi
+}
+
+pkg_prerm() {
+ if use openmax; then
+ rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
+ fi
+}
+
+# $1 - VIDEO_CARDS flag
+# other args - names of DRI drivers to enable
+# TODO: avoid code duplication for a more elegant implementation
+driver_enable() {
+ case $# in
+ # for enabling unconditionally
+ 1)
+ DRI_DRIVERS+=",$1"
+ ;;
+ *)
+ if use $1; then
+ shift
+ for i in $@; do
+ DRI_DRIVERS+=",${i}"
+ done
+ fi
+ ;;
+ esac
+}
+
+gallium_enable() {
+ case $# in
+ # for enabling unconditionally
+ 1)
+ GALLIUM_DRIVERS+=",$1"
+ ;;
+ *)
+ if use $1; then
+ shift
+ for i in $@; do
+ GALLIUM_DRIVERS+=",${i}"
+ done
+ fi
+ ;;
+ esac
+}
diff --git a/media-libs/mesa/mesa-10.4.6.ebuild b/media-libs/mesa/mesa-10.4.6.ebuild
new file mode 100644
index 000000000000..1708b16b5f1b
--- /dev/null
+++ b/media-libs/mesa/mesa-10.4.6.ebuild
@@ -0,0 +1,499 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI="git://anongit.freedesktop.org/mesa/mesa"
+
+if [[ ${PV} = 9999* ]]; then
+ GIT_ECLASS="git-r3"
+ EXPERIMENTAL="true"
+fi
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit base autotools multilib multilib-minimal flag-o-matic \
+ python-any-r1 toolchain-funcs pax-utils ${GIT_ECLASS}
+
+OPENGL_DIR="xorg-x11"
+
+MY_PN="${PN/m/M}"
+MY_P="${MY_PN}-${PV/_/-}"
+MY_SRC_P="${MY_PN}Lib-${PV/_/-}"
+
+FOLDER="${PV/_rc*/}"
+
+DESCRIPTION="OpenGL-like graphic library for Linux"
+HOMEPAGE="http://mesa3d.sourceforge.net/"
+
+#SRC_PATCHES="mirror://gentoo/${P}-gentoo-patches-01.tar.bz2"
+if [[ $PV = 9999* ]]; then
+ SRC_URI="${SRC_PATCHES}"
+else
+ SRC_URI="ftp://ftp.freedesktop.org/pub/mesa/${FOLDER}/${MY_SRC_P}.tar.bz2
+ ${SRC_PATCHES}"
+fi
+
+# The code is MIT/X11.
+# GLES[2]/gl[2]{,ext,platform}.h are SGI-B-2.0
+LICENSE="MIT SGI-B-2.0"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
+RESTRICT="!bindist? ( bindist )"
+
+INTEL_CARDS="i915 i965 ilo intel"
+RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
+VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} freedreno nouveau vmware"
+for card in ${VIDEO_CARDS}; do
+ IUSE_VIDEO_CARDS+=" video_cards_${card}"
+done
+
+IUSE="${IUSE_VIDEO_CARDS}
+ bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm
+ +nptl opencl osmesa pax_kernel openmax pic selinux
+ +udev vaapi vdpau wayland xvmc xa kernel_FreeBSD"
+
+REQUIRED_USE="
+ d3d9? ( dri3 gallium )
+ llvm? ( gallium )
+ opencl? (
+ gallium
+ llvm
+ )
+ openmax? ( gallium )
+ gles1? ( egl )
+ gles2? ( egl )
+ vaapi? ( gallium )
+ vdpau? ( gallium )
+ wayland? ( egl gbm )
+ xa? ( gallium )
+ video_cards_freedreno? ( gallium )
+ video_cards_intel? ( || ( classic gallium ) )
+ video_cards_i915? ( || ( classic gallium ) )
+ video_cards_i965? ( classic )
+ video_cards_ilo? ( gallium )
+ video_cards_nouveau? ( || ( classic gallium ) )
+ video_cards_radeon? ( || ( classic gallium ) )
+ video_cards_r100? ( classic )
+ video_cards_r200? ( classic )
+ video_cards_r300? ( gallium llvm )
+ video_cards_r600? ( gallium )
+ video_cards_radeonsi? ( gallium llvm )
+ video_cards_vmware? ( gallium )
+ ${PYTHON_REQUIRED_USE}
+"
+
+LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.56"
+# keep correct libdrm and dri2proto dep
+# keep blocks in rdepend for binpkg
+RDEPEND="
+ !<x11-base/xorg-server-1.7
+ !<=x11-proto/xf86driproto-2.0.3
+ abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] )
+ classic? ( app-eselect/eselect-mesa )
+ gallium? ( app-eselect/eselect-mesa )
+ >=app-eselect/eselect-opengl-1.3.0
+ udev? ( kernel_linux? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] ) )
+ >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
+ gbm? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] )
+ dri3? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] )
+ >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}]
+ llvm? (
+ video_cards_radeonsi? ( || (
+ >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
+ >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
+ ) )
+ video_cards_r600? ( || (
+ >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
+ >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
+ ) )
+ !video_cards_r600? (
+ video_cards_radeon? ( || (
+ >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
+ >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
+ ) )
+ )
+ >=sys-devel/llvm-3.4.2:=[${MULTILIB_USEDEP}]
+ <sys-devel/llvm-3.6
+ )
+ opencl? (
+ app-eselect/eselect-opencl
+ dev-libs/libclc
+ || (
+ >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
+ >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
+ )
+ )
+ openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] )
+ vaapi? ( >=x11-libs/libva-0.35.0:=[${MULTILIB_USEDEP}] )
+ vdpau? ( >=x11-libs/libvdpau-0.7:=[${MULTILIB_USEDEP}] )
+ wayland? ( >=dev-libs/wayland-1.2.0:=[${MULTILIB_USEDEP}] )
+ xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
+ ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vmware?,${MULTILIB_USEDEP}]
+"
+for card in ${INTEL_CARDS}; do
+ RDEPEND="${RDEPEND}
+ video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
+ "
+done
+
+for card in ${RADEON_CARDS}; do
+ RDEPEND="${RDEPEND}
+ video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
+ "
+done
+
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ llvm? (
+ video_cards_radeonsi? ( sys-devel/llvm[video_cards_radeon] )
+ )
+ opencl? (
+ >=sys-devel/llvm-3.4.2:=[${MULTILIB_USEDEP}]
+ >=sys-devel/clang-3.4.2:=[${MULTILIB_USEDEP}]
+ >=sys-devel/gcc-4.6
+ )
+ sys-devel/bison
+ sys-devel/flex
+ sys-devel/gettext
+ virtual/pkgconfig
+ >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}]
+ dri3? (
+ >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}]
+ >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}]
+ )
+ >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}]
+ >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}]
+ >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}]
+ >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}]
+"
+
+S="${WORKDIR}/${MY_P}"
+EGIT_CHECKOUT_DIR=${S}
+
+# It is slow without texrels, if someone wants slow
+# mesa without texrels +pic use is worth the shot
+QA_EXECSTACK="usr/lib*/libGL.so*"
+QA_WX_LOAD="usr/lib*/libGL.so*"
+
+# Think about: ggi, fbcon, no-X configs
+
+pkg_setup() {
+ # workaround toc-issue wrt #386545
+ use ppc64 && append-flags -mminimal-toc
+
+ # warning message for bug 459306
+ if use llvm && has_version sys-devel/llvm[!debug=]; then
+ ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
+ ewarn "detected! This can cause problems. For details, see bug 459306."
+ fi
+
+ python-any-r1_pkg_setup
+}
+
+src_unpack() {
+ default
+ [[ $PV = 9999* ]] && git-r3_src_unpack
+}
+
+src_prepare() {
+ # apply patches
+ if [[ ${PV} != 9999* && -n ${SRC_PATCHES} ]]; then
+ EPATCH_FORCE="yes" \
+ EPATCH_SOURCE="${WORKDIR}/patches" \
+ EPATCH_SUFFIX="patch" \
+ epatch
+ fi
+
+ # fix for hardened pax_kernel, bug 240956
+ [[ ${PV} != 9999* ]] && epatch "${FILESDIR}"/glx_ro_text_segm.patch
+
+ # Solaris needs some recent POSIX stuff in our case
+ if [[ ${CHOST} == *-solaris* ]] ; then
+ sed -i -e "s/-DSVR4/-D_POSIX_C_SOURCE=200112L/" configure.ac || die
+ fi
+
+ base_src_prepare
+
+ eautoreconf
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ local myconf
+
+ if use classic; then
+ # Configurable DRI drivers
+ driver_enable swrast
+
+ # Intel code
+ driver_enable video_cards_i915 i915
+ driver_enable video_cards_i965 i965
+ if ! use video_cards_i915 && \
+ ! use video_cards_i965; then
+ driver_enable video_cards_intel i915 i965
+ fi
+
+ # Nouveau code
+ driver_enable video_cards_nouveau nouveau
+
+ # ATI code
+ driver_enable video_cards_r100 radeon
+ driver_enable video_cards_r200 r200
+ if ! use video_cards_r100 && \
+ ! use video_cards_r200; then
+ driver_enable video_cards_radeon radeon r200
+ fi
+ fi
+
+ if use egl; then
+ myconf+="--with-egl-platforms=x11$(use wayland && echo ",wayland")$(use gbm && echo ",drm") "
+ fi
+
+ if use gallium; then
+ myconf+="
+ $(use_enable d3d9 nine)
+ $(use_enable llvm gallium-llvm)
+ $(use_enable openmax omx)
+ $(use_enable vaapi va)
+ $(use_enable vdpau)
+ $(use_enable xa)
+ $(use_enable xvmc)
+ "
+ gallium_enable swrast
+ gallium_enable video_cards_vmware svga
+ gallium_enable video_cards_nouveau nouveau
+ gallium_enable video_cards_i915 i915
+ gallium_enable video_cards_ilo ilo
+ if ! use video_cards_i915 && \
+ ! use video_cards_i965; then
+ gallium_enable video_cards_intel i915
+ fi
+
+ gallium_enable video_cards_r300 r300
+ gallium_enable video_cards_r600 r600
+ gallium_enable video_cards_radeonsi radeonsi
+ if ! use video_cards_r300 && \
+ ! use video_cards_r600; then
+ gallium_enable video_cards_radeon r300 r600
+ fi
+
+ gallium_enable video_cards_freedreno freedreno
+ # opencl stuff
+ if use opencl; then
+ myconf+="
+ $(use_enable opencl)
+ --with-clang-libdir="${EPREFIX}/usr/lib"
+ "
+ fi
+ fi
+
+ # x86 hardened pax_kernel needs glx-rts, bug 240956
+ if use pax_kernel; then
+ myconf+="
+ $(use_enable x86 glx-rts)
+ "
+ fi
+
+ # on abi_x86_32 hardened we need to have asm disable
+ if [[ ${ABI} == x86* ]] && use pic; then
+ myconf+=" --disable-asm"
+ fi
+
+ # build fails with BSD indent, bug #428112
+ use userland_GNU || export INDENT=cat
+
+ econf \
+ --enable-dri \
+ --enable-glx \
+ --enable-shared-glapi \
+ $(use_enable !bindist texture-float) \
+ $(use_enable debug) \
+ $(use_enable dri3) \
+ $(use_enable egl) \
+ $(use_enable gbm) \
+ $(use_enable gles1) \
+ $(use_enable gles2) \
+ $(use_enable nptl glx-tls) \
+ $(use_enable osmesa) \
+ $(use_enable !udev sysfs) \
+ --enable-llvm-shared-libs \
+ --with-dri-drivers=${DRI_DRIVERS} \
+ --with-gallium-drivers=${GALLIUM_DRIVERS} \
+ PYTHON2="${PYTHON}" \
+ ${myconf}
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}"
+
+ if use classic || use gallium; then
+ ebegin "Moving DRI/Gallium drivers for dynamic switching"
+ local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
+ keepdir /usr/$(get_libdir)/dri
+ dodir /usr/$(get_libdir)/mesa
+ for x in ${gallium_drivers[@]}; do
+ if [ -f "$(get_libdir)/gallium/${x}" ]; then
+ mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
+ || die "Failed to move ${x}"
+ fi
+ done
+ if use classic; then
+ emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install
+ fi
+ for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
+ if [ -f ${x} -o -L ${x} ]; then
+ mv -f "${x}" "${x/dri/mesa}" \
+ || die "Failed to move ${x}"
+ fi
+ done
+ pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
+ ln -s ../mesa/*.so . || die "Creating symlink failed"
+ # remove symlinks to drivers known to eselect
+ for x in ${gallium_drivers[@]}; do
+ if [ -f ${x} -o -L ${x} ]; then
+ rm "${x}" || die "Failed to remove ${x}"
+ fi
+ done
+ popd
+ eend $?
+ fi
+ if use opencl; then
+ ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
+ local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
+ dodir ${cl_dir}/{lib,include}
+ if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
+ mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
+ "${ED}"${cl_dir}
+ fi
+ if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
+ mv -f "${ED}"/usr/include/CL \
+ "${ED}"${cl_dir}/include
+ fi
+ eend $?
+ fi
+
+ if use openmax; then
+ echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
+ doenvd "${T}"/99mesaxdgomx
+ keepdir /usr/share/mesa/xdg
+ fi
+}
+
+multilib_src_install_all() {
+ prune_libtool_files --all
+ einstalldocs
+
+ if use !bindist; then
+ dodoc docs/patents.txt
+ fi
+
+ # Install config file for eselect mesa
+ insinto /usr/share/mesa
+ newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
+}
+
+multilib_src_test() {
+ if use llvm; then
+ local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf'
+ pushd src/gallium/drivers/llvmpipe >/dev/null || die
+ emake ${llvm_tests}
+ pax-mark m ${llvm_tests}
+ popd >/dev/null || die
+ fi
+ emake check
+}
+
+pkg_postinst() {
+ # Switch to the xorg implementation.
+ echo
+ eselect opengl set --use-old ${OPENGL_DIR}
+
+ # Select classic/gallium drivers
+ if use classic || use gallium; then
+ eselect mesa set --auto
+ fi
+
+ # Switch to mesa opencl
+ if use opencl; then
+ eselect opencl set --use-old ${PN}
+ fi
+
+ # run omxregister-bellagio to make the OpenMAX drivers known system-wide
+ if use openmax; then
+ ebegin "Registering OpenMAX drivers"
+ BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
+ OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
+ omxregister-bellagio
+ eend $?
+ fi
+
+ # warn about patent encumbered texture-float
+ if use !bindist; then
+ elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
+ elog "enabled. Please see patents.txt for an explanation."
+ fi
+
+ local using_radeon r_flag
+ for r_flag in ${RADEON_CARDS}; do
+ if use video_cards_${r_flag}; then
+ using_radeon=1
+ break
+ fi
+ done
+
+ if [[ ${using_radeon} = 1 ]] && ! has_version media-libs/libtxc_dxtn; then
+ elog "Note that in order to have full S3TC support, it is necessary to install"
+ elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice"
+ elog "textures in some apps, and some others even require this to run."
+ fi
+}
+
+pkg_prerm() {
+ if use openmax; then
+ rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
+ fi
+}
+
+# $1 - VIDEO_CARDS flag
+# other args - names of DRI drivers to enable
+# TODO: avoid code duplication for a more elegant implementation
+driver_enable() {
+ case $# in
+ # for enabling unconditionally
+ 1)
+ DRI_DRIVERS+=",$1"
+ ;;
+ *)
+ if use $1; then
+ shift
+ for i in $@; do
+ DRI_DRIVERS+=",${i}"
+ done
+ fi
+ ;;
+ esac
+}
+
+gallium_enable() {
+ case $# in
+ # for enabling unconditionally
+ 1)
+ GALLIUM_DRIVERS+=",$1"
+ ;;
+ *)
+ if use $1; then
+ shift
+ for i in $@; do
+ GALLIUM_DRIVERS+=",${i}"
+ done
+ fi
+ ;;
+ esac
+}
diff --git a/media-libs/mesa/mesa-10.5.8.ebuild b/media-libs/mesa/mesa-10.5.8.ebuild
new file mode 100644
index 000000000000..b41243a7ab24
--- /dev/null
+++ b/media-libs/mesa/mesa-10.5.8.ebuild
@@ -0,0 +1,455 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI="git://anongit.freedesktop.org/mesa/mesa"
+
+if [[ ${PV} = 9999* ]]; then
+ GIT_ECLASS="git-r3"
+ EXPERIMENTAL="true"
+fi
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
+
+OPENGL_DIR="xorg-x11"
+
+MY_P="${P/_/-}"
+FOLDER="${PV/_rc*/}"
+
+DESCRIPTION="OpenGL-like graphic library for Linux"
+HOMEPAGE="http://mesa3d.sourceforge.net/"
+
+if [[ $PV == 9999* ]]; then
+ SRC_URI=""
+else
+ SRC_URI="ftp://ftp.freedesktop.org/pub/mesa/${FOLDER}/${MY_P}.tar.xz"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
+RESTRICT="!bindist? ( bindist )"
+
+INTEL_CARDS="i915 i965 ilo intel"
+RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
+VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} freedreno nouveau vmware"
+for card in ${VIDEO_CARDS}; do
+ IUSE_VIDEO_CARDS+=" video_cards_${card}"
+done
+
+IUSE="${IUSE_VIDEO_CARDS}
+ bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm
+ +nptl opencl osmesa pax_kernel openmax pic selinux +udev vaapi vdpau
+ wayland xvmc xa kernel_FreeBSD"
+
+REQUIRED_USE="
+ d3d9? ( dri3 gallium )
+ llvm? ( gallium )
+ opencl? ( gallium llvm )
+ openmax? ( gallium )
+ gles1? ( egl )
+ gles2? ( egl )
+ vaapi? ( gallium )
+ vdpau? ( gallium )
+ wayland? ( egl gbm )
+ xa? ( gallium )
+ video_cards_freedreno? ( gallium )
+ video_cards_intel? ( classic )
+ video_cards_i915? ( || ( classic gallium ) )
+ video_cards_i965? ( classic )
+ video_cards_ilo? ( gallium )
+ video_cards_nouveau? ( || ( classic gallium ) )
+ video_cards_radeon? ( || ( classic gallium ) )
+ video_cards_r100? ( classic )
+ video_cards_r200? ( classic )
+ video_cards_r300? ( gallium llvm )
+ video_cards_r600? ( gallium )
+ video_cards_radeonsi? ( gallium llvm )
+ video_cards_vmware? ( gallium )
+ ${PYTHON_REQUIRED_USE}
+"
+
+LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.57"
+# keep correct libdrm and dri2proto dep
+# keep blocks in rdepend for binpkg
+RDEPEND="
+ !<x11-base/xorg-server-1.7
+ !<=x11-proto/xf86driproto-2.0.3
+ abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] )
+ classic? ( app-eselect/eselect-mesa )
+ gallium? ( app-eselect/eselect-mesa )
+ >=app-eselect/eselect-opengl-1.3.0
+ udev? ( kernel_linux? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] ) )
+ >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
+ gbm? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] )
+ dri3? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] )
+ >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}]
+ x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
+ llvm? (
+ video_cards_radeonsi? ( || (
+ >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
+ >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
+ ) )
+ !video_cards_r600? (
+ video_cards_radeon? ( || (
+ >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
+ >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
+ ) )
+ )
+ >=sys-devel/llvm-3.4.2:=[${MULTILIB_USEDEP}]
+ )
+ opencl? (
+ app-eselect/eselect-opencl
+ dev-libs/libclc
+ || (
+ >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
+ >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
+ )
+ )
+ openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] )
+ vaapi? ( >=x11-libs/libva-0.35.0:=[${MULTILIB_USEDEP}] )
+ vdpau? ( >=x11-libs/libvdpau-0.7:=[${MULTILIB_USEDEP}] )
+ wayland? ( >=dev-libs/wayland-1.2.0:=[${MULTILIB_USEDEP}] )
+ xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
+ ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vmware?,${MULTILIB_USEDEP}]
+"
+for card in ${INTEL_CARDS}; do
+ RDEPEND="${RDEPEND}
+ video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
+ "
+done
+
+for card in ${RADEON_CARDS}; do
+ RDEPEND="${RDEPEND}
+ video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
+ "
+done
+
+DEPEND="${RDEPEND}
+ llvm? (
+ video_cards_radeonsi? ( sys-devel/llvm[video_cards_radeon] )
+ )
+ opencl? (
+ >=sys-devel/llvm-3.4.2:=[${MULTILIB_USEDEP}]
+ >=sys-devel/clang-3.4.2:=[${MULTILIB_USEDEP}]
+ >=sys-devel/gcc-4.6
+ )
+ sys-devel/gettext
+ virtual/pkgconfig
+ >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}]
+ dri3? (
+ >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}]
+ >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}]
+ )
+ >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}]
+ >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}]
+ >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}]
+ >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}]
+"
+[[ ${PV} == "9999" ]] && DEPEND+="
+ sys-devel/bison
+ sys-devel/flex
+ ${PYTHON_DEPS}
+ $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
+"
+
+S="${WORKDIR}/${MY_P}"
+EGIT_CHECKOUT_DIR=${S}
+
+# It is slow without texrels, if someone wants slow
+# mesa without texrels +pic use is worth the shot
+QA_EXECSTACK="usr/lib*/libGL.so*"
+QA_WX_LOAD="usr/lib*/libGL.so*"
+
+pkg_setup() {
+ # warning message for bug 459306
+ if use llvm && has_version sys-devel/llvm[!debug=]; then
+ ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
+ ewarn "detected! This can cause problems. For details, see bug 459306."
+ fi
+
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ # fix for hardened pax_kernel, bug 240956
+ [[ ${PV} != 9999* ]] && epatch "${FILESDIR}"/glx_ro_text_segm.patch
+
+ eautoreconf
+}
+
+multilib_src_configure() {
+ local myconf
+
+ if use classic; then
+ # Configurable DRI drivers
+ driver_enable swrast
+
+ # Intel code
+ driver_enable video_cards_i915 i915
+ driver_enable video_cards_i965 i965
+ if ! use video_cards_i915 && \
+ ! use video_cards_i965; then
+ driver_enable video_cards_intel i915 i965
+ fi
+
+ # Nouveau code
+ driver_enable video_cards_nouveau nouveau
+
+ # ATI code
+ driver_enable video_cards_r100 radeon
+ driver_enable video_cards_r200 r200
+ if ! use video_cards_r100 && \
+ ! use video_cards_r200; then
+ driver_enable video_cards_radeon radeon r200
+ fi
+ fi
+
+ if use egl; then
+ myconf+="--with-egl-platforms=x11$(use wayland && echo ",wayland")$(use gbm && echo ",drm") "
+ fi
+
+ if use gallium; then
+ myconf+="
+ $(use_enable d3d9 nine)
+ $(use_enable llvm gallium-llvm)
+ $(use_enable openmax omx)
+ $(use_enable vaapi va)
+ $(use_enable vdpau)
+ $(use_enable xa)
+ $(use_enable xvmc)
+ "
+ gallium_enable swrast
+ gallium_enable video_cards_vmware svga
+ gallium_enable video_cards_nouveau nouveau
+ gallium_enable video_cards_i915 i915
+ gallium_enable video_cards_ilo ilo
+ if ! use video_cards_i915 && \
+ ! use video_cards_i965; then
+ gallium_enable video_cards_intel i915
+ fi
+
+ gallium_enable video_cards_r300 r300
+ gallium_enable video_cards_r600 r600
+ gallium_enable video_cards_radeonsi radeonsi
+ if ! use video_cards_r300 && \
+ ! use video_cards_r600; then
+ gallium_enable video_cards_radeon r300 r600
+ fi
+
+ gallium_enable video_cards_freedreno freedreno
+ # opencl stuff
+ if use opencl; then
+ myconf+="
+ $(use_enable opencl)
+ --with-clang-libdir="${EPREFIX}/usr/lib"
+ "
+ fi
+ fi
+
+ # x86 hardened pax_kernel needs glx-rts, bug 240956
+ if use pax_kernel; then
+ myconf+="
+ $(use_enable x86 glx-rts)
+ "
+ fi
+
+ # on abi_x86_32 hardened we need to have asm disable
+ if [[ ${ABI} == x86* ]] && use pic; then
+ myconf+=" --disable-asm"
+ fi
+
+ # build fails with BSD indent, bug #428112
+ use userland_GNU || export INDENT=cat
+
+ ECONF_SOURCE="${S}" \
+ econf \
+ --enable-dri \
+ --enable-glx \
+ --enable-shared-glapi \
+ $(use_enable !bindist texture-float) \
+ $(use_enable d3d9 nine) \
+ $(use_enable debug) \
+ $(use_enable dri3) \
+ $(use_enable egl) \
+ $(use_enable gbm) \
+ $(use_enable gles1) \
+ $(use_enable gles2) \
+ $(use_enable nptl glx-tls) \
+ $(use_enable osmesa) \
+ $(use_enable !udev sysfs) \
+ --enable-llvm-shared-libs \
+ --with-dri-drivers=${DRI_DRIVERS} \
+ --with-gallium-drivers=${GALLIUM_DRIVERS} \
+ PYTHON2="${PYTHON}" \
+ ${myconf}
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}"
+
+ if use classic || use gallium; then
+ ebegin "Moving DRI/Gallium drivers for dynamic switching"
+ local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
+ keepdir /usr/$(get_libdir)/dri
+ dodir /usr/$(get_libdir)/mesa
+ for x in ${gallium_drivers[@]}; do
+ if [ -f "$(get_libdir)/gallium/${x}" ]; then
+ mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
+ || die "Failed to move ${x}"
+ fi
+ done
+ if use classic; then
+ emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install
+ fi
+ for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
+ if [ -f ${x} -o -L ${x} ]; then
+ mv -f "${x}" "${x/dri/mesa}" \
+ || die "Failed to move ${x}"
+ fi
+ done
+ pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
+ ln -s ../mesa/*.so . || die "Creating symlink failed"
+ # remove symlinks to drivers known to eselect
+ for x in ${gallium_drivers[@]}; do
+ if [ -f ${x} -o -L ${x} ]; then
+ rm "${x}" || die "Failed to remove ${x}"
+ fi
+ done
+ popd
+ eend $?
+ fi
+ if use opencl; then
+ ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
+ local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
+ dodir ${cl_dir}/{lib,include}
+ if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
+ mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
+ "${ED}"${cl_dir}
+ fi
+ if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
+ mv -f "${ED}"/usr/include/CL \
+ "${ED}"${cl_dir}/include
+ fi
+ eend $?
+ fi
+
+ if use openmax; then
+ echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
+ doenvd "${T}"/99mesaxdgomx
+ keepdir /usr/share/mesa/xdg
+ fi
+}
+
+multilib_src_install_all() {
+ prune_libtool_files --all
+ einstalldocs
+
+ if use !bindist; then
+ dodoc docs/patents.txt
+ fi
+
+ # Install config file for eselect mesa
+ insinto /usr/share/mesa
+ newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
+}
+
+multilib_src_test() {
+ if use llvm; then
+ local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf'
+ pushd src/gallium/drivers/llvmpipe >/dev/null || die
+ emake ${llvm_tests}
+ pax-mark m ${llvm_tests}
+ popd >/dev/null || die
+ fi
+ emake check
+}
+
+pkg_postinst() {
+ # Switch to the xorg implementation.
+ echo
+ eselect opengl set --use-old ${OPENGL_DIR}
+
+ # Select classic/gallium drivers
+ if use classic || use gallium; then
+ eselect mesa set --auto
+ fi
+
+ # Switch to mesa opencl
+ if use opencl; then
+ eselect opencl set --use-old ${PN}
+ fi
+
+ # run omxregister-bellagio to make the OpenMAX drivers known system-wide
+ if use openmax; then
+ ebegin "Registering OpenMAX drivers"
+ BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
+ OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
+ omxregister-bellagio
+ eend $?
+ fi
+
+ # warn about patent encumbered texture-float
+ if use !bindist; then
+ elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
+ elog "enabled. Please see patents.txt for an explanation."
+ fi
+
+ if ! has_version media-libs/libtxc_dxtn; then
+ elog "Note that in order to have full S3TC support, it is necessary to install"
+ elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice"
+ elog "textures in some apps, and some others even require this to run."
+ fi
+}
+
+pkg_prerm() {
+ if use openmax; then
+ rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
+ fi
+}
+
+# $1 - VIDEO_CARDS flag
+# other args - names of DRI drivers to enable
+# TODO: avoid code duplication for a more elegant implementation
+driver_enable() {
+ case $# in
+ # for enabling unconditionally
+ 1)
+ DRI_DRIVERS+=",$1"
+ ;;
+ *)
+ if use $1; then
+ shift
+ for i in $@; do
+ DRI_DRIVERS+=",${i}"
+ done
+ fi
+ ;;
+ esac
+}
+
+gallium_enable() {
+ case $# in
+ # for enabling unconditionally
+ 1)
+ GALLIUM_DRIVERS+=",$1"
+ ;;
+ *)
+ if use $1; then
+ shift
+ for i in $@; do
+ GALLIUM_DRIVERS+=",${i}"
+ done
+ fi
+ ;;
+ esac
+}
diff --git a/media-libs/mesa/mesa-10.6.1.ebuild b/media-libs/mesa/mesa-10.6.1.ebuild
new file mode 100644
index 000000000000..4b6e01f51013
--- /dev/null
+++ b/media-libs/mesa/mesa-10.6.1.ebuild
@@ -0,0 +1,456 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI="git://anongit.freedesktop.org/mesa/mesa"
+
+if [[ ${PV} = 9999* ]]; then
+ GIT_ECLASS="git-r3"
+ EXPERIMENTAL="true"
+fi
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
+
+OPENGL_DIR="xorg-x11"
+
+MY_P="${P/_/-}"
+FOLDER="${PV/_rc*/}"
+
+DESCRIPTION="OpenGL-like graphic library for Linux"
+HOMEPAGE="http://mesa3d.sourceforge.net/"
+
+if [[ $PV == 9999* ]]; then
+ SRC_URI=""
+else
+ SRC_URI="ftp://ftp.freedesktop.org/pub/mesa/${FOLDER}/${MY_P}.tar.xz"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
+RESTRICT="!bindist? ( bindist )"
+
+INTEL_CARDS="i915 i965 ilo intel"
+RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
+VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} freedreno nouveau vmware"
+for card in ${VIDEO_CARDS}; do
+ IUSE_VIDEO_CARDS+=" video_cards_${card}"
+done
+
+IUSE="${IUSE_VIDEO_CARDS}
+ bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm
+ +nptl opencl osmesa pax_kernel openmax pic selinux +udev vaapi vdpau
+ wayland xvmc xa kernel_FreeBSD"
+
+REQUIRED_USE="
+ d3d9? ( dri3 gallium )
+ llvm? ( gallium )
+ opencl? ( gallium llvm )
+ openmax? ( gallium )
+ gles1? ( egl )
+ gles2? ( egl )
+ vaapi? ( gallium )
+ vdpau? ( gallium )
+ wayland? ( egl gbm )
+ xa? ( gallium )
+ video_cards_freedreno? ( gallium )
+ video_cards_intel? ( classic )
+ video_cards_i915? ( || ( classic gallium ) )
+ video_cards_i965? ( classic )
+ video_cards_ilo? ( gallium )
+ video_cards_nouveau? ( || ( classic gallium ) )
+ video_cards_radeon? ( || ( classic gallium ) )
+ video_cards_r100? ( classic )
+ video_cards_r200? ( classic )
+ video_cards_r300? ( gallium llvm )
+ video_cards_r600? ( gallium )
+ video_cards_radeonsi? ( gallium llvm )
+ video_cards_vmware? ( gallium )
+ ${PYTHON_REQUIRED_USE}
+"
+
+LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.60"
+# keep correct libdrm and dri2proto dep
+# keep blocks in rdepend for binpkg
+RDEPEND="
+ !<x11-base/xorg-server-1.7
+ !<=x11-proto/xf86driproto-2.0.3
+ abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] )
+ classic? ( app-eselect/eselect-mesa )
+ gallium? ( app-eselect/eselect-mesa )
+ >=app-eselect/eselect-opengl-1.3.0
+ udev? ( kernel_linux? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] ) )
+ >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
+ gbm? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] )
+ dri3? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] )
+ >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}]
+ x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
+ llvm? (
+ video_cards_radeonsi? ( || (
+ >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
+ >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
+ ) )
+ !video_cards_r600? (
+ video_cards_radeon? ( || (
+ >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
+ >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
+ ) )
+ )
+ >=sys-devel/llvm-3.4.2:=[${MULTILIB_USEDEP}]
+ )
+ opencl? (
+ app-eselect/eselect-opencl
+ dev-libs/libclc
+ || (
+ >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
+ >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
+ )
+ )
+ openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] )
+ vaapi? ( >=x11-libs/libva-0.35.0:=[${MULTILIB_USEDEP}] )
+ vdpau? ( >=x11-libs/libvdpau-0.7:=[${MULTILIB_USEDEP}] )
+ wayland? ( >=dev-libs/wayland-1.2.0:=[${MULTILIB_USEDEP}] )
+ xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
+ ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vmware?,${MULTILIB_USEDEP}]
+"
+for card in ${INTEL_CARDS}; do
+ RDEPEND="${RDEPEND}
+ video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
+ "
+done
+
+for card in ${RADEON_CARDS}; do
+ RDEPEND="${RDEPEND}
+ video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
+ "
+done
+
+DEPEND="${RDEPEND}
+ llvm? (
+ video_cards_radeonsi? ( sys-devel/llvm[video_cards_radeon] )
+ )
+ opencl? (
+ >=sys-devel/llvm-3.4.2:=[${MULTILIB_USEDEP}]
+ >=sys-devel/clang-3.4.2:=[${MULTILIB_USEDEP}]
+ >=sys-devel/gcc-4.6
+ )
+ sys-devel/gettext
+ virtual/pkgconfig
+ >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}]
+ dri3? (
+ >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}]
+ >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}]
+ )
+ >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}]
+ >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}]
+ >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}]
+ >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}]
+"
+[[ ${PV} == "9999" ]] && DEPEND+="
+ sys-devel/bison
+ sys-devel/flex
+ ${PYTHON_DEPS}
+ $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
+"
+
+S="${WORKDIR}/${MY_P}"
+EGIT_CHECKOUT_DIR=${S}
+
+# It is slow without texrels, if someone wants slow
+# mesa without texrels +pic use is worth the shot
+QA_EXECSTACK="usr/lib*/libGL.so*"
+QA_WX_LOAD="usr/lib*/libGL.so*"
+
+pkg_setup() {
+ # warning message for bug 459306
+ if use llvm && has_version sys-devel/llvm[!debug=]; then
+ ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
+ ewarn "detected! This can cause problems. For details, see bug 459306."
+ fi
+
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ # fix for hardened pax_kernel, bug 240956
+ [[ ${PV} != 9999* ]] && epatch "${FILESDIR}"/glx_ro_text_segm.patch
+
+ eautoreconf
+}
+
+multilib_src_configure() {
+ local myconf
+
+ if use classic; then
+ # Configurable DRI drivers
+ driver_enable swrast
+
+ # Intel code
+ driver_enable video_cards_i915 i915
+ driver_enable video_cards_i965 i965
+ if ! use video_cards_i915 && \
+ ! use video_cards_i965; then
+ driver_enable video_cards_intel i915 i965
+ fi
+
+ # Nouveau code
+ driver_enable video_cards_nouveau nouveau
+
+ # ATI code
+ driver_enable video_cards_r100 radeon
+ driver_enable video_cards_r200 r200
+ if ! use video_cards_r100 && \
+ ! use video_cards_r200; then
+ driver_enable video_cards_radeon radeon r200
+ fi
+ fi
+
+ if use egl; then
+ myconf+="--with-egl-platforms=x11$(use wayland && echo ",wayland")$(use gbm && echo ",drm") "
+ fi
+
+ if use gallium; then
+ myconf+="
+ $(use_enable d3d9 nine)
+ $(use_enable llvm gallium-llvm)
+ $(use_enable openmax omx)
+ $(use_enable vaapi va)
+ $(use_enable vdpau)
+ $(use_enable xa)
+ $(use_enable xvmc)
+ "
+ gallium_enable swrast
+ gallium_enable video_cards_vmware svga
+ gallium_enable video_cards_nouveau nouveau
+ gallium_enable video_cards_i915 i915
+ gallium_enable video_cards_ilo ilo
+ if ! use video_cards_i915 && \
+ ! use video_cards_i965; then
+ gallium_enable video_cards_intel i915
+ fi
+
+ gallium_enable video_cards_r300 r300
+ gallium_enable video_cards_r600 r600
+ gallium_enable video_cards_radeonsi radeonsi
+ if ! use video_cards_r300 && \
+ ! use video_cards_r600; then
+ gallium_enable video_cards_radeon r300 r600
+ fi
+
+ gallium_enable video_cards_freedreno freedreno
+ # opencl stuff
+ if use opencl; then
+ myconf+="
+ $(use_enable opencl)
+ --with-clang-libdir="${EPREFIX}/usr/lib"
+ "
+ fi
+ fi
+
+ # x86 hardened pax_kernel needs glx-rts, bug 240956
+ if use pax_kernel; then
+ myconf+="
+ $(use_enable x86 glx-rts)
+ "
+ fi
+
+ # on abi_x86_32 hardened we need to have asm disable
+ if [[ ${ABI} == x86* ]] && use pic; then
+ myconf+=" --disable-asm"
+ fi
+
+ # build fails with BSD indent, bug #428112
+ use userland_GNU || export INDENT=cat
+
+ ECONF_SOURCE="${S}" \
+ econf \
+ --enable-dri \
+ --enable-glx \
+ --enable-shared-glapi \
+ --disable-shader-cache \
+ $(use_enable !bindist texture-float) \
+ $(use_enable d3d9 nine) \
+ $(use_enable debug) \
+ $(use_enable dri3) \
+ $(use_enable egl) \
+ $(use_enable gbm) \
+ $(use_enable gles1) \
+ $(use_enable gles2) \
+ $(use_enable nptl glx-tls) \
+ $(use_enable osmesa) \
+ $(use_enable !udev sysfs) \
+ --enable-llvm-shared-libs \
+ --with-dri-drivers=${DRI_DRIVERS} \
+ --with-gallium-drivers=${GALLIUM_DRIVERS} \
+ PYTHON2="${PYTHON}" \
+ ${myconf}
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}"
+
+ if use classic || use gallium; then
+ ebegin "Moving DRI/Gallium drivers for dynamic switching"
+ local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
+ keepdir /usr/$(get_libdir)/dri
+ dodir /usr/$(get_libdir)/mesa
+ for x in ${gallium_drivers[@]}; do
+ if [ -f "$(get_libdir)/gallium/${x}" ]; then
+ mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
+ || die "Failed to move ${x}"
+ fi
+ done
+ if use classic; then
+ emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install
+ fi
+ for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
+ if [ -f ${x} -o -L ${x} ]; then
+ mv -f "${x}" "${x/dri/mesa}" \
+ || die "Failed to move ${x}"
+ fi
+ done
+ pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
+ ln -s ../mesa/*.so . || die "Creating symlink failed"
+ # remove symlinks to drivers known to eselect
+ for x in ${gallium_drivers[@]}; do
+ if [ -f ${x} -o -L ${x} ]; then
+ rm "${x}" || die "Failed to remove ${x}"
+ fi
+ done
+ popd
+ eend $?
+ fi
+ if use opencl; then
+ ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
+ local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
+ dodir ${cl_dir}/{lib,include}
+ if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
+ mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
+ "${ED}"${cl_dir}
+ fi
+ if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
+ mv -f "${ED}"/usr/include/CL \
+ "${ED}"${cl_dir}/include
+ fi
+ eend $?
+ fi
+
+ if use openmax; then
+ echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
+ doenvd "${T}"/99mesaxdgomx
+ keepdir /usr/share/mesa/xdg
+ fi
+}
+
+multilib_src_install_all() {
+ prune_libtool_files --all
+ einstalldocs
+
+ if use !bindist; then
+ dodoc docs/patents.txt
+ fi
+
+ # Install config file for eselect mesa
+ insinto /usr/share/mesa
+ newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
+}
+
+multilib_src_test() {
+ if use llvm; then
+ local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf'
+ pushd src/gallium/drivers/llvmpipe >/dev/null || die
+ emake ${llvm_tests}
+ pax-mark m ${llvm_tests}
+ popd >/dev/null || die
+ fi
+ emake check
+}
+
+pkg_postinst() {
+ # Switch to the xorg implementation.
+ echo
+ eselect opengl set --use-old ${OPENGL_DIR}
+
+ # Select classic/gallium drivers
+ if use classic || use gallium; then
+ eselect mesa set --auto
+ fi
+
+ # Switch to mesa opencl
+ if use opencl; then
+ eselect opencl set --use-old ${PN}
+ fi
+
+ # run omxregister-bellagio to make the OpenMAX drivers known system-wide
+ if use openmax; then
+ ebegin "Registering OpenMAX drivers"
+ BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
+ OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
+ omxregister-bellagio
+ eend $?
+ fi
+
+ # warn about patent encumbered texture-float
+ if use !bindist; then
+ elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
+ elog "enabled. Please see patents.txt for an explanation."
+ fi
+
+ if ! has_version media-libs/libtxc_dxtn; then
+ elog "Note that in order to have full S3TC support, it is necessary to install"
+ elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice"
+ elog "textures in some apps, and some others even require this to run."
+ fi
+}
+
+pkg_prerm() {
+ if use openmax; then
+ rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
+ fi
+}
+
+# $1 - VIDEO_CARDS flag
+# other args - names of DRI drivers to enable
+# TODO: avoid code duplication for a more elegant implementation
+driver_enable() {
+ case $# in
+ # for enabling unconditionally
+ 1)
+ DRI_DRIVERS+=",$1"
+ ;;
+ *)
+ if use $1; then
+ shift
+ for i in $@; do
+ DRI_DRIVERS+=",${i}"
+ done
+ fi
+ ;;
+ esac
+}
+
+gallium_enable() {
+ case $# in
+ # for enabling unconditionally
+ 1)
+ GALLIUM_DRIVERS+=",$1"
+ ;;
+ *)
+ if use $1; then
+ shift
+ for i in $@; do
+ GALLIUM_DRIVERS+=",${i}"
+ done
+ fi
+ ;;
+ esac
+}
diff --git a/media-libs/mesa/mesa-10.6.2.ebuild b/media-libs/mesa/mesa-10.6.2.ebuild
new file mode 100644
index 000000000000..e34dc8c55b03
--- /dev/null
+++ b/media-libs/mesa/mesa-10.6.2.ebuild
@@ -0,0 +1,455 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI="git://anongit.freedesktop.org/mesa/mesa"
+
+if [[ ${PV} = 9999* ]]; then
+ GIT_ECLASS="git-r3"
+ EXPERIMENTAL="true"
+fi
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
+
+OPENGL_DIR="xorg-x11"
+
+MY_P="${P/_/-}"
+FOLDER="${PV/_rc*/}"
+
+DESCRIPTION="OpenGL-like graphic library for Linux"
+HOMEPAGE="http://mesa3d.sourceforge.net/"
+
+if [[ $PV == 9999* ]]; then
+ SRC_URI=""
+else
+ SRC_URI="ftp://ftp.freedesktop.org/pub/mesa/${FOLDER}/${MY_P}.tar.xz"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
+RESTRICT="!bindist? ( bindist )"
+
+INTEL_CARDS="i915 i965 ilo intel"
+RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
+VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} freedreno nouveau vmware"
+for card in ${VIDEO_CARDS}; do
+ IUSE_VIDEO_CARDS+=" video_cards_${card}"
+done
+
+IUSE="${IUSE_VIDEO_CARDS}
+ bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm
+ +nptl opencl osmesa pax_kernel openmax pic selinux +udev vaapi vdpau
+ wayland xvmc xa kernel_FreeBSD"
+
+REQUIRED_USE="
+ d3d9? ( dri3 gallium )
+ llvm? ( gallium )
+ opencl? ( gallium llvm )
+ openmax? ( gallium )
+ gles1? ( egl )
+ gles2? ( egl )
+ vaapi? ( gallium )
+ vdpau? ( gallium )
+ wayland? ( egl gbm )
+ xa? ( gallium )
+ video_cards_freedreno? ( gallium )
+ video_cards_intel? ( classic )
+ video_cards_i915? ( || ( classic gallium ) )
+ video_cards_i965? ( classic )
+ video_cards_ilo? ( gallium )
+ video_cards_nouveau? ( || ( classic gallium ) )
+ video_cards_radeon? ( || ( classic gallium ) )
+ video_cards_r100? ( classic )
+ video_cards_r200? ( classic )
+ video_cards_r300? ( gallium llvm )
+ video_cards_r600? ( gallium )
+ video_cards_radeonsi? ( gallium llvm )
+ video_cards_vmware? ( gallium )
+ ${PYTHON_REQUIRED_USE}
+"
+
+LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.60"
+# keep correct libdrm and dri2proto dep
+# keep blocks in rdepend for binpkg
+RDEPEND="
+ !<x11-base/xorg-server-1.7
+ !<=x11-proto/xf86driproto-2.0.3
+ abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] )
+ classic? ( app-eselect/eselect-mesa )
+ gallium? ( app-eselect/eselect-mesa )
+ >=app-eselect/eselect-opengl-1.3.0
+ udev? ( kernel_linux? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] ) )
+ >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
+ gbm? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] )
+ dri3? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] )
+ >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}]
+ x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
+ llvm? (
+ video_cards_radeonsi? ( || (
+ >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
+ >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
+ ) )
+ !video_cards_r600? (
+ video_cards_radeon? ( || (
+ >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
+ >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
+ ) )
+ )
+ >=sys-devel/llvm-3.4.2:=[${MULTILIB_USEDEP}]
+ )
+ opencl? (
+ app-eselect/eselect-opencl
+ dev-libs/libclc
+ || (
+ >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
+ >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
+ )
+ )
+ openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] )
+ vaapi? ( >=x11-libs/libva-0.35.0:=[${MULTILIB_USEDEP}] )
+ vdpau? ( >=x11-libs/libvdpau-0.7:=[${MULTILIB_USEDEP}] )
+ wayland? ( >=dev-libs/wayland-1.2.0:=[${MULTILIB_USEDEP}] )
+ xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
+ ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vmware?,${MULTILIB_USEDEP}]
+"
+for card in ${INTEL_CARDS}; do
+ RDEPEND="${RDEPEND}
+ video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
+ "
+done
+
+for card in ${RADEON_CARDS}; do
+ RDEPEND="${RDEPEND}
+ video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
+ "
+done
+
+DEPEND="${RDEPEND}
+ llvm? (
+ video_cards_radeonsi? ( sys-devel/llvm[video_cards_radeon] )
+ )
+ opencl? (
+ >=sys-devel/llvm-3.4.2:=[${MULTILIB_USEDEP}]
+ >=sys-devel/clang-3.4.2:=[${MULTILIB_USEDEP}]
+ >=sys-devel/gcc-4.6
+ )
+ sys-devel/gettext
+ virtual/pkgconfig
+ >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}]
+ dri3? (
+ >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}]
+ >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}]
+ )
+ >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}]
+ >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}]
+ >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}]
+ >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}]
+"
+[[ ${PV} == "9999" ]] && DEPEND+="
+ sys-devel/bison
+ sys-devel/flex
+ ${PYTHON_DEPS}
+ $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
+"
+
+S="${WORKDIR}/${MY_P}"
+EGIT_CHECKOUT_DIR=${S}
+
+# It is slow without texrels, if someone wants slow
+# mesa without texrels +pic use is worth the shot
+QA_EXECSTACK="usr/lib*/libGL.so*"
+QA_WX_LOAD="usr/lib*/libGL.so*"
+
+pkg_setup() {
+ # warning message for bug 459306
+ if use llvm && has_version sys-devel/llvm[!debug=]; then
+ ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
+ ewarn "detected! This can cause problems. For details, see bug 459306."
+ fi
+
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ # fix for hardened pax_kernel, bug 240956
+ [[ ${PV} != 9999* ]] && epatch "${FILESDIR}"/glx_ro_text_segm.patch
+
+ eautoreconf
+}
+
+multilib_src_configure() {
+ local myconf
+
+ if use classic; then
+ # Configurable DRI drivers
+ driver_enable swrast
+
+ # Intel code
+ driver_enable video_cards_i915 i915
+ driver_enable video_cards_i965 i965
+ if ! use video_cards_i915 && \
+ ! use video_cards_i965; then
+ driver_enable video_cards_intel i915 i965
+ fi
+
+ # Nouveau code
+ driver_enable video_cards_nouveau nouveau
+
+ # ATI code
+ driver_enable video_cards_r100 radeon
+ driver_enable video_cards_r200 r200
+ if ! use video_cards_r100 && \
+ ! use video_cards_r200; then
+ driver_enable video_cards_radeon radeon r200
+ fi
+ fi
+
+ if use egl; then
+ myconf+="--with-egl-platforms=x11$(use wayland && echo ",wayland")$(use gbm && echo ",drm") "
+ fi
+
+ if use gallium; then
+ myconf+="
+ $(use_enable d3d9 nine)
+ $(use_enable llvm gallium-llvm)
+ $(use_enable openmax omx)
+ $(use_enable vaapi va)
+ $(use_enable vdpau)
+ $(use_enable xa)
+ $(use_enable xvmc)
+ "
+ gallium_enable swrast
+ gallium_enable video_cards_vmware svga
+ gallium_enable video_cards_nouveau nouveau
+ gallium_enable video_cards_i915 i915
+ gallium_enable video_cards_ilo ilo
+ if ! use video_cards_i915 && \
+ ! use video_cards_i965; then
+ gallium_enable video_cards_intel i915
+ fi
+
+ gallium_enable video_cards_r300 r300
+ gallium_enable video_cards_r600 r600
+ gallium_enable video_cards_radeonsi radeonsi
+ if ! use video_cards_r300 && \
+ ! use video_cards_r600; then
+ gallium_enable video_cards_radeon r300 r600
+ fi
+
+ gallium_enable video_cards_freedreno freedreno
+ # opencl stuff
+ if use opencl; then
+ myconf+="
+ $(use_enable opencl)
+ --with-clang-libdir="${EPREFIX}/usr/lib"
+ "
+ fi
+ fi
+
+ # x86 hardened pax_kernel needs glx-rts, bug 240956
+ if use pax_kernel; then
+ myconf+="
+ $(use_enable x86 glx-rts)
+ "
+ fi
+
+ # on abi_x86_32 hardened we need to have asm disable
+ if [[ ${ABI} == x86* ]] && use pic; then
+ myconf+=" --disable-asm"
+ fi
+
+ # build fails with BSD indent, bug #428112
+ use userland_GNU || export INDENT=cat
+
+ ECONF_SOURCE="${S}" \
+ econf \
+ --enable-dri \
+ --enable-glx \
+ --enable-shared-glapi \
+ $(use_enable !bindist texture-float) \
+ $(use_enable d3d9 nine) \
+ $(use_enable debug) \
+ $(use_enable dri3) \
+ $(use_enable egl) \
+ $(use_enable gbm) \
+ $(use_enable gles1) \
+ $(use_enable gles2) \
+ $(use_enable nptl glx-tls) \
+ $(use_enable osmesa) \
+ $(use_enable !udev sysfs) \
+ --enable-llvm-shared-libs \
+ --with-dri-drivers=${DRI_DRIVERS} \
+ --with-gallium-drivers=${GALLIUM_DRIVERS} \
+ PYTHON2="${PYTHON}" \
+ ${myconf}
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}"
+
+ if use classic || use gallium; then
+ ebegin "Moving DRI/Gallium drivers for dynamic switching"
+ local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
+ keepdir /usr/$(get_libdir)/dri
+ dodir /usr/$(get_libdir)/mesa
+ for x in ${gallium_drivers[@]}; do
+ if [ -f "$(get_libdir)/gallium/${x}" ]; then
+ mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
+ || die "Failed to move ${x}"
+ fi
+ done
+ if use classic; then
+ emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install
+ fi
+ for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
+ if [ -f ${x} -o -L ${x} ]; then
+ mv -f "${x}" "${x/dri/mesa}" \
+ || die "Failed to move ${x}"
+ fi
+ done
+ pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
+ ln -s ../mesa/*.so . || die "Creating symlink failed"
+ # remove symlinks to drivers known to eselect
+ for x in ${gallium_drivers[@]}; do
+ if [ -f ${x} -o -L ${x} ]; then
+ rm "${x}" || die "Failed to remove ${x}"
+ fi
+ done
+ popd
+ eend $?
+ fi
+ if use opencl; then
+ ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
+ local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
+ dodir ${cl_dir}/{lib,include}
+ if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
+ mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
+ "${ED}"${cl_dir}
+ fi
+ if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
+ mv -f "${ED}"/usr/include/CL \
+ "${ED}"${cl_dir}/include
+ fi
+ eend $?
+ fi
+
+ if use openmax; then
+ echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
+ doenvd "${T}"/99mesaxdgomx
+ keepdir /usr/share/mesa/xdg
+ fi
+}
+
+multilib_src_install_all() {
+ prune_libtool_files --all
+ einstalldocs
+
+ if use !bindist; then
+ dodoc docs/patents.txt
+ fi
+
+ # Install config file for eselect mesa
+ insinto /usr/share/mesa
+ newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
+}
+
+multilib_src_test() {
+ if use llvm; then
+ local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf'
+ pushd src/gallium/drivers/llvmpipe >/dev/null || die
+ emake ${llvm_tests}
+ pax-mark m ${llvm_tests}
+ popd >/dev/null || die
+ fi
+ emake check
+}
+
+pkg_postinst() {
+ # Switch to the xorg implementation.
+ echo
+ eselect opengl set --use-old ${OPENGL_DIR}
+
+ # Select classic/gallium drivers
+ if use classic || use gallium; then
+ eselect mesa set --auto
+ fi
+
+ # Switch to mesa opencl
+ if use opencl; then
+ eselect opencl set --use-old ${PN}
+ fi
+
+ # run omxregister-bellagio to make the OpenMAX drivers known system-wide
+ if use openmax; then
+ ebegin "Registering OpenMAX drivers"
+ BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
+ OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
+ omxregister-bellagio
+ eend $?
+ fi
+
+ # warn about patent encumbered texture-float
+ if use !bindist; then
+ elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
+ elog "enabled. Please see patents.txt for an explanation."
+ fi
+
+ if ! has_version media-libs/libtxc_dxtn; then
+ elog "Note that in order to have full S3TC support, it is necessary to install"
+ elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice"
+ elog "textures in some apps, and some others even require this to run."
+ fi
+}
+
+pkg_prerm() {
+ if use openmax; then
+ rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
+ fi
+}
+
+# $1 - VIDEO_CARDS flag
+# other args - names of DRI drivers to enable
+# TODO: avoid code duplication for a more elegant implementation
+driver_enable() {
+ case $# in
+ # for enabling unconditionally
+ 1)
+ DRI_DRIVERS+=",$1"
+ ;;
+ *)
+ if use $1; then
+ shift
+ for i in $@; do
+ DRI_DRIVERS+=",${i}"
+ done
+ fi
+ ;;
+ esac
+}
+
+gallium_enable() {
+ case $# in
+ # for enabling unconditionally
+ 1)
+ GALLIUM_DRIVERS+=",$1"
+ ;;
+ *)
+ if use $1; then
+ shift
+ for i in $@; do
+ GALLIUM_DRIVERS+=",${i}"
+ done
+ fi
+ ;;
+ esac
+}
diff --git a/media-libs/mesa/mesa-10.6.3.ebuild b/media-libs/mesa/mesa-10.6.3.ebuild
new file mode 100644
index 000000000000..e34dc8c55b03
--- /dev/null
+++ b/media-libs/mesa/mesa-10.6.3.ebuild
@@ -0,0 +1,455 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI="git://anongit.freedesktop.org/mesa/mesa"
+
+if [[ ${PV} = 9999* ]]; then
+ GIT_ECLASS="git-r3"
+ EXPERIMENTAL="true"
+fi
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
+
+OPENGL_DIR="xorg-x11"
+
+MY_P="${P/_/-}"
+FOLDER="${PV/_rc*/}"
+
+DESCRIPTION="OpenGL-like graphic library for Linux"
+HOMEPAGE="http://mesa3d.sourceforge.net/"
+
+if [[ $PV == 9999* ]]; then
+ SRC_URI=""
+else
+ SRC_URI="ftp://ftp.freedesktop.org/pub/mesa/${FOLDER}/${MY_P}.tar.xz"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
+RESTRICT="!bindist? ( bindist )"
+
+INTEL_CARDS="i915 i965 ilo intel"
+RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
+VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} freedreno nouveau vmware"
+for card in ${VIDEO_CARDS}; do
+ IUSE_VIDEO_CARDS+=" video_cards_${card}"
+done
+
+IUSE="${IUSE_VIDEO_CARDS}
+ bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm
+ +nptl opencl osmesa pax_kernel openmax pic selinux +udev vaapi vdpau
+ wayland xvmc xa kernel_FreeBSD"
+
+REQUIRED_USE="
+ d3d9? ( dri3 gallium )
+ llvm? ( gallium )
+ opencl? ( gallium llvm )
+ openmax? ( gallium )
+ gles1? ( egl )
+ gles2? ( egl )
+ vaapi? ( gallium )
+ vdpau? ( gallium )
+ wayland? ( egl gbm )
+ xa? ( gallium )
+ video_cards_freedreno? ( gallium )
+ video_cards_intel? ( classic )
+ video_cards_i915? ( || ( classic gallium ) )
+ video_cards_i965? ( classic )
+ video_cards_ilo? ( gallium )
+ video_cards_nouveau? ( || ( classic gallium ) )
+ video_cards_radeon? ( || ( classic gallium ) )
+ video_cards_r100? ( classic )
+ video_cards_r200? ( classic )
+ video_cards_r300? ( gallium llvm )
+ video_cards_r600? ( gallium )
+ video_cards_radeonsi? ( gallium llvm )
+ video_cards_vmware? ( gallium )
+ ${PYTHON_REQUIRED_USE}
+"
+
+LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.60"
+# keep correct libdrm and dri2proto dep
+# keep blocks in rdepend for binpkg
+RDEPEND="
+ !<x11-base/xorg-server-1.7
+ !<=x11-proto/xf86driproto-2.0.3
+ abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] )
+ classic? ( app-eselect/eselect-mesa )
+ gallium? ( app-eselect/eselect-mesa )
+ >=app-eselect/eselect-opengl-1.3.0
+ udev? ( kernel_linux? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] ) )
+ >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
+ gbm? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] )
+ dri3? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] )
+ >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}]
+ x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
+ llvm? (
+ video_cards_radeonsi? ( || (
+ >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
+ >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
+ ) )
+ !video_cards_r600? (
+ video_cards_radeon? ( || (
+ >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
+ >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
+ ) )
+ )
+ >=sys-devel/llvm-3.4.2:=[${MULTILIB_USEDEP}]
+ )
+ opencl? (
+ app-eselect/eselect-opencl
+ dev-libs/libclc
+ || (
+ >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
+ >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
+ )
+ )
+ openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] )
+ vaapi? ( >=x11-libs/libva-0.35.0:=[${MULTILIB_USEDEP}] )
+ vdpau? ( >=x11-libs/libvdpau-0.7:=[${MULTILIB_USEDEP}] )
+ wayland? ( >=dev-libs/wayland-1.2.0:=[${MULTILIB_USEDEP}] )
+ xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
+ ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vmware?,${MULTILIB_USEDEP}]
+"
+for card in ${INTEL_CARDS}; do
+ RDEPEND="${RDEPEND}
+ video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
+ "
+done
+
+for card in ${RADEON_CARDS}; do
+ RDEPEND="${RDEPEND}
+ video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
+ "
+done
+
+DEPEND="${RDEPEND}
+ llvm? (
+ video_cards_radeonsi? ( sys-devel/llvm[video_cards_radeon] )
+ )
+ opencl? (
+ >=sys-devel/llvm-3.4.2:=[${MULTILIB_USEDEP}]
+ >=sys-devel/clang-3.4.2:=[${MULTILIB_USEDEP}]
+ >=sys-devel/gcc-4.6
+ )
+ sys-devel/gettext
+ virtual/pkgconfig
+ >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}]
+ dri3? (
+ >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}]
+ >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}]
+ )
+ >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}]
+ >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}]
+ >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}]
+ >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}]
+"
+[[ ${PV} == "9999" ]] && DEPEND+="
+ sys-devel/bison
+ sys-devel/flex
+ ${PYTHON_DEPS}
+ $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
+"
+
+S="${WORKDIR}/${MY_P}"
+EGIT_CHECKOUT_DIR=${S}
+
+# It is slow without texrels, if someone wants slow
+# mesa without texrels +pic use is worth the shot
+QA_EXECSTACK="usr/lib*/libGL.so*"
+QA_WX_LOAD="usr/lib*/libGL.so*"
+
+pkg_setup() {
+ # warning message for bug 459306
+ if use llvm && has_version sys-devel/llvm[!debug=]; then
+ ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
+ ewarn "detected! This can cause problems. For details, see bug 459306."
+ fi
+
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ # fix for hardened pax_kernel, bug 240956
+ [[ ${PV} != 9999* ]] && epatch "${FILESDIR}"/glx_ro_text_segm.patch
+
+ eautoreconf
+}
+
+multilib_src_configure() {
+ local myconf
+
+ if use classic; then
+ # Configurable DRI drivers
+ driver_enable swrast
+
+ # Intel code
+ driver_enable video_cards_i915 i915
+ driver_enable video_cards_i965 i965
+ if ! use video_cards_i915 && \
+ ! use video_cards_i965; then
+ driver_enable video_cards_intel i915 i965
+ fi
+
+ # Nouveau code
+ driver_enable video_cards_nouveau nouveau
+
+ # ATI code
+ driver_enable video_cards_r100 radeon
+ driver_enable video_cards_r200 r200
+ if ! use video_cards_r100 && \
+ ! use video_cards_r200; then
+ driver_enable video_cards_radeon radeon r200
+ fi
+ fi
+
+ if use egl; then
+ myconf+="--with-egl-platforms=x11$(use wayland && echo ",wayland")$(use gbm && echo ",drm") "
+ fi
+
+ if use gallium; then
+ myconf+="
+ $(use_enable d3d9 nine)
+ $(use_enable llvm gallium-llvm)
+ $(use_enable openmax omx)
+ $(use_enable vaapi va)
+ $(use_enable vdpau)
+ $(use_enable xa)
+ $(use_enable xvmc)
+ "
+ gallium_enable swrast
+ gallium_enable video_cards_vmware svga
+ gallium_enable video_cards_nouveau nouveau
+ gallium_enable video_cards_i915 i915
+ gallium_enable video_cards_ilo ilo
+ if ! use video_cards_i915 && \
+ ! use video_cards_i965; then
+ gallium_enable video_cards_intel i915
+ fi
+
+ gallium_enable video_cards_r300 r300
+ gallium_enable video_cards_r600 r600
+ gallium_enable video_cards_radeonsi radeonsi
+ if ! use video_cards_r300 && \
+ ! use video_cards_r600; then
+ gallium_enable video_cards_radeon r300 r600
+ fi
+
+ gallium_enable video_cards_freedreno freedreno
+ # opencl stuff
+ if use opencl; then
+ myconf+="
+ $(use_enable opencl)
+ --with-clang-libdir="${EPREFIX}/usr/lib"
+ "
+ fi
+ fi
+
+ # x86 hardened pax_kernel needs glx-rts, bug 240956
+ if use pax_kernel; then
+ myconf+="
+ $(use_enable x86 glx-rts)
+ "
+ fi
+
+ # on abi_x86_32 hardened we need to have asm disable
+ if [[ ${ABI} == x86* ]] && use pic; then
+ myconf+=" --disable-asm"
+ fi
+
+ # build fails with BSD indent, bug #428112
+ use userland_GNU || export INDENT=cat
+
+ ECONF_SOURCE="${S}" \
+ econf \
+ --enable-dri \
+ --enable-glx \
+ --enable-shared-glapi \
+ $(use_enable !bindist texture-float) \
+ $(use_enable d3d9 nine) \
+ $(use_enable debug) \
+ $(use_enable dri3) \
+ $(use_enable egl) \
+ $(use_enable gbm) \
+ $(use_enable gles1) \
+ $(use_enable gles2) \
+ $(use_enable nptl glx-tls) \
+ $(use_enable osmesa) \
+ $(use_enable !udev sysfs) \
+ --enable-llvm-shared-libs \
+ --with-dri-drivers=${DRI_DRIVERS} \
+ --with-gallium-drivers=${GALLIUM_DRIVERS} \
+ PYTHON2="${PYTHON}" \
+ ${myconf}
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}"
+
+ if use classic || use gallium; then
+ ebegin "Moving DRI/Gallium drivers for dynamic switching"
+ local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
+ keepdir /usr/$(get_libdir)/dri
+ dodir /usr/$(get_libdir)/mesa
+ for x in ${gallium_drivers[@]}; do
+ if [ -f "$(get_libdir)/gallium/${x}" ]; then
+ mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
+ || die "Failed to move ${x}"
+ fi
+ done
+ if use classic; then
+ emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install
+ fi
+ for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
+ if [ -f ${x} -o -L ${x} ]; then
+ mv -f "${x}" "${x/dri/mesa}" \
+ || die "Failed to move ${x}"
+ fi
+ done
+ pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
+ ln -s ../mesa/*.so . || die "Creating symlink failed"
+ # remove symlinks to drivers known to eselect
+ for x in ${gallium_drivers[@]}; do
+ if [ -f ${x} -o -L ${x} ]; then
+ rm "${x}" || die "Failed to remove ${x}"
+ fi
+ done
+ popd
+ eend $?
+ fi
+ if use opencl; then
+ ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
+ local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
+ dodir ${cl_dir}/{lib,include}
+ if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
+ mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
+ "${ED}"${cl_dir}
+ fi
+ if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
+ mv -f "${ED}"/usr/include/CL \
+ "${ED}"${cl_dir}/include
+ fi
+ eend $?
+ fi
+
+ if use openmax; then
+ echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
+ doenvd "${T}"/99mesaxdgomx
+ keepdir /usr/share/mesa/xdg
+ fi
+}
+
+multilib_src_install_all() {
+ prune_libtool_files --all
+ einstalldocs
+
+ if use !bindist; then
+ dodoc docs/patents.txt
+ fi
+
+ # Install config file for eselect mesa
+ insinto /usr/share/mesa
+ newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
+}
+
+multilib_src_test() {
+ if use llvm; then
+ local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf'
+ pushd src/gallium/drivers/llvmpipe >/dev/null || die
+ emake ${llvm_tests}
+ pax-mark m ${llvm_tests}
+ popd >/dev/null || die
+ fi
+ emake check
+}
+
+pkg_postinst() {
+ # Switch to the xorg implementation.
+ echo
+ eselect opengl set --use-old ${OPENGL_DIR}
+
+ # Select classic/gallium drivers
+ if use classic || use gallium; then
+ eselect mesa set --auto
+ fi
+
+ # Switch to mesa opencl
+ if use opencl; then
+ eselect opencl set --use-old ${PN}
+ fi
+
+ # run omxregister-bellagio to make the OpenMAX drivers known system-wide
+ if use openmax; then
+ ebegin "Registering OpenMAX drivers"
+ BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
+ OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
+ omxregister-bellagio
+ eend $?
+ fi
+
+ # warn about patent encumbered texture-float
+ if use !bindist; then
+ elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
+ elog "enabled. Please see patents.txt for an explanation."
+ fi
+
+ if ! has_version media-libs/libtxc_dxtn; then
+ elog "Note that in order to have full S3TC support, it is necessary to install"
+ elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice"
+ elog "textures in some apps, and some others even require this to run."
+ fi
+}
+
+pkg_prerm() {
+ if use openmax; then
+ rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
+ fi
+}
+
+# $1 - VIDEO_CARDS flag
+# other args - names of DRI drivers to enable
+# TODO: avoid code duplication for a more elegant implementation
+driver_enable() {
+ case $# in
+ # for enabling unconditionally
+ 1)
+ DRI_DRIVERS+=",$1"
+ ;;
+ *)
+ if use $1; then
+ shift
+ for i in $@; do
+ DRI_DRIVERS+=",${i}"
+ done
+ fi
+ ;;
+ esac
+}
+
+gallium_enable() {
+ case $# in
+ # for enabling unconditionally
+ 1)
+ GALLIUM_DRIVERS+=",$1"
+ ;;
+ *)
+ if use $1; then
+ shift
+ for i in $@; do
+ GALLIUM_DRIVERS+=",${i}"
+ done
+ fi
+ ;;
+ esac
+}
diff --git a/media-libs/mesa/mesa-7.10.3.ebuild b/media-libs/mesa/mesa-7.10.3.ebuild
new file mode 100644
index 000000000000..40c7513e4c71
--- /dev/null
+++ b/media-libs/mesa/mesa-7.10.3.ebuild
@@ -0,0 +1,353 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+EGIT_REPO_URI="git://anongit.freedesktop.org/mesa/mesa"
+
+if [[ ${PV} = 9999* ]]; then
+ GIT_ECLASS="git"
+ EXPERIMENTAL="true"
+fi
+
+inherit base autotools multilib flag-o-matic python toolchain-funcs ${GIT_ECLASS}
+
+OPENGL_DIR="xorg-x11"
+
+MY_PN="${PN/m/M}"
+MY_P="${MY_PN}-${PV/_/-}"
+MY_SRC_P="${MY_PN}Lib-${PV/_/-}"
+
+FOLDER="${PV/_rc*/}"
+[[ ${PV/_rc*/} == ${PV} ]] || FOLDER+="/RC"
+
+DESCRIPTION="OpenGL-like graphic library for Linux"
+HOMEPAGE="http://mesa3d.sourceforge.net/"
+
+SRC_PATCHES="mirror://gentoo/${PN}-7.10.1-gentoo-patches-01.tar.bz2"
+if [[ $PV = 9999* ]]; then
+ SRC_URI="${SRC_PATCHES}"
+else
+ SRC_URI="ftp://ftp.freedesktop.org/pub/mesa/${FOLDER}/${MY_SRC_P}.tar.bz2
+ ${SRC_PATCHES}"
+fi
+
+LICENSE="MIT LGPL-3 SGI-B-2.0"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ia64 ~mips ppc ppc64 sh sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
+
+INTEL_CARDS="intel"
+RADEON_CARDS="radeon"
+VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} mach64 mga nouveau r128 savage sis vmware tdfx via"
+for card in ${VIDEO_CARDS}; do
+ IUSE_VIDEO_CARDS+=" video_cards_${card}"
+done
+
+IUSE="${IUSE_VIDEO_CARDS}
+ +classic debug +gallium gles llvm motif +nptl pic selinux kernel_FreeBSD hardened"
+
+LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.24"
+# not a runtime dependency of this package, but dependency of packages which
+# depend on this package, bug #342393
+EXTERNAL_DEPEND="
+ >=x11-proto/dri2proto-2.2
+ >=x11-proto/glproto-1.4.11
+"
+# keep correct libdrm and dri2proto dep
+# keep blocks in rdepend for binpkg
+RDEPEND="${EXTERNAL_DEPEND}
+ !<x11-base/xorg-server-1.7
+ !<=x11-proto/xf86driproto-2.0.3
+ classic? ( app-eselect/eselect-mesa )
+ gallium? ( app-eselect/eselect-mesa )
+ >=app-eselect/eselect-opengl-1.1.1-r2
+ dev-libs/expat
+ dev-libs/libxml2[python]
+ sys-libs/talloc
+ x11-libs/libICE
+ >=x11-libs/libX11-1.3.99.901
+ x11-libs/libXdamage
+ x11-libs/libXext
+ x11-libs/libXi
+ x11-libs/libXmu
+ x11-libs/libXxf86vm
+ motif? (
+ x11-libs/motif
+ !x11-libs/libGLw )
+ gallium? (
+ llvm? (
+ amd64? ( dev-libs/udis86 )
+ x86? ( dev-libs/udis86 )
+ x86-fbsd? ( dev-libs/udis86 )
+ <sys-devel/llvm-3
+ )
+ )
+ ${LIBDRM_DEPSTRING}[video_cards_nouveau?,video_cards_vmware?]
+ video_cards_nouveau? ( <x11-libs/libdrm-2.4.34 )
+"
+for card in ${INTEL_CARDS}; do
+ RDEPEND="${RDEPEND}
+ video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
+ "
+done
+
+for card in ${RADEON_CARDS}; do
+ RDEPEND="${RDEPEND}
+ video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
+ "
+done
+
+DEPEND="${RDEPEND}
+ =dev-lang/python-2*
+ virtual/pkgconfig
+ sys-devel/bison
+ sys-devel/flex
+ x11-misc/makedepend
+ x11-proto/inputproto
+ >=x11-proto/xextproto-7.0.99.1
+ x11-proto/xf86driproto
+ x11-proto/xf86vidmodeproto
+"
+
+S="${WORKDIR}/${MY_P}"
+
+# It is slow without texrels, if someone wants slow
+# mesa without texrels +pic use is worth the shot
+QA_EXECSTACK="usr/lib*/opengl/xorg-x11/lib/libGL.so*"
+QA_WX_LOAD="usr/lib*/opengl/xorg-x11/lib/libGL.so*"
+
+# Think about: ggi, fbcon, no-X configs
+
+pkg_setup() {
+ # gcc 4.2 has buggy ivopts
+ if [[ $(gcc-version) = "4.2" ]]; then
+ append-flags -fno-ivopts
+ fi
+
+ # recommended by upstream
+ append-flags -ffast-math
+
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_unpack() {
+ [[ $PV = 9999* ]] && git_src_unpack || base_src_unpack
+}
+
+src_prepare() {
+ # apply patches
+ if [[ ${PV} != 9999* && -n ${SRC_PATCHES} ]]; then
+ EPATCH_FORCE="yes" \
+ EPATCH_SOURCE="${WORKDIR}/patches" \
+ EPATCH_SUFFIX="patch" \
+ epatch
+ fi
+
+ # bug 240956
+ [[ ${PV} != 9999* ]] && epatch "${FILESDIR}"/glx_ro_text_segm.patch
+
+ # FreeBSD 6.* doesn't have posix_memalign().
+ if [[ ${CHOST} == *-freebsd6.* ]]; then
+ sed -i \
+ -e "s/-DHAVE_POSIX_MEMALIGN//" \
+ configure.ac || die
+ fi
+ # Solaris needs some recent POSIX stuff in our case
+ if [[ ${CHOST} == *-solaris* ]] ; then
+ sed -i -e "s/-DSVR4/-D_POSIX_C_SOURCE=200112L/" configure.ac || die
+ sed -i -e 's/uint/unsigned int/g' src/egl/drivers/glx/egl_glx.c || die
+ fi
+
+ # In order for mesa to complete it's build process we need to use a tool
+ # that it compiles. When we cross compile this clearly does not work
+ # so we require mesa to be built on the host system first. -solar
+ if tc-is-cross-compiler; then
+ sed -i -e "s#^GLSL_CL = .*\$#GLSL_CL = glsl_compiler#g" \
+ "${S}"/src/mesa/shader/slang/library/Makefile || die
+ fi
+
+ [[ $PV = 9999* ]] && git_src_prepare
+ base_src_prepare
+
+ eautoreconf
+}
+
+src_configure() {
+ local myconf
+
+ if use classic; then
+ # Configurable DRI drivers
+ driver_enable swrast
+
+ # Intel code
+ driver_enable video_cards_intel i810 i915 i965
+
+ # Nouveau code
+ driver_enable video_cards_nouveau nouveau
+
+ # ATI code
+ driver_enable video_cards_radeon radeon r200 r300 r600
+ driver_enable video_cards_mach64 mach64
+ driver_enable video_cards_mga mga
+ driver_enable video_cards_r128 r128
+
+ driver_enable video_cards_savage savage
+ driver_enable video_cards_sis sis
+ driver_enable video_cards_tdfx tdfx
+ driver_enable video_cards_via unichrome
+ fi
+
+ myconf="${myconf} $(use_enable gallium)"
+ if use !gallium && use !classic; then
+ ewarn "You enabled neither classic nor gallium USE flags. No hardware"
+ ewarn "drivers will be built."
+ fi
+ if use gallium; then
+ elog "You have enabled gallium infrastructure."
+ elog "This infrastructure currently support these drivers:"
+ elog " Intel: works only i915 and i965 somehow."
+ elog " LLVMpipe: Software renderer."
+ elog " Nouveau: Support for nVidia NV30 and later cards."
+ elog " Radeon: Newest implementation of r300-r700 driver."
+ elog " Svga: VMWare Virtual GPU driver."
+ echo
+ myconf="${myconf}
+ --with-state-trackers=glx,dri,egl,vega
+ $(use_enable llvm gallium-llvm)
+ $(use_enable gles gles1)
+ $(use_enable gles gles2)
+ $(use_enable gles gles-overlay)
+ $(use_enable video_cards_vmware gallium-svga)
+ $(use_enable video_cards_nouveau gallium-nouveau)
+ $(use_enable video_cards_intel gallium-i915)
+ $(use_enable video_cards_intel gallium-i965)
+ $(use_enable video_cards_radeon gallium-radeon)
+ $(use_enable video_cards_radeon gallium-r600)"
+ else
+ if use video_cards_nouveau || use video_cards_vmware; then
+ elog "SVGA and nouveau drivers are available only via gallium interface."
+ elog "Enable gallium useflag if you want to use them."
+ fi
+ fi
+
+ # bug 240956
+ use x86 && myconf="${myconf} $(use_enable hardened glx-rts)"
+
+ # --with-driver=dri|xlib|osmesa || do we need osmesa?
+ econf \
+ --disable-option-checking \
+ --with-driver=dri \
+ --disable-glut \
+ --without-demos \
+ --enable-xcb \
+ $(use_enable debug) \
+ $(use_enable motif glw) \
+ $(use_enable motif) \
+ $(use_enable nptl glx-tls) \
+ $(use_enable !pic asm) \
+ --with-dri-drivers=${DRI_DRIVERS} \
+ ${myconf}
+}
+
+src_install() {
+ base_src_install
+
+ # Save the glsl-compiler for later use
+ if ! tc-is-cross-compiler; then
+ dobin "${S}"/src/glsl/glsl_compiler || die
+ fi
+ # Remove redundant headers
+ # GLUT thing
+ rm -f "${ED}"/usr/include/GL/glut*.h || die "Removing glut include failed."
+ # Glew includes
+ rm -f "${ED}"/usr/include/GL/{glew,glxew,wglew}.h \
+ || die "Removing glew includes failed."
+
+ # Install config file for eselect mesa
+ insinto /usr/share/mesa
+ newins "${FILESDIR}/eselect-mesa.conf.7.10" eselect-mesa.conf || die
+
+ # Move libGL and others from /usr/lib to /usr/lib/opengl/blah/lib
+ # because user can eselect desired GL provider.
+ ebegin "Moving libGL and friends for dynamic switching"
+ dodir /usr/$(get_libdir)/opengl/${OPENGL_DIR}/{lib,extensions,include}
+ local x
+ for x in "${ED}"/usr/$(get_libdir)/libGL.{la,a,so*}; do
+ if [ -f ${x} -o -L ${x} ]; then
+ mv -f "${x}" "${ED}"/usr/$(get_libdir)/opengl/${OPENGL_DIR}/lib \
+ || die "Failed to move ${x}"
+ fi
+ done
+ for x in "${ED}"/usr/include/GL/{gl.h,glx.h,glext.h,glxext.h}; do
+ if [ -f ${x} -o -L ${x} ]; then
+ mv -f "${x}" "${ED}"/usr/$(get_libdir)/opengl/${OPENGL_DIR}/include \
+ || die "Failed to move ${x}"
+ fi
+ done
+ eend $?
+
+ if use classic || use gallium; then
+ ebegin "Moving DRI/Gallium drivers for dynamic switching"
+ local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
+ keepdir /usr/$(get_libdir)/dri
+ dodir /usr/$(get_libdir)/mesa
+ for x in ${gallium_drivers[@]}; do
+ if [ -f "${S}/$(get_libdir)/gallium/${x}" ]; then
+ mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
+ || die "Failed to move ${x}"
+ insinto "/usr/$(get_libdir)/dri/"
+ if [ -f "${S}/$(get_libdir)/${x}" ]; then
+ insopts -m0755
+ doins "${S}/$(get_libdir)/${x}" || die "failed to install ${x}"
+ fi
+ fi
+ done
+ for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
+ if [ -f ${x} -o -L ${x} ]; then
+ mv -f "${x}" "${x/dri/mesa}" \
+ || die "Failed to move ${x}"
+ fi
+ done
+ pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
+ ln -s ../mesa/*.so . || die "Creating symlink failed"
+ # remove symlinks to drivers known to eselect
+ for x in ${gallium_drivers[@]}; do
+ if [ -f ${x} -o -L ${x} ]; then
+ rm "${x}" || die "Failed to remove ${x}"
+ fi
+ done
+ popd
+ eend $?
+ fi
+}
+
+pkg_postinst() {
+ # Switch to the xorg implementation.
+ echo
+ eselect opengl set --use-old ${OPENGL_DIR}
+ # Select classic/gallium drivers
+ if use classic || use gallium; then
+ eselect mesa set --auto
+ fi
+}
+
+# $1 - VIDEO_CARDS flag
+# other args - names of DRI drivers to enable
+driver_enable() {
+ case $# in
+ # for enabling unconditionally
+ 1)
+ DRI_DRIVERS+=",$1"
+ ;;
+ *)
+ if use $1; then
+ shift
+ for i in $@; do
+ DRI_DRIVERS+=",${i}"
+ done
+ fi
+ ;;
+ esac
+}
diff --git a/media-libs/mesa/metadata.xml b/media-libs/mesa/metadata.xml
new file mode 100644
index 000000000000..6aca659161f8
--- /dev/null
+++ b/media-libs/mesa/metadata.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>x11</herd>
+<use>
+ <flag name='bindist'>Disable patent-encumbered ARB_texture_float, EXT_texture_shared_exponent, and EXT_packed_float extensions.</flag>
+ <flag name='classic'>Build drivers based on the classic architecture.</flag>
+ <flag name='d3d9'>Enable Direct 3D9 API through Nine state tracker. Can be used together with patched wine.</flag>
+ <flag name='dri3'>Enable DRI3 support.</flag>
+ <flag name='egl'>Enable EGL support.</flag>
+ <flag name='gallium'>Build drivers based on Gallium3D, the new architecture for 3D graphics drivers.</flag>
+ <flag name='gbm'>Enable the Graphics Buffer Manager for EGL on KMS.</flag>
+ <flag name='gles'>Enable GLES (both v1 and v2) support.</flag>
+ <flag name='gles1'>Enable GLESv1 support.</flag>
+ <flag name='gles2'>Enable GLESv2 support.</flag>
+ <flag name='llvm'>Enable LLVM backend for Gallium3D.</flag>
+ <flag name='opencl'>Enable the Clover Gallium OpenCL state tracker.</flag>
+ <flag name='openmax'>Enable OpenMAX video decode/encode acceleration for Gallium3D.</flag>
+ <flag name='openvg'>Enable the OpenVG 2D acceleration API for Gallium3D.</flag>
+ <flag name='osmesa'>Build the Mesa library for off-screen rendering.</flag>
+ <flag name='pax_kernel'>Enable if the user plans to run the package under a pax enabled hardened kernel</flag>
+ <flag name='pic'>disable optimized assembly code that is not PIC friendly</flag>
+ <flag name='vdpau'>Enable the VDPAU acceleration interface for the Gallium3D Video Layer.</flag>
+ <flag name='wayland'>Enable support for dev-libs/wayland</flag>
+ <flag name='xa'>Enable the XA (X Acceleration) API for Gallium3D.</flag>
+ <flag name='xvmc'>Enable the XvMC acceleration interface for the Gallium3D Video Layer.</flag>
+</use>
+</pkgmetadata>
diff --git a/media-libs/metadata.xml b/media-libs/metadata.xml
new file mode 100644
index 000000000000..afd918587f7c
--- /dev/null
+++ b/media-libs/metadata.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE catmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<catmetadata>
+ <longdescription lang="en">
+ The media-libs category contains media-related libraries.
+ </longdescription>
+ <longdescription lang="de">
+ Die Kategorie media-libs enthält Multimedia-Bibliotheken.
+ </longdescription>
+ <longdescription lang="es">
+ La categoría media-libs contiene librerías relacionadas con media.
+ </longdescription>
+ <longdescription lang="ja">
+ media-libsカテゴリーにはメディア関連のライブラリが含まれています。
+ </longdescription>
+ <longdescription lang="nl">
+ De media-libs categorie bevat bibliotheken voor multimedia.
+ </longdescription>
+ <longdescription lang="vi">
+ Nhóm media-libs chứa các thư viện liên quan đến media.
+ </longdescription>
+ <longdescription lang="it">
+ La categoria media-libs contiene librerie multimediali.
+ </longdescription>
+ <longdescription lang="pt">
+ A categoria media-libs contém bibliotecas relacionadas com mídia.
+ </longdescription>
+ <longdescription lang="pl">
+ Kategoria media-libs zawiera biblioteki multimedialne.
+ </longdescription>
+</catmetadata>
+
diff --git a/media-libs/ming/Manifest b/media-libs/ming/Manifest
new file mode 100644
index 000000000000..68fd0066709c
--- /dev/null
+++ b/media-libs/ming/Manifest
@@ -0,0 +1,2 @@
+DIST ming-0.4.4.tar.bz2 14001112 SHA256 40e09d781741ac961338ed8dec7ba2ed06217de9da44dd67af6b881b95d2af7e SHA512 a95cb843b4f88c767d489fc0d55793655fb578c47681131d335c47fbb7368f996ccc2092630cfc33de4487f840b4a4ba8db837bd7115ef9e4742ca9c7e2b7888 WHIRLPOOL b1a6d591f4d9312f564e9a9650df4db8f456d08161341dc7881620493513a69d17de7ee0058333447fb3b01c9be4b75da7b8cfc02123e3f6c2fe3f6b0aa068fd
+DIST ming-0.4.5.tar.bz2 14234048 SHA256 82da089bdfc3a7fcb732dc11c11a35003ee270d5102d4043d61ea69834239aeb SHA512 9e5a2fb558841e72a072e2c29a0871dc7056ab57f1e6feca864b9b0961841334c4d2c6bc731bc4e043eb96b63fb946738cb1b8b54ef45679fcbf9bcf82adea31 WHIRLPOOL 2315adb1ed2b8878843ce5eef54f7c4386a69c809820aa4d2040fe4d94c0fa367cc57966a78e327f6a578c99b3ed4b1fa5d352106df9283f3b2d7f87a1178203
diff --git a/media-libs/ming/files/ming-0.4.3-perl-5.14.patch b/media-libs/ming/files/ming-0.4.3-perl-5.14.patch
new file mode 100644
index 000000000000..e34eb0f6f5e5
--- /dev/null
+++ b/media-libs/ming/files/ming-0.4.3-perl-5.14.patch
@@ -0,0 +1,43 @@
+From a0ea1cc47330a3ab316713d720892b6272401890 Mon Sep 17 00:00:00 2001
+From: Niko Tyni <ntyni@debian.org>
+Date: Sun, 10 Jul 2011 21:46:09 +0300
+Subject: [PATCH] GvCV() isn't an lvalue since Perl 5.13.10
+
+GvCV() can't be assigned to anymore with recent perls, so use the new
+GvCV_set() macro when available or implement it the old way if it isn't.
+---
+ perl_ext/Exports.c | 2 +-
+ perl_ext/perl_swf.h | 4 ++++
+ 2 files changed, 5 insertions(+), 1 deletions(-)
+
+diff --git a/perl_ext/Exports.c b/perl_ext/Exports.c
+index 65f8912..5529728 100644
+--- a/perl_ext/Exports.c
++++ b/perl_ext/Exports.c
+@@ -190,7 +190,7 @@ void export_cv(SV *class, SV *caller, char *sub)
+ SvPVX(caller), sub, SvPVX(class), sub);
+ #endif
+ gv = gv_fetchpv(form("%s::%s",SvPVX( caller), sub), TRUE, SVt_PVCV);
+- GvCV(gv) = perl_get_cv(form("%s::%s", SvPVX(class), sub), TRUE);
++ GvCV_set(gv, perl_get_cv(form("%s::%s", SvPVX(class), sub), TRUE));
+ GvIMPORTED_CV_on(gv);
+ GvMULTI_on(gv);
+ }
+diff --git a/perl_ext/perl_swf.h b/perl_ext/perl_swf.h
+index b960229..1a3656e 100644
+--- a/perl_ext/perl_swf.h
++++ b/perl_ext/perl_swf.h
+@@ -58,6 +58,10 @@ typedef SWFFontCollection SWF__FontCollection;
+ #define aTHXo_
+ #endif
+
++#ifndef GvCV_set
++# define GvCV_set(G, C) (GvCV(G) = (C))
++#endif
++
+ #ifndef S_DEBUG
+ #define swf_debug 0 /* Should we get this from, say, $SWF::debug? */
+ #define S_DEBUG(level,code) if (swf_debug >= level) { code; }
+--
+1.7.5.4
+
diff --git a/media-libs/ming/files/ming-0.4.4-vasprintf.patch b/media-libs/ming/files/ming-0.4.4-vasprintf.patch
new file mode 100644
index 000000000000..1c0da423ce03
--- /dev/null
+++ b/media-libs/ming/files/ming-0.4.4-vasprintf.patch
@@ -0,0 +1,266 @@
+From 815f18295602dfabfad53b754fbcaad91e2198bc Mon Sep 17 00:00:00 2001
+Message-Id: <815f18295602dfabfad53b754fbcaad91e2198bc.1338912967.git.jlec@gentoo.org>
+From: Sandro Santilli <strk@keybit.net>
+Date: Sat, 29 Oct 2011 08:41:17 +0200
+Subject: [PATCH] Put vasprintf own implementation in its own file
+
+---
+ test/actionscript/ActionScriptTest.c | 1 +
+ test/actionscript/Makefile.am | 2 +-
+ util/Makefile.am | 6 +++-
+ util/decompile.c | 44 +++------------------------------
+ util/makeswf.c | 39 ------------------------------
+ util/makeswf_utils.c | 1 +
+ util/vasprintf.c | 43 +++++++++++++++++++++++++++++++++
+ util/vasprintf.h | 7 +++++
+ 8 files changed, 61 insertions(+), 82 deletions(-)
+
+diff --git a/test/actionscript/ActionScriptTest.c b/test/actionscript/ActionScriptTest.c
+index b351711..5af64c4 100644
+--- a/test/actionscript/ActionScriptTest.c
++++ b/test/actionscript/ActionScriptTest.c
+@@ -40,6 +40,7 @@
+ #include <sys/stat.h>
+ #include <limits.h>
+ #include <makeswf.h>
++#include <vasprintf.h>
+
+ static SWFMovie
+ compile(const char* filename, const char* ppfile, int version)
+diff --git a/test/actionscript/Makefile.am b/test/actionscript/Makefile.am
+index ae415ab..40e64e2 100644
+--- a/test/actionscript/Makefile.am
++++ b/test/actionscript/Makefile.am
+@@ -83,7 +83,7 @@ CLEANFILES = *.pp *.swf
+ check_PROGRAMS = \
+ ActionScriptTest
+
+-ActionScriptTest_SOURCES = ActionScriptTest.c ../run_test.c ../../util/makeswf_utils.c
++ActionScriptTest_SOURCES = ActionScriptTest.c ../run_test.c ../../util/makeswf_utils.c ../../util/vasprintf.c
+ ActionScriptTest_LDADD = $(top_builddir)/src/libming.la
+ ActionScriptTest_CFLAGS = -DTOP_BUILDDIR='"$(top_builddir)"' -DTOP_SOURCEDIR='"$(srcdir)"' -I$(top_srcdir)/util/ -DAS_TESTS='"$(AS_TESTS)"'
+
+diff --git a/util/Makefile.am b/util/Makefile.am
+index 0668f4f..3a7c9c4 100644
+--- a/util/Makefile.am
++++ b/util/Makefile.am
+@@ -45,7 +45,8 @@ libutil_la_SOURCES = \
+ blocktypes.c \
+ decompile.c \
+ parser.c \
+- read.c
++ read.c \
++ vasprintf.c
+
+ libutil_la_LIBADD = $(MATHLIB) $(ZLIB)
+
+@@ -60,7 +61,8 @@ noinst_HEADERS = \
+ parser.h \
+ read.h \
+ swfoutput.h \
+- swftypes.h
++ swftypes.h \
++ vasprintf.c
+
+ listswf_SOURCES = outputtxt.c main.c
+ listswf_LDADD = libutil.la $(top_builddir)/src/libming.la
+diff --git a/util/decompile.c b/util/decompile.c
+index 1af7a9f..c844fa4 100644
+--- a/util/decompile.c
++++ b/util/decompile.c
+@@ -18,7 +18,7 @@
+ *
+ ****************************************************************************/
+
+-#define _GNU_SOURCE
++#define _GNU_SOURCE 1
+
+ #define DEBUGSTACK
+ #define DECOMP_SWITCH
+@@ -42,45 +42,8 @@
+ #include "action.h"
+ #include "swftypes.h"
+ #include "../src/blocks/error.h"
++#include "vasprintf.h"
+
+-#ifndef HAVE_VASPRINTF
+-/* Workaround for the lack of vasprintf()
+- * As found on: http://unixpapa.com/incnote/stdio.html
+- * Seems to be Public Domain
+- */
+-int
+-vasprintf(char **ret, const char *format, va_list ap)
+-{
+- va_list ap2;
+- int len = 100; /* First guess at the size */
+- if ((*ret = (char *) malloc(len)) == NULL)
+- {
+- return -1;
+- }
+- while (1)
+- {
+- int nchar;
+- va_copy(ap2, ap);
+- nchar= vsnprintf(*ret, len, format, ap2);
+- if (nchar > -1 && nchar < len)
+- {
+- return nchar;
+- }
+- if (nchar > len)
+- {
+- len= nchar+1;
+- } else
+- {
+- len*= 2;
+- }
+- if ((*ret = (char *) realloc(*ret, len)) == NULL)
+- {
+- free(*ret);
+- return -1;
+- }
+- }
+-}
+-#endif
+
+ static char **pool;
+ struct SWF_ACTIONPUSHPARAM *regs[256];
+@@ -247,10 +210,11 @@ static void
+ println(const char* fmt, ...)
+ {
+ char *tmp;
++ int written;
+
+ va_list ap;
+ va_start (ap, fmt);
+- vasprintf (&tmp, fmt, ap);
++ written = vasprintf (&tmp, fmt, ap);
+
+ dcprintf("%s%s", tmp, newlinestring);
+
+diff --git a/util/makeswf.c b/util/makeswf.c
+index 0b80728..4fdc826 100644
+--- a/util/makeswf.c
++++ b/util/makeswf.c
+@@ -76,45 +76,6 @@
+ #include <getopt.h>
+ #endif
+
+-#ifndef HAVE_VASPRINTF
+-/* Workaround for the lack of vasprintf()
+- * As found on: http://unixpapa.com/incnote/stdio.html
+- * Seems to be Public Domain
+- */
+-int
+-vasprintf(char **ret, const char *format, va_list ap)
+-{
+- va_list ap2;
+- int len = 100; /* First guess at the size */
+- if ((*ret = (char *) malloc(len)) == NULL)
+- {
+- return -1;
+- }
+- while (1)
+- {
+- int nchar;
+- va_copy(ap2, ap);
+- nchar= vsnprintf(*ret, len, format, ap2);
+- if (nchar > -1 && nchar < len)
+- {
+- return nchar;
+- }
+- if (nchar > len)
+- {
+- len= nchar+1;
+- } else
+- {
+- len*= 2;
+- }
+- if ((*ret = (char *) realloc(*ret, len)) == NULL)
+- {
+- free(*ret);
+- return -1;
+- }
+- }
+-}
+-#endif
+-
+ #define DEFSWFVERSION 6
+ #define DEFSWFCOMPRESSION 9
+
+diff --git a/util/makeswf_utils.c b/util/makeswf_utils.c
+index f9f53bd..6a65d87 100644
+--- a/util/makeswf_utils.c
++++ b/util/makeswf_utils.c
+@@ -41,6 +41,7 @@
+ #ifdef HAVE_GETOPT_H
+ #include <getopt.h>
+ #endif
++#include "vasprintf.h"
+
+ // Cheating, but it works (not sure why the above ifdef for getopt isn't)
+ #ifdef _WIN32
+diff --git a/util/vasprintf.c b/util/vasprintf.c
+new file mode 100644
+index 0000000..1127664
+--- /dev/null
++++ b/util/vasprintf.c
+@@ -0,0 +1,43 @@
++#include <stdio.h>
++#include <stdlib.h>
++#include <stdarg.h>
++
++#ifndef HAVE_VASPRINTF
++/* Workaround for the lack of vasprintf()
++ * As found on: http://unixpapa.com/incnote/stdio.html
++ * Seems to be Public Domain
++ */
++int
++vasprintf(char **ret, const char *format, va_list ap)
++{
++ va_list ap2;
++ int len = 100; /* First guess at the size */
++ if ((*ret = (char *) malloc(len)) == NULL)
++ {
++ return -1;
++ }
++ while (1)
++ {
++ int nchar;
++ va_copy(ap2, ap);
++ nchar= vsnprintf(*ret, len, format, ap2);
++ if (nchar > -1 && nchar < len)
++ {
++ return nchar;
++ }
++ if (nchar > len)
++ {
++ len= nchar+1;
++ } else
++ {
++ len*= 2;
++ }
++ if ((*ret = (char *) realloc(*ret, len)) == NULL)
++ {
++ free(*ret);
++ return -1;
++ }
++ }
++}
++#endif
++
+diff --git a/util/vasprintf.h b/util/vasprintf.h
+new file mode 100644
+index 0000000..9391c23
+--- /dev/null
++++ b/util/vasprintf.h
+@@ -0,0 +1,7 @@
++#include <stdio.h>
++#include "ming_config.h"
++
++#ifndef HAVE_VASPRINTF
++int vasprintf(char **ret, const char *format, va_list ap);
++#endif
++
+--
+1.7.8.6
+
diff --git a/media-libs/ming/files/ming-0.4.5-gif-error.patch b/media-libs/ming/files/ming-0.4.5-gif-error.patch
new file mode 100644
index 000000000000..1d76b23f4301
--- /dev/null
+++ b/media-libs/ming/files/ming-0.4.5-gif-error.patch
@@ -0,0 +1,20 @@
+--- a/ming-0.4.5/src/libming.h 2013-06-08 10:08:51.000000000 -0400
++++ b/ming-0.4.5/src/libming.h 2014-08-29 16:26:57.874643312 -0400
+@@ -76,11 +76,16 @@
+ #include <unistd.h>
+ #endif
+
+-#if GIFLIB_GIFERRORSTRING
++#ifdef HAVE_GIF_LIB_H
++#include <gif_lib.h>
+ static void
+ PrintGifError(void)
+ {
++#if GIFLIB_GIFERRORSTRING
+ fprintf(stderr, "\nGIF-LIB error: %s.\n", GifErrorString());
++#else
++ fprintf(stderr, "\nGIF-LIB error but no GifErrorString support.\n");
++#endif
+ }
+ #endif
+
diff --git a/media-libs/ming/metadata.xml b/media-libs/ming/metadata.xml
new file mode 100644
index 000000000000..7f65c68b40d2
--- /dev/null
+++ b/media-libs/ming/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>graphics</herd>
+ <upstream>
+ <remote-id type="sourceforge">ming</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/ming/ming-0.4.4-r1.ebuild b/media-libs/ming/ming-0.4.4-r1.ebuild
new file mode 100644
index 000000000000..33efcab0b68e
--- /dev/null
+++ b/media-libs/ming/ming-0.4.4-r1.ebuild
@@ -0,0 +1,117 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PHP_EXT_NAME=ming
+PHP_EXT_OPTIONAL_USE=php
+USE_PHP="php5-3"
+PYTHON_DEPEND="python? 2"
+AUTOTOOLS_AUTORECONF=yes
+
+inherit autotools-utils flag-o-matic multilib php-ext-source-r2 perl-module python
+
+DESCRIPTION="An Open Source library for Flash movie generation"
+HOMEPAGE="http://ming.sourceforge.net/"
+SRC_URI="mirror://sourceforge/ming/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="+perl +python php static-libs"
+
+RDEPEND="perl? ( dev-lang/perl )
+ python? ( dev-lang/python )
+ media-libs/freetype
+ media-libs/libpng
+ media-libs/giflib
+ sys-libs/zlib
+ !media-libs/libswf"
+DEPEND="${DEPEND}
+ sys-devel/flex
+ virtual/yacc"
+
+S=${WORKDIR}/${P/_/.}
+
+# Tests only work when the package is tested on a system
+# which does not presently have any version of ming installed.
+RESTRICT="test"
+
+pkg_setup() {
+ use python && python_set_active_version 2 && python_pkg_setup
+}
+
+PATCHES=(
+ "${FILESDIR}"/${P}-vasprintf.patch
+ "${FILESDIR}"/${PN}-0.4.3-perl-5.14.patch )
+
+src_prepare() {
+ # Let's get rid of the TEXTRELS, link dynamic. Use gif.
+ sed -i \
+ -e 's/libming.a/libming.so/' \
+ -e 's/lungif/lgif/' \
+ perl_ext/Makefile.PL
+ sed -i \
+ -e 's/ungif/gif/' \
+ py_ext/setup.py.in
+
+ if use php; then
+ cd "${S}/php_ext"
+ php-ext-source-r2_phpize
+ cd "${S}"
+ fi
+
+ sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' configure.in || die
+
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ # build is sensitive to -O3 (bug #297437)
+ replace-flags -O3 -O2
+
+ local myeconfargs=(
+ $(use_enable static-libs static)
+ $(use_enable perl)
+ $(use_enable python)
+ )
+ autotools-utils_src_configure
+}
+
+src_compile() {
+ autotools-utils_src_compile
+
+ if use php; then
+ cd "${S}"/php_ext
+ myconf="--disable-rpath
+ --disable-static
+ --with-ming"
+ php-ext-source-r2_src_compile
+ fi
+}
+
+src_install() {
+ autotools-utils_src_install INSTALLDIRS="vendor"
+
+ perl_delete_localpod
+
+ use python && python_clean_installation_image
+
+ if use php; then
+ cd "${S}"/php_ext
+ php-ext-source-r2_src_install
+ fi
+}
+
+pkg_postinst() {
+ use python && python_mod_optimize ming.py mingc.py
+}
+
+pkg_prerm() {
+ :
+}
+
+pkg_postrm() {
+ use python && python_mod_cleanup ming.py mingc.py
+}
diff --git a/media-libs/ming/ming-0.4.5.ebuild b/media-libs/ming/ming-0.4.5.ebuild
new file mode 100644
index 000000000000..2990a1d88fcc
--- /dev/null
+++ b/media-libs/ming/ming-0.4.5.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PHP_EXT_NAME=ming
+PHP_EXT_OPTIONAL_USE=php
+AUTOTOOLS_AUTORECONF=yes
+GENTOO_DEPEND_ON_PERL=no
+inherit autotools-utils flag-o-matic multilib perl-module distutils-r1
+
+DESCRIPTION="An Open Source library for Flash movie generation"
+HOMEPAGE="http://ming.sourceforge.net/"
+SRC_URI="mirror://sourceforge/ming/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="+perl +python php static-libs"
+
+RDEPEND="perl? ( dev-lang/perl:= )
+ python? ( ${PYTHON_DEPS} )
+ media-libs/freetype
+ media-libs/libpng:=
+ media-libs/giflib
+ sys-libs/zlib
+ !media-libs/libswf"
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ virtual/yacc"
+PDEPEND="php? ( dev-php/ming-php )"
+
+S=${WORKDIR}/${P/_/.}
+PATCHES=( "${FILESDIR}"/${P}-gif-error.patch )
+
+# Tests only work when the package is tested on a system
+# which does not presently have any version of ming installed.
+RESTRICT="test"
+
+src_prepare() {
+ # Let's get rid of the TEXTRELS, link dynamic. Use gif.
+ sed -i \
+ -e 's/libming.a/libming.so/' \
+ -e 's/lungif/lgif/' \
+ perl_ext/Makefile.PL
+ sed -i \
+ -e 's/ungif/gif/' \
+ py_ext/setup.py.in
+
+ sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' configure.in || die
+
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ # build is sensitive to -O3 (bug #297437)
+ replace-flags -O3 -O2
+
+ # build python via distutils calls, disable here
+ # php is done in dev-php/ming-php
+ local myeconfargs=(
+ --disable-python
+ --disable-php
+ $(use_enable static-libs static)
+ $(use_enable perl)
+ )
+ autotools-utils_src_configure
+}
+
+run_distutils() {
+ if use python; then
+ pushd "${BUILD_DIR}"/py_ext > /dev/null || die
+ distutils-r1_"${@}"
+ popd > /dev/null || die
+ fi
+}
+
+src_compile() {
+ autotools-utils_src_compile
+
+ run_distutils ${FUNCNAME}
+}
+
+src_install() {
+ run_distutils ${FUNCNAME}
+
+ autotools-utils_src_install INSTALLDIRS="vendor"
+
+ perl_delete_localpod
+}
+
+pkg_postinst() {
+ :
+}
+
+pkg_prerm() {
+ :
+}
+
+pkg_postrm() {
+ :
+}
diff --git a/media-libs/mlt/Manifest b/media-libs/mlt/Manifest
new file mode 100644
index 000000000000..09ba86544993
--- /dev/null
+++ b/media-libs/mlt/Manifest
@@ -0,0 +1,3 @@
+DIST mlt-0.8.2.tar.gz 1161293 SHA256 36c743d2abc68ce737ac526507fc2caf71b3d6a53a2bf31d22e8193a8b899577 SHA512 ab71018e5a188b95d91b4aceeb4ca0dfc59d0dd981ec3e4fa220b91ce812e2c98ebad1d51998005c6bc98999c7478444c8bfd398d61bd2084ff732a1638ca6aa WHIRLPOOL 4d72efbffd2f7c77041065c948c18ccbb4a65eb7f4ec7209ccde15e142fee84c70324390bc921c0302c30ad7673336c8cf00be8c710154fe31c8a3063987622b
+DIST mlt-0.8.8.tar.gz 1108652 SHA256 cc0e1cdb97a1cd59811a74553b5d3fbff590eb859c475253e188de1069ff9654 SHA512 d29d982632dec14e4397db602688816e06f095b1831514a816bc7640d574a04d3d56cc16240ea0a01229887e95c80891b87c5df981063cb2d6a14b50ff67589f WHIRLPOOL 6e5665e5b4c9471d252faea7073cfd21580e31b55941ba51a415783d79bec3d857fcd01f111da25e24551a3f03a728390e17ab9b127e1bd0977bac94c83162a5
+DIST mlt-0.9.0.tar.gz 1167943 SHA256 f20c6a9c9acaed3da84c601bf9293b2d148168386e5be2bc55651a75f95c1cc9 SHA512 631ab41ee6e3673c712f784b9c02b567a5e3b982d49eabe032ef20e89be9424cf9ce6d97fe6906f03b0ac082544316ba8524ae041d017aeac009ab9b98d457d9 WHIRLPOOL b39e78837f2f2785721315ac174d106e33bafd2dd55b8883b254a39dc98f664be29ce3e84413d2ba55f881bb42ca10c36a9117de00b1a5efc3dff8577a6a29af
diff --git a/media-libs/mlt/files/mlt-0.7.2-ruby-link.patch b/media-libs/mlt/files/mlt-0.7.2-ruby-link.patch
new file mode 100644
index 000000000000..c0427c1a3df0
--- /dev/null
+++ b/media-libs/mlt/files/mlt-0.7.2-ruby-link.patch
@@ -0,0 +1,18 @@
+The build system tries to link to installed system libraries first, which
+fails because the ABI has changed...
+
+diff -ruN mlt-0.7.2.orig/src/swig/ruby/build mlt-0.7.2/src/swig/ruby/build
+--- mlt-0.7.2.orig/src/swig/ruby/build 2011-05-02 07:59:12.000000000 +0200
++++ mlt-0.7.2/src/swig/ruby/build 2011-10-30 16:21:01.000000000 +0100
+@@ -5,8 +5,10 @@
+ exit 0
+ end
+ system( "ln -sf ../mlt.i" )
++system( "ln -sf ../../framework/libmlt.so" )
++system( "ln -sf ../../mlt++/libmlt++.so" )
+ system( "swig -c++ -ruby -I../../mlt++ -I../.. mlt.i" )
+ $CFLAGS += " -I../.."
+-$LDFLAGS += " -L../../mlt++ -lmlt++"
++$LIBS += " -lmlt++ -lmlt -lstdc++"
+ create_makefile('mlt')
+ system( "make" )
diff --git a/media-libs/mlt/files/mlt-0.8.2-av_codec_is_encoder.patch b/media-libs/mlt/files/mlt-0.8.2-av_codec_is_encoder.patch
new file mode 100644
index 000000000000..3d0ba1ceb2aa
--- /dev/null
+++ b/media-libs/mlt/files/mlt-0.8.2-av_codec_is_encoder.patch
@@ -0,0 +1,32 @@
+AVCodec.encode has been renamed recently is ffmpeg, causing mlt to fail to build.
+Starting from libavcodec 54.7 we have av_codec_is_encoder available publicly so
+use this instead.
+
+Index: mlt-0.8.2/src/modules/avformat/consumer_avformat.c
+===================================================================
+--- mlt-0.8.2.orig/src/modules/avformat/consumer_avformat.c
++++ mlt-0.8.2/src/modules/avformat/consumer_avformat.c
+@@ -238,7 +238,11 @@ static int consumer_start( mlt_consumer
+ mlt_properties_set_data( doc, "audio_codecs", codecs, 0, NULL, NULL );
+ while ( ( codec = av_codec_next( codec ) ) )
+ #if LIBAVCODEC_VERSION_INT >= ((54<<16)+(0<<8)+0)
++#if LIBAVCODEC_VERSION_INT >= ((54<<16)+(7<<8)+0)
++ if ( av_codec_is_encoder(codec) && codec->type == CODEC_TYPE_AUDIO )
++#else
+ if ( ( codec->encode || codec->encode2 ) && codec->type == CODEC_TYPE_AUDIO )
++#endif
+ #else
+ if ( codec->encode && codec->type == CODEC_TYPE_AUDIO )
+ #endif
+@@ -262,7 +266,11 @@ static int consumer_start( mlt_consumer
+ mlt_properties_set_data( doc, "video_codecs", codecs, 0, NULL, NULL );
+ while ( ( codec = av_codec_next( codec ) ) )
+ #if LIBAVCODEC_VERSION_INT >= ((54<<16)+(0<<8)+0)
++#if LIBAVCODEC_VERSION_INT >= ((54<<16)+(7<<8)+0)
++ if ( av_codec_is_encoder(codec) && codec->type == CODEC_TYPE_VIDEO )
++#else
+ if ( (codec->encode || codec->encode2) && codec->type == CODEC_TYPE_VIDEO )
++#endif
+ #else
+ if ( codec->encode && codec->type == CODEC_TYPE_VIDEO )
+ #endif
diff --git a/media-libs/mlt/files/mlt-0.8.6-ruby-link.patch b/media-libs/mlt/files/mlt-0.8.6-ruby-link.patch
new file mode 100644
index 000000000000..fa4ec8aec05a
--- /dev/null
+++ b/media-libs/mlt/files/mlt-0.8.6-ruby-link.patch
@@ -0,0 +1,19 @@
+The build system tries to link to installed system libraries first, which
+fails because the ABI has changed...
+
+Index: mlt-0.8.6/src/swig/ruby/build
+===================================================================
+--- mlt-0.8.6.orig/src/swig/ruby/build
++++ mlt-0.8.6/src/swig/ruby/build
+@@ -5,8 +5,10 @@ if ARGV.shift == 'clean'
+ exit 0
+ end
+ system( "ln -sf ../mlt.i" )
++system( "ln -sf ../../framework/libmlt.so" )
++system( "ln -sf ../../mlt++/libmlt++.so" )
+ system( "swig -c++ -ruby -I../../mlt++ -I../.. mlt.i" )
+ $CFLAGS += " -I../.. " + ENV['CXXFLAGS']
+-$LDFLAGS += " -L../../mlt++ -lmlt++"
++$LIBS += " -lmlt++ -lmlt -lstdc++"
+ create_makefile('mlt')
+ system( "make" )
diff --git a/media-libs/mlt/files/mlt-0.9.0-freetype251.patch b/media-libs/mlt/files/mlt-0.9.0-freetype251.patch
new file mode 100644
index 000000000000..058412199fae
--- /dev/null
+++ b/media-libs/mlt/files/mlt-0.9.0-freetype251.patch
@@ -0,0 +1,12 @@
+--- mlt-0.9.0/src/modules/gtk2/producer_pango.c
++++ mlt-0.9.0/src/modules/gtk2/producer_pango.c
+@@ -25,7 +25,8 @@
+ #include <string.h>
+ #include <gdk-pixbuf/gdk-pixbuf.h>
+ #include <pango/pangoft2.h>
+-#include <freetype/freetype.h>
++#include <ft2build.h>
++#include FT_FREETYPE_H
+ #include <iconv.h>
+ #include <pthread.h>
+ #include <ctype.h>
diff --git a/media-libs/mlt/metadata.xml b/media-libs/mlt/metadata.xml
new file mode 100644
index 000000000000..a551a235c3b7
--- /dev/null
+++ b/media-libs/mlt/metadata.xml
@@ -0,0 +1,28 @@
+<?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="compressed-lumas">Compress the luma files in png.</flag>
+ <flag name="frei0r">Build the module for <pkg>media-plugins/frei0r-plugins</pkg></flag>
+ <flag name="melt">Build the melt commandline tool</flag>
+ <flag name="lua">Build SWIG bindings for Lua</flag>
+ <flag name="kdenlive">Build support for <pkg>media-video/kdenlive</pkg></flag>
+ <flag name="python">Build SWIG bindings for Python</flag>
+ <flag name="rtaudio">Builds rtaudio consumer for native audio support on multiple platforms.</flag>
+ <flag name="ruby">Build SWIG bindings for Ruby</flag>
+ <!--
+ <flag name="swfdec">Use <pkg>media-libs/swfdec</pkg> for reading .swf files (Macromedia Flash) instead of libavformat.</flag>
+ <flag name="java">Build SWIG bindings for Java</flag>
+ <flag name="perl">Build SWIG bindings for Perl</flag>
+ <flag name="php">Build SWIG bindings for PHP</flag>
+ <flag name="tcl">Build SWIG bindings for TCL</flag>
+ -->
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">mlt</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/mlt/mlt-0.8.2.ebuild b/media-libs/mlt/mlt-0.8.2.ebuild
new file mode 100644
index 000000000000..75572e098a21
--- /dev/null
+++ b/media-libs/mlt/mlt-0.8.2.ebuild
@@ -0,0 +1,176 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+PYTHON_DEPEND="python? 2:2.6"
+inherit eutils toolchain-funcs multilib python
+
+DESCRIPTION="An open source multimedia framework, designed and developed for television broadcasting"
+HOMEPAGE="http://www.mltframework.org/"
+SRC_URI="mirror://sourceforge/mlt/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~ppc64 x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="compressed-lumas dv debug ffmpeg frei0r gtk jack kde libsamplerate melt
+cpu_flags_x86_mmx qt4 quicktime rtaudio sdl cpu_flags_x86_sse cpu_flags_x86_sse2 vorbis xine xml lua python ruby vdpau" # java perl php tcl
+IUSE="${IUSE} kernel_linux"
+
+#rtaudio will use OSS on non linux OSes
+RDEPEND="ffmpeg? ( virtual/ffmpeg[vdpau?] )
+ dv? ( >=media-libs/libdv-0.104 )
+ xml? ( >=dev-libs/libxml2-2.5 )
+ vorbis? ( >=media-libs/libvorbis-1.1.2 )
+ sdl? ( >=media-libs/libsdl-1.2.10[X,opengl]
+ >=media-libs/sdl-image-1.2.4 )
+ libsamplerate? ( >=media-libs/libsamplerate-0.1.2 )
+ jack? ( >=media-sound/jack-audio-connection-kit-0.121.3
+ media-libs/ladspa-sdk
+ >=dev-libs/libxml2-2.5 )
+ frei0r? ( media-plugins/frei0r-plugins )
+ gtk? ( x11-libs/gtk+:2
+ media-libs/libexif
+ x11-libs/pango )
+ quicktime? ( media-libs/libquicktime )
+ rtaudio? ( kernel_linux? ( media-libs/alsa-lib ) )
+ xine? ( >=media-libs/xine-lib-1.1.2_pre20060328-r7 )
+ qt4? ( dev-qt/qtgui:4 dev-qt/qtsvg:4 media-libs/libexif )
+ !media-libs/mlt++
+ lua? ( >=dev-lang/lua-5.1.4-r4 )
+ ruby? ( dev-lang/ruby )"
+# sox? ( media-sound/sox )
+# java? ( >=virtual/jre-1.5 )
+# perl? ( dev-lang/perl )
+# php? ( dev-lang/php )
+# tcl? ( dev-lang/tcl:0 )
+
+SWIG_DEPEND=">=dev-lang/swig-2.0"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ compressed-lumas? ( || ( media-gfx/imagemagick[png]
+ media-gfx/graphicsmagick[imagemagick,png] ) )
+ lua? ( ${SWIG_DEPEND} virtual/pkgconfig )
+ python? ( ${SWIG_DEPEND} )
+ ruby? ( ${SWIG_DEPEND} )"
+# java? ( ${SWIG_DEPEND} >=virtual/jdk-1.5 )
+# perl? ( ${SWIG_DEPEND} )
+# php? ( ${SWIG_DEPEND} )
+# tcl? ( ${SWIG_DEPEND} )
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.7.2-ruby-link.patch
+ epatch "${FILESDIR}"/${PN}-0.8.2-av_codec_is_encoder.patch
+
+ # respect CFLAGS LDFLAGS when building shared libraries. Bug #308873
+ for x in python lua; do
+ sed -i "/mlt.so/s: -lmlt++ :& ${CFLAGS} ${LDFLAGS} :" src/swig/$x/build || die
+ done
+ sed -i "/^LDFLAGS/s: += :& ${LDFLAGS} :" src/swig/ruby/build || die
+}
+
+src_configure() {
+ tc-export CC CXX
+
+ local myconf="--enable-gpl
+ --enable-motion-est
+ --disable-swfdec
+ $(use_enable debug)
+ $(use_enable dv)
+ $(use_enable cpu_flags_x86_sse sse)
+ $(use_enable cpu_flags_x86_sse2 sse2)
+ $(use_enable gtk gtk2)
+ $(use_enable vorbis)
+ $(use_enable sdl)
+ $(use_enable jack jackrack)
+ $(use_enable ffmpeg avformat)
+ $(use_enable frei0r)
+ $(use_enable melt)
+ $(use_enable libsamplerate resample)
+ $(use_enable rtaudio)
+ $(use vdpau && echo ' --avformat-vdpau')
+ $(use_enable xml)
+ $(use_enable xine)
+ $(use_enable kde kdenlive)
+ $(use_enable qt4 qimage)
+ --disable-sox"
+ #$(use_enable sox) FIXME
+
+ use ffmpeg && myconf="${myconf} --avformat-swscale"
+
+ (use quicktime && use dv) || myconf="${myconf} --disable-kino"
+
+ use compressed-lumas && myconf="${myconf} --luma-compress"
+
+ ( use x86 || use amd64 ) && \
+ myconf="${myconf} $(use_enable cpu_flags_x86_mmx mmx)" ||
+ myconf="${myconf} --disable-mmx"
+
+ use melt || sed -i -e "s;src/melt;;" Makefile
+
+ # TODO: add swig language bindings
+ # see also http://www.mltframework.org/twiki/bin/view/MLT/ExtremeMakeover
+
+ local swig_lang
+ # TODO: java perl php tcl
+ for i in lua python ruby ; do
+ use $i && swig_lang="${swig_lang} $i"
+ done
+ [ -z "${swig_lang}" ] && swig_lang="none"
+
+ econf ${myconf} --swig-languages="${swig_lang}"
+ sed -i -e s/^OPT/#OPT/ "${S}/config.mak"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS ChangeLog NEWS README docs/*.txt
+
+ dodir /usr/share/${PN}
+ insinto /usr/share/${PN}
+ doins -r demo
+
+ docinto swig
+
+ # Install SWIG bindings
+ if use lua; then
+ cd "${S}"/src/swig/lua
+ exeinto $(pkg-config --variable INSTALL_CMOD lua)
+ doexe mlt.so || die
+ dodoc play.lua
+ fi
+
+ if use python; then
+ cd "${S}"/src/swig/python
+ insinto $(python_get_sitedir)
+ doins mlt.py || die
+ exeinto $(python_get_sitedir)
+ doexe _mlt.so || die
+ dodoc play.py
+ fi
+
+ if use ruby; then
+ cd "${S}"/src/swig/ruby
+ exeinto $("${EPREFIX}"/usr/bin/ruby -r rbconfig -e 'print Config::CONFIG["sitearchdir"]')
+ doexe mlt.so || die
+ dodoc play.rb thumbs.rb
+ fi
+ # TODO: java perl php tcl
+}
+
+pkg_postinst() {
+ if use python; then
+ python_mod_optimize mlt.py
+ fi
+}
+
+pkg_postrm() {
+ if use python; then
+ python_mod_cleanup mlt.py
+ fi
+}
diff --git a/media-libs/mlt/mlt-0.8.8.ebuild b/media-libs/mlt/mlt-0.8.8.ebuild
new file mode 100644
index 000000000000..e57aa3c2f999
--- /dev/null
+++ b/media-libs/mlt/mlt-0.8.8.ebuild
@@ -0,0 +1,181 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+PYTHON_DEPEND="python? 2:2.6"
+inherit eutils toolchain-funcs multilib python
+
+DESCRIPTION="An open source multimedia framework, designed and developed for television broadcasting"
+HOMEPAGE="http://www.mltframework.org/"
+SRC_URI="mirror://sourceforge/mlt/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="compressed-lumas dv debug ffmpeg frei0r gtk jack kde kdenlive libsamplerate melt
+cpu_flags_x86_mmx qt4 quicktime rtaudio sdl cpu_flags_x86_sse cpu_flags_x86_sse2 vorbis xine xml lua python ruby vdpau" # java perl php tcl
+IUSE="${IUSE} kernel_linux"
+
+#rtaudio will use OSS on non linux OSes
+RDEPEND="ffmpeg? ( virtual/ffmpeg[vdpau?] )
+ dv? ( >=media-libs/libdv-0.104 )
+ xml? ( >=dev-libs/libxml2-2.5 )
+ vorbis? ( >=media-libs/libvorbis-1.1.2 )
+ sdl? ( >=media-libs/libsdl-1.2.10[X,opengl]
+ >=media-libs/sdl-image-1.2.4 )
+ libsamplerate? ( >=media-libs/libsamplerate-0.1.2 )
+ jack? ( >=media-sound/jack-audio-connection-kit-0.121.3
+ media-libs/ladspa-sdk
+ >=dev-libs/libxml2-2.5 )
+ frei0r? ( media-plugins/frei0r-plugins )
+ gtk? ( x11-libs/gtk+:2
+ media-libs/libexif
+ x11-libs/pango )
+ quicktime? ( media-libs/libquicktime )
+ rtaudio? ( kernel_linux? ( media-libs/alsa-lib ) )
+ xine? ( >=media-libs/xine-lib-1.1.2_pre20060328-r7 )
+ qt4? ( dev-qt/qtgui:4
+ dev-qt/qtsvg:4
+ media-libs/libexif )
+ kde? ( kde-base/kdelibs:4
+ media-libs/libexif )
+ !media-libs/mlt++
+ lua? ( >=dev-lang/lua-5.1.4-r4 )
+ ruby? ( dev-lang/ruby )"
+# sox? ( media-sound/sox )
+# java? ( >=virtual/jre-1.5 )
+# perl? ( dev-lang/perl )
+# php? ( dev-lang/php )
+# tcl? ( dev-lang/tcl:0 )
+
+SWIG_DEPEND=">=dev-lang/swig-2.0"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ compressed-lumas? ( || ( media-gfx/imagemagick[png]
+ media-gfx/graphicsmagick[imagemagick,png] ) )
+ lua? ( ${SWIG_DEPEND} virtual/pkgconfig )
+ python? ( ${SWIG_DEPEND} )
+ ruby? ( ${SWIG_DEPEND} )"
+# java? ( ${SWIG_DEPEND} >=virtual/jdk-1.5 )
+# perl? ( ${SWIG_DEPEND} )
+# php? ( ${SWIG_DEPEND} )
+# tcl? ( ${SWIG_DEPEND} )
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.8.6-ruby-link.patch
+
+ # respect CFLAGS LDFLAGS when building shared libraries. Bug #308873
+ for x in python lua; do
+ sed -i "/mlt.so/s: -lmlt++ :& ${CFLAGS} ${LDFLAGS} :" src/swig/$x/build || die
+ done
+ sed -i "/^LDFLAGS/s: += :& ${LDFLAGS} :" src/swig/ruby/build || die
+
+ epatch_user
+}
+
+src_configure() {
+ tc-export CC CXX
+
+ local myconf="--enable-gpl
+ --enable-gpl3
+ --enable-motion-est
+ --disable-swfdec
+ $(use_enable debug)
+ $(use_enable dv)
+ $(use_enable cpu_flags_x86_sse sse)
+ $(use_enable cpu_flags_x86_sse2 sse2)
+ $(use_enable gtk gtk2)
+ $(use_enable vorbis)
+ $(use_enable sdl)
+ $(use_enable jack jackrack)
+ $(use_enable ffmpeg avformat)
+ $(use_enable frei0r)
+ $(use_enable melt)
+ $(use_enable libsamplerate resample)
+ $(use_enable rtaudio)
+ $(use vdpau && echo ' --avformat-vdpau')
+ $(use_enable xml)
+ $(use_enable xine)
+ $(use_enable kdenlive)
+ $(use_enable qt4 qimage)
+ --disable-sox"
+ #$(use_enable sox) FIXME
+
+ use ffmpeg && myconf="${myconf} --avformat-swscale"
+ use kde || myconf="${myconf} --without-kde"
+ (use quicktime && use dv) || myconf="${myconf} --disable-kino"
+ use compressed-lumas && myconf="${myconf} --luma-compress"
+
+ ( use x86 || use amd64 ) && \
+ myconf="${myconf} $(use_enable cpu_flags_x86_mmx mmx)" ||
+ myconf="${myconf} --disable-mmx"
+
+ use melt || sed -i -e "s;src/melt;;" Makefile
+
+ # TODO: add swig language bindings
+ # see also http://www.mltframework.org/twiki/bin/view/MLT/ExtremeMakeover
+
+ local swig_lang
+ # TODO: java perl php tcl
+ for i in lua python ruby ; do
+ use $i && swig_lang="${swig_lang} $i"
+ done
+ [ -z "${swig_lang}" ] && swig_lang="none"
+
+ econf ${myconf} --swig-languages="${swig_lang}"
+ sed -i -e s/^OPT/#OPT/ "${S}/config.mak"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS ChangeLog NEWS README docs/*.txt
+
+ dodir /usr/share/${PN}
+ insinto /usr/share/${PN}
+ doins -r demo
+
+ docinto swig
+
+ # Install SWIG bindings
+ if use lua; then
+ cd "${S}"/src/swig/lua
+ exeinto $(pkg-config --variable INSTALL_CMOD lua)
+ doexe mlt.so || die
+ dodoc play.lua
+ fi
+
+ if use python; then
+ cd "${S}"/src/swig/python
+ insinto $(python_get_sitedir)
+ doins mlt.py || die
+ exeinto $(python_get_sitedir)
+ doexe _mlt.so || die
+ dodoc play.py
+ fi
+
+ if use ruby; then
+ cd "${S}"/src/swig/ruby
+ exeinto $("${EPREFIX}"/usr/bin/ruby -r rbconfig -e 'print Config::CONFIG["sitearchdir"]')
+ doexe mlt.so || die
+ dodoc play.rb thumbs.rb
+ fi
+ # TODO: java perl php tcl
+}
+
+pkg_postinst() {
+ if use python; then
+ python_mod_optimize mlt.py
+ fi
+}
+
+pkg_postrm() {
+ if use python; then
+ python_mod_cleanup mlt.py
+ fi
+}
diff --git a/media-libs/mlt/mlt-0.9.0.ebuild b/media-libs/mlt/mlt-0.9.0.ebuild
new file mode 100644
index 000000000000..dc15e01157b4
--- /dev/null
+++ b/media-libs/mlt/mlt-0.9.0.ebuild
@@ -0,0 +1,189 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_DEPEND="python? 2:2.6"
+inherit eutils toolchain-funcs multilib python
+
+DESCRIPTION="An open source multimedia framework, designed and developed for television broadcasting"
+HOMEPAGE="http://www.mltframework.org/"
+SRC_URI="mirror://sourceforge/mlt/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~ppc64 x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="compressed-lumas dv debug ffmpeg frei0r gtk jack kde kdenlive libav libsamplerate melt
+cpu_flags_x86_mmx qt4 quicktime rtaudio sdl cpu_flags_x86_sse cpu_flags_x86_sse2 vorbis xine xml lua python ruby vdpau" # java perl php tcl
+IUSE="${IUSE} kernel_linux"
+
+#rtaudio will use OSS on non linux OSes
+RDEPEND="
+ ffmpeg? (
+ libav? ( media-video/libav:0=[vdpau?] )
+ !libav? ( media-video/ffmpeg:0=[vdpau?] )
+ )
+ dv? ( >=media-libs/libdv-0.104 )
+ xml? ( >=dev-libs/libxml2-2.5 )
+ vorbis? ( >=media-libs/libvorbis-1.1.2 )
+ sdl? ( >=media-libs/libsdl-1.2.10[X,opengl]
+ >=media-libs/sdl-image-1.2.4 )
+ libsamplerate? ( >=media-libs/libsamplerate-0.1.2 )
+ jack? ( >=media-sound/jack-audio-connection-kit-0.121.3
+ media-libs/ladspa-sdk
+ >=dev-libs/libxml2-2.5 )
+ frei0r? ( media-plugins/frei0r-plugins )
+ gtk? ( x11-libs/gtk+:2
+ media-libs/libexif
+ x11-libs/pango )
+ quicktime? ( media-libs/libquicktime )
+ rtaudio? ( kernel_linux? ( media-libs/alsa-lib ) )
+ xine? ( >=media-libs/xine-lib-1.1.2_pre20060328-r7 )
+ qt4? ( dev-qt/qtgui:4
+ dev-qt/qtsvg:4
+ media-libs/libexif )
+ kde? ( kde-base/kdelibs:4
+ media-libs/libexif )
+ !media-libs/mlt++
+ lua? ( >=dev-lang/lua-5.1.4-r4 )
+ ruby? ( dev-lang/ruby )"
+# sox? ( media-sound/sox )
+# java? ( >=virtual/jre-1.5 )
+# perl? ( dev-lang/perl )
+# php? ( dev-lang/php )
+# tcl? ( dev-lang/tcl:0= )
+
+SWIG_DEPEND=">=dev-lang/swig-2.0"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ compressed-lumas? ( || ( media-gfx/imagemagick[png]
+ media-gfx/graphicsmagick[imagemagick,png] ) )
+ lua? ( ${SWIG_DEPEND} virtual/pkgconfig )
+ python? ( ${SWIG_DEPEND} )
+ ruby? ( ${SWIG_DEPEND} )"
+# java? ( ${SWIG_DEPEND} >=virtual/jdk-1.5 )
+# perl? ( ${SWIG_DEPEND} )
+# php? ( ${SWIG_DEPEND} )
+# tcl? ( ${SWIG_DEPEND} )
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.8.6-ruby-link.patch \
+ "${FILESDIR}"/${PN}-0.9.0-freetype251.patch
+
+ # respect CFLAGS LDFLAGS when building shared libraries. Bug #308873
+ for x in python lua; do
+ sed -i "/mlt.so/s: -lmlt++ :& ${CFLAGS} ${LDFLAGS} :" src/swig/$x/build || die
+ done
+ sed -i "/^LDFLAGS/s: += :& ${LDFLAGS} :" src/swig/ruby/build || die
+
+ epatch_user
+}
+
+src_configure() {
+ tc-export CC CXX
+
+ local myconf="--enable-gpl
+ --enable-gpl3
+ --enable-motion-est
+ --target-arch=$(tc-arch-kernel)
+ --disable-swfdec
+ $(use_enable debug)
+ $(use_enable dv)
+ $(use_enable cpu_flags_x86_sse sse)
+ $(use_enable cpu_flags_x86_sse2 sse2)
+ $(use_enable gtk gtk2)
+ $(use_enable vorbis)
+ $(use_enable sdl)
+ $(use_enable jack jackrack)
+ $(use_enable ffmpeg avformat)
+ $(use_enable frei0r)
+ $(use_enable melt)
+ $(use_enable libsamplerate resample)
+ $(use_enable rtaudio)
+ $(use vdpau && echo ' --avformat-vdpau')
+ $(use_enable xml)
+ $(use_enable xine)
+ $(use_enable kdenlive)
+ $(use_enable qt4 qimage)
+ --disable-sox"
+ #$(use_enable sox) FIXME
+
+ use ffmpeg && myconf="${myconf} --avformat-swscale"
+ use kde || myconf="${myconf} --without-kde"
+ (use quicktime && use dv) || myconf="${myconf} --disable-kino"
+ use compressed-lumas && myconf="${myconf} --luma-compress"
+
+ ( use x86 || use amd64 ) && \
+ myconf="${myconf} $(use_enable cpu_flags_x86_mmx mmx)" ||
+ myconf="${myconf} --disable-mmx"
+
+ if ! use melt; then
+ sed -i -e "s;src/melt;;" Makefile || die
+ fi
+
+ # TODO: add swig language bindings
+ # see also http://www.mltframework.org/twiki/bin/view/MLT/ExtremeMakeover
+
+ local swig_lang
+ # TODO: java perl php tcl
+ for i in lua python ruby ; do
+ use $i && swig_lang="${swig_lang} $i"
+ done
+ [ -z "${swig_lang}" ] && swig_lang="none"
+
+ econf ${myconf} --swig-languages="${swig_lang}"
+ sed -i -e s/^OPT/#OPT/ "${S}/config.mak" || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc AUTHORS ChangeLog NEWS README docs/*.txt
+
+ dodir /usr/share/${PN}
+ insinto /usr/share/${PN}
+ doins -r demo
+
+ docinto swig
+
+ # Install SWIG bindings
+ if use lua; then
+ cd "${S}"/src/swig/lua || die
+ exeinto $(pkg-config --variable INSTALL_CMOD lua)
+ doexe mlt.so
+ dodoc play.lua
+ fi
+
+ if use python; then
+ cd "${S}"/src/swig/python || die
+ insinto $(python_get_sitedir)
+ doins mlt.py
+ exeinto $(python_get_sitedir)
+ doexe _mlt.so
+ dodoc play.py
+ fi
+
+ if use ruby; then
+ cd "${S}"/src/swig/ruby || die
+ exeinto $("${EPREFIX}"/usr/bin/ruby -r rbconfig -e 'print Config::CONFIG["sitearchdir"]')
+ doexe mlt.so
+ dodoc play.rb thumbs.rb
+ fi
+ # TODO: java perl php tcl
+}
+
+pkg_postinst() {
+ if use python; then
+ python_mod_optimize mlt.py
+ fi
+}
+
+pkg_postrm() {
+ if use python; then
+ python_mod_cleanup mlt.py
+ fi
+}
diff --git a/media-libs/musicbrainz/Manifest b/media-libs/musicbrainz/Manifest
new file mode 100644
index 000000000000..413f1011e20c
--- /dev/null
+++ b/media-libs/musicbrainz/Manifest
@@ -0,0 +1,5 @@
+DIST libmusicbrainz-2.1.5.tar.gz 524243 SHA256 c6629c4bed428f9df3f89efc065b2d96f05eba36286532ebe8b8e404022371a0 SHA512 2d9bac3198adc772ec06d53c33622e561ebeb9a6b26e0c4ed9ecae7b7ca76492df1918abacb8ca9823ce051386af445e0b7aa6d7c6e064cc5a533577dd6c20a8 WHIRLPOOL 063c32896f4a55f69c7a75457e4e50cb4e46a2f18fae6f32e19b26b2ce699b99d104bdd7ae539b77ac79b571b421ed3f7aecad0582ed4e73c20456b1bba79807
+DIST libmusicbrainz-3.0.2.tar.gz 98537 SHA256 b9a35e56826239add731cf083108cbc313d4a2d1770e6f5006966daa66a21eda SHA512 28f84b93f322dfdce05413e98c2b8885c03a782b16a90ea504836c452e624cab9a134debca5c16ed1de9d240fa645dd347ae3c9f17c3b8872923d82b918bde90 WHIRLPOOL f90035d8f28f3744071f6bdf9ff95ef37a9ff535374cf989095451c3d0fdc7097922766d28e8a55f8ecb3d762c1cada946c5dde5f328b3dc1f02a6c8885ff551
+DIST libmusicbrainz-3.0.3.tar.gz 105837 SHA256 7fd459a9fd05be9faec60a9a21caa9a1e9fda03147d58d8c7c95f33582a738c5 SHA512 b4c76a0c056480c74eec36c4419f7f696f945b5a4b29dd0a5c61ab3a8b076f48b803ca7af60fb9cfa5eb5344f9ae5d566aaafea6e8eae498ed6aed2169f70480 WHIRLPOOL 775071c15ef4989738d76ca3bd115d1de884556c2fe526b87e111603b024b46883a19d7272e58eec6d6e9211cbd7f1b76a9f7a782a54f030de303d887d898a21
+DIST libmusicbrainz-4.0.3.tar.gz 110111 SHA256 8f2a8f6e8aa858a66860a4726ee383480b43a57350b28a4478af3e19cacb52d7 SHA512 fe5f9505114452efbc275535747ca942b795d8b962d762d8fe3e280b164a97466a3b29d9664393266cddce42104457b8c0b70373323cc8e5bb2d69087c544f67 WHIRLPOOL f8024fd2babf317947e32079656c4b2985c897e327463a784f5e4989c9bc3aaa2a25134dc78b38e6343c04ff6f2eaa294dea3dfc19acde255853d4658bbbe0eb
+DIST libmusicbrainz-5.0.1.tar.gz 109119 SHA256 1ca75e1c5059a3620b0d82633b1f468acc2a65fcc4305f844ec44f6fb5db82d5 SHA512 9c6c69d54b0ad5a716ff2f8d7a17150aa98d57b6ee019d634b679dc09079646e4139fdfc47906db65226a2c25c963f1ad88e2290e6961f4576f6afd7777850ae WHIRLPOOL 1e8109c8f23fe67fab88654b314ada9bc076e9780110d95e9f113085ec0035242cebf98e299efc426afc60930a005d0ea90611f0b204af8d568a45e843844e22
diff --git a/media-libs/musicbrainz/files/musicbrainz-2.1.5-gcc43-includes.patch b/media-libs/musicbrainz/files/musicbrainz-2.1.5-gcc43-includes.patch
new file mode 100644
index 000000000000..cc412f3d2bad
--- /dev/null
+++ b/media-libs/musicbrainz/files/musicbrainz-2.1.5-gcc43-includes.patch
@@ -0,0 +1,57 @@
+diff -Naur libmusicbrainz-2.1.4-orig/lib/c_wrapper.cpp libmusicbrainz-2.1.4/lib/c_wrapper.cpp
+--- libmusicbrainz-2.1.4-orig/lib/c_wrapper.cpp 2003-10-16 16:21:10.000000000 -0600
++++ libmusicbrainz-2.1.4/lib/c_wrapper.cpp 2007-12-16 09:45:21.000000000 -0600
+@@ -24,6 +24,7 @@
+ #include "musicbrainz.h"
+ #include "trm.h"
+ #include "mb_c.h"
++#include <cstring>
+
+ extern "C"
+ {
+diff -Naur libmusicbrainz-2.1.4-orig/lib/comhttpsocket.cpp libmusicbrainz-2.1.4/lib/comhttpsocket.cpp
+--- libmusicbrainz-2.1.4-orig/lib/comhttpsocket.cpp 2006-05-11 12:46:54.000000000 -0600
++++ libmusicbrainz-2.1.4/lib/comhttpsocket.cpp 2007-12-16 09:46:28.000000000 -0600
+@@ -20,6 +20,7 @@
+ #endif
+ #include <stdlib.h>
+ #include <assert.h>
++#include <cstring>
+
+ const char* g_strCOMVer = "libmusicbrainz/"VERSION;
+
+diff -Naur libmusicbrainz-2.1.4-orig/lib/comsocket.cpp libmusicbrainz-2.1.4/lib/comsocket.cpp
+--- libmusicbrainz-2.1.4-orig/lib/comsocket.cpp 2006-05-11 12:46:54.000000000 -0600
++++ libmusicbrainz-2.1.4/lib/comsocket.cpp 2007-12-16 09:46:08.000000000 -0600
+@@ -37,6 +37,7 @@
+ #include <netinet/tcp.h>
+ #include <errno.h>
+ #include <stdio.h>
++#include <cstring>
+ #include <sys/time.h>
+ #include <sys/types.h>
+ #include <unistd.h>
+diff -Naur libmusicbrainz-2.1.4-orig/lib/http.cpp libmusicbrainz-2.1.4/lib/http.cpp
+--- libmusicbrainz-2.1.4-orig/lib/http.cpp 2007-12-16 09:52:48.000000000 -0600
++++ libmusicbrainz-2.1.4/lib/http.cpp 2007-12-16 09:52:36.000000000 -0600
+@@ -31,6 +31,8 @@
+ #endif
+ #include <fcntl.h>
+ #include <errno.h>
++#include <cstring>
++#include <cstdlib>
+
+ #ifdef WIN32
+ #include <winsock.h>
+diff -Naur libmusicbrainz-2.1.4-orig/lib/sigclient.cpp libmusicbrainz-2.1.4/lib/sigclient.cpp
+--- libmusicbrainz-2.1.4-orig/lib/sigclient.cpp 2006-05-11 12:46:54.000000000 -0600
++++ libmusicbrainz-2.1.4/lib/sigclient.cpp 2007-12-16 09:54:48.000000000 -0600
+@@ -33,6 +33,8 @@
+ #pragma warning(disable:4786)
+ #endif
+
++#include <cstring>
++
+ #include "sigclient.h"
+ #include "comhttpsocket.h"
+
diff --git a/media-libs/musicbrainz/files/musicbrainz-3.0.2-gcc44.patch b/media-libs/musicbrainz/files/musicbrainz-3.0.2-gcc44.patch
new file mode 100644
index 000000000000..76f0068f4216
--- /dev/null
+++ b/media-libs/musicbrainz/files/musicbrainz-3.0.2-gcc44.patch
@@ -0,0 +1,10 @@
+--- src/utils_private.cpp 2009-05-03 08:55:04.000000000 -0400
++++ src/utils_private.cpp 2009-05-03 08:55:52.000000000 -0400
+@@ -25,6 +25,7 @@
+ #include <cstdarg>
+ #include <iostream>
+ #include <map>
++#include <cstdio>
+ #include <ne_uri.h>
+ #include "utils_private.h"
+
diff --git a/media-libs/musicbrainz/metadata.xml b/media-libs/musicbrainz/metadata.xml
new file mode 100644
index 000000000000..e1774e3d9ad7
--- /dev/null
+++ b/media-libs/musicbrainz/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>sound</herd>
+</pkgmetadata>
diff --git a/media-libs/musicbrainz/musicbrainz-2.1.5.ebuild b/media-libs/musicbrainz/musicbrainz-2.1.5.ebuild
new file mode 100644
index 000000000000..ad04a57ec57f
--- /dev/null
+++ b/media-libs/musicbrainz/musicbrainz-2.1.5.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit libtool eutils
+
+DESCRIPTION="Client library to access metadata of mp3/vorbis/CD media"
+HOMEPAGE="http://musicbrainz.org/"
+SRC_URI="http://ftp.musicbrainz.org/pub/musicbrainz/lib${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="1"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND="dev-libs/expat"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S=${WORKDIR}/lib${P}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ elibtoolize
+ epatch "${FILESDIR}/${P}-gcc43-includes.patch"
+}
+
+src_compile() {
+ econf --enable-cpp-headers || die "configure failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "make install failed"
+ dodoc AUTHORS ChangeLog README TODO docs/mb_howto.txt
+}
diff --git a/media-libs/musicbrainz/musicbrainz-3.0.2.ebuild b/media-libs/musicbrainz/musicbrainz-3.0.2.ebuild
new file mode 100644
index 000000000000..82bb19b9d71b
--- /dev/null
+++ b/media-libs/musicbrainz/musicbrainz-3.0.2.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+EAPI=5
+
+inherit cmake-utils
+
+DESCRIPTION="Client library to access metadata of mp3/vorbis/CD media"
+HOMEPAGE="http://musicbrainz.org/"
+SRC_URI="http://ftp.musicbrainz.org/pub/musicbrainz/lib${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="3"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="test"
+
+RDEPEND="net-libs/neon
+ media-libs/libdiscid"
+
+DEPEND="${RDEPEND}
+ test? ( dev-util/cppunit )"
+
+S=${WORKDIR}/lib${P}
+
+CMAKE_IN_SOURCE_BUILD=true
+
+DOCS="README.txt NEWS.txt AUTHORS.txt"
+
+PATCHES=( "${FILESDIR}/${PN}-3.0.2-gcc44.patch" )
diff --git a/media-libs/musicbrainz/musicbrainz-3.0.3.ebuild b/media-libs/musicbrainz/musicbrainz-3.0.3.ebuild
new file mode 100644
index 000000000000..82bb19b9d71b
--- /dev/null
+++ b/media-libs/musicbrainz/musicbrainz-3.0.3.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+EAPI=5
+
+inherit cmake-utils
+
+DESCRIPTION="Client library to access metadata of mp3/vorbis/CD media"
+HOMEPAGE="http://musicbrainz.org/"
+SRC_URI="http://ftp.musicbrainz.org/pub/musicbrainz/lib${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="3"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="test"
+
+RDEPEND="net-libs/neon
+ media-libs/libdiscid"
+
+DEPEND="${RDEPEND}
+ test? ( dev-util/cppunit )"
+
+S=${WORKDIR}/lib${P}
+
+CMAKE_IN_SOURCE_BUILD=true
+
+DOCS="README.txt NEWS.txt AUTHORS.txt"
+
+PATCHES=( "${FILESDIR}/${PN}-3.0.2-gcc44.patch" )
diff --git a/media-libs/musicbrainz/musicbrainz-4.0.3.ebuild b/media-libs/musicbrainz/musicbrainz-4.0.3.ebuild
new file mode 100644
index 000000000000..3d0f9369052a
--- /dev/null
+++ b/media-libs/musicbrainz/musicbrainz-4.0.3.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+CMAKE_IN_SOURCE_BUILD=1
+inherit cmake-utils
+
+DESCRIPTION="The MusicBrainz Client Library (for accessing the latest XML based web service)"
+HOMEPAGE="http://musicbrainz.org/doc/libmusicbrainz"
+SRC_URI="mirror://github/metabrainz/lib${PN}/lib${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="4"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="test"
+
+RDEPEND="net-libs/neon"
+DEPEND="${RDEPEND}
+ test? ( dev-util/cppunit )"
+
+S=${WORKDIR}/lib${P}
+
+DOCS="AUTHORS.txt NEWS.txt README.md"
diff --git a/media-libs/musicbrainz/musicbrainz-5.0.1.ebuild b/media-libs/musicbrainz/musicbrainz-5.0.1.ebuild
new file mode 100644
index 000000000000..4e93f7ef8d8c
--- /dev/null
+++ b/media-libs/musicbrainz/musicbrainz-5.0.1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+CMAKE_IN_SOURCE_BUILD=1
+inherit cmake-utils
+
+DESCRIPTION="The MusicBrainz Client Library (for accessing the latest XML based web service)"
+HOMEPAGE="http://musicbrainz.org/doc/libmusicbrainz"
+SRC_URI="mirror://github/metabrainz/lib${PN}/lib${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="5"
+KEYWORDS="alpha amd64 arm ~hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="examples test"
+
+RDEPEND="net-libs/neon"
+DEPEND="${RDEPEND}
+ test? ( dev-util/cppunit )"
+
+S=${WORKDIR}/lib${P}
+
+DOCS="AUTHORS.txt NEWS.txt README.md"
+
+src_install() {
+ cmake-utils_src_install
+
+ if use examples; then
+ docinto examples
+ dodoc examples/*.{c,cc,txt}
+ fi
+}
diff --git a/media-libs/mutagen/Manifest b/media-libs/mutagen/Manifest
new file mode 100644
index 000000000000..bbee9d2d0f76
--- /dev/null
+++ b/media-libs/mutagen/Manifest
@@ -0,0 +1,3 @@
+DIST mutagen-1.22.tar.gz 813763 SHA256 ddf2907bcaf4827b044a3d70b2fb3c1b58954497d86133f16715fc6c407d494e SHA512 875d61fdb89de6e620dc397a23a83da2d8bdbf111cceb469a6089225c9d7aa91fe03c98258c522ae781e6bbc3d7b72aa66de571c7d99d72419a72697c9b389cc WHIRLPOOL ea3b771c11143194ac395ffe896d2be5410896e614293c14e2a8a9515c5316a8872da5d600a7fa72a710c2263f845dda6e7cd85a7478eeeaa25ec8179ba23c5f
+DIST mutagen-1.27.tar.gz 875720 SHA256 cc884fe1e20fe220be7ce7c3b269f4cadc69a8310150a3a41162fba1ca9c88bd SHA512 ae15fb3f5d77025a60e25a2ed25e23f7d21160d4e63c49fe7d01508440ff1f6b673cf34d8f4facc834824825ad6f4d3ed9830133db5aba339ac1eae46f7f50d5 WHIRLPOOL ecd44cc7fde15f87a2a31be84b428a49e97d67ce26c700382b4e2ba7cdb995223ea6dfda101dd7039d4c7ce23a2314d7e523b9849f19189a6ed7bcdb18bbd52e
+DIST mutagen-1.29.tar.gz 879767 SHA256 dbad61c8db882f849f25183448f21e440f5eceaf614dd8c2c5ae9392f33f599f SHA512 cd04bc79f1de1ad5ce0cd52e08d21918815d9d797370891431781fa99cb854eb98d20ed11a562afde71d4ea78c0468e831a3ed0eae67bbb30e629300753ff44e WHIRLPOOL bc9b539be281753c46bd363e3d88c429f5c254c3f8d276fa124db00098fd51831f64b585bf7f20a3a349cd27c532fa3ad3024f04f0f54ed40b23ab1eb64c2fa1
diff --git a/media-libs/mutagen/metadata.xml b/media-libs/mutagen/metadata.xml
new file mode 100644
index 000000000000..a54ea4d207c6
--- /dev/null
+++ b/media-libs/mutagen/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>sound</herd>
+ <upstream>
+ <remote-id type="google-code">mutagen</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/mutagen/mutagen-1.22.ebuild b/media-libs/mutagen/mutagen-1.22.ebuild
new file mode 100644
index 000000000000..8a84a742acfc
--- /dev/null
+++ b/media-libs/mutagen/mutagen-1.22.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1
+
+DESCRIPTION="Mutagen is an audio metadata tag reader and writer implemented in pure Python"
+HOMEPAGE="http://code.google.com/p/mutagen http://pypi.python.org/pypi/mutagen"
+SRC_URI="https://bitbucket.org/lazka/${PN}/downloads/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ~ia64 ppc ppc64 sparc x86 ~x86-interix ~amd64-linux ~x86-linux"
+IUSE="doc test"
+
+DEPEND="
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
+"
+
+RESTRICT="test" # Missing support for >=dev-python/eyeD3-0.7 API
+
+python_compile_all() {
+ use doc && emake -C docs
+}
+
+src_test() {
+ # tests/test_flac.py uses temp files with a constant path.
+ # If we had multiple python implementations, we would hit a race.
+ DISTUTILS_NO_PARALLEL_BUILD=1 distutils-r1_src_test
+}
+
+python_test() {
+ esetup.py test
+}
+
+python_install_all() {
+ local DOCS=( NEWS README TODO )
+ use doc && local HTML_DOCS=( docs/_build/. )
+ distutils-r1_python_install_all
+}
diff --git a/media-libs/mutagen/mutagen-1.27.ebuild b/media-libs/mutagen/mutagen-1.27.ebuild
new file mode 100644
index 000000000000..386935cc9a98
--- /dev/null
+++ b/media-libs/mutagen/mutagen-1.27.ebuild
@@ -0,0 +1,43 @@
+# 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} )
+
+inherit distutils-r1
+
+DESCRIPTION="Mutagen is an audio metadata tag reader and writer implemented in pure Python"
+HOMEPAGE="http://code.google.com/p/mutagen http://pypi.python.org/pypi/mutagen"
+SRC_URI="https://bitbucket.org/lazka/${PN}/downloads/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ~ia64 ppc ~ppc64 sparc x86 ~x86-interix ~amd64-linux ~x86-linux"
+IUSE="doc test"
+
+# TODO: Missing support for >=dev-python/eyeD3-0.7 API
+# test? ( >=dev-python/eyeD3-0.7 )
+DEPEND="
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
+"
+
+python_compile_all() {
+ use doc && emake -C docs
+}
+
+src_test() {
+ # tests/test_flac.py uses temp files with a constant path.
+ # If we had multiple python implementations, we would hit a race.
+ DISTUTILS_NO_PARALLEL_BUILD=1 distutils-r1_src_test
+}
+
+python_test() {
+ esetup.py test
+}
+
+python_install_all() {
+ local DOCS=( NEWS README.rst )
+ use doc && local HTML_DOCS=( docs/_build/. )
+ distutils-r1_python_install_all
+}
diff --git a/media-libs/mutagen/mutagen-1.29.ebuild b/media-libs/mutagen/mutagen-1.29.ebuild
new file mode 100644
index 000000000000..5c5ca70f9655
--- /dev/null
+++ b/media-libs/mutagen/mutagen-1.29.ebuild
@@ -0,0 +1,43 @@
+# 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} )
+
+inherit distutils-r1
+
+DESCRIPTION="Mutagen is an audio metadata tag reader and writer implemented in pure Python"
+HOMEPAGE="http://code.google.com/p/mutagen http://pypi.python.org/pypi/mutagen"
+SRC_URI="https://bitbucket.org/lazka/${PN}/downloads/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-interix ~amd64-linux ~x86-linux"
+IUSE="doc test"
+
+# TODO: Missing support for >=dev-python/eyeD3-0.7 API
+# test? ( >=dev-python/eyeD3-0.7 )
+DEPEND="
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
+"
+
+python_compile_all() {
+ use doc && emake -C docs
+}
+
+src_test() {
+ # tests/test_flac.py uses temp files with a constant path.
+ # If we had multiple python implementations, we would hit a race.
+ DISTUTILS_NO_PARALLEL_BUILD=1 distutils-r1_src_test
+}
+
+python_test() {
+ esetup.py test
+}
+
+python_install_all() {
+ local DOCS=( NEWS README.rst )
+ use doc && local HTML_DOCS=( docs/_build/. )
+ distutils-r1_python_install_all
+}
diff --git a/media-libs/nas/Manifest b/media-libs/nas/Manifest
new file mode 100644
index 000000000000..19f46aaabc92
--- /dev/null
+++ b/media-libs/nas/Manifest
@@ -0,0 +1 @@
+DIST nas-1.9.4.src.tar.gz 1464598 SHA256 cf36ea63751ce86cfd3b76c1659ce0d6a361a2e7cb34069854e156532703b39d SHA512 3f8bd60f8ce0f25a2605af17caaadfe4f21223ba4cd3fa02078d1427b17cdf33ebda887e5dc30cd68eb7f64bfad80aafc9071ff0a26f0d3a4a93caacac03b5bb WHIRLPOOL 6c8e13d18bb9824dafc722ae6bb29d8adbfb778c9feddef56b41da77faceb730a5dc265fc7b613ae491fab0e6dbc4ede47d2abb98b313d3408783aee4e9a5db2
diff --git a/media-libs/nas/files/nas-1.9.2-asneeded.patch b/media-libs/nas/files/nas-1.9.2-asneeded.patch
new file mode 100644
index 000000000000..2ac89487a2c8
--- /dev/null
+++ b/media-libs/nas/files/nas-1.9.2-asneeded.patch
@@ -0,0 +1,13 @@
+http://bugs.gentoo.org/show_bug.cgi?id=247761
+
+--- config/NetAudio.tmpl
++++ config/NetAudio.tmpl
+@@ -162,7 +162,7 @@
+
+ AUDIODEPLIBS = $(DEPAULIB) $(DEPXTOOLLIB) $(DEPXLIB)
+ #ifndef WIN32
+- AUDIOLIBS = $(AULIB) $(XTOOLLIB) $(XLIB) -lm
++ AUDIOLIBS = $(AULIB) $(XTOOLLIB) $(XAUTHLIB) $(XLIB) -lm
+ #else /* WIN32 */
+ AUDIOLIBS = $(AULIB)
+ #endif /* WIN32 */
diff --git a/media-libs/nas/files/nas-1.9.4-remove-abs-fabs.patch b/media-libs/nas/files/nas-1.9.4-remove-abs-fabs.patch
new file mode 100644
index 000000000000..46ef6bb4610e
--- /dev/null
+++ b/media-libs/nas/files/nas-1.9.4-remove-abs-fabs.patch
@@ -0,0 +1,36 @@
+From 212309075d26668f6e25f30754e646952843cf61 Mon Sep 17 00:00:00 2001
+From: "Anthony G. Basile" <blueness@gentoo.org>
+Date: Tue, 28 Apr 2015 18:56:46 -0600
+Subject: [PATCH]
+
+On a uClibc system, the macro definitions of abs() and fabs()
+ cause the build to fail. Since these are specified by POSIX, it is safe to
+ just drop their definition. This has been tested on uClibc, glibc and musl.
+
+See: https://bugs.gentoo.org/show_bug.cgi?id=510766
+
+Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
+---
+ server/include/misc.h | 6 ------
+ 1 file changed, 6 deletions(-)
+
+diff --git a/server/include/misc.h b/server/include/misc.h
+index 2267ae0..fb904c8 100644
+--- a/server/include/misc.h
++++ b/server/include/misc.h
+@@ -71,12 +71,6 @@ typedef int Bool;
+
+ #define min(a, b) (((a) < (b)) ? (a) : (b))
+ #define max(a, b) (((a) > (b)) ? (a) : (b))
+-#ifndef abs
+-#define abs(a) ((a) > 0 ? (a) : -(a))
+-#endif
+-#ifndef fabs
+-#define fabs(a) ((a) > 0.0 ? (a) : -(a)) /* floating absolute value */
+-#endif
+ #define sign(x) ((x) < 0 ? -1 : ((x) > 0 ? 1 : 0))
+ /* this assumes b > 0 */
+ #define modulus(a, b, d) if (((d) = (a) % (b)) < 0) (d) += (b)
+--
+2.0.5
+
diff --git a/media-libs/nas/files/nas.conf.d b/media-libs/nas/files/nas.conf.d
new file mode 100644
index 000000000000..b8c32dbdba2b
--- /dev/null
+++ b/media-libs/nas/files/nas.conf.d
@@ -0,0 +1,11 @@
+# Config file for /etc/init.d/nas
+
+# For information on options, see "/usr/bin/nasd -h".
+
+NAS_OPTIONS=""
+
+# Allow only clients on local network to connect:
+#NAS_OPTIONS="-local"
+
+# Allow any client to connect:
+#NAS_OPTIONS="-aa"
diff --git a/media-libs/nas/files/nas.init.d b/media-libs/nas/files/nas.init.d
new file mode 100644
index 000000000000..6cfab54a4b1b
--- /dev/null
+++ b/media-libs/nas/files/nas.init.d
@@ -0,0 +1,19 @@
+#!/sbin/runscript
+
+depend() {
+ need net
+ after alsasound esd
+}
+
+start() {
+ ebegin "Starting nas"
+ start-stop-daemon --start --quiet --exec /usr/bin/nasd --background \
+ --pidfile /var/run/nasd.pid --make-pidfile -- $NAS_OPTIONS
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping nas"
+ start-stop-daemon --stop --quiet --pidfile /var/run/nasd.pid
+ eend $?
+}
diff --git a/media-libs/nas/metadata.xml b/media-libs/nas/metadata.xml
new file mode 100644
index 000000000000..c86db974637e
--- /dev/null
+++ b/media-libs/nas/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>sound</herd>
+ <upstream>
+ <remote-id type="sourceforge">nas</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/nas/nas-1.9.4-r1.ebuild b/media-libs/nas/nas-1.9.4-r1.ebuild
new file mode 100644
index 000000000000..69107ee54529
--- /dev/null
+++ b/media-libs/nas/nas-1.9.4-r1.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils multilib toolchain-funcs multilib-minimal
+
+DESCRIPTION="Network Audio System"
+HOMEPAGE="http://radscan.com/nas.html"
+SRC_URI="mirror://sourceforge/${PN}/${P}.src.tar.gz"
+
+LICENSE="HPND MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="doc static-libs"
+
+RDEPEND="x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libX11
+ >=x11-libs/libXau-1.0.7-r1[${MULTILIB_USEDEP}]
+ x11-libs/libXaw
+ x11-libs/libXext
+ x11-libs/libXmu
+ x11-libs/libXpm
+ >=x11-libs/libXt-1.1.4[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}
+ app-text/rman
+ sys-devel/bison
+ sys-devel/flex
+ x11-misc/gccmakedep
+ x11-misc/imake
+ >=x11-proto/xproto-7.0.24[${MULTILIB_USEDEP}]"
+
+DOCS=( BUILDNOTES FAQ HISTORY README RELEASE TODO )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.9.2-asneeded.patch
+ epatch "${FILESDIR}"/${PN}-1.9.4-remove-abs-fabs.patch
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ xmkmf -a || die
+}
+
+multilib_src_compile() {
+ # EXTRA_LDOPTIONS, SHLIBGLOBALSFLAGS #336564#c2
+ local emakeopts=(
+ AR="$(tc-getAR) clq"
+ AS="$(tc-getAS)"
+ CC="$(tc-getCC)"
+ CDEBUGFLAGS="${CFLAGS}"
+ CXX="$(tc-getCXX)"
+ CXXDEBUFLAGS="${CXXFLAGS}"
+ EXTRA_LDOPTIONS="${LDFLAGS}"
+ LD="$(tc-getLD)"
+ MAKE="${MAKE:-gmake}"
+ RANLIB="$(tc-getRANLIB)"
+ SHLIBGLOBALSFLAGS="${LDFLAGS}"
+ WORLDOPTS=
+ )
+
+ if multilib_is_native_abi ; then
+ # dumb fix for parallel make issue wrt #446598, Imake sux
+ emake "${emakeopts[@]}" -C server/dia all
+ emake "${emakeopts[@]}" -C server/dda/voxware all
+ emake "${emakeopts[@]}" -C server/os all
+ else
+ sed -i \
+ -e 's/SUBDIRS =.*/SUBDIRS = include lib config/' \
+ Makefile || die
+ fi
+
+ emake "${emakeopts[@]}" World
+}
+
+multilib_src_install() {
+ # ranlib is used at install phase too wrt #446600
+ emake RANLIB="$(tc-getRANLIB)" \
+ DESTDIR="${D}" USRLIBDIR=/usr/$(get_libdir) \
+ install install.man
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ if use doc; then
+ docinto doc
+ dodoc doc/{actions,protocol.txt,README}
+ docinto pdf
+ dodoc doc/pdf/*.pdf
+ fi
+
+ mv -vf "${D}"/etc/nas/nasd.conf{.eg,} || die
+
+ newconfd "${FILESDIR}"/nas.conf.d nas
+ newinitd "${FILESDIR}"/nas.init.d nas
+
+ use static-libs || rm -f "${D}"/usr/lib*/libaudio.a
+}
diff --git a/media-libs/nas/nas-1.9.4.ebuild b/media-libs/nas/nas-1.9.4.ebuild
new file mode 100644
index 000000000000..de1b31ce1d7d
--- /dev/null
+++ b/media-libs/nas/nas-1.9.4.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils multilib toolchain-funcs multilib-minimal
+
+DESCRIPTION="Network Audio System"
+HOMEPAGE="http://radscan.com/nas.html"
+SRC_URI="mirror://sourceforge/${PN}/${P}.src.tar.gz"
+
+LICENSE="HPND MIT"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~x86-fbsd"
+IUSE="doc static-libs"
+
+RDEPEND="x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libX11
+ >=x11-libs/libXau-1.0.7-r1[${MULTILIB_USEDEP}]
+ x11-libs/libXaw
+ x11-libs/libXext
+ x11-libs/libXmu
+ x11-libs/libXpm
+ >=x11-libs/libXt-1.1.4[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}
+ app-text/rman
+ sys-devel/bison
+ sys-devel/flex
+ x11-misc/gccmakedep
+ x11-misc/imake
+ >=x11-proto/xproto-7.0.24[${MULTILIB_USEDEP}]"
+
+DOCS=( BUILDNOTES FAQ HISTORY README RELEASE TODO )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.9.2-asneeded.patch
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ xmkmf -a || die
+}
+
+multilib_src_compile() {
+ # EXTRA_LDOPTIONS, SHLIBGLOBALSFLAGS #336564#c2
+ local emakeopts=(
+ AR="$(tc-getAR) clq"
+ AS="$(tc-getAS)"
+ CC="$(tc-getCC)"
+ CDEBUGFLAGS="${CFLAGS}"
+ CXX="$(tc-getCXX)"
+ CXXDEBUFLAGS="${CXXFLAGS}"
+ EXTRA_LDOPTIONS="${LDFLAGS}"
+ LD="$(tc-getLD)"
+ MAKE="${MAKE:-gmake}"
+ RANLIB="$(tc-getRANLIB)"
+ SHLIBGLOBALSFLAGS="${LDFLAGS}"
+ WORLDOPTS=
+ )
+
+ if multilib_is_native_abi ; then
+ # dumb fix for parallel make issue wrt #446598, Imake sux
+ emake "${emakeopts[@]}" -C server/dia all
+ emake "${emakeopts[@]}" -C server/dda/voxware all
+ emake "${emakeopts[@]}" -C server/os all
+ else
+ sed -i \
+ -e 's/SUBDIRS =.*/SUBDIRS = include lib config/' \
+ Makefile || die
+ fi
+
+ emake "${emakeopts[@]}" World
+}
+
+multilib_src_install() {
+ # ranlib is used at install phase too wrt #446600
+ emake RANLIB="$(tc-getRANLIB)" \
+ DESTDIR="${D}" USRLIBDIR=/usr/$(get_libdir) \
+ install install.man
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ if use doc; then
+ docinto doc
+ dodoc doc/{actions,protocol.txt,README}
+ docinto pdf
+ dodoc doc/pdf/*.pdf
+ fi
+
+ mv -vf "${D}"/etc/nas/nasd.conf{.eg,} || die
+
+ newconfd "${FILESDIR}"/nas.conf.d nas
+ newinitd "${FILESDIR}"/nas.init.d nas
+
+ use static-libs || rm -f "${D}"/usr/lib*/libaudio.a
+}
diff --git a/media-libs/netpbm/Manifest b/media-libs/netpbm/Manifest
new file mode 100644
index 000000000000..1fda332a16fd
--- /dev/null
+++ b/media-libs/netpbm/Manifest
@@ -0,0 +1,2 @@
+DIST netpbm-10.66.00.tar.xz 2575356 SHA256 7fe94f38e139be194e9e384e8d9c9747f2fe08c18295bba93c55a41c5bbf63fc SHA512 44348eb1155353d5cd5a2ce025bc6d9301cc3239acea6b68418c14432f4bd61fc5a8669bb51b3e86b96abaf5b02cc20115c662e40fa5b41aee202b0c2ae605af WHIRLPOOL fa937fccd2da9068a268d6a5729c8093baacc3025ab2382902611dadab985247fdacf3433f6e15407b081478b93b772237c41363f37340ea6c93c169357dd0cf
+DIST netpbm-10.70.00.tar.xz 2621612 SHA256 1268cb6801790619f6d057b964305355011dfe66247f2b71fe9978cdd7af7d93 SHA512 f70d6dd79ce813f9fc4935d382b50bd3cecdf02c324b0f012056e56e33f24b621e8c1b3d054c6f470d437d0d793593de95eaa9724055d59c342228398a40f0b4 WHIRLPOOL 8810a2e8d4ed6a834d6fbc2861079b4e2664f85ff2548d00f95a9c26f92d02dcebcb8d1b9c26226caba067accc41eabbe1211322607de77d61827b34a8b4c82a
diff --git a/media-libs/netpbm/files/make-tarball.sh b/media-libs/netpbm/files/make-tarball.sh
new file mode 100755
index 000000000000..90a64ffb34d7
--- /dev/null
+++ b/media-libs/netpbm/files/make-tarball.sh
@@ -0,0 +1,67 @@
+#!/bin/bash
+
+. /etc/init.d/functions.sh
+
+PV=$1
+SVN_ROOT=${2:-/usr/local/src}
+
+if [[ $# -eq 0 ]] ; then
+ ebegin "Detecting latest version"
+ cd "${SVN_ROOT}/netpbm/release_number"
+ svn up -q || die
+ PV=$(svn ls | sort -V | tail -1) || die
+ [[ -z ${PV} ]] && die
+ PV=${PV%/}
+ eend
+ einfo "Using PV=${PV}"
+
+ if [[ ! -d ${PV} ]] ; then
+ ebegin "Checking out ${PV}"
+ svn up -q ${PV}
+ eend || die
+ fi
+fi
+
+if [[ $# -gt 2 ]] ; then
+ exec echo "Usage: $0 [version] [netpbm svn root]"
+fi
+
+PN=netpbm
+P=${PN}-${PV}
+
+T=/tmp
+
+maint_pkg_create() {
+ local base="/usr/local/src"
+ local srcdir="${base}/netpbm/release_number"
+ local htmldir="${base}/netpbm/userguide"
+ if [[ -d ${srcdir} ]] ; then
+ cd "${T}" || die
+
+ rm -rf ${P}
+
+ ebegin "Exporting ${srcdir}/${PV} to ${P}"
+ svn export -q "${srcdir}/${PV}" ${P}
+ eend $? || return 1
+
+ ebegin "Exporting ${htmldir} to ${P}/userguide"
+ svn export -q "${htmldir}" ${P}/userguide
+ eend $? || return 1
+
+ ebegin "Generating manpages from html"
+ (cd "${P}/userguide" && ../buildtools/makeman *.html)
+ eend $? || return 1
+
+ ebegin "Creating ${P}.tar.xz"
+ tar cf - ${P} | xz > ${P}.tar.xz
+ eend $?
+
+ einfo "Tarball now ready at: ${T}/${P}.tar.xz"
+ else
+ einfo "You need to run:"
+ einfo " cd ${base}"
+ einfo " svn co https://netpbm.svn.sourceforge.net/svnroot/netpbm"
+ die "need svn checkout dir"
+ fi
+}
+maint_pkg_create
diff --git a/media-libs/netpbm/files/netpbm-10.31-build.patch b/media-libs/netpbm/files/netpbm-10.31-build.patch
new file mode 100644
index 000000000000..cd744743636c
--- /dev/null
+++ b/media-libs/netpbm/files/netpbm-10.31-build.patch
@@ -0,0 +1,50 @@
+- Don't install libnetpbm.a and libnetpbm.so into a sep link dir
+- Try to fix parallel building
+- Make the libopt tool less 'helpful'
+
+--- lib/Makefile
++++ lib/Makefile
+@@ -249,7 +249,7 @@
+ .PHONY: install.staticlib
+ install.staticlib: $(PKGDIR)/link
+ $(INSTALL) -c -m $(INSTALL_PERM_LIBS) libnetpbm.$(STATICLIBSUFFIX) \
+- $(PKGDIR)/link
++ $(PKGDIR)/lib
+
+ # Install a shared library stub -- the ".so" file used at link time to
+ # prepare a program for dynamically linking a library at run time
+@@ -257,9 +257,9 @@
+ install.sharedlibstub: $(PKGDIR)/link
+ ifeq ($(NETPBMLIBTYPE),unixshared)
+ # install the link-time (.so) links to the runtime libraries
+- cd $(PKGDIR)/link ; \
++ cd $(PKGDIR)/lib ; \
+ rm -f libnetpbm.$(NETPBMLIBSUFFIX); \
+- $(SYMLINK) ../lib/libnetpbm.$(NETPBMLIBSUFFIX).$(MAJ) \
++ $(SYMLINK) libnetpbm.$(NETPBMLIBSUFFIX).$(MAJ) \
+ libnetpbm.$(NETPBMLIBSUFFIX)
+ endif
+ ifeq ($(NETPBMLIBTYPE),dll)
+--- GNUmakefile
++++ GNUmakefile
+@@ -87,6 +87,9 @@
+
+ .PHONY: nonmerge
+ nonmerge: $(PRODUCT_SUBDIRS:%=%/all)
++
++$(PRODUCT_SUBDIRS:%=%/all): buildtools/all
++converter/all analyzer/all editor/all generator/all other/all: lib/all
+
+ OMIT_CONFIG_RULE = 1
+ include $(SRCDIR)/Makefile.common
+--- buildtools/libopt.c
++++ buildtools/libopt.c
+@@ -502,7 +502,7 @@
+
+ strcpy(outputLine, ""); /* initial value */
+ runtime = FALSE; /* initial value */
+- quiet = FALSE; /* initial value */
++ quiet = TRUE; /* initial value */
+ error = FALSE; /* no error yet */
+ for (arg = 1; arg < argc && !error; arg++) {
+ if (strcmp(argv[arg], "-runtime") == 0)
diff --git a/media-libs/netpbm/files/netpbm-10.51.00-pnmconvol-nooffset.patch b/media-libs/netpbm/files/netpbm-10.51.00-pnmconvol-nooffset.patch
new file mode 100644
index 000000000000..1eb5506ddae2
--- /dev/null
+++ b/media-libs/netpbm/files/netpbm-10.51.00-pnmconvol-nooffset.patch
@@ -0,0 +1,83 @@
+taken from upstream
+
+http://bugs.gentoo.org/338230
+
+Index: editor/pnmconvol.c
+===================================================================
+--- editor/pnmconvol.c (revision 1297)
++++ editor/pnmconvol.c (revision 1298)
+@@ -455,13 +455,13 @@ static void
+ convKernelCreatePnm(struct pam * const cpamP,
+ tuple * const * const ctuples,
+ unsigned int const depth,
+- bool const offsetPgm,
++ bool const offsetPnm,
+ struct convKernel ** const convKernelPP) {
+ /*----------------------------------------------------------------------------
+- Compute the convolution matrix in normalized form from the PGM
+- form. Each element of the output matrix is the actual weight we give an
+- input pixel -- i.e. the thing by which we multiple a value from the
+- input image.
++ Compute the convolution matrix in normalized form from the PGM form
++ 'ctuples'/'cpamP'. Each element of the output matrix is the actual weight
++ we give an input pixel -- i.e. the thing by which we multiple a value from
++ the input image.
+
+ 'depth' is the required number of planes in the kernel. If 'ctuples' has
+ fewer planes than that, we duplicate as necessary. E.g. if 'ctuples' is
+@@ -470,13 +470,13 @@ convKernelCreatePnm(struct pam *
+ 'ctuples' has more planes than specified, we ignore the higher numbered
+ ones.
+
+- 'offsetPgm' means the PGM convolution matrix is defined in offset form so
++ 'offsetPnm' means the PNM convolution matrix is defined in offset form so
+ that it can represent negative values. E.g. with maxval 100, 50 means
+ 0, 100 means 50, and 0 means -50. If 'offsetPgm' is false, 0 means 0
+ and there are no negative weights.
+ -----------------------------------------------------------------------------*/
+- double const scale = (offsetPgm ? 2.0 : 1.0) / cpamP->maxval;
+- double const offset = offsetPgm ? - 1.0 : 0.0;
++ double const scale = (offsetPnm ? 2.0 : 1.0) / cpamP->maxval;
++ double const offset = offsetPnm ? - 1.0 : 0.0;
+ unsigned int const planes = MIN(3, depth);
+
+ struct convKernel * convKernelP;
+@@ -579,9 +579,19 @@ normalizeKernel(struct convKernel * cons
+ static void
+ getKernelPnm(const char * const fileName,
+ unsigned int const depth,
+- bool const nooffset,
++ bool const offset,
+ struct convKernel ** const convKernelPP) {
++/*----------------------------------------------------------------------------
++ Get the convolution kernel from the PNM file named 'fileName'.
++ 'offset' means the PNM convolution matrix is defined in offset form so
++ that it can represent negative values. E.g. with maxval 100, 50 means
++ 0, 100 means 50, and 0 means -50. If 'offsetPgm' is false, 0 means 0
++ and there are no negative weights.
++
++ Make the kernel suitable for convolving an image of depth 'depth'.
+
++ Return the kernel as *convKernelPP.
++-----------------------------------------------------------------------------*/
+ struct pam cpam;
+ FILE * cifP;
+ tuple ** ctuples;
+@@ -594,7 +604,7 @@ getKernelPnm(const char * const
+
+ validateKernelDimensions(cpam.width, cpam.height);
+
+- convKernelCreatePnm(&cpam, ctuples, depth, nooffset, convKernelPP);
++ convKernelCreatePnm(&cpam, ctuples, depth, offset, convKernelPP);
+ }
+
+
+@@ -893,7 +903,7 @@ getKernel(struct cmdlineInfo const cmd
+ struct convKernel * convKernelP;
+
+ if (cmdline.pnmMatrixFileName)
+- getKernelPnm(cmdline.pnmMatrixFileName, depth, cmdline.nooffset,
++ getKernelPnm(cmdline.pnmMatrixFileName, depth, !cmdline.nooffset,
+ &convKernelP);
+ else if (cmdline.matrixfile)
+ convKernelCreateSimpleFile(cmdline.matrixfile, cmdline.normalize,
diff --git a/media-libs/netpbm/files/netpbm-10.51.00-ppmtompeg-free.patch b/media-libs/netpbm/files/netpbm-10.51.00-ppmtompeg-free.patch
new file mode 100644
index 000000000000..0c1e48549b1b
--- /dev/null
+++ b/media-libs/netpbm/files/netpbm-10.51.00-ppmtompeg-free.patch
@@ -0,0 +1,35 @@
+fix from upstream
+
+------------------------------------------------------------------------
+r1285 | giraffedata | 2010-09-18 16:13:39 -0400 (Sat, 18 Sep 2010) | 1 line
+
+Fix free of non-allocated memory
+
+Index: converter/ppm/ppmtompeg/param.c
+===================================================================
+--- converter/ppm/ppmtompeg/param.c (revision 1284)
++++ converter/ppm/ppmtompeg/param.c (revision 1285)
+@@ -283,8 +283,8 @@ GetFrameRate(const char * const p)
+
+
+ static void
+-mergeInputSource(struct inputSource * const baseSourceP,
+- struct inputSource * const addedSourceP) {
++mergeInputSource(struct inputSource * const baseSourceP,
++ const struct inputSource * const addedSourceP) {
+
+ unsigned int i;
+
+@@ -294,12 +294,6 @@ mergeInputSource(struct inputSource * co
+ for (i = 0; i < addedSourceP->numInputFileEntries; ++i)
+ baseSourceP->inputFileEntries[baseSourceP->numInputFileEntries++] =
+ addedSourceP->inputFileEntries[i];
+-
+- free(addedSourceP);
+- /* Note the space allocated for the *addedSourceP input file
+- entries themselves is still allocated, and used by
+- *baseSourceP.
+- */
+ }
+
+
diff --git a/media-libs/netpbm/files/netpbm-10.51.00-underlinking.patch b/media-libs/netpbm/files/netpbm-10.51.00-underlinking.patch
new file mode 100644
index 000000000000..e161242c4402
--- /dev/null
+++ b/media-libs/netpbm/files/netpbm-10.51.00-underlinking.patch
@@ -0,0 +1,16 @@
+ converter/other/Makefile | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/converter/other/Makefile b/converter/other/Makefile
+index 1417cd3..c178101 100644
+--- a/converter/other/Makefile
++++ b/converter/other/Makefile
+@@ -167,7 +167,7 @@ pngtopam: %: %.o pngx.o $(NETPBMLIB) $(LIBOPT)
+ pnmtopng: %: %.o pngx.o pngtxt.o $(NETPBMLIB) $(LIBOPT)
+ $(LD) -o $@ $@.o pngx.o pngtxt.o \
+ $(shell $(LIBOPT) $(NETPBMLIB)) \
+- $(PNGLIB_LIBOPTS) $(MATHLIB) $(LDFLAGS) $(LDLIBS) $(RPATH) $(LADD)
++ $(PNGLIB_LIBOPTS) $(MATHLIB) $(LDFLAGS) $(LDLIBS) $(RPATH) $(LADD) -lz
+
+ pamrgbatopng: %: %.o $(NETPBMLIB) $(LIBOPT)
+ $(LD) -o $@ $@.o \
diff --git a/media-libs/netpbm/files/netpbm-10.66-failing-tests.patch b/media-libs/netpbm/files/netpbm-10.66-failing-tests.patch
new file mode 100644
index 000000000000..63260de2e490
--- /dev/null
+++ b/media-libs/netpbm/files/netpbm-10.66-failing-tests.patch
@@ -0,0 +1,28 @@
+punt failing tests; already notified upstream
+
+--- a/test/Test-Order
++++ b/test/Test-Order
+@@ -50,7 +50,6 @@ pamditherbw.test
+ pbmclean.test
+ pamcut.test
+ pnmcat.test
+-pamflip.test
+ pamenlarge.test
+ pnminvert.test
+ pamchannel.test
+@@ -70,7 +69,6 @@ ppmmix.test
+
+ # Symmetry test
+
+-symmetry.test
+
+ # Format converter tests
+
+@@ -87,7 +85,6 @@ ppmdfont.test
+ pnm-plain-roundtrip.test
+ pnm-pam-roundtrip.test
+ pnminvert-roundtrip.test
+-pamflip-roundtrip.test
+ pamdepth-roundtrip.test
+ pad-crop-roundtrip.test
+ cut-paste-roundtrip.test
diff --git a/media-libs/netpbm/files/netpbm-10.66-jasper-hack.patch b/media-libs/netpbm/files/netpbm-10.66-jasper-hack.patch
new file mode 100644
index 000000000000..285475dab062
--- /dev/null
+++ b/media-libs/netpbm/files/netpbm-10.66-jasper-hack.patch
@@ -0,0 +1,41 @@
+https://bugs.gentoo.org/513240
+
+the jasper headers are horribly broken and break things like stdbool.h.
+re-order the includes to work around this.
+
+--- a/converter/other/jpeg2000/jpeg2ktopam.c
++++ b/converter/other/jpeg2000/jpeg2ktopam.c
+@@ -13,13 +13,14 @@
+ #define _XOPEN_SOURCE 600
+ #include <string.h>
+
++#include <jasper/jasper.h>
++
+ #include "pm_c_util.h"
+ #include "pam.h"
+ #include "shhopt.h"
+ #include "nstring.h"
+ #include "mallocvar.h"
+
+-#include <jasper/jasper.h>
+ #include "libjasper_compat.h"
+
+ enum compmode {COMPMODE_INTEGER, COMPMODE_REAL};
+--- a/converter/other/jpeg2000/pamtojpeg2k.c
++++ b/converter/other/jpeg2000/pamtojpeg2k.c
+@@ -13,13 +13,14 @@
+ #define _XOPEN_SOURCE 600
+ #include <string.h>
+
++#include <jasper/jasper.h>
++
+ #include "pm_c_util.h"
+ #include "pam.h"
+ #include "shhopt.h"
+ #include "nstring.h"
+ #include "mallocvar.h"
+
+-#include <jasper/jasper.h>
+ #include "libjasper_compat.h"
+
+
diff --git a/media-libs/netpbm/files/netpbm-10.66-jbig-2.patch b/media-libs/netpbm/files/netpbm-10.66-jbig-2.patch
new file mode 100644
index 000000000000..f7e8cf80d6c4
--- /dev/null
+++ b/media-libs/netpbm/files/netpbm-10.66-jbig-2.patch
@@ -0,0 +1,19 @@
+fix building w/jbig-2.x
+
+--- a/converter/other/jbig/jbigtopnm.c
++++ b/converter/other/jbig/jbigtopnm.c
+@@ -230,8 +230,12 @@ int main (int argc, char **argv)
+ if (ferror(fin))
+ pm_error("Problem while reading input file '%s", fnin);
+ if (result != JBG_EOK && result != JBG_EOK_INTR)
+- pm_error("Problem with input file '%s': %s\n",
+- fnin, jbg_strerror(result, JBG_EN));
++ pm_error("Problem with input file '%s': %s\n", fnin,
++#ifdef JBG_EN
++ jbg_strerror(result, JBG_EN));
++#else
++ jbg_strerror(result));
++#endif
+ if (plane >= 0 && jbg_dec_getplanes(&s) <= plane)
+ pm_error("Image has only %d planes!\n", jbg_dec_getplanes(&s));
+
diff --git a/media-libs/netpbm/files/netpbm-10.66-jpeg-dirs.patch b/media-libs/netpbm/files/netpbm-10.66-jpeg-dirs.patch
new file mode 100644
index 000000000000..fcf98211ba01
--- /dev/null
+++ b/media-libs/netpbm/files/netpbm-10.66-jpeg-dirs.patch
@@ -0,0 +1,28 @@
+use same -I style as converter/other/Makefile so people can disable these
+
+--- a/converter/other/jbig/Makefile
++++ b/converter/other/jbig/Makefile
+@@ -11,7 +11,9 @@ LIBJBIG_OBJECTS = jbig.o jbig_tab.o
+
+ EXTERN_INCLUDES =
+ ifneq ($(JBIGHDR_DIR),NONE)
+- EXTERN_INCLUDES += -I$(JBIGHDR_DIR)
++ ifneq ($(JBIGHDR_DIR)x,x)
++ EXTERN_INCLUDES += -I$(JBIGHDR_DIR)
++ endif
+ endif
+
+ ifneq ($(JBIGHDR_DIR),NONE)
+--- a/converter/other/jpeg2000/Makefile
++++ b/converter/other/jpeg2000/Makefile
+@@ -11,7 +11,9 @@ include $(BUILDDIR)/config.mk
+
+ EXTERN_INCLUDES =
+ ifneq ($(JASPERHDR_DIR),NONE)
+- EXTERN_INCLUDES += -I$(JASPERHDR_DIR)
++ ifneq ($(JASPERHDR_DIR)x,x)
++ EXTERN_INCLUDES += -I$(JASPERHDR_DIR)
++ endif
+ endif
+
+
diff --git a/media-libs/netpbm/files/netpbm-10.66-options-case.patch b/media-libs/netpbm/files/netpbm-10.66-options-case.patch
new file mode 100644
index 000000000000..a865bc1f4514
--- /dev/null
+++ b/media-libs/netpbm/files/netpbm-10.66-options-case.patch
@@ -0,0 +1,105 @@
+r2175 | giraffedata | 2014-04-01 22:28:23 -0400 (Tue, 01 Apr 2014) | 1 line
+
+Fix bug: inconsistent use of upper and lower case Y and N in make file variables. Make it consistently upper case
+
+--- buildtools/configure.pl (revision 2174)
++++ buildtools/configure.pl (revision 2175)
+@@ -835,16 +835,16 @@ sub getLibTypes($$$$$$$$) {
+ my $response = prompt("(y)es or (n)o", $default);
+
+ if (uc($response) =~ /^(Y|YES)$/) {
+- $staticlib_too = "y";
++ $staticlib_too = "Y";
+ } elsif (uc($response) =~ /^(N|NO)$/) {
+- $staticlib_too = "n";
++ $staticlib_too = "N";
+ } else {
+ print("'$response' isn't one of the choices. \n" .
+ "You must choose 'yes' or 'no' (or 'y' or 'n').\n");
+ exit 12;
+ }
+ } else {
+- $staticlib_too = "n";
++ $staticlib_too = "N";
+ }
+ print("\n");
+
+--- config.mk.in (revision 2174)
++++ config.mk.in (revision 2175)
+@@ -503,7 +503,7 @@ LINUXSVGAHDR_DIR =
+ #LINUXSVGALIB = /usr/lib/libvga.so
+ #LINUXSVGAHDR_DIR = /usr/include/vgalib
+
+-# If you don't want any network functions, set OMIT_NETWORK to "y".
++# If you don't want any network functions, set OMIT_NETWORK to "Y".
+ # The only thing that requires network functions is the option in
+ # ppmtompeg to run it on multiple computers simultaneously. On some
+ # systems network functions don't work or we haven't figured out how to
+@@ -512,11 +512,11 @@ OMIT_NETWORK =
+ #DJGPP/Windows, Tru64:
+ # (there's some minor header problem that prevents network functions from
+ # building on Tru64 2000.10.06)
+-#OMIT_NETWORK = y
++#OMIT_NETWORK = Y
+
+ # These are -l options to link in the network libraries. Often, these are
+ # built into the standard C library, so this can be null. This is irrelevant
+-# if OMIT_NETWORK is "y".
++# if OMIT_NETWORK is "Y".
+
+ NETWORKLD =
+ # Solaris, SunOS:
+@@ -602,12 +602,12 @@ NETPBMLIBSUFFIX = so
+ # Windows shared library:
+ #NETPBMLIBSUFFIX = dll
+
+-#STATICLIB_TOO is "y" to signify that you want a static library built
++#STATICLIB_TOO is "Y" to signify that you want a static library built
+ #and installed in addition to whatever library type you specified by
+ #NETPBMLIBTYPE. If NETPBMLIBTYPE specified a static library,
+ #STATICLIB_TOO simply has no effect.
+-STATICLIB_TOO = y
+-#STATICLIB_TOO = n
++STATICLIB_TOO = Y
++#STATICLIB_TOO = N
+
+ #STATICLIBSUFFIX is the suffix that static libraries have. It's
+ #meaningless if you aren't building static libraries.
+--- GNUmakefile (revision 2174)
++++ GNUmakefile (revision 2175)
+@@ -396,19 +396,19 @@ lib/install.hdr:
+ $(MAKE) -C $(dir $@) -f $(SRCDIR)/lib/Makefile \
+ SRCDIR=$(SRCDIR) BUILDDIR=$(BUILDDIR) $(notdir $@)
+
+-ifeq ($(STATICLIB_TOO),y)
+-BUILD_STATIC = y
++ifeq ($(STATICLIB_TOO),Y)
++BUILD_STATIC = Y
+ else
+ ifeq ($(NETPBMLIBTYPE),unixstatic)
+- BUILD_STATIC = y
++ BUILD_STATIC = Y
+ else
+- BUILD_STATIC = n
++ BUILD_STATIC = N
+ endif
+ endif
+
+ .PHONY: install.staticlib
+ install.staticlib:
+-ifeq ($(BUILD_STATIC),y)
++ifeq ($(BUILD_STATIC),Y)
+ $(MAKE) -C lib -f $(SRCDIR)/lib/Makefile \
+ SRCDIR=$(SRCDIR) BUILDDIR=$(BUILDDIR) install.staticlib
+ endif
+--- lib/Makefile (revision 2174)
++++ lib/Makefile (revision 2175)
+@@ -175,7 +175,7 @@ else
+ ifeq ($(STATICLIB_TOO),Y)
+ BUILD_STATICLIB = Y
+ else
+- BUILD_STATICLIB = n
++ BUILD_STATICLIB = N
+ endif
+ endif
+
diff --git a/media-libs/netpbm/files/netpbm-10.66-test.patch b/media-libs/netpbm/files/netpbm-10.66-test.patch
new file mode 100644
index 000000000000..7c80648bafab
--- /dev/null
+++ b/media-libs/netpbm/files/netpbm-10.66-test.patch
@@ -0,0 +1,17 @@
+https://bugs.gentoo.org/450530
+
+we disable fiascotopnm all the time, so delete the test too
+
+--- a/test/all-in-place.test
++++ b/test/all-in-place.test
+@@ -387,10 +387,6 @@ for i in $ordinary_testprogs
+
+
+
+-# Test fiascotopnm, which has a unique -v flag.
+-
+-${PBM_TESTPREFIX}fiascotopnm -v 2> /dev/null
+- testExitStatus fiascotopnm 2 $?
+
+
+
diff --git a/media-libs/netpbm/files/netpbm-10.66-wordaccess_be_aligned.patch b/media-libs/netpbm/files/netpbm-10.66-wordaccess_be_aligned.patch
new file mode 100644
index 000000000000..0da719ae07d4
--- /dev/null
+++ b/media-libs/netpbm/files/netpbm-10.66-wordaccess_be_aligned.patch
@@ -0,0 +1,23 @@
+https://bugs.gentoo.org/547252
+
+------------------------------------------------------------------------
+r2395 | giraffedata | 2015-01-23 13:51:17 -0500 (Fri, 23 Jan 2015) | 1 line
+
+Fix syntax error
+
+build: fix compile failure in wordint_access_be.h with
+Bigendian target platforms.
+
+Index: trunk/lib/util/wordaccess_be_aligned.h
+===================================================================
+--- trunk/lib/util/wordaccess_be_aligned.h (revision 2394)
++++ trunk/lib/util/wordaccess_be_aligned.h (revision 2395)
+@@ -24,7 +24,7 @@ bytesToWordint(wordintBytes bytes) {
+ static __inline__ void
+ wordintToBytes(wordintBytes * const bytesP,
+ wordint const wordInt) {
+- uint16_t const hi = ((wordInt >> 48) & 0xFF)
++ uint16_t const hi = ((wordInt >> 48) & 0xFF);
+ uint16_t const mh = ((wordInt >> 32) & 0xFF);
+ uint16_t const ml = ((wordInt >> 24) & 0xFF);
+ uint16_t const lo = ((wordInt >> 0) & 0xFF);
diff --git a/media-libs/netpbm/files/netpbm-10.70-system-libs.patch b/media-libs/netpbm/files/netpbm-10.70-system-libs.patch
new file mode 100644
index 000000000000..ef50ff2435dd
--- /dev/null
+++ b/media-libs/netpbm/files/netpbm-10.70-system-libs.patch
@@ -0,0 +1,40 @@
+when we disable the bundled libs, make sure we don't try to run install in them
+
+--- converter/other/jbig/Makefile
++++ converter/other/jbig/Makefile
+@@ -5,7 +5,7 @@ endif
+ SUBDIR = converter/other/jbig
+ VPATH=.:$(SRCDIR)/$(SUBDIR)
+
+-SUBDIRS = libjbig
++SUBDIRS =
+
+ include $(BUILDDIR)/config.mk
+
+@@ -35,6 +35,7 @@ SCRIPTS =
+
+ ifeq ($(JBIGLIB),$(INTERNAL_JBIGLIB))
+ JBIGLIB_DEP = $(JBIGLIB)
++ SUBDIRS += libjbig
+ else
+ # It's not our internal version; user's on his own to make sure it's built
+ endif
+--- converter/other/jpeg2000/Makefile
++++ converter/other/jpeg2000/Makefile
+@@ -5,7 +5,7 @@ endif
+ SUBDIR = converter/other/jpeg2000
+ VPATH=.:$(SRCDIR)/$(SUBDIR)
+
+-SUBDIRS = libjasper
++SUBDIRS =
+
+ include $(BUILDDIR)/config.mk
+
+@@ -52,6 +52,7 @@ ifeq ($(JASPERLIB),$(INTERNAL_JASPERLIB)
+ # MERGE_OBJECTS contains relative paths, so $(INTERNAL_JASPERLIB) had better
+ # be relative to the current directory.
+ MERGE_OBJECTS += $(JASPERLIB)
++ SUBDIRS += libjasper
+ endif
+ MERGEBINARIES = $(BINARIES)
+
diff --git a/media-libs/netpbm/metadata.xml b/media-libs/netpbm/metadata.xml
new file mode 100644
index 000000000000..867433382de9
--- /dev/null
+++ b/media-libs/netpbm/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>graphics</herd>
+ <use>
+ <flag name="rle">Build converters for the RLE format (utah raster toolkit)</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/netpbm/netpbm-10.66.00.ebuild b/media-libs/netpbm/netpbm-10.66.00.ebuild
new file mode 100644
index 000000000000..b5b4f1e67ea9
--- /dev/null
+++ b/media-libs/netpbm/netpbm-10.66.00.ebuild
@@ -0,0 +1,197 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit toolchain-funcs eutils multilib
+
+DESCRIPTION="A set of utilities for converting to/from the netpbm (and related) formats"
+HOMEPAGE="http://netpbm.sourceforge.net/"
+SRC_URI="mirror://gentoo/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="doc jbig jpeg jpeg2k png rle cpu_flags_x86_sse2 static-libs svga tiff X xml zlib"
+
+RDEPEND="jbig? ( media-libs/jbigkit )
+ jpeg? ( virtual/jpeg:0 )
+ jpeg2k? ( media-libs/jasper )
+ png? ( >=media-libs/libpng-1.4:0 )
+ rle? ( media-libs/urt )
+ svga? ( media-libs/svgalib )
+ tiff? ( >=media-libs/tiff-3.5.5:0 )
+ xml? ( dev-libs/libxml2 )
+ zlib? ( sys-libs/zlib )
+ X? ( x11-libs/libX11 )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ sys-devel/flex"
+
+netpbm_libtype() {
+ case ${CHOST} in
+ *-darwin*) echo dylib;;
+ *) echo unixshared;;
+ esac
+}
+netpbm_libsuffix() {
+ local suffix=$(get_libname)
+ echo ${suffix//\.}
+}
+netpbm_ldshlib() {
+ case ${CHOST} in
+ *-darwin*) echo '$(LDFLAGS) -dynamiclib -install_name $(SONAME)';;
+ *) echo '$(LDFLAGS) -shared -Wl,-soname,$(SONAME)';;
+ esac
+}
+netpbm_config() {
+ if use $1 ; then
+ [[ $2 != "!" ]] && echo -l${2:-$1}
+ else
+ echo NONE
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/netpbm-10.31-build.patch
+ epatch "${FILESDIR}"/netpbm-10.66-test.patch #450530
+ epatch "${FILESDIR}"/netpbm-10.66-jasper-hack.patch #513240
+ epatch "${FILESDIR}"/netpbm-10.66-options-case.patch
+ epatch "${FILESDIR}"/netpbm-10.66-jpeg-dirs.patch
+ epatch "${FILESDIR}"/netpbm-10.66-jbig-2.patch
+ epatch "${FILESDIR}"/netpbm-10.66-failing-tests.patch
+ epatch "${FILESDIR}"/netpbm-10.66-wordaccess_be_aligned.patch #547252
+
+ # make sure we use system urt
+ sed -i '/SUPPORT_SUBDIRS/s:urt::' GNUmakefile || die
+ rm -rf urt
+
+ # avoid mixing the local copy of jbig with the system
+ rm converter/other/jbig/jbig.h || die
+
+ # disable certain tests based on active USE flags
+ local del=(
+ $(usex jbig '' 'jbigtopnm pnmtojbig jbig-roundtrip')
+ $(usex rle '' 'utahrle-roundtrip')
+ $(usex tiff '' 'tiff-roundtrip')
+ )
+ if [[ ${#del[@]} -gt 0 ]] ; then
+ sed -i -r $(printf -- ' -e /%s.test/d' "${del[@]}") test/Test-Order || die
+ fi
+ del=(
+ pnmtofiasco fiascotopnm # We always disable fiasco
+ $(usex jbig '' 'jbigtopnm pnmtojbig')
+ $(usex jpeg2k '' 'jpeg2ktopam pamtojpeg2k')
+ $(usex rle '' 'pnmtorle rletopnm')
+ $(usex tiff '' 'pamtotiff pnmtotiff pnmtotiffcmyk tifftopnm')
+ )
+ if [[ ${#del[@]} -gt 0 ]] ; then
+ sed -i -r $(printf -- ' -e s/\<%s\>(:.ok)?//' "${del[@]}") test/all-in-place.{ok,test} || die
+ sed -i '/^$/d' test/all-in-place.ok || die
+ fi
+
+ # take care of the importinc stuff ourselves by only doing it once
+ # at the top level and having all subdirs use that one set #149843
+ sed -i \
+ -e '/^importinc:/s|^|importinc:\nmanual_|' \
+ -e '/-Iimportinc/s|-Iimp|-I"$(BUILDDIR)"/imp|g'\
+ common.mk || die
+ sed -i \
+ -e '/%.c/s: importinc$::' \
+ common.mk lib/Makefile lib/util/Makefile || die
+
+ # avoid ugly depend.mk warnings
+ touch $(find . -name Makefile | sed s:Makefile:depend.mk:g)
+}
+
+src_configure() {
+ cat config.mk.in - >> config.mk <<-EOF
+ # Misc crap
+ BUILD_FIASCO = N
+ SYMLINK = ln -sf
+
+ # These vars let src_test work by default
+ PKGDIR_DEFAULT = ${T}/netpbm
+ RESULTDIR_DEFAULT = ${T}/netpbm-test
+
+ # Toolchain options
+ CC = $(tc-getCC) -Wall
+ LD = \$(CC)
+ CC_FOR_BUILD = $(tc-getBUILD_CC)
+ LD_FOR_BUILD = \$(CC_FOR_BUILD)
+ AR = $(tc-getAR)
+ RANLIB = $(tc-getRANLIB)
+
+ STRIPFLAG =
+ CFLAGS_SHLIB = -fPIC
+
+ LDRELOC = \$(LD) -r
+ LDSHLIB = $(netpbm_ldshlib)
+ LINKER_CAN_DO_EXPLICIT_LIBRARY = N # we can, but dont want to
+ LINKERISCOMPILER = Y
+ NETPBMLIBSUFFIX = $(netpbm_libsuffix)
+ NETPBMLIBTYPE = $(netpbm_libtype)
+ STATICLIB_TOO = $(usex static-libs Y N)
+
+ # The var is called SSE, but the code is actually SSE2.
+ WANT_SSE = $(usex cpu_flags_x86_sse2 Y N)
+
+ # Gentoo build options
+ TIFFLIB = $(netpbm_config tiff)
+ # Let tiff worry about its own dependencies #395753
+ TIFFLIB_NEEDS_JPEG = N
+ TIFFLIB_NEEDS_Z = N
+ JPEGLIB = $(netpbm_config jpeg)
+ PNGLIB = $(netpbm_config png)
+ ZLIB = $(netpbm_config zlib z)
+ LINUXSVGALIB = $(netpbm_config svga vga)
+ XML2_LIBS = $(netpbm_config xml xml2)
+ JBIGLIB = $(netpbm_config jbig)
+ JBIGHDR_DIR =
+ JASPERLIB = $(netpbm_config jpeg2k jasper)
+ JASPERHDR_DIR =
+ URTLIB = $(netpbm_config rle)
+ URTHDR_DIR =
+ X11LIB = $(netpbm_config X X11)
+ X11HDR_DIR =
+ EOF
+ # cannot chain the die with the heredoc above as bash-3
+ # has a parser bug in that setup #282902
+ [ $? -eq 0 ] || die "writing config.mk failed"
+}
+
+src_compile() {
+ emake -j1 pm_config.h version.h manual_importinc #149843
+ emake
+}
+
+src_test() {
+ # The code wants to install everything first and then test the result.
+ emake install.{bin,lib}
+ emake check
+}
+
+src_install() {
+ # Subdir make targets like to use `mkdir` all over the place
+ # without any actual dependencies, thus the -j1.
+ emake -j1 package pkgdir="${ED}"/usr
+
+ [[ $(get_libdir) != "lib" ]] && mv "${ED}"/usr/lib "${ED}"/usr/$(get_libdir)
+
+ # Remove cruft that we don't need, and move around stuff we want
+ rm "${ED}"/usr/bin/{doc.url,manweb} || die
+ rm -r "${ED}"/usr/man/web || die
+ rm -r "${ED}"/usr/link || die
+ rm "${ED}"/usr/{README,VERSION,{pkgconfig,config}_template,pkginfo} || die
+ dodir /usr/share
+ mv "${ED}"/usr/man "${ED}"/usr/share/ || die
+ mv "${ED}"/usr/misc "${ED}"/usr/share/netpbm || die
+
+ doman userguide/*.[0-9]
+ use doc && dohtml -r userguide
+ dodoc README
+ cd doc
+ dodoc HISTORY Netpbm.programming USERDOC
+ dohtml -r .
+}
diff --git a/media-libs/netpbm/netpbm-10.70.00.ebuild b/media-libs/netpbm/netpbm-10.70.00.ebuild
new file mode 100644
index 000000000000..fb0f12f63937
--- /dev/null
+++ b/media-libs/netpbm/netpbm-10.70.00.ebuild
@@ -0,0 +1,189 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit toolchain-funcs eutils multilib
+
+DESCRIPTION="A set of utilities for converting to/from the netpbm (and related) formats"
+HOMEPAGE="http://netpbm.sourceforge.net/"
+SRC_URI="mirror://gentoo/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="doc jbig jpeg jpeg2k png rle cpu_flags_x86_sse2 static-libs svga tiff X xml zlib"
+
+RDEPEND="jbig? ( media-libs/jbigkit )
+ jpeg? ( virtual/jpeg:0 )
+ jpeg2k? ( media-libs/jasper )
+ png? ( >=media-libs/libpng-1.4:0 )
+ rle? ( media-libs/urt )
+ svga? ( media-libs/svgalib )
+ tiff? ( >=media-libs/tiff-3.5.5:0 )
+ xml? ( dev-libs/libxml2 )
+ zlib? ( sys-libs/zlib )
+ X? ( x11-libs/libX11 )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ sys-devel/flex"
+
+netpbm_libtype() {
+ case ${CHOST} in
+ *-darwin*) echo dylib;;
+ *) echo unixshared;;
+ esac
+}
+netpbm_libsuffix() {
+ local suffix=$(get_libname)
+ echo ${suffix//\.}
+}
+netpbm_ldshlib() {
+ case ${CHOST} in
+ *-darwin*) echo '$(LDFLAGS) -dynamiclib -install_name $(SONAME)';;
+ *) echo '$(LDFLAGS) -shared -Wl,-soname,$(SONAME)';;
+ esac
+}
+netpbm_config() {
+ if use $1 ; then
+ [[ $2 != "!" ]] && echo -l${2:-$1}
+ else
+ echo NONE
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/netpbm-10.31-build.patch
+ epatch "${FILESDIR}"/netpbm-10.66-test.patch #450530
+ epatch "${FILESDIR}"/netpbm-10.70-system-libs.patch
+
+ # make sure we use system libs
+ sed -i '/SUPPORT_SUBDIRS/s:urt::' GNUmakefile || die
+ rm -r urt converter/other/jbig/libjbig converter/other/jpeg2000/libjasper || die
+
+ # disable certain tests based on active USE flags
+ local del=(
+ $(usex jbig '' 'jbigtopnm pnmtojbig jbig-roundtrip')
+ $(usex rle '' 'utahrle-roundtrip')
+ $(usex tiff '' 'tiff-roundtrip')
+ )
+ if [[ ${#del[@]} -gt 0 ]] ; then
+ sed -i -r $(printf -- ' -e /%s.test/d' "${del[@]}") test/Test-Order || die
+ fi
+ del=(
+ pnmtofiasco fiascotopnm # We always disable fiasco
+ $(usex jbig '' 'jbigtopnm pnmtojbig')
+ $(usex jpeg2k '' 'jpeg2ktopam pamtojpeg2k')
+ $(usex rle '' 'pnmtorle rletopnm')
+ $(usex tiff '' 'pamtotiff pnmtotiff pnmtotiffcmyk tifftopnm')
+ )
+ if [[ ${#del[@]} -gt 0 ]] ; then
+ sed -i -r $(printf -- ' -e s/\<%s\>(:.ok)?//' "${del[@]}") test/all-in-place.{ok,test} || die
+ sed -i '/^$/d' test/all-in-place.ok || die
+ fi
+
+ # take care of the importinc stuff ourselves by only doing it once
+ # at the top level and having all subdirs use that one set #149843
+ sed -i \
+ -e '/^importinc:/s|^|importinc:\nmanual_|' \
+ -e '/-Iimportinc/s|-Iimp|-I"$(BUILDDIR)"/imp|g'\
+ common.mk || die
+ sed -i \
+ -e '/%.c/s: importinc$::' \
+ common.mk lib/Makefile lib/util/Makefile || die
+
+ # avoid ugly depend.mk warnings
+ touch $(find . -name Makefile | sed s:Makefile:depend.mk:g)
+}
+
+src_configure() {
+ cat config.mk.in - >> config.mk <<-EOF
+ # Misc crap
+ BUILD_FIASCO = N
+ SYMLINK = ln -sf
+
+ # These vars let src_test work by default
+ PKGDIR_DEFAULT = ${T}/netpbm
+ RESULTDIR_DEFAULT = ${T}/netpbm-test
+
+ # Toolchain options
+ CC = $(tc-getCC) -Wall
+ LD = \$(CC)
+ CC_FOR_BUILD = $(tc-getBUILD_CC)
+ LD_FOR_BUILD = \$(CC_FOR_BUILD)
+ AR = $(tc-getAR)
+ RANLIB = $(tc-getRANLIB)
+
+ STRIPFLAG =
+ CFLAGS_SHLIB = -fPIC
+
+ LDRELOC = \$(LD) -r
+ LDSHLIB = $(netpbm_ldshlib)
+ LINKER_CAN_DO_EXPLICIT_LIBRARY = N # we can, but dont want to
+ LINKERISCOMPILER = Y
+ NETPBMLIBSUFFIX = $(netpbm_libsuffix)
+ NETPBMLIBTYPE = $(netpbm_libtype)
+ STATICLIB_TOO = $(usex static-libs Y N)
+
+ # The var is called SSE, but the code is actually SSE2.
+ WANT_SSE = $(usex cpu_flags_x86_sse2 Y N)
+
+ # Gentoo build options
+ TIFFLIB = $(netpbm_config tiff)
+ # Let tiff worry about its own dependencies #395753
+ TIFFLIB_NEEDS_JPEG = N
+ TIFFLIB_NEEDS_Z = N
+ JPEGLIB = $(netpbm_config jpeg)
+ PNGLIB = $(netpbm_config png)
+ ZLIB = $(netpbm_config zlib z)
+ LINUXSVGALIB = $(netpbm_config svga vga)
+ XML2_LIBS = $(netpbm_config xml xml2)
+ JBIGLIB = $(netpbm_config jbig)
+ JBIGHDR_DIR =
+ JASPERLIB = $(netpbm_config jpeg2k jasper)
+ JASPERHDR_DIR =
+ URTLIB = $(netpbm_config rle)
+ URTHDR_DIR =
+ X11LIB = $(netpbm_config X X11)
+ X11HDR_DIR =
+ EOF
+ # cannot chain the die with the heredoc above as bash-3
+ # has a parser bug in that setup #282902
+ [ $? -eq 0 ] || die "writing config.mk failed"
+}
+
+src_compile() {
+ emake -j1 pm_config.h version.h manual_importinc #149843
+ emake
+}
+
+src_test() {
+ # The code wants to install everything first and then test the result.
+ emake install.{bin,lib}
+ emake check
+}
+
+src_install() {
+ # Subdir make targets like to use `mkdir` all over the place
+ # without any actual dependencies, thus the -j1.
+ emake -j1 package pkgdir="${ED}"/usr
+
+ [[ $(get_libdir) != "lib" ]] && mv "${ED}"/usr/lib "${ED}"/usr/$(get_libdir)
+
+ # Remove cruft that we don't need, and move around stuff we want
+ rm "${ED}"/usr/bin/{doc.url,manweb} || die
+ rm -r "${ED}"/usr/man/web || die
+ rm -r "${ED}"/usr/link || die
+ rm "${ED}"/usr/{README,VERSION,{pkgconfig,config}_template,pkginfo} || die
+ dodir /usr/share
+ mv "${ED}"/usr/man "${ED}"/usr/share/ || die
+ mv "${ED}"/usr/misc "${ED}"/usr/share/netpbm || die
+
+ doman userguide/*.[0-9]
+ use doc && dohtml -r userguide
+ dodoc README
+ cd doc
+ dodoc HISTORY Netpbm.programming USERDOC
+ dohtml -r .
+}
diff --git a/media-libs/openal/Manifest b/media-libs/openal/Manifest
new file mode 100644
index 000000000000..e764cc72c78a
--- /dev/null
+++ b/media-libs/openal/Manifest
@@ -0,0 +1,2 @@
+DIST openal-soft-1.15.1.tar.bz2 253006 SHA256 0e29a162f0841ccb4135ce76e92e8a704589b680a85eddf76f898de5236eb056 SHA512 ca6dafdd503d06892dff08763bc00b974ec6e7c4bf3dcebb4cb41a486b4ea777c278299a198db182fee888a19a5716bd57d91a2859b764a532138a79f2bd672f WHIRLPOOL a47fcf4cc5da9576cb4683371979175111a1ec746c87ea1140bfb1b71433a3fe5d3df338e8844ab62adc0e6decb4b481d6d8fedb6f635b5bac715d5789077902
+DIST openal-soft-1.16.0.tar.bz2 393280 SHA256 2f3dcd313fe26391284fbf8596863723f99c65d6c6846dccb48e79cadaf40d5f SHA512 b89e46902ce475afd47c4c153ae666646e8b277abf1be97f92b6a10dc585ed780c663591398a9fd7e4118595dd45d2d8d6df0101b4148686150bbb3fe2939ddc WHIRLPOOL c1143c0bc0b7299d088b2a2c440309461ba50efd4e8a924066b08411b0f66a02fb92afb6e5a9edc42552a7b59103ec204165b974bdc3297c963e8f9c0dfc55c0
diff --git a/media-libs/openal/metadata.xml b/media-libs/openal/metadata.xml
new file mode 100644
index 000000000000..5f943cfbcf91
--- /dev/null
+++ b/media-libs/openal/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>sound</herd>
+ <use>
+ <flag name='alstream'>Build and install the FFmpeg based alstream example utility</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/openal/openal-1.15.1-r1.ebuild b/media-libs/openal/openal-1.15.1-r1.ebuild
new file mode 100644
index 000000000000..523716240183
--- /dev/null
+++ b/media-libs/openal/openal-1.15.1-r1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit cmake-multilib
+
+MY_P=${PN}-soft-${PV}
+
+DESCRIPTION="A software implementation of the OpenAL 3D audio API"
+HOMEPAGE="http://kcat.strangesoft.net/openal.html"
+SRC_URI="http://kcat.strangesoft.net/openal-releases/${MY_P}.tar.bz2"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux"
+IUSE="alsa alstream coreaudio debug neon oss portaudio pulseaudio cpu_flags_x86_sse"
+
+RDEPEND="alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
+ alstream? ( virtual/ffmpeg )
+ portaudio? ( >=media-libs/portaudio-19_pre20111121-r1[${MULTILIB_USEDEP}] )
+ pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !<app-emulation/emul-linux-x86-sdl-20131008-r1
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ )"
+DEPEND="${RDEPEND}
+ oss? ( virtual/os-headers )"
+
+S=${WORKDIR}/${MY_P}
+
+DOCS="alsoftrc.sample env-vars.txt hrtf.txt README"
+
+src_configure() {
+ my_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use alsa)
+ $(cmake-utils_use coreaudio)
+ $(cmake-utils_use neon)
+ $(cmake-utils_use oss)
+ $(cmake-utils_use portaudio)
+ $(cmake-utils_use pulseaudio)
+ $(cmake-utils_use cpu_flags_x86_sse sse)
+ )
+
+ if multilib_is_native_abi; then
+ mycmakeargs+=( $(cmake-utils_use alstream EXAMPLES) )
+ else
+ mycmakeargs+=( "-DEXAMPLES=OFF" )
+ fi
+
+ cmake-utils_src_configure
+ }
+
+ multilib_parallel_foreach_abi my_configure
+}
diff --git a/media-libs/openal/openal-1.15.1-r2.ebuild b/media-libs/openal/openal-1.15.1-r2.ebuild
new file mode 100644
index 000000000000..a2bae3748e55
--- /dev/null
+++ b/media-libs/openal/openal-1.15.1-r2.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 cmake-multilib
+
+MY_P=${PN}-soft-${PV}
+
+DESCRIPTION="A software implementation of the OpenAL 3D audio API"
+HOMEPAGE="http://kcat.strangesoft.net/openal.html"
+SRC_URI="http://kcat.strangesoft.net/openal-releases/${MY_P}.tar.bz2"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux"
+IUSE="alsa coreaudio debug neon oss portaudio pulseaudio cpu_flags_x86_sse"
+
+RDEPEND="alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
+ portaudio? ( >=media-libs/portaudio-19_pre20111121-r1[${MULTILIB_USEDEP}] )
+ pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !<app-emulation/emul-linux-x86-sdl-20131008-r1
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ )"
+DEPEND="${RDEPEND}
+ oss? ( virtual/os-headers )"
+
+S=${WORKDIR}/${MY_P}
+
+DOCS="alsoftrc.sample env-vars.txt hrtf.txt README"
+
+src_configure() {
+ # -DEXAMPLES=OFF to avoid FFmpeg dependency wrt #481670
+ my_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use alsa)
+ $(cmake-utils_use coreaudio)
+ $(cmake-utils_use neon)
+ $(cmake-utils_use oss)
+ $(cmake-utils_use portaudio)
+ $(cmake-utils_use pulseaudio)
+ $(cmake-utils_use cpu_flags_x86_sse sse)
+ -DEXAMPLES=OFF
+ )
+
+ cmake-utils_src_configure
+ }
+
+ multilib_parallel_foreach_abi my_configure
+}
diff --git a/media-libs/openal/openal-1.15.1.ebuild b/media-libs/openal/openal-1.15.1.ebuild
new file mode 100644
index 000000000000..c533b70ac980
--- /dev/null
+++ b/media-libs/openal/openal-1.15.1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit cmake-utils
+
+MY_P=${PN}-soft-${PV}
+
+DESCRIPTION="A software implementation of the OpenAL 3D audio API"
+HOMEPAGE="http://kcat.strangesoft.net/openal.html"
+SRC_URI="http://kcat.strangesoft.net/openal-releases/${MY_P}.tar.bz2"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux"
+IUSE="alsa alstream coreaudio debug neon oss portaudio pulseaudio cpu_flags_x86_sse"
+
+RDEPEND="alsa? ( media-libs/alsa-lib )
+ alstream? ( virtual/ffmpeg )
+ portaudio? ( >=media-libs/portaudio-19_pre )
+ pulseaudio? ( media-sound/pulseaudio )"
+DEPEND="${RDEPEND}
+ oss? ( virtual/os-headers )"
+
+S=${WORKDIR}/${MY_P}
+
+DOCS="alsoftrc.sample env-vars.txt hrtf.txt README"
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use alsa)
+ $(cmake-utils_use coreaudio)
+ $(cmake-utils_use alstream EXAMPLES)
+ $(cmake-utils_use neon)
+ $(cmake-utils_use oss)
+ $(cmake-utils_use portaudio)
+ $(cmake-utils_use pulseaudio)
+ $(cmake-utils_use cpu_flags_x86_sse sse)
+ )
+
+ cmake-utils_src_configure
+}
diff --git a/media-libs/openal/openal-1.16.0.ebuild b/media-libs/openal/openal-1.16.0.ebuild
new file mode 100644
index 000000000000..089fb337fa69
--- /dev/null
+++ b/media-libs/openal/openal-1.16.0.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit cmake-multilib
+
+MY_P=${PN}-soft-${PV}
+
+DESCRIPTION="A software implementation of the OpenAL 3D audio API"
+HOMEPAGE="http://kcat.strangesoft.net/openal.html"
+SRC_URI="http://kcat.strangesoft.net/openal-releases/${MY_P}.tar.bz2"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux"
+IUSE="
+ alsa coreaudio debug oss portaudio pulseaudio qt4
+ cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse4_1
+ neon
+"
+
+RDEPEND="alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
+ portaudio? ( >=media-libs/portaudio-19_pre20111121-r1[${MULTILIB_USEDEP}] )
+ pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] )
+ qt4? ( dev-qt/qtgui:4 dev-qt/qtcore:4 )
+ abi_x86_32? (
+ !<app-emulation/emul-linux-x86-sdl-20131008-r1
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ )"
+DEPEND="${RDEPEND}
+ oss? ( virtual/os-headers )"
+
+S=${WORKDIR}/${MY_P}
+
+DOCS="alsoftrc.sample env-vars.txt hrtf.txt README"
+
+src_configure() {
+ # -DEXAMPLES=OFF to avoid FFmpeg dependency wrt #481670
+ my_configure() {
+ local mycmakeargs=(
+ "-DALSOFT_BACKEND_ALSA=$(usex alsa ON OFF)"
+ "-DALSOFT_BACKEND_COREAUDIO=$(usex coreaudio ON OFF)"
+ "-DALSOFT_BACKEND_OSS=$(usex oss ON OFF)"
+ "-DALSOFT_BACKEND_PORTAUDIO=$(usex portaudio ON OFF)"
+ "-DALSOFT_BACKEND_PULSEAUDIO=$(usex pulseaudio ON OFF)"
+ "-DALSOFT_CPUEXT_SSE=$(usex cpu_flags_x86_sse ON OFF)"
+ "-DALSOFT_CPUEXT_SSE2=$(usex cpu_flags_x86_sse2 ON OFF)"
+ "-DALSOFT_CPUEXT_SSE4_1=$(usex cpu_flags_x86_sse4_1 ON OFF)"
+ "-DALSOFT_CPUEXT_NEON=$(usex neon ON OFF)"
+ "-DALSOFT_UTILS=$(multilib_is_native_abi && echo "ON" || echo "OFF")"
+ "-DALSOFT_NO_CONFIG_UTIL=$(usex qt4 "$(multilib_is_native_abi && echo "OFF" || echo "ON")" ON)"
+ "-DALSOFT_EXAMPLES=OFF"
+ )
+
+ cmake-utils_src_configure
+ }
+
+ multilib_parallel_foreach_abi my_configure
+}
diff --git a/media-libs/opencollada/Manifest b/media-libs/opencollada/Manifest
new file mode 100644
index 000000000000..a7fa6d32ca81
--- /dev/null
+++ b/media-libs/opencollada/Manifest
@@ -0,0 +1 @@
+DIST opencollada-1.2.2_p20150207.tar.gz 11715849 SHA256 b6a4362c559d790a04dfef4606cb0a0ffe01e34708f898bf3453e69318bc5cc1 SHA512 0780e4401f130832d9802ddd6183ac11294ed84f43e0b497673c66fa2c1ae47ebc853484f8e68871887a1e99ab1f1df786cfc6ebd5868f039d9101ab82646f09 WHIRLPOOL 4cf7c7f03caf37e4c9342e139ed036b3c43984917ac4a3876e464f2065e2c515e2e85e5408d32901572d6b56a94d82963f5a2e6d3bb17dec04ecf35ee8be2d98
diff --git a/media-libs/opencollada/files/opencollada-0_p864-expat.patch b/media-libs/opencollada/files/opencollada-0_p864-expat.patch
new file mode 100644
index 000000000000..9086acf79214
--- /dev/null
+++ b/media-libs/opencollada/files/opencollada-0_p864-expat.patch
@@ -0,0 +1,12 @@
+--- a/CMakeLists.txt 2012-01-15 23:14:49.478520648 +0100
++++ b/CMakeLists.txt 2012-01-15 23:15:06.947302261 +0100
+@@ -208,8 +208,7 @@
+
+ if (USE_EXPAT)
+ add_definitions(-DGENERATEDSAXPARSER_XMLPARSER_EXPAT)
+- message("FATAL: EXPAT support not implemented")
+- # TODO:: use externals
++ set(LIBEXPAT_LIBRARIES expat)
+ endif ()
+
+ #adding PCRE
diff --git a/media-libs/opencollada/files/opencollada-0_p864-gcc-4.7.patch b/media-libs/opencollada/files/opencollada-0_p864-gcc-4.7.patch
new file mode 100644
index 000000000000..fd908e55943a
--- /dev/null
+++ b/media-libs/opencollada/files/opencollada-0_p864-gcc-4.7.patch
@@ -0,0 +1,26 @@
+--- common//libBuffer/include/CommonBuffer.h.ori 2012-04-28 15:45:37.621142222 +0200
++++ common//libBuffer/include/CommonBuffer.h 2012-04-28 15:45:28.740797826 +0200
+@@ -11,6 +11,12 @@
+ #ifndef __COMMON_BUFFER_H__
+ #define __COMMON_BUFFER_H__
+
++/* size_t for gcc, may want to move this include some place else - campbell */
++#ifdef __GNUC__
++# include <cstdlib> /* size_t */
++# include <cstring> /* memcpy */
++#endif
++
+ #include "CommonIBufferFlusher.h"
+
+ namespace Common
+--- COLLADAStreamWriter/include/COLLADASWAnnotation.h 2012-01-15 04:37:13.000000000 +0100
++++ COLLADAStreamWriter/include/COLLADASWAnnotation.h 2012-03-14 22:17:51.000000000 +0100
+@@ -219,7 +219,7 @@
+ void add (
+ const String &name,
+ const ValueType::ColladaType &type,
+- const T val ) const
++ const T val )
+ {
+ openAnnotation ( name );
+ openValuesElement ( type );
diff --git a/media-libs/opencollada/files/opencollada-0_p864-parallel.patch b/media-libs/opencollada/files/opencollada-0_p864-parallel.patch
new file mode 100644
index 000000000000..cac6ee285e40
--- /dev/null
+++ b/media-libs/opencollada/files/opencollada-0_p864-parallel.patch
@@ -0,0 +1,18 @@
+diff -Naur openCOLLADA-svn864.orig/COLLADASaxFrameworkLoader/CMakeLists.txt openCOLLADA-svn864/COLLADASaxFrameworkLoader/CMakeLists.txt
+--- openCOLLADA-svn864.orig/COLLADASaxFrameworkLoader/CMakeLists.txt 2011-10-13 18:54:06.000000000 -0500
++++ openCOLLADA-svn864/COLLADASaxFrameworkLoader/CMakeLists.txt 2012-01-17 16:11:35.825610565 -0600
+@@ -260,6 +260,14 @@
+ ${PCRE_LIBRARIES}
+ )
+
++# For parallel building.
++if(USE_SHARED)
++ add_dependencies(GeneratedSaxParser_shared OpenCOLLADABaseUtils_shared)
++endif()
++if(USE_STATIC)
++ add_dependencies(GeneratedSaxParser_static OpenCOLLADABaseUtils_static)
++endif()
++
+ if (USE_LIBXML)
+ list(APPEND libGeneratedSaxParser_include_dirs ${LIBXML2_INCLUDE_DIR})
+ list(APPEND TARGET_LIBS ${LIBXML2_LIBRARIES})
diff --git a/media-libs/opencollada/files/opencollada-1.2.2-libdir.patch b/media-libs/opencollada/files/opencollada-1.2.2-libdir.patch
new file mode 100644
index 000000000000..cc413f3ededc
--- /dev/null
+++ b/media-libs/opencollada/files/opencollada-1.2.2-libdir.patch
@@ -0,0 +1,27 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 96ccb32..c2673f0 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -146,6 +146,9 @@ set(OPENCOLLADA_VERSION_MINOR 1)
+ set(OPENCOLLADA_VERSION_PATCH 0)
+ set(OPENCOLLADA_VERSION ${OPENCOLLADA_VERSION_MAJOR}.${OPENCOLLADA_VERSION_MINOR}.${OPENCOLLADA_VERSION_PATCH})
+
++#-----------------------------------------------------------------------------
++# Generic install paths
++include(GNUInstallDirs)
+
+ #-----------------------------------------------------------------------------
+ # Compiler warnings.
+@@ -178,9 +181,9 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_WARNINGS}")
+ #-----------------------------------------------------------------------------
+ # Install vars
+
+-set(OPENCOLLADA_INST_INCLUDE ${CMAKE_INSTALL_PREFIX}/include/opencollada)
+-set(OPENCOLLADA_INST_LIBRARY ${CMAKE_INSTALL_PREFIX}/lib/opencollada)
+-set(OPENCOLLADA_INST_CMAKECONFIG ${OPENCOLLADA_INST_LIBRARY}/cmake)
++set(OPENCOLLADA_INST_INCLUDE ${CMAKE_INSTALL_FULL_INCLUDEDIR}/opencollada)
++set(OPENCOLLADA_INST_LIBRARY ${CMAKE_INSTALL_FULL_LIBDIR}/opencollada)
++set(OPENCOLLADA_INST_CMAKECONFIG ${CMAKE_INSTALL_FULL_LIBDIR}/opencollada/cmake)
+
+
+ #-----------------------------------------------------------------------------
diff --git a/media-libs/opencollada/files/opencollada-1.2.2-no-undefined.patch b/media-libs/opencollada/files/opencollada-1.2.2-no-undefined.patch
new file mode 100644
index 000000000000..e3cbf0dbead9
--- /dev/null
+++ b/media-libs/opencollada/files/opencollada-1.2.2-no-undefined.patch
@@ -0,0 +1,35 @@
+Source: https://build.opensuse.org/package/show/graphics/openCOLLADA
+
+Index: OpenCOLLADA-69b844dc9eea0a014326149c259e7810ecec4c8c/common/libBuffer/CMakeLists.txt
+===================================================================
+--- OpenCOLLADA-69b844dc9eea0a014326149c259e7810ecec4c8c.orig/common/libBuffer/CMakeLists.txt
++++ OpenCOLLADA-69b844dc9eea0a014326149c259e7810ecec4c8c/common/libBuffer/CMakeLists.txt
+@@ -28,7 +28,10 @@ set(SRC
+ include/performanceTest/performanceTest.h
+ )
+
+-set(TARGET_LIBS ftoa)
++set(TARGET_LIBS
++ ftoa
++ UTF
++)
+
+ include_directories(
+ ${libBuffer_include_dirs}
+Index: OpenCOLLADA-69b844dc9eea0a014326149c259e7810ecec4c8c/CMakeLists.txt
+===================================================================
+--- OpenCOLLADA-69b844dc9eea0a014326149c259e7810ecec4c8c.orig/CMakeLists.txt
++++ OpenCOLLADA-69b844dc9eea0a014326149c259e7810ecec4c8c/CMakeLists.txt
+@@ -244,10 +244,10 @@ else () # if pcre not found building it
+ endif ()
+
+ # building required libs
++add_subdirectory(${EXTERNAL_LIBRARIES}/UTF)
++add_subdirectory(${EXTERNAL_LIBRARIES}/MathMLSolver)
+ add_subdirectory(common/libftoa)
+ add_subdirectory(common/libBuffer)
+-add_subdirectory(${EXTERNAL_LIBRARIES}/UTF)
+-add_subdirectory(${EXTERNAL_LIBRARIES}/MathMLSolver)
+
+ # building OpenCOLLADA libs
+ add_subdirectory(COLLADABaseUtils)
diff --git a/media-libs/opencollada/files/opencollada-1.2.2-soversion.patch b/media-libs/opencollada/files/opencollada-1.2.2-soversion.patch
new file mode 100644
index 000000000000..beef35545538
--- /dev/null
+++ b/media-libs/opencollada/files/opencollada-1.2.2-soversion.patch
@@ -0,0 +1,15 @@
+Source:
+https://build.opensuse.org/package/show/graphics/openCOLLADA
+
+diff -Naur OpenCOLLADA.orig/CMakeLists.txt OpenCOLLADA/CMakeLists.txt
+--- OpenCOLLADA.orig/CMakeLists.txt 2013-08-10 02:00:51.000000000 -0500
++++ OpenCOLLADA/CMakeLists.txt 2013-08-28 10:34:50.122102989 -0500
+@@ -77,7 +77,7 @@
+ message(${name} " WARNING: Shared library support implemented for UNIX-like OS only")
+ endif ()
+ add_library(${name}_shared SHARED ${sources})
+- set_target_properties(${name}_shared PROPERTIES OUTPUT_NAME ${name})
++ set_target_properties(${name}_shared PROPERTIES OUTPUT_NAME ${name} SOVERSION ${soversion})
+ foreach(target_lib ${target_libs})
+ if(TARGET ${target_lib}_shared)
+ target_link_libraries(${name}_shared ${target_lib}_shared)
diff --git a/media-libs/opencollada/metadata.xml b/media-libs/opencollada/metadata.xml
new file mode 100644
index 000000000000..1fc65a68dc03
--- /dev/null
+++ b/media-libs/opencollada/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>openoffice</herd>
+ <maintainer>
+ <email>sping@gentoo.org</email>
+ <name>Sebastian Pipping</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">KhronosGroup/OpenCOLLADA</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/opencollada/opencollada-1.2.2_p20150207.ebuild b/media-libs/opencollada/opencollada-1.2.2_p20150207.ebuild
new file mode 100644
index 000000000000..2ed6d67a53e4
--- /dev/null
+++ b/media-libs/opencollada/opencollada-1.2.2_p20150207.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+if [[ ${PV} == *9999* ]] ; then
+ SCM_ECLASS="git-r3"
+else
+ SCM_ECLASS="vcs-snapshot"
+fi
+
+inherit versionator eutils multilib cmake-utils ${SCM_ECLASS}
+
+DESCRIPTION="Stream based read/write library for COLLADA files"
+HOMEPAGE="http://www.opencollada.org/"
+LICENSE="MIT"
+IUSE="expat"
+
+# seems like the Khronos Group hasnt invented the SOVERSION yet
+MY_SOVERSION="1.2"
+
+SLOT="0"
+
+if [[ ${PV} != *9999* ]]; then
+ #
+ # UPDATE THE COMMIT WHEN BUMPING!
+ COMMIT="ceb409cabdccda3000aa2e5c065850b8fde60b0f"
+ #
+ SRC_URI="https://github.com/KhronosGroup/OpenCOLLADA/tarball/${COMMIT} -> ${P}.tar.gz"
+ KEYWORDS="amd64 ~ppc64 x86"
+else
+ EGIT_REPO_URI="http://github.com/KhronosGroup/OpenCOLLADA.git"
+fi
+
+RDEPEND="dev-libs/libpcre
+ dev-libs/zziplib
+ media-libs/lib3ds
+ sys-libs/zlib
+ >=sys-devel/gcc-4.7
+ expat? ( dev-libs/expat )
+ !expat? ( dev-libs/libxml2 )"
+DEPEND="${RDEPEND}
+ sys-apps/findutils
+ sys-apps/sed"
+
+BUILD_DIR="${S}"/build
+
+src_prepare() {
+
+ # Remove some bundled dependencies
+ edos2unix CMakeLists.txt || die
+
+ epatch "${FILESDIR}"/${PN}-0_p864-expat.patch
+
+ epatch "${FILESDIR}"/${PN}-1.2.2-soversion.patch
+ epatch "${FILESDIR}"/${PN}-1.2.2-no-undefined.patch
+ epatch "${FILESDIR}"/${PN}-1.2.2-libdir.patch
+
+ rm -R Externals/{expat,lib3ds,LibXML,pcre,zlib,zziplib} || die
+ ewarn "$(echo "Remaining bundled dependencies:";
+ find Externals -mindepth 1 -maxdepth 1 -type d | sed 's|^|- |')"
+
+ # Remove unused build systems
+ rm Makefile scripts/{unixbuild.sh,vcproj2cmake.rb} || die
+ find "${S}" -name SConscript -delete || die
+}
+
+src_configure() {
+ local mycmakeargs=" -DUSE_SHARED=ON -DUSE_STATIC=OFF"
+
+ # Master CMakeLists.txt says "EXPAT support not implemented"
+ # Something like "set(LIBEXPAT_LIBRARIES expat)" is missing to make it build
+ use expat \
+ && mycmakeargs+=' -DUSE_EXPAT=ON -DUSE_LIBXML=OFF' \
+ || mycmakeargs+=' -DUSE_EXPAT=OFF -DUSE_LIBXML=ON'
+
+ # Seems like the Khronos Group hasnt invented the SOVERSION yet.
+ mycmakeargs+=" -Dsoversion=${MY_SOVERSION}"
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ dodir /etc/env.d || die
+ echo "LDPATH=/usr/$(get_libdir)/opencollada" \
+ > "${D}"/etc/env.d/99opencollada || die
+
+ dobin build/bin/OpenCOLLADAValidator || die
+}
diff --git a/media-libs/opencollada/opencollada-9999.ebuild b/media-libs/opencollada/opencollada-9999.ebuild
new file mode 100644
index 000000000000..4be2a8fa77cd
--- /dev/null
+++ b/media-libs/opencollada/opencollada-9999.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+if [[ ${PV} == *9999* ]] ; then
+ SCM_ECLASS="git-r3"
+else
+ SCM_ECLASS="vcs-snapshot"
+fi
+
+inherit versionator eutils multilib cmake-utils ${SCM_ECLASS}
+
+DESCRIPTION="Stream based read/write library for COLLADA files"
+HOMEPAGE="http://www.opencollada.org/"
+LICENSE="MIT"
+IUSE="expat"
+
+# seems like the Khronos Group hasnt invented the SOVERSION yet
+MY_SOVERSION="1.2"
+
+SLOT="0"
+
+if [[ ${PV} != *9999* ]]; then
+ #
+ # UPDATE THE COMMIT WHEN BUMPING!
+ COMMIT="ceb409cabdccda3000aa2e5c065850b8fde60b0f"
+ #
+ SRC_URI="https://github.com/KhronosGroup/OpenCOLLADA/tarball/${COMMIT} -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~ppc64 ~x86"
+else
+ EGIT_REPO_URI="http://github.com/KhronosGroup/OpenCOLLADA.git"
+fi
+
+RDEPEND="dev-libs/libpcre
+ dev-libs/zziplib
+ media-libs/lib3ds
+ sys-libs/zlib
+ >=sys-devel/gcc-4.7
+ expat? ( dev-libs/expat )
+ !expat? ( dev-libs/libxml2 )"
+DEPEND="${RDEPEND}
+ sys-apps/findutils
+ sys-apps/sed"
+
+BUILD_DIR="${S}"/build
+
+src_prepare() {
+
+ # Remove some bundled dependencies
+ edos2unix CMakeLists.txt || die
+
+ epatch "${FILESDIR}"/${PN}-0_p864-expat.patch
+
+ epatch "${FILESDIR}"/${PN}-1.2.2-soversion.patch
+ epatch "${FILESDIR}"/${PN}-1.2.2-no-undefined.patch
+ epatch "${FILESDIR}"/${PN}-1.2.2-libdir.patch
+
+ rm -R Externals/{expat,lib3ds,LibXML,pcre,zlib,zziplib} || die
+ ewarn "$(echo "Remaining bundled dependencies:";
+ find Externals -mindepth 1 -maxdepth 1 -type d | sed 's|^|- |')"
+
+ # Remove unused build systems
+ rm Makefile scripts/{unixbuild.sh,vcproj2cmake.rb} || die
+ find "${S}" -name SConscript -delete || die
+}
+
+src_configure() {
+ local mycmakeargs=" -DUSE_SHARED=ON -DUSE_STATIC=OFF"
+
+ # Master CMakeLists.txt says "EXPAT support not implemented"
+ # Something like "set(LIBEXPAT_LIBRARIES expat)" is missing to make it build
+ use expat \
+ && mycmakeargs+=' -DUSE_EXPAT=ON -DUSE_LIBXML=OFF' \
+ || mycmakeargs+=' -DUSE_EXPAT=OFF -DUSE_LIBXML=ON'
+
+ # Seems like the Khronos Group hasnt invented the SOVERSION yet.
+ mycmakeargs+=" -Dsoversion=${MY_SOVERSION}"
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ dodir /etc/env.d || die
+ echo "LDPATH=/usr/$(get_libdir)/opencollada" \
+ > "${D}"/etc/env.d/99opencollada || die
+
+ dobin build/bin/OpenCOLLADAValidator || die
+}
diff --git a/media-libs/opencolorio/Manifest b/media-libs/opencolorio/Manifest
new file mode 100644
index 000000000000..454d80558f9b
--- /dev/null
+++ b/media-libs/opencolorio/Manifest
@@ -0,0 +1,3 @@
+DIST opencolorio-1.0.8.tar.gz 11912207 SHA256 9b6d540040e29394045c724c1a46ea00913e660269b03bf24790c74a5542adb4 SHA512 16c0deab84013d96c9741a58ddc44a90be6a6eac317b8ceb87afad914aa9b0e1d5880dc11ae3c40d22e4a87b553e3b5a1a8a66c064f71c2203b4b605a97851a1 WHIRLPOOL 32b92dffa07873f2ea0635afc189937c4d695cb40f5a9d112489a98140d36524db3aadd53db9e9f6e6069f3f29f9d17a10883ae6f26d4144b7873ebfb944cb5a
+DIST opencolorio-1.0.9-yaml-0.5-compat.patch.bz2 14128 SHA256 917d64ea318da52286713742a9b54b9663326fabc90d8fb94697f8f1b672f344 SHA512 163009deb3bd2446fb203022f26c942fc09e39428f2f628dcd553e7b69f2b625c2c6962e8b5d4c0800c7edb7a776fa255a0223005dedf2b2f974752dfa4abfb6 WHIRLPOOL b14d7379261af2b61e674ed99ab8fe6345b67e6412be0fd8a59f5ae32bd29396ef274310cfaec0e74b2f46f7bf3611ad77cfc74af5a08ed27a92eed2936af104
+DIST opencolorio-1.0.9.tar.gz 12473406 SHA256 0f3b458f69715a942047a7b76545c6a098b632e9e5e71d5caaa756d5f7356aa6 SHA512 f5310cd6d3048d5f307adb41ac1ac807f087a6344c96324cb0f13d0eae1fa3fe5f8005f17adf77664044daf762902223b650b5d8c1636c7801183cd3b4e03ac8 WHIRLPOOL e622d71d40cfdba664178df38d66ecd990515afe4fff0260952bca29e6d46beba47446b6bd36c9965a8169c966a0bddf9bcb5b41f7857ed355ac1a6299c9de6c
diff --git a/media-libs/opencolorio/files/opencolorio-1.0.8-documentation-gen.patch b/media-libs/opencolorio/files/opencolorio-1.0.8-documentation-gen.patch
new file mode 100644
index 000000000000..f5b3b7b7a5fe
--- /dev/null
+++ b/media-libs/opencolorio/files/opencolorio-1.0.8-documentation-gen.patch
@@ -0,0 +1,54 @@
+--- docs/CMakeLists.txt.orig 2013-01-08 03:19:23.649162615 +0400
++++ docs/CMakeLists.txt 2013-01-08 03:22:29.647329174 +0400
+@@ -81,7 +81,7 @@
+ ExtractRstCPP(${CMAKE_SOURCE_DIR}/export/OpenColorIO/OpenColorTypes.h developers/api/OpenColorTypes.rst)
+
+ add_custom_target(doc ALL
+- COMMAND PYTHONPATH=${PYTHONPATH} ${EXTDIST_BINPATH}/sphinx-build -b html . ${CMAKE_CURRENT_BINARY_DIR}/build-html
++ COMMAND sphinx-build -b html . ${CMAKE_CURRENT_BINARY_DIR}/build-html
+ DEPENDS
+ OpenColorIO
+ PyOpenColorIO
+@@ -93,20 +93,18 @@
+ COMMENT "Building html docs"
+ SOURCES ${DOCFILES})
+
+-# note: ExternalProject will not build when added to a add_custom_target this
+-# works around this problem. This seems to be fixed in the cmake ^HEAD
+-add_dependencies(doc Sphinx)
+-
+ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/build-html/
+- DESTINATION ${CMAKE_INSTALL_PREFIX}/share/doc/OpenColorIO/html
++ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/doc/$ENV{P}/html
+ PATTERN .* EXCLUDE
+ )
+
++if(OCIO_BUILD_PDF_DOCS)
++
+ find_package(LATEX)
+ if(PDFLATEX_COMPILER)
+
+ add_custom_target(latex
+- COMMAND PYTHONPATH=${PYTHONPATH} ${EXTDIST_BINPATH}/sphinx-build -b latex . ${CMAKE_CURRENT_BINARY_DIR}/build-latex
++ COMMAND sphinx-build -b latex . ${CMAKE_CURRENT_BINARY_DIR}/build-latex
+ DEPENDS
+ OpenColorIO
+ ${CMAKE_BINARY_DIR}/docs/conf.py
+@@ -116,7 +114,6 @@
+ ${RSTDOC_OUTPUT}
+ COMMENT "Building latex doc"
+ SOURCES ${DOCFILES})
+- add_dependencies(latex Sphinx)
+
+ add_custom_target(pdf ALL
+ COMMAND ${PDFLATEX_COMPILER} OpenColorIO.tex
+@@ -126,6 +123,8 @@
+ add_dependencies(pdf latex)
+
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/build-latex/OpenColorIO.pdf
+- DESTINATION ${CMAKE_INSTALL_PREFIX}/share/doc/OpenColorIO/)
++ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/doc/$ENV{P}/)
+
+ endif()
++
++endif()
diff --git a/media-libs/opencolorio/files/opencolorio-1.0.8-remove-external-doc-utilities.patch b/media-libs/opencolorio/files/opencolorio-1.0.8-remove-external-doc-utilities.patch
new file mode 100644
index 000000000000..270e67acb31e
--- /dev/null
+++ b/media-libs/opencolorio/files/opencolorio-1.0.8-remove-external-doc-utilities.patch
@@ -0,0 +1,65 @@
+--- docs/CMakeLists.txt.orig 2013-01-22 08:58:12.426195213 +0400
++++ docs/CMakeLists.txt 2013-01-22 08:58:25.201194476 +0400
+@@ -1,62 +1,3 @@
+-
+-###############################################################################
+-### External Doc Apps ###
+-
+-# setuptools
+-set(SETUPTOOLS_VERSION 0.6c11)
+-ExternalProject_Add(setuptools
+- URL ${CMAKE_SOURCE_DIR}/ext/setuptools-${SETUPTOOLS_VERSION}.tar.gz
+- BUILD_IN_SOURCE 1
+- CONFIGURE_COMMAND ${CMAKE_COMMAND} -E make_directory ${EXTDIST_PYTHONPATH}
+- BUILD_COMMAND PYTHONPATH=${PYTHONPATH} python setup.py build
+- INSTALL_COMMAND PYTHONPATH=${PYTHONPATH} python setup.py install --prefix=${EXTDIST_ROOT}
+-)
+-
+-# docutils
+-set(DOCUTILS_VERSION 0.7)
+-ExternalProject_Add(docutils
+- DEPENDS setuptools
+- URL ${CMAKE_SOURCE_DIR}/ext/docutils-${DOCUTILS_VERSION}.tar.gz
+- BUILD_IN_SOURCE 1
+- CONFIGURE_COMMAND ${CMAKE_COMMAND} -E make_directory ${EXTDIST_PYTHONPATH}
+- BUILD_COMMAND PYTHONPATH=${PYTHONPATH} python setup.py build
+- INSTALL_COMMAND PYTHONPATH=${PYTHONPATH} python setup.py install --prefix=${EXTDIST_ROOT}
+-)
+-
+-# jinja2
+-set(JINJA2_VERSION 2.5.5)
+-ExternalProject_Add(Jinja2
+- DEPENDS setuptools
+- URL ${CMAKE_SOURCE_DIR}/ext/Jinja2-${JINJA2_VERSION}.tar.gz
+- BUILD_IN_SOURCE 1
+- CONFIGURE_COMMAND ${CMAKE_COMMAND} -E make_directory ${EXTDIST_PYTHONPATH}
+- BUILD_COMMAND PYTHONPATH=${PYTHONPATH} python setup.py build
+- INSTALL_COMMAND PYTHONPATH=${PYTHONPATH} python setup.py install --prefix=${EXTDIST_ROOT}
+-)
+-
+-# Pygments
+-set(PYGMENTS_VERSION 1.3.1)
+-ExternalProject_Add(Pygments
+- DEPENDS setuptools
+- URL ${CMAKE_SOURCE_DIR}/ext/Pygments-${PYGMENTS_VERSION}.tar.gz
+- BUILD_IN_SOURCE 1
+- CONFIGURE_COMMAND ${CMAKE_COMMAND} -E make_directory ${EXTDIST_PYTHONPATH}
+- BUILD_COMMAND PYTHONPATH=${PYTHONPATH} python setup.py build
+- INSTALL_COMMAND PYTHONPATH=${PYTHONPATH} python setup.py install --prefix=${EXTDIST_ROOT}
+-)
+-
+-# sphinx
+-set(SPHINX_VERSION f52b631f501a) # 1.1pre
+-ExternalProject_Add(Sphinx
+- DEPENDS setuptools docutils Jinja2 Pygments
+- URL ${CMAKE_SOURCE_DIR}/ext/sphinx-${SPHINX_VERSION}.tar.gz
+- PATCH_COMMAND patch -p1 < ${CMAKE_SOURCE_DIR}/ext/sphinx-${SPHINX_VERSION}.patch
+- BUILD_IN_SOURCE 1
+- CONFIGURE_COMMAND ${CMAKE_COMMAND} -E make_directory ${EXTDIST_PYTHONPATH}
+- BUILD_COMMAND PYTHONPATH=${PYTHONPATH} python setup.py build
+- INSTALL_COMMAND PYTHONPATH=${PYTHONPATH} python setup.py install --prefix=${EXTDIST_ROOT} --install-scripts=${EXTDIST_ROOT}/bin
+-)
+-
+ ###############################################################################
+ ### Create Doc Targets ###
+
diff --git a/media-libs/opencolorio/files/opencolorio-1.0.9-remove-external-doc-utilities.patch b/media-libs/opencolorio/files/opencolorio-1.0.9-remove-external-doc-utilities.patch
new file mode 100644
index 000000000000..921327d0f1a1
--- /dev/null
+++ b/media-libs/opencolorio/files/opencolorio-1.0.9-remove-external-doc-utilities.patch
@@ -0,0 +1,65 @@
+--- docs/CMakeLists.txt.orig 2013-09-24 13:13:47.572222731 +0400
++++ docs/CMakeLists.txt 2013-09-24 13:14:07.931224505 +0400
+@@ -1,62 +1,3 @@
+-
+-###############################################################################
+-### External Doc Apps ###
+-
+-# distribute
+-set(DISTRIBUTE_VERSION 0.6.36)
+-ExternalProject_Add(distribute
+- URL ${CMAKE_SOURCE_DIR}/ext/distribute-${DISTRIBUTE_VERSION}.tar.gz
+- BUILD_IN_SOURCE 1
+- CONFIGURE_COMMAND ${CMAKE_COMMAND} -E make_directory ${EXTDIST_PYTHONPATH}
+- BUILD_COMMAND PYTHONPATH=${PYTHONPATH} ${PYTHON} setup.py build
+- INSTALL_COMMAND PYTHONPATH=${PYTHONPATH} ${PYTHON} setup.py install --prefix=${EXTDIST_ROOT}
+-)
+-
+-# docutils
+-set(DOCUTILS_VERSION 0.10)
+-ExternalProject_Add(docutils
+- DEPENDS distribute
+- URL ${CMAKE_SOURCE_DIR}/ext/docutils-${DOCUTILS_VERSION}.tar.gz
+- BUILD_IN_SOURCE 1
+- CONFIGURE_COMMAND ${CMAKE_COMMAND} -E make_directory ${EXTDIST_PYTHONPATH}
+- BUILD_COMMAND PYTHONPATH=${PYTHONPATH} ${PYTHON} setup.py build
+- INSTALL_COMMAND PYTHONPATH=${PYTHONPATH} ${PYTHON} setup.py install --prefix=${EXTDIST_ROOT}
+-)
+-
+-# jinja2
+-set(JINJA2_VERSION 2.5.5)
+-ExternalProject_Add(Jinja2
+- DEPENDS distribute
+- URL ${CMAKE_SOURCE_DIR}/ext/Jinja2-${JINJA2_VERSION}.tar.gz
+- BUILD_IN_SOURCE 1
+- CONFIGURE_COMMAND ${CMAKE_COMMAND} -E make_directory ${EXTDIST_PYTHONPATH}
+- BUILD_COMMAND PYTHONPATH=${PYTHONPATH} ${PYTHON} setup.py build
+- INSTALL_COMMAND PYTHONPATH=${PYTHONPATH} ${PYTHON} setup.py install --prefix=${EXTDIST_ROOT}
+-)
+-
+-# Pygments
+-set(PYGMENTS_VERSION 1.3.1)
+-ExternalProject_Add(Pygments
+- DEPENDS distribute
+- URL ${CMAKE_SOURCE_DIR}/ext/Pygments-${PYGMENTS_VERSION}.tar.gz
+- BUILD_IN_SOURCE 1
+- CONFIGURE_COMMAND ${CMAKE_COMMAND} -E make_directory ${EXTDIST_PYTHONPATH}
+- BUILD_COMMAND PYTHONPATH=${PYTHONPATH} ${PYTHON} setup.py build
+- INSTALL_COMMAND PYTHONPATH=${PYTHONPATH} ${PYTHON} setup.py install --prefix=${EXTDIST_ROOT}
+-)
+-
+-# sphinx
+-set(SPHINX_VERSION 1.2b1)
+-ExternalProject_Add(Sphinx
+- DEPENDS distribute docutils Jinja2 Pygments
+- URL ${CMAKE_SOURCE_DIR}/ext/Sphinx-${SPHINX_VERSION}.tar.gz
+- PATCH_COMMAND patch -p1 < ${CMAKE_SOURCE_DIR}/ext/Sphinx-${SPHINX_VERSION}.patch
+- BUILD_IN_SOURCE 1
+- CONFIGURE_COMMAND ${CMAKE_COMMAND} -E make_directory ${EXTDIST_PYTHONPATH}
+- BUILD_COMMAND PYTHONPATH=${PYTHONPATH} ${PYTHON} setup.py build
+- INSTALL_COMMAND PYTHONPATH=${PYTHONPATH} ${PYTHON} setup.py install --prefix=${EXTDIST_ROOT} --install-scripts=${EXTDIST_ROOT}/bin
+-)
+-
+ ###############################################################################
+ ### Create Doc Targets ###
+
diff --git a/media-libs/opencolorio/metadata.xml b/media-libs/opencolorio/metadata.xml
new file mode 100644
index 000000000000..607c9d102e0e
--- /dev/null
+++ b/media-libs/opencolorio/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>graphics</herd>
+ <maintainer>
+ <email>pinkbyte@gentoo.org</email>
+ <name>Sergey Popov</name>
+ </maintainer>
+ <longdescription lang="en">OpenColorIO (OCIO) is a complete color management solution geared towards motion picture production with an emphasis on visual effects and computer animation.</longdescription>
+ <use>
+ <flag name="pdf">Install extra documentation in PDF format</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">imageworks/OpenColorIO</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/opencolorio/opencolorio-1.0.8.ebuild b/media-libs/opencolorio/opencolorio-1.0.8.ebuild
new file mode 100644
index 000000000000..078598809a5f
--- /dev/null
+++ b/media-libs/opencolorio/opencolorio-1.0.8.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils python-single-r1 vcs-snapshot
+
+DESCRIPTION="A color management framework for visual effects and animation"
+HOMEPAGE="http://opencolorio.org/"
+SRC_URI="https://github.com/imageworks/OpenColorIO/tarball/v${PV} \
+ -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="doc opengl pdf python cpu_flags_x86_sse2 test"
+
+RDEPEND="opengl? (
+ media-libs/lcms:2
+ >=media-libs/openimageio-1.1.0
+ media-libs/glew
+ media-libs/freeglut
+ virtual/opengl
+ )
+ python? ( ${PYTHON_DEPS} )
+ =dev-cpp/yaml-cpp-0.3*
+ dev-libs/tinyxml
+ "
+DEPEND="${RDEPEND}
+ doc? (
+ pdf? ( dev-python/sphinx[latex,${PYTHON_USEDEP}] )
+ !pdf? ( dev-python/sphinx[${PYTHON_USEDEP}] )
+ )
+ "
+
+# Documentation building requires Python bindings building
+REQUIRED_USE="doc? ( python )"
+
+# Restricting tests, bugs #439790 and #447908
+RESTRICT="test"
+
+PATCHES=(
+ "${FILESDIR}/${P}-documentation-gen.patch"
+ "${FILESDIR}/${P}-remove-external-doc-utilities.patch"
+)
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ use python && python_fix_shebang .
+}
+
+src_configure() {
+ # Missing features:
+ # - Truelight and Nuke are not in portage for now, so their support are disabled
+ # - Java bindings was not tested, so disabled
+ # Notes:
+ # - OpenImageIO is required for building ociodisplay and ocioconvert (USE opengl)
+ # - OpenGL, GLUT and GLEW is required for building ociodisplay (USE opengl)
+ local mycmakeargs=(
+ -DOCIO_BUILD_JNIGLUE=OFF
+ -DOCIO_BUILD_NUKE=OFF
+ -DOCIO_BUILD_SHARED=ON
+ -DOCIO_BUILD_STATIC=OFF
+ -DOCIO_STATIC_JNIGLUE=OFF
+ -DOCIO_BUILD_TRUELIGHT=OFF
+ -DUSE_EXTERNAL_LCMS=ON
+ -DUSE_EXTERNAL_TINYXML=ON
+ -DUSE_EXTERNAL_YAML=ON
+ $(cmake-utils_use doc OCIO_BUILD_DOCS)
+ $(cmake-utils_use opengl OCIO_BUILD_APPS)
+ $(cmake-utils_use pdf OCIO_BUILD_PDF_DOCS)
+ $(cmake-utils_use python OCIO_BUILD_PYGLUE)
+ $(cmake-utils_use cpu_flags_x86_sse2 OCIO_USE_SSE)
+ $(cmake-utils_use test OCIO_BUILD_TESTS)
+ )
+ cmake-utils_src_configure
+}
diff --git a/media-libs/opencolorio/opencolorio-1.0.9-r1.ebuild b/media-libs/opencolorio/opencolorio-1.0.9-r1.ebuild
new file mode 100644
index 000000000000..bec92c4ea9ec
--- /dev/null
+++ b/media-libs/opencolorio/opencolorio-1.0.9-r1.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# Compatibility with Python 3 is declared by upstream, but it is broken in fact, check on bump
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils python-single-r1 vcs-snapshot
+
+DESCRIPTION="A color management framework for visual effects and animation"
+HOMEPAGE="http://opencolorio.org/"
+SRC_URI="https://github.com/imageworks/OpenColorIO/archive/v${PV}.tar.gz \
+ -> ${P}.tar.gz
+ http://dev.gentoo.org/~pinkbyte/distfiles/patches/${P}-yaml-0.5-compat.patch.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="doc opengl pdf python cpu_flags_x86_sse2 test"
+
+RDEPEND="opengl? (
+ media-libs/lcms:2
+ >=media-libs/openimageio-1.1.0
+ media-libs/glew
+ media-libs/freeglut
+ virtual/opengl
+ )
+ python? ( ${PYTHON_DEPS} )
+ >=dev-cpp/yaml-cpp-0.5
+ dev-libs/tinyxml
+ "
+DEPEND="${RDEPEND}
+ doc? (
+ pdf? ( dev-python/sphinx[latex,${PYTHON_USEDEP}] )
+ !pdf? ( dev-python/sphinx[${PYTHON_USEDEP}] )
+ )
+ "
+
+# Documentation building requires Python bindings building
+REQUIRED_USE="doc? ( python )"
+
+# Restricting tests, bugs #439790 and #447908
+RESTRICT="test"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.0.8-documentation-gen.patch"
+ "${FILESDIR}/${P}-remove-external-doc-utilities.patch"
+ "${WORKDIR}/${P}-yaml-0.5-compat.patch"
+)
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ use python && python_fix_shebang .
+}
+
+src_configure() {
+ # Missing features:
+ # - Truelight and Nuke are not in portage for now, so their support are disabled
+ # - Java bindings was not tested, so disabled
+ # Notes:
+ # - OpenImageIO is required for building ociodisplay and ocioconvert (USE opengl)
+ # - OpenGL, GLUT and GLEW is required for building ociodisplay (USE opengl)
+ local mycmakeargs=(
+ -DOCIO_BUILD_JNIGLUE=OFF
+ -DOCIO_BUILD_NUKE=OFF
+ -DOCIO_BUILD_SHARED=ON
+ -DOCIO_BUILD_STATIC=OFF
+ -DOCIO_STATIC_JNIGLUE=OFF
+ -DOCIO_BUILD_TRUELIGHT=OFF
+ -DUSE_EXTERNAL_LCMS=ON
+ -DUSE_EXTERNAL_TINYXML=ON
+ -DUSE_EXTERNAL_YAML=ON
+ $(cmake-utils_use doc OCIO_BUILD_DOCS)
+ $(cmake-utils_use opengl OCIO_BUILD_APPS)
+ $(cmake-utils_use pdf OCIO_BUILD_PDF_DOCS)
+ $(cmake-utils_use python OCIO_BUILD_PYGLUE)
+ $(cmake-utils_use cpu_flags_x86_sse2 OCIO_USE_SSE)
+ $(cmake-utils_use test OCIO_BUILD_TESTS)
+ )
+ cmake-utils_src_configure
+}
diff --git a/media-libs/opencolorio/opencolorio-1.0.9.ebuild b/media-libs/opencolorio/opencolorio-1.0.9.ebuild
new file mode 100644
index 000000000000..9f96600ee9ba
--- /dev/null
+++ b/media-libs/opencolorio/opencolorio-1.0.9.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# Compatibility with Python 3 is declared by upstream, but it is broken in fact, check on bump
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils python-single-r1 vcs-snapshot
+
+DESCRIPTION="A color management framework for visual effects and animation"
+HOMEPAGE="http://opencolorio.org/"
+SRC_URI="https://github.com/imageworks/OpenColorIO/archive/v${PV}.tar.gz \
+ -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc opengl pdf python cpu_flags_x86_sse2 test"
+
+RDEPEND="opengl? (
+ media-libs/lcms:2
+ >=media-libs/openimageio-1.1.0
+ media-libs/glew
+ media-libs/freeglut
+ virtual/opengl
+ )
+ python? ( ${PYTHON_DEPS} )
+ =dev-cpp/yaml-cpp-0.3*
+ dev-libs/tinyxml
+ "
+DEPEND="${RDEPEND}
+ doc? (
+ pdf? ( dev-python/sphinx[latex,${PYTHON_USEDEP}] )
+ !pdf? ( dev-python/sphinx[${PYTHON_USEDEP}] )
+ )
+ "
+
+# Documentation building requires Python bindings building
+REQUIRED_USE="doc? ( python )"
+
+# Restricting tests, bugs #439790 and #447908
+RESTRICT="test"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.0.8-documentation-gen.patch"
+ "${FILESDIR}/${P}-remove-external-doc-utilities.patch"
+)
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ use python && python_fix_shebang .
+}
+
+src_configure() {
+ # Missing features:
+ # - Truelight and Nuke are not in portage for now, so their support are disabled
+ # - Java bindings was not tested, so disabled
+ # Notes:
+ # - OpenImageIO is required for building ociodisplay and ocioconvert (USE opengl)
+ # - OpenGL, GLUT and GLEW is required for building ociodisplay (USE opengl)
+ local mycmakeargs=(
+ -DOCIO_BUILD_JNIGLUE=OFF
+ -DOCIO_BUILD_NUKE=OFF
+ -DOCIO_BUILD_SHARED=ON
+ -DOCIO_BUILD_STATIC=OFF
+ -DOCIO_STATIC_JNIGLUE=OFF
+ -DOCIO_BUILD_TRUELIGHT=OFF
+ -DUSE_EXTERNAL_LCMS=ON
+ -DUSE_EXTERNAL_TINYXML=ON
+ -DUSE_EXTERNAL_YAML=ON
+ $(cmake-utils_use doc OCIO_BUILD_DOCS)
+ $(cmake-utils_use opengl OCIO_BUILD_APPS)
+ $(cmake-utils_use pdf OCIO_BUILD_PDF_DOCS)
+ $(cmake-utils_use python OCIO_BUILD_PYGLUE)
+ $(cmake-utils_use cpu_flags_x86_sse2 OCIO_USE_SSE)
+ $(cmake-utils_use test OCIO_BUILD_TESTS)
+ )
+ cmake-utils_src_configure
+}
diff --git a/media-libs/opencore-amr/Manifest b/media-libs/opencore-amr/Manifest
new file mode 100644
index 000000000000..1c7cb9f1d7e0
--- /dev/null
+++ b/media-libs/opencore-amr/Manifest
@@ -0,0 +1 @@
+DIST opencore-amr-0.1.3.tar.gz 881105 SHA256 106bf811c1f36444d7671d8fd2589f8b2e0cca58a2c764da62ffc4a070595385 SHA512 f67e84604fe3fbb87d608343e595503e2057272fa0b3bf9158a176e88a96d272c35149483c3ee47ba2b064bd6b17cdb315888a5285aa82edc0401f17d2ae761b WHIRLPOOL 483707fbed1ccf43df84c669f886c9e4ec8c611a8cb24e6d6798f5957f155760bb9beb8442b596301d6917b2f0eb9fdc22ae24a776e5270d38f481d5caee7960
diff --git a/media-libs/opencore-amr/metadata.xml b/media-libs/opencore-amr/metadata.xml
new file mode 100644
index 000000000000..e57f03bbfbeb
--- /dev/null
+++ b/media-libs/opencore-amr/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>sound</herd>
+ <upstream>
+ <remote-id type="sourceforge">opencore-amr</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/opencore-amr/opencore-amr-0.1.3-r1.ebuild b/media-libs/opencore-amr/opencore-amr-0.1.3-r1.ebuild
new file mode 100644
index 000000000000..50735ec068cc
--- /dev/null
+++ b/media-libs/opencore-amr/opencore-amr-0.1.3-r1.ebuild
@@ -0,0 +1,17 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+AUTOTOOLS_PRUNE_LIBTOOL_FILES=all
+inherit autotools-multilib
+
+DESCRIPTION="Implementation of Adaptive Multi Rate Narrowband and Wideband speech codec"
+HOMEPAGE="http://opencore-amr.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="static-libs"
+DOCS=( AUTHORS ChangeLog README )
diff --git a/media-libs/openctm/Manifest b/media-libs/openctm/Manifest
new file mode 100644
index 000000000000..e0c97e491891
--- /dev/null
+++ b/media-libs/openctm/Manifest
@@ -0,0 +1 @@
+DIST openctm_1.0.3+dfsg1.orig.tar.bz2 179792 SHA256 b72bae806d65dcb4d55b88f17bb636c9908717871cbebff6c32024399f50a074 SHA512 4ea8c9230e01b57fce4d741df77713df8fb0493fbb20c8d4b183e3e8cec16f97e8003d2569b1c7cac07a17d334711673c0fed0c6c050bbdb901028ee9f6c32f6 WHIRLPOOL 954ce30a418fba80649cd2f0eae604391c42a64e627a9d66171097da6fee55fba94229054350dc18cd311cc7d7fb0e1b5a6f9d7db0dce5d91451821df33da5f7
diff --git a/media-libs/openctm/files/openctm-fix-makefiles.patch b/media-libs/openctm/files/openctm-fix-makefiles.patch
new file mode 100644
index 000000000000..540b3cfa84fc
--- /dev/null
+++ b/media-libs/openctm/files/openctm-fix-makefiles.patch
@@ -0,0 +1,191 @@
+ Makefile.linux | 18 ++++++++-------
+ lib/Makefile.linux | 23 ++++++++++++-------
+ tools/Makefile.linux | 64 ++++++++++++++++++++--------------------------------
+ 3 files changed, 50 insertions(+), 55 deletions(-)
+
+diff --git a/Makefile.linux b/Makefile.linux
+index 24ca137..51fc88c 100644
+--- a/Makefile.linux
++++ b/Makefile.linux
+@@ -47,19 +47,21 @@ documentation:
+
+
+ # Installation settings
+-LIBDIR = /usr/lib/
+-INCDIR = /usr/local/include/
+-BINDIR = /usr/local/bin/
+-MAN1DIR = /usr/local/share/man/man1/
+-CP = cp
++LIBDIR = $(DESTDIR)/usr/@GENTOO_LIBDIR@/$(DEB_HOST_MULTIARCH)
++INCDIR = $(DESTDIR)/usr/include/
++BINDIR = $(DESTDIR)/usr/bin/
++MAN1DIR = $(DESTDIR)/usr/share/man/man1/
++CP = cp -P
+ MKDIR = mkdir -p
+
+-install:
+- $(CP) lib/libopenctm.so $(LIBDIR)
++$(LIBDIR) $(INCDIR) $(BINDIR) $(MAN1DIR):
++ mkdir -p "$@"
++
++install: $(LIBDIR) $(INCDIR) $(BINDIR) $(MAN1DIR)
++ $(CP) lib/libopenctm.so* $(LIBDIR)
+ $(CP) lib/openctm.h $(INCDIR)
+ $(CP) lib/openctmpp.h $(INCDIR)
+ $(CP) tools/ctmconv $(BINDIR)
+ $(CP) tools/ctmviewer $(BINDIR)
+- $(MKDIR) $(MAN1DIR)
+ $(CP) doc/ctmconv.1 $(MAN1DIR)
+ $(CP) doc/ctmviewer.1 $(MAN1DIR)
+diff --git a/lib/Makefile.linux b/lib/Makefile.linux
+index 7643127..1e622ec 100644
+--- a/lib/Makefile.linux
++++ b/lib/Makefile.linux
+@@ -27,13 +27,18 @@
+ ###############################################################################
+
+ LZMADIR = liblzma
+-CC = gcc
+-CFLAGS = -O3 -W -Wall -c -fPIC -DOPENCTM_BUILD -I$(LZMADIR) -DLZMA_PREFIX_CTM -std=c99 -pedantic
+-CFLAGS_LZMA = -O3 -W -Wall -c -fPIC -DLZMA_PREFIX_CTM -std=c99 -pedantic
++CC ?= gcc
++CFLAGS += -W -Wall -c -fPIC -std=c99 -pedantic
++INCDEF = -DOPENCTM_BUILD -I$(LZMADIR) -DLZMA_PREFIX_CTM
++INCDEF_LZMA = -DLZMA_PREFIX_CTM
+ RM = rm -f
+ DEPEND = $(CPP) -MM
+
+-DYNAMICLIB = libopenctm.so
++VERSION = 1.0.3
++SOVERSION = 1
++LIBNAME = libopenctm.so
++SONAME = $(LIBNAME).$(SOVERSION)
++DYNAMICLIB = $(LIBNAME).$(VERSION)
+
+ OBJS = openctm.o \
+ stream.o \
+@@ -64,16 +69,18 @@ LZMA_SRCS = $(LZMADIR)/Alloc.c \
+ all: $(DYNAMICLIB)
+
+ clean:
+- $(RM) $(DYNAMICLIB) $(OBJS) $(LZMA_OBJS)
++ $(RM) $(DYNAMICLIB) $(SONAME) $(LIBNAME) $(OBJS) $(LZMA_OBJS)
+
+ $(DYNAMICLIB): $(OBJS) $(LZMA_OBJS)
+- gcc -shared -s -Wl,-soname,$@ -o $@ $(OBJS) $(LZMA_OBJS) -lm
++ $(CC) $(LDFLAGS) -shared -s -Wl,-soname,$(SONAME) -o $@ $(OBJS) $(LZMA_OBJS) -lm
++ ln -s $(DYNAMICLIB) $(SONAME)
++ ln -s $(DYNAMICLIB) $(LIBNAME)
+
+ %.o: %.c
+- $(CC) $(CFLAGS) $<
++ $(CC) $(CPPFLAGS) $(CFLAGS) $(INCDEF) $<
+
+ %.o: $(LZMADIR)/%.c
+- $(CC) $(CFLAGS_LZMA) $<
++ $(CC) $(CPPFLAGS) $(CFLAGS) $(INCDEF_LZMA) $<
+
+ depend:
+ $(DEPEND) $(SRCS) $(LZMA_SRCS) > make.depend
+diff --git a/tools/Makefile.linux b/tools/Makefile.linux
+index fa3e6e5..46276d1 100644
+--- a/tools/Makefile.linux
++++ b/tools/Makefile.linux
+@@ -26,49 +26,50 @@
+ ###############################################################################
+
+ OPENCTMDIR = ../lib
+-GLEWDIR = glew
+-JPEGDIR = jpeg
++# Use system libs if possible
++#GLEWDIR = glew
++GLEWDIR = /usr/include/GL
++#JPEGDIR = jpeg
+ RPLYDIR = rply
+-TINYXMLDIR = tinyxml
+-ZLIBDIR = zlib
+-PNGLITEDIR = pnglite
++# rply in libvxl1-dev is version 1.1, we need v. 1.01
++#RPLYDIR = /usr/include/vxl/rply
++#TINYXMLDIR = tinyxml
++#ZLIBDIR = zlib
++#PNGLITEDIR = pnglite
+
+-CPP = g++
+-CPPFLAGS = -c -O3 -W -Wall `pkg-config --cflags gtk+-2.0` -I$(OPENCTMDIR) -I$(RPLYDIR) -I$(JPEGDIR) -I$(TINYXMLDIR) -I$(GLEWDIR) -I$(ZLIBDIR) -I$(PNGLITEDIR)
++CXX ?= g++
++CC ?= gcc
++CXXFLAGS += -W -Wall `pkg-config --cflags gtk+-2.0` -I$(OPENCTMDIR) -I$(RPLYDIR) -I$(GLEWDIR)
+
+ MESHOBJS = mesh.o meshio.o ctm.o ply.o rply.o stl.o 3ds.o dae.o obj.o lwo.o off.o wrl.o
+ CTMCONVOBJS = ctmconv.o common.o systimer.o convoptions.o $(MESHOBJS)
+-CTMVIEWEROBJS = ctmviewer.o common.o image.o systimer.o sysdialog_gtk.o convoptions.o glew.o pnglite.o $(MESHOBJS)
++CTMVIEWEROBJS = ctmviewer.o common.o image.o systimer.o sysdialog_gtk.o convoptions.o $(MESHOBJS)
+ CTMBENCHOBJS = ctmbench.o systimer.o
+
+ all: ctmconv ctmviewer ctmbench
+
+ clean:
+ rm -f ctmconv ctmviewer ctmbench $(CTMCONVOBJS) $(CTMVIEWEROBJS) $(CTMBENCHOBJS) bin2c phong_frag.h phong_vert.h
+- cd $(JPEGDIR) && $(MAKE) -f makefile.linux clean
+- cd $(TINYXMLDIR) && $(MAKE) -f Makefile.linux clean
+- cd $(ZLIBDIR) && $(MAKE) -f Makefile.linux clean
+
+-libopenctm.so: $(OPENCTMDIR)/libopenctm.so
+- cp $< $@
++ctmconv: $(CTMCONVOBJS)
++ $(CXX) $(LDFLAGS) -s -o $@ -L$(OPENCTMDIR) $(CTMCONVOBJS) -lopenctm -ltinyxml
+
+-ctmconv: $(CTMCONVOBJS) $(TINYXMLDIR)/libtinyxml.a libopenctm.so
+- $(CPP) -s -o $@ -L$(OPENCTMDIR) -L$(TINYXMLDIR) $(CTMCONVOBJS) -Wl,-rpath,. -lopenctm -ltinyxml
++ctmviewer: $(CTMVIEWEROBJS)
++ $(CXX) $(LDFLAGS) -s -o $@ -L$(OPENCTMDIR) $(CTMVIEWEROBJS) -lopenctm \
++ -ltinyxml -ljpeg -lpnglite -lz -lGL -lglut -lGLU -lGLEW \
++ -lgtk-x11-2.0 -lgobject-2.0 -lglib-2.0
+
+-ctmviewer: $(CTMVIEWEROBJS) $(JPEGDIR)/libjpeg.a $(TINYXMLDIR)/libtinyxml.a $(ZLIBDIR)/libz.a libopenctm.so
+- $(CPP) -s -o $@ -L$(OPENCTMDIR) -L$(TINYXMLDIR) -L$(JPEGDIR) -L$(ZLIBDIR) $(CTMVIEWEROBJS) -Wl,-rpath,. -lopenctm -ltinyxml -ljpeg -lz -lglut `pkg-config --libs gtk+-2.0`
+-
+-ctmbench: $(CTMBENCHOBJS) libopenctm.so
+- $(CPP) -s -o $@ -L$(OPENCTMDIR) $(CTMBENCHOBJS) -Wl,-rpath,. -lopenctm
++ctmbench: $(CTMBENCHOBJS)
++ $(CXX) $(LDFLAGS) -s -o $@ -L$(OPENCTMDIR) $(CTMBENCHOBJS) -lopenctm
+
+ %.o: %.cpp
+- $(CPP) $(CPPFLAGS) -o $@ $<
++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
+
+ ctmconv.o: ctmconv.cpp systimer.h convoptions.h mesh.h meshio.h
+ ctmviewer.o: ctmviewer.cpp common.h image.h systimer.h sysdialog.h mesh.h meshio.h phong_vert.h phong_frag.h icons/icon_open.h icons/icon_save.h icons/icon_help.h
+ ctmbench.o: ctmbench.cpp systimer.h
+ common.o: common.cpp common.h
+-image.o: image.cpp image.h common.h $(JPEGDIR)/libjpeg.a
++image.o: image.cpp image.h common.h
+ systimer.o: systimer.cpp systimer.h
+ sysdialog_gtk.o: sysdialog_gtk.cpp sysdialog.h
+ convoptions.o: convoptions.cpp convoptions.h
+@@ -91,22 +92,7 @@ phong_frag.h: phong.frag bin2c
+ ./bin2c phong.frag phongFragSrc > $@
+
+ bin2c: bin2c.cpp
+- $(CPP) -Os -W -Wall -o $@ $<
+-
+-$(JPEGDIR)/libjpeg.a:
+- cd $(JPEGDIR) && $(MAKE) -f makefile.linux libjpeg.a
+-
+-$(ZLIBDIR)/libz.a:
+- cd $(ZLIBDIR) && $(MAKE) -f Makefile.linux
+-
+-glew.o: $(GLEWDIR)/glew.c
+- gcc -c -Os -W -I$(GLEWDIR) -o $@ $<
++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -Os -W -Wall -o $@ $<
+
+ rply.o: $(RPLYDIR)/rply.c
+- gcc -c -O2 -W -I$(RPLYDIR) -o $@ $<
+-
+-pnglite.o: $(PNGLITEDIR)/pnglite.c
+- gcc -c -O2 -W -I$(PNGLITEDIR) -o $@ $<
+-
+-$(TINYXMLDIR)/libtinyxml.a:
+- cd $(TINYXMLDIR) && $(MAKE) -f Makefile.linux
++ $(CC) $(CPPFLAGS) $(CFLAGS) -c -O2 -W -I$(RPLYDIR) -o $@ $<
diff --git a/media-libs/openctm/files/openctm-no-strip.patch b/media-libs/openctm/files/openctm-no-strip.patch
new file mode 100644
index 000000000000..5e31d4017b68
--- /dev/null
+++ b/media-libs/openctm/files/openctm-no-strip.patch
@@ -0,0 +1,34 @@
+diff -urN OpenCTM-1.0.3.old/lib/Makefile.linux OpenCTM-1.0.3/lib/Makefile.linux
+--- OpenCTM-1.0.3.old/lib/Makefile.linux 2014-08-20 09:39:00.614744990 +0200
++++ OpenCTM-1.0.3/lib/Makefile.linux 2014-08-20 09:40:09.782667989 +0200
+@@ -72,7 +72,7 @@
+ $(RM) $(DYNAMICLIB) $(SONAME) $(LIBNAME) $(OBJS) $(LZMA_OBJS)
+
+ $(DYNAMICLIB): $(OBJS) $(LZMA_OBJS)
+- $(CC) $(LDFLAGS) -shared -s -Wl,-soname,$(SONAME) -o $@ $(OBJS) $(LZMA_OBJS) -lm
++ $(CC) $(LDFLAGS) -shared -Wl,-soname,$(SONAME) -o $@ $(OBJS) $(LZMA_OBJS) -lm
+ ln -s $(DYNAMICLIB) $(SONAME)
+ ln -s $(DYNAMICLIB) $(LIBNAME)
+
+diff -urN OpenCTM-1.0.3.old/tools/Makefile.linux OpenCTM-1.0.3/tools/Makefile.linux
+--- OpenCTM-1.0.3.old/tools/Makefile.linux 2014-08-20 09:39:00.583745025 +0200
++++ OpenCTM-1.0.3/tools/Makefile.linux 2014-08-20 09:40:09.751668023 +0200
+@@ -52,15 +52,15 @@
+ rm -f ctmconv ctmviewer ctmbench $(CTMCONVOBJS) $(CTMVIEWEROBJS) $(CTMBENCHOBJS) bin2c phong_frag.h phong_vert.h
+
+ ctmconv: $(CTMCONVOBJS)
+- $(CXX) $(LDFLAGS) -s -o $@ -L$(OPENCTMDIR) $(CTMCONVOBJS) -lopenctm -ltinyxml
++ $(CXX) $(LDFLAGS) -o $@ -L$(OPENCTMDIR) $(CTMCONVOBJS) -lopenctm -ltinyxml
+
+ ctmviewer: $(CTMVIEWEROBJS)
+- $(CXX) $(LDFLAGS) -s -o $@ -L$(OPENCTMDIR) $(CTMVIEWEROBJS) -lopenctm \
++ $(CXX) $(LDFLAGS) -o $@ -L$(OPENCTMDIR) $(CTMVIEWEROBJS) -lopenctm \
+ -ltinyxml -ljpeg -lpnglite -lz -lGL -lglut -lGLU -lGLEW \
+ -lgtk-x11-2.0 -lgobject-2.0 -lglib-2.0
+
+ ctmbench: $(CTMBENCHOBJS)
+- $(CXX) $(LDFLAGS) -s -o $@ -L$(OPENCTMDIR) $(CTMBENCHOBJS) -lopenctm
++ $(CXX) $(LDFLAGS) -o $@ -L$(OPENCTMDIR) $(CTMBENCHOBJS) -lopenctm
+
+ %.o: %.cpp
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
diff --git a/media-libs/openctm/metadata.xml b/media-libs/openctm/metadata.xml
new file mode 100644
index 000000000000..83ffb735678c
--- /dev/null
+++ b/media-libs/openctm/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>3dprint</herd>
+ <maintainer>
+ <email>amynka@gentoo.org</email>
+ </maintainer>
+ <longdescription>
+ OpenCTM - the Open Compressed Triangle Mesh file format - is a file format, a software library and a tool set for compression of 3D triangle meshes.
+</longdescription>
+</pkgmetadata>
diff --git a/media-libs/openctm/openctm-1.0.3.ebuild b/media-libs/openctm/openctm-1.0.3.ebuild
new file mode 100644
index 000000000000..fa2745ca01f0
--- /dev/null
+++ b/media-libs/openctm/openctm-1.0.3.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib versionator flag-o-matic
+
+MY_PV=OpenCTM-${PV}
+
+DESCRIPTION="OpenCTM - the Open Compressed Triangle Mesh."
+HOMEPAGE="http://openctm.sourceforge.net"
+SRC_URI="mirror://debian/pool/main/o/${PN}/${PN}_${PV}+dfsg1.orig.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-libs/tinyxml
+ media-libs/freeglut
+ media-libs/glew
+ media-libs/pnglite
+ virtual/opengl
+ x11-libs/gtk+:2"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_PV}"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/openctm-fix-makefiles.patch \
+ "${FILESDIR}"/openctm-no-strip.patch
+ mv Makefile.linux Makefile || die
+ sed \
+ -e "s:@GENTOO_LIBDIR@:$(get_libdir):g" \
+ -i Makefile || die
+}
+
+src_compile() {
+ emake CC=$(tc-getCC) CXX=$(tc-getCXX)
+}
diff --git a/media-libs/opencv/Manifest b/media-libs/opencv/Manifest
new file mode 100644
index 000000000000..c6dfcf380843
--- /dev/null
+++ b/media-libs/opencv/Manifest
@@ -0,0 +1,3 @@
+DIST opencv-2.4.10.zip 91692581 SHA256 1bf4cb87283797fd91669d4f90b622a677a903c20b4a577b7958a2164f7596c6 SHA512 545345f2984bda9ec5e5f0947077c5f40028ea018cbb21362f33615e5a02d5ed19a51c77a9b183086534e6496509dd008f9d7d40c2efc46bf2a942c710b4424c WHIRLPOOL 3231c1f6b766b39a44b10354532037f5f9f856bd1533c205cc39a1a3758aa53dd4d15595127fd6d1c1d2b6b7bdafe64521ca833c036a5075de4b298218d4bf0c
+DIST opencv-2.4.9.zip 91684751 SHA256 803010848154988e9cbda8b3fa857fcbb27382c2946ed729e1a7e40600bb4c71 SHA512 8eb6ee11d8260428ae461e06348ce037979efc29b7e33d59c3d348a6b4bae95b7004df4527aba7c634e7356f7b5635c98493dc15a0b43479e8f10f7258540c62 WHIRLPOOL 5bb5e39678b3072b2e8b923216529c84982559dd69d5ec51b8703e65af3401f3a8ff31e4e3bfc076480d0605e333df0b03a61713a927ec058bfaf25b4fa8fd5e
+DIST opencv-3.0.0.zip 100980799 SHA256 07094ea2f996f2622d572f0f3a162d698c8a547520341ca9109fbaf9363fb001 SHA512 108d0fdcc60b5688ebf61c930fb965ec81f0d3c36bb1797f6cc571fac35331f540773207fd1cb81b12c05c8f4d1af20c4a2452d9f75cd0cae4acd8131be92375 WHIRLPOOL 61cbbf5201b1dea75ffa998d1f55ee35f098bb8f76591cc9705de13b9f05eaefd19dcc74e93d2643d9b721e62483a36547617ec2e3d14fa6a2522e18ccf06747
diff --git a/media-libs/opencv/files/opencv-2.3.1a-libav-0.7.patch b/media-libs/opencv/files/opencv-2.3.1a-libav-0.7.patch
new file mode 100644
index 000000000000..59090703d149
--- /dev/null
+++ b/media-libs/opencv/files/opencv-2.3.1a-libav-0.7.patch
@@ -0,0 +1,10 @@
+--- OpenCV-2.3.1.orig/modules/highgui/src/cap_ffmpeg_impl.hpp 2011-11-14 05:33:37.000000000 +0100
++++ OpenCV-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp 2011-11-14 05:33:18.000000000 +0100
+@@ -104,6 +104,7 @@
+ #endif
+ #if defined(HAVE_LIBAVCODEC_AVCODEC_H)
+ #include <libavcodec/avcodec.h>
++ #include <libavutil/mathematics.h>
+ #endif
+ #if defined(HAVE_LIBSWSCALE_SWSCALE_H)
+ #include <libswscale/swscale.h>
diff --git a/media-libs/opencv/files/opencv-2.4.10-pic-x86.patch b/media-libs/opencv/files/opencv-2.4.10-pic-x86.patch
new file mode 100644
index 000000000000..74b75016183b
--- /dev/null
+++ b/media-libs/opencv/files/opencv-2.4.10-pic-x86.patch
@@ -0,0 +1,49 @@
+From ea50be0529c248961e1b66293f8a9e4b807294a6 Mon Sep 17 00:00:00 2001
+From: Samuel Martin <s.martin49@gmail.com>
+Date: Sun, 12 Oct 2014 10:17:23 +0200
+Subject: [PATCH] core: fix x86 PIC code compilation
+
+This bug was triggered by Buildroot autobuilders [1,2], causing this
+kind of failures [3,4]:
+
+ [ 14%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/system.cpp.o
+ /home/test/autobuild/instance-0/output/build/opencv-2.4.10/modules/core/src/system.cpp: In function '(static initializers for /home/test/autobuild/instance-0/output/build/opencv-2.4.10/modules/core/src/system.cpp)':
+ /home/test/autobuild/instance-0/output/build/opencv-2.4.10/modules/core/src/system.cpp:280:10: error: inconsistent operand constraints in an 'asm'
+ make[3]: *** [modules/core/CMakeFiles/opencv_core.dir/src/system.cpp.o] Error 1
+
+[1] http://buildroot.org/
+[2] http://autobuild.buildroot.org/
+[3] http://autobuild.buildroot.org/?reason=opencv-2.4.10
+[4] http://autobuild.buildroot.org/results/483/4838285b25d6293a5cf0bb9eadd5040a7c75d766/build-end.log
+
+Signed-off-by: Samuel Martin <s.martin49@gmail.com>
+---
+ modules/core/src/system.cpp | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/modules/core/src/system.cpp b/modules/core/src/system.cpp
+index 5a970d5..e9ffdc7 100644
+--- a/modules/core/src/system.cpp
++++ b/modules/core/src/system.cpp
+@@ -267,14 +267,17 @@ struct HWFeatures
+ : "cc"
+ );
+ #else
++ // We need to preserve ebx since we are compiling PIC code.
++ // This means we cannot use "=b" for the 2nd output register.
+ asm volatile
+ (
+ "pushl %%ebx\n\t"
+ "movl $7,%%eax\n\t"
+ "movl $0,%%ecx\n\t"
+ "cpuid\n\t"
++ "movl %%ebx,%1\n\t"
+ "popl %%ebx\n\t"
+- : "=a"(cpuid_data[0]), "=b"(cpuid_data[1]), "=c"(cpuid_data[2]), "=d"(cpuid_data[3])
++ : "=a"(cpuid_data[0]), "=r"(cpuid_data[1]), "=c"(cpuid_data[2]), "=d"(cpuid_data[3])
+ :
+ : "cc"
+ );
+--
+2.4.1
+
diff --git a/media-libs/opencv/files/opencv-2.4.2-cflags.patch b/media-libs/opencv/files/opencv-2.4.2-cflags.patch
new file mode 100644
index 000000000000..d52e6b6a39f4
--- /dev/null
+++ b/media-libs/opencv/files/opencv-2.4.2-cflags.patch
@@ -0,0 +1,21 @@
+diff -ruN OpenCV-2.4.2.orig/cmake/OpenCVCompilerOptions.cmake OpenCV-2.4.2/cmake/OpenCVCompilerOptions.cmake
+--- OpenCV-2.4.2.orig/cmake/OpenCVCompilerOptions.cmake 2012-06-29 00:55:15.000000000 +0200
++++ OpenCV-2.4.2/cmake/OpenCVCompilerOptions.cmake 2012-07-16 23:51:24.244907235 +0200
+@@ -110,17 +110,6 @@
+ endif()
+
+ # Other optimizations
+- if(ENABLE_OMIT_FRAME_POINTER)
+- add_extra_compiler_option(-fomit-frame-pointer)
+- else()
+- add_extra_compiler_option(-fno-omit-frame-pointer)
+- endif()
+- if(ENABLE_FAST_MATH)
+- add_extra_compiler_option(-ffast-math)
+- endif()
+- if(ENABLE_POWERPC)
+- add_extra_compiler_option("-mcpu=G3 -mtune=G5")
+- endif()
+ if(ENABLE_SSE)
+ add_extra_compiler_option(-msse)
+ endif()
diff --git a/media-libs/opencv/files/opencv-2.4.3-gcc47.patch b/media-libs/opencv/files/opencv-2.4.3-gcc47.patch
new file mode 100644
index 000000000000..13ac8f8fb58f
--- /dev/null
+++ b/media-libs/opencv/files/opencv-2.4.3-gcc47.patch
@@ -0,0 +1,22 @@
+diff -ruN OpenCV-2.4.3.orig/modules/highgui/src/grfmt_tiff.cpp OpenCV-2.4.3/modules/highgui/src/grfmt_tiff.cpp
+--- OpenCV-2.4.3.orig/modules/highgui/src/grfmt_tiff.cpp 2012-10-12 00:55:12.000000000 +0200
++++ OpenCV-2.4.3/modules/highgui/src/grfmt_tiff.cpp 2012-11-05 21:37:40.000000000 +0100
+@@ -47,6 +47,7 @@
+
+ #include "precomp.hpp"
+ #include "grfmt_tiff.hpp"
++#include "unistd.h"
+
+ namespace cv
+ {
+diff -ruN OpenCV-2.4.3.orig/modules/highgui/src/window_QT.h OpenCV-2.4.3/modules/highgui/src/window_QT.h
+--- OpenCV-2.4.3.orig/modules/highgui/src/window_QT.h 2012-10-18 00:55:38.000000000 +0200
++++ OpenCV-2.4.3/modules/highgui/src/window_QT.h 2012-11-05 21:38:41.000000000 +0100
+@@ -41,6 +41,7 @@
+ #define __OPENCV_HIGHGUI_QT_H__
+
+ #include "precomp.hpp"
++#include "unistd.h"
+
+ #if defined( HAVE_QT_OPENGL )
+ #include <QtOpenGL>
diff --git a/media-libs/opencv/files/opencv-2.4.8-javamagic.patch b/media-libs/opencv/files/opencv-2.4.8-javamagic.patch
new file mode 100644
index 000000000000..766abc1e0941
--- /dev/null
+++ b/media-libs/opencv/files/opencv-2.4.8-javamagic.patch
@@ -0,0 +1,32 @@
+diff -ruN opencv-2.4.8.orig/CMakeLists.txt opencv-2.4.8/CMakeLists.txt
+--- opencv-2.4.8.orig/CMakeLists.txt 2013-12-27 18:09:18.000000000 +0100
++++ opencv-2.4.8/CMakeLists.txt 2014-01-24 22:06:12.000000000 +0100
+@@ -164,6 +164,7 @@
+ OCV_OPTION(WITH_OPENCLAMDFFT "Include AMD OpenCL FFT library support" ON IF (NOT ANDROID AND NOT IOS) )
+ OCV_OPTION(WITH_OPENCLAMDBLAS "Include AMD OpenCL BLAS library support" ON IF (NOT ANDROID AND NOT IOS) )
+ OCV_OPTION(WITH_INTELPERC "Include Intel Perceptual Computing support" OFF IF WIN32 )
++OCV_OPTION(WITH_JAVA "Include Java support" ON)
+
+ # OpenCV build components
+ # ===================================================
+@@ -449,6 +450,8 @@
+ include(cmake/OpenCVDetectPython.cmake)
+
+ # --- Java Support ---
++if(WITH_JAVA)
++
+ include(cmake/OpenCVDetectApacheAnt.cmake)
+ if(ANDROID)
+ include(cmake/OpenCVDetectAndroidSDK.cmake)
+@@ -466,6 +469,11 @@
+ SET(CAN_BUILD_ANDROID_PROJECTS FALSE)
+ endif()
+
++else()
++ SET(ANT_EXECUTABLE "")
++ SET(CAN_BUILD_ANDROID_PROJECTS FALSE)
++endif()
++
+ # --- OpenCL ---
+ if(WITH_OPENCL)
+ include(cmake/OpenCVDetectOpenCL.cmake)
diff --git a/media-libs/opencv/files/opencv-2.4.9-cuda-pkg-config.patch b/media-libs/opencv/files/opencv-2.4.9-cuda-pkg-config.patch
new file mode 100644
index 000000000000..d7ff3c7eaf67
--- /dev/null
+++ b/media-libs/opencv/files/opencv-2.4.9-cuda-pkg-config.patch
@@ -0,0 +1,12 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -528,6 +528,9 @@
+ if(HAVE_CUFFT)
+ set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} ${CUDA_cufft_LIBRARY})
+ endif()
++ foreach(p ${CUDA_LIBS_PATH})
++ set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} -L${p})
++ endforeach()
+ endif()
+
+ # ----------------------------------------------------------------------------
diff --git a/media-libs/opencv/files/opencv-2.4.9-cuda.patch b/media-libs/opencv/files/opencv-2.4.9-cuda.patch
new file mode 100644
index 000000000000..2cb84160022b
--- /dev/null
+++ b/media-libs/opencv/files/opencv-2.4.9-cuda.patch
@@ -0,0 +1,89 @@
+commit feb74b125d7923c0bc11054b66863e1e9f753141
+Author: Alexander Smorkalov <alexander.smorkalov@itseez.com>
+Date: Mon Jul 14 14:26:50 2014 +0400
+
+ Build fixes for CUDA 6.5
+ (cherry picked from commit 60a5ada4541e777bd2ad3fe0322180706351e58b)
+
+diff --git a/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp b/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp
+index c1e06b4..1c95414 100644
+--- a/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp
++++ b/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp
+@@ -48,24 +48,24 @@
+ #include "NCV.hpp"
+
+ template<typename TBase> inline __host__ __device__ TBase _pixMaxVal();
+-template<> static inline __host__ __device__ Ncv8u _pixMaxVal<Ncv8u>() {return UCHAR_MAX;}
+-template<> static inline __host__ __device__ Ncv16u _pixMaxVal<Ncv16u>() {return USHRT_MAX;}
+-template<> static inline __host__ __device__ Ncv32u _pixMaxVal<Ncv32u>() {return UINT_MAX;}
+-template<> static inline __host__ __device__ Ncv8s _pixMaxVal<Ncv8s>() {return SCHAR_MAX;}
+-template<> static inline __host__ __device__ Ncv16s _pixMaxVal<Ncv16s>() {return SHRT_MAX;}
+-template<> static inline __host__ __device__ Ncv32s _pixMaxVal<Ncv32s>() {return INT_MAX;}
+-template<> static inline __host__ __device__ Ncv32f _pixMaxVal<Ncv32f>() {return FLT_MAX;}
+-template<> static inline __host__ __device__ Ncv64f _pixMaxVal<Ncv64f>() {return DBL_MAX;}
++template<> inline __host__ __device__ Ncv8u _pixMaxVal<Ncv8u>() {return UCHAR_MAX;}
++template<> inline __host__ __device__ Ncv16u _pixMaxVal<Ncv16u>() {return USHRT_MAX;}
++template<> inline __host__ __device__ Ncv32u _pixMaxVal<Ncv32u>() {return UINT_MAX;}
++template<> inline __host__ __device__ Ncv8s _pixMaxVal<Ncv8s>() {return SCHAR_MAX;}
++template<> inline __host__ __device__ Ncv16s _pixMaxVal<Ncv16s>() {return SHRT_MAX;}
++template<> inline __host__ __device__ Ncv32s _pixMaxVal<Ncv32s>() {return INT_MAX;}
++template<> inline __host__ __device__ Ncv32f _pixMaxVal<Ncv32f>() {return FLT_MAX;}
++template<> inline __host__ __device__ Ncv64f _pixMaxVal<Ncv64f>() {return DBL_MAX;}
+
+ template<typename TBase> inline __host__ __device__ TBase _pixMinVal();
+-template<> static inline __host__ __device__ Ncv8u _pixMinVal<Ncv8u>() {return 0;}
+-template<> static inline __host__ __device__ Ncv16u _pixMinVal<Ncv16u>() {return 0;}
+-template<> static inline __host__ __device__ Ncv32u _pixMinVal<Ncv32u>() {return 0;}
+-template<> static inline __host__ __device__ Ncv8s _pixMinVal<Ncv8s>() {return SCHAR_MIN;}
+-template<> static inline __host__ __device__ Ncv16s _pixMinVal<Ncv16s>() {return SHRT_MIN;}
+-template<> static inline __host__ __device__ Ncv32s _pixMinVal<Ncv32s>() {return INT_MIN;}
+-template<> static inline __host__ __device__ Ncv32f _pixMinVal<Ncv32f>() {return FLT_MIN;}
+-template<> static inline __host__ __device__ Ncv64f _pixMinVal<Ncv64f>() {return DBL_MIN;}
++template<> inline __host__ __device__ Ncv8u _pixMinVal<Ncv8u>() {return 0;}
++template<> inline __host__ __device__ Ncv16u _pixMinVal<Ncv16u>() {return 0;}
++template<> inline __host__ __device__ Ncv32u _pixMinVal<Ncv32u>() {return 0;}
++template<> inline __host__ __device__ Ncv8s _pixMinVal<Ncv8s>() {return SCHAR_MIN;}
++template<> inline __host__ __device__ Ncv16s _pixMinVal<Ncv16s>() {return SHRT_MIN;}
++template<> inline __host__ __device__ Ncv32s _pixMinVal<Ncv32s>() {return INT_MIN;}
++template<> inline __host__ __device__ Ncv32f _pixMinVal<Ncv32f>() {return FLT_MIN;}
++template<> inline __host__ __device__ Ncv64f _pixMinVal<Ncv64f>() {return DBL_MIN;}
+
+ template<typename Tvec> struct TConvVec2Base;
+ template<> struct TConvVec2Base<uchar1> {typedef Ncv8u TBase;};
+@@ -116,21 +116,21 @@ template<typename Tin> static inline __host__ __device__ void _TDemoteClampNN(Ti
+ template<typename Tin> static inline __host__ __device__ void _TDemoteClampNN(Tin &a, Ncv32f &out) {out = (Ncv32f)a;}
+
+ template<typename Tout> inline Tout _pixMakeZero();
+-template<> static inline __host__ __device__ uchar1 _pixMakeZero<uchar1>() {return make_uchar1(0);}
+-template<> static inline __host__ __device__ uchar3 _pixMakeZero<uchar3>() {return make_uchar3(0,0,0);}
+-template<> static inline __host__ __device__ uchar4 _pixMakeZero<uchar4>() {return make_uchar4(0,0,0,0);}
+-template<> static inline __host__ __device__ ushort1 _pixMakeZero<ushort1>() {return make_ushort1(0);}
+-template<> static inline __host__ __device__ ushort3 _pixMakeZero<ushort3>() {return make_ushort3(0,0,0);}
+-template<> static inline __host__ __device__ ushort4 _pixMakeZero<ushort4>() {return make_ushort4(0,0,0,0);}
+-template<> static inline __host__ __device__ uint1 _pixMakeZero<uint1>() {return make_uint1(0);}
+-template<> static inline __host__ __device__ uint3 _pixMakeZero<uint3>() {return make_uint3(0,0,0);}
+-template<> static inline __host__ __device__ uint4 _pixMakeZero<uint4>() {return make_uint4(0,0,0,0);}
+-template<> static inline __host__ __device__ float1 _pixMakeZero<float1>() {return make_float1(0.f);}
+-template<> static inline __host__ __device__ float3 _pixMakeZero<float3>() {return make_float3(0.f,0.f,0.f);}
+-template<> static inline __host__ __device__ float4 _pixMakeZero<float4>() {return make_float4(0.f,0.f,0.f,0.f);}
+-template<> static inline __host__ __device__ double1 _pixMakeZero<double1>() {return make_double1(0.);}
+-template<> static inline __host__ __device__ double3 _pixMakeZero<double3>() {return make_double3(0.,0.,0.);}
+-template<> static inline __host__ __device__ double4 _pixMakeZero<double4>() {return make_double4(0.,0.,0.,0.);}
++template<> inline __host__ __device__ uchar1 _pixMakeZero<uchar1>() {return make_uchar1(0);}
++template<> inline __host__ __device__ uchar3 _pixMakeZero<uchar3>() {return make_uchar3(0,0,0);}
++template<> inline __host__ __device__ uchar4 _pixMakeZero<uchar4>() {return make_uchar4(0,0,0,0);}
++template<> inline __host__ __device__ ushort1 _pixMakeZero<ushort1>() {return make_ushort1(0);}
++template<> inline __host__ __device__ ushort3 _pixMakeZero<ushort3>() {return make_ushort3(0,0,0);}
++template<> inline __host__ __device__ ushort4 _pixMakeZero<ushort4>() {return make_ushort4(0,0,0,0);}
++template<> inline __host__ __device__ uint1 _pixMakeZero<uint1>() {return make_uint1(0);}
++template<> inline __host__ __device__ uint3 _pixMakeZero<uint3>() {return make_uint3(0,0,0);}
++template<> inline __host__ __device__ uint4 _pixMakeZero<uint4>() {return make_uint4(0,0,0,0);}
++template<> inline __host__ __device__ float1 _pixMakeZero<float1>() {return make_float1(0.f);}
++template<> inline __host__ __device__ float3 _pixMakeZero<float3>() {return make_float3(0.f,0.f,0.f);}
++template<> inline __host__ __device__ float4 _pixMakeZero<float4>() {return make_float4(0.f,0.f,0.f,0.f);}
++template<> inline __host__ __device__ double1 _pixMakeZero<double1>() {return make_double1(0.);}
++template<> inline __host__ __device__ double3 _pixMakeZero<double3>() {return make_double3(0.,0.,0.);}
++template<> inline __host__ __device__ double4 _pixMakeZero<double4>() {return make_double4(0.,0.,0.,0.);}
+
+ static inline __host__ __device__ uchar1 _pixMake(Ncv8u x) {return make_uchar1(x);}
+ static inline __host__ __device__ uchar3 _pixMake(Ncv8u x, Ncv8u y, Ncv8u z) {return make_uchar3(x,y,z);}
diff --git a/media-libs/opencv/files/opencv-2.4.9-libav10.patch b/media-libs/opencv/files/opencv-2.4.9-libav10.patch
new file mode 100644
index 000000000000..df517285e000
--- /dev/null
+++ b/media-libs/opencv/files/opencv-2.4.9-libav10.patch
@@ -0,0 +1,748 @@
+From: anton@khirnov.net
+Description: Support building with the upcoming Libav 10 release
+Origin: upstream, https://github.com/Itseez/opencv/pull/2293
+
+--- a/modules/highgui/src/cap_ffmpeg_impl.hpp
++++ b/modules/highgui/src/cap_ffmpeg_impl.hpp
+@@ -57,10 +57,28 @@
+ extern "C" {
+ #endif
+
+-#include "ffmpeg_codecs.hpp"
++#if !defined(WIN32) || defined(__MINGW32__)
+
++#include <stdint.h>
++
++// some versions of FFMPEG assume a C99 compiler, and don't define INT64_C
++#ifndef INT64_C
++#define INT64_C(c) (c##LL)
++#endif
++
++#ifndef UINT64_C
++#define UINT64_C(c) (c##ULL)
++#endif
++
++#include <errno.h>
++
++#endif
++
++#include <libavformat/avformat.h>
+ #include <libavutil/mathematics.h>
+
++#include <libavutil/opt.h>
++
+ #ifdef WIN32
+ #define HAVE_FFMPEG_SWSCALE 1
+ #include <libavcodec/avcodec.h>
+@@ -144,10 +162,6 @@ extern "C" {
+ #define AV_NOPTS_VALUE_ ((int64_t)AV_NOPTS_VALUE)
+ #endif
+
+-#ifndef AVERROR_EOF
+-#define AVERROR_EOF (-MKTAG( 'E','O','F',' '))
+-#endif
+-
+ #if LIBAVCODEC_BUILD >= CALC_FFMPEG_VERSION(54,25,0)
+ # define CV_CODEC_ID AVCodecID
+ # define CV_CODEC(name) AV_##name
+@@ -158,9 +172,7 @@ extern "C" {
+
+ static int get_number_of_cpus(void)
+ {
+-#if LIBAVFORMAT_BUILD < CALC_FFMPEG_VERSION(52, 111, 0)
+- return 1;
+-#elif defined WIN32 || defined _WIN32
++#if defined WIN32 || defined _WIN32
+ SYSTEM_INFO sysinfo;
+ GetSystemInfo( &sysinfo );
+
+@@ -296,25 +308,13 @@ void CvCapture_FFMPEG::close()
+
+ if( video_st )
+ {
+-#if LIBAVFORMAT_BUILD > 4628
+ avcodec_close( video_st->codec );
+-
+-#else
+- avcodec_close( &(video_st->codec) );
+-
+-#endif
+ video_st = NULL;
+ }
+
+ if( ic )
+ {
+-#if LIBAVFORMAT_BUILD < CALC_FFMPEG_VERSION(53, 24, 2)
+- av_close_input_file(ic);
+-#else
+ avformat_close_input(&ic);
+-#endif
+-
+- ic = NULL;
+ }
+
+ if( rgb_picture.data[0] )
+@@ -501,9 +501,7 @@ public:
+ _mutex.lock();
+ if (!_initialized)
+ {
+- #if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 13, 0)
+ avformat_network_init();
+- #endif
+
+ /* register all codecs, demux and protocols */
+ av_register_all();
+@@ -534,11 +532,7 @@ bool CvCapture_FFMPEG::open( const char*
+
+ close();
+
+-#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(52, 111, 0)
+ int err = avformat_open_input(&ic, _filename, NULL, NULL);
+-#else
+- int err = av_open_input_file(&ic, _filename, NULL, 0, NULL);
+-#endif
+
+ if (err < 0)
+ {
+@@ -546,11 +540,7 @@ bool CvCapture_FFMPEG::open( const char*
+ goto exit_func;
+ }
+ err =
+-#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 6, 0)
+ avformat_find_stream_info(ic, NULL);
+-#else
+- av_find_stream_info(ic);
+-#endif
+ if (err < 0)
+ {
+ CV_WARN("Could not find codec parameters");
+@@ -558,11 +548,7 @@ bool CvCapture_FFMPEG::open( const char*
+ }
+ for(i = 0; i < ic->nb_streams; i++)
+ {
+-#if LIBAVFORMAT_BUILD > 4628
+ AVCodecContext *enc = ic->streams[i]->codec;
+-#else
+- AVCodecContext *enc = &ic->streams[i]->codec;
+-#endif
+
+ //#ifdef FF_API_THREAD_INIT
+ // avcodec_thread_init(enc, get_number_of_cpus());
+@@ -570,10 +556,6 @@ bool CvCapture_FFMPEG::open( const char*
+ enc->thread_count = get_number_of_cpus();
+ //#endif
+
+-#if LIBAVFORMAT_BUILD < CALC_FFMPEG_VERSION(53, 2, 0)
+-#define AVMEDIA_TYPE_VIDEO CODEC_TYPE_VIDEO
+-#endif
+-
+ if( AVMEDIA_TYPE_VIDEO == enc->codec_type && video_stream < 0)
+ {
+ // backup encoder' width/height
+@@ -581,13 +563,7 @@ bool CvCapture_FFMPEG::open( const char*
+ int enc_height = enc->height;
+
+ AVCodec *codec = avcodec_find_decoder(enc->codec_id);
+- if (!codec ||
+-#if LIBAVCODEC_VERSION_INT >= ((53<<16)+(8<<8)+0)
+- avcodec_open2(enc, codec, NULL)
+-#else
+- avcodec_open(enc, codec)
+-#endif
+- < 0)
++ if (!codec || avcodec_open2(enc, codec, NULL) < 0)
+ goto exit_func;
+
+ // checking width/height (since decoder can sometimes alter it, eg. vp6f)
+@@ -660,17 +636,7 @@ bool CvCapture_FFMPEG::grabFrame()
+ }
+
+ // Decode video frame
+- #if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 2, 0)
+ avcodec_decode_video2(video_st->codec, picture, &got_picture, &packet);
+- #elif LIBAVFORMAT_BUILD > 4628
+- avcodec_decode_video(video_st->codec,
+- picture, &got_picture,
+- packet.data, packet.size);
+- #else
+- avcodec_decode_video(&video_st->codec,
+- picture, &got_picture,
+- packet.data, packet.size);
+- #endif
+
+ // Did we get a video frame?
+ if(got_picture)
+@@ -769,18 +735,9 @@ double CvCapture_FFMPEG::getProperty( in
+ case CV_FFMPEG_CAP_PROP_FRAME_HEIGHT:
+ return (double)frame.height;
+ case CV_FFMPEG_CAP_PROP_FPS:
+-#if LIBAVCODEC_BUILD > 4753
+- return av_q2d(video_st->r_frame_rate);
+-#else
+- return (double)video_st->codec.frame_rate
+- / (double)video_st->codec.frame_rate_base;
+-#endif
++ return av_q2d(video_st->avg_frame_rate);
+ case CV_FFMPEG_CAP_PROP_FOURCC:
+-#if LIBAVFORMAT_BUILD > 4628
+ return (double)video_st->codec->codec_tag;
+-#else
+- return (double)video_st->codec.codec_tag;
+-#endif
+ default:
+ break;
+ }
+@@ -817,14 +774,7 @@ int CvCapture_FFMPEG::get_bitrate()
+
+ double CvCapture_FFMPEG::get_fps()
+ {
+- double fps = r2d(ic->streams[video_stream]->r_frame_rate);
+-
+-#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(52, 111, 0)
+- if (fps < eps_zero)
+- {
+- fps = r2d(ic->streams[video_stream]->avg_frame_rate);
+- }
+-#endif
++ double fps = r2d(ic->streams[video_stream]->avg_frame_rate);
+
+ if (fps < eps_zero)
+ {
+@@ -984,7 +934,6 @@ struct CvVideoWriter_FFMPEG
+
+ static const char * icvFFMPEGErrStr(int err)
+ {
+-#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 2, 0)
+ switch(err) {
+ case AVERROR_BSF_NOT_FOUND:
+ return "Bitstream filter not found";
+@@ -1015,22 +964,6 @@ static const char * icvFFMPEGErrStr(int
+ default:
+ break;
+ }
+-#else
+- switch(err) {
+- case AVERROR_NUMEXPECTED:
+- return "Incorrect filename syntax";
+- case AVERROR_INVALIDDATA:
+- return "Invalid data in header";
+- case AVERROR_NOFMT:
+- return "Unknown format";
+- case AVERROR_IO:
+- return "I/O error occurred";
+- case AVERROR_NOMEM:
+- return "Memory allocation error";
+- default:
+- break;
+- }
+-#endif
+
+ return "Unspecified error";
+ }
+@@ -1098,28 +1031,16 @@ static AVStream *icv_add_video_stream_FF
+ int frame_rate, frame_rate_base;
+ AVCodec *codec;
+
+-#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 10, 0)
+ st = avformat_new_stream(oc, 0);
+-#else
+- st = av_new_stream(oc, 0);
+-#endif
+
+ if (!st) {
+ CV_WARN("Could not allocate stream");
+ return NULL;
+ }
+
+-#if LIBAVFORMAT_BUILD > 4628
+ c = st->codec;
+-#else
+- c = &(st->codec);
+-#endif
+
+-#if LIBAVFORMAT_BUILD > 4621
+ c->codec_id = av_guess_codec(oc->oformat, NULL, oc->filename, NULL, AVMEDIA_TYPE_VIDEO);
+-#else
+- c->codec_id = oc->oformat->video_codec;
+-#endif
+
+ if(codec_id != CV_CODEC(CODEC_ID_NONE)){
+ c->codec_id = codec_id;
+@@ -1154,7 +1075,6 @@ static AVStream *icv_add_video_stream_FF
+ frame_rate_base*=10;
+ frame_rate=(int)(fps*frame_rate_base + 0.5);
+ }
+-#if LIBAVFORMAT_BUILD > 4752
+ c->time_base.den = frame_rate;
+ c->time_base.num = frame_rate_base;
+ /* adjust time base for supported framerates */
+@@ -1174,10 +1094,6 @@ static AVStream *icv_add_video_stream_FF
+ c->time_base.den= best->num;
+ c->time_base.num= best->den;
+ }
+-#else
+- c->frame_rate = frame_rate;
+- c->frame_rate_base = frame_rate_base;
+-#endif
+
+ c->gop_size = 12; /* emit one intra frame every twelve frames at most */
+ c->pix_fmt = (PixelFormat) pixel_format;
+@@ -1207,12 +1123,7 @@ static const int OPENCV_NO_FRAMES_WRITTE
+
+ static int icv_av_write_frame_FFMPEG( AVFormatContext * oc, AVStream * video_st, uint8_t * outbuf, uint32_t outbuf_size, AVFrame * picture )
+ {
+-#if LIBAVFORMAT_BUILD > 4628
+ AVCodecContext * c = video_st->codec;
+-#else
+- AVCodecContext * c = &(video_st->codec);
+-#endif
+- int out_size;
+ int ret = 0;
+
+ if (oc->oformat->flags & AVFMT_RAWPICTURE) {
+@@ -1232,24 +1143,39 @@ static int icv_av_write_frame_FFMPEG( AV
+
+ ret = av_write_frame(oc, &pkt);
+ } else {
++ AVPacket pkt;
++ int got_output;
++
++ av_init_packet(&pkt);
++#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 1, 0)
+ /* encode the image */
+- out_size = avcodec_encode_video(c, outbuf, outbuf_size, picture);
+- /* if zero size, it means the image was buffered */
+- if (out_size > 0) {
+- AVPacket pkt;
+- av_init_packet(&pkt);
+-
+-#if LIBAVFORMAT_BUILD > 4752
+- if(c->coded_frame->pts != (int64_t)AV_NOPTS_VALUE)
+- pkt.pts = av_rescale_q(c->coded_frame->pts, c->time_base, video_st->time_base);
+-#else
++ int out_size = avcodec_encode_video(c, outbuf, outbuf_size, picture);
++ got_output = out_size > 0;
++ pkt.data = outbuf;
++ pkt.size = out_size;
++ if(c->coded_frame->pts != (int64_t)AV_NOPTS_VALUE)
+ pkt.pts = c->coded_frame->pts;
++ pkt.dts = AV_NOPTS_VALUE;
++ if(c->coded_frame->key_frame)
++ pkt.flags |= PKT_FLAG_KEY;
++#else
++ pkt.data = NULL;
++ pkt.size = 0;
++
++ ret = avcodec_encode_video2(c, &pkt, picture, &got_output);
++ if (ret < 0)
++ got_output = 0;
+ #endif
+- if(c->coded_frame->key_frame)
+- pkt.flags |= PKT_FLAG_KEY;
++
++ if (got_output) {
++ if (pkt.pts != (int64_t)AV_NOPTS_VALUE)
++ pkt.pts = av_rescale_q(pkt.pts, c->time_base, video_st->time_base);
++ if (pkt.dts != (int64_t)AV_NOPTS_VALUE)
++ pkt.dts = av_rescale_q(pkt.dts, c->time_base, video_st->time_base);
++ if (pkt.duration)
++ pkt.duration = av_rescale_q(pkt.duration, c->time_base, video_st->time_base);
++
+ pkt.stream_index= video_st->index;
+- pkt.data= outbuf;
+- pkt.size= out_size;
+
+ /* write the compressed frame in the media file */
+ ret = av_write_frame(oc, &pkt);
+@@ -1271,30 +1197,8 @@ bool CvVideoWriter_FFMPEG::writeFrame( c
+ height = frame_height;
+
+ // typecast from opaque data type to implemented struct
+-#if LIBAVFORMAT_BUILD > 4628
+ AVCodecContext *c = video_st->codec;
+-#else
+- AVCodecContext *c = &(video_st->codec);
+-#endif
+
+-#if LIBAVFORMAT_BUILD < 5231
+- // It is not needed in the latest versions of the ffmpeg
+- if( c->codec_id == CV_CODEC(CODEC_ID_RAWVIDEO) && origin != 1 )
+- {
+- if( !temp_image.data )
+- {
+- temp_image.step = (width*cn + 3) & -4;
+- temp_image.width = width;
+- temp_image.height = height;
+- temp_image.cn = cn;
+- temp_image.data = (unsigned char*)malloc(temp_image.step*temp_image.height);
+- }
+- for( int y = 0; y < height; y++ )
+- memcpy(temp_image.data + y*temp_image.step, data + (height-1-y)*step, width*cn);
+- data = temp_image.data;
+- step = temp_image.step;
+- }
+-#else
+ if( width*cn != step )
+ {
+ if( !temp_image.data )
+@@ -1314,7 +1218,6 @@ bool CvVideoWriter_FFMPEG::writeFrame( c
+ data = temp_image.data;
+ step = temp_image.step;
+ }
+-#endif
+
+ // check parameters
+ if (input_pix_fmt == PIX_FMT_BGR24) {
+@@ -1401,11 +1304,7 @@ void CvVideoWriter_FFMPEG::close()
+ }
+
+ // free pictures
+-#if LIBAVFORMAT_BUILD > 4628
+ if( video_st->codec->pix_fmt != input_pix_fmt)
+-#else
+- if( video_st->codec.pix_fmt != input_pix_fmt)
+-#endif
+ {
+ if(picture->data[0])
+ free(picture->data[0]);
+@@ -1417,11 +1316,7 @@ void CvVideoWriter_FFMPEG::close()
+ av_free(input_picture);
+
+ /* close codec */
+-#if LIBAVFORMAT_BUILD > 4628
+ avcodec_close(video_st->codec);
+-#else
+- avcodec_close(&(video_st->codec));
+-#endif
+
+ av_free(outbuf);
+
+@@ -1429,15 +1324,7 @@ void CvVideoWriter_FFMPEG::close()
+ {
+ /* close the output file */
+
+-#if LIBAVCODEC_VERSION_INT < ((52<<16)+(123<<8)+0)
+-#if LIBAVCODEC_VERSION_INT >= ((51<<16)+(49<<8)+0)
+- url_fclose(oc->pb);
+-#else
+- url_fclose(&oc->pb);
+-#endif
+-#else
+ avio_close(oc->pb);
+-#endif
+
+ }
+
+@@ -1479,11 +1366,7 @@ bool CvVideoWriter_FFMPEG::open( const c
+
+ /* auto detect the output format from the name and fourcc code. */
+
+-#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 2, 0)
+ fmt = av_guess_format(NULL, filename, NULL);
+-#else
+- fmt = guess_format(NULL, filename, NULL);
+-#endif
+
+ if (!fmt)
+ return false;
+@@ -1497,21 +1380,12 @@ bool CvVideoWriter_FFMPEG::open( const c
+ }
+
+ /* Lookup codec_id for given fourcc */
+-#if LIBAVCODEC_VERSION_INT<((51<<16)+(49<<8)+0)
+- if( (codec_id = codec_get_bmp_id( fourcc )) == CV_CODEC(CODEC_ID_NONE) )
+- return false;
+-#else
+- const struct AVCodecTag * tags[] = { codec_bmp_tags, NULL};
++ const struct AVCodecTag * tags[] = { avformat_get_riff_video_tags(), NULL};
+ if( (codec_id = av_codec_get_id(tags, fourcc)) == CV_CODEC(CODEC_ID_NONE) )
+ return false;
+-#endif
+
+ // alloc memory for context
+-#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 2, 0)
+ oc = avformat_alloc_context();
+-#else
+- oc = av_alloc_format_context();
+-#endif
+ assert (oc);
+
+ /* set file name */
+@@ -1523,12 +1397,10 @@ bool CvVideoWriter_FFMPEG::open( const c
+
+ // set a few optimal pixel formats for lossless codecs of interest..
+ switch (codec_id) {
+-#if LIBAVCODEC_VERSION_INT>((50<<16)+(1<<8)+0)
+ case CV_CODEC(CODEC_ID_JPEGLS):
+ // BGR24 or GRAY8 depending on is_color...
+ codec_pix_fmt = input_pix_fmt;
+ break;
+-#endif
+ case CV_CODEC(CODEC_ID_HUFFYUV):
+ codec_pix_fmt = PIX_FMT_YUV422P;
+ break;
+@@ -1555,14 +1427,6 @@ bool CvVideoWriter_FFMPEG::open( const c
+ width, height, (int)(bitrate + 0.5),
+ fps, codec_pix_fmt);
+
+- /* set the output parameters (must be done even if no
+- parameters). */
+-#if LIBAVFORMAT_BUILD < CALC_FFMPEG_VERSION(53, 2, 0)
+- if (av_set_parameters(oc, NULL) < 0) {
+- return false;
+- }
+-#endif
+-
+ #if 0
+ #if FF_API_DUMP_FORMAT
+ dump_format(oc, 0, filename, 1);
+@@ -1580,23 +1444,14 @@ bool CvVideoWriter_FFMPEG::open( const c
+ AVCodec *codec;
+ AVCodecContext *c;
+
+-#if LIBAVFORMAT_BUILD > 4628
+ c = (video_st->codec);
+-#else
+- c = &(video_st->codec);
+-#endif
+
+ c->codec_tag = fourcc;
+ /* find the video encoder */
+ codec = avcodec_find_encoder(c->codec_id);
+ if (!codec) {
+ fprintf(stderr, "Could not find encoder for codec id %d: %s", c->codec_id, icvFFMPEGErrStr(
+- #if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 2, 0)
+- AVERROR_ENCODER_NOT_FOUND
+- #else
+- -1
+- #endif
+- ));
++ AVERROR_ENCODER_NOT_FOUND));
+ return false;
+ }
+
+@@ -1607,13 +1462,7 @@ bool CvVideoWriter_FFMPEG::open( const c
+ c->bit_rate = (int)lbit_rate;
+
+ /* open the codec */
+- if ((err=
+-#if LIBAVCODEC_VERSION_INT >= ((53<<16)+(8<<8)+0)
+- avcodec_open2(c, codec, NULL)
+-#else
+- avcodec_open(c, codec)
+-#endif
+- ) < 0) {
++ if ((err = avcodec_open2(c, codec, NULL)) < 0) {
+ fprintf(stderr, "Could not open codec '%s': %s", codec->name, icvFFMPEGErrStr(err));
+ return false;
+ }
+@@ -1649,22 +1498,14 @@ bool CvVideoWriter_FFMPEG::open( const c
+
+ /* open the output file, if needed */
+ if (!(fmt->flags & AVFMT_NOFILE)) {
+-#if LIBAVFORMAT_BUILD < CALC_FFMPEG_VERSION(53, 2, 0)
+- if (url_fopen(&oc->pb, filename, URL_WRONLY) < 0)
+-#else
+ if (avio_open(&oc->pb, filename, AVIO_FLAG_WRITE) < 0)
+-#endif
+ {
+ return false;
+ }
+ }
+
+-#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(52, 111, 0)
+ /* write the stream header, if any */
+ err=avformat_write_header(oc, NULL);
+-#else
+- err=av_write_header( oc );
+-#endif
+
+ if(err < 0)
+ {
+@@ -1799,15 +1640,7 @@ void OutputMediaStream_FFMPEG::close()
+ {
+ // close the output file
+
+- #if LIBAVCODEC_VERSION_INT < ((52<<16)+(123<<8)+0)
+- #if LIBAVCODEC_VERSION_INT >= ((51<<16)+(49<<8)+0)
+- url_fclose(oc_->pb);
+- #else
+- url_fclose(&oc_->pb);
+- #endif
+- #else
+- avio_close(oc_->pb);
+- #endif
++ avio_close(oc_->pb);
+ }
+
+ // free the stream
+@@ -1817,19 +1650,11 @@ void OutputMediaStream_FFMPEG::close()
+
+ AVStream* OutputMediaStream_FFMPEG::addVideoStream(AVFormatContext *oc, CV_CODEC_ID codec_id, int w, int h, int bitrate, double fps, PixelFormat pixel_format)
+ {
+- #if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 10, 0)
+ AVStream* st = avformat_new_stream(oc, 0);
+- #else
+- AVStream* st = av_new_stream(oc, 0);
+- #endif
+ if (!st)
+ return 0;
+
+- #if LIBAVFORMAT_BUILD > 4628
+ AVCodecContext* c = st->codec;
+- #else
+- AVCodecContext* c = &(st->codec);
+- #endif
+
+ c->codec_id = codec_id;
+ c->codec_type = AVMEDIA_TYPE_VIDEO;
+@@ -1865,7 +1690,6 @@ AVStream* OutputMediaStream_FFMPEG::addV
+ c->time_base.den = frame_rate;
+ c->time_base.num = frame_rate_base;
+
+- #if LIBAVFORMAT_BUILD > 4752
+ // adjust time base for supported framerates
+ if (codec && codec->supported_framerates)
+ {
+@@ -1890,7 +1714,6 @@ AVStream* OutputMediaStream_FFMPEG::addV
+ c->time_base.den= best->num;
+ c->time_base.num= best->den;
+ }
+- #endif
+
+ c->gop_size = 12; // emit one intra frame every twelve frames at most
+ c->pix_fmt = pixel_format;
+@@ -1909,13 +1732,11 @@ AVStream* OutputMediaStream_FFMPEG::addV
+ c->mb_decision = 2;
+ }
+
+- #if LIBAVCODEC_VERSION_INT > 0x000409
+ // some formats want stream headers to be seperate
+ if (oc->oformat->flags & AVFMT_GLOBALHEADER)
+ {
+ c->flags |= CODEC_FLAG_GLOBAL_HEADER;
+ }
+- #endif
+
+ return st;
+ }
+@@ -1927,22 +1748,14 @@ bool OutputMediaStream_FFMPEG::open(cons
+ video_st_ = 0;
+
+ // auto detect the output format from the name and fourcc code
+- #if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 2, 0)
+ fmt_ = av_guess_format(NULL, fileName, NULL);
+- #else
+- fmt_ = guess_format(NULL, fileName, NULL);
+- #endif
+ if (!fmt_)
+ return false;
+
+ CV_CODEC_ID codec_id = CV_CODEC(CODEC_ID_H264);
+
+ // alloc memory for context
+- #if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 2, 0)
+ oc_ = avformat_alloc_context();
+- #else
+- oc_ = av_alloc_format_context();
+- #endif
+ if (!oc_)
+ return false;
+
+@@ -1961,20 +1774,10 @@ bool OutputMediaStream_FFMPEG::open(cons
+ if (!video_st_)
+ return false;
+
+- // set the output parameters (must be done even if no parameters)
+- #if LIBAVFORMAT_BUILD < CALC_FFMPEG_VERSION(53, 2, 0)
+- if (av_set_parameters(oc_, NULL) < 0)
+- return false;
+- #endif
+-
+ // now that all the parameters are set, we can open the audio and
+ // video codecs and allocate the necessary encode buffers
+
+- #if LIBAVFORMAT_BUILD > 4628
+ AVCodecContext* c = (video_st_->codec);
+- #else
+- AVCodecContext* c = &(video_st_->codec);
+- #endif
+
+ c->codec_tag = MKTAG('H', '2', '6', '4');
+ c->bit_rate_tolerance = c->bit_rate;
+@@ -1982,22 +1785,14 @@ bool OutputMediaStream_FFMPEG::open(cons
+ // open the output file, if needed
+ if (!(fmt_->flags & AVFMT_NOFILE))
+ {
+- #if LIBAVFORMAT_BUILD < CALC_FFMPEG_VERSION(53, 2, 0)
+- int err = url_fopen(&oc_->pb, fileName, URL_WRONLY);
+- #else
+- int err = avio_open(&oc_->pb, fileName, AVIO_FLAG_WRITE);
+- #endif
++ int err = avio_open(&oc_->pb, fileName, AVIO_FLAG_WRITE);
+
+ if (err != 0)
+ return false;
+ }
+
+ // write the stream header, if any
+- #if LIBAVFORMAT_BUILD < CALC_FFMPEG_VERSION(53, 2, 0)
+- av_write_header(oc_);
+- #else
+- avformat_write_header(oc_, NULL);
+- #endif
++ avformat_write_header(oc_, NULL);
+
+ return true;
+ }
+@@ -2102,33 +1897,19 @@ bool InputMediaStream_FFMPEG::open(const
+ video_stream_id_ = -1;
+ memset(&pkt_, 0, sizeof(AVPacket));
+
+- #if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 13, 0)
+- avformat_network_init();
+- #endif
+-
+- #if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 6, 0)
+- err = avformat_open_input(&ctx_, fileName, 0, 0);
+- #else
+- err = av_open_input_file(&ctx_, fileName, 0, 0, 0);
+- #endif
++ avformat_network_init();
++
++ err = avformat_open_input(&ctx_, fileName, 0, 0);
+ if (err < 0)
+ return false;
+
+- #if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 6, 0)
+- err = avformat_find_stream_info(ctx_, 0);
+- #else
+- err = av_find_stream_info(ctx_);
+- #endif
++ err = avformat_find_stream_info(ctx_, 0);
+ if (err < 0)
+ return false;
+
+ for (unsigned int i = 0; i < ctx_->nb_streams; ++i)
+ {
+- #if LIBAVFORMAT_BUILD > 4628
+ AVCodecContext *enc = ctx_->streams[i]->codec;
+- #else
+- AVCodecContext *enc = &ctx_->streams[i]->codec;
+- #endif
+
+ if (enc->codec_type == AVMEDIA_TYPE_VIDEO)
+ {
+@@ -2197,11 +1978,7 @@ void InputMediaStream_FFMPEG::close()
+ {
+ if (ctx_)
+ {
+- #if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 24, 2)
+- avformat_close_input(&ctx_);
+- #else
+- av_close_input_file(ctx_);
+- #endif
++ avformat_close_input(&ctx_);
+ }
+
+ // free last packet if exist
diff --git a/media-libs/opencv/files/opencv-3.0.0-gles.patch b/media-libs/opencv/files/opencv-3.0.0-gles.patch
new file mode 100644
index 000000000000..a2629d928e82
--- /dev/null
+++ b/media-libs/opencv/files/opencv-3.0.0-gles.patch
@@ -0,0 +1,14 @@
+Index: opencv-2.4.11/modules/highgui/src/window_QT.cpp
+===================================================================
+--- opencv-2.4.11.orig/modules/highgui/src/window_QT.cpp
++++ opencv-2.4.11/modules/highgui/src/window_QT.cpp
+@@ -3118,7 +3118,9 @@ void OpenGlViewPort::updateGl()
+
+ void OpenGlViewPort::initializeGL()
+ {
++#ifdef GL_PERSPECTIVE_CORRECTION_HINT
+ glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
++#endif
+ }
+
+ void OpenGlViewPort::resizeGL(int w, int h)
diff --git a/media-libs/opencv/metadata.xml b/media-libs/opencv/metadata.xml
new file mode 100644
index 000000000000..94c7862604ac
--- /dev/null
+++ b/media-libs/opencv/metadata.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>kde</herd>
+ <maintainer>
+ <email>dilfridge@gentoo.org</email>
+ <name>Andreas K. Huettel</name>
+ </maintainer>
+ <maintainer>
+ <email>amynka@gentoo.org</email>
+ <name>Amy Winston</name>
+ </maintainer>
+ <longdescription>
+OpenCV (Open Source Computer Vision) is a library of programming functions mainly aimed at real time computer vision.
+Example applications of the OpenCV library are Human-Computer Interaction (HCI); Object Identification, Segmentation and Recognition;
+Face Recognition; Gesture Recognition; Motion Tracking, Ego Motion, Motion Understanding; Structure From Motion (SFM); and Mobile Robotics.
+</longdescription>
+ <use>
+ <flag name="cuda">Enable NVIDIA Cuda computations support</flag>
+ <flag name="eigen">Enable usage of <pkg>dev-cpp/eigen</pkg> for computations</flag>
+ <flag name="ipp">Enable Intel Integrated Primitive support</flag>
+ <flag name="opencl">Add support for OpenCL</flag>
+ <flag name="testprograms">Build and install programs for testing OpenCV (performance)</flag>
+ <flag name="vtk">Build new 3D visualization module viz based on sci-libs/vtk</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">opencvlibrary</remote-id>
+ <remote-id type="github">Itseez/opencv</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/opencv/opencv-2.4.10.ebuild b/media-libs/opencv/opencv-2.4.10.ebuild
new file mode 100644
index 000000000000..458675970fc0
--- /dev/null
+++ b/media-libs/opencv/opencv-2.4.10.ebuild
@@ -0,0 +1,222 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit base toolchain-funcs cmake-utils python-single-r1 java-pkg-opt-2 java-ant-2
+
+DESCRIPTION="A collection of algorithms and sample code for various computer vision problems"
+HOMEPAGE="http://opencv.willowgarage.com"
+
+SRC_URI="mirror://sourceforge/opencvlibrary/opencv-unix/${PV}/${P}.zip"
+
+LICENSE="BSD"
+SLOT="0/2.4"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux"
+IUSE="cuda doc +eigen examples ffmpeg gstreamer gtk ieee1394 ipp jpeg jpeg2k libav opencl openexr opengl openmp pch png +python qt4 testprograms threads tiff v4l vtk xine"
+REQUIRED_USE="
+ python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+# The following logic is intrinsic in the build system, but we do not enforce
+# it on the useflags since this just blocks emerging pointlessly:
+# gtk? ( !qt4 )
+# opengl? ( || ( gtk qt4 ) )
+# openmp? ( !threads )
+
+RDEPEND="
+ app-arch/bzip2
+ sys-libs/zlib
+ cuda? ( >=dev-util/nvidia-cuda-toolkit-5.5 )
+ ffmpeg? (
+ libav? ( media-video/libav:0= )
+ !libav? ( media-video/ffmpeg:0= )
+ )
+ gstreamer? (
+ media-libs/gstreamer:0.10
+ media-libs/gst-plugins-base:0.10
+ )
+ gtk? (
+ dev-libs/glib:2
+ x11-libs/gtk+:2
+ opengl? ( x11-libs/gtkglext )
+ )
+ java? ( >=virtual/jre-1.6:* )
+ jpeg? ( virtual/jpeg:0 )
+ jpeg2k? ( media-libs/jasper )
+ ieee1394? (
+ media-libs/libdc1394
+ sys-libs/libraw1394
+ )
+ ipp? ( sci-libs/ipp )
+ opencl? ( virtual/opencl )
+ openexr? ( media-libs/openexr )
+ opengl? ( virtual/opengl virtual/glu )
+ png? ( media-libs/libpng:0= )
+ python? ( ${PYTHON_DEPS} dev-python/numpy[${PYTHON_USEDEP}] )
+ qt4? (
+ dev-qt/qtgui:4
+ dev-qt/qttest:4
+ opengl? ( dev-qt/qtopengl:4 )
+ )
+ threads? ( dev-cpp/tbb )
+ tiff? ( media-libs/tiff:0 )
+ v4l? ( >=media-libs/libv4l-0.8.3 )
+ vtk? ( sci-libs/vtk[rendering] )
+ xine? ( media-libs/xine-lib )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ eigen? ( dev-cpp/eigen:3 )
+ java? ( >=virtual/jdk-1.6 )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2.3.1a-libav-0.7.patch"
+ "${FILESDIR}/${PN}-2.4.3-gcc47.patch"
+ "${FILESDIR}/${PN}-2.4.2-cflags.patch"
+ "${FILESDIR}/${PN}-2.4.8-javamagic.patch"
+ "${FILESDIR}/${PN}-2.4.9-libav10.patch"
+ "${FILESDIR}/${PN}-2.4.9-cuda-pkg-config.patch"
+ "${FILESDIR}/${PN}-2.4.10-pic-x86.patch"
+)
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+ java-pkg-opt-2_pkg_setup
+}
+
+src_prepare() {
+ base_src_prepare
+
+ # remove bundled stuff
+ rm -rf 3rdparty
+ sed -i \
+ -e '/add_subdirectory(3rdparty)/ d' \
+ CMakeLists.txt || die
+
+ java-pkg-opt-2_src_prepare
+}
+
+src_configure() {
+ if use openmp; then
+ tc-has-openmp || die "Please switch to an openmp compatible compiler"
+ fi
+
+ JAVA_ANT_ENCODING="iso-8859-1"
+ # set encoding so even this cmake build will pick it up.
+ export ANT_OPTS+=" -Dfile.encoding=iso-8859-1"
+ java-ant-2_src_configure
+
+ # please dont sort here, order is the same as in CMakeLists.txt
+ local mycmakeargs=(
+ # the optinal dependency libraries
+ $(cmake-utils_use_with ieee1394 1394)
+ -DWITH_AVFOUNDATION=OFF
+ -DWITH_CARBON=OFF
+ $(cmake-utils_use_with eigen)
+ $(cmake-utils_use_with ffmpeg)
+ $(cmake-utils_use_with gstreamer)
+ $(cmake-utils_use_with gtk)
+ $(cmake-utils_use_with ipp)
+ $(cmake-utils_use_with java)
+ $(cmake-utils_use_with jpeg2k JASPER)
+ $(cmake-utils_use_with jpeg)
+ $(cmake-utils_use_with opencl)
+ # $(cmake-utils_use_with opencl OPENCLAMDFFT)
+ # $(cmake-utils_use_with opencl OPENCLAMDBLAS)
+ $(cmake-utils_use_with openexr)
+ $(cmake-utils_use_with opengl)
+ $(cmake-utils_use_with openmp)
+ -DWITH_OPENNI=OFF # not packaged
+ $(cmake-utils_use_with png)
+ $(cmake-utils_use_build python opencv_python)
+ -DWITH_PVAPI=OFF # not packaged
+ -DWITH_QUICKTIME=OFF
+ $(cmake-utils_use_with threads TBB)
+ $(cmake-utils_use_with tiff)
+ -DWITH_UNICAP=OFF # not packaged
+ $(cmake-utils_use_with v4l V4L)
+ $(cmake-utils_use_with vtk VTK)
+ -DWITH_LIBV4L=ON
+ -DWITH_VIDEOINPUT=OFF # windows only
+ -DWITH_XIMEA=OFF # windows only
+ $(cmake-utils_use_with xine)
+ # the build components
+ -DBUILD_SHARED_LIBS=ON
+ -DBUILD_ANDROID_EXAMPLES=OFF
+ $(cmake-utils_use_build doc DOCS)
+ $(cmake-utils_use_build examples)
+ -DBUILD_PERF_TESTS=OFF
+ $(cmake-utils_use_build testprograms TESTS)
+ # install examples, tests etc
+ $(cmake-utils_use examples INSTALL_C_EXAMPLES)
+ $(cmake-utils_use testprograms INSTALL_TESTS)
+ # build options
+ $(cmake-utils_use_enable pch PRECOMPILED_HEADERS)
+ -DENABLE_OMIT_FRAME_POINTER=OFF #
+ -DENABLE_FAST_MATH=OFF #
+ -DENABLE_SSE=OFF # these options do nothing but
+ -DENABLE_SSE2=OFF # add params to CFLAGS
+ -DENABLE_SSE3=OFF
+ -DENABLE_SSSE3=OFF
+ -DENABLE_SSE41=OFF
+ -DENABLE_SSE42=OFF
+ -DOPENCV_EXTRA_FLAGS_RELEASE="" # black magic
+ )
+
+ if use qt4; then
+ mycmakeargs+=( "-DWITH_QT=4" )
+ else
+ mycmakeargs+=( "-DWITH_QT=OFF" )
+ fi
+
+ if use cuda; then
+ if [[ "$(gcc-version)" > "4.7" ]]; then
+ ewarn "CUDA and >=sys-devel/gcc-4.8 do not play well together. Disabling CUDA support."
+ mycmakeargs+=( "-DWITH_CUDA=OFF" )
+ mycmakeargs+=( "-DWITH_CUBLAS=OFF" )
+ mycmakeargs+=( "-DWITH_CUFFT=OFF" )
+ else
+ mycmakeargs+=( "-DWITH_CUDA=ON" )
+ mycmakeargs+=( "-DWITH_CUBLAS=ON" )
+ mycmakeargs+=( "-DWITH_CUFFT=ON" )
+ fi
+ else
+ mycmakeargs+=( "-DWITH_CUDA=OFF" )
+ mycmakeargs+=( "-DWITH_CUBLAS=OFF" )
+ mycmakeargs+=( "-DWITH_CUFFT=OFF" )
+ fi
+
+ if use examples && use python; then
+ mycmakeargs+=( "-DINSTALL_PYTHON_EXAMPLES=ON" )
+ else
+ mycmakeargs+=( "-DINSTALL_PYTHON_EXAMPLES=OFF" )
+ fi
+
+ # things we want to be hard off or not yet figured out
+ mycmakeargs+=(
+ "-DOPENCV_BUILD_3RDPARTY_LIBS=OFF"
+ "-DBUILD_LATEX_DOCS=OFF"
+ "-DBUILD_PACKAGE=OFF"
+ "-DENABLE_PROFILING=OFF"
+ )
+
+ # things we want to be hard enabled not worth useflag
+ mycmakeargs+=(
+ "-DCMAKE_SKIP_RPATH=ON"
+ "-DOPENCV_DOC_INSTALL_PATH=${EPREFIX}/usr/share/doc/${PF}"
+ )
+
+ # hardcode cuda paths
+ mycmakeargs+=(
+ "-DCUDA_NPP_LIBRARY_ROOT_DIR=/opt/cuda"
+ )
+
+ # workaround for bug 413429
+ tc-export CC CXX
+
+ cmake-utils_src_configure
+}
diff --git a/media-libs/opencv/opencv-2.4.9.ebuild b/media-libs/opencv/opencv-2.4.9.ebuild
new file mode 100644
index 000000000000..b91b22fe4207
--- /dev/null
+++ b/media-libs/opencv/opencv-2.4.9.ebuild
@@ -0,0 +1,222 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit base toolchain-funcs cmake-utils python-single-r1 java-pkg-opt-2 java-ant-2
+
+DESCRIPTION="A collection of algorithms and sample code for various computer vision problems"
+HOMEPAGE="http://opencv.willowgarage.com"
+
+SRC_URI="mirror://sourceforge/opencvlibrary/opencv-unix/${PV}/${P}.zip"
+
+LICENSE="BSD"
+SLOT="0/2.4"
+KEYWORDS="amd64 ~arm ppc ~ppc64 x86 ~amd64-linux"
+IUSE="cuda doc +eigen examples ffmpeg gstreamer gtk ieee1394 ipp jpeg jpeg2k libav opencl openexr opengl openmp pch png +python qt4 testprograms threads tiff v4l vtk xine"
+REQUIRED_USE="
+ python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+# The following logic is intrinsic in the build system, but we do not enforce
+# it on the useflags since this just blocks emerging pointlessly:
+# gtk? ( !qt4 )
+# opengl? ( || ( gtk qt4 ) )
+# openmp? ( !threads )
+
+RDEPEND="
+ app-arch/bzip2
+ sys-libs/zlib
+ cuda? ( >=dev-util/nvidia-cuda-toolkit-5.5 )
+ ffmpeg? (
+ libav? ( media-video/libav:0= )
+ !libav? ( media-video/ffmpeg:0= )
+ )
+ gstreamer? (
+ media-libs/gstreamer:0.10
+ media-libs/gst-plugins-base:0.10
+ )
+ gtk? (
+ dev-libs/glib:2
+ x11-libs/gtk+:2
+ opengl? ( x11-libs/gtkglext )
+ )
+ java? ( >=virtual/jre-1.6:* )
+ jpeg? ( virtual/jpeg:0 )
+ jpeg2k? ( media-libs/jasper )
+ ieee1394? (
+ media-libs/libdc1394
+ sys-libs/libraw1394
+ )
+ ipp? ( sci-libs/ipp )
+ opencl? ( virtual/opencl )
+ openexr? ( media-libs/openexr )
+ opengl? ( virtual/opengl virtual/glu )
+ png? ( media-libs/libpng:0= )
+ python? ( ${PYTHON_DEPS} dev-python/numpy[${PYTHON_USEDEP}] )
+ qt4? (
+ dev-qt/qtgui:4
+ dev-qt/qttest:4
+ opengl? ( dev-qt/qtopengl:4 )
+ )
+ threads? ( dev-cpp/tbb )
+ tiff? ( media-libs/tiff:0 )
+ v4l? ( >=media-libs/libv4l-0.8.3 )
+ vtk? ( sci-libs/vtk[rendering] )
+ xine? ( media-libs/xine-lib )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ eigen? ( dev-cpp/eigen:3 )
+ java? ( >=virtual/jdk-1.6 )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2.3.1a-libav-0.7.patch"
+ "${FILESDIR}/${PN}-2.4.3-gcc47.patch"
+ "${FILESDIR}/${PN}-2.4.2-cflags.patch"
+ "${FILESDIR}/${PN}-2.4.8-javamagic.patch"
+ "${FILESDIR}/${PN}-2.4.9-cuda.patch"
+ "${FILESDIR}/${PN}-2.4.9-libav10.patch"
+ "${FILESDIR}/${PN}-2.4.9-cuda-pkg-config.patch"
+)
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+ java-pkg-opt-2_pkg_setup
+}
+
+src_prepare() {
+ base_src_prepare
+
+ # remove bundled stuff
+ rm -rf 3rdparty
+ sed -i \
+ -e '/add_subdirectory(3rdparty)/ d' \
+ CMakeLists.txt || die
+
+ java-pkg-opt-2_src_prepare
+}
+
+src_configure() {
+ if use openmp; then
+ tc-has-openmp || die "Please switch to an openmp compatible compiler"
+ fi
+
+ JAVA_ANT_ENCODING="iso-8859-1"
+ # set encoding so even this cmake build will pick it up.
+ export ANT_OPTS+=" -Dfile.encoding=iso-8859-1"
+ java-ant-2_src_configure
+
+ # please dont sort here, order is the same as in CMakeLists.txt
+ local mycmakeargs=(
+ # the optinal dependency libraries
+ $(cmake-utils_use_with ieee1394 1394)
+ -DWITH_AVFOUNDATION=OFF
+ -DWITH_CARBON=OFF
+ $(cmake-utils_use_with eigen)
+ $(cmake-utils_use_with ffmpeg)
+ $(cmake-utils_use_with gstreamer)
+ $(cmake-utils_use_with gtk)
+ $(cmake-utils_use_with ipp)
+ $(cmake-utils_use_with java)
+ $(cmake-utils_use_with jpeg2k JASPER)
+ $(cmake-utils_use_with jpeg)
+ $(cmake-utils_use_with opencl)
+ # $(cmake-utils_use_with opencl OPENCLAMDFFT)
+ # $(cmake-utils_use_with opencl OPENCLAMDBLAS)
+ $(cmake-utils_use_with openexr)
+ $(cmake-utils_use_with opengl)
+ $(cmake-utils_use_with openmp)
+ -DWITH_OPENNI=OFF # not packaged
+ $(cmake-utils_use_with png)
+ $(cmake-utils_use_build python opencv_python)
+ -DWITH_PVAPI=OFF # not packaged
+ -DWITH_QUICKTIME=OFF
+ $(cmake-utils_use_with threads TBB)
+ $(cmake-utils_use_with tiff)
+ -DWITH_UNICAP=OFF # not packaged
+ $(cmake-utils_use_with v4l V4L)
+ $(cmake-utils_use_with vtk VTK)
+ -DWITH_LIBV4L=ON
+ -DWITH_VIDEOINPUT=OFF # windows only
+ -DWITH_XIMEA=OFF # windows only
+ $(cmake-utils_use_with xine)
+ # the build components
+ -DBUILD_SHARED_LIBS=ON
+ -DBUILD_ANDROID_EXAMPLES=OFF
+ $(cmake-utils_use_build doc DOCS)
+ $(cmake-utils_use_build examples)
+ -DBUILD_PERF_TESTS=OFF
+ $(cmake-utils_use_build testprograms TESTS)
+ # install examples, tests etc
+ $(cmake-utils_use examples INSTALL_C_EXAMPLES)
+ $(cmake-utils_use testprograms INSTALL_TESTS)
+ # build options
+ $(cmake-utils_use_enable pch PRECOMPILED_HEADERS)
+ -DENABLE_OMIT_FRAME_POINTER=OFF #
+ -DENABLE_FAST_MATH=OFF #
+ -DENABLE_SSE=OFF # these options do nothing but
+ -DENABLE_SSE2=OFF # add params to CFLAGS
+ -DENABLE_SSE3=OFF
+ -DENABLE_SSSE3=OFF
+ -DENABLE_SSE41=OFF
+ -DENABLE_SSE42=OFF
+ -DOPENCV_EXTRA_FLAGS_RELEASE="" # black magic
+ )
+
+ if use qt4; then
+ mycmakeargs+=( "-DWITH_QT=4" )
+ else
+ mycmakeargs+=( "-DWITH_QT=OFF" )
+ fi
+
+ if use cuda; then
+ if [[ "$(gcc-version)" > "4.7" ]]; then
+ ewarn "CUDA and >=sys-devel/gcc-4.8 do not play well together. Disabling CUDA support."
+ mycmakeargs+=( "-DWITH_CUDA=OFF" )
+ mycmakeargs+=( "-DWITH_CUBLAS=OFF" )
+ mycmakeargs+=( "-DWITH_CUFFT=OFF" )
+ else
+ mycmakeargs+=( "-DWITH_CUDA=ON" )
+ mycmakeargs+=( "-DWITH_CUBLAS=ON" )
+ mycmakeargs+=( "-DWITH_CUFFT=ON" )
+ fi
+ else
+ mycmakeargs+=( "-DWITH_CUDA=OFF" )
+ mycmakeargs+=( "-DWITH_CUBLAS=OFF" )
+ mycmakeargs+=( "-DWITH_CUFFT=OFF" )
+ fi
+
+ if use examples && use python; then
+ mycmakeargs+=( "-DINSTALL_PYTHON_EXAMPLES=ON" )
+ else
+ mycmakeargs+=( "-DINSTALL_PYTHON_EXAMPLES=OFF" )
+ fi
+
+ # things we want to be hard off or not yet figured out
+ mycmakeargs+=(
+ "-DOPENCV_BUILD_3RDPARTY_LIBS=OFF"
+ "-DBUILD_LATEX_DOCS=OFF"
+ "-DBUILD_PACKAGE=OFF"
+ "-DENABLE_PROFILING=OFF"
+ )
+
+ # things we want to be hard enabled not worth useflag
+ mycmakeargs+=(
+ "-DCMAKE_SKIP_RPATH=ON"
+ "-DOPENCV_DOC_INSTALL_PATH=${EPREFIX}/usr/share/doc/${PF}"
+ )
+
+ # hardcode cuda paths
+ mycmakeargs+=(
+ "-DCUDA_NPP_LIBRARY_ROOT_DIR=/opt/cuda"
+ )
+
+ # workaround for bug 413429
+ tc-export CC CXX
+
+ cmake-utils_src_configure
+}
diff --git a/media-libs/opencv/opencv-3.0.0.ebuild b/media-libs/opencv/opencv-3.0.0.ebuild
new file mode 100644
index 000000000000..5f5616762991
--- /dev/null
+++ b/media-libs/opencv/opencv-3.0.0.ebuild
@@ -0,0 +1,222 @@
+# 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_2,3_3,3_4} )
+
+inherit base toolchain-funcs cmake-utils python-single-r1 java-pkg-opt-2 java-ant-2
+
+DESCRIPTION="A collection of algorithms and sample code for various computer vision problems"
+HOMEPAGE="http://opencv.org"
+
+SRC_URI="
+ mirror://sourceforge/opencvlibrary/opencv-unix/${PV}/${P}.zip
+ https://github.com/Itseez/${PN}/archive/${PV}.zip -> ${P}.zip"
+
+LICENSE="BSD"
+SLOT="0/3.0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux"
+IUSE="cuda doc +eigen examples ffmpeg gstreamer gtk ieee1394 ipp jpeg jpeg2k libav opencl openexr opengl openmp pch png +python qt4 qt5 testprograms threads tiff v4l vtk xine"
+REQUIRED_USE="
+ python? ( ${PYTHON_REQUIRED_USE} )
+ qt4? ( !qt5 )
+ qt5? ( !qt4 )
+"
+
+# The following logic is intrinsic in the build system, but we do not enforce
+# it on the useflags since this just blocks emerging pointlessly:
+# gtk? ( !qt4 )
+# opengl? ( || ( gtk qt4 ) )
+# openmp? ( !threads )
+
+RDEPEND="
+ app-arch/bzip2
+ sys-libs/zlib
+ media-libs/libwebp
+ cuda? ( >=dev-util/nvidia-cuda-toolkit-5.5 )
+ ffmpeg? (
+ libav? ( media-video/libav:0= )
+ !libav? ( media-video/ffmpeg:0= )
+ )
+ gstreamer? (
+ media-libs/gstreamer:0.10
+ media-libs/gst-plugins-base:0.10
+ )
+ gtk? (
+ dev-libs/glib:2
+ x11-libs/gtk+:2
+ opengl? ( x11-libs/gtkglext )
+ )
+ java? ( >=virtual/jre-1.6:* )
+ jpeg? ( virtual/jpeg:0 )
+ jpeg2k? ( media-libs/jasper )
+ ieee1394? (
+ media-libs/libdc1394
+ sys-libs/libraw1394
+ )
+ ipp? ( sci-libs/ipp )
+ opencl? ( virtual/opencl )
+ openexr? ( media-libs/openexr )
+ opengl? ( virtual/opengl virtual/glu )
+ png? ( media-libs/libpng:0= )
+ python? ( ${PYTHON_DEPS} dev-python/numpy[${PYTHON_USEDEP}] )
+ qt4? (
+ dev-qt/qtgui:4
+ dev-qt/qttest:4
+ opengl? ( dev-qt/qtopengl:4 )
+ )
+ qt5? (
+ dev-qt/qtgui:5
+ dev-qt/qttest:5
+ dev-qt/qtconcurrent:5
+ opengl? ( dev-qt/qtopengl:5 )
+ )
+ threads? ( dev-cpp/tbb )
+ tiff? ( media-libs/tiff:0 )
+ v4l? ( >=media-libs/libv4l-0.8.3 )
+ vtk? ( sci-libs/vtk[rendering] )
+ xine? ( media-libs/xine-lib )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ eigen? ( dev-cpp/eigen:3 )
+ java? ( >=virtual/jdk-1.6 )
+"
+
+PATCHES=(
+ "${FILESDIR}/${P}-gles.patch"
+)
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+ java-pkg-opt-2_pkg_setup
+}
+
+src_prepare() {
+ base_src_prepare
+
+ # remove bundled stuff
+ rm -rf 3rdparty
+ sed -i \
+ -e '/add_subdirectory(.*3rdparty.*)/ d' \
+ CMakeLists.txt cmake/*cmake || die
+
+ java-pkg-opt-2_src_prepare
+}
+
+src_configure() {
+ if use openmp; then
+ tc-has-openmp || die "Please switch to an openmp compatible compiler"
+ fi
+
+ JAVA_ANT_ENCODING="iso-8859-1"
+ # set encoding so even this cmake build will pick it up.
+ export ANT_OPTS+=" -Dfile.encoding=iso-8859-1"
+ java-ant-2_src_configure
+
+ # please dont sort here, order is the same as in CMakeLists.txt
+ local mycmakeargs=(
+ # the optinal dependency libraries
+ $(cmake-utils_use_with ieee1394 1394)
+ -DWITH_AVFOUNDATION=OFF
+ -DWITH_CARBON=OFF
+ $(cmake-utils_use_with eigen)
+ $(cmake-utils_use_with ffmpeg)
+ $(cmake-utils_use_with gstreamer)
+ $(cmake-utils_use_with gtk)
+ $(cmake-utils_use_with ipp)
+ $(cmake-utils_use_with java)
+ $(cmake-utils_use_with jpeg2k JASPER)
+ $(cmake-utils_use_with jpeg)
+ $(cmake-utils_use_with opencl)
+ # $(cmake-utils_use_with opencl OPENCLAMDFFT)
+ # $(cmake-utils_use_with opencl OPENCLAMDBLAS)
+ $(cmake-utils_use_with openexr)
+ $(cmake-utils_use_with opengl)
+ $(cmake-utils_use_with openmp)
+ -DWITH_OPENNI=OFF # not packaged
+ $(cmake-utils_use_with png)
+ $(cmake-utils_use_build python opencv_python)
+ -DWITH_PVAPI=OFF # not packaged
+ -DWITH_QUICKTIME=OFF
+ $(cmake-utils_use_with threads TBB)
+ $(cmake-utils_use_with tiff)
+ -DWITH_UNICAP=OFF # not packaged
+ $(cmake-utils_use_with v4l V4L)
+ $(cmake-utils_use_with vtk VTK)
+ -DWITH_LIBV4L=ON
+ -DWITH_VIDEOINPUT=OFF # windows only
+ -DWITH_XIMEA=OFF # windows only
+ $(cmake-utils_use_with xine)
+ # the build components
+ -DBUILD_SHARED_LIBS=ON
+ -DBUILD_ANDROID_EXAMPLES=OFF
+ $(cmake-utils_use_build doc DOCS)
+ $(cmake-utils_use_build examples)
+ $(cmake-utils_use_build java opencv_java) #for -java bug #555650
+ -DBUILD_PERF_TESTS=OFF
+ $(cmake-utils_use_build testprograms TESTS)
+ # install examples, tests etc
+ $(cmake-utils_use examples INSTALL_C_EXAMPLES)
+ $(cmake-utils_use testprograms INSTALL_TESTS)
+ # build options
+ $(cmake-utils_use_enable pch PRECOMPILED_HEADERS)
+ -DOPENCV_EXTRA_FLAGS_RELEASE="" # black magic
+ )
+
+ if use qt4; then
+ mycmakeargs+=( "-DWITH_QT=4" )
+ elif use qt5; then
+ mycmakeargs+=( "-DWITH_QT=5" )
+ else
+ mycmakeargs+=( "-DWITH_QT=OFF" )
+ fi
+
+ if use cuda; then
+ if [[ "$(gcc-version)" > "4.7" ]]; then
+ ewarn "CUDA and >=sys-devel/gcc-4.8 do not play well together. Disabling CUDA support."
+ mycmakeargs+=( "-DWITH_CUDA=OFF" )
+ mycmakeargs+=( "-DWITH_CUBLAS=OFF" )
+ mycmakeargs+=( "-DWITH_CUFFT=OFF" )
+ else
+ mycmakeargs+=( "-DWITH_CUDA=ON" )
+ mycmakeargs+=( "-DWITH_CUBLAS=ON" )
+ mycmakeargs+=( "-DWITH_CUFFT=ON" )
+ fi
+ else
+ mycmakeargs+=( "-DWITH_CUDA=OFF" )
+ mycmakeargs+=( "-DWITH_CUBLAS=OFF" )
+ mycmakeargs+=( "-DWITH_CUFFT=OFF" )
+ fi
+
+ if use examples && use python; then
+ mycmakeargs+=( "-DINSTALL_PYTHON_EXAMPLES=ON" )
+ else
+ mycmakeargs+=( "-DINSTALL_PYTHON_EXAMPLES=OFF" )
+ fi
+
+ # things we want to be hard off or not yet figured out
+ mycmakeargs+=(
+ "-DOPENCV_BUILD_3RDPARTY_LIBS=OFF"
+ "-DBUILD_LATEX_DOCS=OFF"
+ "-DBUILD_PACKAGE=OFF"
+ "-DENABLE_PROFILING=OFF"
+ )
+
+ # things we want to be hard enabled not worth useflag
+ mycmakeargs+=(
+ "-DCMAKE_SKIP_RPATH=ON"
+ "-DOPENCV_DOC_INSTALL_PATH=${EPREFIX}/usr/share/doc/${PF}"
+ )
+
+ # hardcode cuda paths
+ mycmakeargs+=(
+ "-DCUDA_NPP_LIBRARY_ROOT_DIR=/opt/cuda"
+ )
+
+ # workaround for bug 413429
+ tc-export CC CXX
+
+ cmake-utils_src_configure
+}
diff --git a/media-libs/openexr/Manifest b/media-libs/openexr/Manifest
new file mode 100644
index 000000000000..27baa76ea1bc
--- /dev/null
+++ b/media-libs/openexr/Manifest
@@ -0,0 +1,4 @@
+DIST openexr-1.7.0.tar.gz 13542910 SHA256 b68a2164d01bd028d15bd96af2704634a344e291dc7cc2019a662045d8c52ca4 SHA512 1fb033f909961a9778b762241e09946d19c7e75bbade7b5a942bb159eec3af9200afd722c3170165ad4b1fa602d9dbe6938112aad1716e7c7e6b8c37ee3980e0 WHIRLPOOL 2519ab03da10034f185494fe0a9f0a3cbcc6bbac44b51491448d6e389740bbde8148103183317a48735e1d04f51981ba796505be1f50f5aad10fb651f7c724d8
+DIST openexr-2.0.1.tar.gz 12609335 SHA256 b9924d2f9d57376ff99234209231ad97a47f5cfebd18a5d0570db6d1a220685a SHA512 b35e3e795496f9d4a56352c907bcffef14ae062b189c4e1df35f3ab08c5e9abf829fa9149db3198d60088fa9633816650011e5f7871e07324801b95549d6695b WHIRLPOOL 6e07792d197c8b116653bb47b0514ae23e3e33d81b76b78932b224c5422c3821d8edb72d09567cd18e5e8b0204d3f15a2574daf03836839ed7dddea23cfb79cb
+DIST openexr-2.1.0.tar.gz 13680816 SHA256 54486b454073c1dcb5ae9892cf0f730ffefe62f38176325281505093fd218a14 SHA512 d69924331c3392b8063229391414bb90f16ce317c76cfffe5fe0fcbb25e576f6ace8320b51c2a9987fee912cedd8e69116d4b49ba716b4a5f011131a81815403 WHIRLPOOL 45d73a57dc933a4398f52b4b04a417aca5fba482c04ecd312a6cedd5af6d5991b3d68b90e0f86bb7053ed021ffa09146bb2e33258b991e039f17ecef07ad1a32
+DIST openexr-2.2.0.tar.gz 14489661 SHA256 36a012f6c43213f840ce29a8b182700f6cf6b214bea0d5735594136b44914231 SHA512 017abbeeb6b814508180721bc8e8940094965c4c55b135a198c6bcb109a04bf7f72e4aee81ee72cb2185fe818a41d892b383e8d2d59f40c673198948cb79279a WHIRLPOOL 42828db61abb629d64e765e0ae9a049ad601737e932334974ae1ddc6e7325d35a817eaa1e590a9179c71d092542570be60d26ab750c9ac9078b02e85697f5b29
diff --git a/media-libs/openexr/files/openexr-1.7.0-gcc43.patch b/media-libs/openexr/files/openexr-1.7.0-gcc43.patch
new file mode 100644
index 000000000000..ab99eb9a19fb
--- /dev/null
+++ b/media-libs/openexr/files/openexr-1.7.0-gcc43.patch
@@ -0,0 +1,11 @@
+--- exrenvmap/blurImage.cpp
++++ exrenvmap/blurImage.cpp
+@@ -39,6 +39,8 @@
+ //
+ //-----------------------------------------------------------------------------
+
++#include <cstring>
++
+ #include <blurImage.h>
+
+ #include <resizeImage.h>
diff --git a/media-libs/openexr/metadata.xml b/media-libs/openexr/metadata.xml
new file mode 100644
index 000000000000..edccfe5754d2
--- /dev/null
+++ b/media-libs/openexr/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-libs/openexr/openexr-1.7.0.ebuild b/media-libs/openexr/openexr-1.7.0.ebuild
new file mode 100644
index 000000000000..844b14434a45
--- /dev/null
+++ b/media-libs/openexr/openexr-1.7.0.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit eutils libtool
+
+DESCRIPTION="ILM's OpenEXR high dynamic-range image file format libraries"
+HOMEPAGE="http://openexr.com/"
+SRC_URI="http://download.savannah.gnu.org/releases/openexr/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 -arm hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="examples static-libs"
+
+RDEPEND="sys-libs/zlib
+ >=media-libs/ilmbase-1.0.2"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ sed -i \
+ -e "s:/var/tmp/:${T}:" \
+ IlmImfTest/tmpDir.h || die # Fix path for testsuite
+
+ epatch "${FILESDIR}"/${P}-gcc43.patch
+
+ elibtoolize
+}
+
+src_configure() {
+ econf \
+ --disable-dependency-tracking \
+ $(use_enable static-libs static) \
+ $(use_enable examples imfexamples)
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ docdir="/usr/share/doc/${PF}/pdf" \
+ examplesdir="/usr/share/doc/${PF}/examples" \
+ install || die
+
+ dodoc AUTHORS ChangeLog NEWS README
+
+ if use examples; then
+ dobin IlmImfExamples/imfexamples || die
+ else
+ rm -rf "${D}"/usr/share/doc/${PF}/examples
+ fi
+
+ find "${D}" -name '*.la' -delete
+}
diff --git a/media-libs/openexr/openexr-2.0.1-r1.ebuild b/media-libs/openexr/openexr-2.0.1-r1.ebuild
new file mode 100644
index 000000000000..c2df1842e426
--- /dev/null
+++ b/media-libs/openexr/openexr-2.0.1-r1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools-multilib
+
+DESCRIPTION="ILM's OpenEXR high dynamic-range image file format libraries"
+HOMEPAGE="http://openexr.com/"
+SRC_URI="http://download.savannah.gnu.org/releases/openexr/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/2.0.1" # 2.0.1 for the namespace off -> on switch, caused library renaming
+KEYWORDS="~amd64 -arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="examples static-libs"
+
+RDEPEND=">=sys-libs/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}]
+ >=media-libs/ilmbase-${PV}:=[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+DOCS=( AUTHORS ChangeLog NEWS README )
+
+src_prepare() {
+ # Fix path for testsuite
+ sed -i -e "s:/var/tmp/:${T}:" IlmImfTest/tmpDir.h || die
+ autotools-multilib_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable static-libs static)
+ $(use_enable examples imfexamples)
+ )
+ autotools-multilib_src_configure
+}
+
+src_install() {
+ autotools-multilib_src_install \
+ docdir=/usr/share/doc/${PF}/pdf \
+ examplesdir=/usr/share/doc/${PF}/examples
+
+ docompress -x /usr/share/doc/${PF}/examples
+
+ if ! use examples; then
+ rm -rf "${ED}"/usr/share/doc/${PF}/examples
+ fi
+}
diff --git a/media-libs/openexr/openexr-2.1.0.ebuild b/media-libs/openexr/openexr-2.1.0.ebuild
new file mode 100644
index 000000000000..335bcf3a62c1
--- /dev/null
+++ b/media-libs/openexr/openexr-2.1.0.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools-multilib
+
+DESCRIPTION="ILM's OpenEXR high dynamic-range image file format libraries"
+HOMEPAGE="http://openexr.com/"
+SRC_URI="http://download.savannah.gnu.org/releases/openexr/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/21" # 21 from SONAME
+KEYWORDS="amd64 -arm hppa ~ia64 ppc ppc64 ~sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~x86-solaris"
+IUSE="examples static-libs"
+
+RDEPEND=">=sys-libs/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}]
+ >=media-libs/ilmbase-${PV}:=[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+DOCS=( AUTHORS ChangeLog NEWS README )
+
+src_prepare() {
+ # Fix path for testsuite
+ sed -i -e "s:/var/tmp/:${T}:" IlmImfTest/tmpDir.h || die
+ autotools-multilib_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable static-libs static)
+ $(use_enable examples imfexamples)
+ )
+ autotools-multilib_src_configure
+}
+
+src_install() {
+ autotools-multilib_src_install \
+ docdir="${EPREFIX}"/usr/share/doc/${PF}/pdf \
+ examplesdir="${EPREFIX}"/usr/share/doc/${PF}/examples
+
+ docompress -x /usr/share/doc/${PF}/examples
+
+ if ! use examples; then
+ rm -rf "${ED}"/usr/share/doc/${PF}/examples
+ fi
+}
diff --git a/media-libs/openexr/openexr-2.2.0.ebuild b/media-libs/openexr/openexr-2.2.0.ebuild
new file mode 100644
index 000000000000..142bf1ef1f35
--- /dev/null
+++ b/media-libs/openexr/openexr-2.2.0.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 autotools-multilib
+
+DESCRIPTION="ILM's OpenEXR high dynamic-range image file format libraries"
+HOMEPAGE="http://openexr.com/"
+SRC_URI="http://download.savannah.gnu.org/releases/openexr/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/22" # based on SONAME
+KEYWORDS="~amd64 -arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~x86-solaris"
+IUSE="examples static-libs"
+
+RDEPEND=">=sys-libs/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}]
+ >=media-libs/ilmbase-${PV}:=[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+DOCS=( AUTHORS ChangeLog NEWS README )
+
+src_prepare() {
+ # Fix path for testsuite
+ sed -i -e "s:/var/tmp/:${T}:" IlmImfTest/tmpDir.h || die
+ autotools-multilib_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable static-libs static)
+ $(use_enable examples imfexamples)
+ )
+ autotools-multilib_src_configure
+}
+
+src_install() {
+ autotools-multilib_src_install \
+ docdir="${EPREFIX}"/usr/share/doc/${PF}/pdf \
+ examplesdir="${EPREFIX}"/usr/share/doc/${PF}/examples
+
+ docompress -x /usr/share/doc/${PF}/examples
+ use examples || rm -rf "${ED}"/usr/share/doc/${PF}/examples
+}
diff --git a/media-libs/openexr_ctl/Manifest b/media-libs/openexr_ctl/Manifest
new file mode 100644
index 000000000000..fd7acb57df55
--- /dev/null
+++ b/media-libs/openexr_ctl/Manifest
@@ -0,0 +1 @@
+DIST openexr_ctl-1.0.1.tar.gz 362864 SHA256 2d88d624e24fce64ee8494d4dd46e33684f93941e1ca46024554d1ab6ed5e9c9 SHA512 831a06dc83ac53ae9b520629dbd24d3a7cd24f3ab5f484de37d1b232dd16fcf71392d163a7b9f9059bb8f30ff249f7f5a9fbc35730211ff98c8e13dcf386898a WHIRLPOOL efedffbd18b6b1a0fb8cfdc22b2a95a34aaf142b35e23fe8b1dd047aefd992590deed066f5994d30c23ae5af3bc60486b41f00d391d9d5c60668f6f86edb4c2a
diff --git a/media-libs/openexr_ctl/files/openexr_ctl-1.0.1-configure_gcc43.patch b/media-libs/openexr_ctl/files/openexr_ctl-1.0.1-configure_gcc43.patch
new file mode 100644
index 000000000000..604d4237458d
--- /dev/null
+++ b/media-libs/openexr_ctl/files/openexr_ctl-1.0.1-configure_gcc43.patch
@@ -0,0 +1,22 @@
+diff -up openexr_ctl-1.0.1/configure.conf_gcc43 openexr_ctl-1.0.1/configure
+--- openexr_ctl-1.0.1/configure.conf_gcc43 2008-01-09 17:08:57.000000000 +0100
++++ openexr_ctl-1.0.1/configure 2008-01-09 17:10:25.000000000 +0100
+@@ -20851,6 +20851,7 @@ cat >>conftest.$ac_ext <<_ACEOF
+
+ #include <CtlSimdInterpreter.h>
+ #include <Iex.h>
++#include <cstdlib>
+
+ int
+ main ()
+diff -up openexr_ctl-1.0.1/configure.ac.conf_gcc43 openexr_ctl-1.0.1/configure.ac
+--- openexr_ctl-1.0.1/configure.ac.conf_gcc43 2008-01-09 17:11:25.000000000 +0100
++++ openexr_ctl-1.0.1/configure.ac 2008-01-09 17:12:17.000000000 +0100
+@@ -108,6 +108,7 @@ AM_COMPILELINKRUN(
+ [$CTL_LIBS],[[
+ #include <CtlSimdInterpreter.h>
+ #include <Iex.h>
++#include <cstdlib>
+ ]],
+ [[Ctl::SimdInterpreter interp; interp.setMaxInstCount(10);]],
+ AC_MSG_RESULT([The ctl test program succeeded.]),
diff --git a/media-libs/openexr_ctl/files/openexr_ctl-1.0.1-gcc43.patch b/media-libs/openexr_ctl/files/openexr_ctl-1.0.1-gcc43.patch
new file mode 100644
index 000000000000..349d4f083ca6
--- /dev/null
+++ b/media-libs/openexr_ctl/files/openexr_ctl-1.0.1-gcc43.patch
@@ -0,0 +1,34 @@
+diff -up openexr_ctl-1.0.1/exrdpx/main.cpp.gcc43 openexr_ctl-1.0.1/exrdpx/main.cpp
+--- openexr_ctl-1.0.1/exrdpx/main.cpp.gcc43 2007-07-25 08:28:17.000000000 +0200
++++ openexr_ctl-1.0.1/exrdpx/main.cpp 2008-01-08 20:27:14.000000000 +0100
+@@ -60,6 +60,8 @@
+ #include <iostream>
+ #include <string>
+ #include <exception>
++#include <cstdlib>
++#include <cstring>
+
+ using namespace std;
+ using namespace Imf;
+diff -up openexr_ctl-1.0.1/exr_ctl_exr/applyCtl.cpp.gcc43 openexr_ctl-1.0.1/exr_ctl_exr/applyCtl.cpp
+--- openexr_ctl-1.0.1/exr_ctl_exr/applyCtl.cpp.gcc43 2008-01-08 20:30:30.000000000 +0100
++++ openexr_ctl-1.0.1/exr_ctl_exr/applyCtl.cpp 2008-01-08 20:33:02.000000000 +0100
+@@ -64,6 +64,7 @@
+ #include <iostream>
+ #include <vector>
+ #include <string>
++#include <cstdlib>
+
+ using namespace std;
+ using namespace Ctl;
+diff -up openexr_ctl-1.0.1/exr_ctl_exr/main.cpp.gcc43 openexr_ctl-1.0.1/exr_ctl_exr/main.cpp
+--- openexr_ctl-1.0.1/exr_ctl_exr/main.cpp.gcc43 2008-01-08 20:34:32.000000000 +0100
++++ openexr_ctl-1.0.1/exr_ctl_exr/main.cpp 2008-01-08 20:35:10.000000000 +0100
+@@ -59,6 +59,7 @@
+ #include <iostream>
+ #include <string>
+ #include <exception>
++#include <cstdlib>
+ #include <ImfFloatAttribute.h>
+ #include <ImfVecAttribute.h>
+
diff --git a/media-libs/openexr_ctl/files/openexr_ctl-1.0.1-gcc44.patch b/media-libs/openexr_ctl/files/openexr_ctl-1.0.1-gcc44.patch
new file mode 100644
index 000000000000..08530bdeaad3
--- /dev/null
+++ b/media-libs/openexr_ctl/files/openexr_ctl-1.0.1-gcc44.patch
@@ -0,0 +1,11 @@
+diff -ur openexr_ctl-1.0.1.orig/exr_ctl_exr/applyCtl.cpp openexr_ctl-1.0.1/exr_ctl_exr/applyCtl.cpp
+--- openexr_ctl-1.0.1.orig/exr_ctl_exr/applyCtl.cpp 2007-07-13 06:24:37.000000000 +0300
++++ openexr_ctl-1.0.1/exr_ctl_exr/applyCtl.cpp 2009-07-30 11:46:29.000000000 +0300
+@@ -60,6 +60,7 @@
+ #include <ImfStandardAttributes.h>
+ #include <ImfHeader.h>
+ #include <ImfFrameBuffer.h>
++#include <cstdio>
+ #include <cassert>
+ #include <iostream>
+ #include <vector>
diff --git a/media-libs/openexr_ctl/files/openexr_ctl-1.0.1-namespace.patch b/media-libs/openexr_ctl/files/openexr_ctl-1.0.1-namespace.patch
new file mode 100644
index 000000000000..7c30515f122d
--- /dev/null
+++ b/media-libs/openexr_ctl/files/openexr_ctl-1.0.1-namespace.patch
@@ -0,0 +1,18 @@
+http://lists.gnu.org/archive/html/openexr-devel/2013-04/msg00031.html
+
+--- IlmImfCtl/ImfCtlApplyTransforms.h
++++ IlmImfCtl/ImfCtlApplyTransforms.h
+@@ -186,12 +186,7 @@
+ #include <vector>
+ #include <ImathBox.h>
+ #include <ImfThreading.h>
+-
+-namespace Imf
+-{
+- class Header;
+- class FrameBuffer;
+-}
++#include <ImfForward.h>
+
+ namespace Ctl
+ {
diff --git a/media-libs/openexr_ctl/files/openexr_ctl-1.0.1-pkgconfig.patch b/media-libs/openexr_ctl/files/openexr_ctl-1.0.1-pkgconfig.patch
new file mode 100644
index 000000000000..e35bdfc11a5c
--- /dev/null
+++ b/media-libs/openexr_ctl/files/openexr_ctl-1.0.1-pkgconfig.patch
@@ -0,0 +1,12 @@
+diff -up openexr_ctl-1.0.1/OpenEXR_CTL.pc.in.pkgconfig openexr_ctl-1.0.1/OpenEXR_CTL.pc.in
+--- openexr_ctl-1.0.1/OpenEXR_CTL.pc.in.pkgconfig 2008-01-09 15:17:58.000000000 +0100
++++ openexr_ctl-1.0.1/OpenEXR_CTL.pc.in 2008-01-09 15:24:52.000000000 +0100
+@@ -7,5 +7,6 @@ OpenEXR_includedir=@includedir@/OpenEXR
+ Name: OpenEXR_CTL
+ Description: Simplified OpenEXR interface to CTL
+ Version: @OPENEXR_CTL_VERSION@
+-Libs: -L${libdir} -lIlmImfCtl @OPENEXR_LDFLAGS@ @CTL_LDFLAGS@
+-Cflags: @CTL_CXXFLAGS_PC@ @OPENEXR_CXXFLAGS@ -I${OpenEXR_includedir}
++Requires: CTL , OpenEXR
++Libs: -L${libdir} -lIlmImfCtl
++Cflags: -I${OpenEXR_includedir}
diff --git a/media-libs/openexr_ctl/metadata.xml b/media-libs/openexr_ctl/metadata.xml
new file mode 100644
index 000000000000..de95417e2be2
--- /dev/null
+++ b/media-libs/openexr_ctl/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">ampasctl</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/openexr_ctl/openexr_ctl-1.0.1-r1.ebuild b/media-libs/openexr_ctl/openexr_ctl-1.0.1-r1.ebuild
new file mode 100644
index 000000000000..31ebc77a73a0
--- /dev/null
+++ b/media-libs/openexr_ctl/openexr_ctl-1.0.1-r1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="OpenEXR CTL libraries"
+HOMEPAGE="http://sourceforge.net/projects/ampasctl"
+SRC_URI="mirror://sourceforge/ampasctl/${P}.tar.gz"
+
+LICENSE="AMPAS"
+SLOT="0"
+KEYWORDS="amd64 hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd"
+IUSE="static-libs"
+
+RDEPEND="<media-libs/ilmbase-2.0.0:=
+ <media-libs/openexr-2.0.0:=
+ media-libs/ctl:="
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS="AUTHORS ChangeLog NEWS README"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-{,configure_}gcc43.patch \
+ "${FILESDIR}"/${P}-pkgconfig.patch \
+ "${FILESDIR}"/${P}-gcc44.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ prune_libtool_files
+}
diff --git a/media-libs/openexr_ctl/openexr_ctl-1.0.1-r2.ebuild b/media-libs/openexr_ctl/openexr_ctl-1.0.1-r2.ebuild
new file mode 100644
index 000000000000..ad33d046af19
--- /dev/null
+++ b/media-libs/openexr_ctl/openexr_ctl-1.0.1-r2.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="OpenEXR CTL libraries"
+HOMEPAGE="http://sourceforge.net/projects/ampasctl"
+SRC_URI="mirror://sourceforge/ampasctl/${P}.tar.gz"
+
+LICENSE="AMPAS"
+SLOT="0"
+KEYWORDS="amd64 hppa ~ia64 ppc ppc64 ~sparc x86 ~x86-fbsd"
+IUSE="static-libs"
+
+RDEPEND=">=media-libs/ilmbase-2.0.1:=
+ >=media-libs/openexr-2.0.1:=
+ media-libs/ctl:="
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS="AUTHORS ChangeLog NEWS README"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-{,configure_}gcc43.patch \
+ "${FILESDIR}"/${P}-pkgconfig.patch \
+ "${FILESDIR}"/${P}-gcc44.patch \
+ "${FILESDIR}"/${P}-namespace.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ prune_libtool_files
+}
diff --git a/media-libs/opengl-apple/files/gl.pc b/media-libs/opengl-apple/files/gl.pc
new file mode 100644
index 000000000000..91921c1c443c
--- /dev/null
+++ b/media-libs/opengl-apple/files/gl.pc
@@ -0,0 +1,11 @@
+prefix=@GENTOO_PORTAGE_EPREFIX@/usr
+exec_prefix=${prefix}
+libdir=${prefix}/lib
+includedir=${prefix}/include
+
+Name: gl
+Description: Apple OpenGL library
+Version: 1.0.0
+# media-libs/opengl-apple provides symlinks to /.../X11/lib/libGL.?.?.dylib
+Libs: -L${libdir} -lGL
+Cflags: -I${includedir}
diff --git a/media-libs/opengl-apple/metadata.xml b/media-libs/opengl-apple/metadata.xml
new file mode 100644
index 000000000000..f737f232e3bf
--- /dev/null
+++ b/media-libs/opengl-apple/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>prefix</herd>
+</pkgmetadata>
diff --git a/media-libs/opengl-apple/opengl-apple-3.ebuild b/media-libs/opengl-apple/opengl-apple-3.ebuild
new file mode 100644
index 000000000000..256d8e36287f
--- /dev/null
+++ b/media-libs/opengl-apple/opengl-apple-3.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+DESCRIPTION="Links to Apple's OpenGL X11 implementation"
+HOMEPAGE="http://www.apple.com/"
+LICENSE="public-domain"
+KEYWORDS="-* ~ppc-macos ~x64-macos ~x86-macos"
+SLOT=0
+IUSE=""
+
+DEPEND=">=app-eselect/eselect-opengl-1.0.8-r1
+ x11-proto/glproto"
+RDEPEND="${DEPEND}"
+
+X11_OPENGL_DIR="/usr/X11R6"
+
+pkg_setup() {
+ [[ ! -d ${X11_OPENGL_DIR} ]] && \
+ die "${X11_OPENGL_DIR} not found, do you have X11/Xquartz installed?"
+}
+
+src_install() {
+ dodir /usr/lib/opengl/${PN}/{lib,include}
+ dodir /usr/include/GL
+
+ cd "${ED}"/usr/lib/opengl/${PN}/include || die
+ ln -s "${X11_OPENGL_DIR}"/include/GL/gl.h || die
+ ln -s "${X11_OPENGL_DIR}"/include/GL/glext.h || die
+ ln -s "${X11_OPENGL_DIR}"/include/GL/glx.h || die
+ ln -s "${X11_OPENGL_DIR}"/include/GL/glxext.h || die
+ ln -s "${X11_OPENGL_DIR}"/include/GL/glxmd.h || die
+ ln -s "${X11_OPENGL_DIR}"/include/GL/glxproto.h || die
+ ln -s "${X11_OPENGL_DIR}"/include/GL/glxtokens.h || die
+ cd "${ED}"/usr/lib/opengl/${PN}/lib || die
+ ln -s "${X11_OPENGL_DIR}"/lib/libGL.dylib || die
+
+ cd "${ED}"/usr/include/GL || die
+ ln -s "${X11_OPENGL_DIR}"/include/GL/glu.h || die
+ ln -s "${X11_OPENGL_DIR}"/include/GL/GLwDrawA.h || die
+ ln -s "${X11_OPENGL_DIR}"/include/GL/osmesa.h || die
+ cd "${ED}"/usr/lib || die
+ ln -s "${X11_OPENGL_DIR}"/lib/libGLU.dylib || die
+ ln -s "${X11_OPENGL_DIR}"/lib/libGLw.a || die
+}
+
+pkg_postinst() {
+ # Set as default VM if none exists
+ eselect opengl set --use-old ${PN}
+
+ elog "Note: you're using your OSX (pre-)installed OpenGL X11 implementation from ${X11_OPENGL_DIR}"
+}
diff --git a/media-libs/opengl-apple/opengl-apple-4.ebuild b/media-libs/opengl-apple/opengl-apple-4.ebuild
new file mode 100644
index 000000000000..c4315944cccb
--- /dev/null
+++ b/media-libs/opengl-apple/opengl-apple-4.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit prefix
+
+DESCRIPTION="Links to Apple's OpenGL X11 implementation"
+HOMEPAGE="http://www.apple.com/"
+LICENSE="public-domain"
+KEYWORDS="-* ~ppc-macos ~x64-macos ~x86-macos"
+SLOT=0
+IUSE=""
+
+DEPEND=">=app-eselect/eselect-opengl-1.0.8-r1
+ x11-proto/glproto"
+RDEPEND="${DEPEND}"
+
+X11_OPENGL_DIR="/usr/X11R6"
+
+pkg_setup() {
+ [[ ! -d ${X11_OPENGL_DIR} ]] && \
+ die "${X11_OPENGL_DIR} not found, do you have X11/Xquartz installed?"
+}
+
+src_prepare() {
+ cp "${FILESDIR}"/gl.pc .
+ eprefixify gl.pc
+}
+
+src_install() {
+ dodir /usr/lib/opengl/${PN}/{lib,include}
+ dodir /usr/include/GL
+
+ cd "${ED}"/usr/lib/opengl/${PN}/include || die
+ ln -s "${X11_OPENGL_DIR}"/include/GL/gl.h || die
+ ln -s "${X11_OPENGL_DIR}"/include/GL/glext.h || die
+ ln -s "${X11_OPENGL_DIR}"/include/GL/glx.h || die
+ ln -s "${X11_OPENGL_DIR}"/include/GL/glxext.h || die
+ ln -s "${X11_OPENGL_DIR}"/include/GL/glxmd.h || die
+ ln -s "${X11_OPENGL_DIR}"/include/GL/glxproto.h || die
+ ln -s "${X11_OPENGL_DIR}"/include/GL/glxtokens.h || die
+ cd "${ED}"/usr/lib/opengl/${PN}/lib || die
+ ln -s "${X11_OPENGL_DIR}"/lib/libGL.dylib || die
+
+ cd "${ED}"/usr/include/GL || die
+ ln -s "${X11_OPENGL_DIR}"/include/GL/glu.h || die
+ ln -s "${X11_OPENGL_DIR}"/include/GL/GLwDrawA.h || die
+ ln -s "${X11_OPENGL_DIR}"/include/GL/osmesa.h || die
+ cd "${ED}"/usr/lib || die
+ ln -s "${X11_OPENGL_DIR}"/lib/libGLU.dylib || die
+ ln -s "${X11_OPENGL_DIR}"/lib/libGLw.a || die
+
+ # bug #337965
+ insinto /usr/lib/pkgconfig
+ doins "${WORKDIR}"/gl.pc
+}
+
+pkg_postinst() {
+ # Set as default VM if none exists
+ eselect opengl set --use-old ${PN}
+
+ elog "Note: you're using your OSX (pre-)installed OpenGL X11 implementation from ${X11_OPENGL_DIR}"
+}
diff --git a/media-libs/opengl-apple/opengl-apple-5.ebuild b/media-libs/opengl-apple/opengl-apple-5.ebuild
new file mode 100644
index 000000000000..b9df286d3c5b
--- /dev/null
+++ b/media-libs/opengl-apple/opengl-apple-5.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit prefix
+
+DESCRIPTION="Links to Apple's OpenGL X11 implementation"
+HOMEPAGE="http://www.apple.com/"
+LICENSE="public-domain"
+KEYWORDS="-* ~ppc-macos ~x64-macos ~x86-macos"
+SLOT=0
+IUSE=""
+
+DEPEND=">=app-eselect/eselect-opengl-1.0.8-r1
+ x11-proto/glproto"
+RDEPEND="${DEPEND}"
+
+X11_OPENGL_DIR="/usr/X11R6"
+
+pkg_setup() {
+ [[ ! -d ${X11_OPENGL_DIR} ]] && \
+ die "${X11_OPENGL_DIR} not found, do you have X11/Xquartz installed?"
+}
+
+src_prepare() {
+ cp "${FILESDIR}"/gl.pc .
+ eprefixify gl.pc
+}
+
+src_install() {
+ dodir /usr/lib/opengl/${PN}/{lib,include}
+ dodir /usr/include/GL
+
+ cd "${ED}"/usr/lib/opengl/${PN}/include || die
+ ln -s "${X11_OPENGL_DIR}"/include/GL || die
+ cd "${ED}"/usr/lib/opengl/${PN}/lib || die
+ ln -s "${X11_OPENGL_DIR}"/lib/libGL.dylib || die
+
+ cd "${ED}"/usr/include/GL || die
+ ln -s "${X11_OPENGL_DIR}"/include/GL/glu.h || die
+ ln -s "${X11_OPENGL_DIR}"/include/GL/GLwDrawA.h || die
+ ln -s "${X11_OPENGL_DIR}"/include/GL/osmesa.h || die
+ cd "${ED}"/usr/lib || die
+ ln -s "${X11_OPENGL_DIR}"/lib/libGLU.dylib || die
+ ln -s "${X11_OPENGL_DIR}"/lib/libGLw.a || die
+
+ # bug #337965
+ insinto /usr/lib/pkgconfig
+ doins "${WORKDIR}"/gl.pc
+}
+
+pkg_postinst() {
+ # Set as default VM if none exists
+ eselect opengl set --use-old ${PN}
+
+ elog "Note: you're using your OSX (pre-)installed OpenGL X11 implementation from ${X11_OPENGL_DIR}"
+}
diff --git a/media-libs/opengtl/Manifest b/media-libs/opengtl/Manifest
new file mode 100644
index 000000000000..74e031052b1d
--- /dev/null
+++ b/media-libs/opengtl/Manifest
@@ -0,0 +1,2 @@
+DIST OpenGTL-0.9.18.tar.bz2 536113 SHA256 f094b3d2a1a60519975bb3badc05e704f2b93c7a3d2cb753041f2ff27cfcd9f8 SHA512 101c200641d93eb2a31c75bdc80ccc7d7e7f79ea7cf2d4280205e86d2a6ca6357444055dab8a8e4b882067f1aad8b6746a4821d0209a0e53393ce3965b42fb50 WHIRLPOOL 735ea8f1af4b4ca83a441f50362e7a0840487629ec29576374d8e4b757a7ef616b5cbe746b3cfaa34e0532e653026c5d56f2ebb675e9c05acd47e8c3d3ddde42
+DIST opengtl-0.9.18-llvm-3.3.patch 27930 SHA256 c43418bc039660ae86cb86b8b8175342793cb1361c699faa9b6342bc896e3d6c SHA512 1c1d09e08ed1a00c57c86632c4d27edb9fac436e6e86638f176aead513ba3b1bc5216d2d07fa8fbf570156dc0a20e18e8c29f776a180d638cfb4ca6d1d8ea3b7 WHIRLPOOL 3edbe720a563516f38f3bd1650d5bc7ae258447be2432a41d14432bb6a2c3b7bf5e6ef0ac62b45a34fd77a4a0cf9053b01f0a3432e7f76ed96c526a3c970913c
diff --git a/media-libs/opengtl/files/opengtl-0.9.18-memcpy.patch b/media-libs/opengtl/files/opengtl-0.9.18-memcpy.patch
new file mode 100644
index 000000000000..3e6ecd557f41
--- /dev/null
+++ b/media-libs/opengtl/files/opengtl-0.9.18-memcpy.patch
@@ -0,0 +1,11 @@
+diff -r 99a2017746c0 Extensions/PngDC/PngDC.cpp
+--- a/Extensions/PngDC/PngDC.cpp Wed Jan 30 05:28:12 2013 +1100
++++ b/Extensions/PngDC/PngDC.cpp Tue Apr 16 01:59:10 2013 +1000
+@@ -20,6 +20,7 @@
+ #include "PngDC.h"
+
+ #include <png.h>
++#include <string.h>
+
+ #include <config-endian.h>
+
diff --git a/media-libs/opengtl/files/opengtl-0.9.18-underlinking.patch b/media-libs/opengtl/files/opengtl-0.9.18-underlinking.patch
new file mode 100644
index 000000000000..6e6d1bda0af9
--- /dev/null
+++ b/media-libs/opengtl/files/opengtl-0.9.18-underlinking.patch
@@ -0,0 +1,30 @@
+changeset: 1792:99a2017746c0
+tag: tip
+user: Michael Palimaka <kensington@gentoo.org>
+date: Wed Jan 30 05:28:12 2013 +1100
+summary: Fix underlinking.
+
+diff -r e150672a54ad -r 99a2017746c0 OpenGTL/GTLCore/CMakeLists.txt
+--- a/OpenGTL/GTLCore/CMakeLists.txt Sat Dec 29 12:27:12 2012 +0100
++++ b/OpenGTL/GTLCore/CMakeLists.txt Wed Jan 30 05:28:12 2013 +1100
+@@ -10,6 +10,10 @@
+
+ ## GTLCore library ##
+
++if(PTHREAD_FOUND)
++ set(GTLCore_Thread_LIBS pthread)
++endif(PTHREAD_FOUND)
++
+ set(GTLCore_SRCS
+ AbstractColorConverter.cpp
+ AbstractImage.cpp
+@@ -110,7 +114,7 @@
+ set(EXTRA_GTLCORE_LINK_OPTIONS -Wl,-u,__ZTVN4llvm3JITE )
+ endif()
+
+-target_link_libraries(GTLCore ${LLVM_LDFLAGS} ${LLVM_LIBS} ${EXTRA_GTLCORE_LINK_OPTIONS})
++target_link_libraries(GTLCore ${LLVM_LDFLAGS} ${LLVM_LIBS} ${GTLCore_Thread_LIBS} ${EXTRA_GTLCORE_LINK_OPTIONS})
+
+ # Set the ABI version of the library
+ set_target_properties(GTLCore PROPERTIES VERSION ${OPENGTL_LIB_VERSION} SOVERSION ${OPENGTL_LIB_SOVERSION} )
+
diff --git a/media-libs/opengtl/metadata.xml b/media-libs/opengtl/metadata.xml
new file mode 100644
index 000000000000..8d1e86a9cefb
--- /dev/null
+++ b/media-libs/opengtl/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-libs/opengtl/opengtl-0.9.18.ebuild b/media-libs/opengtl/opengtl-0.9.18.ebuild
new file mode 100644
index 000000000000..b10fa83f098b
--- /dev/null
+++ b/media-libs/opengtl/opengtl-0.9.18.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_P="OpenGTL-${PV}"
+
+inherit cmake-utils
+
+DESCRIPTION="Collection of libraries for graphics transformation algorithms"
+HOMEPAGE="http://opengtl.org/"
+SRC_URI="http://download.opengtl.org/${MY_P}.tar.bz2 http://dev.gentoo.org/~creffett/distfiles/${PN}-0.9.18-llvm-3.3.patch"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm x86"
+IUSE="debug test"
+
+RDEPEND="
+ media-libs/libpng:0=
+ (
+ <sys-devel/llvm-3.4
+ >=sys-devel/llvm-3.1
+ )
+"
+DEPEND="${RDEPEND}
+ test? ( dev-util/lcov )
+"
+
+RESTRICT="test"
+
+S=${WORKDIR}/${MY_P}
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.9.18-memcpy.patch"
+ "${FILESDIR}/${PN}-0.9.18-underlinking.patch"
+)
+
+src_prepare() {
+ if has_version ">=sys-devel/llvm-3.3"; then
+ epatch "${DISTDIR}/${PN}-0.9.18-llvm-3.3.patch"
+ fi
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE
+ $(cmake-utils_use debug OPENGTL_ENABLE_DEBUG_OUTPUT)
+ $(cmake-utils_use test OPENGTL_BUILD_TESTS)
+ $(cmake-utils_use test OPENGTL_CODE_COVERAGE)
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ newdoc OpenShiva/doc/reference/region.pdf OpenShiva.pdf
+}
diff --git a/media-libs/openh264/Manifest b/media-libs/openh264/Manifest
new file mode 100644
index 000000000000..8e367fe6692a
--- /dev/null
+++ b/media-libs/openh264/Manifest
@@ -0,0 +1,5 @@
+DIST gmp-api-Firefox36.tar.gz 15182 SHA256 2cdc1284a939cda0a6fe45a8c798637cc7d959c9d757d5b0c6d2dc650a037624 SHA512 69f367a83cca01c046abf1e6d4fdb2e1587d321ffd5c7795d33ce6b271e9e9ea588e1c363ac84c3e690410e79aa73cdf64b8f12e4726392b1adbe1a1900e4bd8 WHIRLPOOL c218e9e8ae80a84495f495dcaf545eae2e3fa611a43e6dd5b1e21adeda1dd000ac8160d8a1439d523395c36d939a762aadba18db724bd3c02169c47ffc1a1bc9
+DIST gmp-api-Firefox38.tar.gz 16209 SHA256 6b156afe850c0d6faf0492ca5feeff4358e50ddc5ce3022ddcc6905a5bd21c80 SHA512 9aecbc84b1ba2fcfcb10c56680d92a72dd55f7ef7b8a68a3950dbce65fb7eb2c5e6a211149889f618bef2468ba1f3f8c01dc63e86e0a30d9295b019b75657eb8 WHIRLPOOL c12eb175ddf11f0ece400cc34bf9d5e690494fd4630c12667eed3765b66a625a1f9a3b41e20fc5a0c0f614eafbd75b6ddd5bd2a827077cfaac507a3f41990c42
+DIST gmp-openh264-1.2_p20141104.tar.xz 11874976 SHA256 d8359d004116eba6d2444486abd81f82f9cfedf2ab209b9586fc195d199096f8 SHA512 7acd982b54cd32ee2270967131792d869a9c72dca5ba8da796c61517e99b3a40f7c53ab6228c03f72c57f4eb9d3bef536645ee33ccf08a098f0662f97f811856 WHIRLPOOL 5d997bc9349d06f5d485ce654408d5f3cd1314ccdf10c21c25c59933ffe2c4b325ec32444bb74aa754b73fcc381b5b723df9f48989cba3e7137e8a594a47e24c
+DIST openh264-1.3.1.tar.gz 37642592 SHA256 b0a9a61840b4a58fbadd2a0640a81917c0ee84e922d2476c1dbcb9f29b85d7a0 SHA512 e85e300a85cefc89a66fdebebe2f059c2c3262518f614c660535312b3ea441064a1288824bc488b741bcffa076b165eabf998d1b535fb377516695326be625c9 WHIRLPOOL 5acc9645b65c2b75d117bcbff24554e0b9567514427bc8d9dc8e8eda0d45080600bec12cd8d435ab605f8226cfc321d1c371c292cf26d30a29a77fd187db6dc4
+DIST openh264-1.4.0.tar.gz 37681189 SHA256 a1b9a7a7f1ee204793c613789a505f0971bc2b03b3dbd8f05d9c4a3f3b900a22 SHA512 8192494698cb5557331be56ecbe2b7b143e0ed95739a69a88bdb34a58f66710ef1cd9234f1e98c9b16432a41a3243634e6ca63c58119315f2f9360cb2959e42b WHIRLPOOL 0d9f1f728fbceef35a5e22a6fe4c9dd42fbf84d41fe14e938194438542af182d3994694ffcd68f58798f14c8096b49b0aecad23f58ec6bdbc02de43b8d783532
diff --git a/media-libs/openh264/files/pkgconfig-pathfix.patch b/media-libs/openh264/files/pkgconfig-pathfix.patch
new file mode 100644
index 000000000000..455b91331df4
--- /dev/null
+++ b/media-libs/openh264/files/pkgconfig-pathfix.patch
@@ -0,0 +1,40 @@
+--- a/Makefile 2015-03-25 03:43:00.000000000 -0400
++++ b/Makefile 2015-06-18 17:28:42.436110085 -0400
+@@ -24,6 +24,7 @@
+ OBJ=o
+ DESTDIR=
+ SHAREDLIB_DIR=$(PREFIX)/lib
++INCLUDES_DIR=$(PREFIX)/include
+ PROJECT_NAME=openh264
+ MODULE_NAME=gmpopenh264
+ GMP_API_BRANCH=Firefox38
+@@ -229,14 +230,14 @@
+ endif
+
+ $(PROJECT_NAME).pc: $(PROJECT_NAME).pc.in
+- @sed -e 's;@prefix@;$(PREFIX);' -e 's;@VERSION@;$(VERSION);' -e 's;@LIBS@;;' -e 's;@LIBS_PRIVATE@;$(STATIC_LDFLAGS);' < $(PROJECT_NAME).pc.in > $@
++ @sed -e 's;@prefix@;$(PREFIX);' -e 's;@sharedlibdir@;$(SHAREDLIB_DIR);' -e 's;@includesdir@;$(INCLUDES_DIR);' -e 's;@VERSION@;$(VERSION);' -e 's;@LIBS@;;' -e 's;@LIBS_PRIVATE@;$(STATIC_LDFLAGS);' < $(PROJECT_NAME).pc.in > $@
+
+ $(PROJECT_NAME)-static.pc: $(PROJECT_NAME).pc.in
+- @sed -e 's;@prefix@;$(PREFIX);' -e 's;@VERSION@;$(VERSION);' -e 's;@LIBS@;$(STATIC_LDFLAGS);' -e 's;@LIBS_PRIVATE@;;' < $(PROJECT_NAME).pc.in > $@
++ @sed -e 's;@prefix@;$(PREFIX);' -e 's;@sharedlibdir@;;' -e 's;@includesdir@;$(INCLUDES_DIR);' -e 's;@VERSION@;$(VERSION);' -e 's;@LIBS@;$(STATIC_LDFLAGS);' -e 's;@LIBS_PRIVATE@;;' < $(PROJECT_NAME).pc.in > $@
+
+ install-headers:
+- mkdir -p $(DESTDIR)/$(PREFIX)/include/wels
+- install -m 644 codec/api/svc/codec*.h $(DESTDIR)/$(PREFIX)/include/wels
++ mkdir -p $(DESTDIR)/$(INCLUDES_DIR)/wels
++ install -m 644 codec/api/svc/codec*.h $(DESTDIR)/$(INCLUDES_DIR)/wels
+
+ install-static-lib: $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX) install-headers
+ mkdir -p $(DESTDIR)/$(PREFIX)/lib
+--- a/openh264.pc.in 2015-06-18 17:32:58.356114757 -0400
++++ b/openh264.pc.in 2015-06-18 17:31:12.096112817 -0400
+@@ -1,6 +1,6 @@
+ prefix=@prefix@
+-libdir=${prefix}/lib
+-includedir=${prefix}/include
++libdir=@sharedlibdir@
++includedir=@includesdir@
+
+ Name: OpenH264
+ Description: OpenH264 is a codec library which supports H.264 encoding and decoding. It is suitable for use in real time applications such as WebRTC.
diff --git a/media-libs/openh264/metadata.xml b/media-libs/openh264/metadata.xml
new file mode 100644
index 000000000000..cc2cd190e848
--- /dev/null
+++ b/media-libs/openh264/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>axs@gentoo.org</email>
+ <name>Ian Stakenvicius</name>
+ </maintainer>
+ <use>
+ <flag name="plugin">Install the Gecko Media Plugin (GMP) for use with Mozilla packages</flag>
+ <flag name="utils">Install the CLI encoder and decoder utilities</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">mozilla/gmp-api</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/openh264/openh264-1.2_p20141104.ebuild b/media-libs/openh264/openh264-1.2_p20141104.ebuild
new file mode 100644
index 000000000000..729f6e1491ba
--- /dev/null
+++ b/media-libs/openh264/openh264-1.2_p20141104.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 nsplugins
+
+DESCRIPTION="Cisco OpenH264 library and Gecko Media Plugin for mozilla packages"
+HOMEPAGE="http://www.openh264.org/"
+SRC_URI="http://dev.gentoo.org/~axs/distfiles/gmp-${P}.tar.xz"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+plugin"
+
+RESTRICT="bindist"
+
+RDEPEND=""
+DEPEND="dev-lang/nasm"
+
+DOCS=( LICENSE CONTRIBUTORS README.md )
+
+S=${WORKDIR}/gmp-${P}
+
+src_compile() {
+ local mybits="ENABLE64BIT=No"
+ case "${ABI}" in
+ s390x|alpha|*64) mybits="ENABLE64BIT=Yes";;
+ esac
+ emake V=Yes ${mybits}
+ use plugin && emake V=Yes ${mybits} plugin
+}
+
+src_install() {
+ emake PREFIX="${ED}usr" LIBPREFIX="${ED}usr/$(get_libdir)/" \
+ install-headers
+
+ dolib libopenh264.so
+
+ if use plugin; then
+ local plugpath="usr/$(get_libdir)/${PLUGINS_DIR}/gmp-gmp${PN}/system-installed"
+ insinto "/${plugpath}"
+ doins libgmpopenh264.so gmpopenh264.info
+ echo "MOZ_GMP_PATH=\"${EROOT}${plugpath}\"" >"${T}"/98-moz-gmp-${PN}
+ doenvd "${T}"/98-moz-gmp-${PN}
+
+ cat <<PREFEOF >"${T}"/${P}.js
+pref("media.gmp-gmp${PN}.autoupdate", false);
+pref("media.gmp-gmp${PN}.version", "system-installed");
+PREFEOF
+
+ insinto /usr/$(get_libdir)/firefox/defaults/pref
+ doins "${T}"/${P}.js
+
+ insinto /usr/$(get_libdir)/seamonkey/defaults/pref
+ doins "${T}"/${P}.js
+ fi
+}
+
+pkg_postinst() {
+ if use plugin; then
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog "Please restart your login session, in order for the session's environment"
+ elog "to include the new MOZ_GMP_PATH variable."
+ elog ""
+ fi
+ elog "This package attempts to override the mozilla GMPInstaller auto-update process,"
+ elog "however even if it is not successful in doing so the profile-installed plugin"
+ elog "will not be used unless this package is removed. This package will take precedence"
+ elog "over any gmp-gmpopenh264 that may be installed in a user's profile."
+ elog ""
+ fi
+}
diff --git a/media-libs/openh264/openh264-1.3.1.ebuild b/media-libs/openh264/openh264-1.3.1.ebuild
new file mode 100644
index 000000000000..cd3c1cb4af3f
--- /dev/null
+++ b/media-libs/openh264/openh264-1.3.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 nsplugins
+
+MOZVER=36
+DESCRIPTION="Cisco OpenH264 library and Gecko Media Plugin for mozilla packages"
+HOMEPAGE="http://www.openh264.org/"
+SRC_URI="https://github.com/cisco/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ https://github.com/mozilla/gmp-api/archive/Firefox${MOZVER}.tar.gz -> gmp-api-Firefox${MOZVER}.tar.gz"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+plugin"
+
+RESTRICT="bindist"
+
+RDEPEND="!<www-client/firefox-${MOZVER}"
+DEPEND="dev-lang/nasm"
+
+DOCS=( LICENSE CONTRIBUTORS README.md )
+
+src_prepare() {
+ ln -s ../gmp-api-Firefox${MOZVER} gmp-api
+}
+
+src_compile() {
+ local mybits="ENABLE64BIT=No"
+ case "${ABI}" in
+ s390x|alpha|*64) mybits="ENABLE64BIT=Yes";;
+ esac
+ emake V=Yes ${mybits}
+ use plugin && emake V=Yes ${mybits} plugin
+}
+
+src_install() {
+ emake PREFIX="${ED}usr" LIBPREFIX="${ED}usr/$(get_libdir)/" \
+ install-headers
+
+ dolib libopenh264.so
+
+ if use plugin; then
+ local plugpath="usr/$(get_libdir)/${PLUGINS_DIR}/gmp-gmp${PN}/system-installed"
+ insinto "/${plugpath}"
+ doins libgmpopenh264.so gmpopenh264.info
+ echo "MOZ_GMP_PATH=\"${EROOT}${plugpath}\"" >"${T}"/98-moz-gmp-${PN}
+ doenvd "${T}"/98-moz-gmp-${PN}
+
+ cat <<PREFEOF >"${T}"/${P}.js
+pref("media.gmp-gmp${PN}.autoupdate", false);
+pref("media.gmp-gmp${PN}.version", "system-installed");
+PREFEOF
+
+ insinto /usr/$(get_libdir)/firefox/defaults/pref
+ doins "${T}"/${P}.js
+
+ insinto /usr/$(get_libdir)/seamonkey/defaults/pref
+ doins "${T}"/${P}.js
+ fi
+}
+
+pkg_postinst() {
+ if use plugin; then
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog "Please restart your login session, in order for the session's environment"
+ elog "to include the new MOZ_GMP_PATH variable."
+ elog ""
+ fi
+ elog "This package attempts to override the mozilla GMPInstaller auto-update process,"
+ elog "however even if it is not successful in doing so the profile-installed plugin"
+ elog "will not be used unless this package is removed. This package will take precedence"
+ elog "over any gmp-gmpopenh264 that may be installed in a user's profile."
+ elog ""
+ fi
+}
diff --git a/media-libs/openh264/openh264-1.4.0.ebuild b/media-libs/openh264/openh264-1.4.0.ebuild
new file mode 100644
index 000000000000..61108ffe47c4
--- /dev/null
+++ b/media-libs/openh264/openh264-1.4.0.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit nsplugins multilib-minimal
+
+MOZVER=38
+DESCRIPTION="Cisco OpenH264 library and Gecko Media Plugin for Mozilla packages"
+HOMEPAGE="http://www.openh264.org/"
+SRC_URI="https://github.com/cisco/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ https://github.com/mozilla/gmp-api/archive/Firefox${MOZVER}.tar.gz -> gmp-api-Firefox${MOZVER}.tar.gz"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+plugin utils"
+
+RESTRICT="bindist"
+
+RDEPEND="!<www-client/firefox-${MOZVER}"
+DEPEND="dev-lang/nasm"
+
+DOCS=( LICENSE CONTRIBUTORS README.md )
+
+src_prepare() {
+ epatch "${FILESDIR}"/pkgconfig-pathfix.patch
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ ln -s "${WORKDIR}"/gmp-api-Firefox${MOZVER} gmp-api || die
+}
+
+emakecmd() {
+ CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
+ emake V=Yes CFLAGS_M32="" CFLAGS_M64="" CFLAGS_OPT="" \
+ PREFIX="${EPREFIX}/usr" \
+ SHAREDLIB_DIR="${EPREFIX}/usr/$(get_libdir)" \
+ INCLUDES_DIR="${EPREFIX}/usr/include/${PN}" \
+ $@
+}
+
+multilib_src_compile() {
+ local mybits="ENABLE64BIT=No"
+ case "${ABI}" in
+ s390x|alpha|*64) mybits="ENABLE64BIT=Yes";;
+ esac
+
+ emakecmd ${mybits} ${tgt}
+ use plugin && emakecmd ${mybits} plugin
+}
+
+multilib_src_install() {
+ emakecmd DESTDIR="${D}" install-shared
+
+ use utils && dobin h264{enc,dec}
+
+ if use plugin; then
+ local plugpath="usr/$(get_libdir)/${PLUGINS_DIR}/gmp-gmp${PN}/system-installed"
+ insinto "/${plugpath}"
+ doins libgmpopenh264.so* gmpopenh264.info
+ echo "MOZ_GMP_PATH=\"${EROOT}${plugpath}\"" >"${T}"/98-moz-gmp-${PN}
+ doenvd "${T}"/98-moz-gmp-${PN}
+
+ cat <<PREFEOF >"${T}"/${P}.js
+pref("media.gmp-gmp${PN}.autoupdate", false);
+pref("media.gmp-gmp${PN}.version", "system-installed");
+PREFEOF
+
+ insinto /usr/$(get_libdir)/firefox/defaults/pref
+ doins "${T}"/${P}.js
+
+ insinto /usr/$(get_libdir)/seamonkey/defaults/pref
+ doins "${T}"/${P}.js
+ fi
+}
+
+pkg_postinst() {
+ if use plugin; then
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog "Please restart your login session, in order for the session's environment"
+ elog "to include the new MOZ_GMP_PATH variable."
+ elog ""
+ fi
+ elog "This package attempts to override the Mozilla GMPInstaller auto-update process,"
+ elog "however even if it is not successful in doing so the profile-installed plugin"
+ elog "will not be used unless this package is removed. This package will take precedence"
+ elog "over any gmp-gmpopenh264 that may be installed in a user's profile."
+ elog ""
+ fi
+}
diff --git a/media-libs/openimageio/Manifest b/media-libs/openimageio/Manifest
new file mode 100644
index 000000000000..7ef8747dac8e
--- /dev/null
+++ b/media-libs/openimageio/Manifest
@@ -0,0 +1,3 @@
+DIST openimageio-1.1.1.tar.gz 8217144 SHA256 a1cf6251edb597d31ccec3a74f516c3c9ce6e116dfb5edb3e4bd87d528d4700d SHA512 cf3e1371c6f0333f40506b08dc3fa6c0acecfb149e2e99159e893825e0d838db8ac1150e316e3568024568ed19bbcb473b4f38a61779a03fe9706ee476ec5943 WHIRLPOOL 78420497e1b65140f439e67c295102de5def4ed92eac1bf7b3b417d79d4634a0b149d08eafb8127aa1c5f1eb770334a14b244bee1f7af61ef31dc2abb2309aae
+DIST openimageio-1.1.7.tar.gz 8300700 SHA256 81ad2ab957b93155d092700d2356b2f3bb6ae010dff3077bf1403905790cc13d SHA512 5596bbd57e569e5e9437e65e7d8e45e634c20eee62cc3115f72ec57664e5cc222137c248c3302d89df58ac1efabd198adfdc867a59945cc2324bff5be18ee2c8 WHIRLPOOL cab7c2d604d890b314cdfbd912754790e5d54c9ae2094ab3caff09313bc89e09b6b9795d6ea12903fed2550c5a00dca2cf5579ec6f80a8271775b84db3bd0cfa
+DIST openimageio-1.3.5.tar.gz 13472488 SHA256 18c9297e0d8b582191619a66ae6b7d9db2780f4874464ea462b22321c568a1af SHA512 15c4a53ab4d139839da9e9b4bbbf8ad6e00da98e73e0373cec136ce8f54b0ceae0daa2b1680c8ddab49e1680825a08be7778a9f1b7a13dd30e020b8a8c517b95 WHIRLPOOL d994fa07626667fa1c00ec221f7cdc5bb482fb321deb84e23fd87bc323d09372db955a338b0a6e030b7af4fcc22ecdb22b270dc2bbce532be39ed9ca2cbb3df6
diff --git a/media-libs/openimageio/files/openimageio-1.1.1-x86-build.patch b/media-libs/openimageio/files/openimageio-1.1.1-x86-build.patch
new file mode 100644
index 000000000000..59821660cc8e
--- /dev/null
+++ b/media-libs/openimageio/files/openimageio-1.1.1-x86-build.patch
@@ -0,0 +1,15 @@
+http://bugs.gentoo.org/444784
+
+--- src/libutil/SHA1.cpp
++++ src/libutil/SHA1.cpp
+@@ -8,9 +8,9 @@
+
+ // If compiling with MFC, you might want to add #include "StdAfx.h"
+
++#include "SHA1.h"
+ #include "hash.h"
+ #include "dassert.h"
+-#include "SHA1.h"
+
+ #ifdef SHA1_UTILITY_FUNCTIONS
+ #define SHA1_MAX_FILE_BUFFER 8000
diff --git a/media-libs/openimageio/files/openimageio-1.3.5-openexr-2.x.patch b/media-libs/openimageio/files/openimageio-1.3.5-openexr-2.x.patch
new file mode 100644
index 000000000000..0668f0466a9a
--- /dev/null
+++ b/media-libs/openimageio/files/openimageio-1.3.5-openexr-2.x.patch
@@ -0,0 +1,36 @@
+There is no IlmBaseConfig.h in OpenEXR 2.x
+
+../libOpenImageIO/libOpenImageIO.so.1.3.5: error: undefined reference to 'pthread_mutexattr_init'
+../libOpenImageIO/libOpenImageIO.so.1.3.5: error: undefined reference to 'pthread_mutexattr_settype'
+../libOpenImageIO/libOpenImageIO.so.1.3.5: error: undefined reference to 'pthread_mutexattr_destroy'
+../libOpenImageIO/libOpenImageIO.so.1.3.5: error: undefined reference to 'pthread_spin_lock'
+../libOpenImageIO/libOpenImageIO.so.1.3.5: error: undefined reference to 'pthread_spin_unlock'
+../libOpenImageIO/libOpenImageIO.so.1.3.5: error: undefined reference to 'pthread_spin_destroy'
+../libOpenImageIO/libOpenImageIO.so.1.3.5: error: undefined reference to 'pthread_spin_init'
+../libOpenImageIO/libOpenImageIO.so.1.3.5: error: undefined reference to 'pthread_detach'
+
+--- src/cmake/modules/FindIlmBase.cmake
++++ src/cmake/modules/FindIlmBase.cmake
+@@ -176,17 +176,11 @@
+ set (ILMBASE_CACHED_STATE ${ILMBASE_CURRENT_STATE}
+ CACHE INTERNAL "State last seen by FindIlmBase.cmake" FORCE)
+
+-# Link with pthreads if required
+-if (NOT WIN32 AND EXISTS ${ILMBASE_INCLUDE_DIR}/OpenEXR/IlmBaseConfig.h)
+- file (STRINGS ${ILMBASE_INCLUDE_DIR}/OpenEXR/IlmBaseConfig.h
+- ILMBASE_HAVE_PTHREAD
+- REGEX "^[ \\t]*#define[ \\t]+HAVE_PTHREAD[ \\t]1[ \\t]*\$"
+- )
+- if (ILMBASE_HAVE_PTHREAD)
+- find_package (Threads)
+- if (CMAKE_USE_PTHREADS_INIT)
+- set (ILMBASE_PTHREADS ${CMAKE_THREAD_LIBS_INIT})
+- endif ()
++# Always link to pthreads for OpenEXR 2.x
++if (NOT WIN32)
++ find_package (Threads)
++ if (CMAKE_USE_PTHREADS_INIT)
++ set (ILMBASE_PTHREADS ${CMAKE_THREAD_LIBS_INIT})
+ endif ()
+ endif ()
+
diff --git a/media-libs/openimageio/metadata.xml b/media-libs/openimageio/metadata.xml
new file mode 100644
index 000000000000..c557813f5e6e
--- /dev/null
+++ b/media-libs/openimageio/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>graphics</herd>
+ <use>
+ <flag name="colorio">Use <pkg>media-gfx/opencolorio</pkg></flag>
+ <flag name="opencv">Use <pkg>media-libs/opencv</pkg></flag>
+ <flag name="tbb">Use <pkg>dev-cpp/tbb</pkg></flag>
+ </use>
+ <upstream>
+ <remote-id type="github">OpenImageIO/oiio</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/openimageio/openimageio-1.1.1.ebuild b/media-libs/openimageio/openimageio-1.1.1.ebuild
new file mode 100644
index 000000000000..3cba5772220a
--- /dev/null
+++ b/media-libs/openimageio/openimageio-1.1.1.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_DEPEND="python? 2:2.7"
+
+inherit cmake-utils eutils multilib python vcs-snapshot
+
+DESCRIPTION="A library for reading and writing images"
+HOMEPAGE="http://sites.google.com/site/openimageio/ http://github.com/OpenImageIO"
+SRC_URI="http://github.com/OpenImageIO/oiio/tarball/Release-${PV} -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ~ppc64 x86"
+IUSE="jpeg2k colorio opencv opengl python qt4 tbb +truetype"
+
+RESTRICT="test" #431412
+
+RDEPEND="dev-libs/boost[python?]
+ dev-libs/pugixml
+ media-libs/glew
+ media-libs/ilmbase
+ media-libs/libpng:0
+ >=media-libs/libwebp-0.2.1
+ media-libs/openexr
+ media-libs/tiff:0
+ sci-libs/hdf5
+ sys-libs/zlib
+ virtual/jpeg
+ jpeg2k? ( >=media-libs/openjpeg-1.5:0 )
+ colorio? ( >=media-libs/opencolorio-1.0.7 )
+ opencv? (
+ >=media-libs/opencv-2.3
+ || ( <media-libs/opencv-2.4.8 >media-libs/opencv-2.4.8[python?] )
+ )
+ opengl? (
+ virtual/glu
+ virtual/opengl
+ )
+ qt4? (
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ dev-qt/qtopengl:4
+ )
+ tbb? ( dev-cpp/tbb )
+ truetype? ( >=media-libs/freetype-2 )"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${P}/src
+
+pkg_setup() {
+ if use python; then
+ python_set_active_version 2
+ python_pkg_setup
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-x86-build.patch #444784
+
+ # remove bundled code to make it build
+ # https://github.com/OpenImageIO/oiio/issues/403
+ rm */pugixml* || die
+
+ # fix man page building
+ # https://github.com/OpenImageIO/oiio/issues/404
+ use qt4 || sed -i -e '/list.*APPEND.*cli_tools.*iv/d' doc/CMakeLists.txt
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DLIB_INSTALL_DIR=/usr/$(get_libdir)
+ -DBUILDSTATIC=OFF
+ -DLINKSTATIC=OFF
+ $(use python && echo -DPYLIB_INSTALL_DIR=$(python_get_sitedir))
+ -DUSE_EXTERNAL_PUGIXML=ON
+ -DUSE_FIELD3D=OFF # missing in Portage
+ $(cmake-utils_use_use truetype freetype)
+ $(cmake-utils_use_use colorio OCIO)
+ $(cmake-utils_use_use opencv)
+ $(cmake-utils_use_use opengl)
+ $(cmake-utils_use_use jpeg2k OPENJPEG)
+ $(cmake-utils_use_use python)
+ $(cmake-utils_use_use qt4 QT)
+ $(cmake-utils_use_use tbb)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ rm -rf "${ED}"/usr/share/doc
+ dodoc ../{CHANGES,CREDITS,README*} # doc/CLA-{CORPORATE,INDIVIDUAL}
+ docinto pdf
+ dodoc doc/*.pdf
+}
diff --git a/media-libs/openimageio/openimageio-1.1.7.ebuild b/media-libs/openimageio/openimageio-1.1.7.ebuild
new file mode 100644
index 000000000000..b3c62cc5004e
--- /dev/null
+++ b/media-libs/openimageio/openimageio-1.1.7.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils eutils multilib python-single-r1 vcs-snapshot
+
+DESCRIPTION="A library for reading and writing images"
+HOMEPAGE="http://sites.google.com/site/openimageio/ http://github.com/OpenImageIO"
+SRC_URI="http://github.com/OpenImageIO/oiio/archive/Release-${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64 ~x86"
+IUSE="jpeg2k colorio opencv opengl python qt4 tbb +truetype"
+
+RESTRICT="test" #431412
+
+RDEPEND="dev-libs/boost[python?]
+ dev-libs/pugixml:=
+ media-libs/glew:=
+ media-libs/ilmbase:=
+ media-libs/libpng:0=
+ >=media-libs/libwebp-0.2.1:=
+ media-libs/openexr:=
+ media-libs/tiff:0=
+ sci-libs/hdf5
+ sys-libs/zlib:=
+ virtual/jpeg
+ jpeg2k? ( >=media-libs/openjpeg-1.5:0= )
+ colorio? ( >=media-libs/opencolorio-1.0.7:= )
+ opencv? (
+ >=media-libs/opencv-2.3:=
+ python? ( || ( <media-libs/opencv-2.4.8 >=media-libs/opencv-2.4.8[python,${PYTHON_USEDEP}] ) )
+ )
+ opengl? (
+ virtual/glu
+ virtual/opengl
+ )
+ python? ( ${PYTHON_DEPS} )
+ qt4? (
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ dev-qt/qtopengl:4
+ )
+ tbb? ( dev-cpp/tbb )
+ truetype? ( media-libs/freetype:2= )"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${P}/src
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # remove bundled code to make it build
+ # https://github.com/OpenImageIO/oiio/issues/403
+ rm */pugixml* || die
+
+ # fix man page building
+ # https://github.com/OpenImageIO/oiio/issues/404
+ use qt4 || sed -i -e '/list.*APPEND.*cli_tools.*iv/d' doc/CMakeLists.txt
+
+ use python && python_fix_shebang .
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DLIB_INSTALL_DIR="/usr/$(get_libdir)"
+ -DBUILDSTATIC=OFF
+ -DLINKSTATIC=OFF
+ $(use python && echo -DPYLIB_INSTALL_DIR="$(python_get_sitedir)")
+ -DUSE_EXTERNAL_PUGIXML=ON
+ -DUSE_FIELD3D=OFF # missing in Portage
+ $(cmake-utils_use_use truetype freetype)
+ $(cmake-utils_use_use colorio OCIO)
+ $(cmake-utils_use_use opencv)
+ $(cmake-utils_use_use opengl)
+ $(cmake-utils_use_use jpeg2k OPENJPEG)
+ $(cmake-utils_use_use python)
+ $(cmake-utils_use_use qt4 QT)
+ $(cmake-utils_use_use tbb)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ rm -rf "${ED}"/usr/share/doc
+ dodoc ../{CHANGES,CREDITS,README*} # doc/CLA-{CORPORATE,INDIVIDUAL}
+ docinto pdf
+ dodoc doc/*.pdf
+}
diff --git a/media-libs/openimageio/openimageio-1.3.5.ebuild b/media-libs/openimageio/openimageio-1.3.5.ebuild
new file mode 100644
index 000000000000..71460d6fe44a
--- /dev/null
+++ b/media-libs/openimageio/openimageio-1.3.5.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils eutils multilib python-single-r1 vcs-snapshot
+
+DESCRIPTION="A library for reading and writing images"
+HOMEPAGE="http://sites.google.com/site/openimageio/ http://github.com/OpenImageIO"
+SRC_URI="http://github.com/OpenImageIO/oiio/archive/Release-${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ~ppc64 x86"
+IUSE="gif jpeg2k colorio opencv opengl python qt4 ssl tbb +truetype"
+
+RESTRICT="test" #431412
+
+RDEPEND="dev-libs/boost[python?]
+ dev-libs/pugixml:=
+ media-libs/glew:=
+ media-libs/ilmbase:=
+ media-libs/libpng:0=
+ >=media-libs/libwebp-0.2.1:=
+ media-libs/openexr:=
+ media-libs/tiff:0=
+ sci-libs/hdf5
+ sys-libs/zlib:=
+ virtual/jpeg
+ gif? ( media-libs/giflib )
+ jpeg2k? ( >=media-libs/openjpeg-1.5:0= )
+ colorio? ( >=media-libs/opencolorio-1.0.7:= )
+ opencv? (
+ >=media-libs/opencv-2.3:=
+ python? ( || ( <media-libs/opencv-2.4.8 >=media-libs/opencv-2.4.8[python,${PYTHON_USEDEP}] ) )
+ )
+ opengl? (
+ virtual/glu
+ virtual/opengl
+ )
+ python? ( ${PYTHON_DEPS} )
+ qt4? (
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ dev-qt/qtopengl:4
+ )
+ ssl? ( dev-libs/openssl:0 )
+ tbb? ( dev-cpp/tbb )
+ truetype? ( media-libs/freetype:2= )"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${P}/src
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-openexr-2.x.patch
+
+ # remove bundled code to make it build
+ # https://github.com/OpenImageIO/oiio/issues/403
+ rm */pugixml* || die
+
+ # fix man page building
+ # https://github.com/OpenImageIO/oiio/issues/404
+ use qt4 || sed -i -e '/list.*APPEND.*cli_tools.*iv/d' doc/CMakeLists.txt
+
+ use python && python_fix_shebang .
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DLIB_INSTALL_DIR="/usr/$(get_libdir)"
+ -DBUILDSTATIC=OFF
+ -DLINKSTATIC=OFF
+ $(use python && echo -DPYLIB_INSTALL_DIR="$(python_get_sitedir)")
+ -DUSE_EXTERNAL_PUGIXML=ON
+ -DUSE_FIELD3D=OFF # missing in Portage
+ -DOIIO_BUILD_TESTS=OFF # as they are RESTRICTed
+ -DSTOP_ON_WARNING=OFF
+ $(cmake-utils_use_use truetype freetype)
+ $(cmake-utils_use_use colorio OCIO)
+ $(cmake-utils_use_use opencv)
+ $(cmake-utils_use_use opengl)
+ $(cmake-utils_use_use jpeg2k OPENJPEG)
+ $(cmake-utils_use_use python)
+ $(cmake-utils_use_use qt4 QT)
+ $(cmake-utils_use_use tbb)
+ $(cmake-utils_use_use ssl OPENSSL)
+ $(cmake-utils_use_use gif)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ rm -rf "${ED}"/usr/share/doc
+ dodoc ../{CHANGES,CREDITS,README*} # doc/CLA-{CORPORATE,INDIVIDUAL}
+ docinto pdf
+ dodoc doc/*.pdf
+}
diff --git a/media-libs/openjpeg/Manifest b/media-libs/openjpeg/Manifest
new file mode 100644
index 000000000000..42a49bc709da
--- /dev/null
+++ b/media-libs/openjpeg/Manifest
@@ -0,0 +1,3 @@
+DIST openjpeg-1.5.2.tar.gz 1385702 SHA256 15df7b194a5d8dba0052cd21c17a4dc761149a770a907d73fffb972078c28a87 SHA512 b945cf4f8b5e3227a0c07120c94b0ed5bf30c901de73059ee1d47975f46744fb62bbe84cdb2917c6431128f400020874eb07160af870b5448ced897998b08862 WHIRLPOOL 4ca974b411baa1fad7821b3ea88ad5c6a39643098af32bd8e92f66ccaa534d36ef15f55711eba489e91254f667d5f917febdb09539ac9698709c00bf680d45fe
+DIST openjpeg-2.0.0.tar.gz 1770392 SHA256 334df538051555381ee3bbbe3a804c9c028a021401ba2960d6f35da66bf605d8 SHA512 4ef6b3b6933190c845cc376efbfe8bf655954668eb35c2b878c572107fb5d620fc2fc4df0e7de177c8798bee031f33350715c6da44ef07978df29762d89f29a6 WHIRLPOOL cfcc567a292c0a42d618c9f37b8665f98c580b768a74f63caa9f50b0747fed927c1fafe0b1bb86772ff56768c7a102e645792b960051a44da7a556ba4b41195d
+DIST openjpeg-2.1.0.tar.gz 1789675 SHA256 1232bb814fd88d8ed314c94f0bfebb03de8559583a33abbe8c64ef3fc0a8ff03 SHA512 3da84d7828a82c738f6ea5fe776c989283ba257cc6884aebfc090cee7e33c88471dee1a93f4a87a300b11f43b98f6624b838171f06227add24afcb1d57208df1 WHIRLPOOL 547dc65906a5dd6d34148675ec2be869ed18b0fef99f7f8632ebca0843e8764e575ca16ea1f7f839576f6de9464d29154171ca2187141e8141239f46468c8c2f
diff --git a/media-libs/openjpeg/files/openjpeg-2.0.0-build.patch b/media-libs/openjpeg/files/openjpeg-2.0.0-build.patch
new file mode 100644
index 000000000000..31ae12f213cb
--- /dev/null
+++ b/media-libs/openjpeg/files/openjpeg-2.0.0-build.patch
@@ -0,0 +1,14 @@
+--- openjpeg-2.0.0/CMakeLists.txt
++++ openjpeg-2.0.0/CMakeLists.txt
+@@ -279,11 +279,4 @@
+ DESTINATION ${OPENJPEG_INSTALL_PACKAGE_DIR}
+ )
+
+-#-----------------------------------------------------------------------------
+-# install CHANGES and LICENSE
+-if(EXISTS ${OPENJPEG_SOURCE_DIR}/CHANGES)
+- install(FILES CHANGES DESTINATION ${OPENJPEG_INSTALL_DOC_DIR})
+-endif()
+-install(FILES LICENSE DESTINATION ${OPENJPEG_INSTALL_DOC_DIR})
+-
+ include (cmake/OpenJPEGCPack.cmake)
diff --git a/media-libs/openjpeg/files/openjpeg-2.0.0-pkgconfig-static.patch b/media-libs/openjpeg/files/openjpeg-2.0.0-pkgconfig-static.patch
new file mode 100644
index 000000000000..60a5a47adbda
--- /dev/null
+++ b/media-libs/openjpeg/files/openjpeg-2.0.0-pkgconfig-static.patch
@@ -0,0 +1,10 @@
+Upstream issue 223, http://code.google.com/p/openjpeg/issues/detail?id=223
+
+--- openjpeg-2.0.0/src/lib/openjp2/libopenjp2.pc.cmake.in
++++ openjpeg-2.0.0/src/lib/openjp2/libopenjp2.pc.cmake.in
+@@ -10,4 +10,5 @@
+ URL: http://www.openjpeg.org/
+ Version: @OPENJPEG_VERSION@
+ Libs: -L${libdir} -lopenjp2
++Libs.private: -L${libdir} -lopenjp2 -lm
+ Cflags: -I${includedir}
diff --git a/media-libs/openjpeg/files/openjpeg-2.0.0-pkgconfig.patch b/media-libs/openjpeg/files/openjpeg-2.0.0-pkgconfig.patch
new file mode 100644
index 000000000000..656f4c20acd3
--- /dev/null
+++ b/media-libs/openjpeg/files/openjpeg-2.0.0-pkgconfig.patch
@@ -0,0 +1,37 @@
+Pkgconfig support http://code.google.com/p/openjpeg/source/detail?r=2250
+
+--- openjpeg-2.0.0/CMakeLists.txt
++++ openjpeg-2.0.0/CMakeLists.txt
+@@ -171,6 +171,16 @@
+ endif()
+
+ #-----------------------------------------------------------------------------
++# pkgconfig support
++if(UNIX)
++ # install in lib and not share (see multi-arch note above)
++ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/lib/openjp2/libopenjp2.pc.cmake.in
++ ${CMAKE_CURRENT_BINARY_DIR}/libopenjp2.pc @ONLY)
++ install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libopenjp2.pc DESTINATION
++ ${OPENJPEG_INSTALL_LIB_DIR}/pkgconfig )
++endif()
++
++#-----------------------------------------------------------------------------
+ # Compiler specific flags:
+ if(CMAKE_COMPILER_IS_GNUCC)
+ # For all builds, make sure openjpeg is std99 compliant:
+--- /dev/null
++++ openjpeg-2.0.0/src/lib/openjp2/libopenjp2.pc.cmake.in
+@@ -0,0 +1,13 @@
++prefix=@CMAKE_INSTALL_PREFIX@
++bindir=${prefix}/@OPENJPEG_INSTALL_BIN_DIR@
++mandir=${prefix}/@OPENJPEG_INSTALL_MAN_DIR@
++docdir=${prefix}/@OPENJPEG_INSTALL_DOC_DIR@
++libdir=${prefix}/@OPENJPEG_INSTALL_LIB_DIR@
++includedir=${prefix}/@OPENJPEG_INSTALL_INCLUDE_DIR@
++
++Name: openjp2
++Description: JPEG2000 library (Part 1 and 2)
++URL: http://www.openjpeg.org/
++Version: @OPENJPEG_VERSION@
++Libs: -L${libdir} -lopenjp2
++Cflags: -I${includedir}
diff --git a/media-libs/openjpeg/metadata.xml b/media-libs/openjpeg/metadata.xml
new file mode 100644
index 000000000000..f50e8dfa9018
--- /dev/null
+++ b/media-libs/openjpeg/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>graphics</herd>
+ <upstream>
+ <remote-id type="google-code">openjpeg</remote-id>
+ <remote-id type="sourceforge">openjpeg.mirror</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/openjpeg/openjpeg-1.5.2-r1.ebuild b/media-libs/openjpeg/openjpeg-1.5.2-r1.ebuild
new file mode 100644
index 000000000000..173597af93e8
--- /dev/null
+++ b/media-libs/openjpeg/openjpeg-1.5.2-r1.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit multilib cmake-multilib
+
+DESCRIPTION="An open-source JPEG 2000 library"
+HOMEPAGE="http://code.google.com/p/openjpeg/"
+SRC_URI="mirror://sourceforge/${PN}.mirror/${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0/5" # based on SONAME
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="doc static-libs test"
+
+RDEPEND="media-libs/lcms:2=
+ media-libs/libpng:0=
+ media-libs/tiff:0=
+ sys-libs/zlib:="
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )"
+
+DOCS=( AUTHORS CHANGES NEWS README THANKS )
+
+RESTRICT="test" #409263
+
+src_prepare() {
+ # Stop installing LICENSE file, and install CHANGES from DOCS instead:
+ sed -i -e '/INSTALL.*FILES.*DESTINATION.*OPENJPEG_INSTALL_DOC_DIR/d' CMakeLists.txt || die
+}
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ -DOPENJPEG_INSTALL_LIB_DIR="$(get_libdir)"
+ $(cmake-utils_use_build test TESTING)
+ -DBUILD_DOC=$(multilib_native_usex doc ON OFF)
+ -DBUILD_CODEC=$(multilib_is_native_abi && echo ON || echo OFF)
+ )
+
+ cmake-utils_src_configure
+
+ if use static-libs; then
+ mycmakeargs=(
+ -DOPENJPEG_INSTALL_LIB_DIR="$(get_libdir)"
+ $(cmake-utils_use_build test TESTING)
+ -DBUILD_SHARED_LIBS=OFF
+ -DBUILD_CODEC=OFF
+ )
+ BUILD_DIR=${BUILD_DIR}_static cmake-utils_src_configure
+ fi
+}
+
+multilib_src_compile() {
+ cmake-utils_src_compile
+
+ if use static-libs; then
+ BUILD_DIR=${BUILD_DIR}_static cmake-utils_src_compile
+ fi
+}
+
+multilib_src_install() {
+ if use static-libs; then
+ BUILD_DIR=${BUILD_DIR}_static cmake-utils_src_install
+ fi
+
+ cmake-utils_src_install
+
+ dosym openjpeg-1.5/openjpeg.h /usr/include/openjpeg.h
+ dosym libopenjpeg1.pc /usr/$(get_libdir)/pkgconfig/libopenjpeg.pc
+
+ if use doc && multilib_is_native_abi; then
+ dodoc -r doc/html
+ fi
+}
diff --git a/media-libs/openjpeg/openjpeg-1.5.2.ebuild b/media-libs/openjpeg/openjpeg-1.5.2.ebuild
new file mode 100644
index 000000000000..309f85b74271
--- /dev/null
+++ b/media-libs/openjpeg/openjpeg-1.5.2.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit multilib cmake-utils multilib-minimal
+
+DESCRIPTION="An open-source JPEG 2000 library"
+HOMEPAGE="http://code.google.com/p/openjpeg/"
+SRC_URI="mirror://sourceforge/${PN}.mirror/${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0/5" # based on SONAME
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="doc static-libs test"
+
+RDEPEND="media-libs/lcms:2=
+ media-libs/libpng:0=
+ media-libs/tiff:0=
+ sys-libs/zlib:="
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )"
+
+DOCS=( AUTHORS CHANGES NEWS README THANKS )
+
+RESTRICT="test" #409263
+
+src_prepare() {
+ # Stop installing LICENSE file, and install CHANGES from DOCS instead:
+ sed -i -e '/INSTALL.*FILES.*DESTINATION.*OPENJPEG_INSTALL_DOC_DIR/d' CMakeLists.txt || die
+}
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ -DOPENJPEG_INSTALL_LIB_DIR="$(get_libdir)"
+ $(cmake-utils_use_build test TESTING)
+ )
+
+ if multilib_is_native_abi; then
+ mycmakeargs+=( $(cmake-utils_use_build doc) )
+ else
+ mycmakeargs+=( -DBUILD_CODEC=OFF )
+ fi
+
+ cmake-utils_src_configure
+
+ if use static-libs; then
+ mycmakeargs=(
+ -DOPENJPEG_INSTALL_LIB_DIR="$(get_libdir)"
+ $(cmake-utils_use_build test TESTING)
+ -DBUILD_SHARED_LIBS=OFF
+ -DBUILD_CODEC=OFF
+ )
+ BUILD_DIR=${BUILD_DIR}_static cmake-utils_src_configure
+ fi
+}
+
+multilib_src_compile() {
+ cmake-utils_src_compile
+
+ if use static-libs; then
+ BUILD_DIR=${BUILD_DIR}_static cmake-utils_src_compile
+ fi
+}
+
+multilib_src_install() {
+ if use static-libs; then
+ BUILD_DIR=${BUILD_DIR}_static cmake-utils_src_install
+ #static bins overwritten by shared install
+ fi
+
+ cmake-utils_src_install
+
+ dosym openjpeg-1.5/openjpeg.h /usr/include/openjpeg.h
+ dosym libopenjpeg1.pc /usr/$(get_libdir)/pkgconfig/libopenjpeg.pc
+}
diff --git a/media-libs/openjpeg/openjpeg-2.0.0-r1.ebuild b/media-libs/openjpeg/openjpeg-2.0.0-r1.ebuild
new file mode 100644
index 000000000000..be6181cfb2ab
--- /dev/null
+++ b/media-libs/openjpeg/openjpeg-2.0.0-r1.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit cmake-utils multilib
+
+DESCRIPTION="An open-source JPEG 2000 library"
+HOMEPAGE="http://code.google.com/p/openjpeg/"
+SRC_URI="mirror://sourceforge/${PN}.mirror/${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="2"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="doc static-libs test"
+
+RDEPEND="media-libs/lcms:2=
+ media-libs/libpng:0=
+ media-libs/tiff:0=
+ sys-libs/zlib:="
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )"
+
+DOCS=( AUTHORS CHANGES NEWS README THANKS )
+
+PATCHES=( "${FILESDIR}"/${P}-pkgconfig.patch
+ "${FILESDIR}"/${P}-pkgconfig-static.patch )
+
+RESTRICT="test" #409263
+
+src_prepare() {
+ # Stop installing LICENSE file, and install CHANGES from DOCS instead:
+ sed -i -e '/install.*FILES.*DESTINATION.*OPENJPEG_INSTALL_DOC_DIR/d' CMakeLists.txt || die
+
+ # Install doxygen docs to the right directory:
+ sed -i -e "s:DESTINATION\s*share/doc:\0/${PF}:" doc/CMakeLists.txt || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DOPENJPEG_INSTALL_LIB_DIR="$(get_libdir)"
+ $(cmake-utils_use_build doc)
+ $(cmake-utils_use_build test TESTING)
+ )
+
+ cmake-utils_src_configure
+
+ if use static-libs; then
+ mycmakeargs=(
+ -DOPENJPEG_INSTALL_LIB_DIR="$(get_libdir)"
+ $(cmake-utils_use_build test TESTING)
+ -DBUILD_SHARED_LIBS=OFF
+ -DBUILD_CODEC=OFF
+ )
+ BUILD_DIR=${BUILD_DIR}_static cmake-utils_src_configure
+ fi
+}
+
+src_compile() {
+ cmake-utils_src_compile
+
+ if use static-libs; then
+ BUILD_DIR=${BUILD_DIR}_static cmake-utils_src_compile
+ fi
+}
+
+src_install() {
+ if use static-libs; then
+ BUILD_DIR=${BUILD_DIR}_static cmake-utils_src_install
+ fi
+
+ cmake-utils_src_install
+}
diff --git a/media-libs/openjpeg/openjpeg-2.0.0.ebuild b/media-libs/openjpeg/openjpeg-2.0.0.ebuild
new file mode 100644
index 000000000000..14330bdf92dd
--- /dev/null
+++ b/media-libs/openjpeg/openjpeg-2.0.0.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 cmake-utils multilib
+
+DESCRIPTION="An open-source JPEG 2000 library"
+HOMEPAGE="http://code.google.com/p/openjpeg/"
+SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="2"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="doc static-libs test"
+
+RDEPEND="media-libs/lcms:2=[static-libs?]
+ media-libs/libpng:0=[static-libs?]
+ media-libs/tiff:0=[static-libs?]
+ sys-libs/zlib:=[static-libs?]"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )"
+
+DOCS=( AUTHORS CHANGES NEWS README THANKS )
+
+PATCHES=( "${FILESDIR}"/${P}-build.patch
+ "${FILESDIR}"/${P}-pkgconfig.patch
+ "${FILESDIR}"/${P}-pkgconfig-static.patch )
+
+RESTRICT="test" #409263
+
+src_configure() {
+ local mycmakeargs=(
+ -DOPENJPEG_INSTALL_LIB_DIR="$(get_libdir)"
+ $(cmake-utils_use_build doc)
+ $(cmake-utils_use_build test TESTING)
+ )
+
+ cmake-utils_src_configure
+
+ if use static-libs ; then
+ mycmakeargs=(
+ -DOPENJPEG_INSTALL_LIB_DIR="$(get_libdir)"
+ $(cmake-utils_use_build test TESTING)
+ -DBUILD_SHARED_LIBS=OFF
+ )
+ BUILD_DIR=${BUILD_DIR}_static cmake-utils_src_configure
+ fi
+}
+
+src_compile() {
+ cmake-utils_src_compile
+
+ if use static-libs ; then
+ BUILD_DIR=${BUILD_DIR}_static cmake-utils_src_compile
+ fi
+}
+
+src_install() {
+ if use static-libs ; then
+ BUILD_DIR=${BUILD_DIR}_static cmake-utils_src_install
+ #static bins overwritten by shared install
+ fi
+
+ cmake-utils_src_install
+}
diff --git a/media-libs/openjpeg/openjpeg-2.1.0-r1.ebuild b/media-libs/openjpeg/openjpeg-2.1.0-r1.ebuild
new file mode 100644
index 000000000000..0a068bba947f
--- /dev/null
+++ b/media-libs/openjpeg/openjpeg-2.1.0-r1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit multilib cmake-multilib
+
+DESCRIPTION="An open-source JPEG 2000 library"
+HOMEPAGE="http://code.google.com/p/openjpeg/"
+SRC_URI="mirror://sourceforge/${PN}.mirror/${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="2/7" # based on SONAME
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="doc static-libs test"
+
+RDEPEND="media-libs/lcms:2=
+ media-libs/libpng:0=
+ media-libs/tiff:0=
+ sys-libs/zlib:="
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )"
+
+DOCS=( AUTHORS CHANGES NEWS README THANKS )
+
+RESTRICT="test" #409263
+
+src_prepare() {
+ # Stop installing LICENSE file, and install CHANGES from DOCS instead:
+ sed -i -e '/install.*FILES.*DESTINATION.*OPENJPEG_INSTALL_DOC_DIR/d' CMakeLists.txt || die
+
+ # Install doxygen docs to the right directory:
+ sed -i -e "s:DESTINATION\s*share/doc:\0/${PF}:" doc/CMakeLists.txt || die
+}
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ -DOPENJPEG_INSTALL_LIB_DIR="$(get_libdir)"
+ $(cmake-utils_use_build test TESTING)
+ -DBUILD_DOC=$(multilib_native_usex doc ON OFF)
+ -DBUILD_CODEC=$(multilib_is_native_abi && echo ON || echo OFF)
+ )
+
+ cmake-utils_src_configure
+
+ if use static-libs; then
+ mycmakeargs=(
+ -DOPENJPEG_INSTALL_LIB_DIR="$(get_libdir)"
+ $(cmake-utils_use_build test TESTING)
+ -DBUILD_SHARED_LIBS=OFF
+ -DBUILD_CODEC=OFF
+ )
+ BUILD_DIR=${BUILD_DIR}_static cmake-utils_src_configure
+ fi
+}
+
+multilib_src_compile() {
+ cmake-utils_src_compile
+
+ if use static-libs; then
+ BUILD_DIR=${BUILD_DIR}_static cmake-utils_src_compile
+ fi
+}
+
+multilib_src_install() {
+ if use static-libs; then
+ BUILD_DIR=${BUILD_DIR}_static cmake-utils_src_install
+ fi
+
+ cmake-utils_src_install
+}
diff --git a/media-libs/openjpeg/openjpeg-2.1.0.ebuild b/media-libs/openjpeg/openjpeg-2.1.0.ebuild
new file mode 100644
index 000000000000..05dc65fd7502
--- /dev/null
+++ b/media-libs/openjpeg/openjpeg-2.1.0.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit cmake-utils multilib
+
+DESCRIPTION="An open-source JPEG 2000 library"
+HOMEPAGE="http://code.google.com/p/openjpeg/"
+SRC_URI="mirror://sourceforge/${PN}.mirror/${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="2/7" # based on SONAME
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="doc static-libs test"
+
+RDEPEND="media-libs/lcms:2=[static-libs?]
+ media-libs/libpng:0=[static-libs?]
+ media-libs/tiff:0=[static-libs?]
+ sys-libs/zlib:=[static-libs?]"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )"
+
+DOCS=( AUTHORS CHANGES NEWS README THANKS )
+
+RESTRICT="test" #409263
+
+src_prepare() {
+ # Stop installing LICENSE file, and install CHANGES from DOCS instead:
+ sed -i -e '/install.*FILES.*DESTINATION.*OPENJPEG_INSTALL_DOC_DIR/d' CMakeLists.txt || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DOPENJPEG_INSTALL_LIB_DIR="$(get_libdir)"
+ $(cmake-utils_use_build doc)
+ $(cmake-utils_use_build test TESTING)
+ )
+
+ cmake-utils_src_configure
+
+ if use static-libs; then
+ mycmakeargs=(
+ -DOPENJPEG_INSTALL_LIB_DIR="$(get_libdir)"
+ $(cmake-utils_use_build test TESTING)
+ -DBUILD_SHARED_LIBS=OFF
+ )
+ BUILD_DIR=${BUILD_DIR}_static cmake-utils_src_configure
+ fi
+}
+
+src_compile() {
+ cmake-utils_src_compile
+
+ if use static-libs; then
+ BUILD_DIR=${BUILD_DIR}_static cmake-utils_src_compile
+ fi
+}
+
+src_install() {
+ if use static-libs; then
+ BUILD_DIR=${BUILD_DIR}_static cmake-utils_src_install
+ #static bins overwritten by shared install
+ fi
+
+ cmake-utils_src_install
+}
diff --git a/media-libs/opus/Manifest b/media-libs/opus/Manifest
new file mode 100644
index 000000000000..d0940c4d1b3e
--- /dev/null
+++ b/media-libs/opus/Manifest
@@ -0,0 +1,2 @@
+DIST opus-1.0.2.tar.gz 777306 SHA256 da615edbee5d019c1833071d69a4782c19f178cf9ca1401375036ecef25cd78a SHA512 73f089ac9c6fcf6adea6c862f6ac0e56712473f9dcaec3aec444a988ded1abcec7fa69da286af38500182dfaf96ba0b6ca52431c39ed08f2aa1caf84ffd43b39 WHIRLPOOL f953cc7f8bd4332524ee403e7dbd9647a29d324a30ef820e5b96a316366ab0a168f55e36a0ab5b239afe7f547874eb28aff1529e38774c1a880da1b7ce7daa86
+DIST opus-1.1.tar.gz 850208 SHA256 b9727015a58affcf3db527322bf8c4d2fcf39f5f6b8f15dbceca20206cbe1d95 SHA512 b603efe66d65ef38dbcd0d2bbf213a1d15fa456aee00eca73e99abe4ec78668ed82e661ca7a69e9af4e0bc39e1aa76c4151b7f9840ff621ddcfd69f596cf2ba9 WHIRLPOOL 9d53e57d0c99b7e5e330822808f5b79e19bb3fbbffb9054e3d1d421b42fd70463d5fc39517eff1169d218bad8ab2440162c334ace013ffba846cbcfb57206201
diff --git a/media-libs/opus/files/1.1-fix-configure.ac-shell-bug.patch b/media-libs/opus/files/1.1-fix-configure.ac-shell-bug.patch
new file mode 100644
index 000000000000..e35452436259
--- /dev/null
+++ b/media-libs/opus/files/1.1-fix-configure.ac-shell-bug.patch
@@ -0,0 +1,14 @@
+--- opus-1.1.orig/configure.ac
++++ opus-1.1/configure.ac
+@@ -333,9 +333,9 @@ AS_IF([test x"${enable_asm}" = x"yes"],[
+
+ AM_CONDITIONAL([CPU_ARM], [test "$cpu_arm" = "yes"])
+ AM_CONDITIONAL([OPUS_ARM_INLINE_ASM],
+- [test x"${inline_optimization:0:3}" = x"ARM"])
++ [test x"${inline_optimization%% *}" = x"ARM"])
+ AM_CONDITIONAL([OPUS_ARM_EXTERNAL_ASM],
+- [test x"${asm_optimization:0:3}" = x"ARM"])
++ [test x"${asm_optimization%% *}" = x"ARM"])
+
+ AS_IF([test x"$enable_rtcd" = x"yes"],[
+ AS_IF([test x"$rtcd_support" != x"no"],[
diff --git a/media-libs/opus/metadata.xml b/media-libs/opus/metadata.xml
new file mode 100644
index 000000000000..82bdb149a9cc
--- /dev/null
+++ b/media-libs/opus/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>sound</herd>
+ <use>
+ <flag name="custom-modes">Build with custom-modes.</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/opus/opus-1.0.2-r2.ebuild b/media-libs/opus/opus-1.0.2-r2.ebuild
new file mode 100644
index 000000000000..ac82a24608ea
--- /dev/null
+++ b/media-libs/opus/opus-1.0.2-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
+
+if [[ ${PV} == *9999 ]] ; then
+ SCM="git-2"
+ EGIT_REPO_URI="git://git.opus-codec.org/opus.git"
+ AUTOTOOLS_AUTORECONF="1"
+fi
+
+inherit autotools-multilib ${SCM}
+
+MY_P=${P/_/-}
+DESCRIPTION="Open versatile codec designed for interactive speech and audio transmission over the internet"
+HOMEPAGE="http://opus-codec.org/"
+SRC_URI="http://downloads.xiph.org/releases/opus/${P}.tar.gz"
+if [[ ${PV} == *9999 ]] ; then
+ SRC_URI=""
+elif [[ ${PV%_p*} != ${PV} ]] ; then # Gentoo snapshot
+ SRC_URI="http://dev.gentoo.org/~lu_zero/${PN}/${P}.tar.xz"
+else # Official release
+ SRC_URI="http://downloads.xiph.org/releases/${PN}/${MY_P}.tar.gz"
+fi
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd"
+IUSE="custom-modes doc static-libs"
+
+DEPEND="doc? ( app-doc/doxygen )"
+
+S=${WORKDIR}/${MY_P}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable custom-modes)
+ $(use_enable doc)
+ )
+ autotools-multilib_src_configure
+}
diff --git a/media-libs/opus/opus-1.1.ebuild b/media-libs/opus/opus-1.1.ebuild
new file mode 100644
index 000000000000..205c25b4ba93
--- /dev/null
+++ b/media-libs/opus/opus-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
+AUTOTOOLS_AUTORECONF="1"
+inherit autotools-multilib
+
+if [[ ${PV} == *9999 ]] ; then
+ inherit git-2
+ EGIT_REPO_URI="git://git.opus-codec.org/opus.git"
+else
+ SRC_URI="http://downloads.xiph.org/releases/${PN}/${P}.tar.gz"
+ KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd"
+fi
+
+DESCRIPTION="Open versatile codec designed for interactive speech and audio transmission over the internet"
+HOMEPAGE="http://opus-codec.org/"
+SRC_URI="http://downloads.xiph.org/releases/opus/${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+IUSE="custom-modes doc static-libs"
+
+DEPEND="doc? ( app-doc/doxygen )"
+
+PATCHES=( "${FILESDIR}/1.1-fix-configure.ac-shell-bug.patch" ) # bug 510918
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable custom-modes)
+ $(use_enable doc)
+ )
+ autotools-multilib_src_configure
+}
diff --git a/media-libs/opusfile/Manifest b/media-libs/opusfile/Manifest
new file mode 100644
index 000000000000..6dc46d40e8ce
--- /dev/null
+++ b/media-libs/opusfile/Manifest
@@ -0,0 +1,3 @@
+DIST opusfile-0.4.tar.gz 427366 SHA256 9836ea11706c44f36de92c4c9b1248e03a4c521e7fb2cff18a0cb4f8b0e79140 SHA512 af13e3c6301f303abc67ae45f0675ace04e902eb1cd72fc448893efb3a40588c3a2f10442f80d26456af13b51764d03a0a0d5841c538487b82aebca30c0270ce WHIRLPOOL 1354bf245a77e01b822351f4ddcb1aa9646c8a49c7a52bfc01b0c3445bc51fd6af4c39d1e975b65b08c465e2c5e60ebb32601dc092c006470ec6f6d6980fb655
+DIST opusfile-0.5.tar.gz 437671 SHA256 2ce52d006aeeec9f10260dbe3073c4636954a1ab19c82b8baafefe0180aa4a39 SHA512 b07baf867a732ec7826147766da51f194a2c01dfb2f86bc87d4a01616d6e21be9e788716fb5ad48a823e11de705fd1669de583bd17fbcf6a53033e7aa9569e80 WHIRLPOOL 560bfaac67b70fdbbaecf12a962f6b60656172a8be683d6bf7e55aca49f85613117e9fde373d7e160b0a6ddb65968ba325120026a1b28a034b0b258b2f3c3aac
+DIST opusfile-0.6.tar.gz 437980 SHA256 2428717b356e139f18ed2fdb5ad990b5654a238907a0058200b39c46a7d03ea6 SHA512 6fee48f3da21eeffed1ee5a3852234032aa559335225b07383c1104f5efba2f88aebe41c453ab2de472a69766e0fa9b48bec2f97d2a096b27afa96901802ba02 WHIRLPOOL 27cb5a0b49722949b89ae610c9f6ef9d4e73ec8a2f909f051f8f7f90f6d9ab7e2250eae8f8954e2574711d2a9c4d4cff5dda9ef4c7f9970f4a2aa00628a131d2
diff --git a/media-libs/opusfile/metadata.xml b/media-libs/opusfile/metadata.xml
new file mode 100644
index 000000000000..5d867fdf0ea1
--- /dev/null
+++ b/media-libs/opusfile/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>
+<use>
+<flag name='fixed-point'>Enable fixed-point arithmetic operations</flag>
+<flag name='float'>Enable floating point arithmetic operations</flag>
+<flag name='http'>Enable http connections</flag>
+</use>
+</pkgmetadata>
diff --git a/media-libs/opusfile/opusfile-0.4.ebuild b/media-libs/opusfile/opusfile-0.4.ebuild
new file mode 100644
index 000000000000..26cab4a9d906
--- /dev/null
+++ b/media-libs/opusfile/opusfile-0.4.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="A high-level decoding and seeking API for .opus files"
+HOMEPAGE="http://www.opus-codec.org/"
+SRC_URI="http://downloads.xiph.org/releases/opus/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ~hppa ~ppc x86"
+IUSE="doc fixed-point +float +http static-libs"
+
+RDEPEND="media-libs/libogg
+ media-libs/opus
+ http? ( dev-libs/openssl )"
+
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )"
+
+REQUIRED_USE="^^ ( fixed-point float )"
+
+src_configure() {
+ econf \
+ --docdir=/usr/share/doc/${PF} \
+ $(use_enable doc) \
+ $(use_enable fixed-point)\
+ $(use_enable float) \
+ $(use_enable http) \
+ $(use_enable static-libs static)
+}
diff --git a/media-libs/opusfile/opusfile-0.5.ebuild b/media-libs/opusfile/opusfile-0.5.ebuild
new file mode 100644
index 000000000000..d3596881ae71
--- /dev/null
+++ b/media-libs/opusfile/opusfile-0.5.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="A high-level decoding and seeking API for .opus files"
+HOMEPAGE="http://www.opus-codec.org/"
+SRC_URI="http://downloads.xiph.org/releases/opus/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~x86"
+IUSE="doc fixed-point +float +http static-libs"
+
+RDEPEND="media-libs/libogg
+ media-libs/opus
+ http? ( dev-libs/openssl )"
+
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )"
+
+REQUIRED_USE="^^ ( fixed-point float )"
+
+src_configure() {
+ econf \
+ --docdir=/usr/share/doc/${PF} \
+ $(use_enable doc) \
+ $(use_enable fixed-point)\
+ $(use_enable float) \
+ $(use_enable http) \
+ $(use_enable static-libs static)
+}
diff --git a/media-libs/opusfile/opusfile-0.6.ebuild b/media-libs/opusfile/opusfile-0.6.ebuild
new file mode 100644
index 000000000000..d11ead3573e7
--- /dev/null
+++ b/media-libs/opusfile/opusfile-0.6.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="A high-level decoding and seeking API for .opus files"
+HOMEPAGE="http://www.opus-codec.org/"
+SRC_URI="http://downloads.xiph.org/releases/opus/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86"
+IUSE="doc fixed-point +float +http static-libs"
+
+RDEPEND="media-libs/libogg
+ media-libs/opus
+ http? ( dev-libs/openssl:= )"
+
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )"
+
+REQUIRED_USE="^^ ( fixed-point float )"
+
+src_configure() {
+ econf \
+ --docdir=/usr/share/doc/${PF} \
+ $(use_enable doc) \
+ $(use_enable fixed-point)\
+ $(use_enable float) \
+ $(use_enable http) \
+ $(use_enable static-libs static)
+}
diff --git a/media-libs/oyranos/Manifest b/media-libs/oyranos/Manifest
new file mode 100644
index 000000000000..168b16401ea0
--- /dev/null
+++ b/media-libs/oyranos/Manifest
@@ -0,0 +1,3 @@
+DIST oyranos-0.9.4.tar.bz2 1632276 SHA256 6dcf7f8bef0720077ee55484a5b507ba5f049094f21fbbd2752f2ed120c0768a SHA512 23ded5bac4c16aba8a2d4266981e6ad53cfa2ce720d03751625552a873de8311dda721eb8dd732860ae0a0fcdfc7346f92aaeb8bde281ceeb4895f154d6e6c59 WHIRLPOOL 7ec535e326bf102eb0d154ac995b42b4a8b23a606c35417727b54653424807c47c5a4cf7ece6411627dcffd7ca5d8b1ddc588d97d1a02fb079d27d3d20efd2a5
+DIST oyranos-0.9.5.tar.bz2 1800977 SHA256 75c2681e6d95cb969336f1e9bdfe12a85ae6a5bd438573d7d2955b37ea466e40 SHA512 18ab90f6d80db2c3d3fda64f80d01be2c83c9e86f14b3a3310eea5dd921b7376afb894fea987357b573a4247d5c285bc9f6ccc044e21dbe7da92f25373b9fd99 WHIRLPOOL 32440b53b7da82baa8299c570c3456c35cbffb17998836240640011ff5a13981e7219213b00c0d9afc367f74bf35ffb297363285d060bd72f73f8f75a18ed025
+DIST oyranos-0.9.5.tar.gz 1801954 SHA256 7cf8d41c3019e91608837cc40de801348b35963853e6d62b3e6dcd46bf24cafa SHA512 836bb7324cd300608cb13381704b6b28aae93485140d2e3f6c7dc21f1d35f9acc44427c861814b13c60cc499ba5495068b1069f6843909744f18ac8998d17ae9 WHIRLPOOL 69b676c6cae8eb878b5e0ea73358ffc59ba78541c9de89d10667a52141d0b37399ea733e1e2aa69bf90208a12e93c63b0b8bb63e6eb2efccc0151b745469491f
diff --git a/media-libs/oyranos/files/oyranos-0.3.2-test.patch b/media-libs/oyranos/files/oyranos-0.3.2-test.patch
new file mode 100644
index 000000000000..6e9b495a963a
--- /dev/null
+++ b/media-libs/oyranos/files/oyranos-0.3.2-test.patch
@@ -0,0 +1,11 @@
+--- oyranos-0.3.2/makefile.in
++++ oyranos-0.3.2/makefile.in
+@@ -995,7 +995,7 @@
+ echo current git version is:
+ n=0; for i in `cd $(SRCDIR); git rev-list master`; do if [ $${n} -eq 0 ]; then echo git id:$${i}; fi; n=1; done
+ echo run tests/test_oyranos
+- OY_MODULE_PATHS=. LD_LIBRARY_PATH=./:$(libdir):$${LD_LIBRARY_PATH} tests/test_oyranos
++ OY_MODULE_PATHS=. LD_LIBRARY_PATH=./:$(libdir):$${LD_LIBRARY_PATH} tests/test_oyranos "Version matching" "Internationalisation" "Elektra" "basic oyOption_s" "default oyOptions_s settings" "Profiles reading" "Registration matching" "Generic Object Observation"
+
+ examples: all
+ cd examples && ($(MAKE) clean; PATH="$(PATH):$(bindir):.." LD_LIBRARY_PATH=./:$(libdir):$${LD_LIBRARY_PATH} PKG_CONFIG_PATH="$(PKG_CONFIG_PATH):$(DESTDIR)$(libdir)/pkgconfig:.." INCLUDE="-I$(includedir) -I$(SRCDIR) -I../ -I$(SRCDIR)/$(GENDIR)" SRCDIR=$(SRCDIR)/examples/ CFLAGS="$(CFLAGS)" LIBS="-L$(libdir) -L../" intl="$(intl)" $(MAKE))
diff --git a/media-libs/oyranos/files/oyranos-0.4.0-buildsystem.patch b/media-libs/oyranos/files/oyranos-0.4.0-buildsystem.patch
new file mode 100644
index 000000000000..66f4ec1ddf2c
--- /dev/null
+++ b/media-libs/oyranos/files/oyranos-0.4.0-buildsystem.patch
@@ -0,0 +1,70 @@
+--- oyranos-0.4.0/configure
++++ oyranos-0.4.0/configure
+@@ -30,7 +30,7 @@
+ PKGC=$TARGET.pc
+ VERS_H="$TARGET"_version.h
+ zeile="$0 $@"
+-MAKEFILE_DIR=". fl_i18n libXNVCtrl yajl"; export MAKEFILE_DIR
++MAKEFILE_DIR=". fl_i18n libXNVCtrl"; export MAKEFILE_DIR
+
+ if [ `uname` = "Linux" ]; then
+ v=-v
+@@ -68,7 +68,7 @@
+ OY_DEVEL_MONTH=03
+ OYRANOS_DEVEL_MONTH=3 # numeric
+ OY_DEVEL_YEAR=2012
+-OY_GIT_MASTER="`cat $ROOT_DIR/.git/refs/heads/master`"
++OY_GIT_MASTER=""
+ time="`date +%y%m%d.%H%M%S`"
+ DATE="$OY_START_MONTH $OY_START_YEAR - $OY_DEVEL_MONTH $OY_DEVEL_YEAR"
+ VERSION=$VERSION_A.$VERSION_B.$VERSION_C
+@@ -120,7 +120,7 @@
+ fi
+ IFS=$old_IFS
+
+-STRIPOPT="sed s/-O.//"
++STRIPOPT="cat"
+
+ if [ $# -gt 0 ]; then
+ prefix=""
+--- oyranos-0.4.0/configure_tests.sh
++++ oyranos-0.4.0/configure_tests.sh
+@@ -3,7 +3,7 @@
+ set > testset.txt
+ ERROR=0
+ WARNING=0
+-STRIPOPT='s/-O.// ; s/-isysroot [[:graph:]]*// ; s/-arch ppc// ; s/-arch i386//'
++STRIPOPT='s/-isysroot [[:graph:]]*// ; s/-arch ppc// ; s/-arch i386//'
+
+ mkdir -p tests
+
+--- oyranos-0.4.0/oforms/oyranos_xforms.makefile
++++ oyranos-0.4.0/oforms/oyranos_xforms.makefile
+@@ -1,5 +1,6 @@
+ INCL = $(INCLUDE) -I../ -I./ $(DEBUG)
+-CC = gcc
++CC ?= gcc
++CXX ?= c++
+ DEBUG = -Wall -g -O0
+ LDFLAGS_ = $$LDFLAGS -L../fl_i18n
+ OY_LIBS := $(shell pkg-config oyranos libxml-2.0 --libs --cflags)
+ FLTK_FLAGS := $(shell fltk-config --ldflags --cxxflags | sed s/-O2//) -lpthread
+@@ -16,15 +17,15 @@
+
+ oyranos-xforms: $(SRCDIR)oyranos_xforms.c
+ echo "Compiling $(SRCDIR)$< + Linking $@ ..."
+- gcc -Wall -g $(CFLAGS) $(INCL) $(SRCDIR)oyranos_xforms.c -o oyranos-xforms -pedantic $(OY_FLAGS) $(LDFLAGS_)
++ $(CC) -Wall -g $(CFLAGS) $(INCL) $(SRCDIR)oyranos_xforms.c -o oyranos-xforms -pedantic $(OY_FLAGS) $(LDFLAGS_)
+
+ oyranos-xforms-modules: $(SRCDIR)oyranos_xforms_modules.c
+ echo "Compiling $(SRCDIR)$< + Linking $@ ..."
+- gcc -Wall -g $(CFLAGS) $(INCL) $< -o $@ -pedantic $(OY_FLAGS) $(LDFLAGS_)
++ $(CC) -Wall -g $(CFLAGS) $(INCL) $< -o $@ -pedantic $(OY_FLAGS) $(LDFLAGS_)
+
+ oyranos-xforms-fltk: $(SRCDIR)oyranos_xforms_fltk.cxx $(SRCDIR)oyranos_forms_fltk.cxx $(SRCDIR)oyranos_widgets_fltk.cxx $(SRCDIR)oyranos_widgets_fltk.h
+ echo "Compiling $(SRCDIR)$< + Linking $@ ..."
+- -c++ $(LDFLAGS_) -Wall -g $(CXXFLAGS) $(INCL) $(SRCDIR)oyranos_xforms_fltk.cxx -o oyranos-xforms-fltk -pedantic -loyforms_fltk -lfl_i18n $(FLTK_FLAGS) $(OY_FLAGS)
++ $(CXX) $(LDFLAGS) -Wall -g $(CXXFLAGS) $(INCL) $(SRCDIR)oyranos_xforms_fltk.cxx -o oyranos-xforms-fltk -pedantic -loyforms_fltk -lfl_i18n $(FLTK_FLAGS) $(OY_FLAGS_)
+
+
+ # Build commands and filename extensions...
diff --git a/media-libs/oyranos/files/oyranos-0.9.0-array.patch b/media-libs/oyranos/files/oyranos-0.9.0-array.patch
new file mode 100644
index 000000000000..bd8ee069e443
--- /dev/null
+++ b/media-libs/oyranos/files/oyranos-0.9.0-array.patch
@@ -0,0 +1,37 @@
+from http://www.oyranos.org/scm?p=oyranos.git;a=commitdiff;h=0ed3aef1320ccc168c2753ac4cf426290fac6639
+--- a/API_generated/oyArray2d_s_.c
++++ b/API_generated/oyArray2d_s_.c
+@@ -13,7 +13,7 @@
+ * @author Kai-Uwe Behrmann <ku.b@gmx.de>
+ * @par License:
+ * new BSD - see: http://www.opensource.org/licenses/bsd-license.php
+- * @date 2012/10/24
++ * @date 2012/11/02
+ */
+
+
+@@ -404,9 +404,9 @@
+ *
+ * @param[in,out] obj struct object
+ *
+- * @version Oyranos: 0.1.11
++ * @version Oyranos: 0.9.1
++ * @date 2012/11/02
+ * @since 2010/09/07 (Oyranos: 0.1.11)
+- * @date 2010/09/07
+ */
+ int oyArray2d_ReleaseArray_ ( oyArray2d_s * obj )
+ {
+@@ -428,10 +428,10 @@
+ {
+ if((s->own_lines == 1 && y == s->data_area.y) ||
+ s->own_lines == 2)
+- deallocateFunc( &s->array2d[y][dsize * (int)s->data_area.x] );
++ deallocateFunc( &s->array2d[y][dsize * (int)OY_ROUND(s->data_area.x)] );
+ s->array2d[y] = 0;
+ }
+- deallocateFunc( s->array2d + (size_t)s->data_area.y );
++ deallocateFunc( s->array2d + (int)OY_ROUND(s->data_area.y) );
+ s->array2d = 0;
+ }
+
diff --git a/media-libs/oyranos/files/oyranos-0.9.0-buildsystem.patch b/media-libs/oyranos/files/oyranos-0.9.0-buildsystem.patch
new file mode 100644
index 000000000000..9821fd44be40
--- /dev/null
+++ b/media-libs/oyranos/files/oyranos-0.9.0-buildsystem.patch
@@ -0,0 +1,114 @@
+--- oyranos-0.4.0/configure_tests.sh
++++ oyranos-0.4.0/configure_tests.sh
+@@ -3,7 +3,7 @@
+ set > testset.txt
+ ERROR=0
+ WARNING=0
+-STRIPOPT='s/-O.// ; s/-isysroot [[:graph:]]*// ; s/-arch ppc// ; s/-arch i386//'
++STRIPOPT='s/-isysroot [[:graph:]]*// ; s/-arch ppc// ; s/-arch i386//'
+
+ mkdir -p tests
+
+--- oyranos-0.9.0/oforms/oyranos_xforms.makefile
++++ oyranos-0.9.0/oforms/oyranos_xforms.makefile
+@@ -1,8 +1,8 @@
+-INCL = $(INCLUDE) -I../ -I./ $(DEBUG)
+-CC = gcc
+-DEBUG = -Wall -g -O0
++INCL = $(INCLUDE) -I../ -I./
++CC ?= gcc
++CXX ?= c++
+ LDFLAGS_ = $$LDFLAGS -L../fl_i18n
+-OY_LIBS := $(shell pkg-config oyranos libxml-2.0 --libs --cflags)
++OY_LIBS := $(shell pkg-config libxml-2.0 --libs --cflags) ../liboyranos.so ../liboyranos_object.so ../liboyranos_core.so ../liboyranos_config.so ../liboyranos_modules.so
+ OY_FLAGS = -L../ $(OY_LIBS)
+ FLTK_FLAGS := $(shell fltk-config --ldflags --cxxflags | sed s/-O2//) -lpthread
+
+@@ -15,15 +15,15 @@
+
+ oyranos-xforms: $(SRCDIR)oyranos_xforms.c
+ echo "Compiling $(SRCDIR)$< + Linking $@ ..."
+- gcc -Wall -g $(CFLAGS) $(INCL) $(SRCDIR)oyranos_xforms.c -o oyranos-xforms -pedantic $(OY_FLAGS) $(LDFLAGS_)
++ $(CC) -Wall $(CFLAGS) $(LDFLAGS) $(INCL) $(SRCDIR)oyranos_xforms.c -o oyranos-xforms -pedantic $(OY_FLAGS) $(LDFLAGS_)
+
+ oyranos-xforms-modules: $(SRCDIR)oyranos_xforms_modules.c
+ echo "Compiling $(SRCDIR)$< + Linking $@ ..."
+- gcc -Wall -g $(CFLAGS) $(INCL) $< -o $@ -pedantic $(OY_FLAGS) $(LDFLAGS_)
++ $(CC) -Wall $(CFLAGS) $(LDFLAGS) $(INCL) $< -o $@ -pedantic $(OY_FLAGS) $(LDFLAGS_)
+
+ oyranos-xforms-fltk: $(SRCDIR)oyranos_xforms_fltk.cxx $(SRCDIR)oyranos_forms_fltk.cxx $(SRCDIR)oyranos_widgets_fltk.cxx $(SRCDIR)oyranos_widgets_fltk.h
+ echo "Compiling $(SRCDIR)$< + Linking $@ ..."
+- -c++ $(LDFLAGS_) -Wall -g $(CXXFLAGS) $(INCL) $(SRCDIR)oyranos_xforms_fltk.cxx -o oyranos-xforms-fltk -pedantic -loyforms_fltk -lfl_i18n $(FLTK_FLAGS) $(OY_FLAGS)
++ $(CXX) $(LDFLAGS_) -Wall $(CXXFLAGS) $(LDFLAGS) $(INCL) $(SRCDIR)oyranos_xforms_fltk.cxx -o oyranos-xforms-fltk -pedantic -loyforms_fltk -lfl_i18n $(FLTK_FLAGS) $(OY_FLAGS)
+
+
+ # Build commands and filename extensions...
+--- oyranos-0.9.0/oyranos-config.in
++++ oyranos-0.9.0/oyranos-config.in
+@@ -109,7 +109,7 @@
+
+ if [ "$echo_ldflags" = "yes" ]; then
+ if [ -f liboyranos.so ]; then
+- echo "-L. -loyranos -loyranos_config -loyranos_modules -loyranos_object -loyranos_core $elektra $oyranos_add"
++ echo "lliboyranos.so liboyranos_config.so liboyranos_modules.so liboyranos_object.so liboyranos_core.so $elektra $oyranos_add"
+ else
+ echo "-L$libdir -loyranos -loyranos_config -loyranos_modules -loyranos_object -loyranos_core $elektra $oyranos_add"
+ fi
+--- oyranos-0.9.0/configure
++++ oyranos-0.9.0/configure
+@@ -121,8 +121,6 @@
+ fi
+ IFS=$old_IFS
+
+-STRIPOPT="sed s/-O.//"
+-
+ if [ $# -gt 0 ]; then
+ prefix=""
+ while [ $# -gt 0 ]; do
+@@ -680,17 +678,8 @@
+ test -n "$ECHO" && $ECHO "CC = $CC" >> $CONF_NV
+ export CC CXX
+
+-# many constant strings are much longer than the C90 allowed, skip the warning
+-CFLAGS_COMMON="`echo $CFLAGS_COMMON | $STRIPOPT` \$(DEBUG) \$(OPENMP)"
+-CXXFLAGS_COMMON="`echo $CXXFLAGS_COMMON | $STRIPOPT` \$(DEBUG) \$(OPENMP)"
+-CFLAGS="`echo $CFLAGS | $STRIPOPT`"
+-CXXFLAGS="`echo $CXXFLAGS | $STRIPOPT`"
+
+-if [ -z "$LDFLAGS" ]; then
+- LDFLAGS="-L./ -L$libdir"
+-else
+- LDFLAGS="`echo $LDFLAGS | $STRIPOPT` -L./ -L$libdir"
+-fi
++#LDFLAGS="-L./ -L$libdir"
+
+
+ # detect Libraries
+@@ -760,12 +749,12 @@
+ --copyright-holder='Kai-Uwe Behrmann' \
+ --msgid-bugs-address='ku.b@gmx.de' \
+ --from-code=utf-8" >> $CONF
+- oyranos_add="-L\$libdir \$ltdl \$xml2 \$iconv \$intl \$yajl"
++ oyranos_add="\$ltdl \$xml2 \$iconv \$intl \$yajl"
+ if [ $OSUNAME = "Linux" ]; then
+ COPY="cp -vdpa"
+ MOVE="mv -v"
+ RM="rm -vf"
+- LDFLAGS="$LDFLAGS -L."
++ LDFLAGS="$LDFLAGS"
+ test -n "$ECHO" && $ECHO "LINK_FLAGS_STATIC =" >> $CONF
+ if [ -n "$rpath" ]; then
+ test -n "$ECHO" && $ECHO "LINK_LIB_PATH = -Wl,--rpath -Wl," >> $CONF
+@@ -1294,9 +1283,9 @@
+ test -n "$ECHO" && $ECHO "" >> $VERS_H
+ test -n "$ECHO" && $ECHO "#endif /*OYRANOS_VERSION_H*/" >> $VERS_H
+
+-CFLAGS="$CFLAGS_COMMON `echo $CFLAGS | $STRIPOPT`"
+-CXXFLAGS="$CXXFLAGS_COMMON `echo $CXXFLAGS | $STRIPOPT`"
+-LDFLAGS="`echo $LDFLAGS | $STRIPOPT` \$(dl) \$(DEVEL_LIBS)"
++CFLAGS="$CFLAGS_COMMON $CFLAGS"
++CXXFLAGS="$CXXFLAGS_COMMON $CXXFLAGS"
++LDFLAGS="$LDFLAGS \$(dl) \$(DEVEL_LIBS)"
+
+ test -n "$ECHO" && $ECHO "CFLAGS=$CFLAGS" >> $CONF_NV
+ test -n "$ECHO" && $ECHO "CFLAGS = $CFLAGS" >> $CONF_I18N
diff --git a/media-libs/oyranos/files/oyranos-0.9.0-png.patch b/media-libs/oyranos/files/oyranos-0.9.0-png.patch
new file mode 100644
index 000000000000..7bcc28651f1c
--- /dev/null
+++ b/media-libs/oyranos/files/oyranos-0.9.0-png.patch
@@ -0,0 +1,31 @@
+from http://www.oyranos.org/scm?p=oyranos.git;a=commitdiff;h=c39976bf5de8a70f71cef2ecafae13d17e811857
+--- a/modules/oyranos_cmm_oPNG.c
++++ b/modules/oyranos_cmm_oPNG.c
+@@ -816,7 +816,8 @@ oyImage_s * oyImage_FromPNG ( const char * filename,
+ spp = 2; break;
+ case PNG_COLOR_TYPE_PALETTE:
+ png_set_palette_to_rgb( png_ptr );
+- spp = 3; break;
++ /* expect alpha */
++ spp = 4; break;
+ case PNG_COLOR_TYPE_RGB:
+ spp = 3; break;
+ case PNG_COLOR_TYPE_RGB_ALPHA:
+@@ -884,10 +885,15 @@ oyImage_s * oyImage_FromPNG ( const char * filename,
+ oyToDataType_m(pixel_layout),
+ 0 );
+ png_byte ** array2d = (png_byte**) oyArray2d_GetData( a );
+- int i;
++ int i,y;
+
++ /* both variants of libpng access appear equal */
++ if(1)
++ png_read_image( png_ptr, array2d );
++ else
+ for( i = 0; i < num_passes; ++i )
+- png_read_rows( png_ptr, array2d, NULL, height );
++ for( y = 0; y < height; ++y )
++ png_read_row( png_ptr, array2d[y], NULL );
+
+ oyImage_SetData ( image_in, (oyStruct_s**) &a, 0,0,0,0,0,0 );
+ }
diff --git a/media-libs/oyranos/files/oyranos-0.9.1-buildsystem-2.patch b/media-libs/oyranos/files/oyranos-0.9.1-buildsystem-2.patch
new file mode 100644
index 000000000000..6593f6392699
--- /dev/null
+++ b/media-libs/oyranos/files/oyranos-0.9.1-buildsystem-2.patch
@@ -0,0 +1,22 @@
+--- oyranos-0.9.1/configure_tests.sh
++++ oyranos-0.9.1/configure_tests.sh
+@@ -612,8 +612,9 @@
+ ID_LIBS="$ID"_LIBS
+ if [ -z "$found" ]; then
+ pkg-config --atleast-version=0.2 $pc_package
++ found=$?
+ if [ $? = 0 ]; then
+- found=`pkg-config --cflags $pc_package`
++ xcm_cflags=`pkg-config --cflags $pc_package`
+ version=`pkg-config --modversion $pc_package`
+ fi
+ fi
+@@ -627,7 +628,7 @@
+ if [ -n "$MAKEFILE_DIR" ]; then
+ for i in $MAKEFILE_DIR; do
+ test -f "$ROOT_DIR/$i/makefile".in && echo "XCM = 1" >> "$i/makefile"
+- test -f "$ROOT_DIR/$i/makefile".in && echo "XCM_H = $found" >> "$i/makefile"
++ test -f "$ROOT_DIR/$i/makefile".in && echo "XCM_H = $xcm_cflags" >> "$i/makefile"
+ test -f "$ROOT_DIR/$i/makefile".in && echo "$ID_LIBS = `pkg-config --libs $name | sed \"$STRIPOPT\"`" >> "$i/makefile"
+ done
+ fi
diff --git a/media-libs/oyranos/files/oyranos-0.9.1-fix-array-access.patch b/media-libs/oyranos/files/oyranos-0.9.1-fix-array-access.patch
new file mode 100644
index 000000000000..8f8e2c1b9014
--- /dev/null
+++ b/media-libs/oyranos/files/oyranos-0.9.1-fix-array-access.patch
@@ -0,0 +1,29 @@
+From 11d848a38608deeeca61288d46cfca55c6916788 Mon Sep 17 00:00:00 2001
+From: Kai-Uwe Behrmann <ku.b@gmx.de>
+Date: Mon, 18 Mar 2013 19:07:16 +0100
+Subject: [PATCH] * [oyX1]: fix array access
+
+---
+ modules/devices/oyranos_monitor_x11.c | 7 +++++++
+ 1 files changed, 7 insertions(+), 0 deletions(-)
+
+diff --git a/modules/devices/oyranos_monitor_x11.c b/modules/devices/oyranos_monitor_x11.c
+index a530a81..bac09c1 100644
+--- a/modules/devices/oyranos_monitor_x11.c
++++ b/modules/devices/oyranos_monitor_x11.c
+@@ -1329,6 +1329,13 @@ oyX1Monitor_s* oyX1Monitor_newFrom_ ( const char * display_name,
+ int n_scr_info = 0;
+ XineramaScreenInfo *scr_info = XineramaQueryScreens( display,
+ &n_scr_info );
++ if(n_scr_info <= selected_screen)
++ {
++ XFree( scr_info );
++ oyX1Monitor_release_( &disp );
++ return 0;
++ }
++
+ geo[0] = scr_info[selected_screen].x_org;
+ geo[1] = scr_info[selected_screen].y_org;
+ geo[2] = scr_info[selected_screen].width;
+--
+1.5.6.5
diff --git a/media-libs/oyranos/files/oyranos-0.9.1-fix-crash-over-missed-output-image.patch b/media-libs/oyranos/files/oyranos-0.9.1-fix-crash-over-missed-output-image.patch
new file mode 100644
index 000000000000..72b01dac0b06
--- /dev/null
+++ b/media-libs/oyranos/files/oyranos-0.9.1-fix-crash-over-missed-output-image.patch
@@ -0,0 +1,50 @@
+From 2b62b97d76ec64ebfd5ea3fe3a67ef7c3e4a017c Mon Sep 17 00:00:00 2001
+From: Kai-Uwe Behrmann <ku.b@gmx.de>
+Date: Mon, 24 Dec 2012 10:34:53 +0100
+Subject: [PATCH] * [lcms]: fix crash over missed output image
+
+---
+ modules/oyranos_cmm_lcm2.c | 4 ++--
+ modules/oyranos_cmm_lcms.c | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/modules/oyranos_cmm_lcm2.c b/modules/oyranos_cmm_lcm2.c
+index 56c2228..90f0bf9 100644
+--- a/modules/oyranos_cmm_lcm2.c
++++ b/modules/oyranos_cmm_lcm2.c
+@@ -1494,11 +1494,11 @@ oyPointer lcm2FilterNode_CmmIccContextToMem (
+ OY_DBG_FORMAT_" missed input image %d", OY_DBG_ARGS_,
+ image_input->type_ );
+ }
+- if(image_output->type_ != oyOBJECT_IMAGE_S)
++ if(!image_output || image_output->type_ != oyOBJECT_IMAGE_S)
+ {
+ oyFilterSocket_Callback( plug, oyCONNECTOR_EVENT_INCOMPATIBLE_DATA );
+ lcm2_msg( oyMSG_WARN, (oyStruct_s*)node,
+- OY_DBG_FORMAT_" missed output image %d", OY_DBG_ARGS_, image_input->type_ );
++ OY_DBG_FORMAT_" missed output image %d", OY_DBG_ARGS_, image_output?image_output->type_:0 );
+ }
+
+ data_type = oyToDataType_m( oyImage_GetPixelLayout( image_input, oyLAYOUT ) );
+diff --git a/modules/oyranos_cmm_lcms.c b/modules/oyranos_cmm_lcms.c
+index b42fc99..9352ea2 100644
+--- a/modules/oyranos_cmm_lcms.c
++++ b/modules/oyranos_cmm_lcms.c
+@@ -1225,12 +1225,12 @@ oyPointer lcmsFilterNode_CmmIccContextToMem (
+ OY_DBG_FORMAT_" missed input image %d", OY_DBG_ARGS_,
+ image_input->type_ );
+ }
+- if(image_output->type_ != oyOBJECT_IMAGE_S)
++ if(!image_output || image_output->type_ != oyOBJECT_IMAGE_S)
+ {
+ oyFilterSocket_Callback( plug, oyCONNECTOR_EVENT_INCOMPATIBLE_DATA );
+ lcms_msg( oyMSG_WARN, (oyStruct_s*)node,
+ OY_DBG_FORMAT_" missed output image %d", OY_DBG_ARGS_,
+- image_input->type_ );
++ image_output?image_output->type_:0 );
+ }
+
+ data_type = oyToDataType_m( oyImage_GetPixelLayout( image_input, oyLAYOUT ) );
+--
+1.5.6.5
+
diff --git a/media-libs/oyranos/files/oyranos-0.9.1-fix-double-object-release.patch b/media-libs/oyranos/files/oyranos-0.9.1-fix-double-object-release.patch
new file mode 100644
index 000000000000..805c5ee3d904
--- /dev/null
+++ b/media-libs/oyranos/files/oyranos-0.9.1-fix-double-object-release.patch
@@ -0,0 +1,27 @@
+From 6214cf15fafae52d67233d27462488487091d8d6 Mon Sep 17 00:00:00 2001
+From: Kai-Uwe Behrmann <ku.b@gmx.de>
+Date: Wed, 20 Mar 2013 18:15:17 +0100
+Subject: [PATCH 1/1] * [core]: fix double object release
+
+... which was revealed by valgrind
+
+2013-03-31: backport to oyranos-0.9.1, remove patch for nonexistent file
+---
+ API_generated/oyranos_devices.c | 1 -
+
+diff --git a/API_generated/oyranos_devices.c b/API_generated/oyranos_devices.c
+index 4ed5138..8cee0c8 100644
+--- a/API_generated/oyranos_devices.c
++++ b/API_generated/oyranos_devices.c
+@@ -1896,7 +1896,6 @@ OYAPI int OYEXPORT
+ oyConfigs_MoveIn( taxi_devices, &taxi_dev, -1 );
+ }
+ oyConfigs_Release( &configs_ );
+- oyOptions_Release( &options );
+ oyFree_m_(ranks);
+ }
+
+--
+1.5.6.5
+
+
diff --git a/media-libs/oyranos/files/oyranos-0.9.1-fix-more-compiler-warnings.patch b/media-libs/oyranos/files/oyranos-0.9.1-fix-more-compiler-warnings.patch
new file mode 100644
index 000000000000..207589e3b0c4
--- /dev/null
+++ b/media-libs/oyranos/files/oyranos-0.9.1-fix-more-compiler-warnings.patch
@@ -0,0 +1,496 @@
+From c65685939185b4f1eced04f227dea72b249dd065 Mon Sep 17 00:00:00 2001
+From: Kai-Uwe Behrmann <ku.b@gmx.de>
+Date: Fri, 14 Dec 2012 10:50:28 +0100
+Subject: [PATCH 1/1] * [core]: fix compiler warnings
+
+dereferencing type-punned pointer will break strict-aliasing rules
+
+set but unused variable
+
+possible use of uninitialised variables
+
+...
+
+2013-03-30: backport to oyranos-0.9.1
+
+---
+ examples/devices/test_device.c | 15 ++----------
+ examples/taxi/taxi.c | 30 ++++++++++---------------
+ modules/oyranos_cmm_lcm2.c | 32 +++++++++++++-------------
+ modules/oyranos_cmm_lcms.c | 32 +++++++++++++-------------
+ modules/oyranos_cmm_lraw.cpp | 5 ++-
+ modules/oyranos_cmm_oyIM_profile.c | 4 +-
+ oyjl/oyjl_tree_parse.c | 2 +-
+ test2.cpp | 6 ++--
+ tests/test_oyranos.c | 2 +-
+ examples/oyranos_convert/oyranos_convert.c | 15 ++++++------
+ oyranos_gamma.c | 2 +-
+
+diff --git a/examples/devices/test_device.c b/examples/devices/test_device.c
+index 7ef2de8..016754b 100644
+--- a/examples/devices/test_device.c
++++ b/examples/devices/test_device.c
+@@ -205,7 +205,7 @@ int main(int argc, char *argv[])
+ oyConfig_s * oy_device = 0;
+ oyProfile_s * profile = 0;
+ const char * tmp = 0;
+- icSignature profile_class;
++ icSignature profile_class = icSigDisplayClass;
+ oyOptions_s * options = 0;
+ oyOptions_SetFromText( &options,
+ "//"OY_TYPE_STD"/config/icc_profile.x_color_region_target",
+@@ -331,7 +331,6 @@ int main(int argc, char *argv[])
+ oyConfig_s * oy_device = 0;
+ oyProfile_s * profile = 0;
+ const char * tmp = 0;
+- icSignature profile_class;
+ oyOptions_s * options = 0;
+ oyOptions_SetFromText( &options,
+ "//"OY_TYPE_STD"/config/icc_profile.x_color_region_target",
+@@ -344,15 +343,9 @@ int main(int argc, char *argv[])
+ oyConfDomain_s * d = oyConfDomain_FromReg( device_class, 0 );
+ const char * icc_profile_class = oyConfDomain_GetText( d,
+ "icc_profile_class", oyNAME_NICK );
+- if(icc_profile_class && strcmp(icc_profile_class,"display") == 0)
+- profile_class = icSigDisplayClass;
+- else if(icc_profile_class && strcmp(icc_profile_class,"output") == 0)
+- profile_class = icSigOutputClass;
+- else if(icc_profile_class && strcmp(icc_profile_class,"input") == 0)
+- profile_class = icSigInputClass;
+
+- printf("icc_profile_class: %s\n", icc_profile_class );
+- oyConfDomain_Release( &d );
++ printf("icc_profile_class: %s\n", icc_profile_class );
++ oyConfDomain_Release( &d );
+ }
+
+ error = oyDeviceGet( 0, device_class, device_name, 0, &oy_device );
+@@ -374,14 +367,12 @@ int main(int argc, char *argv[])
+ oyProfile_s * profile = 0;
+ oyConfigs_s * taxi_devices = 0;
+ oyConfig_s * device = oy_device;
+- const char * profile_file_name = 0;
+
+ oyDevicesFromTaxiDB( device, 0, &taxi_devices, 0 );
+
+ size = oyConfigs_Count( taxi_devices );
+
+ error = oyDeviceGetProfile( device, options, &profile );
+- profile_file_name = oyProfile_GetFileName( profile, 0 );
+
+ int show_only_device_related = 1;
+ int empty_added = -1;
+diff --git a/examples/taxi/taxi.c b/examples/taxi/taxi.c
+index 81c415a..ae3953f 100644
+--- a/examples/taxi/taxi.c
++++ b/examples/taxi/taxi.c
+@@ -7,9 +7,13 @@
+ #include <oyConfigs_s.h>
+ #include <oyProfile_s.h>
+
++#include "oyranos_config_internal.h"
+ #include <oyranos_devices.h>
+ #include "oyranos_helper_macros_cli.h"
++#include "oyranos_helper.h"
++#include "oyranos_i18n.h"
+ #include "oyranos_sentinel.h"
++#include "oyranos_string.h"
+
+ #include "oyjl/oyjl_tree.h"
+
+@@ -86,7 +90,7 @@ int oyLowerStrcmpWrap (const void * a_, const void * b_)
+ #endif
+ }
+
+-int oyStrCmp(char * a, char * b) { return (a && b) ? strcmp(a,b) : 1; }
++int oyStrCmp(const char * a, const char * b) { return (a && b) ? strcmp(a,b) : 1; }
+
+ #define OPENICC_DEVICE_JSON_HEADER_BASE \
+ "{\n" \
+@@ -107,8 +111,8 @@ void storeTaxiProfile( const char * taxi_id, const char * taxi_full_id, const ch
+ {
+ oyOptions_s * options = 0;
+ oyProfile_s * profile;
+- int error = oyOptions_SetFromText( &options,
+- "//" OY_TYPE_STD "/argv/TAXI_id",
++
++ oyOptions_SetFromText( &options, "//" OY_TYPE_STD "/argv/TAXI_id",
+ taxi_full_id,
+ OY_CREATE_NEW );
+
+@@ -138,15 +142,9 @@ void storeTaxiProfile( const char * taxi_id, const char * taxi_full_id, const ch
+
+ int main( int argc, char ** argv )
+ {
+- oyConfig_s * moni = NULL,
+- * device = NULL;
+ int error = 0;
+- oyConfigs_s * devices = NULL;
+- oyOptions_s * options = NULL;
+- oyProfile_s * profile = NULL;
+ char * profile_name = 0; /* the file to write to */
+- int32_t rank_value = 0, max_rank_value = 0;
+- int i,n, max_device_pos = -1,
++ int i,
+ verbose = 0,
+ list_manufacturers = 0,
+ list_urls = 0;
+@@ -156,11 +154,9 @@ int main( int argc, char ** argv )
+
+ size_t size = 0;
+ const char * short_name = NULL,
+- * long_name = NULL,
+- * name = NULL;
++ * long_name = NULL;
+ oyjl_value_s * root = 0;
+- char * val = NULL,
+- * key = NULL;
++ char * val = NULL;
+ oyjl_value_s * v = 0, * tv = 0;
+ int count;
+
+@@ -229,10 +225,8 @@ int main( int argc, char ** argv )
+ error = oyjl_tree_from_json( manufacturers, &root, NULL );
+ if(root)
+ {
+- int level = 0;
+-
+ int count = oyjl_value_count(root);
+- char ** sort = calloc( sizeof(char**), 2*count + 2 );
++ const char ** sort = calloc( sizeof(char**), 2*count + 2 );
+
+ for(i = 0; i < count; ++i)
+ {
+@@ -392,5 +386,5 @@ int main( int argc, char ** argv )
+ if(device_db) oyDeAllocateFunc_(device_db); device_db = 0;
+ }
+
+- return 0;
++ return error;
+ }
+diff --git a/modules/oyranos_cmm_lcm2.c b/modules/oyranos_cmm_lcm2.c
+index c50df87..56c2228 100644
+--- a/modules/oyranos_cmm_lcm2.c
++++ b/modules/oyranos_cmm_lcm2.c
+@@ -215,8 +215,8 @@ lcm2ProfileWrap_s * lcm2CMMProfile_GetWrap_( oyPointer_s* cmm_ptr )
+ {
+ lcm2ProfileWrap_s * s = 0;
+
+- char type_[4] = lcm2PROFILE;
+- int type = *((int*)&type_);
++ char * type_ = lcm2PROFILE;
++ int type = *((int32_t*)type_);
+
+ if(cmm_ptr && !lcm2CMMCheckPointer( cmm_ptr, lcm2PROFILE ) &&
+ oyPointer_GetPointer(cmm_ptr))
+@@ -238,8 +238,8 @@ lcm2ProfileWrap_s * lcm2CMMProfile_GetWrap_( oyPointer_s* cmm_ptr )
+ int lcm2CMMTransform_GetWrap_ ( oyPointer_s * cmm_ptr,
+ lcm2TransformWrap_s ** s )
+ {
+- char type_[4] = lcm2TRANSFORM;
+- int type = *((int*)&type_);
++ char * type_ = lcm2TRANSFORM;
++ int type = *((int32_t*)type_);
+
+ if(cmm_ptr && !lcm2CMMCheckPointer( cmm_ptr, lcm2TRANSFORM ) &&
+ oyPointer_GetPointer(cmm_ptr))
+@@ -266,8 +266,8 @@ int lcm2CMMProfileReleaseWrap(oyPointer *p)
+ int error = !p;
+ lcm2ProfileWrap_s * s = 0;
+
+- char type_[4] = lcm2PROFILE;
+- int type = *((int*)&type_);
++ char * type_ = lcm2PROFILE;
++ int type = *((int32_t*)type_);
+ char s_type[4];
+
+ if(!error && *p)
+@@ -315,8 +315,8 @@ int lcm2CMMData_Open ( oyStruct_s * data,
+
+ if(!error)
+ {
+- char type_[4] = lcm2PROFILE;
+- int type = *((int*)&type_);
++ char * type_ = lcm2PROFILE;
++ int type = *((int32_t*)type_);
+ size_t size = 0;
+ oyPointer block = 0;
+ lcm2ProfileWrap_s * s = calloc(sizeof(lcm2ProfileWrap_s), 1);
+@@ -482,8 +482,8 @@ lcm2TransformWrap_s * lcm2TransformWrap_Set_ (
+
+ if(!error)
+ {
+- char type_[4] = lcm2TRANSFORM;
+- int type = *((int*)&type_);
++ char * type_ = lcm2TRANSFORM;
++ int type = *((int32_t*)type_);
+ lcm2TransformWrap_s * ltw = calloc(sizeof(lcm2TransformWrap_s), 1);
+
+ ltw->type = type;
+@@ -991,8 +991,8 @@ cmsHPROFILE lcm2AddProofProfile ( oyProfile_s * proof,
+ {
+ oyPointer_s * oy = cmm_ptr;
+
+- char type_[4] = lcm2PROFILE;
+- uint32_t type = *((uint32_t*)&type_);
++ char * type_ = lcm2PROFILE;
++ uint32_t type = *((uint32_t*)type_);
+ cmsUInt32Number size = 0;
+ oyPointer block = 0;
+ lcm2ProfileWrap_s * s = calloc(sizeof(lcm2ProfileWrap_s), 1);
+@@ -2182,10 +2182,10 @@ int lcm2FilterPlug_CmmIccRun ( oyFilterPlug_s * requestor_plug,
+ {
+ uint8_t * array_in_tmp = 0,
+ * array_out_tmp = 0;
+- float * array_in_tmp_flt,
+- * array_out_tmp_flt;
+- double * array_in_tmp_dbl,
+- * array_out_tmp_dbl;
++ float * array_in_tmp_flt = 0,
++ * array_out_tmp_flt = 0;
++ double * array_in_tmp_dbl = 0,
++ * array_out_tmp_dbl = 0;
+ uint8_t ** array_in_data = oyArray2d_GetData( array_in ),
+ ** array_out_data = oyArray2d_GetData( array_out );
+ int threads_n =
+diff --git a/modules/oyranos_cmm_lcms.c b/modules/oyranos_cmm_lcms.c
+index bea56ed..b42fc99 100644
+--- a/modules/oyranos_cmm_lcms.c
++++ b/modules/oyranos_cmm_lcms.c
+@@ -213,8 +213,8 @@ lcmsProfileWrap_s * lcmsCMMProfile_GetWrap_( oyPointer_s * cmm_ptr )
+ {
+ lcmsProfileWrap_s * s = 0;
+
+- char type_[4] = lcmsPROFILE;
+- int type = *((int*)&type_);
++ char * type_ = lcmsPROFILE;
++ int type = *((int32_t*)type_);
+
+ if(cmm_ptr && !lcmsCMMCheckPointer( cmm_ptr, lcmsPROFILE ) &&
+ oyPointer_GetPointer(cmm_ptr))
+@@ -236,8 +236,8 @@ lcmsProfileWrap_s * lcmsCMMProfile_GetWrap_( oyPointer_s * cmm_ptr )
+ int lcmsCMMTransform_GetWrap_ ( oyPointer_s * cmm_ptr,
+ lcmsTransformWrap_s ** s )
+ {
+- char type_[4] = lcmsTRANSFORM;
+- int type = *((int*)&type_);
++ char * type_ = lcmsTRANSFORM;
++ int type = *((int32_t*)type_);
+
+ if(cmm_ptr && !lcmsCMMCheckPointer( cmm_ptr, lcmsTRANSFORM ) &&
+ oyPointer_GetPointer(cmm_ptr))
+@@ -264,8 +264,8 @@ int lcmsCMMProfileReleaseWrap(oyPointer *p)
+ int error = !p;
+ lcmsProfileWrap_s * s = 0;
+
+- char type_[4] = lcmsPROFILE;
+- int type = *((int*)&type_);
++ char * type_ = lcmsPROFILE;
++ int type = *((int32_t*)type_);
+ char s_type[4];
+
+ if(!error && *p)
+@@ -313,8 +313,8 @@ int lcmsCMMData_Open ( oyStruct_s * data,
+
+ if(!error)
+ {
+- char type_[4] = lcmsPROFILE;
+- int type = *((int*)&type_);
++ char * type_ = lcmsPROFILE;
++ int type = *((int32_t*)type_);
+ size_t size = 0;
+ oyPointer block = 0;
+ lcmsProfileWrap_s * s = calloc(sizeof(lcmsProfileWrap_s), 1);
+@@ -466,8 +466,8 @@ lcmsTransformWrap_s * lcmsTransformWrap_Set_ (
+
+ if(!error)
+ {
+- char type_[4] = lcmsTRANSFORM;
+- int type = *((int*)&type_);
++ char * type_ = lcmsTRANSFORM;
++ int type = *((int32_t*)type_);
+ lcmsTransformWrap_s * ltw = calloc(sizeof(lcmsTransformWrap_s), 1);
+
+ ltw->type = type;
+@@ -879,8 +879,8 @@ cmsHPROFILE lcmsAddProofProfile ( oyProfile_s * proof,
+ {
+ oyPointer_s * oy = cmm_ptr;
+
+- char type_[4] = lcmsPROFILE;
+- uint32_t type = *((uint32_t*)&type_);
++ char * type_ = lcmsPROFILE;
++ uint32_t type = *((uint32_t*)type_);
+ size_t size = 0;
+ oyPointer block = 0;
+ lcmsProfileWrap_s * s = calloc(sizeof(lcmsProfileWrap_s), 1);
+@@ -1821,10 +1821,10 @@ int lcmsFilterPlug_CmmIccRun ( oyFilterPlug_s * requestor_plug,
+ {
+ uint8_t * array_in_tmp = 0,
+ * array_out_tmp = 0;
+- float * array_in_tmp_flt,
+- * array_out_tmp_flt;
+- double * array_in_tmp_dbl,
+- * array_out_tmp_dbl;
++ float * array_in_tmp_flt = 0,
++ * array_out_tmp_flt = 0;
++ double * array_in_tmp_dbl = 0,
++ * array_out_tmp_dbl = 0;
+ uint8_t ** array_in_data = oyArray2d_GetData( array_in ),
+ ** array_out_data = oyArray2d_GetData( array_out );
+ int threads_n =
+diff --git a/modules/oyranos_cmm_lraw.cpp b/modules/oyranos_cmm_lraw.cpp
+index 5494091..eacbc46 100644
+--- a/modules/oyranos_cmm_lraw.cpp
++++ b/modules/oyranos_cmm_lraw.cpp
+@@ -357,7 +357,7 @@ typedef struct {
+ oyCIExyY v[3];
+ } oyCIExyYTriple;
+
+-void _oyMAT3toCIExyYTriple ( const oyMAT3* a,oyCIExyYTriple * triple )
++int _oyMAT3toCIExyYTriple ( const oyMAT3* a,oyCIExyYTriple * triple )
+ {
+ int i,j,
+ fail=0;
+@@ -380,6 +380,7 @@ void _oyMAT3toCIExyYTriple ( const oyMAT3* a,oyCIExyYTriple * triple )
+ triple->v[i].xy[1] = 1;
+ }
+ }
++ return fail;
+ }
+ const char * _oyMAT3show ( const oyMAT3* a )
+ {
+@@ -488,7 +489,7 @@ oyProfile_s * createMatrixProfile ( libraw_colordata_t & color )
+ _oyMAT3per( &ab_cm, &cam_zyx, &pre_mul );
+ if(_oyMAT3inverse( &ab_cm, &ab_cm_inverse ))
+ // convert to CIE*xyY
+- _oyMAT3toCIExyYTriple( &ab_cm_inverse, &ab_cm_inverse_xyY );
++ fail = _oyMAT3toCIExyYTriple( &ab_cm_inverse, &ab_cm_inverse_xyY );
+ else
+ {
+ fail = 1;
+diff --git a/modules/oyranos_cmm_oyIM_profile.c b/modules/oyranos_cmm_oyIM_profile.c
+index 0bbb412..c98aba7 100644
+--- a/modules/oyranos_cmm_oyIM_profile.c
++++ b/modules/oyranos_cmm_oyIM_profile.c
+@@ -249,9 +249,9 @@ int oyWriteIcSigLutAtoBType ( oyStructList_s * texts,
+ size_t tag_size )
+ {
+ int error = 0;
+- int size, i;
++ int size = 0, i;
+ size_t off;
+- uint8_t * dimensions, precission, *u8;
++ uint8_t * dimensions = 0, precission = 1, *u8;
+ uint16_t u16;
+ char * tmp = 0;
+ char * text = oyAllocateFunc_(128);
+diff --git a/oyjl/oyjl_tree_parse.c b/oyjl/oyjl_tree_parse.c
+index 78c9882..e43117d 100644
+--- a/oyjl/oyjl_tree_parse.c
++++ b/oyjl/oyjl_tree_parse.c
+@@ -684,7 +684,7 @@ yajl_status oyjl_tree_from_json ( const char * text,
+ #if YAJL_VERSION < 20000
+ yajl_parser_config yconfig = { 1, 1 };
+ #endif
+- yajl_handle yhandle;
++ yajl_handle yhandle = 0;
+
+ if(!error && context)
+ {
+diff --git a/test2.cpp b/test2.cpp
+index a71f484..476c3be 100644
+--- a/test2.cpp
++++ b/test2.cpp
+@@ -3573,7 +3573,7 @@ oyTESTRESULT_e testImagePixel()
+ /* all other buffer pixels shall remain untouched */
+ buf_16out2x2[3]==0 && buf_16out2x2[4]==0 && buf_16out2x2[5]==0 &&
+ buf_16out2x2[6]==0 && buf_16out2x2[7]==0 && buf_16out2x2[8]==0 &&
+- buf_16out2x2[9]==0 && buf_16out2x2[10]==0 && buf_16out2x2[10]==0
++ buf_16out2x2[9]==0 && buf_16out2x2[10]==0 && buf_16out2x2[11]==0
+ )
+ { PRINT_SUB( oyTESTRESULT_SUCCESS,
+ "lower right source pixel in 1 pixel RoI %s",
+@@ -3621,7 +3621,7 @@ oyTESTRESULT_e testImagePixel()
+ buf_16in2x2[6]==0 && buf_16in2x2[7]==0 && buf_16in2x2[8]==0 &&
+ buf_16in2x2[9]==65535 && buf_16in2x2[10]==65535 &&buf_16in2x2[11]==65535&&
+ /* the result shall appear in the lower right corner / last pixel */
+- buf_16out2x2[9]==65535 && buf_16out2x2[10]>20000&&buf_16out2x2[20]<40000&&
++ buf_16out2x2[9]==65535 && buf_16out2x2[10]>20000&&buf_16out2x2[11]<40000&&
+ /* all other buffer pixels shall remain untouched */
+ buf_16out2x2[0]==0 && buf_16out2x2[1]==0 && buf_16out2x2[2]==0 &&
+ buf_16out2x2[3]==0 && buf_16out2x2[4]==0 && buf_16out2x2[5]==0 &&
+@@ -3986,7 +3986,7 @@ oyTESTRESULT_e oyTestRun ( oyTESTRESULT_e (*test)(void),
+ /* main */
+ int main(int argc, char** argv)
+ {
+- int i, error;
++ int i, error = 0;
+
+ if(getenv("OY_DEBUG"))
+ {
+diff --git a/tests/test_oyranos.c b/tests/test_oyranos.c
+index bb3f521..bccec7c 100644
+--- a/tests/test_oyranos.c
++++ b/tests/test_oyranos.c
+@@ -1009,7 +1009,7 @@ oyTESTRESULT_e testObserver ()
+ /* main */
+ int main(int argc, char** argv)
+ {
+- int i, error;
++ int i, error = 0;
+
+ /* init */
+ for(i = 0; i <= oyTESTRESULT_UNKNOWN; ++i)
+diff --git a/examples/oyranos_convert/oyranos_convert.c b/examples/oyranos_convert/oyranos_convert.c
+index 099b872..51dd59d 100644
+--- a/examples/oyranos_convert/oyranos_convert.c
++++ b/examples/oyranos_convert/oyranos_convert.c
+@@ -135,16 +135,10 @@ int main( int argc , char** argv )
+
+ int levels = 0;
+
+- const char * result_xml = 0;
+- char * text = 0, * t = 0;
+- const char * opt_names = 0;
+- oyFormsArgs_s * forms_args = oyFormsArgs_New( 0 );
+- const char * data = 0, * ct = 0;
+ char ** other_args = 0;
+ int other_args_n = 0;
+- int i;
++ char * text = 0, * t = 0;
+ oyOptions_s * opts = 0;
+- oyOption_s * o = 0;
+ oyImage_s * image = 0;
+
+ #ifdef USE_GETTEXT
+@@ -275,6 +269,13 @@ int main( int argc , char** argv )
+ #if 0
+ if(other_args)
+ {
++ const char * result_xml = 0;
++ const char * opt_names = 0;
++ oyFormsArgs_s * forms_args = oyFormsArgs_New( 0 );
++ const char * data = 0, * ct = 0;
++ int i;
++ oyOption_s * o = 0;
++
+ forms_args->print = 0;
+
+ error = oyXFORMsRenderUi( text, oy_ui_cmd_line_handlers, forms_args );
+diff --git a/oyranos_gamma.c b/oyranos_gamma.c
+index 598aa2d..0c5b09e 100644
+--- a/oyranos_gamma.c
++++ b/oyranos_gamma.c
+@@ -172,7 +172,7 @@ int main( int argc , char** argv )
+ else if(OY_IS_ARG("profile"))
+ { OY_PARSE_STRING_ARG2(prof_name, "profile"); break; }
+ else if(OY_IS_ARG("display"))
+- { const char * t; OY_PARSE_STRING_ARG2(t, "display");
++ { const char * t=0; OY_PARSE_STRING_ARG2(t, "display");
+ if(t) display_name = strdup(t); break; }
+ else if(OY_IS_ARG("modules"))
+ { list_modules = 1; i=100; break; }
+--
+1.5.6.5
+
+
diff --git a/media-libs/oyranos/files/oyranos-0.9.1-fix-oyRankMap-helper-functions-crashes.patch b/media-libs/oyranos/files/oyranos-0.9.1-fix-oyRankMap-helper-functions-crashes.patch
new file mode 100644
index 000000000000..b97260b20f53
--- /dev/null
+++ b/media-libs/oyranos/files/oyranos-0.9.1-fix-oyRankMap-helper-functions-crashes.patch
@@ -0,0 +1,54 @@
+From c2feb3e1f1ab45702f98c8728898eab1ee849cd4 Mon Sep 17 00:00:00 2001
+From: Kai-Uwe Behrmann <ku.b@gmx.de>
+Date: Fri, 22 Feb 2013 19:42:23 +0100
+Subject: [PATCH] * [sources]: fix counting in oyRankMap data
+
+2013-03-31: backport to oyranos-0.9.1, remove (duplicate) patch for nonexistent file
+ remove hunks for not yet existing parts of oyConfig_s.c
+
+This fixes crashes in several oyRankMap helper functions.
+---
+ API_generated/oyConfig_s.c | 86 ++++++++++++++++++++--
+
+diff --git a/src/API_generated/oyConfig_s.c b/API_generated/oyConfig_s.c
+index 8ec0ff6..7ea1f3b 100644
+--- a/API_generated/oyConfig_s.c
++++ b/API_generated/oyConfig_s.c
+@@ -983,14 +983,14 @@ oyRankMap * oyRankMapCopy ( const oyRankMap * rank_map,
+ {
+ oyRankMap * map = 0;
+ int error = !rank_map;
+- int n = 0, i;
++ int n = 0, i = 0;
+
+ if(!allocateFunc)
+ allocateFunc = oyAllocateFunc_;
+
+ if(error <= 0)
+ {
+- while( rank_map[n++].key ) {}
++ while( rank_map[i++].key ) ++n;
+
+ oyAllocHelper_m_( map, oyRankMap, n + 1, allocateFunc, error = 1 );
+ }
+@@ -1025,7 +1025,7 @@ OYAPI void OYEXPORT
+ oyDeAlloc_f deAllocateFunc )
+ {
+ int error = !rank_map || !*rank_map;
+- int n = 0, i;
++ int n = 0, i = 0;
+
+ if(!deAllocateFunc)
+ deAllocateFunc = oyDeAllocateFunc_;
+@@ -1033,7 +1033,7 @@ OYAPI void OYEXPORT
+ if(error <= 0)
+ {
+ oyRankMap * map = *rank_map;
+- while( (*rank_map)[n++].key ) {}
++ while( (*rank_map)[i++].key ) ++n;
+ for(i = 0; i < n; ++i)
+ {
+ deAllocateFunc( map[i].key ); map[i].key = 0;
+--
+1.5.6.5
+
diff --git a/media-libs/oyranos/files/oyranos-0.9.1-fix-oyStringSegment-crash.patch b/media-libs/oyranos/files/oyranos-0.9.1-fix-oyStringSegment-crash.patch
new file mode 100644
index 000000000000..b92be88fc236
--- /dev/null
+++ b/media-libs/oyranos/files/oyranos-0.9.1-fix-oyStringSegment-crash.patch
@@ -0,0 +1,26 @@
+From cf495d5ede29f7211e498217c4d06428f944bac3 Mon Sep 17 00:00:00 2001
+From: Kai-Uwe Behrmann <ku.b@gmx.de>
+Date: Wed, 13 Mar 2013 14:59:19 +0100
+Subject: [PATCH] * [core]: fix oyStringSegment_() crash
+
+2013-03-31: backport to oyranos-0.9.1, remove unrelated oyStringReplace_ hunk
+
+---
+ oyranos_string.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/oyranos_string.c b/oyranos_string.c
+index 525ce7e..1d214c0 100644
+--- a/oyranos_string.c
++++ b/oyranos_string.c
+@@ -499,7 +499,7 @@ char * oyStringSegment_ ( char * text,
+ for(; i < segment; ++i)
+ {
+ t = oyStrchr_( t, delimiter );
+- ++t;
++ if(t) ++t;
+ }
+
+ end_pos = (uintptr_t) oyStrchr_(t, delimiter);
+--
+1.5.6.5
diff --git a/media-libs/oyranos/files/oyranos-0.9.1-fix-pseq-crash.patch b/media-libs/oyranos/files/oyranos-0.9.1-fix-pseq-crash.patch
new file mode 100644
index 000000000000..e59dd18feabf
--- /dev/null
+++ b/media-libs/oyranos/files/oyranos-0.9.1-fix-pseq-crash.patch
@@ -0,0 +1,26 @@
+From 843b9cc4121cdb518b8f1a65e0207e4cceb2d2ae Mon Sep 17 00:00:00 2001
+From: Kai-Uwe Behrmann <ku.b@gmx.de>
+Date: Wed, 21 Nov 2012 08:15:21 +0100
+Subject: [PATCH] * [oyIM]: fix pseq crash
+
+---
+ modules/oyranos_cmm_oyIM_profile.c | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/modules/oyranos_cmm_oyIM_profile.c b/modules/oyranos_cmm_oyIM_profile.c
+index 265feea..8de0491 100644
+--- a/modules/oyranos_cmm_oyIM_profile.c
++++ b/modules/oyranos_cmm_oyIM_profile.c
+@@ -1958,7 +1958,8 @@ oyStructList_s * oyIMProfileTag_GetValues(
+ memcpy( model_local, model, 4 );
+ model = model_local;
+ tech = oyICCTechnologyDescription( oyValueUInt32(desc->technology ));
+- }
++ } else
++ continue;
+
+ /* first mnf */
+ tmptag = oyProfileTag_New(0);
+--
+1.5.6.5
+
diff --git a/media-libs/oyranos/files/oyranos-0.9.1-fix-real-compiler-warnings.patch b/media-libs/oyranos/files/oyranos-0.9.1-fix-real-compiler-warnings.patch
new file mode 100644
index 000000000000..ad76042e4d94
--- /dev/null
+++ b/media-libs/oyranos/files/oyranos-0.9.1-fix-real-compiler-warnings.patch
@@ -0,0 +1,75 @@
+From 692f4d363033a419ea595f6be9ddda84dae4d20d Mon Sep 17 00:00:00 2001
+From: Kai-Uwe Behrmann <ku.b@gmx.de>
+Date: Thu, 13 Dec 2012 18:04:50 +0100
+Subject: [PATCH] * [sources]: fix compiler warnings
+
+2013-03-30: Rip out typo patches, backport to oyranos-0.9.1
+
+---
+ API_generated/oyOption_s.c | 6 +++---
+ oyranos_io_core.c | 2 +-
+ oyranos_string.c | 4 +---
+ oyjl/oyjl_tree_parse.c | 2 +-
+
+diff --git a/API_generated/oyOption_s.c b/API_generated/oyOption_s.c
+index ea78f01..c2bbf66 100644
+--- a/API_generated/oyOption_s.c
++++ b/API_generated/oyOption_s.c
+@@ -372,7 +372,7 @@ const char * oyOption_GetValueString(oyOption_s * obj,
+ {
+ oyOption_s_ * s = (oyOption_s_*)obj;
+ int error = !s,
+- n;
++ n = 0;
+ const char * result = 0;
+
+ if(!s)
+diff --git a/oyranos_io_core.c b/oyranos_io_core.c
+index d28068b..7ce1a94 100644
+--- a/oyranos_io_core.c
++++ b/oyranos_io_core.c
+@@ -262,7 +262,7 @@ char * oyReadUrlToMem_ ( const char * url,
+ {
+ char * text = 0;
+ char * command = 0;
+- FILE * fp;
++ FILE * fp = 0;
+
+ if(url && strlen(url) && size )
+ {
+diff --git a/oyranos_string.c b/oyranos_string.c
+index 26adbe7..d43b0dd 100644
+--- a/oyranos_string.c
++++ b/oyranos_string.c
+@@ -184,13 +184,11 @@ int oyStringFromData_ ( const oyPointer ptr,
+ {
+ const char * text = (const char*) ptr;
+ char * text_tmp = 0;
+- int j,
++ int j = 0,
+ error = 0;
+
+ if(ptr && size)
+ {
+- j = 0;
+-
+ while(j < size)
+ if(!isprint( text[j] ) && !isspace( text[j] ))
+ {
+diff --git a/oyjl/oyjl_tree_parse.c b/oyjl/oyjl_tree_parse.c
+index b969ede..78c9882 100644
+--- a/oyjl/oyjl_tree_parse.c
++++ b/oyjl/oyjl_tree_parse.c
+@@ -213,7 +213,7 @@ oyjl_tree_parse_context_s * oyjl_tree_parse_context_new( void )
+ if(!error)
+ {
+ memset(s, 0, sizeof(oyjl_tree_parse_context_s));
+- strcpy(s->type,"yopc");
++ memcpy(s->type,"yopc",4);
+ }
+ return s;
+ }
+--
+1.5.6.5
+
+
diff --git a/media-libs/oyranos/files/oyranos-0.9.1-initialise-memory-for-strtod.patch b/media-libs/oyranos/files/oyranos-0.9.1-initialise-memory-for-strtod.patch
new file mode 100644
index 000000000000..9e127b289042
--- /dev/null
+++ b/media-libs/oyranos/files/oyranos-0.9.1-initialise-memory-for-strtod.patch
@@ -0,0 +1,62 @@
+From 996f512cca3d19f7408e6fb9a8e0c133a54561e4 Mon Sep 17 00:00:00 2001
+From: Kai-Uwe Behrmann <ku.b@gmx.de>
+Date: Thu, 3 Jan 2013 16:38:52 +0100
+Subject: [PATCH] * [sources]: initialise memory for strtod
+
+fixes warnings in valgrind about uninitialised memory usage
+
+2013-03-31: backport to oyranos-0.9.1, remove patch for nonexistent file
+
+---
+ API_generated/oyranos_object.c | 8 ++++----
+ oyranos_string.c | 10 ++++++----
+
+diff --git a/API_generated/oyranos_object.c b/API_generated/oyranos_object.c
+index aacc2f5..1db9f42 100644
+--- a/API_generated/oyranos_object.c
++++ b/API_generated/oyranos_object.c
+@@ -768,10 +768,10 @@ int oyTextIccDictMatch ( const char * text,
+ int n = 0, p_n = 0, i, j;
+ char ** texts = 0, * t;
+ char ** patterns = 0, * p;
+- long num[2];
+- int num_valid[2];
+- double dbl[2];
+- int dbl_valid[2];
++ long num[2] = {0,0};
++ int num_valid[2] = {0,0};
++ double dbl[2] = {0,0};
++ int dbl_valid[2] = {0,0};
+
+ DBG_MEM_START
+
+diff --git a/oyranos_string.c b/oyranos_string.c
+index d43b0dd..b9c9bc4 100644
+--- a/oyranos_string.c
++++ b/oyranos_string.c
+@@ -68,15 +68,17 @@ int oyStringToDouble ( const char * text,
+ setlocale(LC_NUMERIC, "C");
+ /* avoid irritating valgrind output of "Invalid read of size 8"
+ * might be a glibc error or a false positive in valgrind */
+- t = oyAllocateFunc_( len + 2*sizeof(long) + 1 );
++ t = oyAllocateFunc_( len + 2*sizeof(double) + 1 );
++ memset( t, 0, len + 2*sizeof(double) + 1 );
++
+ memcpy( t, text, len );
+- t[len] = 0;
++
+ if(0 && oy_debug_memory)
+ {
+- printf( OY_DBG_FORMAT_""OY_PRINT_POINTER" \"%s\" %d "OY_PRINT_POINTER" \"%s\"\n",
++ fprintf( stderr, OY_DBG_FORMAT_""OY_PRINT_POINTER" \"%s\" %d "OY_PRINT_POINTER" \"%s\"\n",
+ OY_DBG_ARGS_,(intptr_t)text, text, len,
+ t, t );
+- fflush( stdout );
++ fflush( stderr );
+ }
+
+ *value = strtod( t, &p );
+--
+1.5.6.5
+
+
diff --git a/media-libs/oyranos/files/oyranos-0.9.1-omit-profile-with-error.patch b/media-libs/oyranos/files/oyranos-0.9.1-omit-profile-with-error.patch
new file mode 100644
index 000000000000..c7605b40d0a3
--- /dev/null
+++ b/media-libs/oyranos/files/oyranos-0.9.1-omit-profile-with-error.patch
@@ -0,0 +1,40 @@
+From ecbfe88cf77863c7c925f61d0e69d11474059cb8 Mon Sep 17 00:00:00 2001
+From: Kai-Uwe Behrmann <ku.b@gmx.de>
+Date: Tue, 26 Mar 2013 12:09:01 +0100
+Subject: [PATCH] * [source]: omit profile with error
+
+a proper return value would be more helpful
+---
+ API_generated/oyProfile_s_.c | 7 +++++--
+
+diff --git a/API_generated/oyProfile_s_.c b/API_generated/oyProfile_s_.c
+index 83629fe..338ed08 100644
+--- a/API_generated/oyProfile_s_.c
++++ b/API_generated/oyProfile_s_.c
+@@ -8,12 +8,12 @@
+ * Oyranos is an open source Colour Management System
+ *
+ * @par Copyright:
+- * 2004-2012 (C) Kai-Uwe Behrmann
++ * 2004-2013 (C) Kai-Uwe Behrmann
+ *
+ * @author Kai-Uwe Behrmann <ku.b@gmx.de>
+ * @par License:
+ * new BSD - see: http://www.opensource.org/licenses/bsd-license.php
+- * @date 2012/10/31
++ * @date 2013/03/26
+ */
+
+
+@@ -724,6 +724,9 @@ oyProfile_s_ * oyProfile_FromFile_ ( const char * name,
+ }
+ }
+
++ if(error >= 1 && s)
++ oyProfile_Release( (oyProfile_s**)&s );
++
+ oyHash_Release_( &entry );
+
+ return s;
+--
+1.5.6.5
diff --git a/media-libs/oyranos/files/oyranos-0.9.1-support-pur-xrandr-without-xinerama.patch b/media-libs/oyranos/files/oyranos-0.9.1-support-pur-xrandr-without-xinerama.patch
new file mode 100644
index 000000000000..9c31fcb3ffc3
--- /dev/null
+++ b/media-libs/oyranos/files/oyranos-0.9.1-support-pur-xrandr-without-xinerama.patch
@@ -0,0 +1,44 @@
+From a4f157beb6c60855f64d011cb2ad2f93071da461 Mon Sep 17 00:00:00 2001
+From: Kai-Uwe Behrmann <ku.b@gmx.de>
+Date: Sat, 15 Dec 2012 16:10:22 +0100
+Subject: [PATCH] * [oyX1]: support pur XRandR without Xinerama
+
+... as was seen with Intel's driver.
+---
+ src/modules/devices/oyranos_monitor_x11.c | 12 +++++++-----
+ 1 files changed, 7 insertions(+), 5 deletions(-)
+
+diff --git a/src/modules/devices/oyranos_monitor_x11.c b/src/modules/devices/oyranos_monitor_x11.c
+index b79b2d6..f8546b3 100644
+--- a/src/modules/devices/oyranos_monitor_x11.c
++++ b/src/modules/devices/oyranos_monitor_x11.c
+@@ -1278,6 +1278,8 @@ oyX1Monitor_s* oyX1Monitor_newFrom_ ( const char * display_name,
+ */
+ }
+
++ expensive = 1;
++
+ if((major_versionp*100 + minor_versionp) >= 102 && expensive)
+ {
+ Window w = RootWindow(display, oyX1Monitor_screen_(disp));
+@@ -1347,11 +1349,11 @@ oyX1Monitor_s* oyX1Monitor_newFrom_ ( const char * display_name,
+ if(crtc_info)
+ {
+ /* compare with Xinerama geometry */
+- if(
+- geo[0] == crtc_info->x &&
+- geo[1] == crtc_info->y &&
+- geo[2] == crtc_info->width &&
+- geo[3] == crtc_info->height )
++ if(!(geo[0] != -1 && geo[1] != -1 && geo[2] != -1 && geo[3] != -1)||
++ (geo[0] == crtc_info->x &&
++ geo[1] == crtc_info->y &&
++ geo[2] == crtc_info->width &&
++ geo[3] == crtc_info->height ) )
+ {
+ xrand_screen = monitors;
+ ++geo_monitors;
+--
+1.5.6.5
+
+
diff --git a/media-libs/oyranos/files/oyranos-0.9.4-be-more-verbose.patch b/media-libs/oyranos/files/oyranos-0.9.4-be-more-verbose.patch
new file mode 100644
index 000000000000..66ed023ff842
--- /dev/null
+++ b/media-libs/oyranos/files/oyranos-0.9.4-be-more-verbose.patch
@@ -0,0 +1,51 @@
+From 80fd8efab3f56c698b4182846d8707916849cad9 Mon Sep 17 00:00:00 2001
+From: Kai-Uwe Behrmann <ku.b@gmx.de>
+Date: Sat, 9 Feb 2013 18:21:47 +0100
+Subject: [PATCH] * [tools]: add more verbosity to oy-monitor -v
+
+Here to the profile assignment part.
+---
+ src/tools/oyranos_gamma.c | 16 ++++++++++++++++
+ 1 files changed, 16 insertions(+), 0 deletions(-)
+
+diff --git a/src/tools/oyranos_gamma.c b/src/tools/oyranos_gamma.c
+index f2206a5..005bdd2 100644
+--- a/src/tools/oyranos_gamma.c
++++ b/src/tools/oyranos_gamma.c
+@@ -747,16 +747,32 @@ int main( int argc , char** argv )
+
+ if(monitor_profile)
+ {
++ if(verbose)
++ fprintf( stdout, "oyDeviceSetProfile()\n" );
+ oyDeviceSetProfile( device, monitor_profile );
++ if(verbose)
++ fprintf( stdout, "oyDeviceUnset()\n" );
+ oyDeviceUnset( device );
+ } else
+ if(erase || unset)
++ {
++ if(verbose)
++ fprintf( stdout, "oyDeviceUnset()\n" );
+ oyDeviceUnset( device );
++ }
+ if(erase)
++ {
++ if(verbose)
++ fprintf( stdout, "oyConfig_EraseFromDB()\n" );
+ oyConfig_EraseFromDB( device );
++ }
+
+ if(setup)
++ {
++ if(verbose)
++ fprintf( stdout, "oyDeviceSetup()\n" );
+ oyDeviceSetup( device );
++ }
+
+ oyConfig_Release( &device );
+ }
+--
+1.5.6.5
+
+
diff --git a/media-libs/oyranos/files/oyranos-0.9.4-buildsystem-r1.patch b/media-libs/oyranos/files/oyranos-0.9.4-buildsystem-r1.patch
new file mode 100644
index 000000000000..a4516a2aeb11
--- /dev/null
+++ b/media-libs/oyranos/files/oyranos-0.9.4-buildsystem-r1.patch
@@ -0,0 +1,162 @@
+--- oyranos-0.9.4/src/CMakeLists.txt
++++ oyranos-0.9.4/src/CMakeLists.txt
+@@ -100,7 +100,9 @@
+ INCLUDE_DIRECTORIES( ${XCM_INCLUDE_DIRS} )
+ LINK_DIRECTORIES( ${XCM_LIBRARY_DIRS} )
+
+-FIND_PACKAGE( X11 )
++IF(WANT_X11)
++FIND_PACKAGE( X11 REQUIRED )
++ENDIF(WANT_X11)
+ IF(X11_FOUND)
+ INCLUDE_DIRECTORIES( ${X11_INCLUDE_DIRS} )
+ LINK_DIRECTORIES( ${X11_LIBRARY_DIRS} )
+@@ -123,27 +125,35 @@
+ LINK_DIRECTORIES( ${XXF86VM_LIBRARY_DIRS} )
+ ENDIF(X11_FOUND)
+
+-FIND_PACKAGE( CUPS )
++IF(WANT_CUPS)
++FIND_PACKAGE( Cups REQUIRED )
++SET( HAVE_CUPS 1 )
++ENDIF(WANT_CUPS)
+ IF(HAVE_CUPS)
+- INCLUDE_DIRECTORIES( ${CUPS_INCLUDE_DIRS} )
+- LINK_DIRECTORIES( ${CUPS_LIBRARY_DIRS} )
++ INCLUDE_DIRECTORIES( ${CUPS_INCLUDE_DIR} )
+ ENDIF(HAVE_CUPS)
+
+-FIND_PACKAGE( Cairo )
++IF(WANT_CAIRO)
++FIND_PACKAGE( Cairo REQUIRED)
++ENDIF(WANT_CAIRO)
+ IF(HAVE_CAIRO)
+ INCLUDE_DIRECTORIES( ${CAIRO_INCLUDE_DIR}/cairo )
+ INCLUDE_DIRECTORIES( ${CAIRO_INCLUDE_DIR} )
+ LINK_DIRECTORIES( ${CAIRO_LIBRARY_DIRS} )
+ ENDIF(HAVE_CAIRO)
+
+-FIND_PACKAGE(Qt4 COMPONENTS QtCore QtGui)
++IF(WANT_QT4)
++FIND_PACKAGE(Qt4 COMPONENTS QtCore QtGui REQUIRED)
++ENDIF(WANT_QT4)
+ IF(QT_FOUND)
+ SET( HAVE_QT 1 )
+ INCLUDE_DIRECTORIES( ${QT_INCLUDE_DIRS} )
+ LINK_DIRECTORIES( ${QT_LIBRARY_DIRS} )
+ ENDIF(QT_FOUND)
+
+-FIND_PACKAGE( Fltk )
++IF(WANT_FLTK)
++FIND_PACKAGE( FLTK REQUIRED)
++ENDIF(WANT_FLTK)
+ IF(FLTK_FOUND)
+ SET( HAVE_FLTK 1 )
+ INCLUDE_DIRECTORIES( ${FLTK_INCLUDE_DIRS} )
+@@ -159,7 +169,9 @@
+ SET( LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} PARENT_SCOPE)
+ ENDIF(LIBXML2_FOUND)
+
+-FIND_PACKAGE( LibRaw )
++IF(WANT_LIBRAW)
++FIND_PACKAGE( LibRaw REQUIRED )
++ENDIF(WANT_LIBRAW)
+ IF( HAVE_LIBRAW )
+ # TRY_COMPILE(
+ # HAVE_LIBRAW_REALLY
+@@ -182,7 +194,9 @@
+ MESSAGE( "HAVE_LIBRAW_PLUGIN: ${HAVE_LIBRAW_PLUGIN}" )
+ ENDIF()
+
+-FIND_PACKAGE( Exif2 )
++IF(WANT_EXIV2)
++FIND_PACKAGE( Exif2 REQUIRED )
++ENDIF(WANT_EXIV2)
+ IF(HAVE_EXIV2)
+ INCLUDE_DIRECTORIES( ${EXIV2_INCLUDE_DIRS} )
+ LINK_DIRECTORIES( ${EXIV2_LIBRARY_DIRS} )
+--- oyranos-0.9.4/CMakeLists.txt
++++ oyranos-0.9.4/CMakeLists.txt
+@@ -41,7 +41,7 @@
+
+
+ # detect top level projects
+-FIND_PACKAGE( Yajl )
++FIND_PACKAGE( Yajl REQUIRED )
+ IF( HAVE_YAJL )
+ INCLUDE_DIRECTORIES( ${YAJL_INCLUDE_DIRS} )
+ LINK_DIRECTORIES( ${YAJL_LIBRARY_DIRS} )
+@@ -51,71 +51,15 @@
+ IF( NOT HAVE_YAJL_VERSION_H )
+ INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/yajl/ )
+ ENDIF( NOT HAVE_YAJL_VERSION_H )
+-ELSE( HAVE_YAJL )
+- IF(CMAKE_VERSION VERSION_GREATER 2.8.0)
+- include(ExternalProject)
+- ExternalProject_Add( yajl
+- SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/yajl
+- CONFIGURE_COMMAND cmake ${CMAKE_CURRENT_SOURCE_DIR}/yajl
+- BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/yajl
+- BUILD_COMMAND ${MAKE}
+- # skip installation
+- INSTALL_COMMAND echo )
+- INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/yajl )
+- LINK_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR}/yajl )
+- SET( YAJL_LIBRARIES yajl-static )
+- ENDIF()
+-
+ ENDIF( HAVE_YAJL )
+
+-FIND_PACKAGE( Elektra )
++FIND_PACKAGE( Elektra REQUIRED )
++SET( HAVE_ELEKTRA 1 )
+ IF(HAVE_ELEKTRA)
+ SET( ELEKTRA_SPEC "Requires: elektra 0.7
+ BuildRequires: elektra-devel" )
+ INCLUDE_DIRECTORIES( ${ELEKTRA_INCLUDE_DIRS} )
+ LINK_DIRECTORIES( ${ELEKTRA_LIBRARY_DIRS} )
+-ELSE(HAVE_ELEKTRA)
+- SET( ELEKTRA_VERSION elektra-0.7.1 )
+- MESSAGE( "-- Using internal Elektra: ${ELEKTRA_VERSION}" )
+- INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/${ELEKTRA_VERSION}/src/include
+- ${CMAKE_BINARY_DIR}/${ELEKTRA_VERSION}/src/include )
+- SET( ELEKTRA_LIBRARIES_STATIC
+- ${CMAKE_BINARY_DIR}/${ELEKTRA_VERSION}/src/libelektra/libelektra_a-kdb.o
+- ${CMAKE_BINARY_DIR}/${ELEKTRA_VERSION}/src/libelektra/libelektra_a-kdbhandle.o
+- ${CMAKE_BINARY_DIR}/${ELEKTRA_VERSION}/src/libelektra/libelektra_a-key.o
+- ${CMAKE_BINARY_DIR}/${ELEKTRA_VERSION}/src/libelektra/libelektra_a-keyset.o
+- ${CMAKE_BINARY_DIR}/${ELEKTRA_VERSION}/src/libelektra/libelektra_a-trie.o
+- ${CMAKE_BINARY_DIR}/${ELEKTRA_VERSION}/src/libelektra/libelektra_a-kdbhighlevel.o
+- ${CMAKE_BINARY_DIR}/${ELEKTRA_VERSION}/src/libelektra/libelektra_a-kdbcapability.o
+- ${CMAKE_BINARY_DIR}/${ELEKTRA_VERSION}/src/libelektra/libelektra_a-keyhelpers.o
+- ${CMAKE_BINARY_DIR}/${ELEKTRA_VERSION}/src/libelektra/libelektra_a-keymeta.o
+- ${CMAKE_BINARY_DIR}/${ELEKTRA_VERSION}/src/libelektra/libelektra_a-keyname.o
+- ${CMAKE_BINARY_DIR}/${ELEKTRA_VERSION}/src/libelektra/libelektra_a-keytest.o
+- ${CMAKE_BINARY_DIR}/${ELEKTRA_VERSION}/src/libelektra/libelektra_a-keyvalue.o
+- ${CMAKE_BINARY_DIR}/${ELEKTRA_VERSION}/src/libelektra/libelektra_a-serialize.o
+- ${CMAKE_BINARY_DIR}/${ELEKTRA_VERSION}/src/libelektra/libelektra_a-split.o
+- ${CMAKE_BINARY_DIR}/${ELEKTRA_VERSION}/src/libelektra/libelektra_a-exported_symbols.o
+- ${CMAKE_BINARY_DIR}/${ELEKTRA_VERSION}/src/libloader/libloader_static_a-kdbLibLoader.o
+- ${CMAKE_BINARY_DIR}/${ELEKTRA_VERSION}/src/libhelper/libhelper_static_a-internal.o
+- ${CMAKE_BINARY_DIR}/${ELEKTRA_VERSION}/src/libhelper/libhelper_static_a-helper.o
+- ${CMAKE_BINARY_DIR}/${ELEKTRA_VERSION}/src/backends/filesys/libelektra_filesys_a-filesys.o
+- ${CMAKE_BINARY_DIR}/${ELEKTRA_VERSION}/src/libelektratools/libelektratools_a-kdbtools.o
+- ${CMAKE_BINARY_DIR}/${ELEKTRA_VERSION}/src/libelektratools/libelektratools_a-stream.o
+- )
+- SET( ELEKTRA_LIBRARIES
+- ${LIBXML2_LIBRARIES}
+- )
+- IF(CMAKE_VERSION VERSION_GREATER 2.8.0)
+- include(ExternalProject)
+- ExternalProject_Add( ${ELEKTRA_VERSION}
+- SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/${ELEKTRA_VERSION}
+- # GCC flags (-fPIC) will fail on Windows, without we get relocation R_X86_64_32 errors
+- CONFIGURE_COMMAND CFLAGS=-fPIC ${CMAKE_CURRENT_SOURCE_DIR}/${ELEKTRA_VERSION}/configure --enable-static --enable-shared=false
+- BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${ELEKTRA_VERSION}
+- BUILD_COMMAND ${MAKE}
+- # skip installation
+- INSTALL_COMMAND echo )
+- ENDIF()
+ ENDIF(HAVE_ELEKTRA)
+
+ #now add all directories
diff --git a/media-libs/oyranos/files/oyranos-0.9.4-fix-array-access.patch b/media-libs/oyranos/files/oyranos-0.9.4-fix-array-access.patch
new file mode 100644
index 000000000000..0c5ca3c83ba5
--- /dev/null
+++ b/media-libs/oyranos/files/oyranos-0.9.4-fix-array-access.patch
@@ -0,0 +1,27 @@
+From: Kai-Uwe Behrmann <ku.b@gmx.de>
+Date: Mon, 18 Mar 2013 18:07:16 +0000 (+0100)
+Subject: * [oyX1]: fix array access
+X-Git-Url: http://www.oyranos.org/scm?p=oyranos.git;a=commitdiff_plain;h=11d848a38608deeeca61288d46cfca55c6916788
+
+* [oyX1]: fix array access
+---
+
+diff --git a/src/modules/devices/oyranos_monitor_x11.c b/src/modules/devices/oyranos_monitor_x11.c
+index a530a81..bac09c1 100644
+--- a/src/modules/devices/oyranos_monitor_x11.c
++++ b/src/modules/devices/oyranos_monitor_x11.c
+@@ -1329,6 +1329,13 @@ oyX1Monitor_s* oyX1Monitor_newFrom_ ( const char * display_name,
+ int n_scr_info = 0;
+ XineramaScreenInfo *scr_info = XineramaQueryScreens( display,
+ &n_scr_info );
++ if(n_scr_info <= selected_screen)
++ {
++ XFree( scr_info );
++ oyX1Monitor_release_( &disp );
++ return 0;
++ }
++
+ geo[0] = scr_info[selected_screen].x_org;
+ geo[1] = scr_info[selected_screen].y_org;
+ geo[2] = scr_info[selected_screen].width;
+
diff --git a/media-libs/oyranos/files/oyranos-0.9.4-fix-double-object-release.patch b/media-libs/oyranos/files/oyranos-0.9.4-fix-double-object-release.patch
new file mode 100644
index 000000000000..1cbdf47a79f2
--- /dev/null
+++ b/media-libs/oyranos/files/oyranos-0.9.4-fix-double-object-release.patch
@@ -0,0 +1,35 @@
+From: Kai-Uwe Behrmann <ku.b@gmx.de>
+Date: Wed, 20 Mar 2013 17:15:17 +0000 (+0100)
+Subject: * [core]: fix double object release
+X-Git-Url: http://www.oyranos.org/scm?p=oyranos.git;a=commitdiff_plain;h=6214cf15fafae52d67233d27462488487091d8d6
+
+* [core]: fix double object release
+
+... which was revealed by valgrind
+---
+
+diff --git a/src/API_generated/oyranos_devices.c b/src/API_generated/oyranos_devices.c
+index 4ed5138..8cee0c8 100644
+--- a/src/API_generated/oyranos_devices.c
++++ b/src/API_generated/oyranos_devices.c
+@@ -1896,7 +1896,6 @@ OYAPI int OYEXPORT
+ oyConfigs_MoveIn( taxi_devices, &taxi_dev, -1 );
+ }
+ oyConfigs_Release( &configs_ );
+- oyOptions_Release( &options );
+ oyFree_m_(ranks);
+ }
+
+diff --git a/src/templates/oyranos_devices.template.c b/src/templates/oyranos_devices.template.c
+index 586ba36..ff555e3 100644
+--- a/src/templates/oyranos_devices.template.c
++++ b/src/templates/oyranos_devices.template.c
+@@ -1881,7 +1881,6 @@ OYAPI int OYEXPORT
+ oyConfigs_MoveIn( taxi_devices, &taxi_dev, -1 );
+ }
+ oyConfigs_Release( &configs_ );
+- oyOptions_Release( &options );
+ oyFree_m_(ranks);
+ }
+
+
diff --git a/media-libs/oyranos/files/oyranos-0.9.4-fix-oyRankMap-helper-functions-crashes.patch b/media-libs/oyranos/files/oyranos-0.9.4-fix-oyRankMap-helper-functions-crashes.patch
new file mode 100644
index 000000000000..27c06cd81551
--- /dev/null
+++ b/media-libs/oyranos/files/oyranos-0.9.4-fix-oyRankMap-helper-functions-crashes.patch
@@ -0,0 +1,53 @@
+From: Kai-Uwe Behrmann <ku.b@gmx.de>
+Date: Fri, 22 Feb 2013 18:42:23 +0000 (+0100)
+Subject: * [sources]: fix counting in oyRankMap data
+X-Git-Url: http://www.oyranos.org/scm?p=oyranos.git;a=commitdiff_plain;h=c2feb3e1f1ab45702f98c8728898eab1ee849cd4
+
+* [sources]: fix counting in oyRankMap data
+
+2013-04-21: backport to oyranos-0.9.4, remove (duplicate) patch for nonexistent file
+
+This fixes crashes in several oyRankMap helper functions.
+---
+
+diff --git a/src/API_generated/oyConfig_s.c b/src/API_generated/oyConfig_s.c
+index 8ec0ff6..7ea1f3b 100644
+--- a/src/API_generated/oyConfig_s.c
++++ b/src/API_generated/oyConfig_s.c
+@@ -983,14 +983,14 @@ oyRankMap * oyRankMapCopy ( const oyRankMap * rank_map,
+ {
+ oyRankMap * map = 0;
+ int error = !rank_map;
+- int n = 0, i;
++ int n = 0, i = 0;
+
+ if(!allocateFunc)
+ allocateFunc = oyAllocateFunc_;
+
+ if(error <= 0)
+ {
+- while( rank_map[n++].key ) {}
++ while( rank_map[i++].key ) ++n;
+
+ oyAllocHelper_m_( map, oyRankMap, n + 1, allocateFunc, error = 1 );
+ }
+@@ -1025,7 +1025,7 @@ OYAPI void OYEXPORT
+ oyDeAlloc_f deAllocateFunc )
+ {
+ int error = !rank_map || !*rank_map;
+- int n = 0, i;
++ int n = 0, i = 0;
+
+ if(!deAllocateFunc)
+ deAllocateFunc = oyDeAllocateFunc_;
+@@ -1033,7 +1033,7 @@ OYAPI void OYEXPORT
+ if(error <= 0)
+ {
+ oyRankMap * map = *rank_map;
+- while( (*rank_map)[n++].key ) {}
++ while( (*rank_map)[i++].key ) ++n;
+ for(i = 0; i < n; ++i)
+ {
+ deAllocateFunc( map[i].key ); map[i].key = 0;
+--
+1.5.6.5
diff --git a/media-libs/oyranos/files/oyranos-0.9.4-fix-oyStringSegment-crash.patch b/media-libs/oyranos/files/oyranos-0.9.4-fix-oyStringSegment-crash.patch
new file mode 100644
index 000000000000..7de609ba31dc
--- /dev/null
+++ b/media-libs/oyranos/files/oyranos-0.9.4-fix-oyStringSegment-crash.patch
@@ -0,0 +1,25 @@
+From: Kai-Uwe Behrmann <ku.b@gmx.de>
+Date: Wed, 13 Mar 2013 13:59:19 +0000 (+0100)
+Subject: * [core]: fix oyStringSegment_() crash
+X-Git-Url: http://www.oyranos.org/scm?p=oyranos.git;a=commitdiff_plain;h=cf495d5ede29f7211e498217c4d06428f944bac3
+
+2013-04-21: backport to oyranos-0.9.1, remove unrelated oyStringReplace_ hunk
+
+* [core]: fix oyStringSegment_() crash
+---
+
+diff --git a/src/liboyranos_core/oyranos_string.c b/src/liboyranos_core/oyranos_string.c
+index 525ce7e..1d214c0 100644
+--- a/src/liboyranos_core/oyranos_string.c
++++ b/src/liboyranos_core/oyranos_string.c
+@@ -499,7 +499,7 @@ char * oyStringSegment_ ( char * text,
+ for(; i < segment; ++i)
+ {
+ t = oyStrchr_( t, delimiter );
+- ++t;
++ if(t) ++t;
+ }
+
+ end_pos = (uintptr_t) oyStrchr_(t, delimiter);
+--
+1.5.6.5
diff --git a/media-libs/oyranos/files/oyranos-0.9.4-fix-runpaths.patch b/media-libs/oyranos/files/oyranos-0.9.4-fix-runpaths.patch
new file mode 100644
index 000000000000..0287c119900b
--- /dev/null
+++ b/media-libs/oyranos/files/oyranos-0.9.4-fix-runpaths.patch
@@ -0,0 +1,121 @@
+From b8f4a5fe0cea02878de106f5d02751e922438275 Mon Sep 17 00:00:00 2001
+From: Kai-Uwe Behrmann <ku.b@gmx.de>
+Date: Wed, 3 Apr 2013 10:01:04 +0200
+Subject: [PATCH 1/1] * [build]: fix has insecure RUNPATHs
+
+https://sourceforge.net/tracker/?func=detail&atid=879553&aid=3609840&group_id=177017
+
+2013-04-03: backport to oyranos-0.9.4:
+ merged 1-line change from commit 5b63d318e53ae8b8f3a0ccb166c97acf6103caac
+
+---
+ CMakeLists.txt | 2 +-
+ src/examples/CMakeLists.txt | 26 ++++++++++++++++++++++++++
+ src/examples/oforms/CMakeLists.txt | 28 ++++------------------------
+ src/tools/CMakeLists.txt | 2 +-
+ 4 files changed, 32 insertions(+), 26 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f24965c..6e9c8fb 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -10,7 +10,7 @@ SET (OYRANOS_DEVEL_MONTH 01)
+ SET (OYRANOS_DEVEL_YEAR 2013)
+
+ SET (PACKAGE_NAME "oyranos")
+-set (PACKAGE_DESCRIPTION "Oyranos is a Colour Management System (CMS) on operating system level. It allows to match predictably input device colours to output device colours across supporting applications. One goal is to make colour management useful for all users in a automated fashion and regardless of any technical knowledge.")
++SET (PACKAGE_DESCRIPTION "Oyranos is a Colour Management System (CMS) on operating system level. It allows to match predictably input device colours to output device colours across supporting applications. One goal is to make colour management useful for all users in a automated fashion and regardless of any technical knowledge.")
+
+ SET( OY_CMMSUBPATH "colour/modules" )
+ SET( OY_METASUBPATH "${PACKAGE_NAME}" )
+diff --git a/src/examples/CMakeLists.txt b/src/examples/CMakeLists.txt
+index dfe807c..4adfdc9 100644
+--- a/src/examples/CMakeLists.txt
++++ b/src/examples/CMakeLists.txt
+@@ -60,4 +60,30 @@ IF( FLTK_FOUND )
+ INSTALL (TARGETS oyranos-config-fltk DESTINATION bin)
+ ENDIF()
+
++
+ ADD_SUBDIRECTORY( oforms )
++
++# oFORMS for a Oyranos CLI renderer and parser
++ADD_EXECUTABLE( oyranos-xforms oforms/oyranos_xforms.c )
++TARGET_LINK_LIBRARIES( oyranos-xforms
++ ${OY_OFORMS_LIB} oyranos ${EXTRA_LIBS} )
++#INSTALL (TARGETS oyranos-xforms DESTINATION bin)
++
++# oFORMS for a Oyranos FLTK renderer and parser
++IF( FLTK_FOUND )
++ ADD_EXECUTABLE( oyranos-xforms-fltk
++ oforms/oyranos_forms_fltk.cxx
++ oforms/oyranos_widgets_fltk.cxx
++ oforms/oyranos_xforms_fltk.cxx
++ )
++ TARGET_LINK_LIBRARIES ( oyranos-xforms-fltk oyranos ${EXTRA_LIBS}
++ ${OY_OFORMS_LIB} ${FLTK_LIBRARIES} )
++ #INSTALL (TARGETS oyranos-xforms-fltk DESTINATION bin)
++ENDIF()
++
++# oFORMS for a Oyranos module generation
++ADD_EXECUTABLE( oyranos-xforms-modules oforms/oyranos_xforms_modules.c )
++TARGET_LINK_LIBRARIES( oyranos-xforms-modules
++ oyranos ${OY_OFORMS_LIB} ${EXTRA_LIBS} )
++INSTALL (TARGETS oyranos-xforms-modules DESTINATION bin)
++
+diff --git a/src/examples/oforms/CMakeLists.txt b/src/examples/oforms/CMakeLists.txt
+index 4d248ec..c0ff965 100644
+--- a/src/examples/oforms/CMakeLists.txt
++++ b/src/examples/oforms/CMakeLists.txt
+@@ -1,31 +1,11 @@
+ #oFORMS basics
+-SET( OY_OFORMS_LIB ${PACKAGE_NAME}_forms_cmd_line )
++SET( OY_OFORMS_LIB ${PACKAGE_NAME}_forms_cmd_line-static )
++SET( OY_OFORMS_LIB ${OY_OFORMS_LIB} PARENT_SCOPE )
+ ADD_LIBRARY( ${OY_OFORMS_LIB}
+- STATIC ${OY_OFORMS_LIB}.c )
++ STATIC ${PACKAGE_NAME}_forms_cmd_line.c )
+ TARGET_LINK_LIBRARIES ( ${OY_OFORMS_LIB} oyranos ${EXTRA_LIBS} )
+
+-# oFORMS for a Oyranos CML renderer and parser
+-ADD_EXECUTABLE( ../oyranos-xforms oyranos_xforms.c )
+-TARGET_LINK_LIBRARIES( ../oyranos-xforms
+- oyranos ${OY_OFORMS_LIB} ${EXTRA_LIBS} )
+-#INSTALL (TARGETS oyranos-xforms DESTINATION bin)
++MESSAGE( "-- OY_OFORMS_LIB: ${OY_OFORMS_LIB}" )
+
+-# oFORMS for a Oyranos FLTK renderer and parser
+-IF( FLTK_FOUND )
+- ADD_EXECUTABLE( ../oyranos-xforms-fltk
+- oyranos_forms_fltk.cxx
+- oyranos_widgets_fltk.cxx
+- oyranos_xforms_fltk.cxx
+- )
+- TARGET_LINK_LIBRARIES ( ../oyranos-xforms-fltk oyranos ${EXTRA_LIBS}
+- ${FLTK_LIBRARIES} )
+- #INSTALL (TARGETS oyranos-xforms-fltk DESTINATION bin)
+-ENDIF()
+-
+-# oFORMS for a Oyranos module generation
+-ADD_EXECUTABLE( ../oyranos-xforms-modules oyranos_xforms_modules.c )
+-TARGET_LINK_LIBRARIES( ../oyranos-xforms-modules
+- oyranos ${OY_OFORMS_LIB} ${EXTRA_LIBS} )
+-INSTALL (TARGETS ../oyranos-xforms-modules DESTINATION bin)
+ INSTALL (FILES ./oyranos-xforms-modules.1 DESTINATION share/man/man1 )
+
+diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt
+index cb23ace..3b2572a 100644
+--- a/src/tools/CMakeLists.txt
++++ b/src/tools/CMakeLists.txt
+@@ -30,7 +30,7 @@ ENDIF()
+
+ # colour conversion
+ ADD_EXECUTABLE( oyranos-icc "${CMAKE_CURRENT_SOURCE_DIR}/oyranos_convert.c" )
+-TARGET_LINK_LIBRARIES( oyranos-icc oyranos ${EXTRA_LIBS} )
++TARGET_LINK_LIBRARIES( oyranos-icc oyranos ${EXTRA_LIBS} oyranos_forms_cmd_line-static )
+ INSTALL (TARGETS oyranos-icc DESTINATION bin)
+
+ ADD_SUBDIRECTORY (qcmsevents)
+--
+1.5.6.5
+
diff --git a/media-libs/oyranos/files/oyranos-0.9.4-fix-typos-and-grammar.patch b/media-libs/oyranos/files/oyranos-0.9.4-fix-typos-and-grammar.patch
new file mode 100644
index 000000000000..790c42475aef
--- /dev/null
+++ b/media-libs/oyranos/files/oyranos-0.9.4-fix-typos-and-grammar.patch
@@ -0,0 +1,968 @@
+commit bf50dbd47ddef1ccb49bb44cbf893ae7844240d6
+Author: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
+Date: Wed Apr 3 02:14:21 2013 +0200
+
+ more typo and grammar fixes
+
+diff --git a/po/cs.po b/po/cs.po
+index 9440519..a99974e 100644
+--- a/po/cs.po
++++ b/po/cs.po
+@@ -290,7 +290,7 @@ msgstr "Již aktivováno"
+
+ #: liboyranos_config/oyranos_texts.c:273
+ #, fuzzy
+-msgid "Anylyze ICC profile information on your system."
++msgid "Analyze ICC profile information on your system."
+ msgstr "umí zobrazit informace o profilu ICC"
+
+ #: modules/oyranos_cmm_oyra_image.c:1065
+@@ -417,7 +417,7 @@ msgid ""
+ "Behaviour of color space transformation for proofing. Most people want a "
+ "preview on screen only. The Relative Colorimetric intent is right for that. "
+ "The Absolute Colorimetric intent needs a very careful profiling and non-"
+-"trivial setup, but allowes for side-by-side comparisions."
++"trivial setup, but allows for side-by-side comparisons."
+ msgstr ""
+ "Způsob transformace barev pro simulaci. Většina uživatelů použije funkci "
+ "simulace pouze na obrazovce, pro což se hodí relativní kolorimetrický záměr. "
+@@ -670,7 +670,7 @@ msgstr "Transformace barev mohou být interně uloženy různými způsoby"
+ #: liboyranos_config/oyranos_texts.c:174
+ msgid ""
+ "Color content can sometimes have no ICC profile assigned. This is a critical "
+-"situation as the system can not properly convert these colors. Therefor the "
++"situation as the system can not properly convert these colors. Therefore the "
+ "color processing parts need to pick some profile as a guess. These settings "
+ "allow to change the picked ICC profile to guide the processing components "
+ "and allow proper conversion and compositing."
+@@ -1024,7 +1024,7 @@ msgstr ""
+
+ #: liboyranos_config/oyranos_texts.c:236
+ msgid ""
+-"Decide what to do when the default color spaces dont match the current ones."
++"Decide what to do when the default color spaces don't match the current ones."
+ msgstr ""
+ "Rozhodnout co dělat, když se výchozí barvový prostor nerovná aktuálnímu."
+
+@@ -2179,7 +2179,7 @@ msgstr "Oyranos X11"
+ #. HTML
+ #: liboyranos_config/oyranos_xml.c:1036
+ msgid ""
+-"Oyranos allowes detailed settings like preferred editing color spaces and "
++"Oyranos allows detailed settings like preferred editing color spaces and "
+ "the behaviour of color conversions or simulation. Oyranos reduces the work "
+ "involved in all color management related decisions through automation, "
+ "useful defaults and grouping of settings in selectable policies."
+@@ -2372,27 +2372,27 @@ msgid "Postscript CRD Information"
+ msgstr "Náhled, saturace"
+
+ #: liboyranos_config/oyranos_texts.c:336
+-msgid "Prefered CIE*Lab Editing Color Space"
++msgid "Preferred CIE*Lab Editing Color Space"
+ msgstr "Preferovaný CIE*Lab barvový prostor pro editaci"
+
+ #: API_generated/oyranos_profile.c:66
+-msgid "Prefered CMM"
++msgid "Preferred CMM"
+ msgstr ""
+
+ #: liboyranos_config/oyranos_texts.c:316
+-msgid "Prefered Cmyk Editing Color Space"
++msgid "Preferred Cmyk Editing Color Space"
+ msgstr "Preferovaný barvový prostor CMYK pro editaci"
+
+ #: liboyranos_config/oyranos_texts.c:346
+-msgid "Prefered Gray Editing Color Space"
++msgid "Preferred Gray Editing Color Space"
+ msgstr "Preferovaný barvový prostor pro editaci v šedi."
+
+ #: liboyranos_config/oyranos_texts.c:306
+-msgid "Prefered Rgb Editing Color Space"
++msgid "Preferred Rgb Editing Color Space"
+ msgstr "Preferovaný barvový prostor RGB pro editaci"
+
+ #: liboyranos_config/oyranos_texts.c:326
+-msgid "Prefered XYZ Editing Color Space"
++msgid "Preferred XYZ Editing Color Space"
+ msgstr "Preferovaný barvový prostor XYZ pro editaci"
+
+ #. choices
+@@ -2622,7 +2622,7 @@ msgstr "Záměr transformace"
+
+ #: liboyranos_config/oyranos_texts.c:479
+ msgid ""
+-"Rendering intent for color space transformations is typical the Relative "
++"Rendering intent for color space transformations is typically the Relative "
+ "Colorimetric intent plus Black Point Compensation or the Perceptual intent."
+ msgstr ""
+ "Záměr pro transformace mezi různými barvovými prostory se obvykle volí "
+@@ -2932,7 +2932,7 @@ msgstr "The client side window data handler of Oyranos."
+ #: liboyranos_config/oyranos_texts.c:219
+ msgid ""
+ "The conversion between color spaces of different shape and size can happen "
+-"in various ways. The Perceptual rendering intent is usual the best choice "
++"in various ways. The Perceptual rendering intent is usually the best choice "
+ "for photographs and artistic imagery. It is used in many automatic systems. "
+ "The Relative Colorimetric rendering intent provides a well-defined standard, "
+ "one-to-one color mapping, but without applying white point adaption. This "
+@@ -3268,7 +3268,7 @@ msgstr ""
+
+ #: liboyranos_config/oyranos_texts.c:347
+ msgid ""
+-"The preferred Gray Editing Color Space shall describe a single lighness "
++"The preferred Gray Editing Color Space shall describe a single lightness "
+ "channel color space for grayscale images."
+ msgstr ""
+ "Preferovaný barvový prostor editace v šedi by měl popisovat barvový prostor "
+@@ -3283,13 +3283,13 @@ msgstr ""
+ "barvový prostor jako např. sRGB."
+
+ #: liboyranos_config/oyranos_texts.c:327
+-msgid "The preferred XYZ Editing Color Space shall decribe CIE*XYZ."
++msgid "The preferred XYZ Editing Color Space shall describe CIE*XYZ."
+ msgstr "Preferovaný barvový prostor editace XYZ by měl popisovat CIE*XYZ."
+
+ #: liboyranos_config/oyranos_texts.c:183
+ msgid ""
+ "The proofing color space represents a real color device for simulation. "
+-"Possible uses cases are to simulate a print machine, a viewing environment "
++"Possible use cases are to simulate a print machine, a viewing environment "
+ "in a theater or a expected small monitor gamut."
+ msgstr ""
+ "Barvový prostor pro simulaci zastupuje skutečné zařízení, jež má být "
+@@ -3387,7 +3387,7 @@ msgstr "Tepelná vosková tiskárna"
+ #: liboyranos_config/oyranos_texts.c:429
+ msgid ""
+ "This setting decides what to do in the case that colors have no color space "
+-"assigned. Typical the according assumed ICC profile should be assigned."
++"assigned. Typically the according assumed ICC profile should be assigned."
+ msgstr ""
+ "Toto nastavení rozhoduje, co se má dělat v případě, že barvy nemají přiřazen "
+ "žádný barvový prostor. Obvykle by měl být přiřazen příslušný předpokládaný "
+diff --git a/po/de.po b/po/de.po
+index 80a106a..80869df 100644
+--- a/po/de.po
++++ b/po/de.po
+@@ -292,7 +292,7 @@ msgid "Already enabled"
+ msgstr "Bereits eingeschalten"
+
+ #: liboyranos_config/oyranos_texts.c:273
+-msgid "Anylyze ICC profile information on your system."
++msgid "Analyze ICC profile information on your system."
+ msgstr "Details zu ICC Profilen in Ihrem System"
+
+ #: modules/oyranos_cmm_oyra_image.c:1065
+@@ -415,7 +415,7 @@ msgid ""
+ "Behaviour of color space transformation for proofing. Most people want a "
+ "preview on screen only. The Relative Colorimetric intent is right for that. "
+ "The Absolute Colorimetric intent needs a very careful profiling and non-"
+-"trivial setup, but allowes for side-by-side comparisions."
++"trivial setup, but allows for side-by-side comparisons."
+ msgstr ""
+ "Verhalten der Farbübertragung bei der Simulation. Die meisten Nutzer "
+ "wünschen eine Simulation nur an einem Bildschirm. Die relativ farbmetrische "
+@@ -652,7 +652,7 @@ msgstr "Farbumwandlung können intern unterschiedlich gespeichert werden"
+ #: liboyranos_config/oyranos_texts.c:174
+ msgid ""
+ "Color content can sometimes have no ICC profile assigned. This is a critical "
+-"situation as the system can not properly convert these colors. Therefor the "
++"situation as the system can not properly convert these colors. Therefore the "
+ "color processing parts need to pick some profile as a guess. These settings "
+ "allow to change the picked ICC profile to guide the processing components "
+ "and allow proper conversion and compositing."
+@@ -1000,7 +1000,7 @@ msgstr ""
+
+ #: liboyranos_config/oyranos_texts.c:236
+ msgid ""
+-"Decide what to do when the default color spaces dont match the current ones."
++"Decide what to do when the default color spaces don't match the current ones."
+ msgstr ""
+ "Was ist zu tuen falls Standardfarbräume nicht mit den Eingestellten "
+ "übereinstimmen."
+@@ -2100,7 +2100,7 @@ msgstr "Oyranos X11"
+ #. HTML
+ #: liboyranos_config/oyranos_xml.c:1036
+ msgid ""
+-"Oyranos allowes detailed settings like preferred editing color spaces and "
++"Oyranos allows detailed settings like preferred editing color spaces and "
+ "the behaviour of color conversions or simulation. Oyranos reduces the work "
+ "involved in all color management related decisions through automation, "
+ "useful defaults and grouping of settings in selectable policies."
+@@ -2283,27 +2283,27 @@ msgid "Postscript CRD Information"
+ msgstr "Postscript CRD Information"
+
+ #: liboyranos_config/oyranos_texts.c:336
+-msgid "Prefered CIE*Lab Editing Color Space"
++msgid "Preferred CIE*Lab Editing Color Space"
+ msgstr "Bevorzugter CIE*Lab Editierfarbraum"
+
+ #: API_generated/oyranos_profile.c:66
+-msgid "Prefered CMM"
++msgid "Preferred CMM"
+ msgstr "Bevorzugte CMM"
+
+ #: liboyranos_config/oyranos_texts.c:316
+-msgid "Prefered Cmyk Editing Color Space"
++msgid "Preferred Cmyk Editing Color Space"
+ msgstr "Bevorzugter Cmyk Editierfarbraum"
+
+ #: liboyranos_config/oyranos_texts.c:346
+-msgid "Prefered Gray Editing Color Space"
++msgid "Preferred Gray Editing Color Space"
+ msgstr "Bevorzugter Grau Editierfarbraum"
+
+ #: liboyranos_config/oyranos_texts.c:306
+-msgid "Prefered Rgb Editing Color Space"
++msgid "Preferred Rgb Editing Color Space"
+ msgstr "Bevorzugter Rgb Editierfarbraum"
+
+ #: liboyranos_config/oyranos_texts.c:326
+-msgid "Prefered XYZ Editing Color Space"
++msgid "Preferred XYZ Editing Color Space"
+ msgstr "Bevorzugter XYZ Editierfarbraum"
+
+ #. choices
+@@ -2520,7 +2520,7 @@ msgstr "Übertragungsart: "
+
+ #: liboyranos_config/oyranos_texts.c:479
+ msgid ""
+-"Rendering intent for color space transformations is typical the Relative "
++"Rendering intent for color space transformations is typically the Relative "
+ "Colorimetric intent plus Black Point Compensation or the Perceptual intent."
+ msgstr ""
+
+@@ -2817,7 +2817,7 @@ msgstr "Die benutzerseitige Fensterdatenagent von Oyranos."
+ #: liboyranos_config/oyranos_texts.c:219
+ msgid ""
+ "The conversion between color spaces of different shape and size can happen "
+-"in various ways. The Perceptual rendering intent is usual the best choice "
++"in various ways. The Perceptual rendering intent is usually the best choice "
+ "for photographs and artistic imagery. It is used in many automatic systems. "
+ "The Relative Colorimetric rendering intent provides a well-defined standard, "
+ "one-to-one color mapping, but without applying white point adaption. This "
+@@ -3146,7 +3146,7 @@ msgstr ""
+
+ #: liboyranos_config/oyranos_texts.c:347
+ msgid ""
+-"The preferred Gray Editing Color Space shall describe a single lighness "
++"The preferred Gray Editing Color Space shall describe a single lightness "
+ "channel color space for grayscale images."
+ msgstr ""
+ "Der bevorzugte Grautonfarbraum soll Farben mit einem einzigen "
+@@ -3159,13 +3159,13 @@ msgid ""
+ msgstr "Der bevorzugte Rgb Editierfarbraum sollte wohlgeformt sein."
+
+ #: liboyranos_config/oyranos_texts.c:327
+-msgid "The preferred XYZ Editing Color Space shall decribe CIE*XYZ."
++msgid "The preferred XYZ Editing Color Space shall describe CIE*XYZ."
+ msgstr "Der bevorzugter XYZ Editierfarbraum soll CIE*XYZ definieren."
+
+ #: liboyranos_config/oyranos_texts.c:183
+ msgid ""
+ "The proofing color space represents a real color device for simulation. "
+-"Possible uses cases are to simulate a print machine, a viewing environment "
++"Possible use cases are to simulate a print machine, a viewing environment "
+ "in a theater or a expected small monitor gamut."
+ msgstr ""
+ "Der Simulationsfarbraum stellt das Farbverhalten eines realen Gerätes dar. "
+@@ -3257,7 +3257,7 @@ msgstr "Thermischer Wachsdrucker"
+ #: liboyranos_config/oyranos_texts.c:429
+ msgid ""
+ "This setting decides what to do in the case that colors have no color space "
+-"assigned. Typical the according assumed ICC profile should be assigned."
++"assigned. Typically the according assumed ICC profile should be assigned."
+ msgstr ""
+ "Die Einstellung entscheidet was mit Farben ohne Farbprofil geschehen soll. "
+ "Typischerweise wird das vermutete Farbprofil automatisch zugewiesen."
+diff --git a/po/eo.po b/po/eo.po
+index 787905a..bcf0dfc 100644
+--- a/po/eo.po
++++ b/po/eo.po
+@@ -308,7 +308,7 @@ msgid "Already enabled"
+ msgstr ""
+
+ #: liboyranos_config/oyranos_texts.c:273
+-msgid "Anylyze ICC profile information on your system."
++msgid "Analyze ICC profile information on your system."
+ msgstr ""
+
+ #: modules/oyranos_cmm_oyra_image.c:1065
+@@ -435,7 +435,7 @@ msgid ""
+ "Behaviour of color space transformation for proofing. Most people want a "
+ "preview on screen only. The Relative Colorimetric intent is right for that. "
+ "The Absolute Colorimetric intent needs a very careful profiling and non-"
+-"trivial setup, but allowes for side-by-side comparisions."
++"trivial setup, but allows for side-by-side comparisons."
+ msgstr ""
+
+ #: modules/oyranos_cmm_lraw.cpp:1041
+@@ -665,7 +665,7 @@ msgstr ""
+ #: liboyranos_config/oyranos_texts.c:174
+ msgid ""
+ "Color content can sometimes have no ICC profile assigned. This is a critical "
+-"situation as the system can not properly convert these colors. Therefor the "
++"situation as the system can not properly convert these colors. Therefore the "
+ "color processing parts need to pick some profile as a guess. These settings "
+ "allow to change the picked ICC profile to guide the processing components "
+ "and allow proper conversion and compositing."
+@@ -992,7 +992,7 @@ msgstr ""
+
+ #: liboyranos_config/oyranos_texts.c:236
+ msgid ""
+-"Decide what to do when the default color spaces dont match the current ones."
++"Decide what to do when the default color spaces don't match the current ones."
+ msgstr ""
+
+ #: liboyranos_config/oyranos_texts.c:154
+@@ -2067,7 +2067,7 @@ msgstr ""
+ #. HTML
+ #: liboyranos_config/oyranos_xml.c:1036
+ msgid ""
+-"Oyranos allowes detailed settings like preferred editing color spaces and "
++"Oyranos allows detailed settings like preferred editing color spaces and "
+ "the behaviour of color conversions or simulation. Oyranos reduces the work "
+ "involved in all color management related decisions through automation, "
+ "useful defaults and grouping of settings in selectable policies."
+@@ -2235,31 +2235,31 @@ msgstr "kolora"
+
+ #: liboyranos_config/oyranos_texts.c:336
+ #, fuzzy
+-msgid "Prefered CIE*Lab Editing Color Space"
++msgid "Preferred CIE*Lab Editing Color Space"
+ msgstr "kolora"
+
+ #: API_generated/oyranos_profile.c:66
+-msgid "Prefered CMM"
++msgid "Preferred CMM"
+ msgstr ""
+
+ #: liboyranos_config/oyranos_texts.c:316
+ #, fuzzy
+-msgid "Prefered Cmyk Editing Color Space"
++msgid "Preferred Cmyk Editing Color Space"
+ msgstr "kolora"
+
+ #: liboyranos_config/oyranos_texts.c:346
+ #, fuzzy
+-msgid "Prefered Gray Editing Color Space"
++msgid "Preferred Gray Editing Color Space"
+ msgstr "kolora"
+
+ #: liboyranos_config/oyranos_texts.c:306
+ #, fuzzy
+-msgid "Prefered Rgb Editing Color Space"
++msgid "Preferred Rgb Editing Color Space"
+ msgstr "kolora"
+
+ #: liboyranos_config/oyranos_texts.c:326
+ #, fuzzy
+-msgid "Prefered XYZ Editing Color Space"
++msgid "Preferred XYZ Editing Color Space"
+ msgstr "kolora"
+
+ #. choices
+@@ -2478,7 +2478,7 @@ msgstr ""
+
+ #: liboyranos_config/oyranos_texts.c:479
+ msgid ""
+-"Rendering intent for color space transformations is typical the Relative "
++"Rendering intent for color space transformations is typically the Relative "
+ "Colorimetric intent plus Black Point Compensation or the Perceptual intent."
+ msgstr ""
+
+@@ -2748,7 +2748,7 @@ msgstr ""
+ #: liboyranos_config/oyranos_texts.c:219
+ msgid ""
+ "The conversion between color spaces of different shape and size can happen "
+-"in various ways. The Perceptual rendering intent is usual the best choice "
++"in various ways. The Perceptual rendering intent is usually the best choice "
+ "for photographs and artistic imagery. It is used in many automatic systems. "
+ "The Relative Colorimetric rendering intent provides a well-defined standard, "
+ "one-to-one color mapping, but without applying white point adaption. This "
+@@ -2962,7 +2962,7 @@ msgstr ""
+
+ #: liboyranos_config/oyranos_texts.c:347
+ msgid ""
+-"The preferred Gray Editing Color Space shall describe a single lighness "
++"The preferred Gray Editing Color Space shall describe a single lightness "
+ "channel color space for grayscale images."
+ msgstr ""
+
+@@ -2973,13 +2973,13 @@ msgid ""
+ msgstr ""
+
+ #: liboyranos_config/oyranos_texts.c:327
+-msgid "The preferred XYZ Editing Color Space shall decribe CIE*XYZ."
++msgid "The preferred XYZ Editing Color Space shall describe CIE*XYZ."
+ msgstr ""
+
+ #: liboyranos_config/oyranos_texts.c:183
+ msgid ""
+ "The proofing color space represents a real color device for simulation. "
+-"Possible uses cases are to simulate a print machine, a viewing environment "
++"Possible use cases are to simulate a print machine, a viewing environment "
+ "in a theater or a expected small monitor gamut."
+ msgstr ""
+
+@@ -3055,7 +3055,7 @@ msgstr ""
+ #: liboyranos_config/oyranos_texts.c:429
+ msgid ""
+ "This setting decides what to do in the case that colors have no color space "
+-"assigned. Typical the according assumed ICC profile should be assigned."
++"assigned. Typically the according assumed ICC profile should be assigned."
+ msgstr ""
+
+ #: modules/oyranos_cmm_oyIM_profile.c:1167
+diff --git a/po/eu.po b/po/eu.po
+index f86f417..277b42d 100644
+--- a/po/eu.po
++++ b/po/eu.po
+@@ -315,7 +315,7 @@ msgstr ""
+
+ #: liboyranos_config/oyranos_texts.c:273
+ #, fuzzy
+-msgid "Anylyze ICC profile information on your system."
++msgid "Analyze ICC profile information on your system."
+ msgstr "Oyranos-en ezarpenak"
+
+ #: modules/oyranos_cmm_oyra_image.c:1065
+@@ -447,7 +447,7 @@ msgid ""
+ "Behaviour of color space transformation for proofing. Most people want a "
+ "preview on screen only. The Relative Colorimetric intent is right for that. "
+ "The Absolute Colorimetric intent needs a very careful profiling and non-"
+-"trivial setup, but allowes for side-by-side comparisions."
++"trivial setup, but allows for side-by-side comparisons."
+ msgstr ""
+
+ #: modules/oyranos_cmm_lraw.cpp:1041
+@@ -679,7 +679,7 @@ msgstr ""
+ #: liboyranos_config/oyranos_texts.c:174
+ msgid ""
+ "Color content can sometimes have no ICC profile assigned. This is a critical "
+-"situation as the system can not properly convert these colors. Therefor the "
++"situation as the system can not properly convert these colors. Therefore the "
+ "color processing parts need to pick some profile as a guess. These settings "
+ "allow to change the picked ICC profile to guide the processing components "
+ "and allow proper conversion and compositing."
+@@ -1031,7 +1031,7 @@ msgstr ""
+
+ #: liboyranos_config/oyranos_texts.c:236
+ msgid ""
+-"Decide what to do when the default color spaces dont match the current ones."
++"Decide what to do when the default color spaces don't match the current ones."
+ msgstr ""
+
+ #: liboyranos_config/oyranos_texts.c:154
+@@ -2167,7 +2167,7 @@ msgstr "Oyranos-en ezarpenak"
+ #. HTML
+ #: liboyranos_config/oyranos_xml.c:1036
+ msgid ""
+-"Oyranos allowes detailed settings like preferred editing color spaces and "
++"Oyranos allows detailed settings like preferred editing color spaces and "
+ "the behaviour of color conversions or simulation. Oyranos reduces the work "
+ "involved in all color management related decisions through automation, "
+ "useful defaults and grouping of settings in selectable policies."
+@@ -2349,31 +2349,31 @@ msgstr "Aurrebista, saturatua"
+
+ #: liboyranos_config/oyranos_texts.c:336
+ #, fuzzy
+-msgid "Prefered CIE*Lab Editing Color Space"
++msgid "Preferred CIE*Lab Editing Color Space"
+ msgstr "Kolore-espazioa"
+
+ #: API_generated/oyranos_profile.c:66
+-msgid "Prefered CMM"
++msgid "Preferred CMM"
+ msgstr ""
+
+ #: liboyranos_config/oyranos_texts.c:316
+ #, fuzzy
+-msgid "Prefered Cmyk Editing Color Space"
++msgid "Preferred Cmyk Editing Color Space"
+ msgstr "Kolore-espazioa"
+
+ #: liboyranos_config/oyranos_texts.c:346
+ #, fuzzy
+-msgid "Prefered Gray Editing Color Space"
++msgid "Preferred Gray Editing Color Space"
+ msgstr "Kolore-espazioa"
+
+ #: liboyranos_config/oyranos_texts.c:306
+ #, fuzzy
+-msgid "Prefered Rgb Editing Color Space"
++msgid "Preferred Rgb Editing Color Space"
+ msgstr "Kolore-espazioa"
+
+ #: liboyranos_config/oyranos_texts.c:326
+ #, fuzzy
+-msgid "Prefered XYZ Editing Color Space"
++msgid "Preferred XYZ Editing Color Space"
+ msgstr "Kolore-espazioa"
+
+ #. choices
+@@ -2610,7 +2610,7 @@ msgstr "Oyranos-en ezarpenak"
+
+ #: liboyranos_config/oyranos_texts.c:479
+ msgid ""
+-"Rendering intent for color space transformations is typical the Relative "
++"Rendering intent for color space transformations is typically the Relative "
+ "Colorimetric intent plus Black Point Compensation or the Perceptual intent."
+ msgstr ""
+
+@@ -2896,7 +2896,7 @@ msgstr ""
+ #: liboyranos_config/oyranos_texts.c:219
+ msgid ""
+ "The conversion between color spaces of different shape and size can happen "
+-"in various ways. The Perceptual rendering intent is usual the best choice "
++"in various ways. The Perceptual rendering intent is usually the best choice "
+ "for photographs and artistic imagery. It is used in many automatic systems. "
+ "The Relative Colorimetric rendering intent provides a well-defined standard, "
+ "one-to-one color mapping, but without applying white point adaption. This "
+@@ -3113,7 +3113,7 @@ msgstr "Kolore-espazioa"
+ #: liboyranos_config/oyranos_texts.c:347
+ #, fuzzy
+ msgid ""
+-"The preferred Gray Editing Color Space shall describe a single lighness "
++"The preferred Gray Editing Color Space shall describe a single lightness "
+ "channel color space for grayscale images."
+ msgstr "Kolore-espazioa"
+
+@@ -3126,13 +3126,13 @@ msgstr "Kolore-espazioa"
+
+ #: liboyranos_config/oyranos_texts.c:327
+ #, fuzzy
+-msgid "The preferred XYZ Editing Color Space shall decribe CIE*XYZ."
++msgid "The preferred XYZ Editing Color Space shall describe CIE*XYZ."
+ msgstr "Kolore-espazioa"
+
+ #: liboyranos_config/oyranos_texts.c:183
+ msgid ""
+ "The proofing color space represents a real color device for simulation. "
+-"Possible uses cases are to simulate a print machine, a viewing environment "
++"Possible use cases are to simulate a print machine, a viewing environment "
+ "in a theater or a expected small monitor gamut."
+ msgstr ""
+
+@@ -3208,7 +3208,7 @@ msgstr "Inprimagailu ezko-termala"
+ #: liboyranos_config/oyranos_texts.c:429
+ msgid ""
+ "This setting decides what to do in the case that colors have no color space "
+-"assigned. Typical the according assumed ICC profile should be assigned."
++"assigned. Typically the according assumed ICC profile should be assigned."
+ msgstr ""
+
+ #: modules/oyranos_cmm_oyIM_profile.c:1167
+diff --git a/po/fr.po b/po/fr.po
+index f02e45c..737dc28 100644
+--- a/po/fr.po
++++ b/po/fr.po
+@@ -309,7 +309,7 @@ msgstr ""
+
+ #: liboyranos_config/oyranos_texts.c:273
+ #, fuzzy
+-msgid "Anylyze ICC profile information on your system."
++msgid "Analyze ICC profile information on your system."
+ msgstr "Oyranos Préférences"
+
+ #: modules/oyranos_cmm_oyra_image.c:1065
+@@ -441,7 +441,7 @@ msgid ""
+ "Behaviour of color space transformation for proofing. Most people want a "
+ "preview on screen only. The Relative Colorimetric intent is right for that. "
+ "The Absolute Colorimetric intent needs a very careful profiling and non-"
+-"trivial setup, but allowes for side-by-side comparisions."
++"trivial setup, but allows for side-by-side comparisons."
+ msgstr ""
+
+ #: modules/oyranos_cmm_lraw.cpp:1041
+@@ -673,7 +673,7 @@ msgstr ""
+ #: liboyranos_config/oyranos_texts.c:174
+ msgid ""
+ "Color content can sometimes have no ICC profile assigned. This is a critical "
+-"situation as the system can not properly convert these colors. Therefor the "
++"situation as the system can not properly convert these colors. Therefore the "
+ "color processing parts need to pick some profile as a guess. These settings "
+ "allow to change the picked ICC profile to guide the processing components "
+ "and allow proper conversion and compositing."
+@@ -1020,7 +1020,7 @@ msgstr ""
+
+ #: liboyranos_config/oyranos_texts.c:236
+ msgid ""
+-"Decide what to do when the default color spaces dont match the current ones."
++"Decide what to do when the default color spaces don't match the current ones."
+ msgstr ""
+
+ #: liboyranos_config/oyranos_texts.c:154
+@@ -2156,7 +2156,7 @@ msgstr "Oyranos Préférences"
+ #. HTML
+ #: liboyranos_config/oyranos_xml.c:1036
+ msgid ""
+-"Oyranos allowes detailed settings like preferred editing color spaces and "
++"Oyranos allows detailed settings like preferred editing color spaces and "
+ "the behaviour of color conversions or simulation. Oyranos reduces the work "
+ "involved in all color management related decisions through automation, "
+ "useful defaults and grouping of settings in selectable policies."
+@@ -2335,31 +2335,31 @@ msgstr "Aperçu, saturation"
+
+ #: liboyranos_config/oyranos_texts.c:336
+ #, fuzzy
+-msgid "Prefered CIE*Lab Editing Color Space"
++msgid "Preferred CIE*Lab Editing Color Space"
+ msgstr "Espace colorimétrique"
+
+ #: API_generated/oyranos_profile.c:66
+-msgid "Prefered CMM"
++msgid "Preferred CMM"
+ msgstr ""
+
+ #: liboyranos_config/oyranos_texts.c:316
+ #, fuzzy
+-msgid "Prefered Cmyk Editing Color Space"
++msgid "Preferred Cmyk Editing Color Space"
+ msgstr "Espace colorimétrique"
+
+ #: liboyranos_config/oyranos_texts.c:346
+ #, fuzzy
+-msgid "Prefered Gray Editing Color Space"
++msgid "Preferred Gray Editing Color Space"
+ msgstr "Espace colorimétrique"
+
+ #: liboyranos_config/oyranos_texts.c:306
+ #, fuzzy
+-msgid "Prefered Rgb Editing Color Space"
++msgid "Preferred Rgb Editing Color Space"
+ msgstr "Espace colorimétrique"
+
+ #: liboyranos_config/oyranos_texts.c:326
+ #, fuzzy
+-msgid "Prefered XYZ Editing Color Space"
++msgid "Preferred XYZ Editing Color Space"
+ msgstr "Espace colorimétrique"
+
+ #. choices
+@@ -2589,7 +2589,7 @@ msgstr "Oyranos Préférences"
+
+ #: liboyranos_config/oyranos_texts.c:479
+ msgid ""
+-"Rendering intent for color space transformations is typical the Relative "
++"Rendering intent for color space transformations is typically the Relative "
+ "Colorimetric intent plus Black Point Compensation or the Perceptual intent."
+ msgstr ""
+
+@@ -2870,7 +2870,7 @@ msgstr ""
+ #: liboyranos_config/oyranos_texts.c:219
+ msgid ""
+ "The conversion between color spaces of different shape and size can happen "
+-"in various ways. The Perceptual rendering intent is usual the best choice "
++"in various ways. The Perceptual rendering intent is usually the best choice "
+ "for photographs and artistic imagery. It is used in many automatic systems. "
+ "The Relative Colorimetric rendering intent provides a well-defined standard, "
+ "one-to-one color mapping, but without applying white point adaption. This "
+@@ -3087,7 +3087,7 @@ msgstr "Espace colorimétrique"
+ #: liboyranos_config/oyranos_texts.c:347
+ #, fuzzy
+ msgid ""
+-"The preferred Gray Editing Color Space shall describe a single lighness "
++"The preferred Gray Editing Color Space shall describe a single lightness "
+ "channel color space for grayscale images."
+ msgstr "Espace colorimétrique"
+
+@@ -3100,13 +3100,13 @@ msgstr "Espace colorimétrique"
+
+ #: liboyranos_config/oyranos_texts.c:327
+ #, fuzzy
+-msgid "The preferred XYZ Editing Color Space shall decribe CIE*XYZ."
++msgid "The preferred XYZ Editing Color Space shall describe CIE*XYZ."
+ msgstr "Espace colorimétrique"
+
+ #: liboyranos_config/oyranos_texts.c:183
+ msgid ""
+ "The proofing color space represents a real color device for simulation. "
+-"Possible uses cases are to simulate a print machine, a viewing environment "
++"Possible use cases are to simulate a print machine, a viewing environment "
+ "in a theater or a expected small monitor gamut."
+ msgstr ""
+
+@@ -3182,7 +3182,7 @@ msgstr ""
+ #: liboyranos_config/oyranos_texts.c:429
+ msgid ""
+ "This setting decides what to do in the case that colors have no color space "
+-"assigned. Typical the according assumed ICC profile should be assigned."
++"assigned. Typically the according assumed ICC profile should be assigned."
+ msgstr ""
+
+ #: modules/oyranos_cmm_oyIM_profile.c:1167
+diff --git a/po/oyranos.pot b/po/oyranos.pot
+index c5f064d..d4eb1f8 100644
+--- a/po/oyranos.pot
++++ b/po/oyranos.pot
+@@ -139,7 +139,7 @@ msgid "Internal stored Size"
+ msgstr ""
+
+ #: API_generated/oyranos_profile.c:66
+-msgid "Prefered CMM"
++msgid "Preferred CMM"
+ msgstr ""
+
+ #: API_generated/oyranos_profile.c:67
+@@ -552,7 +552,7 @@ msgstr ""
+ #: liboyranos_config/oyranos_texts.c:174
+ msgid ""
+ "Color content can sometimes have no ICC profile assigned. This is a critical "
+-"situation as the system can not properly convert these colors. Therefor the "
++"situation as the system can not properly convert these colors. Therefore the "
+ "color processing parts need to pick some profile as a guess. These settings "
+ "allow to change the picked ICC profile to guide the processing components "
+ "and allow proper conversion and compositing."
+@@ -569,7 +569,7 @@ msgstr ""
+ #: liboyranos_config/oyranos_texts.c:183
+ msgid ""
+ "The proofing color space represents a real color device for simulation. "
+-"Possible uses cases are to simulate a print machine, a viewing environment "
++"Possible use cases are to simulate a print machine, a viewing environment "
+ "in a theater or a expected small monitor gamut."
+ msgstr ""
+
+@@ -631,7 +631,7 @@ msgstr ""
+ #: liboyranos_config/oyranos_texts.c:219
+ msgid ""
+ "The conversion between color spaces of different shape and size can happen "
+-"in various ways. The Perceptual rendering intent is usual the best choice "
++"in various ways. The Perceptual rendering intent is usually the best choice "
+ "for photographs and artistic imagery. It is used in many automatic systems. "
+ "The Relative Colorimetric rendering intent provides a well-defined standard, "
+ "one-to-one color mapping, but without applying white point adaption. This "
+@@ -666,7 +666,7 @@ msgstr ""
+
+ #: liboyranos_config/oyranos_texts.c:236
+ msgid ""
+-"Decide what to do when the default color spaces dont match the current ones."
++"Decide what to do when the default color spaces don't match the current ones."
+ msgstr ""
+
+ #: liboyranos_config/oyranos_texts.c:237
+@@ -720,7 +720,7 @@ msgid "Profile Information"
+ msgstr ""
+
+ #: liboyranos_config/oyranos_texts.c:273
+-msgid "Anylyze ICC profile information on your system."
++msgid "Analyze ICC profile information on your system."
+ msgstr ""
+
+ #: liboyranos_config/oyranos_texts.c:284
+@@ -743,7 +743,7 @@ msgid "Editing Rgb"
+ msgstr ""
+
+ #: liboyranos_config/oyranos_texts.c:306
+-msgid "Prefered Rgb Editing Color Space"
++msgid "Preferred Rgb Editing Color Space"
+ msgstr ""
+
+ #: liboyranos_config/oyranos_texts.c:307
+@@ -757,7 +757,7 @@ msgid "Editing Cmyk"
+ msgstr ""
+
+ #: liboyranos_config/oyranos_texts.c:316
+-msgid "Prefered Cmyk Editing Color Space"
++msgid "Preferred Cmyk Editing Color Space"
+ msgstr ""
+
+ #: liboyranos_config/oyranos_texts.c:317
+@@ -771,11 +771,11 @@ msgid "Editing XYZ"
+ msgstr ""
+
+ #: liboyranos_config/oyranos_texts.c:326
+-msgid "Prefered XYZ Editing Color Space"
++msgid "Preferred XYZ Editing Color Space"
+ msgstr ""
+
+ #: liboyranos_config/oyranos_texts.c:327
+-msgid "The preferred XYZ Editing Color Space shall decribe CIE*XYZ."
++msgid "The preferred XYZ Editing Color Space shall describe CIE*XYZ."
+ msgstr ""
+
+ #: liboyranos_config/oyranos_texts.c:335
+@@ -783,7 +783,7 @@ msgid "Editing Lab"
+ msgstr ""
+
+ #: liboyranos_config/oyranos_texts.c:336
+-msgid "Prefered CIE*Lab Editing Color Space"
++msgid "Preferred CIE*Lab Editing Color Space"
+ msgstr ""
+
+ #: liboyranos_config/oyranos_texts.c:337
+@@ -795,12 +795,12 @@ msgid "Editing Gray"
+ msgstr ""
+
+ #: liboyranos_config/oyranos_texts.c:346
+-msgid "Prefered Gray Editing Color Space"
++msgid "Preferred Gray Editing Color Space"
+ msgstr ""
+
+ #: liboyranos_config/oyranos_texts.c:347
+ msgid ""
+-"The preferred Gray Editing Color Space shall describe a single lighness "
++"The preferred Gray Editing Color Space shall describe a single lightness "
+ "channel color space for grayscale images."
+ msgstr ""
+
+@@ -910,7 +910,7 @@ msgstr ""
+ #: liboyranos_config/oyranos_texts.c:429
+ msgid ""
+ "This setting decides what to do in the case that colors have no color space "
+-"assigned. Typical the according assumed ICC profile should be assigned."
++"assigned. Typically the according assumed ICC profile should be assigned."
+ msgstr ""
+
+ #. choices
+@@ -1012,7 +1012,7 @@ msgstr ""
+
+ #: liboyranos_config/oyranos_texts.c:479
+ msgid ""
+-"Rendering intent for color space transformations is typical the Relative "
++"Rendering intent for color space transformations is typically the Relative "
+ "Colorimetric intent plus Black Point Compensation or the Perceptual intent."
+ msgstr ""
+
+@@ -1067,7 +1067,7 @@ msgid ""
+ "Behaviour of color space transformation for proofing. Most people want a "
+ "preview on screen only. The Relative Colorimetric intent is right for that. "
+ "The Absolute Colorimetric intent needs a very careful profiling and non-"
+-"trivial setup, but allowes for side-by-side comparisions."
++"trivial setup, but allows for side-by-side comparisons."
+ msgstr ""
+
+ #: liboyranos_config/oyranos_texts.c:507
+@@ -1168,7 +1168,7 @@ msgstr ""
+ #. HTML
+ #: liboyranos_config/oyranos_xml.c:1036
+ msgid ""
+-"Oyranos allowes detailed settings like preferred editing color spaces and "
++"Oyranos allows detailed settings like preferred editing color spaces and "
+ "the behaviour of color conversions or simulation. Oyranos reduces the work "
+ "involved in all color management related decisions through automation, "
+ "useful defaults and grouping of settings in selectable policies."
+diff --git a/src/liboyranos_config/oyranos_texts.c b/src/liboyranos_config/oyranos_texts.c
+index f7a7244..7a86a42 100644
+--- a/src/liboyranos_config/oyranos_texts.c
++++ b/src/liboyranos_config/oyranos_texts.c
+@@ -171,7 +171,7 @@ oyOptionStringsTranslate_ ()
+ oyGROUP_DEFAULT_PROFILES, 0, 0,
+ _("Assumed Color Space"),
+ _("Assumed Color Space for untagged colors"),
+- _("Color content can sometimes have no ICC profile assigned. This is a critical situation as the system can not properly convert these colors. Therefor the color processing parts need to pick some profile as a guess. These settings allow to change the picked ICC profile to guide the processing components and allow proper conversion and compositing."),
++ _("Color content can sometimes have no ICC profile assigned. This is a critical situation as the system can not properly convert these colors. Therefore the color processing parts need to pick some profile as a guess. These settings allow to change the picked ICC profile to guide the processing components and allow proper conversion and compositing."),
+ 0, /* choices */
+ NULL, NULL, NULL, NULL,
+ NULL,
+@@ -180,7 +180,7 @@ oyOptionStringsTranslate_ ()
+ 0, 0, 0,
+ _("Proofing Color Space"),
+ _("Color Space for Simulating real devices"),
+- _("The proofing color space represents a real color device for simulation. Possible uses cases are to simulate a print machine, a viewing environment in a theater or a expected small monitor gamut."),
++ _("The proofing color space represents a real color device for simulation. Possible use cases are to simulate a print machine, a viewing environment in a theater or a expected small monitor gamut."),
+ 0, /* choices */
+ NULL, NULL, NULL, NULL,
+ NULL,
+@@ -216,7 +216,7 @@ oyOptionStringsTranslate_ ()
+ oyGROUP_BEHAVIOUR, 0, 0,
+ _("Rendering"),
+ _("The kind of ICC gamut mapping for transforming colors between differently sized color spaces"),
+- _("The conversion between color spaces of different shape and size can happen in various ways. The Perceptual rendering intent is usual the best choice for photographs and artistic imagery. It is used in many automatic systems. The Relative Colorimetric rendering intent provides a well-defined standard, one-to-one color mapping, but without applying white point adaption. This can lead to color clipping in case of colors falling outside the target gamut as a price for the otherwise colorimetric correctness. The Relative Colorimetric intent is often used in combination with Black Point Compensation. The Saturation rendering intent shall provide an optimal use of saturated device colors. The Absolute Colorimetric rendering intent works like the relative colorimetric one except the white point is adapted. All rendering intents beside the colorimetric ones rely on the color tables designed by the profile vendor."),
++ _("The conversion between color spaces of different shape and size can happen in various ways. The Perceptual rendering intent is usually the best choice for photographs and artistic imagery. It is used in many automatic systems. The Relative Colorimetric rendering intent provides a well-defined standard, one-to-one color mapping, but without applying white point adaption. This can lead to color clipping in case of colors falling outside the target gamut as a price for the otherwise colorimetric correctness. The Relative Colorimetric intent is often used in combination with Black Point Compensation. The Saturation rendering intent shall provide an optimal use of saturated device colors. The Absolute Colorimetric rendering intent works like the relative colorimetric one except the white point is adapted. All rendering intents beside the colorimetric ones rely on the color tables designed by the profile vendor."),
+ 0, /* choices */
+ NULL, NULL, NULL, NULL,
+ NULL,
+@@ -233,7 +233,7 @@ oyOptionStringsTranslate_ ()
+ oySET_OPTIONS_M_( oyWIDGETTYPE_GROUP_TREE, oyWIDGET_GROUP_BEHAVIOUR_MISSMATCH, 1,
+ oyGROUP_BEHAVIOUR, 0, 0,
+ _("Mismatching"),
+- _("Decide what to do when the default color spaces dont match the current ones."),
++ _("Decide what to do when the default color spaces don't match the current ones."),
+ _("Decide how to resolve conflicts with input color spaces and current settings."),
+ 0, /* choices */
+ NULL, NULL, NULL, NULL,
+@@ -270,7 +270,7 @@ oyOptionStringsTranslate_ ()
+ 0, 0, 0,
+ _("Information"),
+ _("Profile Information"),
+- _("Anylyze ICC profile information on your system."),
++ _("Analyze ICC profile information on your system."),
+ 0, /* choices */
+ NULL, NULL, NULL, NULL,
+ NULL,
+@@ -303,7 +303,7 @@ oyOptionStringsTranslate_ ()
+ oySET_OPTIONS_M_( oyWIDGETTYPE_DEFAULT_PROFILE, oyWIDGET_EDITING_RGB, 2,
+ oyGROUP_DEFAULT_PROFILES, oyGROUP_DEFAULT_PROFILES_EDIT, 0,
+ _("Editing Rgb"),
+- _("Prefered Rgb Editing Color Space"),
++ _("Preferred Rgb Editing Color Space"),
+ _("The preferred Rgb Editing Color Space should represent a well behaving color space like sRGB."),
+ 0, /* choices */
+ NULL, NULL, NULL, NULL,
+@@ -313,7 +313,7 @@ oyOptionStringsTranslate_ ()
+ oySET_OPTIONS_M_( oyWIDGETTYPE_DEFAULT_PROFILE, oyWIDGET_EDITING_CMYK, 2,
+ oyGROUP_DEFAULT_PROFILES, oyGROUP_DEFAULT_PROFILES_EDIT, 0,
+ _("Editing Cmyk"),
+- _("Prefered Cmyk Editing Color Space"),
++ _("Preferred Cmyk Editing Color Space"),
+ _("The preferred Cmyk Editing Color Space should represent a color space that complies to well defined printing conditions like FOGRA or SWOP."),
+ 0, /* choices */
+ NULL, NULL, NULL, NULL,
+@@ -323,8 +323,8 @@ oyOptionStringsTranslate_ ()
+ oySET_OPTIONS_M_( oyWIDGETTYPE_DEFAULT_PROFILE, oyWIDGET_EDITING_XYZ, 2,
+ oyGROUP_DEFAULT_PROFILES, oyGROUP_DEFAULT_PROFILES_EDIT, 0,
+ _("Editing XYZ"),
+- _("Prefered XYZ Editing Color Space"),
+- _("The preferred XYZ Editing Color Space shall decribe CIE*XYZ."),
++ _("Preferred XYZ Editing Color Space"),
++ _("The preferred XYZ Editing Color Space shall describe CIE*XYZ."),
+ 0, /* choices */
+ NULL, NULL, NULL, NULL,
+ OY_DEFAULT_EDITING_XYZ_PROFILE,
+@@ -333,7 +333,7 @@ oyOptionStringsTranslate_ ()
+ oySET_OPTIONS_M_( oyWIDGETTYPE_DEFAULT_PROFILE, oyWIDGET_EDITING_LAB, 2,
+ oyGROUP_DEFAULT_PROFILES, oyGROUP_DEFAULT_PROFILES_EDIT, 0,
+ _("Editing Lab"),
+- _("Prefered CIE*Lab Editing Color Space"),
++ _("Preferred CIE*Lab Editing Color Space"),
+ _("The preferred CIE*Lab Editing Color Space shall describe the CIE*Lab."),
+ 0, /* choices */
+ NULL, NULL, NULL, NULL,
+@@ -343,8 +343,8 @@ oyOptionStringsTranslate_ ()
+ oySET_OPTIONS_M_( oyWIDGETTYPE_DEFAULT_PROFILE, oyWIDGET_EDITING_GRAY, 2,
+ oyGROUP_DEFAULT_PROFILES, oyGROUP_DEFAULT_PROFILES_EDIT, 0,
+ _("Editing Gray"),
+- _("Prefered Gray Editing Color Space"),
+- _("The preferred Gray Editing Color Space shall describe a single lighness channel color space for grayscale images."),
++ _("Preferred Gray Editing Color Space"),
++ _("The preferred Gray Editing Color Space shall describe a single lightness channel color space for grayscale images."),
+ 0, /* choices */
+ NULL, NULL, NULL, NULL,
+ OY_DEFAULT_EDITING_GRAY_PROFILE,
+@@ -426,7 +426,7 @@ oyOptionStringsTranslate_ ()
+ oyGROUP_BEHAVIOUR, oyGROUP_BEHAVIOUR_MISSMATCH, 0,
+ _("No Image profile"),
+ _("Image has no color space embedded. What default action shall be performed?"),
+- _("This setting decides what to do in the case that colors have no color space assigned. Typical the according assumed ICC profile should be assigned."),
++ _("This setting decides what to do in the case that colors have no color space assigned. Typically the according assumed ICC profile should be assigned."),
+ 3, /* choices */
+ _("Assign No Profile"),_("Assign Assumed Profile"),_("Prompt"), NULL,
+ OY_ACTION_UNTAGGED_ASSIGN,
+@@ -476,7 +476,7 @@ oyOptionStringsTranslate_ ()
+ oyGROUP_BEHAVIOUR, oyGROUP_BEHAVIOUR_RENDERING, 0,
+ _("Rendering Intent"),
+ _("Rendering intent for color space transformations."),
+- _("Rendering intent for color space transformations is typical the Relative Colorimetric intent plus Black Point Compensation or the Perceptual intent."),
++ _("Rendering intent for color space transformations is typically the Relative Colorimetric intent plus Black Point Compensation or the Perceptual intent."),
+ 4, /* choices */
+ _("Perceptual"),_("Relative Colorimetric"),_("Saturation"),_("Absolute Colorimetric"),
+ OY_DEFAULT_RENDERING_INTENT,
+@@ -496,7 +496,7 @@ oyOptionStringsTranslate_ ()
+ oyGROUP_BEHAVIOUR, oyGROUP_BEHAVIOUR_PROOF, 0,
+ _("Proofing Rendering Intent"),
+ _("Behaviour of color space transformation for proofing"),
+- _("Behaviour of color space transformation for proofing. Most people want a preview on screen only. The Relative Colorimetric intent is right for that. The Absolute Colorimetric intent needs a very careful profiling and non-trivial setup, but allowes for side-by-side comparisions."),
++ _("Behaviour of color space transformation for proofing. Most people want a preview on screen only. The Relative Colorimetric intent is right for that. The Absolute Colorimetric intent needs a very careful profiling and non-trivial setup, but allows for side-by-side comparisons."),
+ 2, /* choices */
+ _("Relative Colorimetric"),_("Absolute Colorimetric"),NULL,NULL,
+ OY_DEFAULT_RENDERING_INTENT_PROOF,
diff --git a/media-libs/oyranos/files/oyranos-0.9.4-omit-profile-with-error.patch b/media-libs/oyranos/files/oyranos-0.9.4-omit-profile-with-error.patch
new file mode 100644
index 000000000000..f87f004cf66f
--- /dev/null
+++ b/media-libs/oyranos/files/oyranos-0.9.4-omit-profile-with-error.patch
@@ -0,0 +1,54 @@
+From: Kai-Uwe Behrmann <ku.b@gmx.de>
+Date: Tue, 26 Mar 2013 11:09:01 +0000 (+0100)
+Subject: * [source]: omit profile with error
+X-Git-Url: http://www.oyranos.org/scm?p=oyranos.git;a=commitdiff_plain;h=ecbfe88cf77863c7c925f61d0e69d11474059cb8
+
+* [source]: omit profile with error
+
+a proper return value would be more helpful
+---
+
+diff --git a/src/API_generated/oyProfile_s_.c b/src/API_generated/oyProfile_s_.c
+index 83629fe..338ed08 100644
+--- a/src/API_generated/oyProfile_s_.c
++++ b/src/API_generated/oyProfile_s_.c
+@@ -8,12 +8,12 @@
+ * Oyranos is an open source Colour Management System
+ *
+ * @par Copyright:
+- * 2004-2012 (C) Kai-Uwe Behrmann
++ * 2004-2013 (C) Kai-Uwe Behrmann
+ *
+ * @author Kai-Uwe Behrmann <ku.b@gmx.de>
+ * @par License:
+ * new BSD - see: http://www.opensource.org/licenses/bsd-license.php
+- * @date 2012/10/31
++ * @date 2013/03/26
+ */
+
+
+@@ -724,6 +724,9 @@ oyProfile_s_ * oyProfile_FromFile_ ( const char * name,
+ }
+ }
+
++ if(error >= 1 && s)
++ oyProfile_Release( (oyProfile_s**)&s );
++
+ oyHash_Release_( &entry );
+
+ return s;
+diff --git a/src/sources/Profile.private_methods_definitions.c b/src/sources/Profile.private_methods_definitions.c
+index 7b49ca6..e131893 100644
+--- a/src/sources/Profile.private_methods_definitions.c
++++ b/src/sources/Profile.private_methods_definitions.c
+@@ -311,6 +311,9 @@ oyProfile_s_ * oyProfile_FromFile_ ( const char * name,
+ }
+ }
+
++ if(error >= 1 && s)
++ oyProfile_Release( (oyProfile_s**)&s );
++
+ oyHash_Release_( &entry );
+
+ return s;
+
diff --git a/media-libs/oyranos/files/oyranos-0.9.4-set-xcalib-to-screen-if-ge-xrandr-12.patch b/media-libs/oyranos/files/oyranos-0.9.4-set-xcalib-to-screen-if-ge-xrandr-12.patch
new file mode 100644
index 000000000000..6acfcdd11cfa
--- /dev/null
+++ b/media-libs/oyranos/files/oyranos-0.9.4-set-xcalib-to-screen-if-ge-xrandr-12.patch
@@ -0,0 +1,131 @@
+From: Kai-Uwe Behrmann <ku.b@gmx.de>
+Date: Sun, 17 Feb 2013 19:28:06 +0000 (+0100)
+Subject: * [oyX1]: set xcalib to screen if XRandR >= 1.2
+X-Git-Url: http://www.oyranos.org/scm?p=oyranos.git;a=commitdiff_plain;h=505b3931d9de6c667566278c5b3a1713d43212a8
+
+* [oyX1]: set xcalib to screen if XRandR >= 1.2
+---
+
+diff --git a/src/modules/devices/oyranos_monitor_x11.c b/src/modules/devices/oyranos_monitor_x11.c
+index a090b14..a530a81 100644
+--- a/src/modules/devices/oyranos_monitor_x11.c
++++ b/src/modules/devices/oyranos_monitor_x11.c
+@@ -90,6 +90,8 @@ RROutput
+ XRROutputInfo *
+ oyX1Monitor_xrrOutputInfo_( oyX1Monitor_s * disp ) { return disp->output_info; }
+ int oyX1Monitor_activeOutputs_( oyX1Monitor_s * disp ) { return disp->active_outputs; }
++int oyX1Monitor_rrVersion_ ( oyX1Monitor_s * disp ) { return disp->rr_version; }
++int oyX1Monitor_rrScreen_ ( oyX1Monitor_s * disp ) { return disp->rr_screen; }
+
+
+ #endif
+@@ -680,7 +682,8 @@ int oyX1MonitorProfileSetup ( const char * display_name,
+ char *text = 0;
+
+ DBG_PROG_START
+- disp = oyX1Monitor_newFrom_( display_name, 0 );
++ /* XRandR needs a expensive initialisation */
++ disp = oyX1Monitor_newFrom_( display_name, 1 );
+ if(!disp)
+ return 1;
+
+@@ -721,6 +724,13 @@ int oyX1MonitorProfileSetup ( const char * display_name,
+ */
+ sprintf(text,"xcalib -d %s -s %d %s \'%s\'", dpy_name, disp->geo[1],
+ oy_debug?"-v":"", profile_fullname);
++ if(oyX1Monitor_infoSource_( disp ) == oyX11INFO_SOURCE_XRANDR)
++ sprintf(text,"xcalib -d %s -s %d %s \'%s\'", dpy_name, oyX1Monitor_rrScreen_(disp),
++ oy_debug?"-v":"", profile_fullname);
++ else
++ sprintf(text,"xcalib -d %s -s %d %s \'%s\'", dpy_name, disp->geo[1],
++ oy_debug?"-v":"", profile_fullname);
++
+ {
+ Display * display = oyX1Monitor_device_( disp );
+ int effective_screen = oyX1Monitor_screen_( disp );
+@@ -751,17 +761,21 @@ int oyX1MonitorProfileSetup ( const char * display_name,
+ #endif
+
+ /* Check for incapabilities of X gamma table access */
+- if(can_gamma || oyX1Monitor_screen_( disp ) == 0)
++ if(can_gamma || oyX1Monitor_screen_( disp ) == 0 || oyX1Monitor_infoSource_( disp ) == oyX11INFO_SOURCE_XRANDR )
+ error = system(text);
+ if(error &&
+ error != 65280)
+ { /* hack */
+- WARNc2_S("%s %s", _("No monitor gamma curves by profile:"),
+- oyNoEmptyName_m_(profil_basename) )
++ WARNc3_S("%s %s %d", _("No monitor gamma curves by profile:"),
++ oyNoEmptyName_m_(profil_basename), error )
+ error = -1;
+ } else
++ {
+ /* take xcalib error not serious, turn into a issue */
++ if(oy_debug)
++ DBG1_S("xcalib returned %d", error)
+ error = -1;
++ }
+ }
+
+ if(oy_debug)
+@@ -873,7 +887,8 @@ int oyX1MonitorProfileUnset ( const char * display_name )
+
+ DBG_PROG_START
+
+- disp = oyX1Monitor_newFrom_( display_name, 0 );
++ /* XRandR needs a expensive initialisation */
++ disp = oyX1Monitor_newFrom_( display_name, 1 );
+ if(!disp)
+ {
+ DBG_PROG_ENDE
+@@ -926,10 +941,16 @@ int oyX1MonitorProfileUnset ( const char * display_name )
+ if( (ptr = strchr(ptr,'.')) != 0 )
+ ptr[0] = '\000';
+
+- oySnprintf2_(command, 1024, "xgamma -gamma 1.0 -screen %d -display %s",
++ if(oyX1Monitor_infoSource_( disp ) == oyX11INFO_SOURCE_XRANDR)
++ oySnprintf2_(command, 1024, "xrandr -display %s --output %s --gamma .999999:.999999:.999999",
++ dpy_name, oyX1Monitor_systemPort_(disp));
++ else
++ oySnprintf2_(command, 1024, "xgamma -gamma 1.0 -screen %d -display %s",
+ disp->geo[1], dpy_name);
+
+- if(screen == disp->geo[1])
++ if(oy_debug)
++ DBG3_S( "%d %d system: %s", screen, disp->geo[1], command )
++ if(screen == disp->geo[1] || oyX1Monitor_infoSource_( disp ) == oyX11INFO_SOURCE_XRANDR)
+ r = system( command );
+ if(r) WARNc2_S("%s %d", _("found issues"),r);
+
+@@ -1347,17 +1368,16 @@ oyX1Monitor_s* oyX1Monitor_newFrom_ ( const char * display_name,
+
+ if(monitors == 0)
+ {
+- if(strcmp("default", output_info->name) != 0)
+- {
+- disp->info_source = oyX11INFO_SOURCE_XRANDR;
+-
+- } else
++ if(!XRRGetCrtcGammaSize( display, output_info->crtc ))
+ {
+ XRRFreeOutputInfo( output_info );
+ break;
+ }
+ }
+
++ if(XRRGetCrtcGammaSize( display, output_info->crtc ))
++ disp->info_source = oyX11INFO_SOURCE_XRANDR;
++
+ crtc_info = XRRGetCrtcInfo( disp->display, res_temp,
+ output_info->crtc );
+ if(crtc_info)
+@@ -1390,6 +1410,8 @@ oyX1Monitor_s* oyX1Monitor_newFrom_ ( const char * display_name,
+ if(disp->output_info->name && oyStrlen_(disp->output_info->name))
+ disp->system_port = oyStringCopy_( disp->output_info->name,
+ oyAllocateFunc_ );
++ disp->rr_version = major_versionp*100 + minor_versionp;
++ disp->rr_screen = xrand_screen;
+ }
+
+ ++ monitors;
+
diff --git a/media-libs/oyranos/files/oyranos-0.9.4-use-more-internal-xrandr-info.patch b/media-libs/oyranos/files/oyranos-0.9.4-use-more-internal-xrandr-info.patch
new file mode 100644
index 000000000000..d2a58ea73091
--- /dev/null
+++ b/media-libs/oyranos/files/oyranos-0.9.4-use-more-internal-xrandr-info.patch
@@ -0,0 +1,35 @@
+From 5c9b4a85213e5f63d716655b6c61a7efce07223c Mon Sep 17 00:00:00 2001
+From: Kai-Uwe Behrmann <ku.b@gmx.de>
+Date: Sun, 17 Feb 2013 20:27:04 +0100
+Subject: [PATCH] * [oyX1]: use more internal XRandR information
+
+---
+ src/include_private/oyranos_monitor_internal_x11.h | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+diff --git a/src/include_private/oyranos_monitor_internal_x11.h b/src/include_private/oyranos_monitor_internal_x11.h
+index c41aa3a..363b759 100644
+--- a/src/include_private/oyranos_monitor_internal_x11.h
++++ b/src/include_private/oyranos_monitor_internal_x11.h
+@@ -60,6 +60,8 @@ typedef struct {
+ RROutput output; /**< XRandR output */
+ XRROutputInfo * output_info; /**< XRandR output info */
+ int active_outputs; /**< outputs with crtc and gamma size */
++ int rr_version; /**< XRandR version */
++ int rr_screen; /**< nth XRandR output */
+ # endif
+ char * system_port; /**< the operating systems port name */
+ oyBlob_s * edid; /**< edid for the device */
+@@ -95,6 +97,8 @@ RROutput oyX1Monitor_xrrOutput_ ( oyX1Monitor_s * disp );
+ XRROutputInfo *
+ oyX1Monitor_xrrOutputInfo_( oyX1Monitor_s * disp );
+ int oyX1Monitor_activeOutputs_( oyX1Monitor_s * disp );
++int oyX1Monitor_rrVersion_ ( oyX1Monitor_s * disp );
++int oyX1Monitor_rrScreen_ ( oyX1Monitor_s * disp );
+ # endif
+
+ int oyX1MonitorProfileSetup ( const char * display_name,
+--
+1.5.6.5
+
+
diff --git a/media-libs/oyranos/files/oyranos-0.9.5-buildsystem-r1.patch b/media-libs/oyranos/files/oyranos-0.9.5-buildsystem-r1.patch
new file mode 100644
index 000000000000..ad5581077cb3
--- /dev/null
+++ b/media-libs/oyranos/files/oyranos-0.9.5-buildsystem-r1.patch
@@ -0,0 +1,182 @@
+--- a/CMakeLists.txt 2014-06-22 23:44:17.666047736 +0200
++++ b/CMakeLists.txt 2014-06-22 23:45:13.656347758 +0200
+@@ -41,7 +41,7 @@
+
+
+ # detect top level projects
+-FIND_PACKAGE( Yajl )
++FIND_PACKAGE( Yajl REQUIRED )
+ IF( HAVE_YAJL )
+ INCLUDE_DIRECTORIES( ${YAJL_INCLUDE_DIRS} )
+ LINK_DIRECTORIES( ${YAJL_LIBRARY_DIRS} )
+@@ -51,72 +51,16 @@
+ IF( NOT HAVE_YAJL_VERSION_H )
+ INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/yajl/ )
+ ENDIF( NOT HAVE_YAJL_VERSION_H )
+-ELSE( HAVE_YAJL )
+- IF(CMAKE_VERSION VERSION_GREATER 2.8.0)
+- include(ExternalProject)
+- ExternalProject_Add( yajl
+- SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/yajl
+- CONFIGURE_COMMAND cmake ${CMAKE_CURRENT_SOURCE_DIR}/yajl
+- BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/yajl
+- BUILD_COMMAND ${MAKE}
+- # skip installation
+- INSTALL_COMMAND echo )
+- INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/yajl )
+- LINK_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR}/yajl )
+- SET( YAJL_LIBRARIES yajl-static )
+- ENDIF()
+-
+ ENDIF( HAVE_YAJL )
+
+-FIND_PACKAGE( Elektra )
++FIND_PACKAGE( Elektra REQUIRED )
++SET( HAVE_ELEKTRA 1 )
+ IF(HAVE_ELEKTRA)
+ SET( ELEKTRA_SPEC "Requires: elektra
+ BuildRequires: elektra-devel" )
+ INCLUDE_DIRECTORIES( ${ELEKTRA_INCLUDE_DIRS} )
+ LINK_DIRECTORIES( ${ELEKTRA_LIBRARY_DIRS} )
+ STRING(REPLACE ";" " " ELEKTRA_PC_LDFLAGS "${ELEKTRA_STATIC_LDFLAGS}")
+-ELSE(HAVE_ELEKTRA)
+- SET( ELEKTRA_VERSION elektra-0.7.1 )
+- MESSAGE( "-- Using internal Elektra: ${ELEKTRA_VERSION}" )
+- INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/${ELEKTRA_VERSION}/src/include
+- ${CMAKE_BINARY_DIR}/${ELEKTRA_VERSION}/src/include )
+- SET( ELEKTRA_LIBRARIES_STATIC
+- ${CMAKE_BINARY_DIR}/${ELEKTRA_VERSION}/src/libelektra/libelektra_a-kdb.o
+- ${CMAKE_BINARY_DIR}/${ELEKTRA_VERSION}/src/libelektra/libelektra_a-kdbhandle.o
+- ${CMAKE_BINARY_DIR}/${ELEKTRA_VERSION}/src/libelektra/libelektra_a-key.o
+- ${CMAKE_BINARY_DIR}/${ELEKTRA_VERSION}/src/libelektra/libelektra_a-keyset.o
+- ${CMAKE_BINARY_DIR}/${ELEKTRA_VERSION}/src/libelektra/libelektra_a-trie.o
+- ${CMAKE_BINARY_DIR}/${ELEKTRA_VERSION}/src/libelektra/libelektra_a-kdbhighlevel.o
+- ${CMAKE_BINARY_DIR}/${ELEKTRA_VERSION}/src/libelektra/libelektra_a-kdbcapability.o
+- ${CMAKE_BINARY_DIR}/${ELEKTRA_VERSION}/src/libelektra/libelektra_a-keyhelpers.o
+- ${CMAKE_BINARY_DIR}/${ELEKTRA_VERSION}/src/libelektra/libelektra_a-keymeta.o
+- ${CMAKE_BINARY_DIR}/${ELEKTRA_VERSION}/src/libelektra/libelektra_a-keyname.o
+- ${CMAKE_BINARY_DIR}/${ELEKTRA_VERSION}/src/libelektra/libelektra_a-keytest.o
+- ${CMAKE_BINARY_DIR}/${ELEKTRA_VERSION}/src/libelektra/libelektra_a-keyvalue.o
+- ${CMAKE_BINARY_DIR}/${ELEKTRA_VERSION}/src/libelektra/libelektra_a-serialize.o
+- ${CMAKE_BINARY_DIR}/${ELEKTRA_VERSION}/src/libelektra/libelektra_a-split.o
+- ${CMAKE_BINARY_DIR}/${ELEKTRA_VERSION}/src/libelektra/libelektra_a-exported_symbols.o
+- ${CMAKE_BINARY_DIR}/${ELEKTRA_VERSION}/src/libloader/libloader_static_a-kdbLibLoader.o
+- ${CMAKE_BINARY_DIR}/${ELEKTRA_VERSION}/src/libhelper/libhelper_static_a-internal.o
+- ${CMAKE_BINARY_DIR}/${ELEKTRA_VERSION}/src/libhelper/libhelper_static_a-helper.o
+- ${CMAKE_BINARY_DIR}/${ELEKTRA_VERSION}/src/backends/filesys/libelektra_filesys_a-filesys.o
+- ${CMAKE_BINARY_DIR}/${ELEKTRA_VERSION}/src/libelektratools/libelektratools_a-kdbtools.o
+- ${CMAKE_BINARY_DIR}/${ELEKTRA_VERSION}/src/libelektratools/libelektratools_a-stream.o
+- )
+- SET( ELEKTRA_LIBRARIES
+- ${LIBXML2_LIBRARIES}
+- )
+- IF(CMAKE_VERSION VERSION_GREATER 2.8.0)
+- include(ExternalProject)
+- ExternalProject_Add( ${ELEKTRA_VERSION}
+- SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/${ELEKTRA_VERSION}
+- # GCC flags (-fPIC) will fail on Windows, without we get relocation R_X86_64_32 errors
+- CONFIGURE_COMMAND CFLAGS=-fPIC ${CMAKE_CURRENT_SOURCE_DIR}/${ELEKTRA_VERSION}/configure --enable-static --enable-shared=false
+- BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${ELEKTRA_VERSION}
+- BUILD_COMMAND ${MAKE}
+- # skip installation
+- INSTALL_COMMAND echo )
+- ENDIF()
+ ENDIF(HAVE_ELEKTRA)
+
+ #now add all directories
+--- a/src/CMakeLists.txt 2013-12-20 00:04:12.319880917 +0100
++++ b/src/CMakeLists.txt 2013-12-20 00:11:33.504365352 +0100
+@@ -100,7 +100,9 @@
+ INCLUDE_DIRECTORIES( ${XCM_INCLUDE_DIRS} )
+ LINK_DIRECTORIES( ${XCM_LIBRARY_DIRS} )
+
+-FIND_PACKAGE( X11 )
++IF(WANT_X11)
++FIND_PACKAGE( X11 REQUIRED )
++ENDIF(WANT_X11)
+ IF(X11_FOUND)
+ INCLUDE_DIRECTORIES( ${X11_INCLUDE_DIRS} )
+ LINK_DIRECTORIES( ${X11_LIBRARY_DIRS} )
+@@ -123,27 +125,36 @@
+ LINK_DIRECTORIES( ${XXF86VM_LIBRARY_DIRS} )
+ ENDIF(X11_FOUND)
+
+-FIND_PACKAGE( CUPS )
++IF(WANT_CUPS)
++FIND_PACKAGE( Cups REQUIRED )
++SET( HAVE_CUPS 1 )
++ENDIF(WANT_CUPS)
+ IF(HAVE_CUPS)
+ INCLUDE_DIRECTORIES( ${CUPS_INCLUDE_DIR} )
+ LINK_DIRECTORIES( ${CUPS_LIBRARYS} )
+ ENDIF(HAVE_CUPS)
+
+-FIND_PACKAGE( Cairo )
++IF(WANT_CAIRO)
++FIND_PACKAGE( Cairo REQUIRED)
++ENDIF(WANT_CAIRO)
+ IF(HAVE_CAIRO)
+ INCLUDE_DIRECTORIES( ${CAIRO_INCLUDE_DIR}/cairo )
+ INCLUDE_DIRECTORIES( ${CAIRO_INCLUDE_DIR} )
+ LINK_DIRECTORIES( ${CAIRO_LIBRARY_DIRS} )
+ ENDIF(HAVE_CAIRO)
+
+-FIND_PACKAGE(Qt4 COMPONENTS QtCore QtGui)
++IF(WANT_QT4)
++FIND_PACKAGE(Qt4 COMPONENTS QtCore QtGui REQUIRED)
++ENDIF(WANT_QT4)
+ IF(QT_FOUND)
+ SET( HAVE_QT 1 )
+ INCLUDE_DIRECTORIES( ${QT_INCLUDE_DIRS} )
+ LINK_DIRECTORIES( ${QT_LIBRARY_DIRS} )
+ ENDIF(QT_FOUND)
+
+-FIND_PACKAGE( Fltk )
++IF(WANT_FLTK)
++FIND_PACKAGE( FLTK REQUIRED)
++ENDIF(WANT_FLTK)
+ IF(FLTK_FOUND)
+ SET( HAVE_FLTK 1 )
+ INCLUDE_DIRECTORIES( ${FLTK_INCLUDE_DIRS} )
+@@ -159,7 +170,9 @@
+ SET( LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} PARENT_SCOPE)
+ ENDIF(LIBXML2_FOUND)
+
+-FIND_PACKAGE( LibRaw )
++IF(WANT_LIBRAW)
++FIND_PACKAGE( LibRaw REQUIRED )
++ENDIF(WANT_LIBRAW)
+ IF( HAVE_LIBRAW )
+ # TRY_COMPILE(
+ # HAVE_LIBRAW_REALLY
+@@ -182,7 +195,9 @@
+ MESSAGE( "HAVE_LIBRAW_PLUGIN: ${HAVE_LIBRAW_PLUGIN}" )
+ ENDIF()
+
+-FIND_PACKAGE( Exif2 )
++IF(WANT_EXIV2)
++FIND_PACKAGE( Exif2 REQUIRED )
++ENDIF(WANT_EXIV2)
+ IF(HAVE_EXIV2)
+ INCLUDE_DIRECTORIES( ${EXIV2_INCLUDE_DIRS} )
+ LINK_DIRECTORIES( ${EXIV2_LIBRARY_DIRS} )
+--- a/doc/CMakeLists.txt 2014-03-07 09:43:25.000000000 +0100
++++ b/doc/CMakeLists.txt 2014-06-23 00:22:01.256748956 +0200
+@@ -33,7 +33,9 @@
+ INSTALL( FILES ${MAN1_PAGES} DESTINATION share/man/man1 )
+ INSTALL( FILES ${MAN3_PAGES} DESTINATION share/man/man3 )
+
+-FIND_PACKAGE( Doxygen )
++IF(WANT_HTML)
++ FIND_PACKAGE( Doxygen REQUIRED )
++ENDIF(WANT_HTML)
+ IF( DOXYGEN_FOUND )
+
+ ADD_CUSTOM_COMMAND( OUTPUT html
+@@ -43,5 +45,5 @@
+ ADD_CUSTOM_TARGET( docu ALL
+ DEPENDS html )
+
+- INSTALL( DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html DESTINATION share/doc/${PACKAGE_NAME} )
++ INSTALL( DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html DESTINATION share/doc/${PACKAGE_NAME}-${OYRANOS_VERSION} )
+ ENDIF()
diff --git a/media-libs/oyranos/metadata.xml b/media-libs/oyranos/metadata.xml
new file mode 100644
index 000000000000..10d1ba182e9e
--- /dev/null
+++ b/media-libs/oyranos/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>xmw@gentoo.org</email>
+ <name>Michael Weber</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">oyranos-cms/oyranos</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/oyranos/oyranos-0.9.4-r2.ebuild b/media-libs/oyranos/oyranos-0.9.4-r2.ebuild
new file mode 100644
index 000000000000..e114d7e8abf9
--- /dev/null
+++ b/media-libs/oyranos/oyranos-0.9.4-r2.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic cmake-utils cmake-multilib
+
+DESCRIPTION="colour management system allowing to share various settings across applications and services"
+HOMEPAGE="http://www.oyranos.org/"
+SRC_URI="mirror://sourceforge/oyranos/Oyranos/Oyranos%200.4/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="X cairo cups doc exif fltk qt4 raw test"
+
+RDEPEND="=app-admin/elektra-0.7*:0=[${MULTILIB_USEDEP}]
+ >=app-admin/elektra-0.7.1-r5:0=[${MULTILIB_USEDEP}]
+ >=dev-libs/libxml2-2.9.1-r4[${MULTILIB_USEDEP}]
+ >=dev-libs/yajl-2.0.4-r1[${MULTILIB_USEDEP}]
+ media-libs/icc-profiles-basiccolor-printing2009
+ media-libs/icc-profiles-basiccolor-printing2009
+ >=media-libs/lcms-2.5:2[${MULTILIB_USEDEP}]
+ >=media-libs/libpng-1.6.10:0[${MULTILIB_USEDEP}]
+ >=media-libs/libXcm-0.5.2-r1[${MULTILIB_USEDEP}]
+ cairo? ( >=x11-libs/cairo-1.12.14-r4[${MULTILIB_USEDEP}] )
+ cups? ( >=net-print/cups-1.7.1-r1[${MULTILIB_USEDEP}] )
+ exif? ( >=media-gfx/exiv2-0.23-r2:=[${MULTILIB_USEDEP}] )
+ fltk? ( x11-libs/fltk:1 )
+ qt4? ( dev-qt/qtcore:4 dev-qt/qtgui:4 )
+ raw? ( >=media-libs/libraw-0.15.4[${MULTILIB_USEDEP}] )
+ X? ( >=x11-libs/libXfixes-5.0.1[${MULTILIB_USEDEP}]
+ >=x11-libs/libXrandr-1.4.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXxf86vm-1.1.3[${MULTILIB_USEDEP}]
+ >=x11-libs/libXinerama-1.1.3[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ app-doc/doxygen
+ media-gfx/graphviz"
+
+RESTRICT="test"
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/oyranos-config
+)
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/oyranos/oyranos_version.h
+)
+
+CMAKE_REMOVE_MODULES_LIST="${CMAKE_REMOVE_MODULES_LIST} FindFltk FindXcm FindCUPS"
+
+src_prepare() {
+ einfo remove bundled libs
+ rm -rf elektra* yajl || die
+
+ epatch "${FILESDIR}/${P}"-buildsystem-r1.patch
+
+ #upstream(ed) fixes, be more verbose, better xrandr handling
+ epatch "${FILESDIR}/${P}"-fix-array-access.patch \
+ "${FILESDIR}/${P}"-fix-oyRankMap-helper-functions-crashes.patch \
+ "${FILESDIR}/${P}"-fix-oyStringSegment-crash.patch \
+ "${FILESDIR}/${P}"-be-more-verbose.patch \
+ "${FILESDIR}/${P}"-use-more-internal-xrandr-info.patch \
+ "${FILESDIR}/${P}"-set-xcalib-to-screen-if-ge-xrandr-12.patch \
+ "${FILESDIR}/${P}"-fix-double-object-release.patch \
+ "${FILESDIR}/${P}"-omit-profile-with-error.patch \
+ "${FILESDIR}/${P}"-fix-typos-and-grammar.patch
+
+ #upstream fix for QA notice, gentoo bug 464254
+ epatch "${FILESDIR}/${P}"-fix-runpaths.patch
+
+ #fix really ugly and prominently visible typo (solved in 0.9.5)
+ sed -e 's/Promt/Prompt/' \
+ -i src/liboyranos_config/oyranos_texts.c po/*.{po,pot} settings/*xml || die
+
+ if use fltk ; then
+ #src/examples does not include fltk flags
+ append-cflags $(fltk-config --cflags)
+ append-cxxflags $(fltk-config --cxxflags)
+ fi
+
+ cmake-utils_src_prepare
+}
+
+multilib_src_configure() {
+ local libdir=$(get_libdir)
+ local mycmakeargs=(
+ -DLIB_SUFFIX=${libdir#lib}
+
+ $(usex X -DWANT_X11=1 "")
+ $(usex cairo -DWANT_CAIRO=1 "")
+ $(usex cups -DWANT_CUPS=1 "")
+ $(usex exif -DWANT_EXIV2=1 "")
+ $(usex raw -DWANT_LIBRAW=1 "")
+
+ # only used in programs
+ $(multilib_native_usex fltk -DWANT_FLTK=1 "")
+ $(multilib_native_usex qt4 -DWANT_QT4=1 "")
+ )
+
+ cmake-utils_src_configure
+}
+
+multilib_src_install_all() {
+ if use doc; then
+ mv "${ED%/}"/usr/share/doc/{${PN},${PF}} || die
+ else
+ rm -rf "${ED%/}"/usr/share/doc/${PN} || die
+ fi
+
+ dodoc AUTHORS ChangeLog README
+}
diff --git a/media-libs/oyranos/oyranos-0.9.5-r1.ebuild b/media-libs/oyranos/oyranos-0.9.5-r1.ebuild
new file mode 100644
index 000000000000..844ed97b5bc9
--- /dev/null
+++ b/media-libs/oyranos/oyranos-0.9.5-r1.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic cmake-utils cmake-multilib
+
+DESCRIPTION="Colour management system allowing to share various settings across applications and services"
+HOMEPAGE="http://www.oyranos.org/"
+SRC_URI="https://github.com/oyranos-cms/oyranos/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+KEYWORDS="~amd64 ~x86"
+LICENSE="BSD"
+SLOT="0"
+IUSE="X cairo cups doc exif fltk jpeg qt4 qt5 raw test tiff"
+
+#OY_LINGUAS="cs;de;eo;eu;fr;ru" #TODO
+
+COMMON_DEPEND="
+ || (
+ =app-admin/elektra-0.7*:0=[${MULTILIB_USEDEP}]
+ >=app-admin/elektra-0.8.4:0=[${MULTILIB_USEDEP}]
+ )
+ >=dev-libs/libxml2-2.9.1-r4[${MULTILIB_USEDEP}]
+ >=dev-libs/yajl-2.0.4-r1[${MULTILIB_USEDEP}]
+ >=media-libs/lcms-2.5:2[${MULTILIB_USEDEP}]
+ >=media-libs/libpng-1.6.10:0[${MULTILIB_USEDEP}]
+ >=media-libs/libXcm-0.5.3[${MULTILIB_USEDEP}]
+ cairo? ( >=x11-libs/cairo-1.12.14-r4[${MULTILIB_USEDEP}] )
+ cups? ( >=net-print/cups-1.7.1-r1[${MULTILIB_USEDEP}] )
+ exif? ( >=media-gfx/exiv2-0.23-r2:=[${MULTILIB_USEDEP}] )
+ fltk? ( x11-libs/fltk:1 )
+ jpeg? ( virtual/jpeg:0[${MULTILIB_USEDEP}] )
+ qt5? (
+ dev-qt/qtgui:5 dev-qt/qtwidgets:5 dev-qt/qtx11extras:5
+ )
+ !qt5? (
+ qt4? ( dev-qt/qtcore:4 dev-qt/qtgui:4 )
+ )
+ raw? ( >=media-libs/libraw-0.15.4[${MULTILIB_USEDEP}] )
+ tiff? ( media-libs/tiff:0[${MULTILIB_USEDEP}] )
+ X? ( >=x11-libs/libXfixes-5.0.1[${MULTILIB_USEDEP}]
+ >=x11-libs/libXrandr-1.4.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXxf86vm-1.1.3[${MULTILIB_USEDEP}]
+ >=x11-libs/libXinerama-1.1.3[${MULTILIB_USEDEP}] )"
+DEPEND="${COMMON_DEPEND}
+ doc? (
+ app-doc/doxygen
+ media-gfx/graphviz
+ )"
+RDEPEND="${COMMON_DEPEND}
+ media-libs/icc-profiles-basiccolor-printing2009
+ media-libs/icc-profiles-openicc"
+
+DOCS=( AUTHORS ChangeLog README )
+RESTRICT="test"
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/oyranos-config
+)
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/oyranos/oyranos_version.h
+)
+
+CMAKE_REMOVE_MODULES_LIST="${CMAKE_REMOVE_MODULES_LIST} FindFltk FindXcm FindCUPS"
+
+src_prepare() {
+ einfo remove bundled libs
+ rm -rf elektra* yajl || die
+
+ if use fltk ; then
+ #src/examples does not include fltk flags
+ append-cflags $(fltk-config --cflags)
+ append-cxxflags $(fltk-config --cxxflags)
+ fi
+
+ cmake-utils_src_prepare
+}
+
+multilib_src_configure() {
+ local libdir=$(get_libdir)
+ local mycmakeargs=(
+ -DLIB_SUFFIX=${libdir#lib}
+ -DUSE_SYSTEM_ELEKTRA=YES
+ -DUSE_SYSTEM_YAJL=YES
+ -DUSE_Qt4=$(usex '!qt5')
+ -DCMAKE_DISABLE_FIND_PACKAGE_Cairo=$(usex '!cairo')
+ -DCMAKE_DISABLE_FIND_PACKAGE_Cups=$(usex '!cups')
+ -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=$(usex '!doc')
+ -DCMAKE_DISABLE_FIND_PACKAGE_Exif2=$(usex '!exif')
+ -DCMAKE_DISABLE_FIND_PACKAGE_JPEG=$(usex '!jpeg')
+ -DCMAKE_DISABLE_FIND_PACKAGE_LibRaw=$(usex '!raw')
+ -DCMAKE_DISABLE_FIND_PACKAGE_TIFF=$(usex '!tiff')
+ -DCMAKE_DISABLE_FIND_PACKAGE_X11=$(usex '!X')
+ -DCMAKE_DISABLE_FIND_PACKAGE_Fltk=$(multilib_native_usex fltk OFF ON)
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt4=$(multilib_native_usex qt4 OFF ON)
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5=$(multilib_native_usex qt5 OFF ON)
+ )
+
+ cmake-utils_src_configure
+}
diff --git a/media-libs/oyranos/oyranos-0.9.5.ebuild b/media-libs/oyranos/oyranos-0.9.5.ebuild
new file mode 100644
index 000000000000..183f150f970d
--- /dev/null
+++ b/media-libs/oyranos/oyranos-0.9.5.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic cmake-utils cmake-multilib
+
+DESCRIPTION="Colour management system allowing to share various settings across applications and services"
+HOMEPAGE="http://www.oyranos.org/"
+SRC_URI="mirror://sourceforge/oyranos/Oyranos/Oyranos%200.9/${P}.tar.bz2"
+
+KEYWORDS="~amd64 ~x86"
+LICENSE="BSD"
+SLOT="0"
+IUSE="X cairo cups doc exif fltk qt4 raw test"
+
+RDEPEND="
+ || (
+ =app-admin/elektra-0.7*:0=[${MULTILIB_USEDEP}]
+ >=app-admin/elektra-0.8.4:0=[${MULTILIB_USEDEP}]
+ )
+ >=dev-libs/libxml2-2.9.1-r4[${MULTILIB_USEDEP}]
+ >=dev-libs/yajl-2.0.4-r1[${MULTILIB_USEDEP}]
+ media-libs/icc-profiles-basiccolor-printing2009
+ media-libs/icc-profiles-openicc
+ >=media-libs/lcms-2.5:2[${MULTILIB_USEDEP}]
+ >=media-libs/libpng-1.6.10:0[${MULTILIB_USEDEP}]
+ >=media-libs/libXcm-0.5.3[${MULTILIB_USEDEP}]
+ cairo? ( >=x11-libs/cairo-1.12.14-r4[${MULTILIB_USEDEP}] )
+ cups? ( >=net-print/cups-1.7.1-r1[${MULTILIB_USEDEP}] )
+ exif? ( >=media-gfx/exiv2-0.23-r2:=[${MULTILIB_USEDEP}] )
+ fltk? ( x11-libs/fltk:1 )
+ qt4? ( dev-qt/qtcore:4 dev-qt/qtgui:4 )
+ raw? ( >=media-libs/libraw-0.15.4[${MULTILIB_USEDEP}] )
+ X? ( >=x11-libs/libXfixes-5.0.1[${MULTILIB_USEDEP}]
+ >=x11-libs/libXrandr-1.4.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXxf86vm-1.1.3[${MULTILIB_USEDEP}]
+ >=x11-libs/libXinerama-1.1.3[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ doc? (
+ app-doc/doxygen
+ media-gfx/graphviz
+ )"
+
+DOCS="AUTHORS ChangeLog README"
+RESTRICT="test"
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/oyranos-config
+)
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/oyranos/oyranos_version.h
+)
+
+CMAKE_REMOVE_MODULES_LIST="${CMAKE_REMOVE_MODULES_LIST} FindFltk FindXcm FindCUPS"
+
+src_prepare() {
+ einfo remove bundled libs
+ rm -rf elektra* yajl || die
+
+ epatch "${FILESDIR}/${PN}"-0.9.5-buildsystem-r1.patch
+
+ if use fltk ; then
+ #src/examples does not include fltk flags
+ append-cflags $(fltk-config --cflags)
+ append-cxxflags $(fltk-config --cxxflags)
+ fi
+
+ cmake-utils_src_prepare
+}
+
+multilib_src_configure() {
+ local libdir=$(get_libdir)
+ local mycmakeargs=(
+ -DLIB_SUFFIX=${libdir#lib}
+
+ $(usex cairo -DWANT_CAIRO=1 "")
+ $(usex cups -DWANT_CUPS=1 "")
+ $(usex doc -DWANT_HTML=1 "")
+ $(usex exif -DWANT_EXIV2=1 "")
+ $(usex raw -DWANT_LIBRAW=1 "")
+ $(usex X -DWANT_X11=1 "")
+
+ # only used in programs
+ $(multilib_native_usex fltk -DWANT_FLTK=1 "")
+ $(multilib_native_usex qt4 -DWANT_QT4=1 "")
+ )
+
+ cmake-utils_src_configure
+}
diff --git a/media-libs/oyranos/oyranos-9999.ebuild b/media-libs/oyranos/oyranos-9999.ebuild
new file mode 100644
index 000000000000..faf149296fe6
--- /dev/null
+++ b/media-libs/oyranos/oyranos-9999.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic git-r3 cmake-utils cmake-multilib
+
+DESCRIPTION="Colour management system allowing to share various settings across applications and services"
+HOMEPAGE="http://www.oyranos.org/"
+EGIT_REPO_URI="https://github.com/${PN}-cms/${PN}.git"
+
+KEYWORDS=""
+LICENSE="BSD"
+SLOT="0"
+IUSE="X cairo cups doc exif fltk jpeg qt4 qt5 raw test tiff"
+
+#OY_LINGUAS="cs;de;eo;eu;fr;ru" #TODO
+
+COMMON_DEPEND="
+ || (
+ =app-admin/elektra-0.7*:0[${MULTILIB_USEDEP}]
+ >=app-admin/elektra-0.8.4:0[${MULTILIB_USEDEP}]
+ )
+ >=dev-libs/libxml2-2.9.1-r4[${MULTILIB_USEDEP}]
+ >=dev-libs/yajl-2.0.4-r1[${MULTILIB_USEDEP}]
+ >=media-libs/lcms-2.5:2[${MULTILIB_USEDEP}]
+ >=media-libs/libpng-1.6.10:0[${MULTILIB_USEDEP}]
+ >=media-libs/libXcm-0.5.3[${MULTILIB_USEDEP}]
+ cairo? ( >=x11-libs/cairo-1.12.14-r4[${MULTILIB_USEDEP}] )
+ cups? ( >=net-print/cups-1.7.1-r1[${MULTILIB_USEDEP}] )
+ exif? ( >=media-gfx/exiv2-0.23-r2:=[${MULTILIB_USEDEP}] )
+ fltk? ( x11-libs/fltk:1 )
+ jpeg? ( virtual/jpeg:0[${MULTILIB_USEDEP}] )
+ qt5? (
+ dev-qt/qtgui:5 dev-qt/qtwidgets:5 dev-qt/qtx11extras:5
+ )
+ !qt5? (
+ qt4? ( dev-qt/qtcore:4 dev-qt/qtgui:4 )
+ )
+ raw? ( >=media-libs/libraw-0.15.4[${MULTILIB_USEDEP}] )
+ tiff? ( media-libs/tiff:0[${MULTILIB_USEDEP}] )
+ X? ( >=x11-libs/libXfixes-5.0.1[${MULTILIB_USEDEP}]
+ >=x11-libs/libXrandr-1.4.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXxf86vm-1.1.3[${MULTILIB_USEDEP}]
+ >=x11-libs/libXinerama-1.1.3[${MULTILIB_USEDEP}] )"
+DEPEND="${COMMON_DEPEND}
+ doc? (
+ app-doc/doxygen
+ media-gfx/graphviz
+ )"
+RDEPEND="${COMMON_DEPEND}
+ media-libs/icc-profiles-basiccolor-printing2009
+ media-libs/icc-profiles-openicc"
+
+DOCS=( AUTHORS.md ChangeLog.md README.md )
+RESTRICT="test"
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/oyranos-config
+)
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/oyranos/oyranos_version.h
+)
+
+CMAKE_REMOVE_MODULES_LIST="${CMAKE_REMOVE_MODULES_LIST} FindFltk FindXcm FindCUPS"
+
+src_prepare() {
+ einfo remove bundled libs
+ rm -rf elektra* yajl || die
+
+ if use fltk ; then
+ #src/examples does not include fltk flags
+ append-cflags $(fltk-config --cflags)
+ append-cxxflags $(fltk-config --cxxflags)
+ fi
+
+ cmake-utils_src_prepare
+}
+
+multilib_src_configure() {
+ local libdir=$(get_libdir)
+ local mycmakeargs=(
+ -DLIB_SUFFIX=${libdir#lib}
+ -DUSE_SYSTEM_ELEKTRA=YES
+ -DUSE_SYSTEM_YAJL=YES
+ -DUSE_Qt4=$(usex '!qt5')
+ -DCMAKE_DISABLE_FIND_PACKAGE_Cairo=$(usex '!cairo')
+ -DCMAKE_DISABLE_FIND_PACKAGE_Cups=$(usex '!cups')
+ -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=$(usex '!doc')
+ -DCMAKE_DISABLE_FIND_PACKAGE_Exif2=$(usex '!exif')
+ -DCMAKE_DISABLE_FIND_PACKAGE_JPEG=$(usex '!jpeg')
+ -DCMAKE_DISABLE_FIND_PACKAGE_LibRaw=$(usex '!raw')
+ -DCMAKE_DISABLE_FIND_PACKAGE_TIFF=$(usex '!tiff')
+ -DCMAKE_DISABLE_FIND_PACKAGE_X11=$(usex '!X')
+ -DCMAKE_DISABLE_FIND_PACKAGE_Fltk=$(multilib_native_usex fltk OFF ON)
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt4=$(multilib_native_usex qt4 OFF ON)
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5=$(multilib_native_usex qt5 OFF ON)
+ )
+
+ cmake-utils_src_configure
+}
diff --git a/media-libs/phat/Manifest b/media-libs/phat/Manifest
new file mode 100644
index 000000000000..744ba9db0f64
--- /dev/null
+++ b/media-libs/phat/Manifest
@@ -0,0 +1 @@
+DIST phat-0.4.1.tar.gz 550910 SHA256 5b891803b0461f4ab9c08845c71f5de7d135029fd4d58afecf6a41d4c46596c5
diff --git a/media-libs/phat/metadata.xml b/media-libs/phat/metadata.xml
new file mode 100644
index 000000000000..e1774e3d9ad7
--- /dev/null
+++ b/media-libs/phat/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>sound</herd>
+</pkgmetadata>
diff --git a/media-libs/phat/phat-0.4.1.ebuild b/media-libs/phat/phat-0.4.1.ebuild
new file mode 100644
index 000000000000..cde60f019da7
--- /dev/null
+++ b/media-libs/phat/phat-0.4.1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+DESCRIPTION="PHAT is a collection of GTK+ widgets geared toward pro-audio apps"
+HOMEPAGE="http://phat.berlios.de"
+SRC_URI="mirror://berlios/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc sparc x86"
+IUSE="debug"
+
+RDEPEND="x11-libs/gtk+:2
+ gnome-base/libgnomecanvas"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ sed -e "s:-Werror::g" -e "s:-O3:${CFLAGS}:g" \
+ -i configure || die "sed failed"
+}
+
+src_configure() {
+ econf \
+ $(use_enable debug)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ dodoc AUTHORS BUGS ChangeLog NEWS README TODO
+}
diff --git a/media-libs/phonon-gstreamer/Manifest b/media-libs/phonon-gstreamer/Manifest
new file mode 100644
index 000000000000..94557bb12e1e
--- /dev/null
+++ b/media-libs/phonon-gstreamer/Manifest
@@ -0,0 +1,2 @@
+DIST phonon-backend-gstreamer-4.7.2.tar.xz 75552 SHA256 80b72a9092f540dd0a2abd2898328f3d5f9febfa073b0b1d44592a050a99d2b1 SHA512 d8cf408261f80de7ac29101c3613002a0e838f07e6c8dad2d3922a522a27be167ef8f17a8ab0c99c06c1b75cb4d9d68acee03cb60cf4a44dc2248b7b0dafae08 WHIRLPOOL 368f9784d2ea6fbb3d105fe4645af308bca975bac4cf21908a344d04ab76dd56d5a83ce9a4347a3d664f1830b65de4d40e12b663bcdf91170a4df38bdeb479af
+DIST phonon-backend-gstreamer-4.8.2.tar.xz 76044 SHA256 20e0f71f2beb4f859db8385079a13aef5473863ee6f27aad7b065aa7bfe931e0 SHA512 a18534b89d424bb2cc9f8a7f63a794d9711d895ad1db6cd5f4bd8748ea38310ffeacd916d16443986f89d3097e108aaf5631eaba6dd37e76a7360d5f1d02ecea WHIRLPOOL 19e68e818acda9602bdc9f557c866943e8f74d83b5a3d3532a32daf10d6c4f70c3961ceaa2e3b373ed1810c438d595864a01e31514da7c7f569d3a630a625654
diff --git a/media-libs/phonon-gstreamer/metadata.xml b/media-libs/phonon-gstreamer/metadata.xml
new file mode 100644
index 000000000000..cd1b62290e85
--- /dev/null
+++ b/media-libs/phonon-gstreamer/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="network">Enable network streaming support via libsoup</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/phonon-gstreamer/phonon-gstreamer-4.7.2.ebuild b/media-libs/phonon-gstreamer/phonon-gstreamer-4.7.2.ebuild
new file mode 100644
index 000000000000..3cb14fbe5c59
--- /dev/null
+++ b/media-libs/phonon-gstreamer/phonon-gstreamer-4.7.2.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+[[ ${PV} == *9999 ]] && git_eclass="git-r3"
+EGIT_REPO_URI=( "git://anongit.kde.org/${PN}" )
+
+MY_PN="phonon-backend-gstreamer"
+MY_P=${MY_PN}-${PV}
+
+inherit cmake-utils multibuild ${git_eclass}
+
+DESCRIPTION="Phonon GStreamer backend"
+HOMEPAGE="https://projects.kde.org/projects/kdesupport/phonon/phonon-gstreamer"
+[[ ${PV} == *9999 ]] || SRC_URI="mirror://kde/stable/phonon/${MY_PN}/${PV}/src/${MY_P}.tar.xz"
+
+LICENSE="LGPL-2.1"
+if [[ ${PV} == *9999 ]]; then
+ KEYWORDS=""
+else
+ KEYWORDS="amd64 arm hppa ppc ppc64 x86 ~amd64-fbsd ~x86-fbsd ~x64-macos"
+fi
+SLOT="0"
+IUSE="alsa debug +network +qt4 qt5"
+REQUIRED_USE="|| ( qt4 qt5 )"
+
+RDEPEND="
+ dev-libs/glib:2
+ media-libs/gstreamer:0.10
+ media-libs/gst-plugins-base:0.10
+ media-plugins/gst-plugins-meta:0.10[alsa?,ogg,vorbis]
+ >=media-libs/phonon-4.7.0[qt4?,qt5?]
+ qt4? (
+ dev-qt/qtcore:4[glib]
+ dev-qt/qtgui:4[glib]
+ dev-qt/qtopengl:4
+ )
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtopengl:5
+ dev-qt/qtwidgets:5
+ )
+ virtual/opengl
+ network? ( media-plugins/gst-plugins-soup:0.10 )
+"
+DEPEND="${RDEPEND}
+ qt4? ( >=dev-util/automoc-0.9.87 )
+ virtual/pkgconfig
+"
+
+[[ ${PV} == 9999 ]] || S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ MULTIBUILD_VARIANTS=()
+ if use qt4; then
+ MULTIBUILD_VARIANTS+=(qt4)
+ fi
+ if use qt5; then
+ MULTIBUILD_VARIANTS+=(qt5)
+ fi
+}
+
+src_configure() {
+ myconfigure() {
+ local mycmakeargs=()
+ if [[ ${MULTIBUILD_VARIANT} = qt4 ]]; then
+ mycmakeargs+=(-DPHONON_BUILD_PHONON4QT5=OFF)
+ fi
+ if [[ ${MULTIBUILD_VARIANT} = qt5 ]]; then
+ mycmakeargs+=(-DPHONON_BUILD_PHONON4QT5=ON)
+ fi
+ cmake-utils_src_configure
+ }
+
+ multibuild_foreach_variant myconfigure
+}
+
+src_compile() {
+ multibuild_foreach_variant cmake-utils_src_compile
+}
+
+src_install() {
+ multibuild_foreach_variant cmake-utils_src_install
+}
+
+src_test() {
+ multibuild_foreach_variant cmake-utils_src_test
+}
diff --git a/media-libs/phonon-gstreamer/phonon-gstreamer-4.8.2.ebuild b/media-libs/phonon-gstreamer/phonon-gstreamer-4.8.2.ebuild
new file mode 100644
index 000000000000..9159564c04c9
--- /dev/null
+++ b/media-libs/phonon-gstreamer/phonon-gstreamer-4.8.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
+
+[[ ${PV} == *9999 ]] && git_eclass="git-r3"
+EGIT_REPO_URI=( "git://anongit.kde.org/${PN}" )
+
+MY_PN="phonon-backend-gstreamer"
+MY_P=${MY_PN}-${PV}
+
+inherit cmake-utils multibuild ${git_eclass}
+
+DESCRIPTION="Phonon GStreamer backend"
+HOMEPAGE="https://projects.kde.org/projects/kdesupport/phonon/phonon-gstreamer"
+[[ ${PV} == *9999 ]] || SRC_URI="mirror://kde/stable/phonon/${MY_PN}/${PV}/src/${MY_P}.tar.xz"
+
+LICENSE="LGPL-2.1"
+if [[ ${PV} == *9999 ]]; then
+ KEYWORDS=""
+else
+ KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86 ~amd64-fbsd ~x86-fbsd ~x64-macos"
+fi
+SLOT="0"
+IUSE="alsa debug +network +qt4 qt5"
+REQUIRED_USE="|| ( qt4 qt5 )"
+
+RDEPEND="
+ dev-libs/glib:2
+ dev-libs/libxml2:2
+ media-libs/gstreamer:1.0
+ media-libs/gst-plugins-base:1.0
+ media-plugins/gst-plugins-meta:1.0[alsa?,ogg,vorbis]
+ >=media-libs/phonon-4.7.80[qt4?,qt5?]
+ qt4? (
+ dev-qt/qtcore:4[glib]
+ dev-qt/qtgui:4[glib]
+ dev-qt/qtopengl:4
+ )
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtopengl:5
+ dev-qt/qtwidgets:5
+ )
+ virtual/opengl
+ network? ( media-plugins/gst-plugins-soup:1.0 )
+"
+DEPEND="${RDEPEND}
+ qt4? ( >=dev-util/automoc-0.9.87 )
+ virtual/pkgconfig
+"
+
+[[ ${PV} == 9999 ]] || S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ MULTIBUILD_VARIANTS=( $(usev qt4) $(usev qt5) )
+}
+
+src_configure() {
+ myconfigure() {
+ local mycmakeargs=()
+ if [[ ${MULTIBUILD_VARIANT} = qt4 ]]; then
+ mycmakeargs+=(-DPHONON_BUILD_PHONON4QT5=OFF)
+ fi
+ if [[ ${MULTIBUILD_VARIANT} = qt5 ]]; then
+ mycmakeargs+=(-DPHONON_BUILD_PHONON4QT5=ON)
+ fi
+ cmake-utils_src_configure
+ }
+
+ multibuild_foreach_variant myconfigure
+}
+
+src_compile() {
+ multibuild_foreach_variant cmake-utils_src_compile
+}
+
+src_test() {
+ multibuild_foreach_variant cmake-utils_src_test
+}
+
+src_install() {
+ multibuild_foreach_variant cmake-utils_src_install
+}
diff --git a/media-libs/phonon-gstreamer/phonon-gstreamer-9999.ebuild b/media-libs/phonon-gstreamer/phonon-gstreamer-9999.ebuild
new file mode 100644
index 000000000000..9159564c04c9
--- /dev/null
+++ b/media-libs/phonon-gstreamer/phonon-gstreamer-9999.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+[[ ${PV} == *9999 ]] && git_eclass="git-r3"
+EGIT_REPO_URI=( "git://anongit.kde.org/${PN}" )
+
+MY_PN="phonon-backend-gstreamer"
+MY_P=${MY_PN}-${PV}
+
+inherit cmake-utils multibuild ${git_eclass}
+
+DESCRIPTION="Phonon GStreamer backend"
+HOMEPAGE="https://projects.kde.org/projects/kdesupport/phonon/phonon-gstreamer"
+[[ ${PV} == *9999 ]] || SRC_URI="mirror://kde/stable/phonon/${MY_PN}/${PV}/src/${MY_P}.tar.xz"
+
+LICENSE="LGPL-2.1"
+if [[ ${PV} == *9999 ]]; then
+ KEYWORDS=""
+else
+ KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86 ~amd64-fbsd ~x86-fbsd ~x64-macos"
+fi
+SLOT="0"
+IUSE="alsa debug +network +qt4 qt5"
+REQUIRED_USE="|| ( qt4 qt5 )"
+
+RDEPEND="
+ dev-libs/glib:2
+ dev-libs/libxml2:2
+ media-libs/gstreamer:1.0
+ media-libs/gst-plugins-base:1.0
+ media-plugins/gst-plugins-meta:1.0[alsa?,ogg,vorbis]
+ >=media-libs/phonon-4.7.80[qt4?,qt5?]
+ qt4? (
+ dev-qt/qtcore:4[glib]
+ dev-qt/qtgui:4[glib]
+ dev-qt/qtopengl:4
+ )
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtopengl:5
+ dev-qt/qtwidgets:5
+ )
+ virtual/opengl
+ network? ( media-plugins/gst-plugins-soup:1.0 )
+"
+DEPEND="${RDEPEND}
+ qt4? ( >=dev-util/automoc-0.9.87 )
+ virtual/pkgconfig
+"
+
+[[ ${PV} == 9999 ]] || S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ MULTIBUILD_VARIANTS=( $(usev qt4) $(usev qt5) )
+}
+
+src_configure() {
+ myconfigure() {
+ local mycmakeargs=()
+ if [[ ${MULTIBUILD_VARIANT} = qt4 ]]; then
+ mycmakeargs+=(-DPHONON_BUILD_PHONON4QT5=OFF)
+ fi
+ if [[ ${MULTIBUILD_VARIANT} = qt5 ]]; then
+ mycmakeargs+=(-DPHONON_BUILD_PHONON4QT5=ON)
+ fi
+ cmake-utils_src_configure
+ }
+
+ multibuild_foreach_variant myconfigure
+}
+
+src_compile() {
+ multibuild_foreach_variant cmake-utils_src_compile
+}
+
+src_test() {
+ multibuild_foreach_variant cmake-utils_src_test
+}
+
+src_install() {
+ multibuild_foreach_variant cmake-utils_src_install
+}
diff --git a/media-libs/phonon-qt7/Manifest b/media-libs/phonon-qt7/Manifest
new file mode 100644
index 000000000000..fb40ab2cbee9
--- /dev/null
+++ b/media-libs/phonon-qt7/Manifest
@@ -0,0 +1 @@
+DIST phonon-qt7-0_pre20110424.tar.bz2 54610 SHA256 c8a96c3053a534ec8e33e105a861a846b8f970f1583ec4054ff046d6785d5cbd SHA512 9e694c2effdf2b044118e4afb101e098d479bfc4c97f8f8069dcadbaa44f4dc6371ad15c1487bb1786e1096cbc93b660c0edde87e61f6a9483fce5a7587df2b9 WHIRLPOOL e193e83bcc62d06cd50fa55e5c99d0827c49cfc77a1879e06579809669d264a856f9f89269c7099f50953c887cea22456076c4b8bd61c8588c95d98a841c3f4b
diff --git a/media-libs/phonon-qt7/files/phonon-qt7-0_pre20110424-QWidget-cast-dynamic.patch b/media-libs/phonon-qt7/files/phonon-qt7-0_pre20110424-QWidget-cast-dynamic.patch
new file mode 100644
index 000000000000..ae222027b892
--- /dev/null
+++ b/media-libs/phonon-qt7/files/phonon-qt7-0_pre20110424-QWidget-cast-dynamic.patch
@@ -0,0 +1,28 @@
+Revert commit:
+
+commit b22b86f6940d2605e78398eca4ae05c3ea44a92c
+Author: Ritt Konstantin <ritt.ks@gmail.com>
+Date: Thu Jun 10 07:38:14 2010 +0400
+
+ fix build with -fno-rtti
+
+ m_renderDrawWidget object inherits QWidget and can be safely static_cast-ed
+
+as it yields in:
+
+error: invalid static_cast from type ‘Phonon::QT7::IVideoRenderDrawWidget*’ to type ‘QWidget*’
+
+
+diff --git a/qt7/videowidget.mm b/qt7/videowidget.mm
+index 736dcdf..e471140 100644
+--- a/qt7/videowidget.mm
++++ b/qt7/videowidget.mm
+@@ -578,7 +578,7 @@ public:
+ PhononAutoReleasePool pool;
+ updateDrawFrameRect();
+ if (m_renderDrawWidget)
+- static_cast<QWidget *>(m_renderDrawWidget)->resize(size());
++ dynamic_cast<QWidget *>(m_renderDrawWidget)->resize(size());
+ break; }
+ case QEvent::Paint:{
+ PhononAutoReleasePool pool;
diff --git a/media-libs/phonon-qt7/files/phonon-qt7-0_pre20110424-darwin11.patch b/media-libs/phonon-qt7/files/phonon-qt7-0_pre20110424-darwin11.patch
new file mode 100644
index 000000000000..6d1a5626a207
--- /dev/null
+++ b/media-libs/phonon-qt7/files/phonon-qt7-0_pre20110424-darwin11.patch
@@ -0,0 +1,29 @@
+disable AUGraphAddNode, it needs an AudioComponent iso Component
+need a definition for gnuOrtho2D
+
+--- phonon-qt7/qt7/audionode.mm
++++ phonon-qt7/qt7/audionode.mm
+@@ -69,9 +69,9 @@
+
+ OSStatus err = noErr;
+ #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+- if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_5)
+- err = AUGraphAddNode(m_audioGraph->audioGraphRef(), &description, &m_auNode);
+- else
++// if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_5)
++// err = AUGraphAddNode(m_audioGraph->audioGraphRef(), &description, &m_auNode);
++// else
+ #endif
+ err = AUGraphNewNode(m_audioGraph->audioGraphRef(), &description, 0, 0, &m_auNode);
+
+--- phonon-qt7/qt7/videowidget.mm
++++ phonon-qt7/qt7/videowidget.mm
+@@ -35,6 +35,8 @@
+ #import <AppKit/NSImage.h>
+ #import <QTKit/QTMovieView.h>
+
++#import <OpenGL/glu.h>
++
+ /////////////////////////////////////////////////////////////////////////////////////////
+
+ #ifdef QT_MAC_USE_COCOA // Rendering to a QTMovieView can only be done in Cocoa
diff --git a/media-libs/phonon-qt7/files/phonon-qt7-noshow.patch b/media-libs/phonon-qt7/files/phonon-qt7-noshow.patch
new file mode 100644
index 000000000000..e05c2c4d9957
--- /dev/null
+++ b/media-libs/phonon-qt7/files/phonon-qt7-noshow.patch
@@ -0,0 +1,17 @@
+diff -ruN phonon-qt7.orig/CMakeLists.txt phonon-qt7/CMakeLists.txt
+--- phonon-qt7.orig/CMakeLists.txt 2011-04-24 20:22:59.000000000 +0200
++++ phonon-qt7/CMakeLists.txt 2011-04-24 20:42:15.000000000 +0200
+@@ -2,6 +2,8 @@
+
+ cmake_minimum_required(VERSION 2.6.2 FATAL_ERROR)
+
++set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
++
+ find_package(Phonon REQUIRED)
+ find_package(OpenGL REQUIRED)
+
+@@ -17,4 +19,3 @@
+ add_subdirectory(qt7)
+ endif (Q_WS_MAC)
+
+-macro_display_feature_log()
diff --git a/media-libs/phonon-qt7/metadata.xml b/media-libs/phonon-qt7/metadata.xml
new file mode 100644
index 000000000000..b968c7e47ff2
--- /dev/null
+++ b/media-libs/phonon-qt7/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>kde</herd>
+<herd>prefix</herd>
+</pkgmetadata>
diff --git a/media-libs/phonon-qt7/phonon-qt7-0_pre20110424.ebuild b/media-libs/phonon-qt7/phonon-qt7-0_pre20110424.ebuild
new file mode 100644
index 000000000000..0f4bf0226f38
--- /dev/null
+++ b/media-libs/phonon-qt7/phonon-qt7-0_pre20110424.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 cmake-utils base
+
+DESCRIPTION="Phonon QuickTime7 backend"
+HOMEPAGE="https://projects.kde.org/projects/kdesupport/phonon/phonon-quicktime"
+SRC_URI="http://dev.gentoo.org/~dilfridge/distfiles/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+KEYWORDS="~ppc-macos ~x64-macos"
+SLOT="0"
+IUSE="debug"
+
+RDEPEND=">=media-libs/phonon-4.5"
+DEPEND="${RDEPEND}
+ >=dev-util/automoc-0.9.87
+ media-libs/opengl-apple
+ sys-devel/gcc-apple[objc]
+ virtual/pkgconfig
+"
+
+# needs OpenGL, how do I specify this properly?
+# I just depended on opengl-apple, hope this is what you meant -- grobian
+
+S="${WORKDIR}/${PN}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-noshow.patch"
+ "${FILESDIR}"/${P}-QWidget-cast-dynamic.patch
+ "${FILESDIR}"/${P}-darwin11.patch
+)
+
+src_prepare() {
+ base_src_prepare # for PATCHES
+ sed -i -e "/^include_directories/s:): ${EPREFIX}/usr/include):" \
+ CMakeLists.txt || die
+}
diff --git a/media-libs/phonon-vlc/Manifest b/media-libs/phonon-vlc/Manifest
new file mode 100644
index 000000000000..56770f857fb8
--- /dev/null
+++ b/media-libs/phonon-vlc/Manifest
@@ -0,0 +1,2 @@
+DIST phonon-backend-vlc-0.7.2.tar.xz 58988 SHA256 0a788360df2e3439efefacae70b73252c1e1d4a7ad08f4d93301d77a915d95a9 SHA512 9a2b45d02ed958f82ff4fb8d3e9233eeb35047670061b59266fa7504855a149de1a401cad34871083e42c8d05620ff0e3df9f1a7a3e1f9b82ddac886c50adfce WHIRLPOOL e8130f8280fb31ccc8ec686eba8af744300100686c179e3abfd124f8892d55038a2a77887cbc3673e36c03b31829a1ec4ae686bee0a1f48048d9631b228aeb73
+DIST phonon-backend-vlc-0.8.2.tar.xz 59832 SHA256 dab7f8edf53ee90998e5e3fcf2f6bd0a13750511b0ecde6939be0664d46bdaa3 SHA512 35f0255899e89d4b9e42a440885455367a56559090b490f1397984520c2e63c2044c8b74290d8b438fcfa388a8b06f1647e60cb6d72d4dd907fc3df9ea4c63e3 WHIRLPOOL 31804069c38cc377fbb8acf10690a6699550c1812e7d0ee64c2a03fd7efa73b7b9c24f63b56b7e6fe96f5f261e0adab897e7f4e26e6ea00163c5dd47e9d4c376
diff --git a/media-libs/phonon-vlc/metadata.xml b/media-libs/phonon-vlc/metadata.xml
new file mode 100644
index 000000000000..a23f444b67d6
--- /dev/null
+++ b/media-libs/phonon-vlc/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-libs/phonon-vlc/phonon-vlc-0.7.2.ebuild b/media-libs/phonon-vlc/phonon-vlc-0.7.2.ebuild
new file mode 100644
index 000000000000..325f47b6c549
--- /dev/null
+++ b/media-libs/phonon-vlc/phonon-vlc-0.7.2.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_PN="phonon-backend-vlc"
+MY_P="${MY_PN}-${PV}"
+EGIT_REPO_URI=( "git://anongit.kde.org/${PN}" )
+[[ ${PV} == 9999 ]] && git_eclass=git-r3
+inherit cmake-utils multibuild ${git_eclass}
+unset git_eclass
+
+DESCRIPTION="Phonon VLC backend"
+HOMEPAGE="https://projects.kde.org/projects/kdesupport/phonon/phonon-vlc"
+[[ ${PV} == 9999 ]] || SRC_URI="mirror://kde/stable/phonon/${MY_PN}/${PV}/src/${MY_P}.tar.xz"
+
+LICENSE="LGPL-2.1"
+
+# Don't move KEYWORDS on the previous line or ekeyword won't work # 399061
+[[ ${PV} == 9999 ]] || \
+KEYWORDS="amd64 ~arm ppc ppc64 x86 ~amd64-fbsd"
+
+SLOT="0"
+IUSE="debug +qt4 qt5"
+REQUIRED_USE="|| ( qt4 qt5 )"
+
+RDEPEND="
+ >=media-libs/phonon-4.7.0[qt4=,qt5=]
+ >=media-video/vlc-2.0.1:=[dbus,ogg,vorbis]
+ qt4? (
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ )
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtwidgets:5
+ )
+"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig
+ qt4? ( >=dev-util/automoc-0.9.87 )
+"
+
+[[ ${PV} == 9999 ]] || S=${WORKDIR}/${MY_P}
+
+DOCS=( AUTHORS )
+
+pkg_setup() {
+ MULTIBUILD_VARIANTS=()
+ if use qt4; then
+ MULTIBUILD_VARIANTS+=(qt4)
+ fi
+ if use qt5; then
+ MULTIBUILD_VARIANTS+=(qt5)
+ fi
+}
+
+src_configure() {
+ myconfigure() {
+ local mycmakeargs=()
+ if [[ ${MULTIBUILD_VARIANT} = qt4 ]]; then
+ mycmakeargs+=(-DPHONON_BUILD_PHONON4QT5=OFF)
+ fi
+ if [[ ${MULTIBUILD_VARIANT} = qt5 ]]; then
+ mycmakeargs+=(-DPHONON_BUILD_PHONON4QT5=ON)
+ fi
+ cmake-utils_src_configure
+ }
+
+ multibuild_foreach_variant myconfigure
+}
+
+src_compile() {
+ multibuild_foreach_variant cmake-utils_src_compile
+}
+
+src_install() {
+ multibuild_foreach_variant cmake-utils_src_install
+}
+
+src_test() {
+ multibuild_foreach_variant cmake-utils_src_test
+}
+
+pkg_postinst() {
+ elog "For more verbose debug information, export the following variables:"
+ elog "PHONON_DEBUG=1"
+ elog ""
+ elog "To make KDE detect the new backend without reboot, run:"
+ elog "kbuildsycoca4 --noincremental"
+}
diff --git a/media-libs/phonon-vlc/phonon-vlc-0.8.2.ebuild b/media-libs/phonon-vlc/phonon-vlc-0.8.2.ebuild
new file mode 100644
index 000000000000..58dae0ec61a3
--- /dev/null
+++ b/media-libs/phonon-vlc/phonon-vlc-0.8.2.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_PN="phonon-backend-vlc"
+MY_P="${MY_PN}-${PV}"
+EGIT_REPO_URI=( "git://anongit.kde.org/${PN}" )
+[[ ${PV} == 9999 ]] && git_eclass=git-r3
+inherit cmake-utils multibuild ${git_eclass}
+unset git_eclass
+
+DESCRIPTION="Phonon VLC backend"
+HOMEPAGE="https://projects.kde.org/projects/kdesupport/phonon/phonon-vlc"
+[[ ${PV} == 9999 ]] || SRC_URI="mirror://kde/stable/phonon/${MY_PN}/${PV}/src/${MY_P}.tar.xz"
+
+LICENSE="LGPL-2.1"
+
+# Don't move KEYWORDS on the previous line or ekeyword won't work # 399061
+[[ ${PV} == 9999 ]] || \
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-fbsd"
+
+SLOT="0"
+IUSE="debug +qt4 qt5"
+REQUIRED_USE="|| ( qt4 qt5 )"
+
+RDEPEND="
+ >=media-libs/phonon-4.8.0[qt4=,qt5=]
+ >=media-video/vlc-2.0.1:=[dbus,ogg,vorbis]
+ qt4? (
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ )
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtwidgets:5
+ )
+"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig
+ qt4? ( >=dev-util/automoc-0.9.87 )
+"
+
+[[ ${PV} == 9999 ]] || S=${WORKDIR}/${MY_P}
+
+DOCS=( AUTHORS )
+
+pkg_setup() {
+ MULTIBUILD_VARIANTS=( $(usev qt4) $(usev qt5) )
+}
+
+src_configure() {
+ myconfigure() {
+ local mycmakeargs=()
+ if [[ ${MULTIBUILD_VARIANT} = qt4 ]]; then
+ mycmakeargs+=(-DPHONON_BUILD_PHONON4QT5=OFF)
+ fi
+ if [[ ${MULTIBUILD_VARIANT} = qt5 ]]; then
+ mycmakeargs+=(-DPHONON_BUILD_PHONON4QT5=ON)
+ fi
+ cmake-utils_src_configure
+ }
+
+ multibuild_foreach_variant myconfigure
+}
+
+src_compile() {
+ multibuild_foreach_variant cmake-utils_src_compile
+}
+
+src_test() {
+ multibuild_foreach_variant cmake-utils_src_test
+}
+
+src_install() {
+ multibuild_foreach_variant cmake-utils_src_install
+}
+
+pkg_postinst() {
+ elog "For more verbose debug information, export the following variables:"
+ elog "PHONON_DEBUG=1"
+ elog ""
+ elog "To make KDE detect the new backend without reboot, run:"
+ elog "kbuildsycoca4 --noincremental"
+}
diff --git a/media-libs/phonon-vlc/phonon-vlc-9999.ebuild b/media-libs/phonon-vlc/phonon-vlc-9999.ebuild
new file mode 100644
index 000000000000..aec48c89ef30
--- /dev/null
+++ b/media-libs/phonon-vlc/phonon-vlc-9999.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_PN="phonon-backend-vlc"
+MY_P="${MY_PN}-${PV}"
+EGIT_REPO_URI=( "git://anongit.kde.org/${PN}" )
+[[ ${PV} == 9999 ]] && git_eclass=git-r3
+inherit cmake-utils multibuild ${git_eclass}
+unset git_eclass
+
+DESCRIPTION="Phonon VLC backend"
+HOMEPAGE="https://projects.kde.org/projects/kdesupport/phonon/phonon-vlc"
+[[ ${PV} == 9999 ]] || SRC_URI="mirror://kde/stable/phonon/${MY_PN}/${PV}/${MY_P}.tar.xz"
+
+LICENSE="LGPL-2.1"
+
+# Don't move KEYWORDS on the previous line or ekeyword won't work # 399061
+[[ ${PV} == 9999 ]] || \
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-fbsd"
+
+SLOT="0"
+IUSE="debug +qt4 qt5"
+REQUIRED_USE="|| ( qt4 qt5 )"
+
+RDEPEND="
+ >=media-libs/phonon-4.8.0[qt4=,qt5=]
+ >=media-video/vlc-2.0.1:=[dbus,ogg,vorbis]
+ qt4? (
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ )
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtwidgets:5
+ )
+"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig
+ qt4? ( >=dev-util/automoc-0.9.87 )
+"
+
+[[ ${PV} == 9999 ]] || S=${WORKDIR}/${MY_P}
+
+DOCS=( AUTHORS )
+
+pkg_setup() {
+ MULTIBUILD_VARIANTS=( $(usev qt4) $(usev qt5) )
+}
+
+src_configure() {
+ myconfigure() {
+ local mycmakeargs=()
+ if [[ ${MULTIBUILD_VARIANT} = qt4 ]]; then
+ mycmakeargs+=(-DPHONON_BUILD_PHONON4QT5=OFF)
+ fi
+ if [[ ${MULTIBUILD_VARIANT} = qt5 ]]; then
+ mycmakeargs+=(-DPHONON_BUILD_PHONON4QT5=ON)
+ fi
+ cmake-utils_src_configure
+ }
+
+ multibuild_foreach_variant myconfigure
+}
+
+src_compile() {
+ multibuild_foreach_variant cmake-utils_src_compile
+}
+
+src_test() {
+ multibuild_foreach_variant cmake-utils_src_test
+}
+
+src_install() {
+ multibuild_foreach_variant cmake-utils_src_install
+}
+
+pkg_postinst() {
+ elog "For more verbose debug information, export the following variables:"
+ elog "PHONON_DEBUG=1"
+ elog ""
+ elog "To make KDE detect the new backend without reboot, run:"
+ elog "kbuildsycoca4 --noincremental"
+}
diff --git a/media-libs/phonon/Manifest b/media-libs/phonon/Manifest
new file mode 100644
index 000000000000..eba6ab7aeb87
--- /dev/null
+++ b/media-libs/phonon/Manifest
@@ -0,0 +1,2 @@
+DIST phonon-4.7.2.tar.xz 330244 SHA256 819e9734d20e254b4599d8ab45f15a68d95444c4e2088c7eb5769b58976a11be SHA512 b576b8f69ea2db58303dab3b6e64df4e3238a86610b4f549634a067ba680bd66a6df53285303a8e46df458e6da0b8e9c9112c917b054304397abb556de3a6bb5 WHIRLPOOL 2cc9a6a58d3449cc595a36c3742c03060c73a1efb10eceebf5554e504858f8d73c92c679babdc1d145d326c6024958868ee0e15fdd5eaafffcdbba98aba6f188
+DIST phonon-4.8.3.tar.xz 322012 SHA256 a1149c961ca1570968d070bbd23671e614aa506f847ca93748960e309f85da16 SHA512 368014e808fe9ac84cdb4caf99dec93470907ca959e9a900fd6a8d86b3a44603b91be06b64b0f484d199663647bf82e84f643900edcf6a0c90ea55c53f767701 WHIRLPOOL 12de8d3de919575f23b9acd8bddb8e594f755062e560617371f8614cb51fba7fb08c62549c28670cbde60b5f962a1953e5ae1bb9b64b166aa58c9b820c241868
diff --git a/media-libs/phonon/files/phonon-4.7.0-plugin-install.patch b/media-libs/phonon/files/phonon-4.7.0-plugin-install.patch
new file mode 100644
index 000000000000..5f478cac18c1
--- /dev/null
+++ b/media-libs/phonon/files/phonon-4.7.0-plugin-install.patch
@@ -0,0 +1,13 @@
+diff --git a/cmake/FindPhononInternal.cmake b/cmake/FindPhononInternal.cmake
+index 3245e9b..3427c62 100644
+--- a/cmake/FindPhononInternal.cmake
++++ b/cmake/FindPhononInternal.cmake
+@@ -178,7 +178,7 @@ if (PHONON_BUILD_PHONON4QT5)
+ endif (PHONON_BUILD_PHONON4QT5)
+ set(BIN_INSTALL_DIR "bin" ) # CACHE PATH "The install dir for executables (default ${EXEC_INSTALL_PREFIX}/bin)")
+ set(LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}" ) # CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed"
+-set(PLUGIN_INSTALL_DIR "${LIB_INSTALL_DIR}/kde4" CACHE PATH "The subdirectory relative to the install prefix where plugins will be installed (default is ${LIB_INSTALL_DIR}/kde4)")
++set(PLUGIN_INSTALL_DIR "${LIB_INSTALL_DIR}/qt4" CACHE PATH "The subdirectory relative to the install prefix where plugins will be installed (default is ${LIB_INSTALL_DIR}/qt4)")
+ if (PHONON_BUILD_PHONON4QT5)
+ set(PLUGIN_INSTALL_DIR "${LIB_INSTALL_DIR}/qt5" CACHE PATH "The subdirectory relative to the install prefix where plugins will be installed (default is ${LIB_INSTALL_DIR}/qt5)" FORCE)
+ endif(PHONON_BUILD_PHONON4QT5)
diff --git a/media-libs/phonon/metadata.xml b/media-libs/phonon/metadata.xml
new file mode 100644
index 000000000000..d261a0ea40fb
--- /dev/null
+++ b/media-libs/phonon/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>kde</herd>
+ <use>
+ <flag name="designer">Install plugin for <pkg>dev-qt/designer</pkg></flag>
+ <flag name="vlc">Install VLC Phonon backend</flag>
+ <flag name="zeitgeist">Add support for Zeitgeist event tracking system</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/phonon/phonon-4.7.2.ebuild b/media-libs/phonon/phonon-4.7.2.ebuild
new file mode 100644
index 000000000000..641c7e8abc48
--- /dev/null
+++ b/media-libs/phonon/phonon-4.7.2.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+if [[ ${PV} != *9999* ]]; then
+ SRC_URI="mirror://kde/stable/phonon/${PV}/${P}.tar.xz"
+ KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+else
+ SCM_ECLASS="git-r3"
+ EGIT_REPO_URI=( "git://anongit.kde.org/${PN}" )
+ KEYWORDS=""
+fi
+
+inherit cmake-utils multibuild ${SCM_ECLASS}
+
+DESCRIPTION="KDE multimedia API"
+HOMEPAGE="https://projects.kde.org/projects/kdesupport/phonon"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="aqua debug designer gstreamer pulseaudio +qt4 qt5 +vlc zeitgeist"
+
+REQUIRED_USE="
+ || ( qt4 qt5 )
+ zeitgeist? ( qt4 )
+"
+
+RDEPEND="
+ !!dev-qt/qtphonon:4
+ qt4? (
+ dev-qt/qtcore:4
+ dev-qt/qtdbus:4
+ dev-qt/qtgui:4
+ designer? ( dev-qt/designer:4 )
+ )
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtdbus:5
+ dev-qt/qtgui:5
+ dev-qt/qtwidgets:5
+ designer? ( dev-qt/designer:5 )
+ )
+ pulseaudio? (
+ dev-libs/glib:2
+ >=media-sound/pulseaudio-0.9.21[glib]
+ )
+ zeitgeist? ( dev-libs/libqzeitgeist )
+"
+DEPEND="${RDEPEND}
+ qt4? ( >=dev-util/automoc-0.9.87 )
+ virtual/pkgconfig
+"
+PDEPEND="
+ aqua? ( media-libs/phonon-qt7 )
+ gstreamer? ( >=media-libs/phonon-gstreamer-4.7.0[qt4?,qt5?] )
+ vlc? ( >=media-libs/phonon-vlc-0.7.0[qt4?,qt5?] )
+"
+
+PATCHES=( "${FILESDIR}/${PN}-4.7.0-plugin-install.patch" )
+
+pkg_setup() {
+ MULTIBUILD_VARIANTS=()
+ if use qt4; then
+ MULTIBUILD_VARIANTS+=(qt4)
+ fi
+ if use qt5; then
+ MULTIBUILD_VARIANTS+=(qt5)
+ fi
+}
+
+src_configure() {
+ myconfigure() {
+ local mycmakeargs=(
+ -DPHONON_INSTALL_QT_EXTENSIONS_INTO_SYSTEM_QT=TRUE
+ $(cmake-utils_use designer PHONON_BUILD_DESIGNER_PLUGIN)
+ $(cmake-utils_use_with pulseaudio GLIB2)
+ $(cmake-utils_use_with pulseaudio PulseAudio)
+ $(cmake-utils_use_with zeitgeist QZeitgeist)
+ )
+ if [[ ${MULTIBUILD_VARIANT} = qt4 ]]; then
+ mycmakeargs+=(-DPHONON_BUILD_PHONON4QT5=OFF)
+ fi
+ if [[ ${MULTIBUILD_VARIANT} = qt5 ]]; then
+ mycmakeargs+=(-DPHONON_BUILD_PHONON4QT5=ON)
+ fi
+ cmake-utils_src_configure
+ }
+
+ multibuild_foreach_variant myconfigure
+}
+
+src_compile() {
+ multibuild_foreach_variant cmake-utils_src_compile
+}
+
+src_install() {
+ multibuild_foreach_variant cmake-utils_src_install
+}
+
+src_test() {
+ multibuild_foreach_variant cmake-utils_src_test
+}
diff --git a/media-libs/phonon/phonon-4.8.3-r1.ebuild b/media-libs/phonon/phonon-4.8.3-r1.ebuild
new file mode 100644
index 000000000000..d308940bee1d
--- /dev/null
+++ b/media-libs/phonon/phonon-4.8.3-r1.ebuild
@@ -0,0 +1,129 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+if [[ ${PV} != *9999* ]]; then
+ SRC_URI="mirror://kde/stable/phonon/${PV}/src/${P}.tar.xz"
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+else
+ SCM_ECLASS="git-r3"
+ EGIT_REPO_URI=( "git://anongit.kde.org/${PN}" )
+ KEYWORDS=""
+fi
+
+inherit multibuild qmake-utils cmake-multilib ${SCM_ECLASS}
+
+DESCRIPTION="KDE multimedia API"
+HOMEPAGE="https://projects.kde.org/projects/kdesupport/phonon"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="aqua debug designer gstreamer pulseaudio +qt4 qt5 +vlc zeitgeist"
+
+REQUIRED_USE="
+ || ( qt4 qt5 )
+ zeitgeist? ( qt4 )
+"
+
+RDEPEND="
+ !!dev-qt/qtphonon:4
+ qt4? (
+ dev-qt/qtcore:4[${MULTILIB_USEDEP}]
+ dev-qt/qtdbus:4[${MULTILIB_USEDEP}]
+ dev-qt/qtgui:4[${MULTILIB_USEDEP}]
+ designer? ( dev-qt/designer:4[${MULTILIB_USEDEP}] )
+ )
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtdbus:5
+ dev-qt/qtgui:5
+ dev-qt/qtwidgets:5
+ designer? ( dev-qt/designer:5 )
+ )
+ pulseaudio? (
+ dev-libs/glib:2[${MULTILIB_USEDEP}]
+ >=media-sound/pulseaudio-0.9.21[glib,${MULTILIB_USEDEP}]
+ )
+ zeitgeist? ( dev-libs/libqzeitgeist )
+"
+DEPEND="${RDEPEND}
+ qt4? ( >=dev-util/automoc-0.9.87 )
+ virtual/pkgconfig[${MULTILIB_USEDEP}]
+"
+PDEPEND="
+ aqua? ( media-libs/phonon-qt7 )
+ gstreamer? ( >=media-libs/phonon-gstreamer-4.8.0[qt4?,qt5?] )
+ vlc? ( >=media-libs/phonon-vlc-0.8.0[qt4?,qt5?] )
+"
+
+PATCHES=( "${FILESDIR}/${PN}-4.7.0-plugin-install.patch" )
+
+pkg_setup() {
+ MULTIBUILD_VARIANTS=( $(usev qt4) $(usev qt5) )
+}
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ -DPHONON_INSTALL_QT_EXTENSIONS_INTO_SYSTEM_QT=TRUE
+ $(cmake-utils_use designer PHONON_BUILD_DESIGNER_PLUGIN)
+ $(cmake-utils_use_with pulseaudio GLIB2)
+ $(cmake-utils_use_with pulseaudio PulseAudio)
+ $(multilib_is_native_abi && cmake-utils_use_with zeitgeist QZeitgeist)
+ -DQT_QMAKE_EXECUTABLE="$(${QT_MULTIBUILD_VARIANT}_get_bindir)"/qmake
+ )
+ if [[ ${QT_MULTIBUILD_VARIANT} = qt4 ]]; then
+ mycmakeargs+=(-DPHONON_BUILD_PHONON4QT5=OFF)
+ fi
+ if [[ ${QT_MULTIBUILD_VARIANT} = qt5 ]]; then
+ mycmakeargs+=(-DPHONON_BUILD_PHONON4QT5=ON)
+ fi
+ cmake-utils_src_configure
+}
+
+src_configure() {
+ myconfigure() {
+ local QT_MULTIBUILD_VARIANT=${MULTIBUILD_VARIANT}
+ if [[ ${QT_MULTIBUILD_VARIANT} = qt4 ]]; then
+ cmake-multilib_src_configure
+ elif [[ ${QT_MULTIBUILD_VARIANT} = qt5 ]]; then
+ multilib_src_configure
+ fi
+ }
+
+ multibuild_foreach_variant myconfigure
+}
+
+src_compile() {
+ mycompile() {
+ if [[ ${MULTIBUILD_VARIANT} = qt4 ]]; then
+ cmake-multilib_src_compile
+ elif [[ ${MULTIBUILD_VARIANT} = qt5 ]]; then
+ cmake-utils_src_compile
+ fi
+ }
+ multibuild_foreach_variant mycompile
+}
+
+src_test() {
+ mytest() {
+ if [[ ${MULTIBUILD_VARIANT} = qt4 ]]; then
+ cmake-multilib_src_test
+ elif [[ ${MULTIBUILD_VARIANT} = qt5 ]]; then
+ cmake-utils_src_test
+ fi
+ }
+ multibuild_foreach_variant mytest
+}
+
+src_install() {
+ myinstall() {
+ if [[ ${MULTIBUILD_VARIANT} = qt4 ]]; then
+ cmake-multilib_src_install
+ elif [[ ${MULTIBUILD_VARIANT} = qt5 ]]; then
+ cmake-utils_src_install
+ fi
+ }
+ multibuild_foreach_variant myinstall
+}
diff --git a/media-libs/phonon/phonon-4.8.3.ebuild b/media-libs/phonon/phonon-4.8.3.ebuild
new file mode 100644
index 000000000000..27cb3fcbe6fa
--- /dev/null
+++ b/media-libs/phonon/phonon-4.8.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
+
+if [[ ${PV} != *9999* ]]; then
+ SRC_URI="mirror://kde/stable/phonon/${PV}/src/${P}.tar.xz"
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+else
+ SCM_ECLASS="git-r3"
+ EGIT_REPO_URI=( "git://anongit.kde.org/${PN}" )
+ KEYWORDS=""
+fi
+
+inherit cmake-utils multibuild ${SCM_ECLASS}
+
+DESCRIPTION="KDE multimedia API"
+HOMEPAGE="https://projects.kde.org/projects/kdesupport/phonon"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="aqua debug designer gstreamer pulseaudio +qt4 qt5 +vlc zeitgeist"
+
+REQUIRED_USE="
+ || ( qt4 qt5 )
+ zeitgeist? ( qt4 )
+"
+
+RDEPEND="
+ !!dev-qt/qtphonon:4
+ qt4? (
+ dev-qt/qtcore:4
+ dev-qt/qtdbus:4
+ dev-qt/qtgui:4
+ designer? ( dev-qt/designer:4 )
+ )
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtdbus:5
+ dev-qt/qtgui:5
+ dev-qt/qtwidgets:5
+ designer? ( dev-qt/designer:5 )
+ )
+ pulseaudio? (
+ dev-libs/glib:2
+ >=media-sound/pulseaudio-0.9.21[glib]
+ )
+ zeitgeist? ( dev-libs/libqzeitgeist )
+"
+DEPEND="${RDEPEND}
+ qt4? ( >=dev-util/automoc-0.9.87 )
+ virtual/pkgconfig
+"
+PDEPEND="
+ aqua? ( media-libs/phonon-qt7 )
+ gstreamer? ( >=media-libs/phonon-gstreamer-4.8.0[qt4?,qt5?] )
+ vlc? ( >=media-libs/phonon-vlc-0.8.0[qt4?,qt5?] )
+"
+
+PATCHES=( "${FILESDIR}/${PN}-4.7.0-plugin-install.patch" )
+
+pkg_setup() {
+ MULTIBUILD_VARIANTS=( $(usev qt4) $(usev qt5) )
+}
+
+src_configure() {
+ myconfigure() {
+ local mycmakeargs=(
+ -DPHONON_INSTALL_QT_EXTENSIONS_INTO_SYSTEM_QT=TRUE
+ $(cmake-utils_use designer PHONON_BUILD_DESIGNER_PLUGIN)
+ $(cmake-utils_use_with pulseaudio GLIB2)
+ $(cmake-utils_use_with pulseaudio PulseAudio)
+ $(cmake-utils_use_with zeitgeist QZeitgeist)
+ )
+ if [[ ${MULTIBUILD_VARIANT} = qt4 ]]; then
+ mycmakeargs+=(-DPHONON_BUILD_PHONON4QT5=OFF)
+ fi
+ if [[ ${MULTIBUILD_VARIANT} = qt5 ]]; then
+ mycmakeargs+=(-DPHONON_BUILD_PHONON4QT5=ON)
+ fi
+ cmake-utils_src_configure
+ }
+
+ multibuild_foreach_variant myconfigure
+}
+
+src_compile() {
+ multibuild_foreach_variant cmake-utils_src_compile
+}
+
+src_test() {
+ multibuild_foreach_variant cmake-utils_src_test
+}
+
+src_install() {
+ multibuild_foreach_variant cmake-utils_src_install
+}
diff --git a/media-libs/phonon/phonon-9999.ebuild b/media-libs/phonon/phonon-9999.ebuild
new file mode 100644
index 000000000000..d308940bee1d
--- /dev/null
+++ b/media-libs/phonon/phonon-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
+
+if [[ ${PV} != *9999* ]]; then
+ SRC_URI="mirror://kde/stable/phonon/${PV}/src/${P}.tar.xz"
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+else
+ SCM_ECLASS="git-r3"
+ EGIT_REPO_URI=( "git://anongit.kde.org/${PN}" )
+ KEYWORDS=""
+fi
+
+inherit multibuild qmake-utils cmake-multilib ${SCM_ECLASS}
+
+DESCRIPTION="KDE multimedia API"
+HOMEPAGE="https://projects.kde.org/projects/kdesupport/phonon"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="aqua debug designer gstreamer pulseaudio +qt4 qt5 +vlc zeitgeist"
+
+REQUIRED_USE="
+ || ( qt4 qt5 )
+ zeitgeist? ( qt4 )
+"
+
+RDEPEND="
+ !!dev-qt/qtphonon:4
+ qt4? (
+ dev-qt/qtcore:4[${MULTILIB_USEDEP}]
+ dev-qt/qtdbus:4[${MULTILIB_USEDEP}]
+ dev-qt/qtgui:4[${MULTILIB_USEDEP}]
+ designer? ( dev-qt/designer:4[${MULTILIB_USEDEP}] )
+ )
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtdbus:5
+ dev-qt/qtgui:5
+ dev-qt/qtwidgets:5
+ designer? ( dev-qt/designer:5 )
+ )
+ pulseaudio? (
+ dev-libs/glib:2[${MULTILIB_USEDEP}]
+ >=media-sound/pulseaudio-0.9.21[glib,${MULTILIB_USEDEP}]
+ )
+ zeitgeist? ( dev-libs/libqzeitgeist )
+"
+DEPEND="${RDEPEND}
+ qt4? ( >=dev-util/automoc-0.9.87 )
+ virtual/pkgconfig[${MULTILIB_USEDEP}]
+"
+PDEPEND="
+ aqua? ( media-libs/phonon-qt7 )
+ gstreamer? ( >=media-libs/phonon-gstreamer-4.8.0[qt4?,qt5?] )
+ vlc? ( >=media-libs/phonon-vlc-0.8.0[qt4?,qt5?] )
+"
+
+PATCHES=( "${FILESDIR}/${PN}-4.7.0-plugin-install.patch" )
+
+pkg_setup() {
+ MULTIBUILD_VARIANTS=( $(usev qt4) $(usev qt5) )
+}
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ -DPHONON_INSTALL_QT_EXTENSIONS_INTO_SYSTEM_QT=TRUE
+ $(cmake-utils_use designer PHONON_BUILD_DESIGNER_PLUGIN)
+ $(cmake-utils_use_with pulseaudio GLIB2)
+ $(cmake-utils_use_with pulseaudio PulseAudio)
+ $(multilib_is_native_abi && cmake-utils_use_with zeitgeist QZeitgeist)
+ -DQT_QMAKE_EXECUTABLE="$(${QT_MULTIBUILD_VARIANT}_get_bindir)"/qmake
+ )
+ if [[ ${QT_MULTIBUILD_VARIANT} = qt4 ]]; then
+ mycmakeargs+=(-DPHONON_BUILD_PHONON4QT5=OFF)
+ fi
+ if [[ ${QT_MULTIBUILD_VARIANT} = qt5 ]]; then
+ mycmakeargs+=(-DPHONON_BUILD_PHONON4QT5=ON)
+ fi
+ cmake-utils_src_configure
+}
+
+src_configure() {
+ myconfigure() {
+ local QT_MULTIBUILD_VARIANT=${MULTIBUILD_VARIANT}
+ if [[ ${QT_MULTIBUILD_VARIANT} = qt4 ]]; then
+ cmake-multilib_src_configure
+ elif [[ ${QT_MULTIBUILD_VARIANT} = qt5 ]]; then
+ multilib_src_configure
+ fi
+ }
+
+ multibuild_foreach_variant myconfigure
+}
+
+src_compile() {
+ mycompile() {
+ if [[ ${MULTIBUILD_VARIANT} = qt4 ]]; then
+ cmake-multilib_src_compile
+ elif [[ ${MULTIBUILD_VARIANT} = qt5 ]]; then
+ cmake-utils_src_compile
+ fi
+ }
+ multibuild_foreach_variant mycompile
+}
+
+src_test() {
+ mytest() {
+ if [[ ${MULTIBUILD_VARIANT} = qt4 ]]; then
+ cmake-multilib_src_test
+ elif [[ ${MULTIBUILD_VARIANT} = qt5 ]]; then
+ cmake-utils_src_test
+ fi
+ }
+ multibuild_foreach_variant mytest
+}
+
+src_install() {
+ myinstall() {
+ if [[ ${MULTIBUILD_VARIANT} = qt4 ]]; then
+ cmake-multilib_src_install
+ elif [[ ${MULTIBUILD_VARIANT} = qt5 ]]; then
+ cmake-utils_src_install
+ fi
+ }
+ multibuild_foreach_variant myinstall
+}
diff --git a/media-libs/plib/Manifest b/media-libs/plib/Manifest
new file mode 100644
index 000000000000..47b51fac83cf
--- /dev/null
+++ b/media-libs/plib/Manifest
@@ -0,0 +1 @@
+DIST plib-1.8.5.tar.gz 779133 SHA256 485b22bf6fdc0da067e34ead5e26f002b76326f6371e2ae006415dea6a380a32 SHA512 17154cc77243fe576c2bcbcb0285b98aef1a0634658f5473e95fe0ac8fa3ed477dbe5620e44ccf0b7cc616f812af0cd44d6fcbba0c563180d3b61c9d6f158e1d WHIRLPOOL 98ccfc78eff5e27539a4d046dbb761aaed6a53410026b1ae19cb3681a691f644000ad775e0b0211e45b582a8bb06c9d3cfc33849a6e02309b840d2db1f736b32
diff --git a/media-libs/plib/files/plib-1.8.5-X11.patch b/media-libs/plib/files/plib-1.8.5-X11.patch
new file mode 100644
index 000000000000..86bccc31c0e6
--- /dev/null
+++ b/media-libs/plib/files/plib-1.8.5-X11.patch
@@ -0,0 +1,11 @@
+--- configure.in.old 2014-10-14 12:23:00.422971952 +0200
++++ configure.in 2014-10-14 12:23:24.806746868 +0200
+@@ -276,7 +276,7 @@
+
+ LDFLAGS="$LDFLAGS $X_LIBS"
+
+- LIBS="$LIBS $X_PRE_LIBS -lXi -lXmu -lXext -lX11 $X_EXTRA_LIBS -lm"
++ LIBS="$LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS -lm"
+
+ dnl =========================================================
+ dnl if test "x$x_includes" != "x"; then
diff --git a/media-libs/plib/metadata.xml b/media-libs/plib/metadata.xml
new file mode 100644
index 000000000000..d3c2cc926f0b
--- /dev/null
+++ b/media-libs/plib/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-libs/plib/plib-1.8.5.ebuild b/media-libs/plib/plib-1.8.5.ebuild
new file mode 100644
index 000000000000..09e2d48d8afd
--- /dev/null
+++ b/media-libs/plib/plib-1.8.5.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit flag-o-matic eutils autotools
+
+DESCRIPTION="multimedia library used by many games"
+HOMEPAGE="http://plib.sourceforge.net/"
+SRC_URI="http://plib.sourceforge.net/dist/${P}.tar.gz"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ppc sparc x86"
+
+DEPEND="virtual/opengl"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-X11.patch
+ eautoreconf
+ # Since plib only provides static libraries, force
+ # building as PIC or plib is useless to amd64/etc...
+ append-flags -fPIC
+}
+
+src_install() {
+ default
+ dodoc AUTHORS ChangeLog KNOWN_BUGS NOTICE README* TODO*
+}
diff --git a/media-libs/plotutils/Manifest b/media-libs/plotutils/Manifest
new file mode 100644
index 000000000000..279f95a9c8dc
--- /dev/null
+++ b/media-libs/plotutils/Manifest
@@ -0,0 +1 @@
+DIST plotutils-2.6.tar.gz 3657562 SHA256 4f4222820f97ca08c7ea707e4c53e5a3556af4d8f1ab51e0da6ff1627ff433ab SHA512 4e5982605e5c1fbdb7325069c3ab2edd736e37a2eb30a1ec01fdc3541fcee6ed49937d4814c6baf79dab5b6fa42f909e4800c851d0ace3c7cf6d5a8681d0f0e7 WHIRLPOOL ef59f61ab985b300d7da8288b794b0c8f156901adfe976d159cb32cf9b167eaa6ab30a2d513cac5075575d7d80813e663681e329942d15c8d5a973ecc864516a
diff --git a/media-libs/plotutils/files/plotutils-2.5.1-rangecheck.patch b/media-libs/plotutils/files/plotutils-2.5.1-rangecheck.patch
new file mode 100644
index 000000000000..84b295913556
--- /dev/null
+++ b/media-libs/plotutils/files/plotutils-2.5.1-rangecheck.patch
@@ -0,0 +1,14 @@
+Source: Steve Tell (http://lists.gnu.org/archive/html/bug-gnu-utils/2003-12/msg00023.html)
+Upstream: Sent in 2003, not applied yet.
+Reason: Gentoo bug #47688
+--- plotutils-2.5.1.orig/graph/plotter.c 2008-09-26 23:48:15.000000000 +0200
++++ plotutils-2.5.1/graph/plotter.c 2008-11-08 13:10:14.000000000 +0100
+@@ -1011,7 +1011,7 @@
+ multigrapher->x_trans.output_min = 0.0;
+ multigrapher->x_trans.output_max = (double)PLOT_SIZE;
+ multigrapher->x_trans.output_range = multigrapher->x_trans.output_max - multigrapher->x_trans.output_min;
+- multigrapher->x_trans.output_min = 0.0;
++ multigrapher->y_trans.output_min = 0.0;
+ multigrapher->y_trans.output_max = (double)PLOT_SIZE;
+ multigrapher->y_trans.output_range = multigrapher->y_trans.output_max - multigrapher->y_trans.output_min;
+
diff --git a/media-libs/plotutils/files/plotutils-2.6-libpng-1.5.patch b/media-libs/plotutils/files/plotutils-2.6-libpng-1.5.patch
new file mode 100644
index 000000000000..b86d9f457421
--- /dev/null
+++ b/media-libs/plotutils/files/plotutils-2.6-libpng-1.5.patch
@@ -0,0 +1,31 @@
+fix building with libpng-1.5
+
+--- libplot/z_write.c
++++ libplot/z_write.c
+@@ -164,7 +164,7 @@
+ }
+
+ /* cleanup after libpng errors (error handler does a longjmp) */
+- if (setjmp (png_ptr->jmpbuf))
++ if (png_jmpbuf (png_ptr))
+ {
+ png_destroy_write_struct (&png_ptr, (png_info **)NULL);
+ return -1;
+@@ -444,7 +444,7 @@
+ #endif
+ }
+
+- longjmp (png_ptr->jmpbuf, 1);
++ longjmp (png_jmpbuf (png_ptr), 1);
+ }
+
+ static void
+@@ -515,7 +515,7 @@
+ #endif
+ }
+
+- longjmp (png_ptr->jmpbuf, 1);
++ longjmp (png_jmpbuf (png_ptr), 1);
+ }
+
+ static void
diff --git a/media-libs/plotutils/files/plotutils-2.6-libxmi.patch b/media-libs/plotutils/files/plotutils-2.6-libxmi.patch
new file mode 100644
index 000000000000..653869fc02d8
--- /dev/null
+++ b/media-libs/plotutils/files/plotutils-2.6-libxmi.patch
@@ -0,0 +1,114 @@
+ Makefile.am | 2 +-
+ configure.ac | 2 +-
+ libplot/Makefile.am | 5 +++--
+ libplot/extern.h | 4 ++--
+ libplotter/Makefile.am | 6 ++++--
+ 5 files changed, 11 insertions(+), 8 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index b506d17..09d3eda 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -22,7 +22,7 @@ endif
+ if NO_LIBXMI
+ ADD_LIBXMI =
+ else
+-ADD_LIBXMI = libxmi
++ADD_LIBXMI =
+ endif
+
+ SUBDIRS = lib spline double ode ode-examples libplot $(ADD_LIBXMI) plot tek2plot plotfont graph hersheydemo $(ADD_LIBPLOTTER) include info doc fonts test
+diff --git a/configure.ac b/configure.ac
+index 8fb7b64..4ea0fc4 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -392,5 +392,5 @@ int main()
+ fi
+ fi
+
+-AC_CONFIG_FILES([Makefile double/Makefile graph/Makefile hersheydemo/Makefile pic2plot/Makefile pic2plot/doc/Makefile pic2plot/libgroff/Makefile pic2plot/include/Makefile info/Makefile lib/Makefile libplot/Makefile libplotter/Makefile libxmi/Makefile libxmi/info/Makefile plot/Makefile tek2plot/Makefile tek2plot/teksamples/Makefile plotfont/Makefile spline/Makefile ode/Makefile ode-examples/Makefile include/Makefile doc/Makefile fonts/Makefile fonts/bdf/Makefile fonts/pcf/Makefile fonts/pfb/Makefile test/Makefile])
++AC_CONFIG_FILES([Makefile double/Makefile graph/Makefile hersheydemo/Makefile pic2plot/Makefile pic2plot/doc/Makefile pic2plot/libgroff/Makefile pic2plot/include/Makefile info/Makefile lib/Makefile libplot/Makefile libplotter/Makefile plot/Makefile tek2plot/Makefile tek2plot/teksamples/Makefile plotfont/Makefile spline/Makefile ode/Makefile ode-examples/Makefile include/Makefile doc/Makefile fonts/Makefile fonts/bdf/Makefile fonts/pcf/Makefile fonts/pfb/Makefile test/Makefile])
+ AC_OUTPUT
+diff --git a/libplot/Makefile.am b/libplot/Makefile.am
+index 356cbef..a0cb2ff 100644
+--- a/libplot/Makefile.am
++++ b/libplot/Makefile.am
+@@ -8,7 +8,7 @@ libplot_la_LDFLAGS = -version-info 4:4:2
+
+ INCLUDES = $(X_CFLAGS) -I$(srcdir)/../include -DLIBPLOT
+
+-MISRC = mi_alloc.c mi_api.c mi_arc.c mi_canvas.c mi_fllarc.c mi_fllrct.c \
++_MISRC = mi_alloc.c mi_api.c mi_arc.c mi_canvas.c mi_fllarc.c mi_fllrct.c \
+ mi_fplycon.c mi_gc.c mi_ply.c mi_plycon.c mi_plygen.c mi_plypnt.c \
+ mi_plyutil.c mi_spans.c mi_widelin.c mi_zerarc.c mi_zerolin.c mi_version.c
+
+@@ -87,7 +87,7 @@ x_savestate.c x_text.c y_closepl.c y_defplot.c y_erase.c y_openpl.c
+
+ libplot_la_SOURCES = apinewc.c apioldc.c apioldcc.c $(ALLSRC)
+
+-MIHEADERS = xmi.h mi_api.h mi_arc.h mi_fllarc.h mi_fply.h mi_gc.h mi_line.h \
++_MIHEADERS = xmi.h mi_api.h mi_arc.h mi_fllarc.h mi_fply.h mi_gc.h mi_line.h \
+ mi_ply.h mi_scanfill.h mi_spans.h mi_widelin.h mi_zerarc.h
+
+ noinst_HEADERS = extern.h g_arc.h g_colorname.h g_control.h g_cntrlify.h \
+@@ -110,6 +110,7 @@ libplot_la_LIBADD = $(X_LIBS) $(X_TOOLKIT_LIBS) $(X_PRE_LIBS) $(X_BASIC_LIBS) $(
+ endif
+ endif
+
++libplot_la_LIBADD += -lxmi
+
+ ## execute the following command in ../libxmi to produce the commands
+ ## that follow
+diff --git a/libplot/extern.h b/libplot/extern.h
+index 39a6f8c..87a05f1 100644
+--- a/libplot/extern.h
++++ b/libplot/extern.h
+@@ -1262,7 +1262,7 @@ extern void _delete_color_name_cache (plColorNameCache *color_cache);
+ and a separate version of libxmi. */
+
+ /* libxmi API functions */
+-
++/*
+ #define miClearPaintedSet _pl_miClearPaintedSet
+ #define miCopyCanvas _pl_miCopyCanvas
+ #define miCopyGC _pl_miCopyGC
+@@ -1291,7 +1291,7 @@ extern void _delete_color_name_cache (plColorNameCache *color_cache);
+ #define miSetGCPixels _pl_miSetGCPixels
+ #define miSetPixelMerge2 _pl_miSetPixelMerge2
+ #define miSetPixelMerge3 _pl_miSetPixelMerge3
+-
++*/
+ /* an external libxmi symbol */
+ #define mi_libxmi_ver _pl_mi_libxmi_ver
+
+diff --git a/libplotter/Makefile.am b/libplotter/Makefile.am
+index 9b478d6..11466ad 100644
+--- a/libplotter/Makefile.am
++++ b/libplotter/Makefile.am
+@@ -6,7 +6,7 @@ libplotter_la_LDFLAGS = -version-info 4:4:2
+
+ INCLUDES = $(X_CFLAGS) -I$(srcdir)/../include -DLIBPLOT -DLIBPLOTTER
+
+-MISRC = mi_alloc.cc mi_api.cc mi_arc.cc mi_canvas.cc mi_fllarc.cc \
++_MISRC = mi_alloc.cc mi_api.cc mi_arc.cc mi_canvas.cc mi_fllarc.cc \
+ mi_fllrct.cc mi_fplycon.cc mi_gc.cc mi_ply.cc mi_plycon.cc mi_plygen.cc \
+ mi_plypnt.cc mi_plyutil.cc mi_spans.cc mi_widelin.cc mi_zerarc.cc \
+ mi_zerolin.cc mi_version.cc
+@@ -84,7 +84,7 @@ endif
+ endif
+
+
+-MIHEADERS = xmi.h mi_api.h mi_arc.h mi_fllarc.h mi_fply.h mi_gc.h mi_line.h \
++_MIHEADERS = xmi.h mi_api.h mi_arc.h mi_fllarc.h mi_fply.h mi_gc.h mi_line.h \
+ mi_ply.h mi_scanfill.h mi_spans.h mi_widelin.h mi_zerarc.h
+
+ ALLHEADERS = extern.h g_arc.h g_colorname.h g_control.h g_cntrlify.h \
+@@ -111,6 +111,8 @@ libplotter_la_LIBADD = $(X_LIBS) $(X_TOOLKIT_LIBS) $(X_PRE_LIBS) $(X_BASIC_LIBS)
+ endif
+ endif
+
++libplotter_la_LIBADD += -lxmi
++
+ ## execute the following command in ../libplot to produce the commands
+ ## that follow
+ ## (for i in ?_*.c; do echo "$i"c: "\$(top_srcdir)/libplot/$i"; echo " rm -f $i"c" ; if \$(LN_S) \$(top_srcdir)/libplot/$i $i"c" ; then true ; else cp -p \$(top_srcdir)/libplot/$i $i"c" ; fi"; echo; done)
diff --git a/media-libs/plotutils/files/plotutils-2.6-makefile.patch b/media-libs/plotutils/files/plotutils-2.6-makefile.patch
new file mode 100644
index 000000000000..a78801f3cf79
--- /dev/null
+++ b/media-libs/plotutils/files/plotutils-2.6-makefile.patch
@@ -0,0 +1,73 @@
+--- plotutils-2.6.orig/configure.ac 2009-07-29 20:14:09.000000000 -0700
++++ plotutils-2.6/configure.ac 2010-10-18 01:46:57.328444564 -0700
+@@ -65,6 +65,8 @@
+ # SCO OpenServer 5 (i.e. *-*-sco3.2v5*), "-belf" is added.
+ AC_PROG_LIBTOOL
+
++AC_PROG_CXX
++
+ # Determine extension (e.g. ".exe") on executables, if any.
+ AC_EXEEXT
+
+--- plotutils-2.6.orig/doc/Makefile.am 2009-07-30 08:49:46.000000000 -0700
++++ plotutils-2.6/doc/Makefile.am 2010-10-18 01:57:50.525852285 -0700
+@@ -3,11 +3,3 @@
+
+ # files with nonstandard names in this directory
+ EXTRA_DIST = colors.txt h-fonts.txt h-glyphs.txt hershey.bib kana.txt kanji.txt
+-
+-# remove documentation files installed by previous versions of the package,
+-# with obsolete names
+-
+-OBSOLETEDOC = hershey-demo.c hershey-fonts hershey-number hershey.doc h-fonts.doc h-glyphs.doc kana.doc kanji.doc demo-page h-demo.c
+-
+-install-data-hook:
+- -for f in $(OBSOLETEDOC) ; do rm -f $(datadir)/libplot/$$f; done
+--- plotutils-2.6.orig/graph/Makefile.am 2005-11-25 20:40:13.000000000 -0800
++++ plotutils-2.6/graph/Makefile.am 2010-10-18 01:23:07.194720342 -0700
+@@ -10,15 +10,5 @@
+
+ CLEANFILES = fontlist.c
+
+-# remove executables installed by previous versions of the package, and
+-# remove obsolete library versions too
+-
+-OBSOLETEBINS = graph-tek graph-hpgl graph-fig graph-ps graph-X
+-OBSOLETELIBS = libplottek.a libplothpgl.a libplotfig.a libplotps.a libplotX.a
+-
+-install-exec-hook:
+- -for f in $(OBSOLETEBINS) ; do rm -f $(bindir)/$$f; done
+- -for f in $(OBSOLETELIBS) ; do rm -f $(libdir)/$$f; done
+-
+ fontlist.c: $(top_srcdir)/lib/fontlist.c
+ @rm -f fontlist.c ; if $(LN_S) $(top_srcdir)/lib/fontlist.c fontlist.c ; then true ; else cp -p $(top_srcdir)/lib/fontlist.c fontlist.c ; fi
+--- plotutils-2.6.orig/plot/Makefile.am 2005-11-25 20:40:13.000000000 -0800
++++ plotutils-2.6/plot/Makefile.am 2010-10-18 01:23:37.714971379 -0700
+@@ -9,12 +9,5 @@
+
+ CLEANFILES = fontlist.c
+
+-# remove executables installed by previous versions of the package
+-
+-OBSOLETEBINS = plot2plot plot2tek plot2hpgl plot2fig plot2ps plot2X
+-
+-install-exec-hook:
+- -for f in $(OBSOLETEBINS) ; do rm -f $(bindir)/$$f; done
+-
+ fontlist.c: $(top_srcdir)/lib/fontlist.c
+ @rm -f fontlist.c ; if $(LN_S) $(top_srcdir)/lib/fontlist.c fontlist.c ; then true ; else cp -p $(top_srcdir)/lib/fontlist.c fontlist.c ; fi
+--- plotutils-2.6.orig/tek2plot/Makefile.am 2005-11-25 20:40:13.000000000 -0800
++++ plotutils-2.6/tek2plot/Makefile.am 2010-10-18 01:23:48.011056089 -0700
+@@ -12,12 +12,5 @@
+
+ SUBDIRS = teksamples
+
+-# remove executables installed by previous versions of the package
+-
+-OBSOLETEBINS = tek2tek tek2hpgl tek2fig tek2ps tek2X
+-
+-install-exec-hook:
+- -for f in $(OBSOLETEBINS) ; do rm -f $(bindir)/$$f; done
+-
+ fontlist.c: $(top_srcdir)/lib/fontlist.c
+ @rm -f fontlist.c ; if $(LN_S) $(top_srcdir)/lib/fontlist.c fontlist.c ; then true ; else cp -p $(top_srcdir)/lib/fontlist.c fontlist.c ; fi
diff --git a/media-libs/plotutils/metadata.xml b/media-libs/plotutils/metadata.xml
new file mode 100644
index 000000000000..447cad30a8fc
--- /dev/null
+++ b/media-libs/plotutils/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>printing</herd>
+</pkgmetadata>
diff --git a/media-libs/plotutils/plotutils-2.6-r1.ebuild b/media-libs/plotutils/plotutils-2.6-r1.ebuild
new file mode 100644
index 000000000000..ca73edbfb119
--- /dev/null
+++ b/media-libs/plotutils/plotutils-2.6-r1.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 libtool eutils autotools
+
+DESCRIPTION="Powerful C/C++ function library for exporting 2-D vector graphics"
+HOMEPAGE="http://www.gnu.org/software/plotutils/"
+SRC_URI="mirror://gnu/plotutils/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="+png static-libs X"
+
+DEPEND="
+ !<media-libs/plotutils-${PV}
+ media-libs/libxmi
+ png? (
+ media-libs/libpng
+ sys-libs/zlib )
+ X? (
+ x11-libs/libXaw
+ x11-proto/xextproto )"
+RDEPEND="${DEPEND}"
+
+DOCS="AUTHORS COMPAT ChangeLog INSTALL.* KNOWN_BUGS NEWS ONEWS PROBLEMS README THANKS TODO"
+
+src_prepare() {
+ rm -rf libxmi/* || die
+ sed -i 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/g' configure.ac || die
+ epatch \
+ "${FILESDIR}"/${PN}-2.5.1-rangecheck.patch \
+ "${FILESDIR}"/${P}-makefile.patch \
+ "${FILESDIR}"/${P}-libpng-1.5.patch \
+ "${FILESDIR}"/${P}-libxmi.patch
+ eautoreconf
+ elibtoolize
+}
+
+src_configure() {
+ local myconf
+ if use X ; then
+ myconf="--with-x --enable-libxmi"
+ else
+ myconf="--without-x"
+ fi
+
+ econf \
+ --disable-dependency-tracking \
+ --enable-shared \
+ --enable-libplotter \
+ --disable-libxmi \
+ $(use_enable static-libs static) \
+ $(use_with png libpng) \
+ ${myconf}
+}
+
+pkg_postinst() {
+ if use X ; then
+ elog "There are extra fonts available in the plotutils package."
+ elog "The current ebuild does not install them for you since most"
+ elog "of them can be installed via the media-fonts/urw-fonts"
+ elog "package. See /usr/share/doc/${P}/INSTALL.fonts for"
+ elog "information on installing the remaining Tektronix fonts."
+ elog ""
+ elog "If you manually install the extra fonts and use the"
+ elog "program xfig, you might want to recompile to take"
+ elog "advantage of the additional ps fonts."
+ elog "Also, it is possible to enable ghostscript and possibly"
+ elog "your printer to use the HP fonts."
+ fi
+}
diff --git a/media-libs/plotutils/plotutils-2.6.ebuild b/media-libs/plotutils/plotutils-2.6.ebuild
new file mode 100644
index 000000000000..cac7acabb7d4
--- /dev/null
+++ b/media-libs/plotutils/plotutils-2.6.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+inherit libtool eutils autotools
+
+DESCRIPTION="a powerful C/C++ function library for exporting 2-D vector graphics"
+HOMEPAGE="http://www.gnu.org/software/plotutils/"
+SRC_URI="mirror://gnu/plotutils/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm hppa ia64 ppc ppc64 s390 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris"
+IUSE="+png static-libs X"
+
+DEPEND="
+ !media-libs/libxmi
+ png? ( media-libs/libpng
+ sys-libs/zlib )
+ X? ( x11-libs/libXaw
+ x11-proto/xextproto )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-2.5.1-rangecheck.patch"
+ epatch "${FILESDIR}/${P}-makefile.patch"
+ epatch "${FILESDIR}/${P}-libpng-1.5.patch"
+ sed -i 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/g' configure.ac
+ eautoreconf
+ elibtoolize
+}
+
+src_configure() {
+ local myconf
+ if use X ; then
+ myconf="--with-x --enable-libxmi"
+ else
+ myconf="--without-x"
+ fi
+
+ econf \
+ --disable-dependency-tracking \
+ --enable-shared \
+ --enable-libplotter \
+ $(use_enable static-libs static) \
+ $(use_with png libpng) \
+ ${myconf}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ dodoc AUTHORS COMPAT ChangeLog INSTALL.* \
+ KNOWN_BUGS NEWS ONEWS PROBLEMS README THANKS TODO
+}
+
+pkg_postinst() {
+ if use X ; then
+ elog "There are extra fonts available in the plotutils package."
+ elog "The current ebuild does not install them for you since most"
+ elog "of them can be installed via the media-fonts/urw-fonts"
+ elog "package. See /usr/share/doc/${P}/INSTALL.fonts for"
+ elog "information on installing the remaining Tektronix fonts."
+ elog ""
+ elog "If you manually install the extra fonts and use the"
+ elog "program xfig, you might want to recompile to take"
+ elog "advantage of the additional ps fonts."
+ elog "Also, it is possible to enable ghostscript and possibly"
+ elog "your printer to use the HP fonts."
+ fi
+}
diff --git a/media-libs/pnglite/Manifest b/media-libs/pnglite/Manifest
new file mode 100644
index 000000000000..0141e58a04a7
--- /dev/null
+++ b/media-libs/pnglite/Manifest
@@ -0,0 +1 @@
+DIST pnglite-0.1.17.zip 6516 SHA256 6444b13b9ec5b6f9de8f72513a00870325779e3b05bfcf554edb1ab0c90f5962 SHA512 f728273a702287d1c299e2939a2e2da5a6c1fbc55372fe1869d7f93cfe59c016c9dcf02be0242c5fa77cda66b0016bbafe1b78f7a876ba2866c37f504d262ce8 WHIRLPOOL db9070068ba1cf89f3b397d3f721055dceeb545d37e712e22f6fa6bf8eb30d50f9eafe57a9bc81b3c61dadae660bbe862ed62e193b6cd7ccd467b204bc966126
diff --git a/media-libs/pnglite/files/pnglite-0.1.17-include-stdio.patch b/media-libs/pnglite/files/pnglite-0.1.17-include-stdio.patch
new file mode 100644
index 000000000000..a29df412dd98
--- /dev/null
+++ b/media-libs/pnglite/files/pnglite-0.1.17-include-stdio.patch
@@ -0,0 +1,16 @@
+This patch comes from the Debian package.
+
+Index: pnglite-0.1.17/pnglite.h
+===================================================================
+--- pnglite-0.1.17.orig/pnglite.h 2008-04-18 17:15:07.000000000 +1000
++++ pnglite-0.1.17/pnglite.h 2008-04-18 17:15:18.000000000 +1000
+@@ -24,7 +24,8 @@
+ daniel.karling@gmail.com
+ */
+
+-
++
++#include <stdio.h>
+ #ifndef _PNGLITE_H_
+ #define _PNGLITE_H_
+
diff --git a/media-libs/pnglite/metadata.xml b/media-libs/pnglite/metadata.xml
new file mode 100644
index 000000000000..7f56be77e1aa
--- /dev/null
+++ b/media-libs/pnglite/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>graphics</herd>
+ <upstream>
+ <remote-id type="sourceforge">pnglite</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/pnglite/pnglite-0.1.17.ebuild b/media-libs/pnglite/pnglite-0.1.17.ebuild
new file mode 100644
index 000000000000..bc6f682b188d
--- /dev/null
+++ b/media-libs/pnglite/pnglite-0.1.17.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 flag-o-matic multilib toolchain-funcs
+
+DESCRIPTION="Small and simple library for loading and writing PNG images"
+HOMEPAGE="http://sourceforge.net/projects/pnglite/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.zip"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="static-libs"
+
+RDEPEND="sys-libs/zlib"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S=${WORKDIR}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-include-stdio.patch
+ sed -ie "s:\"../zlib/zlib.h\":<zlib.h>:" pnglite.c || die
+}
+
+src_compile() {
+ tc-export CC
+ if use static-libs; then
+ emake ${PN}.o
+ $(tc-getAR) -cvq lib${PN}.a ${PN}.o || die
+ rm ${PN}.o || die
+ fi
+
+ append-flags -fPIC
+ emake ${PN}.o
+ $(tc-getCC) ${LDFLAGS} -shared -Wl,-soname,lib${PN}.so.0 \
+ -o lib${PN}.so.0 ${PN}.o -lz || die
+}
+
+src_install() {
+ insinto /usr/include
+ doins ${PN}.h
+
+ dolib.so lib${PN}.so.0
+ if use static-libs; then
+ dolib.a lib${PN}.a
+ fi
+
+ dosym lib${PN}.so.0 /usr/$(get_libdir)/lib${PN}.so
+}
diff --git a/media-libs/portaudio/Manifest b/media-libs/portaudio/Manifest
new file mode 100644
index 000000000000..eca7fd9f15b7
--- /dev/null
+++ b/media-libs/portaudio/Manifest
@@ -0,0 +1 @@
+DIST pa_stable_v19_20140130.tgz 1504620 SHA256 8fe024a5f0681e112c6979808f684c3516061cc51d3acc0b726af98fc96c8d57 SHA512 078adfdc2cec7fbd4019837eee65f8411b873b51064dfd7334e1c55118c26ea1fb68cb22e46ee69adb69c78d026b00a7ed973c40632e7d79703e12669a62ee3e WHIRLPOOL a86777a4f3af59b64248d14522820a06fc9171fd5de88a2f688b2cc3e39d2374bc4f9d0c39b041fcf189f8db074810597056b45dfde80cbe4cfa7579cd30f3f9
diff --git a/media-libs/portaudio/metadata.xml b/media-libs/portaudio/metadata.xml
new file mode 100644
index 000000000000..e1774e3d9ad7
--- /dev/null
+++ b/media-libs/portaudio/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>sound</herd>
+</pkgmetadata>
diff --git a/media-libs/portaudio/portaudio-19_pre20140130.ebuild b/media-libs/portaudio/portaudio-19_pre20140130.ebuild
new file mode 100644
index 000000000000..c9ddeb4c9382
--- /dev/null
+++ b/media-libs/portaudio/portaudio-19_pre20140130.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+AUTOTOOLS_PRUNE_LIBTOOL_FILES=all
+inherit autotools-multilib
+
+MY_P=pa_stable_v${PV/pre}
+
+DESCRIPTION="A free, cross-platform, open-source, audio I/O library"
+HOMEPAGE="http://www.portaudio.com/"
+SRC_URI="http://www.portaudio.com/archives/${MY_P}.tgz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~amd64-linux ~x86-linux"
+IUSE="alsa +cxx debug jack oss static-libs"
+
+RDEPEND="alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
+ jack? ( >=media-sound/jack-audio-connection-kit-0.121.3-r1[${MULTILIB_USEDEP}] )
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-soundlibs-20130224-r8
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${PN}
+DOCS=( README.txt )
+HTML_DOCS=( index.html )
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable debug debug-output)
+ $(use_enable cxx)
+ $(use_with alsa)
+ $(use_with jack)
+ $(use_with oss)
+ )
+
+ autotools-multilib_src_configure
+}
+
+src_compile() {
+ autotools-multilib_src_compile lib/libportaudio.la
+ autotools-multilib_src_compile
+}
diff --git a/media-libs/portmidi/Manifest b/media-libs/portmidi/Manifest
new file mode 100644
index 000000000000..b33b27038a18
--- /dev/null
+++ b/media-libs/portmidi/Manifest
@@ -0,0 +1 @@
+DIST portmidi-src-217.zip 1030830 SHA256 08e9a892bd80bdb1115213fb72dc29a7bf2ff108b378180586aa65f3cfd42e0f SHA512 d08d4d57429d26d292b5fe6868b7c7a32f2f1d2428f6695cd403a697e2d91629bd4380242ab2720e8f21c895bb75cb56b709fb663a20e8e623120e50bfc5d90b WHIRLPOOL ee970e9944ca0dad82f46285dda2e9c22fe03092719441be40fcc77a57d8c9a6fd7a2f232d29f80ebea041d23981ec61cf883bcc79e3b900173a5456d5510434
diff --git a/media-libs/portmidi/files/portmidi-217-cmake.patch b/media-libs/portmidi/files/portmidi-217-cmake.patch
new file mode 100644
index 000000000000..e741e6576f66
--- /dev/null
+++ b/media-libs/portmidi/files/portmidi-217-cmake.patch
@@ -0,0 +1,318 @@
+--- portmidi/CMakeLists.txt
++++ portmidi/CMakeLists.txt
+@@ -9,12 +9,11 @@
+ set(CMAKE_BUILD_TYPE Release CACHE STRING
+ "Semicolon-separate list of supported configuration types")
+ # set default directories but don't override cached values...
+- set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CACHEFILE_DIR}/${CMAKE_BUILD_TYPE}
++ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+ CACHE STRING "libraries go here")
+- set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CACHEFILE_DIR}/${CMAKE_BUILD_TYPE}
++ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+ CACHE STRING "libraries go here")
+- set(CMAKE_RUNTIME_OUTPUT_DIRECTORY
+- ${CMAKE_CACHEFILE_DIR}/${CMAKE_BUILD_TYPE}
++ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+ CACHE STRING "executables go here")
+
+ else(UNIX)
+@@ -68,10 +67,20 @@
+ include_directories(pm_common porttime)
+ add_subdirectory(pm_common)
+
+-add_subdirectory(pm_test)
++option(PORTMIDI_ENABLE_JAVA "Enable Java bindings support" ON)
++option(PORTMIDI_ENABLE_STATIC "Build and install static libraries" OFF)
++option(PORTMIDI_ENABLE_TEST "Build test programs" ON)
++
++if(PORTMIDI_ENABLE_TEST)
++ add_subdirectory(pm_test)
++endif(PORTMIDI_ENABLE_TEST)
+
+ add_subdirectory(pm_dylib)
+
+ # Cannot figure out how to make an xcode Java application with CMake
+-add_subdirectory(pm_java)
++if(PORTMIDI_ENABLE_JAVA)
++ set(JAR_INSTALL_DIR share/java
++ CACHE STRING "Define directory name for jar installation")
++ add_subdirectory(pm_java)
++endif(PORTMIDI_ENABLE_JAVA)
+
+--- portmidi/pm_common/CMakeLists.txt
++++ portmidi/pm_common/CMakeLists.txt
+@@ -44,9 +44,6 @@
+
+ # first include the appropriate system-dependent file:
+ if(UNIX)
+- # add the -g switch for Linux and Mac OS X (not used in Win32)
+- set (CMAKE_C_FLAGS_DEBUG "-g ${CMAKE_C_FLAGS_DEBUG}"
+- CACHE STRING "enable extra checks for debugging" FORCE)
+ if(APPLE)
+ set(MACSRC pmmacosxcm pmmac readbinaryplist finddefault)
+ prepend_path(LIBSRC ../pm_mac/ ${MACSRC})
+@@ -62,19 +59,23 @@
+ ${COREMIDI_LIB} ${CORESERVICES_LIB}
+ CACHE INTERNAL "")
+
+- set(JAVAVM_LIB "${FRAMEWORK_PATH}/JavaVM.framework")
+- set(JAVA_INCLUDE_PATHS ${JAVAVM_LIB}/Headers)
++ if(PORTMIDI_ENABLE_JAVA)
++ set(JAVAVM_LIB "${FRAMEWORK_PATH}/JavaVM.framework")
++ set(JAVA_INCLUDE_PATHS ${JAVAVM_LIB}/Headers)
++ endif(PORTMIDI_ENABLE_JAVA)
+ message(STATUS "SYSROOT: " ${CMAKE_OSX_SYSROOT})
+ else(APPLE)
+ # LINUX settings...
+- include(FindJNI)
+- message(STATUS "JAVA_JVM_LIB_PATH is " ${JAVA_JVM_LIB_PATH})
+- message(STATUS "JAVA_INCLUDE_PATH is " ${JAVA_INCLUDE_PATH})
+- message(STATUS "JAVA_INCLUDE_PATH2 is " ${JAVA_INCLUDE_PATH2})
+- message(STATUS "JAVA_JVM_LIBRARY is " ${JAVA_JVM_LIBRARY})
+- set(JAVA_INCLUDE_PATHS ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2})
+- # libjvm.so is found relative to JAVA_INCLUDE_PATH:
+- set(JAVAVM_LIB ${JAVA_JVM_LIBRARY}/libjvm.so)
++ if(PORTMIDI_ENABLE_JAVA)
++ include(FindJNI)
++ message(STATUS "JAVA_JVM_LIB_PATH is " ${JAVA_JVM_LIB_PATH})
++ message(STATUS "JAVA_INCLUDE_PATH is " ${JAVA_INCLUDE_PATH})
++ message(STATUS "JAVA_INCLUDE_PATH2 is " ${JAVA_INCLUDE_PATH2})
++ message(STATUS "JAVA_JVM_LIBRARY is " ${JAVA_JVM_LIBRARY})
++ set(JAVA_INCLUDE_PATHS ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2})
++ # libjvm.so is found relative to JAVA_INCLUDE_PATH:
++ set(JAVAVM_LIB ${JAVA_JVM_LIBRARY}/libjvm.so)
++ endif(PORTMIDI_ENABLE_JAVA)
+
+ set(LINUXSRC pmlinuxalsa pmlinux finddefault)
+ prepend_path(LIBSRC ../pm_linux/ ${LINUXSRC})
+@@ -88,10 +89,12 @@
+ # /MD is multithread DLL, /MT is multithread. Change to static:
+ include(../pm_win/static.cmake)
+
+- include(FindJNI)
++ if(PORTMIDI_ENABLE_JAVA)
++ include(FindJNI)
+
+- set(JAVA_INCLUDE_PATHS ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2})
+- # message(STATUS "JAVA_INCLUDE_PATHS: " ${JAVA_INCLUDE_PATHS})
++ set(JAVA_INCLUDE_PATHS ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2})
++ # message(STATUS "JAVA_INCLUDE_PATHS: " ${JAVA_INCLUDE_PATHS})
++ endif(PORTMIDI_ENABLE_JAVA)
+
+ set(WINSRC pmwin pmwinmm)
+ prepend_path(LIBSRC ../pm_win/ ${WINSRC})
+@@ -99,29 +102,43 @@
+ set(PM_NEEDED_LIBS winmm.lib)
+ endif(WIN32)
+ endif(UNIX)
+-set(JNI_EXTRA_LIBS ${PM_NEEDED_LIBS} ${JAVA_JVM_LIBRARY})
++
++if(PORTMIDI_ENABLE_JAVA)
++ set(JNI_EXTRA_LIBS ${PM_NEEDED_LIBS} ${JAVA_JVM_LIBRARY})
++endif(PORTMIDI_ENABLE_JAVA)
+
+ # this completes the list of library sources by adding shared code
+ list(APPEND LIBSRC pmutil portmidi)
+
+ # now add the shared files to make the complete list of library sources
+-add_library(portmidi-static ${LIBSRC})
+-set_target_properties(portmidi-static PROPERTIES OUTPUT_NAME "portmidi_s")
+-target_link_libraries(portmidi-static ${PM_NEEDED_LIBS})
+-
+-# define the jni library
+-include_directories(${JAVA_INCLUDE_PATHS})
+-
+-set(JNISRC ${LIBSRC} ../pm_java/pmjni/pmjni.c)
+-add_library(pmjni SHARED ${JNISRC})
+-target_link_libraries(pmjni ${JNI_EXTRA_LIBS})
+-set_target_properties(pmjni PROPERTIES EXECUTABLE_EXTENSION "jnilib")
++if(PORTMIDI_ENABLE_STATIC)
++ add_library(portmidi-static ${LIBSRC})
++ set_target_properties(portmidi-static PROPERTIES OUTPUT_NAME "portmidi")
++ target_link_libraries(portmidi-static ${PM_NEEDED_LIBS})
++endif(PORTMIDI_ENABLE_STATIC)
++
++if(PORTMIDI_ENABLE_JAVA)
++ # define the jni library
++ include_directories(${JAVA_INCLUDE_PATHS})
++
++ set(JNISRC ${LIBSRC} ../pm_java/pmjni/pmjni.c)
++ add_library(pmjni SHARED ${JNISRC})
++ target_link_libraries(pmjni ${JNI_EXTRA_LIBS})
++ set_target_properties(pmjni PROPERTIES EXECUTABLE_EXTENSION "jnilib")
++endif(PORTMIDI_ENABLE_JAVA)
+
+ # install the libraries (Linux and Mac OS X command line)
+ if(UNIX)
+- INSTALL(TARGETS portmidi-static pmjni
+- LIBRARY DESTINATION /usr/local/lib
+- ARCHIVE DESTINATION /usr/local/lib)
++ if(PORTMIDI_ENABLE_STATIC)
++ INSTALL(TARGETS portmidi-static
++ LIBRARY DESTINATION lib${LIB_SUFFIX}
++ ARCHIVE DESTINATION lib${LIB_SUFFIX})
++ endif(PORTMIDI_ENABLE_STATIC)
++ if(PORTMIDI_ENABLE_JAVA)
++ INSTALL(TARGETS pmjni
++ LIBRARY DESTINATION lib${LIB_SUFFIX}
++ ARCHIVE DESTINATION lib${LIB_SUFFIX})
++ endif(PORTMIDI_ENABLE_JAVA)
+ # .h files installed by pm_dylib/CMakeLists.txt, so don't need them here
+ # INSTALL(FILES portmidi.h ../porttime/porttime.h
+ # DESTINATION /usr/local/include)
+--- portmidi/pm_dylib/CMakeLists.txt
++++ portmidi/pm_dylib/CMakeLists.txt
+@@ -39,9 +39,6 @@
+
+ # first include the appropriate system-dependent file:
+ if(UNIX)
+- # add the -g switch for Linux and Mac OS X (not used in Win32)
+- set (CMAKE_C_FLAGS_DEBUG "-g ${CMAKE_C_FLAGS_DEBUG}"
+- CACHE STRING "enable extra checks for debugging" FORCE)
+ if(APPLE)
+ set(MACSRC pmmacosxcm pmmac readbinaryplist finddefault)
+ prepend_path(LIBSRC ../pm_mac/ ${MACSRC})
+@@ -63,7 +60,8 @@
+ message(STATUS "SYSROOT: " ${CMAKE_OSX_SYSROOT})
+ else(APPLE)
+ # LINUX settings...
+- include(FindJNI)
++ if(PORTMIDI_ENABLE_JAVA)
++ include(FindJNI)
+ # message(STATUS "JAVA_JVM_LIB_PATH is " ${JAVA_JVM_LIB_PATH})
+ # message(STATUS "JAVA_INCLUDE_PATH is " ${JAVA_INCLUDE_PATH})
+ # note: should use JAVA_JVM_LIB_PATH, but it is not set properly
+@@ -75,11 +73,8 @@
+ # JAVA_INCLUDE_PATH2; if no, then we need to make both JAVA_INCLUDE_PATH
+ # and JAVA_INCLUDE_PATH2 set by user (will need clear documentation
+ # because JAVA_INCLUDE_PATH2 is pretty obscure)
+- set(JAVA_INCLUDE_PATH ${JAVA_INCLUDE_PATH-UNKNOWN}
+- CACHE STRING "where to find Java SDK include directory")
+- set(JAVA_INCLUDE_PATHS ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH}/linux)
+- # libjvm.so is found relative to JAVA_INCLUDE_PATH:
+- set(JAVAVM_LIB ${JAVA_INCLUDE_PATH}/../jre/lib/i386/client/libjvm.so)
++ set(JAVAVM_LIB ${JAVA_JVM_LIBRARY})
++ endif(PORTMIDI_ENABLE_JAVA)
+
+ set(LINUXSRC pmlinuxalsa pmlinux finddefault)
+ prepend_path(LIBSRC ../pm_linux/ ${LINUXSRC})
+@@ -91,13 +86,15 @@
+ if(WIN32)
+ # /MDd is multithread debug DLL, /MTd is multithread debug
+ # /MD is multithread DLL, /MT is multithread
+-
+- include(FindJNI)
+- # note: should use JAVA_JVM_LIB_PATH, but it is not set properly
+- set(JAVAVM_LIB ${JAVA_INCLUDE_PATH}/../lib/jvm.lib)
+
+- set(JAVA_INCLUDE_PATHS ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2})
+- # message(STATUS "JAVA_INCLUDE_PATHS: " ${JAVA_INCLUDE_PATHS})
++ if(PORTMIDI_ENABLE_JAVA)
++ include(FindJNI)
++ # note: should use JAVA_JVM_LIB_PATH, but it is not set properly
++ set(JAVAVM_LIB ${JAVA_INCLUDE_PATH}/../lib/jvm.lib)
++
++ set(JAVA_INCLUDE_PATHS ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2})
++ # message(STATUS "JAVA_INCLUDE_PATHS: " ${JAVA_INCLUDE_PATHS})
++ endif(PORTMIDI_ENABLE_JAVA)
+
+ set(WINSRC pmwin pmwinmm)
+ prepend_path(LIBSRC ../pm_win/ ${WINSRC})
+@@ -106,7 +103,10 @@
+ # message(STATUS "JAVAVM_LIB: " ${JAVAVM_LIB})
+ endif(WIN32)
+ endif(UNIX)
++
++if(PORTMIDI_ENABLE_JAVA)
+ set(JNI_EXTRA_LIBS ${PM_NEEDED_LIBS} ${JAVAVM_LIB})
++endif(PORTMIDI_ENABLE_JAVA)
+
+ # this completes the list of library sources by adding shared code
+ set(SHARED_FILES pmutil portmidi)
+@@ -120,8 +120,8 @@
+ # install the libraries (Linux and Mac OS X command line)
+ if(UNIX)
+ INSTALL(TARGETS portmidi-dynamic
+- LIBRARY DESTINATION /usr/local/lib
+- ARCHIVE DESTINATION /usr/local/lib)
++ LIBRARY DESTINATION lib${LIB_SUFFIX}
++ ARCHIVE DESTINATION lib${LIB_SUFFIX})
+ INSTALL(FILES ../pm_common/portmidi.h ../porttime/porttime.h
+- DESTINATION /usr/local/include)
++ DESTINATION include)
+ endif(UNIX)
+--- portmidi/pm_java/CMakeLists.txt
++++ portmidi/pm_java/CMakeLists.txt
+@@ -5,43 +5,24 @@
+ # java not dealt with in CMake -- see pm_mac/pm_mac.xcodeproj
+ else(APPLE)
+ # linux
+- set(JPORTMIDICLASS JPortMidi.class JPortMidiException.class
+- JPortMidiApi.class)
+- set(PMDEFAULTSCLASS PmDefaultsFrame.class PmDefaults.class)
+- prepend_path(JPORTMIDICLASS2 jportmidi/ ${JPORTMIDICLASS})
+- prepend_path(PMDEFAULTSCLASS2 pmdefaults/ ${PMDEFAULTSCLASS})
+- set(PMDEFAULTS_ALL_CLASSES ${JPORTMIDICLASS2} ${PMDEFAULTSCLASS2})
+- # message(STATUS "PMDEFAULTS_ALL_CLASSES is " ${PMDEFAULTS_ALL_CLASSES})
+- add_custom_command(OUTPUT pmdefaults/PmDefaultsFrame.class
+- COMMAND javac -classpath . pmdefaults/PmDefaultsFrame.java
+- MAIN_DEPENDENCY pmdefaults/PmDefaultsFrame.java
+- DEPENDS pmdefaults/PmDefaults.java
+- WORKING_DIRECTORY pm_java)
+- add_custom_command(OUTPUT pmdefaults/PmDefaults.class
+- COMMAND javac -classpath . pmdefaults/PmDefaults.java
+- MAIN_DEPENDENCY pmdefaults/PmDefaults.java
+- DEPENDS pmdefaults/PmDefaultsFrame.java
+- WORKING_DIRECTORY pm_java)
+- add_custom_command(OUTPUT ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pmdefaults.jar
+- COMMAND cp pmdefaults/portmusic_logo.png .
+- COMMAND jar cmf pmdefaults/manifest.txt pmdefaults.jar
+- pmdefaults/*.class portmusic_logo.png jportmidi/*.class
+- COMMAND chmod +x pmdefaults/pmdefaults
+- COMMAND cp pmdefaults/pmdefaults ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
+- COMMAND mv pmdefaults.jar ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
+- COMMAND rm portmusic_logo.png
+- MAIN_DEPENDENCY pmdefaults/PmDefaults.class
+- DEPENDS ${PMDEFAULTS_ALL_CLASSES}
+- WORKING_DIRECTORY pm_java)
+- add_custom_target(pmdefaults_target ALL
+- DEPENDS ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pmdefaults.jar)
+- # message(STATUS "add_custom_target: pmdefaults.jar")
++ set(JAVA_CLASSES jportmidi pmdefaults)
++ add_custom_command(OUTPUT ${JAVA_CLASSES}
++ COMMAND javac -d ${CMAKE_CURRENT_BINARY_DIR} jportmidi/*.java pmdefaults/*.java
++ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
++ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/pmdefaults.jar
++ DEPENDS ${JAVA_CLASSES}
++ COMMAND jar cmf pmdefaults/manifest.txt ${CMAKE_CURRENT_BINARY_DIR}/pmdefaults.jar
++ -C pmdefaults portmusic_logo.png -C ${CMAKE_CURRENT_BINARY_DIR} jportmidi
++ -C ${CMAKE_CURRENT_BINARY_DIR} pmdefaults
++ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
++ add_custom_target(pmdefaults.jar ALL
++ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/pmdefaults.jar)
+
+ # install the libraries (Linux only)
+- INSTALL(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pmdefaults.jar
+- DESTINATION /usr/share/java)
+- INSTALL(PROGRAMS ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pmdefaults
+- DESTINATION /usr/local/bin)
++ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/pmdefaults.jar
++ DESTINATION ${JAR_INSTALL_DIR})
++ INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/pmdefaults/pmdefaults
++ DESTINATION bin)
+ endif(APPLE)
+ endif(UNIX)
+ # In windows, use pm_java/make.bat
+--- portmidi/pm_test/CMakeLists.txt
++++ portmidi/pm_test/CMakeLists.txt
+@@ -12,8 +12,8 @@
+
+ macro(make_a_test name)
+ add_executable(${name} ${name}.c)
+- target_link_libraries(${name} portmidi-static ${PM_NEEDED_LIBS})
+- add_dependencies(${name} portmidi-static)
++ target_link_libraries(${name} portmidi ${PM_NEEDED_LIBS})
++ add_dependencies(${name} portmidi)
+ endmacro(make_a_test)
+
+ make_a_test(test)
diff --git a/media-libs/portmidi/files/portmidi-217-python.patch b/media-libs/portmidi/files/portmidi-217-python.patch
new file mode 100644
index 000000000000..5682c3344358
--- /dev/null
+++ b/media-libs/portmidi/files/portmidi-217-python.patch
@@ -0,0 +1,25 @@
+--- portmidi/pm_python/setup.py
++++ portmidi/pm_python/setup.py
+@@ -15,12 +15,10 @@
+
+
+ DESCRIPTION = open('README_PYTHON.txt').read()
+-CHANGES = open('CHANGES.txt').read()
+-TODO = open('TODO.txt').read()
+
+ EXTRAS = {}
+
+-long_description = DESCRIPTION + CHANGES + TODO
++long_description = DESCRIPTION
+ #import sys
+ #if "checkdocs" in sys.argv:
+ # print long_description
+@@ -173,7 +171,8 @@
+ EXTENSION = dict(
+ ext_modules=[
+ Extension("pyportmidi._pyportmidi", [os.path.join("pyportmidi", "_pyportmidi.pyx")],
+ library_dirs=["./linux"],
++ include_dirs=["../pm_common", "../porttime"],
+ libraries = ["portmidi", "asound", "pthread"]
+ )
+ ]
diff --git a/media-libs/portmidi/metadata.xml b/media-libs/portmidi/metadata.xml
new file mode 100644
index 000000000000..59be10030bfb
--- /dev/null
+++ b/media-libs/portmidi/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>proaudio</herd>
+ <use>
+ <flag name="test-programs">Install various example programs</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">portmedia</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/portmidi/portmidi-217-r1.ebuild b/media-libs/portmidi/portmidi-217-r1.ebuild
new file mode 100644
index 000000000000..27a17801e9df
--- /dev/null
+++ b/media-libs/portmidi/portmidi-217-r1.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+DISTUTILS_OPTIONAL=1
+
+inherit cmake-utils distutils-r1 eutils multilib java-pkg-opt-2
+
+DESCRIPTION="A library for real time MIDI input and output"
+HOMEPAGE="http://portmedia.sourceforge.net/"
+SRC_URI="mirror://sourceforge/portmedia/${PN}-src-${PV}.zip"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc java python static-libs test-programs"
+
+CDEPEND="media-libs/alsa-lib"
+RDEPEND="${CDEPEND}
+ java? ( >=virtual/jre-1.6 )"
+DEPEND="${CDEPEND}
+ app-arch/unzip
+ java? ( >=virtual/jdk-1.6 )
+ python? ( ${PYTHON_DEPS}
+ >=dev-python/cython-0.12.1[${PYTHON_USEDEP}] )
+ doc? (
+ app-doc/doxygen
+ dev-texlive/texlive-fontsrecommended
+ dev-texlive/texlive-latexextra
+ dev-tex/xcolor
+ virtual/latex-base
+ )"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S=${WORKDIR}/${PN}
+
+pkg_setup() {
+ use java && java-pkg-opt-2_pkg_setup
+}
+
+src_prepare() {
+ # fix parallel make failures, fix java support, and allow optional
+ # components like test programs and static libs to be skipped
+ epatch "${FILESDIR}"/${P}-cmake.patch
+
+ # add include directories and remove references to missing files
+ epatch "${FILESDIR}"/${P}-python.patch
+
+ # install wrapper for pmdefaults
+ if use java ; then
+ cat > pm_java/pmdefaults/pmdefaults <<-EOF
+ #!/bin/sh
+ java -Djava.library.path="${EPREFIX}/usr/$(get_libdir)/" \\
+ -jar "${EPREFIX}/usr/share/${PN}/lib/pmdefaults.jar"
+ EOF
+ [[ $? -ne 0 ]] && die "cat pmdefaults failed"
+ fi
+}
+
+src_configure() {
+ if use debug ; then
+ CMAKE_BUILD_TYPE=Debug
+ else
+ CMAKE_BUILD_TYPE=Release
+ fi
+
+ local mycmakeargs=(
+ $(cmake-utils_use java PORTMIDI_ENABLE_JAVA)
+ $(cmake-utils_use static-libs PORTMIDI_ENABLE_STATIC)
+ $(cmake-utils_use test-programs PORTMIDI_ENABLE_TEST)
+ )
+
+ if use java ; then
+ mycmakeargs+=(-DJAR_INSTALL_DIR="${EPREFIX}/usr/share/${PN}/lib")
+ fi
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+
+ if use python ; then
+ sed -i -e "/library_dirs=.*linux/s#./linux#${CMAKE_BUILD_DIR}#" pm_python/setup.py || die
+ pushd pm_python > /dev/null
+ distutils-r1_src_compile
+ popd > /dev/null
+ fi
+
+ if use doc ; then
+ doxygen || die "doxygen failed"
+ pushd latex > /dev/null
+ VARTEXFONTS="${T}"/fonts emake
+ popd > /dev/null
+ fi
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ dodoc CHANGELOG.txt README.txt pm_linux/README_LINUX.txt
+
+ use doc && dodoc latex/refman.pdf
+
+ if use python ; then
+ pushd pm_python > /dev/null
+ distutils-r1_src_install
+ popd > /dev/null
+ fi
+
+ if use java ; then
+ newdoc pm_java/README.txt README_JAVA.txt
+ newicon pm_java/pmdefaults/pmdefaults-icon.png pmdefaults.png
+ make_desktop_entry pmdefaults Pmdefaults pmdefaults "AudioVideo;Audio;Midi;"
+ fi
+
+ if use test-programs ; then
+ exeinto /usr/$(get_libdir)/${PN}
+ local app
+ for app in latency midiclock midithread midithru mm qtest sysex test ; do
+ doexe "${CMAKE_BUILD_DIR}"/${app}
+ done
+ fi
+}
diff --git a/media-libs/portmidi/portmidi-217.ebuild b/media-libs/portmidi/portmidi-217.ebuild
new file mode 100644
index 000000000000..cc1b3d3093db
--- /dev/null
+++ b/media-libs/portmidi/portmidi-217.ebuild
@@ -0,0 +1,137 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+PYTHON_DEPEND="python? 2:2.6"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="3.*"
+PYTHON_MODNAME="pyportmidi"
+
+inherit cmake-utils distutils eutils multilib java-pkg-opt-2
+
+DESCRIPTION="A library for real time MIDI input and output"
+HOMEPAGE="http://portmedia.sourceforge.net/"
+SRC_URI="mirror://sourceforge/portmedia/${PN}-src-${PV}.zip"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug doc java python static-libs test-programs"
+
+CDEPEND="media-libs/alsa-lib"
+RDEPEND="${CDEPEND}
+ java? ( >=virtual/jre-1.6 )"
+DEPEND="${CDEPEND}
+ app-arch/unzip
+ java? ( >=virtual/jdk-1.6 )
+ python? ( >=dev-python/cython-0.12.1 )
+ doc? (
+ app-doc/doxygen
+ dev-texlive/texlive-fontsrecommended
+ dev-texlive/texlive-latexextra
+ dev-tex/xcolor
+ virtual/latex-base
+ )"
+
+S=${WORKDIR}/${PN}
+
+pkg_setup() {
+ use java && java-pkg-opt-2_pkg_setup
+ use python && python_pkg_setup
+}
+
+src_prepare() {
+ # fix parallel make failures, fix java support, and allow optional
+ # components like test programs and static libs to be skipped
+ epatch "${FILESDIR}"/${P}-cmake.patch
+
+ # add include directories and remove references to missing files
+ epatch "${FILESDIR}"/${P}-python.patch
+
+ # install wrapper for pmdefaults
+ if use java ; then
+ cat > pm_java/pmdefaults/pmdefaults <<-EOF
+ #!/bin/sh
+ java -Djava.library.path="${EPREFIX}/usr/$(get_libdir)/" \\
+ -jar "${EPREFIX}/usr/share/${PN}/lib/pmdefaults.jar"
+ EOF
+ [[ $? -ne 0 ]] && die "cat pmdefaults failed"
+ fi
+
+ use python && python_copy_sources
+}
+
+src_configure() {
+ if use debug ; then
+ CMAKE_BUILD_TYPE=Debug
+ else
+ CMAKE_BUILD_TYPE=Release
+ fi
+
+ local mycmakeargs=(
+ $(cmake-utils_use java PORTMIDI_ENABLE_JAVA)
+ $(cmake-utils_use static-libs PORTMIDI_ENABLE_STATIC)
+ $(cmake-utils_use test-programs PORTMIDI_ENABLE_TEST)
+ )
+
+ if use java ; then
+ mycmakeargs+=(-DJAR_INSTALL_DIR="${EPREFIX}/usr/share/${PN}/lib")
+ fi
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+
+ if use python ; then
+ sed -i -e "/library_dirs=.*linux/s#./linux#${CMAKE_BUILD_DIR}#" pm_python/setup.py || die
+ pushd pm_python > /dev/null
+ distutils_src_compile
+ popd > /dev/null
+ fi
+
+ if use doc ; then
+ doxygen || die "doxygen failed"
+ pushd latex > /dev/null
+ VARTEXFONTS="${T}"/fonts emake
+ popd > /dev/null
+ fi
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ dodoc CHANGELOG.txt README.txt pm_linux/README_LINUX.txt
+
+ use doc && dodoc latex/refman.pdf
+
+ if use python ; then
+ pushd pm_python > /dev/null
+ distutils_src_install
+ popd > /dev/null
+ fi
+
+ if use java ; then
+ newdoc pm_java/README.txt README_JAVA.txt
+ newicon pm_java/pmdefaults/pmdefaults-icon.png pmdefaults.png
+ make_desktop_entry pmdefaults Pmdefaults pmdefaults "AudioVideo;Audio;Midi;"
+ fi
+
+ if use test-programs ; then
+ exeinto /usr/$(get_libdir)/${PN}
+ local app
+ for app in latency midiclock midithread midithru mm qtest sysex test ; do
+ doexe "${CMAKE_BUILD_DIR}"/${app}
+ done
+ fi
+}
+
+pkg_postinst() {
+ use python && distutils_pkg_postinst
+}
+
+pkg_postrm() {
+ use python && distutils_pkg_postrm
+}
diff --git a/media-libs/prison/Manifest b/media-libs/prison/Manifest
new file mode 100644
index 000000000000..c2180fab1db4
--- /dev/null
+++ b/media-libs/prison/Manifest
@@ -0,0 +1 @@
+DIST prison-1.1.1.tar.xz 12860 SHA256 57da8dfb320575825854217e58a773d972c80e43031e83fd0e85cd2e68269884 SHA512 4f5099ba992908b9157665943b87347408b554d88bb6ad96baa0ef4c8053f5a12462e2d2778f00cec85c7788349daac698910233770fd677a17092d87ee22670 WHIRLPOOL a8898b86b26052ef5556b2469eb983e736bff7e234cf3df503b2345634f686f154fead27620e50041878e627ce2c518c5ae0045f8e18665f5df88b270ffeaace
diff --git a/media-libs/prison/metadata.xml b/media-libs/prison/metadata.xml
new file mode 100644
index 000000000000..8d1e86a9cefb
--- /dev/null
+++ b/media-libs/prison/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-libs/prison/prison-1.1.1.ebuild b/media-libs/prison/prison-1.1.1.ebuild
new file mode 100644
index 000000000000..05f0c35db1ef
--- /dev/null
+++ b/media-libs/prison/prison-1.1.1.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit kde4-base
+
+DESCRIPTION="QRCode and data matrix barcode library"
+HOMEPAGE="https://projects.kde.org/projects/kdesupport/prison"
+SRC_URI="mirror://kde/stable/${PN}/${PV}/src/${P}.tar.xz"
+
+LICENSE="GPL-2"
+KEYWORDS="amd64 ~arm ppc ppc64 x86 ~x86-fbsd"
+SLOT="4"
+IUSE="debug"
+
+DEPEND="
+ media-gfx/qrencode
+ media-libs/libdmtx
+"
+RDEPEND="${DEPEND}"
diff --git a/media-libs/pymemphis/Manifest b/media-libs/pymemphis/Manifest
new file mode 100644
index 000000000000..ff54f2ee6d90
--- /dev/null
+++ b/media-libs/pymemphis/Manifest
@@ -0,0 +1 @@
+DIST pymemphis-0.2.1.tar.gz 128848 RMD160 f1620db09a7b180badd2ae72e6add0fc6d147913 SHA1 b906cc539df7b65512e473281b88dc26c90439d8 SHA256 1d9740ebd81ad307e8941fbe0957dd17c08353610e6d7206c0dbc0099607efd4
diff --git a/media-libs/pymemphis/metadata.xml b/media-libs/pymemphis/metadata.xml
new file mode 100644
index 000000000000..dc06c49f3397
--- /dev/null
+++ b/media-libs/pymemphis/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>jlec@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/media-libs/pymemphis/pymemphis-0.2.1.ebuild b/media-libs/pymemphis/pymemphis-0.2.1.ebuild
new file mode 100644
index 000000000000..8b01018f722e
--- /dev/null
+++ b/media-libs/pymemphis/pymemphis-0.2.1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+PYTHON_DEPEND="2"
+SUPPORT_PYTHON_ABIS="1"
+PYTHON_EXPORT_PHASE_FUNCTIONS="1"
+RESTRICT_PYTHON_ABIS="3.* *-jython 2.7-pypy-*"
+
+AT_M4DIR="build/autotools/"
+
+inherit autotools python
+
+DESCRIPTION="Python bindings for the libmemphis library"
+HOMEPAGE="http://gitorious.net/pymemphis"
+SRC_URI="mirror://gentoo/${P}.tar.gz"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+LICENSE="LGPL-2.1"
+IUSE=""
+
+RDEPEND="
+ dev-python/pycairo
+ dev-python/pygobject:2
+ media-libs/memphis"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}"/${PN}-mainline
+
+src_prepare() {
+ eautoreconf
+ echo "#!${EPREFIX}/bin/sh" > py-compile
+ sed 's:0.1:0.2:g' -i pymemphis.pc.in || die
+ python_src_prepare
+}
+
+src_install() {
+ python_src_install
+ python_clean_installation_image
+ dodoc AUTHORS ChangeLog README || die
+}
diff --git a/media-libs/qhull/Manifest b/media-libs/qhull/Manifest
new file mode 100644
index 000000000000..3fb67aff5e81
--- /dev/null
+++ b/media-libs/qhull/Manifest
@@ -0,0 +1 @@
+DIST qhull-2012.1-src.tgz 716665 SHA256 a35ecaa610550b7f05c3ce373d89c30cf74b059a69880f03080c556daebcff88 SHA512 e35ea2cb73ef32b23b64a6594a8b5ea22ed8e2ea7535cfd72dca44331602368dfcb681600a0d2b090e80e67e6be7b32272244b9083d4805f2fbcf5897eb73240 WHIRLPOOL 37704b3f94b6d20c02886598cc2e862f47feb910e0d3259d686b1356242206b77640871509818c56530161720954214d41c295dfe740faa4ed575379b05259f6
diff --git a/media-libs/qhull/files/qhull-2010.1-cmake-install.patch b/media-libs/qhull/files/qhull-2010.1-cmake-install.patch
new file mode 100644
index 000000000000..9e1914d13d29
--- /dev/null
+++ b/media-libs/qhull/files/qhull-2010.1-cmake-install.patch
@@ -0,0 +1,98 @@
+diff -Nur qhull-2010.1.orig/CMakeLists.txt qhull-2010.1/CMakeLists.txt
+--- qhull-2010.1.orig/CMakeLists.txt 2010-10-03 23:04:04.000000000 +0100
++++ qhull-2010.1/CMakeLists.txt 2010-10-03 23:26:54.000000000 +0100
+@@ -1,8 +1,44 @@
+ project(qhull)
+-cmake_minimum_required(VERSION 2.4)
+-if(COMMAND cmake_policy)
+- cmake_policy(SET CMP0003 NEW)
+-endif(COMMAND cmake_policy)
++cmake_minimum_required(VERSION 2.6)
++
++
++set(QHULL_VERSION "2010.1")
++
++if(INCLUDE_INSTALL_DIR)
++else()
++set(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include)
++endif()
++if(LIB_INSTALL_DIR)
++else()
++set(LIB_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib)
++endif()
++if(BIN_INSTALL_DIR)
++else()
++set(BIN_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/bin)
++endif()
++if(DOC_INSTALL_DIR)
++else()
++set(DOC_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/doc/qhull)
++endif()
++
++message(STATUS)
++message(STATUS "========== qhull Build Information ==========")
++message(STATUS "Build Version: ${QHULL_VERSION}")
++message(STATUS "Install Prefix (CMAKE_INSTALL_PREFIX): ${CMAKE_INSTALL_PREFIX}")
++message(STATUS "Binary Directory (BIN_INSTALL_DIR): ${BIN_INSTALL_DIR}")
++message(STATUS "Library Directory (LIB_INSTALL_DIR): ${LIB_INSTALL_DIR}")
++message(STATUS "Include Directory (INCLUDE_INSTALL_DIR): ${INCLUDE_INSTALL_DIR}")
++message(STATUS "Documentation Directory (DOC_INSTALL_DIR): ${DOC_INSTALL_DIR}")
++message(STATUS)
++message(STATUS "To change any of these options, override them using -D{OPTION_NAME} on the commandline.")
++message(STATUS "To build and install qhull, run \"make\" and \"make install\"")
++message(STATUS)
++
+
+ add_subdirectory(src)
++option(WITH_STATIC_LIBS "Build with a static library" OFF)
++option(WITH_DOCS "Install HTML documentation" OFF)
+
++if (WITH_DOCS)
++install(DIRECTORY html/ DESTINATION ${DOC_INSTALL_DIR})
++endif (WITH_DOCS)
+diff -Nur qhull-2010.1.orig/src/CMakeLists.txt qhull-2010.1/src/CMakeLists.txt
+--- qhull-2010.1.orig/src/CMakeLists.txt 2010-10-03 23:04:04.000000000 +0100
++++ qhull-2010.1/src/CMakeLists.txt 2010-10-04 00:23:47.000000000 +0100
+@@ -23,8 +23,25 @@
+
+ file(GLOB qhull_hdr *.h)
+
+-add_library(qhull ${qhull_src})
++add_library(qhull SHARED ${qhull_src})
+ target_link_libraries(qhull m)
++if(UNIX)
++ if(APPLE)
++ set_target_properties(qhull PROPERTIES
++ INSTALL_NAME_DIR "${LIB_INSTALL_DIR}")
++ else(APPLE)
++ set_target_properties(qhull PROPERTIES
++ INSTALL_RPATH "${LIB_INSTALL_DIR}"
++ INSTALL_RPATH_USE_LINK_PATH TRUE
++ BUILD_WITH_INSTALL_RPATH FALSE)
++ endif(APPLE)
++endif(UNIX)
++
++if(WITH_STATIC_LIBS)
++ add_library(qhullstatic STATIC ${qhull_src})
++ set_property(TARGET qhullstatic PROPERTY OUTPUT_NAME "qhull")
++ install(TARGETS qhullstatic ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
++endif(WITH_STATIC_LIBS)
+
+ set(qhullcmd_SOURCES unix.c)
+ set(rbox_SOURCES rbox.c)
+@@ -36,6 +53,7 @@
+
+ add_executable(qhullcmd ${qhullcmd_SOURCES})
+ target_link_libraries(qhullcmd qhull)
++set_property(TARGET qhullcmd PROPERTY OUTPUT_NAME "qhull")
+
+ add_executable(rbox ${rbox_SOURCES})
+ target_link_libraries(rbox qhull)
+@@ -52,3 +70,7 @@
+ add_executable(qhalf ${qhalf_SOURCES})
+ target_link_libraries(qhalf qhull)
+
++install(TARGETS qhull qhullcmd rbox qconvex qdelaunay qvoronoi qhalf
++ RUNTIME DESTINATION ${BIN_INSTALL_DIR}
++ LIBRARY DESTINATION ${LIB_INSTALL_DIR})
++install(FILES ${qhull_hdr} DESTINATION ${INCLUDE_INSTALL_DIR}/qhull)
diff --git a/media-libs/qhull/files/qhull-2010.1-overflows.patch b/media-libs/qhull/files/qhull-2010.1-overflows.patch
new file mode 100644
index 000000000000..df4aa3da19c7
--- /dev/null
+++ b/media-libs/qhull/files/qhull-2010.1-overflows.patch
@@ -0,0 +1,50 @@
+From 176c01851026125f574a8223ad49ec58b2b58ec0 Mon Sep 17 00:00:00 2001
+From: Johannes Obermayr <johannesobermayr@gmx.de>
+Date: Fri, 23 Jul 2010 20:02:19 +0200
+Subject: [PATCH] Fix some serious compiler warnings causing build breakage on openSUSE.
+
+---
+ src/global.c | 2 +-
+ src/rboxlib.c | 6 +++---
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/global.c b/src/global.c
+index 3c6141a..4c9f56c 100644
+--- a/src/global.c
++++ b/src/global.c
+@@ -614,7 +614,7 @@ void qh_initflags(char *command) {
+ if (command <= &qh qhull_command[0] || command > &qh qhull_command[0] + sizeof(qh qhull_command)) {
+ if (command != &qh qhull_command[0]) {
+ *qh qhull_command= '\0';
+- strncat( qh qhull_command, command, sizeof( qh qhull_command));
++ strncat(qh qhull_command, command, sizeof(qh qhull_command)-strlen(qh qhull_command)-1);
+ }
+ while (*s && !isspace(*s)) /* skip program name */
+ s++;
+diff --git a/src/rboxlib.c b/src/rboxlib.c
+index 4f11d22..17d01ac 100644
+--- a/src/rboxlib.c
++++ b/src/rboxlib.c
+@@ -124,7 +124,7 @@ int qh_rboxpoints(FILE* fout, FILE* ferr, char* rbox_command) {
+ }
+
+ *command= '\0';
+- strncat(command, rbox_command, sizeof(command));
++ strncat(command, rbox_command, sizeof(command)-strlen(command)-1);
+
+ while (*s && !isspace(*s)) /* skip program name */
+ s++;
+@@ -346,8 +346,8 @@ int qh_rboxpoints(FILE* fout, FILE* ferr, char* rbox_command) {
+ }
+ }else if (israndom) {
+ seed= (int)time(&timedata);
+- sprintf(seedbuf, " t%d", seed); /* appends an extra t, not worth removing */
+- strncat(command, seedbuf, sizeof(command));
++ printf(seedbuf, " t%d", seed); /* appends an extra t, not worth removing */
++ strncat(command, seedbuf, sizeof(command)-strlen(command)-1);
+ t= strstr(command, " t ");
+ if (t)
+ strcpy(t+1, t+3); /* remove " t " */
+--
+1.6.1
+
diff --git a/media-libs/qhull/files/qhull-2012.1-64bit.patch b/media-libs/qhull/files/qhull-2012.1-64bit.patch
new file mode 100644
index 000000000000..4c909c28c8f2
--- /dev/null
+++ b/media-libs/qhull/files/qhull-2012.1-64bit.patch
@@ -0,0 +1,32 @@
+ src/libqhull/io.c | 4 ++--
+ src/libqhull/stat.c | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/libqhull/io.c b/src/libqhull/io.c
+index 09a0079..7ad4b35 100644
+--- a/src/libqhull/io.c
++++ b/src/libqhull/io.c
+@@ -68,8 +68,8 @@ void qh_produce_output2(void) {
+ qh_memstatistics(qh ferr);
+ d_1= sizeof(setT) + (qh hull_dim - 1) * SETelemsize;
+ qh_fprintf(qh ferr, 8040, "\
+- size in bytes: merge %d ridge %d vertex %d facet %d\n\
+- normal %d ridge vertices %d facet vertices or neighbors %d\n",
++ size in bytes: merge %zd ridge %zd vertex %zd facet %zd\n\
++ normal %d ridge vertices %d facet vertices or neighbors %zd\n",
+ (int)sizeof(mergeT), (int)sizeof(ridgeT),
+ (int)sizeof(vertexT), (int)sizeof(facetT),
+ qh normal_size, d_1, d_1 + SETelemsize);
+diff --git a/src/libqhull/stat.c b/src/libqhull/stat.c
+index 7dc60b9..5721130 100644
+--- a/src/libqhull/stat.c
++++ b/src/libqhull/stat.c
+@@ -472,7 +472,7 @@ void qh_initstatistics(void) {
+ qh_allstatI();
+ if (qhstat next > (int)sizeof(qhstat id)) {
+ qh_fprintf(qhmem.ferr, 6184, "qhull error (qh_initstatistics): increase size of qhstat.id[].\n\
+- qhstat.next %d should be <= sizeof(qhstat id) %d\n", qhstat next, (int)sizeof(qhstat id));
++ qhstat.next %d should be <= sizeof(qhstat id) %zd\n", qhstat next, (int)sizeof(qhstat id));
+ #if 0 /* for locating error, Znumridges should be duplicated */
+ for(i=0; i < ZEND; i++) {
+ int j;
diff --git a/media-libs/qhull/files/qhull-2012.1-format-security.patch b/media-libs/qhull/files/qhull-2012.1-format-security.patch
new file mode 100644
index 000000000000..14bce2baa75c
--- /dev/null
+++ b/media-libs/qhull/files/qhull-2012.1-format-security.patch
@@ -0,0 +1,16 @@
+ src/libqhull/io.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/libqhull/io.c b/src/libqhull/io.c
+index 09a0079..2bd066e 100644
+--- a/src/libqhull/io.c
++++ b/src/libqhull/io.c
+@@ -2238,7 +2238,7 @@ void qh_printfacet3math(FILE *fp, facetT *facet, qh_PRINT format, int notfirst)
+ qh_memfree(point, qh normal_size);
+ qh_settempfree(&points);
+ qh_settempfree(&vertices);
+- qh_fprintf(fp, 9110, endfmt);
++ fprintf(fp, "%s", endfmt);
+ } /* printfacet3math */
+
+
diff --git a/media-libs/qhull/files/qhull-3.1-makefile.patch b/media-libs/qhull/files/qhull-3.1-makefile.patch
new file mode 100644
index 000000000000..edb6e1766e4c
--- /dev/null
+++ b/media-libs/qhull/files/qhull-3.1-makefile.patch
@@ -0,0 +1,74 @@
+--- Makefile.old 2001-02-11 21:26:08.000000000 -0500
++++ Makefile 2007-11-18 08:03:19.000000000 -0500
+@@ -62,7 +62,7 @@
+
+ # OBJS in execution frequency order. CFILES after qhull.c are alphabetical
+ OBJS = user.o global.o stat.o io.o geom2.o poly2.o \
+- merge.o qhull.o geom.o poly.o qset.o mem.o
++ merge.o qhull.o geom.o poly.o qset.o mem.o unix.o
+
+ CFILES= unix.c qhull.c geom.c geom2.c global.c io.c mem.c merge.c poly.c \
+ poly2.c qset.c stat.c user.c qconvex.c qdelaun.c qhalf.c qvoronoi.c
+@@ -78,7 +78,7 @@
+ qh-poly.htm qh-qhull.htm qh-set.htm qh-stat.htm qh-user.htm \
+ qdelau_f.htm qhalf.htm qvoronoi.htm qvoron_f.htm rbox.htm
+
+-all: rbox qconvex qdelaunay qhalf qvoronoi qhull
++all: rbox qconvex qdelaunay qhalf qvoronoi qhull libqhull.so
+
+ unix.o: qhull.h user.h mem.h
+ qconvex.o: qhull.h user.h mem.h
+@@ -100,6 +100,8 @@
+
+ .c.o:
+ $(CC) -c $(CCOPTS1) $<
++ mkdir -p .libs
++ $(CC) -c $(CCOPTS1) -fPIC $< -o .libs/$@
+
+ clean:
+ rm -f *.o ../core qconvex qdelaunay qhalf qvoronoi qhull
+@@ -142,23 +144,23 @@
+
+ # don't use ../qconvex. Does not work on Red Hat Linux
+ qconvex: qconvex.o libqhull.a
+- $(CC) -o qconvex $(CCOPTS2) qconvex.o -L. -lqhull -lm
++ $(CC) -o qconvex $(CCOPTS2) qconvex.o -L. libqhull.a -lm
+ cp qconvex ..
+
+ qdelaunay: qdelaun.o libqhull.a
+- $(CC) -o qdelaunay $(CCOPTS2) qdelaun.o -L. -lqhull -lm
++ $(CC) -o qdelaunay $(CCOPTS2) qdelaun.o -L. libqhull.a -lm
+ cp qdelaunay ..
+
+ qhalf: qhalf.o libqhull.a
+- $(CC) -o qhalf $(CCOPTS2) qhalf.o -L. -lqhull -lm
++ $(CC) -o qhalf $(CCOPTS2) qhalf.o -L. libqhull.a -lm
+ cp qhalf ..
+
+ qvoronoi: qvoronoi.o libqhull.a
+- $(CC) -o qvoronoi $(CCOPTS2) qvoronoi.o -L. -lqhull -lm
++ $(CC) -o qvoronoi $(CCOPTS2) qvoronoi.o -L. libqhull.a -lm
+ cp qvoronoi ..
+
+ qhull: unix.o libqhull.a
+- $(CC) -o qhull $(CCOPTS2) unix.o -L. -lqhull -lm
++ $(CC) -o qhull $(CCOPTS2) unix.o -L. libqhull.a -lm
+ cp qhull ..
+ -chmod +x ../eg/q_test ../eg/q_eg ../eg/q_egtest
+ -cd ..; ./rbox D4 | ./qhull
+@@ -179,11 +181,13 @@
+ cp rbox ..
+
+ user_eg: user_eg.o libqhull.a
+- $(CC) -o user_eg $(CCOPTS2) user_eg.o -L. -lqhull -lm
++ $(CC) -o user_eg $(CCOPTS2) user_eg.o -L. libqhull.a -lm
+ cp user_eg ..
+
+ user_eg2: user_eg2.o libqhull.a
+- $(CC) -o user_eg2 $(CCOPTS2) user_eg2.o -L. -lqhull -lm
++ $(CC) -o user_eg2 $(CCOPTS2) user_eg2.o -L. libqhull.a -lm
+ cp user_eg2 ..
+
+ # end of Makefile
++libqhull.so: $(OBJS)
++ c++ -shared -Xlinker -soname -Xlinker $@ -o libqhull.so $(addprefix .libs/,$(OBJS))
diff --git a/media-libs/qhull/metadata.xml b/media-libs/qhull/metadata.xml
new file mode 100644
index 000000000000..40b5a161adbe
--- /dev/null
+++ b/media-libs/qhull/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>sci-mathematics</herd>
+ <longdescription lang="en">
+ Qhull computes the convex hull, Delaunay triangulation, Voronoi
+ diagram, halfspace intersection about a point, furthest-site
+ Delaunay triangulation, and furthest-site Voronoi diagram. The
+ source code runs in 2-d, 3-d, 4-d, and higher dimensions. Qhull
+ implements the Quickhull algorithm for computing the convex hull. It
+ handles roundoff errors from floating point arithmetic. It computes
+ volumes, surface areas, and approximations to the convex hull.
+ Qhull does not support constrained Delaunay triangulations,
+ triangulation of non-convex surfaces, mesh generation of non-convex
+ objects, or medium-sized inputs in 9-D and higher.
+</longdescription>
+</pkgmetadata>
diff --git a/media-libs/qhull/qhull-2012.1-r1.ebuild b/media-libs/qhull/qhull-2012.1-r1.ebuild
new file mode 100644
index 000000000000..15f0ea8cdb10
--- /dev/null
+++ b/media-libs/qhull/qhull-2012.1-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 cmake-utils flag-o-matic
+
+MY_P="${PN}${PV}"
+DESCRIPTION="Geometry library"
+HOMEPAGE="http://www.qhull.org/"
+SRC_URI="${HOMEPAGE}/download/${P}-src.tgz"
+
+SLOT="0"
+LICENSE="BSD"
+KEYWORDS="amd64 ~arm ppc ppc64 x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="doc static-libs"
+
+DOCS=( Announce.txt File_id.diz README.txt REGISTER.txt )
+
+src_configure() {
+ append-flags -fno-strict-aliasing
+ mycmakeargs+=(
+ -DLIB_INSTALL_DIR="${EPREFIX}"/usr/$(get_libdir)
+ -DDOC_INSTALL_DIR="${EPREFIX}"/usr/share/doc/${PF}/html
+ )
+ cmake-utils_src_configure
+}
+
+pkg_preinst() {
+ # See https://bugs.gentoo.org/show_bug.cgi?id=435006
+ # If qhull-2010 is installed we need to remove its include dir so
+ # that it can be replaced with a symlink in this version.
+ rm -rf "${ROOT}"usr/include/qhull
+}
+
+src_install() {
+ cmake-utils_src_install
+ # compatibility with previous installs
+ dosym libqhull /usr/include/qhull
+ use doc || rm -rf "${ED}"/usr/share/doc/${PF}/html
+ use static-libs || rm -f "${ED}"/usr/$(get_libdir)/lib*.a
+}
diff --git a/media-libs/qhull/qhull-2012.1-r3.ebuild b/media-libs/qhull/qhull-2012.1-r3.ebuild
new file mode 100644
index 000000000000..9e6bf928df37
--- /dev/null
+++ b/media-libs/qhull/qhull-2012.1-r3.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils flag-o-matic
+
+MY_P="${PN}${PV}"
+
+DESCRIPTION="Geometry library"
+HOMEPAGE="http://www.qhull.org/"
+SRC_URI="${HOMEPAGE}/download/${P}-src.tgz"
+
+SLOT="0"
+LICENSE="BSD"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="doc static-libs"
+
+DOCS=( Announce.txt File_id.diz README.txt REGISTER.txt )
+
+PATCHES=( "${FILESDIR}"/${P}-64bit.patch )
+
+src_configure() {
+ append-flags -fno-strict-aliasing
+ mycmakeargs+=(
+ -DLIB_INSTALL_DIR="${EPREFIX}"/usr/$(get_libdir)
+ -DDOC_INSTALL_DIR="${EPREFIX}"/usr/share/doc/${PF}/html
+ )
+ cmake-utils_src_configure
+}
+
+pkg_preinst() {
+ # See https://bugs.gentoo.org/show_bug.cgi?id=435006
+ # If qhull-2010 is installed we need to remove its include dir so
+ # that it can be replaced with a symlink in this version.
+ rm -rf "${EROOT}"usr/include/qhull || die
+}
+
+src_install() {
+ cmake-utils_src_install
+ # compatibility with previous installs
+ dosym libqhull /usr/include/qhull
+ if ! use doc; then
+ rm -rf "${ED}"/usr/share/doc/${PF}/html || die
+ fi
+ if ! use static-libs; then
+ rm -f "${ED}"/usr/$(get_libdir)/lib*.a || die
+ fi
+}
diff --git a/media-libs/qhull/qhull-2012.1-r4.ebuild b/media-libs/qhull/qhull-2012.1-r4.ebuild
new file mode 100644
index 000000000000..56c1456b9c89
--- /dev/null
+++ b/media-libs/qhull/qhull-2012.1-r4.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 flag-o-matic
+
+MY_P="${PN}${PV}"
+
+DESCRIPTION="Geometry library"
+HOMEPAGE="http://www.qhull.org/"
+SRC_URI="${HOMEPAGE}/download/${P}-src.tgz"
+
+SLOT="0"
+LICENSE="BSD"
+KEYWORDS="~amd64 arm ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="doc static-libs"
+
+DOCS=( Announce.txt File_id.diz README.txt REGISTER.txt )
+
+PATCHES=(
+ "${FILESDIR}"/${P}-64bit.patch
+ "${FILESDIR}"/${P}-format-security.patch
+ )
+
+src_configure() {
+ append-flags -fno-strict-aliasing
+ mycmakeargs+=(
+ -DLIB_INSTALL_DIR="${EPREFIX}"/usr/$(get_libdir)
+ -DDOC_INSTALL_DIR="${EPREFIX}"/usr/share/doc/${PF}/html
+ )
+ cmake-utils_src_configure
+}
+
+pkg_preinst() {
+ # See https://bugs.gentoo.org/show_bug.cgi?id=435006
+ # If qhull-2010 is installed we need to remove its include dir so
+ # that it can be replaced with a symlink in this version.
+ rm -rf "${EROOT}"usr/include/qhull || die
+}
+
+src_install() {
+ cmake-utils_src_install
+ # compatibility with previous installs
+ dosym libqhull /usr/include/qhull
+ if ! use doc; then
+ rm -rf "${ED}"/usr/share/doc/${PF}/html || die
+ fi
+ if ! use static-libs; then
+ rm -f "${ED}"/usr/$(get_libdir)/lib*.a || die
+ fi
+}
diff --git a/media-libs/qimageblitz/Manifest b/media-libs/qimageblitz/Manifest
new file mode 100644
index 000000000000..c4e3a063d5bf
--- /dev/null
+++ b/media-libs/qimageblitz/Manifest
@@ -0,0 +1 @@
+DIST qimageblitz-0.0.6.tar.bz2 57617 SHA256 9f102269dec50641440e23a449df215a0db9efef9a3969939d618c5e78a5010f SHA512 dbd506c01622824efdec69640eb95e737d7848fa15d33351084a6499ca2321d7bc08e080d1e443f8ab9015cd2967c10d9b5aa2f3c6eaa7558153821c46133af9 WHIRLPOOL e13f5c11e2094296af558de4e9054d3c5a162be5e40a0418c5a505e222fe749c8dac319defc25bc2a2b6a5238e5d1fefb966fd64198d43b6b8af99d608362b45
diff --git a/media-libs/qimageblitz/files/qimageblitz-0.0.6-gcc.patch b/media-libs/qimageblitz/files/qimageblitz-0.0.6-gcc.patch
new file mode 100644
index 000000000000..9b4d8128cb1d
--- /dev/null
+++ b/media-libs/qimageblitz/files/qimageblitz-0.0.6-gcc.patch
@@ -0,0 +1,16 @@
+--- blitz/CMakeLists.txt
++++ blitz/CMakeLists.txt
+@@ -31,12 +31,8 @@
+
+ if(HAVE_MMX)
+ if(NOT APPLE AND NOT WIN32)
++ enable_language(ASM)
+ set( blitz_LIB_SRCS ${blitz_LIB_SRCS} asm_scale.S )
+- add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/asm_scale.o
+- COMMAND gcc -c ${CMAKE_CURRENT_SOURCE_DIR}/asm_scale.S
+- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/asm_scale.S )
+- set( blitz_LIB_EXTRA_SRCS ${CMAKE_CURRENT_BINARY_DIR}/asm_scale.o )
+- set(HAVE_EXTERNAL_ASM TRUE)
+ endif(NOT APPLE AND NOT WIN32)
+ endif(HAVE_MMX)
+ configure_file (config-processor.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-processor.h )
diff --git a/media-libs/qimageblitz/files/qimageblitz-9999-exec-stack.patch b/media-libs/qimageblitz/files/qimageblitz-9999-exec-stack.patch
new file mode 100644
index 000000000000..8692c240f7bb
--- /dev/null
+++ b/media-libs/qimageblitz/files/qimageblitz-9999-exec-stack.patch
@@ -0,0 +1,11 @@
+diff -uar qimageblitz/blitz/asm_scale.S qimageblitz~/blitz/asm_scale.S
+--- qimageblitz-orig/blitz/asm_scale.S 2007-10-17 01:17:57.000000000 +0200
++++ qimageblitz/blitz/asm_scale.S 2007-10-17 01:19:12.000000000 +0200
+@@ -814,3 +814,7 @@
+ SIZE(qimageScale_mmx_AARGBA)
+
+ #endif
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
++
diff --git a/media-libs/qimageblitz/metadata.xml b/media-libs/qimageblitz/metadata.xml
new file mode 100644
index 000000000000..8d1e86a9cefb
--- /dev/null
+++ b/media-libs/qimageblitz/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-libs/qimageblitz/qimageblitz-0.0.6-r1.ebuild b/media-libs/qimageblitz/qimageblitz-0.0.6-r1.ebuild
new file mode 100644
index 000000000000..b246de4b21ff
--- /dev/null
+++ b/media-libs/qimageblitz/qimageblitz-0.0.6-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils
+
+DESCRIPTION="A graphical effect and filter library for KDE4"
+HOMEPAGE="http://websvn.kde.org/trunk/kdesupport/qimageblitz/"
+SRC_URI="mirror://kde/stable/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2 LGPL-2"
+KEYWORDS="amd64 ~arm hppa ppc ppc64 x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris"
+SLOT="0"
+IUSE="cpu_flags_x86_3dnow altivec debug cpu_flags_x86_mmx cpu_flags_x86_sse cpu_flags_x86_sse2"
+
+DEPEND="
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-9999-exec-stack.patch"
+ "${FILESDIR}/${P}-gcc.patch"
+)
+
+src_configure() {
+ mycmakeargs=(
+ $(cmake-utils_use_has cpu_flags_x86_3dnow 3dnow)
+ $(cmake-utils_use_has altivec)
+ $(cmake-utils_use_has cpu_flags_x86_mmx mmx)
+ $(cmake-utils_use_has cpu_flags_x86_sse sse)
+ $(cmake-utils_use_has cpu_flags_x86_sse2 sse2)
+ )
+ cmake-utils_src_configure
+}
diff --git a/media-libs/qt-gstreamer/Manifest b/media-libs/qt-gstreamer/Manifest
new file mode 100644
index 000000000000..1458453d100a
--- /dev/null
+++ b/media-libs/qt-gstreamer/Manifest
@@ -0,0 +1 @@
+DIST qt-gstreamer-1.2.0.tar.xz 313632 SHA256 9f3b492b74cad9be918e4c4db96df48dab9c012f2ae5667f438b64a4d92e8fd4 SHA512 ae58c72765d590b84fa8709b45934ac464d7e00dba862783a2c4fe9d41afd09c6e5f95523cdf465fcfd2c6fa705335071b101912c42cd6c1fd15ae207b0864c7 WHIRLPOOL 2e8c5d70a384ee472dac265179c471369d64fb2deabe239c13cd4eb437358c97c316a486ae4292e8bdb3c823b521b656b665292392f0bb91d1c233869fb09789
diff --git a/media-libs/qt-gstreamer/files/qt-gstreamer-1.2.0-boost157.patch b/media-libs/qt-gstreamer/files/qt-gstreamer-1.2.0-boost157.patch
new file mode 100644
index 000000000000..a795420e3bcc
--- /dev/null
+++ b/media-libs/qt-gstreamer/files/qt-gstreamer-1.2.0-boost157.patch
@@ -0,0 +1,34 @@
+From fbb9dc6e291eaa058f3ef1cd93711265bfbfd162 Mon Sep 17 00:00:00 2001
+From: Heiko Becker <heirecka@exherbo.org>
+Date: Fri, 7 Nov 2014 00:11:02 +0100
+Subject: [PATCH] Workaround build failures with boost>=1.57 and moc
+
+Otherwise I get the following error message:
+'usr/include/boost/type_traits/detail/has_binary_operator.hp:50:
+Parse error at "BOOST_JOIN"'. See
+https://bugreports.qt-project.org/browse/QTBUG-22829 for details.
+
+The old workaround to define BOOST_TT_HAS_OPERATOR_HPP_INCLUDED
+doesn't seem to work here.
+---
+ src/QGlib/connect.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/QGlib/connect.cpp b/src/QGlib/connect.cpp
+index 9ff6fde..58a3367 100644
+--- a/src/QGlib/connect.cpp
++++ b/src/QGlib/connect.cpp
+@@ -21,8 +21,10 @@
+ #include <QtCore/QHash>
+ #include <QtCore/QMutex>
+ #include <boost/multi_index_container.hpp>
++#ifndef Q_MOC_RUN // See: https://bugreports.qt-project.org/browse/QTBUG-22829
+ #include <boost/multi_index/sequenced_index.hpp>
+ #include <boost/multi_index/ordered_index.hpp>
++#endif
+ #include <boost/multi_index/member.hpp>
+
+ namespace QGlib {
+--
+2.1.3
+
diff --git a/media-libs/qt-gstreamer/metadata.xml b/media-libs/qt-gstreamer/metadata.xml
new file mode 100644
index 000000000000..a23f444b67d6
--- /dev/null
+++ b/media-libs/qt-gstreamer/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-libs/qt-gstreamer/qt-gstreamer-1.2.0-r1.ebuild b/media-libs/qt-gstreamer/qt-gstreamer-1.2.0-r1.ebuild
new file mode 100644
index 000000000000..a33c8fe6da8d
--- /dev/null
+++ b/media-libs/qt-gstreamer/qt-gstreamer-1.2.0-r1.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+if [[ ${PV} != *9999* ]]; then
+ SRC_URI="http://gstreamer.freedesktop.org/src/${PN}/${P}.tar.xz"
+ KEYWORDS="~amd64 ~arm ~x86"
+else
+ GIT_ECLASS="git-r3"
+ EGIT_REPO_URI=( "git://anongit.freedesktop.org/gstreamer/${PN}" )
+ KEYWORDS=""
+fi
+
+inherit cmake-utils ${GIT_ECLASS} multibuild
+
+DESCRIPTION="QtGStreamer provides C++ bindings for GStreamer with a Qt-style API"
+HOMEPAGE="http://gstreamer.freedesktop.org/modules/qt-gstreamer.html"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="+qt4 qt5 test"
+
+REQUIRED_USE="|| ( qt4 qt5 )"
+
+RDEPEND="
+ dev-libs/glib:2
+ >=dev-libs/boost-1.40:=
+ qt4? (
+ dev-qt/qtcore:4
+ dev-qt/qtdeclarative:4
+ dev-qt/qtgui:4
+ dev-qt/qtopengl:4
+ )
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtdeclarative:5
+ dev-qt/qtgui:5
+ dev-qt/qtopengl:5
+ dev-qt/qtquick1:5
+ dev-qt/qtwidgets:5
+ )
+ media-libs/gstreamer:1.0
+ media-libs/gst-plugins-base:1.0
+"
+DEPEND="
+ ${RDEPEND}
+ test? (
+ qt4? (
+ dev-qt/qttest:4
+ )
+ )
+"
+
+PATCHES=( "${FILESDIR}/${P}-boost157.patch" )
+
+# bug 497880
+RESTRICT="test"
+
+pkg_setup() {
+ MULTIBUILD_VARIANTS=( $(usex qt4 4 '') $(usex qt5 5 '') )
+}
+
+src_configure() {
+ myconfigure() {
+ local mycmakeargs=(
+ -DQTGSTREAMER_EXAMPLES=OFF
+ $(cmake-utils_use test QTGSTREAMER_TESTS)
+ -DQT_VERSION=${MULTIBUILD_VARIANT}
+ )
+ cmake-utils_src_configure
+ }
+
+ multibuild_foreach_variant myconfigure
+}
+
+src_compile() {
+ multibuild_foreach_variant cmake-utils_src_compile
+}
+
+src_install() {
+ multibuild_foreach_variant cmake-utils_src_install
+}
diff --git a/media-libs/qt-gstreamer/qt-gstreamer-1.2.0.ebuild b/media-libs/qt-gstreamer/qt-gstreamer-1.2.0.ebuild
new file mode 100644
index 000000000000..95226909f246
--- /dev/null
+++ b/media-libs/qt-gstreamer/qt-gstreamer-1.2.0.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+QT_MINIMAL="4.7.0"
+
+if [[ ${PV} != *9999* ]]; then
+ SRC_URI="http://gstreamer.freedesktop.org/src/${PN}/${P}.tar.xz"
+ KEYWORDS="amd64 ~arm ppc ppc64 x86"
+else
+ GIT_ECLASS="git-r3"
+ EGIT_REPO_URI=( "git://anongit.freedesktop.org/gstreamer/${PN}" )
+ KEYWORDS=""
+fi
+
+inherit cmake-utils ${GIT_ECLASS}
+
+DESCRIPTION="QtGStreamer provides C++ bindings for GStreamer with a Qt-style API"
+HOMEPAGE="http://gstreamer.freedesktop.org/modules/qt-gstreamer.html"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="test"
+
+RDEPEND="
+ dev-libs/glib:2
+ >=dev-libs/boost-1.40:=
+ >=dev-qt/qtcore-${QT_MINIMAL}:4
+ >=dev-qt/qtdeclarative-${QT_MINIMAL}:4
+ >=dev-qt/qtgui-${QT_MINIMAL}:4
+ >=dev-qt/qtopengl-${QT_MINIMAL}:4
+ media-libs/gstreamer:1.0
+ media-libs/gst-plugins-base:1.0
+"
+DEPEND="
+ ${RDEPEND}
+ test? ( >=dev-qt/qttest-${QT_MINIMAL}:4 )
+"
+
+# bug 497880
+RESTRICT="test"
+
+src_configure() {
+ local mycmakeargs=(
+ -DQTGSTREAMER_EXAMPLES=OFF
+ $(cmake-utils_use test QTGSTREAMER_TESTS)
+ )
+
+ cmake-utils_src_configure
+}
diff --git a/media-libs/quarter/Manifest b/media-libs/quarter/Manifest
new file mode 100644
index 000000000000..6dbd214c5e0b
--- /dev/null
+++ b/media-libs/quarter/Manifest
@@ -0,0 +1 @@
+DIST Quarter-1.0.0.tar.gz 617534 SHA256 ed7a29856e2bdc9db20b7c4fa27c47af1bf325d62ef3700fccbc83476f41da1a SHA512 ab7828889b612425c6341f69abaf6bc5c02ed5f918a5ad631ad9e0a6ecb9fd5800e08d091fd39bb05141e0db521d305471f66a3d14f149928add3f1d776e497b WHIRLPOOL cfb6f8d770449b7b00fa04c60f6607b87a4c5620a1b5363e46bdc3e62eb39ec42d6a0a7d1f793d96a7bc0d5af4db5c4c227219c4790fe6a9bd67241b8a44652c
diff --git a/media-libs/quarter/files/quarter-1.0.0-gcc44.patch b/media-libs/quarter/files/quarter-1.0.0-gcc44.patch
new file mode 100644
index 000000000000..e0f422b4cd36
--- /dev/null
+++ b/media-libs/quarter/files/quarter-1.0.0-gcc44.patch
@@ -0,0 +1,11 @@
+diff -ruN Quarter-1.0.0/src/Quarter/Quarter.cpp my/src/Quarter/Quarter.cpp
+--- Quarter-1.0.0/src/Quarter/Quarter.cpp 2009-01-26 22:47:07.000000000 +0100
++++ my/src/Quarter/Quarter.cpp 2014-08-14 01:48:45.019728780 +0200
+@@ -123,6 +123,7 @@
+ \subpage examiner
+ */
+
++#include <stdio.h>
+
+ #include <Inventor/SoDB.h>
+ #include <Inventor/nodekits/SoNodeKit.h>
diff --git a/media-libs/quarter/metadata.xml b/media-libs/quarter/metadata.xml
new file mode 100644
index 000000000000..e4c38b722575
--- /dev/null
+++ b/media-libs/quarter/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>reavertm@gentoo.org</email>
+ <name>Maciej Mrozowski</name>
+</maintainer>
+</pkgmetadata>
diff --git a/media-libs/quarter/quarter-1.0.0-r1.ebuild b/media-libs/quarter/quarter-1.0.0-r1.ebuild
new file mode 100644
index 000000000000..1359ff911a73
--- /dev/null
+++ b/media-libs/quarter/quarter-1.0.0-r1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools-utils
+
+MY_P="${P/q/Q}"
+
+DESCRIPTION="A glue between Nokia Qt4 and Coin3D"
+HOMEPAGE="http://www.coin3d.org/lib/quarter"
+SRC_URI="ftp://ftp.coin3d.org/pub/coin/src/all/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+SLOT="0"
+IUSE="debug doc static-libs"
+
+RDEPEND="
+ >=media-libs/coin-3.0.0[javascript]
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ dev-qt/qtopengl:4
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )
+"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}/${P}-gcc44.patch"
+)
+
+DOCS=(AUTHORS NEWS README)
+
+src_configure() {
+ local myeconfargs=(
+ htmldir="${ROOT}usr/share/doc/${PF}/html"
+ --enable-pkgconfig
+ --with-coin
+ $(use_enable debug)
+ $(use_enable debug symbols)
+ $(use_enable doc html)
+ )
+ autotools-utils_src_configure
+}
diff --git a/media-libs/quesoglc/Manifest b/media-libs/quesoglc/Manifest
new file mode 100644
index 000000000000..b5103e9ebde4
--- /dev/null
+++ b/media-libs/quesoglc/Manifest
@@ -0,0 +1 @@
+DIST quesoglc-0.7.2-free.tar.bz2 657394 SHA256 7ade9870ef1a96f392388fa397a34930860bb21fcf8a54ea090f0bdfb887ad21 SHA512 107cc28fe85722614bc6c222a64914eeef0de1c5dfa01cef9ec611e5caff54fdbcf2b387d413c0b56533d33e06741ca8dee99fc0c5ee1e63d9a95d86c6c69190 WHIRLPOOL 69901c9d13ca6b07820c4ae5a0311eed7b047876e73389c02b95377449e7f45f3328c60f350281d634b4843a6a5a6577eea2d8572a2d81f605dd1a435b016457
diff --git a/media-libs/quesoglc/metadata.xml b/media-libs/quesoglc/metadata.xml
new file mode 100644
index 000000000000..728be142d715
--- /dev/null
+++ b/media-libs/quesoglc/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>games</herd>
+ <upstream>
+ <remote-id type="sourceforge">quesoglc</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/quesoglc/quesoglc-0.7.2.ebuild b/media-libs/quesoglc/quesoglc-0.7.2.ebuild
new file mode 100644
index 000000000000..a6152667ef7f
--- /dev/null
+++ b/media-libs/quesoglc/quesoglc-0.7.2.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 eutils
+
+DESCRIPTION="A free implementation of the OpenGL Character Renderer (GLC)"
+HOMEPAGE="http://quesoglc.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}-free.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ppc sparc x86"
+IUSE="doc examples static-libs"
+
+RDEPEND="virtual/opengl
+ virtual/glu
+ media-libs/fontconfig
+ media-libs/freetype:2
+ dev-libs/fribidi"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+src_prepare() {
+ rm -rf src/fribidi
+}
+
+src_configure() {
+ # Uses its own copy of media-libs/glew with GLEW_MX
+ econf \
+ --disable-executables \
+ --with-fribidi \
+ --without-glew \
+ $(use_enable static-libs static)
+}
+
+src_compile() {
+ emake
+ if use doc ; then
+ cd docs
+ doxygen -u Doxyfile && doxygen || die
+ fi
+}
+
+src_install() {
+ default
+ if use doc ; then
+ dohtml docs/html/*
+ fi
+ if use examples ; then
+ insinto /usr/share/doc/${PF}/examples
+ doins examples/*.c
+ fi
+ prune_libtool_files
+}
diff --git a/media-libs/quvi/Manifest b/media-libs/quvi/Manifest
new file mode 100644
index 000000000000..9fb74c59180b
--- /dev/null
+++ b/media-libs/quvi/Manifest
@@ -0,0 +1,4 @@
+DIST quvi-0.2.19.tar.xz 363120 SHA256 48bcdf2d58a7df8acd8c0562d3f485b2892902eb982a9d8eb279b273e722daeb SHA512 a013f3ffcbb8a970148e7a2a40c6994600c6430f10f604df57884205f25cb1dbb56608d5a48b4b8b1c280230cef4c35db89fbb7678834fefee524e9ee4146ffb WHIRLPOOL bac3fae5de038a6a278a82d5bf80718dec8971ac77bc4186f95e6cf88408ca73983debd213d864e6e3a451d20da8d014fc4030df9af4a4e87c13beaa4fd611e6
+DIST quvi-0.4.2.tar.xz 118756 SHA256 91a1396ce9a56ac3cfa3a5edabf8d214b3c6b2a35afad3b5f2f9feb29ba19026 SHA512 a0cd26711123bd61e91534e510dd96fe290eb19eacaabe52c36b0064dee1ce410e80eddbe5995392e3769ae3c602b93b5132507a2d43d765e2b98e8488ea8f86 WHIRLPOOL 4d94d6d6dada1f009e9c3557e2a50405db3ac7802a57f8c24092b619b208c049c4004ea9c043f88f703adfc7ad72368fcc82f9d1a08c26dde87a5d952b4ce9b5
+DIST quvi-0.9.4.tar.xz 315768 SHA256 350952639b46f72291bc02b63627f3aec4ce8bfdb6f42b3e11469c6b2dcff910 SHA512 fcec2a95de1a93734803177b515f0578a0722950d145ac8a37c48864281152005190bb9c9a76473b94df9b74ca80a58363435e196106b15093f484e6d4a1316d WHIRLPOOL 4d9ccea83c9663520606c4417fd775009b3d409fabafb3c05ac3a851ffdc2ecbcae8ff73deb4bf29f9aa2af02885a41bfef275a392b774dad3bc59948e93e78e
+DIST quvi-0.9.5.tar.xz 316676 SHA256 cb3918aad990b9bc49828a5071159646247199a63de0dd4c706adc5c8cd0a2c0 SHA512 ef50160b7f2b6b8c9049eb995cb26da3100b10e7af8206d98d2e128cde300ceb05a24dded06d7d49c0e691fcc2de5a4c5c9e9f439d40ca52cd0a3a24330c6d79 WHIRLPOOL 6f598fcfc70a751084a8ff6efc0399d2c5674e20c5e9ed242ba8c660a018728154395184ec60eaa57feab6fcb0c9da3bd32f528fc1f50b05bb4aa3493b23f777
diff --git a/media-libs/quvi/files/quvi-0.9.1-automagic.patch b/media-libs/quvi/files/quvi-0.9.1-automagic.patch
new file mode 100644
index 000000000000..0f011eb2fe7c
--- /dev/null
+++ b/media-libs/quvi/files/quvi-0.9.1-automagic.patch
@@ -0,0 +1,47 @@
+--- quvi-0.9.1/configure.ac
++++ quvi-0.9.1/configure.ac
+@@ -54,22 +54,30 @@
+ PKG_CHECK_MODULES([gobject], [gobject-2.0 >= 2.24])
+ PKG_CHECK_MODULES([glib], [glib-2.0 >= 2.24])
+
+-PKG_CHECK_MODULES([json_glib], [json-glib-1.0 >= 0.12],
+- [have_json_glib=yes
+- AC_DEFINE([HAVE_JSON_GLIB], [1], [Define to json-glib package])
+- ],
+- [have_json_glib=no
+- AC_MSG_NOTICE([json-glib 0.12+ not found, building without json output])
+- ])
++AC_ARG_ENABLE([json],
++ AS_HELP_STRING([--disable-json], [Disable support for JSON output]))
++AS_IF([test "x$enable_json" != "xno"], [
++ PKG_CHECK_MODULES([json_glib], [json-glib-1.0 >= 0.12],
++ [have_json_glib=yes
++ AC_DEFINE([HAVE_JSON_GLIB], [1], [Define to json-glib package])
++ ],
++ [have_json_glib=no
++ AC_MSG_ERROR([json-glib 0.12+ not found])
++ ])
++])
+ AM_CONDITIONAL([HAVE_JSON_GLIB], [test x"$have_json_glib" = "xyes"])
+
+-PKG_CHECK_MODULES([libxml], [libxml-2.0 >= 2.7.8],
+- [have_libxml=yes
+- AC_DEFINE([HAVE_LIBXML], [1], [Define to libxml package])
+- ],
+- [have_libxml=no
+- AC_MSG_NOTICE([libxml 2.7.8+ not found, building without xml output])
+- ])
++AC_ARG_ENABLE([xml],
++ AS_HELP_STRING([--disable-xml], [Disable support for XML output]))
++AS_IF([test "x$enable_xml" != "xno"], [
++ PKG_CHECK_MODULES([libxml], [libxml-2.0 >= 2.7.8],
++ [have_libxml=yes
++ AC_DEFINE([HAVE_LIBXML], [1], [Define to libxml package])
++ ],
++ [have_libxml=no
++ AC_MSG_ERROR([libxml 2.7.8+ not found])
++ ])
++])
+ AM_CONDITIONAL([HAVE_LIBXML], [test x"$have_libxml" = "xyes"])
+
+ # Checks for header files.
diff --git a/media-libs/quvi/metadata.xml b/media-libs/quvi/metadata.xml
new file mode 100644
index 000000000000..1be208d63c61
--- /dev/null
+++ b/media-libs/quvi/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>
+ <use>
+ <flag name="json">Enable support for JSON output</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">quvi</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/quvi/quvi-0.2.19.ebuild b/media-libs/quvi/quvi-0.2.19.ebuild
new file mode 100644
index 000000000000..52d50c1993d1
--- /dev/null
+++ b/media-libs/quvi/quvi-0.2.19.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="library for parsing video download links"
+HOMEPAGE="http://quvi.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PV:0:3}/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86"
+IUSE="examples test offensive static-libs"
+
+RDEPEND=">=net-misc/curl-7.18.0
+ dev-lang/lua[deprecated]"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+# tests fetch data from live websites, so it's rather normal that they
+# will fail
+RESTRICT="test"
+
+src_configure() {
+ econf \
+ $(use_enable offensive nsfw) \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+
+ if use examples ; then
+ docinto examples
+ dodoc examples/*.{c,h}
+ fi
+
+ find "${D}" -name '*.la' -delete
+}
diff --git a/media-libs/quvi/quvi-0.4.2.ebuild b/media-libs/quvi/quvi-0.4.2.ebuild
new file mode 100644
index 000000000000..42a1d93b6564
--- /dev/null
+++ b/media-libs/quvi/quvi-0.4.2.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="A command line tool for parsing video download links"
+HOMEPAGE="http://quvi.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PV:0:3}/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 ~hppa ppc ppc64 x86"
+IUSE=""
+
+RDEPEND=">=net-misc/curl-7.18.2
+ >=media-libs/libquvi-0.4.0"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig"
+
+src_configure() {
+ econf \
+ --with-manual
+}
diff --git a/media-libs/quvi/quvi-0.9.4.ebuild b/media-libs/quvi/quvi-0.9.4.ebuild
new file mode 100644
index 000000000000..833f647a8ee3
--- /dev/null
+++ b/media-libs/quvi/quvi-0.9.4.ebuild
@@ -0,0 +1,39 @@
+# 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
+
+DESCRIPTION="A command line tool for parsing video download links"
+HOMEPAGE="http://quvi.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PV:0:3}/${P}.tar.xz"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="json nls xml"
+
+RDEPEND=">=dev-libs/glib-2.24:2
+ >=net-misc/curl-7.21.0
+ >=media-libs/libquvi-0.9.2:=
+ json? ( >=dev-libs/json-glib-0.12 )
+ nls? ( virtual/libintl )
+ xml? ( >=dev-libs/libxml2-2.7.8:2 )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )"
+
+PATCHES=( "${FILESDIR}"/${PN}-0.9.1-automagic.patch )
+
+src_configure() {
+ local myeconfargs=(
+ --with-manual
+ $(use_enable json)
+ $(use_enable xml)
+ )
+ autotools-utils_src_configure
+}
diff --git a/media-libs/quvi/quvi-0.9.5.ebuild b/media-libs/quvi/quvi-0.9.5.ebuild
new file mode 100644
index 000000000000..48e11b4026c1
--- /dev/null
+++ b/media-libs/quvi/quvi-0.9.5.ebuild
@@ -0,0 +1,39 @@
+# 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
+
+DESCRIPTION="A command line tool for parsing video download links"
+HOMEPAGE="http://quvi.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PV:0:3}/${P}.tar.xz"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="amd64 ~hppa ppc64 x86"
+IUSE="json nls xml"
+
+RDEPEND=">=dev-libs/glib-2.24:2
+ >=net-misc/curl-7.21.0
+ >=media-libs/libquvi-0.9.2:=
+ json? ( >=dev-libs/json-glib-0.12 )
+ nls? ( virtual/libintl )
+ xml? ( >=dev-libs/libxml2-2.7.8:2 )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )"
+
+PATCHES=( "${FILESDIR}"/${PN}-0.9.1-automagic.patch )
+
+src_configure() {
+ local myeconfargs=(
+ --with-manual
+ $(use_enable json)
+ $(use_enable xml)
+ )
+ autotools-utils_src_configure
+}
diff --git a/media-libs/raptor/Manifest b/media-libs/raptor/Manifest
new file mode 100644
index 000000000000..25d5a7931254
--- /dev/null
+++ b/media-libs/raptor/Manifest
@@ -0,0 +1,2 @@
+DIST raptor2-2.0.14.tar.gz 1877454 SHA256 cb447b7c684cbe60f1266d622691fd20fdcf7b91f4a470c6de5fc8e8961df1b2 SHA512 399e23f2c549df8f1d709d67129d3fcf7899a8cdcdd8071c165f2b4106f397cce05fc69a6d7b176857011bf95723c0909b6510eded12f82217f89925bc1ba7c2 WHIRLPOOL dae2b80f3c0e82a9340b096ca52e89b8ccc6c849a98a7744d648f68b75dec1ff615e008a334bc7c0cc54259c9dcc07dfd6079805a0345aa7d89c9058cfd1656b
+DIST raptor2-2.0.9.tar.gz 1788163 SHA256 e26fb9c18e6ebf71100f434070d50196a21d592b715e361850c3b4e789b5f6ef SHA512 da4a7d28c6f8ab1d3ada7b495c0bee47adcaaf2ff3303471b986a63c22b6f190ad7e258bf0b344730cd3af24183baadefbfc6a0fd703f8466f62f9bf57dbaf2a WHIRLPOOL 80ab896bf91ce86db175141b1d609013c0bcd02601e7bf7889d2b6223744f5c91cd25fb76fc747cf30728b194cca2beae44f10c02eae10e8a386dc9da10e9544
diff --git a/media-libs/raptor/metadata.xml b/media-libs/raptor/metadata.xml
new file mode 100644
index 000000000000..20b42e75e861
--- /dev/null
+++ b/media-libs/raptor/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>sound</herd>
+ <use>
+ <flag name="json">Enable support for JSON parsing</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/raptor/raptor-2.0.14.ebuild b/media-libs/raptor/raptor-2.0.14.ebuild
new file mode 100644
index 000000000000..c89d546ba8b5
--- /dev/null
+++ b/media-libs/raptor/raptor-2.0.14.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils libtool
+
+MY_PN=${PN}2
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="The RDF Parser Toolkit"
+HOMEPAGE="http://librdf.org/raptor/"
+SRC_URI="http://download.librdf.org/source/${MY_P}.tar.gz"
+
+LICENSE="Apache-2.0 GPL-2 LGPL-2.1"
+SLOT="2"
+KEYWORDS="alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="+curl debug json static-libs unicode"
+
+RDEPEND="dev-libs/libxml2
+ dev-libs/libxslt
+ curl? ( net-misc/curl )
+ json? ( dev-libs/yajl )
+ unicode? ( dev-libs/icu:= )
+ !media-libs/raptor:0"
+DEPEND="${RDEPEND}
+ >=sys-devel/bison-3
+ >=sys-devel/flex-2.5.36
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+DOCS="AUTHORS ChangeLog NEWS NOTICE README"
+
+src_prepare() {
+ elibtoolize # Keep this for ~*-fbsd
+}
+
+src_configure() {
+ # FIXME: It should be possible to use net-nntp/inn for libinn.h and -linn!
+
+ local myconf='--with-www=xml'
+ use curl && myconf='--with-www=curl'
+
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable debug) \
+ $(use unicode && echo --with-icu-config="${EPREFIX}"/usr/bin/icu-config) \
+ $(use_with json yajl) \
+ --with-html-dir="${EPREFIX}"/usr/share/doc/${PF}/html \
+ ${myconf}
+}
+
+src_test() {
+ emake -j1 test
+}
+
+src_install() {
+ default
+ dohtml {NEWS,README,RELEASE,UPGRADING}.html
+ prune_libtool_files --all
+
+ # http://bugs.gentoo.org/467768
+ local _rdocdir=/usr/share/doc/${PF}/html/${MY_PN}
+ [[ -d ${ED}/${_rdocdir} ]] && dosym ${_rdocdir} /usr/share/gtk-doc/html/${MY_PN}
+}
diff --git a/media-libs/raptor/raptor-2.0.9.ebuild b/media-libs/raptor/raptor-2.0.9.ebuild
new file mode 100644
index 000000000000..e83fc8a73bab
--- /dev/null
+++ b/media-libs/raptor/raptor-2.0.9.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils libtool
+
+MY_PN=${PN}2
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="The RDF Parser Toolkit"
+HOMEPAGE="http://librdf.org/raptor/"
+SRC_URI="http://download.librdf.org/source/${MY_P}.tar.gz"
+
+LICENSE="Apache-2.0 GPL-2 LGPL-2.1"
+SLOT="2"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="+curl debug json static-libs unicode"
+
+RDEPEND="dev-libs/libxml2
+ dev-libs/libxslt
+ curl? ( net-misc/curl )
+ json? ( dev-libs/yajl )
+ unicode? ( dev-libs/icu:= )
+ !media-libs/raptor:0"
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+DOCS="AUTHORS ChangeLog NEWS NOTICE README"
+
+src_prepare() {
+ elibtoolize # Keep this for ~*-fbsd
+}
+
+src_configure() {
+ # FIXME: It should be possible to use net-nntp/inn for libinn.h and -linn!
+
+ local myconf='--with-www=xml'
+ use curl && myconf='--with-www=curl'
+
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable debug) \
+ $(use unicode && echo --with-icu-config="${EPREFIX}"/usr/bin/icu-config) \
+ $(use_with json yajl) \
+ --with-xml2-config=no \
+ --with-curl-config=no \
+ --with-html-dir="${EPREFIX}"/usr/share/doc/${PF}/html \
+ ${myconf}
+}
+
+src_test() {
+ emake -j1 test
+}
+
+src_install() {
+ default
+ dohtml {NEWS,README,RELEASE,UPGRADING}.html
+ prune_libtool_files --all
+ dosym /usr/share/doc/${PF}/html/${MY_PN} /usr/share/gtk-doc/html/${MY_PN}
+}
diff --git a/media-libs/raspberrypi-userland/Manifest b/media-libs/raspberrypi-userland/Manifest
new file mode 100644
index 000000000000..27838fcb95bb
--- /dev/null
+++ b/media-libs/raspberrypi-userland/Manifest
@@ -0,0 +1,3 @@
+DIST raspberrypi-userland-0_pre20130705.tar.xz 31966608 SHA256 6307cc9d6103cd8afddf1b94ab44c4071f80884ec85d8e5aadd0f2f3d631c713 SHA512 d83de618e8fa6d49bd0b5b265706c7b290fa5800ac9a674dbf3d34222ab25e92c99877d61c4f706292666bf130ee0118ad54f35c8379a281f8ee90ce76a89651 WHIRLPOOL 8077d99e7a970f37bb4961ac928f9860b47be8aee83bff00eb4c44ee511aa322c532c9ff52528aece0897247ed8472aa70c147794aafe546ece8f8a08c5eb208
+DIST raspberrypi-userland-0_pre20140117.tar.xz 31998784 SHA256 2999d711465ddbc6b70d429a0253b8a9c1f838351a96f2b25cc86109a879005f SHA512 5c3dfebdcb36a2a17da94cafcc92067b24b454d5694b0bd216dd0d6752c4f505840880094c22125ab5da60f7b53b9114e8d04359a223e9e00be967cb8585e42e WHIRLPOOL 5179758c2be4b45f640eb8759554e19ea4fc8c83e63b0d4396ae84e67ae82e97824bf12f0766df5a70e2ca5b80e90be80e5c9b2eaa968752829765463d3f6d0d
+DIST raspberrypi-userland-0_pre20140830.tar.xz 32066536 SHA256 f9a06d2ca7d41cdc700b83eeb7c3e06d3ea6bd3fd187880a563144a6bf6ee901 SHA512 775005177e760fff611d7ce7e4beb466ea111dfc4652b97593d1061b97b1ded32979f8666a0aada6338791abab988883bbfd902f267eba5734e8aa932ebcf487 WHIRLPOOL 3066272a88b868ef20f27614f6f680aa6eb8a43cd2e281a7a930b99be341b037fa843a1c36bfdc6be619544e5b4b8751e5ab58c853b1baff44894b39284bfa55
diff --git a/media-libs/raspberrypi-userland/files/04raspberrypi-userland b/media-libs/raspberrypi-userland/files/04raspberrypi-userland
new file mode 100644
index 000000000000..fd37f4990328
--- /dev/null
+++ b/media-libs/raspberrypi-userland/files/04raspberrypi-userland
@@ -0,0 +1,3 @@
+
+PATH='/opt/vc/bin'
+LDPATH='/opt/vc/lib'
diff --git a/media-libs/raspberrypi-userland/files/raspberrypi-userland-9999-gentoo.patch b/media-libs/raspberrypi-userland/files/raspberrypi-userland-9999-gentoo.patch
new file mode 100644
index 000000000000..dc74ca0a50f3
--- /dev/null
+++ b/media-libs/raspberrypi-userland/files/raspberrypi-userland-9999-gentoo.patch
@@ -0,0 +1,81 @@
+--- CMakeLists.txt.old 2015-02-20 19:37:32.754551301 +0100
++++ CMakeLists.txt 2015-02-20 19:38:45.643356903 +0100
+@@ -38,6 +38,7 @@
+ add_definitions(-DOMX_SKIP64BIT)
+ add_definitions(-DEGL_SERVER_DISPMANX)
+ add_definitions(-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64)
++add_definitions(-D_GNU_SOURCE)
+
+ # do we actually need this?
+ add_definitions(-D__VIDEOCORE4__)
+--- interface/vchiq_arm/vchiq_test.c.old 2015-02-20 20:52:15.202983349 +0100
++++ interface/vchiq_arm/vchiq_test.c 2015-02-20 20:53:34.401882346 +0100
+@@ -130,6 +130,7 @@
+ #ifdef __linux__
+
+ #include <fcntl.h>
++#include <sys/ioctl.h>
+ #include "interface/vmcs_host/vc_cma.h"
+
+ static void reserve_test(int reserve, int delay)
+@@ -1311,6 +1312,7 @@
+ clnt_callback(VCHIQ_REASON_T reason, VCHIQ_HEADER_T *header,
+ VCHIQ_SERVICE_HANDLE_T service, void *bulk_userdata)
+ {
++ int data;
+ vcos_mutex_lock(&g_mutex);
+ if (reason == VCHIQ_MESSAGE_AVAILABLE)
+ {
+@@ -1318,7 +1320,7 @@
+ vchiq_release_message(service, header);
+ else
+ /* Responses of length 0 are not sync points */
+- if ((header->size >= 4) && (*(int *)header->data == MSG_ECHO))
++ if ((header->size >= 4) && (memcpy(&data, header->data, sizeof(data)), data == MSG_ECHO))
+ {
+ /* This is a complete echoed packet */
+ if (g_params.verify && (mem_check(header->data, bulk_tx_data[ctrl_received % NUM_BULK_BUFS], g_params.blocksize) != 0))
+--- interface/vchiq_arm/CMakeLists.txt.old 2015-02-20 21:23:05.736777755 +0100
++++ interface/vchiq_arm/CMakeLists.txt 2015-02-20 21:24:11.335832941 +0100
+@@ -3,7 +3,7 @@
+ vchiq_lib.c vchiq_util.c)
+
+ # pull in VCHI cond variable emulation
+-target_link_libraries(vchiq_arm)
++target_link_libraries(vchiq_arm vcos)
+
+ install(TARGETS vchiq_arm DESTINATION lib)
+ #install(FILES etc/10-vchiq.rules DESTINATION /etc/udev/rules.d)
+--- makefiles/cmake/vmcs.cmake.old 2015-02-21 14:31:57.608527445 +0100
++++ makefiles/cmake/vmcs.cmake 2015-02-21 14:32:09.358363958 +0100
+@@ -10,7 +10,7 @@
+ if (ANDROID)
+ SET(VMCS_INSTALL_PREFIX "/vendor/brcm/islands" CACHE PATH "Prefix prepended to install directories" FORCE)
+ else()
+- SET(VMCS_INSTALL_PREFIX "/opt/vc" CACHE PATH "Prefix prepended to install directories" FORCE)
++ SET(VMCS_INSTALL_PREFIX "/usr" CACHE PATH "Prefix prepended to install directories" FORCE)
+ endif()
+
+ SET(CMAKE_INSTALL_PREFIX "${VMCS_INSTALL_PREFIX}" CACHE INTERNAL "Prefix
+--- interface/vmcs_host/vcilcs_out.c.old 2015-02-24 06:57:20.977771332 +0100
++++ interface/vmcs_host/vcilcs_out.c 2015-02-24 06:59:34.735428061 +0100
+@@ -37,6 +37,7 @@
+ #include "interface/vmcs_host/vc_ilcs_defs.h"
+ #include "interface/vmcs_host/vcilcs.h"
+ #include "interface/vmcs_host/vcilcs_common.h"
++#include "interface/vcos/vcos_dlfcn.h"
+
+ static VC_PRIVATE_PORT_T *find_port(VC_PRIVATE_COMPONENT_T *comp, OMX_U32 nPortIndex)
+ {
+--- interface/khronos/common/linux/khrn_client_rpc_linux.c.old 2015-02-24 06:56:24.458761962 +0100
++++ interface/khronos/common/linux/khrn_client_rpc_linux.c 2015-02-24 07:02:41.522158412 +0100
+@@ -503,7 +503,8 @@
+ void rpc_call8_makecurrent(CLIENT_THREAD_STATE_T *thread, uint32_t id, uint32_t p0,
+ uint32_t p1, uint32_t p2, uint32_t p3, uint32_t p4, uint32_t p5, uint32_t p6, uint32_t p7)
+ {
+- if (thread->merge_pos == CLIENT_MAKE_CURRENT_SIZE && *((uint32_t *)thread->merge_buffer) == EGLINTMAKECURRENT_ID)
++ uint32_t data;
++ if (thread->merge_pos == CLIENT_MAKE_CURRENT_SIZE && (memcpy(&data,thread->merge_buffer,sizeof(data)), data == EGLINTMAKECURRENT_ID))
+ {
+ rpc_begin(thread);
+ vcos_log_trace("rpc_call8_makecurrent collapse onto previous makecurrent");
diff --git a/media-libs/raspberrypi-userland/metadata.xml b/media-libs/raspberrypi-userland/metadata.xml
new file mode 100644
index 000000000000..27c51391065b
--- /dev/null
+++ b/media-libs/raspberrypi-userland/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>chithanh@gentoo.org</email>
+ <name>Chí-Thanh Christopher Nguyễn</name>
+ </maintainer>
+ <maintainer>
+ <email>tupone@gentoo.org</email>
+ <name>Tupone Alfredo</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">raspberrypi/userland</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/raspberrypi-userland/raspberrypi-userland-0_pre20130705-r1.ebuild b/media-libs/raspberrypi-userland/raspberrypi-userland-0_pre20130705-r1.ebuild
new file mode 100644
index 000000000000..bb23bf036480
--- /dev/null
+++ b/media-libs/raspberrypi-userland/raspberrypi-userland-0_pre20130705-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 cmake-utils
+
+DESCRIPTION="Raspberry Pi userspace tools and libraries"
+HOMEPAGE="https://github.com/raspberrypi/userland"
+
+if [[ ${PV} == 9999* ]]; then
+ inherit git-2
+ EGIT_REPO_URI="git://github.com/${PN/-//}.git"
+ SRC_URI=""
+ KEYWORDS=""
+else
+ SRC_URI="mirror://gentoo/${P}.tar.xz"
+ KEYWORDS="~arm"
+fi
+
+LICENSE="BSD"
+SLOT="0"
+
+# TODO:
+# * port vcfiled init script
+# * stuff is still installed to hardcoded /opt/vc location, investigate whether
+# anything else depends on it being there
+# * live ebuild
+
+src_unpack() {
+ if [[ ${PV} == 9999* ]]; then
+ git-2_src_unpack
+ else
+ default
+ mv userland-*/ ${P}/ || die
+ fi
+}
+
+src_prepare() {
+ # init script for Debian, not useful on Gentoo
+ sed -i "/DESTINATION \/etc\/init.d/,+2d" interface/vmcs_host/linux/vcfiled/CMakeLists.txt || die
+}
+
+src_configure() {
+ # toolchain file not needed, but build fails if it is not specified
+ local mycmakeargs="-DCMAKE_TOOLCHAIN_FILE=/dev/null"
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ doenvd "${FILESDIR}"/04${PN}
+
+ # enable dynamic switching of the GL implementation
+ dodir /usr/lib/opengl
+ dosym ../../../opt/vc /usr/lib/opengl/${PN}
+
+ # tell eselect opengl that we do not have libGL
+ touch "${ED}"/opt/vc/.gles-only
+}
diff --git a/media-libs/raspberrypi-userland/raspberrypi-userland-0_pre20140117.ebuild b/media-libs/raspberrypi-userland/raspberrypi-userland-0_pre20140117.ebuild
new file mode 100644
index 000000000000..bb23bf036480
--- /dev/null
+++ b/media-libs/raspberrypi-userland/raspberrypi-userland-0_pre20140117.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 cmake-utils
+
+DESCRIPTION="Raspberry Pi userspace tools and libraries"
+HOMEPAGE="https://github.com/raspberrypi/userland"
+
+if [[ ${PV} == 9999* ]]; then
+ inherit git-2
+ EGIT_REPO_URI="git://github.com/${PN/-//}.git"
+ SRC_URI=""
+ KEYWORDS=""
+else
+ SRC_URI="mirror://gentoo/${P}.tar.xz"
+ KEYWORDS="~arm"
+fi
+
+LICENSE="BSD"
+SLOT="0"
+
+# TODO:
+# * port vcfiled init script
+# * stuff is still installed to hardcoded /opt/vc location, investigate whether
+# anything else depends on it being there
+# * live ebuild
+
+src_unpack() {
+ if [[ ${PV} == 9999* ]]; then
+ git-2_src_unpack
+ else
+ default
+ mv userland-*/ ${P}/ || die
+ fi
+}
+
+src_prepare() {
+ # init script for Debian, not useful on Gentoo
+ sed -i "/DESTINATION \/etc\/init.d/,+2d" interface/vmcs_host/linux/vcfiled/CMakeLists.txt || die
+}
+
+src_configure() {
+ # toolchain file not needed, but build fails if it is not specified
+ local mycmakeargs="-DCMAKE_TOOLCHAIN_FILE=/dev/null"
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ doenvd "${FILESDIR}"/04${PN}
+
+ # enable dynamic switching of the GL implementation
+ dodir /usr/lib/opengl
+ dosym ../../../opt/vc /usr/lib/opengl/${PN}
+
+ # tell eselect opengl that we do not have libGL
+ touch "${ED}"/opt/vc/.gles-only
+}
diff --git a/media-libs/raspberrypi-userland/raspberrypi-userland-0_pre20140830.ebuild b/media-libs/raspberrypi-userland/raspberrypi-userland-0_pre20140830.ebuild
new file mode 100644
index 000000000000..bb23bf036480
--- /dev/null
+++ b/media-libs/raspberrypi-userland/raspberrypi-userland-0_pre20140830.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 cmake-utils
+
+DESCRIPTION="Raspberry Pi userspace tools and libraries"
+HOMEPAGE="https://github.com/raspberrypi/userland"
+
+if [[ ${PV} == 9999* ]]; then
+ inherit git-2
+ EGIT_REPO_URI="git://github.com/${PN/-//}.git"
+ SRC_URI=""
+ KEYWORDS=""
+else
+ SRC_URI="mirror://gentoo/${P}.tar.xz"
+ KEYWORDS="~arm"
+fi
+
+LICENSE="BSD"
+SLOT="0"
+
+# TODO:
+# * port vcfiled init script
+# * stuff is still installed to hardcoded /opt/vc location, investigate whether
+# anything else depends on it being there
+# * live ebuild
+
+src_unpack() {
+ if [[ ${PV} == 9999* ]]; then
+ git-2_src_unpack
+ else
+ default
+ mv userland-*/ ${P}/ || die
+ fi
+}
+
+src_prepare() {
+ # init script for Debian, not useful on Gentoo
+ sed -i "/DESTINATION \/etc\/init.d/,+2d" interface/vmcs_host/linux/vcfiled/CMakeLists.txt || die
+}
+
+src_configure() {
+ # toolchain file not needed, but build fails if it is not specified
+ local mycmakeargs="-DCMAKE_TOOLCHAIN_FILE=/dev/null"
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ doenvd "${FILESDIR}"/04${PN}
+
+ # enable dynamic switching of the GL implementation
+ dodir /usr/lib/opengl
+ dosym ../../../opt/vc /usr/lib/opengl/${PN}
+
+ # tell eselect opengl that we do not have libGL
+ touch "${ED}"/opt/vc/.gles-only
+}
diff --git a/media-libs/raspberrypi-userland/raspberrypi-userland-9999.ebuild b/media-libs/raspberrypi-userland/raspberrypi-userland-9999.ebuild
new file mode 100644
index 000000000000..fc4088c8689c
--- /dev/null
+++ b/media-libs/raspberrypi-userland/raspberrypi-userland-9999.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit cmake-utils git-r3
+
+DESCRIPTION="Raspberry Pi userspace tools and libraries"
+HOMEPAGE="https://github.com/raspberrypi/userland"
+SRC_URI=""
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS=""
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+EGIT_REPO_URI="https://github.com/raspberrypi/userland"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ dodir /usr/lib/opengl/raspberrypi/lib
+ touch "${D}"/usr/lib/opengl/raspberrypi/.gles-only
+ mv "${D}"/usr/lib/lib{EGL,GLESv2}* \
+ "${D}"/usr/lib/opengl/raspberrypi/lib
+
+ dodir /usr/lib/opengl/raspberrypi/include
+ mv "${D}"/usr/include/{EGL,GLES,GLES2,KHR,WF} \
+ "${D}"/usr/lib/opengl/raspberrypi/include
+ mv "${D}"/usr/include/interface/vcos/pthreads/* \
+ "${D}"/usr/include/interface/vcos/
+ rmdir "${D}"/usr/include/interface/vcos/pthreads
+ mv "${D}"/usr/include/interface/vmcs_host/linux/* \
+ "${D}"/usr/include/interface/vmcs_host/
+ rmdir "${D}"/usr/include/interface/vmcs_host/linux
+
+ dodir /usr/share/doc/${PF}
+ mv "${D}"/usr/src/hello_pi "${D}"/usr/share/doc/${PF}/
+ rmdir "${D}"/usr/src
+}
diff --git a/media-libs/raul/Manifest b/media-libs/raul/Manifest
new file mode 100644
index 000000000000..d93bd4627f6a
--- /dev/null
+++ b/media-libs/raul/Manifest
@@ -0,0 +1 @@
+DIST raul-0.8.0.tar.bz2 155450 SHA256 0b35cd7bb6fb0b1ca0340be07678a2561888572c96cf4e4da4d8f4c03a20ba26 SHA512 7ad48c551945aad104309448bcdb86a4a2ca07c44af53b37492e7cddce6a093529f1e1e75c4b27cb8e292ec46424969cdea270883d44b2f1badc48df8943a0a1 WHIRLPOOL b63cf7eef4de032ef26f2f2bef46543cd2d3b691e8bbdc4dd105feaae02c589525382b9155f4e9faa1c10ae7ae89baf0fe3878c57a1a10b969740804b67cef4a
diff --git a/media-libs/raul/files/ldconfig2.patch b/media-libs/raul/files/ldconfig2.patch
new file mode 100644
index 000000000000..7676ae0781f9
--- /dev/null
+++ b/media-libs/raul/files/ldconfig2.patch
@@ -0,0 +1,12 @@
+Index: raul-0.8.0/wscript
+===================================================================
+--- raul-0.8.0.orig/wscript
++++ raul-0.8.0/wscript
+@@ -153,7 +153,5 @@ def build(bld):
+ # Documentation
+ autowaf.build_dox(bld, 'RAUL', RAUL_VERSION, top, out)
+
+- bld.add_post_fun(autowaf.run_ldconfig)
+-
+ def test(ctx):
+ autowaf.run_tests(ctx, APPNAME, tests.split())
diff --git a/media-libs/raul/files/raul-0.8.0-gcc47.patch b/media-libs/raul/files/raul-0.8.0-gcc47.patch
new file mode 100644
index 000000000000..c9cb2d080931
--- /dev/null
+++ b/media-libs/raul/files/raul-0.8.0-gcc47.patch
@@ -0,0 +1,45 @@
+https://bugs.gentoo.org/show_bug.cgi?id=425274
+Build with gcc 4.7
+
+Index: raul-0.8.0/raul/PathTable.hpp
+===================================================================
+--- raul-0.8.0.orig/raul/PathTable.hpp
++++ raul-0.8.0/raul/PathTable.hpp
+@@ -37,13 +37,13 @@ public:
+ typename Table<Path, T>::iterator find_descendants_end(
+ typename Table<Path, T>::iterator parent)
+ {
+- return find_range_end(parent, &Path::descendant_comparator);
++ return this->find_range_end(parent, &Path::descendant_comparator);
+ }
+
+ typename Table<Path, T>::const_iterator find_descendants_end(
+ typename Table<Path, T>::const_iterator parent) const
+ {
+- return find_range_end(parent, &Path::descendant_comparator);
++ return this->find_range_end(parent, &Path::descendant_comparator);
+ }
+ };
+
+Index: raul-0.8.0/raul/TableImpl.hpp
+===================================================================
+--- raul-0.8.0.orig/raul/TableImpl.hpp
++++ raul-0.8.0/raul/TableImpl.hpp
+@@ -249,7 +249,7 @@ Table<K, T>::cram(const Table<K,T>& rang
+ assert(is_sorted());
+ #endif
+
+- return make_pair(iterator(*this, insert_index), true);
++ return std::make_pair(iterator(*this, insert_index), true);
+ }
+
+
+@@ -339,7 +339,7 @@ Table<K, T>::operator[](const K& key)
+ if (i != end()) {
+ return i->second;
+ } else {
+- std::pair<iterator,bool> ret = insert(make_pair(key, T()));
++ std::pair<iterator,bool> ret = insert(std::make_pair(key, T()));
+ return ret.first->second;
+ }
+ }
diff --git a/media-libs/raul/metadata.xml b/media-libs/raul/metadata.xml
new file mode 100644
index 000000000000..44aedffdc316
--- /dev/null
+++ b/media-libs/raul/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>proaudio</herd>
+<longdescription lang="en">
+ Raul (Realtime Audio Utility Library) is a C++ utility library primarily
+ aimed at audio/musical applications.
+</longdescription>
+</pkgmetadata>
diff --git a/media-libs/raul/raul-0.8.0-r1.ebuild b/media-libs/raul/raul-0.8.0-r1.ebuild
new file mode 100644
index 000000000000..7a9d48cb21b7
--- /dev/null
+++ b/media-libs/raul/raul-0.8.0-r1.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=( python2_7 )
+PYTHON_REQ_USE='threads(+)'
+
+inherit waf-utils python-any-r1 eutils
+
+DESCRIPTION="C++ utility library primarily aimed at audio/musical applications"
+HOMEPAGE="http://wiki.drobilla.net/Raul"
+SRC_URI="http://download.drobilla.net/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc test"
+
+RDEPEND="dev-libs/boost
+ >=dev-libs/glib-2.14.0"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+RAUL_TESTS="atomic_test atom_test list_test midi_ringbuffer_test path_test quantize_test queue_test ringbuffer_test smf_test table_test thread_test time_test"
+DOCS=( AUTHORS README ChangeLog )
+
+src_prepare() {
+ epatch "${FILESDIR}/ldconfig2.patch"
+ epatch "${FILESDIR}/${P}-gcc47.patch"
+}
+
+src_configure() {
+ waf-utils_src_configure \
+ --htmldir=/usr/share/doc/${PF}/html \
+ $(use debug && echo "--debug") \
+ $(use doc && echo "--docs") \
+ $(use test && echo "--test")
+}
+
+src_test() {
+ cd "${S}/build/test" || die
+ for i in ${RAUL_TESTS} ; do
+ einfo "Running test ${i}"
+ LD_LIBRARY_PATH=.. ./${i} || die
+ done
+}
diff --git a/media-libs/raul/raul-0.8.0.ebuild b/media-libs/raul/raul-0.8.0.ebuild
new file mode 100644
index 000000000000..6cefe880422b
--- /dev/null
+++ b/media-libs/raul/raul-0.8.0.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 waf-utils python eutils
+
+DESCRIPTION="C++ utility library primarily aimed at audio/musical applications"
+HOMEPAGE="http://wiki.drobilla.net/Raul"
+SRC_URI="http://download.drobilla.net/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug doc test"
+
+RDEPEND="dev-libs/boost
+ >=dev-libs/glib-2.14.0"
+DEPEND="${RDEPEND}
+ =dev-lang/python-2*
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+RAUL_TESTS="atomic_test atom_test list_test midi_ringbuffer_test path_test quantize_test queue_test ringbuffer_test smf_test table_test thread_test time_test"
+DOCS=( AUTHORS README ChangeLog )
+
+pkg_setup() {
+ python_set_active_version 2
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/ldconfig2.patch"
+ epatch "${FILESDIR}/${P}-gcc47.patch"
+}
+
+src_configure() {
+ waf-utils_src_configure \
+ --htmldir=/usr/share/doc/${PF}/html \
+ $(use debug && echo "--debug") \
+ $(use doc && echo "--docs") \
+ $(use test && echo "--test")
+}
+
+src_test() {
+ cd "${S}/build/test" || die
+ for i in ${RAUL_TESTS} ; do
+ einfo "Running test ${i}"
+ LD_LIBRARY_PATH=.. ./${i} || die
+ done
+}
diff --git a/media-libs/resid/Manifest b/media-libs/resid/Manifest
new file mode 100644
index 000000000000..474e706e4009
--- /dev/null
+++ b/media-libs/resid/Manifest
@@ -0,0 +1 @@
+DIST resid-0.16-p2.tgz 329919 SHA256 750930868099d6f000f72970efdfa7706abd4608aded6fb1d3a5ab287cbb1bae
diff --git a/media-libs/resid/metadata.xml b/media-libs/resid/metadata.xml
new file mode 100644
index 000000000000..f13b23f890ed
--- /dev/null
+++ b/media-libs/resid/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>sound</herd>
+ <upstream>
+ <remote-id type="sourceforge">sidplay2</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/resid/resid-0.16_p2.ebuild b/media-libs/resid/resid-0.16_p2.ebuild
new file mode 100644
index 000000000000..b0de57f5d809
--- /dev/null
+++ b/media-libs/resid/resid-0.16_p2.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit autotools versionator
+
+MY_MAJ=$(get_version_component_range 1-2)
+
+DESCRIPTION="C++ library to emulate the C64 SID chip"
+HOMEPAGE="http://sidplay2.sourceforge.net"
+SRC_URI="mirror://sourceforge/sidplay2/${P/_p/-p}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ppc sparc x86"
+IUSE="static-libs"
+
+RDEPEND=""
+DEPEND=""
+
+S=${WORKDIR}/${PN}-${MY_MAJ}
+
+src_prepare() {
+ # This is required, otherwise the shared libraries get installed as
+ # libresid.0.0.0 instead of libresid.so.0.0.0.
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-dependency-tracking \
+ --enable-shared \
+ $(use_enable static-libs static) \
+ --enable-resid-install
+}
+
+src_install () {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ dodoc AUTHORS ChangeLog NEWS README THANKS TODO VC_CC_SUPPORT.txt
+}
diff --git a/media-libs/rply/Manifest b/media-libs/rply/Manifest
new file mode 100644
index 000000000000..c94f16fbd722
--- /dev/null
+++ b/media-libs/rply/Manifest
@@ -0,0 +1 @@
+DIST rply-1.01.tar.gz 28903 RMD160 3f3b17b4f9549a47f52d853575a9fa52d044bf98 SHA1 4c862c7a87141e596edc60315d647933350626ac SHA256 5fb87562ff47a440e43c035f99c20c1e83b409d2b73a7dafea60fa805bb75d7c
diff --git a/media-libs/rply/files/rply-1.01-lc_numeric.patch b/media-libs/rply/files/rply-1.01-lc_numeric.patch
new file mode 100644
index 000000000000..6d98abd95d57
--- /dev/null
+++ b/media-libs/rply/files/rply-1.01-lc_numeric.patch
@@ -0,0 +1,86 @@
+From 8a7a76b7dcc94e8e71725e26a146330c73377ebd Mon Sep 17 00:00:00 2001
+From: Alexandre Rostovtsev <tetromino@gmail.com>
+Date: Mon, 26 Sep 2011 04:46:44 -0400
+Subject: [PATCH 2/2] Switch LC_NUMERIC locale to "C" for decimal point
+ separator safety
+
+Make sure to switch the LC_NUMERIC locale to "C" when using strtod() and
+fpritnf("%g",...) to ensure that '.' is used as the decimal point
+separator when reading and writing .ply files.
+---
+ rply.c | 31 +++++++++++++++++++++++++++----
+ 1 files changed, 27 insertions(+), 4 deletions(-)
+
+diff --git a/rply.c b/rply.c
+index 9eaa77f..789c002 100644
+--- a/rply.c
++++ b/rply.c
+@@ -12,6 +12,7 @@
+ #include <string.h>
+ #include <limits.h>
+ #include <float.h>
++#include <locale.h>
+ #include <stdarg.h>
+ #include <stdlib.h>
+ #include <stddef.h>
+@@ -1229,13 +1230,27 @@ static int oascii_uint32(p_ply ply, double value) {
+ }
+
+ static int oascii_float32(p_ply ply, double value) {
++ char *curr_locale;
++ int ret;
+ if (value < -FLT_MAX || value > FLT_MAX) return 0;
+- return fprintf(ply->fp, "%g ", (float) value) > 0;
++ /* Switch locale to C to use '.' as the decimal point separator */
++ curr_locale = setlocale(LC_NUMERIC, NULL);
++ setlocale(LC_NUMERIC, "C");
++ ret = fprintf(ply->fp, "%g ", (float) value);
++ setlocale(LC_NUMERIC, curr_locale);
++ return ret > 0;
+ }
+
+ static int oascii_float64(p_ply ply, double value) {
++ char *curr_locale;
++ int ret;
+ if (value < -DBL_MAX || value > DBL_MAX) return 0;
+- return fprintf(ply->fp, "%g ", value) > 0;
++ /* Switch locale to C to use '.' as the decimal point separator */
++ curr_locale = setlocale(LC_NUMERIC, NULL);
++ setlocale(LC_NUMERIC, "C");
++ ret = fprintf(ply->fp, "%g ", value);
++ setlocale(LC_NUMERIC, curr_locale);
++ return ret > 0;
+ }
+
+ static int obinary_int8(p_ply ply, double value) {
+@@ -1336,17 +1351,25 @@ static int iascii_uint32(p_ply ply, double *value) {
+ }
+
+ static int iascii_float32(p_ply ply, double *value) {
+- char *end;
++ char *end, *curr_locale;
+ if (!ply_read_word(ply)) return 0;
++ /* Switch locale to C to use '.' as the decimal point separator */
++ curr_locale = setlocale(LC_NUMERIC, NULL);
++ setlocale(LC_NUMERIC, "C");
+ *value = strtod(BWORD(ply), &end);
++ setlocale(LC_NUMERIC, curr_locale);
+ if (*end || *value < -FLT_MAX || *value > FLT_MAX) return 0;
+ return 1;
+ }
+
+ static int iascii_float64(p_ply ply, double *value) {
+- char *end;
++ char *end, *curr_locale;
+ if (!ply_read_word(ply)) return 0;
++ /* Switch locale to C to use '.' as the decimal point separator */
++ curr_locale = setlocale(LC_NUMERIC, NULL);
++ setlocale(LC_NUMERIC, "C");
+ *value = strtod(BWORD(ply), &end);
++ setlocale(LC_NUMERIC, curr_locale);
+ if (*end || *value < -DBL_MAX || *value > DBL_MAX) return 0;
+ return 1;
+ }
+--
+1.7.6.1
+
diff --git a/media-libs/rply/files/rply-1.01-stdint.h.patch b/media-libs/rply/files/rply-1.01-stdint.h.patch
new file mode 100644
index 000000000000..45c911643bcb
--- /dev/null
+++ b/media-libs/rply/files/rply-1.01-stdint.h.patch
@@ -0,0 +1,185 @@
+From eeb09032068baed6d81cff01cdfcccd6d55a8152 Mon Sep 17 00:00:00 2001
+From: Alexandre Rostovtsev <tetromino@gmail.com>
+Date: Mon, 26 Sep 2011 04:45:49 -0400
+Subject: [PATCH 1/2] Use stdint.h types
+
+Use stdint.h types (int16_t and int32_t) instead of assuming that short
+and long must always a specific number of bytes. Also, use strtoul for
+reading uint32_t values.
+---
+ rply.c | 61 ++++++++++++++++++++++++++++---------------------------------
+ 1 files changed, 28 insertions(+), 33 deletions(-)
+
+diff --git a/rply.c b/rply.c
+index 042244f..9eaa77f 100644
+--- a/rply.c
++++ b/rply.c
+@@ -15,6 +15,7 @@
+ #include <stdarg.h>
+ #include <stdlib.h>
+ #include <stddef.h>
++#include <stdint.h>
+
+ #include "rply.h"
+
+@@ -1183,18 +1184,12 @@ static e_ply_storage_mode ply_arch_endian(void) {
+ static int ply_type_check(void) {
+ assert(sizeof(char) == 1);
+ assert(sizeof(unsigned char) == 1);
+- assert(sizeof(short) == 2);
+- assert(sizeof(unsigned short) == 2);
+- assert(sizeof(long) == 4);
+- assert(sizeof(unsigned long) == 4);
++ assert(sizeof(long) >= 4);
+ assert(sizeof(float) == 4);
+ assert(sizeof(double) == 8);
+ if (sizeof(char) != 1) return 0;
+ if (sizeof(unsigned char) != 1) return 0;
+- if (sizeof(short) != 2) return 0;
+- if (sizeof(unsigned short) != 2) return 0;
+- if (sizeof(long) != 4) return 0;
+- if (sizeof(unsigned long) != 4) return 0;
++ if (sizeof(long) < 4) return 0;
+ if (sizeof(float) != 4) return 0;
+ if (sizeof(double) != 8) return 0;
+ return 1;
+@@ -1214,23 +1209,23 @@ static int oascii_uint8(p_ply ply, double value) {
+ }
+
+ static int oascii_int16(p_ply ply, double value) {
+- if (value > SHRT_MAX || value < SHRT_MIN) return 0;
+- return fprintf(ply->fp, "%d ", (short) value) > 0;
++ if (value > INT16_MAX || value < INT16_MIN) return 0;
++ return fprintf(ply->fp, "%d ", (int16_t) value) > 0;
+ }
+
+ static int oascii_uint16(p_ply ply, double value) {
+- if (value > USHRT_MAX || value < 0) return 0;
+- return fprintf(ply->fp, "%d ", (unsigned short) value) > 0;
++ if (value > UINT16_MAX || value < 0) return 0;
++ return fprintf(ply->fp, "%d ", (uint16_t) value) > 0;
+ }
+
+ static int oascii_int32(p_ply ply, double value) {
+- if (value > LONG_MAX || value < LONG_MIN) return 0;
+- return fprintf(ply->fp, "%d ", (int) value) > 0;
++ if (value > INT32_MAX || value < INT32_MIN) return 0;
++ return fprintf(ply->fp, "%d ", (int32_t) value) > 0;
+ }
+
+ static int oascii_uint32(p_ply ply, double value) {
+- if (value > ULONG_MAX || value < 0) return 0;
+- return fprintf(ply->fp, "%d ", (unsigned int) value) > 0;
++ if (value > UINT32_MAX || value < 0) return 0;
++ return fprintf(ply->fp, "%d ", (uint32_t) value) > 0;
+ }
+
+ static int oascii_float32(p_ply ply, double value) {
+@@ -1256,26 +1251,26 @@ static int obinary_uint8(p_ply ply, double value) {
+ }
+
+ static int obinary_int16(p_ply ply, double value) {
+- short int16 = (short) value;
+- if (value > SHRT_MAX || value < SHRT_MIN) return 0;
++ int16_t int16 = value;
++ if (value > INT16_MAX || value < INT16_MIN) return 0;
+ return ply->odriver->ochunk(ply, &int16, sizeof(int16));
+ }
+
+ static int obinary_uint16(p_ply ply, double value) {
+- unsigned short uint16 = (unsigned short) value;
+- if (value > USHRT_MAX || value < 0) return 0;
++ uint16_t uint16 = value;
++ if (value > UINT16_MAX || value < 0) return 0;
+ return ply->odriver->ochunk(ply, &uint16, sizeof(uint16));
+ }
+
+ static int obinary_int32(p_ply ply, double value) {
+- long int32 = (long) value;
+- if (value > LONG_MAX || value < LONG_MIN) return 0;
++ int32_t int32 = value;
++ if (value > INT32_MAX || value < INT32_MIN) return 0;
+ return ply->odriver->ochunk(ply, &int32, sizeof(int32));
+ }
+
+ static int obinary_uint32(p_ply ply, double value) {
+- unsigned long uint32 = (unsigned long) value;
+- if (value > ULONG_MAX || value < 0) return 0;
++ uint32_t uint32 = value;
++ if (value > UINT32_MAX || value < 0) return 0;
+ return ply->odriver->ochunk(ply, &uint32, sizeof(uint32));
+ }
+
+@@ -1312,7 +1307,7 @@ static int iascii_int16(p_ply ply, double *value) {
+ char *end;
+ if (!ply_read_word(ply)) return 0;
+ *value = strtol(BWORD(ply), &end, 10);
+- if (*end || *value > SHRT_MAX || *value < SHRT_MIN) return 0;
++ if (*end || *value > INT16_MAX || *value < INT16_MIN) return 0;
+ return 1;
+ }
+
+@@ -1320,7 +1315,7 @@ static int iascii_uint16(p_ply ply, double *value) {
+ char *end;
+ if (!ply_read_word(ply)) return 0;
+ *value = strtol(BWORD(ply), &end, 10);
+- if (*end || *value > USHRT_MAX || *value < 0) return 0;
++ if (*end || *value > UINT16_MAX || *value < 0) return 0;
+ return 1;
+ }
+
+@@ -1328,15 +1323,15 @@ static int iascii_int32(p_ply ply, double *value) {
+ char *end;
+ if (!ply_read_word(ply)) return 0;
+ *value = strtol(BWORD(ply), &end, 10);
+- if (*end || *value > LONG_MAX || *value < LONG_MIN) return 0;
++ if (*end || *value > INT32_MAX || *value < INT32_MIN) return 0;
+ return 1;
+ }
+
+ static int iascii_uint32(p_ply ply, double *value) {
+ char *end;
+ if (!ply_read_word(ply)) return 0;
+- *value = strtol(BWORD(ply), &end, 10);
+- if (*end || *value < 0) return 0;
++ *value = strtoul(BWORD(ply), &end, 10);
++ if (*end || *value > UINT32_MAX || *value < 0) return 0;
+ return 1;
+ }
+
+@@ -1371,28 +1366,28 @@ static int ibinary_uint8(p_ply ply, double *value) {
+ }
+
+ static int ibinary_int16(p_ply ply, double *value) {
+- short int16;
++ int16_t int16;
+ if (!ply->idriver->ichunk(ply, &int16, sizeof(int16))) return 0;
+ *value = int16;
+ return 1;
+ }
+
+ static int ibinary_uint16(p_ply ply, double *value) {
+- unsigned short uint16;
++ uint16_t uint16;
+ if (!ply->idriver->ichunk(ply, &uint16, sizeof(uint16))) return 0;
+ *value = uint16;
+ return 1;
+ }
+
+ static int ibinary_int32(p_ply ply, double *value) {
+- long int32;
++ int32_t int32;
+ if (!ply->idriver->ichunk(ply, &int32, sizeof(int32))) return 0;
+ *value = int32;
+ return 1;
+ }
+
+ static int ibinary_uint32(p_ply ply, double *value) {
+- unsigned long uint32;
++ uint32_t uint32;
+ if (!ply->idriver->ichunk(ply, &uint32, sizeof(uint32))) return 0;
+ *value = uint32;
+ return 1;
+--
+1.7.6.1
+
diff --git a/media-libs/rply/files/rply_CMakeLists.txt b/media-libs/rply/files/rply_CMakeLists.txt
new file mode 100644
index 000000000000..5497fffb225f
--- /dev/null
+++ b/media-libs/rply/files/rply_CMakeLists.txt
@@ -0,0 +1,39 @@
+# Fedora's cmake file for rply
+# http://pkgs.fedoraproject.org/gitweb/?p=rply.git;a=blob;f=rply_CMakeLists.txt
+PROJECT(rply)
+cmake_minimum_required(VERSION 2.6)
+
+SET(RPLY_LIB_MAJOR_VERSION 1)
+SET(RPLY_LIB_MINOR_VERSION 01)
+
+SET(RPLY_CMAKE_DIR ${CMAKE_SOURCE_DIR}/CMake/ )
+SET(RPLY_LIBRARY librply.so )
+
+add_library(rply SHARED rply.c )
+set_target_properties( rply PROPERTIES
+ VERSION ${RPLY_LIB_MAJOR_VERSION}.${RPLY_LIB_MINOR_VERSION}
+ SOVERSION ${RPLY_LIB_MAJOR_VERSION}
+ )
+
+include_directories( ${CMAKE_SOURCE_DIR} )
+add_executable(rply_convert etc/convert.c )
+add_executable(rply_dump etc/dump.c )
+add_executable(rply_sconvert etc/sconvert.c )
+target_link_libraries (rply_convert rply)
+target_link_libraries (rply_dump rply)
+target_link_libraries (rply_sconvert rply)
+
+# Installs the header files
+install(FILES rply.h DESTINATION include/rply)
+
+# Installs the target file
+install(TARGETS rply LIBRARY DESTINATION lib${LIB_SUFFIX})
+install(TARGETS rply_convert RUNTIME DESTINATION bin)
+install(TARGETS rply_dump RUNTIME DESTINATION bin)
+install(TARGETS rply_sconvert RUNTIME DESTINATION bin)
+
+#This should be the last line of the project
+SUBDIRS( CMake/export )
+
+
+
diff --git a/media-libs/rply/metadata.xml b/media-libs/rply/metadata.xml
new file mode 100644
index 000000000000..6cfea5201833
--- /dev/null
+++ b/media-libs/rply/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>tetromino@gentoo.org</email>
+<name>Alexandre Rostovtsev</name>
+</maintainer>
+</pkgmetadata>
diff --git a/media-libs/rply/rply-1.01-r1.ebuild b/media-libs/rply/rply-1.01-r1.ebuild
new file mode 100644
index 000000000000..83a84a2dfac7
--- /dev/null
+++ b/media-libs/rply/rply-1.01-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit cmake-utils eutils
+
+DESCRIPTION="A library to read and write PLY files"
+HOMEPAGE="http://w3.impa.br/~diego/software/rply/"
+# SRC_URI="http://w3.impa.br/~diego/software/rply/${P}.tar.gz"
+# Tarball no longer available from upstream website
+SRC_URI="http://dev.gentoo.org/~tetromino/distfiles/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ use doc && HTML_DOCS="manual/*"
+}
+
+src_prepare() {
+ # rply doesn't have *any* build system - not even a Makefile!
+ # For simplicity, use the cmake file that Fedora maintainers have created
+ cp "${FILESDIR}/rply_CMakeLists.txt" CMakeLists.txt
+ mkdir -p CMake/export
+
+ # Use int16_t and int32_t instead of assuming e.g. that sizeof(long) == 4
+ epatch "${FILESDIR}/${P}-stdint.h.patch"
+
+ # Switch LC_NUMERIC locale to "C" to ensure "." is the decimal separator
+ epatch "${FILESDIR}/${P}-lc_numeric.patch"
+}
diff --git a/media-libs/rtaudio/Manifest b/media-libs/rtaudio/Manifest
new file mode 100644
index 000000000000..7972183601ce
--- /dev/null
+++ b/media-libs/rtaudio/Manifest
@@ -0,0 +1 @@
+DIST rtaudio-4.0.12.tar.gz 330048 SHA256 5179056c796b9582e375d352efa0598e674b9719cf78a85a426517b375ff1cab SHA512 43068cafaf460425334588775bbeee115d1651142d8fa62808880296763952159bff297c482e6d58200cfb6d382205778405993dbbb3a769e4b1228ff0aee3b6 WHIRLPOOL 252fc02dbebdc1777314a97e4acc18ce615f78a82a12cdf6bcf2759867a3da6c755977dec832351c5b86aec7825d07882024179703c746e654a5f7bc2d32b9ce
diff --git a/media-libs/rtaudio/files/rtaudio-4.0.11-cflags.patch b/media-libs/rtaudio/files/rtaudio-4.0.11-cflags.patch
new file mode 100644
index 000000000000..9fa657929c21
--- /dev/null
+++ b/media-libs/rtaudio/files/rtaudio-4.0.11-cflags.patch
@@ -0,0 +1,24 @@
+--- rtaudio-4.0.11/configure.ac
++++ rtaudio-4.0.11/configure.ac
+@@ -23,8 +23,8 @@
+ AC_MSG_CHECKING(whether to compile debug version)
+ AC_ARG_ENABLE(debug,
+ [ --enable-debug = enable various debug output],
+- [AC_SUBST( cppflag, [-D__RTAUDIO_DEBUG__] ) AC_SUBST( cxxflag, [-g] ) AC_SUBST( object_path, [Debug] ) AC_MSG_RESULT(yes)],
+- [AC_SUBST( cppflag, [] ) AC_SUBST( cxxflag, [-O2] ) AC_SUBST( object_path, [Release] ) AC_MSG_RESULT(no)])
++ [AC_SUBST( cppflag, [-D__RTAUDIO_DEBUG__] ) AC_SUBST( object_path, [Debug] ) AC_MSG_RESULT(yes)],
++ [AC_SUBST( cppflag, [] ) AC_SUBST( object_path, [Release] ) AC_MSG_RESULT(no)])
+
+
+ # Checks for functions
+@@ -33,10 +33,6 @@
+ # For -I and -D flags
+ CPPFLAGS="$CPPFLAGS $cppflag"
+
+-# For debugging and optimization ... overwrite default because it has both -g and -O2
+-#CXXFLAGS="$CXXFLAGS $cxxflag"
+-CXXFLAGS="$cxxflag"
+-
+ # Check compiler and use -Wall if gnu.
+ if [test $GXX = "yes" ;] then
+ AC_SUBST( cxxflag, [-Wall] )
diff --git a/media-libs/rtaudio/files/rtaudio-4.0.12-configure.patch b/media-libs/rtaudio/files/rtaudio-4.0.12-configure.patch
new file mode 100644
index 000000000000..7680f75d40d3
--- /dev/null
+++ b/media-libs/rtaudio/files/rtaudio-4.0.12-configure.patch
@@ -0,0 +1,73 @@
+--- rtaudio-4.0.12/configure.ac
++++ rtaudio-4.0.12/configure.ac
+@@ -25,9 +25,9 @@
+ AC_PROG_CXX(g++ CC c++ cxx)
+ AC_PROG_RANLIB
+ AC_PATH_PROG(AR, ar, no)
+-if [[ $AR = "no" ]] ; then
+- AC_MSG_ERROR("Could not find ar - needed to create a library");
+-fi
++AS_IF([test "x$AR" == "x" ], [
++ AC_MSG_ERROR("Could not find ar - needed to create a library")
++])
+
+ # Checks for header files.
+ AC_HEADER_STDC
+@@ -83,39 +83,46 @@
+ ;;
+
+ *-*-linux*)
+- AC_ARG_WITH(jack, [ --with-jack = choose JACK server support (mac and linux only)], [
++ AC_ARG_WITH([jack], AS_HELP_STRING([--with-jack], [choose JACK server support (mac and linux only)]))
++
++ AS_IF([test "x$with_jack" != "xno"], [
+ api="$api -D__UNIX_JACK__"
+ AC_MSG_RESULT(using JACK)
+ AC_CHECK_LIB(jack, jack_client_open, , AC_MSG_ERROR(JACK support requires the jack library!))
+- AC_CHECK_LIB(asound, snd_pcm_open, , AC_MSG_ERROR(Jack support also requires the asound library!))], )
++ AC_CHECK_LIB(asound, snd_pcm_open, , AC_MSG_ERROR(Jack support also requires the asound library!))])
+
+ # Look for ALSA flag
+- AC_ARG_WITH(alsa, [ --with-alsa = choose native ALSA API support (linux only)], [
++ AC_ARG_WITH([alsa], AS_HELP_STRING([--with-alsa], [choose native ALSA API support (linux only)]))
++
++ AS_IF([test "x$with_alsa" != "xno"], [
+ api="$api -D__LINUX_ALSA__"
+ req="$req alsa"
+ AC_MSG_RESULT(using ALSA)
+- AC_CHECK_LIB(asound, snd_pcm_open, , AC_MSG_ERROR(ALSA support requires the asound library!))], )
++ AC_CHECK_LIB(asound, snd_pcm_open, , AC_MSG_ERROR(ALSA support requires the asound library!))])
+
+ # Look for PULSE flag
+- AC_ARG_WITH(pulse, [ --with-pulse = choose PulseAudio API support (linux only)], [
++ AC_ARG_WITH([pulse], AS_HELP_STRING([--with-pulse], [choose PulseAudio API support (linux only)]))
++
++ AS_IF([test "x$with_pulse" != "xno"], [
+ api="$api -D__LINUX_PULSE__"
+ req="$req libpulse-simple"
+ AC_MSG_RESULT(using PulseAudio)
+ PKG_CHECK_MODULES([PULSE], [libpulse-simple], , AC_MSG_ERROR(PulseAudio support requires the pulse-simple library!))
+- LIBS="$LIBS `pkg-config --libs libpulse-simple`" ], )
++ LIBS="$LIBS `pkg-config --libs libpulse-simple`" ])
+
+ # Look for OSS flag
+- AC_ARG_WITH(oss, [ --with-oss = choose OSS API support (linux only)], [
++ AC_ARG_WITH([oss], AS_HELP_STRING([--with-oss], [choose OSS API support (linux only)]))
++
++ AS_IF([test "x$with_oss" != "xno"], [
+ api="$api -D__LINUX_OSS__"
+- AC_MSG_RESULT(using OSS)], )
++ AC_MSG_RESULT(using OSS)])
+
+ # If no audio api flags specified, use ALSA
+- if [test "$api" == "";] then
++ AS_IF([test "x$api" == "x"], [
+ AC_MSG_RESULT(using ALSA)
+ AC_SUBST( api, [-D__LINUX_ALSA__] )
+ req="$req alsa"
+- AC_CHECK_LIB(asound, snd_pcm_open, , AC_MSG_ERROR(ALSA support requires the asound library!))
+- fi
++ AC_CHECK_LIB(asound, snd_pcm_open, , AC_MSG_ERROR(ALSA support requires the asound library!))])
+
+ AC_CHECK_LIB(pthread, pthread_create, , AC_MSG_ERROR(RtAudio requires the pthread library!))
+ ;;
diff --git a/media-libs/rtaudio/files/rtaudio-4.0.12-makefile.patch b/media-libs/rtaudio/files/rtaudio-4.0.12-makefile.patch
new file mode 100644
index 000000000000..adf109de5de9
--- /dev/null
+++ b/media-libs/rtaudio/files/rtaudio-4.0.12-makefile.patch
@@ -0,0 +1,16 @@
+--- rtaudio-4.0.12/Makefile.in
++++ rtaudio-4.0.12/Makefile.in
+@@ -24,9 +24,11 @@
+ tests:
+ cd tests && $(MAKE) all
+
+-$(LIBRARIES): $(OBJECTS)
++$(STATIC): $(OBJECTS)
+ $(AR) ruv $(STATIC) $(OBJECTS)
+- ranlib $(STATIC)
++ $(RANLIB) $(STATIC)
++
++$(SHARED): $(OBJECTS)
+ $(CC) -fPIC @libflags@ $(OBJECTS) @LIBS@
+ $(LN) -sf @sharedname@ $(SHARED)
+ $(LN) -sf @sharedname@ $(SHARED).$(MAJOR)
diff --git a/media-libs/rtaudio/metadata.xml b/media-libs/rtaudio/metadata.xml
new file mode 100644
index 000000000000..0dc3775f83d7
--- /dev/null
+++ b/media-libs/rtaudio/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>proaudio</herd>
+</pkgmetadata>
diff --git a/media-libs/rtaudio/rtaudio-4.0.12-r1.ebuild b/media-libs/rtaudio/rtaudio-4.0.12-r1.ebuild
new file mode 100644
index 000000000000..1b351d9ea9c3
--- /dev/null
+++ b/media-libs/rtaudio/rtaudio-4.0.12-r1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils autotools toolchain-funcs
+
+DESCRIPTION="A set of cross-platform C++ classes for realtime audio I/O"
+HOMEPAGE="http://www.music.mcgill.ca/~gary/rtaudio/"
+SRC_URI="http://www.music.mcgill.ca/~gary/${PN}/release/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+alsa doc jack pulseaudio static-libs"
+REQUIRED_USE="|| ( alsa jack pulseaudio )"
+
+RDEPEND="alsa? ( media-libs/alsa-lib )
+ jack? (
+ media-libs/alsa-lib
+ media-sound/jack-audio-connection-kit
+ )
+ pulseaudio? ( media-sound/pulseaudio )"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-4.0.11-cflags.patch
+ epatch "${FILESDIR}"/${P}-makefile.patch
+ epatch "${FILESDIR}"/${P}-configure.patch
+
+ if ! use static-libs ; then
+ sed -i '/^LIBRARIES =/s/$(STATIC)//' Makefile.in || die
+ fi
+
+ eautoreconf
+}
+
+src_configure() {
+ # OSS support requires OSSv4
+ econf \
+ --without-oss \
+ $(use_with alsa) \
+ $(use_with jack) \
+ $(use_with pulseaudio pulse)
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)"
+}
+
+src_install() {
+ dolib.so librtaudio.so*
+ use static-libs && dolib.a librtaudio.a
+
+ dobin rtaudio-config
+ doheader *.h
+ dodoc readme doc/release.txt
+
+ if use doc ; then
+ dohtml -r doc/html/*
+ dodoc -r doc/images
+ fi
+}
diff --git a/media-libs/rubberband/Manifest b/media-libs/rubberband/Manifest
new file mode 100644
index 000000000000..3d5623a2dcef
--- /dev/null
+++ b/media-libs/rubberband/Manifest
@@ -0,0 +1,2 @@
+DIST rubberband-1.7.0.tar.bz2 129328 SHA256 8037fe0e435a756f74b524b47943a8db0a4915c8437a8a4f88cb681ed577f682 SHA512 47d45ff6355e8f31f3ef0c0c5f14f27cc952f98597271b6b35b5047293b8dfa5e6576dc2e3ede102c0209507c77d666cf7c049fc65da18f09de84ea90fb2f87d WHIRLPOOL b32abc93a558bfb44bad76e3beb0d3f78bdface1141e0265e3d2720e6667236ee5f2120f3984818f927a0788d1fa6ed0c5dc15dbc3a154ec22b2c4027f054ed4
+DIST rubberband-1.8.1.tar.bz2 177501 SHA256 ff0c63b0b5ce41f937a8a3bc560f27918c5fe0b90c6bc1cb70829b86ada82b75 SHA512 9721eaa36b80574f90b8ae5cfae388159a239e4257b8c85b9e55e7cf0dbbb9a996b857213a6a172a4ada5ff712e6936a16adbe08396e2ab1df3fd8d5a02a3620 WHIRLPOOL 14906711c8599b06ac8d772fd8c83fe8625f7235aafe67ccf505bdbcd43b8a28609f885b2243b22adfee8b1dad0815458253f1c07b728afd1c399e2ddf525dc4
diff --git a/media-libs/rubberband/metadata.xml b/media-libs/rubberband/metadata.xml
new file mode 100644
index 000000000000..0dc3775f83d7
--- /dev/null
+++ b/media-libs/rubberband/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>proaudio</herd>
+</pkgmetadata>
diff --git a/media-libs/rubberband/rubberband-1.7.0.ebuild b/media-libs/rubberband/rubberband-1.7.0.ebuild
new file mode 100644
index 000000000000..7d6afc625d22
--- /dev/null
+++ b/media-libs/rubberband/rubberband-1.7.0.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 multilib
+
+DESCRIPTION="An audio time-stretching and pitch-shifting library and utility program"
+HOMEPAGE="http://www.breakfastquay.com/rubberband/"
+SRC_URI="http://code.breakfastquay.com/attachments/download/23/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~x86"
+IUSE="static-libs"
+
+RDEPEND="media-libs/vamp-plugin-sdk
+ media-libs/libsamplerate
+ media-libs/libsndfile
+ media-libs/ladspa-sdk
+ sci-libs/fftw:3.0"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ if ! use static-libs ; then
+ sed -i -e '/^all:/s/$(STATIC_TARGET)//' \
+ -e '/^\tcp $(STATIC_TARGET)/d' \
+ Makefile.in || die
+ fi
+}
+
+src_install() {
+ emake INSTALL_BINDIR="${D}/usr/bin" \
+ INSTALL_INCDIR="${D}/usr/include/rubberband" \
+ INSTALL_LIBDIR="${D}/usr/$(get_libdir)" \
+ INSTALL_VAMPDIR="${D}/usr/$(get_libdir)/vamp" \
+ INSTALL_LADSPADIR="${D}/usr/$(get_libdir)/ladspa" \
+ INSTALL_LRDFDIR="${D}/usr/share/ladspa/rdf" \
+ INSTALL_PKGDIR="${D}/usr/$(get_libdir)/pkgconfig" \
+ install
+
+ dodoc CHANGELOG README.txt
+}
diff --git a/media-libs/rubberband/rubberband-1.8.1.ebuild b/media-libs/rubberband/rubberband-1.8.1.ebuild
new file mode 100644
index 000000000000..910bdcb9a720
--- /dev/null
+++ b/media-libs/rubberband/rubberband-1.8.1.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 multilib
+
+DESCRIPTION="An audio time-stretching and pitch-shifting library and utility program"
+HOMEPAGE="http://www.breakfastquay.com/rubberband/"
+SRC_URI="http://code.breakfastquay.com/attachments/download/34/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~hppa ~ppc ~ppc64 ~x86"
+IUSE="static-libs"
+
+RDEPEND="media-libs/vamp-plugin-sdk
+ media-libs/libsamplerate
+ media-libs/libsndfile
+ media-libs/ladspa-sdk
+ sci-libs/fftw:3.0"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ if ! use static-libs ; then
+ sed -e '/^all:/s/$(STATIC_TARGET)//' \
+ -e '/^\tcp $(STATIC_TARGET)/d' \
+ -i Makefile.in || die
+ fi
+}
+
+src_install() {
+ emake INSTALL_BINDIR="${D}/usr/bin" \
+ INSTALL_INCDIR="${D}/usr/include/rubberband" \
+ INSTALL_LIBDIR="${D}/usr/$(get_libdir)" \
+ INSTALL_VAMPDIR="${D}/usr/$(get_libdir)/vamp" \
+ INSTALL_LADSPADIR="${D}/usr/$(get_libdir)/ladspa" \
+ INSTALL_LRDFDIR="${D}/usr/share/ladspa/rdf" \
+ INSTALL_PKGDIR="${D}/usr/$(get_libdir)/pkgconfig" \
+ install
+
+ dodoc CHANGELOG README.txt
+}
diff --git a/media-libs/sampleicc/Manifest b/media-libs/sampleicc/Manifest
new file mode 100644
index 000000000000..2c14f32ad4b7
--- /dev/null
+++ b/media-libs/sampleicc/Manifest
@@ -0,0 +1,2 @@
+DIST SampleICC-1.6.6.tar.gz 660936 SHA256 675f3ee0e7c7f158b663c6a4db04110e7e94de454a46a5904a6d9f318c2de0f5
+DIST SampleICC-1.6.8.tar.gz 708069 SHA256 8b23bc6b9e4b8d304dc239bf874078edf7764e999aee4e11e7ed2d1c0271b965 SHA512 54d9f1fd9a7606d0c723bc0f86b3d54c4d1a54ecc4a3aeea665cb8c58df6555e65dd3706dee05e4c89e8a4ff7abf9f726c54c572b32db710e5b2c22b124bddc8 WHIRLPOOL 6cee6d2d59b89ed222637444abcb0070b142057c671d181581f1bb566001c7a530c0253bec50023470576f6979ca670df727060f9f802465ddb0bc423ca45de9
diff --git a/media-libs/sampleicc/metadata.xml b/media-libs/sampleicc/metadata.xml
new file mode 100644
index 000000000000..8cc14b831e73
--- /dev/null
+++ b/media-libs/sampleicc/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">sampleicc</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/sampleicc/sampleicc-1.6.6.ebuild b/media-libs/sampleicc/sampleicc-1.6.6.ebuild
new file mode 100644
index 000000000000..fddca7d0434f
--- /dev/null
+++ b/media-libs/sampleicc/sampleicc-1.6.6.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="C++ library for reading, writing, manipulating, and applying ICC profiles"
+HOMEPAGE="http://sampleicc.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/SampleICC-${PV}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux"
+IUSE="static-libs"
+
+DEPEND="media-libs/tiff"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/SampleICC-${PV}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+
+ prune_libtool_files --all
+}
diff --git a/media-libs/sampleicc/sampleicc-1.6.8.ebuild b/media-libs/sampleicc/sampleicc-1.6.8.ebuild
new file mode 100644
index 000000000000..4566096fc9c7
--- /dev/null
+++ b/media-libs/sampleicc/sampleicc-1.6.8.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools-utils
+
+DESCRIPTION="C++ library for reading, writing, manipulating, and applying ICC profiles"
+HOMEPAGE="http://sampleicc.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/SampleICC-${PV}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
+IUSE="static-libs"
+
+DEPEND="media-libs/tiff"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/SampleICC-${PV}
diff --git a/media-libs/sbc/Manifest b/media-libs/sbc/Manifest
new file mode 100644
index 000000000000..25f68cdd98ec
--- /dev/null
+++ b/media-libs/sbc/Manifest
@@ -0,0 +1,2 @@
+DIST sbc-1.2.tar.xz 246228 SHA256 c2f01ea54f7473704825113a9cdd46a23e67c650eff575f0670c3d9d66c4a5dc SHA512 65187dbe59e77da312f7dcc9a807959855ef8b6ff0be5403738f9a7b69035806f889d841209755c735525b81c1ba839e858a9ea8316defbc9dfa86104a35ca1d WHIRLPOOL 0496af202879d4f9dcd5cc470ae3cfbaab5e1badae9c9296aeeb082b5fee66657f482efa801d5aa91371e07261f76811d486b0ac2fd8de5e7c3a702505e596d2
+DIST sbc-1.3.tar.xz 246292 SHA256 e61022cf576f14190241e7071753fdacdce5d1dea89ffd704110fc50be689309 SHA512 c11cb1ede8abdb226d404ce34307d217b716b91cbe550ed90cb5387b062b7b97a6b7a81371de6f462d8c1429cb3299869a1bda347fa175e9d81cfa2bc2056c8b WHIRLPOOL 2237003adf9ed226e679034442f73ffe5b2088b51ba229e1435901c351be22c48cc111f86f219e81ad7b162c7e8df41420f329a037a825304d8c21a0c52e8e7f
diff --git a/media-libs/sbc/metadata.xml b/media-libs/sbc/metadata.xml
new file mode 100644
index 000000000000..c9b0be6242ce
--- /dev/null
+++ b/media-libs/sbc/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>sound</herd>
+ <maintainer>
+ <email>pacho@gentoo.org</email>
+ <name>Pacho Ramos</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/media-libs/sbc/sbc-1.2.ebuild b/media-libs/sbc/sbc-1.2.ebuild
new file mode 100644
index 000000000000..44afba07841f
--- /dev/null
+++ b/media-libs/sbc/sbc-1.2.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils multilib multilib-minimal
+
+DESCRIPTION="An audio codec to connect bluetooth high quality audio devices like headphones or loudspeakers"
+HOMEPAGE="http://git.kernel.org/?p=bluetooth/sbc.git http://www.bluez.org/sbc-10/"
+SRC_URI="mirror://kernel/linux/bluetooth/${P}.tar.xz"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 arm hppa ia64 ppc ppc64 x86"
+IUSE="static-libs"
+
+# --enable-tester is building src/sbctester but the tarball is missing required
+# .wav file to execute it
+RESTRICT="test"
+
+DEPEND="virtual/pkgconfig"
+
+DOCS="AUTHORS ChangeLog"
+
+multilib_src_configure() {
+ ECONF_SOURCE=${S} \
+ econf \
+ $(use_enable static-libs static) \
+ --disable-tester
+}
+
+multilib_src_install_all() {
+ prune_libtool_files
+}
diff --git a/media-libs/sbc/sbc-1.3.ebuild b/media-libs/sbc/sbc-1.3.ebuild
new file mode 100644
index 000000000000..8e4ad1f50f71
--- /dev/null
+++ b/media-libs/sbc/sbc-1.3.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils multilib multilib-minimal
+
+DESCRIPTION="An audio codec to connect bluetooth high quality audio devices like headphones or loudspeakers"
+HOMEPAGE="http://git.kernel.org/?p=bluetooth/sbc.git http://www.bluez.org/sbc-10/"
+SRC_URI="mirror://kernel/linux/bluetooth/${P}.tar.xz"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86"
+IUSE="static-libs"
+
+# --enable-tester is building src/sbctester but the tarball is missing required
+# .wav file to execute it
+RESTRICT="test"
+
+RDEPEND=""
+DEPEND="virtual/pkgconfig"
+
+multilib_src_configure() {
+ ECONF_SOURCE=${S} \
+ econf \
+ $(use_enable static-libs static) \
+ --disable-tester
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ prune_libtool_files
+}
diff --git a/media-libs/schroedinger/Manifest b/media-libs/schroedinger/Manifest
new file mode 100644
index 000000000000..cbddcc3f0090
--- /dev/null
+++ b/media-libs/schroedinger/Manifest
@@ -0,0 +1 @@
+DIST schroedinger-1.0.11.tar.gz 1019247 SHA256 1e572a0735b92aca5746c4528f9bebd35aa0ccf8619b22fa2756137a8cc9f912 SHA512 a39dd5360eb87a63379de71d91f48cde309ded91632c0ab8b1dc76b73591f7d0dfa7003c606d1b546d495b18c916aae905a9540b48dff7cbeb5b289e0f880438 WHIRLPOOL 118b37a61369423ce9c1f383ed7fedb24d619e63a5e61121a4468e15acb9adf502f7982c41ba3f867be23773f133c5b46fc0aa4638346bd7e5c293668c0291f8
diff --git a/media-libs/schroedinger/files/schroedinger-1.0.10-orc-symbols.patch b/media-libs/schroedinger/files/schroedinger-1.0.10-orc-symbols.patch
new file mode 100644
index 000000000000..6e236ab1698c
--- /dev/null
+++ b/media-libs/schroedinger/files/schroedinger-1.0.10-orc-symbols.patch
@@ -0,0 +1,43 @@
+From: David Schleef <ds@schleef.org>
+Date: Fri, 8 Oct 2010 20:32:11 +0000 (-0700)
+Subject: Don't export orc_ symbols and fix related bugs
+X-Git-Url: http://diracvideo.schleef.org/git?p=schroedinger.git;a=commitdiff_plain;h=9c4e8a89af9f8ce408e50a0ffab79348e9703df2
+
+Don't export orc_ symbols and fix related bugs
+---
+
+diff --git a/schroedinger/Makefile.am b/schroedinger/Makefile.am
+index b9b10c6..aa5e41c 100644
+--- a/schroedinger/Makefile.am
++++ b/schroedinger/Makefile.am
+@@ -157,7 +157,7 @@ libschroedinger_@SCHRO_MAJORMINOR@_la_LIBADD = \
+ libschroedinger_@SCHRO_MAJORMINOR@_la_LDFLAGS = \
+ -no-undefined \
+ -version-info $(SCHRO_LIBVERSION) \
+- -export-symbols-regex '^(schro|orc)_'
++ -export-symbols-regex '^schro_'
+
+ %.c.gcov: .libs/libschroedinger_@SCHRO_MAJORMINOR@_la-%.gcda %.c
+ $(GCOV) -b -f -o $^ > $@.out
+diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am
+index fac2e21..92d74fd 100644
+--- a/testsuite/Makefile.am
++++ b/testsuite/Makefile.am
+@@ -95,7 +95,7 @@ wavelet_gain_curve_SOURCES = wavelet_gain_curve.c
+
+ #wavelet_2d_CFLAGS = $(SCHRO_CFLAGS)
+ #wavelet_2d_LDADD = $(SCHRO_LIBS)
+-wavelet_2d_SOURCES = wavelet_2d.c
++wavelet_2d_SOURCES = wavelet_2d.c $(top_srcdir)/schroedinger/tmp-orc.c
+
+ wavelet_noise_2d_SOURCES = wavelet_noise_2d.c
+
+@@ -113,7 +113,7 @@ motion2_SOURCES = motion2.c
+
+ #quant_CFLAGS =
+ #quant_LDADD = -lm
+-quant_SOURCES = quant.c
++quant_SOURCES = quant.c $(top_srcdir)/schroedinger/tmp-orc.c
+
+ #sort_CFLAGS = $(SCHRO_CFLAGS)
+ #sort_LDADD = $(SCHRO_LIBS)
diff --git a/media-libs/schroedinger/files/schroedinger-1.0.11-darwin-compile.patch b/media-libs/schroedinger/files/schroedinger-1.0.11-darwin-compile.patch
new file mode 100644
index 000000000000..853d5da736f3
--- /dev/null
+++ b/media-libs/schroedinger/files/schroedinger-1.0.11-darwin-compile.patch
@@ -0,0 +1,32 @@
+From 46f48277ce8109541ef1d0608bd2532e433124ea Mon Sep 17 00:00:00 2001
+From: David Schleef <ds@schleef.org>
+Date: Thu, 23 Feb 2012 20:45:57 -0800
+Subject: [PATCH] testsuite: fix out-of-dir builds
+
+From ee011f33f80c9691a6cfd5116101fdcf8c3cd6f7 Mon Sep 17 00:00:00 2001
+From: David Schleef <ds@schleef.org>
+Date: Mon, 27 Feb 2012 16:11:52 -0800
+Subject: [PATCH] tests: fix build on os/x
+
+
+--- a/testsuite/Makefile.am
++++ b/testsuite/Makefile.am
+@@ -97,7 +97,8 @@ wavelet_gain_curve_SOURCES = wavelet_gain_curve.c
+ #wavelet_2d_CFLAGS = $(SCHRO_CFLAGS)
+ #wavelet_2d_LDADD = $(SCHRO_LIBS)
+ wavelet_2d_SOURCES = wavelet_2d.c
+-nodist_wavelet_2d_SOURCES = $(top_srcdir)/schroedinger/tmp-orc.c
++nodist_wavelet_2d_SOURCES = $(top_builddir)/schroedinger/tmp-orc.c
+
+ wavelet_max_gain_SOURCES = wavelet_max_gain.c
++nodist_wavelet_max_gain_SOURCES = $(top_builddir)/schroedinger/tmp-orc.c
+
+@@ -118,7 +118,7 @@ motion2_SOURCES = motion2.c
+ #quant_CFLAGS =
+ #quant_LDADD = -lm
+ quant_SOURCES = quant.c
+-nodist_quant_SOURCES = $(top_srcdir)/schroedinger/tmp-orc.c
++nodist_quant_SOURCES = $(top_builddir)/schroedinger/tmp-orc.c
+
+ #sort_CFLAGS = $(SCHRO_CFLAGS)
+ #sort_LDADD = $(SCHRO_LIBS)
diff --git a/media-libs/schroedinger/files/schroedinger-1.0.9-asneeded.patch b/media-libs/schroedinger/files/schroedinger-1.0.9-asneeded.patch
new file mode 100644
index 000000000000..dd67a50dd6c8
--- /dev/null
+++ b/media-libs/schroedinger/files/schroedinger-1.0.9-asneeded.patch
@@ -0,0 +1,11 @@
+--- testsuite/Makefile.am
++++ testsuite/Makefile.am
+@@ -34,7 +34,7 @@
+
+ AM_CFLAGS = $(SCHRO_CFLAGS) $(ERROR_CFLAGS) $(ORC_CFLAGS) \
+ -DSCHRO_ENABLE_UNSTABLE_API
+-LDADD = $(LIBM) libschrotest.la $(SCHRO_LIBS)
++LDADD = $(LIBM) libschrotest.la $(SCHRO_LIBS) -lorc-test-0.4
+
+ libschrotest_la_SOURCES = common.c
+ libschrotest_la_LIBADD = $(SCHRO_LIBS) $(ORC_LIBS) -lorc-test-0.4 $(LIBM)
diff --git a/media-libs/schroedinger/metadata.xml b/media-libs/schroedinger/metadata.xml
new file mode 100644
index 000000000000..c572c7d9b478
--- /dev/null
+++ b/media-libs/schroedinger/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-libs/schroedinger/schroedinger-1.0.11-r1.ebuild b/media-libs/schroedinger/schroedinger-1.0.11-r1.ebuild
new file mode 100644
index 000000000000..f4344ac82701
--- /dev/null
+++ b/media-libs/schroedinger/schroedinger-1.0.11-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=yes
+AUTOTOOLS_PRUNE_LIBTOOL_FILES=all
+
+inherit eutils autotools-multilib gnome2-utils
+
+DESCRIPTION="C-based libraries for the Dirac video codec"
+HOMEPAGE="http://www.diracvideo.org/"
+SRC_URI="http://www.diracvideo.org/download/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2 MIT MPL-1.1"
+SLOT="0"
+KEYWORDS="amd64 hppa ppc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="static-libs"
+
+RDEPEND=">=dev-lang/orc-0.4.17[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ dev-util/gtk-doc-am"
+
+src_prepare() {
+ gnome2_environment_reset #534582
+
+ # from upstream, drop at next release
+ epatch "${FILESDIR}"/${P}-darwin-compile.patch
+
+ sed -i \
+ -e '/AS_COMPILER_FLAG(-O3/d' \
+ -e 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/g' \
+ configure.ac || die
+
+ AT_M4DIR="m4" autotools-multilib_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=(
+ --with-html-dir="${EPREFIX}/usr/share/doc/${PF}/html"
+ )
+ autotools-multilib_src_configure
+}
diff --git a/media-libs/sdif/Manifest b/media-libs/sdif/Manifest
new file mode 100644
index 000000000000..2f69df2e9ae6
--- /dev/null
+++ b/media-libs/sdif/Manifest
@@ -0,0 +1,2 @@
+DIST SDIF-3.8.6-src.tar.gz 786261 SHA256 857484135cfd5f0623ff3179c60540d06c2351a21e4101f59bebfca032e8655b SHA512 5b9603bed121afe4e4bd524372332c48a226711c029271ce0a26ae644990f060104b03983a3b49afe141897bdf6e878dbfd31a853c38ab14b8d4eb98f868f9e7 WHIRLPOOL b0f5a3730d8ff324bb0e2e3fe230d4880ddbc10b0999ffd80b18e09516b89bb8103c5eea4e322bd3d2d3c94534b732aca1e33b742c5a0687c74550d462239658
+DIST SDIF-doc.tar.gz 534161 SHA256 0ff5598019b92a4068b92175285ba03abfdfa4587f5dc1abd980bd17da73f13d SHA512 df03d8dcb69603a5ad96dbee77789b0422e39b5dfbe1f944dff1d3763a59d9dce779ef714fa041a44d9fe30ab4714c0f2343502004c1e9b03286ae701fb14e22 WHIRLPOOL c05c64eb1d290dfbd98fc5356141740851de94bd3cf0af27c114fb0713f229662f1a1e2ce1b415d1790ae5f596d2acf961a7c85fd19284f36edbdcaa7787441c
diff --git a/media-libs/sdif/files/sdif-3.8.6-cflags.patch b/media-libs/sdif/files/sdif-3.8.6-cflags.patch
new file mode 100644
index 000000000000..27debd5b67c5
--- /dev/null
+++ b/media-libs/sdif/files/sdif-3.8.6-cflags.patch
@@ -0,0 +1,39 @@
+--- configure.old 2004-09-03 06:49:36.454205056 +0900
++++ configure 2004-09-03 09:24:10.924271296 +0900
+@@ -19247,6 +19247,7 @@
+ done
+
+
++CFLAGS="${CFLAGS}"
+
+ # Check whether --enable-doc-compilation or --disable-doc-compilation was given.
+ if test "${enable_doc_compilation+set}" = set; then
+@@ -19844,16 +19845,16 @@
+ enableval="$enable_debug"
+ echo FEATURE enable-debug... $enableval;
+ if test "$enableval" = "yes"; then
+- SELLIB=libsdif-debug.la; CFLAGS="-g2";
++ SELLIB=libsdif-debug.la; CFLAGS="${CFLAGS} -g2";
+ PROGLIST="querysdif-debug\$(EXEEXT) sdifextract-debug\$(EXEEXT) sdiftotext-debug\$(EXEEXT) tosdif-debug\$(EXEEXT)";
+
+ else
+- SELLIB=libsdif.la; CFLAGS="-O3";
++ SELLIB=libsdif.la;
+ PROGLIST="querysdif\$(EXEEXT) sdifextract\$(EXEEXT) sdiftotext\$(EXEEXT) tosdif\$(EXEEXT)";
+ fi
+ else
+
+-SELLIB=libsdif.la; CFLAGS="-O3";
++SELLIB=libsdif.la;
+ PROGLIST="querysdif\$(EXEXT) sdifextract\$(EXEEXT) sdiftotext\$(EXEEXT) tosdif\$(EXEEXT)";
+
+ fi;
+@@ -19865,7 +19866,7 @@
+ enableval="$enable_profile"
+ echo FEATURE enable-profile... $enableval;
+ if test "$enableval" = "yes"; then
+- SELLIB=libsdif-profile.la; CFLAGS="-g -pg -fprofile-arcs";
++ SELLIB=libsdif-profile.la; CFLAGS="${CFLAGS} -g -pg -fprofile-arcs";
+ PROGLIST="querysdif-profile\$(EXEEXT) sdifextract-profile\$(EXEEXT) sdiftotext-profile\$(EXEEXT) tosdif-profile\$(EXEEXT)";
+ fi
+ else
diff --git a/media-libs/sdif/metadata.xml b/media-libs/sdif/metadata.xml
new file mode 100644
index 000000000000..c71fe6c363c6
--- /dev/null
+++ b/media-libs/sdif/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>sound</herd>
+ <longdescription>
+ The general idea of SDIF is to store information related to signal
+ processing and specifically of sound, in files, according to a common
+ format to all data types. Thus, it is possible to store results or
+ parameters of analyses, syntheses...
+ </longdescription>
+ <use>
+ <flag name="ftruncate">Enables usage of ftruncate v. truncate</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/sdif/sdif-3.8.6.ebuild b/media-libs/sdif/sdif-3.8.6.ebuild
new file mode 100644
index 000000000000..23254af4c4d5
--- /dev/null
+++ b/media-libs/sdif/sdif-3.8.6.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+IUSE="doc threads ftruncate debug"
+
+inherit eutils
+
+MY_PN="${PN/sdif/SDIF}"
+MY_P=${MY_PN}-${PV}-src
+S=${WORKDIR}/${MY_P}
+
+DESCRIPTION="The Sound Description Interchange Format Library deals with audio and wave processing"
+HOMEPAGE="http://www.ircam.fr/anasyn/sdif"
+SRC_URI="http://www.ircam.fr/anasyn/sdif/download/${MY_P}.tar.gz
+ doc? ( http://www.ircam.fr/anasyn/sdif/download/${MY_PN}-doc.tar.gz )"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc sparc x86"
+
+DEPEND=""
+
+src_unpack() {
+ # a hack that I need to bother upstream about
+ # they don't want to use the "Package-Name-Docs/file1.html" format
+ # instead it's just file1.html :|
+ unpack "${MY_P}.tar.gz"
+ mkdir "${WORKDIR}/SDIF-doc"
+ use doc && tar xfz "${DISTDIR}/${MY_PN}-doc.tar.gz" -C "${WORKDIR}/SDIF-doc"
+
+ cd "${S}"
+ #custom cflags...
+ epatch "${FILESDIR}/${P}-cflags.patch"
+}
+
+src_compile() {
+ econf $(use_enable debug) \
+ $(use_enable ftruncate) \
+ $(use_enable threads pthreads) \
+ || die "configure failed"
+
+ emake || die "emake failed"
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die
+ use doc && dohtml -r "${WORKDIR}/SDIF-doc"
+}
diff --git a/media-libs/sdl-gfx/Manifest b/media-libs/sdl-gfx/Manifest
new file mode 100644
index 000000000000..a85f2acf7e59
--- /dev/null
+++ b/media-libs/sdl-gfx/Manifest
@@ -0,0 +1 @@
+DIST SDL_gfx-2.0.25.tar.gz 1760656 SHA256 556eedc06b6cf29eb495b6d27f2dcc51bf909ad82389ba2fa7bdc4dec89059c0 SHA512 42a5d78fe1a9b644d329fb688ed6c98558f8dd0aa029a1a0d99b1c59f94859269e0aef8f9e420b8018b687d8eae151652890be3994775644e1d3a80ba7b6fe8c WHIRLPOOL f3cac6a16c1fe1bcc8a09d5438cca8737ee571030524381804969c89d97ee4fd78e36625616932d4985504fc7689d765455d90a47692c9097119094612f72c9c
diff --git a/media-libs/sdl-gfx/metadata.xml b/media-libs/sdl-gfx/metadata.xml
new file mode 100644
index 000000000000..71195a1e8908
--- /dev/null
+++ b/media-libs/sdl-gfx/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+<longdescription>
+SDL graphics drawing primitives and other support functions
+The SDL_gfx library evolved out of the SDL_gfxPrimitives code which provided basic drawing
+routines such as lines, circles or polygons and SDL_rotozoom which implemented a
+interpolating rotozoomer for SDL surfaces.
+
+The current components of the SDL_gfx library are:
+
+ * Graphic Primitives (SDL_gfxPrimitves.h)
+ * Rotozoomer (SDL_rotozoom.h)
+ * Framerate control (SDL_framerate.h)
+ * MMX image filters (SDL_imageFilter.h)
+
+The library is backwards compatible to the above mentioned code. Its is written in plain C
+and can be used in C++ code.
+</longdescription>
+</pkgmetadata>
diff --git a/media-libs/sdl-gfx/sdl-gfx-2.0.25.ebuild b/media-libs/sdl-gfx/sdl-gfx-2.0.25.ebuild
new file mode 100644
index 000000000000..bf25598e99cc
--- /dev/null
+++ b/media-libs/sdl-gfx/sdl-gfx-2.0.25.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 autotools eutils multilib-minimal
+
+MY_P="${P/sdl-/SDL_}"
+DESCRIPTION="Graphics drawing primitives library for SDL"
+HOMEPAGE="http://www.ferzkopp.net/joomla/content/view/19/14/"
+SRC_URI="http://www.ferzkopp.net/Software/SDL_gfx-2.0/${MY_P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm ~arm64 hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris"
+IUSE="doc cpu_flags_x86_mmx static-libs"
+
+RDEPEND=">=media-libs/libsdl-1.2.15-r4[video,${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ sed -i -e 's/-O //' configure.in || die
+ mv configure.in configure.ac || die
+ eautoreconf
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ --disable-dependency-tracking \
+ $(use_enable cpu_flags_x86_mmx mmx) \
+ $(use_enable static-libs static)
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+}
+
+multilib_src_install_all() {
+ dodoc AUTHORS ChangeLog README
+ use doc && dohtml -r Docs/*
+ prune_libtool_files
+}
diff --git a/media-libs/sdl-image/Manifest b/media-libs/sdl-image/Manifest
new file mode 100644
index 000000000000..e47318f0b160
--- /dev/null
+++ b/media-libs/sdl-image/Manifest
@@ -0,0 +1 @@
+DIST SDL_image-1.2.12.tar.gz 2231074 SHA256 0b90722984561004de84847744d566809dbb9daf732a9e503b91a1b5a84e5699 SHA512 0e71b280abc2a7f15755e4480a3c1b52d41f9f8b0c9216a6f5bd9fc0e939456fb5d6c10419e1d1904785783f9a1891ead278c03e88b0466fecc6871c3ca40136 WHIRLPOOL cde2ea45f8a55cec720d05bba450c98ad177fad826938119482f4988c5af6eaaeb53079b749f886329bd59411790f1cafe04d01fff90b44095fc626358578c51
diff --git a/media-libs/sdl-image/metadata.xml b/media-libs/sdl-image/metadata.xml
new file mode 100644
index 000000000000..9758b7a8f6da
--- /dev/null
+++ b/media-libs/sdl-image/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>games</herd>
+<use>
+ <flag name='webp'>support loading WEBP images</flag>
+</use>
+</pkgmetadata>
diff --git a/media-libs/sdl-image/sdl-image-1.2.12-r1.ebuild b/media-libs/sdl-image/sdl-image-1.2.12-r1.ebuild
new file mode 100644
index 000000000000..dc3bbfbc141a
--- /dev/null
+++ b/media-libs/sdl-image/sdl-image-1.2.12-r1.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils multilib-minimal
+
+MY_P="${P/sdl-/SDL_}"
+DESCRIPTION="image file loading library"
+HOMEPAGE="http://www.libsdl.org/projects/SDL_image/"
+SRC_URI="http://www.libsdl.org/projects/SDL_image/release/${MY_P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris"
+IUSE="gif jpeg png static-libs tiff webp"
+
+RDEPEND="
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ !<=app-emulation/emul-linux-x86-sdl-20140406
+ )
+ >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+ >=media-libs/libsdl-1.2.15-r4[${MULTILIB_USEDEP}]
+ png? ( >=media-libs/libpng-1.6.10:0[${MULTILIB_USEDEP}] )
+ jpeg? ( >=virtual/jpeg-0-r2:0[${MULTILIB_USEDEP}] )
+ tiff? ( >=media-libs/tiff-3.9.7-r1:0[${MULTILIB_USEDEP}] )
+ webp? ( >=media-libs/libwebp-0.3.0[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ --disable-jpg-shared \
+ --disable-png-shared \
+ --disable-tif-shared \
+ --disable-webp-shared \
+ $(use_enable static-libs static) \
+ $(use_enable gif) \
+ $(use_enable jpeg jpg) \
+ $(use_enable tiff tif) \
+ $(use_enable png) \
+ $(use_enable webp) \
+ --enable-bmp \
+ --enable-lbm \
+ --enable-pcx \
+ --enable-pnm \
+ --enable-tga \
+ --enable-xcf \
+ --enable-xpm \
+ --enable-xv
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+ dobin .libs/showimage
+}
+
+multilib_src_install_all() {
+ dodoc CHANGES README
+ use static-libs || prune_libtool_files --all
+}
diff --git a/media-libs/sdl-mixer/Manifest b/media-libs/sdl-mixer/Manifest
new file mode 100644
index 000000000000..af4393c0507b
--- /dev/null
+++ b/media-libs/sdl-mixer/Manifest
@@ -0,0 +1 @@
+DIST SDL_mixer-1.2.12.tar.gz 3707781 SHA256 1644308279a975799049e4826af2cfc787cad2abb11aa14562e402521f86992a SHA512 230f6c5a73f4bea364f8aa3d75f76694305571dea45f357def742b2b50849b2d896af71e08689981207edc99a9836088bee2d0bd98d92c7f4ca52b12b3d8cf96 WHIRLPOOL 046b7a160cfe214cdac8c1a5ea424024a8850d3737908e5630b504f1f12817bfd2f391909f37be3d6994cab7f71ab24ecab92e99f5429dd8405f0e4046bc00a7
diff --git a/media-libs/sdl-mixer/files/sdl-mixer-1.2.12-Fix-compiling-against-libmodplug-0.8.8.5.patch b/media-libs/sdl-mixer/files/sdl-mixer-1.2.12-Fix-compiling-against-libmodplug-0.8.8.5.patch
new file mode 100644
index 000000000000..369fe49558f0
--- /dev/null
+++ b/media-libs/sdl-mixer/files/sdl-mixer-1.2.12-Fix-compiling-against-libmodplug-0.8.8.5.patch
@@ -0,0 +1,24 @@
+From: hasufell <hasufell@gentoo.org>
+Date: Fri, 8 Aug 2014 13:49:49 +0200
+Subject: [PATCH] Fix compiling against libmodplug-0.8.8.5
+
+pkg-config --cflags libmodplug no longer
+reports a subdir and thus we need to use
+#include "libmodplug/modplug.h" syntax.
+---
+ music_modplug.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/music_modplug.h
++++ b/music_modplug.h
+@@ -1,6 +1,6 @@
+ #ifdef MODPLUG_MUSIC
+
+-#include "modplug.h"
++#include "libmodplug/modplug.h"
+ #include "SDL_rwops.h"
+ #include "SDL_audio.h"
+ #include "SDL_mixer.h"
+--
+2.0.4
+
diff --git a/media-libs/sdl-mixer/files/sdl-mixer-1.2.12-clang.patch b/media-libs/sdl-mixer/files/sdl-mixer-1.2.12-clang.patch
new file mode 100644
index 000000000000..3c462bd97088
--- /dev/null
+++ b/media-libs/sdl-mixer/files/sdl-mixer-1.2.12-clang.patch
@@ -0,0 +1,11 @@
+--- SDL_mixer-1.2.12.orig/music_mad.c
++++ SDL_mixer-1.2.12/music_mad.c
+@@ -224,7 +224,7 @@
+ if ((mp3_mad->status & MS_playing) == 0) {
+ /* We're not supposed to be playing, so send silence instead. */
+ memset(stream, 0, len);
+- return;
++ return 0;
+ }
+
+ out = stream;
diff --git a/media-libs/sdl-mixer/files/sdl-mixer-1.2.12-mikmod-r587.patch b/media-libs/sdl-mixer/files/sdl-mixer-1.2.12-mikmod-r587.patch
new file mode 100644
index 000000000000..d99609f8ab25
--- /dev/null
+++ b/media-libs/sdl-mixer/files/sdl-mixer-1.2.12-mikmod-r587.patch
@@ -0,0 +1,55 @@
+http://hg.libsdl.org/SDL_mixer/rev/56cad6484b04
+https://bugs.gentoo.org/445980
+
+# HG changeset patch
+# User Sam Lantinga <slouken@libsdl.org>
+# Date 1342998807 25200
+# Node ID 56cad6484b04f83c8d42428c755a046678506436
+# Parent c92001a2c18f628698c58aa4e05a7335d10d0e9e
+Paul P Komkoff Jr fixed malloc/free mismatch in the MikMod driver
+
+--- a/dynamic_mod.c
++++ b/dynamic_mod.c
+@@ -93,6 +93,13 @@
+ SDL_UnloadObject(mikmod.handle);
+ return -1;
+ }
++ mikmod.MikMod_free =
++ (void (*)(void*))
++ SDL_LoadFunction(mikmod.handle, "MikMod_free");
++ if ( mikmod.MikMod_free == NULL ) {
++ SDL_UnloadObject(mikmod.handle);
++ return -1;
++ }
+ mikmod.Player_Active =
+ (BOOL (*)(void))
+ SDL_LoadFunction(mikmod.handle, "Player_Active");
+--- a/dynamic_mod.h
++++ b/dynamic_mod.h
+@@ -35,6 +35,7 @@
+ void (*MikMod_RegisterDriver)(struct MDRIVER*);
+ int* MikMod_errno;
+ char* (*MikMod_strerror)(int);
++ void (*MikMod_free)(void*);
+ BOOL (*Player_Active)(void);
+ void (*Player_Free)(MODULE*);
+ MODULE* (*Player_LoadGeneric)(MREADER*,int,BOOL);
+--- a/music_mod.c
++++ b/music_mod.c
+@@ -109,13 +109,13 @@
+
+ list = mikmod.MikMod_InfoDriver();
+ if ( list )
+- free(list);
++ mikmod.MikMod_free(list);
+ else
+ mikmod.MikMod_RegisterDriver(mikmod.drv_nos);
+
+ list = mikmod.MikMod_InfoLoader();
+ if ( list )
+- free(list);
++ mikmod.MikMod_free(list);
+ else
+ mikmod.MikMod_RegisterAllLoaders();
+
+
diff --git a/media-libs/sdl-mixer/files/sdl-mixer-1.2.12-mikmod-r588.patch b/media-libs/sdl-mixer/files/sdl-mixer-1.2.12-mikmod-r588.patch
new file mode 100644
index 000000000000..d47a8d4534c8
--- /dev/null
+++ b/media-libs/sdl-mixer/files/sdl-mixer-1.2.12-mikmod-r588.patch
@@ -0,0 +1,36 @@
+http://hg.libsdl.org/SDL_mixer/rev/2ebb0d016f27
+https://bugs.gentoo.org/445980
+
+# HG changeset patch
+# User Sam Lantinga <slouken@libsdl.org>
+# Date 1343000017 25200
+# Node ID 2ebb0d016f277f7f643d8a66ed0e1099e10d1fba
+# Parent 56cad6484b04f83c8d42428c755a046678506436
+Fixed normal linking with libmikmod and linking with earlier versions of libmikmod.
+
+--- a/dynamic_mod.c
++++ b/dynamic_mod.c
+@@ -97,8 +97,8 @@
+ (void (*)(void*))
+ SDL_LoadFunction(mikmod.handle, "MikMod_free");
+ if ( mikmod.MikMod_free == NULL ) {
+- SDL_UnloadObject(mikmod.handle);
+- return -1;
++ /* libmikmod 3.1 and earlier doesn't have it */
++ mikmod.MikMod_free = free;
+ }
+ mikmod.Player_Active =
+ (BOOL (*)(void))
+@@ -246,6 +246,11 @@
+ mikmod.MikMod_RegisterDriver = MikMod_RegisterDriver;
+ mikmod.MikMod_errno = &MikMod_errno;
+ mikmod.MikMod_strerror = MikMod_strerror;
++#if LIBMIKMOD_VERSION < ((3<<16)|(2<<8))
++ mikmod.MikMod_free = free;
++#else
++ mikmod.MikMod_free = MikMod_free;
++#endif
+ mikmod.Player_Active = Player_Active;
+ mikmod.Player_Free = Player_Free;
+ mikmod.Player_LoadGeneric = Player_LoadGeneric;
+
diff --git a/media-libs/sdl-mixer/files/sdl-mixer-1.2.12-wav.patch b/media-libs/sdl-mixer/files/sdl-mixer-1.2.12-wav.patch
new file mode 100644
index 000000000000..38914fd77f15
--- /dev/null
+++ b/media-libs/sdl-mixer/files/sdl-mixer-1.2.12-wav.patch
@@ -0,0 +1,35 @@
+https://bugs.gentoo.org/show_bug.cgi?id=406739
+Nikos Chantziaras 2012-03-03 03:13:39 EST
+
+There's a bug in the current version of SDL_mixer where failing to load a WAV sample will result in freeing a resource twice, resulting in an application crash. There is an upstream fix for this:
+
+http://hg.libsdl.org/SDL_mixer/rev/ea53a85853dd
+
+Upstream bug: http://bugzilla.libsdl.org/show_bug.cgi?id=1418
+
+--- a/mixer.c
++++ b/mixer.c
+@@ -610,13 +610,15 @@
+ break;
+ default:
+ SDL_SetError("Unrecognized sound file type");
+- return(0);
++ if ( freesrc ) {
++ SDL_RWclose(src);
++ }
++ loaded = NULL;
++ break;
+ }
+ if ( !loaded ) {
++ /* The individual loaders have closed src if needed */
+ SDL_free(chunk);
+- if ( freesrc ) {
+- SDL_RWclose(src);
+- }
+ return(NULL);
+ }
+
+
+
+
+
diff --git a/media-libs/sdl-mixer/metadata.xml b/media-libs/sdl-mixer/metadata.xml
new file mode 100644
index 000000000000..f6db1ba16a50
--- /dev/null
+++ b/media-libs/sdl-mixer/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>games</herd>
+<use>
+ <flag name='fluidsynth'>Use <pkg>media-sound/fluidsynth</pkg> for MIDI support</flag>
+ <flag name='midi'>basic support for MIDI files</flag>
+ <flag name='mod'>basic support for MOD files</flag>
+ <flag name='playtools'>Install playwave and playmus tools (useful for testing)</flag>
+ <flag name='smpeg'>Use <pkg>media-libs/smpeg</pkg> for MP3 support</flag>
+ <flag name='wav'>support WAVE files</flag>
+</use>
+</pkgmetadata>
diff --git a/media-libs/sdl-mixer/sdl-mixer-1.2.12-r3.ebuild b/media-libs/sdl-mixer/sdl-mixer-1.2.12-r3.ebuild
new file mode 100644
index 000000000000..85e86edc1ac8
--- /dev/null
+++ b/media-libs/sdl-mixer/sdl-mixer-1.2.12-r3.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils
+
+MY_P=${P/sdl-/SDL_}
+DESCRIPTION="Simple Direct Media Layer Mixer Library"
+HOMEPAGE="http://www.libsdl.org/projects/SDL_mixer/"
+SRC_URI="http://www.libsdl.org/projects/SDL_mixer/release/${MY_P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris"
+IUSE="flac fluidsynth mad midi mikmod mod modplug mp3 playtools smpeg static-libs timidity vorbis +wav"
+REQUIRED_USE="
+ midi? ( || ( timidity fluidsynth ) )
+ timidity? ( midi )
+ fluidsynth? ( midi )
+ mp3? ( || ( smpeg mad ) )
+ smpeg? ( mp3 )
+ mad? ( mp3 )
+ mod? ( || ( mikmod modplug ) )
+ mikmod? ( mod )
+ modplug? ( mod )
+ "
+
+DEPEND=">=media-libs/libsdl-1.2.10
+ flac? ( media-libs/flac )
+ midi? (
+ fluidsynth? ( media-sound/fluidsynth )
+ timidity? ( media-sound/timidity++ )
+ )
+ mp3? (
+ mad? ( media-libs/libmad )
+ smpeg? ( >=media-libs/smpeg-0.4.4-r1 )
+ )
+ mod? (
+ modplug? ( media-libs/libmodplug )
+ mikmod? ( >=media-libs/libmikmod-3.1.10 )
+ )
+ vorbis? ( >=media-libs/libvorbis-1.0_beta4 media-libs/libogg )"
+RDEPEND="${DEPEND}
+ playtools? ( !media-libs/sdl2-mixer[playtools] )"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-wav.patch \
+ "${FILESDIR}"/${P}-clang.patch \
+ "${FILESDIR}"/${P}-Fix-compiling-against-libmodplug-0.8.8.5.patch \
+ "${FILESDIR}"/${P}-mikmod-r58{7,8}.patch #445980
+ sed -i \
+ -e '/link.*play/s/-o/$(LDFLAGS) -o/' \
+ Makefile.in || die
+}
+
+src_configure() {
+ econf \
+ --disable-dependency-tracking \
+ --disable-music-flac-shared \
+ --disable-music-fluidsynth-shared \
+ --disable-music-mod-shared \
+ --disable-music-mp3-shared \
+ --disable-music-ogg-shared \
+ $(use_enable wav music-wave) \
+ $(use_enable vorbis music-ogg) \
+ $(use_enable mikmod music-mod) \
+ $(use_enable modplug music-mod-modplug) \
+ $(use_enable flac music-flac) \
+ $(use_enable static-libs static) \
+ $(use_enable smpeg music-mp3) \
+ $(use_enable mad music-mp3-mad-gpl) \
+ $(use_enable timidity music-timidity-midi) \
+ $(use_enable fluidsynth music-fluidsynth-midi)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ if use playtools; then
+ emake DESTDIR="${D}" install-bin
+ fi
+ dodoc CHANGES README
+ if ! use static-libs ; then
+ find "${D}" -type f -name '*.la' -exec rm {} + || die
+ fi
+}
+
+pkg_postinst() {
+ # bug 412035
+ # https://bugs.gentoo.org/show_bug.cgi?id=412035
+ if use midi ; then
+ if use fluidsynth; then
+ ewarn "FluidSynth support requires you to set the SDL_SOUNDFONTS"
+ ewarn "environment variable to the location of a SoundFont file"
+ ewarn "unless the game or application happens to do this for you."
+
+ if use timidity; then
+ ewarn "Failing to do so will result in Timidity being used instead."
+ else
+ ewarn "Failing to do so will result in silence."
+ fi
+ fi
+ fi
+}
diff --git a/media-libs/sdl-mixer/sdl-mixer-1.2.12-r4.ebuild b/media-libs/sdl-mixer/sdl-mixer-1.2.12-r4.ebuild
new file mode 100644
index 000000000000..bd5266a5af8c
--- /dev/null
+++ b/media-libs/sdl-mixer/sdl-mixer-1.2.12-r4.ebuild
@@ -0,0 +1,115 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils multilib-minimal
+
+MY_P=${P/sdl-/SDL_}
+DESCRIPTION="Simple Direct Media Layer Mixer Library"
+HOMEPAGE="http://www.libsdl.org/projects/SDL_mixer/"
+SRC_URI="http://www.libsdl.org/projects/SDL_mixer/release/${MY_P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 sh sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris"
+IUSE="flac fluidsynth mad midi mikmod mod modplug mp3 playtools smpeg static-libs timidity vorbis +wav"
+REQUIRED_USE="
+ midi? ( || ( timidity fluidsynth ) )
+ timidity? ( midi )
+ fluidsynth? ( midi )
+ mp3? ( || ( smpeg mad ) )
+ smpeg? ( mp3 )
+ mad? ( mp3 )
+ mod? ( || ( mikmod modplug ) )
+ mikmod? ( mod )
+ modplug? ( mod )
+ "
+
+RDEPEND=">=media-libs/libsdl-1.2.15-r4[${MULTILIB_USEDEP}]
+ flac? ( >=media-libs/flac-1.2.1-r5[${MULTILIB_USEDEP}] )
+ midi? (
+ fluidsynth? ( >=media-sound/fluidsynth-1.1.6-r1[${MULTILIB_USEDEP}] )
+ timidity? ( media-sound/timidity++ )
+ )
+ mp3? (
+ mad? ( >=media-libs/libmad-0.15.1b-r8[${MULTILIB_USEDEP}] )
+ smpeg? ( >=media-libs/smpeg-0.4.4-r10[${MULTILIB_USEDEP}] )
+ )
+ mod? (
+ modplug? ( >=media-libs/libmodplug-0.8.8.4-r1[${MULTILIB_USEDEP}] )
+ mikmod? ( >=media-libs/libmikmod-3.3.6-r1[${MULTILIB_USEDEP}] )
+ )
+ vorbis? (
+ >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}]
+ >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-sdl-20140406-r1
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ )"
+DEPEND=${RDEPEND}
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-wav.patch \
+ "${FILESDIR}"/${P}-clang.patch \
+ "${FILESDIR}"/${P}-Fix-compiling-against-libmodplug-0.8.8.5.patch \
+ "${FILESDIR}"/${P}-mikmod-r58{7,8}.patch #445980
+ sed -i \
+ -e '/link.*play/s/-o/$(LDFLAGS) -o/' \
+ Makefile.in || die
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE=${S} \
+ econf \
+ --disable-dependency-tracking \
+ --disable-music-flac-shared \
+ --disable-music-fluidsynth-shared \
+ --disable-music-mod-shared \
+ --disable-music-mp3-shared \
+ --disable-music-ogg-shared \
+ $(use_enable wav music-wave) \
+ $(use_enable vorbis music-ogg) \
+ $(use_enable mikmod music-mod) \
+ $(use_enable modplug music-mod-modplug) \
+ $(use_enable flac music-flac) \
+ $(use_enable static-libs static) \
+ $(use_enable smpeg music-mp3) \
+ $(use_enable mad music-mp3-mad-gpl) \
+ $(use_enable timidity music-timidity-midi) \
+ $(use_enable fluidsynth music-fluidsynth-midi) \
+ LIBMIKMOD_CONFIG=${EPREFIX}/usr/bin/${CHOST}-libmikmod-config
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+ if multilib_is_native_abi && use playtools; then
+ emake DESTDIR="${D}" install-bin
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc CHANGES README
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ # bug 412035
+ # https://bugs.gentoo.org/show_bug.cgi?id=412035
+ if use midi ; then
+ if use fluidsynth; then
+ ewarn "FluidSynth support requires you to set the SDL_SOUNDFONTS"
+ ewarn "environment variable to the location of a SoundFont file"
+ ewarn "unless the game or application happens to do this for you."
+
+ if use timidity; then
+ ewarn "Failing to do so will result in Timidity being used instead."
+ else
+ ewarn "Failing to do so will result in silence."
+ fi
+ fi
+ fi
+}
diff --git a/media-libs/sdl-net/Manifest b/media-libs/sdl-net/Manifest
new file mode 100644
index 000000000000..09e595b37573
--- /dev/null
+++ b/media-libs/sdl-net/Manifest
@@ -0,0 +1 @@
+DIST SDL_net-1.2.8.tar.gz 360958 SHA256 5f4a7a8bb884f793c278ac3f3713be41980c5eedccecff0260411347714facb4 SHA512 2766ca55343127c619958ab3a3ae3052a27a676839f10a158f7dfc071b8db38c2f1fc853e8add32b9fef94ab07eaa986f46a68e264e8087b57c990af30ea9a0b WHIRLPOOL 72d1051ac50efaa000245c504aab32ab116e81711e6193b804209e461c259ef8fb7798a55ba6e6a1b6670adee651c5663ecb101a57d4f044433980f4a53d4cbb
diff --git a/media-libs/sdl-net/metadata.xml b/media-libs/sdl-net/metadata.xml
new file mode 100644
index 000000000000..d3c2cc926f0b
--- /dev/null
+++ b/media-libs/sdl-net/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-libs/sdl-net/sdl-net-1.2.8-r1.ebuild b/media-libs/sdl-net/sdl-net-1.2.8-r1.ebuild
new file mode 100644
index 000000000000..b6ccbac7ceb9
--- /dev/null
+++ b/media-libs/sdl-net/sdl-net-1.2.8-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit multilib-minimal
+
+MY_P=${P/sdl-/SDL_}
+DESCRIPTION="Simple Direct Media Layer Network Support Library"
+HOMEPAGE="http://www.libsdl.org/projects/SDL_net/index.html"
+SRC_URI="http://www.libsdl.org/projects/SDL_net/release/${MY_P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris"
+IUSE="static-libs"
+
+RDEPEND="
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ !<=app-emulation/emul-linux-x86-sdl-20140406
+ )
+ >=media-libs/libsdl-1.2.15-r4[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ --disable-dependency-tracking \
+ --disable-gui \
+ $(use_enable static-libs static)
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+}
+
+multilib_src_install_all() {
+ dodoc CHANGES README
+ if ! use static-libs ; then
+ find "${D}" -type f -name '*.la' -exec rm {} + \
+ || die "la removal failed"
+ fi
+}
diff --git a/media-libs/sdl-pango/Manifest b/media-libs/sdl-pango/Manifest
new file mode 100644
index 000000000000..76691cdf3a9f
--- /dev/null
+++ b/media-libs/sdl-pango/Manifest
@@ -0,0 +1,2 @@
+DIST SDL_Pango-0.1.2-API-adds.patch 3624 SHA256 5a989c7acb539fce640323d3995cca8913a4b8869f5c690b78501ec6b5c86d5d SHA512 cfda28cd9334989abf7d99a36a15d6d4aac0ee5e9315b21bd5999d106bcd671717328b53cd58c2fa406f61f1728860c2ef7e1cf15bf53b44da4b3cc902a7f7ad WHIRLPOOL db724b014bb217aeb27297801e669cd557bb2cc376d34c4d0776ca9f2f5cea007b8bae3d57392dab4f61aeb06eaa21a9a2a28ad1d22cf487fa3266ce68a7263f
+DIST SDL_Pango-0.1.2.tar.gz 405967 SHA256 7f75d3b97acf707c696ea126424906204ebfa07660162de925173cdd0257eba4 SHA512 081ec57e0f55ce541c35393d6db7ea48b662a5008760781076d70c0a645d47f7e994f695c459ed51f8cb71494911a04cd416733fb57934321b806a1ac9878440 WHIRLPOOL afabdcd2c0bd3edddf84dc3220fd7149b615bba32fde95e7995d43cf3b0d171ac8075d2294ed790824e7742fb24aef94c547b456dda81a1a9ba7f7616bd95651
diff --git a/media-libs/sdl-pango/metadata.xml b/media-libs/sdl-pango/metadata.xml
new file mode 100644
index 000000000000..e3da3b15e437
--- /dev/null
+++ b/media-libs/sdl-pango/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>games</herd>
+ <herd>gnome</herd>
+ <upstream>
+ <remote-id type="sourceforge">sdlpango</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/sdl-pango/sdl-pango-0.1.2.ebuild b/media-libs/sdl-pango/sdl-pango-0.1.2.ebuild
new file mode 100644
index 000000000000..909c6b808120
--- /dev/null
+++ b/media-libs/sdl-pango/sdl-pango-0.1.2.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+DESCRIPTION="connect the text rendering engine of GNOME to SDL"
+HOMEPAGE="http://sdlpango.sourceforge.net/"
+SRC_URI="mirror://sourceforge/sdlpango/SDL_Pango-${PV}.tar.gz
+ http://zarb.org/~gc/t/SDL_Pango-0.1.2-API-adds.patch"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ia64 ppc sparc x86"
+IUSE="static-libs"
+
+RDEPEND="x11-libs/pango
+ media-libs/libsdl[video]"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S=${WORKDIR}/SDL_Pango-${PV}
+
+src_unpack() {
+ unpack SDL_Pango-${PV}.tar.gz
+}
+
+src_prepare() {
+ epatch "${DISTDIR}"/SDL_Pango-0.1.2-API-adds.patch
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ if ! use static-libs ; then
+ prune_libtool_files
+ fi
+}
diff --git a/media-libs/sdl-sound/Manifest b/media-libs/sdl-sound/Manifest
new file mode 100644
index 000000000000..70fecfb24c82
--- /dev/null
+++ b/media-libs/sdl-sound/Manifest
@@ -0,0 +1 @@
+DIST SDL_sound-1.0.3.tar.gz 1127100 SHA256 3999fd0bbb485289a52be14b2f68b571cb84e380cc43387eadf778f64c79e6df SHA512 3e60671777d804e6104d7d441f4a29866492c9412040eea3fd2283c0914a0a1ebc550260631c2bf500e7d982e05a6f9feeda81e9eeef8257303750c1be582824 WHIRLPOOL 84be6ec21136603b7a557d25185a2074710d6d48449ce754fef67051feb99490ba3944198d32af28fc9b3842dba38bd2b7692f8e21417d836d157fd639993417
diff --git a/media-libs/sdl-sound/files/sdl-sound-1.0.3-automake-1.13.patch b/media-libs/sdl-sound/files/sdl-sound-1.0.3-automake-1.13.patch
new file mode 100644
index 000000000000..0bd2aa272a78
--- /dev/null
+++ b/media-libs/sdl-sound/files/sdl-sound-1.0.3-automake-1.13.patch
@@ -0,0 +1,11 @@
+--- SDL_sound-1.0.3/configure.in
++++ SDL_sound-1.0.3/configure.in
+@@ -43,7 +43,7 @@
+ AC_CANONICAL_TARGET
+
+ dnl Setup for automake
+-AM_CONFIG_HEADER(config.h)
++AC_CONFIG_HEADERS(config.h)
+ AM_INIT_AUTOMAKE(SDL_sound, $VERSION)
+
+
diff --git a/media-libs/sdl-sound/files/sdl-sound-1.0.3-underlinking.patch b/media-libs/sdl-sound/files/sdl-sound-1.0.3-underlinking.patch
new file mode 100644
index 000000000000..36eb24a3e2fb
--- /dev/null
+++ b/media-libs/sdl-sound/files/sdl-sound-1.0.3-underlinking.patch
@@ -0,0 +1,18 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Tue Aug 21 12:42:14 UTC 2012
+Subject: build system
+
+fix underlinking
+
+--- SDL_sound-1.0.3/Makefile.am
++++ SDL_sound-1.0.3/Makefile.am
+@@ -32,7 +32,8 @@
+ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
+ libSDL_sound_la_LIBADD = \
+ decoders/libdecoders.la \
+- $(TIMIDITY_LIB) $(MPGLIB_LIB)
++ $(TIMIDITY_LIB) $(MPGLIB_LIB) \
++ -lm
+
+ EXTRA_DIST = \
+ CREDITS \
diff --git a/media-libs/sdl-sound/metadata.xml b/media-libs/sdl-sound/metadata.xml
new file mode 100644
index 000000000000..da870654e9e3
--- /dev/null
+++ b/media-libs/sdl-sound/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>games</herd>
+ <use>
+ <flag name="physfs">Enable physfs support</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/sdl-sound/sdl-sound-1.0.3-r1.ebuild b/media-libs/sdl-sound/sdl-sound-1.0.3-r1.ebuild
new file mode 100644
index 000000000000..a430491c8ef3
--- /dev/null
+++ b/media-libs/sdl-sound/sdl-sound-1.0.3-r1.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils multilib-minimal
+
+MY_P="${P/sdl-/SDL_}"
+DESCRIPTION="A library that handles the decoding of sound file formats"
+HOMEPAGE="http://icculus.org/SDL_sound/"
+SRC_URI="http://icculus.org/SDL_sound/downloads/${MY_P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~arm64 ppc ppc64 sparc x86 ~x86-fbsd ~x64-macos"
+IUSE="flac mikmod modplug mp3 mpeg physfs speex static-libs vorbis"
+
+RDEPEND="
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ !<=app-emulation/emul-linux-x86-sdl-20140406
+ )
+ >=media-libs/libsdl-1.2.15-r4[${MULTILIB_USEDEP}]
+ flac? ( >=media-libs/flac-1.2.1-r5[${MULTILIB_USEDEP}] )
+ mikmod? ( >=media-libs/libmikmod-3.2.0[${MULTILIB_USEDEP}] )
+ modplug? ( >=media-libs/libmodplug-0.8.8.4-r1[${MULTILIB_USEDEP}] )
+ vorbis? ( >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}] )
+ speex? ( >=media-libs/speex-1.2_rc1-r1[${MULTILIB_USEDEP}] >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}] )
+ physfs? ( >=dev-games/physfs-2.0.3-r1[${MULTILIB_USEDEP}] )
+ mpeg? ( >=media-libs/smpeg-0.4.4-r10[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-{underlinking,automake-1.13}.patch
+ mv configure.in configure.ac || die
+ eautoreconf
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ --disable-dependency-tracking \
+ --enable-midi \
+ $(use_enable mpeg smpeg) \
+ $(use_enable mp3 mpglib) \
+ $(use_enable flac) \
+ $(use_enable speex) \
+ $(use_enable static-libs static) \
+ $(use_enable mikmod) \
+ $(use_enable modplug) \
+ $(use_enable physfs) \
+ $(use_enable vorbis ogg)
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+}
+
+multilib_src_install_all() {
+ dodoc CHANGELOG CREDITS README TODO
+ if ! use static-libs ; then
+ find "${D}" -type f -name '*.la' -exec rm {} + \
+ || die "la removal failed"
+ fi
+}
diff --git a/media-libs/sdl-terminal/Manifest b/media-libs/sdl-terminal/Manifest
new file mode 100644
index 000000000000..f85e455ae0ef
--- /dev/null
+++ b/media-libs/sdl-terminal/Manifest
@@ -0,0 +1 @@
+DIST SDL_terminal-1.1.3.tar.gz 466321 SHA256 6fcfa44cb96da3be15fd7565eade018e9ac1d649a41c05e9b819f8714537e864 SHA512 be6e74430ac9467e58fde6048b042db319940e564061b6e537f45dcbd54148f5df593dd0b8a28d866ae298d0f1c8f3a113bf23640c25213c6784ede5233882ef WHIRLPOOL 279d89b43fba9c4d30fc820bdf0948d93b89ba55acaadc4f25a715454d14c135fa4be15872d35029209ef0d8a5fadc9ba54af9614f9fa2310fd05f0c201c7741
diff --git a/media-libs/sdl-terminal/files/sdl-terminal-1.1.3-nopython.patch b/media-libs/sdl-terminal/files/sdl-terminal-1.1.3-nopython.patch
new file mode 100644
index 000000000000..c9d3214dd091
--- /dev/null
+++ b/media-libs/sdl-terminal/files/sdl-terminal-1.1.3-nopython.patch
@@ -0,0 +1,24 @@
+--- configure.ac.old 2014-07-22 14:19:33.797413503 +0200
++++ configure.ac 2014-07-22 14:19:55.293201011 +0200
+@@ -108,7 +108,6 @@
+ fi
+ AC_SUBST(GL_LIBS)
+
+-AC_PYTHON_DEVEL
+
+ # Finally create all the generated files
+ # The configure script takes "file.in" and substitutes variables to produce
+@@ -118,5 +117,4 @@
+ Makefile
+ src/Makefile
+ include/Makefile
+-examples/Makefile
+ ])
+--- Makefile.am.old 2014-07-22 14:19:40.729344917 +0200
++++ Makefile.am 2014-07-22 14:20:06.353091713 +0200
+@@ -1,4 +1,4 @@
+ ## Process this file with automake to produce Makefile.in
+
+-SUBDIRS = src include examples
++SUBDIRS = src include
+
diff --git a/media-libs/sdl-terminal/metadata.xml b/media-libs/sdl-terminal/metadata.xml
new file mode 100644
index 000000000000..d3c2cc926f0b
--- /dev/null
+++ b/media-libs/sdl-terminal/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-libs/sdl-terminal/sdl-terminal-1.1.3-r1.ebuild b/media-libs/sdl-terminal/sdl-terminal-1.1.3-r1.ebuild
new file mode 100644
index 000000000000..e78133814abf
--- /dev/null
+++ b/media-libs/sdl-terminal/sdl-terminal-1.1.3-r1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit base libtool autotools
+
+MY_P="${P/sdl-/SDL_}"
+DESCRIPTION="library that provides a pseudo-ansi color terminal that can be used with any SDL application"
+HOMEPAGE="http://sourceforge.net/projects/sdl-terminal/"
+SRC_URI="mirror://gentoo/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="static-libs"
+
+DEPEND="virtual/opengl
+ virtual/glu
+ >=media-libs/libsdl-1.2.4
+ media-libs/sdl-ttf"
+
+S=${WORKDIR}/${MY_P}
+
+DOCS=( AUTHORS ChangeLog README )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-nopython.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ use static-libs || prune_libtool_files
+}
diff --git a/media-libs/sdl-ttf/Manifest b/media-libs/sdl-ttf/Manifest
new file mode 100644
index 000000000000..39ae90ecbfc9
--- /dev/null
+++ b/media-libs/sdl-ttf/Manifest
@@ -0,0 +1 @@
+DIST SDL_ttf-2.0.11.tar.gz 4053686 SHA256 724cd895ecf4da319a3ef164892b72078bd92632a5d812111261cde248ebcdb7 SHA512 64e04d1cd77e525e0f2413ad928841e5d3d09d551c030fc577b50777116580e430cb272b2aeb6191dfcc464669cf2f7a5a50d10e7c75637a3b1e8c8fca7fc78b WHIRLPOOL 41a28ded747de5d844878c1ba58bdaed972fa7fd1d8b0d1844ec8a98b4b3f0eb252e6667d53b5d417ffee1f3a6744879f7eddd67751ef24cfdf99429be4279f1
diff --git a/media-libs/sdl-ttf/files/sdl-ttf-2.0.11-underlink.patch b/media-libs/sdl-ttf/files/sdl-ttf-2.0.11-underlink.patch
new file mode 100644
index 000000000000..136589ec7f13
--- /dev/null
+++ b/media-libs/sdl-ttf/files/sdl-ttf-2.0.11-underlink.patch
@@ -0,0 +1,10 @@
+--- Makefile.am.old 2011-05-17 17:17:18.972003301 +0200
++++ Makefile.am 2011-05-17 17:18:38.281983708 +0200
+@@ -33,6 +33,7 @@
+ -release $(LT_RELEASE) \
+ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
+ endif
++libSDL_ttf_la_LIBADD = @MATHLIB@
+
+ pkgconfigdir = $(libdir)/pkgconfig
+ pkgconfig_DATA = SDL_ttf.pc
diff --git a/media-libs/sdl-ttf/metadata.xml b/media-libs/sdl-ttf/metadata.xml
new file mode 100644
index 000000000000..24f70e6408cb
--- /dev/null
+++ b/media-libs/sdl-ttf/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>games</herd>
+<longdescription>
+This is a sample library which allows you to use TrueType fonts in your SDL applications. It
+comes with an example program "showfont" which displays an example string for a given
+TrueType font file.
+</longdescription>
+</pkgmetadata>
diff --git a/media-libs/sdl-ttf/sdl-ttf-2.0.11-r1.ebuild b/media-libs/sdl-ttf/sdl-ttf-2.0.11-r1.ebuild
new file mode 100644
index 000000000000..4b4e6bb75a16
--- /dev/null
+++ b/media-libs/sdl-ttf/sdl-ttf-2.0.11-r1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils multilib-minimal
+
+MY_P="${P/sdl-/SDL_}"
+DESCRIPTION="library that allows you to use TrueType fonts in SDL applications"
+HOMEPAGE="http://www.libsdl.org/projects/SDL_ttf/"
+SRC_URI="http://www.libsdl.org/projects/SDL_ttf/release/${MY_P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris"
+IUSE="static-libs X"
+
+RDEPEND="
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ !<=app-emulation/emul-linux-x86-sdl-20140406
+ )
+ X? ( >=x11-libs/libXt-1.1.4[${MULTILIB_USEDEP}] )
+ >=media-libs/libsdl-1.2.15-r4[${MULTILIB_USEDEP}]
+ >=media-libs/freetype-2.5.0.1[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-underlink.patch
+ eautoreconf
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ --disable-dependency-tracking \
+ $(use_enable static-libs static) \
+ $(use_with X x)
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+}
+
+multilib_src_install_all() {
+ dodoc CHANGES README
+ use static-libs || prune_libtool_files --all
+}
diff --git a/media-libs/sdl2-gfx/Manifest b/media-libs/sdl2-gfx/Manifest
new file mode 100644
index 000000000000..6adbe161cade
--- /dev/null
+++ b/media-libs/sdl2-gfx/Manifest
@@ -0,0 +1 @@
+DIST SDL2_gfx-1.0.1.tar.gz 1078780 SHA256 d69bcbceb811b4e5712fbad3ede737166327f44b727f1388c32581dbbe8c599a SHA512 413f0ac8a60b6c4c91f154dd72a512f410e134642fefb80cd3482646c9aab7dd56d2cc9015e78ee59b5bc89adc7397a248fe2132077c004114ad6505ca4194de WHIRLPOOL e16f899bfd94ad0959bc156f43ce2f149e8e4bbd0f2b4bfba643ff109df030f9120262fa6accc7eca15c090f3c63e50f46ab215760f18bc2ce4af663bdbd0320
diff --git a/media-libs/sdl2-gfx/metadata.xml b/media-libs/sdl2-gfx/metadata.xml
new file mode 100644
index 000000000000..a2c38b643e95
--- /dev/null
+++ b/media-libs/sdl2-gfx/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <longdescription lang="en">
+ The SDL2_gfx library provides the basic drawing functions such
+ as lines, circles or polygons provided by SDL_gfx on SDL2 against
+ renderers of SDL2.
+
+ The current components of the SDL2_gfx library are:
+
+ * Graphic Primitives (SDL_gfxPrimitives.h, SDL_gfxPrimitives.c)
+ * Surface Rotozoomer (SDL_rotozoom.h, SDL_rotozoom.c)
+ * Framerate control (SDL_framerate.h, SDL_framerate.c)
+ * MMX image filters (SDL_imageFilter.h, SDL_imageFilter.c)
+ * Build-in 8x8 Font (SDL_gfxPrimitives_font.h)
+ </longdescription>
+</pkgmetadata>
diff --git a/media-libs/sdl2-gfx/sdl2-gfx-1.0.1.ebuild b/media-libs/sdl2-gfx/sdl2-gfx-1.0.1.ebuild
new file mode 100644
index 000000000000..2600c47e3f91
--- /dev/null
+++ b/media-libs/sdl2-gfx/sdl2-gfx-1.0.1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils multilib-minimal
+
+MY_P="${P/sdl2-/SDL2_}"
+DESCRIPTION="Graphics drawing primitives library for SDL2"
+HOMEPAGE="http://www.ferzkopp.net/joomla/content/view/19/14/"
+SRC_URI="http://www.ferzkopp.net/Software/SDL2_gfx/${MY_P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="doc cpu_flags_x86_mmx static-libs"
+
+DEPEND=">=media-libs/libsdl2-2.0.1-r1[video,${MULTILIB_USEDEP}]"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ sed -i \
+ -e 's/ -O / /' \
+ configure.in || die
+ mv configure.in configure.ac || die
+ eautoreconf
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ $(use_enable cpu_flags_x86_mmx mmx) \
+ $(use_enable static-libs static)
+}
+
+multilib_src_install_all() {
+ use doc && dohtml -r Docs/html/*
+ prune_libtool_files
+}
diff --git a/media-libs/sdl2-image/Manifest b/media-libs/sdl2-image/Manifest
new file mode 100644
index 000000000000..b880e2f1c948
--- /dev/null
+++ b/media-libs/sdl2-image/Manifest
@@ -0,0 +1 @@
+DIST SDL2_image-2.0.0.tar.gz 8398016 SHA256 b29815c73b17633baca9f07113e8ac476ae66412dec0d29a5045825c27a47234 SHA512 300ff078c4c9a74ccc143692630e9c97e25a223bf80661cd5e7d684a25c6ad7760b20778d492d6cc41521dcd2a00e4a76947cf6dffc679fdbd54f430b3906ea6 WHIRLPOOL d2b89f0bcb25eeda168a6a4622777f3d9bd6343dc1f87f50aec69afb85fef71dc28e56ed29e30d906ff999f291cf3ec887d20f471bd870eb734f273fd68b4303
diff --git a/media-libs/sdl2-image/metadata.xml b/media-libs/sdl2-image/metadata.xml
new file mode 100644
index 000000000000..2ee19786249e
--- /dev/null
+++ b/media-libs/sdl2-image/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>games</herd>
+ <use>
+ <flag name='webp'>support loading WEBP images</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/sdl2-image/sdl2-image-2.0.0-r1.ebuild b/media-libs/sdl2-image/sdl2-image-2.0.0-r1.ebuild
new file mode 100644
index 000000000000..973dce66ba17
--- /dev/null
+++ b/media-libs/sdl2-image/sdl2-image-2.0.0-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
+inherit eutils multilib-minimal
+
+MY_P=SDL2_image-${PV}
+DESCRIPTION="Image file loading library"
+HOMEPAGE="http://www.libsdl.org/projects/SDL_image/"
+SRC_URI="http://www.libsdl.org/projects/SDL_image/release/${MY_P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="gif jpeg png static-libs tiff webp"
+
+RDEPEND="
+ >=media-libs/libsdl2-2.0.1-r1[${MULTILIB_USEDEP}]
+ >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+ png? ( >=media-libs/libpng-1.6.10:0[${MULTILIB_USEDEP}] )
+ jpeg? ( >=virtual/jpeg-0-r2:0[${MULTILIB_USEDEP}] )
+ tiff? ( >=media-libs/tiff-3.9.7-r1:0[${MULTILIB_USEDEP}] )
+ webp? ( >=media-libs/libwebp-0.3.0[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ $(use_enable static-libs static) \
+ --disable-sdltest \
+ --enable-bmp \
+ $(use_enable gif) \
+ $(use_enable jpeg jpg) \
+ --disable-jpg-shared \
+ --enable-lbm \
+ --enable-pcx \
+ $(use_enable png) \
+ --disable-png-shared \
+ --enable-pnm \
+ --enable-tga \
+ $(use_enable tiff tif) \
+ --disable-tif-shared \
+ --enable-xcf \
+ --enable-xpm \
+ --enable-xv \
+ $(use_enable webp) \
+ --disable-webp-shared
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+ multilib_is_native_abi && newbin .libs/showimage showimage2
+}
+
+multilib_src_install_all() {
+ dodoc {CHANGES,README}.txt
+ use static-libs || prune_libtool_files
+}
diff --git a/media-libs/sdl2-mixer/Manifest b/media-libs/sdl2-mixer/Manifest
new file mode 100644
index 000000000000..d9021f3f10cd
--- /dev/null
+++ b/media-libs/sdl2-mixer/Manifest
@@ -0,0 +1 @@
+DIST SDL2_mixer-2.0.0.tar.gz 10119589 SHA256 a8ce0e161793791adeff258ca6214267fdd41b3c073d2581cd5265c8646f725b SHA512 e04594abc13c2b6527cd92a94a8d3e18436e9e6aaee21bab83e288e259a2fb20aae8433765d07feeb3b5bf253951323d67054239091e79720846770beb30be4d WHIRLPOOL 58385d7bdb3382af4f9d3aa9904b40083fe1139af0c938fa807904d70d4561180f65314bb2ab56f3b67a35140252e72802753ed723bca2536a4745fad43cb905
diff --git a/media-libs/sdl2-mixer/files/sdl2-mixer-2.0.0-Fix-compiling-against-libmodplug-0.8.8.5.patch b/media-libs/sdl2-mixer/files/sdl2-mixer-2.0.0-Fix-compiling-against-libmodplug-0.8.8.5.patch
new file mode 100644
index 000000000000..786931dc6363
--- /dev/null
+++ b/media-libs/sdl2-mixer/files/sdl2-mixer-2.0.0-Fix-compiling-against-libmodplug-0.8.8.5.patch
@@ -0,0 +1,25 @@
+diff -ru SDL2_mixer-2.0.0.orig/dynamic_modplug.h SDL2_mixer-2.0.0/dynamic_modplug.h
+--- SDL2_mixer-2.0.0.orig/dynamic_modplug.h 2013-08-10 13:39:55.000000000 -0400
++++ SDL2_mixer-2.0.0/dynamic_modplug.h 2014-11-29 03:00:38.288969276 -0500
+@@ -21,7 +21,7 @@
+
+ #ifdef MODPLUG_MUSIC
+
+-#include "modplug.h"
++#include "libmodplug/modplug.h"
+
+ typedef struct {
+ int loaded;
+diff -ru SDL2_mixer-2.0.0.orig/music_modplug.h SDL2_mixer-2.0.0/music_modplug.h
+--- SDL2_mixer-2.0.0.orig/music_modplug.h 2013-08-10 13:39:58.000000000 -0400
++++ SDL2_mixer-2.0.0/music_modplug.h 2014-11-29 03:00:05.346347058 -0500
+@@ -21,7 +21,7 @@
+
+ #ifdef MODPLUG_MUSIC
+
+-#include "modplug.h"
++#include "libmodplug/modplug.h"
+ #include "SDL_rwops.h"
+ #include "SDL_audio.h"
+ #include "SDL_mixer.h"
+Only in SDL2_mixer-2.0.0: music_modplug.h.orig
diff --git a/media-libs/sdl2-mixer/metadata.xml b/media-libs/sdl2-mixer/metadata.xml
new file mode 100644
index 000000000000..0947c53cc68b
--- /dev/null
+++ b/media-libs/sdl2-mixer/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>games</herd>
+ <use>
+ <flag name='fluidsynth'>Use <pkg>media-sound/fluidsynth</pkg>
+ for MIDI support</flag>
+ <flag name='midi'>basic support for MIDI files</flag>
+ <flag name='mod'>basic support for MOD files</flag>
+ <flag name='playtools'>Install playwave and playmus tools (useful
+ for testing)</flag>
+ <flag name='smpeg'>Use <pkg>media-libs/smpeg</pkg> for MP3 support
+ </flag>
+ <flag name='tremor'>enable OGG Vorbis music via libtremor</flag>
+ <flag name='wav'>support WAVE files</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/sdl2-mixer/sdl2-mixer-2.0.0-r1.ebuild b/media-libs/sdl2-mixer/sdl2-mixer-2.0.0-r1.ebuild
new file mode 100644
index 000000000000..b223c4bb5f01
--- /dev/null
+++ b/media-libs/sdl2-mixer/sdl2-mixer-2.0.0-r1.ebuild
@@ -0,0 +1,115 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils multilib-minimal
+
+MY_P=SDL2_mixer-${PV}
+DESCRIPTION="Simple Direct Media Layer Mixer Library"
+HOMEPAGE="http://www.libsdl.org/projects/SDL_mixer/"
+SRC_URI="http://www.libsdl.org/projects/SDL_mixer/release/${MY_P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="flac fluidsynth mad midi mikmod mod modplug mp3 playtools smpeg static-libs timidity tremor vorbis +wav"
+REQUIRED_USE="
+ midi? ( || ( timidity fluidsynth ) )
+ timidity? ( midi )
+ fluidsynth? ( midi )
+ mp3? ( || ( smpeg mad ) )
+ smpeg? ( mp3 )
+ mad? ( mp3 )
+ mod? ( || ( mikmod modplug ) )
+ mikmod? ( mod )
+ modplug? ( mod )
+ tremor? ( vorbis )
+ "
+
+RDEPEND=">=media-libs/libsdl2-2.0.1-r1[${MULTILIB_USEDEP}]
+ flac? ( >=media-libs/flac-1.2.1-r5[${MULTILIB_USEDEP}] )
+ midi? (
+ fluidsynth? ( >=media-sound/fluidsynth-1.1.6-r1[${MULTILIB_USEDEP}] )
+ timidity? ( media-sound/timidity++ )
+ )
+ mp3? (
+ mad? ( >=media-libs/libmad-0.15.1b-r8[${MULTILIB_USEDEP}] )
+ smpeg? ( >=media-libs/smpeg2-2.0.0-r1[${MULTILIB_USEDEP}] )
+ )
+ mod? (
+ modplug? ( >=media-libs/libmodplug-0.8.8.4-r1[${MULTILIB_USEDEP}] )
+ mikmod? ( >=media-libs/libmikmod-3.3.6-r1[${MULTILIB_USEDEP}] )
+ )
+ vorbis? (
+ tremor? ( >=media-libs/tremor-0_pre20130223[${MULTILIB_USEDEP}] )
+ !tremor? (
+ >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}]
+ >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}] )
+ )"
+DEPEND=${RDEPEND}
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-Fix-compiling-against-libmodplug-0.8.8.5.patch
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE=${S} \
+ econf \
+ $(use_enable static-libs static) \
+ --disable-sdltest \
+ --enable-music-cmd \
+ $(use_enable wav music-wave) \
+ $(use_enable mod music-mod) \
+ $(use_enable modplug music-mod-modplug) \
+ --disable-music-mod-modplug-shared \
+ $(use_enable mikmod music-mod-mikmod) \
+ --disable-music-mod-mikmod-shared \
+ $(use_enable midi music-midi) \
+ $(use_enable timidity music-midi-timidity) \
+ $(use_enable fluidsynth music-midi-fluidsynth) \
+ --disable-music-fluidsynth-shared \
+ $(use_enable vorbis music-ogg) \
+ $(use_enable tremor music-ogg-tremor) \
+ --disable-music-ogg-shared \
+ $(use_enable flac music-flac) \
+ --disable-music-flac-shared \
+ $(use_enable mp3 music-mp3) \
+ $(use_enable smpeg music-mp3-smpeg) \
+ --disable-music-mp3-smpeg-shared \
+ --disable-smpegtest \
+ $(use_enable mad music-mp3-mad-gpl) \
+ LIBMIKMOD_CONFIG=${EPREFIX}/usr/bin/${CHOST}-libmikmod-config
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+ if multilib_is_native_abi && use playtools; then
+ emake DESTDIR="${D}" install-bin
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc {CHANGES,README}.txt
+ use static-libs || prune_libtool_files
+}
+
+pkg_postinst() {
+ # bug 412035
+ # https://bugs.gentoo.org/show_bug.cgi?id=412035
+ if use midi ; then
+ if use fluidsynth; then
+ ewarn "FluidSynth support requires you to set the SDL_SOUNDFONTS"
+ ewarn "environment variable to the location of a SoundFont file"
+ ewarn "unless the game or application happens to do this for you."
+
+ if use timidity; then
+ ewarn "Failing to do so will result in Timidity being used instead."
+ else
+ ewarn "Failing to do so will result in silence."
+ fi
+ fi
+ fi
+}
diff --git a/media-libs/sdl2-net/Manifest b/media-libs/sdl2-net/Manifest
new file mode 100644
index 000000000000..29c223fc6941
--- /dev/null
+++ b/media-libs/sdl2-net/Manifest
@@ -0,0 +1 @@
+DIST SDL2_net-2.0.0.tar.gz 345724 SHA256 d715be30783cc99e541626da52079e308060b21d4f7b95f0224b1d06c1faacab SHA512 bf91f18bb1c62f00cccc3aa459c18c120afc3d8e16ee92c01762ef890f620b5346b1b62ca48ae0b848a062b49656e5f7a4c27d74788a8788357b5e36c1a767a2 WHIRLPOOL 7c5fc3f1df0a1467ca7869eb1a26028f84a44c35fe308a36b08bce938230ed9532f4d105683fb3752de59ca739025261cdaf3f9e795fe6027db6e063b6bd620d
diff --git a/media-libs/sdl2-net/metadata.xml b/media-libs/sdl2-net/metadata.xml
new file mode 100644
index 000000000000..cad5a2aa1773
--- /dev/null
+++ b/media-libs/sdl2-net/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-libs/sdl2-net/sdl2-net-2.0.0-r1.ebuild b/media-libs/sdl2-net/sdl2-net-2.0.0-r1.ebuild
new file mode 100644
index 000000000000..19eb400f70a8
--- /dev/null
+++ b/media-libs/sdl2-net/sdl2-net-2.0.0-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
+inherit eutils multilib-minimal
+
+MY_P=SDL2_net-${PV}
+DESCRIPTION="Simple Direct Media Layer Network Support Library"
+HOMEPAGE="http://www.libsdl.org/projects/SDL_net/index.html"
+SRC_URI="http://www.libsdl.org/projects/SDL_net/release/${MY_P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="static-libs"
+
+RDEPEND=">=media-libs/libsdl2-2.0.1-r1[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ --disable-gui \
+ $(use_enable static-libs static)
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+}
+
+multilib_src_install_all() {
+ dodoc {CHANGES,README}.txt
+ use static-libs || prune_libtool_files
+}
diff --git a/media-libs/sdl2-ttf/Manifest b/media-libs/sdl2-ttf/Manifest
new file mode 100644
index 000000000000..9b1cfdade06c
--- /dev/null
+++ b/media-libs/sdl2-ttf/Manifest
@@ -0,0 +1 @@
+DIST SDL2_ttf-2.0.12.tar.gz 5517665 SHA256 8728605443ea1cca5cad501dc34dc0cb15135d1e575551da6d151d213d356f6e SHA512 2dfd7d9a87d86b0446e52c78dcf4c45dba747256ff9cb4cc010818eac725410f5a1a781e6695ca0bcead756c70519d8d5b4df6c1b2935085e0356d9b4d7844fa WHIRLPOOL 7b3457925237f741bdcb1b6b00aa0463f33bde4c8886f03de4cc20885bffadfe3759fb31852dfee1ced06e0e494ec639f0a6a0f415520d9998683b81d010836b
diff --git a/media-libs/sdl2-ttf/files/sdl2-ttf-2.0.12-linking.patch b/media-libs/sdl2-ttf/files/sdl2-ttf-2.0.12-linking.patch
new file mode 100644
index 000000000000..88a7e7fdabfd
--- /dev/null
+++ b/media-libs/sdl2-ttf/files/sdl2-ttf-2.0.12-linking.patch
@@ -0,0 +1,16 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Mon Sep 2 20:29:16 UTC 2013
+Subject: fix linking with newer glibc
+
+https://bugzilla.libsdl.org/show_bug.cgi?id=1401
+
+--- SDL2_ttf-2.0.12/Makefile.am
++++ SDL2_ttf-2.0.12/Makefile.am
+@@ -35,6 +35,7 @@
+ -release $(LT_RELEASE) \
+ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
+ endif
++libSDL2_ttf_la_LIBADD = @MATHLIB@
+
+ pkgconfigdir = $(libdir)/pkgconfig
+ pkgconfig_DATA = SDL2_ttf.pc
diff --git a/media-libs/sdl2-ttf/metadata.xml b/media-libs/sdl2-ttf/metadata.xml
new file mode 100644
index 000000000000..e7ce72ada858
--- /dev/null
+++ b/media-libs/sdl2-ttf/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>games</herd>
+ <longdescription>
+ This is a sample library which allows you to use TrueType
+ fonts in your SDL applications. It
+ comes with an example program "showfont" which displays an
+ example string for a given
+ TrueType font file.
+ </longdescription>
+</pkgmetadata>
diff --git a/media-libs/sdl2-ttf/sdl2-ttf-2.0.12-r1.ebuild b/media-libs/sdl2-ttf/sdl2-ttf-2.0.12-r1.ebuild
new file mode 100644
index 000000000000..8a1f83e3a986
--- /dev/null
+++ b/media-libs/sdl2-ttf/sdl2-ttf-2.0.12-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils multilib-minimal
+
+MY_P=SDL2_ttf-${PV}
+DESCRIPTION="library that allows you to use TrueType fonts in SDL applications"
+HOMEPAGE="http://www.libsdl.org/projects/SDL_ttf/"
+SRC_URI="http://www.libsdl.org/projects/SDL_ttf/release/${MY_P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="static-libs X"
+
+RDEPEND="X? ( >=x11-libs/libXt-1.1.4[${MULTILIB_USEDEP}] )
+ >=media-libs/libsdl2-2.0.1-r1[${MULTILIB_USEDEP}]
+ >=media-libs/freetype-2.5.0.1[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-linking.patch
+ mv configure.in configure.ac || die
+ eautoreconf
+ rm -r external || die
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ $(use_enable static-libs static) \
+ $(use_with X x)
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+}
+
+multilib_src_install_all() {
+ dodoc {CHANGES,README}.txt
+ use static-libs || prune_libtool_files
+}
diff --git a/media-libs/sdlmm/Manifest b/media-libs/sdlmm/Manifest
new file mode 100644
index 000000000000..3781960d9cb8
--- /dev/null
+++ b/media-libs/sdlmm/Manifest
@@ -0,0 +1 @@
+DIST SDLmm-0.1.8.tar.bz2 399529 SHA256 f3e4d56756f751dd60af1d213fe7fe89a8f9cbe64259bc1a16700c7661080f25
diff --git a/media-libs/sdlmm/metadata.xml b/media-libs/sdlmm/metadata.xml
new file mode 100644
index 000000000000..c3c7fac1f2ff
--- /dev/null
+++ b/media-libs/sdlmm/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">sdlmm</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/sdlmm/sdlmm-0.1.8-r1.ebuild b/media-libs/sdlmm/sdlmm-0.1.8-r1.ebuild
new file mode 100644
index 000000000000..b3a0d6d39856
--- /dev/null
+++ b/media-libs/sdlmm/sdlmm-0.1.8-r1.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+MY_P=${P/sdl/SDL}
+
+DESCRIPTION="A C++ Wrapper for the Simple DirectMedia Layer"
+HOMEPAGE="http://sdlmm.sourceforge.net/"
+SRC_URI="mirror://sourceforge/sdlmm/${MY_P}.tar.bz2"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ppc ~sparc x86"
+IUSE=""
+
+RDEPEND=">=media-libs/libsdl-1.2.4"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS README THANKS
+}
diff --git a/media-libs/sg/Manifest b/media-libs/sg/Manifest
new file mode 100644
index 000000000000..8fa4d97d7468
--- /dev/null
+++ b/media-libs/sg/Manifest
@@ -0,0 +1 @@
+DIST sg-1.5.tar.gz 2859299 SHA256 e7d499c33b87bd50c4b83b84e23a2aebd70ed01a3c9a7f4512d36216da487784 SHA512 0e1f931b51e7bdecedc1bb17275d87e7549abf3d4d9eff6daf74cbc97ad1bea94b256fe4accfe27bd0a67f0637bb0d3b363d748f57edd73e07e922d2ea6e24c0 WHIRLPOOL 2341df50012afb8e581cbca5913ee29b9db6e90788a5513ff9a14113c9eac462774fc97c7c13473b7639c6883ba225ac3f8fbffc384c77aa1394659b014ed413
diff --git a/media-libs/sg/files/1.4-doc.patch b/media-libs/sg/files/1.4-doc.patch
new file mode 100644
index 000000000000..cfc1b21b20cb
--- /dev/null
+++ b/media-libs/sg/files/1.4-doc.patch
@@ -0,0 +1,20 @@
+diff --git a/doc/doxygen/Makefile.am b/doc/doxygen/Makefile.am
+index 3ee562c..7f424e8 100644
+--- a/doc/doxygen/Makefile.am
++++ b/doc/doxygen/Makefile.am
+@@ -29,13 +29,11 @@
+ ## Author: Michael Holst
+ ## ###########################################################################
+
+-docdir = @prefix@/doc/sg
+-
+ doc_DATA = sg_doc
+
+ sg_doc:
+ $(doxygen_path) $(top_srcdir)/doc/doxygen/sg.dox
+
+ install-docDATA:
+- mkdir -p $(docdir)
+- cp -r ../api $(docdir)/
++ mkdir -p $(DESTDIR)/@docdir@
++ cp -r ../api $(DESTDIR)/@docdir@/
diff --git a/media-libs/sg/files/1.4-opengl.patch b/media-libs/sg/files/1.4-opengl.patch
new file mode 100644
index 000000000000..f6b32cf1d286
--- /dev/null
+++ b/media-libs/sg/files/1.4-opengl.patch
@@ -0,0 +1,98 @@
+diff --git a/configure.ac b/configure.ac
+index 68ff24a..a2cd6b5 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -844,9 +844,6 @@ AC_OUTPUT([
+
+ src/base/Makefile
+
+- src/gl/Makefile
+- src/glu/Makefile
+- src/glw/Makefile
+ src/ogl/Makefile
+ src/vgl/Makefile
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index ad9562f..7d5173c 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -35,5 +35,5 @@
+ AUTOMAKE_OPTIONS = no-dependencies
+ SUFFIXES = .y .l .H .h .m .C .cc .c .f .java .o
+ always_built_SUBDIRS = ogl vgl
+-SUBDIRS = base @gl@ @glu@ @glw@ $(always_built_SUBDIRS) aaa_inc aaa_lib .
++SUBDIRS = base $(always_built_SUBDIRS) aaa_inc aaa_lib .
+
+diff --git a/src/aaa_inc/GL/Makefile.am b/src/aaa_inc/GL/Makefile.am
+index 10efb6b..0d5b8b7 100644
+--- a/src/aaa_inc/GL/Makefile.am
++++ b/src/aaa_inc/GL/Makefile.am
+@@ -37,27 +37,6 @@ SUFFIXES = .y .l .H .h .m .C .cc .c .f .java .o
+ always_built_SUBDIRS =
+ SUBDIRS = $(always_built_SUBDIRS) .
+
+-if BUILD_GL
+-GL_HEADS = gl.h glx.h osmesa.h wmesa.h xmesa.h
+-else
+-GL_HEADS =
+-endif
+-
+-if BUILD_GLU
+-GLU_HEADS = glu.h
+-else
+-GLU_HEADS =
+-endif
+-
+-if BUILD_GLW
+-GLW_HEADS = GLwDrawA.h
+-else
+-GLW_HEADS =
+-endif
+-
+-includedir = ${prefix}/include/GL
+-include_HEADERS = ${GL_HEADS} ${GLU_HEADS} ${GLW_HEADS}
+-
+ distclean-local: clean-local
+
+ clean-local:
+diff --git a/src/aaa_lib/Makefile.am b/src/aaa_lib/Makefile.am
+index bb93779..0512c45 100644
+--- a/src/aaa_lib/Makefile.am
++++ b/src/aaa_lib/Makefile.am
+@@ -41,32 +41,16 @@ BASE_LIBS = ../base/libbase.la
+ OGL_LIBS = ../ogl/libogl.la
+ VGL_LIBS = ../vgl/libvgl.la
+
+-GL_LIBS = ../gl/libGL.la
+-if BUILD_GL
+-LIBGL = libGL.la
+-else
+-LIBGL =
+-endif
++GL_LIBS = ${libdir}/libGL.la
+
+-GLU_LIBS = ../glu/libGLU.la
+-if BUILD_GLU
+-LIBGLU = libGLU.la
+-else
+-LIBGLU =
+-endif
++GLU_LIBS = ${libdir}/libGLU.la
+
+-GLW_LIBS = ../glw/libGLw.la
+-if BUILD_GLW
+-LIBGLW = libGLw.la
+-else
+-LIBGLW =
+-endif
++GLW_LIBS = ${libdir}/libGLw.la
+
+-libdir = ${prefix}/lib
+ lib_LTLIBRARIES = libsg.la ${LIBGL} ${LIBGLU} ${LIBGLW}
+
+ libsg_la_SOURCES =
+-libsg_la_LIBADD = ${BASE_LIBS} ${OGL_LIBS} ${VGL_LIBS}
++libsg_la_LIBADD = ${BASE_LIBS} ${OGL_LIBS} ${VGL_LIBS} -lGL -lGLU -lGLw -lXm -lmaloc -lXaw
+ libsg_la_LDFLAGS = -version-info ${FETK_VERSION}
+
+ libGL_la_SOURCES =
diff --git a/media-libs/sg/metadata.xml b/media-libs/sg/metadata.xml
new file mode 100644
index 000000000000..5ef07a39e7e1
--- /dev/null
+++ b/media-libs/sg/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>sci</herd>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/media-libs/sg/sg-1.5.ebuild b/media-libs/sg/sg-1.5.ebuild
new file mode 100644
index 000000000000..80118fd41d3a
--- /dev/null
+++ b/media-libs/sg/sg-1.5.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=true
+
+inherit autotools-utils multilib
+
+DESCRIPTION="Socket Graphics tool for displaying polygons"
+HOMEPAGE="http://fetk.org/codes/sg/index.html"
+SRC_URI="http://www.fetk.org/codes/download/${P}.tar.gz"
+
+SLOT="0"
+KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
+LICENSE="GPL-2"
+IUSE="doc static-libs"
+
+RDEPEND="
+ dev-libs/maloc
+ virtual/glu
+ x11-libs/libXaw
+ x11-libs/motif
+ || (
+ ( media-libs/mesa x11-libs/libGLw )
+ media-libs/opengl-apple
+ )"
+DEPEND="
+ ${RDEPEND}
+ doc? (
+ media-gfx/graphviz
+ app-doc/doxygen
+ )"
+
+S="${WORKDIR}"/${PN}
+
+PATCHES=(
+ "${FILESDIR}"/1.4-opengl.patch
+ "${FILESDIR}"/1.4-doc.patch
+ )
+
+src_prepare() {
+ rm src/{gl,glu,glw} -rf || die
+ sed -i 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/g' configure.ac || die
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ local sg_include
+ local sg_lib
+ local myeconfargs
+
+ sg_include="${EPREFIX}"/usr/include
+ sg_lib="${EPREFIX}"/usr/$(get_libdir)
+ export FETK_LIBRARY="${sg_lib}"
+ export FETK_MOTIF_LIBRARY="${sg_lib}"
+ export FETK_GL_LIBRARY="${sg_lib}"
+ export FETK_GLU_LIBRARY="${sg_lib}"
+ export FETK_GLW_LIBRARY="${sg_lib}"
+ export FETK_INCLUDE="${sg_include}"
+ export FETK_GLW_INCLUDE="${sg_include}"
+ export FETK_GLU_INCLUDE="${sg_include}"
+ export FETK_GL_INCLUDE="${sg_include}"/GL
+ export FETK_MOTIF_INCLUDE="${sg_include}"
+
+ use doc || myeconfargs+=( --with-doxygen= --with-dot= )
+
+ myeconfargs+=( --enable-glforce --enable-gluforce --enable-glwforce )
+
+ myeconfargs+=(
+ --docdir="${EPREFIX}"/usr/share/doc/${PF}
+ --disable-triplet
+ )
+ autotools-utils_src_configure
+}
diff --git a/media-libs/sge/Manifest b/media-libs/sge/Manifest
new file mode 100644
index 000000000000..9a436f4e2348
--- /dev/null
+++ b/media-libs/sge/Manifest
@@ -0,0 +1 @@
+DIST sge030809.tar.gz 251698 SHA256 25cfbe59ab99647254e69d25984707045492c2a5d1b15f27d999d0284a7110fc SHA512 59144d573f254cc451a22a2d60ba68c7d9437b5095f63fc7ec36c21c3caf7580c5365267a004e08b9d08cf187a59ddefb76a5829f4a6aa1ff4d45f7d044bb2fb WHIRLPOOL 627a67c5092fe1e3c313b9fa3588ad28f2d10a9dccbce2705847274f33195579f2e98e39f2ef1c7a82c80d8cb32a02ebf31ee9822f0975de3de19b4ce427db0d
diff --git a/media-libs/sge/files/sge-030809-build.patch b/media-libs/sge/files/sge-030809-build.patch
new file mode 100644
index 000000000000..5b277a0a6b08
--- /dev/null
+++ b/media-libs/sge/files/sge-030809-build.patch
@@ -0,0 +1,123 @@
+--- Makefile.orig 2006-03-29 00:08:39.000000000 -0500
++++ Makefile 2006-03-29 00:09:36.000000000 -0500
+@@ -2,7 +2,7 @@
+
+ include Makefile.conf
+
+-CFLAGS += $(SGE_CFLAGS) -fPIC $(FT_CFLAGS)
++CXXFLAGS += $(SGE_CFLAGS) -fPIC $(FT_CFLAGS)
+ LIBS =$(SGE_LIBS)
+
+ SGE_VER = 030809
+@@ -10,20 +10,26 @@
+
+ OBJECTS=sge_surface.o sge_primitives.o sge_tt_text.o sge_bm_text.o sge_misc.o sge_textpp.o sge_blib.o sge_rotation.o sge_collision.o sge_shape.o
+
+-all: config $(OBJECTS)
+- @ar rsc libSGE.a $(OBJECTS)
++SHARED_LIB=libSGE.so.$(API_VER)
++STATIC_LIB=libSGE.a
+
+-$(OBJECTS): %.o:%.cpp %.h #Each object depends on thier .cpp and .h file
+- $(CXX) $(CFLAGS) -c $<
++all: sge_config.h $(OBJECTS) $(SHARED_LIB) $(STATIC_LIB)
+
+-shared: all
+- $(CXX) $(CFLAGS) -Wl,-soname,libSGE.so.$(API_VER) -fpic -fPIC -shared -o libSGE.so $(OBJECTS) $(LIBS)
++$(STATIC_LIB): $(OBJECTS)
++ $(AR) rsc libSGE.a $(OBJECTS)
+
+-shared-strip: shared
++$(OBJECTS): sge_config.h
++$(OBJECTS): %.o:%.cpp %.h #Each object depends on their .cpp and .h file
++ $(CXX) $(CXXFLAGS) -c $<
++
++$(SHARED_LIB): $(OBJECTS)
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -Wl,-soname,libSGE.so.$(API_VER) -fpic -fPIC -shared -o libSGE.so $(OBJECTS) $(LIBS)
++
++shared-strip: $(SHARED_LIB)
+ @strip libSGE.so
+
+ # Building a dll... I have no idea how to do this, but it should be something like below.
+-dll: config $(OBJECTS)
++dll: sge_config.h $(OBJECTS)
+ dlltool --output-def SGE.def $(OBJECTS)
+ dllwrap --driver-name $(CXX) -o SGE.dll --def SGE.def --output-lib libSGE.a --dllname SGE.dll $(OBJECTS) $(LIBS)
+
+@@ -33,21 +39,22 @@
+ clean:
+ @rm -f *.o *.so *.a *.dll *.def
+
+-config:
+- @echo "/* SGE Config header (generated automatically) */" >sge_config.h
+- @echo "#define SGE_VER $(SGE_VER)" >>sge_config.h
++sge_config.h:
++ @echo "/* SGE Config header (generated automatically) */" >sge_config.h.tmp
++ @echo "#define SGE_VER $(SGE_VER)" >>sge_config.h.tmp
+ ifeq ($(C_COMP),y)
+- @echo "#define _SGE_C_AND_CPP" >>sge_config.h
++ @echo "#define _SGE_C_AND_CPP" >>sge_config.h.tmp
+ endif
+ ifeq ($(USE_FT),n)
+- @echo "#define _SGE_NOTTF" >>sge_config.h
++ @echo "#define _SGE_NOTTF" >>sge_config.h.tmp
+ endif
+ ifeq ($(USE_IMG),y)
+- @echo "#define _SGE_HAVE_IMG" >>sge_config.h
++ @echo "#define _SGE_HAVE_IMG" >>sge_config.h.tmp
+ endif
+ ifeq ($(NO_CLASSES),y)
+- @echo "#define _SGE_NO_CLASSES" >>sge_config.h
++ @echo "#define _SGE_NO_CLASSES" >>sge_config.h.tmp
+ endif
++ mv sge_config.h.tmp sge_config.h
+
+ ifneq ($(QUIET),y)
+ @echo "== SGE r$(SGE_VER)"
+@@ -70,13 +77,13 @@
+ @echo ""
+ endif
+
+-install: shared
+- @mkdir -p $(PREFIX_H)
+- install -c -m 644 sge*.h $(PREFIX_H)
+- @mkdir -p $(PREFIX)/lib
+- install -c -m 644 libSGE.a $(PREFIX)/lib
+- install -c libSGE.so $(PREFIX)/lib/libSGE.so.$(API_VER).$(SGE_VER)
+- @cd $(PREFIX)/lib;\
++install: $(SHARED_LIB) $(STATIC_LIB)
++ @mkdir -p $(DESTDIR)$(PREFIX_H)
++ install -c -m 644 sge*.h $(DESTDIR)$(PREFIX_H)
++ @mkdir -p $(DESTDIR)$(PREFIX)/lib
++ install -c -m 644 $(STATIC_LIB) $(DESTDIR)$(PREFIX)/lib
++ install -c libSGE.so $(DESTDIR)$(PREFIX)/lib/libSGE.so.$(API_VER).$(SGE_VER)
++ @cd $(DESTDIR)$(PREFIX)/lib;\
+ ln -sf libSGE.so.$(API_VER).$(SGE_VER) libSGE.so.$(API_VER);\
+ ln -sf libSGE.so.$(API_VER) libSGE.so
+ @echo "** Headerfiles installed in $(PREFIX_H)"
+--- Makefile.conf.orig 2006-03-29 00:08:39.000000000 -0500
++++ Makefile.conf 2006-03-29 00:08:39.000000000 -0500
+@@ -11,6 +11,7 @@
+ # Compilers (C and C++)
+ CC=gcc
+ CXX=g++
++AR=ar
+
+ # Make sure sdl-config is available
+ HAVE_SDL =$(shell if (sdl-config --version) < /dev/null > /dev/null 2>&1; then echo "y"; else echo "n"; fi;)
+@@ -25,11 +26,13 @@
+ PREFIX_H =$(shell sdl-config --prefix)/include/SDL
+
+ # Flags passed to the compiler
+-CFLAGS =-Wall -O3 -ffast-math
++CXXFLAGS ?=-O3 -ffast-math
+ SGE_CFLAGS =$(shell sdl-config --cflags)
+ # Uncomment to make some more optimizations
+-#CFLAGS =-Wall -O9 -ffast-math -march=i686
++#CXXFLAGS =-O9 -ffast-math -march=i686
+
++# Spit out warnings
++CXXFLAGS += -Wall
+
+ # Libs config
+ SGE_LIBS =$(shell sdl-config --libs) -lstdc++
diff --git a/media-libs/sge/files/sge-030809-cmap.patch b/media-libs/sge/files/sge-030809-cmap.patch
new file mode 100644
index 000000000000..c03396e1fb8b
--- /dev/null
+++ b/media-libs/sge/files/sge-030809-cmap.patch
@@ -0,0 +1,28 @@
+http://bugs.gentoo.org/33296#26
+
+patch by Steve <steviedizzle@gmail.com>
+
+explanation:
+It changes the 16bit integers for setting and clearing collision maps to 32bit
+because if the surface is too large the program will segfault.
+
+--- sge030809/sge_collision.cpp
++++ sge030809/sge_collision.cpp
+@@ -336,7 +336,7 @@
+ void sge_unset_cdata(sge_cdata *cd, Sint16 x, Sint16 y, Sint16 w, Sint16 h)
+ {
+ Uint8 *map=cd->map;
+- Sint16 offs,len;
++ Sint32 offs,len;
+ int i,n=0;
+
+ offs=y*cd->w + x;
+@@ -365,7 +365,7 @@
+ void sge_set_cdata(sge_cdata *cd, Sint16 x, Sint16 y, Sint16 w, Sint16 h)
+ {
+ Uint8 *map=cd->map;
+- Sint16 offs,len;
++ Sint32 offs,len;
+ int i,n=0;
+
+ offs=y*cd->w + x;
diff --git a/media-libs/sge/files/sge-030809-freetype.patch b/media-libs/sge/files/sge-030809-freetype.patch
new file mode 100644
index 000000000000..7b638e4100f9
--- /dev/null
+++ b/media-libs/sge/files/sge-030809-freetype.patch
@@ -0,0 +1,25 @@
+--- sge_tt_text.cpp
++++ sge_tt_text.cpp
+@@ -36,10 +36,9 @@
+ #include "sge_textpp.h"
+
+ #ifndef _SGE_NOTTF
+-#include <freetype/freetype.h>
+-#include <freetype/ftoutln.h>
+-#include <freetype/ttnameid.h>
+-#include <freetype/internal/ftobjs.h>
++#include <ft2build.h>
++#include FT_FREETYPE_H
++#include FT_OUTLINE_H
+
+ /* The structure used to hold glyph information (cached) */
+ struct glyph {
+@@ -294,7 +293,7 @@
+ }
+ memset(stream, 0, sizeof(*stream));
+
+- stream->memory = _sge_library->memory;
++ stream->memory = NULL;
+ stream->read = RWread;
+ stream->descriptor.pointer = src;
+ stream->pos = (unsigned long)position;
diff --git a/media-libs/sge/metadata.xml b/media-libs/sge/metadata.xml
new file mode 100644
index 000000000000..2f8b9cdd638d
--- /dev/null
+++ b/media-libs/sge/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>games</herd>
+ <use>
+ <flag name="image">enable sdl-image support</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/sge/sge-030809.ebuild b/media-libs/sge/sge-030809.ebuild
new file mode 100644
index 000000000000..6373a4bd07ad
--- /dev/null
+++ b/media-libs/sge/sge-030809.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils multilib toolchain-funcs
+
+MY_P="sge${PV}"
+DESCRIPTION="Graphics extensions library for SDL"
+HOMEPAGE="http://www.etek.chalmers.se/~e8cal1/sge/"
+SRC_URI="http://www.etek.chalmers.se/~e8cal1/sge/files/${MY_P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ~ia64 ppc x86 ~x86-fbsd"
+IUSE="doc examples image truetype"
+
+DEPEND="media-libs/libsdl
+ image? ( media-libs/sdl-image )
+ truetype? ( >=media-libs/freetype-2 )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-build.patch \
+ "${FILESDIR}"/${P}-freetype.patch \
+ "${FILESDIR}"/${P}-cmap.patch
+ sed -i "s:\$(PREFIX)/lib:\$(PREFIX)/$(get_libdir):" Makefile || die
+ sed -i \
+ -e '/^CC=/d' \
+ -e '/^CXX=/d' \
+ -e '/^AR=/d' \
+ Makefile.conf || die
+ tc-export CC CXX AR
+ # make sure the header gets regenerated everytime
+ rm -f sge_config.h
+}
+
+src_compile() {
+ emake \
+ USE_IMG=$(usex image y n) \
+ USE_FT=$(usex truetype y n)
+}
+
+src_install() {
+ DOCS="README Todo WhatsNew" \
+ default
+
+ use doc && dohtml docs/*
+
+ if use examples ; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples
+ fi
+}
diff --git a/media-libs/shivavg/Manifest b/media-libs/shivavg/Manifest
new file mode 100644
index 000000000000..9393634fe38e
--- /dev/null
+++ b/media-libs/shivavg/Manifest
@@ -0,0 +1 @@
+DIST ShivaVG-0.2.1.zip 467452 SHA256 9735079392829f7aaf79e02ed84dd74f5c443c39c02ff461cfdd19cfc4ae89c4
diff --git a/media-libs/shivavg/metadata.xml b/media-libs/shivavg/metadata.xml
new file mode 100644
index 000000000000..11f6c619655a
--- /dev/null
+++ b/media-libs/shivavg/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>x11</herd>
+ <maintainer>
+ <email>lu_zero@gentoo.org</email>
+ </maintainer>
+ <longdescription>
+ShivaVG is an open-source ANSI C implementation of the Khronos'
+OpenVG specification for hardware-accelerated vector graphics API. It is built
+entirely on top of OpenGL.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">shivavg</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/shivavg/shivavg-0.2.1.ebuild b/media-libs/shivavg/shivavg-0.2.1.ebuild
new file mode 100644
index 000000000000..d36a45d399f8
--- /dev/null
+++ b/media-libs/shivavg/shivavg-0.2.1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+MY_PN="ShivaVG"
+MY_P="${MY_PN}-${PV}"
+inherit base autotools
+
+DESCRIPTION="open-source implementation of the Khronos' OpenVG specification"
+HOMEPAGE="http://shivavg.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.zip"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~arm ~amd64 ~x86"
+IUSE=""
+
+RDEPEND="virtual/glu
+ media-libs/freeglut
+ virtual/opengl"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ base_src_prepare
+
+ sed -i -e 's:LDFLAGS="$LDFLAGS :LIBS=":g' \
+ configure.in
+ eautoreconf
+}
diff --git a/media-libs/silgraphite/Manifest b/media-libs/silgraphite/Manifest
new file mode 100644
index 000000000000..069bc42cd28d
--- /dev/null
+++ b/media-libs/silgraphite/Manifest
@@ -0,0 +1 @@
+DIST silgraphite-2.3.1.tar.gz 3239482 SHA256 9b07c6e91108b1fa87411af4a57e25522784cfea0deb79b34ced608444f2ed65 SHA512 6b0fa29e0ee507da17509ed6374b64d51360b3012bba512785186348c153047c2e6f28114e36d133f3c05dd319919bd79e9ed97fc9e29ad6bf2f7a032eb22df2 WHIRLPOOL fd49e74303f22a58e04d9792d17ec80f33c2c357d4377df851e526a7d5e7858fb4d3cca31654f37bf8016697709001625b1d54063fd1db60eb3ff68eea7f9bb7
diff --git a/media-libs/silgraphite/files/silgraphite-2.3.1-aligned_access.patch b/media-libs/silgraphite/files/silgraphite-2.3.1-aligned_access.patch
new file mode 100644
index 000000000000..ee5c1702e92e
--- /dev/null
+++ b/media-libs/silgraphite/files/silgraphite-2.3.1-aligned_access.patch
@@ -0,0 +1,63 @@
+Fix unaligned reads.
+https://bugs.gentoo.org/show_bug.cgi?id=304921
+
+Upstream:
+https://sourceforge.net/tracker/?func=detail&aid=2995413&group_id=66144&atid=513479
+
+Index: silgraphite-2.3.1/engine/src/segment/FileInput.cpp
+===================================================================
+--- silgraphite-2.3.1.orig/engine/src/segment/FileInput.cpp
++++ silgraphite-2.3.1/engine/src/segment/FileInput.cpp
+@@ -41,6 +41,10 @@ DEFINE_THIS_FILE
+
+ //:End Ignore
+
++#define RAW_READ(var,size,buf) \
++ for(int i = 0; i < isizeof(size);i++){\
++ var |= buf[i]<<8*(isizeof(size)-i-1);\
++ }
+ //:>********************************************************************************************
+ //:> Forward declarations
+ //:>********************************************************************************************
+@@ -133,11 +137,11 @@ byte GrBufferIStream::ReadByteFromFont()
+ ----------------------------------------------------------------------------------------------*/
+ short GrBufferIStream::ReadShortFromFont()
+ {
+- short snInput = *(short *)m_pbNext;
++ short snInput = 0;
++ RAW_READ(snInput,short,m_pbNext);
+ m_pbNext += isizeof(short);
+ if (m_pbLim && m_pbNext > m_pbLim)
+ THROW(kresReadFault);
+- snInput = lsbf(snInput);
+ return snInput;
+ }
+
+@@ -147,11 +151,11 @@ short GrBufferIStream::ReadShortFromFont
+ ----------------------------------------------------------------------------------------------*/
+ utf16 GrBufferIStream::ReadUShortFromFont()
+ {
+- utf16 chwInput = *(utf16 *)m_pbNext;
++ utf16 chwInput = 0;
++ RAW_READ(chwInput,utf16,m_pbNext);
+ m_pbNext += isizeof(utf16);
+ if (m_pbLim && m_pbNext > m_pbLim)
+ THROW(kresReadFault);
+- chwInput = lsbf(chwInput);
+ return chwInput;
+ }
+
+@@ -161,11 +165,11 @@ utf16 GrBufferIStream::ReadUShortFromFon
+ ----------------------------------------------------------------------------------------------*/
+ int GrBufferIStream::ReadIntFromFont()
+ {
+- int nInput = *(int *)m_pbNext;
++ int nInput = 0;
++ RAW_READ(nInput,int,m_pbNext);
+ m_pbNext += isizeof(int);
+ if (m_pbLim && m_pbNext > m_pbLim)
+ THROW(kresReadFault);
+- nInput = lsbf(nInput);
+ return nInput;
+ }
+
diff --git a/media-libs/silgraphite/metadata.xml b/media-libs/silgraphite/metadata.xml
new file mode 100644
index 000000000000..07d4510f8b76
--- /dev/null
+++ b/media-libs/silgraphite/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>tex</herd>
+ <use>
+ <flag name="pango">Enables the pango-graphite pango module.</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">silgraphite</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/silgraphite/silgraphite-2.3.1.ebuild b/media-libs/silgraphite/silgraphite-2.3.1.ebuild
new file mode 100644
index 000000000000..e354e7768fbd
--- /dev/null
+++ b/media-libs/silgraphite/silgraphite-2.3.1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils
+
+DESCRIPTION="Rendering engine for complex non-Roman writing systems"
+HOMEPAGE="http://graphite.sil.org/"
+SRC_URI="mirror://sourceforge/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="|| ( CPL-0.5 LGPL-2.1 )"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="pango static-libs truetype xft"
+
+RDEPEND="
+ pango? ( x11-libs/pango media-libs/fontconfig )
+ truetype? ( media-libs/freetype:2 )
+ xft? ( x11-libs/libXft )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-aligned_access.patch"
+
+ # Drop DEPRECATED flags, bug #385533
+ sed -i -e 's:-D[A-Z_]*DISABLE_DEPRECATED:$(NULL):g' \
+ wrappers/pangographite/Makefile.am wrappers/pangographite/Makefile.in \
+ wrappers/pangographite/graphite/Makefile.am || die
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ $(use_with xft) \
+ $(use_with truetype freetype) \
+ $(use_with pango pangographite)
+}
+
+src_install() {
+ default
+ find "${ED}" -name '*.la' -exec rm -f {} +
+}
diff --git a/media-libs/simage/Manifest b/media-libs/simage/Manifest
new file mode 100644
index 000000000000..48d91a12e2ee
--- /dev/null
+++ b/media-libs/simage/Manifest
@@ -0,0 +1 @@
+DIST simage-1.7.0.tar.gz 752602 SHA256 c9a0c43e45f825c46941789f5a8f6c3b61da5ac87e4088cb611ac0fead494def SHA512 944ec009dd7041692073ddd9795fdd633fe3bc9101f1c1234e8be3746487a9431aecf52abde01563e719153fbe1ca7d29f9b64042e4a64ea08d6cb14666dd89f WHIRLPOOL 0d951f1fa1fb588ff0734dfdba3fa1643de30445a58ed2bdc6e7d2936f478ba7ca0599d14919755bb95f6f5cd5e63bcdd2a995dca63b113bab9c0e885dcd6ecd
diff --git a/media-libs/simage/files/simage-1.7.0-libpng15.patch b/media-libs/simage/files/simage-1.7.0-libpng15.patch
new file mode 100644
index 000000000000..f99d474cf04a
--- /dev/null
+++ b/media-libs/simage/files/simage-1.7.0-libpng15.patch
@@ -0,0 +1,12 @@
+diff -ruN simage-1.7.0/src/simage_png.c new/src/simage_png.c
+--- simage-1.7.0/src/simage_png.c 2010-02-26 16:47:31.000000000 +0100
++++ new/src/simage_png.c 2013-06-06 22:34:23.537331509 +0200
+@@ -323,7 +323,7 @@
+ /* Set error handling. REQUIRED if you aren't supplying your own
+ * error hadnling functions in the png_create_write_struct() call.
+ */
+- if (setjmp(png_ptr->jmpbuf)) {
++ if (setjmp(png_jmpbuf(png_ptr))) {
+ /* If we get here, we had a problem reading the file */
+ fclose(fp);
+ png_destroy_write_struct(&png_ptr, (png_infopp)info_ptr);
diff --git a/media-libs/simage/files/simage-1.7.0-pkgconfig-partial.patch b/media-libs/simage/files/simage-1.7.0-pkgconfig-partial.patch
new file mode 100644
index 000000000000..c8c893855e8a
--- /dev/null
+++ b/media-libs/simage/files/simage-1.7.0-pkgconfig-partial.patch
@@ -0,0 +1,13 @@
+diff -ruN simage-1.7.0/simage.pc.in new/simage.pc.in
+--- simage-1.7.0/simage.pc.in 2010-02-26 16:47:31.000000000 +0100
++++ new/simage.pc.in 2013-06-06 22:35:42.303326845 +0200
+@@ -8,7 +8,8 @@
+ Version: @VERSION@
+ Requires:
+ Conflicts:
+-Libs: -L${libdir} @SIMAGE_EXTRA_LDFLAGS@ @SIMAGE_EXTRA_LIBS@
++Libs: -L${libdir} -lsimage
++Libs.private: -L${libdir} @SIMAGE_EXTRA_LIBS@
+ Cflags: -I${includedir} @SIMAGE_EXTRA_CFLAGS@ @SIMAGE_EXTRA_CPPFLAGS@
+
+ simage_host="@host@"
diff --git a/media-libs/simage/metadata.xml b/media-libs/simage/metadata.xml
new file mode 100644
index 000000000000..b9d440525a64
--- /dev/null
+++ b/media-libs/simage/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>reavertm@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/media-libs/simage/simage-1.7.0.ebuild b/media-libs/simage/simage-1.7.0.ebuild
new file mode 100644
index 000000000000..d0a6ecf734c4
--- /dev/null
+++ b/media-libs/simage/simage-1.7.0.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit base
+
+DESCRIPTION="Image and video texturing library"
+HOMEPAGE="http://www.coin3d.org/lib/simage/"
+SRC_URI="https://bitbucket.org/Coin3D/coin/downloads/${P}.tar.gz"
+
+LICENSE="public-domain mpeg2enc"
+KEYWORDS="amd64 ppc x86"
+SLOT="0"
+IUSE="debug gif jpeg jpeg2k png sndfile static-libs tiff vorbis zlib"
+RESTRICT="mirror bindist" #465086
+
+RDEPEND="
+ gif? ( media-libs/giflib )
+ jpeg? ( virtual/jpeg )
+ jpeg2k? ( media-libs/jasper )
+ png? ( media-libs/libpng:0 )
+ sndfile? ( media-libs/libsndfile )
+ tiff? ( media-libs/tiff:0 )
+ vorbis? (
+ media-libs/libogg
+ media-libs/libvorbis
+ )
+ zlib? ( sys-libs/zlib )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+"
+
+DOCS=(AUTHORS ChangeLog NEWS README)
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.7.0-pkgconfig-partial.patch
+ "${FILESDIR}"/${PN}-1.7.0-libpng15.patch
+)
+
+# --with-pic, two defined (PIC and one for image format, sillyt), no not pass
+# --enable-qimage, broken Qt checks, unable to locate FHS-compliant Qt install
+# --with-x, not used anywhere
+src_configure() {
+ econf \
+ --disable-qimage \
+ --disable-quicktime \
+ --with-eps \
+ --with-mpeg2enc \
+ --with-rgb \
+ --with-targa \
+ --with-xwd \
+ --without-x \
+ $(use_with gif) \
+ $(use_enable debug) \
+ $(use_enable debug symbols) \
+ $(use_with jpeg) \
+ $(use_with jpeg2k jasper) \
+ $(use_with png) \
+ $(use_with sndfile libsndfile) \
+ $(use_enable static-libs static) \
+ $(use_with tiff) \
+ $(use_with vorbis oggvorbis) \
+ $(use_with zlib)
+}
+
+src_install() {
+ # Remove simage from Libs.private
+ sed -e '/Libs.private/s/ -lsimage//' -i simage.pc || die
+
+ base_src_install
+
+ # Remove libtool files when not needed.
+ use static-libs || rm -f "${D}"/usr/lib*/*.la
+}
diff --git a/media-libs/skstream/Manifest b/media-libs/skstream/Manifest
new file mode 100644
index 000000000000..0efc124436ec
--- /dev/null
+++ b/media-libs/skstream/Manifest
@@ -0,0 +1 @@
+DIST skstream-0.3.9.tar.bz2 326088 SHA256 1ce821690988ef71d04ffa815fd6275637adb15c0b3575fefc8d1a83afa76e10 SHA512 88cf67a76c9983eaa50d2350a6895a1782e77d9e9794084999770989436a3306d1f4d4d4a6ddfa199235f1dc0518d65988cd1956fdd2ce5306fd6b2246db91d9 WHIRLPOOL a28d949e646f990013ec96e58d60bab97c3a397adb9c002b3989aad3dedbc0df8f2f359b8498d0a0c5214e2a595184fdce5d004e0728a5dd183e2c834f6c5fff
diff --git a/media-libs/skstream/files/skstream-0.3.9-test.patch b/media-libs/skstream/files/skstream-0.3.9-test.patch
new file mode 100644
index 000000000000..162d29d1fb53
--- /dev/null
+++ b/media-libs/skstream/files/skstream-0.3.9-test.patch
@@ -0,0 +1,20 @@
+--- test/childskstreamtest.h.old 2011-09-26 16:14:47.733708252 +0200
++++ test/childskstreamtest.h 2011-09-26 16:16:32.021385992 +0200
+@@ -109,9 +109,6 @@
+ //some macros for building the suite() method
+ CPPUNIT_TEST_SUITE(tcpskstreamtest);
+ CPPUNIT_TEST(testConstructor_1);
+- CPPUNIT_TEST(testConstructor_2);
+- CPPUNIT_TEST(testOpen);
+- CPPUNIT_TEST(testOpenNonblock);
+ CPPUNIT_TEST_SUITE_END();
+
+ private:
+@@ -245,7 +242,6 @@
+ {
+ //some macros for building the suite() method
+ CPPUNIT_TEST_SUITE(rawskstreamtest);
+- CPPUNIT_TEST(testConstructor_1);
+ CPPUNIT_TEST_SUITE_END();
+
+ public:
diff --git a/media-libs/skstream/metadata.xml b/media-libs/skstream/metadata.xml
new file mode 100644
index 000000000000..5f2eefef5278
--- /dev/null
+++ b/media-libs/skstream/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>tupone@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">worldforge</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/skstream/skstream-0.3.9.ebuild b/media-libs/skstream/skstream-0.3.9.ebuild
new file mode 100644
index 000000000000..41545b32be24
--- /dev/null
+++ b/media-libs/skstream/skstream-0.3.9.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit base eutils
+
+DESCRIPTION="FreeSockets - Portable C++ classes for IP (sockets) applications"
+HOMEPAGE="http://www.worldforge.org/"
+SRC_URI="mirror://sourceforge/worldforge/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="test"
+
+DEPEND="test? ( dev-util/cppunit )"
+RDEPEND=""
+
+PATCHES=( "${FILESDIR}"/${P}-test.patch )
+DOCS=( AUTHORS ChangeLog NEWS README README.FreeSockets TODO )
diff --git a/media-libs/slv2/Manifest b/media-libs/slv2/Manifest
new file mode 100644
index 000000000000..30e38c969082
--- /dev/null
+++ b/media-libs/slv2/Manifest
@@ -0,0 +1 @@
+DIST slv2-0.6.6.tar.bz2 170859 SHA256 60d3539b8c34d40d2d63e47832ef2e7bf34a9b1af2898547b19721e3f6b7f9f0 SHA512 b9751b944e4a4d9639fcbfe73cdb31bc4d7f1256c0b1b75f9ab58f5f951767d12a4dd6bb8fc95743de9f6787c663e6815c3e41c025299a4228325d0568b08359 WHIRLPOOL cfe418ef19af71030b3b20816877871e327a34beee3a598c6ba759743bb871c7b1a8d4123ee481a40136f6dc9e50c8d3b1f52d33196f1824b2cb7a76eb951780
diff --git a/media-libs/slv2/files/ldconfig.patch b/media-libs/slv2/files/ldconfig.patch
new file mode 100644
index 000000000000..f53ff9e7df59
--- /dev/null
+++ b/media-libs/slv2/files/ldconfig.patch
@@ -0,0 +1,14 @@
+Index: slv2-0.6.2/autowaf.py
+===================================================================
+--- slv2-0.6.2.orig/autowaf.py
++++ slv2-0.6.2/autowaf.py
+@@ -324,8 +324,5 @@ def build_dox(bld, name, version, srcdir
+ out1.command_is_external = True
+
+ def shutdown():
+- # This isn't really correct (for packaging), but people asking is annoying
+- if Options.commands['install']:
+- try: os.popen("/sbin/ldconfig")
+- except: pass
++ return
+
diff --git a/media-libs/slv2/metadata.xml b/media-libs/slv2/metadata.xml
new file mode 100644
index 000000000000..0dc3775f83d7
--- /dev/null
+++ b/media-libs/slv2/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>proaudio</herd>
+</pkgmetadata>
diff --git a/media-libs/slv2/slv2-0.6.6-r1.ebuild b/media-libs/slv2/slv2-0.6.6-r1.ebuild
new file mode 100644
index 000000000000..97cf5d40cd6c
--- /dev/null
+++ b/media-libs/slv2/slv2-0.6.6-r1.ebuild
@@ -0,0 +1,39 @@
+# 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='threads(+)'
+inherit eutils multilib python-any-r1 toolchain-funcs waf-utils
+
+DESCRIPTION="A library to make the use of LV2 plugins as simple as possible for applications"
+HOMEPAGE="http://wiki.drobilla.net/SLV2"
+SRC_URI="http://download.drobilla.net/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="doc jack"
+
+RDEPEND=">=dev-libs/redland-1.0.6
+ jack? ( >=media-sound/jack-audio-connection-kit-0.107.0 )
+ || ( media-libs/lv2 media-libs/lv2core )"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/ldconfig.patch
+}
+
+src_configure() {
+ waf-utils_src_configure \
+ --prefix=/usr \
+ --libdir=/usr/$(get_libdir) \
+ --htmldir=/usr/share/doc/${PF}/html \
+ $(use doc && echo --build-docs) \
+ $(use jack || echo --no-jack)
+}
diff --git a/media-libs/slv2/slv2-0.6.6.ebuild b/media-libs/slv2/slv2-0.6.6.ebuild
new file mode 100644
index 000000000000..afd57fec31cf
--- /dev/null
+++ b/media-libs/slv2/slv2-0.6.6.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils multilib python toolchain-funcs
+
+DESCRIPTION="A library to make the use of LV2 plugins as simple as possible for applications"
+HOMEPAGE="http://wiki.drobilla.net/SLV2"
+SRC_URI="http://download.drobilla.net/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="doc jack"
+
+RDEPEND=">=dev-libs/redland-1.0.6
+ jack? ( >=media-sound/jack-audio-connection-kit-0.107.0 )
+ || ( media-libs/lv2 media-libs/lv2core )"
+DEPEND="${RDEPEND}
+ || ( dev-lang/python:2.7 dev-lang/python:2.6 )
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/ldconfig.patch
+}
+
+src_configure() {
+ tc-export CC CXX CPP AR RANLIB
+ LINKFLAGS="${LDFLAGS}" \
+ ./waf configure \
+ --prefix=/usr \
+ --libdir=/usr/$(get_libdir) \
+ --htmldir=/usr/share/doc/${PF}/html \
+ $(use doc && echo --build-docs) \
+ $(use jack || echo --no-jack) \
+ || die
+}
+
+src_compile() {
+ ./waf || die
+}
+
+src_install() {
+ ./waf --destdir="${D}" install || die
+ dodoc AUTHORS README ChangeLog
+}
diff --git a/media-libs/smpeg/Manifest b/media-libs/smpeg/Manifest
new file mode 100644
index 000000000000..94a4ca2e6a0b
--- /dev/null
+++ b/media-libs/smpeg/Manifest
@@ -0,0 +1,2 @@
+DIST smpeg-0.4.4-gtkm4.patch.bz2 3894 SHA256 85c1c2126bd0e405092f3f08caace3503997fd0447989fdd175c7f39c3f6091b SHA512 30370e0edd41767ce260d10de515be0087f47b479ec0085ec186506c93be0b2a404c1bcb1626f9a6a1f575160d9c382708d2769dddfe6dca6236fe0eaa58602d WHIRLPOOL 3645daa5da07c954d920fe4371486222a93a9aca6932892c12afe07a36b57a0b1752d768c3101cfeb0986579a78a319fe88aa03a9c2c48307ed4fe526f83ffe6
+DIST smpeg-0.4.4.tar.gz 315054 SHA256 1efa7984d0aada0c2954cd0aaef357e9d7871dadd3368dbe742ab5f260523e57 SHA512 d566bb68b0caacecdf61cd766b26e003fd4e153c243d873f7aae33ab69919202bd121bb9c10f494bd9530267ddec2a9e018eb46ee8bb9d502a29cd2de2f1bbfb WHIRLPOOL bc81726489b31901713857b9a77369493ef976adf40adb68b2d365d15a2ec635eef29a2e6a195c4c156a08a7fcbb39e2b872323525bc7841494e26c6a59e90a5
diff --git a/media-libs/smpeg/files/smpeg-0.4.4-PIC.patch b/media-libs/smpeg/files/smpeg-0.4.4-PIC.patch
new file mode 100644
index 000000000000..88663011713b
--- /dev/null
+++ b/media-libs/smpeg/files/smpeg-0.4.4-PIC.patch
@@ -0,0 +1,308 @@
+Fix PIC issues in mmx routines
+
+--- video/mmxflags_asm.S
++++ video/mmxflags_asm.S
+@@ -1,11 +1,6 @@
+
+ #if defined(i386) && defined(USE_MMX)
+
+-.data
+- .align 16
+- .type flags,@object
+-flags: .long 0
+-
+ .text
+ .align 4
+ .globl cpu_flags
+@@ -40,16 +35,13 @@ cpu_flags:
+ xorl %ecx,%eax
+ je cpu_flags.L1
+
+- pusha
++ pushl %ebx
+
+ movl $1,%eax
+ cpuid
++ movl %edx,%eax
+
+- movl %edx,flags
+-
+- popa
+-
+- movl flags,%eax
++ popl %ebx
+
+ cpu_flags.L1:
+ ret
+--- video/mmxidct_asm.S
++++ video/mmxidct_asm.S
+@@ -31,11 +31,6 @@ preSC: .short 16384,22725,21407,19266,
+ x0005000200010001:
+ .long 0x00010001,0x00050002
+ .align 8
+- .type x0040000000000000,@object
+- .size x0040000000000000,8
+-x0040000000000000:
+- .long 0, 0x00400000
+- .align 8
+ .type x5a825a825a825a82,@object
+ .size x5a825a825a825a82,8
+ x5a825a825a825a82:
+@@ -80,8 +75,21 @@ scratch7:
+ x0:
+ .long 0,0
+ .align 8
++
+ .text
+ .align 4
++
++#ifdef __PIC__
++# undef __i686 /* gcc define gets in our way */
++# define MUNG(sym) sym ## @GOTOFF(%ebx)
++# define INIT_PIC() \
++ call __i686.get_pc_thunk.bx ; \
++ addl $_GLOBAL_OFFSET_TABLE_, %ebx
++#else
++# define MUNG(sym) sym
++# define INIT_PIC()
++#endif
++
+ .globl IDCT_mmx
+ .type IDCT_mmx,@function
+ IDCT_mmx:
+@@ -92,8 +100,9 @@ IDCT_mmx:
+ pushl %edx
+ pushl %esi
+ pushl %edi
++ INIT_PIC()
+ movl 8(%ebp),%esi /* source matrix */
+- leal preSC, %ecx
++ leal MUNG(preSC), %ecx
+ /* column 0: even part
+ * use V4, V12, V0, V8 to produce V22..V25
+ */
+@@ -109,7 +118,7 @@ IDCT_mmx:
+ movq %mm1, %mm2 /* added 11/1/96 */
+ pmulhw 8*8(%esi),%mm5 /* V8 */
+ psubsw %mm0, %mm1 /* V16 */
+- pmulhw x5a825a825a825a82, %mm1 /* 23170 ->V18 */
++ pmulhw MUNG(x5a825a825a825a82), %mm1 /* 23170 ->V18 */
+ paddsw %mm0, %mm2 /* V17 */
+ movq %mm2, %mm0 /* duplicate V17 */
+ psraw $1, %mm2 /* t75=t82 */
+@@ -150,7 +159,7 @@ IDCT_mmx:
+ paddsw %mm0, %mm3 /* V29 ; free mm0 */
+ movq %mm7, %mm1 /* duplicate V26 */
+ psraw $1, %mm3 /* t91=t94 */
+- pmulhw x539f539f539f539f,%mm7 /* V33 */
++ pmulhw MUNG(x539f539f539f539f),%mm7 /* V33 */
+ psraw $1, %mm1 /* t96 */
+ movq %mm5, %mm0 /* duplicate V2 */
+ psraw $2, %mm4 /* t85=t87 */
+@@ -158,15 +167,15 @@ IDCT_mmx:
+ psubsw %mm4, %mm0 /* V28 ; free mm4 */
+ movq %mm0, %mm2 /* duplicate V28 */
+ psraw $1, %mm5 /* t90=t93 */
+- pmulhw x4546454645464546,%mm0 /* V35 */
++ pmulhw MUNG(x4546454645464546),%mm0 /* V35 */
+ psraw $1, %mm2 /* t97 */
+ movq %mm5, %mm4 /* duplicate t90=t93 */
+ psubsw %mm2, %mm1 /* V32 ; free mm2 */
+- pmulhw x61f861f861f861f8,%mm1 /* V36 */
++ pmulhw MUNG(x61f861f861f861f8),%mm1 /* V36 */
+ psllw $1, %mm7 /* t107 */
+ paddsw %mm3, %mm5 /* V31 */
+ psubsw %mm3, %mm4 /* V30 ; free mm3 */
+- pmulhw x5a825a825a825a82,%mm4 /* V34 */
++ pmulhw MUNG(x5a825a825a825a82),%mm4 /* V34 */
+ nop
+ psubsw %mm1, %mm0 /* V38 */
+ psubsw %mm7, %mm1 /* V37 ; free mm7 */
+@@ -233,7 +242,7 @@ IDCT_mmx:
+ psubsw %mm7, %mm1 /* V50 */
+ pmulhw 8*9(%esi), %mm5 /* V9 */
+ paddsw %mm7, %mm2 /* V51 */
+- pmulhw x5a825a825a825a82, %mm1 /* 23170 ->V52 */
++ pmulhw MUNG(x5a825a825a825a82), %mm1 /* 23170 ->V52 */
+ movq %mm2, %mm6 /* duplicate V51 */
+ psraw $1, %mm2 /* t138=t144 */
+ movq %mm3, %mm4 /* duplicate V1 */
+@@ -274,11 +283,11 @@ IDCT_mmx:
+ * even more by doing the correction step in a later stage when the number
+ * is actually multiplied by 16
+ */
+- paddw x0005000200010001, %mm4
++ paddw MUNG(x0005000200010001), %mm4
+ psubsw %mm6, %mm3 /* V60 ; free mm6 */
+ psraw $1, %mm0 /* t154=t156 */
+ movq %mm3, %mm1 /* duplicate V60 */
+- pmulhw x539f539f539f539f, %mm1 /* V67 */
++ pmulhw MUNG(x539f539f539f539f), %mm1 /* V67 */
+ movq %mm5, %mm6 /* duplicate V3 */
+ psraw $2, %mm4 /* t148=t150 */
+ paddsw %mm4, %mm5 /* V61 */
+@@ -287,13 +296,13 @@ IDCT_mmx:
+ psllw $1, %mm1 /* t169 */
+ paddsw %mm0, %mm5 /* V65 -> result */
+ psubsw %mm0, %mm4 /* V64 ; free mm0 */
+- pmulhw x5a825a825a825a82, %mm4 /* V68 */
++ pmulhw MUNG(x5a825a825a825a82), %mm4 /* V68 */
+ psraw $1, %mm3 /* t158 */
+ psubsw %mm6, %mm3 /* V66 */
+ movq %mm5, %mm2 /* duplicate V65 */
+- pmulhw x61f861f861f861f8, %mm3 /* V70 */
++ pmulhw MUNG(x61f861f861f861f8), %mm3 /* V70 */
+ psllw $1, %mm6 /* t165 */
+- pmulhw x4546454645464546, %mm6 /* V69 */
++ pmulhw MUNG(x4546454645464546), %mm6 /* V69 */
+ psraw $1, %mm2 /* t172 */
+ /* moved from next block */
+ movq 8*5(%esi), %mm0 /* V56 */
+@@ -418,7 +427,7 @@ IDCT_mmx:
+ * movq 8*13(%esi), %mm4 tmt13
+ */
+ psubsw %mm4, %mm3 /* V134 */
+- pmulhw x5a825a825a825a82, %mm3 /* 23170 ->V136 */
++ pmulhw MUNG(x5a825a825a825a82), %mm3 /* 23170 ->V136 */
+ movq 8*9(%esi), %mm6 /* tmt9 */
+ paddsw %mm4, %mm5 /* V135 ; mm4 free */
+ movq %mm0, %mm4 /* duplicate tmt1 */
+@@ -447,17 +456,17 @@ IDCT_mmx:
+ psubsw %mm7, %mm0 /* V144 */
+ movq %mm0, %mm3 /* duplicate V144 */
+ paddsw %mm7, %mm2 /* V147 ; free mm7 */
+- pmulhw x539f539f539f539f, %mm0 /* 21407-> V151 */
++ pmulhw MUNG(x539f539f539f539f), %mm0 /* 21407-> V151 */
+ movq %mm1, %mm7 /* duplicate tmt3 */
+ paddsw %mm5, %mm7 /* V145 */
+ psubsw %mm5, %mm1 /* V146 ; free mm5 */
+ psubsw %mm1, %mm3 /* V150 */
+ movq %mm7, %mm5 /* duplicate V145 */
+- pmulhw x4546454645464546, %mm1 /* 17734-> V153 */
++ pmulhw MUNG(x4546454645464546), %mm1 /* 17734-> V153 */
+ psubsw %mm2, %mm5 /* V148 */
+- pmulhw x61f861f861f861f8, %mm3 /* 25080-> V154 */
++ pmulhw MUNG(x61f861f861f861f8), %mm3 /* 25080-> V154 */
+ psllw $2, %mm0 /* t311 */
+- pmulhw x5a825a825a825a82, %mm5 /* 23170-> V152 */
++ pmulhw MUNG(x5a825a825a825a82), %mm5 /* 23170-> V152 */
+ paddsw %mm2, %mm7 /* V149 ; free mm2 */
+ psllw $1, %mm1 /* t313 */
+ nop /* without the nop - freeze here for one clock */
+@@ -483,7 +492,7 @@ IDCT_mmx:
+ paddsw %mm3, %mm6 /* V164 ; free mm3 */
+ movq %mm4, %mm3 /* duplicate V142 */
+ psubsw %mm5, %mm4 /* V165 ; free mm5 */
+- movq %mm2, scratch7 /* out7 */
++ movq %mm2, MUNG(scratch7) /* out7 */
+ psraw $4, %mm6
+ psraw $4, %mm4
+ paddsw %mm5, %mm3 /* V162 */
+@@ -494,11 +503,11 @@ IDCT_mmx:
+ */
+ movq %mm6, 8*9(%esi) /* out9 */
+ paddsw %mm1, %mm0 /* V161 */
+- movq %mm3, scratch5 /* out5 */
++ movq %mm3, MUNG(scratch5) /* out5 */
+ psubsw %mm1, %mm5 /* V166 ; free mm1 */
+ movq %mm4, 8*11(%esi) /* out11 */
+ psraw $4, %mm5
+- movq %mm0, scratch3 /* out3 */
++ movq %mm0, MUNG(scratch3) /* out3 */
+ movq %mm2, %mm4 /* duplicate V140 */
+ movq %mm5, 8*13(%esi) /* out13 */
+ paddsw %mm7, %mm2 /* V160 */
+@@ -508,7 +517,7 @@ IDCT_mmx:
+ /* moved from the next block */
+ movq 8*3(%esi), %mm7
+ psraw $4, %mm4
+- movq %mm2, scratch1 /* out1 */
++ movq %mm2, MUNG(scratch1) /* out1 */
+ /* moved from the next block */
+ movq %mm0, %mm1
+ movq %mm4, 8*15(%esi) /* out15 */
+@@ -565,15 +574,15 @@ IDCT_mmx:
+ paddsw %mm4, %mm3 /* V113 ; free mm4 */
+ movq %mm0, %mm4 /* duplicate V110 */
+ paddsw %mm1, %mm2 /* V111 */
+- pmulhw x539f539f539f539f, %mm0 /* 21407-> V117 */
++ pmulhw MUNG(x539f539f539f539f), %mm0 /* 21407-> V117 */
+ psubsw %mm1, %mm5 /* V112 ; free mm1 */
+ psubsw %mm5, %mm4 /* V116 */
+ movq %mm2, %mm1 /* duplicate V111 */
+- pmulhw x4546454645464546, %mm5 /* 17734-> V119 */
++ pmulhw MUNG(x4546454645464546), %mm5 /* 17734-> V119 */
+ psubsw %mm3, %mm2 /* V114 */
+- pmulhw x61f861f861f861f8, %mm4 /* 25080-> V120 */
++ pmulhw MUNG(x61f861f861f861f8), %mm4 /* 25080-> V120 */
+ paddsw %mm3, %mm1 /* V115 ; free mm3 */
+- pmulhw x5a825a825a825a82, %mm2 /* 23170-> V118 */
++ pmulhw MUNG(x5a825a825a825a82), %mm2 /* 23170-> V118 */
+ psllw $2, %mm0 /* t266 */
+ movq %mm1, (%esi) /* save V115 */
+ psllw $1, %mm5 /* t268 */
+@@ -591,7 +600,7 @@ IDCT_mmx:
+ movq %mm6, %mm3 /* duplicate tmt4 */
+ psubsw %mm0, %mm6 /* V100 */
+ paddsw %mm0, %mm3 /* V101 ; free mm0 */
+- pmulhw x5a825a825a825a82, %mm6 /* 23170 ->V102 */
++ pmulhw MUNG(x5a825a825a825a82), %mm6 /* 23170 ->V102 */
+ movq %mm7, %mm5 /* duplicate tmt0 */
+ movq 8*8(%esi), %mm1 /* tmt8 */
+ paddsw %mm1, %mm7 /* V103 */
+@@ -625,10 +634,10 @@ IDCT_mmx:
+ movq 8*2(%esi), %mm3 /* V123 */
+ paddsw %mm4, %mm7 /* out0 */
+ /* moved up from next block */
+- movq scratch3, %mm0
++ movq MUNG(scratch3), %mm0
+ psraw $4, %mm7
+ /* moved up from next block */
+- movq scratch5, %mm6
++ movq MUNG(scratch5), %mm6
+ psubsw %mm4, %mm1 /* out14 ; free mm4 */
+ paddsw %mm3, %mm5 /* out2 */
+ psraw $4, %mm1
+@@ -639,7 +648,7 @@ IDCT_mmx:
+ movq %mm5, 8*2(%esi) /* out2 ; free mm5 */
+ psraw $4, %mm2
+ /* moved up to the prev block */
+- movq scratch7, %mm4
++ movq MUNG(scratch7), %mm4
+ /* moved up to the prev block */
+ psraw $4, %mm0
+ movq %mm2, 8*12(%esi) /* out12 ; free mm2 */
+@@ -647,13 +656,13 @@ IDCT_mmx:
+ psraw $4, %mm6
+ /* move back the data to its correct place
+ * moved up to the prev block
+- * movq scratch3, %mm0
+- * movq scratch5, %mm6
+- * movq scratch7, %mm4
++ * movq MUNG(scratch3), %mm0
++ * movq MUNG(scratch5), %mm6
++ * movq MUNG(scratch7), %mm4
+ * psraw $4, %mm0
+ * psraw $4, %mm6
+ */
+- movq scratch1, %mm1
++ movq MUNG(scratch1), %mm1
+ psraw $4, %mm4
+ movq %mm0, 8*3(%esi) /* out3 */
+ psraw $4, %mm1
+@@ -671,6 +680,15 @@ IDCT_mmx:
+ .Lfe1:
+ .size IDCT_mmx,.Lfe1-IDCT_mmx
+
++#ifdef __PIC__
++ .section .gnu.linkonce.t.__i686.get_pc_thunk.bx,"ax",@progbits
++.globl __i686.get_pc_thunk.bx
++ .hidden __i686.get_pc_thunk.bx
++ .type __i686.get_pc_thunk.bx,@function
++ __i686.get_pc_thunk.bx:
++ movl (%esp), %ebx
++ ret
++#endif
+
+ #endif /* i386 && USE_MMX */
+
diff --git a/media-libs/smpeg/files/smpeg-0.4.4-automake.patch b/media-libs/smpeg/files/smpeg-0.4.4-automake.patch
new file mode 100644
index 000000000000..e541e1950113
--- /dev/null
+++ b/media-libs/smpeg/files/smpeg-0.4.4-automake.patch
@@ -0,0 +1,13 @@
+Index: smpeg-0.4.4/configure.in
+===================================================================
+--- smpeg-0.4.4.orig/configure.in
++++ smpeg-0.4.4/configure.in
+@@ -53,6 +53,8 @@ AC_LIBTOOL_WIN32_DLL
+ AM_PROG_LIBTOOL
+ AC_PROG_INSTALL
+
++AM_PROG_AS
++
+ dnl Work around the lack of certain typedefs.
+ AC_TYPE_SOCKLEN_T
+
diff --git a/media-libs/smpeg/files/smpeg-0.4.4-config.patch b/media-libs/smpeg/files/smpeg-0.4.4-config.patch
new file mode 100644
index 000000000000..2175276c351f
--- /dev/null
+++ b/media-libs/smpeg/files/smpeg-0.4.4-config.patch
@@ -0,0 +1,18 @@
+Only dump -L/-rpath if libdir is non-standard
+
+--- smpeg-config.in
++++ smpeg-config.in
+@@ -45,11 +45,13 @@
+ echo $includes -I@includedir@/smpeg `@SDL_CONFIG@ --cflags`
+ ;;
+ --libs)
++ if [ "@libdir@" != "/usr/lib" ]; then
+ if [ "`uname`" = "SunOS" ]; then
+ libdirs="-L@libdir@ -R@libdir@"
+ else
+ libdirs="-L@libdir@ @SMPEG_RLD_FLAGS@"
+ fi
++ fi
+ echo $libdirs -lsmpeg `@SDL_CONFIG@ --libs`
+ ;;
+ *)
diff --git a/media-libs/smpeg/files/smpeg-0.4.4-flags.patch b/media-libs/smpeg/files/smpeg-0.4.4-flags.patch
new file mode 100644
index 000000000000..d6b50f30d1bf
--- /dev/null
+++ b/media-libs/smpeg/files/smpeg-0.4.4-flags.patch
@@ -0,0 +1,129 @@
+Index: smpeg-0.4.4/configure.in
+===================================================================
+--- smpeg-0.4.4.orig/configure.in
++++ smpeg-0.4.4/configure.in
+@@ -60,7 +60,7 @@ dnl The alpha architecture needs special
+ case "$target" in
+ alpha*-*-linux*)
+ if test x$ac_cv_prog_gcc = xyes; then
+- CFLAGS="$CFLAGS -mcpu=ev4 -Wa,-mall"
++ EXTRA_CFLAGS="$EXTRA_CFLAGS -mcpu=ev4 -Wa,-mall"
+ fi
+ ;;
+ sparc*-*-solaris*)
+@@ -102,17 +102,17 @@ AC_ARG_ENABLE(debug,
+ , enable_debug=yes)
+ if test x$enable_debug != xyes; then
+ if test x$ac_cv_prog_gcc = xyes; then
+- CFLAGS="$CFLAGS -fexpensive-optimizations -fomit-frame-pointer"
++ EXTRA_CFLAGS="$EXTRA_CFLAGS -fexpensive-optimizations -fomit-frame-pointer"
+ fi
+ case "$target" in
+ i486-*-*) # Yeah right. :)
+ if test x$ac_cv_prog_gcc = xyes; then
+- CFLAGS="$CFLAGS -march=486"
++ EXTRA_CFLAGS="$EXTRA_CFLAGS -march=486"
+ fi
+ ;;
+ i?86-*-*)
+ if test x$ac_cv_prog_gcc = xyes; then
+- CFLAGS="$CFLAGS -march=pentium -mcpu=pentiumpro"
++ EXTRA_CFLAGS="$EXTRA_CFLAGS -march=pentium -mcpu=pentiumpro"
+ fi
+ ;;
+ esac
+@@ -124,7 +124,7 @@ AM_PATH_SDL($SDL_VERSION,
+ :,
+ AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
+ )
+-CFLAGS="$CFLAGS $SDL_CFLAGS"
++EXTRA_CFLAGS="$EXTRA_CFLAGS $SDL_CFLAGS"
+ LIBS="$LIBS $SDL_LIBS"
+
+ dnl See if we need to pass -lm for the math library
+@@ -145,7 +145,7 @@ if test x$enable_mmx = xyes; then
+ AC_MSG_RESULT($use_mmx)
+
+ if test x$use_mmx = xyes; then
+- CFLAGS="$CFLAGS -DUSE_MMX"
++ EXTRA_CFLAGS="$EXTRA_CFLAGS -DUSE_MMX"
+ fi
+ fi
+
+@@ -162,7 +162,7 @@ if test x$enable_ati = xyes; then
+ AC_MSG_RESULT($use_ati)
+
+ if test x$use_ati = xyes; then
+- CFLAGS="$CFLAGS -DUSE_ATI"
++ EXTRA_CFLAGS="$EXTRA_CFLAGS -DUSE_ATI"
+ fi
+ fi
+
+@@ -171,7 +171,7 @@ AC_ARG_ENABLE(timestamp-sync,
+ [ --enable-timestamp-sync enable system timestamp sync [default=yes]],
+ , enable_timestamp_sync=no)
+ if test x$enable_timestamp_sync = xyes; then
+- CFLAGS="$CFLAGS -DUSE_TIMESTAMP_SYNC"
++EXTRA_CFLAGS="$EXTRA_CFLAGS -DUSE_TIMESTAMP_SYNC"
+ fi
+
+ dnl Enable the use of the system thread
+@@ -179,7 +179,7 @@ AC_ARG_ENABLE(threaded-system,
+ [ --enable-threaded-system enable system thread [default=no]],
+ , enable_threaded_system=no)
+ if test x$enable_threaded_system = xyes; then
+- CFLAGS="$CFLAGS -DUSE_SYSTEM_THREAD"
++EXTRA_CFLAGS="$EXTRA_CFLAGS -DUSE_SYSTEM_THREAD"
+ fi
+
+ dnl Enable threaded audio
+@@ -187,7 +187,7 @@ AC_ARG_ENABLE(threaded-audio,
+ [ --enable-threaded-audio enable threaded audio [default=yes]],
+ , enable_threaded_audio=yes)
+ if test x$enable_threaded_audio = xyes; then
+- CFLAGS="$CFLAGS -DTHREADED_AUDIO"
++EXTRA_CFLAGS="$EXTRA_CFLAGS -DTHREADED_AUDIO"
+ fi
+
+ dnl See if we can build the GTk player
+@@ -198,7 +198,7 @@ have_gtk=no
+ if test x$enable_gtk_player = xyes; then
+ AM_PATH_GTK(1.2.1, have_gtk=yes)
+ if test x$have_gtk = xyes; then
+- CFLAGS="$CFLAGS $GTK_CFLAGS"
++ EXTRA_CFLAGS="$EXTRA_CFLAGS $GTK_CFLAGS"
+ fi
+ AC_SUBST(GTK_LIBS)
+ fi
+@@ -224,7 +224,7 @@ if test x$enable_opengl_player = xyes; t
+ AC_PATH_X
+ AC_PATH_XTRA
+ if test x$have_x = xyes; then
+- CFLAGS="$CFLAGS $X_CFLAGS"
++ EXTRA_CFLAGS="$EXTRA_CFLAGS $X_CFLAGS"
+ SYS_GL_LIBS="$X_LIBS -lGL -lGLU"
+ else
+ SYS_GL_LIBS="-lGL -lGLU"
+@@ -255,17 +255,16 @@ AC_ARG_ENABLE(assertions,
+ [ --enable-assertions Enable consistency checks in decoding [default=no]],
+ , enable_assertions=no)
+ if test x$enable_assertions != xyes; then
+- CFLAGS="$CFLAGS -DNDEBUG"
++ EXTRA_CFLAGS="$EXTRA_CFLAGS -DNDEBUG"
+ fi
+
+ dnl Add the source include directories
+-CFLAGS="$CFLAGS -I.. -DNOCONTROLS"
+-CFLAGS="$CFLAGS -I\$(top_srcdir) -I\$(top_srcdir)/audio -I\$(top_srcdir)/video"
+-CXXFLAGS="$CFLAGS"
+-
++EXTRA_CFLAGS="$EXTRA_CFLAGS -I.. -DNOCONTROLS"
++EXTRA_CFLAGS="$EXTRA_CFLAGS -I\$(top_srcdir) -I\$(top_srcdir)/audio -I\$(top_srcdir)/video"
++CXXFLAGS="$EXTRA_CFLAGS $CXXFLAGS"
++CFLAGS="$EXTRA_CFLAGS $CFLAGS"
+
+ dnl C++ flags are the same as the C flags
+-CXXFLAGS="$CFLAGS"
+ if test x$GCC = xyes; then
+ # Check to see if options -fno-rtti -fno-exceptions are supported
+ AC_MSG_CHECKING(if $CXX supports -fno-rtti -fno-exceptions)
diff --git a/media-libs/smpeg/files/smpeg-0.4.4-format.patch b/media-libs/smpeg/files/smpeg-0.4.4-format.patch
new file mode 100644
index 000000000000..8503f032286a
--- /dev/null
+++ b/media-libs/smpeg/files/smpeg-0.4.4-format.patch
@@ -0,0 +1,11 @@
+--- plaympeg.c.old 2014-09-04 08:55:10.646132150 +0200
++++ plaympeg.c 2014-09-04 08:56:57.465210820 +0200
+@@ -262,7 +262,7 @@
+ answer[i] = c;
+ }
+ answer[i] = 0;
+- fprintf(stderr, answer + 4);
++ fprintf(stderr, "%s", answer + 4);
+ }
+ while(answer[3] == '-');
+
diff --git a/media-libs/smpeg/files/smpeg-0.4.4-gcc41.patch b/media-libs/smpeg/files/smpeg-0.4.4-gcc41.patch
new file mode 100644
index 000000000000..4a0eeb4530ae
--- /dev/null
+++ b/media-libs/smpeg/files/smpeg-0.4.4-gcc41.patch
@@ -0,0 +1,41 @@
+Index: MPEGaudio.h
+===================================================================
+RCS file: /cvs/cvsroot/smpeg/MPEGaudio.h,v
+retrieving revision 1.23
+diff -u -p -r1.23 MPEGaudio.h
+--- smpeg/MPEGaudio.h 17 Jul 2001 19:52:24 -0000 1.23
++++ smpeg/MPEGaudio.h 6 Dec 2005 06:10:43 -0000
+@@ -151,12 +151,6 @@ private:
+ /* The actual MPEG audio class */
+ class MPEGaudio : public MPEGerror, public MPEGaudioaction {
+
+- friend void Play_MPEGaudioSDL(void *udata, Uint8 *stream, int len);
+- friend int Play_MPEGaudio(MPEGaudio *audio, Uint8 *stream, int len);
+-#ifdef THREADED_AUDIO
+- friend int Decode_MPEGaudio(void *udata);
+-#endif
+-
+ public:
+ MPEGaudio(MPEGstream *stream, bool initSDL = true);
+ virtual ~MPEGaudio();
+@@ -367,6 +361,20 @@ public:
+ #define N_TIMESTAMPS 5
+
+ double timestamp[N_TIMESTAMPS];
++
++ /* Functions which access MPEGaudio internals */
++ friend void Play_MPEGaudioSDL(void *udata, Uint8 *stream, int len);
++ friend int Play_MPEGaudio(MPEGaudio *audio, Uint8 *stream, int len);
++#ifdef THREADED_AUDIO
++ friend int Decode_MPEGaudio(void *udata);
++#endif
+ };
+
++/* Need to duplicate the prototypes, this is not a typo :) */
++void Play_MPEGaudioSDL(void *udata, Uint8 *stream, int len);
++int Play_MPEGaudio(MPEGaudio *audio, Uint8 *stream, int len);
++#ifdef THREADED_AUDIO
++int Decode_MPEGaudio(void *udata);
++#endif
++
+ #endif /* _MPEGAUDIO_H_ */
diff --git a/media-libs/smpeg/files/smpeg-0.4.4-gnu-stack.patch b/media-libs/smpeg/files/smpeg-0.4.4-gnu-stack.patch
new file mode 100644
index 000000000000..12efb077f2b1
--- /dev/null
+++ b/media-libs/smpeg/files/smpeg-0.4.4-gnu-stack.patch
@@ -0,0 +1,32 @@
+Make sure that the asm files don't incorrectly trigger an executable
+stack marking in the final shared library. That's bad, mmmkay.
+
+before:
+$ readelf -l /usr/lib/libsmpeg.so | grep -A 1 GNU_STACK
+ GNU_STACK 0x0000000000000000 0x0000000000000000 0x0000000000000000
+ 0x0000000000000000 0x0000000000000000 RWE 8
+after:
+$ readelf -l /usr/lib/libsmpeg.so | grep -A 1 GNU_STACK
+ GNU_STACK 0x0000000000000000 0x0000000000000000 0x0000000000000000
+ 0x0000000000000000 0x0000000000000000 RW 8
+
+--- smpeg-0.4.4/video/mmxflags_asm.S
++++ smpeg-0.4.4/video/mmxflags_asm.S
+@@ -57,3 +57,7 @@
+ .size cpu_flags,.Lfe1-cpu_flags
+
+ #endif /* i386 && USE_MMX */
++
++#ifdef __ELF__
++.section .note.GNU-stack,"",%progbits
++#endif
+--- smpeg-0.4.4/video/mmxidct_asm.S
++++ smpeg-0.4.4/video/mmxidct_asm.S
+@@ -673,3 +673,7 @@
+
+
+ #endif /* i386 && USE_MMX */
++
++#ifdef __ELF__
++.section .note.GNU-stack,"",%progbits
++#endif
diff --git a/media-libs/smpeg/files/smpeg-0.4.4-m4.patch b/media-libs/smpeg/files/smpeg-0.4.4-m4.patch
new file mode 100644
index 000000000000..660ba8808638
--- /dev/null
+++ b/media-libs/smpeg/files/smpeg-0.4.4-m4.patch
@@ -0,0 +1,9 @@
+Fix aclocal warning:
+/usr/share/aclocal/smpeg.m4:13: warning: underquoted definition of AM_PATH_SMPEG
+--- smpeg-0.4.4/smpeg.m4
++++ smpeg-0.4.4/smpeg.m4
+@@ -12,3 +12,3 @@
+ dnl
+-AC_DEFUN(AM_PATH_SMPEG,
++AC_DEFUN([AM_PATH_SMPEG],
+ [dnl
diff --git a/media-libs/smpeg/files/smpeg-0.4.4-malloc.patch b/media-libs/smpeg/files/smpeg-0.4.4-malloc.patch
new file mode 100644
index 000000000000..be54e58b4d23
--- /dev/null
+++ b/media-libs/smpeg/files/smpeg-0.4.4-malloc.patch
@@ -0,0 +1,25 @@
+Index: smpeg-0.4.4/glmovie.c
+===================================================================
+--- smpeg-0.4.4.orig/glmovie.c
++++ smpeg-0.4.4/glmovie.c
+@@ -6,7 +6,6 @@
+ #include "smpeg.h"
+ #include "SDL.h"
+ #include <stdlib.h>
+-#include <malloc.h>
+ #include <string.h>
+ #include <unistd.h>
+ #include "glmovie.h"
+Index: smpeg-0.4.4/glmovie-tile.c
+===================================================================
+--- smpeg-0.4.4.orig/glmovie-tile.c
++++ smpeg-0.4.4/glmovie-tile.c
+@@ -16,7 +16,7 @@
+ */
+
+ #include "glmovie.h"
+-#include <malloc.h>
++#include <stdlib.h>
+ #include <string.h>
+
+ /* Some data is redundant at this stage. */
diff --git a/media-libs/smpeg/files/smpeg-0.4.4-missing-init.patch b/media-libs/smpeg/files/smpeg-0.4.4-missing-init.patch
new file mode 100644
index 000000000000..594c5546ebf7
--- /dev/null
+++ b/media-libs/smpeg/files/smpeg-0.4.4-missing-init.patch
@@ -0,0 +1,10 @@
+--- MPEG_old.cpp 2007-01-07 23:24:45.000000000 +0100
++++ MPEG.cpp 2007-01-07 23:25:11.000000000 +0100
+@@ -133,6 +133,7 @@
+ video = NULL;
+ system = NULL;
+ error = NULL;
++ source = NULL;
+
+ audiostream = videostream = NULL;
+ audioaction = NULL;
diff --git a/media-libs/smpeg/files/smpeg-0.4.4-mmx.patch b/media-libs/smpeg/files/smpeg-0.4.4-mmx.patch
new file mode 100644
index 000000000000..71db62d055b4
--- /dev/null
+++ b/media-libs/smpeg/files/smpeg-0.4.4-mmx.patch
@@ -0,0 +1,12 @@
+Index: smpeg-0.4.4/configure.in
+===================================================================
+--- smpeg-0.4.4.orig/configure.in
++++ smpeg-0.4.4/configure.in
+@@ -148,6 +148,7 @@ if test x$enable_mmx = xyes; then
+
+ if test x$use_mmx = xyes; then
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -DUSE_MMX"
++ CCASFLAGS="$CCASFLAGS -DUSE_MMX"
+ fi
+ fi
+
diff --git a/media-libs/smpeg/metadata.xml b/media-libs/smpeg/metadata.xml
new file mode 100644
index 000000000000..d3c2cc926f0b
--- /dev/null
+++ b/media-libs/smpeg/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-libs/smpeg/smpeg-0.4.4-r10.ebuild b/media-libs/smpeg/smpeg-0.4.4-r10.ebuild
new file mode 100644
index 000000000000..b1f57cbbb5ad
--- /dev/null
+++ b/media-libs/smpeg/smpeg-0.4.4-r10.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs autotools flag-o-matic multilib-minimal
+
+DESCRIPTION="SDL MPEG Player Library"
+HOMEPAGE="http://icculus.org/smpeg/"
+SRC_URI="ftp://ftp.lokigames.com/pub/open-source/smpeg/${P}.tar.gz
+ mirror://gentoo/${P}-gtkm4.patch.bz2"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~x86-solaris"
+IUSE="X debug cpu_flags_x86_mmx opengl static-libs"
+
+RDEPEND="
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ !<=app-emulation/emul-linux-x86-sdl-20140406
+ )
+ >=media-libs/libsdl-1.2.15-r4[${MULTILIB_USEDEP}]
+ opengl? (
+ >=virtual/glu-9.0-r1[${MULTILIB_USEDEP}]
+ >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}]
+ )
+ X? (
+ >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXi-1.7.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ )"
+DEPEND="${RDEPEND}"
+
+DOCS=( CHANGES README README.SDL_mixer TODO )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-m4.patch \
+ "${FILESDIR}"/${P}-gnu-stack.patch \
+ "${FILESDIR}"/${P}-config.patch \
+ "${FILESDIR}"/${P}-PIC.patch \
+ "${FILESDIR}"/${P}-gcc41.patch \
+ "${FILESDIR}"/${P}-flags.patch \
+ "${FILESDIR}"/${P}-automake.patch \
+ "${FILESDIR}"/${P}-mmx.patch \
+ "${FILESDIR}"/${P}-malloc.patch \
+ "${FILESDIR}"/${P}-format.patch \
+ "${FILESDIR}"/${P}-missing-init.patch
+
+ cd "${WORKDIR}"
+ epatch "${DISTDIR}"/${P}-gtkm4.patch.bz2
+ rm "${S}/acinclude.m4"
+
+ cd "${S}"
+ AT_M4DIR="${S}/m4" eautoreconf
+}
+
+multilib_src_configure() {
+ [[ ${CHOST} == *-solaris* ]] && append-libs -lnsl -lsocket
+
+ # the debug option is bogus ... all it does is add extra
+ # optimizations if you pass --disable-debug
+ ECONF_SOURCE="${S}" econf \
+ --enable-debug \
+ --disable-gtk-player \
+ $(use_enable static-libs static) \
+ $(use_enable debug assertions) \
+ $(use_with X x) \
+ $(use_enable opengl opengl-player) \
+ $(use_enable cpu_flags_x86_mmx mmx)
+}
+
+multilib_src_install_all() {
+ use static-libs || prune_libtool_files
+}
diff --git a/media-libs/smpeg2/Manifest b/media-libs/smpeg2/Manifest
new file mode 100644
index 000000000000..b142311c606c
--- /dev/null
+++ b/media-libs/smpeg2/Manifest
@@ -0,0 +1 @@
+DIST smpeg-2.0.0.tar.bz2 311846 SHA256 8adcc305a063170ca32983e5e10e216fa4b8106c3947190c0ca561a08ec26512 SHA512 3a58ea6a47224b112390c3fe83e5bd59a852a8828ee9b0451d389e3d193499fd3dfb2344abe4d1379248c4fb197e78ee22c6cfb653a2e32e339c030826c06950 WHIRLPOOL 23c49525df9bbfc1506c7131fe7b6f6bcd6940d4f1a05cfa3386244fcf949bd11f083568271879f64d0c26c406be5462d2dbacb22e367f542a155c34094797d2
diff --git a/media-libs/smpeg2/files/smpeg2-2.0.0-smpeg2-config.patch b/media-libs/smpeg2/files/smpeg2-2.0.0-smpeg2-config.patch
new file mode 100644
index 000000000000..66c246f08cca
--- /dev/null
+++ b/media-libs/smpeg2/files/smpeg2-2.0.0-smpeg2-config.patch
@@ -0,0 +1,33 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Mon Oct 7 15:10:46 UTC 2013
+Subject: fix smpeg2-config.in
+
+SDL_CONFIG is now SDL2_CONFIG in the new sdl2.m4
+
+--------------------------------------CUT---------------------------------------
+also
+
+Only dump -L/-rpath if libdir is non-standard; cribbed from smpeg patches
+
+--- smpeg-2.0.0.orig/smpeg2-config.in
++++ smpeg-2.0.0/smpeg2-config.in
+@@ -42,15 +42,17 @@
+ if test @includedir@ != /usr/include ; then
+ includes=-I@includedir@
+ fi
+- echo $includes -I@includedir@/smpeg2 `@SDL_CONFIG@ --cflags`
++ echo $includes -I@includedir@/smpeg2 `@SDL2_CONFIG@ --cflags`
+ ;;
+ --libs)
++ if [ "@libdir@" != "/usr/lib" ]; then
+ if [ "`uname`" = "SunOS" ]; then
+ libdirs="-L@libdir@ -R@libdir@"
+ else
+ libdirs="-L@libdir@ @SMPEG_RLD_FLAGS@"
+ fi
+- echo $libdirs -lsmpeg2 `@SDL_CONFIG@ --libs`
++ fi
++ echo $libdirs -lsmpeg2 `@SDL2_CONFIG@ --libs`
+ ;;
+ *)
+ echo "${usage}" 1>&2
diff --git a/media-libs/smpeg2/metadata.xml b/media-libs/smpeg2/metadata.xml
new file mode 100644
index 000000000000..cad5a2aa1773
--- /dev/null
+++ b/media-libs/smpeg2/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-libs/smpeg2/smpeg2-2.0.0-r3.ebuild b/media-libs/smpeg2/smpeg2-2.0.0-r3.ebuild
new file mode 100644
index 000000000000..037c129e35c6
--- /dev/null
+++ b/media-libs/smpeg2/smpeg2-2.0.0-r3.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs autotools multilib-minimal
+
+MY_P=smpeg-${PV}
+DESCRIPTION="SDL MPEG Player Library"
+HOMEPAGE="http://icculus.org/smpeg/"
+SRC_URI="http://dev.gentoo.org/~hasufell/distfiles/${MY_P}.tar.bz2"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug cpu_flags_x86_mmx static-libs"
+
+DEPEND=">=media-libs/libsdl2-2.0.1-r1[${MULTILIB_USEDEP}]"
+RDEPEND="${DEPEND}"
+
+DOCS=( CHANGES README README.SDL_mixer TODO )
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-smpeg2-config.patch
+
+ # avoid file collision with media-libs/smpeg
+ sed -i \
+ -e '/plaympeg/d' \
+ Makefile.am || die
+
+ mv configure.in configure.ac || die
+ AT_M4DIR="/usr/share/aclocal acinclude" eautoreconf
+}
+
+multilib_src_configure() {
+ # the debug option is bogus ... all it does is add extra
+ # optimizations if you pass --disable-debug
+ ECONF_SOURCE="${S}" econf \
+ $(use_enable static-libs static) \
+ --disable-rpath \
+ --enable-debug \
+ --disable-sdltest \
+ $(use_enable cpu_flags_x86_mmx mmx) \
+ $(use_enable debug assertions)
+}
+
+multilib_src_install_all() {
+ use static-libs || prune_libtool_files
+}
diff --git a/media-libs/soxr/Manifest b/media-libs/soxr/Manifest
new file mode 100644
index 000000000000..86b515d00553
--- /dev/null
+++ b/media-libs/soxr/Manifest
@@ -0,0 +1,2 @@
+DIST soxr-0.1.0-Source.tar.xz 78900 SHA256 12ce532a3045a3f6942736ac3417c6cafe0204896eb86537527d79723ddbffb1 SHA512 c11ad01461adde4ebd9db63d130b96c2e0335b75f166d7d966da7d2efa54495dfdf5cda271b806816945f880e61e4e9e0c6b29df7735f33b6adf3a857b336c85 WHIRLPOOL 8125926d8802d89f2a70b5f400df1c9452dc689fb94af0e3da54dcf8ba396a8cd5f325460ecb41af441c70dffe5639bad17b0ecd105426794482a2284f3eee77
+DIST soxr-0.1.1-Source.tar.xz 80716 SHA256 dcc16868d1a157079316f84233afcc2b52dd0bd541dd8439dc25bceb306faac2 SHA512 377d9c0bb72cd673f89021a86da18861d35ab52f773afd97b6b5f7a2fa8e78865f3484cab4b795ceafacbbb34be6b77efeaaed75c66a839d5e891d70f00d6679 WHIRLPOOL bde1b4a0069200b5352c065a15e7296f6b58c902585ae384a3b2c31e38daa86db6df4d05c948072f83db0a1bb11364e21b02814bf0f65fb6ad625a3b38d618e8
diff --git a/media-libs/soxr/files/libsuffix.patch b/media-libs/soxr/files/libsuffix.patch
new file mode 100644
index 000000000000..e22512b78188
--- /dev/null
+++ b/media-libs/soxr/files/libsuffix.patch
@@ -0,0 +1,13 @@
+Index: soxr-0.1.0-Source/CMakeLists.txt
+===================================================================
+--- soxr-0.1.0-Source.orig/CMakeLists.txt
++++ soxr-0.1.0-Source/CMakeLists.txt
+@@ -180,7 +180,7 @@ if (NOT DEFINED BIN_INSTALL_DIR)
+ set (BIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin")
+ endif ()
+ if (NOT DEFINED LIB_INSTALL_DIR)
+- set (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib")
++ set (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
+ endif ()
+ if (NOT DEFINED INCLUDE_INSTALL_DIR)
+ set (INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include")
diff --git a/media-libs/soxr/files/nodoc.patch b/media-libs/soxr/files/nodoc.patch
new file mode 100644
index 000000000000..0d64e1aba0f9
--- /dev/null
+++ b/media-libs/soxr/files/nodoc.patch
@@ -0,0 +1,19 @@
+Index: soxr-0.1.0-Source/CMakeLists.txt
+===================================================================
+--- soxr-0.1.0-Source.orig/CMakeLists.txt
++++ soxr-0.1.0-Source/CMakeLists.txt
+@@ -217,14 +217,6 @@ if (BUILD_TESTS OR BUILD_LSR_TESTS)
+ enable_testing ()
+ endif ()
+
+-install (FILES
+- ${CMAKE_CURRENT_SOURCE_DIR}/README
+- ${CMAKE_CURRENT_SOURCE_DIR}/LICENCE
+- ${CMAKE_CURRENT_SOURCE_DIR}/NEWS
+- DESTINATION ${DOC_INSTALL_DIR})
+-
+-
+-
+ # Subdirectories:
+
+ include_directories (${PROJECT_SOURCE_DIR}/src)
diff --git a/media-libs/soxr/files/noexamples.patch b/media-libs/soxr/files/noexamples.patch
new file mode 100644
index 000000000000..c66c0b1e5b19
--- /dev/null
+++ b/media-libs/soxr/files/noexamples.patch
@@ -0,0 +1,9 @@
+Index: soxr-0.1.0-Source/examples/CMakeLists.txt
+===================================================================
+--- soxr-0.1.0-Source.orig/examples/CMakeLists.txt
++++ soxr-0.1.0-Source/examples/CMakeLists.txt
+@@ -34,4 +34,3 @@ if (${BUILD_TESTS} AND ${WITH_LSR_BINDIN
+ endif ()
+
+ file (GLOB INSTALL_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.[cCh])
+-install (FILES ${INSTALL_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/README DESTINATION ${DOC_INSTALL_DIR}/examples)
diff --git a/media-libs/soxr/metadata.xml b/media-libs/soxr/metadata.xml
new file mode 100644
index 000000000000..ef7c79f9fa79
--- /dev/null
+++ b/media-libs/soxr/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>sound</herd>
+ <upstream>
+ <remote-id type="sourceforge">soxr</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/soxr/soxr-0.1.0.ebuild b/media-libs/soxr/soxr-0.1.0.ebuild
new file mode 100644
index 000000000000..6d9170ad4ce7
--- /dev/null
+++ b/media-libs/soxr/soxr-0.1.0.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-multilib
+
+MY_P=${P}-Source
+DESCRIPTION="The SoX Resampler library"
+HOMEPAGE="https://sourceforge.net/p/soxr/wiki/Home/"
+SRC_URI="mirror://sourceforge/soxr/${MY_P}.tar.xz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~mips"
+IUSE="examples"
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+DOCS=( "README" "TODO" "NEWS" "AUTHORS" )
+PATCHES=(
+ "${FILESDIR}/libsuffix.patch"
+ "${FILESDIR}/nodoc.patch"
+ "${FILESDIR}/noexamples.patch"
+ )
+
+src_install() {
+ cmake-multilib_src_install
+ if use examples ; then
+ dodoc -r examples
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+}
diff --git a/media-libs/soxr/soxr-0.1.1.ebuild b/media-libs/soxr/soxr-0.1.1.ebuild
new file mode 100644
index 000000000000..a6d15ba3955e
--- /dev/null
+++ b/media-libs/soxr/soxr-0.1.1.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 cmake-multilib
+
+MY_P=${P}-Source
+DESCRIPTION="The SoX Resampler library"
+HOMEPAGE="https://sourceforge.net/p/soxr/wiki/Home/"
+SRC_URI="mirror://sourceforge/soxr/${MY_P}.tar.xz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd"
+IUSE="examples"
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+DOCS=( "README" "TODO" "NEWS" "AUTHORS" )
+PATCHES=(
+ "${FILESDIR}/nodoc.patch"
+ "${FILESDIR}/noexamples.patch"
+ )
+
+src_install() {
+ cmake-multilib_src_install
+ if use examples ; then
+ dodoc -r examples
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+}
diff --git a/media-libs/spandsp/Manifest b/media-libs/spandsp/Manifest
new file mode 100644
index 000000000000..38cecbaeef2b
--- /dev/null
+++ b/media-libs/spandsp/Manifest
@@ -0,0 +1,3 @@
+DIST spandsp-0.0.6.tar.gz 3309837 SHA256 cc053ac67e8ac4bb992f258fd94f275a7872df959f6a87763965feabfdcc9465 SHA512 16bb215ca89a39282e832403f69bc4c98ad3fe35ab3a6eb4731ee5029a6acd9b2df243c3701de845441cbdc16c88b3cd398ef15dc3502e45d5aeca8a161917d4 WHIRLPOOL 83aad8c11aeb3e0686cd35d2987602e4d9f4001f29463ece18d6843be855ad32f9a3fd8cba2842a1c8dc9f91acde1b776400b4317c93d0201b9039b0990f500a
+DIST spandsp-0.0.6pre12.tgz 2566669 SHA256 81820ab80be853ecfea79b75e5b5cf592ff7083853cc22ced46d57da47f9d0e8 SHA512 19a7fe491b836fe604373aa2d31d4b35dde19e593a8f3d5d2a4b866ea69a137ba5ebfd43c34f74e8f7800a7eb1ba93d1a0401540e310bad2b73aecb17c45de0b WHIRLPOOL c7ddee4f308af16dd77b612df0ce339ff89c8ec80cb77139d460299a76e291c334315f0ee48a51a6a6af125f1dc0d824fcf43e03fb206a909b5fec159e1cbf01
+DIST spandsp-0.0.6pre21.tgz 3278758 SHA256 bd152152bf0b204661ab9439c5a649098bcb8cefebcbfa959dd602442739aa50 SHA512 6f846021cd6a1605d371a8e5d1ac3a5b6adc5b85de2517e24a5afaa57b4864202c2d16c1196959f7f11d866732d17d301d2d37121228cec75077678f8fc3e488 WHIRLPOOL e3c375888c562a933ca9be22a916d57b538ee702b77d0e4ce078eadd93e8701e1bcd76296ba6b88934888a4a3f5b6c216441a5e5f8aea8134984fe4213f38736
diff --git a/media-libs/spandsp/metadata.xml b/media-libs/spandsp/metadata.xml
new file mode 100644
index 000000000000..185b7406f610
--- /dev/null
+++ b/media-libs/spandsp/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>chainsaw@gentoo.org</email></maintainer>
+ <use>
+ <flag name='fixed-point'>Enable fixed point support</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/spandsp/spandsp-0.0.6.ebuild b/media-libs/spandsp/spandsp-0.0.6.ebuild
new file mode 100644
index 000000000000..3defbba2b9a1
--- /dev/null
+++ b/media-libs/spandsp/spandsp-0.0.6.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit multilib versionator
+
+DESCRIPTION="SpanDSP is a library of DSP functions for telephony"
+HOMEPAGE="http://www.soft-switch.org/"
+SRC_URI="http://www.soft-switch.org/downloads/spandsp/${P/_}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
+IUSE="doc fixed-point cpu_flags_x86_mmx cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse3 static-libs"
+
+RDEPEND="media-libs/tiff
+ virtual/jpeg"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen
+ dev-libs/libxslt )"
+
+# Enabled implicitly by the build system. Really useless.
+REQUIRED_USE="
+ cpu_flags_x86_sse3? ( cpu_flags_x86_sse2 )
+ cpu_flags_x86_sse2? ( cpu_flags_x86_sse )
+ cpu_flags_x86_sse? ( cpu_flags_x86_mmx )"
+
+S=${WORKDIR}/${PN}-$(get_version_component_range 1-3)
+
+# TODO:
+# there are two tests options: tests and test-data
+# they need audiofile, fftw, libxml and probably more
+
+src_configure() {
+ # Note: flags over sse3 aren't really used -- they're only
+ # boilerplate. They also make some silly assumptions, e.g. that
+ # every CPU with SSE4* has SSSE3.
+ # Reference: https://bugs.funtoo.org/browse/FL-2069.
+ # If you want to re-add them, first check if the code started
+ # using them. If it did, figure out if the flags can be unbundled
+ # from one another. Otherwise, you'd have to do REQUIRED_USE.
+
+ econf \
+ --disable-dependency-tracking \
+ $(use_enable doc) \
+ $(use_enable fixed-point) \
+ $(use_enable cpu_flags_x86_mmx mmx) \
+ $(use_enable cpu_flags_x86_sse sse) \
+ $(use_enable cpu_flags_x86_sse2 sse2) \
+ $(use_enable cpu_flags_x86_sse3 sse3) \
+ $(use_enable static-libs static)
+}
+
+src_install () {
+ emake DESTDIR="${D}" install
+ dodoc AUTHORS ChangeLog DueDiligence NEWS README
+
+ if ! use static-libs; then
+ # remove useless la file when not installing static lib
+ rm "${D}"/usr/$(get_libdir)/lib${PN}.la || die "rm failed"
+ fi
+
+ if use doc; then
+ dohtml -r doc/{api/html/*,t38_manual}
+ fi
+}
diff --git a/media-libs/spandsp/spandsp-0.0.6_pre12-r1.ebuild b/media-libs/spandsp/spandsp-0.0.6_pre12-r1.ebuild
new file mode 100644
index 000000000000..a1cd3fad8071
--- /dev/null
+++ b/media-libs/spandsp/spandsp-0.0.6_pre12-r1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit multilib versionator
+
+DESCRIPTION="SpanDSP is a library of DSP functions for telephony"
+HOMEPAGE="http://www.soft-switch.org/"
+SRC_URI="http://www.soft-switch.org/downloads/spandsp/${P/_}.tgz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ~arm ppc ppc64 x86"
+IUSE="doc fixed-point static-libs"
+
+RDEPEND="media-libs/tiff"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen
+ dev-libs/libxslt )"
+
+S=${WORKDIR}/${PN}-$(get_version_component_range 1-3)
+
+# TODO:
+# there are two tests options: tests and test-data
+# they need audiofile, fftw, libxml and probably more
+# configure script is auto-enabling some sse* options sometimes
+
+src_configure() {
+ econf \
+ --disable-dependency-tracking \
+ $(use_enable doc) \
+ $(use_enable fixed-point) \
+ $(use_enable static-libs static)
+}
+
+src_install () {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ dodoc AUTHORS ChangeLog DueDiligence NEWS README || die "dodoc failed"
+
+ if ! use static-libs; then
+ # remove useless la file when not installing static lib
+ rm "${D}"/usr/$(get_libdir)/lib${PN}.la || die "rm failed"
+ fi
+
+ if use doc; then
+ dohtml -r doc/{api/html/*,t38_manual} || die "dohtml failed"
+ fi
+}
diff --git a/media-libs/spandsp/spandsp-0.0.6_pre21.ebuild b/media-libs/spandsp/spandsp-0.0.6_pre21.ebuild
new file mode 100644
index 000000000000..ddeb57f684b8
--- /dev/null
+++ b/media-libs/spandsp/spandsp-0.0.6_pre21.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 multilib versionator
+
+DESCRIPTION="SpanDSP is a library of DSP functions for telephony"
+HOMEPAGE="http://www.soft-switch.org/"
+SRC_URI="http://www.soft-switch.org/downloads/spandsp/${P/_}.tgz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
+IUSE="doc fixed-point cpu_flags_x86_mmx cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse3 static-libs"
+
+RDEPEND="media-libs/tiff"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen
+ dev-libs/libxslt )"
+
+S=${WORKDIR}/${PN}-$(get_version_component_range 1-3)
+
+# TODO:
+# there are two tests options: tests and test-data
+# they need audiofile, fftw, libxml and probably more
+# configure script is auto-enabling some sse* options sometimes
+
+src_configure() {
+ econf \
+ --disable-dependency-tracking \
+ $(use_enable doc) \
+ $(use_enable fixed-point) \
+ $(use_enable cpu_flags_x86_mmx mmx) \
+ $(use_enable cpu_flags_x86_sse2 sse2) \
+ $(use_enable cpu_flags_x86_sse3 sse3) \
+ $(use_enable static-libs static)
+}
+
+src_install () {
+ emake DESTDIR="${D}" install
+ dodoc AUTHORS ChangeLog DueDiligence NEWS README
+
+ if ! use static-libs; then
+ # remove useless la file when not installing static lib
+ rm "${D}"/usr/$(get_libdir)/lib${PN}.la || die "rm failed"
+ fi
+
+ if use doc; then
+ dohtml -r doc/{api/html/*,t38_manual}
+ fi
+}
diff --git a/media-libs/speex/Manifest b/media-libs/speex/Manifest
new file mode 100644
index 000000000000..d7e33b8ef618
--- /dev/null
+++ b/media-libs/speex/Manifest
@@ -0,0 +1 @@
+DIST speex-1.2rc1.tar.gz 1061882 SHA256 342f30dc57bd4a6dad41398365baaa690429660b10d866b7d508e8f1179cb7a6 SHA512 bdf1ddb2d60496ab220b94c1bec7a43f267fc964fdbb5cc9f24b71b9b571f237f5ce98c1d74b02699d71a95281f4694ff464ebec25e3b135244e5b3099cb1813 WHIRLPOOL c984f04a9c78332509b76ef98ff0eb84b8b4b8755d02890c5de41501325c2055e42243eaed2671e0087c8ca2cdea5967e5113c3d85a53f3704a8d8a3cfc487cb
diff --git a/media-libs/speex/files/speex-1.2_rc1-configure.patch b/media-libs/speex/files/speex-1.2_rc1-configure.patch
new file mode 100644
index 000000000000..cd780daf261e
--- /dev/null
+++ b/media-libs/speex/files/speex-1.2_rc1-configure.patch
@@ -0,0 +1,31 @@
+diff -ur speex-1.2rc1.orig/configure.ac speex-1.2rc1/configure.ac
+--- speex-1.2rc1.orig/configure.ac 2008-07-30 22:49:17.000000000 -0400
++++ speex-1.2rc1/configure.ac 2008-07-30 22:50:33.000000000 -0400
+@@ -112,9 +112,6 @@
+
+ AC_CHECK_HEADERS(sys/soundcard.h sys/audioio.h)
+
+-XIPH_PATH_OGG([src="src"], [src=""])
+-AC_SUBST(src)
+-
+ AC_CHECK_LIB(m, sin)
+
+ # Check for getopt_long; if not found, use included source.
+@@ -139,10 +136,16 @@
+ AC_DEFINE([ENABLE_VALGRIND], , [Enable valgrind extra checks])
+ fi])
+
++AC_ARG_ENABLE(ogg, [ --enable-ogg Enable OGG support], [if test "$enableval" = yes; then
++ XIPH_PATH_OGG([src="src"], [src=""])
++ AC_SUBST(src)
++fi
++])
++
+ AC_ARG_ENABLE(sse, [ --enable-sse Enable SSE support], [
+ if test "x$enableval" != xno; then
+ has_sse=yes
+-CFLAGS="$CFLAGS -O3 -msse"
++CFLAGS="$CFLAGS -msse"
+ else
+ has_sse=no
+ fi
diff --git a/media-libs/speex/files/speex-1.2_rc1-r1-configure.patch b/media-libs/speex/files/speex-1.2_rc1-r1-configure.patch
new file mode 100644
index 000000000000..a6c9166a9259
--- /dev/null
+++ b/media-libs/speex/files/speex-1.2_rc1-r1-configure.patch
@@ -0,0 +1,40 @@
+diff -urN speex-1.2rc1.orig/configure.ac speex-1.2rc1/configure.ac
+--- speex-1.2rc1.orig/configure.ac 2008-07-21 03:17:08.000000000 +0100
++++ speex-1.2rc1/configure.ac 2011-03-15 00:23:21.263751871 +0000
+@@ -112,9 +112,6 @@
+
+ AC_CHECK_HEADERS(sys/soundcard.h sys/audioio.h)
+
+-XIPH_PATH_OGG([src="src"], [src=""])
+-AC_SUBST(src)
+-
+ AC_CHECK_LIB(m, sin)
+
+ # Check for getopt_long; if not found, use included source.
+@@ -139,10 +136,16 @@
+ AC_DEFINE([ENABLE_VALGRIND], , [Enable valgrind extra checks])
+ fi])
+
++AC_ARG_ENABLE(ogg, [ --enable-ogg Enable OGG support], [if test "$enableval" = yes; then
++ XIPH_PATH_OGG([src="src"], [src=""])
++ AC_SUBST(src)
++fi
++])
++
+ AC_ARG_ENABLE(sse, [ --enable-sse Enable SSE support], [
+ if test "x$enableval" != xno; then
+ has_sse=yes
+-CFLAGS="$CFLAGS -O3 -msse"
++CFLAGS="$CFLAGS -msse"
+ else
+ has_sse=no
+ fi
+@@ -217,7 +220,7 @@
+ ],
+ [gpl-fftw3], [
+ AC_DEFINE([USE_GPL_FFTW3], [], [Use FFTW3 for FFT])
+- PKG_CHECK_MODULES(FFT, fftw3f)
++ PKG_CHECK_MODULES([FFT], [fftw3f])
+ ],
+ [proprietary-intel-mkl], [
+ AC_DEFINE([USE_INTEL_MKL], [], [Use Intel Math Kernel Library for FFT])
diff --git a/media-libs/speex/metadata.xml b/media-libs/speex/metadata.xml
new file mode 100644
index 000000000000..d4990648f895
--- /dev/null
+++ b/media-libs/speex/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>sound</herd>
+<upstream>
+ <remote-id type="cpe">cpe:/a:xiph:speex</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/media-libs/speex/speex-1.2_rc1-r2.ebuild b/media-libs/speex/speex-1.2_rc1-r2.ebuild
new file mode 100644
index 000000000000..c569606db6ae
--- /dev/null
+++ b/media-libs/speex/speex-1.2_rc1-r2.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 autotools eutils flag-o-matic multilib-minimal
+
+MY_P=${P/_} ; MY_P=${MY_P/_p/.}
+
+DESCRIPTION="Audio compression format designed for speech"
+HOMEPAGE="http://www.speex.org/"
+SRC_URI="http://downloads.xiph.org/releases/speex/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="ogg cpu_flags_x86_sse static-libs"
+
+RDEPEND="ogg? ( media-libs/libogg:= )
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20130224-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+DOCS=( AUTHORS ChangeLog NEWS README README.TI-DSP README.blackfin README.symbian TODO )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-r1-configure.patch
+
+ sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' configure.ac || die #467012
+
+ sed -i \
+ -e 's:noinst_PROGRAMS:check_PROGRAMS:' \
+ libspeex/Makefile.am || die
+
+ eautoreconf
+}
+
+multilib_src_configure() {
+ append-lfs-flags
+
+ ECONF_SOURCE="${S}" econf \
+ $(use_enable static-libs static) \
+ $(use_enable cpu_flags_x86_sse sse) \
+ $( [ "${ABI}" = "${DEFAULT_ABI}" ] && echo $(use_enable ogg))
+ # ogg is only for speexdec/speexenc binaries, useless for non native ABIs
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" docdir="${EPREFIX}/usr/share/doc/${PF}" install
+
+ prune_libtool_files
+}
diff --git a/media-libs/sratom/Manifest b/media-libs/sratom/Manifest
new file mode 100644
index 000000000000..3aabc6069dc3
--- /dev/null
+++ b/media-libs/sratom/Manifest
@@ -0,0 +1,2 @@
+DIST sratom-0.4.4.tar.bz2 134625 SHA256 fa0c29f4fed822d5d2c41e4b4694d3a01bda1e25ae16af1054b85ad42a2180e0 SHA512 f485da575810348ed9f5016d326b1e82bd9e52d096fa91598c626bdad3f3ba15bbacdd5153b09134f1ad3112fc00132678d096e38f9f7ce2af3cef9f6fe1585a WHIRLPOOL 9dafa3ec0990b8f562d11efe6870e3b0a47e86b15f79665d1677e9cf30b9f75607d3f76a299c6c63b38b2c2a1a364e3e62131ca86aac084dd3ab008808ff272b
+DIST sratom-0.4.6.tar.bz2 138165 SHA256 a4b9beaeaedc4f651beb15cd1cfedff905b0726a9010548483475ad97d941220 SHA512 198ab8fd7b027bf62db5d215e1af020695304339df552af6a336be661b30228d9c1ab2befeca959fdde0920dad2c33666fbd6bbf833ba1e24e4fde23d850dc0e WHIRLPOOL 82e0f8ab618b911b949da3d4d42e9084f906476f626d743a9920b572b64b6bf472ad1041bf07c64135636e88ec9f5ef62769c75aff3468ad5d4cd93a12b1f281
diff --git a/media-libs/sratom/metadata.xml b/media-libs/sratom/metadata.xml
new file mode 100644
index 000000000000..0dc3775f83d7
--- /dev/null
+++ b/media-libs/sratom/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>proaudio</herd>
+</pkgmetadata>
diff --git a/media-libs/sratom/sratom-0.4.4.ebuild b/media-libs/sratom/sratom-0.4.4.ebuild
new file mode 100644
index 000000000000..1d56ece69529
--- /dev/null
+++ b/media-libs/sratom/sratom-0.4.4.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit waf-utils
+
+DESCRIPTION="Library for serialising LV2 atoms to/from RDF, particularly the Turtle syntax"
+HOMEPAGE="http://drobilla.net/software/sratom/"
+SRC_URI="http://download.drobilla.net/${P}.tar.bz2"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="doc static-libs test"
+
+RDEPEND="media-libs/lv2
+ >=dev-libs/serd-0.14.0
+ >=dev-libs/sord-0.12.0"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )
+ virtual/pkgconfig"
+
+DOCS=( "NEWS" "README" )
+
+src_prepare() {
+ sed -i -e 's/^.*run_ldconfig/#\0/' wscript || die
+}
+
+src_configure() {
+ waf-utils_src_configure \
+ --docdir=/usr/share/doc/${PF} \
+ $(use test && echo "--test") \
+ $(use doc && echo "--docs") \
+ $(use static-libs && echo "--static")
+}
+
+src_test() {
+ ./waf test || die
+}
diff --git a/media-libs/sratom/sratom-0.4.6.ebuild b/media-libs/sratom/sratom-0.4.6.ebuild
new file mode 100644
index 000000000000..2943c45017ee
--- /dev/null
+++ b/media-libs/sratom/sratom-0.4.6.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+PYTHON_REQ_USE='threads(+)'
+inherit python-any-r1 waf-utils
+
+DESCRIPTION="Library for serialising LV2 atoms to/from RDF, particularly the Turtle syntax"
+HOMEPAGE="http://drobilla.net/software/sratom/"
+SRC_URI="http://download.drobilla.net/${P}.tar.bz2"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="doc static-libs test"
+
+RDEPEND=">=media-libs/lv2-1.8.1
+ >=dev-libs/serd-0.14.0
+ >=dev-libs/sord-0.12.0"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ doc? ( app-doc/doxygen )
+ virtual/pkgconfig"
+
+DOCS=( "NEWS" "README" )
+
+src_prepare() {
+ sed -i -e 's/^.*run_ldconfig/#\0/' wscript || die
+}
+
+src_configure() {
+ waf-utils_src_configure \
+ --docdir=/usr/share/doc/${PF} \
+ $(use test && echo "--test") \
+ $(use doc && echo "--docs") \
+ $(use static-libs && echo "--static")
+}
+
+src_test() {
+ ./waf test || die
+}
diff --git a/media-libs/stimg/Manifest b/media-libs/stimg/Manifest
new file mode 100644
index 000000000000..bd490c8eb44a
--- /dev/null
+++ b/media-libs/stimg/Manifest
@@ -0,0 +1 @@
+DIST stimg-0.1.0.tar.gz 187172 SHA256 1098daac6fb37bd0135d700605d99cdbb8b8a9c9e16cdc892b3018a8534fb528
diff --git a/media-libs/stimg/files/stimg-0.1.0-libpng15.patch b/media-libs/stimg/files/stimg-0.1.0-libpng15.patch
new file mode 100644
index 000000000000..41ae138f1b1f
--- /dev/null
+++ b/media-libs/stimg/files/stimg-0.1.0-libpng15.patch
@@ -0,0 +1,37 @@
+--- src/png.c
++++ src/png.c
+@@ -102,8 +102,8 @@
+ 0x00,
+ NULL);
+
+- alpha = (info_ptr->channels == 4 || info_ptr->channels == 2) ? 1: 0;
+- image = stimg_new(info_ptr->width, info_ptr->height, alpha);
++ alpha = (png_get_channels(png_ptr, info_ptr) == 4 || png_get_channels(png_ptr, info_ptr) == 2) ? 1: 0;
++ image = stimg_new(png_get_image_width(png_ptr, info_ptr), png_get_image_height(png_ptr, info_ptr), alpha);
+
+ if (image == NULL) {
+ png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
+@@ -112,18 +112,18 @@
+ }
+
+ row_pointers = png_get_rows(png_ptr, info_ptr);
+- row_size = info_ptr->width * (3 + alpha);
++ row_size = png_get_image_width(png_ptr, info_ptr) * (3 + alpha);
+ data = stimg_get_data(image);
+- if (info_ptr->channels > 2) {
+- for (i = 0; i < info_ptr->height; i++) {
++ if (png_get_channels(png_ptr, info_ptr) > 2) {
++ for (i = 0; i < png_get_image_height(png_ptr, info_ptr); i++) {
+ memcpy(data + row_size * i, row_pointers[i], row_size);
+ }
+ } else {
+ unsigned char *buf = data;
+ int x;
+- for (i = 0; i < info_ptr->height; i++) {
++ for (i = 0; i < png_get_image_height(png_ptr, info_ptr); i++) {
+ x = 0;
+- for (j = 0; j < info_ptr->width; j++) {
++ for (j = 0; j < png_get_image_width(png_ptr, info_ptr); j++) {
+ buf[0] = buf[1] = buf[2] = row_pointers[i][x];
+ if (alpha) {
+ buf[3] = row_pointers[i][++x];
diff --git a/media-libs/stimg/metadata.xml b/media-libs/stimg/metadata.xml
new file mode 100644
index 000000000000..9be90a258970
--- /dev/null
+++ b/media-libs/stimg/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>graphics</herd>
+</pkgmetadata>
diff --git a/media-libs/stimg/stimg-0.1.0.ebuild b/media-libs/stimg/stimg-0.1.0.ebuild
new file mode 100644
index 000000000000..02b15e1de30a
--- /dev/null
+++ b/media-libs/stimg/stimg-0.1.0.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Simple and tiny image loading library"
+HOMEPAGE="http://homepage3.nifty.com/slokar/fb/"
+SRC_URI="http://homepage3.nifty.com/slokar/stimg/${P}.tar.gz"
+
+LICENSE="LGPL-2+ MIT-with-advertising"
+SLOT="0"
+KEYWORDS="alpha amd64 ppc x86"
+IUSE="linguas_ja static-libs"
+
+RDEPEND="media-libs/libpng
+ media-libs/tiff
+ virtual/jpeg"
+DEPEND="${RDEPEND}"
+
+DOCS=( AUTHORS )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-libpng15.patch
+}
+
+src_configure() {
+ tc-export CC
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ find "${D}" -name '*.la' -exec rm -f {} +
+ use linguas_ja && dodoc README.ja
+}
diff --git a/media-libs/stk/Manifest b/media-libs/stk/Manifest
new file mode 100644
index 000000000000..9267afb77ae1
--- /dev/null
+++ b/media-libs/stk/Manifest
@@ -0,0 +1,2 @@
+DIST stk-4.4.4.tar.gz 6181713 SHA256 1276986481704f148933d4a2f8eaebb84827124acbd0243e5c8a004fa7c70710 SHA512 e36c43a20e95eb86ed0335ae17df23c1a672562656738496f9e2e5654a825292c4235e04774fcb0356d47a775b7d7af6b4fd63c9d151ab7f2f9195bb5f728e37 WHIRLPOOL 2bfbcfe16dd37e31a0db16603c39e107d0c6a78c667e4597e6dc05243d2edb451acd3f3f7ac1b6698807213f06d11d0982298e13011fed3f5bc814eb4d0cd74d
+DIST stk-4.5.0.tar.gz 2466803 SHA256 619f1a0dee852bb2b2f37730e2632d83b7e0e3ea13b4e8a3166bf11191956ee3 SHA512 a8a19e171093735052d797ef29a6a287dc6753fa726e451865250364dfd22f43b190aa03498ec94b99f3dc137ef951aa85e2f2f3509c74cedada6eedb5a31785 WHIRLPOOL a8bb1b45f3c88d22e6e5b593a0116b5fd1bdfdf7e39cfc479616e34677a98c7c17199ab4d6c15b9aa95841e631f9a49a6a4d1d65afdb9344407f9eaf922bb699
diff --git a/media-libs/stk/files/stk-4.4.4/010_all_removeForcedFlags.patch b/media-libs/stk/files/stk-4.4.4/010_all_removeForcedFlags.patch
new file mode 100644
index 000000000000..3fcc28fb763c
--- /dev/null
+++ b/media-libs/stk/files/stk-4.4.4/010_all_removeForcedFlags.patch
@@ -0,0 +1,13 @@
+Index: stk-4.4.3/configure.ac
+===================================================================
+--- stk-4.4.3.orig/configure.ac
++++ stk-4.4.3/configure.ac
+@@ -65,7 +65,7 @@ if test "$debug" = "yes"; then
+ else
+ AC_SUBST( debug, [no] )
+ AC_SUBST( cppflag, [] )
+- AC_SUBST( cxxflag, [-O3] )
++ AC_SUBST( cxxflag, [] )
+ AC_SUBST( object_path, [Release] )
+ fi
+ AC_MSG_RESULT($debug)
diff --git a/media-libs/stk/files/stk-4.4.4/020_all_noExamplesOrDemo.patch b/media-libs/stk/files/stk-4.4.4/020_all_noExamplesOrDemo.patch
new file mode 100644
index 000000000000..c7e6c5581252
--- /dev/null
+++ b/media-libs/stk/files/stk-4.4.4/020_all_noExamplesOrDemo.patch
@@ -0,0 +1,32 @@
+Index: stk-4.4.4/Makefile.in
+===================================================================
+--- stk-4.4.4.orig/Makefile.in
++++ stk-4.4.4/Makefile.in
+@@ -4,27 +4,12 @@ RM = /bin/rm
+
+ all :
+ cd src && $(MAKE)
+- cd projects/demo && $(MAKE) libdemo
+- cd projects/effects && $(MAKE) libeffects
+- cd projects/ragamatic && $(MAKE) libragamat
+- cd projects/eguitar && $(MAKE) libeguitar
+- cd projects/examples && $(MAKE) -f libMakefile
+
+ clean :
+ $(RM) -f *~
+ cd src && $(MAKE) clean
+- cd projects/demo && $(MAKE) clean
+- cd projects/effects && $(MAKE) clean
+- cd projects/ragamatic && $(MAKE) clean
+- cd projects/eguitar && $(MAKE) clean
+- cd projects/examples && $(MAKE) clean
+
+ distclean: clean
+ $(RM) -rf config.log config.status autom4te.cache Makefile
+ cd src && $(MAKE) distclean
+- cd projects/demo && $(MAKE) distclean
+- cd projects/effects && $(MAKE) distclean
+- cd projects/ragamatic && $(MAKE) distclean
+- cd projects/eguitar && $(MAKE) distclean
+- cd projects/examples && $(MAKE) distclean
+
diff --git a/media-libs/stk/files/stk-4.4.4/030_all_sharedlib.patch b/media-libs/stk/files/stk-4.4.4/030_all_sharedlib.patch
new file mode 100644
index 000000000000..726847bc8a10
--- /dev/null
+++ b/media-libs/stk/files/stk-4.4.4/030_all_sharedlib.patch
@@ -0,0 +1,13 @@
+Index: stk-4.4.3/src/Makefile.in
+===================================================================
+--- stk-4.4.3.orig/src/Makefile.in
++++ stk-4.4.3/src/Makefile.in
+@@ -64,7 +64,7 @@ DEFS += -DRAWWAVE_PATH=\"$(RAWWAVES)\
+ %.o : ../src/include/%.cpp
+ $(CC) $(CFLAGS) $(DEFS) -c $(<) -o $(OBJECT_PATH)/$@
+
+-all : $(STATICLIB)
++all : $(STATICLIB) $(SHAREDLIB)
+
+ $(STATICLIB) : $(OBJECTS)
+ $(RM) -f $(STATICLIB)
diff --git a/media-libs/stk/files/stk-4.4.4/040_all_sharedliblink.patch b/media-libs/stk/files/stk-4.4.4/040_all_sharedliblink.patch
new file mode 100644
index 000000000000..6f267b79bd67
--- /dev/null
+++ b/media-libs/stk/files/stk-4.4.4/040_all_sharedliblink.patch
@@ -0,0 +1,13 @@
+Index: stk-4.4.3/src/Makefile.in
+===================================================================
+--- stk-4.4.3.orig/src/Makefile.in
++++ stk-4.4.3/src/Makefile.in
+@@ -74,7 +74,7 @@ $(SHAREDLIB) : $(OBJECTS)
+ $(RM) -f $(@) $(SHAREDLIB).$(MAJOR) $(SHAREDLIB)
+ $(CC) $(LDFLAGS) -fPIC @libflags@ $(OBJECT_PATH)/*.o $(LIBS)
+ $(LN) -s @sharedname@ $(SHAREDLIB)
+-# $(LN) -s @sharedname@ $(SHAREDLIB).$(MAJOR)
++ $(LN) -s @sharedname@ $(SHAREDLIB).$(MAJOR)
+
+ $(OBJECTS) : Stk.h
+
diff --git a/media-libs/stk/files/stk-4.4.4/050_all_cxxflags.patch b/media-libs/stk/files/stk-4.4.4/050_all_cxxflags.patch
new file mode 100644
index 000000000000..d4db1d81c5e3
--- /dev/null
+++ b/media-libs/stk/files/stk-4.4.4/050_all_cxxflags.patch
@@ -0,0 +1,15 @@
+Index: stk-4.4.4/configure.ac
+===================================================================
+--- stk-4.4.4.orig/configure.ac
++++ stk-4.4.4/configure.ac
+@@ -80,8 +80,8 @@ fi
+ CPPFLAGS="$CPPFLAGS $cppflag"
+
+ # For debugging and optimization ... overwrite default because it has both -g and -O2
+-echo "$CXXFLAGS"
+-CXXFLAGS="$cxxflag"
++#echo "$CXXFLAGS"
++#CXXFLAGS="$cxxflag"
+
+ # Check compiler and use -Wall if gnu.
+ if [test $GXX = "yes" ;] then
diff --git a/media-libs/stk/files/stk-4.5.0/010_all_removeForcedFlags.patch b/media-libs/stk/files/stk-4.5.0/010_all_removeForcedFlags.patch
new file mode 100644
index 000000000000..3fcc28fb763c
--- /dev/null
+++ b/media-libs/stk/files/stk-4.5.0/010_all_removeForcedFlags.patch
@@ -0,0 +1,13 @@
+Index: stk-4.4.3/configure.ac
+===================================================================
+--- stk-4.4.3.orig/configure.ac
++++ stk-4.4.3/configure.ac
+@@ -65,7 +65,7 @@ if test "$debug" = "yes"; then
+ else
+ AC_SUBST( debug, [no] )
+ AC_SUBST( cppflag, [] )
+- AC_SUBST( cxxflag, [-O3] )
++ AC_SUBST( cxxflag, [] )
+ AC_SUBST( object_path, [Release] )
+ fi
+ AC_MSG_RESULT($debug)
diff --git a/media-libs/stk/files/stk-4.5.0/020_all_noExamplesOrDemo.patch b/media-libs/stk/files/stk-4.5.0/020_all_noExamplesOrDemo.patch
new file mode 100644
index 000000000000..77d643593b47
--- /dev/null
+++ b/media-libs/stk/files/stk-4.5.0/020_all_noExamplesOrDemo.patch
@@ -0,0 +1,40 @@
+Index: stk-4.5.0/Makefile.in
+===================================================================
+--- stk-4.5.0.orig/Makefile.in
++++ stk-4.5.0/Makefile.in
+@@ -6,35 +6,14 @@ REALTIME = @realtime@
+
+ all :
+ cd src && $(MAKE)
+- cd projects/demo && $(MAKE) libdemo
+-ifeq ($(REALTIME),yes)
+- cd projects/effects && $(MAKE) libeffects
+- cd projects/ragamatic && $(MAKE) libragamat
+- cd projects/eguitar && $(MAKE) libeguitar
+-endif
+- cd projects/examples && $(MAKE) -f libMakefile
+
+ clean :
+ $(RM) -f *~
+ cd src && $(MAKE) clean
+- cd projects/demo && $(MAKE) clean
+-ifeq ($(REALTIME),yes)
+- cd projects/effects && $(MAKE) clean
+- cd projects/ragamatic && $(MAKE) clean
+- cd projects/eguitar && $(MAKE) clean
+-endif
+- cd projects/examples && $(MAKE) clean
+
+ distclean: clean
+ $(RM) -rf config.log config.status autom4te.cache Makefile
+ cd src && $(MAKE) distclean
+- cd projects/demo && $(MAKE) distclean
+-ifeq ($(REALTIME),yes)
+- cd projects/effects && $(MAKE) distclean
+- cd projects/ragamatic && $(MAKE) distclean
+- cd projects/eguitar && $(MAKE) distclean
+-endif
+- cd projects/examples && $(MAKE) distclean
+
+ install:
+ $(MAKE) -C src install
diff --git a/media-libs/stk/files/stk-4.5.0/040_all_sharedliblink.patch b/media-libs/stk/files/stk-4.5.0/040_all_sharedliblink.patch
new file mode 100644
index 000000000000..6f267b79bd67
--- /dev/null
+++ b/media-libs/stk/files/stk-4.5.0/040_all_sharedliblink.patch
@@ -0,0 +1,13 @@
+Index: stk-4.4.3/src/Makefile.in
+===================================================================
+--- stk-4.4.3.orig/src/Makefile.in
++++ stk-4.4.3/src/Makefile.in
+@@ -74,7 +74,7 @@ $(SHAREDLIB) : $(OBJECTS)
+ $(RM) -f $(@) $(SHAREDLIB).$(MAJOR) $(SHAREDLIB)
+ $(CC) $(LDFLAGS) -fPIC @libflags@ $(OBJECT_PATH)/*.o $(LIBS)
+ $(LN) -s @sharedname@ $(SHAREDLIB)
+-# $(LN) -s @sharedname@ $(SHAREDLIB).$(MAJOR)
++ $(LN) -s @sharedname@ $(SHAREDLIB).$(MAJOR)
+
+ $(OBJECTS) : Stk.h
+
diff --git a/media-libs/stk/files/stk-4.5.0/050_all_cxxflags.patch b/media-libs/stk/files/stk-4.5.0/050_all_cxxflags.patch
new file mode 100644
index 000000000000..d2cc4e5be330
--- /dev/null
+++ b/media-libs/stk/files/stk-4.5.0/050_all_cxxflags.patch
@@ -0,0 +1,13 @@
+Index: stk-4.5.0/configure.ac
+===================================================================
+--- stk-4.5.0.orig/configure.ac
++++ stk-4.5.0/configure.ac
+@@ -100,7 +100,7 @@ fi
+ CPPFLAGS="$CPPFLAGS $cppflag"
+
+ # For debugging and optimization ... overwrite default because it has both -g and -O2
+-CXXFLAGS="$cxxflag"
++CXXFLAGS="$CXXFLAGS $cxxflag"
+
+ # Check compiler and use -Wall if gnu.
+ if [test $GXX = "yes" ;] then
diff --git a/media-libs/stk/metadata.xml b/media-libs/stk/metadata.xml
new file mode 100644
index 000000000000..3092d1fc5554
--- /dev/null
+++ b/media-libs/stk/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>proaudio</herd>
+<herd>proxy-maintainers</herd>
+<maintainer>
+ <email>aballier@gentoo.org</email>
+ <name>Alexis Ballier</name>
+</maintainer>
+<maintainer>
+ <email>gimpel@sonnenkinder.org</email>
+ <name>Thomas Kuther</name>
+</maintainer>
+</pkgmetadata>
diff --git a/media-libs/stk/stk-4.4.4-r1.ebuild b/media-libs/stk/stk-4.4.4-r1.ebuild
new file mode 100644
index 000000000000..1d6b77a171ef
--- /dev/null
+++ b/media-libs/stk/stk-4.4.4-r1.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+inherit eutils autotools
+
+DESCRIPTION="Synthesis ToolKit in C++"
+HOMEPAGE="http://ccrma.stanford.edu/software/stk/"
+SRC_URI="http://ccrma.stanford.edu/software/stk/release/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="alsa debug doc jack oss"
+
+RDEPEND="alsa? ( media-libs/alsa-lib )
+ jack? ( media-sound/jack-audio-connection-kit )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ dev-lang/perl"
+
+src_prepare() {
+ EPATCH_SUFFIX="patch" epatch "${FILESDIR}/${P}"
+ eautoreconf
+}
+
+src_configure() {
+ #breaks with --disable-foo...uses as --enable-foo
+ local myconf
+ if use debug; then
+ myconf="${myconf} --enable-debug"
+ fi
+ if use oss; then
+ myconf="${myconf} --with-oss"
+ fi
+ if use alsa; then
+ myconf="${myconf} --with-alsa"
+ fi
+ if use jack; then
+ myconf="${myconf} --with-jack"
+ fi
+
+ econf ${myconf} \
+ RAWWAVE_PATH=/usr/share/stk/rawwaves/
+}
+
+src_install() {
+ dodoc README || die "Failed to install README"
+ # install the lib
+ dolib src/libstk.* || die "Failed to install libstk.*"
+ # install headers
+ insinto /usr/include/stk || die "Failed to create header directory."
+ doins include/*.h include/*.msg include/*.tbl \
+ || die "Failed to install msg, tbl and h files."
+ # install rawwaves
+ insinto /usr/share/stk/rawwaves || die "Failed to create rawwave directory."
+ doins rawwaves/*.raw || die "Failed to install rawwave files."
+ # install docs
+ if use doc; then
+ dohtml -r doc/html/* || die "Failed to install docs."
+ fi
+}
diff --git a/media-libs/stk/stk-4.5.0.ebuild b/media-libs/stk/stk-4.5.0.ebuild
new file mode 100644
index 000000000000..413f11c5f970
--- /dev/null
+++ b/media-libs/stk/stk-4.5.0.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils autotools
+
+DESCRIPTION="Synthesis ToolKit in C++"
+HOMEPAGE="http://ccrma.stanford.edu/software/stk/"
+SRC_URI="http://ccrma.stanford.edu/software/stk/release/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="alsa debug doc jack oss static-libs"
+
+RDEPEND="alsa? ( media-libs/alsa-lib )
+ jack? ( media-sound/jack-audio-connection-kit )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ dev-lang/perl"
+
+src_prepare() {
+ EPATCH_SUFFIX="patch" epatch "${FILESDIR}/${P}"
+ eautoreconf
+}
+
+src_configure() {
+ #breaks with --disable-foo...uses as --enable-foo
+ local myconf
+ if use debug; then
+ myconf="${myconf} --enable-debug"
+ fi
+ if use oss; then
+ myconf="${myconf} --with-oss"
+ fi
+ if use alsa; then
+ myconf="${myconf} --with-alsa"
+ fi
+ if use jack; then
+ myconf="${myconf} --with-jack"
+ fi
+
+ econf ${myconf} \
+ --enable-shared \
+ $(use_enable static-libs static) \
+ RAWWAVE_PATH=/usr/share/stk/rawwaves/
+}
+
+src_install() {
+ dodoc README.md
+
+ # install the lib
+ dolib src/libstk.*
+
+ # install headers
+ insinto /usr/include/stk
+ doins include/*.h include/*.msg include/*.tbl
+
+ # install rawwaves
+ insinto /usr/share/stk/rawwaves
+ doins rawwaves/*.raw
+
+ # install docs
+ if use doc; then
+ dohtml -r doc/html/*
+ fi
+}
diff --git a/media-libs/stops/Manifest b/media-libs/stops/Manifest
new file mode 100644
index 000000000000..140e21d64059
--- /dev/null
+++ b/media-libs/stops/Manifest
@@ -0,0 +1 @@
+DIST stops-0.3.0.tar.bz2 24766 RMD160 8a94129d4a30eb37edc9c099a6fd6ccf0c413f5b SHA1 6b4fa02774c3ea385385f6d8c6d15741a404f734 SHA256 8f3cef486f0bd8dfe02cd12410685f286c6c1e5bd24fa1a8d9e343b0b0264d52
diff --git a/media-libs/stops/metadata.xml b/media-libs/stops/metadata.xml
new file mode 100644
index 000000000000..0dc3775f83d7
--- /dev/null
+++ b/media-libs/stops/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>proaudio</herd>
+</pkgmetadata>
diff --git a/media-libs/stops/stops-0.3.0.ebuild b/media-libs/stops/stops-0.3.0.ebuild
new file mode 100644
index 000000000000..b95853550237
--- /dev/null
+++ b/media-libs/stops/stops-0.3.0.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Organ stops for aeolus by Fons Adriaensen <fons.adriaensen@skynet.be>"
+HOMEPAGE="http://www.kokkinizita.net/linuxaudio/aeolus/index.html"
+SRC_URI="http://users.skynet.be/solaris/linuxaudio/downloads/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+src_install() {
+ insinto /usr/share/${PN}
+ doins -r *.ae0 Aeolus* waves
+}
diff --git a/media-libs/sublib/Manifest b/media-libs/sublib/Manifest
new file mode 100644
index 000000000000..aad1b2acb532
--- /dev/null
+++ b/media-libs/sublib/Manifest
@@ -0,0 +1 @@
+DIST sublib-0.9.zip 255003 SHA256 e3534d88ff347c876ce710e31793d637a0831466fba235179cefaaf1855be62a
diff --git a/media-libs/sublib/metadata.xml b/media-libs/sublib/metadata.xml
new file mode 100644
index 000000000000..1875b60c1e8f
--- /dev/null
+++ b/media-libs/sublib/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>
+ <longdescription lang="en">
+SubLib is a library that eases the development of subtitling applications. It
+supports the most common text-based subtitle formats and allows for subtitle
+editing, conversion and synchronization.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">sublib</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/sublib/sublib-0.9.ebuild b/media-libs/sublib/sublib-0.9.ebuild
new file mode 100644
index 000000000000..949832b2865b
--- /dev/null
+++ b/media-libs/sublib/sublib-0.9.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit mono
+
+DESCRIPTION="Subtitling library that allows for subtitle editing, conversion and synchronization"
+HOMEPAGE="http://sublib.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.zip"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+DEPEND="dev-lang/mono"
+RDEPEND="${DEPEND}
+ app-arch/unzip"
+
+src_install() {
+ einstall || die "einstall failed"
+}
diff --git a/media-libs/suil/Manifest b/media-libs/suil/Manifest
new file mode 100644
index 000000000000..d7389949f73d
--- /dev/null
+++ b/media-libs/suil/Manifest
@@ -0,0 +1,2 @@
+DIST suil-0.8.0.tar.bz2 138127 SHA256 f6d08797d07dd1f7a91f9cd04ac8814575cc4d90ff323972dd03ac1dd55bba78 SHA512 20b87f375b4e066d64f3b950ae8b137a2aa44b13a706c32e60f03e1179a0dac83395e44f0f3bc3e67822eab65c67f3c394caad8bda49048f0f5aa65e39bfd6ec WHIRLPOOL 52baa1496afc57daeb3fa3602bb6a8c5b693f68e258af59c88bc3a5f65cf8849e3146d4bc99e24c8fb78e8d7bc5a0d061ec05f32a9f8351922f5ea799a6405c2
+DIST suil-0.8.2.tar.bz2 141929 SHA256 787608c1e5b1f5051137dbf77c671266088583515af152b77b45e9c3a36f6ae8 SHA512 63141aa61a6501b735f38f597763b7190158db7b5bc06afd8989bddd70372d78de937820fa6751192aefaf415c417387426c1c1bdb666cf231f74a2c4c9f7e91 WHIRLPOOL e4aad86de286c29954aa53402cf7bd5c7d6c91c710b53738679ae361eadfa62c69481cdc94e6a4116a838d49f73bae11a7e849c116d95b5a0f57d9a57fdd5470
diff --git a/media-libs/suil/metadata.xml b/media-libs/suil/metadata.xml
new file mode 100644
index 000000000000..640383e7be81
--- /dev/null
+++ b/media-libs/suil/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>proaudio</herd>
+<longdescription lang="en">
+ Lilv is a library to make the use of LV2 plugins as simple as possible for applications. Lilv is the successor to SLV2, rewritten to be significantly faster and have minimal dependencies.
+</longdescription>
+</pkgmetadata>
diff --git a/media-libs/suil/suil-0.8.0.ebuild b/media-libs/suil/suil-0.8.0.ebuild
new file mode 100644
index 000000000000..ce3325c08f69
--- /dev/null
+++ b/media-libs/suil/suil-0.8.0.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit base waf-utils
+
+DESCRIPTION="Lightweight C library for loading and wrapping LV2 plugin UIs"
+HOMEPAGE="http://drobilla.net/software/suil/"
+SRC_URI="http://download.drobilla.net/${P}.tar.bz2"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc gtk qt4"
+
+RDEPEND="media-libs/lv2
+ gtk? ( x11-libs/gtk+:2 )
+ qt4? ( dev-qt/qtgui:4 )"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )
+ virtual/pkgconfig"
+
+DOCS=( "AUTHORS" "NEWS" "README" )
+
+src_prepare() {
+ sed -i -e 's/^.*run_ldconfig/#\0/' wscript || die
+}
+
+src_configure() {
+ # otherwise automagic
+ use gtk || sed -i -e 's/gtk+-2.0/DiSaBlEd/' wscript
+ use qt4 || sed -i -e 's/QtGui/DiSaBlEd/' wscript
+ waf-utils_src_configure \
+ "--mandir=${EPREFIX}/usr/share/man" \
+ "--docdir=${EPREFIX}/usr/share/doc/${PF}" \
+ $(use doc && echo "--docs")
+}
diff --git a/media-libs/suil/suil-0.8.2.ebuild b/media-libs/suil/suil-0.8.2.ebuild
new file mode 100644
index 000000000000..0a237fda0331
--- /dev/null
+++ b/media-libs/suil/suil-0.8.2.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+PYTHON_REQ_USE='threads(+)'
+
+inherit python-any-r1 waf-utils
+
+DESCRIPTION="Lightweight C library for loading and wrapping LV2 plugin UIs"
+HOMEPAGE="http://drobilla.net/software/suil/"
+SRC_URI="http://download.drobilla.net/${P}.tar.bz2"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc gtk qt4"
+
+RDEPEND="media-libs/lv2
+ gtk? ( x11-libs/gtk+:2 )
+ qt4? ( dev-qt/qtgui:4 )"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )
+ virtual/pkgconfig"
+
+DOCS=( "AUTHORS" "NEWS" "README" )
+
+src_prepare() {
+ sed -i -e 's/^.*run_ldconfig/#\0/' wscript || die
+}
+
+src_configure() {
+ waf-utils_src_configure \
+ "--mandir=${EPREFIX}/usr/share/man" \
+ "--docdir=${EPREFIX}/usr/share/doc/${PF}" \
+ $(use gtk || echo "--no-gtk") \
+ $(use qt4 || echo "--no-qt") \
+ $(use doc && echo "--docs")
+}
diff --git a/media-libs/svgalib/Manifest b/media-libs/svgalib/Manifest
new file mode 100644
index 000000000000..a79e61aa7af1
--- /dev/null
+++ b/media-libs/svgalib/Manifest
@@ -0,0 +1 @@
+DIST svgalib-1.9.25.tar.gz 987084 SHA256 2ad5da713a6bd69622c483de4e4f448ed2b82f7b954db43dc477d5b6b12d8602 SHA512 697e417e6fb4fc3c41f47945a87bd0252f33b565ac1b20d98f984168c6b3ac0f04887e929fbf912ef7bb7b0a3b0a1763cc7cf3e316b62235cc926ca4b1ed96f7 WHIRLPOOL 7956941849ff5d3516681736b224246c11345c6982f074fb58f1145c9c24b9a539334a47d6596bd0c524c0b9d09e0ee713cec0e6d531be9f981c7556cf7615e1
diff --git a/media-libs/svgalib/files/svgalib-1.9.19-pic.patch b/media-libs/svgalib/files/svgalib-1.9.19-pic.patch
new file mode 100644
index 000000000000..b068886cc1d1
--- /dev/null
+++ b/media-libs/svgalib/files/svgalib-1.9.19-pic.patch
@@ -0,0 +1,17 @@
+the -fPIC flag does work for lrmi
+
+http://bugs.gentoo.org/51698
+
+--- svgalib-1.9.19/src/Makefile.jj 2004-09-09 09:08:24.369399280 -0700
++++ svgalib-1.9.19/src/Makefile 2004-09-09 09:08:32.340187536 -0700
+@@ -462,8 +462,8 @@
+ $(CC) $(CFLAGS) $(VGA_DEFINES) -c -o $@ $<
+
+ #lrmi must NOT be compiled as -fPIC
+-lrmi.o: lrmi.c
+- $(CC) $(CFLAGS:-fPIC=) -c -o $@ $<
++#lrmi.o: lrmi.c
++# $(CC) $(CFLAGS:-fPIC=) -c -o $@ $<
+
+ $(RAMDAC): %.o: %.c
+ $(CC) $(CFLAGS) $(RAMDAC_DEFINES) -c -o $@ $<
diff --git a/media-libs/svgalib/files/svgalib-1.9.25-build.patch b/media-libs/svgalib/files/svgalib-1.9.25-build.patch
new file mode 100644
index 000000000000..946b5303663d
--- /dev/null
+++ b/media-libs/svgalib/files/svgalib-1.9.25-build.patch
@@ -0,0 +1,73 @@
+fix up build
+
+dont strip the binary as portage will take care of it
+
+--- svgalib-1.9.25/Makefile.cfg
++++ svgalib-1.9.25/Makefile.cfg
+@@ -44,7 +44,7 @@ CONFDIR = $(SRCDIR)/src/config
+ # Common prefix for installation directories.
+ # NOTE: This directory must exist when you start the install.
+ TOPDIR=
+-prefix = $(TOPDIR)/usr/local
++prefix = $(TOPDIR)/usr
+ exec_prefix = $(prefix)
+
+ # Directory where the shared stubs and static library will be installed.
+@@ -313,14 +313,13 @@
+ WARN = -Wall -Wstrict-prototypes
+ INCLUDES = -I$(srcdir)/include -I.
+ CFLAGS = $(WARN) $(DLLFLAGS) $(INCLUDES) $(OPTIMIZE) $(DEFINES)
+-LDFLAGS = -s
+
+ # additional flags for shared lib.
+ DLLFLAGS = -fPIC -DPIC
+
+ # Utilites used.
+ AR = ar
+-INSTALL_PROGRAM = install -sm755
++INSTALL_PROGRAM = install -m755
+ INSTALL_SCRIPT = install -m755
+ INSTALL_SHLIB = install -m755
+ INSTALL_DATA = install -m644
+--- svgalib-1.9.25/Makefile
++++ svgalib-1.9.25/Makefile
+@@ -99,8 +99,6 @@
+ (cd $(sharedlibdir); \
+ ln -sf $$foo `echo $$foo | sed 's/\.so\..*/.so/'` ); \
+ done
+- @./fixldsoconf
+- -ldconfig
+
+ installstaticlib: static
+ @echo Installing static libraries in $(libdir).
+--- svgalib-1.9.25/gl/Makefile
++++ svgalib-1.9.25/gl/Makefile
+@@ -29,7 +29,7 @@ all: libvgagl.a
+ .PHONY: all clean dep
+
+ libvgagl.so.$(VERSION): $(MODULES)
+- $(CC) -s -shared -Wl,-soname,libvgagl.so.$(MAJOR_VER) -o libvgagl.so.$(VERSION) \
++ $(CC) -shared -Wl,-soname,libvgagl.so.$(MAJOR_VER) -o libvgagl.so.$(VERSION) \
+ $(MODULES)
+
+ libvgagl.a: $(MODULES)
+--- svgalib-1.9.25/threeDKit/Makefile
++++ svgalib-1.9.25/threeDKit/Makefile
+@@ -58,7 +58,6 @@
+ $(sharedlibdir)/lib3dkit.so.$(VERSION): lib3dkit.so.$(VERSION)
+ $(INSTALL_SHLIB) $< $(sharedlibdir)/$<
+ (cd $(sharedlibdir); ln -sf lib3dkit.so.$(VERSION) `echo lib3dkit.so.$(VERSION) | sed 's/\.so\..*/.so/'` )
+- -ldconfig
+
+ install: $(sharedlibdir)/lib3dkit.so.$(VERSION) installheaders
+
+--- svgalib-1.9.25/src/Makefile
++++ svgalib-1.9.25/src/Makefile
+@@ -453,7 +453,6 @@
+
+ $(sharedlibdir)/libvga.so.$(VERSION): libvga.so.$(VERSION)
+ $(INSTALL_SHLIB) $< $(sharedlibdir)/$<
+- -ldconfig
+
+ install: $(sharedlibdir)/libvga.so.$(VERSION)
+
diff --git a/media-libs/svgalib/files/svgalib-1.9.25-build2.patch b/media-libs/svgalib/files/svgalib-1.9.25-build2.patch
new file mode 100644
index 000000000000..a367363f044a
--- /dev/null
+++ b/media-libs/svgalib/files/svgalib-1.9.25-build2.patch
@@ -0,0 +1,14 @@
+--- svgalib-1.9.21/Makefile.makefiles 2005-03-18 14:49:10.000000000 +0100
++++ svgalib-1.9.21/Makefile 2005-07-08 21:16:12.000000000 +0200
+@@ -152,8 +126,10 @@
+ @echo "savetextmode: Script that saves textmode information used by 'textmode'."
+ @$(INSTALL_SCRIPT) utils/savetextmode $(bindir)
+ ifeq ($(LRMI),lrmi)
+- @echo "mode3: Restore textmode by setting VESA mode 3."
++ @echo "mode3: Restore textmode by setting VESA mode 3."
+ @$(INSTALL_PROGRAM) lrmi-0.6m/mode3 $(bindir)
++ @echo "vga_reset: Restore textmode by resetting graphic board."
++ @cp lrmi-0.6m/vga_reset $(bindir)
+ endif
+ @echo "Installing keymap utilities in $(bindir):"
+ @echo "svgakeymap: Perl script that generates scancode conversion maps."
diff --git a/media-libs/svgalib/files/svgalib-1.9.25-glibc210.patch b/media-libs/svgalib/files/svgalib-1.9.25-glibc210.patch
new file mode 100644
index 000000000000..ed80935e955a
--- /dev/null
+++ b/media-libs/svgalib/files/svgalib-1.9.25-glibc210.patch
@@ -0,0 +1,109 @@
+diff -Naur svgalib-1.9.25/utils/gtf/gtfcalc.c svgalib-1.9.25.new/utils/gtf/gtfcalc.c
+--- svgalib-1.9.25/utils/gtf/gtfcalc.c 2005-07-10 15:33:16.000000000 -0400
++++ svgalib-1.9.25.new/utils/gtf/gtfcalc.c 2009-07-09 15:39:08.743610103 -0400
+@@ -64,7 +64,9 @@
+
+ /*-------------------------- Implementation -------------------------------*/
+
+-static double round(double v)
++static double svg_round(double v);
++
++double svg_round(double v)
+ {
+ return floor(v + 0.5);
+ }
+@@ -84,9 +86,9 @@
+ ****************************************************************************/
+ {
+ c->margin = GC.margin;
+- c->cellGran = round(GC.cellGran);
+- c->minPorch = round(GC.minPorch);
+- c->vSyncRqd = round(GC.vSyncRqd);
++ c->cellGran = svg_round(GC.cellGran);
++ c->minPorch = svg_round(GC.minPorch);
++ c->vSyncRqd = svg_round(GC.vSyncRqd);
+ c->hSync = GC.hSync;
+ c->minVSyncBP = GC.minVSyncBP;
+ if (GC.k == 0)
+@@ -140,13 +142,13 @@
+ vFreq = hFreq = dotClock = freq;
+
+ /* Round pixels to character cell granularity */
+- hPixels = round(hPixels / c.cellGran) * c.cellGran;
++ hPixels = svg_round(hPixels / c.cellGran) * c.cellGran;
+
+ /* For interlaced mode halve the vertical parameters, and double
+ * the required field refresh rate.
+ */
+ if (wantInterlace) {
+- vLines = round(vLines / 2);
++ vLines = svg_round(vLines / 2);
+ vFieldRate = vFreq * 2;
+ dotClock = dotClock * 2;
+ interlace = 0.5;
+@@ -158,8 +160,8 @@
+
+ /* Determine the lines for margins */
+ if (wantMargins) {
+- topMarginLines = round(c.margin / 100 * vLines);
+- botMarginLines = round(c.margin / 100 * vLines);
++ topMarginLines = svg_round(c.margin / 100 * vLines);
++ botMarginLines = svg_round(c.margin / 100 * vLines);
+ }
+ else {
+ topMarginLines = 0;
+@@ -173,11 +175,11 @@
+ (vLines + (2*topMarginLines) + c.minPorch + interlace) * 1000000;
+
+ /* Find the number of lines in vSync + back porch */
+- vSyncBP = round(c.minVSyncBP / hPeriodEst);
++ vSyncBP = svg_round(c.minVSyncBP / hPeriodEst);
+ }
+ else if (type == GTF_lockHF) {
+ /* Find the number of lines in vSync + back porch */
+- vSyncBP = round((c.minVSyncBP * hFreq) / 1000);
++ vSyncBP = svg_round((c.minVSyncBP * hFreq) / 1000);
+ }
+
+ /* Find the number of lines in the V back porch alone */
+@@ -205,8 +207,8 @@
+
+ /* Find the number of pixels in the left and right margins */
+ if (wantMargins) {
+- leftMarginPixels = round(hPixels * c.margin) / (100 * c.cellGran);
+- rightMarginPixels = round(hPixels * c.margin) / (100 * c.cellGran);
++ leftMarginPixels = svg_round(hPixels * c.margin) / (100 * c.cellGran);
++ rightMarginPixels = svg_round(hPixels * c.margin) / (100 * c.cellGran);
+ }
+ else {
+ leftMarginPixels = 0;
+@@ -235,17 +237,17 @@
+ }
+
+ /* Find the number of pixels in blanking time */
+- hBlankPixels = round((hTotalActivePixels * idealDutyCycle) /
++ hBlankPixels = svg_round((hTotalActivePixels * idealDutyCycle) /
+ ((100 - idealDutyCycle) * 2 * c.cellGran)) * (2 * c.cellGran);
+
+ /* Find the total number of pixels */
+ hTotalPixels = hTotalActivePixels + hBlankPixels;
+
+ /* Find the horizontal back porch */
+- hBackPorch = round((hBlankPixels / 2) / c.cellGran) * c.cellGran;
++ hBackPorch = svg_round((hBlankPixels / 2) / c.cellGran) * c.cellGran;
+
+ /* Find the horizontal sync width */
+- hSyncWidth = round(((c.hSync/100) * hTotalPixels) / c.cellGran) * c.cellGran;
++ hSyncWidth = svg_round(((c.hSync/100) * hTotalPixels) / c.cellGran) * c.cellGran;
+
+ /* Find the horizontal sync + back porch */
+ hSyncBP = hBackPorch + hSyncWidth;
+@@ -258,7 +260,7 @@
+ hPeriod = 1000 / hFreq;
+
+ /* Find the number of lines in vSync + back porch */
+- vSyncBP = round((c.minVSyncBP * hFreq) / 1000);
++ vSyncBP = svg_round((c.minVSyncBP * hFreq) / 1000);
+
+ /* Find the number of lines in the V back porch alone */
+ vBackPorch = vSyncBP - c.vSyncRqd;
diff --git a/media-libs/svgalib/files/svgalib-1.9.25-kernel3.4.patch b/media-libs/svgalib/files/svgalib-1.9.25-kernel3.4.patch
new file mode 100644
index 000000000000..5e2d1e527cbb
--- /dev/null
+++ b/media-libs/svgalib/files/svgalib-1.9.25-kernel3.4.patch
@@ -0,0 +1,29 @@
+diff -Naur svgalib-1.9.25/kernel/svgalib_helper/main.c svgalib-1.9.25_new/kernel/svgalib_helper/main.c
+--- svgalib-1.9.25/kernel/svgalib_helper/main.c 2006-01-12 18:17:53.000000000 +0000
++++ svgalib-1.9.25_new/kernel/svgalib_helper/main.c 2012-06-25 15:02:11.000000000 +0100
+@@ -33,7 +33,9 @@
+
+ #include <asm/processor.h>
+ #include <asm/uaccess.h>
+-#include <asm/system.h> /* cli(), *_flags */
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)
++ #include <asm/system.h> /* cli(), *_flags */
++#endif
+ #include <asm/segment.h> /* memcpy and such */
+ #include <asm/io.h>
+ #include <asm/pgtable.h>
+diff -Naur svgalib-1.9.25/kernel/svgalib_helper/Makefile svgalib-1.9.25_new/kernel/svgalib_helper/Makefile
+--- svgalib-1.9.25/kernel/svgalib_helper/Makefile 2006-05-20 13:31:04.000000000 +0100
++++ svgalib-1.9.25_new/kernel/svgalib_helper/Makefile 2012-06-25 13:39:38.000000000 +0100
+@@ -11,9 +11,11 @@
+ PWD := $(shell pwd)
+ TARGET := svgalib_helper
+
++ ifneq ($(TOPDIR),)
+ ifeq ($(PATCHLEVEL),4)
+ include $(TOPDIR)/Rules.make
+ endif
++ endif
+
+ else
+ \ No newline at end of file
diff --git a/media-libs/svgalib/files/svgalib-1.9.25-linux2.6.28.patch b/media-libs/svgalib/files/svgalib-1.9.25-linux2.6.28.patch
new file mode 100755
index 000000000000..7742110da429
--- /dev/null
+++ b/media-libs/svgalib/files/svgalib-1.9.25-linux2.6.28.patch
@@ -0,0 +1,30 @@
+--- svgalib-1.9.25-original/kernel/svgalib_helper/kernel26compat.h 2008-12-26 15:52:24.000000000 +0100
++++ svgalib-1.9.25/kernel/svgalib_helper/kernel26compat.h 2008-12-26 16:48:46.000000000 +0100
+@@ -128,7 +128,7 @@
+ MKDEV(SVGALIB_HELPER_MAJOR, _minor), \
+ _name);
+ /* 2.6.27 changed device_create to device_create_drvdata */
+-#else
++#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
+ # define SLH_SYSFS_ADD_CONTROL \
+ device_create_drvdata(svgalib_helper_class, NULL, \
+ MKDEV(SVGALIB_HELPER_MAJOR, 0), \
+@@ -139,6 +139,18 @@
+ &sh_pci_devs[_minor]->dev->dev, \
+ MKDEV(SVGALIB_HELPER_MAJOR, _minor), \
+ "%s%d", _name, _minor);
++/* 2.6.28 changed device_create_drvdata back to device_create */
++#else
++# define SLH_SYSFS_ADD_CONTROL \
++ device_create(svgalib_helper_class, NULL, \
++ MKDEV(SVGALIB_HELPER_MAJOR, 0), NULL, \
++ "%s%d", "svga", 0);
++
++# define SLH_SYSFS_ADD_DEVICE(_name, _minor) \
++ device_create(svgalib_helper_class, \
++ &sh_pci_devs[_minor]->dev->dev, \
++ MKDEV(SVGALIB_HELPER_MAJOR, _minor), NULL, \
++ "%s%d", _name, _minor);
+ #endif
+
+ # define SLH_SYSFS_REMOVE_DEVICE(i) \
diff --git a/media-libs/svgalib/files/svgalib-1.9.25-linux2.6.36-r1.patch b/media-libs/svgalib/files/svgalib-1.9.25-linux2.6.36-r1.patch
new file mode 100644
index 000000000000..ad8d94cb8702
--- /dev/null
+++ b/media-libs/svgalib/files/svgalib-1.9.25-linux2.6.36-r1.patch
@@ -0,0 +1,32 @@
+--- svgalib-1.9.25.orig/kernel/svgalib_helper/main.c
++++ svgalib-1.9.25/kernel/svgalib_helper/main.c
+@@ -162,10 +162,16 @@ static void task_startad(void *data) {
+ get_user(pciv.address, &user_pciv->address); \
+ get_user(pciv.val, &user_pciv->val);
+ #define PUT_PCIV \
+- put_user(pciv.val, &user_pciv->val);
++ put_user(pciv.val, &user_pciv->val);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)
+ static int svgalib_helper_ioctl( struct inode *inode, struct file *filp,
+ unsigned int cmd, unsigned long arg) {
++#else
++static int svgalib_helper_ioctl(struct file *filp,
++ unsigned int cmd, unsigned long arg) {
++ struct inode *inode=filp->f_dentry->d_inode;
++#endif
+
+ io_t iov, *user_iov=(io_t *)arg;
+ pcic_t pciv, *user_pciv=(pcic_t *)arg;
+ int minor = my_minor(inode->i_rdev);
+@@ -595,7 +601,11 @@ struct file_operations svgalib_helper_fo
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,0)
+ .owner = THIS_MODULE,
+ #endif
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)
+ .ioctl = svgalib_helper_ioctl,
++#else
++ .unlocked_ioctl = svgalib_helper_ioctl,
++#endif
+ .mmap = svgalib_helper_mmap,
+ .open = svgalib_helper_open,
+ .release = svgalib_helper_release,
diff --git a/media-libs/svgalib/files/svgalib-1.9.25-linux2.6.patch b/media-libs/svgalib/files/svgalib-1.9.25-linux2.6.patch
new file mode 100644
index 000000000000..20ab1fe1ed16
--- /dev/null
+++ b/media-libs/svgalib/files/svgalib-1.9.25-linux2.6.patch
@@ -0,0 +1,289 @@
+ - get rid of warning when linux/device.h doesnt exist
+ - touch up the Makefile to let the ebuild handle the module details
+ - fix support with io remap stuff in newer kernels
+ - dont include headers that dont exist in 2.4.x kernels
+ - use module_param() for 2.6.x and MODULE_PARM() for all others
+ - dont declare all_devices as static since it is exported
+ - dont include <linux/config.h> as the build system does it for us
+ - in lrmi, map old flag names to new names for versions >= 2.6.26
+
+--- svgalib/kernel/svgalib_helper/Makefile
++++ svgalib/kernel/svgalib_helper/Makefile
+@@ -25,7 +25,7 @@
+ endif
+
+
+-CLASS_SIMPLE := $(shell grep class_simple_create $(KDIR)/include/linux/device.h)
++CLASS_SIMPLE := $(shell grep -s class_simple_create $(KDIR)/include/linux/device.h)
+
+ ifneq ($(CLASS_SIMPLE),)
+ CLASS_CFLAGS = -DCLASS_SIMPLE=1
+--- svgalib/kernel/svgalib_helper/Makefile.alt
++++ svgalib/kernel/svgalib_helper/Makefile.alt
+@@ -37,7 +37,7 @@
+ CFLAGS += -DSVGALIB_HELPER_MAJOR=$(SVGALIB_HELPER_MAJOR)
+
+ ifeq (1,$(findstring 1,$(MODVER)))
+- CFLAGS += -DMODVERSIONS -include $(INCLUDEDIR)/linux/modversions.h
++ CFLAGS += -DMODVERSIONS -DCONFIG_MODVERSIONS=1
+ endif
+
+ TARGET = svgalib_helper
+@@ -50,7 +50,8 @@
+ endif
+ endif
+
+-all: .depend $(OBJS)
++modules: $(OBJS)
++all: .depend modules
+
+ $(TARGET).o: $(SRC:.c=.o)
+ $(LD) -r $^ -o $@
+@@ -61,8 +62,8 @@
+ install: device modules_install
+
+ modules_install: $(OBJS)
+- mkdir -p /lib/modules/$(VER)/kernel/misc
+- install -m 0644 -c $(OBJS) /lib/modules/$(VER)/kernel/misc
++ mkdir -p $(TOPDIR)/lib/modules/$(VER)/kernel/misc
++ install -m 0644 -c $(OBJS) $(TOPDIR)/lib/modules/$(VER)/kernel/misc
+
+ device:
+ rm -f /dev/svgalib_helper* /dev/svga_helper* /dev/svga /dev/svga?
+--- svgalib/kernel/svgalib_helper/kernel26compat.h
++++ svgalib/kernel/svgalib_helper/kernel26compat.h
+@@ -10,7 +10,7 @@
+ # define PCI_GET_CLASS pci_find_class
+ # define PCI_GET_DEVICE pci_find_device
+
+-# if defined (PG_chainlock)
++# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,3)
+ # define my_io_remap_page_range(vma, start, ofs, len, prot) \
+ io_remap_page_range(vma,start,ofs,len,prot)
+ # else
+@@ -70,6 +70,7 @@
+
+ /* These are also not present in 2.6 kernels ... */
+ #if (!defined _LINUX_DEVFS_FS_KERNEL_H) || (defined KERNEL_2_6)
++#include <linux/fs.h>
+ static inline int devfs_register_chrdev (unsigned int major, const char *name,
+ struct file_operations *fops)
+ {
+@@ -77,7 +78,12 @@
+ }
+ static inline int devfs_unregister_chrdev (unsigned int major,const char *name)
+ {
+- return unregister_chrdev (major, name);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
++ return unregister_chrdev (major, name);
++#else
++ unregister_chrdev (major, name);
++ return 0;
++#endif
+ }
+ #endif
+
+@@ -99,7 +105,8 @@
+ class_device_create(svgalib_helper_class, \
+ MKDEV(SVGALIB_HELPER_MAJOR, _minor), \
+ &sh_pci_devs[_minor]->dev->dev, _name);
+-#else /* 2.6.15 changed class_device_create */
++/* 2.6.15 changed class_device_create */
++#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26)
+ # define SLH_SYSFS_ADD_CONTROL \
+ class_device_create(svgalib_helper_class, NULL, \
+ MKDEV(SVGALIB_HELPER_MAJOR, 0), \
+@@ -109,7 +116,30 @@
+ class_device_create(svgalib_helper_class, NULL, \
+ MKDEV(SVGALIB_HELPER_MAJOR, _minor), \
+ &sh_pci_devs[_minor]->dev->dev, _name);
+-#endif /* 2.6.15 */
++/* 2.6.26 changed class_device_create to device_create */
++#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
++# define SLH_SYSFS_ADD_CONTROL \
++ device_create(svgalib_helper_class, NULL, \
++ MKDEV(SVGALIB_HELPER_MAJOR, 0), \
++ "svga");
++
++# define SLH_SYSFS_ADD_DEVICE(_name, _minor) \
++ device_create(svgalib_helper_class, &sh_pci_devs[_minor]->dev->dev, \
++ MKDEV(SVGALIB_HELPER_MAJOR, _minor), \
++ _name);
++/* 2.6.27 changed device_create to device_create_drvdata */
++#else
++# define SLH_SYSFS_ADD_CONTROL \
++ device_create_drvdata(svgalib_helper_class, NULL, \
++ MKDEV(SVGALIB_HELPER_MAJOR, 0), \
++ "%s%d", "svga", 0);
++
++# define SLH_SYSFS_ADD_DEVICE(_name, _minor) \
++ device_create_drvdata(svgalib_helper_class, \
++ &sh_pci_devs[_minor]->dev->dev, \
++ MKDEV(SVGALIB_HELPER_MAJOR, _minor), \
++ "%s%d", _name, _minor);
++#endif
+
+ # define SLH_SYSFS_REMOVE_DEVICE(i) \
+ class_destroy(svgalib_helper_class);
+@@ -161,3 +191,7 @@
+ #ifndef PCI_VENDOR_ID_RENDITION
+ #define PCI_VENDOR_ID_RENDITION 0x1163
+ #endif
++
++#ifndef IRQF_SHARED
++# define IRQF_SHARED SA_SHIRQ
++#endif
+--- svgalib/kernel/svgalib_helper/main.c
++++ svgalib/kernel/svgalib_helper/main.c
+@@ -1,5 +1,3 @@
+-#include <linux/config.h>
+-
+ #if defined (CONFIG_MODVERSIONS) && !defined (MODVERSIONS)
+ # define MODVERSIONS
+ #endif
+@@ -17,15 +15,22 @@
+ #include <linux/ioport.h>
+ #include <linux/interrupt.h>
+ #include <linux/pci.h>
++#include <linux/version.h>
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
+ #include <linux/devfs_fs_kernel.h>
++#endif
+ #include <linux/mm.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+ #include <linux/thread_info.h>
++#endif
+ #include <linux/smp.h>
+ #include <linux/smp_lock.h>
+
+ #include <linux/sched.h>
+ #include <linux/wait.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+ #include <linux/syscalls.h>
++#endif
+
+ #define __KERNEL_SYSCALLS__
+ #include <linux/unistd.h>
+@@ -50,7 +55,7 @@
+ #include "displaystart.h"
+
+ int debug=0;
+-static int all_devices=0;
++int all_devices=0;
+ int num_devices=0;
+
+ static char *sdev_id="svgalib_helper";
+@@ -98,7 +103,11 @@
+ static volatile int vsync=0;
+ static wait_queue_head_t vsync_wait;
+
+-static irqreturn_t vsync_interrupt(int irq, void *dev_id, struct pt_regs *regs)
++static irqreturn_t vsync_interrupt(int irq, void *dev_id
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
++, struct pt_regs *regs
++#endif
++)
+ {
+ struct sh_pci_device *dev = (struct sh_pci_device *)dev_id;
+
+@@ -355,7 +364,7 @@
+ vsync=1;
+ i=0;
+ while(irqs[i]!=-1)
+- request_irq(irqs[i++], vsync_interrupt, SA_SHIRQ, "svgalib_helper", sdev_id);
++ request_irq(irqs[i++], vsync_interrupt, IRQF_SHARED, "svgalib_helper", sdev_id);
+ vga_enable_vsync((void *)sdev_id);
+ wait_event_interruptible(vsync_wait, !vsync);
+ i=0;
+@@ -443,7 +452,7 @@
+ int i=sh_pci_devs[minor]->dev->irq;
+ sh_pci_devs[minor]->opencount++;
+ if(sh_pci_devs[minor]->opencount==1 && i!=0 && i!=-1 && i!=255)
+- request_irq(i, vsync_interrupt, SA_SHIRQ, "svgalib_helper", sh_pci_devs[minor]);
++ request_irq(i, vsync_interrupt, IRQF_SHARED, "svgalib_helper", sh_pci_devs[minor]);
+ }
+
+ #ifndef KERNEL_2_6
+@@ -763,10 +772,15 @@
+
+ }
+
++#ifdef KERNEL_2_6
++module_param(debug, int, 0);
++module_param(all_devices, int, 0);
++#else
+ MODULE_PARM(debug, "i");
+-MODULE_PARM_DESC(debug, "Debug output level.");
+-
+ MODULE_PARM(all_devices, "i");
++#endif
++
++MODULE_PARM_DESC(debug, "Debug output level.");
+ MODULE_PARM_DESC(all_devices, "Give access to all PCI devices, regardless of class.");
+
+
+--- svgalib/src/lrmi.6.c
++++ svgalib/src/lrmi.6.c
+@@ -169,6 +169,13 @@
+ }
+ }
+
++#ifndef TF_MASK
++#define TF_MASK X86_EFLAGS_TF
++#define IF_MASK X86_EFLAGS_IF
++#define IOPL_MASK X86_EFLAGS_IOPL
++#define VIF_MASK X86_EFLAGS_VIF
++#define VIP_MASK X86_EFLAGS_VIP
++#endif
+
+ #define DEFAULT_VM86_FLAGS (IF_MASK | IOPL_MASK)
+ #define DEFAULT_STACK_SIZE 0x1000
+--- svgalib/src/lrmi.9.c
++++ svgalib/src/lrmi.9.c
+@@ -206,6 +206,13 @@
+
+
+ #if defined(__linux__)
++#ifndef TF_MASK
++#define TF_MASK X86_EFLAGS_TF
++#define IF_MASK X86_EFLAGS_IF
++#define IOPL_MASK X86_EFLAGS_IOPL
++#define VIF_MASK X86_EFLAGS_VIF
++#define VIP_MASK X86_EFLAGS_VIP
++#endif
+ #define DEFAULT_VM86_FLAGS (IF_MASK | IOPL_MASK)
+ #elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+ #define DEFAULT_VM86_FLAGS (PSL_I | PSL_IOPL)
+--- svgalib/lrmi-0.6m/lrmi.c
++++ svgalib/lrmi-0.6m/lrmi.c
+@@ -170,6 +170,14 @@
+ }
+
+
++#ifndef TF_MASK
++#define TF_MASK X86_EFLAGS_TF
++#define IF_MASK X86_EFLAGS_IF
++#define IOPL_MASK X86_EFLAGS_IOPL
++#define VIF_MASK X86_EFLAGS_VIF
++#define VIP_MASK X86_EFLAGS_VIP
++#endif
++
+ #define DEFAULT_VM86_FLAGS (IF_MASK | IOPL_MASK)
+ #define DEFAULT_STACK_SIZE 0x1000
+ #define RETURN_TO_32_INT 255
+--- svgalib/lrmi-0.9/lrmi.c
++++ svgalib/lrmi-0.9/lrmi.c
+@@ -203,6 +203,13 @@
+
+
+ #if defined(__linux__)
++#ifndef TF_MASK
++#define TF_MASK X86_EFLAGS_TF
++#define IF_MASK X86_EFLAGS_IF
++#define IOPL_MASK X86_EFLAGS_IOPL
++#define VIF_MASK X86_EFLAGS_VIF
++#define VIP_MASK X86_EFLAGS_VIP
++#endif
+ #define DEFAULT_VM86_FLAGS (IF_MASK | IOPL_MASK)
+ #elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+ #define DEFAULT_VM86_FLAGS (PSL_I | PSL_IOPL)
diff --git a/media-libs/svgalib/files/svgalib-1.9.25-qa.patch b/media-libs/svgalib/files/svgalib-1.9.25-qa.patch
new file mode 100644
index 000000000000..5f6f5a2c3aa7
--- /dev/null
+++ b/media-libs/svgalib/files/svgalib-1.9.25-qa.patch
@@ -0,0 +1,33 @@
+diff -Naur svgalib-1.9.25.orig/demos/bg_test.c svgalib-1.9.25/demos/bg_test.c
+--- svgalib-1.9.25.orig/demos/bg_test.c 2005-07-16 23:59:22.000000000 +0400
++++ svgalib-1.9.25/demos/bg_test.c 2012-06-09 20:28:24.698448313 +0400
+@@ -9,6 +9,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>
++#include <string.h>
+ #include <strings.h>
+ #include <vga.h>
+ #include <vgagl.h>
+diff -Naur svgalib-1.9.25.orig/demos/eventtest.c svgalib-1.9.25/demos/eventtest.c
+--- svgalib-1.9.25.orig/demos/eventtest.c 2012-06-09 20:26:47.000000000 +0400
++++ svgalib-1.9.25/demos/eventtest.c 2012-06-09 20:26:53.464932538 +0400
+@@ -5,6 +5,7 @@
+ #include <unistd.h>
+ #include <sys/time.h>
+ #include <sys/types.h>
++#include <time.h>
+ #include <vga.h>
+ #include <vgagl.h>
+ #include <vgamouse.h>
+diff -Naur svgalib-1.9.25.orig/demos/vgatweak.c svgalib-1.9.25/demos/vgatweak.c
+--- svgalib-1.9.25.orig/demos/vgatweak.c 2000-08-06 14:20:02.000000000 +0400
++++ svgalib-1.9.25/demos/vgatweak.c 2012-06-09 20:29:51.108801463 +0400
+@@ -4,6 +4,7 @@
+
+ #include <stdio.h>
+ #include <unistd.h> /* for usleep( long ) */
++#include <stdlib.h>
+ #include <string.h>
+ #include "vga.h"
+
diff --git a/media-libs/svgalib/files/svgalib-1.9.25-segfault.patch b/media-libs/svgalib/files/svgalib-1.9.25-segfault.patch
new file mode 100644
index 000000000000..da7c1c21c646
--- /dev/null
+++ b/media-libs/svgalib/files/svgalib-1.9.25-segfault.patch
@@ -0,0 +1,11 @@
+--- svgalib-1.9.25/src/vgamodesel.c~
++++ svgalib-1.9.25/src/vgamodesel.c
+@@ -35,7 +35,7 @@ int __svgalib_name2number(char *m)
+ int vga_getmodenumber(char *m)
+ {
+ int i;
+- char s[3];
++ char s[8];
+
+ __svgalib_getchipset(); /* Do initialisation first */
+ i = __svgalib_name2number(m);
diff --git a/media-libs/svgalib/files/svgalib.udev.rules.d.2 b/media-libs/svgalib/files/svgalib.udev.rules.d.2
new file mode 100644
index 000000000000..368a3219a134
--- /dev/null
+++ b/media-libs/svgalib/files/svgalib.udev.rules.d.2
@@ -0,0 +1 @@
+KERNEL=="svga*", MODE="0660", GROUP="video"
diff --git a/media-libs/svgalib/metadata.xml b/media-libs/svgalib/metadata.xml
new file mode 100644
index 000000000000..88cb7d32c603
--- /dev/null
+++ b/media-libs/svgalib/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>bircoph@gentoo.org</email>
+ <name>Andrew Savchenko</name>
+</maintainer>
+<use>
+ <flag name="kernel-helper">Build the helper kernel module</flag>
+</use>
+</pkgmetadata>
diff --git a/media-libs/svgalib/svgalib-1.9.25-r4.ebuild b/media-libs/svgalib/svgalib-1.9.25-r4.ebuild
new file mode 100644
index 000000000000..2f7f0b82733f
--- /dev/null
+++ b/media-libs/svgalib/svgalib-1.9.25-r4.ebuild
@@ -0,0 +1,129 @@
+# 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 linux-mod
+
+DESCRIPTION="A library for running svga graphics on the console"
+HOMEPAGE="http://www.svgalib.org/"
+SRC_URI="http://www.arava.co.il/matan/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="-* x86"
+IUSE="build +kernel-helper"
+
+DEPEND=""
+RDEPEND=""
+
+MODULE_NAMES="svgalib_helper(misc:${S}/kernel/svgalib_helper)"
+BUILD_TARGETS="default"
+
+pkg_setup() {
+ linux-mod_pkg_setup
+ BUILD_PARAMS="KDIR=${KV_OUT_DIR}"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.9.25-linux2.6.patch
+ epatch "${FILESDIR}"/${PN}-1.9.19-pic.patch #51698
+ epatch "${FILESDIR}"/${PN}-1.9.25-build.patch
+ epatch "${FILESDIR}"/${PN}-1.9.25-linux2.6.28.patch
+ epatch "${FILESDIR}"/${PN}-1.9.25-glibc210.patch #274305
+ epatch "${FILESDIR}"/${PN}-1.9.25-linux2.6.36-r1.patch
+ epatch "${FILESDIR}"/${PN}-1.9.25-segfault.patch
+ epatch "${FILESDIR}"/${PN}-1.9.25-build2.patch
+ epatch "${FILESDIR}"/${PN}-1.9.25-qa.patch
+ epatch "${FILESDIR}"/${PN}-1.9.25-kernel3.4.patch
+ sed -i -e '/linux\/smp_lock.h/d' kernel/svgalib_helper/main.c || die
+}
+
+src_compile() {
+ use kernel-helper || export NO_HELPER=y
+
+ export CC=$(tc-getCC)
+
+ # First build static
+ emake OPTIMIZE="${CFLAGS}" static || die "Failed to build static libraries!"
+ # Then build shared ...
+ emake OPTIMIZE="${CFLAGS}" shared || die "Failed to build shared libraries!"
+ # Missing in some cases ...
+ ln -s libvga.so.${PV} sharedlib/libvga.so
+ # Build lrmi and tools ...
+ emake OPTIMIZE="${CFLAGS}" LDFLAGS+=" -L../sharedlib" \
+ textutils lrmi utils \
+ || die "Failed to build libraries and utils!"
+ # Build the gl stuff tpp
+ emake OPTIMIZE="${CFLAGS}" -C gl || die "Failed to build gl!"
+ emake OPTIMIZE="${CFLAGS}" -C gl libvgagl.so.${PV} \
+ || die "Failed to build libvgagl.so.${PV}!"
+ # Missing in some cases ...
+ ln -s libvgagl.so.${PV} sharedlib/libvgagl.so
+ emake OPTIMIZE="${CFLAGS}" -C src libvga.so.${PV} \
+ || die "Failed to build libvga.so.${PV}!"
+ cp -pPR src/libvga.so.${PV} sharedlib/
+ # Build threeDKit ...
+ emake OPTIMIZE="${CFLAGS}" LDFLAGS+=" -L../sharedlib" \
+ -C threeDKit lib3dkit.a || die "Failed to build threeDKit!"
+ # Build demo's ...
+ emake OPTIMIZE="${CFLAGS} -I../gl" LDFLAGS+=" -L../sharedlib" \
+ demoprogs || die "Failed to build demoprogs!"
+
+ ! use build && use kernel-helper && linux-mod_src_compile
+}
+
+src_install() {
+ local x=
+
+ dodir /etc/svgalib /usr/{include,lib,bin,share/man}
+
+ emake \
+ TOPDIR="${D}" OPTIMIZE="${CFLAGS}" INSTALLMODULE="" \
+ install || die "Failed to install svgalib!"
+ ! use build && use kernel-helper && linux-mod_src_install
+
+ insinto /usr/include
+ doins gl/vgagl.h
+ dolib.a staticlib/libvga.a || die "dolib.a libvga"
+ dolib.a gl/libvgagl.a || die "dolib.a libvgagl"
+ dolib.a threeDKit/lib3dkit.a
+ dolib.so gl/libvgagl.so.${PV} || die "dolib.so libvgagl.so"
+ local abiver=$(sed -n '/^MAJOR_VER.*=/{s:.*=[ ]*::;p}' Makefile.cfg)
+ for x in lib3dkit libvga libvgagl ; do
+ dosym ${x}.so.${PV} /usr/lib/${x}.so
+ dosym ${x}.so.${PV} /usr/lib/${x}.so.${abiver}
+ done
+
+ insinto /usr/include
+ doins src/vga.h gl/vgagl.h src/mouse/vgamouse.h src/joystick/vgajoystick.h
+ doins src/keyboard/vgakeyboard.h kernel/svgalib_helper/svgalib_helper.h
+
+ insinto /lib/udev/rules.d
+ newins "${FILESDIR}"/svgalib.udev.rules.d.2 30-svgalib.rules
+
+ exeinto /usr/lib/svgalib/demos
+ for x in "${S}"/demos/* ; do
+ [[ -x ${x} ]] && doexe ${x}
+ done
+
+ cd "${S}"/threeDKit
+ exeinto /usr/lib/svgalib/threeDKit
+ local THREED_PROGS="plane wrapdemo"
+ doexe ${THREED_PROGS}
+
+ cd "${S}"
+ dodoc 0-README
+ cd "${S}"/doc
+ dodoc CHANGES DESIGN TODO
+ docinto txt
+ dodoc Driver-programming-HOWTO add_driver svgalib.lsm \
+ README.{joystick,keymap,multi-monitor,patching,vesa}
+ # avoid installation of a broken symlink
+ newdoc ../lrmi-0.6m/README README.lrmi
+}
+
+pkg_postinst() {
+ ! use build && use kernel-helper && linux-mod_pkg_postinst
+}
diff --git a/media-libs/t1lib/Manifest b/media-libs/t1lib/Manifest
new file mode 100644
index 000000000000..42e318bd3d66
--- /dev/null
+++ b/media-libs/t1lib/Manifest
@@ -0,0 +1 @@
+DIST t1lib-5.1.2.tar.gz 1872534 SHA256 821328b5054f7890a0d0cd2f52825270705df3641dbd476d58d17e56ed957b59 SHA512 9f424b19c6f35cc4f194ff7351a4c2352216462c7d1b1d9650ad3a05cf48c6e90c89ccbcda5ecc47a4169a39a850cf84a1fcbf88b3b15614860c27364b631ae3 WHIRLPOOL cc819ac6bbef0d961e1d24d29e4fc748b1a9b9549f8409098ab7b01d0a8613b409fc833a5cfe13596e18faac98cb9f1cdc823581442c1d587a1b723aa96d9050
diff --git a/media-libs/t1lib/files/t1lib-5.1.1-parallel.patch b/media-libs/t1lib/files/t1lib-5.1.1-parallel.patch
new file mode 100644
index 000000000000..d829c9ff1756
--- /dev/null
+++ b/media-libs/t1lib/files/t1lib-5.1.1-parallel.patch
@@ -0,0 +1,12 @@
+diff -Naur t1lib-5.1.1-orig/lib/Makefile.in t1lib-5.1.1/lib/Makefile.in
+--- t1lib-5.1.1-orig/lib/Makefile.in 2006-11-05 17:06:05.000000000 -0600
++++ t1lib-5.1.1/lib/Makefile.in 2007-10-04 21:21:20.000000000 -0600
+@@ -133,7 +133,7 @@
+ cp t1lib/t1lib.h .
+
+
+-libt1x.la: $(T1LIBX_OBJS)
++libt1x.la: $(T1LIBX_OBJS) libt1.la
+ $(LIBTOOL) --mode=link \
+ $(CC) $(LDFLAGS) -o $@ $(T1LIBX_OBJS) \
+ -version-info @T1LIB_LT_CURRENT@:@T1LIB_LT_REVISION@:@T1LIB_LT_AGE@ \
diff --git a/media-libs/t1lib/files/t1lib-do-not-install-t1lib_doc.patch b/media-libs/t1lib/files/t1lib-do-not-install-t1lib_doc.patch
new file mode 100644
index 000000000000..e8dc5585e23a
--- /dev/null
+++ b/media-libs/t1lib/files/t1lib-do-not-install-t1lib_doc.patch
@@ -0,0 +1,19 @@
+--- doc/Makefile.in.orig 2008-05-04 17:55:52.000000000 +0400
++++ doc/Makefile.in 2008-05-04 17:55:58.000000000 +0400
+@@ -89,16 +89,6 @@
+
+
+ install: dummy
+- if (test -f t1lib_doc.ps) \
+- then \
+- $(MKINSTALLDIRS) $(DESTDIR)@T1LIB_DATA_DIR@/doc; \
+- $(INSTALL_DATA) t1lib_doc.ps $(DESTDIR)@T1LIB_DATA_DIR@/doc; \
+- fi;
+- if (test -f t1lib_doc.pdf) \
+- then \
+- $(MKINSTALLDIRS) $(DESTDIR)@T1LIB_DATA_DIR@/doc; \
+- $(INSTALL_DATA) t1lib_doc.pdf $(DESTDIR)@T1LIB_DATA_DIR@/doc; \
+- fi;
+
+
+ uninstall: dummy
diff --git a/media-libs/t1lib/metadata.xml b/media-libs/t1lib/metadata.xml
new file mode 100644
index 000000000000..696065edd338
--- /dev/null
+++ b/media-libs/t1lib/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>fonts</herd>
+</pkgmetadata>
diff --git a/media-libs/t1lib/t1lib-5.1.2.ebuild b/media-libs/t1lib/t1lib-5.1.2.ebuild
new file mode 100644
index 000000000000..8e0b0f63ca81
--- /dev/null
+++ b/media-libs/t1lib/t1lib-5.1.2.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils flag-o-matic libtool toolchain-funcs
+
+DESCRIPTION="A Type 1 Font Rasterizer Library for UNIX/X11"
+HOMEPAGE="ftp://metalab.unc.edu/pub/Linux/libs/graphics/"
+SRC_URI="ftp://sunsite.unc.edu/pub/Linux/libs/graphics/${P}.tar.gz"
+
+LICENSE="LGPL-2 GPL-2"
+SLOT="5"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="X doc static-libs"
+
+RDEPEND="X? (
+ x11-libs/libXaw
+ x11-libs/libX11
+ x11-libs/libXt
+ )"
+DEPEND="${RDEPEND}
+ doc? ( virtual/latex-base )
+ X? (
+ x11-libs/libXfont
+ x11-proto/xproto
+ x11-proto/fontsproto
+ )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-5.1.1-parallel.patch
+ epatch "${FILESDIR}"/${PN}-do-not-install-t1lib_doc.patch
+
+ sed -i -e "s:dvips:#dvips:" "${S}"/doc/Makefile.in
+ sed -i -e "s:\./\(t1lib\.config\):/etc/t1lib/\1:" "${S}"/xglyph/xglyph.c
+ # Needed for sane .so versionning on fbsd. Please don't drop.
+ elibtoolize
+}
+
+src_configure() {
+ econf \
+ --datadir="${EPREFIX}/etc" \
+ $(use_enable static-libs static) \
+ $(use_with X x)
+}
+
+src_compile() {
+ local myopt=""
+ tc-export CC
+
+ use alpha && append-flags -mieee
+
+ if ! use doc; then
+ myopt="without_doc"
+ else
+ VARTEXFONTS=${T}/fonts
+ fi
+
+ emake ${myopt} || die "emake failed."
+}
+
+src_install() {
+ default
+ use static-libs || find "${ED}" -name '*.la' -exec rm -f {} +
+
+ dodoc Changes README*
+ if use doc; then
+ cd doc
+ insinto /usr/share/doc/${PF}
+ doins *.pdf *.dvi
+ fi
+}
diff --git a/media-libs/taglib-extras/Manifest b/media-libs/taglib-extras/Manifest
new file mode 100644
index 000000000000..3d8ae927fbac
--- /dev/null
+++ b/media-libs/taglib-extras/Manifest
@@ -0,0 +1 @@
+DIST taglib-extras-1.0.1.tar.gz 31363 SHA256 fe546b4b315f3227c975fed8ea9dfc0e54fc6997fdbba2a9da7beba479229632 SHA512 282f9c9cde81a250d8d6f4416658167665044d53cd10d8ecfa490df60a1fb95e1309feb17f69963f8dbfccc83ebb76af7275c25339931117435f34a56c4f1a65 WHIRLPOOL f9d49e86d189bbc69047b5103e2395cf5deab62ef075ce5d83789d4ab8371be63c7a5e97faa99f6132f21fa06ecbd2fddaef6c79b4811c2f829102f62a817f44
diff --git a/media-libs/taglib-extras/metadata.xml b/media-libs/taglib-extras/metadata.xml
new file mode 100644
index 000000000000..a23f444b67d6
--- /dev/null
+++ b/media-libs/taglib-extras/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-libs/taglib-extras/taglib-extras-1.0.1-r1.ebuild b/media-libs/taglib-extras/taglib-extras-1.0.1-r1.ebuild
new file mode 100644
index 000000000000..aae352fe5948
--- /dev/null
+++ b/media-libs/taglib-extras/taglib-extras-1.0.1-r1.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils
+
+DESCRIPTION="Unofficial taglib plugins maintained by the Amarok team"
+HOMEPAGE="http://developer.kde.org/~wheeler/taglib.html"
+SRC_URI="mirror://kde/stable/${PN}/${PV}/src/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ~ppc64 x86"
+IUSE="debug"
+
+RDEPEND="
+ >=media-libs/taglib-1.6
+"
+DEPEND="${RDEPEND}"
+
+DOCS=( AUTHORS ChangeLog )
diff --git a/media-libs/taglib/Manifest b/media-libs/taglib/Manifest
new file mode 100644
index 000000000000..0c6d0695e2c4
--- /dev/null
+++ b/media-libs/taglib/Manifest
@@ -0,0 +1 @@
+DIST taglib-1.9.1.tar.gz 654074 SHA256 d4da9aaaddf590ff15273b9b2c4622b6ce8377de0f40bab40155d471ede9c585 SHA512 17523b7ebdd089520289ae817b07f291be93fd0b9d3b2891eb4860a24e45943e94d25b99250c1ac477de5e51b08c39887ca13fdcc2dce17867eb60d1edb26154 WHIRLPOOL 962ec0508d8256a54ea686d4fb8d366f23f82bf10df6406c8012295ceda8416a5f23db6e450551b685798d628623eb5247e6ab7b658f955d897b86340baa5e8e
diff --git a/media-libs/taglib/files/taglib-1.6.1-install-examples.patch b/media-libs/taglib/files/taglib-1.6.1-install-examples.patch
new file mode 100644
index 000000000000..f53768175a32
--- /dev/null
+++ b/media-libs/taglib/files/taglib-1.6.1-install-examples.patch
@@ -0,0 +1,16 @@
+diff -purN taglib-1.6.1.orig/examples/CMakeLists.txt taglib-1.6.1/examples/CMakeLists.txt
+--- taglib-1.6.1.orig/examples/CMakeLists.txt 2009-09-09 14:16:38.000000000 -0400
++++ taglib-1.6.1/examples/CMakeLists.txt 2009-12-14 18:47:33.405385063 -0500
+@@ -45,6 +45,12 @@ ADD_EXECUTABLE(strip-id3v1 strip-id3v1.c
+
+ TARGET_LINK_LIBRARIES(strip-id3v1 tag )
+
++INSTALL(TARGETS
++ tagreader tagreader_c tagwriter framelist strip-id3v1
++ LIBRARY DESTINATION ${LIB_INSTALL_DIR}
++ RUNTIME DESTINATION ${BIN_INSTALL_DIR}
++ ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
++)
+
+ endif(BUILD_EXAMPLES)
+
diff --git a/media-libs/taglib/files/taglib-1.9.1-abi-breakage.patch b/media-libs/taglib/files/taglib-1.9.1-abi-breakage.patch
new file mode 100644
index 000000000000..930439fc8349
--- /dev/null
+++ b/media-libs/taglib/files/taglib-1.9.1-abi-breakage.patch
@@ -0,0 +1,107 @@
+From 3bf30af66c8fd77a88d9379a0956ddb2fc70dc20 Mon Sep 17 00:00:00 2001
+From: Tsuda Kageyu <tsuda.kageyu@gmail.com>
+Date: Wed, 6 Nov 2013 17:01:21 +0900
+Subject: [PATCH 2/6] Fixed ABI breakage in TagLib::String
+
+---
+ taglib/toolkit/tstring.cpp | 20 ++++++++++++++++++--
+ taglib/toolkit/tstring.h | 12 ++++++++++--
+ tests/test_string.cpp | 14 ++++++++++++++
+ 3 files changed, 42 insertions(+), 4 deletions(-)
+
+diff --git a/taglib/toolkit/tstring.cpp b/taglib/toolkit/tstring.cpp
+index 75a9833..fb6e947 100644
+--- a/taglib/toolkit/tstring.cpp
++++ b/taglib/toolkit/tstring.cpp
+@@ -209,8 +209,16 @@ String::String(const std::string &s, Type t)
+ String::String(const wstring &s, Type t)
+ : d(new StringPrivate())
+ {
+- if(t == UTF16 || t == UTF16BE || t == UTF16LE)
++ if(t == UTF16 || t == UTF16BE || t == UTF16LE) {
++ // This looks ugly but needed for the compatibility with TagLib1.8.
++ // Should be removed in TabLib2.0.
++ if (t == UTF16BE)
++ t = WCharByteOrder;
++ else if (t == UTF16LE)
++ t = (WCharByteOrder == UTF16LE ? UTF16BE : UTF16LE);
++
+ copyFromUTF16(s.c_str(), s.length(), t);
++ }
+ else {
+ debug("String::String() -- A TagLib::wstring should not contain Latin1 or UTF-8.");
+ }
+@@ -219,8 +227,16 @@ String::String(const wstring &s, Type t)
+ String::String(const wchar_t *s, Type t)
+ : d(new StringPrivate())
+ {
+- if(t == UTF16 || t == UTF16BE || t == UTF16LE)
++ if(t == UTF16 || t == UTF16BE || t == UTF16LE) {
++ // This looks ugly but needed for the compatibility with TagLib1.8.
++ // Should be removed in TabLib2.0.
++ if (t == UTF16BE)
++ t = WCharByteOrder;
++ else if (t == UTF16LE)
++ t = (WCharByteOrder == UTF16LE ? UTF16BE : UTF16LE);
++
+ copyFromUTF16(s, ::wcslen(s), t);
++ }
+ else {
+ debug("String::String() -- A const wchar_t * should not contain Latin1 or UTF-8.");
+ }
+diff --git a/taglib/toolkit/tstring.h b/taglib/toolkit/tstring.h
+index 57945be..605b9c2 100644
+--- a/taglib/toolkit/tstring.h
++++ b/taglib/toolkit/tstring.h
+@@ -134,13 +134,21 @@ namespace TagLib {
+
+ /*!
+ * Makes a deep copy of the data in \a s.
++ *
++ * /note If \a t is UTF16LE, the byte order of \a s will be swapped regardless
++ * of the CPU byte order. If UTF16BE, it will not be swapped. This behavior
++ * will be changed in TagLib2.0.
+ */
+- String(const wstring &s, Type t = WCharByteOrder);
++ String(const wstring &s, Type t = UTF16BE);
+
+ /*!
+ * Makes a deep copy of the data in \a s.
++ *
++ * /note If \a t is UTF16LE, the byte order of \a s will be swapped regardless
++ * of the CPU byte order. If UTF16BE, it will not be swapped. This behavior
++ * will be changed in TagLib2.0.
+ */
+- String(const wchar_t *s, Type t = WCharByteOrder);
++ String(const wchar_t *s, Type t = UTF16BE);
+
+ /*!
+ * Makes a deep copy of the data in \a c.
+diff --git a/tests/test_string.cpp b/tests/test_string.cpp
+index a815a0b..9a574b3 100644
+--- a/tests/test_string.cpp
++++ b/tests/test_string.cpp
+@@ -75,6 +75,20 @@ public:
+ String unicode3(L"\u65E5\u672C\u8A9E");
+ CPPUNIT_ASSERT(*(unicode3.toCWString() + 1) == L'\u672C');
+
++ String unicode4(L"\u65e5\u672c\u8a9e", String::UTF16BE);
++ CPPUNIT_ASSERT(unicode4[1] == L'\u672c');
++
++ String unicode5(L"\u65e5\u672c\u8a9e", String::UTF16LE);
++ CPPUNIT_ASSERT(unicode5[1] == L'\u2c67');
++
++ wstring stduni = L"\u65e5\u672c\u8a9e";
++
++ String unicode6(stduni, String::UTF16BE);
++ CPPUNIT_ASSERT(unicode6[1] == L'\u672c');
++
++ String unicode7(stduni, String::UTF16LE);
++ CPPUNIT_ASSERT(unicode7[1] == L'\u2c67');
++
+ CPPUNIT_ASSERT(strcmp(String::number(0).toCString(), "0") == 0);
+ CPPUNIT_ASSERT(strcmp(String::number(12345678).toCString(), "12345678") == 0);
+ CPPUNIT_ASSERT(strcmp(String::number(-12345678).toCString(), "-12345678") == 0);
+--
+1.8.4.2
+
diff --git a/media-libs/taglib/files/taglib-1.9.1-bytevector-simpler.patch b/media-libs/taglib/files/taglib-1.9.1-bytevector-simpler.patch
new file mode 100644
index 000000000000..0b134ec82215
--- /dev/null
+++ b/media-libs/taglib/files/taglib-1.9.1-bytevector-simpler.patch
@@ -0,0 +1,131 @@
+From 4a7d31c87bf41c1de21cb725176d5b34c2a95720 Mon Sep 17 00:00:00 2001
+From: Tsuda Kageyu <tsuda.kageyu@gmail.com>
+Date: Thu, 14 Nov 2013 14:05:32 +0900
+Subject: [PATCH 3/6] Rewrote ByteVector::replace() simpler
+
+---
+ taglib/toolkit/tbytevector.cpp | 77 +++++++++++++++---------------------------
+ tests/test_bytevector.cpp | 5 +++
+ 2 files changed, 33 insertions(+), 49 deletions(-)
+
+diff --git a/taglib/toolkit/tbytevector.cpp b/taglib/toolkit/tbytevector.cpp
+index b658246..566a20f 100644
+--- a/taglib/toolkit/tbytevector.cpp
++++ b/taglib/toolkit/tbytevector.cpp
+@@ -31,6 +31,7 @@
+ #include <iostream>
+ #include <cstdio>
+ #include <cstring>
++#include <cstddef>
+
+ #include <tstring.h>
+ #include <tdebug.h>
+@@ -508,62 +509,40 @@ ByteVector &ByteVector::replace(const ByteVector &pattern, const ByteVector &wit
+ if(pattern.size() == 0 || pattern.size() > size())
+ return *this;
+
+- const uint withSize = with.size();
+- const uint patternSize = pattern.size();
+- int offset = 0;
++ const size_t withSize = with.size();
++ const size_t patternSize = pattern.size();
++ const ptrdiff_t diff = withSize - patternSize;
++
++ size_t offset = 0;
++ while (true)
++ {
++ offset = find(pattern, offset);
++ if(offset == static_cast<size_t>(-1)) // Use npos in taglib2.
++ break;
+
+- if(withSize == patternSize) {
+- // I think this case might be common enough to optimize it
+ detach();
+- offset = find(pattern);
+- while(offset >= 0) {
+- ::memcpy(data() + offset, with.data(), withSize);
+- offset = find(pattern, offset + withSize);
+- }
+- return *this;
+- }
+
+- // calculate new size:
+- uint newSize = 0;
+- for(;;) {
+- int next = find(pattern, offset);
+- if(next < 0) {
+- if(offset == 0)
+- // pattern not found, do nothing:
+- return *this;
+- newSize += size() - offset;
+- break;
++ if(diff < 0) {
++ ::memmove(
++ data() + offset + withSize,
++ data() + offset + patternSize,
++ size() - offset - patternSize);
++ resize(size() + diff);
+ }
+- newSize += (next - offset) + withSize;
+- offset = next + patternSize;
+- }
+-
+- // new private data of appropriate size:
+- ByteVectorPrivate *newData = new ByteVectorPrivate(newSize, 0);
+- char *target = DATA(newData);
+- const char *source = data();
+-
+- // copy modified data into new private data:
+- offset = 0;
+- for(;;) {
+- int next = find(pattern, offset);
+- if(next < 0) {
+- ::memcpy(target, source + offset, size() - offset);
+- break;
++ else if(diff > 0) {
++ resize(size() + diff);
++ ::memmove(
++ data() + offset + withSize,
++ data() + offset + patternSize,
++ size() - diff - offset - patternSize);
+ }
+- int chunkSize = next - offset;
+- ::memcpy(target, source + offset, chunkSize);
+- target += chunkSize;
+- ::memcpy(target, with.data(), withSize);
+- target += withSize;
+- offset += chunkSize + patternSize;
+- }
+
+- // replace private data:
+- if(d->deref())
+- delete d;
++ ::memcpy(data() + offset, with.data(), with.size());
+
+- d = newData;
++ offset += withSize;
++ if(offset > size() - patternSize)
++ break;
++ }
+
+ return *this;
+ }
+diff --git a/tests/test_bytevector.cpp b/tests/test_bytevector.cpp
+index 9efd23a..eca74f8 100644
+--- a/tests/test_bytevector.cpp
++++ b/tests/test_bytevector.cpp
+@@ -239,6 +239,11 @@ public:
+ a.replace(ByteVector("ab"), ByteVector());
+ CPPUNIT_ASSERT_EQUAL(ByteVector("cdf"), a);
+ }
++ {
++ ByteVector a("abcdabf");
++ a.replace(ByteVector("bf"), ByteVector("x"));
++ CPPUNIT_ASSERT_EQUAL(ByteVector("abcdax"), a);
++ }
+ }
+
+ };
+--
+1.8.4.2
+
diff --git a/media-libs/taglib/files/taglib-1.9.1-missing-deletes.patch b/media-libs/taglib/files/taglib-1.9.1-missing-deletes.patch
new file mode 100644
index 000000000000..9cdbdcf00fbd
--- /dev/null
+++ b/media-libs/taglib/files/taglib-1.9.1-missing-deletes.patch
@@ -0,0 +1,48 @@
+From c14a3b5c3d0831f7c113d0cf95840c4671d9ebd4 Mon Sep 17 00:00:00 2001
+From: Tsuda Kageyu <tsuda.kageyu@gmail.com>
+Date: Tue, 13 May 2014 20:07:02 +0900
+Subject: [PATCH] Added some missing deletes to test_flac.cpp.
+
+---
+ tests/test_flac.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/tests/test_flac.cpp b/tests/test_flac.cpp
+index caec715..364fb11 100644
+--- a/tests/test_flac.cpp
++++ b/tests/test_flac.cpp
+@@ -91,6 +91,7 @@ public:
+ newpic->setData("JPEG data");
+ f->addPicture(newpic);
+ f->save();
++ delete f;
+
+ f = new FLAC::File(newname.c_str());
+ lst = f->pictureList();
+@@ -138,6 +139,7 @@ public:
+ f->removePictures();
+ f->addPicture(newpic);
+ f->save();
++ delete f;
+
+ f = new FLAC::File(newname.c_str());
+ lst = f->pictureList();
+@@ -165,6 +167,7 @@ public:
+
+ f->removePictures();
+ f->save();
++ delete f;
+
+ f = new FLAC::File(newname.c_str());
+ lst = f->pictureList();
+@@ -185,6 +188,7 @@ public:
+ tag->setTitle("NEW TITLE 2");
+ f->save();
+ CPPUNIT_ASSERT_EQUAL(String("NEW TITLE 2"), tag->title());
++ delete f;
+
+ f = new FLAC::File(newname.c_str());
+ tag = f->tag();
+--
+1.9.0
+
diff --git a/media-libs/taglib/files/taglib-1.9.1-order-big-endian.patch b/media-libs/taglib/files/taglib-1.9.1-order-big-endian.patch
new file mode 100644
index 000000000000..86d5201e54d4
--- /dev/null
+++ b/media-libs/taglib/files/taglib-1.9.1-order-big-endian.patch
@@ -0,0 +1,33 @@
+From db3e961d1098d5efe57364f540f68a5996dc83c2 Mon Sep 17 00:00:00 2001
+From: Tsuda Kageyu <tsuda.kageyu@gmail.com>
+Date: Tue, 13 May 2014 18:22:16 +0900
+Subject: [PATCH] Fixed a wrong byte order handling on big-endian machines.
+
+---
+ taglib/toolkit/tstring.cpp | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/taglib/toolkit/tstring.cpp b/taglib/toolkit/tstring.cpp
+index 603455a..1ec083b 100644
+--- a/taglib/toolkit/tstring.cpp
++++ b/taglib/toolkit/tstring.cpp
+@@ -47,10 +47,14 @@
+
+ namespace
+ {
+-
+ inline unsigned short combine(unsigned char c1, unsigned char c2)
+ {
+- return (c1 << 8) | c2;
++ using namespace TagLib::Utils;
++
++ if(SystemByteOrder == LittleEndian)
++ return (c1 << 8) | c2;
++ else
++ return (c2 << 8) | c1;
+ }
+
+ void UTF16toUTF8(const wchar_t *src, size_t srcLength, char *dst, size_t dstLength)
+--
+1.9.0
+
diff --git a/media-libs/taglib/metadata.xml b/media-libs/taglib/metadata.xml
new file mode 100644
index 000000000000..190574691596
--- /dev/null
+++ b/media-libs/taglib/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>kde</herd>
+ <use>
+ <flag name="asf">Provide support for Microsoft's 'advanced systems format' media container.</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">taglib/taglib</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/taglib/taglib-1.9.1-r2.ebuild b/media-libs/taglib/taglib-1.9.1-r2.ebuild
new file mode 100644
index 000000000000..afde7f34cd36
--- /dev/null
+++ b/media-libs/taglib/taglib-1.9.1-r2.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 cmake-multilib
+
+DESCRIPTION="A library for reading and editing audio meta data"
+HOMEPAGE="http://developer.kde.org/~wheeler/taglib.html"
+SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="LGPL-2.1 MPL-1.1"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x86-solaris"
+SLOT="0"
+IUSE="+asf debug examples +mp4 test"
+
+RDEPEND=">=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
+ test? ( >=dev-util/cppunit-1.13.2[${MULTILIB_USEDEP}] )
+"
+RDEPEND="${RDEPEND}
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20140508-r2
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.6.1-install-examples.patch
+ "${FILESDIR}"/${P}-missing-deletes.patch
+ "${FILESDIR}"/${P}-order-big-endian.patch
+ "${FILESDIR}"/${P}-abi-breakage.patch
+ "${FILESDIR}"/${P}-bytevector-simpler.patch
+)
+
+DOCS=( AUTHORS NEWS )
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/taglib-config
+)
+
+multilib_src_configure() {
+ mycmakeargs=(
+ $(multilib_is_native_abi && cmake-utils_use_build examples)
+ $(cmake-utils_use_build test TESTS)
+ $(cmake-utils_use_with asf)
+ $(cmake-utils_use_with mp4)
+ )
+
+ cmake-utils_src_configure
+}
+
+multilib_src_test() {
+ # ctest does not work
+ emake -C "${BUILD_DIR}" check
+}
+
+pkg_postinst() {
+ if ! use asf; then
+ elog "You've chosen to disable the asf use flag, thus taglib won't include"
+ elog "support for Microsoft's 'advanced systems format' media container"
+ fi
+ if ! use mp4; then
+ elog "You've chosen to disable the mp4 use flag, thus taglib won't include"
+ elog "support for the MPEG-4 part 14 / MP4 media container"
+ fi
+}
diff --git a/media-libs/tiff/Manifest b/media-libs/tiff/Manifest
new file mode 100644
index 000000000000..95d287afe209
--- /dev/null
+++ b/media-libs/tiff/Manifest
@@ -0,0 +1,2 @@
+DIST tiff-3.9.7.tar.gz 1468097 SHA256 f5d64dd4ce61c55f5e9f6dc3920fbe5a41e02c2e607da7117a35eb5c320cef6a SHA512 ca89584a9ffa33b4986e4bc2165043cec239896f1f0ab73db00818d0442b570efaa6345b2ed422e884202324d359713df849bf14782bb0cf3b959655febddd77 WHIRLPOOL c06b35da66c365c1fe7f0e6e06a400e139d3e2b5b280aa764015c2f0383a6191ffb3d335cdf2211b687bbb0caacf641be409148986a9813dfde5822a650a9b1c
+DIST tiff-4.0.3.tar.gz 2051630 SHA256 ea1aebe282319537fb2d4d7805f478dd4e0e05c33d0928baba76a7c963684872 SHA512 d80e18b00e9e696a30b954c0d92e5f2f773fd9a7a0a944cf6cabb69c1798e671506580daa1cd2ebf493ae922000170c2491dfc6d4c0a9cd0b865684070595a73 WHIRLPOOL 762ace7c66dec7a6f350bc8c000a9e1f4b775e7b148b1d923eb3f7c015f47bda65a54bc0b5974ce665c7d836ec0b275c9307d1f18f3b6bee8b0949a6cceb319e
diff --git a/media-libs/tiff/files/tiff-3.9.7-CVE-2012-4447.patch b/media-libs/tiff/files/tiff-3.9.7-CVE-2012-4447.patch
new file mode 100644
index 000000000000..6c28dc6ec9a8
--- /dev/null
+++ b/media-libs/tiff/files/tiff-3.9.7-CVE-2012-4447.patch
@@ -0,0 +1,191 @@
+Upstream patch for CVE-2012-4447. This also covers an out-of-bounds-read
+possibility in the same file, which wasn't given a separate CVE.
+
+
+diff -Naur tiff-3.9.4.orig/libtiff/tif_pixarlog.c tiff-3.9.4/libtiff/tif_pixarlog.c
+--- tiff-3.9.4.orig/libtiff/tif_pixarlog.c 2010-06-08 14:50:42.000000000 -0400
++++ tiff-3.9.4/libtiff/tif_pixarlog.c 2012-12-10 15:50:14.421538317 -0500
+@@ -117,9 +117,9 @@
+ if (n >= stride) {
+ mask = CODE_MASK;
+ if (stride == 3) {
+- t0 = ToLinearF[cr = wp[0]];
+- t1 = ToLinearF[cg = wp[1]];
+- t2 = ToLinearF[cb = wp[2]];
++ t0 = ToLinearF[cr = (wp[0] & mask)];
++ t1 = ToLinearF[cg = (wp[1] & mask)];
++ t2 = ToLinearF[cb = (wp[2] & mask)];
+ op[0] = t0;
+ op[1] = t1;
+ op[2] = t2;
+@@ -136,10 +136,10 @@
+ op[2] = t2;
+ }
+ } else if (stride == 4) {
+- t0 = ToLinearF[cr = wp[0]];
+- t1 = ToLinearF[cg = wp[1]];
+- t2 = ToLinearF[cb = wp[2]];
+- t3 = ToLinearF[ca = wp[3]];
++ t0 = ToLinearF[cr = (wp[0] & mask)];
++ t1 = ToLinearF[cg = (wp[1] & mask)];
++ t2 = ToLinearF[cb = (wp[2] & mask)];
++ t3 = ToLinearF[ca = (wp[3] & mask)];
+ op[0] = t0;
+ op[1] = t1;
+ op[2] = t2;
+@@ -183,9 +183,9 @@
+ if (n >= stride) {
+ mask = CODE_MASK;
+ if (stride == 3) {
+- t0 = ToLinearF[cr = wp[0]] * SCALE12;
+- t1 = ToLinearF[cg = wp[1]] * SCALE12;
+- t2 = ToLinearF[cb = wp[2]] * SCALE12;
++ t0 = ToLinearF[cr = (wp[0] & mask)] * SCALE12;
++ t1 = ToLinearF[cg = (wp[1] & mask)] * SCALE12;
++ t2 = ToLinearF[cb = (wp[2] & mask)] * SCALE12;
+ op[0] = CLAMP12(t0);
+ op[1] = CLAMP12(t1);
+ op[2] = CLAMP12(t2);
+@@ -202,10 +202,10 @@
+ op[2] = CLAMP12(t2);
+ }
+ } else if (stride == 4) {
+- t0 = ToLinearF[cr = wp[0]] * SCALE12;
+- t1 = ToLinearF[cg = wp[1]] * SCALE12;
+- t2 = ToLinearF[cb = wp[2]] * SCALE12;
+- t3 = ToLinearF[ca = wp[3]] * SCALE12;
++ t0 = ToLinearF[cr = (wp[0] & mask)] * SCALE12;
++ t1 = ToLinearF[cg = (wp[1] & mask)] * SCALE12;
++ t2 = ToLinearF[cb = (wp[2] & mask)] * SCALE12;
++ t3 = ToLinearF[ca = (wp[3] & mask)] * SCALE12;
+ op[0] = CLAMP12(t0);
+ op[1] = CLAMP12(t1);
+ op[2] = CLAMP12(t2);
+@@ -247,9 +247,9 @@
+ if (n >= stride) {
+ mask = CODE_MASK;
+ if (stride == 3) {
+- op[0] = ToLinear16[cr = wp[0]];
+- op[1] = ToLinear16[cg = wp[1]];
+- op[2] = ToLinear16[cb = wp[2]];
++ op[0] = ToLinear16[cr = (wp[0] & mask)];
++ op[1] = ToLinear16[cg = (wp[1] & mask)];
++ op[2] = ToLinear16[cb = (wp[2] & mask)];
+ n -= 3;
+ while (n > 0) {
+ wp += 3;
+@@ -260,10 +260,10 @@
+ op[2] = ToLinear16[(cb += wp[2]) & mask];
+ }
+ } else if (stride == 4) {
+- op[0] = ToLinear16[cr = wp[0]];
+- op[1] = ToLinear16[cg = wp[1]];
+- op[2] = ToLinear16[cb = wp[2]];
+- op[3] = ToLinear16[ca = wp[3]];
++ op[0] = ToLinear16[cr = (wp[0] & mask)];
++ op[1] = ToLinear16[cg = (wp[1] & mask)];
++ op[2] = ToLinear16[cb = (wp[2] & mask)];
++ op[3] = ToLinear16[ca = (wp[3] & mask)];
+ n -= 4;
+ while (n > 0) {
+ wp += 4;
+@@ -342,9 +342,9 @@
+ if (n >= stride) {
+ mask = CODE_MASK;
+ if (stride == 3) {
+- op[0] = ToLinear8[cr = wp[0]];
+- op[1] = ToLinear8[cg = wp[1]];
+- op[2] = ToLinear8[cb = wp[2]];
++ op[0] = ToLinear8[cr = (wp[0] & mask)];
++ op[1] = ToLinear8[cg = (wp[1] & mask)];
++ op[2] = ToLinear8[cb = (wp[2] & mask)];
+ n -= 3;
+ while (n > 0) {
+ n -= 3;
+@@ -355,10 +355,10 @@
+ op[2] = ToLinear8[(cb += wp[2]) & mask];
+ }
+ } else if (stride == 4) {
+- op[0] = ToLinear8[cr = wp[0]];
+- op[1] = ToLinear8[cg = wp[1]];
+- op[2] = ToLinear8[cb = wp[2]];
+- op[3] = ToLinear8[ca = wp[3]];
++ op[0] = ToLinear8[cr = (wp[0] & mask)];
++ op[1] = ToLinear8[cg = (wp[1] & mask)];
++ op[2] = ToLinear8[cb = (wp[2] & mask)];
++ op[3] = ToLinear8[ca = (wp[3] & mask)];
+ n -= 4;
+ while (n > 0) {
+ n -= 4;
+@@ -393,9 +393,9 @@
+ mask = CODE_MASK;
+ if (stride == 3) {
+ op[0] = 0;
+- t1 = ToLinear8[cb = wp[2]];
+- t2 = ToLinear8[cg = wp[1]];
+- t3 = ToLinear8[cr = wp[0]];
++ t1 = ToLinear8[cb = (wp[2] & mask)];
++ t2 = ToLinear8[cg = (wp[1] & mask)];
++ t3 = ToLinear8[cr = (wp[0] & mask)];
+ op[1] = t1;
+ op[2] = t2;
+ op[3] = t3;
+@@ -413,10 +413,10 @@
+ op[3] = t3;
+ }
+ } else if (stride == 4) {
+- t0 = ToLinear8[ca = wp[3]];
+- t1 = ToLinear8[cb = wp[2]];
+- t2 = ToLinear8[cg = wp[1]];
+- t3 = ToLinear8[cr = wp[0]];
++ t0 = ToLinear8[ca = (wp[3] & mask)];
++ t1 = ToLinear8[cb = (wp[2] & mask)];
++ t2 = ToLinear8[cg = (wp[1] & mask)];
++ t3 = ToLinear8[cr = (wp[0] & mask)];
+ op[0] = t0;
+ op[1] = t1;
+ op[2] = t2;
+@@ -630,10 +630,10 @@
+ return guess;
+ }
+
+-static uint32
+-multiply(size_t m1, size_t m2)
++static tsize_t
++multiply(tsize_t m1, tsize_t m2)
+ {
+- uint32 bytes = m1 * m2;
++ tsize_t bytes = m1 * m2;
+
+ if (m1 && bytes / m1 != m2)
+ bytes = 0;
+@@ -641,6 +641,20 @@
+ return bytes;
+ }
+
++static tsize_t
++add_ms(tsize_t m1, tsize_t m2)
++{
++ tsize_t bytes = m1 + m2;
++
++ /* if either input is zero, assume overflow already occurred */
++ if (m1 == 0 || m2 == 0)
++ bytes = 0;
++ else if (bytes <= m1 || bytes <= m2)
++ bytes = 0;
++
++ return bytes;
++}
++
+ static int
+ PixarLogSetupDecode(TIFF* tif)
+ {
+@@ -661,6 +675,8 @@
+ td->td_samplesperpixel : 1);
+ tbuf_size = multiply(multiply(multiply(sp->stride, td->td_imagewidth),
+ td->td_rowsperstrip), sizeof(uint16));
++ /* add one more stride in case input ends mid-stride */
++ tbuf_size = add_ms(tbuf_size, sizeof(uint16) * sp->stride);
+ if (tbuf_size == 0)
+ return (0);
+ sp->tbuf = (uint16 *) _TIFFmalloc(tbuf_size);
diff --git a/media-libs/tiff/files/tiff-3.9.7-CVE-2012-4564.patch b/media-libs/tiff/files/tiff-3.9.7-CVE-2012-4564.patch
new file mode 100644
index 000000000000..98a6e6c4409d
--- /dev/null
+++ b/media-libs/tiff/files/tiff-3.9.7-CVE-2012-4564.patch
@@ -0,0 +1,77 @@
+Upstream patch for CVE-2012-4564.
+
+
+diff -Naur tiff-3.9.4.orig/tools/ppm2tiff.c tiff-3.9.4/tools/ppm2tiff.c
+--- tiff-3.9.4.orig/tools/ppm2tiff.c 2010-06-08 14:50:44.000000000 -0400
++++ tiff-3.9.4/tools/ppm2tiff.c 2012-12-10 16:16:05.154045877 -0500
+@@ -68,6 +68,17 @@
+ exit(-2);
+ }
+
++static tsize_t
++multiply_ms(tsize_t m1, tsize_t m2)
++{
++ tsize_t bytes = m1 * m2;
++
++ if (m1 && bytes / m1 != m2)
++ bytes = 0;
++
++ return bytes;
++}
++
+ int
+ main(int argc, char* argv[])
+ {
+@@ -85,6 +96,7 @@
+ int c;
+ extern int optind;
+ extern char* optarg;
++ tsize_t scanline_size;
+
+ if (argc < 2) {
+ fprintf(stderr, "%s: Too few arguments\n", argv[0]);
+@@ -217,7 +229,8 @@
+ }
+ switch (bpp) {
+ case 1:
+- linebytes = (spp * w + (8 - 1)) / 8;
++ /* if round-up overflows, result will be zero, OK */
++ linebytes = (multiply_ms(spp, w) + (8 - 1)) / 8;
+ if (rowsperstrip == (uint32) -1) {
+ TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, h);
+ } else {
+@@ -226,15 +239,31 @@
+ }
+ break;
+ case 8:
+- linebytes = spp * w;
++ linebytes = multiply_ms(spp, w);
+ TIFFSetField(out, TIFFTAG_ROWSPERSTRIP,
+ TIFFDefaultStripSize(out, rowsperstrip));
+ break;
+ }
+- if (TIFFScanlineSize(out) > linebytes)
++ if (linebytes == 0) {
++ fprintf(stderr, "%s: scanline size overflow\n", infile);
++ (void) TIFFClose(out);
++ exit(-2);
++ }
++ scanline_size = TIFFScanlineSize(out);
++ if (scanline_size == 0) {
++ /* overflow - TIFFScanlineSize already printed a message */
++ (void) TIFFClose(out);
++ exit(-2);
++ }
++ if (scanline_size < linebytes)
+ buf = (unsigned char *)_TIFFmalloc(linebytes);
+ else
+- buf = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(out));
++ buf = (unsigned char *)_TIFFmalloc(scanline_size);
++ if (buf == NULL) {
++ fprintf(stderr, "%s: Not enough memory\n", infile);
++ (void) TIFFClose(out);
++ exit(-2);
++ }
+ if (resolution > 0) {
+ TIFFSetField(out, TIFFTAG_XRESOLUTION, resolution);
+ TIFFSetField(out, TIFFTAG_YRESOLUTION, resolution);
diff --git a/media-libs/tiff/files/tiff-3.9.7-CVE-2012-5581.patch b/media-libs/tiff/files/tiff-3.9.7-CVE-2012-5581.patch
new file mode 100644
index 000000000000..a6bdca137029
--- /dev/null
+++ b/media-libs/tiff/files/tiff-3.9.7-CVE-2012-5581.patch
@@ -0,0 +1,245 @@
+Fix unsafe handling of DotRange and related tags. Back-port of upstream
+patch for CVE-2012-5581. (Note: I have not pushed this into upstream CVS
+for the 3.9 branch, because I'm not entirely convinced that it won't create
+application compatibility issues --- tgl)
+
+
+diff -Naur tiff-3.9.7.orig/libtiff/tif_dir.c tiff-3.9.7/libtiff/tif_dir.c
+--- tiff-3.9.7.orig/libtiff/tif_dir.c 2012-09-22 10:48:09.000000000 -0400
++++ tiff-3.9.7/libtiff/tif_dir.c 2012-12-13 13:39:20.448864070 -0500
+@@ -494,32 +494,28 @@
+ goto end;
+ }
+
+- if ((fip->field_passcount
++ if (fip->field_tag == TIFFTAG_DOTRANGE
++ && strcmp(fip->field_name,"DotRange") == 0) {
++ /* TODO: This is an evil exception and should not have been
++ handled this way ... likely best if we move it into
++ the directory structure with an explicit field in
++ libtiff 4.1 and assign it a FIELD_ value */
++ uint16 v[2];
++ v[0] = (uint16)va_arg(ap, int);
++ v[1] = (uint16)va_arg(ap, int);
++ _TIFFmemcpy(tv->value, v, 4);
++ }
++ else if (fip->field_passcount
+ || fip->field_writecount == TIFF_VARIABLE
+ || fip->field_writecount == TIFF_VARIABLE2
+ || fip->field_writecount == TIFF_SPP
+- || tv->count > 1)
+- && fip->field_tag != TIFFTAG_PAGENUMBER
+- && fip->field_tag != TIFFTAG_HALFTONEHINTS
+- && fip->field_tag != TIFFTAG_YCBCRSUBSAMPLING
+- && fip->field_tag != TIFFTAG_DOTRANGE
+- && fip->field_tag != TIFFTAG_WHITELEVEL) {
++ || tv->count > 1) {
+ _TIFFmemcpy(tv->value, va_arg(ap, void *),
+ tv->count * tv_size);
+ } else {
+- /*
+- * XXX: The following loop required to handle
+- * TIFFTAG_PAGENUMBER, TIFFTAG_HALFTONEHINTS,
+- * TIFFTAG_YCBCRSUBSAMPLING and TIFFTAG_DOTRANGE tags.
+- * These tags are actually arrays and should be passed as
+- * array pointers to TIFFSetField() function, but actually
+- * passed as a list of separate values. This behaviour
+- * must be changed in the future!
+- */
+- int i;
+ char *val = (char *)tv->value;
+
+- for (i = 0; i < tv->count; i++, val += tv_size) {
++ assert( tv->count == 1 );
+ switch (fip->field_type) {
+ case TIFF_BYTE:
+ case TIFF_UNDEFINED:
+@@ -578,7 +574,6 @@
+ status = 0;
+ break;
+ }
+- }
+ }
+ }
+ }
+@@ -869,24 +864,27 @@
+ *va_arg(ap, uint16*) = (uint16)tv->count;
+ *va_arg(ap, void **) = tv->value;
+ ret_val = 1;
+- } else {
+- if ((fip->field_type == TIFF_ASCII
++ } else if (fip->field_tag == TIFFTAG_DOTRANGE
++ && strcmp(fip->field_name,"DotRange") == 0) {
++ /* TODO: This is an evil exception and should not have been
++ handled this way ... likely best if we move it into
++ the directory structure with an explicit field in
++ libtiff 4.1 and assign it a FIELD_ value */
++ *va_arg(ap, uint16*) = ((uint16 *)tv->value)[0];
++ *va_arg(ap, uint16*) = ((uint16 *)tv->value)[1];
++ ret_val = 1;
++ } else {
++ if (fip->field_type == TIFF_ASCII
+ || fip->field_readcount == TIFF_VARIABLE
+ || fip->field_readcount == TIFF_VARIABLE2
+ || fip->field_readcount == TIFF_SPP
+- || tv->count > 1)
+- && fip->field_tag != TIFFTAG_PAGENUMBER
+- && fip->field_tag != TIFFTAG_HALFTONEHINTS
+- && fip->field_tag != TIFFTAG_YCBCRSUBSAMPLING
+- && fip->field_tag != TIFFTAG_DOTRANGE) {
++ || tv->count > 1) {
+ *va_arg(ap, void **) = tv->value;
+ ret_val = 1;
+ } else {
+- int j;
+ char *val = (char *)tv->value;
+
+- for (j = 0; j < tv->count;
+- j++, val += _TIFFDataSize(tv->info->field_type)) {
++ assert( tv->count == 1 );
+ switch (fip->field_type) {
+ case TIFF_BYTE:
+ case TIFF_UNDEFINED:
+@@ -936,7 +934,6 @@
+ ret_val = 0;
+ break;
+ }
+- }
+ }
+ }
+ break;
+diff -Naur tiff-3.9.7.orig/libtiff/tif_print.c tiff-3.9.7/libtiff/tif_print.c
+--- tiff-3.9.7.orig/libtiff/tif_print.c 2010-07-08 12:17:59.000000000 -0400
++++ tiff-3.9.7/libtiff/tif_print.c 2012-12-13 13:42:12.773478278 -0500
+@@ -112,16 +112,22 @@
+ }
+
+ static int
+-_TIFFPrettyPrintField(TIFF* tif, FILE* fd, ttag_t tag,
++_TIFFPrettyPrintField(TIFF* tif, const TIFFFieldInfo *fip, FILE* fd, ttag_t tag,
+ uint32 value_count, void *raw_data)
+ {
+ TIFFDirectory *td = &tif->tif_dir;
+
++ /* do not try to pretty print auto-defined fields */
++ if (strncmp(fip->field_name,"Tag ", 4) == 0) {
++ return 0;
++ }
++
+ switch (tag)
+ {
+ case TIFFTAG_INKSET:
+- fprintf(fd, " Ink Set: ");
+- switch (*((uint16*)raw_data)) {
++ if (value_count == 2 && fip->field_type == TIFF_SHORT) {
++ fprintf(fd, " Ink Set: ");
++ switch (*((uint16*)raw_data)) {
+ case INKSET_CMYK:
+ fprintf(fd, "CMYK\n");
+ break;
+@@ -130,11 +136,18 @@
+ *((uint16*)raw_data),
+ *((uint16*)raw_data));
+ break;
++ }
++ return 1;
+ }
+- return 1;
++ return 0;
++
+ case TIFFTAG_WHITEPOINT:
+- fprintf(fd, " White Point: %g-%g\n",
+- ((float *)raw_data)[0], ((float *)raw_data)[1]); return 1;
++ if (value_count == 2 && fip->field_type == TIFF_RATIONAL) {
++ fprintf(fd, " White Point: %g-%g\n",
++ ((float *)raw_data)[0], ((float *)raw_data)[1]); return 1;
++ }
++ return 0;
++
+ case TIFFTAG_REFERENCEBLACKWHITE:
+ {
+ uint16 i;
+@@ -174,10 +187,13 @@
+ (unsigned long) value_count);
+ return 1;
+ case TIFFTAG_STONITS:
+- fprintf(fd,
+- " Sample to Nits conversion factor: %.4e\n",
+- *((double*)raw_data));
+- return 1;
++ if (value_count == 1 && fip->field_type == TIFF_DOUBLE) {
++ fprintf(fd,
++ " Sample to Nits conversion factor: %.4e\n",
++ *((double*)raw_data));
++ return 1;
++ }
++ return 0;
+ }
+
+ return 0;
+@@ -524,44 +540,28 @@
+ value_count = td->td_samplesperpixel;
+ else
+ value_count = fip->field_readcount;
+- if ((fip->field_type == TIFF_ASCII
++ if (fip->field_tag == TIFFTAG_DOTRANGE
++ && strcmp(fip->field_name,"DotRange") == 0) {
++ /* TODO: This is an evil exception and should not have been
++ handled this way ... likely best if we move it into
++ the directory structure with an explicit field in
++ libtiff 4.1 and assign it a FIELD_ value */
++ static uint16 dotrange[2];
++ raw_data = dotrange;
++ TIFFGetField(tif, tag, dotrange+0, dotrange+1);
++ } else if (fip->field_type == TIFF_ASCII
+ || fip->field_readcount == TIFF_VARIABLE
+ || fip->field_readcount == TIFF_VARIABLE2
+ || fip->field_readcount == TIFF_SPP
+- || value_count > 1)
+- && fip->field_tag != TIFFTAG_PAGENUMBER
+- && fip->field_tag != TIFFTAG_HALFTONEHINTS
+- && fip->field_tag != TIFFTAG_YCBCRSUBSAMPLING
+- && fip->field_tag != TIFFTAG_DOTRANGE) {
++ || value_count > 1) {
+ if(TIFFGetField(tif, tag, &raw_data) != 1)
+ continue;
+- } else if (fip->field_tag != TIFFTAG_PAGENUMBER
+- && fip->field_tag != TIFFTAG_HALFTONEHINTS
+- && fip->field_tag != TIFFTAG_YCBCRSUBSAMPLING
+- && fip->field_tag != TIFFTAG_DOTRANGE) {
+- raw_data = _TIFFmalloc(
+- _TIFFDataSize(fip->field_type)
+- * value_count);
+- mem_alloc = 1;
+- if(TIFFGetField(tif, tag, raw_data) != 1) {
+- _TIFFfree(raw_data);
+- continue;
+- }
+ } else {
+- /*
+- * XXX: Should be fixed and removed, see the
+- * notes related to TIFFTAG_PAGENUMBER,
+- * TIFFTAG_HALFTONEHINTS,
+- * TIFFTAG_YCBCRSUBSAMPLING and
+- * TIFFTAG_DOTRANGE tags in tif_dir.c. */
+- char *tmp;
+ raw_data = _TIFFmalloc(
+ _TIFFDataSize(fip->field_type)
+ * value_count);
+- tmp = raw_data;
+ mem_alloc = 1;
+- if(TIFFGetField(tif, tag, tmp,
+- tmp + _TIFFDataSize(fip->field_type)) != 1) {
++ if(TIFFGetField(tif, tag, raw_data) != 1) {
+ _TIFFfree(raw_data);
+ continue;
+ }
+@@ -574,7 +574,7 @@
+ * _TIFFPrettyPrintField() fall down and print it as any other
+ * tag.
+ */
+- if (_TIFFPrettyPrintField(tif, fd, tag, value_count, raw_data)) {
++ if (_TIFFPrettyPrintField(tif, fip, fd, tag, value_count, raw_data)) {
+ if(mem_alloc)
+ _TIFFfree(raw_data);
+ continue;
diff --git a/media-libs/tiff/files/tiff-3.9.7-printdir-width.patch b/media-libs/tiff/files/tiff-3.9.7-printdir-width.patch
new file mode 100644
index 000000000000..6ad7534ac6fe
--- /dev/null
+++ b/media-libs/tiff/files/tiff-3.9.7-printdir-width.patch
@@ -0,0 +1,36 @@
+Make TIFFPrintDirectory cope with both TIFF_VARIABLE and TIFF_VARIABLE2
+conventions for field_passcount fields, ie, either 16- or 32-bit counts.
+This patch is taken from upstream commits dated 2012-05-23 ("fix crash
+with odd 16bit count types for some custom fields") and 2012-12-12 ("Fix
+TIFF_VARIABLE/TIFF_VARIABLE2 confusion in TIFFPrintDirectory").
+
+This doesn't qualify as a security issue in itself, mainly because
+TIFFPrintDirectory is unlikely to be used in any security-exposed
+scenarios; but we need to fix it so that our test case for CVE-2012-5581
+works on all platforms.
+
+
+diff -Naur tiff-3.9.4.orig/libtiff/tif_print.c tiff-3.9.4/libtiff/tif_print.c
+--- tiff-3.9.4.orig/libtiff/tif_print.c 2010-06-08 14:50:42.000000000 -0400
++++ tiff-3.9.4/libtiff/tif_print.c 2012-12-13 12:17:33.726765771 -0500
+@@ -518,8 +518,19 @@
+ continue;
+
+ if(fip->field_passcount) {
+- if(TIFFGetField(tif, tag, &value_count, &raw_data) != 1)
++ if (fip->field_readcount == TIFF_VARIABLE2 ) {
++ if(TIFFGetField(tif, tag, &value_count, &raw_data) != 1)
++ continue;
++ } else if (fip->field_readcount == TIFF_VARIABLE ) {
++ uint16 small_value_count;
++ if(TIFFGetField(tif, tag, &small_value_count, &raw_data) != 1)
++ continue;
++ value_count = small_value_count;
++ } else {
++ assert (fip->field_readcount == TIFF_VARIABLE
++ || fip->field_readcount == TIFF_VARIABLE2);
+ continue;
++ }
+ } else {
+ if (fip->field_readcount == TIFF_VARIABLE
+ || fip->field_readcount == TIFF_VARIABLE2)
diff --git a/media-libs/tiff/files/tiff-3.9.7-tiffinfo-exif.patch b/media-libs/tiff/files/tiff-3.9.7-tiffinfo-exif.patch
new file mode 100644
index 000000000000..a326e21e298b
--- /dev/null
+++ b/media-libs/tiff/files/tiff-3.9.7-tiffinfo-exif.patch
@@ -0,0 +1,59 @@
+Teach "tiffinfo -D" to not try to print image data inside an EXIF subdirectory,
+because there isn't any. Back-patched from an upstream 4.0.2 fix.
+
+This is not a security issue in itself (it crashes, but with a simple NULL
+pointer dereference). However, our test case for CVE-2012-5581 tickles this
+bug, so it seems easier to fix this than make a new test case.
+
+
+diff -Naur tiff-3.9.4.orig/tools/tiffinfo.c tiff-3.9.4/tools/tiffinfo.c
+--- tiff-3.9.4.orig/tools/tiffinfo.c 2010-06-08 14:50:44.000000000 -0400
++++ tiff-3.9.4/tools/tiffinfo.c 2012-12-11 16:33:17.062228558 -0500
+@@ -49,7 +49,7 @@
+ int stoponerr = 1; /* stop on first read error */
+
+ static void usage(void);
+-static void tiffinfo(TIFF*, uint16, long);
++static void tiffinfo(TIFF*, uint16, long, int);
+
+ int
+ main(int argc, char* argv[])
+@@ -124,19 +124,20 @@
+ if (tif != NULL) {
+ if (dirnum != -1) {
+ if (TIFFSetDirectory(tif, (tdir_t) dirnum))
+- tiffinfo(tif, order, flags);
++ tiffinfo(tif, order, flags, 1);
+ } else if (diroff != 0) {
+ if (TIFFSetSubDirectory(tif, diroff))
+- tiffinfo(tif, order, flags);
++ tiffinfo(tif, order, flags, 1);
+ } else {
+ do {
+ uint32 offset;
+
+- tiffinfo(tif, order, flags);
++ tiffinfo(tif, order, flags, 1);
+ if (TIFFGetField(tif, TIFFTAG_EXIFIFD,
+ &offset)) {
+- if (TIFFReadEXIFDirectory(tif, offset))
+- tiffinfo(tif, order, flags);
++ if (TIFFReadEXIFDirectory(tif, offset)) {
++ tiffinfo(tif, order, flags, 0);
++ }
+ }
+ } while (TIFFReadDirectory(tif));
+ }
+@@ -426,10 +427,10 @@
+ }
+
+ static void
+-tiffinfo(TIFF* tif, uint16 order, long flags)
++tiffinfo(TIFF* tif, uint16 order, long flags, int is_image)
+ {
+ TIFFPrintDirectory(tif, stdout, flags);
+- if (!readdata)
++ if (!readdata || !is_image)
+ return;
+ if (rawdata) {
+ if (order) {
diff --git a/media-libs/tiff/files/tiff-4.0.3-CVE-2012-4447.patch b/media-libs/tiff/files/tiff-4.0.3-CVE-2012-4447.patch
new file mode 100644
index 000000000000..ebf9a00e1b6d
--- /dev/null
+++ b/media-libs/tiff/files/tiff-4.0.3-CVE-2012-4447.patch
@@ -0,0 +1,40 @@
+Upstream patch for CVE-2012-4447.
+
+
+diff -Naur tiff-4.0.3.orig/libtiff/tif_pixarlog.c tiff-4.0.3/libtiff/tif_pixarlog.c
+--- tiff-4.0.3.orig/libtiff/tif_pixarlog.c 2012-07-04 15:26:31.000000000 -0400
++++ tiff-4.0.3/libtiff/tif_pixarlog.c 2012-12-12 16:43:18.931315699 -0500
+@@ -644,6 +644,20 @@
+ return bytes;
+ }
+
++static tmsize_t
++add_ms(tmsize_t m1, tmsize_t m2)
++{
++ tmsize_t bytes = m1 + m2;
++
++ /* if either input is zero, assume overflow already occurred */
++ if (m1 == 0 || m2 == 0)
++ bytes = 0;
++ else if (bytes <= m1 || bytes <= m2)
++ bytes = 0;
++
++ return bytes;
++}
++
+ static int
+ PixarLogFixupTags(TIFF* tif)
+ {
+@@ -671,9 +685,11 @@
+ td->td_samplesperpixel : 1);
+ tbuf_size = multiply_ms(multiply_ms(multiply_ms(sp->stride, td->td_imagewidth),
+ td->td_rowsperstrip), sizeof(uint16));
++ /* add one more stride in case input ends mid-stride */
++ tbuf_size = add_ms(tbuf_size, sizeof(uint16) * sp->stride);
+ if (tbuf_size == 0)
+ return (0); /* TODO: this is an error return without error report through TIFFErrorExt */
+- sp->tbuf = (uint16 *) _TIFFmalloc(tbuf_size+sizeof(uint16)*sp->stride);
++ sp->tbuf = (uint16 *) _TIFFmalloc(tbuf_size);
+ if (sp->tbuf == NULL)
+ return (0);
+ if (sp->user_datafmt == PIXARLOGDATAFMT_UNKNOWN)
diff --git a/media-libs/tiff/files/tiff-4.0.3-CVE-2012-4564.patch b/media-libs/tiff/files/tiff-4.0.3-CVE-2012-4564.patch
new file mode 100644
index 000000000000..3d7946c7ec3f
--- /dev/null
+++ b/media-libs/tiff/files/tiff-4.0.3-CVE-2012-4564.patch
@@ -0,0 +1,86 @@
+Upstream patch for CVE-2012-4564.
+
+
+diff -Naur tiff-4.0.3.orig/tools/ppm2tiff.c tiff-4.0.3/tools/ppm2tiff.c
+--- tiff-4.0.3.orig/tools/ppm2tiff.c 2010-04-10 15:22:34.000000000 -0400
++++ tiff-4.0.3/tools/ppm2tiff.c 2012-12-12 16:43:18.932315708 -0500
+@@ -72,6 +72,17 @@
+ exit(-2);
+ }
+
++static tmsize_t
++multiply_ms(tmsize_t m1, tmsize_t m2)
++{
++ tmsize_t bytes = m1 * m2;
++
++ if (m1 && bytes / m1 != m2)
++ bytes = 0;
++
++ return bytes;
++}
++
+ int
+ main(int argc, char* argv[])
+ {
+@@ -79,7 +90,7 @@
+ uint32 rowsperstrip = (uint32) -1;
+ double resolution = -1;
+ unsigned char *buf = NULL;
+- tsize_t linebytes = 0;
++ tmsize_t linebytes = 0;
+ uint16 spp = 1;
+ uint16 bpp = 8;
+ TIFF *out;
+@@ -89,6 +100,7 @@
+ int c;
+ extern int optind;
+ extern char* optarg;
++ tmsize_t scanline_size;
+
+ if (argc < 2) {
+ fprintf(stderr, "%s: Too few arguments\n", argv[0]);
+@@ -221,7 +233,8 @@
+ }
+ switch (bpp) {
+ case 1:
+- linebytes = (spp * w + (8 - 1)) / 8;
++ /* if round-up overflows, result will be zero, OK */
++ linebytes = (multiply_ms(spp, w) + (8 - 1)) / 8;
+ if (rowsperstrip == (uint32) -1) {
+ TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, h);
+ } else {
+@@ -230,15 +243,31 @@
+ }
+ break;
+ case 8:
+- linebytes = spp * w;
++ linebytes = multiply_ms(spp, w);
+ TIFFSetField(out, TIFFTAG_ROWSPERSTRIP,
+ TIFFDefaultStripSize(out, rowsperstrip));
+ break;
+ }
+- if (TIFFScanlineSize(out) > linebytes)
++ if (linebytes == 0) {
++ fprintf(stderr, "%s: scanline size overflow\n", infile);
++ (void) TIFFClose(out);
++ exit(-2);
++ }
++ scanline_size = TIFFScanlineSize(out);
++ if (scanline_size == 0) {
++ /* overflow - TIFFScanlineSize already printed a message */
++ (void) TIFFClose(out);
++ exit(-2);
++ }
++ if (scanline_size < linebytes)
+ buf = (unsigned char *)_TIFFmalloc(linebytes);
+ else
+- buf = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(out));
++ buf = (unsigned char *)_TIFFmalloc(scanline_size);
++ if (buf == NULL) {
++ fprintf(stderr, "%s: Not enough memory\n", infile);
++ (void) TIFFClose(out);
++ exit(-2);
++ }
+ if (resolution > 0) {
+ TIFFSetField(out, TIFFTAG_XRESOLUTION, resolution);
+ TIFFSetField(out, TIFFTAG_YRESOLUTION, resolution);
diff --git a/media-libs/tiff/files/tiff-4.0.3-CVE-2013-1960.patch b/media-libs/tiff/files/tiff-4.0.3-CVE-2013-1960.patch
new file mode 100644
index 000000000000..1c8dfb7bc65d
--- /dev/null
+++ b/media-libs/tiff/files/tiff-4.0.3-CVE-2013-1960.patch
@@ -0,0 +1,145 @@
+diff -Naur tiff-4.0.3.orig/tools/tiff2pdf.c tiff-4.0.3/tools/tiff2pdf.c
+--- tiff-4.0.3.orig/tools/tiff2pdf.c 2012-07-25 22:56:43.000000000 -0400
++++ tiff-4.0.3/tools/tiff2pdf.c 2013-05-02 12:04:49.057090227 -0400
+@@ -3341,33 +3341,56 @@
+ uint32 height){
+
+ tsize_t i=0;
+- uint16 ri =0;
+- uint16 v_samp=1;
+- uint16 h_samp=1;
+- int j=0;
+-
+- i++;
+-
+- while(i<(*striplength)){
++
++ while (i < *striplength) {
++ tsize_t datalen;
++ uint16 ri;
++ uint16 v_samp;
++ uint16 h_samp;
++ int j;
++ int ncomp;
++
++ /* marker header: one or more FFs */
++ if (strip[i] != 0xff)
++ return(0);
++ i++;
++ while (i < *striplength && strip[i] == 0xff)
++ i++;
++ if (i >= *striplength)
++ return(0);
++ /* SOI is the only pre-SOS marker without a length word */
++ if (strip[i] == 0xd8)
++ datalen = 0;
++ else {
++ if ((*striplength - i) <= 2)
++ return(0);
++ datalen = (strip[i+1] << 8) | strip[i+2];
++ if (datalen < 2 || datalen >= (*striplength - i))
++ return(0);
++ }
+ switch( strip[i] ){
+- case 0xd8:
+- /* SOI - start of image */
++ case 0xd8: /* SOI - start of image */
+ _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), 2);
+ *bufferoffset+=2;
+- i+=2;
+ break;
+- case 0xc0:
+- case 0xc1:
+- case 0xc3:
+- case 0xc9:
+- case 0xca:
++ case 0xc0: /* SOF0 */
++ case 0xc1: /* SOF1 */
++ case 0xc3: /* SOF3 */
++ case 0xc9: /* SOF9 */
++ case 0xca: /* SOF10 */
+ if(no==0){
+- _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), strip[i+2]+2);
+- for(j=0;j<buffer[*bufferoffset+9];j++){
+- if( (buffer[*bufferoffset+11+(2*j)]>>4) > h_samp)
+- h_samp = (buffer[*bufferoffset+11+(2*j)]>>4);
+- if( (buffer[*bufferoffset+11+(2*j)] & 0x0f) > v_samp)
+- v_samp = (buffer[*bufferoffset+11+(2*j)] & 0x0f);
++ _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), datalen+2);
++ ncomp = buffer[*bufferoffset+9];
++ if (ncomp < 1 || ncomp > 4)
++ return(0);
++ v_samp=1;
++ h_samp=1;
++ for(j=0;j<ncomp;j++){
++ uint16 samp = buffer[*bufferoffset+11+(3*j)];
++ if( (samp>>4) > h_samp)
++ h_samp = (samp>>4);
++ if( (samp & 0x0f) > v_samp)
++ v_samp = (samp & 0x0f);
+ }
+ v_samp*=8;
+ h_samp*=8;
+@@ -3381,45 +3404,43 @@
+ (unsigned char) ((height>>8) & 0xff);
+ buffer[*bufferoffset+6]=
+ (unsigned char) (height & 0xff);
+- *bufferoffset+=strip[i+2]+2;
+- i+=strip[i+2]+2;
+-
++ *bufferoffset+=datalen+2;
++ /* insert a DRI marker */
+ buffer[(*bufferoffset)++]=0xff;
+ buffer[(*bufferoffset)++]=0xdd;
+ buffer[(*bufferoffset)++]=0x00;
+ buffer[(*bufferoffset)++]=0x04;
+ buffer[(*bufferoffset)++]=(ri >> 8) & 0xff;
+ buffer[(*bufferoffset)++]= ri & 0xff;
+- } else {
+- i+=strip[i+2]+2;
+ }
+ break;
+- case 0xc4:
+- case 0xdb:
+- _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), strip[i+2]+2);
+- *bufferoffset+=strip[i+2]+2;
+- i+=strip[i+2]+2;
++ case 0xc4: /* DHT */
++ case 0xdb: /* DQT */
++ _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), datalen+2);
++ *bufferoffset+=datalen+2;
+ break;
+- case 0xda:
++ case 0xda: /* SOS */
+ if(no==0){
+- _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), strip[i+2]+2);
+- *bufferoffset+=strip[i+2]+2;
+- i+=strip[i+2]+2;
++ _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), datalen+2);
++ *bufferoffset+=datalen+2;
+ } else {
+ buffer[(*bufferoffset)++]=0xff;
+ buffer[(*bufferoffset)++]=
+ (unsigned char)(0xd0 | ((no-1)%8));
+- i+=strip[i+2]+2;
+ }
+- _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), (*striplength)-i-1);
+- *bufferoffset+=(*striplength)-i-1;
++ i += datalen + 1;
++ /* copy remainder of strip */
++ _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i]), *striplength - i);
++ *bufferoffset+= *striplength - i;
+ return(1);
+ default:
+- i+=strip[i+2]+2;
++ /* ignore any other marker */
++ break;
+ }
++ i += datalen + 1;
+ }
+-
+
++ /* failed to find SOS marker */
+ return(0);
+ }
+ #endif
diff --git a/media-libs/tiff/files/tiff-4.0.3-CVE-2013-1961.patch b/media-libs/tiff/files/tiff-4.0.3-CVE-2013-1961.patch
new file mode 100644
index 000000000000..0ea9b52e3fff
--- /dev/null
+++ b/media-libs/tiff/files/tiff-4.0.3-CVE-2013-1961.patch
@@ -0,0 +1,759 @@
+diff -Naur tiff-4.0.3.orig/contrib/dbs/xtiff/xtiff.c tiff-4.0.3/contrib/dbs/xtiff/xtiff.c
+--- tiff-4.0.3.orig/contrib/dbs/xtiff/xtiff.c 2010-06-08 14:55:15.000000000 -0400
++++ tiff-4.0.3/contrib/dbs/xtiff/xtiff.c 2013-05-02 12:02:42.782287939 -0400
+@@ -512,9 +512,9 @@
+ Arg args[1];
+
+ if (tfMultiPage)
+- sprintf(buffer, "%s - page %d", fileName, tfDirectory);
++ snprintf(buffer, sizeof(buffer), "%s - page %d", fileName, tfDirectory);
+ else
+- strcpy(buffer, fileName);
++ snprintf(buffer, sizeof(buffer), "%s", fileName);
+ XtSetArg(args[0], XtNlabel, buffer);
+ XtSetValues(labelWidget, args, 1);
+ }
+diff -Naur tiff-4.0.3.orig/libtiff/tif_codec.c tiff-4.0.3/libtiff/tif_codec.c
+--- tiff-4.0.3.orig/libtiff/tif_codec.c 2010-12-14 09:18:28.000000000 -0500
++++ tiff-4.0.3/libtiff/tif_codec.c 2013-05-02 12:02:42.783287946 -0400
+@@ -108,7 +108,8 @@
+ const TIFFCodec* c = TIFFFindCODEC(tif->tif_dir.td_compression);
+ char compression_code[20];
+
+- sprintf( compression_code, "%d", tif->tif_dir.td_compression );
++ snprintf(compression_code, sizeof(compression_code), "%d",
++ tif->tif_dir.td_compression );
+ TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
+ "%s compression support is not configured",
+ c ? c->name : compression_code );
+diff -Naur tiff-4.0.3.orig/libtiff/tif_dirinfo.c tiff-4.0.3/libtiff/tif_dirinfo.c
+--- tiff-4.0.3.orig/libtiff/tif_dirinfo.c 2012-08-19 12:56:34.000000000 -0400
++++ tiff-4.0.3/libtiff/tif_dirinfo.c 2013-05-02 12:02:42.784287953 -0400
+@@ -711,7 +711,7 @@
+ * note that this name is a special sign to TIFFClose() and
+ * _TIFFSetupFields() to free the field
+ */
+- sprintf(fld->field_name, "Tag %d", (int) tag);
++ snprintf(fld->field_name, 32, "Tag %d", (int) tag);
+
+ return fld;
+ }
+diff -Naur tiff-4.0.3.orig/tools/rgb2ycbcr.c tiff-4.0.3/tools/rgb2ycbcr.c
+--- tiff-4.0.3.orig/tools/rgb2ycbcr.c 2011-05-31 13:03:16.000000000 -0400
++++ tiff-4.0.3/tools/rgb2ycbcr.c 2013-05-02 12:02:42.785287961 -0400
+@@ -332,7 +332,8 @@
+ TIFFSetField(out, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
+ { char buf[2048];
+ char *cp = strrchr(TIFFFileName(in), '/');
+- sprintf(buf, "YCbCr conversion of %s", cp ? cp+1 : TIFFFileName(in));
++ snprintf(buf, sizeof(buf), "YCbCr conversion of %s",
++ cp ? cp+1 : TIFFFileName(in));
+ TIFFSetField(out, TIFFTAG_IMAGEDESCRIPTION, buf);
+ }
+ TIFFSetField(out, TIFFTAG_SOFTWARE, TIFFGetVersion());
+diff -Naur tiff-4.0.3.orig/tools/tiff2bw.c tiff-4.0.3/tools/tiff2bw.c
+--- tiff-4.0.3.orig/tools/tiff2bw.c 2010-07-08 12:10:24.000000000 -0400
++++ tiff-4.0.3/tools/tiff2bw.c 2013-05-02 12:02:42.785287961 -0400
+@@ -205,7 +205,7 @@
+ }
+ }
+ TIFFSetField(out, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK);
+- sprintf(thing, "B&W version of %s", argv[optind]);
++ snprintf(thing, sizeof(thing), "B&W version of %s", argv[optind]);
+ TIFFSetField(out, TIFFTAG_IMAGEDESCRIPTION, thing);
+ TIFFSetField(out, TIFFTAG_SOFTWARE, "tiff2bw");
+ outbuf = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(out));
+diff -Naur tiff-4.0.3.orig/tools/tiff2pdf.c tiff-4.0.3/tools/tiff2pdf.c
+--- tiff-4.0.3.orig/tools/tiff2pdf.c 2012-07-25 22:56:43.000000000 -0400
++++ tiff-4.0.3/tools/tiff2pdf.c 2013-05-02 12:02:42.788287983 -0400
+@@ -3609,7 +3609,9 @@
+ char buffer[16];
+ int buflen=0;
+
+- buflen=sprintf(buffer, "%%PDF-%u.%u ", t2p->pdf_majorversion&0xff, t2p->pdf_minorversion&0xff);
++ buflen = snprintf(buffer, sizeof(buffer), "%%PDF-%u.%u ",
++ t2p->pdf_majorversion&0xff,
++ t2p->pdf_minorversion&0xff);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t)"\n%\342\343\317\323\n", 7);
+
+@@ -3623,10 +3625,10 @@
+ tsize_t t2p_write_pdf_obj_start(uint32 number, TIFF* output){
+
+ tsize_t written=0;
+- char buffer[16];
++ char buffer[32];
+ int buflen=0;
+
+- buflen=sprintf(buffer, "%lu", (unsigned long)number);
++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)number);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen );
+ written += t2pWriteFile(output, (tdata_t) " 0 obj\n", 7);
+
+@@ -3665,13 +3667,13 @@
+ written += t2pWriteFile(output, (tdata_t) "/", 1);
+ for (i=0;i<namelen;i++){
+ if ( ((unsigned char)name[i]) < 0x21){
+- sprintf(buffer, "#%.2X", name[i]);
++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
+ buffer[sizeof(buffer) - 1] = '\0';
+ written += t2pWriteFile(output, (tdata_t) buffer, 3);
+ nextchar=1;
+ }
+ if ( ((unsigned char)name[i]) > 0x7E){
+- sprintf(buffer, "#%.2X", name[i]);
++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
+ buffer[sizeof(buffer) - 1] = '\0';
+ written += t2pWriteFile(output, (tdata_t) buffer, 3);
+ nextchar=1;
+@@ -3679,57 +3681,57 @@
+ if (nextchar==0){
+ switch (name[i]){
+ case 0x23:
+- sprintf(buffer, "#%.2X", name[i]);
++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
+ buffer[sizeof(buffer) - 1] = '\0';
+ written += t2pWriteFile(output, (tdata_t) buffer, 3);
+ break;
+ case 0x25:
+- sprintf(buffer, "#%.2X", name[i]);
++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
+ buffer[sizeof(buffer) - 1] = '\0';
+ written += t2pWriteFile(output, (tdata_t) buffer, 3);
+ break;
+ case 0x28:
+- sprintf(buffer, "#%.2X", name[i]);
++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
+ buffer[sizeof(buffer) - 1] = '\0';
+ written += t2pWriteFile(output, (tdata_t) buffer, 3);
+ break;
+ case 0x29:
+- sprintf(buffer, "#%.2X", name[i]);
++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
+ buffer[sizeof(buffer) - 1] = '\0';
+ written += t2pWriteFile(output, (tdata_t) buffer, 3);
+ break;
+ case 0x2F:
+- sprintf(buffer, "#%.2X", name[i]);
++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
+ buffer[sizeof(buffer) - 1] = '\0';
+ written += t2pWriteFile(output, (tdata_t) buffer, 3);
+ break;
+ case 0x3C:
+- sprintf(buffer, "#%.2X", name[i]);
++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
+ buffer[sizeof(buffer) - 1] = '\0';
+ written += t2pWriteFile(output, (tdata_t) buffer, 3);
+ break;
+ case 0x3E:
+- sprintf(buffer, "#%.2X", name[i]);
++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
+ buffer[sizeof(buffer) - 1] = '\0';
+ written += t2pWriteFile(output, (tdata_t) buffer, 3);
+ break;
+ case 0x5B:
+- sprintf(buffer, "#%.2X", name[i]);
++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
+ buffer[sizeof(buffer) - 1] = '\0';
+ written += t2pWriteFile(output, (tdata_t) buffer, 3);
+ break;
+ case 0x5D:
+- sprintf(buffer, "#%.2X", name[i]);
++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
+ buffer[sizeof(buffer) - 1] = '\0';
+ written += t2pWriteFile(output, (tdata_t) buffer, 3);
+ break;
+ case 0x7B:
+- sprintf(buffer, "#%.2X", name[i]);
++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
+ buffer[sizeof(buffer) - 1] = '\0';
+ written += t2pWriteFile(output, (tdata_t) buffer, 3);
+ break;
+ case 0x7D:
+- sprintf(buffer, "#%.2X", name[i]);
++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
+ buffer[sizeof(buffer) - 1] = '\0';
+ written += t2pWriteFile(output, (tdata_t) buffer, 3);
+ break;
+@@ -3844,14 +3846,14 @@
+ tsize_t t2p_write_pdf_stream_dict(tsize_t len, uint32 number, TIFF* output){
+
+ tsize_t written=0;
+- char buffer[16];
++ char buffer[32];
+ int buflen=0;
+
+ written += t2pWriteFile(output, (tdata_t) "/Length ", 8);
+ if(len!=0){
+ written += t2p_write_pdf_stream_length(len, output);
+ } else {
+- buflen=sprintf(buffer, "%lu", (unsigned long)number);
++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)number);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " 0 R \n", 6);
+ }
+@@ -3892,10 +3894,10 @@
+ tsize_t t2p_write_pdf_stream_length(tsize_t len, TIFF* output){
+
+ tsize_t written=0;
+- char buffer[16];
++ char buffer[32];
+ int buflen=0;
+
+- buflen=sprintf(buffer, "%lu", (unsigned long)len);
++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)len);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) "\n", 1);
+
+@@ -3909,7 +3911,7 @@
+ tsize_t t2p_write_pdf_catalog(T2P* t2p, TIFF* output)
+ {
+ tsize_t written = 0;
+- char buffer[16];
++ char buffer[32];
+ int buflen = 0;
+
+ written += t2pWriteFile(output,
+@@ -3948,7 +3950,6 @@
+ written += t2p_write_pdf_string(t2p->pdf_datetime, output);
+ }
+ written += t2pWriteFile(output, (tdata_t) "\n/Producer ", 11);
+- _TIFFmemset((tdata_t)buffer, 0x00, sizeof(buffer));
+ snprintf(buffer, sizeof(buffer), "libtiff / tiff2pdf - %d", TIFFLIB_VERSION);
+ written += t2p_write_pdf_string(buffer, output);
+ written += t2pWriteFile(output, (tdata_t) "\n", 1);
+@@ -4089,7 +4090,7 @@
+ {
+ tsize_t written=0;
+ tdir_t i=0;
+- char buffer[16];
++ char buffer[32];
+ int buflen=0;
+
+ int page=0;
+@@ -4097,7 +4098,7 @@
+ (tdata_t) "<< \n/Type /Pages \n/Kids [ ", 26);
+ page = t2p->pdf_pages+1;
+ for (i=0;i<t2p->tiff_pagecount;i++){
+- buflen=sprintf(buffer, "%d", page);
++ buflen=snprintf(buffer, sizeof(buffer), "%d", page);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
+ if ( ((i+1)%8)==0 ) {
+@@ -4112,8 +4113,7 @@
+ }
+ }
+ written += t2pWriteFile(output, (tdata_t) "] \n/Count ", 10);
+- _TIFFmemset(buffer, 0x00, 16);
+- buflen=sprintf(buffer, "%d", t2p->tiff_pagecount);
++ buflen=snprintf(buffer, sizeof(buffer), "%d", t2p->tiff_pagecount);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " \n>> \n", 6);
+
+@@ -4128,28 +4128,28 @@
+
+ unsigned int i=0;
+ tsize_t written=0;
+- char buffer[16];
++ char buffer[256];
+ int buflen=0;
+
+ written += t2pWriteFile(output, (tdata_t) "<<\n/Type /Page \n/Parent ", 24);
+- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_pages);
++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_pages);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " 0 R \n", 6);
+ written += t2pWriteFile(output, (tdata_t) "/MediaBox [", 11);
+- buflen=sprintf(buffer, "%.4f",t2p->pdf_mediabox.x1);
++ buflen=snprintf(buffer, sizeof(buffer), "%.4f",t2p->pdf_mediabox.x1);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " ", 1);
+- buflen=sprintf(buffer, "%.4f",t2p->pdf_mediabox.y1);
++ buflen=snprintf(buffer, sizeof(buffer), "%.4f",t2p->pdf_mediabox.y1);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " ", 1);
+- buflen=sprintf(buffer, "%.4f",t2p->pdf_mediabox.x2);
++ buflen=snprintf(buffer, sizeof(buffer), "%.4f",t2p->pdf_mediabox.x2);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " ", 1);
+- buflen=sprintf(buffer, "%.4f",t2p->pdf_mediabox.y2);
++ buflen=snprintf(buffer, sizeof(buffer), "%.4f",t2p->pdf_mediabox.y2);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) "] \n", 3);
+ written += t2pWriteFile(output, (tdata_t) "/Contents ", 10);
+- buflen=sprintf(buffer, "%lu", (unsigned long)(object + 1));
++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)(object + 1));
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " 0 R \n", 6);
+ written += t2pWriteFile(output, (tdata_t) "/Resources << \n", 15);
+@@ -4157,15 +4157,13 @@
+ written += t2pWriteFile(output, (tdata_t) "/XObject <<\n", 12);
+ for(i=0;i<t2p->tiff_tiles[t2p->pdf_page].tiles_tilecount;i++){
+ written += t2pWriteFile(output, (tdata_t) "/Im", 3);
+- buflen = sprintf(buffer, "%u", t2p->pdf_page+1);
++ buflen = snprintf(buffer, sizeof(buffer), "%u", t2p->pdf_page+1);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) "_", 1);
+- buflen = sprintf(buffer, "%u", i+1);
++ buflen = snprintf(buffer, sizeof(buffer), "%u", i+1);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " ", 1);
+- buflen = sprintf(
+- buffer,
+- "%lu",
++ buflen = snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)(object+3+(2*i)+t2p->tiff_pages[t2p->pdf_page].page_extra));
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
+@@ -4177,12 +4175,10 @@
+ } else {
+ written += t2pWriteFile(output, (tdata_t) "/XObject <<\n", 12);
+ written += t2pWriteFile(output, (tdata_t) "/Im", 3);
+- buflen = sprintf(buffer, "%u", t2p->pdf_page+1);
++ buflen = snprintf(buffer, sizeof(buffer), "%u", t2p->pdf_page+1);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " ", 1);
+- buflen = sprintf(
+- buffer,
+- "%lu",
++ buflen = snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)(object+3+(2*i)+t2p->tiff_pages[t2p->pdf_page].page_extra));
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
+@@ -4191,9 +4187,7 @@
+ if(t2p->tiff_transferfunctioncount != 0) {
+ written += t2pWriteFile(output, (tdata_t) "/ExtGState <<", 13);
+ t2pWriteFile(output, (tdata_t) "/GS1 ", 5);
+- buflen = sprintf(
+- buffer,
+- "%lu",
++ buflen = snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)(object + 3));
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
+@@ -4566,7 +4560,7 @@
+ if(t2p->tiff_tiles[t2p->pdf_page].tiles_tilecount>0){
+ for(i=0;i<t2p->tiff_tiles[t2p->pdf_page].tiles_tilecount; i++){
+ box=t2p->tiff_tiles[t2p->pdf_page].tiles_tiles[i].tile_box;
+- buflen=sprintf(buffer,
++ buflen=snprintf(buffer, sizeof(buffer),
+ "q %s %.4f %.4f %.4f %.4f %.4f %.4f cm /Im%d_%ld Do Q\n",
+ t2p->tiff_transferfunctioncount?"/GS1 gs ":"",
+ box.mat[0],
+@@ -4581,7 +4575,7 @@
+ }
+ } else {
+ box=t2p->pdf_imagebox;
+- buflen=sprintf(buffer,
++ buflen=snprintf(buffer, sizeof(buffer),
+ "q %s %.4f %.4f %.4f %.4f %.4f %.4f cm /Im%d Do Q\n",
+ t2p->tiff_transferfunctioncount?"/GS1 gs ":"",
+ box.mat[0],
+@@ -4606,59 +4600,48 @@
+ TIFF* output){
+
+ tsize_t written=0;
+- char buffer[16];
++ char buffer[32];
+ int buflen=0;
+
+ written += t2p_write_pdf_stream_dict(0, t2p->pdf_xrefcount+1, output);
+ written += t2pWriteFile(output,
+ (tdata_t) "/Type /XObject \n/Subtype /Image \n/Name /Im",
+ 42);
+- buflen=sprintf(buffer, "%u", t2p->pdf_page+1);
++ buflen=snprintf(buffer, sizeof(buffer), "%u", t2p->pdf_page+1);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ if(tile != 0){
+ written += t2pWriteFile(output, (tdata_t) "_", 1);
+- buflen=sprintf(buffer, "%lu", (unsigned long)tile);
++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)tile);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ }
+ written += t2pWriteFile(output, (tdata_t) "\n/Width ", 8);
+- _TIFFmemset((tdata_t)buffer, 0x00, 16);
+ if(tile==0){
+- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->tiff_width);
++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->tiff_width);
+ } else {
+ if(t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile-1)!=0){
+- buflen=sprintf(
+- buffer,
+- "%lu",
++ buflen=snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilewidth);
+ } else {
+- buflen=sprintf(
+- buffer,
+- "%lu",
++ buflen=snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth);
+ }
+ }
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) "\n/Height ", 9);
+- _TIFFmemset((tdata_t)buffer, 0x00, 16);
+ if(tile==0){
+- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->tiff_length);
++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->tiff_length);
+ } else {
+ if(t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile-1)!=0){
+- buflen=sprintf(
+- buffer,
+- "%lu",
++ buflen=snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilelength);
+ } else {
+- buflen=sprintf(
+- buffer,
+- "%lu",
++ buflen=snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength);
+ }
+ }
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) "\n/BitsPerComponent ", 19);
+- _TIFFmemset((tdata_t)buffer, 0x00, 16);
+- buflen=sprintf(buffer, "%u", t2p->tiff_bitspersample);
++ buflen=snprintf(buffer, sizeof(buffer), "%u", t2p->tiff_bitspersample);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) "\n/ColorSpace ", 13);
+ written += t2p_write_pdf_xobject_cs(t2p, output);
+@@ -4702,11 +4685,10 @@
+ t2p->pdf_colorspace ^= T2P_CS_PALETTE;
+ written += t2p_write_pdf_xobject_cs(t2p, output);
+ t2p->pdf_colorspace |= T2P_CS_PALETTE;
+- buflen=sprintf(buffer, "%u", (0x0001 << t2p->tiff_bitspersample)-1 );
++ buflen=snprintf(buffer, sizeof(buffer), "%u", (0x0001 << t2p->tiff_bitspersample)-1 );
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " ", 1);
+- _TIFFmemset(buffer, 0x00, 16);
+- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_palettecs );
++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_palettecs );
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " 0 R ]\n", 7);
+ return(written);
+@@ -4740,10 +4722,10 @@
+ X_W /= Y_W;
+ Z_W /= Y_W;
+ Y_W = 1.0F;
+- buflen=sprintf(buffer, "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W);
++ buflen=snprintf(buffer, sizeof(buffer), "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) "/Range ", 7);
+- buflen=sprintf(buffer, "[%d %d %d %d] \n",
++ buflen=snprintf(buffer, sizeof(buffer), "[%d %d %d %d] \n",
+ t2p->pdf_labrange[0],
+ t2p->pdf_labrange[1],
+ t2p->pdf_labrange[2],
+@@ -4759,26 +4741,26 @@
+ tsize_t t2p_write_pdf_transfer(T2P* t2p, TIFF* output){
+
+ tsize_t written=0;
+- char buffer[16];
++ char buffer[32];
+ int buflen=0;
+
+ written += t2pWriteFile(output, (tdata_t) "<< /Type /ExtGState \n/TR ", 25);
+ if(t2p->tiff_transferfunctioncount == 1){
+- buflen=sprintf(buffer, "%lu",
++ buflen=snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)(t2p->pdf_xrefcount + 1));
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
+ } else {
+ written += t2pWriteFile(output, (tdata_t) "[ ", 2);
+- buflen=sprintf(buffer, "%lu",
++ buflen=snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)(t2p->pdf_xrefcount + 1));
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
+- buflen=sprintf(buffer, "%lu",
++ buflen=snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)(t2p->pdf_xrefcount + 2));
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
+- buflen=sprintf(buffer, "%lu",
++ buflen=snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)(t2p->pdf_xrefcount + 3));
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
+@@ -4800,7 +4782,7 @@
+ written += t2pWriteFile(output, (tdata_t) "/FunctionType 0 \n", 17);
+ written += t2pWriteFile(output, (tdata_t) "/Domain [0.0 1.0] \n", 19);
+ written += t2pWriteFile(output, (tdata_t) "/Range [0.0 1.0] \n", 18);
+- buflen=sprintf(buffer, "/Size [%u] \n", (1<<t2p->tiff_bitspersample));
++ buflen=snprintf(buffer, sizeof(buffer), "/Size [%u] \n", (1<<t2p->tiff_bitspersample));
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) "/BitsPerSample 16 \n", 19);
+ written += t2p_write_pdf_stream_dict(((tsize_t)1)<<(t2p->tiff_bitspersample+1), 0, output);
+@@ -4827,7 +4809,7 @@
+ tsize_t t2p_write_pdf_xobject_calcs(T2P* t2p, TIFF* output){
+
+ tsize_t written=0;
+- char buffer[128];
++ char buffer[256];
+ int buflen=0;
+
+ float X_W=0.0;
+@@ -4895,16 +4877,16 @@
+ written += t2pWriteFile(output, (tdata_t) "<< \n", 4);
+ if(t2p->pdf_colorspace & T2P_CS_CALGRAY){
+ written += t2pWriteFile(output, (tdata_t) "/WhitePoint ", 12);
+- buflen=sprintf(buffer, "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W);
++ buflen=snprintf(buffer, sizeof(buffer), "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) "/Gamma 2.2 \n", 12);
+ }
+ if(t2p->pdf_colorspace & T2P_CS_CALRGB){
+ written += t2pWriteFile(output, (tdata_t) "/WhitePoint ", 12);
+- buflen=sprintf(buffer, "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W);
++ buflen=snprintf(buffer, sizeof(buffer), "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) "/Matrix ", 8);
+- buflen=sprintf(buffer, "[%.4f %.4f %.4f %.4f %.4f %.4f %.4f %.4f %.4f] \n",
++ buflen=snprintf(buffer, sizeof(buffer), "[%.4f %.4f %.4f %.4f %.4f %.4f %.4f %.4f %.4f] \n",
+ X_R, Y_R, Z_R,
+ X_G, Y_G, Z_G,
+ X_B, Y_B, Z_B);
+@@ -4923,11 +4905,11 @@
+ tsize_t t2p_write_pdf_xobject_icccs(T2P* t2p, TIFF* output){
+
+ tsize_t written=0;
+- char buffer[16];
++ char buffer[32];
+ int buflen=0;
+
+ written += t2pWriteFile(output, (tdata_t) "[/ICCBased ", 11);
+- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_icccs);
++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_icccs);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " 0 R] \n", 7);
+
+@@ -4937,11 +4919,11 @@
+ tsize_t t2p_write_pdf_xobject_icccs_dict(T2P* t2p, TIFF* output){
+
+ tsize_t written=0;
+- char buffer[16];
++ char buffer[32];
+ int buflen=0;
+
+ written += t2pWriteFile(output, (tdata_t) "/N ", 3);
+- buflen=sprintf(buffer, "%u \n", t2p->tiff_samplesperpixel);
++ buflen=snprintf(buffer, sizeof(buffer), "%u \n", t2p->tiff_samplesperpixel);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) "/Alternate ", 11);
+ t2p->pdf_colorspace ^= T2P_CS_ICCBASED;
+@@ -5006,7 +4988,7 @@
+ tsize_t t2p_write_pdf_xobject_stream_filter(ttile_t tile, T2P* t2p, TIFF* output){
+
+ tsize_t written=0;
+- char buffer[16];
++ char buffer[32];
+ int buflen=0;
+
+ if(t2p->pdf_compression==T2P_COMPRESS_NONE){
+@@ -5021,41 +5003,33 @@
+ written += t2pWriteFile(output, (tdata_t) "<< /K -1 ", 9);
+ if(tile==0){
+ written += t2pWriteFile(output, (tdata_t) "/Columns ", 9);
+- buflen=sprintf(buffer, "%lu",
++ buflen=snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)t2p->tiff_width);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " /Rows ", 7);
+- buflen=sprintf(buffer, "%lu",
++ buflen=snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)t2p->tiff_length);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ } else {
+ if(t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile-1)==0){
+ written += t2pWriteFile(output, (tdata_t) "/Columns ", 9);
+- buflen=sprintf(
+- buffer,
+- "%lu",
++ buflen=snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ } else {
+ written += t2pWriteFile(output, (tdata_t) "/Columns ", 9);
+- buflen=sprintf(
+- buffer,
+- "%lu",
++ buflen=snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilewidth);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ }
+ if(t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile-1)==0){
+ written += t2pWriteFile(output, (tdata_t) " /Rows ", 7);
+- buflen=sprintf(
+- buffer,
+- "%lu",
++ buflen=snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ } else {
+ written += t2pWriteFile(output, (tdata_t) " /Rows ", 7);
+- buflen=sprintf(
+- buffer,
+- "%lu",
++ buflen=snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilelength);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ }
+@@ -5082,21 +5056,17 @@
+ if(t2p->pdf_compressionquality%100){
+ written += t2pWriteFile(output, (tdata_t) "/DecodeParms ", 13);
+ written += t2pWriteFile(output, (tdata_t) "<< /Predictor ", 14);
+- _TIFFmemset(buffer, 0x00, 16);
+- buflen=sprintf(buffer, "%u", t2p->pdf_compressionquality%100);
++ buflen=snprintf(buffer, sizeof(buffer), "%u", t2p->pdf_compressionquality%100);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " /Columns ", 10);
+- _TIFFmemset(buffer, 0x00, 16);
+- buflen = sprintf(buffer, "%lu",
++ buflen = snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)t2p->tiff_width);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " /Colors ", 9);
+- _TIFFmemset(buffer, 0x00, 16);
+- buflen=sprintf(buffer, "%u", t2p->tiff_samplesperpixel);
++ buflen=snprintf(buffer, sizeof(buffer), "%u", t2p->tiff_samplesperpixel);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " /BitsPerComponent ", 19);
+- _TIFFmemset(buffer, 0x00, 16);
+- buflen=sprintf(buffer, "%u", t2p->tiff_bitspersample);
++ buflen=snprintf(buffer, sizeof(buffer), "%u", t2p->tiff_bitspersample);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) ">>\n", 3);
+ }
+@@ -5116,16 +5086,16 @@
+ tsize_t t2p_write_pdf_xreftable(T2P* t2p, TIFF* output){
+
+ tsize_t written=0;
+- char buffer[21];
++ char buffer[64];
+ int buflen=0;
+ uint32 i=0;
+
+ written += t2pWriteFile(output, (tdata_t) "xref\n0 ", 7);
+- buflen=sprintf(buffer, "%lu", (unsigned long)(t2p->pdf_xrefcount + 1));
++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)(t2p->pdf_xrefcount + 1));
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " \n0000000000 65535 f \n", 22);
+ for (i=0;i<t2p->pdf_xrefcount;i++){
+- sprintf(buffer, "%.10lu 00000 n \n",
++ snprintf(buffer, sizeof(buffer), "%.10lu 00000 n \n",
+ (unsigned long)t2p->pdf_xrefoffsets[i]);
+ written += t2pWriteFile(output, (tdata_t) buffer, 20);
+ }
+@@ -5149,17 +5119,14 @@
+ snprintf(t2p->pdf_fileid + i, 9, "%.8X", rand());
+
+ written += t2pWriteFile(output, (tdata_t) "trailer\n<<\n/Size ", 17);
+- buflen = sprintf(buffer, "%lu", (unsigned long)(t2p->pdf_xrefcount+1));
++ buflen = snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)(t2p->pdf_xrefcount+1));
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+- _TIFFmemset(buffer, 0x00, 32);
+ written += t2pWriteFile(output, (tdata_t) "\n/Root ", 7);
+- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_catalog);
++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_catalog);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+- _TIFFmemset(buffer, 0x00, 32);
+ written += t2pWriteFile(output, (tdata_t) " 0 R \n/Info ", 12);
+- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_info);
++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_info);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+- _TIFFmemset(buffer, 0x00, 32);
+ written += t2pWriteFile(output, (tdata_t) " 0 R \n/ID[<", 11);
+ written += t2pWriteFile(output, (tdata_t) t2p->pdf_fileid,
+ sizeof(t2p->pdf_fileid) - 1);
+@@ -5167,9 +5134,8 @@
+ written += t2pWriteFile(output, (tdata_t) t2p->pdf_fileid,
+ sizeof(t2p->pdf_fileid) - 1);
+ written += t2pWriteFile(output, (tdata_t) ">]\n>>\nstartxref\n", 16);
+- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_startxref);
++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_startxref);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+- _TIFFmemset(buffer, 0x00, 32);
+ written += t2pWriteFile(output, (tdata_t) "\n%%EOF\n", 7);
+
+ return(written);
+diff -Naur tiff-4.0.3.orig/tools/tiff2ps.c tiff-4.0.3/tools/tiff2ps.c
+--- tiff-4.0.3.orig/tools/tiff2ps.c 2011-05-31 13:10:18.000000000 -0400
++++ tiff-4.0.3/tools/tiff2ps.c 2013-05-02 12:02:42.789287990 -0400
+@@ -1781,8 +1781,8 @@
+ imageOp = "imagemask";
+
+ (void)strcpy(im_x, "0");
+- (void)sprintf(im_y, "%lu", (long) h);
+- (void)sprintf(im_h, "%lu", (long) h);
++ (void)snprintf(im_y, sizeof(im_y), "%lu", (long) h);
++ (void)snprintf(im_h, sizeof(im_h), "%lu", (long) h);
+ tile_width = w;
+ tile_height = h;
+ if (TIFFIsTiled(tif)) {
+@@ -1803,7 +1803,7 @@
+ }
+ if (tile_height < h) {
+ fputs("/im_y 0 def\n", fd);
+- (void)sprintf(im_y, "%lu im_y sub", (unsigned long) h);
++ (void)snprintf(im_y, sizeof(im_y), "%lu im_y sub", (unsigned long) h);
+ }
+ } else {
+ repeat_count = tf_numberstrips;
+@@ -1815,7 +1815,7 @@
+ fprintf(fd, "/im_h %lu def\n",
+ (unsigned long) tile_height);
+ (void)strcpy(im_h, "im_h");
+- (void)sprintf(im_y, "%lu im_y sub", (unsigned long) h);
++ (void)snprintf(im_y, sizeof(im_y), "%lu im_y sub", (unsigned long) h);
+ }
+ }
+
+diff -Naur tiff-4.0.3.orig/tools/tiffcrop.c tiff-4.0.3/tools/tiffcrop.c
+--- tiff-4.0.3.orig/tools/tiffcrop.c 2010-12-14 09:18:28.000000000 -0500
++++ tiff-4.0.3/tools/tiffcrop.c 2013-05-02 12:02:42.791288005 -0400
+@@ -2077,7 +2077,7 @@
+ return 1;
+ }
+
+- sprintf (filenum, "-%03d%s", findex, export_ext);
++ snprintf(filenum, sizeof(filenum), "-%03d%s", findex, export_ext);
+ filenum[14] = '\0';
+ strncat (exportname, filenum, 15);
+ }
+@@ -2230,8 +2230,8 @@
+
+ /* dump.infilename is guaranteed to be NUL termimated and have 20 bytes
+ fewer than PATH_MAX */
+- memset (temp_filename, '\0', PATH_MAX + 1);
+- sprintf (temp_filename, "%s-read-%03d.%s", dump.infilename, dump_images,
++ snprintf(temp_filename, sizeof(temp_filename), "%s-read-%03d.%s",
++ dump.infilename, dump_images,
+ (dump.format == DUMP_TEXT) ? "txt" : "raw");
+ if ((dump.infile = fopen(temp_filename, dump.mode)) == NULL)
+ {
+@@ -2249,8 +2249,8 @@
+
+ /* dump.outfilename is guaranteed to be NUL termimated and have 20 bytes
+ fewer than PATH_MAX */
+- memset (temp_filename, '\0', PATH_MAX + 1);
+- sprintf (temp_filename, "%s-write-%03d.%s", dump.outfilename, dump_images,
++ snprintf(temp_filename, sizeof(temp_filename), "%s-write-%03d.%s",
++ dump.outfilename, dump_images,
+ (dump.format == DUMP_TEXT) ? "txt" : "raw");
+ if ((dump.outfile = fopen(temp_filename, dump.mode)) == NULL)
+ {
+diff -Naur tiff-4.0.3.orig/tools/tiffdither.c tiff-4.0.3/tools/tiffdither.c
+--- tiff-4.0.3.orig/tools/tiffdither.c 2010-03-10 13:56:50.000000000 -0500
++++ tiff-4.0.3/tools/tiffdither.c 2013-05-02 12:02:42.792288013 -0400
+@@ -260,7 +260,7 @@
+ TIFFSetField(out, TIFFTAG_FILLORDER, fillorder);
+ else
+ CopyField(TIFFTAG_FILLORDER, shortv);
+- sprintf(thing, "Dithered B&W version of %s", argv[optind]);
++ snprintf(thing, sizeof(thing), "Dithered B&W version of %s", argv[optind]);
+ TIFFSetField(out, TIFFTAG_IMAGEDESCRIPTION, thing);
+ CopyField(TIFFTAG_PHOTOMETRIC, shortv);
+ CopyField(TIFFTAG_ORIENTATION, shortv);
diff --git a/media-libs/tiff/files/tiff-4.0.3-CVE-2013-4231.patch b/media-libs/tiff/files/tiff-4.0.3-CVE-2013-4231.patch
new file mode 100644
index 000000000000..c4b344602e0b
--- /dev/null
+++ b/media-libs/tiff/files/tiff-4.0.3-CVE-2013-4231.patch
@@ -0,0 +1,16 @@
+http://pkgs.fedoraproject.org/cgit/libtiff.git/plain/libtiff-CVE-2013-4231.patch
+http://bugs.gentoo.org/480466
+
+--- tools/gif2tiff.c
++++ tools/gif2tiff.c
+@@ -333,6 +333,10 @@ readraster(void)
+ int status = 1;
+
+ datasize = getc(infile);
++
++ if (datasize > 12)
++ return 0;
++
+ clear = 1 << datasize;
+ eoi = clear + 1;
+ avail = clear + 2;
diff --git a/media-libs/tiff/files/tiff-4.0.3-CVE-2013-4232.patch b/media-libs/tiff/files/tiff-4.0.3-CVE-2013-4232.patch
new file mode 100644
index 000000000000..98edff5d44d5
--- /dev/null
+++ b/media-libs/tiff/files/tiff-4.0.3-CVE-2013-4232.patch
@@ -0,0 +1,13 @@
+http://pkgs.fedoraproject.org/cgit/libtiff.git/plain/libtiff-CVE-2013-4232.patch
+http://bugs.gentoo.org/480466
+
+--- tools/tiff2pdf.c
++++ tools/tiff2pdf.c
+@@ -2462,6 +2462,7 @@ tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){
+ TIFFFileName(input));
+ t2p->t2p_error = T2P_ERR_ERROR;
+ _TIFFfree(buffer);
++ return(0);
+ } else {
+ buffer=samplebuffer;
+ t2p->tiff_datasize *= t2p->tiff_samplesperpixel;
diff --git a/media-libs/tiff/files/tiff-4.0.3-CVE-2013-4244.patch b/media-libs/tiff/files/tiff-4.0.3-CVE-2013-4244.patch
new file mode 100644
index 000000000000..792e076981a6
--- /dev/null
+++ b/media-libs/tiff/files/tiff-4.0.3-CVE-2013-4244.patch
@@ -0,0 +1,15 @@
+diff --git a/tools/gif2tiff.c b/tools/gif2tiff.c
+index 375b152..2731273 100644
+--- a/tools/gif2tiff.c
++++ b/tools/gif2tiff.c
+@@ -402,6 +402,10 @@ process(register int code, unsigned char** fill)
+ }
+
+ if (oldcode == -1) {
++ if (code >= clear) {
++ fprintf(stderr, "bad input: code=%d is larger than clear=%d\n",code, clear);
++ return 0;
++ }
+ *(*fill)++ = suffix[code];
+ firstchar = oldcode = code;
+ return 1;
diff --git a/media-libs/tiff/files/tiff-4.0.3-libjpeg-turbo.patch b/media-libs/tiff/files/tiff-4.0.3-libjpeg-turbo.patch
new file mode 100644
index 000000000000..92cff7ea4e16
--- /dev/null
+++ b/media-libs/tiff/files/tiff-4.0.3-libjpeg-turbo.patch
@@ -0,0 +1,122 @@
+Back-port upstream patch to avoid assuming quite so much about what libjpeg
+will return. Needed because libjpeg-turbo with the jpeg8 API broke the
+expectations of the previous coding.
+
+
+diff -Naur tiff-4.0.3.orig/test/raw_decode.c tiff-4.0.3/test/raw_decode.c
+--- tiff-4.0.3.orig/test/raw_decode.c 2012-07-06 13:05:16.000000000 -0400
++++ tiff-4.0.3/test/raw_decode.c 2012-12-19 13:04:37.609738276 -0500
+@@ -71,33 +71,54 @@
+ return 1;
+ }
+
+-static int check_rgb_pixel( int pixel, int red, int green, int blue, unsigned char *buffer ) {
++static int check_rgb_pixel( int pixel,
++ int min_red, int max_red,
++ int min_green, int max_green,
++ int min_blue, int max_blue,
++ unsigned char *buffer ) {
+ unsigned char *rgb = buffer + 3 * pixel;
+
+- if( rgb[0] == red && rgb[1] == green && rgb[2] == blue ) {
++ if( rgb[0] >= min_red && rgb[0] <= max_red &&
++ rgb[1] >= min_green && rgb[1] <= max_green &&
++ rgb[2] >= min_blue && rgb[2] <= max_blue ) {
+ return 0;
+ }
+
+ fprintf( stderr, "Pixel %d did not match expected results.\n", pixel );
+- fprintf( stderr, "Expect: %3d %3d %3d\n", red, green, blue );
+- fprintf( stderr, " Got: %3d %3d %3d\n", rgb[0], rgb[1], rgb[2] );
++ fprintf( stderr, "Got R=%d (expected %d..%d), G=%d (expected %d..%d), B=%d (expected %d..%d)\n",
++ rgb[0], min_red, max_red,
++ rgb[1], min_green, max_green,
++ rgb[2], min_blue, max_blue );
+ return 1;
+ }
+
+-static int check_rgba_pixel( int pixel, int red, int green, int blue, int alpha, uint32 *buffer ) {
++static int check_rgba_pixel( int pixel,
++ int min_red, int max_red,
++ int min_green, int max_green,
++ int min_blue, int max_blue,
++ int min_alpha, int max_alpha,
++ uint32 *buffer ) {
+ /* RGBA images are upside down - adjust for normal ordering */
+ int adjusted_pixel = pixel % 128 + (127 - (pixel/128)) * 128;
+ uint32 rgba = buffer[adjusted_pixel];
+
+- if( TIFFGetR(rgba) == (uint32) red && TIFFGetG(rgba) == (uint32) green &&
+- TIFFGetB(rgba) == (uint32) blue && TIFFGetA(rgba) == (uint32) alpha ) {
++ if( TIFFGetR(rgba) >= (uint32) min_red &&
++ TIFFGetR(rgba) <= (uint32) max_red &&
++ TIFFGetG(rgba) >= (uint32) min_green &&
++ TIFFGetG(rgba) <= (uint32) max_green &&
++ TIFFGetB(rgba) >= (uint32) min_blue &&
++ TIFFGetB(rgba) <= (uint32) max_blue &&
++ TIFFGetA(rgba) >= (uint32) min_alpha &&
++ TIFFGetA(rgba) <= (uint32) max_alpha ) {
+ return 0;
+ }
+
+ fprintf( stderr, "Pixel %d did not match expected results.\n", pixel );
+- fprintf( stderr, "Expect: %3d %3d %3d %3d\n", red, green, blue, alpha );
+- fprintf( stderr, " Got: %3d %3d %3d %3d\n",
+- TIFFGetR(rgba), TIFFGetG(rgba), TIFFGetB(rgba), TIFFGetA(rgba) );
++ fprintf( stderr, "Got R=%d (expected %d..%d), G=%d (expected %d..%d), B=%d (expected %d..%d), A=%d (expected %d..%d)\n",
++ TIFFGetR(rgba), min_red, max_red,
++ TIFFGetG(rgba), min_green, max_green,
++ TIFFGetB(rgba), min_blue, max_blue,
++ TIFFGetA(rgba), min_alpha, max_alpha );
+ return 1;
+ }
+
+@@ -191,15 +212,17 @@
+ return 1;
+ }
+
+-#if JPEG_LIB_VERSION >= 70
+- pixel_status |= check_rgb_pixel( 0, 18, 0, 41, buffer );
+- pixel_status |= check_rgb_pixel( 64, 0, 0, 0, buffer );
+- pixel_status |= check_rgb_pixel( 512, 5, 34, 196, buffer );
+-#else
+- pixel_status |= check_rgb_pixel( 0, 15, 0, 18, buffer );
+- pixel_status |= check_rgb_pixel( 64, 0, 0, 2, buffer );
+- pixel_status |= check_rgb_pixel( 512, 6, 36, 182, buffer );
+-#endif
++ /*
++ * JPEG decoding is inherently inexact, so we can't test for exact
++ * pixel values. (Well, if we knew exactly which libjpeg version
++ * we were using, and with what settings, we could expect specific
++ * values ... but it's not worth the trouble to keep track of.)
++ * Hence, use ranges of expected values. The ranges may need to be
++ * widened over time as more versions of libjpeg appear.
++ */
++ pixel_status |= check_rgb_pixel( 0, 15, 18, 0, 0, 18, 41, buffer );
++ pixel_status |= check_rgb_pixel( 64, 0, 0, 0, 0, 0, 2, buffer );
++ pixel_status |= check_rgb_pixel( 512, 5, 6, 34, 36, 182, 196, buffer );
+
+ free( buffer );
+
+@@ -224,15 +247,12 @@
+ * accomplish it from the YCbCr subsampled buffer ourselves in which
+ * case the results may be subtly different but similar.
+ */
+-#if JPEG_LIB_VERSION >= 70
+- pixel_status |= check_rgba_pixel( 0, 18, 0, 41, 255, rgba_buffer );
+- pixel_status |= check_rgba_pixel( 64, 0, 0, 0, 255, rgba_buffer );
+- pixel_status |= check_rgba_pixel( 512, 5, 34, 196, 255, rgba_buffer );
+-#else
+- pixel_status |= check_rgba_pixel( 0, 15, 0, 18, 255, rgba_buffer );
+- pixel_status |= check_rgba_pixel( 64, 0, 0, 2, 255, rgba_buffer );
+- pixel_status |= check_rgba_pixel( 512, 6, 36, 182, 255, rgba_buffer );
+-#endif
++ pixel_status |= check_rgba_pixel( 0, 15, 18, 0, 0, 18, 41, 255, 255,
++ rgba_buffer );
++ pixel_status |= check_rgba_pixel( 64, 0, 0, 0, 0, 0, 2, 255, 255,
++ rgba_buffer );
++ pixel_status |= check_rgba_pixel( 512, 5, 6, 34, 36, 182, 196, 255, 255,
++ rgba_buffer );
+
+ free( rgba_buffer );
+ TIFFClose(tif);
diff --git a/media-libs/tiff/files/tiff-4.0.3-tiff2pdf-colors.patch b/media-libs/tiff/files/tiff-4.0.3-tiff2pdf-colors.patch
new file mode 100644
index 000000000000..a503444b107c
--- /dev/null
+++ b/media-libs/tiff/files/tiff-4.0.3-tiff2pdf-colors.patch
@@ -0,0 +1,15 @@
+http://bugs.gentoo.org/145055
+
+http://build.opensuse.org/package/view_file?file=tiff-4.0.2-tiff2pdf-colors.patch&package=tiff&project=openSUSE%3AFactory
+
+--- tools/tiff2pdf.c
++++ tools/tiff2pdf.c
+@@ -4991,7 +4991,7 @@
+
+ if(t2p->tiff_photometric != PHOTOMETRIC_YCBCR) {
+ written += t2pWriteFile(output, (tdata_t) "/DecodeParms ", 13);
+- written += t2pWriteFile(output, (tdata_t) "<< /ColorTransform 0 >>\n", 24);
++ written += t2pWriteFile(output, (tdata_t) "<< /ColorTransform 1 >>\n", 24);
+ }
+ break;
+ #endif
diff --git a/media-libs/tiff/metadata.xml b/media-libs/tiff/metadata.xml
new file mode 100644
index 000000000000..fee1dc15ab8d
--- /dev/null
+++ b/media-libs/tiff/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>graphics</herd>
+<longdescription>TIFF image library and tools, mostly for scanner and fax
+ support, but also used by GIS and other imaging tools.</longdescription>
+</pkgmetadata>
diff --git a/media-libs/tiff/tiff-3.9.7-r1.ebuild b/media-libs/tiff/tiff-3.9.7-r1.ebuild
new file mode 100644
index 000000000000..4d32404e5da6
--- /dev/null
+++ b/media-libs/tiff/tiff-3.9.7-r1.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# this ebuild is only for the libtiff.so.3 (+ 4) and libtiffxx.so.3 (+ 4) SONAME for ABI compat
+
+inherit eutils libtool multilib multilib-minimal
+
+DESCRIPTION="Library for manipulation of TIFF (Tag Image File Format) images"
+HOMEPAGE="http://www.remotesensing.org/libtiff/"
+SRC_URI="ftp://ftp.remotesensing.org/pub/libtiff/${P}.tar.gz"
+
+LICENSE="libtiff"
+SLOT="3"
+KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 m68k ~mips ~ppc ~ppc64 s390 sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="+cxx jbig jpeg zlib"
+
+RDEPEND="jpeg? ( >=virtual/jpeg-0-r2[${MULTILIB_USEDEP}] )
+ jbig? ( >=media-libs/jbigkit-2.1[${MULTILIB_USEDEP}] )
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
+ !media-libs/tiff-compat
+ !=media-libs/tiff-3*:0
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20130224-r10
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ )"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-CVE-2012-{4447,4564,5581}.patch \
+ "${FILESDIR}"/${P}-tiffinfo-exif.patch \
+ "${FILESDIR}"/${P}-printdir-width.patch
+
+ elibtoolize
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ --libdir=/libdir \
+ --disable-static \
+ $(use_enable cxx) \
+ $(use_enable zlib) \
+ $(use_enable jpeg) \
+ $(use_enable jbig) \
+ --without-x
+}
+
+multilib_src_install() {
+ # Let `make install` and libtool handle insecure runpath(s)
+ dodir tmp
+ emake DESTDIR="${ED}/tmp" install
+
+ # .so.3 (upstream) is used by sci-chemistry/icm
+ # .so.4 (Debian) is used by net-im/skype
+ exeinto /usr/$(get_libdir)
+ doexe "${ED}"/tmp/libdir/libtiff$(get_libname 3)
+ dosym libtiff$(get_libname 3) /usr/$(get_libdir)/libtiff$(get_libname 4)
+ if use cxx; then
+ doexe "${ED}"/tmp/libdir/libtiffxx$(get_libname 3)
+ dosym libtiffxx$(get_libname 3) /usr/$(get_libdir)/libtiffxx$(get_libname 4)
+ fi
+
+ rm -rf "${ED}"/tmp
+}
+
+multilib_src_install_all() {
+ # (avoid installing docs)
+ :
+}
diff --git a/media-libs/tiff/tiff-4.0.3-r6.ebuild b/media-libs/tiff/tiff-4.0.3-r6.ebuild
new file mode 100644
index 000000000000..b893a65173da
--- /dev/null
+++ b/media-libs/tiff/tiff-4.0.3-r6.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils libtool multilib-minimal
+
+DESCRIPTION="Tag Image File Format (TIFF) library"
+HOMEPAGE="http://www.remotesensing.org/libtiff/"
+SRC_URI="http://download.osgeo.org/libtiff/${P}.tar.gz
+ ftp://ftp.remotesensing.org/pub/libtiff/${P}.tar.gz"
+
+LICENSE="libtiff"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="+cxx jbig jpeg lzma static-libs test zlib"
+
+RDEPEND="jpeg? ( >=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}] )
+ jbig? ( >=media-libs/jbigkit-2.1:=[${MULTILIB_USEDEP}] )
+ lzma? ( >=app-arch/xz-utils-5.0.5-r1:=[${MULTILIB_USEDEP}] )
+ zlib? ( >=sys-libs/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20130224-r9
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ )"
+DEPEND="${RDEPEND}"
+
+REQUIRED_USE="test? ( jpeg )" #483132
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/tiffconf.h
+)
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-4.0.3-tiff2pdf-colors.patch #145055
+ epatch "${FILESDIR}"/${P}-CVE-2012-{4447,4564}.patch #440944
+ epatch "${FILESDIR}"/${P}-CVE-2013-{1960,1961}.patch #468334
+ epatch "${FILESDIR}"/${P}-CVE-2013-{4231,4232}.patch #480466
+ epatch "${FILESDIR}"/${P}-CVE-2013-4244.patch #486590
+ epatch "${FILESDIR}"/${P}-libjpeg-turbo.patch
+
+ elibtoolize
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ $(use_enable static-libs static) \
+ $(use_enable zlib) \
+ $(use_enable jpeg) \
+ $(use_enable jbig) \
+ $(use_enable lzma) \
+ $(use_enable cxx) \
+ --without-x \
+ --with-docdir="${EPREFIX}"/usr/share/doc/${PF}
+
+ # remove useless subdirs
+ if ! multilib_is_native_abi ; then
+ sed -i \
+ -e 's/ tools//' \
+ -e 's/ contrib//' \
+ -e 's/ man//' \
+ -e 's/ html//' \
+ Makefile || die
+ fi
+}
+
+multilib_src_test() {
+ if ! multilib_is_native_abi ; then
+ cd tools
+ emake
+ cd "${BUILD_DIR}"
+ fi
+ emake check
+}
+
+multilib_src_install_all() {
+ prune_libtool_files --all
+ rm -f "${ED}"/usr/share/doc/${PF}/{COPYRIGHT,README*,RELEASE-DATE,TODO,VERSION}
+}
diff --git a/media-libs/tremor/Manifest b/media-libs/tremor/Manifest
new file mode 100644
index 000000000000..b01465205798
--- /dev/null
+++ b/media-libs/tremor/Manifest
@@ -0,0 +1,2 @@
+DIST tremor-0_pre20120120.tar.xz 110008 SHA256 4caa4711c41fd190f0be6c2d8ef78cfd5027c71d3a0588f1b9a3608595afd42e SHA512 42efe2cbc5dd301b413a9293e152cd687c0d897ea47a33b1aee2d291fded26899bee9a6c40c7cfff427cd43ae62200c7ad059cdaeb7201461171fffb772e5303 WHIRLPOOL 277526d90635c30fd50dc0e2a78f0ad93e55011fcce9b487195847b879efd50f40c6646b331ba28053e570dcdd81f896039ef2107c2eb0e3970a5eb20bbe3b06
+DIST tremor-0_pre20130223.tar.xz 110096 SHA256 b068d605422ed72e5379b5b7cef055a72e075e7df028dac1524a35be6f298d19 SHA512 3fc109dfc6f9f33da9d2da7d5c1708d6fe4b22179048c4acd5b4b037eafbdda392d5ba74ffec5d8a225d56ebd860f67d28e4460f0b54cb170152a0b9fd89c514 WHIRLPOOL 0df61b4e488a853b75e8a7431627478d5a09de6318403cb5db8e2d84c9b581c0cdda3a3f2cd92328bb50522da3fbad33084432c74fb0e8a85f385dbbdbfb61e5
diff --git a/media-libs/tremor/metadata.xml b/media-libs/tremor/metadata.xml
new file mode 100644
index 000000000000..39ff19909ce8
--- /dev/null
+++ b/media-libs/tremor/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>sound</herd>
+ <use>
+ <flag name='low-accuracy'>enable 32bit only multiply operations</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/tremor/tremor-0_pre20120120.ebuild b/media-libs/tremor/tremor-0_pre20120120.ebuild
new file mode 100644
index 000000000000..b14da3934b3f
--- /dev/null
+++ b/media-libs/tremor/tremor-0_pre20120120.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# svn export http://svn.xiph.org/trunk/Tremor tremor-${PV}
+
+EAPI=4
+inherit autotools
+
+DESCRIPTION="A fixed-point version of the Ogg Vorbis decoder (also known as libvorbisidec)"
+HOMEPAGE="http://wiki.xiph.org/Tremor"
+SRC_URI="mirror://gentoo/${P}.tar.xz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 arm hppa ppc ppc64 sparc x86 ~amd64-fbsd"
+IUSE="static-libs"
+
+RDEPEND="media-libs/libogg"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS="CHANGELOG README"
+
+src_prepare() {
+ sed -i -e '/CFLAGS/s:-O2::' configure.in || die
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ dohtml -r doc/*
+ rm -f "${ED}"usr/lib*/lib*.la
+}
diff --git a/media-libs/tremor/tremor-0_pre20130223-r1.ebuild b/media-libs/tremor/tremor-0_pre20130223-r1.ebuild
new file mode 100644
index 000000000000..be773e66d466
--- /dev/null
+++ b/media-libs/tremor/tremor-0_pre20130223-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# svn export http://svn.xiph.org/trunk/Tremor tremor-${PV}
+
+inherit autotools eutils multilib-minimal
+
+DESCRIPTION="A fixed-point version of the Ogg Vorbis decoder (also known as libvorbisidec)"
+HOMEPAGE="http://wiki.xiph.org/Tremor"
+SRC_URI="http://dev.gentoo.org/~ssuominen/${P}.tar.xz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 arm hppa ppc ppc64 sparc x86 ~amd64-fbsd"
+IUSE="low-accuracy static-libs"
+
+RDEPEND=">=media-libs/libogg-1.3.0:=[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS=( "CHANGELOG" "README" )
+
+src_prepare() {
+ sed -i \
+ -e '/CFLAGS/s:-O2::' \
+ -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' \
+ configure.in || die
+
+ eautoreconf
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ $(use_enable static-libs static) \
+ $(use_enable low-accuracy)
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ dohtml -r doc/*
+ prune_libtool_files
+}
diff --git a/media-libs/tremor/tremor-0_pre20130223.ebuild b/media-libs/tremor/tremor-0_pre20130223.ebuild
new file mode 100644
index 000000000000..42f7e6df263b
--- /dev/null
+++ b/media-libs/tremor/tremor-0_pre20130223.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# svn export http://svn.xiph.org/trunk/Tremor tremor-${PV}
+
+inherit autotools eutils
+
+DESCRIPTION="A fixed-point version of the Ogg Vorbis decoder (also known as libvorbisidec)"
+HOMEPAGE="http://wiki.xiph.org/Tremor"
+SRC_URI="http://dev.gentoo.org/~ssuominen/${P}.tar.xz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd"
+IUSE="low-accuracy static-libs"
+
+RDEPEND="media-libs/libogg:="
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS="CHANGELOG README"
+
+src_prepare() {
+ sed -i \
+ -e '/CFLAGS/s:-O2::' \
+ -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' \
+ configure.in || die
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable low-accuracy)
+}
+
+src_install() {
+ default
+ dohtml -r doc/*
+ prune_libtool_files
+}
diff --git a/media-libs/tse3/Manifest b/media-libs/tse3/Manifest
new file mode 100644
index 000000000000..6283b3f2b690
--- /dev/null
+++ b/media-libs/tse3/Manifest
@@ -0,0 +1,2 @@
+DIST tse3-0.3.1-awe_voice.h.tbz2 5681 SHA256 46167594fbdee44933fb7be0d5ae56c27ab1d107bd6cae6fab7b5d4dcafc88b5
+DIST tse3-0.3.1.tar.gz 755666 SHA256 780e1669789e762f489029c53f2fc6c571ba24740290ed0717bc1dcb7d547ba6
diff --git a/media-libs/tse3/files/tse3-0.2.7-gcc4.patch b/media-libs/tse3/files/tse3-0.2.7-gcc4.patch
new file mode 100644
index 000000000000..ed92ded207ab
--- /dev/null
+++ b/media-libs/tse3/files/tse3-0.2.7-gcc4.patch
@@ -0,0 +1,10 @@
+--- ./src/tse3/cmd/Phrase.h~ 2002-07-28 17:17:11.000000000 +0200
++++ ./src/tse3/cmd/Phrase.h 2005-07-29 15:45:03.000000000 +0200
+@@ -19,6 +19,7 @@
+
+ #include "tse3/cmd/Command.h"
+ #include "tse3/Phrase.h"
++#include "tse3/PhraseEdit.h"
+ #include "tse3/DisplayParams.h"
+
+ #include <vector>
diff --git a/media-libs/tse3/files/tse3-0.2.7-size_t-64bit.patch b/media-libs/tse3/files/tse3-0.2.7-size_t-64bit.patch
new file mode 100644
index 000000000000..29c54edc084f
--- /dev/null
+++ b/media-libs/tse3/files/tse3-0.2.7-size_t-64bit.patch
@@ -0,0 +1,25 @@
+--- src/tse3/file/XML.h.orig 2002-07-28 18:17:11.000000000 +0300
++++ src/tse3/file/XML.h 2004-04-25 14:51:56.000000000 +0300
+@@ -154,6 +154,7 @@
+ void element(const std::string &name, const char *value);
+ void element(const std::string &name, int value);
+ void element(const std::string &name, unsigned int value);
++ void element(const std::string &name, unsigned long value);
+ void element(const std::string &name, bool value);
+
+ void comment(const std::string &comment);
+--- src/tse3/file/XML.cpp.orig 2002-07-28 18:17:11.000000000 +0300
++++ src/tse3/file/XML.cpp 2004-04-25 14:54:01.000000000 +0300
+@@ -116,6 +116,12 @@
+ out << "<" << name << " value=\"" << value << "\"/>\n";
+ }
+
++void TSE3::File::XmlFileWriter::element(const std::string &name, unsigned long value)
++{
++ indent(out);
++ out << "<" << name << " value=\"" << value << "\"/>\n";
++}
++
+
+ void TSE3::File::XmlFileWriter::element(const std::string &name, bool value)
+ {
diff --git a/media-libs/tse3/files/tse3-0.3.1+gcc-4.3.patch b/media-libs/tse3/files/tse3-0.3.1+gcc-4.3.patch
new file mode 100644
index 000000000000..4581da9d0bf7
--- /dev/null
+++ b/media-libs/tse3/files/tse3-0.3.1+gcc-4.3.patch
@@ -0,0 +1,80 @@
+--- src/tse3/Serializable.h.orig 2008-06-08 12:17:05.000000000 +0200
++++ src/tse3/Serializable.h 2008-06-08 12:17:27.000000000 +0200
+@@ -20,6 +20,7 @@
+ #include <iosfwd>
+ #include <iomanip>
+ #include <cstddef>
++#include <fstream>
+
+ namespace TSE3
+ {
+
+--- src/tse3/TSE2MDL.h.orig 2008-06-08 12:17:41.000000000 +0200
++++ src/tse3/TSE2MDL.h 2008-06-08 12:18:02.000000000 +0200
+@@ -22,6 +22,7 @@
+ #include <string>
+ #include <iostream>
+ #include <cstddef>
++#include <cstring>
+
+ namespace TSE3
+ {
+
+--- src/tse3/MidiFile.h.orig 2008-06-08 12:18:26.000000000 +0200
++++ src/tse3/MidiFile.h 2008-06-08 12:18:42.000000000 +0200
+@@ -25,6 +25,7 @@
+ #include <string>
+ #include <iosfwd>
+ #include <cstddef>
++#include <cstring>
+
+ namespace TSE3
+ {
+--- src/examples/recording/recording.cpp.orig 2008-06-08 12:18:56.000000000 +0200
++++ src/examples/recording/recording.cpp 2008-06-08 12:19:18.000000000 +0200
+@@ -26,6 +26,7 @@
+ *
+ **************************************************************/
+
++#include <cstdlib>
+ #include <iostream>
+
+ // Used in step 1
+
+--- src/tse3play/tse3play.h.orig 2008-06-08 12:19:34.000000000 +0200
++++ src/tse3play/tse3play.h 2008-06-08 12:19:53.000000000 +0200
+@@ -19,6 +19,7 @@
+
+ #include <string>
+ #include <list>
++#include <cstdlib>
+
+ #include "tse3/Transport.h"
+
+--- src/tse3/plt/Alsa-0.9.cpp.orig 2008-06-08 12:39:53.000000000 +0200
++++ src/tse3/plt/Alsa-0.9.cpp 2008-06-08 12:40:25.000000000 +0200
+@@ -25,12 +25,11 @@
+ #define HAVE_SYS_ASOUNDLIB_H
+ #endif
+
+-#define _GNU_SOURCE
+ #include <sys/stat.h>
+ #include <errno.h>
+ #include <alloca.h>
+ #if HAVE_ALSA_ASOUNDLIB_H
+-#include <sys/asoundlib.h>
++#include <alsa/asoundlib.h>
+ #elif HAVE_SYS_ASOUNDLIB_H
+ #include <sys/asoundlib.h>
+ #endif
+
+--- src/tse3/plt/OSS.h.orig 2008-06-08 12:45:46.000000000 +0200
++++ src/tse3/plt/OSS.h 2008-06-08 12:46:06.000000000 +0200
+@@ -21,6 +21,7 @@
+
+ #include <string>
+ #include <list>
++#include <cstring>
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
diff --git a/media-libs/tse3/files/tse3-0.3.1-parallelmake.patch b/media-libs/tse3/files/tse3-0.3.1-parallelmake.patch
new file mode 100644
index 000000000000..b4fc927a7183
--- /dev/null
+++ b/media-libs/tse3/files/tse3-0.3.1-parallelmake.patch
@@ -0,0 +1,11 @@
+--- src/tse3/Makefile.am.old 2007-02-06 23:57:38.000000000 +0100
++++ src/tse3/Makefile.am 2007-02-07 00:08:01.000000000 +0100
+@@ -53,7 +53,7 @@
+
+ noinst_PROGRAMS = test
+ test_SOURCES = test.cpp
+-test_LDADD = $(top_builddir)/src/tse3/libtse3.la
++test_LDADD = ./libtse3.la
+
+ # McCabe .i file generation
+
diff --git a/media-libs/tse3/metadata.xml b/media-libs/tse3/metadata.xml
new file mode 100644
index 000000000000..715950308ec2
--- /dev/null
+++ b/media-libs/tse3/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>sound</herd>
+ <upstream>
+ <remote-id type="sourceforge">tse3</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/tse3/tse3-0.3.1-r1.ebuild b/media-libs/tse3/tse3-0.3.1-r1.ebuild
new file mode 100644
index 000000000000..0d16b5d99a03
--- /dev/null
+++ b/media-libs/tse3/tse3-0.3.1-r1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit autotools eutils flag-o-matic
+
+DESCRIPTION="TSE3 Sequencer library"
+HOMEPAGE="http://TSE3.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz
+ mirror://gentoo/${P}-awe_voice.h.tbz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc sparc x86"
+IUSE="alsa oss"
+
+RDEPEND="alsa? ( media-libs/alsa-lib )"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ if use oss; then
+ cp "${WORKDIR}"/awe_voice.h src/
+ append-flags -DHAVE_AWE_VOICE_H
+ fi
+
+ epatch "${FILESDIR}"/${PN}-0.2.7-size_t-64bit.patch \
+ "${FILESDIR}"/${PN}-0.2.7-gcc4.patch \
+ "${FILESDIR}"/${P}-parallelmake.patch \
+ "${FILESDIR}"/${P}+gcc-4.3.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ local myconf
+
+ use alsa || myconf="${myconf} --without-alsa"
+ use oss || myconf="${myconf} --without-oss"
+
+ econf \
+ --without-doc-install \
+ --without-aRts \
+ ${myconf}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ dodoc AUTHORS NEWS README THANKS TODO doc/History
+ dohtml doc/*.{html,gif,png}
+}
diff --git a/media-libs/urt/Manifest b/media-libs/urt/Manifest
new file mode 100644
index 000000000000..98300a9bde3b
--- /dev/null
+++ b/media-libs/urt/Manifest
@@ -0,0 +1 @@
+DIST urt-3.1b.tar.Z 1016405 SHA256 6d8b67f03507818ebdca3a342c96454780cc5eadcc58ac2713cbcdfdb61a6b41 SHA512 6c9070cd106f1d696d22f862cc1c4e10325fafc7bae51e8bb1fb98f6bf8babe21a133e21b3acc0c11cf1b28a23123c8ee7bb064c9d86301b14a1c217fbe1a12d WHIRLPOOL 8930cafe6391f5164bde8c464d2b3af08b740c500639f1bfc846dbec0b4285f6653b537c11c53ef992c9078e15466cb9597270605e5deee05f0991a0fed6ecf1
diff --git a/media-libs/urt/files/gentoo-config b/media-libs/urt/files/gentoo-config
new file mode 100644
index 000000000000..3ad38b961166
--- /dev/null
+++ b/media-libs/urt/files/gentoo-config
@@ -0,0 +1,53 @@
+#define ABEKASA60
+##define ABEKASA62 bug #455970
+#define ALIAS
+##define CGM
+#define CUBICOMP
+##define DVIRLE
+#define GRAYFILES
+#define MACPAINT
+##define PBMPLUS
+##define SUNRASTER
+#define TARGA
+#define VICAR
+#define WASATCH
+#define WAVEFRONT
+
+#define GCC
+
+#define CONST_DECL
+#define NO_MAKE_MAKEFILE
+#define USE_TIME_H
+#define SYS_V_SETPGRP
+#define USE_PROTOTYPES
+#define USE_RANDOM
+#define USE_STDARG
+#define USE_STDLIB_H
+#define USE_UNISTD_H
+#define USE_STRING_H
+#define VOID_STAR
+#define USE_XLIBINT_H
+#define X_SHARED_MEMORY
+
+#defpath DEST bin
+#defpath MAN_DEST man-dest
+#defpath RI include
+#defpath RL lib
+
+ROFF = nroff
+ROFFOPT = -man
+ROFFPIPE = | lpr
+
+INCTIFF =
+LIBTIFF = -ltiff
+INCX11 =
+LIBX11 = -lX11
+
+# Most people have migrated X11 to /usr/lib, but just in case ...
+check_x11=$(shell \
+ echo 'int main(){}' > test.c ; \
+ if ! $(CC) test.c -lX11 -o .urt-x11-test 2>/dev/null ; then \
+ echo "-L/usr/X11R6/lib" ; \
+ fi ; \
+ rm -f .urt-x11-test test.c)
+LIBX11 += $(call check_x11)
diff --git a/media-libs/urt/files/urt-3.1b-build-fixes.patch b/media-libs/urt/files/urt-3.1b-build-fixes.patch
new file mode 100644
index 000000000000..28da6b9b66d9
--- /dev/null
+++ b/media-libs/urt/files/urt-3.1b-build-fixes.patch
@@ -0,0 +1,151 @@
+some hosts are more anal about ar usage than others
+http://bugs.gentoo.org/107428
+
+respect user LDFLAGS
+http://bugs.gentoo.org/126872
+
+--- urt/lib/makefile.src
++++ urt/lib/makefile.src
+@@ -181,8 +181,7 @@
+ # Rebuild the library from all the .o files.
+ buildlib: $(OBJS)
+ -rm -f $(LIBNAME)
+- ar rc $(LIBNAME)
+- ar q $(LIBNAME) $(OBJS)
++ ar rc $(LIBNAME) $(OBJS)
+ #ifndef NO_RANLIB
+ ranlib $(LIBNAME)
+ #endif
+--- urt/tools/clock/makefile.src
++++ urt/tools/clock/makefile.src
+@@ -6,7 +6,7 @@ install: rleClock
+ mv rleClock ../rleClock.out
+
+ rleClock:rleClock.o font.o
+- ${CC} ${CFLAGS} rleClock.o font.o -lm ${LIBS} -o rleClock
++ ${CC} ${CFLAGS} ${LDFLAGS} rleClock.o font.o ${LIBS} -o rleClock -lm
+
+ font.c:font.src makeFont
+ chmod +x makeFont
+--- urt/tools/makefile.src
++++ urt/tools/makefile.src
+@@ -62,21 +62,21 @@ applymap.out rlebg.out: $(RI)/rle_raw.h
+ pyrlib.o: pyrlib.c $(RI)/pyramid.h $(RI)/rle.h $(RI)/rle_config.h
+ $(CC) $(CFLAGS) pyrlib.c -c
+ pyrmask.out: pyrlib.o pyrmask.c $(RI)/pyramid.h
+- $(CC) $(CFLAGS) -I$(RI) pyrmask.c pyrlib.o $(LIBS) -lm -o pyrmask.new
++ $(CC) $(LDFLAGS) $(CFLAGS) -I$(RI) pyrmask.c pyrlib.o $(LIBS) -lm -o pyrmask.new
+ mv pyrmask.new pyrmask.out
+
+ fant.out: fant.o mallocNd.o
+- $(CC) $(CFLAGS) -I$(RI) fant.o mallocNd.o $(LIBS) -lm -o fant.new
++ $(CC) $(LDFLAGS) $(CFLAGS) -I$(RI) fant.o mallocNd.o $(LIBS) -lm -o fant.new
+ mv fant.new fant.out
+
+ # rlebox and crop use some common code.
+ rle_box.o: $(RI)/rle.h $(RI)/rle_config.h $(RI)/rle_raw.h
+
+ crop.out: crop.c rle_box.o
+- ${CC} ${CFLAGS} crop.c rle_box.o ${LIBS} -o crop.new
++ ${CC} ${LDFLAGS} ${CFLAGS} crop.c rle_box.o ${LIBS} -o crop.new
+ mv crop.new crop.out
+ rlebox.out: rlebox.c rle_box.o
+- ${CC} ${CFLAGS} rlebox.c rle_box.o ${LIBS} -o rlebox.new
++ ${CC} ${LDFLAGS} ${CFLAGS} rlebox.c rle_box.o ${LIBS} -o rlebox.new
+ mv rlebox.new rlebox.out
+
+ # rleClock has it's own directory, must be built special
+@@ -100,7 +100,7 @@ clean: clean-pgm
+ .SUFFIXES:
+ .SUFFIXES: .out .c .o
+ .c.out:
+- $(CC) $(CFLAGS) $< $(LIBS) -lm -o $*.new
++ $(CC) $(LDFLAGS) $(CFLAGS) $< $(LIBS) -lm -o $*.new
+ mv $*.new $@
+
+ .c.o:
+--- urt/cnv/makefile.src
++++ urt/cnv/makefile.src
+@@ -76,13 +76,13 @@ PBMDIR =
+ # ppmtorle - ppm format to RLE
+ # rletoppm - RLE to ppm format
+ pgmtorle.out: pgmtorle.c
+- $(CC) $(CFLAGS) $(INCPBMPLUS) $*.c $(LIBS) $(LIBPBMPLUS) -o $*.new
++ $(CC) $(CFLAGS) $(LDFLAGS) $(INCPBMPLUS) $*.c $(LIBS) $(LIBPBMPLUS) -o $*.new
+ mv $*.new $@
+ ppmtorle.out: ppmtorle.c
+- $(CC) $(CFLAGS) $(INCPBMPLUS) $*.c $(LIBS) $(LIBPBMPLUS) -o $*.new
++ $(CC) $(CFLAGS) $(LDFLAGS) $(INCPBMPLUS) $*.c $(LIBS) $(LIBPBMPLUS) -o $*.new
+ mv $*.new $@
+ rletoppm.out: rletoppm.c
+- $(CC) $(CFLAGS) $(INCPBMPLUS) $*.c $(LIBS) $(LIBPBMPLUS) -o $*.new
++ $(CC) $(CFLAGS) $(LDFLAGS) $(INCPBMPLUS) $*.c $(LIBS) $(LIBPBMPLUS) -o $*.new
+ mv $*.new $@
+ #endif
+
+@@ -95,10 +95,10 @@ rletoppm.out: rletoppm.c
+ # iristorle/rletoiris - Convert between RLE and SGI image format.
+ #
+ iristorle.out: iristorle.c
+- $(CC) $(CFLAGS) -I/usr/include/gl $*.c $(LIBS) -limage -o $*.new
++ $(CC) $(CFLAGS) $(LDFLAGS) -I/usr/include/gl $*.c $(LIBS) -limage -o $*.new
+ mv $*.new $@
+ rletoiris.out: rletoiris.c
+- $(CC) $(CFLAGS) -I/usr/include/gl $*.c $(LIBS) -limage -o $*.new
++ $(CC) $(CFLAGS) $(LDFLAGS) -I/usr/include/gl $*.c $(LIBS) -limage -o $*.new
+ mv $*.new $@
+ #endif
+
+@@ -108,10 +108,10 @@ TIFFDIR =
+ # tifftorle - Convert TIFF images to RLE
+ # rletotiff - Convert RLE images to TIFF
+ rletotiff.out: rletotiff.c
+- $(CC) $(CFLAGS) $(INCTIFF) $*.c $(LIBS) $(LIBTIFF) -lm -o $*.new
++ $(CC) $(CFLAGS) $(LDFLAGS) $(INCTIFF) $*.c $(LIBS) $(LIBTIFF) -lm -o $*.new
+ mv $*.new $@
+ tifftorle.out: tifftorle.c
+- $(CC) $(CFLAGS) $(INCTIFF) $*.c $(LIBS) $(LIBTIFF) -lm -o $*.new
++ $(CC) $(CFLAGS) $(LDFLAGS) $(INCTIFF) $*.c $(LIBS) $(LIBTIFF) -lm -o $*.new
+ mv $*.new $@
+ #endif
+
+@@ -125,7 +125,7 @@ tifftorle.out: tifftorle.c
+ # Will build with the default rule.
+ # rletorla - RLE to Wavefront RLA
+ rletorla.out: rletorla.c
+- $(CC) $(CFLAGS) $*.c $(LIBS) $(LIBWAVEFRONT) -lm -o $*.new
++ $(CC) $(CFLAGS) $(LDFLAGS) $*.c $(LIBS) $(LIBWAVEFRONT) -lm -o $*.new
+ mv $*.new $@
+ #endif WAVEFRONT
+
+@@ -144,7 +144,7 @@ pristine: pristine-pgm
+ .SUFFIXES:
+ .SUFFIXES: .out .c
+ .c.out:
+- $(CC) $(CFLAGS) $*.c $(LIBS) -lm -o $*.new
++ $(CC) $(CFLAGS) $(LDFLAGS) $*.c $(LIBS) -lm -o $*.new
+ mv $*.new $@
+
+ # Dependency lines. Make sure to #ifdef them.
+--- urt/cnv/rletoabA62/makefile.src
++++ urt/cnv/rletoabA62/makefile.src
+@@ -15,7 +15,7 @@ all : $(PGMS)
+ # Executables. The .out will be stripped off in the install action.
+
+ rletoabA62.out : rletoabA62.o rle.o
+- $(CC) $(CFLAGS) -o rletoabA62.new \
++ $(CC) $(CFLAGS) $(LDFLAGS) -o rletoabA62.new \
+ rletoabA62.o rle.o $(LIBS)
+ mv rletoabA62.new rletoabA62.out
+
+--- urt/cnv/rletogif/makefile.src
++++ urt/cnv/rletogif/makefile.src
+@@ -15,7 +15,7 @@ all: $(PGMS)
+ # The executable. The ".out" will be stripped off in the install action.
+
+ rletogif.out: ${OBJ}
+- ${CC} ${CFLAGS} ${OBJ} ${LIBS} -o rletogif.new
++ ${CC} ${CFLAGS} ${LDFLAGS} ${OBJ} ${LIBS} -o rletogif.new
+ mv rletogif.new rletogif.out
+
+ # Incremental install, copies executable to DEST dir.
diff --git a/media-libs/urt/files/urt-3.1b-compile-updates.patch b/media-libs/urt/files/urt-3.1b-compile-updates.patch
new file mode 100644
index 000000000000..105f7c41f6a7
--- /dev/null
+++ b/media-libs/urt/files/urt-3.1b-compile-updates.patch
@@ -0,0 +1,141 @@
+--- get/getx11/XGetHClrs.c
++++ get/getx11/XGetHClrs.c
+@@ -1,5 +1,4 @@
+ #ifndef XLIBINT_H_NOT_AVAILABLE
+-#include <X11/copyright.h>
+
+ /* $XConsortium: XGetHClrs.c,v 11.10 88/09/06 16:07:50 martin Exp $ */
+ /* Copyright Massachusetts Institute of Technology 1986 */
+--- tools/mallocNd.c
++++ tools/mallocNd.c
+@@ -67,7 +67,7 @@
+
+ /* Imports */
+ #include <stdio.h>
+-extern char *malloc();
++#include <string.h>
+
+ /* Forward declarations */
+ char *BuildIndirectionTable();
+--- tools/into.c
++++ tools/into.c
+@@ -40,8 +40,8 @@
+ static char buf[MAXPATHLEN+1];
+ short forceflg; /* overwrite an unwritable file? */
+
+-extern int errno;
+-extern char *sys_errlist[];
++#include <errno.h>
++#include <string.h>
+
+ void
+ main(argc, argv)
+@@ -103,7 +103,7 @@
+ if (ferror(outf))
+ {
+ fprintf(stderr, "into: %s, \"%s\" not modified\n",
+- sys_errlist[errno], argv[1]);
++ strerror(errno), argv[1]);
+ unlink(buf);
+ exit(1);
+ }
+--- cnv/tex/dvirle2.c
++++ cnv/tex/dvirle2.c
+@@ -55,7 +55,6 @@
+ void DumpTopOfBand(), MoveDown(), WriteBuf(), WriteBlanks();
+
+ char *ProgName;
+-extern int errno;
+ extern char *optarg;
+ extern int optind;
+
+--- cnv/wasatchrle.c
++++ cnv/wasatchrle.c
+@@ -32,7 +32,6 @@
+ #include <errno.h>
+ #include "rle.h"
+
+-extern int errno;
+
+ /* "short" in our world is 16 bits. Beware of swyte-bopping. */
+
+--- get/getx11/x11_stuff.c
++++ get/getx11/x11_stuff.c
+@@ -155,7 +155,6 @@
+ IPC_CREAT|0777 );
+ if ( img->shm_img.shmid < 0 )
+ {
+- extern int errno;
+ if ( errno == ENOSPC )
+ {
+ if ( !no_shared_space )
+@@ -361,7 +360,6 @@ Boolean reallocate;
+ XDestroyImage( image );
+ if ( img->shm_pix.shmid < 0 )
+ {
+- extern int errno;
+ if ( errno == ENOSPC )
+ {
+ if ( !no_shared_space )
+--- get/qcr/qcr.h
++++ get/qcr/qcr.h
+@@ -6,8 +6,6 @@
+ #define GREEN 1
+ #define BLUE 2
+
+-extern int errno;
+-
+ /* Command defs for QCR-Z Film Recorder */
+
+ /* These are for 8 bit Look Up Tables */
+--- get/gettaac.c
++++ get/gettaac.c
+@@ -24,6 +24,7 @@
+ * Send bug fixes and improvements to: ksp@maxwell.nde.swri.edu
+ */
+
++#include <errno.h>
+ #include <stdio.h>
+ #include <strings.h>
+ #include <signal.h>
+@@ -459,7 +460,6 @@ char *template;
+ char nonUnique;
+ char twiddleUserCompletion;
+
+- extern int errno;
+ struct direct *nameEntry;
+ DIR *dirChan;
+ struct passwd *pwdEntry;
+--- tools/clock/rleClock.c
++++ tools/clock/rleClock.c
+@@ -598,7 +598,7 @@
+ { TRUE, "-tf", STRING, "Text area format string", (char *)&FormatString },
+ { FALSE, "-Xm", BOOL, "Output the alpha channel on RGB", (char *)&DebugAlpha },
+ { FALSE, "-D", BOOL, "Turn on debugging", (char *)&Debug },
+- NULL
++ { FALSE, NULL }
+ };
+
+ void
+--- tools/to8.c
++++ tools/to8.c
+@@ -175,7 +175,7 @@
+ * Give it a background color of black, since the real background
+ * will be dithered anyway.
+ */
+- if ( in_hdr.background != NULL )
++ if ( in_hdr.background != 0 )
+ {
+ out_hdr.bg_color = (int *)malloc( sizeof( int ) );
+ RLE_CHECK_ALLOC( cmd_name( argv ), out_hdr.bg_color, 0 );
+--- cnv/rletoabA62/rletoabA62.c
++++ cnv/rletoabA62/rletoabA62.c
+@@ -157,7 +157,7 @@
+ exit(1);
+ }
+ if (optind < argc) {
+- if ((file = open(argv[optind], 0)) == NULL) {
++ if ((file = open(argv[optind], 0)) == -1) {
+ perror(argv[optind]);
+ exit(1);
+ }
diff --git a/media-libs/urt/files/urt-3.1b-make.patch b/media-libs/urt/files/urt-3.1b-make.patch
new file mode 100644
index 000000000000..d8f6c74cd890
--- /dev/null
+++ b/media-libs/urt/files/urt-3.1b-make.patch
@@ -0,0 +1,75 @@
+Index: urt/makefile.src
+===================================================================
+--- urt.orig/makefile.src
++++ urt/makefile.src
+@@ -17,7 +17,7 @@ all: default
+ # clean deletes all but source, pristine (below) deletes installed stuff, too
+ default clean: doit
+ @for d in $(DIRS) ; do \
+- ( cd $$d ; echo make $@ on $$d ; make $(MFLAGS) $@ ) ; \
++ ( cd $$d ; echo $(MAKE) $@ on $$d ; $(MAKE) $(MFLAGS) $@ ) ; \
+ done
+
+ # install puts library, binaries and documentation into global location
+@@ -29,7 +29,7 @@ MAKE_TARGET =
+
+ install $(MAKE_TARGET) pristine depend:: doit
+ @for d in $(ALLDIRS) ; do \
+- ( cd $$d ; echo make $@ on $$d ; make $(MFLAGS) $@ ) ; \
++ ( cd $$d ; echo $(MAKE) $@ on $$d ; $(MAKE) $(MFLAGS) $@ ) ; \
+ done
+
+
+Index: urt/tools/makefile.src
+===================================================================
+--- urt.orig/tools/makefile.src
++++ urt/tools/makefile.src
+@@ -82,7 +82,7 @@ rlebox.out: rlebox.c rle_box.o
+ # rleClock has it's own directory, must be built special
+
+ rleClock.out: clock/font.c clock/font.h clock/font.src clock/rleClock.c
+- (cd clock ; make)
++ (cd clock ; $(MAKE))
+
+ # Incremental install, copies everything ("$?") since last install to DEST dir.
+ install: $(PGMS) install-pgm
+Index: urt/makefile.tlr
+===================================================================
+--- urt.orig/makefile.tlr
++++ urt/makefile.tlr
+@@ -7,7 +7,7 @@ subdirs:
+ @sh -c "if test 'x$(DIRS)' != x ; then eval \
+ 'set -e ; for dir in $(DIRS) ; do \
+ (cd \$$dir ; echo Make ${HERE}\$$dir ; \
+- make $(MFLAGS) $(DIRMFLAGS) ) ; \
++ $(MAKE) $(MFLAGS) $(DIRMFLAGS) ) ; \
+ done' ; \
+ else \
+ true ; \
+@@ -46,7 +46,7 @@ install-subdirs: subdirs
+ @sh -c "if test 'x$(DIRS)' != x ; then eval \
+ 'for dir in $(DIRS) ; do \
+ (cd \$$dir ; echo Install ${HERE}\$$dir ; \
+- make $(MFLAGS) $(DIRMFLAGS) install) ; \
++ $(MAKE) $(MFLAGS) $(DIRMFLAGS) install) ; \
+ done' ; \
+ else \
+ true ; \
+@@ -105,7 +105,7 @@ pristine-pgm: clean-pgm
+ 'for dir in $(ALLDIRS); do \
+ if test -d $$dir ; then \
+ (cd $$dir; echo Make ${HERE}$$dir pristine ; \
+- make $(MFLAGS) pristine); \
++ $(MAKE) $(MFLAGS) pristine); \
+ else \
+ true; \
+ fi; \
+@@ -124,7 +124,7 @@ clean-pgm:
+ 'for dir in $(ALLDIRS); do \
+ if test -d $$dir ; then \
+ (cd $$dir; echo Clean ${HERE}$$dir ; \
+- make $(MFLAGS) clean); \
++ $(MAKE) $(MFLAGS) clean); \
+ else \
+ true; \
+ fi; \
diff --git a/media-libs/urt/files/urt-3.1b-rle-fixes.patch b/media-libs/urt/files/urt-3.1b-rle-fixes.patch
new file mode 100644
index 000000000000..3720806960fe
--- /dev/null
+++ b/media-libs/urt/files/urt-3.1b-rle-fixes.patch
@@ -0,0 +1,203 @@
+Fixes taken from netpbm
+
+--- lib/rle_global.c
++++ lib/rle_global.c
+@@ -76,7 +76,7 @@ rle_hdr rle_dflt_hdr = {
+ 8, /* cmaplen (log2 of length of color map) */
+ NULL, /* pointer to color map */
+ NULL, /* pointer to comment strings */
+- stdout, /* output file */
++ NULL, /* output file -- must be set dynamically */
+ { 7 }, /* RGB channels only */
+ 0L, /* Can't free name and file fields. */
+ "Urt", /* Default "program name". */
+--- lib/rle_hdr.c
++++ lib/rle_hdr.c
+@@ -269,6 +273,9 @@
+ {
+ rle_hdr *ret_hdr;
+
++ rle_dflt_hdr.rle_file = stdout;
++ /* The rest of rle_dflt_hdr is set by the loader's data initialization */
++
+ if ( the_hdr == &rle_dflt_hdr )
+ return the_hdr;
+
+--- lib/dither.c
++++ lib/dither.c
+@@ -38,10 +38,10 @@ void make_square();
+ #endif
+
+ static int magic4x4[4][4] = {
+- 0, 14, 3, 13,
+- 11, 5, 8, 6,
+- 12, 2, 15, 1,
+- 7, 9, 4, 10
++{ 0, 14, 3, 13},
++{ 11, 5, 8, 6},
++{ 12, 2, 15, 1},
++{ 7, 9, 4, 10}
+ };
+
+ /* basic dithering macro */
+--- lib/rle_open_f.c
++++ lib/rle_open_f.c
+@@ -9,7 +9,11 @@
+ */
+
+ #include "rle_config.h"
++#define _XOPEN_SOURCE /* Make sure fdopen() is in stdio.h */
++
+ #include <stdio.h>
++#include <unistd.h>
++#include <fcntl.h>
+
+ #ifndef NO_OPEN_PIPES
+ /* Need to have a SIGCLD signal catcher. */
+@@ -260,7 +260,6 @@
+ int pipefd[2];
+ int i;
+ char *argv[4];
+- extern int errno;
+
+ /* Check args. */
+ if ( *mode != 'r' && *mode != 'w' )
+--- lib/rle_getcom.c
++++ lib/rle_getcom.c
+@@ -53,11 +53,12 @@
+ {
+ for ( ; *n != '\0' && *n != '=' && *n == *v; n++, v++ )
+ ;
+- if (*n == '\0' || *n == '=')
++ if (*n == '\0' || *n == '=') {
+ if ( *v == '\0' )
+ return v;
+ else if ( *v == '=' )
+ return ++v;
++ }
+
+ return NULL;
+ }
+--- lib/scanargs.c
++++ lib/scanargs.c
+@@ -128,10 +130,10 @@
+ va_list argl;
+ {
+
+- register check; /* check counter to be sure all argvs
++ int check; /* check counter to be sure all argvs
+ are processed */
+ register CONST_DECL char *cp;
+- register cnt;
++ int cnt;
+ int optarg = 0; /* where optional args start */
+ int nopt = 0;
+ char tmpflg, /* temp flag */
+@@ -375,11 +377,12 @@
+ if ( optarg > 0 ) /* end optional args? */
+ {
+ /* Eat the arg, too, if necessary */
+- if ( list_cnt == 0 )
++ if ( list_cnt == 0 ) {
+ if ( typchr == 's' )
+ (void)va_arg( argl, char * );
+ else
+ (void)va_arg( argl, ptr );
++ }
+ break;
+ }
+ else
+@@ -567,7 +570,7 @@
+ * Do conversion for n and N types
+ */
+ tmpflg = typchr;
+- if (typchr == 'n' || typchr == 'N' )
++ if (typchr == 'n' || typchr == 'N' ) {
+ if (*argp != '0')
+ tmpflg = 'd';
+ else if (*(argp+1) == 'x' ||
+@@ -578,6 +581,7 @@
+ }
+ else
+ tmpflg = 'o';
++ }
+ if (typchr == 'N')
+ tmpflg = toupper( tmpflg );
+
+--- lib/inv_cmap.c
++++ lib/inv_cmap.c
+@@ -42,7 +42,7 @@
+ static long cbinc, cginc, crinc;
+ static unsigned long *gdp, *rdp, *cdp;
+ static unsigned char *grgbp, *rrgbp, *crgbp;
+-static gstride, rstride;
++static long gstride, rstride;
+ static long x, xsqr, colormax;
+ static int cindex;
+ #ifdef INSTRUMENT_IT
+--- lib/rle_getrow.c
++++ lib/rle_getrow.c
+@@ -351,7 +351,7 @@
+ bzero( (char *)scanline[-1] + the_hdr->xmin,
+ the_hdr->xmax - the_hdr->xmin + 1 );
+ for ( nc = 0; nc < the_hdr->ncolors; nc++ )
+- if ( RLE_BIT( *the_hdr, nc ) )
++ if ( RLE_BIT( *the_hdr, nc ) ) {
+ /* Unless bg color given explicitly, use 0. */
+ if ( the_hdr->background != 2 || the_hdr->bg_color[nc] == 0 )
+ bzero( (char *)scanline[nc] + the_hdr->xmin,
+@@ -360,6 +360,7 @@
+ bfill( (char *)scanline[nc] + the_hdr->xmin,
+ the_hdr->xmax - the_hdr->xmin + 1,
+ the_hdr->bg_color[nc] );
++ }
+ }
+
+ /* If skipping, then just return */
+@@ -367,7 +368,7 @@
+ {
+ the_hdr->priv.get.vert_skip--;
+ the_hdr->priv.get.scan_y++;
+- if ( the_hdr->priv.get.vert_skip > 0 )
++ if ( the_hdr->priv.get.vert_skip > 0 ) {
+ if ( the_hdr->priv.get.scan_y >= the_hdr->ymax )
+ {
+ int y = the_hdr->priv.get.scan_y;
+@@ -377,6 +378,7 @@
+ }
+ else
+ return the_hdr->priv.get.scan_y;
++ }
+ }
+
+ /* If EOF has been encountered, return also */
+@@ -457,11 +459,12 @@
+ else
+ nc = DATUM(inst);
+ nc++;
+- if ( debug_f )
++ if ( debug_f ) {
+ if ( RLE_BIT( *the_hdr, channel ) )
+ fprintf( stderr, "Pixel data %d (to %d):", nc, scan_x+nc );
+ else
+ fprintf( stderr, "Pixel data %d (to %d)\n", nc, scan_x+nc);
++ }
+ if ( RLE_BIT( *the_hdr, channel ) )
+ {
+ /* Don't fill past end of scanline! */
+--- lib/rle_putcom.c
++++ lib/rle_putcom.c
+@@ -53,11 +53,12 @@
+ {
+ for ( ; *n != '\0' && *n != '=' && *n == *v; n++, v++ )
+ ;
+- if (*n == '\0' || *n == '=')
++ if (*n == '\0' || *n == '=') {
+ if ( *v == '\0' )
+ return v;
+ else if ( *v == '=' )
+ return ++v;
++ }
+
+ return NULL;
+ }
diff --git a/media-libs/urt/files/urt-3.1b-solaris.patch b/media-libs/urt/files/urt-3.1b-solaris.patch
new file mode 100644
index 000000000000..c1775d7e9783
--- /dev/null
+++ b/media-libs/urt/files/urt-3.1b-solaris.patch
@@ -0,0 +1,14 @@
+usage of errno requires errno.h
+
+Fabian Groffen <grobian@gentoo.org>
+
+--- get/getx11/x11_stuff.c
++++ get/getx11/x11_stuff.c
+@@ -42,6 +42,7 @@
+ #ifdef X_SHARED_MEMORY
+ #include <sys/errno.h>
+ #endif
++#include <errno.h>
+
+ #include "circle.bitmap"
+ #include "circle_mask.bitmap"
diff --git a/media-libs/urt/files/urt-3.1b-tempfile.patch b/media-libs/urt/files/urt-3.1b-tempfile.patch
new file mode 100644
index 000000000000..12acce151b5d
--- /dev/null
+++ b/media-libs/urt/files/urt-3.1b-tempfile.patch
@@ -0,0 +1,19 @@
+--- tools/rlecat.c
++++ tools/rlecat.c
+@@ -110,8 +110,14 @@
+ nflag = 0; /* Not really repeating! */
+ else
+ {
+- mktemp( temp ); /* Make a temporary file name */
+- tmpfile = rle_open_f( cmd_name( argv ), temp, "w+" );
++ /* we dont have to use rle_open_f() because all it does in
++ * this case is run fopen() ... we're creating a file so all
++ * the checks for opening an existing file aren't needed */
++ int fd = mkstemp(temp);
++ if (fd == -1 || (tmpfile = fdopen(fd, "w+")) == NULL) {
++ perror("Unable to open tempfile");
++ exit(-1);
++ }
+ }
+ }
+
diff --git a/media-libs/urt/metadata.xml b/media-libs/urt/metadata.xml
new file mode 100644
index 000000000000..e770d1bc9a96
--- /dev/null
+++ b/media-libs/urt/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>graphics</herd>
+</pkgmetadata>
diff --git a/media-libs/urt/urt-3.1b-r1.ebuild b/media-libs/urt/urt-3.1b-r1.ebuild
new file mode 100644
index 000000000000..cae6e3a231b7
--- /dev/null
+++ b/media-libs/urt/urt-3.1b-r1.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="the Utah Raster Toolkit is a library for dealing with raster images"
+HOMEPAGE="http://www.cs.utah.edu/gdc/projects/urt/"
+SRC_URI="ftp://ftp.iastate.edu/pub/utah-raster/${P}.tar.Z"
+
+LICENSE="URT gif? ( free-noncomm )"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x64-solaris ~x86-solaris"
+IUSE="gif postscript tiff X"
+
+DEPEND="X? ( x11-libs/libXext
+ x11-proto/xextproto
+ )
+ gif? ( media-libs/giflib )
+ tiff? ( media-libs/tiff )
+ postscript? ( app-text/ghostscript-gpl )"
+
+S=${WORKDIR}
+
+urt_config() {
+ use $1 && echo "#define $2" || echo "##define $2"
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ rm -f bin/README
+
+ epatch "${FILESDIR}"/${P}-rle-fixes.patch
+ epatch "${FILESDIR}"/${P}-compile-updates.patch
+ epatch "${FILESDIR}"/${P}-tempfile.patch
+ epatch "${FILESDIR}"/${P}-build-fixes.patch
+ epatch "${FILESDIR}/${P}-make.patch"
+ epatch "${FILESDIR}"/${P}-solaris.patch
+
+ # punt bogus manpage #109511
+ rm -f man/man1/template.1
+
+ # stupid OS X declares a stack_t type already #107428
+ sed -i -e 's:stack_t:_urt_stack:g' tools/clock/rleClock.c || die
+
+ sed -i -e '/^CFLAGS/s: -O : :' makefile.hdr
+ cp "${FILESDIR}"/gentoo-config config/gentoo
+ cat >> config/gentoo <<-EOF
+ $(urt_config X X11)
+ $(urt_config postscript POSTSCRIPT)
+ $(urt_config tiff TIFF)
+ ExtraCFLAGS = ${CFLAGS}
+ MFLAGS = ${MAKEOPTS}
+ # prevent circular depend #111455
+ $(has_version media-libs/giflib && urt_config gif GIF)
+ EOF
+}
+
+src_compile() {
+ ./Configure config/gentoo || die "config"
+ emake CC=$(tc-getCC) || die "emake"
+}
+
+src_install() {
+ mkdir -p man-dest/man{1,3,5}
+ # this just installs it into some local dirs
+ make install || die
+ dobin bin/* || die "dobin"
+ dolib.a lib/librle.a || die "dolib.a"
+ insinto /usr/include
+ doins include/rle*.h || die "doins include"
+ doman man-dest/man?/*.[135]
+ dodoc *-changes CHANGES* README blurb
+}
diff --git a/media-libs/vamp-plugin-sdk/Manifest b/media-libs/vamp-plugin-sdk/Manifest
new file mode 100644
index 000000000000..22fb99678720
--- /dev/null
+++ b/media-libs/vamp-plugin-sdk/Manifest
@@ -0,0 +1,2 @@
+DIST vamp-plugin-sdk-2.5.tar.gz 168486 SHA256 7b719f9e4575624b30b335c64c00469d3745aef4bca177f66faf3204f073139d SHA512 1b556bc034c4827704ba177819dbf630c9aa6390539767cc447a05f201dadee706b6d58aac9cef6fb21900f3d45f702f13fafbf290e9a737b595b3ecaaa8f3c3 WHIRLPOOL 6196b249b5790bc37c2d0a0286d59b8f60cb483a28939ac7e0b9c45a425d7843540490241dc1f4ef274bd872e51febfcac71020f115838e937780d6878562005
+DIST vamp-plugin-sdk-2.6.tar.gz 174908 SHA256 aa533266e35f866292c30eeac126d2d4abdf2028f1340c0e02354057013728e9 SHA512 0de0eee37629b86c664d42837eb4dbac8bb311af71082b3d0a880c6b475a8de1ab7ac42daf7c1a234dc29690e5788b70011fa01a956941cf414347011e9c27d3 WHIRLPOOL 566afe1c020515325f3641f3dc053fcbe7d6a444c74987484e30677e5df288e7abbc0b6630b9c93425b6463bc0705325be783a39c203760277662aeaf05bb03b
diff --git a/media-libs/vamp-plugin-sdk/metadata.xml b/media-libs/vamp-plugin-sdk/metadata.xml
new file mode 100644
index 000000000000..0dc3775f83d7
--- /dev/null
+++ b/media-libs/vamp-plugin-sdk/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>proaudio</herd>
+</pkgmetadata>
diff --git a/media-libs/vamp-plugin-sdk/vamp-plugin-sdk-2.5.ebuild b/media-libs/vamp-plugin-sdk/vamp-plugin-sdk-2.5.ebuild
new file mode 100644
index 000000000000..8a4b6787deeb
--- /dev/null
+++ b/media-libs/vamp-plugin-sdk/vamp-plugin-sdk-2.5.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 toolchain-funcs eutils multilib
+
+DESCRIPTION="Audio processing plugin system for plugins that extract descriptive information from audio data"
+HOMEPAGE="http://www.vamp-plugins.org"
+SRC_URI="http://code.soundsoftware.ac.uk/attachments/download/690/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ~arm hppa ~mips ppc ppc64 x86"
+IUSE="doc"
+
+RDEPEND="media-libs/libsndfile"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )"
+
+src_prepare() {
+ # multilib for default search paths
+ sed -i -e "s:/usr/lib/vamp:/usr/$(get_libdir)/vamp:" src/vamp-hostsdk/PluginHostAdapter.cpp || die "sed failed"
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)"
+ if use doc; then
+ cd build
+ doxygen || die "creating doxygen doc failed"
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" INSTALL_SDK_LIBS="/usr/$(get_libdir)" INSTALL_PKGCONFIG="/usr/$(get_libdir)/pkgconfig" INSTALL_PLUGINS="/usr/$(get_libdir)/vamp" install
+ dodoc README* CHANGELOG
+ use doc && dohtml -r build/doc/html/*
+}
+
+pkg_postinst() {
+ elog ""
+ elog "You might also want to install some Vamp plugins."
+ elog "See media-plugins/vamp-*"
+ elog ""
+}
diff --git a/media-libs/vamp-plugin-sdk/vamp-plugin-sdk-2.6.ebuild b/media-libs/vamp-plugin-sdk/vamp-plugin-sdk-2.6.ebuild
new file mode 100644
index 000000000000..61a43adfeda1
--- /dev/null
+++ b/media-libs/vamp-plugin-sdk/vamp-plugin-sdk-2.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
+
+inherit toolchain-funcs eutils multilib
+
+DESCRIPTION="Audio processing plugin system for plugins that extract descriptive information from audio data"
+HOMEPAGE="http://www.vamp-plugins.org"
+SRC_URI="https://code.soundsoftware.ac.uk/attachments/download/1514/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~x86"
+IUSE="doc"
+
+RDEPEND="media-libs/libsndfile"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )"
+
+src_prepare() {
+ # multilib for default search paths
+ sed -i -e "s:/usr/lib/vamp:/usr/$(get_libdir)/vamp:" src/vamp-hostsdk/PluginHostAdapter.cpp || die "sed failed"
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)"
+ if use doc; then
+ cd build
+ doxygen || die "creating doxygen doc failed"
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" INSTALL_SDK_LIBS="/usr/$(get_libdir)" INSTALL_PKGCONFIG="/usr/$(get_libdir)/pkgconfig" INSTALL_PLUGINS="/usr/$(get_libdir)/vamp" install
+ dodoc README* CHANGELOG
+ use doc && dohtml -r build/doc/html/*
+}
+
+pkg_postinst() {
+ elog ""
+ elog "You might also want to install some Vamp plugins."
+ elog "See media-plugins/vamp-*"
+ elog ""
+}
diff --git a/media-libs/varconf/Manifest b/media-libs/varconf/Manifest
new file mode 100644
index 000000000000..1af628f2d655
--- /dev/null
+++ b/media-libs/varconf/Manifest
@@ -0,0 +1,2 @@
+DIST varconf-0.6.6.tar.bz2 251689 SHA256 9f7e966b6753c256485c9e40ce1ce1c9cdccbf11ec70eb3f580915234f64311f
+DIST varconf-0.6.7.tar.bz2 272485 SHA256 b22dfe8b4f2ec081060545fa4b6c28b78c4b702b0621cc0eea1651bbd9fb0095
diff --git a/media-libs/varconf/metadata.xml b/media-libs/varconf/metadata.xml
new file mode 100644
index 000000000000..f575d05c604e
--- /dev/null
+++ b/media-libs/varconf/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>tupone@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">
+Varconf is a configuration system designed for the STAGE server.
+Varconf can parse configuration files, command-line arguments and environment
+variables. It supports callbacks and can store its configuration information
+in separate Config objects or in one global configuration instance.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">worldforge</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/varconf/varconf-0.6.6.ebuild b/media-libs/varconf/varconf-0.6.6.ebuild
new file mode 100644
index 000000000000..6fa5cc3e75fb
--- /dev/null
+++ b/media-libs/varconf/varconf-0.6.6.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="A configuration system designed for the STAGE server"
+SRC_URI="mirror://sourceforge/worldforge/${P}.tar.bz2"
+HOMEPAGE="http://www.worldforge.org/dev/eng/libraries/varconf"
+
+SLOT="0"
+LICENSE="LGPL-2.1"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+RDEPEND=">=dev-libs/libsigc++-2.0"
+DEPEND="$RDEPEND
+ virtual/pkgconfig"
+
+src_install() {
+ emake DESTDIR="${D}" install || die "make install failed"
+ dodoc AUTHORS ChangeLog NEWS README THANKS TODO \
+ || die "Installing doc failed"
+}
diff --git a/media-libs/varconf/varconf-0.6.7.ebuild b/media-libs/varconf/varconf-0.6.7.ebuild
new file mode 100644
index 000000000000..f3a3f150d51b
--- /dev/null
+++ b/media-libs/varconf/varconf-0.6.7.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="A configuration system designed for the STAGE server"
+SRC_URI="mirror://sourceforge/worldforge/${P}.tar.bz2"
+HOMEPAGE="http://www.worldforge.org/dev/eng/libraries/varconf"
+
+SLOT="0"
+LICENSE="LGPL-2.1"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+RDEPEND=">=dev-libs/libsigc++-2.0"
+DEPEND="$RDEPEND
+ virtual/pkgconfig"
+
+src_install() {
+ emake DESTDIR="${D}" install || die "make install failed"
+ dodoc AUTHORS ChangeLog NEWS README THANKS TODO \
+ || die "Installing doc failed"
+}
diff --git a/media-libs/vigra/Manifest b/media-libs/vigra/Manifest
new file mode 100644
index 000000000000..d26e5316ae46
--- /dev/null
+++ b/media-libs/vigra/Manifest
@@ -0,0 +1,2 @@
+DIST vigra-1.10.0-src-with-docu.tar.gz 36122311 SHA256 42d4a361b0bb52fbfdae7e76000698be04dabba77be3f4248d369139fe96a099 SHA512 4c0edb9d5a05d341034b6fe504658525130ddf830b09af4e08d9080407dd10ec62355bed362c4876cb1504632202a5eb125dc50cb66b0617c28dd274b8367d4d WHIRLPOOL 92cf1517acc6ff11eb255cb6bee523ebcaab118b9f73602baf07be8070c537c5bb7e94a9ccbd97bd7e20e20efeb8ac485a184f1c3609fe7747051ed6ec4ca65f
+DIST vigra-1.9.0-src.tar.gz 30813416 SHA256 8fbdccb553a4925323098ab27b710fbc87d48f37bf81d404994936a31a31cf01 SHA512 8d1c7f3ad8cc8069b34d58fe775eb8604a2c902daeab4a5ad3a602d45c1eda0b4dcfe64e68b9fada669b46ee39b3a6f2c95af9c5f99c2fb2370c55580816e757 WHIRLPOOL 12c63119133a6a7e6a6d28078b9267f720e98b8754b416d0491b93ee87f3527cffe77bc043c00cdf729633c1161bdc11bdfe4cff57a73345c9addd1bd6cc62d9
diff --git a/media-libs/vigra/files/vigra-1.10.0-automagicness.patch b/media-libs/vigra/files/vigra-1.10.0-automagicness.patch
new file mode 100644
index 000000000000..182f40e2c879
--- /dev/null
+++ b/media-libs/vigra/files/vigra-1.10.0-automagicness.patch
@@ -0,0 +1,64 @@
+Description: Optional jpeg/tiff/fftw/png dependencies
+Forwarded: not-needed
+Last-Update: 2013-12-11
+
+Index: vigra-1.10.0/CMakeLists.txt
+===================================================================
+--- vigra-1.10.0.orig/CMakeLists.txt
++++ vigra-1.10.0/CMakeLists.txt
+@@ -59,11 +59,24 @@ ENDIF ()
+ ##################################################
+
+ INCLUDE(VigraFindPackage)
+-VIGRA_FIND_PACKAGE(TIFF NAMES libtiff)
+-VIGRA_FIND_PACKAGE(JPEG NAMES libjpeg)
+-VIGRA_FIND_PACKAGE(PNG)
+-VIGRA_FIND_PACKAGE(FFTW3 NAMES libfftw3-3 libfftw-3.3)
+-VIGRA_FIND_PACKAGE(FFTW3F NAMES libfftw3f-3 libfftwf-3.3)
++OPTION(WITH_TIFF "Enable tiff support" ON)
++OPTION(WITH_JPEG "Enable jpeg support" ON)
++OPTION(WITH_PNG "Enable png support" ON)
++OPTION(WITH_FFTW3 "Enable fftw support" ON)
++OPTION(ENABLE_DOC "Build documentation" ON)
++IF(WITH_TIFF)
++ VIGRA_FIND_PACKAGE(TIFF NAMES libtiff)
++ENDIF()
++IF(WITH_JPEG)
++ VIGRA_FIND_PACKAGE(JPEG NAMES libjpeg)
++ENDIF()
++IF(WITH_PNG)
++ VIGRA_FIND_PACKAGE(PNG)
++ENDIF()
++IF(WITH_FFTW3)
++ VIGRA_FIND_PACKAGE(FFTW3 NAMES libfftw3-3 libfftw-3.3)
++ VIGRA_FIND_PACKAGE(FFTW3F NAMES libfftw3f-3 libfftwf-3.3)
++ENDIF()
+
+ IF(WITH_OPENEXR)
+ VIGRA_FIND_PACKAGE(OpenEXR)
+@@ -85,9 +98,11 @@ IF(WITH_LEMON)
+ VIGRA_FIND_PACKAGE(LEMON)
+ ENDIF()
+
+-SET(DOXYGEN_SKIP_DOT TRUE)
+-FIND_PACKAGE(Doxygen)
+-FIND_PACKAGE(PythonInterp)
++IF(ENABLE_DOC)
++ SET(DOXYGEN_SKIP_DOT TRUE)
++ FIND_PACKAGE(Doxygen)
++ FIND_PACKAGE(PythonInterp)
++ENDIF()
+
+ IF(WITH_VIGRANUMPY)
+ FIND_PACKAGE( VIGRANUMPY_DEPENDENCIES )
+@@ -388,10 +403,4 @@ ELSE()
+ MESSAGE( STATUS " vigranumpy will NOT be installed" )
+ ENDIF()
+
+-IF(NOT TIFF_FOUND OR NOT JPEG_FOUND OR NOT PNG_FOUND OR NOT FFTW3_FOUND OR
+- NOT HDF5_FOUND OR NOT VIGRANUMPY_DEPENDENCIES_FOUND)
+- MESSAGE( STATUS "" )
+- MESSAGE( STATUS "Consider setting DEPENDENCY_SEARCH_PREFIX to find missing libraries" )
+-ENDIF()
+-
+ MESSAGE( STATUS "---------------------------------------------------------" )
diff --git a/media-libs/vigra/files/vigra-1.10.0-cmake-scripts.patch b/media-libs/vigra/files/vigra-1.10.0-cmake-scripts.patch
new file mode 100644
index 000000000000..dc3a72e43e66
--- /dev/null
+++ b/media-libs/vigra/files/vigra-1.10.0-cmake-scripts.patch
@@ -0,0 +1,53 @@
+Description: Fix location of installed cmake scripts
+Author: Jens-Malte Gottfried <jmgottfried@web.de>
+Forwarded: not-needed
+Last-Update: 2013-12-11
+
+Index: vigra-1.10.0/CMakeLists.txt
+===================================================================
+--- vigra-1.10.0.orig/CMakeLists.txt
++++ vigra-1.10.0/CMakeLists.txt
+@@ -276,10 +276,10 @@ CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/con
+
+ # export targets:
+ INSTALL(EXPORT vigra-targets
+- DESTINATION lib${LIB_SUFFIX}/vigra)
++ DESTINATION lib${LIB_SUFFIX}/cmake/Vigra)
+ INSTALL(FILES ${PROJECT_BINARY_DIR}/lib/vigra/CMake/VigraConfig.cmake
+ ${PROJECT_BINARY_DIR}/lib/vigra/CMake/VigraConfigVersion.cmake
+- DESTINATION lib${LIB_SUFFIX}/vigra)
++ DESTINATION lib${LIB_SUFFIX}/cmake/Vigra)
+ EXPORT(TARGETS vigraimpex FILE vigra-targets.cmake)
+
+ ##################################################
+Index: vigra-1.10.0/config/VigraConfig.cmake.in
+===================================================================
+--- vigra-1.10.0.orig/config/VigraConfig.cmake.in
++++ vigra-1.10.0/config/VigraConfig.cmake.in
+@@ -1,5 +1,5 @@
+ get_filename_component(SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
+-get_filename_component(Vigra_TOP_DIR "${SELF_DIR}/../../" ABSOLUTE)
++get_filename_component(Vigra_TOP_DIR "${SELF_DIR}/../../../" ABSOLUTE)
+
+ include(${SELF_DIR}/vigra-targets.cmake)
+ get_target_property(VIGRA_TYPE vigraimpex TYPE)
+@@ -9,6 +9,6 @@
+ endif(${VIGRA_TYPE} STREQUAL "STATIC_LIBRARY")
+ get_filename_component(Vigra_INCLUDE_DIRS "${Vigra_TOP_DIR}/include/" ABSOLUTE)
+
+-IF(EXISTS ${SELF_DIR}/../vigranumpy/VigranumpyConfig.cmake)
+- INCLUDE(${SELF_DIR}/../vigranumpy/VigranumpyConfig.cmake)
++IF(EXISTS ${SELF_DIR}/VigranumpyConfig.cmake)
++ INCLUDE(${SELF_DIR}/VigranumpyConfig.cmake)
+ ENDIF()
+--- vigra-1.10.0.orig/vigranumpy/CMakeLists.txt
++++ vigra-1.10.0/vigranumpy/CMakeLists.txt
+@@ -53,7 +53,7 @@
+ COMMENT "Creating vigranumpy setup in ${CMAKE_CURRENT_BINARY_DIR}/dist")
+ ENDIF()
+
+- set(VIGRANUMPY_CONFIG_INSTALL_PATH lib${LIB_SUFFIX}/vigranumpy)
++ set(VIGRANUMPY_CONFIG_INSTALL_PATH lib${LIB_SUFFIX}/cmake/Vigra)
+
+ set(VIGRANUMPY_INCLUDE_RELATIVE "")
+ foreach(PATH ${CMAKE_INSTALL_PREFIX}/include ${VIGRANUMPY_INCLUDE_DIRS})
diff --git a/media-libs/vigra/files/vigra-1.10.0-mpi-fixes.patch b/media-libs/vigra/files/vigra-1.10.0-mpi-fixes.patch
new file mode 100644
index 000000000000..83bb86d1119f
--- /dev/null
+++ b/media-libs/vigra/files/vigra-1.10.0-mpi-fixes.patch
@@ -0,0 +1,230 @@
+Description: Fix build with mpi enabled hdf5 libraries
+Author: Jens-Malte Gottfried <jmgottfried@web.de>
+Forwarded: not-needed
+Last-Update: 2013-12-11
+
+Index: vigra-1.10.0/CMakeLists.txt
+===================================================================
+--- vigra-1.10.0.orig/CMakeLists.txt
++++ vigra-1.10.0/CMakeLists.txt
+@@ -63,6 +63,7 @@ OPTION(WITH_TIFF "Enable tiff support" O
+ OPTION(WITH_JPEG "Enable jpeg support" ON)
+ OPTION(WITH_PNG "Enable png support" ON)
+ OPTION(WITH_FFTW3 "Enable fftw support" ON)
++OPTION(WITH_MPI "Link against mpi libraries" ON)
+ OPTION(ENABLE_DOC "Build documentation" ON)
+ IF(WITH_TIFF)
+ VIGRA_FIND_PACKAGE(TIFF NAMES libtiff)
+@@ -70,6 +71,9 @@ ENDIF()
+ IF(WITH_JPEG)
+ VIGRA_FIND_PACKAGE(JPEG NAMES libjpeg)
+ ENDIF()
++IF(WITH_MPI)
++ VIGRA_FIND_PACKAGE(MPI)
++ENDIF()
+ IF(WITH_PNG)
+ VIGRA_FIND_PACKAGE(PNG)
+ ENDIF()
+Index: vigra-1.10.0/src/impex/CMakeLists.txt
+===================================================================
+--- vigra-1.10.0.orig/src/impex/CMakeLists.txt
++++ vigra-1.10.0/src/impex/CMakeLists.txt
+@@ -79,7 +79,7 @@ IF(OPENEXR_FOUND)
+ ENDIF(OPENEXR_FOUND)
+
+ IF(HDF5_FOUND)
+- TARGET_LINK_LIBRARIES(vigraimpex ${HDF5_LIBRARIES})
++ TARGET_LINK_LIBRARIES(vigraimpex ${HDF5_LIBRARIES} ${MPI_LIBRARIES})
+ ENDIF(HDF5_FOUND)
+
+ INSTALL(TARGETS vigraimpex
+Index: vigra-1.10.0/test/CMakeLists.txt
+===================================================================
+--- vigra-1.10.0.orig/test/CMakeLists.txt
++++ vigra-1.10.0/test/CMakeLists.txt
+@@ -1,4 +1,7 @@
+ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
++IF(WITH_MPI)
++ INCLUDE_DIRECTORIES(${MPI_INCLUDE_PATH})
++ENDIF()
+
+ INCLUDE(VigraAddTest)
+
+Index: vigra-1.10.0/test/impex/CMakeLists.txt
+===================================================================
+--- vigra-1.10.0.orig/test/impex/CMakeLists.txt
++++ vigra-1.10.0/test/impex/CMakeLists.txt
+@@ -15,7 +15,7 @@ IF(OPENEXR_FOUND)
+ ADD_DEFINITIONS(-DHasEXR)
+ ENDIF(OPENEXR_FOUND)
+
+-VIGRA_ADD_TEST(test_impex test.cxx LIBRARIES vigraimpex)
++VIGRA_ADD_TEST(test_impex test.cxx LIBRARIES vigraimpex ${MPI_LIBRARIES})
+
+ VIGRA_COPY_TEST_DATA(lenna.xv lenna_gifref.xv lennafloat.xv lennafloatrgb.xv lennargb.xv no-image.txt lenna_0.tif lenna_1.tif lenna_2.tif lenna_masked_color.tif lenna_masked_gray.tif)
+
+Index: vigra-1.10.0/test/classifier/CMakeLists.txt
+===================================================================
+--- vigra-1.10.0.orig/test/classifier/CMakeLists.txt
++++ vigra-1.10.0/test/classifier/CMakeLists.txt
+@@ -2,13 +2,15 @@ if(HDF5_FOUND)
+ INCLUDE_DIRECTORIES(${HDF5_INCLUDE_DIR})
+
+ ADD_DEFINITIONS(${HDF5_CPPFLAGS} -DHasHDF5)
+- VIGRA_ADD_TEST(test_classifier test.cxx LIBRARIES vigraimpex ${HDF5_LIBRARIES})
++ VIGRA_ADD_TEST(test_classifier test.cxx
++ LIBRARIES vigraimpex ${HDF5_LIBRARIES} ${MPI_LIBRARIES})
+ else()
+ MESSAGE(STATUS "** WARNING: test_classifier::RFHDF5Test() will not be executed")
+ VIGRA_ADD_TEST(test_classifier test.cxx )
+ endif()
+
+-VIGRA_ADD_TEST(classifier_speed_comparison speed_comparison.cxx)
++VIGRA_ADD_TEST(classifier_speed_comparison speed_comparison.cxx
++ LIBRARIES ${MPI_LIBRARIES})
+
+ add_subdirectory(data)
+
+Index: vigra-1.10.0/test/imgproc/CMakeLists.txt
+===================================================================
+--- vigra-1.10.0.orig/test/imgproc/CMakeLists.txt
++++ vigra-1.10.0/test/imgproc/CMakeLists.txt
+@@ -1,3 +1,9 @@
+-VIGRA_ADD_TEST(test_imgproc test.cxx LIBRARIES vigraimpex)
++VIGRA_ADD_TEST(test_imgproc test.cxx LIBRARIES vigraimpex ${MPI_LIBRARIES})
+
+-VIGRA_COPY_TEST_DATA(lenna128.xv lenna128rgb.xv splineimageview2.xv splineimageview3.xv splineimageview5.xv lenna42lin.xv lenna288neu.xv lenna42neu.xv lenna288rgbneu.xv lenna42rgbneu.xv lenna367FIR.xv lenna42FIR.xv lenna367IIR.xv lenna42IIR.xv lenna42linrgb.xv lennargb42FIR.xv lennargb42IIR.xv lenna_rotate.xv)
++VIGRA_COPY_TEST_DATA(
++ lenna128.xv lenna128rgb.xv
++ splineimageview2.xv splineimageview3.xv splineimageview5.xv
++ lenna42lin.xv lenna288neu.xv lenna42neu.xv lenna288rgbneu.xv
++ lenna42rgbneu.xv lenna367FIR.xv lenna42FIR.xv lenna367IIR.xv
++ lenna42IIR.xv lenna42linrgb.xv lennargb42FIR.xv
++ lennargb42IIR.xv lenna_rotate.xv)
+Index: vigra-1.10.0/test/convolution/CMakeLists.txt
+===================================================================
+--- vigra-1.10.0.orig/test/convolution/CMakeLists.txt
++++ vigra-1.10.0/test/convolution/CMakeLists.txt
+@@ -1,3 +1,11 @@
+-VIGRA_ADD_TEST(test_convolution test.cxx LIBRARIES vigraimpex)
++VIGRA_ADD_TEST(test_convolution test.cxx LIBRARIES vigraimpex ${MPI_LIBRARIES})
+
+-VIGRA_COPY_TEST_DATA(lenna128.xv lenna_simple_sharpening_orig.xv lenna_gaussian_sharpening_orig.xv lenna128sepgrad.xv lennahessxx.xv lennastxx.xv lenna128recgrad.xv lenna128nonlinear.xv resampling.xv lennahessyy.xv lennastyy.xv lennahessxy.xv lennastxy.xv lenna128rgb.xv lenna128rgbsepgrad.xv lenna_level-2.xv lenna_level-1.xv lenna_level1.xv lenna_level2.xv lenna_levellap0.xv lenna_levellap1.xv lenna_levellap2.xv lennargbst.xv)
++VIGRA_COPY_TEST_DATA(
++ lenna128.xv lenna_simple_sharpening_orig.xv
++ lenna_gaussian_sharpening_orig.xv lenna128sepgrad.xv
++ lennahessxx.xv lennastxx.xv lenna128recgrad.xv
++ lenna128nonlinear.xv resampling.xv lennahessyy.xv
++ lennastyy.xv lennahessxy.xv lennastxy.xv lenna128rgb.xv
++ lenna128rgbsepgrad.xv lenna_level-2.xv lenna_level-1.xv
++ lenna_level1.xv lenna_level2.xv lenna_levellap0.xv
++ lenna_levellap1.xv lenna_levellap2.xv lennargbst.xv)
+Index: vigra-1.10.0/test/fourier/CMakeLists.txt
+===================================================================
+--- vigra-1.10.0.orig/test/fourier/CMakeLists.txt
++++ vigra-1.10.0/test/fourier/CMakeLists.txt
+@@ -1,7 +1,8 @@
+ if(FFTW3_FOUND)
+ INCLUDE_DIRECTORIES(${FFTW3_INCLUDE_DIR})
+
+- VIGRA_ADD_TEST(test_fourier test.cxx LIBRARIES vigraimpex ${FFTW3_LIBRARIES})
++ VIGRA_ADD_TEST(test_fourier test.cxx
++ LIBRARIES vigraimpex ${FFTW3_LIBRARIES} ${MPI_LIBRARIES})
+
+ VIGRA_COPY_TEST_DATA(ghouse.gif filter.xv gaborresult.xv)
+ else()
+Index: vigra-1.10.0/test/tensorimaging/CMakeLists.txt
+===================================================================
+--- vigra-1.10.0.orig/test/tensorimaging/CMakeLists.txt
++++ vigra-1.10.0/test/tensorimaging/CMakeLists.txt
+@@ -1,3 +1,7 @@
+-VIGRA_ADD_TEST(test_tensorimaging test.cxx LIBRARIES vigraimpex)
++VIGRA_ADD_TEST(test_tensorimaging test.cxx
++ LIBRARIES vigraimpex ${MPI_LIBRARIES})
+
+-VIGRA_COPY_TEST_DATA(l2.xv riesz00.xv riesz10.xv riesz01.xv riesz20.xv riesz11.xv riesz02.xv boundaryTensor.xv l2_boundary1.xv l2_boundary.xv l2_hourglass.xv l2_get.xv)
++VIGRA_COPY_TEST_DATA(
++ l2.xv riesz00.xv riesz10.xv riesz01.xv riesz20.xv
++ riesz11.xv riesz02.xv boundaryTensor.xv
++ l2_boundary1.xv l2_boundary.xv l2_hourglass.xv l2_get.xv)
+Index: vigra-1.10.0/test/simpleanalysis/CMakeLists.txt
+===================================================================
+--- vigra-1.10.0.orig/test/simpleanalysis/CMakeLists.txt
++++ vigra-1.10.0/test/simpleanalysis/CMakeLists.txt
+@@ -1,10 +1,12 @@
+ if(FFTW3_FOUND)
+ INCLUDE_DIRECTORIES(${FFTW3_INCLUDE_DIR})
+ ADD_DEFINITIONS(-DHasFFTW3)
+-
+- VIGRA_ADD_TEST(test_simpleanalysis test.cxx LIBRARIES vigraimpex ${FFTW3_LIBRARIES})
++
++ VIGRA_ADD_TEST(test_simpleanalysis test.cxx
++ LIBRARIES vigraimpex ${FFTW3_LIBRARIES} ${MPI_LIBRARIES})
+ else()
+- VIGRA_ADD_TEST(test_simpleanalysis test.cxx LIBRARIES vigraimpex)
++ VIGRA_ADD_TEST(test_simpleanalysis test.cxx
++ LIBRARIES vigraimpex ${MPI_LIBRARIES})
+ endif()
+
+ VIGRA_COPY_TEST_DATA(noiseNormalizationTest.xv slantedEdgeMTF.xv lenna128.xv)
+Index: vigra-1.10.0/test/image/CMakeLists.txt
+===================================================================
+--- vigra-1.10.0.orig/test/image/CMakeLists.txt
++++ vigra-1.10.0/test/image/CMakeLists.txt
+@@ -1,3 +1,3 @@
+-VIGRA_ADD_TEST(test_image test.cxx LIBRARIES vigraimpex)
++VIGRA_ADD_TEST(test_image test.cxx LIBRARIES vigraimpex ${MPI_LIBRARIES})
+
+ VIGRA_COPY_TEST_DATA(lenna.xv)
+Index: vigra-1.10.0/test/multiarray/CMakeLists.txt
+===================================================================
+--- vigra-1.10.0.orig/test/multiarray/CMakeLists.txt
++++ vigra-1.10.0/test/multiarray/CMakeLists.txt
+@@ -10,6 +10,6 @@ IF(TIFF_FOUND)
+ ADD_DEFINITIONS(-DHasTIFF)
+ ENDIF(TIFF_FOUND)
+
+-VIGRA_ADD_TEST(test_multiarray test.cxx LIBRARIES vigraimpex)
++VIGRA_ADD_TEST(test_multiarray test.cxx LIBRARIES vigraimpex ${MPI_LIBRARIES})
+
+ FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/impex)
+Index: vigra-1.10.0/test/multiconvolution/CMakeLists.txt
+===================================================================
+--- vigra-1.10.0.orig/test/multiconvolution/CMakeLists.txt
++++ vigra-1.10.0/test/multiconvolution/CMakeLists.txt
+@@ -1,4 +1,5 @@
+-VIGRA_ADD_TEST(test_multiconvolution test.cxx LIBRARIES vigraimpex)
++VIGRA_ADD_TEST(test_multiconvolution test.cxx
++ LIBRARIES vigraimpex ${MPI_LIBRARIES})
+
+ VIGRA_ADD_TEST(test_multiconvolution_speed speedtest.cxx)
+
+Index: vigra-1.10.0/test/hdf5impex/CMakeLists.txt
+===================================================================
+--- vigra-1.10.0.orig/test/hdf5impex/CMakeLists.txt
++++ vigra-1.10.0/test/hdf5impex/CMakeLists.txt
+@@ -3,7 +3,8 @@ if(HDF5_FOUND)
+
+ ADD_DEFINITIONS(${HDF5_CPPFLAGS})
+
+- VIGRA_ADD_TEST(test_hdf5impex test.cxx LIBRARIES vigraimpex ${HDF5_LIBRARIES})
++ VIGRA_ADD_TEST(test_hdf5impex test.cxx
++ LIBRARIES vigraimpex ${HDF5_LIBRARIES} ${MPI_LIBRARIES})
+ else()
+ MESSAGE(STATUS "** WARNING: test_hdf5impex will not be executed")
+ endif()
+Index: vigra-1.10.0/test/sifImport/CMakeLists.txt
+===================================================================
+--- vigra-1.10.0.orig/test/sifImport/CMakeLists.txt
++++ vigra-1.10.0/test/sifImport/CMakeLists.txt
+@@ -4,5 +4,8 @@ if(HDF5_FOUND)
+ ADD_DEFINITIONS(-DHasHDF5 ${HDF5_CPPFLAGS})
+ endif()
+
+-VIGRA_ADD_TEST(test_sifImport test.cxx LIBRARIES vigraimpex)
+-VIGRA_COPY_TEST_DATA(testSif_4_16_30001.sif testSif_4_13_30000.sif testSif_4_6_30000.sif testSif_forBlocks_4_16_30001.sif)
++VIGRA_ADD_TEST(test_sifImport test.cxx
++ LIBRARIES vigraimpex ${MPI_LIBRARIES})
++VIGRA_COPY_TEST_DATA(
++ testSif_4_16_30001.sif testSif_4_13_30000.sif
++ testSif_4_6_30000.sif testSif_forBlocks_4_16_30001.sif)
diff --git a/media-libs/vigra/files/vigra-1.8.0-automagicness.patch b/media-libs/vigra/files/vigra-1.8.0-automagicness.patch
new file mode 100644
index 000000000000..8f0c5fff0650
--- /dev/null
+++ b/media-libs/vigra/files/vigra-1.8.0-automagicness.patch
@@ -0,0 +1,54 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 1b75688..18d01ef 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -46,19 +46,38 @@ ENDIF ()
+ ##################################################
+
+ INCLUDE(VigraFindPackage)
++option(WITH_TIFF "Enable tiff support" ON)
++option(WITH_JPEG "Enable jpeg support" ON)
++option(WITH_PNG "Enable png support" ON)
++option(WITH_OPENEXR "Enable openexr support" ON)
++option(WITH_FFTW3 "Enable fftw support" ON)
++option(ENABLE_DOC "Build documentation" ON)
++
++if(WITH_TIFF)
+ VIGRA_FIND_PACKAGE(TIFF NAMES libtiff)
++endif()
++if(WITH_JPEG)
+ VIGRA_FIND_PACKAGE(JPEG NAMES libjpeg)
++endif()
++if(WITH_PNG)
+ VIGRA_FIND_PACKAGE(PNG)
++endif()
++if(WITH_OPENEXR)
+ VIGRA_FIND_PACKAGE(OpenEXR)
++endif()
++if(WITH_FFTW3)
+ VIGRA_FIND_PACKAGE(FFTW3 NAMES libfftw3-3)
+ VIGRA_FIND_PACKAGE(FFTW3F NAMES libfftw3f-3)
++endif()
+ IF(WITH_HDF5)
+ VIGRA_FIND_PACKAGE(HDF5)
+ ENDIF()
+
+ SET(DOXYGEN_SKIP_DOT TRUE)
++if(ENABLE_DOC)
+ FIND_PACKAGE(Doxygen)
+ FIND_PACKAGE(PythonInterp)
++endif()
+
+ IF(WITH_VIGRANUMPY)
+ FIND_PACKAGE( VIGRANUMPY_DEPENDENCIES )
+@@ -317,10 +336,4 @@ ELSE()
+ MESSAGE( STATUS " vigranumpy will NOT be installed" )
+ ENDIF()
+
+-IF(NOT TIFF_FOUND OR NOT JPEG_FOUND OR NOT PNG_FOUND OR NOT FFTW3_FOUND OR
+- NOT HDF5_FOUND OR NOT VIGRANUMPY_DEPENDENCIES_FOUND)
+- MESSAGE( STATUS "" )
+- MESSAGE( STATUS "Consider setting DEPENDENCY_SEARCH_PREFIX to find missing libraries" )
+-ENDIF()
+-
+ MESSAGE( STATUS "---------------------------------------------------------" )
diff --git a/media-libs/vigra/files/vigra-1.8.0-doxygen.patch b/media-libs/vigra/files/vigra-1.8.0-doxygen.patch
new file mode 100644
index 000000000000..c264a67c0172
--- /dev/null
+++ b/media-libs/vigra/files/vigra-1.8.0-doxygen.patch
@@ -0,0 +1,57 @@
+From a8fd9ff8062152ccdcec7d63f2d5075f29ee2429 Mon Sep 17 00:00:00 2001
+From: Ullrich Koethe <ullrich.koethe@iwr.uni-heidelberg.de>
+Date: Wed, 21 Dec 2011 16:31:56 +0100
+Subject: [PATCH] adapted regular expressions for doxygen 1.7.6.1
+
+---
+ docsrc/makeFunctionIndex.py | 4 ++--
+ docsrc/post.py | 6 +++---
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/docsrc/makeFunctionIndex.py b/docsrc/makeFunctionIndex.py
+index 55e74bc..06300e2 100644
+--- a/docsrc/makeFunctionIndex.py
++++ b/docsrc/makeFunctionIndex.py
+@@ -119,8 +119,8 @@ def generateFunctionIndex(functionList):
+ text = open(path + "/namespaces.html").read()
+ if text.find('</h1>') > -1: # up to doxygen 1.7.1
+ header = text[:text.find('</h1>')+5]
+- else: # for doxygen 1.7.4
+- header = text[:re.search(r'<div class="title">[^<]*</div>\s*</div>\s*</div>\n<div class="contents">',text).end()]
++ else: # for doxygen 1.7.4 to 1.7.6.1
++ header = text[:re.search(r'<div class="title">[^<]*</div>\s*</div>\s*</div>(?:<!--header-->)?\n<div class="contents">',text).end()]
+ footer = re.search(r'(?s)(<!-- footer.html -->.*)', text).group(1)
+
+ text = re.sub(r'Namespace List', r'Function Index', header)
+diff --git a/docsrc/post.py b/docsrc/post.py
+index a8836d5..fc51f8d 100644
+--- a/docsrc/post.py
++++ b/docsrc/post.py
+@@ -51,13 +51,13 @@
+ </div>
+ <div class="contents">''')
+
+-# tested with doxygen 1.7.5.1
++# tested with doxygen 1.7.5.1 and 1.7.6.1
+ mainHeading4 = re.compile(r'''(<!-- Generated by Doxygen .+ -->
+ </div>)
+ (<div class="header">
+ <div class="headertitle">
+ )<div class="title">(.*)</div> </div>(.*)()
+-</div>
++</div>(?:<!--header-->)?
+ <div class="contents">''')
+
+ mainHeadingReplacement = '''\\1
+@@ -149,7 +149,7 @@ def processFile(fileName):
+ f.close()
+
+ files = glob.glob(path + '/*.html') # use given path to files
+-#files = glob.glob('../doc/vigra/index.html')
++#files = glob.glob(path + '/index.html')
+
+ for file in files:
+ processFile(file)
+--
+1.8.1.6
+
diff --git a/media-libs/vigra/files/vigra-1.8.0-gcc47.patch b/media-libs/vigra/files/vigra-1.8.0-gcc47.patch
new file mode 100644
index 000000000000..83d5f7ee5c59
--- /dev/null
+++ b/media-libs/vigra/files/vigra-1.8.0-gcc47.patch
@@ -0,0 +1,25 @@
+From 11113f8f5ffa868e32259e8d6dcdb543fd58848b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tiziano=20M=C3=BCller?= <tm@dev-zero.ch>
+Date: Mon, 11 Jun 2012 08:33:06 +0200
+Subject: [PATCH] Fix building with gcc-4.7
+
+---
+ include/vigra/numpy_array.hxx | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/include/vigra/numpy_array.hxx b/include/vigra/numpy_array.hxx
+index 1d06a79..7806f6b 100644
+--- a/include/vigra/numpy_array.hxx
++++ b/include/vigra/numpy_array.hxx
+@@ -1074,7 +1074,7 @@ void NumpyArray<N, T, Stride>::setupArrayView()
+
+ this->m_stride /= sizeof(value_type);
+ this->m_ptr = reinterpret_cast<pointer>(pyArray()->data);
+- vigra_precondition(checkInnerStride(Stride()),
++ vigra_precondition(this->checkInnerStride(Stride()),
+ "NumpyArray<..., UnstridedArrayTag>::setupArrayView(): First dimension of given array is not unstrided (should never happen).");
+
+ }
+--
+1.7.8.6
+
diff --git a/media-libs/vigra/files/vigra-1.8.0-numpy_doc.patch b/media-libs/vigra/files/vigra-1.8.0-numpy_doc.patch
new file mode 100644
index 000000000000..f4bb98ac62c6
--- /dev/null
+++ b/media-libs/vigra/files/vigra-1.8.0-numpy_doc.patch
@@ -0,0 +1,28 @@
+diff --git a/vigranumpy/docsrc/CMakeLists.txt b/vigranumpy/docsrc/CMakeLists.txt
+index 547cf81..d12a6f7 100644
+--- a/vigranumpy/docsrc/CMakeLists.txt
++++ b/vigranumpy/docsrc/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-IF(PYTHON_SPHINX)
++IF(PYTHON_SPHINX AND ENABLE_DOC)
+ # vigranumpy documentation generation using sphinx
+ IF(DEFINED VIGRANUMPY_DOCDIR)
+ MESSAGE(SEND_ERROR "VIGRANUMPY_DOCDIR already defined! Please delete from Cache.")
+@@ -49,7 +49,7 @@ IF(PYTHON_SPHINX)
+ ${VIGRANUMPY_DOCDIR}
+ COMMENT "Generating vigranumpy documentation")
+
+-ELSE(PYTHON_SPHINX)
++ELSE(PYTHON_SPHINX AND ENABLE_DOC)
+ # no vigranumpy documentation if sphinx not available
+ ADD_CUSTOM_TARGET (doc_python
+ ${CMAKE_COMMAND} -E echo
+@@ -57,7 +57,7 @@ ELSE(PYTHON_SPHINX)
+ "(sphinx-build not found)"
+ VERBATIM)
+
+-ENDIF(PYTHON_SPHINX)
++ENDIF(PYTHON_SPHINX AND ENABLE_DOC)
+
+ ADD_DEPENDENCIES(doc_python vigranumpy)
+ ADD_DEPENDENCIES(doc_python doc_cpp)
diff --git a/media-libs/vigra/files/vigra-1.9.0-automagicness.patch b/media-libs/vigra/files/vigra-1.9.0-automagicness.patch
new file mode 100644
index 000000000000..e6deb761d1c5
--- /dev/null
+++ b/media-libs/vigra/files/vigra-1.9.0-automagicness.patch
@@ -0,0 +1,74 @@
+diff -urN vigra-1.9.0.old/CMakeLists.txt vigra-1.9.0/CMakeLists.txt
+--- vigra-1.9.0.old/CMakeLists.txt 2013-06-04 13:38:43.158564579 +0200
++++ vigra-1.9.0/CMakeLists.txt 2013-06-04 13:45:19.290550486 +0200
+@@ -57,13 +57,27 @@
+ # search for dependencies
+ #
+ ##################################################
++OPTION(WITH_TIFF "Enable tiff support" ON)
++OPTION(WITH_JPEG "Enable jpeg support" ON)
++OPTION(WITH_PNG "Enable png support" ON)
++OPTION(WITH_OPENEXR "Enable openexr support" ON)
++OPTION(WITH_FFTW3 "Enable fftw support" ON)
++OPTION(ENABLE_DOC "Build documentation" ON)
+
+ INCLUDE(VigraFindPackage)
+-VIGRA_FIND_PACKAGE(TIFF NAMES libtiff)
+-VIGRA_FIND_PACKAGE(JPEG NAMES libjpeg)
+-VIGRA_FIND_PACKAGE(PNG)
+-VIGRA_FIND_PACKAGE(FFTW3 NAMES libfftw3-3 libfftw-3.3)
+-VIGRA_FIND_PACKAGE(FFTW3F NAMES libfftw3f-3 libfftwf-3.3)
++IF(WITH_TIFF)
++ VIGRA_FIND_PACKAGE(TIFF NAMES libtiff)
++ENDIF()
++IF(WITH_JPEG)
++ VIGRA_FIND_PACKAGE(JPEG NAMES libjpeg)
++ENDIF()
++IF(WITH_PNG)
++ VIGRA_FIND_PACKAGE(PNG)
++ENDIF()
++IF(WITH_FFTW3)
++ VIGRA_FIND_PACKAGE(FFTW3 NAMES libfftw3-3 libfftw-3.3)
++ VIGRA_FIND_PACKAGE(FFTW3F NAMES libfftw3f-3 libfftwf-3.3)
++ENDIF()
+ IF(WITH_OPENEXR)
+ VIGRA_FIND_PACKAGE(OpenEXR)
+ ENDIF()
+@@ -72,8 +86,10 @@
+ ENDIF()
+
+ SET(DOXYGEN_SKIP_DOT TRUE)
++IF(ENABLE_DOC)
+ FIND_PACKAGE(Doxygen)
+ FIND_PACKAGE(PythonInterp)
++ENDIF()
+
+ IF(WITH_VIGRANUMPY)
+ FIND_PACKAGE( VIGRANUMPY_DEPENDENCIES )
+diff -urN vigra-1.9.0.old/vigranumpy/docsrc/CMakeLists.txt vigra-1.9.0/vigranumpy/docsrc/CMakeLists.txt
+--- vigra-1.9.0.old/vigranumpy/docsrc/CMakeLists.txt 2013-06-04 13:38:43.207564577 +0200
++++ vigra-1.9.0/vigranumpy/docsrc/CMakeLists.txt 2013-06-04 13:45:51.962549323 +0200
+@@ -1,4 +1,4 @@
+-IF(PYTHON_SPHINX)
++IF(PYTHON_SPHINX AND ENABLE_DOC)
+ # vigranumpy documentation generation using sphinx
+ IF(DEFINED VIGRANUMPY_DOCDIR)
+ MESSAGE(SEND_ERROR "VIGRANUMPY_DOCDIR already defined! Please delete from Cache.")
+@@ -49,7 +49,7 @@
+ ${VIGRANUMPY_DOCDIR}
+ COMMENT "Generating vigranumpy documentation")
+
+-ELSE(PYTHON_SPHINX)
++ELSE(PYTHON_SPHINX AND ENABLE_DOC)
+ # no vigranumpy documentation if sphinx not available
+ ADD_CUSTOM_TARGET (doc_python
+ ${CMAKE_COMMAND} -E echo
+@@ -57,7 +57,7 @@
+ "(sphinx-build not found)"
+ VERBATIM)
+
+-ENDIF(PYTHON_SPHINX)
++ENDIF(PYTHON_SPHINX AND ENABLE_DOC)
+
+ ADD_DEPENDENCIES(doc_python vigranumpy)
+ ADD_DEPENDENCIES(doc_python doc_cpp)
diff --git a/media-libs/vigra/metadata.xml b/media-libs/vigra/metadata.xml
new file mode 100644
index 000000000000..e450ba260ec9
--- /dev/null
+++ b/media-libs/vigra/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>printing</herd>
+</pkgmetadata>
diff --git a/media-libs/vigra/vigra-1.10.0.ebuild b/media-libs/vigra/vigra-1.10.0.ebuild
new file mode 100644
index 000000000000..1f84ed48fd24
--- /dev/null
+++ b/media-libs/vigra/vigra-1.10.0.ebuild
@@ -0,0 +1,141 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+MY_P=${P}-src-with-docu
+MY_V=${PV//\./-}
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="threads,xml"
+inherit cmake-utils python-r1
+
+DESCRIPTION="C++ computer vision library with emphasize on customizable algorithms and data structures"
+HOMEPAGE="http://hci.iwr.uni-heidelberg.de/vigra/"
+SRC_URI="https://github.com/ukoethe/vigra/releases/download/Version-${MY_V}/${MY_P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="doc +fftw +hdf5 +jpeg mpi openexr +png +python test +tiff"
+
+# runtime dependency on python:2.7 is required by the vigra-config script
+RDEPEND="
+ dev-lang/python:2.7
+ >=dev-libs/boost-1.52.0-r6:=[python?,${PYTHON_USEDEP}]
+ fftw? ( sci-libs/fftw:3.0 )
+ hdf5? ( >=sci-libs/hdf5-1.8.0:=[mpi?] )
+ jpeg? ( virtual/jpeg )
+ openexr? ( media-libs/openexr:= )
+ png? ( media-libs/libpng:0= )
+ python? ( ${PYTHON_DEPS} dev-python/numpy[${PYTHON_USEDEP}] )
+ tiff? ( media-libs/tiff:0= )"
+
+DEPEND="${RDEPEND}
+ doc? (
+ app-doc/doxygen
+ python? ( >=dev-python/sphinx-1.1.3-r5[${PYTHON_USEDEP}] )
+ )
+ test? ( >=dev-python/nose-1.1.2-r1[${PYTHON_USEDEP}] )"
+
+REQUIRED_USE="
+ doc? ( hdf5 fftw )
+ python? ( hdf5 ${PYTHON_REQUIRED_USE} )
+ test? ( hdf5 python fftw )"
+
+PATCHES=(
+ "${FILESDIR}/${P}-automagicness.patch"
+ "${FILESDIR}/${P}-cmake-scripts.patch"
+ "${FILESDIR}/${P}-mpi-fixes.patch"
+)
+DOCS=( README.md )
+
+pkg_setup() {
+ use python && python_setup
+}
+
+src_prepare() {
+ einfo "Removing shipped doc, Win32 dependencies and VCS files"
+ rm -rf doc
+ rm vigra-dependencies-win32-vs8.zip
+ rm .git* .hg* .travis.yml
+
+ cmake-utils_src_prepare
+
+ # Don't use python_fix_shebang because we can't put this behind USE="python"
+ sed -i -e '/env/s:python:python2:' config/vigra-config.in || die
+}
+
+src_configure() {
+ vigra_configure() {
+ local libdir="$(get_libdir)"
+
+ local mycmakeargs=(
+ -DAUTOEXEC_TESTS=OFF
+ -DDOCDIR="${BUILD_DIR}/doc"
+ -DDOCINSTALL="share/doc/${P}"
+ -DLIBDIR_SUFFIX="${libdir/lib}"
+ -DWITH_VALGRIND=OFF
+ $(cmake-utils_use_enable doc DOC)
+ $(cmake-utils_use_with fftw FFTW3)
+ $(cmake-utils_use_with hdf5 HDF5)
+ $(cmake-utils_use_with jpeg JPEG)
+ $(cmake-utils_use_with mpi MPI)
+ $(cmake-utils_use_with png PNG)
+ $(cmake-utils_use_with openexr OPENEXR)
+ $(cmake-utils_use_with python VIGRANUMPY)
+ $(cmake-utils_use_with tiff TIFF)
+ $(cmake-utils_use_build test TESTING)
+ $(cmake-utils_use test CREATE_CTEST_TARGETS)
+ $(cmake-utils_use test AUTOBUILD_TESTS)
+ )
+ cmake-utils_src_configure
+ }
+
+ if use python; then
+ python_foreach_impl vigra_configure
+ else
+ # required for docdir
+ _check_build_dir init
+ vigra_configure
+ fi
+}
+
+src_compile() {
+ local VIGRA_BUILD_DIR
+ vigra_compile() {
+ cmake-utils_src_compile
+ VIGRA_BUILD_DIR="${BUILD_DIR}"
+ }
+ if use python; then
+ python_foreach_impl vigra_compile
+ else
+ vigra_compile
+ fi
+
+ if use doc; then
+ einfo "Generating Documentation"
+ # use build dir from last compile command
+ BUILD_DIR="${VIGRA_BUILD_DIR}" cmake-utils_src_make doc
+ fi
+}
+
+src_install() {
+ if use python; then
+ python_foreach_impl cmake-utils_src_install
+ python_optimize
+ else
+ cmake-utils_src_install
+ fi
+}
+
+src_test() {
+ # perhaps disable tests (see #390447)
+ vigra_test() {
+ PYTHONPATH="${BUILD_DIR}/vigranumpy/vigra" cmake-utils_src_test
+ }
+ if use python; then
+ python_foreach_impl vigra_test
+ else
+ vigra_test
+ fi
+}
diff --git a/media-libs/vigra/vigra-1.9.0.ebuild b/media-libs/vigra/vigra-1.9.0.ebuild
new file mode 100644
index 000000000000..dda3d6a76536
--- /dev/null
+++ b/media-libs/vigra/vigra-1.9.0.ebuild
@@ -0,0 +1,99 @@
+# 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="threads,xml"
+
+# This ebuild could use python-r1 in the future when upstream gets Python 3.x
+# support working
+inherit cmake-utils eutils multilib python-single-r1
+
+MY_P=${P}-src
+
+DESCRIPTION="a C++ computer vision library with emphasis on customizability of algorithms and data structures"
+HOMEPAGE="http://hci.iwr.uni-heidelberg.de/vigra/"
+SRC_URI="http://hci.iwr.uni-heidelberg.de/${PN}/${MY_P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 ~sparc x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="doc +fftw +hdf5 +jpeg openexr +png +python test +tiff"
+
+# Pull in dev-lang/python:2.7 for vigra-config which is always installed
+RDEPEND="dev-lang/python:2.7
+ >=dev-libs/boost-1.52.0-r6:=[python?,${PYTHON_USEDEP}]
+ fftw? ( sci-libs/fftw:3.0 )
+ hdf5? ( sci-libs/hdf5:= )
+ jpeg? ( virtual/jpeg )
+ openexr? ( media-libs/openexr:= )
+ png? ( media-libs/libpng:0= )
+ python? ( ${PYTHON_DEPS} )
+ tiff? ( media-libs/tiff:0= )"
+DEPEND="${RDEPEND}
+ doc? (
+ app-doc/doxygen
+ python? ( >=dev-python/sphinx-1.1.3-r5[${PYTHON_USEDEP}] )
+ )
+ test? (
+ python? ( >=dev-python/nose-1.1.2-r1[${PYTHON_USEDEP}] )
+ )"
+REQUIRED_USE="doc? ( hdf5 fftw )
+ python? ( hdf5 ${PYTHON_REQUIRED_USE} )
+ test? ( hdf5 python fftw )"
+
+DOCS=( README.txt )
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-automagicness.patch
+
+ # Don't build nor install API docs when not requested
+ use doc || { sed -i -e '/ADD_SUBDIRECTORY(docsrc)/d' CMakeLists.txt || die; }
+
+ # Don't use python_fix_shebang because we can't put this behind USE="python"
+ sed -i -e '/env/s:python:python2:' config/vigra-config.in || die
+}
+
+src_configure() {
+ local libdir=$(get_libdir)
+
+ # required for ddocdir
+ _check_build_dir init
+ local mycmakeargs=(
+ -DDOCDIR="${CMAKE_BUILD_DIR}"/doc
+ -DLIBDIR_SUFFIX=${libdir/lib}
+ -DDOCINSTALL=share/doc/${PF}
+ -DWITH_VALGRIND=OFF
+ $(cmake-utils_use_with python VIGRANUMPY)
+ $(cmake-utils_use_with png)
+ $(cmake-utils_use_with jpeg)
+ $(cmake-utils_use_with openexr)
+ $(cmake-utils_use_with tiff)
+ $(cmake-utils_use_with fftw FFTW3)
+ $(cmake-utils_use_with hdf5)
+ $(cmake-utils_use_build test TESTING)
+ $(cmake-utils_use test CREATE_CTEST_TARGETS)
+ $(cmake-utils_use test AUTOBUILD_TESTS)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+ use doc && cmake-utils_src_make doc
+}
+
+src_test() { :; } #390447
+
+src_install() {
+ cmake-utils_src_install
+
+ use python && python_optimize
+}
diff --git a/media-libs/vips/Manifest b/media-libs/vips/Manifest
new file mode 100644
index 000000000000..9000a1b53e24
--- /dev/null
+++ b/media-libs/vips/Manifest
@@ -0,0 +1,2 @@
+DIST vips-7.26.3.tar.gz 3163591 SHA256 9acbe13f391bde2e1748e62a3f2e07a4319ad07c2502cc1ee4422f0a6cbd12a0
+DIST vips-7.26.7.tar.gz 3180445 SHA256 efb1c21413f7b5c4d8c5f25bd81f3097805d989559aa0abe1615dbb0f6bb80e7
diff --git a/media-libs/vips/files/vips-7.20.7-build.patch b/media-libs/vips/files/vips-7.20.7-build.patch
new file mode 100644
index 000000000000..7e1fe93fa1e4
--- /dev/null
+++ b/media-libs/vips/files/vips-7.20.7-build.patch
@@ -0,0 +1,57 @@
+http://bugs.gentoo.org/show_bug.cgi?id=298671
+
+--- libvips/colour/im_icc_transform.c
++++ libvips/colour/im_icc_transform.c
+@@ -63,7 +63,7 @@
+ im_icc_transform( IMAGE *in, IMAGE *out,
+ const char *input_profile_filename,
+ const char *output_profile_filename,
+- int intent )
++ VipsIntent intent )
+ {
+ im_error( "im_icc_transform", "%s",
+ _( "lcms library not linked to this VIPS" ) );
+@@ -73,7 +73,7 @@
+
+ int
+ im_icc_import( IMAGE *in, IMAGE *out,
+- const char *input_profile_filename, int intent )
++ const char *input_profile_filename, VipsIntent intent )
+ {
+ im_error( "im_icc_import", "%s",
+ _( "lmcs library not linked to this VIPS" ) );
+@@ -82,7 +82,7 @@
+ }
+
+ int
+-im_icc_import_embedded( IMAGE *in, IMAGE *out, int intent )
++im_icc_import_embedded( IMAGE *in, IMAGE *out, VipsIntent intent )
+ {
+ im_error( "im_icc_import", "%s",
+ _( "lmcs library not linked to this VIPS" ) );
+@@ -92,7 +92,7 @@
+
+ int
+ im_icc_export_depth( IMAGE *in, IMAGE *out, int depth,
+- const char *output_profile_filename, int intent )
++ const char *output_profile_filename, VipsIntent intent )
+ {
+ im_error( "im_icc_export_depth", "%s",
+ _( "lmcs library not linked to this VIPS" ) );
+@@ -101,16 +101,6 @@
+ }
+
+ int
+-im_icc_export( IMAGE *in, IMAGE *out,
+- const char *output_profile_filename, int intent )
+-{
+- im_error( "im_icc_export", "%s",
+- _( "lmcs library not linked to this VIPS" ) );
+-
+- return( -1 );
+-}
+-
+-int
+ im_icc_ac2rc( IMAGE *in, IMAGE *out, const char *profile_filename )
+ {
+ im_error( "im_icc_ac2rc", "%s",
diff --git a/media-libs/vips/metadata.xml b/media-libs/vips/metadata.xml
new file mode 100644
index 000000000000..0dbbee13de7f
--- /dev/null
+++ b/media-libs/vips/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>graphics</herd>
+ <use>
+ <flag name='fits'>Enable support for the FITS image format through <pkg>sci-libs/cfitsio</pkg></flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/vips/vips-7.26.3.ebuild b/media-libs/vips/vips-7.26.3.ebuild
new file mode 100644
index 000000000000..0ab369802d05
--- /dev/null
+++ b/media-libs/vips/vips-7.26.3.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+PYTHON_DEPEND="python? 2"
+inherit eutils versionator python
+
+# TODO:
+# matio? ( sci-libs/matio ) - in science overlay #269598 (wait for new release
+# after 1.3.4) or until somebody adds it to the tree.
+
+DESCRIPTION="VIPS Image Processing Library"
+SRC_URI="http://www.vips.ecs.soton.ac.uk/supported/$(get_version_component_range 1-2)/${P}.tar.gz"
+HOMEPAGE="http://vips.sourceforge.net"
+
+LICENSE="LGPL-2.1"
+SLOT="1"
+KEYWORDS="amd64 x86"
+IUSE="debug exif fits fftw imagemagick jpeg lcms openexr +orc png python static-libs tiff"
+
+RDEPEND=">=dev-libs/glib-2.6:2
+ >=dev-libs/liboil-0.3
+ dev-libs/libxml2
+ sys-libs/zlib
+ >=x11-libs/pango-1.8
+ fftw? ( sci-libs/fftw:3.0 )
+ imagemagick? ( || ( >=media-gfx/imagemagick-5.0.0
+ media-gfx/graphicsmagick[imagemagick] ) )
+ lcms? ( media-libs/lcms )
+ openexr? ( >=media-libs/openexr-1.2.2 )
+ exif? ( >=media-libs/libexif-0.6 )
+ tiff? ( media-libs/tiff )
+ jpeg? ( virtual/jpeg )
+ fits? ( sci-libs/cfitsio )
+ png? ( >=media-libs/libpng-1.2.9 )
+ orc? ( >=dev-lang/orc-0.4.11 )"
+DEPEND="${RDEPEND}
+ dev-util/gtk-doc-am"
+
+pkg_setup() {
+ if use python; then
+ python_set_active_version 2
+ python_pkg_setup
+ fi
+}
+
+src_configure() {
+ econf \
+ $(use_enable debug) \
+ $(use_with fftw fftw3) \
+ $(use_with lcms) \
+ $(use_with openexr OpenEXR) \
+ $(use_with exif libexif) \
+ $(use_with imagemagick magick) \
+ $(use_with png) \
+ $(use_with tiff) \
+ $(use_with fits cfitsio) \
+ $(use_with jpeg) \
+ $(use_with orc) \
+ $(use_with python) \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS ChangeLog NEWS README THANKS TODO || die
+
+ # 314101
+ mv "${ED}"/usr/share/doc/${PN}/* "${ED}"/usr/share/doc/${PF} || die
+ rmdir "${ED}"/usr/share/doc/${PN}/ || die
+ dosym /usr/share/doc/${PF} /usr/share/doc/${PN}
+
+ find "${ED}" -name '*.la' -exec rm -f {} +
+}
diff --git a/media-libs/vips/vips-7.26.7.ebuild b/media-libs/vips/vips-7.26.7.ebuild
new file mode 100644
index 000000000000..08f102715ee0
--- /dev/null
+++ b/media-libs/vips/vips-7.26.7.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+PYTHON_DEPEND="python? 2"
+inherit eutils versionator python
+
+# TODO:
+# matio? ( sci-libs/matio ) - in science overlay #269598 (wait for new release
+# after 1.3.4) or until somebody adds it to the tree.
+
+DESCRIPTION="VIPS Image Processing Library"
+SRC_URI="http://www.vips.ecs.soton.ac.uk/supported/$(get_version_component_range 1-2)/${P}.tar.gz"
+HOMEPAGE="http://vips.sourceforge.net"
+
+LICENSE="LGPL-2.1"
+SLOT="1"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug exif fits fftw imagemagick jpeg lcms openexr +orc png python static-libs tiff"
+
+RDEPEND=">=dev-libs/glib-2.6:2
+ >=dev-libs/liboil-0.3
+ dev-libs/libxml2
+ sys-libs/zlib
+ >=x11-libs/pango-1.8
+ fftw? ( sci-libs/fftw:3.0 )
+ imagemagick? ( || ( >=media-gfx/imagemagick-5.0.0
+ media-gfx/graphicsmagick[imagemagick] ) )
+ lcms? ( media-libs/lcms )
+ openexr? ( >=media-libs/openexr-1.2.2 )
+ exif? ( >=media-libs/libexif-0.6 )
+ tiff? ( media-libs/tiff )
+ jpeg? ( virtual/jpeg )
+ fits? ( sci-libs/cfitsio )
+ png? ( >=media-libs/libpng-1.2.9 )
+ orc? ( >=dev-lang/orc-0.4.11 )"
+DEPEND="${RDEPEND}
+ dev-util/gtk-doc-am"
+
+pkg_setup() {
+ if use python; then
+ python_set_active_version 2
+ python_pkg_setup
+ fi
+}
+
+src_configure() {
+ econf \
+ $(use_enable debug) \
+ $(use_with fftw fftw3) \
+ $(use_with lcms) \
+ $(use_with openexr OpenEXR) \
+ $(use_with exif libexif) \
+ $(use_with imagemagick magick) \
+ $(use_with png) \
+ $(use_with tiff) \
+ $(use_with fits cfitsio) \
+ $(use_with jpeg) \
+ $(use_with orc) \
+ $(use_with python) \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS ChangeLog NEWS README THANKS TODO || die
+
+ # 314101
+ mv "${ED}"/usr/share/doc/${PN}/* "${ED}"/usr/share/doc/${PF} || die
+ rmdir "${ED}"/usr/share/doc/${PN}/ || die
+ dosym /usr/share/doc/${PF} /usr/share/doc/${PN}
+
+ find "${ED}" -name '*.la' -exec rm -f {} +
+}
diff --git a/media-libs/vo-aacenc/Manifest b/media-libs/vo-aacenc/Manifest
new file mode 100644
index 000000000000..4b9679faccc1
--- /dev/null
+++ b/media-libs/vo-aacenc/Manifest
@@ -0,0 +1,2 @@
+DIST vo-aacenc-0.1.2.tar.gz 599983 SHA256 d1911edba77f0406aa45ef630cdf340a4f35fd42e1d37a6e3ee01365d86f3959 SHA512 28eb60656738c205b3e7734b997691246b6786d4a11ff6ad32d6e2b512cc0c8ddaeec352f69bc7006923a9b66c90fb9b8679bb52d9954cb3152f4aa780051427 WHIRLPOOL 8390428255d61daa4b9fe9b9233cacb45ec89a34761995cf6ebb88803883e6cbfade492a204aae96abb392d6cf7613c9bb12dc3318ef2fb5c19aa84aafb40ba8
+DIST vo-aacenc-0.1.3.tar.gz 612463 SHA256 e51a7477a359f18df7c4f82d195dab4e14e7414cbd48cf79cc195fc446850f36 SHA512 c8f00dfa758270ba9cad35dd6e24905dc7cf33d7717454b7c2c56c40dbf54f682450aa010a410a0350d70119d2aaa2e5ba4471b5bbe05ccec1f9d20ab3e57853 WHIRLPOOL 92a969fca0f2ab6758cb6d2a0f7e56991ceeb3ff6c1d68d7731008c3c31ebdaa222211d6153b6a125ddbcc529f65652ce64d902d6a533d3d3782946f764c76a3
diff --git a/media-libs/vo-aacenc/metadata.xml b/media-libs/vo-aacenc/metadata.xml
new file mode 100644
index 000000000000..4e08d8ecdfd1
--- /dev/null
+++ b/media-libs/vo-aacenc/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>sound</herd>
+ <longdescription lang="en">VisualOn AAC encoder library This library contains an encoder implementation
+of the Advanced Audio Coding (AAC) audio codec. The library is based on
+a codec implementation by VisualOn, part of the Stagefright framework from
+the Google Android project.</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">opencore-amr</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/vo-aacenc/vo-aacenc-0.1.2.ebuild b/media-libs/vo-aacenc/vo-aacenc-0.1.2.ebuild
new file mode 100644
index 000000000000..78906f413dea
--- /dev/null
+++ b/media-libs/vo-aacenc/vo-aacenc-0.1.2.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+if [[ ${PV} == *9999 ]] ; then
+ SCM="git-2"
+ EGIT_REPO_URI="git://github.com/mstorsjo/${PN}.git"
+ [[ ${PV%9999} != "" ]] && EGIT_BRANCH="release/${PV%.9999}"
+fi
+
+inherit eutils multilib autotools ${SCM}
+
+DESCRIPTION="VisualOn AAC encoder library"
+HOMEPAGE="http://sourceforge.net/projects/opencore-amr/"
+
+if [[ ${PV} == *9999 ]] ; then
+ SRC_URI=""
+elif [[ ${PV%_p*} != ${PV} ]] ; then # Gentoo snapshot
+ SRC_URI="mirror://gentoo/${P}.tar.xz"
+else # Official release
+ SRC_URI="mirror://sourceforge/opencore-amr/${P}.tar.gz"
+fi
+
+LICENSE="Apache-2.0"
+SLOT="0"
+
+# Don't move KEYWORDS on the previous line or ekeyword won't work # 399061
+[[ ${PV} == *9999 ]] || \
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~x64-macos"
+IUSE="examples static-libs neon"
+
+src_prepare() {
+ [[ ${PV} == *9999 ]] && eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-silent-rules \
+ --disable-dependency-tracking \
+ $(use_enable examples example) \
+ $(use_enable neon armv7neon) \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ find "${D}"usr/$(get_libdir) -name '*.la' -delete
+}
diff --git a/media-libs/vo-aacenc/vo-aacenc-0.1.3.ebuild b/media-libs/vo-aacenc/vo-aacenc-0.1.3.ebuild
new file mode 100644
index 000000000000..508ec2b6b858
--- /dev/null
+++ b/media-libs/vo-aacenc/vo-aacenc-0.1.3.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2014 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://github.com/mstorsjo/${PN}.git"
+ [[ ${PV%9999} != "" ]] && EGIT_BRANCH="release/${PV%.9999}"
+ AUTOTOOLS_AUTORECONF=yes
+fi
+
+inherit autotools-multilib ${SCM}
+
+DESCRIPTION="VisualOn AAC encoder library"
+HOMEPAGE="http://sourceforge.net/projects/opencore-amr/"
+
+if [[ ${PV} == *9999 ]] ; then
+ SRC_URI=""
+elif [[ ${PV%_p*} != ${PV} ]] ; then # Gentoo snapshot
+ SRC_URI="mirror://gentoo/${P}.tar.xz"
+else # Official release
+ SRC_URI="mirror://sourceforge/opencore-amr/${P}.tar.gz"
+fi
+
+LICENSE="Apache-2.0"
+SLOT="0"
+
+[[ ${PV} == *9999 ]] || \
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~x64-macos"
+IUSE="examples static-libs neon"
+
+AUTOTOOLS_PRUNE_LIBTOOL_FILES=all
+
+src_configure() {
+ local myeconfargs=(
+ "$(use_enable examples example)"
+ "$(use_enable neon armv7neon)"
+ )
+ autotools-multilib_src_configure
+}
diff --git a/media-libs/vo-aacenc/vo-aacenc-9999.ebuild b/media-libs/vo-aacenc/vo-aacenc-9999.ebuild
new file mode 100644
index 000000000000..ea5a6b290a6c
--- /dev/null
+++ b/media-libs/vo-aacenc/vo-aacenc-9999.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2013 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://github.com/mstorsjo/${PN}.git"
+ [[ ${PV%9999} != "" ]] && EGIT_BRANCH="release/${PV%.9999}"
+ AUTOTOOLS_AUTORECONF=yes
+fi
+
+inherit autotools-multilib ${SCM}
+
+DESCRIPTION="VisualOn AAC encoder library"
+HOMEPAGE="http://sourceforge.net/projects/opencore-amr/"
+
+if [[ ${PV} == *9999 ]] ; then
+ SRC_URI=""
+elif [[ ${PV%_p*} != ${PV} ]] ; then # Gentoo snapshot
+ SRC_URI="mirror://gentoo/${P}.tar.xz"
+else # Official release
+ SRC_URI="mirror://sourceforge/opencore-amr/${P}.tar.gz"
+fi
+
+LICENSE="Apache-2.0"
+SLOT="0"
+
+[[ ${PV} == *9999 ]] || \
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~x64-macos"
+IUSE="examples static-libs neon"
+
+AUTOTOOLS_PRUNE_LIBTOOL_FILES=all
+
+src_configure() {
+ local myeconfargs=(
+ "$(use_enable examples example)"
+ "$(use_enable neon armv7neon)"
+ )
+ autotools-multilib_src_configure
+}
diff --git a/media-libs/vo-amrwbenc/Manifest b/media-libs/vo-amrwbenc/Manifest
new file mode 100644
index 000000000000..0888418229d9
--- /dev/null
+++ b/media-libs/vo-amrwbenc/Manifest
@@ -0,0 +1,2 @@
+DIST vo-amrwbenc-0.1.2.tar.gz 598415 SHA256 dd8c33e57bc415754f31fbb1b1536563bf731fc14e55f8182564e4c0fbb26435 SHA512 54be9c63d1b4c66e56dbf85cef2924c4cc564556186692182b44f199a5f72eba02c619b8cfa89f33b88add149fded81a42a392a9b96b6274ad0ad6c1f929a61b WHIRLPOOL bde8f79f722e6e997bbef1e85f279069a722153c58078c39c8dfbb43432ead98661c4107be4777bcd1b5a69407c5648d27fece8d981a47eb358c958f265df214
+DIST vo-amrwbenc-0.1.3.tar.gz 608936 SHA256 5652b391e0f0e296417b841b02987d3fd33e6c0af342c69542cbb016a71d9d4e SHA512 5f132f798f00ec2c0619700ab1ce456897792b45631af4b538c866636af9c9de5600af5f79040c41c3dc69c17cf4be7032139a9518a46a4276431e091f3dd6a9 WHIRLPOOL e4d10c0a9504ea27a515efb2d96428eea4c6a0c879c4377a37026c217a60515747e1616dff7da9222c1a8d263f6d106370d3fe7edc05d3fe547960ac4f24579d
diff --git a/media-libs/vo-amrwbenc/metadata.xml b/media-libs/vo-amrwbenc/metadata.xml
new file mode 100644
index 000000000000..6d37ec544972
--- /dev/null
+++ b/media-libs/vo-amrwbenc/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>sound</herd>
+ <longdescription lang="en">
+VisualOn AMR-WB encoder library
+This library contains an encoder implementation of the Adaptive Multi
+Rate Wideband (AMR-WB) audio codec. The library is based on a codec
+implementation by VisualOn, part of the Stagefright framework from
+the Google Android project.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">opencore-amr</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/vo-amrwbenc/vo-amrwbenc-0.1.2-r1.ebuild b/media-libs/vo-amrwbenc/vo-amrwbenc-0.1.2-r1.ebuild
new file mode 100644
index 000000000000..02ccc4ca4925
--- /dev/null
+++ b/media-libs/vo-amrwbenc/vo-amrwbenc-0.1.2-r1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_PRUNE_LIBTOOL_FILES=all
+
+if [[ ${PV} == *9999 ]] ; then
+ SCM="git-2"
+ EGIT_REPO_URI="git://github.com/mstorsjo/${PN}.git"
+ [[ ${PV%9999} != "" ]] && EGIT_BRANCH="release/${PV%.9999}"
+ AUTOTOOLS_AUTORECONF=1
+fi
+
+inherit autotools-multilib ${SCM}
+
+DESCRIPTION="VisualOn AMR-WB encoder library"
+HOMEPAGE="http://sourceforge.net/projects/opencore-amr/"
+
+if [[ ${PV} == *9999 ]] ; then
+ SRC_URI=""
+elif [[ ${PV%_p*} != ${PV} ]] ; then # Gentoo snapshot
+ SRC_URI="mirror://gentoo/${P}.tar.xz"
+else # Official release
+ SRC_URI="mirror://sourceforge/opencore-amr/${P}.tar.gz"
+fi
+
+LICENSE="Apache-2.0"
+SLOT="0"
+
+[[ ${PV} == *9999 ]] || \
+KEYWORDS="alpha amd64 ~arm hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~x64-macos"
+IUSE="examples static-libs"
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable examples example) \
+ )
+ autotools-multilib_src_configure
+}
diff --git a/media-libs/vo-amrwbenc/vo-amrwbenc-0.1.3.ebuild b/media-libs/vo-amrwbenc/vo-amrwbenc-0.1.3.ebuild
new file mode 100644
index 000000000000..ed68c3a6bc82
--- /dev/null
+++ b/media-libs/vo-amrwbenc/vo-amrwbenc-0.1.3.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_PRUNE_LIBTOOL_FILES=all
+
+if [[ ${PV} == *9999 ]] ; then
+ SCM="git-2"
+ EGIT_REPO_URI="git://github.com/mstorsjo/${PN}.git"
+ [[ ${PV%9999} != "" ]] && EGIT_BRANCH="release/${PV%.9999}"
+ AUTOTOOLS_AUTORECONF=1
+fi
+
+inherit autotools-multilib ${SCM}
+
+DESCRIPTION="VisualOn AMR-WB encoder library"
+HOMEPAGE="http://sourceforge.net/projects/opencore-amr/"
+
+if [[ ${PV} == *9999 ]] ; then
+ SRC_URI=""
+elif [[ ${PV%_p*} != ${PV} ]] ; then # Gentoo snapshot
+ SRC_URI="mirror://gentoo/${P}.tar.xz"
+else # Official release
+ SRC_URI="mirror://sourceforge/opencore-amr/${P}.tar.gz"
+fi
+
+LICENSE="Apache-2.0"
+SLOT="0"
+
+[[ ${PV} == *9999 ]] || \
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~x64-macos"
+IUSE="examples static-libs"
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable examples example) \
+ )
+ autotools-multilib_src_configure
+}
diff --git a/media-libs/vo-amrwbenc/vo-amrwbenc-9999.ebuild b/media-libs/vo-amrwbenc/vo-amrwbenc-9999.ebuild
new file mode 100644
index 000000000000..f28f12086d3c
--- /dev/null
+++ b/media-libs/vo-amrwbenc/vo-amrwbenc-9999.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_PRUNE_LIBTOOL_FILES=all
+
+if [[ ${PV} == *9999 ]] ; then
+ SCM="git-2"
+ EGIT_REPO_URI="git://github.com/mstorsjo/${PN}.git"
+ [[ ${PV%9999} != "" ]] && EGIT_BRANCH="release/${PV%.9999}"
+ AUTOTOOLS_AUTORECONF=1
+fi
+
+inherit autotools-multilib ${SCM}
+
+DESCRIPTION="VisualOn AMR-WB encoder library"
+HOMEPAGE="http://sourceforge.net/projects/opencore-amr/"
+
+if [[ ${PV} == *9999 ]] ; then
+ SRC_URI=""
+elif [[ ${PV%_p*} != ${PV} ]] ; then # Gentoo snapshot
+ SRC_URI="mirror://gentoo/${P}.tar.xz"
+else # Official release
+ SRC_URI="mirror://sourceforge/opencore-amr/${P}.tar.gz"
+fi
+
+LICENSE="Apache-2.0"
+SLOT="0"
+
+[[ ${PV} == *9999 ]] || \
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x64-macos"
+IUSE="examples static-libs"
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable examples example) \
+ )
+ autotools-multilib_src_configure
+}
diff --git a/media-libs/volpack/Manifest b/media-libs/volpack/Manifest
new file mode 100644
index 000000000000..92b8d2b925b5
--- /dev/null
+++ b/media-libs/volpack/Manifest
@@ -0,0 +1 @@
+DIST volpack-1.0c7.tgz 1218492 SHA256 b82b143df479add2b3e18499537a79b1b0fa7e1cc88dff2e7481b4ee075719d2
diff --git a/media-libs/volpack/metadata.xml b/media-libs/volpack/metadata.xml
new file mode 100644
index 000000000000..32643e2e2130
--- /dev/null
+++ b/media-libs/volpack/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>sci</herd>
+ <longdescription lang="en">
+ The VolPack Volume Rendering Library is a portable software library for
+ volume rendering based on a new family of fast volume rendering
+ algorithms using a Shear-Warp Factorization (proceedings of SIGGRAPH94).
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">amide</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/volpack/volpack-1.0_p7.ebuild b/media-libs/volpack/volpack-1.0_p7.ebuild
new file mode 100644
index 000000000000..16bfdfb5266a
--- /dev/null
+++ b/media-libs/volpack/volpack-1.0_p7.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+MYP=${PN}-${PV/_p/c}
+
+DESCRIPTION="Volume rendering library"
+HOMEPAGE="http://amide.sourceforge.net/packages.html"
+SRC_URI="mirror://sourceforge/amide/${MYP}.tgz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples static-libs"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ sys-devel/m4"
+
+S="${WORKDIR}/${MYP}"
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_compile() {
+ emake -j1
+}
+
+src_install() {
+ default
+ use doc && dodoc doc/*.pdf && dohtml doc/*.html
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples
+ fi
+
+}
diff --git a/media-libs/waffle/Manifest b/media-libs/waffle/Manifest
new file mode 100644
index 000000000000..b68028bc0575
--- /dev/null
+++ b/media-libs/waffle/Manifest
@@ -0,0 +1 @@
+DIST waffle-1.5.1.tar.xz 178136 SHA256 cbab0e926515064e818bf089a5af04be33307e5f40d07659fb40d59b2bfe20aa SHA512 0bcd9b76a9806f9b23f27870936f9aed7fe9a21a2c253c8f16b4303129bf7f95dc8f02207b89533b7addcfcdc12b6b05ce9c51a6f1f237d4cf9ac1d81916f831 WHIRLPOOL 3803bd21296ea1e0da3bb39eeb174ad713e005c444b24d792c61e85b28eb06fd863a1412800ad80dec2ff66b6af4b049b8fe9e8a6d82221771de3ad89a51f522
diff --git a/media-libs/waffle/metadata.xml b/media-libs/waffle/metadata.xml
new file mode 100644
index 000000000000..dfd7cc8587d7
--- /dev/null
+++ b/media-libs/waffle/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>x11</herd>
+<use>
+ <flag name="egl">Enable EGL support</flag>
+ <flag name="gbm">Enable support for the Generic Buffer Manager (gbm)</flag>
+ <flag name="wayland">Enable Wayland support</flag>
+</use>
+</pkgmetadata>
+
diff --git a/media-libs/waffle/waffle-1.5.1.ebuild b/media-libs/waffle/waffle-1.5.1.ebuild
new file mode 100644
index 000000000000..4265a5e78108
--- /dev/null
+++ b/media-libs/waffle/waffle-1.5.1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI="git://github.com/waffle-gl/waffle.git"
+
+if [[ ${PV} = 9999* ]]; then
+ GIT_ECLASS="git-2"
+fi
+
+inherit cmake-utils cmake-multilib ${GIT_ECLASS}
+
+DESCRIPTION="Library that allows selection of GL API and of window system at runtime"
+HOMEPAGE="http://people.freedesktop.org/~chadversary/waffle/"
+
+if [[ $PV = 9999* ]]; then
+ KEYWORDS=""
+else
+ SRC_URI="http://people.freedesktop.org/~chadversary/waffle/files/release/${P}/${P}.tar.xz"
+ KEYWORDS="~amd64 ~arm ~x86"
+fi
+
+LICENSE="BSD-2"
+SLOT="0"
+IUSE="doc egl gbm test wayland"
+
+RDEPEND="
+ >=media-libs/mesa-9.1.6[egl?,gbm?,${MULTILIB_USEDEP}]
+ >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}]
+ wayland? ( >=dev-libs/wayland-1.0.6[${MULTILIB_USEDEP}] )
+ gbm? ( >=virtual/libudev-208:=[${MULTILIB_USEDEP}] )
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libxcb-1.9.1[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}
+ >=x11-proto/xcb-proto-1.8-r3[${MULTILIB_USEDEP}]
+ doc? (
+ dev-libs/libxslt
+ app-text/docbook-xml-dtd:4.2
+ )"
+
+src_unpack() {
+ default
+ [[ $PV = 9999* ]] && git-2_src_unpack
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -Dwaffle_has_glx=ON
+ -Dwaffle_build_examples=OFF
+ $(cmake-utils_use doc waffle_build_manpages)
+ $(cmake-utils_use egl waffle_has_x11_egl)
+ $(cmake-utils_use gbm waffle_has_gbm)
+ $(cmake-utils_use test waffle_build_tests)
+ $(cmake-utils_use wayland waffle_has_wayland)
+ )
+
+ cmake-multilib_src_configure
+}
+
+src_test() {
+ emake -C "${CMAKE_BUILD_DIR}" check
+}
diff --git a/media-libs/waffle/waffle-9999.ebuild b/media-libs/waffle/waffle-9999.ebuild
new file mode 100644
index 000000000000..44c76deee1c2
--- /dev/null
+++ b/media-libs/waffle/waffle-9999.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI="git://github.com/waffle-gl/waffle.git"
+
+if [[ ${PV} = 9999* ]]; then
+ GIT_ECLASS="git-2"
+fi
+
+inherit cmake-utils cmake-multilib ${GIT_ECLASS}
+
+DESCRIPTION="Library that allows selection of GL API and of window system at runtime"
+HOMEPAGE="http://people.freedesktop.org/~chadversary/waffle/"
+
+if [[ $PV = 9999* ]]; then
+ KEYWORDS=""
+else
+ SRC_URI="http://people.freedesktop.org/~chadversary/waffle/files/release/${P}/${P}.tar.xz"
+ KEYWORDS="~amd64 ~arm ~x86"
+fi
+
+LICENSE="BSD-2"
+SLOT="0"
+IUSE="doc egl gbm test wayland"
+
+RDEPEND="
+ >=media-libs/mesa-9.1.6[egl?,gbm?,${MULTILIB_USEDEP}]
+ >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}]
+ wayland? ( >=dev-libs/wayland-1.0.6[${MULTILIB_USEDEP}] )
+ gbm? ( >=virtual/libudev-208:=[${MULTILIB_USEDEP}] )
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libxcb-1.9.1[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}
+ >=x11-proto/xcb-proto-1.8-r3[${MULTILIB_USEDEP}]
+ doc? (
+ dev-libs/libxslt
+ app-text/docbook-xml-dtd:4.2
+ )"
+
+src_unpack() {
+ default
+ [[ $PV = 9999* ]] && git-2_src_unpack
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -Dwaffle_has_glx=ON
+ -Dwaffle_build_examples=OFF
+ $(cmake-utils_use doc waffle_build_manpages)
+ $(cmake-utils_use egl waffle_has_x11_egl)
+ $(cmake-utils_use gbm waffle_has_gbm)
+ $(cmake-utils_use test waffle_build_tests)
+ $(cmake-utils_use wayland waffle_has_wayland)
+ )
+
+ cmake-multilib_src_configure
+}
+
+src_test() {
+ emake -C "${CMAKE_BUILD_DIR}" check
+}
diff --git a/media-libs/webrtc-audio-processing/Manifest b/media-libs/webrtc-audio-processing/Manifest
new file mode 100644
index 000000000000..44cb8cc03f27
--- /dev/null
+++ b/media-libs/webrtc-audio-processing/Manifest
@@ -0,0 +1 @@
+DIST webrtc-audio-processing-0.1.tar.xz 392540 SHA256 ed4b52f9c2688b97628035a5565377d74704d7c04de4254a768df3342c7afedc SHA512 7626897a1f3d21e78896ed45074fbfbf0752918f7240ad9651390a39eabcb41b8aa2e31624a9cb62dc2e78debdafc0400159c0c2f3e7fc0838ff08004054bcd0 WHIRLPOOL fd3a07d5d4937fd0c37247fe9e428ab2b5623d8dc68ce0339131e7d18527ffaf6e4307f13a5f1a3e0204116f564ba166813bbd07e8e6fc5a80ceecd2ca939b64
diff --git a/media-libs/webrtc-audio-processing/metadata.xml b/media-libs/webrtc-audio-processing/metadata.xml
new file mode 100644
index 000000000000..1470e032181b
--- /dev/null
+++ b/media-libs/webrtc-audio-processing/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-libs/webrtc-audio-processing/webrtc-audio-processing-0.1-r1.ebuild b/media-libs/webrtc-audio-processing/webrtc-audio-processing-0.1-r1.ebuild
new file mode 100644
index 000000000000..7d0379a17f44
--- /dev/null
+++ b/media-libs/webrtc-audio-processing/webrtc-audio-processing-0.1-r1.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_PRUNE_LIBTOOL_FILES=all
+inherit autotools-multilib
+
+DESCRIPTION="AudioProcessing library from the webrtc.org code base"
+HOMEPAGE="http://www.freedesktop.org/software/pulseaudio/webrtc-audio-processing/"
+SRC_URI="http://freedesktop.org/software/pulseaudio/${PN}/${P}.tar.xz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86 ~amd64-linux"
+IUSE="static-libs"
+
+RDEPEND="abi_x86_32? ( !<=app-emulation/emul-linux-x86-soundlibs-20130224-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)] )"
+
+DOCS=( AUTHORS NEWS README )
diff --git a/media-libs/wxsvg/Manifest b/media-libs/wxsvg/Manifest
new file mode 100644
index 000000000000..54ae158ae914
--- /dev/null
+++ b/media-libs/wxsvg/Manifest
@@ -0,0 +1,3 @@
+DIST wxsvg-1.1.13.tar.bz2 669378 SHA256 ebaecb322bb7fad97a3cd686bed9827b00afe84063cf2784a7e19891dabd805e SHA512 6c8dddbb274d1d9cd32fdec1c4ac6f73d3497fd2a29ecbe2d6640c2a65a290940faa92fba954c3990b32f713dc89de74e31484263bbd9c2718dc436ca19d2397 WHIRLPOOL 643aa93161028436c30014cb3a2e36cfab53b5f9341d1e21c129eab6e86b756150dc491cc4cf2be0ef6ff956eb7a5ff5c67f8ee1d26879b228e8af18459e9601
+DIST wxsvg-1.4.2.tar.bz2 461580 SHA256 c7555eacb786583dda4288fa6f3e914a14ec175be0a02b31d9c4e19f173bd760 SHA512 6b6c8c5bf5b369da75ee9d034f6be8611019f48066d352b7268a127f1d9f9487c4aa694b0f0529efa3c0b63d51f7c38ba503d7cf83f9e930b876ebc4bcbce9e1 WHIRLPOOL 84cc8a7b849cac5ad1045572c5ee0aa267d8a6e0e97db0c61f2896def7e347055330a61bf89cfb64360411681c15e0df567c05b5efe4bc5dc456ba9285d9d219
+DIST wxsvg-1.5.4.tar.bz2 478568 SHA256 5ca0ce0fcb45a3f0801b645000e9b5179bab4d62fb56df51f027d75cbef5a655 SHA512 89d909c1db975dcbca464e3d7850277b72e596bb6020d3c796cb235c55fcb9282472b522a1a3a15cc773eb98e8e2c69f463c5085cfc1b66221316d19ca87cf46 WHIRLPOOL c2caf28102c908e6efdaff413224afde2d83a0e24b199b7904696a334b8b9e64f51f91ab6d3a2ed57c69f3ebaaef96bf1ba890d1af600adb92db47ccfcfbf4cf
diff --git a/media-libs/wxsvg/metadata.xml b/media-libs/wxsvg/metadata.xml
new file mode 100644
index 000000000000..895135c3c2d9
--- /dev/null
+++ b/media-libs/wxsvg/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>wxwidgets</herd>
+ <upstream>
+ <remote-id type="sourceforge">wxsvg</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/wxsvg/wxsvg-1.1.13.ebuild b/media-libs/wxsvg/wxsvg-1.1.13.ebuild
new file mode 100644
index 000000000000..9cd2beafbd60
--- /dev/null
+++ b/media-libs/wxsvg/wxsvg-1.1.13.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+WX_GTK_VER=2.8
+
+inherit eutils wxwidgets
+
+DESCRIPTION="C++ library to create, manipulate and render SVG files"
+HOMEPAGE="http://wxsvg.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="wxWinLL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="static-libs"
+
+RDEPEND=">=dev-libs/expat-2
+ >=dev-libs/glib-2.28
+ dev-libs/libxml2
+ media-libs/fontconfig
+ >=media-libs/freetype-2
+ x11-libs/cairo
+ x11-libs/pango
+ x11-libs/wxGTK:2.8[X]
+ virtual/ffmpeg"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS=( AUTHORS ChangeLog TODO )
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ --with-wx-config=${WX_CONFIG}
+}
+
+src_install() {
+ default
+ prune_libtool_files
+}
diff --git a/media-libs/wxsvg/wxsvg-1.4.2.ebuild b/media-libs/wxsvg/wxsvg-1.4.2.ebuild
new file mode 100644
index 000000000000..3db6713ae600
--- /dev/null
+++ b/media-libs/wxsvg/wxsvg-1.4.2.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+WX_GTK_VER=2.8
+inherit eutils wxwidgets
+
+DESCRIPTION="C++ library to create, manipulate and render SVG files"
+HOMEPAGE="http://wxsvg.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="wxWinLL-3"
+SLOT="0/2" # based on SONAME of libwxsvg.so
+KEYWORDS="amd64 ~x86"
+IUSE="static-libs"
+
+RDEPEND=">=dev-libs/expat-2:=
+ >=dev-libs/glib-2.28:2=
+ dev-libs/libxml2:=
+ media-libs/fontconfig:=
+ media-libs/freetype:2=
+ x11-libs/cairo:=
+ x11-libs/pango:=
+ x11-libs/wxGTK:2.8=[X]
+ virtual/ffmpeg"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS=( AUTHORS ChangeLog TODO )
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ --with-wx-config=${WX_CONFIG}
+}
+
+src_install() {
+ default
+ prune_libtool_files
+}
diff --git a/media-libs/wxsvg/wxsvg-1.5.4.ebuild b/media-libs/wxsvg/wxsvg-1.5.4.ebuild
new file mode 100644
index 000000000000..2aa1dad0a4a9
--- /dev/null
+++ b/media-libs/wxsvg/wxsvg-1.5.4.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+WX_GTK_VER=2.8
+inherit eutils wxwidgets
+
+DESCRIPTION="C++ library to create, manipulate and render SVG files"
+HOMEPAGE="http://wxsvg.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="wxWinLL-3"
+SLOT="0/3" # based on SONAME of libwxsvg.so
+KEYWORDS="~amd64 ~x86"
+IUSE="static-libs"
+
+RDEPEND=">=dev-libs/expat-2:=
+ >=dev-libs/glib-2.28:2=
+ dev-libs/libxml2:=
+ media-libs/fontconfig:=
+ media-libs/freetype:2=
+ x11-libs/cairo:=
+ x11-libs/pango:=
+ x11-libs/wxGTK:2.8=[X]
+ virtual/ffmpeg"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS=( AUTHORS ChangeLog TODO )
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ --with-wx-config=${WX_CONFIG}
+}
+
+src_install() {
+ default
+ prune_libtool_files
+}
diff --git a/media-libs/x264/Manifest b/media-libs/x264/Manifest
new file mode 100644
index 000000000000..22b65d8c99c7
--- /dev/null
+++ b/media-libs/x264/Manifest
@@ -0,0 +1,7 @@
+DIST x264-snapshot-20111220-2245.tar.bz2 532402 SHA256 c360b0320cc72a77c5f2ececbd100bbbdd0461227f7c4bc06212e86f5aa0fb8a SHA512 d6801f326f9848672f889cb9fe43da865b2351143b8f31f17341c62b89ac01f430cdc56c12d8bf9cf9f041e8381494915a84508eaf41898ef87631385ee6f3c2 WHIRLPOOL 6aed824854947435819d157c2c371ca358ce05d518adcfea9ec6c47a74bdd97d9c527e989b9eb0a6d2f00060c45186d3a3ade22af21d450c9e2c25be9aa46b34
+DIST x264-snapshot-20120327-2245.tar.bz2 551101 SHA256 065ffdbd7c9f9dcc7194bd6a4943b0d4b2e99b5dd68979fb3634644c725c2cbe SHA512 915e2933596f4809a7cba25a6eb7f8a555daaeeb3a5a95a314cb947940d562e12d164f52ab6b94d7abd52e66ee986d3414c54685390a619357eef22ba0cd6a6a WHIRLPOOL e61b779d9eba7cad48899bc7eb88e9b5e140013d016792ddd4d2c149f7447d8bbf528615b751c095813519218bc7e3072ded407c386043dff8270d2c43a7ecb9
+DIST x264-snapshot-20120707-2245.tar.bz2 554243 SHA256 52fdc8b558fa7dcb6419fef73fb07e771cdc2544f7652cde42968d640139eedb SHA512 5e263dfe4b4defd66a8a855467692473723ada9c34ab8da7042f2d10327f944914d0c8103f22edd4dc7a1c4664db5bfbf42052652c9f57b392db32f4ab77081b WHIRLPOOL 1a9061e5940e22071390b579abf859fec49f8da51f31e241b65513566eda66178c46b4b4c20318bb981230a16511e84b89e6174bc7f9ccbd48915a909cef3b5b
+DIST x264-snapshot-20130506-2245.tar.bz2 608013 SHA256 da7055a457d19b97ff35a2830e7caae665ea06d22ddc28393168983d1cd21f61 SHA512 6ba35f6b39fefbda6990dc0fd674efbe403b0616f2f02d71ae3e7bbc6ce2bab8878a963dd5f306f8a2b3b9a74c5c0b4dbf9dfb9dc0e602b807f726cf072905b5 WHIRLPOOL bfb4b7dd0e865cd9305ac177f5c544555004039209dda695fcc932aab647b87c96f0bae4fa040276bd3dbee64dcf982f3c2447efdbc01c1d42f040c9d5d0af85
+DIST x264-snapshot-20130731-2245.tar.bz2 625052 SHA256 caa39660f2ddc9dc53033af709452a21479c7b7c715c5f9d744d0d452c2d9e67 SHA512 2abcab4013dee9ac58779afd89fc558a8286cf33affda037e95a7e10cf00387cee1ad461ac59c5020fd9b72d303170f16d4e4b5593ec21528a33b0f530878d9d WHIRLPOOL 6f7fcc1c05c47a0d31578fbd0268b84ba458a968b087fb7d1050f67739bec140a1c3ded288cd0000180b5be921b469357ec9cdc363fc1eec82d82bd795557b56
+DIST x264-snapshot-20130912-2245.tar.bz2 628862 SHA256 87142cf15b7d7052f2e046a4b80adc3176fd6421889ab3bae83afc10d57ec648 SHA512 3e2223ca465b1ac214a421c512477524309694f321baabcd62b84bc341de34ecf196c8c91a931bbda0d7538dc138b924dc22ed7f242e135e4b53b387638b40c0 WHIRLPOOL b795a91511994761e9cf6e3a279708e4536ebc281b9ca1d18f0bceb93c89c062608d2e5c779a0f924d2dc005f90921223b42b22e409eaaca8a0041aae354213f
+DIST x264-snapshot-20140308-2245.tar.bz2 624712 SHA256 b179cb1e1d4f51418d292011a7494d5b62145571c05c22007f28d8fd89d2ebbe SHA512 42dc8183aa7af2bd4c360edc0349193cf69a119450880af0c1586e8f27490d7c6784c464b29c9f07ae972aaf661672ab4f2094a46a3d19b6df35be1f9d9a1629 WHIRLPOOL b1ac3341647d9d8d8ff6177f179ee8b5d6a49a38a48791748c24d5cd3c53858758785a0d21d42fbe373ec74465d947b69526a487da15fbca1a1f9aa50064288c
diff --git a/media-libs/x264/files/x264-0.0.20120707-gcc48.patch b/media-libs/x264/files/x264-0.0.20120707-gcc48.patch
new file mode 100644
index 000000000000..16cb4bff0018
--- /dev/null
+++ b/media-libs/x264/files/x264-0.0.20120707-gcc48.patch
@@ -0,0 +1,138 @@
+From 6129dbe86484393a2ea520be94ef9b550b0bd113 Mon Sep 17 00:00:00 2001
+From: Jason Garrett-Glaser <jason@x264.com>
+Date: Wed, 27 Feb 2013 13:30:22 -0800
+Subject: [PATCH] Fix array overreads that caused miscompilation in gcc 4.8
+
+---
+ common/common.h | 1 +
+ common/set.c | 78 +++++++++++++++++++++++++++++++-------------------------
+ tools/checkasm.c | 2 +-
+ 3 files changed, 45 insertions(+), 36 deletions(-)
+
+diff --git a/common/common.h b/common/common.h
+index 39ad5cb..0da1d43 100644
+--- a/common/common.h
++++ b/common/common.h
+@@ -40,6 +40,7 @@
+ #define IS_DISPOSABLE(type) ( type == X264_TYPE_B )
+ #define FIX8(f) ((int)(f*(1<<8)+.5))
+ #define ALIGN(x,a) (((x)+((a)-1))&~((a)-1))
++#define ARRAY_ELEMS(a) ((sizeof(a))/(sizeof(a[0])))
+
+ #define CHECKED_MALLOC( var, size )\
+ do {\
+diff --git a/common/set.c b/common/set.c
+index 4c72125..fa8b158 100644
+--- a/common/set.c
++++ b/common/set.c
+@@ -85,44 +85,49 @@ int x264_cqm_init( x264_t *h )
+ int max_qp_err = -1;
+ int max_chroma_qp_err = -1;
+ int min_qp_err = QP_MAX+1;
+- int num_8x8_lists = h->sps->i_chroma_format_idc == CHROMA_444 ? 4 : 2; /* Checkasm may segfault if optimized out by --chroma-format */
++ int num_8x8_lists = h->sps->i_chroma_format_idc == CHROMA_444 ? 4
++ : h->param.analyse.b_transform_8x8 ? 2 : 0; /* Checkasm may segfault if optimized out by --chroma-format */
+
+- for( int i = 0; i < 4 + num_8x8_lists; i++ )
+- {
+- int size = i<4 ? 16 : 64;
+- int j;
+- for( j = (i<4 ? 0 : 4); j < i; j++ )
+- if( !memcmp( h->pps->scaling_list[i], h->pps->scaling_list[j], size*sizeof(uint8_t) ) )
+- break;
+- if( j < i )
+- {
+- h-> quant4_mf[i] = h-> quant4_mf[j];
+- h->dequant4_mf[i] = h->dequant4_mf[j];
+- h->unquant4_mf[i] = h->unquant4_mf[j];
+- }
+- else
+- {
+- CHECKED_MALLOC( h-> quant4_mf[i], (QP_MAX+1)*size*sizeof(udctcoef) );
+- CHECKED_MALLOC( h->dequant4_mf[i], 6*size*sizeof(int) );
+- CHECKED_MALLOC( h->unquant4_mf[i], (QP_MAX+1)*size*sizeof(int) );
+- }
+-
+- for( j = (i<4 ? 0 : 4); j < i; j++ )
+- if( deadzone[j&3] == deadzone[i&3] &&
+- !memcmp( h->pps->scaling_list[i], h->pps->scaling_list[j], size*sizeof(uint8_t) ) )
+- break;
+- if( j < i )
+- {
+- h->quant4_bias[i] = h->quant4_bias[j];
+- h->quant4_bias0[i] = h->quant4_bias0[j];
+- }
+- else
+- {
+- CHECKED_MALLOC( h->quant4_bias[i], (QP_MAX+1)*size*sizeof(udctcoef) );
+- CHECKED_MALLOC( h->quant4_bias0[i], (QP_MAX+1)*size*sizeof(udctcoef) );
+- }
++#define CQM_ALLOC( w, count )\
++ for( int i = 0; i < count; i++ )\
++ {\
++ int size = w*w;\
++ int start = w == 8 ? 4 : 0;\
++ int j;\
++ for( j = 0; j < i; j++ )\
++ if( !memcmp( h->pps->scaling_list[i+start], h->pps->scaling_list[j+start], size*sizeof(uint8_t) ) )\
++ break;\
++ if( j < i )\
++ {\
++ h-> quant##w##_mf[i] = h-> quant##w##_mf[j];\
++ h->dequant##w##_mf[i] = h->dequant##w##_mf[j];\
++ h->unquant##w##_mf[i] = h->unquant##w##_mf[j];\
++ }\
++ else\
++ {\
++ CHECKED_MALLOC( h-> quant##w##_mf[i], (QP_MAX+1)*size*sizeof(udctcoef) );\
++ CHECKED_MALLOC( h->dequant##w##_mf[i], 6*size*sizeof(int) );\
++ CHECKED_MALLOC( h->unquant##w##_mf[i], (QP_MAX+1)*size*sizeof(int) );\
++ }\
++ for( j = 0; j < i; j++ )\
++ if( deadzone[j] == deadzone[i] &&\
++ !memcmp( h->pps->scaling_list[i+start], h->pps->scaling_list[j+start], size*sizeof(uint8_t) ) )\
++ break;\
++ if( j < i )\
++ {\
++ h->quant##w##_bias[i] = h->quant##w##_bias[j];\
++ h->quant##w##_bias0[i] = h->quant##w##_bias0[j];\
++ }\
++ else\
++ {\
++ CHECKED_MALLOC( h->quant##w##_bias[i], (QP_MAX+1)*size*sizeof(udctcoef) );\
++ CHECKED_MALLOC( h->quant##w##_bias0[i], (QP_MAX+1)*size*sizeof(udctcoef) );\
++ }\
+ }
+
++ CQM_ALLOC( 4, 4 )
++ CQM_ALLOC( 8, num_8x8_lists )
++
+ for( int q = 0; q < 6; q++ )
+ {
+ for( int i = 0; i < 16; i++ )
+@@ -204,6 +209,9 @@ int x264_cqm_init( x264_t *h )
+ for( int cat = 0; cat < 3 + CHROMA444; cat++ )
+ {
+ int dct8x8 = cat&1;
++ if( !h->param.analyse.b_transform_8x8 && dct8x8 )
++ continue;
++
+ int size = dct8x8 ? 64 : 16;
+ udctcoef *nr_offset = h->nr_offset_emergency[q][cat];
+ /* Denoise chroma first (due to h264's chroma QP offset), then luma, then DC. */
+diff --git a/tools/checkasm.c b/tools/checkasm.c
+index 9135b70..441687b 100644
+--- a/tools/checkasm.c
++++ b/tools/checkasm.c
+@@ -309,7 +309,7 @@ static int check_pixel( int cpu_ref, int cpu_new )
+
+ #define TEST_PIXEL( name, align ) \
+ ok = 1, used_asm = 0; \
+- for( int i = 0; i < 8; i++ ) \
++ for( int i = 0; i < ARRAY_ELEMS(pixel_c.name); i++ ) \
+ { \
+ int res_c, res_asm; \
+ if( pixel_asm.name[i] != pixel_ref.name[i] ) \
+--
+1.8.1.5
+
diff --git a/media-libs/x264/files/x264-0.0.20130731-cflags.patch b/media-libs/x264/files/x264-0.0.20130731-cflags.patch
new file mode 100644
index 000000000000..3014b47eca8e
--- /dev/null
+++ b/media-libs/x264/files/x264-0.0.20130731-cflags.patch
@@ -0,0 +1,62 @@
+https://bugs.gentoo.org/420241 for x32 stuff
+initial x32 support -- no asm code, just pure C
+
+avoid messing too much with CFLAGS.
+https://bugs.gentoo.org/show_bug.cgi?id=351219
+https://bugs.gentoo.org/show_bug.cgi?id=413661
+
+
+Index: x264-9999/configure
+===================================================================
+--- x264-9999.orig/configure
++++ x264-9999/configure
+@@ -553,11 +553,6 @@ case $host_cpu in
+ if [[ "$asm" == auto && "$CFLAGS" != *-march* ]]; then
+ CFLAGS="$CFLAGS -march=i686"
+ fi
+- if [[ "$asm" == auto && "$CFLAGS" != *-mfpmath* ]]; then
+- CFLAGS="$CFLAGS -mfpmath=sse -msse"
+- fi
+- CFLAGS="-m32 $CFLAGS"
+- LDFLAGS="-m32 $LDFLAGS"
+ else
+ # icc on linux has various degrees of mod16 stack support
+ if [ $SYS = LINUX ]; then
+@@ -588,13 +583,8 @@ case $host_cpu in
+ x86_64)
+ ARCH="X86_64"
+ AS="yasm"
+- [ $compiler = GNU ] && CFLAGS="-m64 $CFLAGS" && LDFLAGS="-m64 $LDFLAGS"
+ if [ "$SYS" = MACOSX ]; then
+ ASFLAGS="$ASFLAGS -f macho64 -m amd64 -DPIC -DPREFIX"
+- if cc_check '' "-arch x86_64"; then
+- CFLAGS="$CFLAGS -arch x86_64"
+- LDFLAGS="$LDFLAGS -arch x86_64"
+- fi
+ elif [ "$SYS" = WINDOWS ]; then
+ ASFLAGS="$ASFLAGS -f win32 -m amd64"
+ # only the GNU toolchain is inconsistent in prefixing function names with _
+@@ -602,7 +592,11 @@ case $host_cpu in
+ [ $compiler = GNU ] && LDFLAGS="$LDFLAGS -Wl,--nxcompat -Wl,--dynamicbase"
+ [ $compiler = GNU ] && RCFLAGS="--target=pe-x86-64 $RCFLAGS"
+ else
+- ASFLAGS="$ASFLAGS -f elf -m amd64"
++ if cpp_check "" "" "__ILP32__" ; then
++ ASFLAGS="$ASFLAGS -f elf -m x32"
++ else
++ ASFLAGS="$ASFLAGS -f elf -m amd64"
++ fi
+ fi
+ ;;
+ powerpc|powerpc64)
+@@ -964,10 +958,6 @@ if [ "$pic" = "yes" ] ; then
+ [ $SYS = SunOS -a "$ARCH" = "X86" ] && SOFLAGS="$SOFLAGS -mimpure-text"
+ fi
+
+-if [ "$debug" != "yes" -a "$gprof" != "yes" ]; then
+- CFLAGS="$CFLAGS -fomit-frame-pointer"
+-fi
+-
+ if [ "$strip" = "yes" ]; then
+ CFLAGS="$CFLAGS -s"
+ LDFLAGS="$LDFLAGS -s"
diff --git a/media-libs/x264/files/x264-0.0.20130912-cflags.patch b/media-libs/x264/files/x264-0.0.20130912-cflags.patch
new file mode 100644
index 000000000000..c08a0d7e3de1
--- /dev/null
+++ b/media-libs/x264/files/x264-0.0.20130912-cflags.patch
@@ -0,0 +1,54 @@
+diff --git a/configure b/configure
+index 07796b1..afdda94 100755
+--- a/configure
++++ b/configure
+@@ -556,11 +556,6 @@ case $host_cpu in
+ if [[ "$asm" == auto && "$CFLAGS" != *-march* ]]; then
+ CFLAGS="$CFLAGS -march=i686"
+ fi
+- if [[ "$asm" == auto && "$CFLAGS" != *-mfpmath* ]]; then
+- CFLAGS="$CFLAGS -mfpmath=sse -msse"
+- fi
+- CFLAGS="-m32 $CFLAGS"
+- LDFLAGS="-m32 $LDFLAGS"
+ else
+ # icc on linux has various degrees of mod16 stack support
+ if [ $SYS = LINUX ]; then
+@@ -591,13 +586,8 @@ case $host_cpu in
+ x86_64)
+ ARCH="X86_64"
+ AS="yasm"
+- [ $compiler = GNU ] && CFLAGS="-m64 $CFLAGS" && LDFLAGS="-m64 $LDFLAGS"
+ if [ "$SYS" = MACOSX ]; then
+ ASFLAGS="$ASFLAGS -f macho64 -m amd64 -DPIC -DPREFIX"
+- if cc_check '' "-arch x86_64"; then
+- CFLAGS="$CFLAGS -arch x86_64"
+- LDFLAGS="$LDFLAGS -arch x86_64"
+- fi
+ elif [ "$SYS" = WINDOWS -o "$SYS" = CYGWIN ]; then
+ ASFLAGS="$ASFLAGS -f win32 -m amd64"
+ # only the GNU toolchain is inconsistent in prefixing function names with _
+@@ -605,7 +595,11 @@ case $host_cpu in
+ [ $compiler = GNU ] && LDFLAGS="$LDFLAGS -Wl,--nxcompat -Wl,--dynamicbase"
+ [ $compiler = GNU ] && RCFLAGS="--target=pe-x86-64 $RCFLAGS"
+ else
+- ASFLAGS="$ASFLAGS -f elf -m amd64"
++ if cpp_check "" "" "__ILP32__" ; then
++ ASFLAGS="$ASFLAGS -f elf -m x32"
++ else
++ ASFLAGS="$ASFLAGS -f elf -m amd64"
++ fi
+ fi
+ ;;
+ powerpc|powerpc64)
+@@ -971,10 +965,6 @@ if [ "$pic" = "yes" ] ; then
+ [ $SYS = SunOS -a "$ARCH" = "X86" ] && SOFLAGS="$SOFLAGS -mimpure-text"
+ fi
+
+-if [ "$debug" != "yes" -a "$gprof" != "yes" ]; then
+- CFLAGS="$CFLAGS -fomit-frame-pointer"
+-fi
+-
+ if [ "$strip" = "yes" ]; then
+ CFLAGS="$CFLAGS -s"
+ LDFLAGS="$LDFLAGS -s"
diff --git a/media-libs/x264/files/x264-cflags.patch b/media-libs/x264/files/x264-cflags.patch
new file mode 100644
index 000000000000..a5f4d79119e9
--- /dev/null
+++ b/media-libs/x264/files/x264-cflags.patch
@@ -0,0 +1,55 @@
+diff --git a/configure b/configure
+index 0a4cb94..8f7ef75 100755
+--- a/configure
++++ b/configure
+@@ -591,11 +591,6 @@ case $host_cpu in
+ if [[ "$asm" == auto && "$CFLAGS" != *-march* ]]; then
+ CFLAGS="$CFLAGS -march=i686"
+ fi
+- if [[ "$asm" == auto && "$CFLAGS" != *-mfpmath* ]]; then
+- CFLAGS="$CFLAGS -mfpmath=sse -msse"
+- fi
+- CFLAGS="-m32 $CFLAGS"
+- LDFLAGS="-m32 $LDFLAGS"
+ elif [ $compiler = ICC ]; then
+ # icc on linux has various degrees of mod16 stack support
+ if [ $SYS = LINUX ]; then
+@@ -627,13 +622,8 @@ case $host_cpu in
+ ARCH="X86_64"
+ AS="yasm"
+ ASFLAGS="$ASFLAGS -DARCH_X86_64=1 -I\$(SRCPATH)/common/x86/"
+- [ $compiler = GNU ] && CFLAGS="-m64 $CFLAGS" && LDFLAGS="-m64 $LDFLAGS"
+ if [ "$SYS" = MACOSX ]; then
+ ASFLAGS="$ASFLAGS -f macho64 -m amd64 -DPIC -DPREFIX"
+- if cc_check '' "-arch x86_64"; then
+- CFLAGS="$CFLAGS -arch x86_64"
+- LDFLAGS="$LDFLAGS -arch x86_64"
+- fi
+ elif [ "$SYS" = WINDOWS -o "$SYS" = CYGWIN ]; then
+ ASFLAGS="$ASFLAGS -f win32 -m amd64"
+ # only the GNU toolchain is inconsistent in prefixing function names with _
+@@ -641,7 +631,11 @@ case $host_cpu in
+ [ $compiler = GNU ] && LDFLAGS="$LDFLAGS -Wl,--nxcompat -Wl,--dynamicbase"
+ [ $compiler = GNU ] && RCFLAGS="--target=pe-x86-64 $RCFLAGS"
+ else
+- ASFLAGS="$ASFLAGS -f elf -m amd64"
++ if cpp_check "" "" "__ILP32__" ; then
++ ASFLAGS="$ASFLAGS -f elf -m x32"
++ else
++ ASFLAGS="$ASFLAGS -f elf -m amd64"
++ fi
+ fi
+ ;;
+ powerpc|powerpc64)
+@@ -1006,10 +1000,6 @@ if [ "$pic" = "yes" ] ; then
+ [ $SYS = SunOS -a "$ARCH" = "X86" ] && SOFLAGS="$SOFLAGS -mimpure-text"
+ fi
+
+-if [ "$debug" != "yes" -a "$gprof" != "yes" ]; then
+- CFLAGS="$CFLAGS -fomit-frame-pointer"
+-fi
+-
+ if [ "$strip" = "yes" ]; then
+ LDFLAGS="$LDFLAGS -s"
+ fi
+
diff --git a/media-libs/x264/files/x264-nostrip.patch b/media-libs/x264/files/x264-nostrip.patch
new file mode 100644
index 000000000000..b4e2689a18e6
--- /dev/null
+++ b/media-libs/x264/files/x264-nostrip.patch
@@ -0,0 +1,16 @@
+Index: x264-svn/configure
+===================================================================
+--- x264-svn.orig/configure
++++ x264-svn/configure
+@@ -374,11 +374,6 @@ if [ "$pic" = "yes" ] ; then
+ ASFLAGS="$ASFLAGS -D__PIC__"
+ fi
+
+-if [ "$debug" != "yes" -a "$gprof" != "yes" ]; then
+- CFLAGS="$CFLAGS -s -fomit-frame-pointer"
+- LDFLAGS="$LDFLAGS -s"
+-fi
+-
+ if [ "$debug" = "yes" ]; then
+ CFLAGS="-O1 -g $CFLAGS"
+ else
diff --git a/media-libs/x264/files/x264-onlylib-20110425.patch b/media-libs/x264/files/x264-onlylib-20110425.patch
new file mode 100644
index 000000000000..6f216b92fa8e
--- /dev/null
+++ b/media-libs/x264/files/x264-onlylib-20110425.patch
@@ -0,0 +1,30 @@
+Index: x264-snapshot-20110425-2245/Makefile
+===================================================================
+--- x264-snapshot-20110425-2245.orig/Makefile
++++ x264-snapshot-20110425-2245/Makefile
+@@ -137,7 +137,7 @@ DEP = depend
+
+ .PHONY: all default fprofiled clean distclean install uninstall dox test testclean
+
+-default: $(DEP) x264$(EXE)
++default: $(DEP)
+
+ $(LIBX264): .depend $(OBJS) $(OBJASM)
+ $(AR)$@ $(OBJS) $(OBJASM)
+@@ -207,7 +207,7 @@ distclean: clean
+ rm -f config.mak x264_config.h config.h config.log x264.pc x264.def
+ rm -rf test/
+
+-install: x264$(EXE) $(SONAME)
++install: $(LIBX264) $(SONAME)
+ install -d $(DESTDIR)$(bindir)
+ install -d $(DESTDIR)$(includedir)
+ install -d $(DESTDIR)$(libdir)
+@@ -216,7 +216,6 @@ install: x264$(EXE) $(SONAME)
+ install -m 644 x264_config.h $(DESTDIR)$(includedir)
+ install -m 644 $(LIBX264) $(DESTDIR)$(libdir)
+ install -m 644 x264.pc $(DESTDIR)$(libdir)/pkgconfig
+- install x264$(EXE) $(DESTDIR)$(bindir)
+ $(if $(RANLIB), $(RANLIB) $(DESTDIR)$(libdir)/$(LIBX264))
+ ifeq ($(SYS),WINDOWS)
+ $(if $(SONAME), install -m 755 $(SONAME) $(DESTDIR)$(bindir))
diff --git a/media-libs/x264/files/x264-x32.patch b/media-libs/x264/files/x264-x32.patch
new file mode 100644
index 000000000000..7af4405a8472
--- /dev/null
+++ b/media-libs/x264/files/x264-x32.patch
@@ -0,0 +1,34 @@
+https://bugs.gentoo.org/420241
+
+initial x32 support -- no asm code, just pure C
+
+--- a/configure
++++ b/configure
+@@ -567,7 +567,13 @@ case $host_cpu in
+ x86_64)
+ ARCH="X86_64"
+ AS="yasm"
+- [ $compiler = GNU ] && CFLAGS="-m64 $CFLAGS" && LDFLAGS="-m64 $LDFLAGS"
++ if [ $compiler = GNU ]; then
++ if cpp_check "" "" "__ILP32__" ; then
++ CFLAGS="-mx32 $CFLAGS" && LDFLAGS="-mx32 $LDFLAGS"
++ else
++ CFLAGS="-m64 $CFLAGS" && LDFLAGS="-m64 $LDFLAGS"
++ fi
++ fi
+ if [ "$SYS" = MACOSX ]; then
+ ASFLAGS="$ASFLAGS -f macho64 -m amd64 -DPIC -DPREFIX"
+ if cc_check '' "-arch x86_64"; then
+@@ -580,7 +586,11 @@ case $host_cpu in
+ [ $compiler = GNU ] && cc_check "" "-S" && grep -q "_main:" conftest && ASFLAGS="$ASFLAGS -DPREFIX"
+ [ $compiler = GNU ] && RCFLAGS="--target=pe-x86-64 $RCFLAGS"
+ else
+- ASFLAGS="$ASFLAGS -f elf -m amd64"
++ if cpp_check "" "" "__ILP32__" ; then
++ AS="${cross_prefix}as"
++ else
++ ASFLAGS="$ASFLAGS -f elf -m amd64"
++ fi
+ fi
+ ;;
+ powerpc|powerpc64)
diff --git a/media-libs/x264/metadata.xml b/media-libs/x264/metadata.xml
new file mode 100644
index 000000000000..4854bbd25485
--- /dev/null
+++ b/media-libs/x264/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, this may not be compatible with all decoders</flag>
+ <flag name="interlaced">enable interlaced encoding support, this can decrease encoding speed by up to 2%</flag>
+ <flag name="opencl">Add support for OpenCL.</flag>
+ <flag name="pic">disable optimized assembly code that is not PIC friendly</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/x264/x264-0.0.20111220.ebuild b/media-libs/x264/x264-0.0.20111220.ebuild
new file mode 100644
index 000000000000..a54e600713fd
--- /dev/null
+++ b/media-libs/x264/x264-0.0.20111220.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+if [ "${PV#9999}" != "${PV}" ] ; then
+ V_ECLASS="git-2"
+else
+ V_ECLASS="versionator"
+fi
+
+inherit multilib toolchain-funcs flag-o-matic ${V_ECLASS}
+
+if [ "${PV#9999}" = "${PV}" ]; then
+ MY_P="x264-snapshot-$(get_version_component_range 3)-2245"
+fi
+DESCRIPTION="A free library for encoding X264/AVC streams"
+HOMEPAGE="http://www.videolan.org/developers/x264.html"
+if [ "${PV#9999}" != "${PV}" ] ; then
+ EGIT_REPO_URI="git://git.videolan.org/x264.git"
+ SRC_URI=""
+else
+ SRC_URI="http://download.videolan.org/pub/videolan/x264/snapshots/${MY_P}.tar.bz2"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+if [ "${PV#9999}" != "${PV}" ]; then
+ KEYWORDS=""
+else
+ KEYWORDS="alpha amd64 ~mips ppc ppc64 sparc x86 ~x86-fbsd"
+fi
+IUSE="10bit custom-cflags debug +interlaced pic static-libs +threads"
+
+RDEPEND=""
+DEPEND="amd64? ( >=dev-lang/yasm-1 )
+ x86? ( >=dev-lang/yasm-1 )
+ x86-fbsd? ( >=dev-lang/yasm-1 )"
+
+if [ "${PV#9999}" = "${PV}" ]; then
+ S="${WORKDIR}/${MY_P}"
+fi
+
+DOCS="AUTHORS doc/*.txt"
+
+src_configure() {
+ tc-export CC
+
+ local myconf=""
+ use 10bit && myconf+=" --bit-depth=10"
+ use debug && myconf+=" --enable-debug"
+ use interlaced || myconf+=" --disable-interlaced"
+ use static-libs && myconf+=" --enable-static"
+ use threads || myconf+=" --disable-thread"
+
+ # let upstream pick the optimization level by default
+ use custom-cflags || filter-flags -O?
+
+ if use x86 && use pic; then
+ myconf+=" --disable-asm"
+ fi
+
+ ./configure \
+ --prefix="${EPREFIX}"/usr \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --disable-cli \
+ --disable-avs \
+ --disable-lavf \
+ --disable-swscale \
+ --disable-ffms \
+ --disable-gpac \
+ --enable-pic \
+ --enable-shared \
+ --host="${CHOST}" \
+ ${myconf} || die
+
+ # this is a nasty workaround for bug #376925 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-libs/x264/x264-0.0.20120327.ebuild b/media-libs/x264/x264-0.0.20120327.ebuild
new file mode 100644
index 000000000000..4c099cedd68d
--- /dev/null
+++ b/media-libs/x264/x264-0.0.20120327.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+if [ "${PV#9999}" != "${PV}" ] ; then
+ V_ECLASS="git-2"
+else
+ V_ECLASS="versionator"
+fi
+
+inherit multilib toolchain-funcs flag-o-matic ${V_ECLASS}
+
+if [ "${PV#9999}" = "${PV}" ]; then
+ MY_P="x264-snapshot-$(get_version_component_range 3)-2245"
+fi
+DESCRIPTION="A free library for encoding X264/AVC streams"
+HOMEPAGE="http://www.videolan.org/developers/x264.html"
+if [ "${PV#9999}" != "${PV}" ] ; then
+ EGIT_REPO_URI="git://git.videolan.org/x264.git"
+ SRC_URI=""
+else
+ SRC_URI="http://download.videolan.org/pub/videolan/x264/snapshots/${MY_P}.tar.bz2"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+if [ "${PV#9999}" != "${PV}" ]; then
+ KEYWORDS=""
+else
+ KEYWORDS="~alpha ~amd64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+fi
+IUSE="10bit custom-cflags debug +interlaced pic static-libs +threads"
+
+RDEPEND=""
+DEPEND="amd64? ( >=dev-lang/yasm-1 )
+ x86? ( >=dev-lang/yasm-1 )
+ x86-fbsd? ( >=dev-lang/yasm-1 )"
+
+if [ "${PV#9999}" = "${PV}" ]; then
+ S="${WORKDIR}/${MY_P}"
+fi
+
+DOCS="AUTHORS doc/*.txt"
+
+src_configure() {
+ tc-export CC
+
+ local myconf=""
+ use 10bit && myconf+=" --bit-depth=10"
+ use debug && myconf+=" --enable-debug"
+ use interlaced || myconf+=" --disable-interlaced"
+ use static-libs && myconf+=" --enable-static"
+ use threads || myconf+=" --disable-thread"
+
+ # let upstream pick the optimization level by default
+ use custom-cflags || filter-flags -O?
+
+ if use x86 && use pic; then
+ myconf+=" --disable-asm"
+ fi
+
+ ./configure \
+ --prefix="${EPREFIX}"/usr \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --disable-cli \
+ --disable-avs \
+ --disable-lavf \
+ --disable-swscale \
+ --disable-ffms \
+ --disable-gpac \
+ --enable-pic \
+ --enable-shared \
+ --host="${CHOST}" \
+ ${myconf} || die
+
+ # this is a nasty workaround for bug #376925 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-libs/x264/x264-0.0.20120707.ebuild b/media-libs/x264/x264-0.0.20120707.ebuild
new file mode 100644
index 000000000000..49c91fb3381f
--- /dev/null
+++ b/media-libs/x264/x264-0.0.20120707.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+if [ "${PV#9999}" != "${PV}" ] ; then
+ V_ECLASS="git-2"
+else
+ V_ECLASS="versionator"
+fi
+
+inherit multilib toolchain-funcs flag-o-matic ${V_ECLASS}
+
+if [ "${PV#9999}" = "${PV}" ]; then
+ MY_P="x264-snapshot-$(get_version_component_range 3)-2245"
+fi
+DESCRIPTION="A free library for encoding X264/AVC streams"
+HOMEPAGE="http://www.videolan.org/developers/x264.html"
+if [ "${PV#9999}" != "${PV}" ] ; then
+ EGIT_REPO_URI="git://git.videolan.org/x264.git"
+ SRC_URI=""
+else
+ SRC_URI="http://download.videolan.org/pub/videolan/x264/snapshots/${MY_P}.tar.bz2"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+if [ "${PV#9999}" != "${PV}" ]; then
+ KEYWORDS=""
+else
+ KEYWORDS="~alpha ~amd64 ~arm hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+fi
+IUSE="10bit custom-cflags debug +interlaced pic static-libs +threads"
+
+RDEPEND=""
+DEPEND="amd64? ( >=dev-lang/yasm-1 )
+ amd64-fbsd? ( >=dev-lang/yasm-1 )
+ x86? ( >=dev-lang/yasm-1 )
+ x86-fbsd? ( >=dev-lang/yasm-1 )"
+
+if [ "${PV#9999}" = "${PV}" ]; then
+ S="${WORKDIR}/${MY_P}"
+fi
+
+DOCS="AUTHORS doc/*.txt"
+
+src_prepare() {
+ # Solaris' /bin/sh doesn't grok the syntax in these files
+ sed -i -e '1c\#!/usr/bin/env sh' configure version.sh || die
+ # for sparc-solaris
+ if [[ ${CHOST} == sparc*-solaris* ]] ; then
+ sed -i -e 's:-DPIC::g' configure || die
+ fi
+ # for OSX
+ sed -i -e "s|-arch x86_64||g" configure || die
+ epatch "${FILESDIR}"/x264-x32.patch #420241
+
+ # fix crashes when compiled with gcc 4.8
+ epatch "${FILESDIR}"/${P}-gcc48.patch
+}
+
+src_configure() {
+ tc-export CC
+
+ local myconf=""
+ use 10bit && myconf+=" --bit-depth=10"
+ use debug && myconf+=" --enable-debug"
+ use interlaced || myconf+=" --disable-interlaced"
+ use static-libs && myconf+=" --enable-static"
+ use threads || myconf+=" --disable-thread"
+
+ # let upstream pick the optimization level by default
+ use custom-cflags || filter-flags -O?
+
+ if use x86 && use pic || [[ ${ABI} == "x32" ]] ; then
+ myconf+=" --disable-asm"
+ fi
+
+ ./configure \
+ --prefix="${EPREFIX}"/usr \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --disable-cli \
+ --disable-avs \
+ --disable-lavf \
+ --disable-swscale \
+ --disable-ffms \
+ --disable-gpac \
+ --enable-pic \
+ --enable-shared \
+ --host="${CHOST}" \
+ ${myconf} || die
+
+ # this is a nasty workaround for bug #376925 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-libs/x264/x264-0.0.20130506.ebuild b/media-libs/x264/x264-0.0.20130506.ebuild
new file mode 100644
index 000000000000..11e10b0d330e
--- /dev/null
+++ b/media-libs/x264/x264-0.0.20130506.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 flag-o-matic multilib toolchain-funcs
+
+DESCRIPTION="A free library for encoding 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"
+ SLOT="0"
+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 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+
+ SONAME="132"
+ SLOT="0/${SONAME}"
+
+ S="${WORKDIR}/${MY_P}"
+fi
+
+LICENSE="GPL-2"
+IUSE="10bit custom-cflags +interlaced pic static-libs +threads"
+
+ASM_DEP=">=dev-lang/yasm-1.2.0"
+DEPEND="amd64? ( ${ASM_DEP} )
+ amd64-fbsd? ( ${ASM_DEP} )
+ x86? ( ${ASM_DEP} )
+ x86-fbsd? ( ${ASM_DEP} )"
+
+DOCS="AUTHORS doc/*.txt"
+
+src_prepare() {
+ # Initial support for x32 ABI, bug #420241
+ epatch "${FILESDIR}"/x264-x32.patch
+}
+
+src_configure() {
+ tc-export CC
+ local asm_conf=""
+
+ # let upstream pick the optimization level by default
+ use custom-cflags || filter-flags -O?
+
+ if use x86 && use pic || [[ ${ABI} == "x32" ]]; then
+ asm_conf=" --disable-asm"
+ fi
+
+ ./configure \
+ --prefix="${EPREFIX}"/usr \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --disable-cli \
+ --disable-avs \
+ --disable-lavf \
+ --disable-swscale \
+ --disable-ffms \
+ --disable-gpac \
+ --enable-pic \
+ --enable-shared \
+ --host="${CHOST}" \
+ $(usex 10bit "--bit-depth=10" "") \
+ $(usex interlaced "" "--disable-interlaced") \
+ $(usex static-libs "" "--enable-static") \
+ $(usex threads "" "--disable-thread") \
+ ${asm_conf} || die
+
+ # this is a nasty workaround for bug #376925 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-libs/x264/x264-0.0.20130731.ebuild b/media-libs/x264/x264-0.0.20130731.ebuild
new file mode 100644
index 000000000000..0f1ce85f718c
--- /dev/null
+++ b/media-libs/x264/x264-0.0.20130731.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit flag-o-matic multilib toolchain-funcs eutils multilib-minimal
+
+DESCRIPTION="A free library for encoding 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"
+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 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+ S="${WORKDIR}/${MY_P}"
+fi
+
+SONAME="135"
+SLOT="0/${SONAME}"
+
+LICENSE="GPL-2"
+IUSE="10bit +interlaced pic static-libs cpu_flags_x86_sse +threads"
+
+ASM_DEP=">=dev-lang/yasm-1.2.0"
+DEPEND="abi_x86_32? ( ${ASM_DEP} )
+ abi_x86_64? ( ${ASM_DEP} )"
+RDEPEND="abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20130224-r7
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+
+DOCS="AUTHORS doc/*.txt"
+
+src_prepare() {
+ # Initial support for x32 ABI, bug #420241
+ # Avoid messing too much with CFLAGS.
+ epatch "${FILESDIR}"/${P}-cflags.patch
+}
+
+multilib_src_configure() {
+ tc-export CC
+ local asm_conf=""
+
+ if [[ ${ABI} == x86* ]] && use pic || [[ ${ABI} == "x32" ]]; then
+ asm_conf=" --disable-asm"
+ fi
+
+ # Upstream uses this, see the cflags patch
+ use cpu_flags_x86_sse && append-flags "-msse" "-mfpmath=sse"
+
+ "${S}/configure" \
+ --prefix="${EPREFIX}"/usr \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --disable-cli \
+ --disable-avs \
+ --disable-lavf \
+ --disable-swscale \
+ --disable-ffms \
+ --disable-gpac \
+ --enable-pic \
+ --enable-shared \
+ --host="${CHOST}" \
+ $(usex 10bit "--bit-depth=10" "") \
+ $(usex interlaced "" "--disable-interlaced") \
+ --disable-opencl \
+ $(usex static-libs "--enable-static" "") \
+ $(usex threads "" "--disable-thread") \
+ ${asm_conf} || die
+}
diff --git a/media-libs/x264/x264-0.0.20130912.ebuild b/media-libs/x264/x264-0.0.20130912.ebuild
new file mode 100644
index 000000000000..c5613425973a
--- /dev/null
+++ b/media-libs/x264/x264-0.0.20130912.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit flag-o-matic multilib toolchain-funcs eutils multilib-minimal
+
+DESCRIPTION="A free library for encoding 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"
+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 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+ S="${WORKDIR}/${MY_P}"
+fi
+
+SONAME="138"
+SLOT="0/${SONAME}"
+
+LICENSE="GPL-2"
+IUSE="10bit +interlaced pic static-libs cpu_flags_x86_sse +threads"
+
+ASM_DEP=">=dev-lang/yasm-1.2.0"
+DEPEND="abi_x86_32? ( ${ASM_DEP} )
+ abi_x86_64? ( ${ASM_DEP} )"
+RDEPEND="abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20130224-r7
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+
+DOCS="AUTHORS doc/*.txt"
+
+src_prepare() {
+ # Initial support for x32 ABI, bug #420241
+ # Avoid messing too much with CFLAGS.
+ epatch "${FILESDIR}"/${P}-cflags.patch
+}
+
+multilib_src_configure() {
+ tc-export CC
+ local asm_conf=""
+
+ if [[ ${ABI} == x86* ]] && use pic || [[ ${ABI} == "x32" ]]; then
+ asm_conf=" --disable-asm"
+ fi
+
+ # Upstream uses this, see the cflags patch
+ use cpu_flags_x86_sse && append-flags "-msse" "-mfpmath=sse"
+
+ "${S}/configure" \
+ --prefix="${EPREFIX}"/usr \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --disable-cli \
+ --disable-avs \
+ --disable-lavf \
+ --disable-swscale \
+ --disable-ffms \
+ --disable-gpac \
+ --enable-pic \
+ --enable-shared \
+ --host="${CHOST}" \
+ $(usex 10bit "--bit-depth=10" "") \
+ $(usex interlaced "" "--disable-interlaced") \
+ --disable-opencl \
+ $(usex static-libs "--enable-static" "") \
+ $(usex threads "" "--disable-thread") \
+ ${asm_conf} || die
+}
diff --git a/media-libs/x264/x264-0.0.20140308.ebuild b/media-libs/x264/x264-0.0.20140308.ebuild
new file mode 100644
index 000000000000..aee8bc84d2af
--- /dev/null
+++ b/media-libs/x264/x264-0.0.20140308.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit flag-o-matic multilib toolchain-funcs eutils multilib-minimal
+
+DESCRIPTION="A free library for encoding 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"
+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 ~arm hppa ~ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+ S="${WORKDIR}/${MY_P}"
+fi
+
+SONAME="142"
+SLOT="0/${SONAME}"
+
+LICENSE="GPL-2"
+IUSE="10bit +interlaced opencl pic static-libs cpu_flags_x86_sse +threads"
+
+ASM_DEP=">=dev-lang/yasm-1.2.0"
+DEPEND="abi_x86_32? ( ${ASM_DEP} )
+ abi_x86_64? ( ${ASM_DEP} )
+ opencl? ( dev-lang/perl )"
+RDEPEND="opencl? ( >=virtual/opencl-0-r3[${MULTILIB_USEDEP}] )
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20130224-r7
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+
+DOCS="AUTHORS doc/*.txt"
+
+src_prepare() {
+ # Initial support for x32 ABI, bug #420241
+ # Avoid messing too much with CFLAGS.
+ epatch "${FILESDIR}"/x264-0.0.20130912-cflags.patch
+}
+
+multilib_src_configure() {
+ tc-export CC
+ local asm_conf=""
+
+ if [[ ${ABI} == x86* ]] && use pic || [[ ${ABI} == "x32" ]]; then
+ asm_conf=" --disable-asm"
+ fi
+
+ # Upstream uses this, see the cflags patch
+ use cpu_flags_x86_sse && append-flags "-msse" "-mfpmath=sse"
+
+ "${S}/configure" \
+ --prefix="${EPREFIX}"/usr \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --disable-cli \
+ --disable-avs \
+ --disable-lavf \
+ --disable-swscale \
+ --disable-ffms \
+ --disable-gpac \
+ --enable-pic \
+ --enable-shared \
+ --host="${CHOST}" \
+ $(usex 10bit "--bit-depth=10" "") \
+ $(usex interlaced "" "--disable-interlaced") \
+ $(usex opencl "" "--disable-opencl") \
+ $(usex static-libs "--enable-static" "") \
+ $(usex threads "" "--disable-thread") \
+ ${asm_conf} || die
+}
diff --git a/media-libs/x264/x264-9999.ebuild b/media-libs/x264/x264-9999.ebuild
new file mode 100644
index 000000000000..e414ba2fbc79
--- /dev/null
+++ b/media-libs/x264/x264-9999.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit flag-o-matic multilib toolchain-funcs eutils multilib-minimal
+
+DESCRIPTION="A free library for encoding 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"
+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 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+ S="${WORKDIR}/${MY_P}"
+fi
+
+SONAME="142"
+SLOT="0/${SONAME}"
+
+LICENSE="GPL-2"
+IUSE="10bit +interlaced opencl pic static-libs cpu_flags_x86_sse +threads"
+
+ASM_DEP=">=dev-lang/yasm-1.2.0"
+DEPEND="abi_x86_32? ( ${ASM_DEP} )
+ abi_x86_64? ( ${ASM_DEP} )
+ opencl? ( dev-lang/perl )"
+RDEPEND="opencl? ( >=virtual/opencl-0-r3[${MULTILIB_USEDEP}] )
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20130224-r7
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+
+DOCS="AUTHORS doc/*.txt"
+
+src_prepare() {
+ # Initial support for x32 ABI, bug #420241
+ # Avoid messing too much with CFLAGS.
+ epatch "${FILESDIR}"/x264-cflags.patch
+}
+
+multilib_src_configure() {
+ tc-export CC
+ local asm_conf=""
+
+ if [[ ${ABI} == x86* ]] && use pic || [[ ${ABI} == "x32" ]]; then
+ asm_conf=" --disable-asm"
+ fi
+
+ # Upstream uses this, see the cflags patch
+ use cpu_flags_x86_sse && append-flags "-msse" "-mfpmath=sse"
+
+ "${S}/configure" \
+ --prefix="${EPREFIX}"/usr \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --disable-cli \
+ --disable-avs \
+ --disable-lavf \
+ --disable-swscale \
+ --disable-ffms \
+ --disable-gpac \
+ --enable-pic \
+ --enable-shared \
+ --host="${CHOST}" \
+ $(usex 10bit "--bit-depth=10" "") \
+ $(usex interlaced "" "--disable-interlaced") \
+ $(usex opencl "" "--disable-opencl") \
+ $(usex static-libs "--enable-static" "") \
+ $(usex threads "" "--disable-thread") \
+ ${asm_conf} || die
+}
diff --git a/media-libs/x265/Manifest b/media-libs/x265/Manifest
new file mode 100644
index 000000000000..ff456413d5c6
--- /dev/null
+++ b/media-libs/x265/Manifest
@@ -0,0 +1,2 @@
+DIST x265-1.5.tar.bz2 588263 SHA256 da226cbe56938f85d5a3d123d1f5ca895795f2eac794e45af4b70047e03d8648 SHA512 e5db8c3428b7b393c5c3049041de152b43821a083bc1988903ade8d6ce5fdc71a2fe0ad9efa0564aa3c2c6f1ec31659fcd2b338f6b53d22a202811be7071f077 WHIRLPOOL 9e1256832a3ece06d68a872b44337285afbbeebbd149ac71fda25524d60310f595adedce1b28f0ed5a59feadef39848d797bd58f4b0d7c7d707bcddca7520f6d
+DIST x265_1.7.tar.gz 844212 SHA256 a52ca95e8e64219c1e8e73a9abf0bb7151ced2c93756a623cf2b7e5cf8226585 SHA512 cf6fce24b008d36bbc79e2488ab5fb3010aa588113645597ffc66959088a73b3ba72f6bb81bd16e36847a73b50b8f264cff0899162552418ae499170c286eb89 WHIRLPOOL 9c932fd85fbc06a63802f8aabdbb5f44fe4bee6bc2d0996df8788acad30be965bde7b56f562e4ca8ae87856fbcf728b6938a701afb397ef2195437b73a60c744
diff --git a/media-libs/x265/metadata.xml b/media-libs/x265/metadata.xml
new file mode 100644
index 000000000000..e4623460933e
--- /dev/null
+++ b/media-libs/x265/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="10bit">Set output bit depth to 10</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/x265/x265-1.5.ebuild b/media-libs/x265/x265-1.5.ebuild
new file mode 100644
index 000000000000..2ca373a3f259
--- /dev/null
+++ b/media-libs/x265/x265-1.5.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-multilib multilib flag-o-matic
+
+if [[ ${PV} = 9999* ]]; then
+ inherit mercurial
+ EHG_REPO_URI="http://bitbucket.org/multicoreware/x265"
+else
+ SRC_URI="https://bitbucket.org/multicoreware/x265/get/${PV}.tar.bz2 -> ${P}.tar.bz2"
+ KEYWORDS="amd64 arm hppa ~ppc ~ppc64 x86"
+fi
+
+DESCRIPTION="Library for encoding video streams into the H.265/HEVC format"
+HOMEPAGE="http://x265.org/"
+
+LICENSE="GPL-2"
+# subslot = libx265 soname
+SLOT="0/43"
+IUSE="+10bit test"
+
+ASM_DEPEND=">=dev-lang/yasm-1.2.0"
+RDEPEND=""
+DEPEND="${RDEPEND}
+ abi_x86_32? ( ${ASM_DEPEND} )
+ abi_x86_64? ( ${ASM_DEPEND} )"
+
+src_unpack() {
+ if [[ ${PV} = 9999* ]]; then
+ mercurial_src_unpack
+ # Can't set it at global scope due to mercurial.eclass limitations...
+ export S=${WORKDIR}/${P}/source
+ else
+ unpack ${A}
+ export S=$(echo "${WORKDIR}"/*${PN}*/source)
+ fi
+}
+
+multilib_src_configure() {
+ append-cflags -fPIC
+ append-cxxflags -fPIC
+ local mycmakeargs=(
+ $(cmake-utils_use_enable test TESTS)
+ $(multilib_is_native_abi || echo "-DENABLE_CLI=OFF")
+ -DHIGH_BIT_DEPTH=$(usex 10bit "ON" "OFF")
+ -DLIB_INSTALL_DIR="$(get_libdir)"
+ )
+ cmake-utils_src_configure
+}
+
+src_configure() {
+ multilib_parallel_foreach_abi multilib_src_configure
+}
+
+multilib_src_test() {
+ if has ${MULTILIB_ABI_FLAG} abi_x86_32 abi_x86_64 ; then
+ cd "${BUILD_DIR}/test" || die
+ for i in TestBench ; do
+ ./${i} || die
+ done
+ fi
+}
+
+src_test() {
+ multilib_foreach_abi multilib_src_test
+}
+
+src_install() {
+ cmake-multilib_src_install
+ dodoc -r "${S}/../doc/"*
+}
diff --git a/media-libs/x265/x265-1.7.ebuild b/media-libs/x265/x265-1.7.ebuild
new file mode 100644
index 000000000000..547690a50b9a
--- /dev/null
+++ b/media-libs/x265/x265-1.7.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 cmake-multilib multilib flag-o-matic
+
+if [[ ${PV} = 9999* ]]; then
+ inherit mercurial
+ EHG_REPO_URI="http://bitbucket.org/multicoreware/x265"
+else
+ SRC_URI="
+ https://bitbucket.org/multicoreware/x265/downloads/${PN}_${PV}.tar.gz
+ http://ftp.videolan.org/pub/videolan/x265/${PN}_${PV}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86"
+fi
+
+DESCRIPTION="Library for encoding video streams into the H.265/HEVC format"
+HOMEPAGE="http://x265.org/"
+
+LICENSE="GPL-2"
+# subslot = libx265 soname
+SLOT="0/59"
+IUSE="+10bit test"
+
+ASM_DEPEND=">=dev-lang/yasm-1.2.0"
+RDEPEND=""
+DEPEND="${RDEPEND}
+ abi_x86_32? ( ${ASM_DEPEND} )
+ abi_x86_64? ( ${ASM_DEPEND} )"
+
+src_unpack() {
+ if [[ ${PV} = 9999* ]]; then
+ mercurial_src_unpack
+ # Can't set it at global scope due to mercurial.eclass limitations...
+ export S=${WORKDIR}/${P}/source
+ else
+ unpack ${A}
+ export S="${WORKDIR}/${PN}_${PV}/source"
+ fi
+}
+
+multilib_src_configure() {
+ append-cflags -fPIC
+ append-cxxflags -fPIC
+ local mycmakeargs=(
+ $(cmake-utils_use_enable test TESTS)
+ $(multilib_is_native_abi || echo "-DENABLE_CLI=OFF")
+ -DHIGH_BIT_DEPTH=$(usex 10bit "ON" "OFF")
+ -DLIB_INSTALL_DIR="$(get_libdir)"
+ )
+
+ if [ "${ABI}" = x86 ] ; then
+ use 10bit && ewarn "Disabling 10bit support on x86 as it does not build (or requires to disable assembly optimizations)"
+ mycmakeargs+=( -DHIGH_BIT_DEPTH=OFF )
+ fi
+
+ cmake-utils_src_configure
+}
+
+src_configure() {
+ multilib_parallel_foreach_abi multilib_src_configure
+}
+
+multilib_src_test() {
+ if has ${MULTILIB_ABI_FLAG} abi_x86_32 abi_x86_64 ; then
+ cd "${BUILD_DIR}/test" || die
+ for i in TestBench ; do
+ ./${i} || die
+ done
+ fi
+}
+
+src_test() {
+ multilib_foreach_abi multilib_src_test
+}
+
+src_install() {
+ cmake-multilib_src_install
+ dodoc -r "${S}/../doc/"*
+}
diff --git a/media-libs/x265/x265-9999.ebuild b/media-libs/x265/x265-9999.ebuild
new file mode 100644
index 000000000000..547690a50b9a
--- /dev/null
+++ b/media-libs/x265/x265-9999.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 cmake-multilib multilib flag-o-matic
+
+if [[ ${PV} = 9999* ]]; then
+ inherit mercurial
+ EHG_REPO_URI="http://bitbucket.org/multicoreware/x265"
+else
+ SRC_URI="
+ https://bitbucket.org/multicoreware/x265/downloads/${PN}_${PV}.tar.gz
+ http://ftp.videolan.org/pub/videolan/x265/${PN}_${PV}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86"
+fi
+
+DESCRIPTION="Library for encoding video streams into the H.265/HEVC format"
+HOMEPAGE="http://x265.org/"
+
+LICENSE="GPL-2"
+# subslot = libx265 soname
+SLOT="0/59"
+IUSE="+10bit test"
+
+ASM_DEPEND=">=dev-lang/yasm-1.2.0"
+RDEPEND=""
+DEPEND="${RDEPEND}
+ abi_x86_32? ( ${ASM_DEPEND} )
+ abi_x86_64? ( ${ASM_DEPEND} )"
+
+src_unpack() {
+ if [[ ${PV} = 9999* ]]; then
+ mercurial_src_unpack
+ # Can't set it at global scope due to mercurial.eclass limitations...
+ export S=${WORKDIR}/${P}/source
+ else
+ unpack ${A}
+ export S="${WORKDIR}/${PN}_${PV}/source"
+ fi
+}
+
+multilib_src_configure() {
+ append-cflags -fPIC
+ append-cxxflags -fPIC
+ local mycmakeargs=(
+ $(cmake-utils_use_enable test TESTS)
+ $(multilib_is_native_abi || echo "-DENABLE_CLI=OFF")
+ -DHIGH_BIT_DEPTH=$(usex 10bit "ON" "OFF")
+ -DLIB_INSTALL_DIR="$(get_libdir)"
+ )
+
+ if [ "${ABI}" = x86 ] ; then
+ use 10bit && ewarn "Disabling 10bit support on x86 as it does not build (or requires to disable assembly optimizations)"
+ mycmakeargs+=( -DHIGH_BIT_DEPTH=OFF )
+ fi
+
+ cmake-utils_src_configure
+}
+
+src_configure() {
+ multilib_parallel_foreach_abi multilib_src_configure
+}
+
+multilib_src_test() {
+ if has ${MULTILIB_ABI_FLAG} abi_x86_32 abi_x86_64 ; then
+ cd "${BUILD_DIR}/test" || die
+ for i in TestBench ; do
+ ./${i} || die
+ done
+ fi
+}
+
+src_test() {
+ multilib_foreach_abi multilib_src_test
+}
+
+src_install() {
+ cmake-multilib_src_install
+ dodoc -r "${S}/../doc/"*
+}
diff --git a/media-libs/xine-lib/Manifest b/media-libs/xine-lib/Manifest
new file mode 100644
index 000000000000..dbd68dc11707
--- /dev/null
+++ b/media-libs/xine-lib/Manifest
@@ -0,0 +1,2 @@
+DIST xine-lib-1.2.3.tar.xz 4905356 SHA256 e06a9e01d2632530e694d4a96bba71810e2f447f9ac036d2a150c43baa27852a SHA512 1abbced7c67fe04492bb28ada9d847e82be4bbcc426378dae1056dd6b01e22b8fa78218f5a96a0947ff1e9f70ebc1ee4bb06c330b0e17ca8d7c4d9be49982887 WHIRLPOOL 0e6bfb61ce77d14fbd0a807499b2a0b3f04ac976e8b7c06a5b34be06cbecb822339451031b80c4dc8faa5265adb1883861d96d0e7dc43a0b3ebe7040b619fb65
+DIST xine-lib-1.2.6.tar.xz 5020964 SHA256 bd041d738817c7c0c6392a3c0e5bda5a664a47e035135b5a449364f8c9b6a005 SHA512 ed4b1bc29daf85021cb83393d010ddca0ce9da508a8ddb9fec554f18eda1d156fc08f0aeaabeb7afe93fc445f049f84057e0708e6c87cd123c5cd2b20f8a25fd WHIRLPOOL 66d85e75e28598ce3790f08c69ccd912aac115c8071f1795abd51d43b1e35fbc08827ae93fc9ce113cc0c0565b409714103cfeb14aa7acefe6bdb2fdf46ee307
diff --git a/media-libs/xine-lib/files/accel_vaapi.h b/media-libs/xine-lib/files/accel_vaapi.h
new file mode 100644
index 000000000000..666b23fd6033
--- /dev/null
+++ b/media-libs/xine-lib/files/accel_vaapi.h
@@ -0,0 +1,135 @@
+/*
+ * Copyright (C) 2008 the xine project
+ *
+ * This file is part of xine, a free video player.
+ *
+ * xine is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * xine is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
+ *
+ *
+ * Common acceleration definitions for vdpau
+ *
+ *
+ */
+
+#ifndef HAVE_XINE_ACCEL_VAAPI_H
+#define HAVE_XINE_ACCEL_VAAPI_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <va/va_x11.h>
+#include <pthread.h>
+#ifdef HAVE_FFMPEG_AVUTIL_H
+# include <avcodec.h>
+#else
+# include <libavcodec/avcodec.h>
+#endif
+
+#if LIBAVCODEC_VERSION_MAJOR >= 53 || (LIBAVCODEC_VERSION_MAJOR == 52 && LIBAVCODEC_VERSION_MINOR >= 32)
+# define AVVIDEO 2
+#else
+# define AVVIDEO 1
+# define pp_context pp_context_t
+# define pp_mode pp_mode_t
+#endif
+
+#define NUM_OUTPUT_SURFACES 22
+
+#define SURFACE_FREE 0
+#define SURFACE_ALOC 1
+#define SURFACE_RELEASE 2
+#define SURFACE_RENDER 3
+#define SURFACE_RENDER_RELEASE 5
+
+struct vaapi_equalizer {
+ VADisplayAttribute brightness;
+ VADisplayAttribute contrast;
+ VADisplayAttribute hue;
+ VADisplayAttribute saturation;
+};
+
+typedef struct ff_vaapi_context_s ff_vaapi_context_t;
+
+struct ff_vaapi_context_s {
+ VADisplay va_display;
+ VAContextID va_context_id;
+ VAConfigID va_config_id;
+ int width;
+ int height;
+ int sw_width;
+ int sw_height;
+ int va_profile;
+ unsigned int va_colorspace;
+ VAImage va_subpic_image;
+ VASubpictureID va_subpic_id;
+ int va_subpic_width;
+ int va_subpic_height;
+ int is_bound;
+ void *gl_surface;
+ unsigned int soft_head;
+ unsigned int valid_context;
+ unsigned int va_head;
+ unsigned int va_soft_head;
+ vo_driver_t *driver;
+ unsigned int last_sub_image_fmt;
+ VASurfaceID last_sub_surface_id;
+ struct vaapi_equalizer va_equalizer;
+ VAImageFormat *va_image_formats;
+ int va_num_image_formats;
+ VAImageFormat *va_subpic_formats;
+ int va_num_subpic_formats;
+};
+
+typedef struct ff_vaapi_surface_s ff_vaapi_surface_t;
+typedef struct vaapi_accel_s vaapi_accel_t;
+
+struct ff_vaapi_surface_s {
+ unsigned int index;
+ vaapi_accel_t *accel;
+ VASurfaceID va_surface_id;
+ unsigned int status;
+};
+
+struct vaapi_accel_s {
+ unsigned int index;
+ vo_frame_t *vo_frame;
+
+#if AVVIDEO > 1
+ int (*avcodec_decode_video2)(vo_frame_t *frame_gen, AVCodecContext *avctx, AVFrame *picture,
+ int *got_picture_ptr, AVPacket *avpkt);
+#else
+ int (*avcodec_decode_video)(vo_frame_t *frame_gen, AVCodecContext *avctx, AVFrame *picture,
+ int *got_picture_ptr, uint8_t *buf, int buf_size);
+#endif
+ VAStatus (*vaapi_init)(vo_frame_t *frame_gen, int va_profile, int width, int height, int softrender);
+ int (*profile_from_imgfmt)(vo_frame_t *frame_gen, enum PixelFormat pix_fmt, int codec_id, int vaapi_mpeg_sofdec);
+ ff_vaapi_context_t *(*get_context)(vo_frame_t *frame_gen);
+ int (*guarded_render)(vo_frame_t *frame_gen);
+ ff_vaapi_surface_t *(*get_vaapi_surface)(vo_frame_t *frame_gen);
+ void (*render_vaapi_surface)(vo_frame_t *frame_gen, ff_vaapi_surface_t *va_surface);
+ void (*release_vaapi_surface)(vo_frame_t *frame_gen, ff_vaapi_surface_t *va_surface);
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/media-libs/xine-lib/metadata.xml b/media-libs/xine-lib/metadata.xml
new file mode 100644
index 000000000000..b870e92015a9
--- /dev/null
+++ b/media-libs/xine-lib/metadata.xml
@@ -0,0 +1,70 @@
+<?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>An open source library for media applications</longdescription>
+ <use>
+ <flag name="bluray">
+ Enable playback of Blu-ray filesystems using <pkg>media-libs/libbluray</pkg>
+ </flag>
+ <flag name="dxr3">
+ Enable support for DXR3 mpeg acceleration cards.
+ </flag>
+ <flag name="flac">
+ Build the <pkg>media-libs/flac</pkg> based FLAC demuxer and decoder. This
+ flag is not needed for playing FLAC content, neither standalone nor in Ogg
+ container (OggFLAC), but might have better support for exotic features like
+ 24-bit samples or 96kHz sample rates.
+ </flag>
+ <flag name="fusion">
+ Enable support for the Fusion audio sub system
+ </flag>
+ <flag name="gtk">
+ Build the gdkpixbuf-based image decoder plugin.
+ </flag>
+ <flag name="imagemagick">
+ Build the ImageMagick-based image decoder plugin.
+ </flag>
+ <flag name="mad">
+ Build the <pkg>media-libs/libmad</pkg> based mp3 decoder. This mp3 decoder
+ has superior support compared to the one coming from FFmpeg that is used as
+ a fallback. If you experience any bad behaviour with mp3 files (skipping,
+ distorted sound) make sure you enabled this USE flag.
+ </flag>
+ <flag name="mmap">
+ Use mmap() function while reading file from local disks. Using mmap() will
+ use more virtual memory space, but leaves to the Kernel the task of caching
+ the file's data. mmap() access should be faster, but might misbehave if the
+ device where the file resides in is removed during playback.
+ </flag>
+ <flag name="truetype">
+ Use <pkg>media-libs/freetype</pkg> for font rendering and
+ <pkg>media-libs/fontconfig</pkg> for font discovery. Enabling this USE flag
+ will allow OSD (such as subtitles) to use more advanced font and to more
+ easily select which font to use. The support for TrueType fonts in xine-lib
+ is still experimental, and might not be as good looking as the bitmap fonts
+ used with this USE flag disabled.
+ </flag>
+ <flag name="vdr">
+ Build the VDR plugin
+ </flag>
+ <flag name="vidix">
+ Enable support for vidix video output.
+ </flag>
+ <flag name="vis">
+ Adds support for SIMD optimizations for UltraSPARC processors.
+ </flag>
+ <flag name="vpx">
+ Enable VP8 codec support via media-libs/libvpx.
+ </flag>
+ <flag name="xvmc">
+ Enable support for XVideo Motion Compensation (accelerated mpeg playback).
+ </flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">xine</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/xine-lib/xine-lib-1.2.3.ebuild b/media-libs/xine-lib/xine-lib-1.2.3.ebuild
new file mode 100644
index 000000000000..4a0645f9ef06
--- /dev/null
+++ b/media-libs/xine-lib/xine-lib-1.2.3.ebuild
@@ -0,0 +1,214 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit flag-o-matic libtool multilib
+
+if [[ ${PV} == *9999* ]]; then
+ EHG_REPO_URI="http://hg.debian.org/hg/xine-lib/xine-lib-1.2"
+ inherit autotools mercurial eutils
+ unset NLS_IUSE
+ NLS_DEPEND="sys-devel/gettext"
+ NLS_RDEPEND="virtual/libintl"
+else
+ KEYWORDS="amd64 hppa ppc ppc64 x86 ~amd64-fbsd ~x86-fbsd"
+ SRC_URI="mirror://sourceforge/xine/${P}.tar.xz"
+ NLS_IUSE="nls"
+ NLS_DEPEND="nls? ( sys-devel/gettext )"
+ NLS_RDEPEND="nls? ( virtual/libintl )"
+fi
+
+DESCRIPTION="Core libraries for Xine movie player"
+HOMEPAGE="http://xine.sourceforge.net/"
+
+LICENSE="GPL-2"
+SLOT="1"
+IUSE="a52 aac aalib +alsa altivec bluray +css directfb dts dvb dxr3 fbcon flac fusion gtk imagemagick ipv6 jack jpeg libcaca mad +mmap mng modplug musepack opengl oss pulseaudio samba sdl speex theora truetype v4l vaapi vcd vdpau vdr vidix +vis vorbis wavpack +X +xcb xinerama +xv xvmc ${NLS_IUSE}"
+
+RDEPEND="${NLS_RDEPEND}
+ dev-libs/libxdg-basedir
+ media-libs/libdvdnav
+ sys-libs/zlib
+ || ( media-video/ffmpeg:0 media-libs/libpostproc <media-video/libav-0.8.2-r1 )
+ virtual/ffmpeg
+ virtual/libiconv
+ a52? ( media-libs/a52dec )
+ aac? ( media-libs/faad2 )
+ aalib? ( media-libs/aalib )
+ alsa? ( media-libs/alsa-lib )
+ bluray? ( >=media-libs/libbluray-0.2.1 )
+ css? ( >=media-libs/libdvdcss-1.2.10 )
+ directfb? ( dev-libs/DirectFB )
+ dts? ( media-libs/libdca )
+ dxr3? ( media-libs/libfame )
+ flac? ( media-libs/flac )
+ fusion? ( media-libs/FusionSound )
+ gtk? ( x11-libs/gdk-pixbuf:2 )
+ imagemagick? ( || ( media-gfx/imagemagick media-gfx/graphicsmagick ) )
+ jack? ( >=media-sound/jack-audio-connection-kit-0.100 )
+ jpeg? ( virtual/jpeg )
+ libcaca? ( media-libs/libcaca )
+ mad? ( media-libs/libmad )
+ mng? ( media-libs/libmng )
+ modplug? ( >=media-libs/libmodplug-0.8.8.1 )
+ musepack? ( >=media-sound/musepack-tools-444 )
+ opengl? (
+ virtual/glu
+ virtual/opengl
+ )
+ pulseaudio? ( media-sound/pulseaudio )
+ samba? ( <net-fs/samba-4 )
+ sdl? ( media-libs/libsdl )
+ speex? (
+ media-libs/libogg
+ media-libs/speex
+ )
+ theora? (
+ media-libs/libogg
+ media-libs/libtheora
+ )
+ truetype? (
+ media-libs/fontconfig
+ media-libs/freetype:2
+ )
+ v4l? ( media-libs/libv4l )
+ vaapi? ( x11-libs/libva )
+ vcd? (
+ >=media-video/vcdimager-0.7.23
+ dev-libs/libcdio[-minimal]
+ )
+ vdpau? ( x11-libs/libvdpau )
+ vorbis? (
+ media-libs/libogg
+ media-libs/libvorbis
+ )
+ wavpack? ( media-sound/wavpack )
+ X? (
+ x11-libs/libX11
+ x11-libs/libXext
+ )
+ xcb? ( x11-libs/libxcb )
+ xinerama? ( x11-libs/libXinerama )
+ xv? ( x11-libs/libXv )
+ xvmc? ( x11-libs/libXvMC )"
+DEPEND="${RDEPEND}
+ ${NLS_DEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig
+ >=sys-devel/libtool-2.2.6b
+ oss? ( virtual/os-headers )
+ v4l? ( virtual/os-headers )
+ X? (
+ x11-libs/libXt
+ x11-proto/xf86vidmodeproto
+ x11-proto/xproto
+ )
+ xv? ( x11-proto/videoproto )
+ xvmc? ( x11-proto/videoproto )
+ xinerama? ( x11-proto/xineramaproto )"
+REQUIRED_USE="vidix? ( || ( X fbcon ) )
+ xv? ( X )
+ xinerama? ( X )"
+
+src_prepare() {
+ cp "${FILESDIR}"/accel_vaapi.h src/xine-engine/
+
+ sed -i -e '/define VDR_ABS_FIFO_DIR/s|".*"|"/var/vdr/xine"|' src/vdr/input_vdr.c || die
+
+ if [[ ${PV} == *9999* ]]; then
+ epatch_user
+ eautoreconf
+ else
+ elibtoolize
+ fi
+}
+
+src_configure() {
+ [[ ${CHOST} == i?86-* ]] && append-flags -fomit-frame-pointer #422519
+
+ local win32dir #197236
+ if has_multilib_profile; then
+ win32dir=/usr/$(ABI="x86" get_libdir)/win32
+ else
+ win32dir=/usr/$(get_libdir)/win32
+ fi
+
+ local myconf
+ [[ ${PV} == *9999* ]] || myconf="$(use_enable nls)"
+
+ econf \
+ $(use_enable ipv6) \
+ $(use_enable altivec) \
+ $(use_enable vis) \
+ --disable-optimizations \
+ $(use_enable mmap) \
+ $(use_enable oss) \
+ $(use_enable aalib) \
+ $(use_enable directfb) \
+ $(use_enable dxr3) \
+ $(use_enable fbcon fb) \
+ $(use_enable opengl) $(use_enable opengl glu) \
+ $(use_enable vidix) \
+ $(use_enable xinerama) \
+ $(use_enable xvmc) \
+ $(use_enable vdpau) \
+ $(use_enable vaapi) \
+ $(use_enable dvb) \
+ --disable-gnomevfs \
+ $(use_enable samba) \
+ --disable-v4l $(use_enable v4l v4l2) $(use_enable v4l libv4l) \
+ $(use_enable vcd) \
+ $(use_enable vdr) \
+ $(use_enable bluray) \
+ $(use_enable a52 a52dec) \
+ $(use_enable aac faad) \
+ $(use_enable gtk gdkpixbuf) \
+ $(use_enable jpeg libjpeg) \
+ $(use_enable dts) \
+ $(use_enable mad) \
+ $(use_enable modplug) \
+ $(use_enable musepack) \
+ $(use_enable mng) \
+ --disable-real-codecs \
+ --disable-w32dll \
+ $(use_with truetype freetype) $(use_with truetype fontconfig) \
+ $(use_with X x) \
+ $(use_with alsa) \
+ --without-esound \
+ $(use_with fusion fusionsound) \
+ $(use_with jack) \
+ $(use_with pulseaudio) \
+ $(use_with libcaca caca) \
+ $(use_with sdl) \
+ $(use_with xcb) \
+ --with-xv-path=/usr/$(get_libdir) \
+ $(use_with imagemagick) \
+ --with-external-dvdnav \
+ $(use_with flac libflac) \
+ $(use_with speex) \
+ $(use_with theora) \
+ $(use_with vorbis) \
+ --with-real-codecs-path=/usr/$(get_libdir)/codecs \
+ --with-w32-path=${win32dir} \
+ $(use_with wavpack) \
+ ${myconf}
+}
+
+src_compile() {
+ # enable verbose building, bug #448140
+ emake V=1
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ docdir="/usr/share/doc/${PF}" \
+ htmldir="/usr/share/doc/${PF}/html" \
+ install
+
+ rm -f \
+ "${ED}"usr/lib*/libxine*.la \
+ "${ED}"usr/share/doc/${PF}/COPYING
+}
diff --git a/media-libs/xine-lib/xine-lib-1.2.6-r1.ebuild b/media-libs/xine-lib/xine-lib-1.2.6-r1.ebuild
new file mode 100644
index 000000000000..ac9f0f4fcb69
--- /dev/null
+++ b/media-libs/xine-lib/xine-lib-1.2.6-r1.ebuild
@@ -0,0 +1,226 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit flag-o-matic libtool multilib
+
+if [[ ${PV} == *9999* ]]; then
+ EHG_REPO_URI="http://hg.debian.org/hg/xine-lib/xine-lib-1.2"
+ inherit autotools mercurial eutils
+ unset NLS_IUSE
+ NLS_DEPEND="sys-devel/gettext"
+ NLS_RDEPEND="virtual/libintl"
+else
+ KEYWORDS="amd64 hppa ppc ppc64 x86 ~amd64-fbsd ~x86-fbsd"
+ SRC_URI="mirror://sourceforge/xine/${P}.tar.xz"
+ NLS_IUSE="nls"
+ NLS_DEPEND="nls? ( sys-devel/gettext )"
+ NLS_RDEPEND="nls? ( virtual/libintl )"
+fi
+
+DESCRIPTION="Core libraries for Xine movie player"
+HOMEPAGE="http://xine.sourceforge.net/"
+
+LICENSE="GPL-2"
+SLOT="1"
+IUSE="a52 aac aalib +alsa altivec bluray +css directfb dts dvb dxr3 fbcon flac fusion gtk imagemagick ipv6 jack jpeg libav libcaca mad +mmap mng modplug musepack opengl oss pulseaudio samba sdl speex theora truetype v4l vaapi vcd vdpau vdr vidix +vis vorbis vpx wavpack +X +xcb xinerama +xv xvmc ${NLS_IUSE}"
+
+RDEPEND="${NLS_RDEPEND}
+ dev-libs/libxdg-basedir
+ media-libs/libdvdnav
+ sys-libs/zlib
+ !libav? ( media-video/ffmpeg:0= )
+ libav? (
+ media-libs/libpostproc:0=
+ media-video/libav:0=
+ )
+ virtual/libiconv
+ a52? ( media-libs/a52dec )
+ aac? ( media-libs/faad2 )
+ aalib? ( media-libs/aalib )
+ alsa? ( media-libs/alsa-lib )
+ bluray? ( >=media-libs/libbluray-0.2.1 )
+ css? ( >=media-libs/libdvdcss-1.2.10 )
+ directfb? ( dev-libs/DirectFB )
+ dts? ( media-libs/libdca )
+ dxr3? ( media-libs/libfame )
+ flac? ( media-libs/flac )
+ fusion? ( media-libs/FusionSound )
+ gtk? ( x11-libs/gdk-pixbuf:2 )
+ imagemagick? ( || ( media-gfx/imagemagick media-gfx/graphicsmagick ) )
+ jack? ( >=media-sound/jack-audio-connection-kit-0.100 )
+ jpeg? ( virtual/jpeg:0 )
+ libcaca? ( media-libs/libcaca )
+ mad? ( media-libs/libmad )
+ mng? ( media-libs/libmng )
+ modplug? ( >=media-libs/libmodplug-0.8.8.1 )
+ musepack? ( >=media-sound/musepack-tools-444 )
+ opengl? (
+ virtual/glu
+ virtual/opengl
+ )
+ pulseaudio? ( media-sound/pulseaudio )
+ samba? ( net-fs/samba )
+ sdl? ( media-libs/libsdl )
+ speex? (
+ media-libs/libogg
+ media-libs/speex
+ )
+ theora? (
+ media-libs/libogg
+ media-libs/libtheora
+ )
+ truetype? (
+ media-libs/fontconfig
+ media-libs/freetype:2
+ )
+ v4l? ( media-libs/libv4l )
+ vaapi? ( x11-libs/libva )
+ vcd? (
+ >=media-video/vcdimager-0.7.23
+ dev-libs/libcdio[-minimal]
+ )
+ vdpau? ( x11-libs/libvdpau )
+ vorbis? (
+ media-libs/libogg
+ media-libs/libvorbis
+ )
+ vpx? ( media-libs/libvpx )
+ wavpack? ( media-sound/wavpack )
+ X? (
+ x11-libs/libX11
+ x11-libs/libXext
+ )
+ xcb? ( x11-libs/libxcb )
+ xinerama? ( x11-libs/libXinerama )
+ xv? ( x11-libs/libXv )
+ xvmc? ( x11-libs/libXvMC )"
+DEPEND="${RDEPEND}
+ ${NLS_DEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig
+ >=sys-devel/libtool-2.2.6b
+ oss? ( virtual/os-headers )
+ v4l? ( virtual/os-headers )
+ X? (
+ x11-libs/libXt
+ x11-proto/xf86vidmodeproto
+ x11-proto/xproto
+ )
+ xv? ( x11-proto/videoproto )
+ xvmc? ( x11-proto/videoproto )
+ xinerama? ( x11-proto/xineramaproto )"
+REQUIRED_USE="vidix? ( || ( X fbcon ) )
+ xv? ( X )
+ xinerama? ( X )"
+
+src_prepare() {
+ sed -i -e '/define VDR_ABS_FIFO_DIR/s|".*"|"/var/vdr/xine"|' src/vdr/input_vdr.c || die
+
+ if [[ ${PV} == *9999* ]]; then
+ epatch_user
+ eautoreconf
+ else
+ elibtoolize
+ fi
+
+ local x
+ for x in 0 1 2 3; do
+ sed -i -e "/^O${x}_CFLAGS=\"-O${x}\"/d" configure || die
+ done
+}
+
+src_configure() {
+ [[ ${CHOST} == i?86-* ]] && append-flags -fomit-frame-pointer #422519
+
+ local win32dir #197236
+ if has_multilib_profile; then
+ win32dir=/usr/$(ABI="x86" get_libdir)/win32
+ else
+ win32dir=/usr/$(get_libdir)/win32
+ fi
+
+ local myconf=()
+ [[ ${PV} == *9999* ]] || myconf=( $(use_enable nls) )
+
+ if ! use libav && has_version '>=media-video/ffmpeg-2.2:0'; then
+ myconf+=( --enable-avformat ) #507474
+ fi
+
+ econf \
+ $(use_enable ipv6) \
+ $(use_enable altivec) \
+ $(use_enable vis) \
+ --disable-optimizations \
+ $(use_enable mmap) \
+ $(use_enable oss) \
+ $(use_enable aalib) \
+ $(use_enable directfb) \
+ $(use_enable dxr3) \
+ $(use_enable fbcon fb) \
+ $(use_enable opengl) $(use_enable opengl glu) \
+ $(use_enable vidix) \
+ $(use_enable xinerama) \
+ $(use_enable xvmc) \
+ $(use_enable vdpau) \
+ $(use_enable vaapi) \
+ $(use_enable dvb) \
+ --disable-gnomevfs \
+ $(use_enable samba) \
+ --disable-v4l $(use_enable v4l v4l2) $(use_enable v4l libv4l) \
+ $(use_enable vcd) \
+ $(use_enable vdr) \
+ $(use_enable bluray) \
+ $(use_enable a52 a52dec) \
+ $(use_enable aac faad) \
+ $(use_enable gtk gdkpixbuf) \
+ $(use_enable jpeg libjpeg) \
+ $(use_enable dts) \
+ $(use_enable mad) \
+ $(use_enable modplug) \
+ $(use_enable musepack) \
+ $(use_enable mng) \
+ --disable-real-codecs \
+ --disable-w32dll \
+ $(use_enable vpx) \
+ $(use_with truetype freetype) $(use_with truetype fontconfig) \
+ $(use_with X x) \
+ $(use_with alsa) \
+ --without-esound \
+ $(use_with fusion fusionsound) \
+ $(use_with jack) \
+ $(use_with pulseaudio) \
+ $(use_with libcaca caca) \
+ $(use_with sdl) \
+ $(use_with xcb) \
+ --with-xv-path=/usr/$(get_libdir) \
+ $(use_with imagemagick) \
+ --with-external-dvdnav \
+ $(use_with flac libflac) \
+ $(use_with speex) \
+ $(use_with theora) \
+ $(use_with vorbis) \
+ --with-real-codecs-path=/usr/$(get_libdir)/codecs \
+ --with-w32-path=${win32dir} \
+ $(use_with wavpack) \
+ "${myconf[@]}"
+}
+
+src_compile() {
+ # enable verbose building, bug #448140
+ emake V=1
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ docdir="/usr/share/doc/${PF}" \
+ htmldir="/usr/share/doc/${PF}/html" \
+ install
+
+ rm -f \
+ "${ED}"usr/lib*/libxine*.la \
+ "${ED}"usr/share/doc/${PF}/COPYING
+}
diff --git a/media-libs/xine-lib/xine-lib-1.2.6.ebuild b/media-libs/xine-lib/xine-lib-1.2.6.ebuild
new file mode 100644
index 000000000000..194a93c41e2d
--- /dev/null
+++ b/media-libs/xine-lib/xine-lib-1.2.6.ebuild
@@ -0,0 +1,223 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit flag-o-matic libtool multilib
+
+if [[ ${PV} == *9999* ]]; then
+ EHG_REPO_URI="http://hg.debian.org/hg/xine-lib/xine-lib-1.2"
+ inherit autotools mercurial eutils
+ unset NLS_IUSE
+ NLS_DEPEND="sys-devel/gettext"
+ NLS_RDEPEND="virtual/libintl"
+else
+ KEYWORDS="amd64 hppa ppc ppc64 x86 ~amd64-fbsd ~x86-fbsd"
+ SRC_URI="mirror://sourceforge/xine/${P}.tar.xz"
+ NLS_IUSE="nls"
+ NLS_DEPEND="nls? ( sys-devel/gettext )"
+ NLS_RDEPEND="nls? ( virtual/libintl )"
+fi
+
+DESCRIPTION="Core libraries for Xine movie player"
+HOMEPAGE="http://xine.sourceforge.net/"
+
+LICENSE="GPL-2"
+SLOT="1"
+IUSE="a52 aac aalib +alsa altivec bluray +css directfb dts dvb dxr3 fbcon flac fusion gtk imagemagick ipv6 jack jpeg libcaca mad +mmap mng modplug musepack opengl oss pulseaudio samba sdl speex theora truetype v4l vaapi vcd vdpau vdr vidix +vis vorbis vpx wavpack +X +xcb xinerama +xv xvmc ${NLS_IUSE}"
+
+RDEPEND="${NLS_RDEPEND}
+ dev-libs/libxdg-basedir
+ media-libs/libdvdnav
+ sys-libs/zlib
+ || ( media-video/ffmpeg:0 media-libs/libpostproc <media-video/libav-0.8.2-r1 )
+ virtual/ffmpeg
+ virtual/libiconv
+ a52? ( media-libs/a52dec )
+ aac? ( media-libs/faad2 )
+ aalib? ( media-libs/aalib )
+ alsa? ( media-libs/alsa-lib )
+ bluray? ( >=media-libs/libbluray-0.2.1 )
+ css? ( >=media-libs/libdvdcss-1.2.10 )
+ directfb? ( dev-libs/DirectFB )
+ dts? ( media-libs/libdca )
+ dxr3? ( media-libs/libfame )
+ flac? ( media-libs/flac )
+ fusion? ( media-libs/FusionSound )
+ gtk? ( x11-libs/gdk-pixbuf:2 )
+ imagemagick? ( || ( media-gfx/imagemagick media-gfx/graphicsmagick ) )
+ jack? ( >=media-sound/jack-audio-connection-kit-0.100 )
+ jpeg? ( virtual/jpeg:0 )
+ libcaca? ( media-libs/libcaca )
+ mad? ( media-libs/libmad )
+ mng? ( media-libs/libmng )
+ modplug? ( >=media-libs/libmodplug-0.8.8.1 )
+ musepack? ( >=media-sound/musepack-tools-444 )
+ opengl? (
+ virtual/glu
+ virtual/opengl
+ )
+ pulseaudio? ( media-sound/pulseaudio )
+ samba? ( net-fs/samba )
+ sdl? ( media-libs/libsdl )
+ speex? (
+ media-libs/libogg
+ media-libs/speex
+ )
+ theora? (
+ media-libs/libogg
+ media-libs/libtheora
+ )
+ truetype? (
+ media-libs/fontconfig
+ media-libs/freetype:2
+ )
+ v4l? ( media-libs/libv4l )
+ vaapi? ( x11-libs/libva )
+ vcd? (
+ >=media-video/vcdimager-0.7.23
+ dev-libs/libcdio[-minimal]
+ )
+ vdpau? ( x11-libs/libvdpau )
+ vorbis? (
+ media-libs/libogg
+ media-libs/libvorbis
+ )
+ vpx? ( media-libs/libvpx )
+ wavpack? ( media-sound/wavpack )
+ X? (
+ x11-libs/libX11
+ x11-libs/libXext
+ )
+ xcb? ( x11-libs/libxcb )
+ xinerama? ( x11-libs/libXinerama )
+ xv? ( x11-libs/libXv )
+ xvmc? ( x11-libs/libXvMC )"
+DEPEND="${RDEPEND}
+ ${NLS_DEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig
+ >=sys-devel/libtool-2.2.6b
+ oss? ( virtual/os-headers )
+ v4l? ( virtual/os-headers )
+ X? (
+ x11-libs/libXt
+ x11-proto/xf86vidmodeproto
+ x11-proto/xproto
+ )
+ xv? ( x11-proto/videoproto )
+ xvmc? ( x11-proto/videoproto )
+ xinerama? ( x11-proto/xineramaproto )"
+REQUIRED_USE="vidix? ( || ( X fbcon ) )
+ xv? ( X )
+ xinerama? ( X )"
+
+src_prepare() {
+ sed -i -e '/define VDR_ABS_FIFO_DIR/s|".*"|"/var/vdr/xine"|' src/vdr/input_vdr.c || die
+
+ if [[ ${PV} == *9999* ]]; then
+ epatch_user
+ eautoreconf
+ else
+ elibtoolize
+ fi
+
+ local x
+ for x in 0 1 2 3; do
+ sed -i -e "/^O${x}_CFLAGS=\"-O${x}\"/d" configure || die
+ done
+}
+
+src_configure() {
+ [[ ${CHOST} == i?86-* ]] && append-flags -fomit-frame-pointer #422519
+
+ local win32dir #197236
+ if has_multilib_profile; then
+ win32dir=/usr/$(ABI="x86" get_libdir)/win32
+ else
+ win32dir=/usr/$(get_libdir)/win32
+ fi
+
+ local myconf=()
+ [[ ${PV} == *9999* ]] || myconf=( $(use_enable nls) )
+
+ if has_version '>=media-video/ffmpeg-2.2:0'; then
+ myconf+=( --enable-avformat ) #507474
+ fi
+
+ econf \
+ $(use_enable ipv6) \
+ $(use_enable altivec) \
+ $(use_enable vis) \
+ --disable-optimizations \
+ $(use_enable mmap) \
+ $(use_enable oss) \
+ $(use_enable aalib) \
+ $(use_enable directfb) \
+ $(use_enable dxr3) \
+ $(use_enable fbcon fb) \
+ $(use_enable opengl) $(use_enable opengl glu) \
+ $(use_enable vidix) \
+ $(use_enable xinerama) \
+ $(use_enable xvmc) \
+ $(use_enable vdpau) \
+ $(use_enable vaapi) \
+ $(use_enable dvb) \
+ --disable-gnomevfs \
+ $(use_enable samba) \
+ --disable-v4l $(use_enable v4l v4l2) $(use_enable v4l libv4l) \
+ $(use_enable vcd) \
+ $(use_enable vdr) \
+ $(use_enable bluray) \
+ $(use_enable a52 a52dec) \
+ $(use_enable aac faad) \
+ $(use_enable gtk gdkpixbuf) \
+ $(use_enable jpeg libjpeg) \
+ $(use_enable dts) \
+ $(use_enable mad) \
+ $(use_enable modplug) \
+ $(use_enable musepack) \
+ $(use_enable mng) \
+ --disable-real-codecs \
+ --disable-w32dll \
+ $(use_enable vpx) \
+ $(use_with truetype freetype) $(use_with truetype fontconfig) \
+ $(use_with X x) \
+ $(use_with alsa) \
+ --without-esound \
+ $(use_with fusion fusionsound) \
+ $(use_with jack) \
+ $(use_with pulseaudio) \
+ $(use_with libcaca caca) \
+ $(use_with sdl) \
+ $(use_with xcb) \
+ --with-xv-path=/usr/$(get_libdir) \
+ $(use_with imagemagick) \
+ --with-external-dvdnav \
+ $(use_with flac libflac) \
+ $(use_with speex) \
+ $(use_with theora) \
+ $(use_with vorbis) \
+ --with-real-codecs-path=/usr/$(get_libdir)/codecs \
+ --with-w32-path=${win32dir} \
+ $(use_with wavpack) \
+ "${myconf[@]}"
+}
+
+src_compile() {
+ # enable verbose building, bug #448140
+ emake V=1
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ docdir="/usr/share/doc/${PF}" \
+ htmldir="/usr/share/doc/${PF}/html" \
+ install
+
+ rm -f \
+ "${ED}"usr/lib*/libxine*.la \
+ "${ED}"usr/share/doc/${PF}/COPYING
+}
diff --git a/media-libs/xine-lib/xine-lib-1.2.9999.ebuild b/media-libs/xine-lib/xine-lib-1.2.9999.ebuild
new file mode 100644
index 000000000000..eb4ee3b1c288
--- /dev/null
+++ b/media-libs/xine-lib/xine-lib-1.2.9999.ebuild
@@ -0,0 +1,226 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit flag-o-matic libtool multilib
+
+if [[ ${PV} == *9999* ]]; then
+ EHG_REPO_URI="http://hg.debian.org/hg/xine-lib/xine-lib-1.2"
+ inherit autotools mercurial eutils
+ unset NLS_IUSE
+ NLS_DEPEND="sys-devel/gettext"
+ NLS_RDEPEND="virtual/libintl"
+else
+ KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-fbsd ~x86-fbsd"
+ SRC_URI="mirror://sourceforge/xine/${P}.tar.xz"
+ NLS_IUSE="nls"
+ NLS_DEPEND="nls? ( sys-devel/gettext )"
+ NLS_RDEPEND="nls? ( virtual/libintl )"
+fi
+
+DESCRIPTION="Core libraries for Xine movie player"
+HOMEPAGE="http://xine.sourceforge.net/"
+
+LICENSE="GPL-2"
+SLOT="1"
+IUSE="a52 aac aalib +alsa altivec bluray +css directfb dts dvb dxr3 fbcon flac fusion gtk imagemagick ipv6 jack jpeg libav libcaca mad +mmap mng modplug musepack opengl oss pulseaudio samba sdl speex theora truetype v4l vaapi vcd vdpau vdr vidix +vis vorbis vpx wavpack +X +xcb xinerama +xv xvmc ${NLS_IUSE}"
+
+RDEPEND="${NLS_RDEPEND}
+ dev-libs/libxdg-basedir
+ media-libs/libdvdnav
+ sys-libs/zlib
+ !libav? ( media-video/ffmpeg:0= )
+ libav? (
+ media-libs/libpostproc:0=
+ media-video/libav:0=
+ )
+ virtual/libiconv
+ a52? ( media-libs/a52dec )
+ aac? ( media-libs/faad2 )
+ aalib? ( media-libs/aalib )
+ alsa? ( media-libs/alsa-lib )
+ bluray? ( >=media-libs/libbluray-0.2.1 )
+ css? ( >=media-libs/libdvdcss-1.2.10 )
+ directfb? ( dev-libs/DirectFB )
+ dts? ( media-libs/libdca )
+ dxr3? ( media-libs/libfame )
+ flac? ( media-libs/flac )
+ fusion? ( media-libs/FusionSound )
+ gtk? ( x11-libs/gdk-pixbuf:2 )
+ imagemagick? ( || ( media-gfx/imagemagick media-gfx/graphicsmagick ) )
+ jack? ( >=media-sound/jack-audio-connection-kit-0.100 )
+ jpeg? ( virtual/jpeg:0 )
+ libcaca? ( media-libs/libcaca )
+ mad? ( media-libs/libmad )
+ mng? ( media-libs/libmng )
+ modplug? ( >=media-libs/libmodplug-0.8.8.1 )
+ musepack? ( >=media-sound/musepack-tools-444 )
+ opengl? (
+ virtual/glu
+ virtual/opengl
+ )
+ pulseaudio? ( media-sound/pulseaudio )
+ samba? ( net-fs/samba )
+ sdl? ( media-libs/libsdl )
+ speex? (
+ media-libs/libogg
+ media-libs/speex
+ )
+ theora? (
+ media-libs/libogg
+ media-libs/libtheora
+ )
+ truetype? (
+ media-libs/fontconfig
+ media-libs/freetype:2
+ )
+ v4l? ( media-libs/libv4l )
+ vaapi? ( x11-libs/libva )
+ vcd? (
+ >=media-video/vcdimager-0.7.23
+ dev-libs/libcdio[-minimal]
+ )
+ vdpau? ( x11-libs/libvdpau )
+ vorbis? (
+ media-libs/libogg
+ media-libs/libvorbis
+ )
+ vpx? ( media-libs/libvpx )
+ wavpack? ( media-sound/wavpack )
+ X? (
+ x11-libs/libX11
+ x11-libs/libXext
+ )
+ xcb? ( x11-libs/libxcb )
+ xinerama? ( x11-libs/libXinerama )
+ xv? ( x11-libs/libXv )
+ xvmc? ( x11-libs/libXvMC )"
+DEPEND="${RDEPEND}
+ ${NLS_DEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig
+ >=sys-devel/libtool-2.2.6b
+ oss? ( virtual/os-headers )
+ v4l? ( virtual/os-headers )
+ X? (
+ x11-libs/libXt
+ x11-proto/xf86vidmodeproto
+ x11-proto/xproto
+ )
+ xv? ( x11-proto/videoproto )
+ xvmc? ( x11-proto/videoproto )
+ xinerama? ( x11-proto/xineramaproto )"
+REQUIRED_USE="vidix? ( || ( X fbcon ) )
+ xv? ( X )
+ xinerama? ( X )"
+
+src_prepare() {
+ sed -i -e '/define VDR_ABS_FIFO_DIR/s|".*"|"/var/vdr/xine"|' src/vdr/input_vdr.c || die
+
+ if [[ ${PV} == *9999* ]]; then
+ epatch_user
+ eautoreconf
+ else
+ elibtoolize
+ fi
+
+ local x
+ for x in 0 1 2 3; do
+ sed -i -e "/^O${x}_CFLAGS=\"-O${x}\"/d" configure || die
+ done
+}
+
+src_configure() {
+ [[ ${CHOST} == i?86-* ]] && append-flags -fomit-frame-pointer #422519
+
+ local win32dir #197236
+ if has_multilib_profile; then
+ win32dir=/usr/$(ABI="x86" get_libdir)/win32
+ else
+ win32dir=/usr/$(get_libdir)/win32
+ fi
+
+ local myconf=()
+ [[ ${PV} == *9999* ]] || myconf=( $(use_enable nls) )
+
+ if ! use libav && has_version '>=media-video/ffmpeg-2.2:0'; then
+ myconf+=( --enable-avformat ) #507474
+ fi
+
+ econf \
+ $(use_enable ipv6) \
+ $(use_enable altivec) \
+ $(use_enable vis) \
+ --disable-optimizations \
+ $(use_enable mmap) \
+ $(use_enable oss) \
+ $(use_enable aalib) \
+ $(use_enable directfb) \
+ $(use_enable dxr3) \
+ $(use_enable fbcon fb) \
+ $(use_enable opengl) $(use_enable opengl glu) \
+ $(use_enable vidix) \
+ $(use_enable xinerama) \
+ $(use_enable xvmc) \
+ $(use_enable vdpau) \
+ $(use_enable vaapi) \
+ $(use_enable dvb) \
+ --disable-gnomevfs \
+ $(use_enable samba) \
+ --disable-v4l $(use_enable v4l v4l2) $(use_enable v4l libv4l) \
+ $(use_enable vcd) \
+ $(use_enable vdr) \
+ $(use_enable bluray) \
+ $(use_enable a52 a52dec) \
+ $(use_enable aac faad) \
+ $(use_enable gtk gdkpixbuf) \
+ $(use_enable jpeg libjpeg) \
+ $(use_enable dts) \
+ $(use_enable mad) \
+ $(use_enable modplug) \
+ $(use_enable musepack) \
+ $(use_enable mng) \
+ --disable-real-codecs \
+ --disable-w32dll \
+ $(use_enable vpx) \
+ $(use_with truetype freetype) $(use_with truetype fontconfig) \
+ $(use_with X x) \
+ $(use_with alsa) \
+ --without-esound \
+ $(use_with fusion fusionsound) \
+ $(use_with jack) \
+ $(use_with pulseaudio) \
+ $(use_with libcaca caca) \
+ $(use_with sdl) \
+ $(use_with xcb) \
+ --with-xv-path=/usr/$(get_libdir) \
+ $(use_with imagemagick) \
+ --with-external-dvdnav \
+ $(use_with flac libflac) \
+ $(use_with speex) \
+ $(use_with theora) \
+ $(use_with vorbis) \
+ --with-real-codecs-path=/usr/$(get_libdir)/codecs \
+ --with-w32-path=${win32dir} \
+ $(use_with wavpack) \
+ "${myconf[@]}"
+}
+
+src_compile() {
+ # enable verbose building, bug #448140
+ emake V=1
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ docdir="/usr/share/doc/${PF}" \
+ htmldir="/usr/share/doc/${PF}/html" \
+ install
+
+ rm -f \
+ "${ED}"usr/lib*/libxine*.la \
+ "${ED}"usr/share/doc/${PF}/COPYING
+}
diff --git a/media-libs/xvid/Manifest b/media-libs/xvid/Manifest
new file mode 100644
index 000000000000..34dbed0edbb3
--- /dev/null
+++ b/media-libs/xvid/Manifest
@@ -0,0 +1,2 @@
+DIST xvidcore-1.3.3.tar.bz2 695279 SHA256 b0e1ba805a776f791e45040b9aaa0d7ca6d0cb1e4899c7fded275fb57139af54 SHA512 e2178ee946fa057cf465da855b702e74fbab04347020ab7900850c07dfcd5202003fcd579fc404e0a567807285607ed4bcd14dc4c074ea19123143f03af80f09 WHIRLPOOL 131f58f25134750e7f687072b2a28ab692bef70a615bbc32fb65fed59f74c5b4382e1f471f5e42af7e2fdaf84e3228f4119534b39fa6379ea5ba2ac2b2985e7a
+DIST xvidcore-1.3.4.tar.bz2 697808 SHA256 5faf6380b828db8ad29f0b69f030edf86d0fe26d1f9c5427030c6accd3ad8bf7 SHA512 09c0dca898ad8ba32161d979dea66730c235d9649e93e5053f0e0f0d02f8996f0f85d629728bff16d3253b71e0435809360e6cf4d72801e63c061f2a0b0dbe7d WHIRLPOOL d69fd6d2570cbb9cde00154695ea104cb17372eccebd35258933f8930c10566757571089a48838b964d106a34009eb7a5c368d98842d881338e368ab33f0e1c1
diff --git a/media-libs/xvid/metadata.xml b/media-libs/xvid/metadata.xml
new file mode 100644
index 000000000000..cc1a0288e38f
--- /dev/null
+++ b/media-libs/xvid/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="pic">disable optimized assembly code that is not PIC friendly</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/xvid/xvid-1.3.3.ebuild b/media-libs/xvid/xvid-1.3.3.ebuild
new file mode 100644
index 000000000000..4d72d1b50f84
--- /dev/null
+++ b/media-libs/xvid/xvid-1.3.3.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit flag-o-matic multilib multilib-minimal
+
+MY_PN=${PN}core
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="XviD, a high performance/quality MPEG-4 video de-/encoding solution"
+HOMEPAGE="http://www.xvid.org/"
+SRC_URI="http://downloads.xvid.org/downloads/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="examples elibc_FreeBSD +threads pic"
+
+NASM=">=dev-lang/nasm-2"
+YASM=">=dev-lang/yasm-1"
+
+DEPEND="sys-apps/grep
+ amd64? ( || ( ${YASM} ${NASM} ) )
+ amd64-fbsd? ( ${NASM} )
+ x86? ( || ( ${YASM} ${NASM} ) )
+ x86-fbsd? ( ${NASM} )
+ x86-macos? ( ${NASM} )
+ x64-macos? ( ${NASM} )"
+RDEPEND="abi_x86_32? ( !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+
+S=${WORKDIR}/${MY_PN}/build/generic
+
+src_prepare() {
+ # make build verbose
+ sed \
+ -e 's/@$(CC)/$(CC)/' \
+ -e 's/@$(AS)/$(AS)/' \
+ -e 's/@$(RM)/$(RM)/' \
+ -e 's/@$(INSTALL)/$(INSTALL)/' \
+ -e 's/@cd/cd/' \
+ -i Makefile || die
+ # Since only the build system is in $S, this will only copy it but not the
+ # entire sources.
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ use sparc && append-cflags -mno-vis #357149
+ use elibc_FreeBSD && export ac_cv_prog_ac_yasm=no #477736
+
+ local myconf
+ if use pic || [[ ${ABI} == "x32" ]] ; then #421841
+ myconf="--disable-assembly"
+ fi
+
+ econf \
+ $(use_enable threads pthread) \
+ ${myconf}
+}
+
+#multilib_src_install() {
+# emake DESTDIR="${D}" install
+#}
+
+multilib_src_install_all() {
+ dodoc "${S}"/../../{AUTHORS,ChangeLog*,CodingStyle,README,TODO}
+
+ if use examples; then
+ insinto /usr/share/${PN}
+ doins -r "${S}"/../../examples
+ fi
+}
diff --git a/media-libs/xvid/xvid-1.3.4.ebuild b/media-libs/xvid/xvid-1.3.4.ebuild
new file mode 100644
index 000000000000..c724eacb8178
--- /dev/null
+++ b/media-libs/xvid/xvid-1.3.4.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit flag-o-matic multilib multilib-minimal
+
+MY_PN=${PN}core
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="XviD, a high performance/quality MPEG-4 video de-/encoding solution"
+HOMEPAGE="http://www.xvid.org/"
+SRC_URI="http://downloads.xvid.org/downloads/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="examples elibc_FreeBSD +threads pic"
+
+NASM=">=dev-lang/nasm-2"
+YASM=">=dev-lang/yasm-1"
+
+DEPEND="sys-apps/grep
+ amd64? ( || ( ${YASM} ${NASM} ) )
+ amd64-fbsd? ( ${NASM} )
+ x86? ( || ( ${YASM} ${NASM} ) )
+ x86-fbsd? ( ${NASM} )
+ x86-macos? ( ${NASM} )
+ x64-macos? ( ${NASM} )"
+RDEPEND="abi_x86_32? ( !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+
+S=${WORKDIR}/${MY_PN}/build/generic
+
+src_prepare() {
+ # make build verbose
+ sed \
+ -e 's/@$(CC)/$(CC)/' \
+ -e 's/@$(AS)/$(AS)/' \
+ -e 's/@$(RM)/$(RM)/' \
+ -e 's/@$(INSTALL)/$(INSTALL)/' \
+ -e 's/@cd/cd/' \
+ -i Makefile || die
+ # Since only the build system is in $S, this will only copy it but not the
+ # entire sources.
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ use sparc && append-cflags -mno-vis #357149
+ use elibc_FreeBSD && export ac_cv_prog_ac_yasm=no #477736
+
+ local myconf
+ if use pic || [[ ${ABI} == "x32" ]] ; then #421841
+ myconf="--disable-assembly"
+ fi
+
+ econf \
+ $(use_enable threads pthread) \
+ ${myconf}
+}
+
+#multilib_src_install() {
+# emake DESTDIR="${D}" install
+#}
+
+multilib_src_install_all() {
+ dodoc "${S}"/../../{AUTHORS,ChangeLog*,CodingStyle,README,TODO}
+
+ if use examples; then
+ insinto /usr/share/${PN}
+ doins -r "${S}"/../../examples
+ fi
+}
diff --git a/media-libs/zita-alsa-pcmi/Manifest b/media-libs/zita-alsa-pcmi/Manifest
new file mode 100644
index 000000000000..15bf6aa7b05d
--- /dev/null
+++ b/media-libs/zita-alsa-pcmi/Manifest
@@ -0,0 +1 @@
+DIST zita-alsa-pcmi-0.2.0.tar.bz2 21278 SHA256 491eaf9da24fb20b94723f8e75e2ea3a667fc53555b54d2acd390bf4c418fbe5 SHA512 6b521dc8bef96a6ee73bc2accd3c7d0641e9a4f3d955868cd3fe04ae46f15a1b1ffaa45d56518f54f4fdf9f68f629e3036dca294936015205c20f01d55338e96 WHIRLPOOL 2a2f577269f882f3d2bdc70294641742bc98ea3784b5e4e9fd973c802fe96564b2e4d35da24b3af41d413b446879c9b9c7358834f91aecc0111a6edf2cecdd62
diff --git a/media-libs/zita-alsa-pcmi/files/makefile.patch b/media-libs/zita-alsa-pcmi/files/makefile.patch
new file mode 100644
index 000000000000..d5e86d6c68f5
--- /dev/null
+++ b/media-libs/zita-alsa-pcmi/files/makefile.patch
@@ -0,0 +1,65 @@
+Index: zita-alsa-pcmi-0.2.0/libs/Makefile
+===================================================================
+--- zita-alsa-pcmi-0.2.0.orig/libs/Makefile
++++ zita-alsa-pcmi-0.2.0/libs/Makefile
+@@ -31,7 +31,7 @@ VERSION = $(MAJVERS).$(MINVERS)
+
+
+ CPPFLAGS += -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS
+-CXXFLAGS += -O2 -Wall -I. -fPIC
++CXXFLAGS += -Wall -I. -fPIC
+ LDLFAGS +=
+ LDLIBS +=
+
+@@ -45,14 +45,14 @@ ZITA-ALSA-PCMI_H = zita-alsa-pcmi.h
+
+
+ $(ZITA-ALSA-PCMI_MIN): $(ZITA-ALSA-PCMI_O)
+- g++ -shared $(LDFLAGS) -Wl,-soname,$(ZITA-ALSA-PCMI_MAJ) -o $(ZITA-ALSA-PCMI_MIN) $(ZITA-ALSA-PCMI_O) $(ZITA-ALSA-PCMI_DEP)
++ $(CXX) -shared $(LDFLAGS) -Wl,-soname,$(ZITA-ALSA-PCMI_MAJ) -o $(ZITA-ALSA-PCMI_MIN) $(ZITA-ALSA-PCMI_O) $(ZITA-ALSA-PCMI_DEP)
+
+
+ install: $(ZITA-ALSA-PCMI_MIN)
+ install -Dm 644 $(ZITA-ALSA-PCMI_H) $(DESTDIR)$(PREFIX)/include/$(ZITA-ALSA-PCMI_H)
+ install -Dm 644 $(ZITA-ALSA-PCMI_MIN) $(DESTDIR)$(PREFIX)/$(LIBDIR)/$(ZITA-ALSA-PCMI_MIN)
+ ln -sf $(ZITA-ALSA-PCMI_MIN) $(DESTDIR)$(PREFIX)/$(LIBDIR)/$(ZITA-ALSA-PCMI_SO)
+- ldconfig
++ ln -sf $(ZITA-ALSA-PCMI_MIN) $(DESTDIR)$(PREFIX)/$(LIBDIR)/$(ZITA-ALSA-PCMI_MAJ)
+
+ uninstall:
+ rm -rf $(DESTDIR)$(PREFIX)/include/zita-alsa-pcmi.h
+Index: zita-alsa-pcmi-0.2.0/apps/Makefile
+===================================================================
+--- zita-alsa-pcmi-0.2.0.orig/apps/Makefile
++++ zita-alsa-pcmi-0.2.0/apps/Makefile
+@@ -23,9 +23,9 @@ PREFIX = /usr/local
+ SUFFIX := $(shell uname -m | sed -e 's/^unknown/$//' -e 's/^i.86/$//' -e 's/^x86_64/$/64/')
+ LIBDIR = lib$(SUFFIX)
+ VERSION = "0.1.0"
+-LDFLAGS += -L$(PREFIX)/$(LIBDIR)
+-CPPFLAGS += -DVERSION=\"$(VERSION)\"
+-CXXFLAGS += -O2 -Wall -MMD -MP
++LDFLAGS += -L$(PREFIX)/$(LIBDIR) -L../libs/
++CPPFLAGS += -DVERSION=\"$(VERSION)\" -I../libs/
++CXXFLAGS += -Wall -MMD -MP
+
+
+ all: alsa_loopback alsa_delay
+@@ -34,7 +34,7 @@ all: alsa_loopback alsa_delay
+ ALSA_LOOPBACK_O = alsa_loopback.o pxthread.o
+ alsa_loopback: LDLIBS += -lzita-alsa-pcmi -lasound -lpthread -lrt
+ alsa_loopback: $(ALSA_LOOPBACK_O)
+- g++ $(LDFLAGS) -o $@ $(ALSA_LOOPBACK_O) $(LDLIBS)
++ $(CXX) $(LDFLAGS) -o $@ $(ALSA_LOOPBACK_O) $(LDLIBS)
+ $(ALSA_LOOPBACK_O):
+ -include $(_ALSA_LOOPBACK_O:%.o=%.d)
+
+@@ -42,7 +42,7 @@ $(ALSA_LOOPBACK_O):
+ ALSA_DELAY_O = alsa_delay.o mtdm.o pxthread.o
+ alsa_delay: LDLIBS += -lzita-alsa-pcmi -lasound -lpthread -lrt
+ alsa_delay: $(ALSA_DELAY_O)
+- g++ $(LDFLAGS) -o $@ $(ALSA_DELAY_O) $(LDLIBS)
++ $(CXX) $(LDFLAGS) -o $@ $(ALSA_DELAY_O) $(LDLIBS)
+ $(ALSA_DELAY_O):
+ -include $(ALSA_DELAY_O:%.o=%.d)
+
diff --git a/media-libs/zita-alsa-pcmi/metadata.xml b/media-libs/zita-alsa-pcmi/metadata.xml
new file mode 100644
index 000000000000..e1774e3d9ad7
--- /dev/null
+++ b/media-libs/zita-alsa-pcmi/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>sound</herd>
+</pkgmetadata>
diff --git a/media-libs/zita-alsa-pcmi/zita-alsa-pcmi-0.2.0.ebuild b/media-libs/zita-alsa-pcmi/zita-alsa-pcmi-0.2.0.ebuild
new file mode 100644
index 000000000000..24df465ed682
--- /dev/null
+++ b/media-libs/zita-alsa-pcmi/zita-alsa-pcmi-0.2.0.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs multilib
+
+DESCRIPTION="Provides easy access to ALSA PCM devices"
+HOMEPAGE="http://kokkinizita.linuxaudio.org/linuxaudio/"
+SRC_URI="http://kokkinizita.linuxaudio.org/linuxaudio/downloads/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND="media-libs/alsa-lib"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}/makefile.patch"
+}
+
+src_compile() {
+ tc-export CC CXX
+ cd "${S}/libs"
+ emake PREFIX="${EPREFIX}/usr" LIBDIR="$(get_libdir)"
+ ln -s libzita-alsa-pcmi.so.0.2.0 libzita-alsa-pcmi.so
+ cd "${S}/apps"
+ emake PREFIX="${EPREFIX}/usr" LIBDIR="$(get_libdir)"
+}
+
+src_install() {
+ cd "${S}/libs"
+ emake PREFIX="${EPREFIX}/usr" LIBDIR="$(get_libdir)" DESTDIR="${D}" install
+ cd "${S}/apps"
+ emake PREFIX="${EPREFIX}/usr" LIBDIR="$(get_libdir)" DESTDIR="${D}" install
+ cd "${S}"
+ dodoc AUTHORS README
+}
diff --git a/media-libs/zita-convolver/Manifest b/media-libs/zita-convolver/Manifest
new file mode 100644
index 000000000000..c2be2c3911ec
--- /dev/null
+++ b/media-libs/zita-convolver/Manifest
@@ -0,0 +1 @@
+DIST zita-convolver-2.0.0.tar.bz2 12858 RMD160 93c93d45b473156d8a1cc9f1c270ee5ac7402ef9 SHA1 0b6c6bee9bfc4c69ce572a01b84163fa4ac5d318 SHA256 a2c9b3a19f24522819ab2ff852915da27cef93b5e32b1a339ece5627ac3c63e4
diff --git a/media-libs/zita-convolver/files/zita-convolver-2.0.0-makefile.patch b/media-libs/zita-convolver/files/zita-convolver-2.0.0-makefile.patch
new file mode 100644
index 000000000000..cfc45f4e4261
--- /dev/null
+++ b/media-libs/zita-convolver/files/zita-convolver-2.0.0-makefile.patch
@@ -0,0 +1,32 @@
+Index: zita-convolver-2.0.0/libs/Makefile
+===================================================================
+--- zita-convolver-2.0.0.orig/libs/Makefile
++++ zita-convolver-2.0.0/libs/Makefile
+@@ -28,9 +28,7 @@ VERSION = $(MAJVERS).$(MINVERS)
+ DISTDIR = zita-convolver-$(VERSION)
+
+
+-CPPFLAGS += -Wall -I. -fPIC -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -O3
+-CPPFLAGS += -mmmx -msse -mfpmath=sse -ffast-math -funroll-loops -fpermissive
+-CPPFLAGS += -march=i686
++CPPFLAGS += -Wall -I. -fPIC -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS
+ #CPPFLAGS += -DVECTORIZE
+
+ LDLFAGS +=
+@@ -46,7 +44,7 @@ ZITA-CONVOLVER_H = zita-convolver.h
+
+
+ $(ZITA-CONVOLVER_MIN): $(ZITA-CONVOLVER_O)
+- g++ -shared $(LDFLAGS) -Wl,-soname,$(ZITA-CONVOLVER_MAJ) -o $(ZITA-CONVOLVER_MIN) $(ZITA-CONVOLVER_O) $(ZITA-CONVOLVER_DEP)
++ $(CXX) -shared $(LDFLAGS) -Wl,-soname,$(ZITA-CONVOLVER_MAJ) -o $(ZITA-CONVOLVER_MIN) $(ZITA-CONVOLVER_O) $(ZITA-CONVOLVER_DEP)
+
+
+ install: $(ZITA-CONVOLVER_MIN)
+@@ -54,7 +52,6 @@ install: $(ZITA-CONVOLVER_MIN)
+ install -d $(PREFIX)/$(LIBDIR)
+ install -m 644 $(ZITA-CONVOLVER_H) $(PREFIX)/include
+ install -m 755 $(ZITA-CONVOLVER_MIN) $(PREFIX)/$(LIBDIR)
+- ldconfig
+ ln -sf $(ZITA-CONVOLVER_MIN) $(PREFIX)/$(LIBDIR)/$(ZITA-CONVOLVER_SO)
+
+
diff --git a/media-libs/zita-convolver/metadata.xml b/media-libs/zita-convolver/metadata.xml
new file mode 100644
index 000000000000..0dc3775f83d7
--- /dev/null
+++ b/media-libs/zita-convolver/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>proaudio</herd>
+</pkgmetadata>
diff --git a/media-libs/zita-convolver/zita-convolver-2.0.0.ebuild b/media-libs/zita-convolver/zita-convolver-2.0.0.ebuild
new file mode 100644
index 000000000000..4d2c13180345
--- /dev/null
+++ b/media-libs/zita-convolver/zita-convolver-2.0.0.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+inherit base toolchain-funcs multilib
+
+DESCRIPTION="C++ library implementing a real-time convolution matrix"
+HOMEPAGE="http://kokkinizita.net/linuxaudio/downloads/index.html"
+SRC_URI="http://kokkinizita.net/linuxaudio/downloads/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="sci-libs/fftw:3.0"
+DEPEND="${RDEPEND}"
+
+PATCHES=( "${FILESDIR}/${P}-makefile.patch" )
+
+S=${WORKDIR}/${P}/libs
+
+src_compile() {
+ tc-export CXX
+ emake || die
+}
+
+src_install() {
+ emake PREFIX="${D}/usr" LIBDIR="$(get_libdir)" install || die
+ dodoc "${WORKDIR}/${P}/AUTHORS" || die
+}
diff --git a/media-libs/zvbi/Manifest b/media-libs/zvbi/Manifest
new file mode 100644
index 000000000000..8b65f92ccb78
--- /dev/null
+++ b/media-libs/zvbi/Manifest
@@ -0,0 +1 @@
+DIST zvbi-0.2.35.tar.bz2 1047761 SHA256 fc883c34111a487c4a783f91b1b2bb5610d8d8e58dcba80c7ab31e67e4765318 SHA512 3d73eb0a7d05fdf1e3f8a74cc9d4fcb2a0287285904d59230c832f42b91afb072e96bda7e396ef07f268348061a51242925746db124bbb713cf56bdfabdada5d WHIRLPOOL e365d28db9834a5e9f8780d45f9fcb04c7b98e5a3122fe81336a42bb2de54505583a535908cabc0851b6753f589b758bf1d6e2831c88cfbeba9fe8d0633a42f0
diff --git a/media-libs/zvbi/metadata.xml b/media-libs/zvbi/metadata.xml
new file mode 100644
index 000000000000..d4fa9a81e2b5
--- /dev/null
+++ b/media-libs/zvbi/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>media-tv@gentoo.org</email>
+ <name>Television related Applications in Gentoo's Portage</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">zapping</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/zvbi/zvbi-0.2.35-r1.ebuild b/media-libs/zvbi/zvbi-0.2.35-r1.ebuild
new file mode 100644
index 000000000000..0a275cc00199
--- /dev/null
+++ b/media-libs/zvbi/zvbi-0.2.35-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 eutils libtool multilib-minimal
+
+DESCRIPTION="VBI Decoding Library for Zapping"
+SRC_URI="mirror://sourceforge/zapping/${P}.tar.bz2"
+HOMEPAGE="http://zapping.sourceforge.net"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="doc dvb nls static-libs v4l X"
+
+RDEPEND=">=media-libs/libpng-1.5.18[${MULTILIB_USEDEP}]
+ >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+ nls? ( >=virtual/libintl-0-r1[${MULTILIB_USEDEP}] )
+ X? ( >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ virtual/os-headers
+ doc? ( app-doc/doxygen )
+ nls? ( sys-devel/gettext )
+ X? ( x11-libs/libXt )"
+
+src_prepare() {
+ elibtoolize
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ $(use_enable static-libs static) \
+ $(use_enable v4l) \
+ $(use_enable dvb) \
+ $(use_enable nls) \
+ $(use_with X x) \
+ $(multilib_native_use_with doc doxygen)
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+
+ multilib_is_native_abi && use doc && dohtml -a png,gif,html,css doc/html/*
+}
+
+multilib_src_install_all() {
+ dodoc AUTHORS BUGS ChangeLog NEWS README TODO
+
+ find "${D}" -name '*.la' -delete
+}
diff --git a/media-libs/zvbi/zvbi-0.2.35.ebuild b/media-libs/zvbi/zvbi-0.2.35.ebuild
new file mode 100644
index 000000000000..679692dae8ee
--- /dev/null
+++ b/media-libs/zvbi/zvbi-0.2.35.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils libtool
+
+DESCRIPTION="VBI Decoding Library for Zapping"
+SRC_URI="mirror://sourceforge/zapping/${P}.tar.bz2"
+HOMEPAGE="http://zapping.sourceforge.net"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="doc dvb nls static-libs v4l X"
+
+RDEPEND=">=media-libs/libpng-1.4
+ sys-libs/zlib
+ nls? ( virtual/libintl )
+ X? ( x11-libs/libX11 )"
+DEPEND="${RDEPEND}
+ virtual/os-headers
+ doc? ( app-doc/doxygen )
+ nls? ( sys-devel/gettext )
+ X? ( x11-libs/libXt )"
+
+src_prepare() {
+ elibtoolize
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable v4l) \
+ $(use_enable dvb) \
+ $(use_enable nls) \
+ $(use_with X x) \
+ $(use_with doc doxygen)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dodoc AUTHORS BUGS ChangeLog NEWS README TODO
+ use doc && dohtml -a png,gif,html,css doc/html/*
+
+ find "${D}" -name '*.la' -delete
+}